Your IP : 216.73.216.215


Current Path : /home/flapst5/ekmtoronto.com/wp-content/plugins/code-snippets/dist/
Upload File :
Current File : /home/flapst5/ekmtoronto.com/wp-content/plugins/code-snippets/dist/edit.js

/*! For license information please see edit.js.LICENSE.txt */
(self.webpackChunkcode_snippets=self.webpackChunkcode_snippets||[]).push([[8739],{5896(e,t,n){"use strict";n.d(t,{M:()=>E});var r=n(3453),o=n(4467),i=n(7723),s=n(6942),a=n.n(s),c=n(1609),l=n(6492),u=n(6842),p=n(6788),d=n(8586),f=n(3028),h=n(3780),m=n(401),b=n(7882),v=n(790);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(t){(0,o.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var O=new URLSearchParams(window.location.search),w=function(e){var t=e.name,n=e.url,r=e.label,o=(0,c.useMemo)(function(){return new URL(n).searchParams.get("page")},[n]),i=!O.get("subpage")&&O.get("page")===o;return(0,v.jsx)("li",{children:(0,v.jsx)("a",y(y({href:n,className:a()("".concat(t,"-link"),{"active-link":i})},!o&&{target:"_blank",rel:"noopener noreferrer"}),{},{children:r}))})},x=function(){var e,t;return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(w,{name:"docs",url:"https://codesnippets.pro/docs",label:(0,i.__)("Docs","code-snippets")}),(0,v.jsx)(w,{name:"cloud",url:"https://codesnippets.cloud/",label:(0,i.__)("Cloud Dashboard","code-snippets")}),(null===(e=window.CODE_SNIPPETS)||void 0===e?void 0:e.urls.welcome)&&(0,v.jsx)(w,{name:"welcome",url:window.CODE_SNIPPETS.urls.welcome,label:(0,i.__)("What's New","code-snippets")}),(null===(t=window.CODE_SNIPPETS)||void 0===t?void 0:t.urls.import)&&(0,v.jsx)(w,{name:"import-snippets",url:window.CODE_SNIPPETS.urls.import,label:(0,i._x)("Import","snippets","code-snippets")})]})},j=function(){return(0,v.jsx)("li",{className:"toolbar-more-item",children:(0,v.jsxs)("details",{className:"toolbar-more-menu",children:[(0,v.jsxs)("summary",{children:[(0,i.__)("More","code-snippets"),(0,v.jsx)("span",{className:"dashicons dashicons-arrow-down-alt2","aria-hidden":"true"})]}),(0,v.jsx)("ul",{children:(0,v.jsx)(x,{})})]})})},S=function(){var e,t=(0,c.useState)(!1),n=(0,r.A)(t,2),o=n[0],s=n[1];return(0,v.jsxs)("div",{className:"code-snippets-toolbar-upper",children:[(0,v.jsxs)("div",{className:"logo",children:[(0,v.jsx)("img",{src:"".concat(null===(e=window.CODE_SNIPPETS)||void 0===e?void 0:e.urls.plugin,"/assets/icon.svg"),alt:(0,i.__)("Code Snippets logo","code-snippets"),"aria-hidden":"true"}),(0,v.jsx)("div",{children:(0,i.__)("Code Snippets","code-snippets")})]}),(0,v.jsx)("nav",{"aria-label":(0,i.__)("Main links","code-snippets"),children:(0,v.jsxs)("ul",{children:[(0,v.jsx)(x,{}),(0,v.jsx)(j,{}),(0,l.W9)()&&(0,v.jsx)("li",{className:"toolbar-upgrade-item",children:(0,v.jsx)("a",{className:"button button-large button-secondary",href:"https://codesnippets.pro/pricing/",target:"_blank",rel:"noopener noreferrer",onClick:function(e){e.preventDefault(),s(!0)},children:(0,i.__)("Upgrade to Pro","code-snippets")})})]})}),(0,v.jsx)(b.o,{isOpen:o,setIsOpen:s})]})},_=function(e){var t,n=e.subpage,r=e.label,o=e.Icon,s=e.isPro;return(0,v.jsx)("li",{children:(0,v.jsxs)("a",{href:(0,u.c$)(null===(t=window.CODE_SNIPPETS)||void 0===t?void 0:t.urls.manage,{subpage:n}),className:a()("".concat(n,"-link"),{"active-link":n===O.get("subpage")}),children:[(0,v.jsx)(o,{"aria-hidden":"true"}),(0,v.jsx)("span",{className:"toolbar-nav-label",children:r}),s&&!(0,l.QX)()&&(0,v.jsx)("span",{className:"pro-chip",children:(0,i.__)("Pro","code-snippets")})]})})},C=function(){var e;return(0,v.jsx)("div",{className:"code-snippets-toolbar-lower",children:(0,v.jsx)("nav",{"aria-label":(0,i.__)("Main features","code-snippets"),children:(0,v.jsxs)("ul",{children:[(0,v.jsx)(_,{subpage:"snippets",label:(0,i.__)("Snippets","code-snippets"),Icon:m.M}),(0,l.QX)()&&(0,v.jsx)(_,{subpage:"blueprints",label:(0,i.__)("Blueprints","code-snippets"),Icon:p.J}),(0,v.jsx)(_,{subpage:"cloud-community",label:(0,i.__)("Cloud Community","code-snippets"),Icon:d.z}),(0,v.jsx)(_,{subpage:"cloud-library",label:(0,i.__)("Cloud Library","code-snippets"),Icon:f.$,isPro:!0}),!(0,l.QX)()&&(0,v.jsx)(_,{subpage:"blueprints",label:(0,i.__)("Blueprints","code-snippets"),Icon:p.J,isPro:!0}),(null===(e=window.CODE_SNIPPETS)||void 0===e?void 0:e.urls.settings)&&(0,v.jsx)("li",{className:"toolbar-end-item",children:(0,v.jsxs)("a",{href:window.CODE_SNIPPETS.urls.settings,className:"settings-link",children:[(0,v.jsx)(h.Z,{"aria-hidden":"true"}),(0,v.jsx)("span",{className:"toolbar-nav-label",children:(0,i.__)("Settings","code-snippets")})]})})]})})})},E=function(){return(0,v.jsxs)("div",{className:"code-snippets-toolbar",children:[(0,v.jsx)(S,{}),(0,v.jsx)(C,{})]})}},7882(e,t,n){"use strict";n.d(t,{o:()=>a});var r=n(6087),o=(n(1609),n(7723)),i=n(6427),s=n(790),a=function(e){var t,n=e.isOpen,r=e.setIsOpen;return n?(0,s.jsxs)(i.Modal,{"aria-labelledby":"code-snippets-upsell-dialog-title",className:"code-snippets-upsell code-snippets-upsell-dialog",onRequestClose:function(){r(!1)},children:[(0,s.jsx)("img",{src:"".concat(null===(t=window.CODE_SNIPPETS)||void 0===t?void 0:t.urls.plugin,"/assets/icon.svg"),alt:(0,o.__)("Code Snippets logo","code-snippets")}),(0,s.jsx)(c,{})]}):null},c=function(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h1",{id:"code-snippets-upsell-dialog-title",children:(0,r.createInterpolateElement)((0,o.__)("Unlock all cloud sync features and many more, with <span>Code Snippets Pro</span>","code-snippets"),{span:(0,s.jsx)("span",{})})}),(0,s.jsx)("p",{children:(0,r.createInterpolateElement)((0,o.__)("With Code Snippets Pro you can connect your WordPress sites to the code snippets cloud platform and be able to <strong>backup, synchronise, collaborate, and deploy</strong> your snippets from one central location.","code-snippets"),{strong:(0,s.jsx)("strong",{})})}),(0,s.jsx)("a",{href:"https://codesnippets.pro/pricing/",className:"button button-primary button-large",rel:"noreferrer",target:"_blank",children:(0,o.__)("Explore Code Snippets Pro","code-snippets")}),(0,s.jsx)("p",{children:(0,o.__)("Here's what else you get with Pro:","code-snippets")}),(0,s.jsxs)("ul",{children:[(0,s.jsx)("li",{children:(0,o.__)("Create, explain and verify snippets with AI","code-snippets")}),(0,s.jsx)("li",{children:(0,o.__)("Control when snippets run with Conditions","code-snippets")}),(0,s.jsx)("li",{children:(0,o.__)("CSS stylesheet snippets","code-snippets")}),(0,s.jsx)("li",{children:(0,o.__)("Minified JavaScript snippets","code-snippets")}),(0,s.jsx)("li",{children:(0,o.__)("Editor blocks and Elementor widgets","code-snippets")}),(0,s.jsx)("li",{children:(0,o.__)("Cloud sync and backup","code-snippets")}),(0,s.jsx)("li",{children:(0,o.__)("Cloud share and deploy","code-snippets")}),(0,s.jsx)("li",{children:(0,o.__)("Cloud bundles and teams","code-snippets")}),(0,s.jsx)("li",{children:(0,o.__)("WP-CLI commands","code-snippets")}),(0,s.jsx)("li",{children:(0,o.__)("And much more!","code-snippets")})]})]})}},6788(e,t,n){"use strict";n.d(t,{J:()=>a});var r=n(4467),o=(n(1609),n(790));function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var a=function(e){return(0,o.jsx)("svg",s(s({width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:(0,o.jsx)("path",{stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",d:"M19.499 17.334a2.167 2.167 0 1 1-2.167 2.167m2.167-2.167a2.167 2.167 0 0 0-2.167 2.167m2.167-2.167V8.667m-2.167 10.834H8.665m0 0A2.167 2.167 0 0 0 6.5 17.334m2.166 2.167A2.167 2.167 0 1 1 6.5 17.334m0 0V8.667m2.166-2.166A2.167 2.167 0 1 0 6.5 8.667m2.166-2.166A2.167 2.167 0 0 1 6.5 8.667m2.166-2.166h8.667m0 0a2.167 2.167 0 1 1 2.167 2.166m-2.167-2.166a2.167 2.167 0 0 0 2.167 2.166M8.124 8.126l9.75 9.75m-9.75 0 9.75-9.75"})}))}},8586(e,t,n){"use strict";n.d(t,{z:()=>a});var r=n(4467),o=(n(1609),n(790));function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var a=function(e){return(0,o.jsx)("svg",s(s({width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:(0,o.jsx)("path",{d:"M20.0417 20.0417L22.75 22.75M4.33333 6.5H21.6667M4.33333 13H8.66666M4.33333 19.5H8.66666M11.9167 16.25C11.9167 17.3993 12.3732 18.5015 13.1859 19.3141C13.9985 20.1268 15.1007 20.5833 16.25 20.5833C17.3993 20.5833 18.5015 20.1268 19.3141 19.3141C20.1268 18.5015 20.5833 17.3993 20.5833 16.25C20.5833 15.1007 20.1268 13.9985 19.3141 13.1859C18.5015 12.3732 17.3993 11.9167 16.25 11.9167C15.1007 11.9167 13.9985 12.3732 13.1859 13.1859C12.3732 13.9985 11.9167 15.1007 11.9167 16.25Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))}},3028(e,t,n){"use strict";n.d(t,{$:()=>a});var r=n(4467),o=(n(1609),n(790));function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var a=function(e){return(0,o.jsx)("svg",s(s({width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:(0,o.jsx)("path",{d:"M11.9167 19.5045H7.21175C4.42541 19.5002 2.16666 17.326 2.16666 14.6436C2.16666 11.9624 4.42541 9.78812 7.21175 9.78812C7.6375 7.87928 9.15525 6.32145 11.193 5.7007C13.2297 5.08103 15.4787 5.49162 17.0907 6.78403C18.7027 8.0732 19.4328 10.0416 19.0082 11.9505H20.0807C20.8821 11.9519 21.6621 12.2097 22.3067 12.686C22.9513 13.1624 23.4266 13.8324 23.6632 14.5981M21.6667 22.7502L23.8333 20.5835L21.6667 18.4169M18.4167 18.4169L16.25 20.5835L18.4167 22.7502",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))}},3780(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(4467),o=(n(1609),n(790));function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var a=function(e){return(0,o.jsxs)("svg",s(s({width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:[(0,o.jsx)("path",{d:"M11.1854 4.67675C11.6469 2.77442 14.3531 2.77442 14.8146 4.67675C14.8838 4.96253 15.0196 5.22793 15.2108 5.45133C15.402 5.67474 15.6432 5.84984 15.9149 5.96239C16.1865 6.07494 16.4809 6.12176 16.7741 6.09902C17.0673 6.07629 17.3509 5.98466 17.602 5.83158C19.2736 4.81325 21.1878 6.72642 20.1695 8.39908C20.0166 8.65004 19.9252 8.93353 19.9025 9.2265C19.8798 9.51948 19.9266 9.81367 20.039 10.0852C20.1514 10.3567 20.3263 10.5978 20.5495 10.789C20.7726 10.9802 21.0377 11.116 21.3233 11.1854C23.2256 11.6469 23.2256 14.3531 21.3233 14.8146C21.0375 14.8838 20.7721 15.0196 20.5487 15.2108C20.3253 15.402 20.1502 15.6432 20.0376 15.9149C19.9251 16.1865 19.8782 16.4809 19.901 16.7741C19.9237 17.0673 20.0153 17.3509 20.1684 17.602C21.1868 19.2736 19.2736 21.1878 17.6009 20.1695C17.35 20.0166 17.0665 19.9252 16.7735 19.9025C16.4805 19.8798 16.1863 19.9266 15.9148 20.039C15.6433 20.1514 15.4022 20.3263 15.211 20.5495C15.0198 20.7726 14.884 21.0377 14.8146 21.3233C14.3531 23.2256 11.6469 23.2256 11.1854 21.3233C11.1162 21.0375 10.9804 20.7721 10.7892 20.5487C10.598 20.3253 10.3568 20.1502 10.0851 20.0376C9.81347 19.9251 9.51907 19.8782 9.2259 19.901C8.93273 19.9237 8.64907 20.0153 8.398 20.1684C6.72642 21.1868 4.81217 19.2736 5.8305 17.6009C5.98336 17.35 6.07485 17.0665 6.09752 16.7735C6.1202 16.4805 6.07343 16.1863 5.96101 15.9148C5.84859 15.6433 5.6737 15.4022 5.45055 15.211C5.22739 15.0198 4.96228 14.884 4.67675 14.8146C2.77442 14.3531 2.77442 11.6469 4.67675 11.1854C4.96253 11.1162 5.22793 10.9804 5.45133 10.7892C5.67474 10.598 5.84984 10.3568 5.96239 10.0851C6.07494 9.81347 6.12176 9.51907 6.09902 9.2259C6.07629 8.93273 5.98466 8.64907 5.83158 8.398C4.81325 6.72642 6.72642 4.81217 8.39908 5.8305C9.48242 6.48917 10.8864 5.90633 11.1854 4.67675Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M9.75 13C9.75 13.862 10.0924 14.6886 10.7019 15.2981C11.3114 15.9076 12.138 16.25 13 16.25C13.862 16.25 14.6886 15.9076 15.2981 15.2981C15.9076 14.6886 16.25 13.862 16.25 13C16.25 12.138 15.9076 11.3114 15.2981 10.7019C14.6886 10.0924 13.862 9.75 13 9.75C12.138 9.75 11.3114 10.0924 10.7019 10.7019C10.0924 11.3114 9.75 12.138 9.75 13Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))}},401(e,t,n){"use strict";n.d(t,{M:()=>a});var r=n(4467),o=(n(1609),n(790));function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var a=function(e){return(0,o.jsx)("svg",s(s({width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:(0,o.jsx)("path",{d:"M7.58333 8.66634L3.25 12.9997L7.58333 17.333M18.4167 8.66634L22.75 12.9997L18.4167 17.333M15.1667 4.33301L10.8333 21.6663",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))}},3203(e,t,n){"use strict";var r={};n.r(r),n.d(r,{hasBrowserEnv:()=>Oe,hasStandardBrowserEnv:()=>xe,hasStandardBrowserWebWorkerEnv:()=>je,navigator:()=>we,origin:()=>Se});var o=n(1609),i=n(3453),s=n(6942),a=n.n(s),c=n(7723),l=n(3145),u=n(7800);function p(e){return function(e){if(Array.isArray(e))return(0,l.A)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,u.A)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var d=n(467),f=n(4756),h=n.n(f);function m(e,t){return function(){return e.apply(t,arguments)}}const{toString:b}=Object.prototype,{getPrototypeOf:v}=Object,{iterator:g,toStringTag:y}=Symbol,O=(w=Object.create(null),e=>{const t=b.call(e);return w[t]||(w[t]=t.slice(8,-1).toLowerCase())});var w;const x=e=>(e=e.toLowerCase(),t=>O(t)===e),j=e=>t=>typeof t===e,{isArray:S}=Array,_=j("undefined");function C(e){return null!==e&&!_(e)&&null!==e.constructor&&!_(e.constructor)&&k(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const E=x("ArrayBuffer"),P=j("string"),k=j("function"),A=j("number"),D=e=>null!==e&&"object"==typeof e,R=e=>{if("object"!==O(e))return!1;const t=v(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||y in e||g in e)},I=x("Date"),T=x("File"),N=x("Blob"),L=x("FileList"),M=x("URLSearchParams"),[F,V,U,B]=["ReadableStream","Request","Response","Headers"].map(x);function H(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),S(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(C(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function z(e,t){if(C(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const W="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,$=e=>!_(e)&&e!==W,q=(G="undefined"!=typeof Uint8Array&&v(Uint8Array),e=>G&&e instanceof G);var G;const X=x("HTMLFormElement"),J=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),K=x("RegExp"),Y=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};H(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)},Z=x("AsyncFunction"),Q=(ee="function"==typeof setImmediate,te=k(W.postMessage),ee?setImmediate:te?((e,t)=>(W.addEventListener("message",({source:n,data:r})=>{n===W&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),W.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var ee,te;const ne="undefined"!=typeof queueMicrotask?queueMicrotask.bind(W):"undefined"!=typeof process&&process.nextTick||Q,re={isArray:S,isArrayBuffer:E,isBuffer:C,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||k(e.append)&&("formdata"===(t=O(e))||"object"===t&&k(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&E(e.buffer),t},isString:P,isNumber:A,isBoolean:e=>!0===e||!1===e,isObject:D,isPlainObject:R,isEmptyObject:e=>{if(!D(e)||C(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:F,isRequest:V,isResponse:U,isHeaders:B,isUndefined:_,isDate:I,isFile:T,isBlob:N,isRegExp:K,isFunction:k,isStream:e=>D(e)&&k(e.pipe),isURLSearchParams:M,isTypedArray:q,isFileList:L,forEach:H,merge:function e(){const{caseless:t,skipUndefined:n}=$(this)&&this||{},r={},o=(o,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;const s=t&&z(r,i)||i;R(r[s])&&R(o)?r[s]=e(r[s],o):R(o)?r[s]=e({},o):S(o)?r[s]=o.slice():n&&_(o)||(r[s]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&H(arguments[e],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(H(t,(t,r)=>{n&&k(t)?Object.defineProperty(e,r,{value:m(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&v(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:O,kindOfTest:x,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(S(e))return e;let t=e.length;if(!A(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[g]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:X,hasOwnProperty:J,hasOwnProp:J,reduceDescriptors:Y,freezeMethods:e=>{Y(e,(t,n)=>{if(k(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];k(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return S(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:z,global:W,isContextDefined:$,isSpecCompliantForm:function(e){return!!(e&&k(e.append)&&"FormData"===e[y]&&e[g])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(D(e)){if(t.indexOf(e)>=0)return;if(C(e))return e;if(!("toJSON"in e)){t[r]=e;const o=S(e)?[]:{};return H(e,(e,t)=>{const i=n(e,r+1);!_(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Z,isThenable:e=>e&&(D(e)||k(e))&&k(e.then)&&k(e.catch),setImmediate:Q,asap:ne,isIterable:e=>null!=e&&k(e[g])};class oe extends Error{static from(e,t,n,r,o,i){const s=new oe(e.message,t||e.code,n,r,o);return s.cause=e,s.name=e.name,i&&Object.assign(s,i),s}constructor(e,t,n,r,o){super(e),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:re.toJSONObject(this.config),code:this.code,status:this.status}}}oe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",oe.ERR_BAD_OPTION="ERR_BAD_OPTION",oe.ECONNABORTED="ECONNABORTED",oe.ETIMEDOUT="ETIMEDOUT",oe.ERR_NETWORK="ERR_NETWORK",oe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",oe.ERR_DEPRECATED="ERR_DEPRECATED",oe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",oe.ERR_BAD_REQUEST="ERR_BAD_REQUEST",oe.ERR_CANCELED="ERR_CANCELED",oe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",oe.ERR_INVALID_URL="ERR_INVALID_URL";const ie=oe;function se(e){return re.isPlainObject(e)||re.isArray(e)}function ae(e){return re.endsWith(e,"[]")?e.slice(0,-2):e}function ce(e,t,n){return e?e.concat(t).map(function(e,t){return e=ae(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const le=re.toFlatObject(re,{},null,function(e){return/^is[A-Z]/.test(e)}),ue=function(e,t,n){if(!re.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!re.isUndefined(t[e])})).metaTokens,o=n.visitor||l,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&re.isSpecCompliantForm(t);if(!re.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(re.isDate(e))return e.toISOString();if(re.isBoolean(e))return e.toString();if(!a&&re.isBlob(e))throw new ie("Blob is not supported. Use a Buffer instead.");return re.isArrayBuffer(e)||re.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(re.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(re.isArray(e)&&function(e){return re.isArray(e)&&!e.some(se)}(e)||(re.isFileList(e)||re.endsWith(n,"[]"))&&(a=re.toArray(e)))return n=ae(n),a.forEach(function(e,r){!re.isUndefined(e)&&null!==e&&t.append(!0===s?ce([n],r,i):null===s?n:n+"[]",c(e))}),!1;return!!se(e)||(t.append(ce(o,n,i),c(e)),!1)}const u=[],p=Object.assign(le,{defaultVisitor:l,convertValue:c,isVisitable:se});if(!re.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!re.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),re.forEach(n,function(n,i){!0===(!(re.isUndefined(n)||null===n)&&o.call(t,n,re.isString(i)?i.trim():i,r,p))&&e(n,r?r.concat(i):[i])}),u.pop()}}(e),t};function pe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function de(e,t){this._pairs=[],e&&ue(e,this,t)}const fe=de.prototype;fe.append=function(e,t){this._pairs.push([e,t])},fe.toString=function(e){const t=e?function(t){return e.call(this,t,pe)}:pe;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const he=de;function me(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function be(e,t,n){if(!t)return e;const r=n&&n.encode||me,o=re.isFunction(n)?{serialize:n}:n,i=o&&o.serialize;let s;if(s=i?i(t,o):re.isURLSearchParams(t)?t.toString():new he(t,o).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const ve=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){re.forEach(this.handlers,function(t){null!==t&&e(t)})}},ge={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},ye={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:he,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Oe="undefined"!=typeof window&&"undefined"!=typeof document,we="object"==typeof navigator&&navigator||void 0,xe=Oe&&(!we||["ReactNative","NativeScript","NS"].indexOf(we.product)<0),je="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Se=Oe&&window.location.href||"http://localhost",_e={...r,...ye},Ce=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&re.isArray(r)?r.length:i,a?(re.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&re.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&re.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(re.isFormData(e)&&re.isFunction(e.entries)){const n={};return re.forEachEntry(e,(e,r)=>{t(function(e){return re.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null},Ee={transitional:ge,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=re.isObject(e);if(o&&re.isHTMLForm(e)&&(e=new FormData(e)),re.isFormData(e))return r?JSON.stringify(Ce(e)):e;if(re.isArrayBuffer(e)||re.isBuffer(e)||re.isStream(e)||re.isFile(e)||re.isBlob(e)||re.isReadableStream(e))return e;if(re.isArrayBufferView(e))return e.buffer;if(re.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ue(e,new _e.classes.URLSearchParams,{visitor:function(e,t,n,r){return _e.isNode&&re.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=re.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ue(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e){if(re.isString(e))try{return(0,JSON.parse)(e),re.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ee.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(re.isResponse(e)||re.isReadableStream(e))return e;if(e&&re.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw ie.from(e,ie.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_e.classes.FormData,Blob:_e.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};re.forEach(["delete","get","head","post","put","patch"],e=>{Ee.headers[e]={}});const Pe=Ee,ke=re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ae=Symbol("internals");function De(e){return e&&String(e).trim().toLowerCase()}function Re(e){return!1===e||null==e?e:re.isArray(e)?e.map(Re):String(e)}function Ie(e,t,n,r,o){return re.isFunction(r)?r.call(this,t,n):(o&&(t=n),re.isString(t)?re.isString(r)?-1!==t.indexOf(r):re.isRegExp(r)?r.test(t):void 0:void 0)}class Te{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=De(t);if(!o)throw new Error("header name must be a non-empty string");const i=re.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Re(e))}const i=(e,t)=>re.forEach(e,(e,n)=>o(e,n,t));if(re.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(re.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&ke[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(re.isObject(e)&&re.isIterable(e)){let n,r,o={};for(const t of e){if(!re.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?re.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=De(e)){const n=re.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(re.isFunction(t))return t.call(this,e,n);if(re.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=De(e)){const n=re.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ie(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=De(e)){const o=re.findKey(n,e);!o||t&&!Ie(0,n[o],o,t)||(delete n[o],r=!0)}}return re.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Ie(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return re.forEach(this,(r,o)=>{const i=re.findKey(n,o);if(i)return t[i]=Re(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();s!==o&&delete t[o],t[s]=Re(r),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return re.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&re.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Ae]=this[Ae]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=De(e);t[r]||(function(e,t){const n=re.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return re.isArray(e)?e.forEach(r):r(e),this}}Te.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),re.reduceDescriptors(Te.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),re.freezeMethods(Te);const Ne=Te;function Le(e,t){const n=this||Pe,r=t||n,o=Ne.from(r.headers);let i=r.data;return re.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Me(e){return!(!e||!e.__CANCEL__)}const Fe=class extends ie{constructor(e,t,n){super(null==e?"canceled":e,ie.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Ve(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new ie("Request failed with status code "+n.status,[ie.ERR_BAD_REQUEST,ie.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Ue=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[s];o||(o=c),n[i]=a,r[i]=c;let u=s,p=0;for(;u!==i;)p+=n[u++],u%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const d=l&&c-l;return d?Math.round(1e3*p/d):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(n=e,r||(r=setTimeout(()=>{r=null,s(n)},i-a)))},()=>n&&s(n)]}(n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=i-r,c=o(a);r=i,e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},Be=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},He=e=>(...t)=>re.asap(()=>e(...t)),ze=_e.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,_e.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(_e.origin),_e.navigator&&/(msie|trident)/i.test(_e.navigator.userAgent)):()=>!0,We=_e.hasStandardBrowserEnv?{write(e,t,n,r,o,i,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];re.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),re.isString(r)&&a.push(`path=${r}`),re.isString(o)&&a.push(`domain=${o}`),!0===i&&a.push("secure"),re.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function $e(e,t,n){let r=!("string"==typeof(o=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o));var o;return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const qe=e=>e instanceof Ne?{...e}:e;function Ge(e,t){t=t||{};const n={};function r(e,t,n,r){return re.isPlainObject(e)&&re.isPlainObject(t)?re.merge.call({caseless:r},e,t):re.isPlainObject(t)?re.merge({},t):re.isArray(t)?t.slice():t}function o(e,t,n,o){return re.isUndefined(t)?re.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!re.isUndefined(t))return r(void 0,t)}function s(e,t){return re.isUndefined(t)?re.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,n)=>o(qe(e),qe(t),0,!0)};return re.forEach(Object.keys({...e,...t}),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const i=re.hasOwnProp(c,r)?c[r]:o,s=i(e[r],t[r],r);re.isUndefined(s)&&i!==a||(n[r]=s)}),n}const Xe=e=>{const t=Ge({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;if(t.headers=s=Ne.from(s),t.url=be($e(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),re.isFormData(n))if(_e.hasStandardBrowserEnv||_e.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(re.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)})}if(_e.hasStandardBrowserEnv&&(r&&re.isFunction(r)&&(r=r(t)),r||!1!==r&&ze(t.url))){const e=o&&i&&We.read(i);e&&s.set(o,e)}return t},Je="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Xe(e);let o=r.data;const i=Ne.from(r.headers).normalize();let s,a,c,l,u,{responseType:p,onUploadProgress:d,onDownloadProgress:f}=r;function h(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function b(){if(!m)return;const r=Ne.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Ve(function(e){t(e),h()},function(e){n(e),h()},{data:p&&"text"!==p&&"json"!==p?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=b:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(b)},m.onabort=function(){m&&(n(new ie("Request aborted",ie.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new ie(r,ie.ERR_NETWORK,e,m);o.event=t||null,n(o),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ge;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new ie(t,o.clarifyTimeoutError?ie.ETIMEDOUT:ie.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&re.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),re.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),p&&"json"!==p&&(m.responseType=r.responseType),f&&([c,u]=Ue(f,!0),m.addEventListener("progress",c)),d&&m.upload&&([a,l]=Ue(d),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(s=t=>{m&&(n(!t||t.type?new Fe(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);v&&-1===_e.protocols.indexOf(v)?n(new ie("Unsupported protocol "+v+":",ie.ERR_BAD_REQUEST,e)):m.send(o||null)})},Ke=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof ie?t:new Fe(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new ie(`timeout of ${t}ms exceeded`,ie.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:a}=r;return a.unsubscribe=()=>re.asap(s),a}},Ye=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},Ze=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*Ye(n,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let i=r.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},{isFunction:Qe}=re,et=(({Request:e,Response:t})=>({Request:e,Response:t}))(re.global),{ReadableStream:tt,TextEncoder:nt}=re.global,rt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ot=e=>{e=re.merge.call({skipUndefined:!0},et,e);const{fetch:t,Request:n,Response:r}=e,o=t?Qe(t):"function"==typeof fetch,i=Qe(n),s=Qe(r);if(!o)return!1;const a=o&&Qe(tt),c=o&&("function"==typeof nt?(l=new nt,e=>l.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var l;const u=i&&a&&rt(()=>{let e=!1;const t=new n(_e.origin,{body:new tt,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),p=s&&a&&rt(()=>re.isReadableStream(new r("").body)),d={stream:p&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new ie(`Response type '${e}' is not supported`,ie.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:o,method:s,data:a,signal:l,cancelToken:f,timeout:h,onDownloadProgress:m,onUploadProgress:b,responseType:v,headers:g,withCredentials:y="same-origin",fetchOptions:O}=Xe(e),w=t||fetch;v=v?(v+"").toLowerCase():"text";let x=Ke([l,f&&f.toAbortSignal()],h),j=null;const S=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let _;try{if(b&&u&&"get"!==s&&"head"!==s&&0!==(_=await(async(e,t)=>{const r=re.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(re.isBlob(e))return e.size;if(re.isSpecCompliantForm(e)){const t=new n(_e.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return re.isArrayBufferView(e)||re.isArrayBuffer(e)?e.byteLength:(re.isURLSearchParams(e)&&(e+=""),re.isString(e)?(await c(e)).byteLength:void 0)})(t):r})(g,a))){let e,t=new n(o,{method:"POST",body:a,duplex:"half"});if(re.isFormData(a)&&(e=t.headers.get("content-type"))&&g.setContentType(e),t.body){const[e,n]=Be(_,Ue(He(b)));a=Ze(t.body,65536,e,n)}}re.isString(y)||(y=y?"include":"omit");const t=i&&"credentials"in n.prototype,l={...O,signal:x,method:s.toUpperCase(),headers:g.normalize().toJSON(),body:a,duplex:"half",credentials:t?y:void 0};j=i&&new n(o,l);let f=await(i?w(j,O):w(o,l));const h=p&&("stream"===v||"response"===v);if(p&&(m||h&&S)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=f[t]});const t=re.toFiniteNumber(f.headers.get("content-length")),[n,o]=m&&Be(t,Ue(He(m),!0))||[];f=new r(Ze(f.body,65536,n,()=>{o&&o(),S&&S()}),e)}v=v||"text";let C=await d[re.findKey(d,v)||"text"](f,e);return!h&&S&&S(),await new Promise((t,n)=>{Ve(t,n,{data:C,headers:Ne.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:j})})}catch(t){if(S&&S(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new ie("Network Error",ie.ERR_NETWORK,e,j,t&&t.response),{cause:t.cause||t});throw ie.from(t,t&&t.code,e,j,t&&t.response)}}},it=new Map,st=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let s,a,c=i.length,l=it;for(;c--;)s=i[c],a=l.get(s),void 0===a&&l.set(s,a=c?new Map:ot(t)),l=a;return a},at=(st(),{http:null,xhr:Je,fetch:{get:st}});re.forEach(at,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const ct=e=>`- ${e}`,lt=e=>re.isFunction(e)||null===e||!1===e,ut=function(e,t){e=re.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let s=0;s<n;s++){let n;if(r=e[s],o=r,!lt(r)&&(o=at[(n=String(r)).toLowerCase()],void 0===o))throw new ie(`Unknown adapter '${n}'`);if(o&&(re.isFunction(o)||(o=o.get(t))))break;i[n||"#"+s]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(ct).join("\n"):" "+ct(e[0]):"as no adapter specified";throw new ie("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o};function pt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Fe(null,e)}function dt(e){return pt(e),e.headers=Ne.from(e.headers),e.data=Le.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ut(e.adapter||Pe.adapter,e)(e).then(function(t){return pt(e),t.data=Le.call(e,e.transformResponse,t),t.headers=Ne.from(t.headers),t},function(t){return Me(t)||(pt(e),t&&t.response&&(t.response.data=Le.call(e,e.transformResponse,t.response),t.response.headers=Ne.from(t.response.headers))),Promise.reject(t)})}const ft="1.13.5",ht={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ht[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const mt={};ht.transitional=function(e,t,n){function r(e,t){return"[Axios v"+ft+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new ie(r(o," has been removed"+(t?" in "+t:"")),ie.ERR_DEPRECATED);return t&&!mt[o]&&(mt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},ht.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const bt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new ie("options must be an object",ie.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new ie("option "+i+" must be "+n,ie.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new ie("Unknown option "+i,ie.ERR_BAD_OPTION)}},validators:ht},vt=bt.validators;class gt{constructor(e){this.defaults=e||{},this.interceptors={request:new ve,response:new ve}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ge(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&bt.assertOptions(n,{silentJSONParsing:vt.transitional(vt.boolean),forcedJSONParsing:vt.transitional(vt.boolean),clarifyTimeoutError:vt.transitional(vt.boolean),legacyInterceptorReqResOrdering:vt.transitional(vt.boolean)},!1),null!=r&&(re.isFunction(r)?t.paramsSerializer={serialize:r}:bt.assertOptions(r,{encode:vt.function,serialize:vt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),bt.assertOptions(t,{baseUrl:vt.spelling("baseURL"),withXsrfToken:vt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&re.merge(o.common,o[t.method]);o&&re.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Ne.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const n=t.transitional||ge;n&&n.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)});const c=[];let l;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let u,p=0;if(!a){const e=[dt.bind(this),void 0];for(e.unshift(...s),e.push(...c),u=e.length,l=Promise.resolve(t);p<u;)l=l.then(e[p++],e[p++]);return l}u=s.length;let d=t;for(;p<u;){const e=s[p++],t=s[p++];try{d=e(d)}catch(e){t.call(this,e);break}}try{l=dt.call(this,d)}catch(e){return Promise.reject(e)}for(p=0,u=c.length;p<u;)l=l.then(c[p++],c[p++]);return l}getUri(e){return be($e((e=Ge(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}re.forEach(["delete","get","head","options"],function(e){gt.prototype[e]=function(t,n){return this.request(Ge(n||{},{method:e,url:t,data:(n||{}).data}))}}),re.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(Ge(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}gt.prototype[e]=t(),gt.prototype[e+"Form"]=t(!0)});const yt=gt;class Ot{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Fe(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Ot(function(t){e=t}),cancel:e}}}const wt=Ot,xt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(xt).forEach(([e,t])=>{xt[t]=e});const jt=xt,St=function e(t){const n=new yt(t),r=m(yt.prototype.request,n);return re.extend(r,yt.prototype,n,{allOwnKeys:!0}),re.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ge(t,n))},r}(Pe);St.Axios=yt,St.CanceledError=Fe,St.CancelToken=wt,St.isCancel=Me,St.VERSION=ft,St.toFormData=ue,St.AxiosError=ie,St.Cancel=St.CanceledError,St.all=function(e){return Promise.all(e)},St.spread=function(e){return function(t){return e.apply(null,t)}},St.isAxiosError=function(e){return re.isObject(e)&&!0===e.isAxiosError},St.mergeConfig=Ge,St.AxiosHeaders=Ne,St.formToJSON=e=>Ce(re.isHTMLForm(e)?new FormData(e):e),St.getAdapter=ut,St.HttpStatusCode=jt,St.default=St;const _t=St;var Ct,Et,Pt,kt,At,Dt,Rt,It,Tt=n(9028),Nt=function(e){return"/".includes((t=null!=e?e:"").charAt(t.length-1))?t.slice(0,-1):t;var t},Lt={snippets:Nt(null===(Ct=window.CODE_SNIPPETS)||void 0===Ct?void 0:Ct.restAPI.snippets),recentlyActive:Nt(null===(Et=window.CODE_SNIPPETS)||void 0===Et?void 0:Et.restAPI.recentlyActive),preferences:Nt(null===(Pt=window.CODE_SNIPPETS)||void 0===Pt?void 0:Pt.restAPI.preferences),importPlugins:Nt(null===(kt=window.CODE_SNIPPETS)||void 0===kt?void 0:kt.restAPI.importPlugins),importFiles:Nt(null===(At=window.CODE_SNIPPETS)||void 0===At?void 0:At.restAPI.importFiles),cloud:{snippets:Nt(null===(Dt=window.CODE_SNIPPETS)||void 0===Dt?void 0:Dt.restAPI.cloud.snippets)}},Mt=["delete","put","patch"],Ft=function(e){var t,n=null===(t=e.method)||void 0===t?void 0:t.toLowerCase();return n&&Mt.includes(n)?(e.headers.set("X-HTTP-Method-Override",n.toUpperCase()),e.method="post",e):e},Vt={headers:{"X-WP-Nonce":null===(Rt=window.CODE_SNIPPETS)||void 0===Rt?void 0:Rt.restAPI.nonce,"Access-Control":null===(It=window.CODE_SNIPPETS)||void 0===It?void 0:It.restAPI.cloud.token}},Ut=n(790),Bt=function(){var e=(0,d.A)(h().mark(function e(t,n,r,o){var i,s,a;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(i=window.CODE_SNIPPETS)||void 0===i||!i.debug){e.next=9;break}return(s=console).debug.apply(s,["".concat(t," ").concat(n)].concat(p(o?[o]:[]))),e.next=4,r;case 4:return a=e.sent,console.debug("Response",a),e.abrupt("return",a);case 9:return e.next=11,r;case 11:return e.abrupt("return",e.sent);case 12:case"end":return e.stop()}},e)}));return function(t,n,r,o){return e.apply(this,arguments)}}(),Ht=(0,Tt.h)("useRestAPI"),zt=(0,i.A)(Ht,2),Wt=zt[0],$t=zt[1],qt=function(e){var t=e.children,n=(0,o.useMemo)(function(){var e=_t.create(Vt);return e.interceptors.request.use(Ft),e},[]),r=(0,o.useMemo)(function(){return function(e){return{getResponse:function(t){return Bt("GET",t,e.get(t))},get:function(t){return Bt("GET",t,e.get(t)).then(function(e){return e.data})},post:function(t,n,r){return Bt("POST",t,e.post(t,n,r),n).then(function(e){return e.data})},del:function(t){return Bt("DELETE",t,e.delete(t)).then(function(e){return e.data})},put:function(t,n){return Bt("PUT",t,e.put(t,n),n).then(function(e){return e.data})}}}(n)},[n]),i={api:r,axiosInstance:n};return(0,Ut.jsx)(Wt.Provider,{value:i,children:t})},Gt=n(6842),Xt=n(2284),Jt=n(4467),Kt={php:["global","admin","front-end","single-use"],html:["content","head-content","body-content","footer-content"],css:["admin-css","site-css"],js:["site-head-js","site-footer-js"],cond:["condition"]},Yt=n(6492);function Zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var en={id:0,name:"",code:"",desc:"",scope:"global",modified:"",active:!1,locked:!1,trashed:!1,network:(0,Yt.i_)(),shared_network:null,priority:10,conditionId:0,code_error:null,code_error_trace:null},tn=function(e){return"number"==typeof e&&0<e},nn=function(e){var t,n,r,o=Qt(Qt({},en),{},{tags:[]});return"object"!==(0,Xt.A)(e)||null===e?o:Qt(Qt(Qt(Qt(Qt(Qt(Qt(Qt(Qt(Qt(Qt(Qt(Qt(Qt(Qt(Qt(Qt(Qt(Qt({},o),"id"in e&&tn(e.id)&&{id:e.id}),"name"in e&&"string"==typeof e.name&&{name:e.name}),"desc"in e&&"string"==typeof e.desc&&{desc:e.desc}),"code"in e&&"string"==typeof e.code&&{code:e.code}),"tags"in e&&{tags:null!==(r=e.tags,t=Array.isArray(r)?r.filter(function(e){return"string"==typeof e}):void 0)&&void 0!==t?t:o.tags}),"scope"in e&&"string"==typeof(n=e.scope)&&Object.values(Kt).some(function(e){return e.some(function(e){return e===n})})&&{scope:e.scope}),"modified"in e&&"string"==typeof e.modified&&{modified:e.modified}),"active"in e&&"boolean"==typeof e.active&&{active:e.active}),"locked"in e&&"boolean"==typeof e.locked&&{locked:e.locked}),"trashed"in e&&"boolean"==typeof e.trashed&&{trashed:e.trashed}),"network"in e&&"boolean"==typeof e.network&&{network:e.network}),"shared_network"in e&&"boolean"==typeof e.shared_network&&{shared_network:e.shared_network}),"priority"in e&&"number"==typeof e.priority&&{priority:e.priority}),"conditionId"in e&&tn(e.conditionId)&&{conditionId:e.conditionId}),"condition_id"in e&&tn(e.condition_id)&&{conditionId:e.condition_id}),"code_error"in e&&function(e){return Array.isArray(e)&&2===e.length&&"string"==typeof e[0]&&"number"==typeof e[1]}(e.code_error)&&{code_error:e.code_error}),"code_error_trace"in e&&("string"==typeof e.code_error_trace||null===e.code_error_trace)&&{code_error_trace:e.code_error_trace}),"last_active"in e&&{lastActive:Number(e.last_active)})},rn=new Set(["css","js","cond"]),on={php:(0,c.__)("Functions","code-snippets"),html:(0,c.__)("Content","code-snippets"),css:(0,c.__)("Styles","code-snippets"),js:(0,c.__)("Scripts","code-snippets"),cond:(0,c.__)("Conditions","code-snippets")},sn=function(e){return nn(e)},an=function(e){var t=e.scope;switch(!0){case t.endsWith("-css"):return"css";case t.endsWith("-js"):return"js";case t.endsWith("content"):return"html";case"condition"===t:return"cond";default:return"php"}},cn=function(e){return"condition"===e.scope},ln=function(e){return rn.has(e)},un=function(e,t){var n=e.id,r=e.network;return(0,Gt.c$)([Lt.snippets,n,t].filter(Boolean).join("/"),{network:r})},pn=function(e){return{name:e.name,desc:e.desc,code:e.code,tags:e.tags,scope:e.scope,priority:e.priority,active:e.active,network:e.network,locked:e.locked,trashed:e.trashed,shared_network:e.shared_network,condition_id:e.conditionId}},dn=(0,Tt.h)("useSnippetsAPI"),fn=(0,i.A)(dn,2),hn=fn[0],mn=fn[1],bn=function(e){var t=e.children,n=$t().api,r=(0,o.useMemo)(function(){return t=(e=n).get,r=e.post,o=e.del,i=e.put,{fetchAll:function(e){return t((0,Gt.c$)(Lt.snippets,{network:e})).then(function(e){return e.map(sn)})},fetch:function(e,n){return t((0,Gt.c$)("".concat(Lt.snippets,"/").concat(e),{network:n})).then(sn)},create:function(e){return r(Lt.snippets,pn(e)).then(sn)},update:function(e){return r(e.id?un(e):Lt.snippets,pn(e)).then(sn)},delete:function(e){return o(un(e))},restore:function(e){return r(un(e,"restore"))},activate:function(e){return r(un(e,"activate")).then(sn)},deactivate:function(e){return r(un(e,"deactivate")).then(sn)},export:function(e){return t(un(e,"export"))},exportCode:function(e){return t(un(e,"export-code"))},attach:function(e){return i(un(e,"attach"),{condition_id:e.conditionId})},detach:function(e){return i(un(e,"detach"))}};var e,t,r,o,i},[n]);return(0,Ut.jsx)(hn.Provider,{value:r,children:t})},vn=(0,Tt.h)("useSnippetsList"),gn=(0,i.A)(vn,2),yn=gn[0],On=gn[1],wn=function(e){var t=e.children,n=mn().fetchAll,r=(0,o.useState)(function(){var e;return null===(e=window.CODE_SNIPPETS_MANAGE)||void 0===e||null===(e=e.snippetsList)||void 0===e?void 0:e.map(nn)}),s=(0,i.A)(r,2),a=s[0],c=s[1],l=(0,o.useCallback)((0,d.A)(h().mark(function e(){var t;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,console.info("Fetching snippets list"),e.next=4,n((0,Yt.i_)());case 4:t=e.sent,c(t),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.error("Error fetching snippets list",e.t0);case 11:case"end":return e.stop()}},e,null,[[0,8]])})),[n]);(0,o.useEffect)(function(){l().catch(function(){})},[l]);var u={snippetsList:a,refreshSnippetsList:l};return(0,Ut.jsx)(yn.Provider,{value:u,children:t})};const{Axios:xn,AxiosError:jn,CanceledError:Sn,isCancel:_n,CancelToken:Cn,VERSION:En,all:Pn,Cancel:kn,isAxiosError:An,spread:Dn,toFormData:Rn,AxiosHeaders:In,HttpStatusCode:Tn,formToJSON:Nn,getAdapter:Ln,mergeConfig:Mn}=_t;var Fn=(0,Tt.h)("useSnippetForm"),Vn=(0,i.A)(Fn,2),Un=Vn[0],Bn=Vn[1],Hn=function(e){return{name:e.name,desc:e.desc,code:e.code,tags:e.tags,scope:e.scope,priority:e.priority,active:e.active,locked:e.locked,network:e.network,sharedNetwork:e.shared_network,conditionId:e.conditionId}},zn=function(e){var t=e.children,n=e.initialSnippet,r=(0,o.useState)(n),s=(0,i.A)(r,1)[0],a=(0,o.useState)(s),c=(0,i.A)(a,2),l=c[0],u=c[1],p=(0,o.useState)(s),d=(0,i.A)(p,2),f=d[0],h=d[1],m=(0,o.useState)(!1),b=(0,i.A)(m,2),v=b[0],g=b[1],y=(0,o.useState)(),O=(0,i.A)(y,2),w=O[0],x=O[1],j=(0,o.useState)(),S=(0,i.A)(j,2),_=S[0],C=S[1],E=(0,o.useMemo)(function(){return l.locked||!(0,Yt.QX)()&&function(e){return rn.has(an(e))}({scope:l.scope})},[l.locked,l.scope]),P=(0,o.useMemo)(function(){return function(e,t){return JSON.stringify(Hn(e))!==JSON.stringify(Hn(t))}(l,f)},[l,f]),k=(0,o.useCallback)(function(e){u(e),h(e)},[]),A=(0,o.useCallback)(function(e,t){console.error("Request failed",e),g(!1),x(["error",[t,An(e)?e.message:""].filter(Boolean).join(" ")])},[g,x]),D=(0,o.useCallback)(function(e){u(function(t){var n,r="object"===(0,Xt.A)(e)?e:e(t);return null==_||_.codemirror.setValue(r.code),null===(n=window.tinymce)||void 0===n||n.activeEditor.setContent(r.desc),r})},[null==_?void 0:_.codemirror]),R={snippet:l,isWorking:v,isReadOnly:E,isDirty:P,setSnippet:u,acceptSnippet:k,setIsWorking:g,updateSnippet:D,currentNotice:w,setCurrentNotice:x,codeEditorInstance:_,handleRequestError:A,setCodeEditorInstance:C};return(0,Ut.jsx)(Un.Provider,{value:R,children:t})};function Wn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wn(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var qn={addNew:(0,c.__)("Create New Snippet","code-snippets"),edit:(0,c.__)("Edit Snippet","code-snippets"),created:(0,c.__)("Snippet <strong>created</strong>.","code-snippets"),updated:(0,c.__)("Snippet <strong>updated</strong>.","code-snippets"),createdActivated:(0,c.__)("Snippet <strong>created</strong> and <strong>activated</strong>.","code-snippets"),updatedActivated:(0,c.__)("Snippet <strong>updated</strong> and <strong>activated</strong>.","code-snippets"),updatedDeactivated:(0,c.__)("Snippet <strong>updated</strong> and <strong>deactivated</strong>"),updatedExecuted:(0,c.__)("Snippet <strong>updated</strong> and <strong>executed</strong>.","code-snippets"),failedCreate:(0,c.__)("Could not create snippet.","code-snippets"),failedUpdate:(0,c.__)("Could not update snippet.","code-snippets")},Gn=(0,c.__)("Condition <strong>created</strong>.","code-snippets"),Xn=(0,c.__)("Condition <strong>updated</strong>.","code-snippets"),Jn={addNew:(0,c.__)("Create New Condition","code-snippets"),edit:(0,c.__)("Edit Condition","code-snippets"),created:Gn,updated:Xn,createdActivated:Gn,updatedActivated:Xn,updatedDeactivated:Xn,updatedExecuted:Xn,failedCreate:(0,c.__)("Could not create condition.","code-snippets"),failedUpdate:(0,c.__)("Could not update condition.","code-snippets")},Kn=function(e){return e.SAVE="save_snippet",e.SAVE_AND_ACTIVATE="save_snippet_activate",e.SAVE_AND_EXECUTE="save_snippet_execute",e.SAVE_AND_DEACTIVATE="save_snippet_deactivate",e}({}),Yn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Kn.SAVE,r="condition"===e.scope?Jn:qn,o=0===e.id;switch(n){case Kn.SAVE:return o?r.created:r.updated;case Kn.SAVE_AND_EXECUTE:return r.updatedExecuted;case Kn.SAVE_AND_ACTIVATE:return"single-use"===t.scope?r.updatedExecuted:o?r.createdActivated:r.updatedActivated;case Kn.SAVE_AND_DEACTIVATE:return r.updatedDeactivated}},Zn=function(e){var t,n,r;return["error",(0,c.__)("Snippet could not be activated.","code-snippets"),(0,Ut.jsxs)("span",{children:[(0,c.__)("The snippet was saved, but remains inactive due to this error:","code-snippets")," ",(0,Ut.jsx)("strong",{children:null!==(t=null===(n=e.code_error)||void 0===n?void 0:n[0])&&void 0!==t?t:""})]},"code-snippets-activation-error"),null!==(r=e.code_error_trace)&&void 0!==r?r:void 0]},Qn=function(){var e=mn(),t=Bn(),n=t.acceptSnippet,r=t.setIsWorking,i=t.setCurrentNotice,s=(0,o.useCallback)(function(){var t=(0,d.A)(h().mark(function t(o,s){var a,l,u,p,f;return h().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i(void 0),r(!0),a=$n({},o),Kn.SAVE_AND_ACTIVATE===s?a.active=!0:Kn.SAVE_AND_DEACTIVATE===s&&(a.active=!1),t.next=6,(0,d.A)(h().mark(function t(){var n,o;return h().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n=a.id,t.next=4,void 0===n||0===n?e.create(a):e.update($n($n({},a),{},{id:n}));case 4:return o=t.sent,t.abrupt("return",o.id?sn(o):void 0);case 8:return t.prev=8,t.t0=t.catch(0),t.abrupt("return",An(t.t0)?t.t0.message:void 0);case 11:return t.prev=11,r(!1),t.finish(11);case 14:case"end":return t.stop()}},t,null,[[0,8,11,14]])}))();case 6:if(l=t.sent,u=cn(o)?Jn:qn,void 0!==l&&"string"!=typeof l){t.next=12;break}return p=[a.id?u.failedUpdate:u.failedCreate,null!=l?l:(0,c.__)("The server did not send a valid response.","code-snippets")],i(["error",p.filter(Boolean).join(" ")]),t.abrupt("return",void 0);case 12:return n(l),l.code_error&&Kn.SAVE_AND_ACTIVATE===s?i(Zn(l)):i(["updated",Yn(o,l,s)]),a.id&&l.id&&(window.document.title=window.document.title.replace(qn.addNew,u.edit),window.history.replaceState({},"",(0,Gt.c$)(null===(f=window.CODE_SNIPPETS)||void 0===f?void 0:f.urls.edit,{id:l.id}))),t.abrupt("return",l);case 16:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}(),[n,e,r,i]);return{submitSnippet:s}},er=function(e){console.error(e)},tr=n(6427),nr=function(e){var t=e.open,n=e.title,r=e.onConfirm,o=e.onCancel,i=e.children,s=e.confirmLabel,a=void 0===s?(0,c.__)("OK","code-snippets"):s,l=e.cancelLabel,u=void 0===l?(0,c.__)("Cancel","code-snippets"):l,p=e.confirmButtonClassName;return t?(0,Ut.jsxs)(tr.Modal,{title:n,onRequestClose:o,closeButtonLabel:(0,c.__)("Close dialog","code-snippets"),isDismissible:!0,children:[i,(0,Ut.jsxs)(tr.Flex,{direction:"row",justify:"flex-end",children:[(0,Ut.jsx)(tr.Button,{variant:"tertiary",onClick:o,children:u}),(0,Ut.jsx)(tr.Button,{variant:"primary",onClick:r,className:p,children:a})]})]}):null},rr=n(5896),or=n(6087);function ir(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sr=["id","children","className","name","primary","secondary","small","large","link","type","onClick"];function ar(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ar(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ar(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var lr=function(e){var t=e.id,n=e.children,r=e.className,o=e.name,i=e.primary,s=void 0!==i&&i,c=e.secondary,l=void 0!==c&&c,u=e.small,p=void 0!==u&&u,d=e.large,f=void 0!==d&&d,h=e.link,m=void 0!==h&&h,b=e.type,v=void 0===b?"button":b,g=e.onClick,y=ir(e,sr);return(0,Ut.jsx)("button",cr(cr({id:null!=t?t:o,name:o,type:v},y),{},{onClick:function(e){g&&(e.preventDefault(),g(e))},className:a()("button",r,{"button-primary":s,"button-secondary":l,"button-large":f,"button-small":p,"button-link":m}),children:n}))},ur=function(){var e,t=(0,o.useState)(!1),n=(0,i.A)(t,2),r=n[0],s=n[1];return r||!(0,Yt.W9)()?null:(0,Ut.jsxs)("div",{className:"code-snippets-upsell-banner","aria-label":(0,c.__)("Upgrade to Code Snippets Pro","code-snippets"),role:"region",children:[(0,Ut.jsx)("img",{src:"".concat(null===(e=window.CODE_SNIPPETS)||void 0===e?void 0:e.urls.plugin,"/assets/icon.svg"),alt:(0,c.__)("Code Snippets logo","code-snippets"),height:"34","aria-hidden":"true"}),(0,Ut.jsx)("p",{children:(0,or.createInterpolateElement)((0,c.__)("Unlock <strong>cloud sync, snippet conditions, AI features</strong> and much more with Code Snippets Pro.","code-snippets"),{strong:(0,Ut.jsx)("strong",{})})}),(0,Ut.jsx)(tr.ExternalLink,{className:"button button-primary",href:"https://codesnippets.pro/pricing/",children:(0,c.__)("Get Started","code-snippets")}),(0,Ut.jsx)(lr,{small:!0,link:!0,onClick:function(){return s(!0)},"aria-label":(0,c.__)("Dismiss upsell banner","code-snippets"),children:(0,Ut.jsx)("span",{className:"dashicons dashicons-no-alt","aria-hidden":"true"})})]})},pr=n(7882),dr=function(){return(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)("p",{style:{marginBlockStart:0},children:(0,or.createInterpolateElement)((0,c.__)("This snippet is currently <strong>active</strong>.","code-snippets"),{strong:(0,Ut.jsx)("strong",{})})}),(0,Ut.jsx)("p",{children:(0,c.__)("Moving it to the trash will also deactivate it.","code-snippets")})]})},fr=function(){return(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)("p",{style:{marginBlockStart:0},children:(0,or.createInterpolateElement)((0,c.__)("The snippet will be <strong>permanently deleted</strong>.","code-snippets"),{strong:(0,Ut.jsx)("strong",{})})}),(0,Ut.jsx)("p",{children:(0,c.__)("This action cannot be undone.","code-snippets")})]})},hr=function(e){var t=e.snippet,n=e.isDialogOpen,r=e.setIsDialogOpen,o=e.makeDeleteRequest;return(0,Ut.jsx)(nr,{open:n,title:(0,c.__)("Are you sure?","code-snippets"),confirmLabel:t.trashed?(0,c.__)("Delete","code-snippets"):(0,c.__)("Trash","code-snippets"),confirmButtonClassName:"is-destructive",onCancel:function(){return r(!1)},onConfirm:function(){r(!1),o()},children:t.trashed?(0,Ut.jsx)(fr,{}):(0,Ut.jsx)(dr,{})})},mr={cond:"randomize",cloud:"cloud",bundles:"screenoptions",cloud_search:"search"},br=function(e){var t=e.name,n=e.small,r=e.inverted,o=e.children;return(0,Ut.jsx)("span",{className:a()("badge","".concat(t,"-badge"),{"small-badge":n,"inverted-badge":r}),children:mr[t]?(0,Ut.jsx)("span",{className:"dashicons dashicons-".concat(mr[t]),"aria-hidden":"true"}):null!=o?o:t})},vr=function(e){var t=e.setIsDialogOpen,n=Bn(),r=n.snippet,o=n.isReadOnly,i=0!==r.conditionId;return(0,Ut.jsx)("div",{className:a()("conditions-editor-open block-form-field",i?"has-condition":"no-condition"),children:cn(r)?null:(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsxs)("div",{className:"conditions-editor-header",children:[(0,Ut.jsx)("strong",{children:(0,c.__)("Conditions","code-snippets")}),!(0,Yt.QX)()&&(0,Ut.jsx)(br,{name:"pro",small:!0,children:(0,c.__)("Pro","code-snippets")})]}),(0,Ut.jsxs)(lr,{large:!0,disabled:o,onClick:function(){return t(!0)},children:[(0,Ut.jsx)(br,{name:"cond",small:!0}),i?(0,c.__)("Edit Conditions","code-snippets"):(0,c.__)("Add Conditions","code-snippets")]})]})})};function gr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gr(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Or=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function wr(){return wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wr.apply(null,arguments)}var xr=n(3029),jr=n(2901),Sr=n(5501);function _r(e){return _r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_r(e)}function Cr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Cr=function(){return!!e})()}var Er=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),Pr=Math.abs,kr=String.fromCharCode,Ar=Object.assign;function Dr(e){return e.trim()}function Rr(e,t,n){return e.replace(t,n)}function Ir(e,t){return e.indexOf(t)}function Tr(e,t){return 0|e.charCodeAt(t)}function Nr(e,t,n){return e.slice(t,n)}function Lr(e){return e.length}function Mr(e){return e.length}function Fr(e,t){return t.push(e),e}var Vr=1,Ur=1,Br=0,Hr=0,zr=0,Wr="";function $r(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Vr,column:Ur,length:s,return:""}}function qr(e,t){return Ar($r("",null,null,"",null,null,0),e,{length:-e.length},t)}function Gr(){return zr=Hr>0?Tr(Wr,--Hr):0,Ur--,10===zr&&(Ur=1,Vr--),zr}function Xr(){return zr=Hr<Br?Tr(Wr,Hr++):0,Ur++,10===zr&&(Ur=1,Vr++),zr}function Jr(){return Tr(Wr,Hr)}function Kr(){return Hr}function Yr(e,t){return Nr(Wr,e,t)}function Zr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Qr(e){return Vr=Ur=1,Br=Lr(Wr=e),Hr=0,[]}function eo(e){return Wr="",e}function to(e){return Dr(Yr(Hr-1,oo(91===e?e+2:40===e?e+1:e)))}function no(e){for(;(zr=Jr())&&zr<33;)Xr();return Zr(e)>2||Zr(zr)>3?"":" "}function ro(e,t){for(;--t&&Xr()&&!(zr<48||zr>102||zr>57&&zr<65||zr>70&&zr<97););return Yr(e,Kr()+(t<6&&32==Jr()&&32==Xr()))}function oo(e){for(;Xr();)switch(zr){case e:return Hr;case 34:case 39:34!==e&&39!==e&&oo(zr);break;case 40:41===e&&oo(e);break;case 92:Xr()}return Hr}function io(e,t){for(;Xr()&&e+zr!==57&&(e+zr!==84||47!==Jr()););return"/*"+Yr(t,Hr-1)+"*"+kr(47===e?e:Xr())}function so(e){for(;!Zr(Jr());)Xr();return Yr(e,Hr)}var ao="-ms-",co="-moz-",lo="-webkit-",uo="comm",po="rule",fo="decl",ho="@keyframes";function mo(e,t){for(var n="",r=Mr(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function bo(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case fo:return e.return=e.return||e.value;case uo:return"";case ho:return e.return=e.value+"{"+mo(e.children,r)+"}";case po:e.value=e.props.join(",")}return Lr(n=mo(e.children,r))?e.return=e.value+"{"+n+"}":""}function vo(e){return eo(go("",null,null,null,[""],e=Qr(e),0,[0],e))}function go(e,t,n,r,o,i,s,a,c){for(var l=0,u=0,p=s,d=0,f=0,h=0,m=1,b=1,v=1,g=0,y="",O=o,w=i,x=r,j=y;b;)switch(h=g,g=Xr()){case 40:if(108!=h&&58==Tr(j,p-1)){-1!=Ir(j+=Rr(to(g),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:j+=to(g);break;case 9:case 10:case 13:case 32:j+=no(h);break;case 92:j+=ro(Kr()-1,7);continue;case 47:switch(Jr()){case 42:case 47:Fr(Oo(io(Xr(),Kr()),t,n),c);break;default:j+="/"}break;case 123*m:a[l++]=Lr(j)*v;case 125*m:case 59:case 0:switch(g){case 0:case 125:b=0;case 59+u:-1==v&&(j=Rr(j,/\f/g,"")),f>0&&Lr(j)-p&&Fr(f>32?wo(j+";",r,n,p-1):wo(Rr(j," ","")+";",r,n,p-2),c);break;case 59:j+=";";default:if(Fr(x=yo(j,t,n,l,u,o,a,y,O=[],w=[],p),i),123===g)if(0===u)go(j,t,x,x,O,i,p,a,w);else switch(99===d&&110===Tr(j,3)?100:d){case 100:case 108:case 109:case 115:go(e,x,x,r&&Fr(yo(e,x,x,0,0,o,a,y,o,O=[],p),w),o,w,p,a,r?O:w);break;default:go(j,x,x,x,[""],w,0,a,w)}}l=u=f=0,m=v=1,y=j="",p=s;break;case 58:p=1+Lr(j),f=h;default:if(m<1)if(123==g)--m;else if(125==g&&0==m++&&125==Gr())continue;switch(j+=kr(g),g*m){case 38:v=u>0?1:(j+="\f",-1);break;case 44:a[l++]=(Lr(j)-1)*v,v=1;break;case 64:45===Jr()&&(j+=to(Xr())),d=Jr(),u=p=Lr(y=j+=so(Kr())),g++;break;case 45:45===h&&2==Lr(j)&&(m=0)}}return i}function yo(e,t,n,r,o,i,s,a,c,l,u){for(var p=o-1,d=0===o?i:[""],f=Mr(d),h=0,m=0,b=0;h<r;++h)for(var v=0,g=Nr(e,p+1,p=Pr(m=s[h])),y=e;v<f;++v)(y=Dr(m>0?d[v]+" "+g:Rr(g,/&\f/g,d[v])))&&(c[b++]=y);return $r(e,t,n,0===o?po:a,c,l,u)}function Oo(e,t,n){return $r(e,t,n,uo,kr(zr),Nr(e,2,-2),0)}function wo(e,t,n,r){return $r(e,t,n,fo,Nr(e,0,r),Nr(e,r+1,-1),r)}var xo=function(e,t,n){for(var r=0,o=0;r=o,o=Jr(),38===r&&12===o&&(t[n]=1),!Zr(o);)Xr();return Yr(e,Hr)},jo=new WeakMap,So=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||jo.get(n))&&!r){jo.set(e,!0);for(var o=[],i=function(e,t){return eo(function(e,t){var n=-1,r=44;do{switch(Zr(r)){case 0:38===r&&12===Jr()&&(t[n]=1),e[n]+=xo(Hr-1,t,n);break;case 2:e[n]+=to(r);break;case 4:if(44===r){e[++n]=58===Jr()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=kr(r)}}while(r=Xr());return e}(Qr(e),t))}(t,o),s=n.props,a=0,c=0;a<i.length;a++)for(var l=0;l<s.length;l++,c++)e.props[c]=o[a]?i[a].replace(/&\f/g,s[l]):s[l]+" "+i[a]}}},_o=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Co(e,t){switch(function(e,t){return 45^Tr(e,0)?(((t<<2^Tr(e,0))<<2^Tr(e,1))<<2^Tr(e,2))<<2^Tr(e,3):0}(e,t)){case 5103:return lo+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return lo+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return lo+e+co+e+ao+e+e;case 6828:case 4268:return lo+e+ao+e+e;case 6165:return lo+e+ao+"flex-"+e+e;case 5187:return lo+e+Rr(e,/(\w+).+(:[^]+)/,lo+"box-$1$2"+ao+"flex-$1$2")+e;case 5443:return lo+e+ao+"flex-item-"+Rr(e,/flex-|-self/,"")+e;case 4675:return lo+e+ao+"flex-line-pack"+Rr(e,/align-content|flex-|-self/,"")+e;case 5548:return lo+e+ao+Rr(e,"shrink","negative")+e;case 5292:return lo+e+ao+Rr(e,"basis","preferred-size")+e;case 6060:return lo+"box-"+Rr(e,"-grow","")+lo+e+ao+Rr(e,"grow","positive")+e;case 4554:return lo+Rr(e,/([^-])(transform)/g,"$1"+lo+"$2")+e;case 6187:return Rr(Rr(Rr(e,/(zoom-|grab)/,lo+"$1"),/(image-set)/,lo+"$1"),e,"")+e;case 5495:case 3959:return Rr(e,/(image-set\([^]*)/,lo+"$1$`$1");case 4968:return Rr(Rr(e,/(.+:)(flex-)?(.*)/,lo+"box-pack:$3"+ao+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+lo+e+e;case 4095:case 3583:case 4068:case 2532:return Rr(e,/(.+)-inline(.+)/,lo+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Lr(e)-1-t>6)switch(Tr(e,t+1)){case 109:if(45!==Tr(e,t+4))break;case 102:return Rr(e,/(.+:)(.+)-([^]+)/,"$1"+lo+"$2-$3$1"+co+(108==Tr(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ir(e,"stretch")?Co(Rr(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Tr(e,t+1))break;case 6444:switch(Tr(e,Lr(e)-3-(~Ir(e,"!important")&&10))){case 107:return Rr(e,":",":"+lo)+e;case 101:return Rr(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+lo+(45===Tr(e,14)?"inline-":"")+"box$3$1"+lo+"$2$3$1"+ao+"$2box$3")+e}break;case 5936:switch(Tr(e,t+11)){case 114:return lo+e+ao+Rr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return lo+e+ao+Rr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return lo+e+ao+Rr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return lo+e+ao+e+e}return e}var Eo=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case fo:e.return=Co(e.value,e.length);break;case ho:return mo([qr(e,{value:Rr(e.value,"@","@"+lo)})],r);case po:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return mo([qr(e,{props:[Rr(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return mo([qr(e,{props:[Rr(t,/:(plac\w+)/,":"+lo+"input-$1")]}),qr(e,{props:[Rr(t,/:(plac\w+)/,":-moz-$1")]}),qr(e,{props:[Rr(t,/:(plac\w+)/,ao+"input-$1")]})],r)}return""})}}],Po=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||Eo,s={},a=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)});var c,l,u,p,d=[bo,(p=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&p(e)})],f=(l=[So,_o].concat(i,d),u=Mr(l),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=l[i](e,t,n,r)||"";return o});o=function(e,t,n,r){c=n,mo(vo(e?e+"{"+t.styles+"}":t.styles),f),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new Er({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:o};return h.sheet.hydrate(a),h},ko=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Ao={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Do(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Ro=/[A-Z]|^ms/g,Io=/_EMO_([^_]+?)_([^]*?)_EMO_/g,To=function(e){return 45===e.charCodeAt(1)},No=function(e){return null!=e&&"boolean"!=typeof e},Lo=Do(function(e){return To(e)?e:e.replace(Ro,"-$&").toLowerCase()}),Mo=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Io,function(e,t,n){return Vo={name:t,styles:n,next:Vo},t})}return 1===Ao[e]||To(e)||"number"!=typeof t||0===t?t:t+"px"};function Fo(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Vo={name:o.name,styles:o.styles,next:Vo},o.name;var i=n;if(void 0!==i.styles){var s=i.next;if(void 0!==s)for(;void 0!==s;)Vo={name:s.name,styles:s.styles,next:Vo},s=s.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Fo(e,t,n[o])+";";else for(var i in n){var s=n[i];if("object"!=typeof s){var a=s;null!=t&&void 0!==t[a]?r+=i+"{"+t[a]+"}":No(a)&&(r+=Lo(i)+":"+Mo(i,a)+";")}else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var c=Fo(e,t,s);switch(i){case"animation":case"animationName":r+=Lo(i)+":"+c+";";break;default:r+=i+"{"+c+"}"}}else for(var l=0;l<s.length;l++)No(s[l])&&(r+=Lo(i)+":"+Mo(i,s[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var a=Vo,c=n(e);return Vo=a,Fo(e,t,c)}}var l=n;if(null==t)return l;var u=t[l];return void 0!==u?u:l}var Vo,Uo=/label:\s*([^\s;{]+)\s*(;|$)/g;function Bo(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Vo=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Fo(n,t,i)):o+=i[0];for(var s=1;s<e.length;s++)o+=Fo(n,t,e[s]),r&&(o+=i[s]);Uo.lastIndex=0;for(var a,c="";null!==(a=Uo.exec(o));)c+="-"+a[1];var l=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+c;return{name:l,styles:o,next:Vo}}var Ho,zo,Wo=!!o.useInsertionEffect&&o.useInsertionEffect,$o=Wo||function(e){return e()},qo=(Wo||o.useLayoutEffect,o.createContext("undefined"!=typeof HTMLElement?Po({key:"css"}):null)),Go=(qo.Provider,function(e){return(0,o.forwardRef)(function(t,n){var r=(0,o.useContext)(qo);return e(t,r,n)})}),Xo=o.createContext({}),Jo={}.hasOwnProperty,Ko="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Yo=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return ko(t,n,r),$o(function(){return function(e,t,n){ko(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)}),null},Zo=Go(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[Ko],s=[r],a="";"string"==typeof e.className?a=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}(t.registered,s,e.className):null!=e.className&&(a=e.className+" ");var c=Bo(s,void 0,o.useContext(Xo));a+=t.key+"-"+c.name;var l={};for(var u in e)Jo.call(e,u)&&"css"!==u&&u!==Ko&&(l[u]=e[u]);return l.className=a,n&&(l.ref=n),o.createElement(o.Fragment,null,o.createElement(Yo,{cache:t,serialized:c,isStringTag:"string"==typeof i}),o.createElement(i,l))}),Qo=Zo,ei=(n(4146),function(e,t){var n=arguments;if(null==t||!Jo.call(t,"css"))return o.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=Qo,i[1]=function(e,t){var n={};for(var r in t)Jo.call(t,r)&&(n[r]=t[r]);return n[Ko]=e,n}(e,t);for(var s=2;s<r;s++)i[s]=n[s];return o.createElement.apply(null,i)});function ti(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Bo(t)}Ho=ei||(ei={}),zo||(zo=Ho.JSX||(Ho.JSX={}));var ni=n(5795);const ri=Math.min,oi=Math.max,ii=Math.round,si=Math.floor,ai=e=>({x:e,y:e});function ci(e){return pi(e)?(e.nodeName||"").toLowerCase():"#document"}function li(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ui(e){var t;return null==(t=(pi(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function pi(e){return e instanceof Node||e instanceof li(e).Node}function di(e){return e instanceof Element||e instanceof li(e).Element}function fi(e){return e instanceof HTMLElement||e instanceof li(e).HTMLElement}function hi(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof li(e).ShadowRoot)}function mi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=bi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function bi(e){return li(e).getComputedStyle(e)}function vi(e){const t=function(e){if("html"===ci(e))return e;const t=e.assignedSlot||e.parentNode||hi(e)&&e.host||ui(e);return hi(t)?t.host:t}(e);return function(e){return["html","body","#document"].includes(ci(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:fi(t)&&mi(t)?t:vi(t)}function gi(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=vi(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=li(o);return i?t.concat(s,s.visualViewport||[],mi(o)?o:[],s.frameElement&&n?gi(s.frameElement):[]):t.concat(o,gi(o,[],n))}function yi(e){return di(e)?e:e.contextElement}function Oi(e){const t=yi(e);if(!fi(t))return ai(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=function(e){const t=bi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=fi(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=ii(n)!==i||ii(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}(t);let s=(i?ii(n.width):n.width)/r,a=(i?ii(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const wi=ai(0);function xi(e){const t=li(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:wi}function ji(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=yi(e);let s=ai(1);t&&(r?di(r)&&(s=Oi(r)):s=Oi(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==li(e))&&t}(i,n,r)?xi(i):ai(0);let c=(o.left+a.x)/s.x,l=(o.top+a.y)/s.y,u=o.width/s.x,p=o.height/s.y;if(i){const e=li(i),t=r&&di(r)?li(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=Oi(n),t=n.getBoundingClientRect(),r=bi(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,p*=e.y,c+=o,l+=i,n=li(n).frameElement}}return d={width:u,height:p,x:c,y:l},{...d,top:d.y,left:d.x,right:d.x+d.width,bottom:d.y+d.height};var d}var Si=o.useLayoutEffect,_i=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ci=function(){};function Ei(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Pi(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var s in t)t.hasOwnProperty(s)&&t[s]&&i.push("".concat(Ei(e,s)));return i.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var ki=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===(0,Xt.A)(e)&&null!==e?[e]:[];var t},Ai=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,yr({},ir(e,_i))},Di=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,s=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),s)}};function Ri(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Ii(e){return Ri(e)?window.pageYOffset:e.scrollTop}function Ti(e,t){Ri(e)?window.scrollTo(0,t):e.scrollTop=t}function Ni(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ci,o=Ii(e),i=t-o,s=0;!function t(){var a,c=i*((a=(a=s+=10)/n-1)*a*a+1)+o;Ti(e,c),s<n?window.requestAnimationFrame(t):r(e)}()}function Li(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Ti(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Ti(e,Math.max(t.offsetTop-o,0))}function Mi(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Fi=!1,Vi={get passive(){return Fi=!0}},Ui="undefined"!=typeof window?window:{};Ui.addEventListener&&Ui.removeEventListener&&(Ui.addEventListener("p",Ci,Vi),Ui.removeEventListener("p",Ci,!1));var Bi=Fi;function Hi(e){return null!=e}function zi(e,t,n){return e?t:n}var Wi=["children","innerProps"],$i=["children","innerProps"];var qi,Gi,Xi,Ji=function(e){return"auto"===e?"bottom":e},Ki=(0,o.createContext)(null),Yi=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,s=e.menuPlacement,a=e.menuPosition,c=e.menuShouldScrollIntoView,l=e.theme,u=((0,o.useContext)(Ki)||{}).setPortalPlacement,p=(0,o.useRef)(null),d=(0,o.useState)(r),f=(0,i.A)(d,2),h=f[0],m=f[1],b=(0,o.useState)(null),v=(0,i.A)(b,2),g=v[0],y=v[1],O=l.spacing.controlHeight;return Si(function(){var e=p.current;if(e){var t="fixed"===a,o=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,s=e.isFixedPosition,a=e.controlHeight,c=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var u,p=c.getBoundingClientRect().height,d=n.getBoundingClientRect(),f=d.bottom,h=d.height,m=d.top,b=n.offsetParent.getBoundingClientRect().top,v=s||Ri(u=c)?window.innerHeight:u.clientHeight,g=Ii(c),y=parseInt(getComputedStyle(n).marginBottom,10),O=parseInt(getComputedStyle(n).marginTop,10),w=b-O,x=v-m,j=w+g,S=p-g-m,_=f-v+g+y,C=g+m-O,E=160;switch(o){case"auto":case"bottom":if(x>=h)return{placement:"bottom",maxHeight:t};if(S>=h&&!s)return i&&Ni(c,_,E),{placement:"bottom",maxHeight:t};if(!s&&S>=r||s&&x>=r)return i&&Ni(c,_,E),{placement:"bottom",maxHeight:s?x-y:S-y};if("auto"===o||s){var P=t,k=s?w:j;return k>=r&&(P=Math.min(k-y-a,t)),{placement:"top",maxHeight:P}}if("bottom"===o)return i&&Ti(c,_),{placement:"bottom",maxHeight:t};break;case"top":if(w>=h)return{placement:"top",maxHeight:t};if(j>=h&&!s)return i&&Ni(c,C,E),{placement:"top",maxHeight:t};if(!s&&j>=r||s&&w>=r){var A=t;return(!s&&j>=r||s&&w>=r)&&(A=s?w-O:j-O),i&&Ni(c,C,E),{placement:"top",maxHeight:A}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}({maxHeight:r,menuEl:e,minHeight:n,placement:s,shouldScroll:c&&!t,isFixedPosition:t,controlHeight:O});m(o.maxHeight),y(o.placement),null==u||u(o.placement)}},[r,s,a,c,n,u,O]),t({ref:p,placerProps:yr(yr({},e),{},{placement:g||Ji(s),maxHeight:h})})},Zi=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return yr({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Qi=Zi,es=Zi,ts=["size"],ns=["innerProps","isRtl","size"],rs={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},os=function(e){var t=e.size,n=ir(e,ts);return ei("svg",wr({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:rs},n))},is=function(e){return ei(os,wr({size:20},e),ei("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},ss=function(e){return ei(os,wr({size:20},e),ei("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},as=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return yr({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},cs=as,ls=as,us=function(){var e=ti.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(qi||(Gi=["\n  0%, 80%, 100% { opacity: 0; }\n  40% { opacity: 1; }\n"],Xi||(Xi=Gi.slice(0)),qi=Object.freeze(Object.defineProperties(Gi,{raw:{value:Object.freeze(Xi)}})))),ps=function(e){var t=e.delay,n=e.offset;return ei("span",{css:ti({animation:"".concat(us," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},ds=["data"],fs=["innerRef","isDisabled","isHidden","inputClassName"],hs={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},ms={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":yr({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},hs)},bs=function(e){return yr({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},hs)},vs=function(e){var t=e.children,n=e.innerProps;return ei("div",n,t)},gs={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return ei("div",wr({},Di(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||ei(is,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,s=e.menuIsOpen;return ei("div",wr({ref:o},Di(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":s}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return ei("div",wr({},Di(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||ei(ss,null))},DownChevron:ss,CrossIcon:is,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,s=e.headingProps,a=e.innerProps,c=e.label,l=e.theme,u=e.selectProps;return ei("div",wr({},Di(e,"group",{group:!0}),a),ei(i,wr({},s,{selectProps:u,theme:l,getStyles:r,getClassNames:o,cx:n}),c),ei("div",null,t))},GroupHeading:function(e){var t=Ai(e);t.data;var n=ir(t,ds);return ei("div",wr({},Di(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return ei("div",wr({},Di(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return ei("span",wr({},t,Di(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=Ai(e),o=r.innerRef,i=r.isDisabled,s=r.isHidden,a=r.inputClassName,c=ir(r,fs);return ei("div",wr({},Di(e,"input",{"input-container":!0}),{"data-value":n||""}),ei("input",wr({className:t({input:!0},a),ref:o,style:bs(s),disabled:i},c)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=ir(e,ns);return ei("div",wr({},Di(yr(yr({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),ei(ps,{delay:0,offset:n}),ei(ps,{delay:160,offset:!0}),ei(ps,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return ei("div",wr({},Di(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return ei("div",wr({},Di(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,s=e.innerProps,a=e.menuPlacement,c=e.menuPosition,l=(0,o.useRef)(null),u=(0,o.useRef)(null),p=(0,o.useState)(Ji(a)),d=(0,i.A)(p,2),f=d[0],h=d[1],m=(0,o.useMemo)(function(){return{setPortalPlacement:h}},[]),b=(0,o.useState)(null),v=(0,i.A)(b,2),g=v[0],y=v[1],O=(0,o.useCallback)(function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===c?0:window.pageYOffset,n=e[f]+t;n===(null==g?void 0:g.offset)&&e.left===(null==g?void 0:g.rect.left)&&e.width===(null==g?void 0:g.rect.width)||y({offset:n,rect:e})}},[r,c,f,null==g?void 0:g.offset,null==g?void 0:g.rect.left,null==g?void 0:g.rect.width]);Si(function(){O()},[O]);var w=(0,o.useCallback)(function(){"function"==typeof u.current&&(u.current(),u.current=null),r&&l.current&&(u.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,l=yi(e),u=o||i?[...l?gi(l):[],...gi(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const p=l&&a?function(e,t){let n,r=null;const o=ui(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}return function s(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),i();const{left:l,top:u,width:p,height:d}=e.getBoundingClientRect();if(a||t(),!p||!d)return;const f={rootMargin:-si(u)+"px "+-si(o.clientWidth-(l+p))+"px "+-si(o.clientHeight-(u+d))+"px "+-si(l)+"px",threshold:oi(0,ri(1,c))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==c){if(!h)return s();t?s(!1,t):n=setTimeout(()=>{s(!1,1e-7)},100)}h=!1}try{r=new IntersectionObserver(m,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(m,f)}r.observe(e)}(!0),i}(l,n):null;let d,f=-1,h=null;s&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),l&&!c&&h.observe(l),h.observe(t));let m=c?ji(e):null;return c&&function t(){const r=ji(e);!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n(),m=r,d=requestAnimationFrame(t)}(),n(),()=>{u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),p&&p(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(d)}}(r,l.current,O,{elementResize:"ResizeObserver"in window}))},[r,O]);Si(function(){w()},[w]);var x=(0,o.useCallback)(function(e){l.current=e,w()},[w]);if(!t&&"fixed"!==c||!g)return null;var j=ei("div",wr({ref:x},Di(yr(yr({},e),{},{offset:g.offset,position:c,rect:g.rect}),"menuPortal",{"menu-portal":!0}),s),n);return ei(Ki.Provider,{value:m},t?(0,ni.createPortal)(j,t):j)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=ir(e,$i);return ei("div",wr({},Di(yr(yr({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=ir(e,Wi);return ei("div",wr({},Di(yr(yr({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,s=e.removeProps,a=e.selectProps,c=n.Container,l=n.Label,u=n.Remove;return ei(c,{data:r,innerProps:yr(yr({},Di(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:a},ei(l,{data:r,innerProps:yr({},Di(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},t),ei(u,{data:r,innerProps:yr(yr({},Di(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},s),selectProps:a}))},MultiValueContainer:vs,MultiValueLabel:vs,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return ei("div",wr({role:"button"},n),t||ei(is,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,s=e.innerProps;return ei("div",wr({},Di(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},s),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return ei("div",wr({},Di(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return ei("div",wr({},Di(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return ei("div",wr({},Di(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return ei("div",wr({},Di(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},ys=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Os(e,t){return e===t||!(!ys(e)||!ys(t))}function ws(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Os(e[n],t[n]))return!1;return!0}for(var xs={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},js=function(e){return ei("span",wr({css:xs},e))},Ss={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,s=e.selectValue,a=e.isDisabled,c=e.isSelected,l=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&s)return"value ".concat(i," focused, ").concat(u(s,n),".");if("menu"===t&&l){var p=a?" disabled":"",d="".concat(c?" selected":"").concat(p);return"".concat(i).concat(d,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},_s=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,s=e.isFocused,a=e.selectValue,c=e.selectProps,l=e.id,u=e.isAppleDevice,p=c.ariaLiveMessages,d=c.getOptionLabel,f=c.inputValue,h=c.isMulti,m=c.isOptionDisabled,b=c.isSearchable,v=c.menuIsOpen,g=c.options,y=c.screenReaderStatus,O=c.tabSelectsValue,w=c.isLoading,x=c["aria-label"],j=c["aria-live"],S=(0,o.useMemo)(function(){return yr(yr({},Ss),p||{})},[p]),_=(0,o.useMemo)(function(){var e,n="";if(t&&S.onChange){var r=t.option,o=t.options,i=t.removedValue,s=t.removedValues,c=t.value,l=i||r||(e=c,Array.isArray(e)?null:e),u=l?d(l):"",p=o||s||void 0,f=p?p.map(d):[],h=yr({isDisabled:l&&m(l,a),label:u,labels:f},t);n=S.onChange(h)}return n},[t,S,m,a,d]),C=(0,o.useMemo)(function(){var e="",t=n||r,o=!!(n&&a&&a.includes(n));if(t&&S.onFocus){var s={focused:t,label:d(t),isDisabled:m(t,a),isSelected:o,options:i,context:t===n?"menu":"value",selectValue:a,isAppleDevice:u};e=S.onFocus(s)}return e},[n,r,d,m,S,i,a,u]),E=(0,o.useMemo)(function(){var e="";if(v&&g.length&&!w&&S.onFilter){var t=y({count:i.length});e=S.onFilter({inputValue:f,resultsMessage:t})}return e},[i,f,v,S,g,y,w]),P="initial-input-focus"===(null==t?void 0:t.action),k=(0,o.useMemo)(function(){var e="";if(S.guidance){var t=r?"value":v?"menu":"input";e=S.guidance({"aria-label":x,context:t,isDisabled:n&&m(n,a),isMulti:h,isSearchable:b,tabSelectsValue:O,isInitialFocus:P})}return e},[x,n,r,h,m,b,v,S,a,O,P]),A=ei(o.Fragment,null,ei("span",{id:"aria-selection"},_),ei("span",{id:"aria-focused"},C),ei("span",{id:"aria-results"},E),ei("span",{id:"aria-guidance"},k));return ei(o.Fragment,null,ei(js,{id:l},P&&A),ei(js,{"aria-live":j,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!P&&A))},Cs=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Es=new RegExp("["+Cs.map(function(e){return e.letters}).join("")+"]","g"),Ps={},ks=0;ks<Cs.length;ks++)for(var As=Cs[ks],Ds=0;Ds<As.letters.length;Ds++)Ps[As.letters[Ds]]=As.base;var Rs=function(e){return e.replace(Es,function(e){return Ps[e]})},Is=function(e,t){void 0===t&&(t=ws);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(Rs),Ts=function(e){return e.replace(/^\s+|\s+$/g,"")},Ns=function(e){return"".concat(e.label," ").concat(e.value)},Ls=["innerRef"];function Ms(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter(function(e){var t=(0,i.A)(e,1)[0];return!n.includes(t)});return o.reduce(function(e,t){var n=(0,i.A)(t,2),r=n[0],o=n[1];return e[r]=o,e},{})}(ir(e,Ls),"onExited","in","enter","exit","appear");return ei("input",wr({ref:t},n,{css:ti({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Fs=["boxSizing","height","overflow","paddingRight","position"],Vs={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Us(e){e.cancelable&&e.preventDefault()}function Bs(e){e.stopPropagation()}function Hs(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function zs(){return"ontouchstart"in window||navigator.maxTouchPoints}var Ws=!("undefined"==typeof window||!window.document||!window.document.createElement),$s=0,qs={capture:!1,passive:!1},Gs=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Xs={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Js(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,s=e.onTopLeave,a=(0,o.useRef)(!1),c=(0,o.useRef)(!1),l=(0,o.useRef)(0),u=(0,o.useRef)(null),p=(0,o.useCallback)(function(e,t){if(null!==u.current){var o=u.current,l=o.scrollTop,p=o.scrollHeight,d=o.clientHeight,f=u.current,h=t>0,m=p-d-l,b=!1;m>t&&a.current&&(r&&r(e),a.current=!1),h&&c.current&&(s&&s(e),c.current=!1),h&&t>m?(n&&!a.current&&n(e),f.scrollTop=p,b=!0,a.current=!0):!h&&-t>l&&(i&&!c.current&&i(e),f.scrollTop=0,b=!0,c.current=!0),b&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}},[n,r,i,s]),d=(0,o.useCallback)(function(e){p(e,e.deltaY)},[p]),f=(0,o.useCallback)(function(e){l.current=e.changedTouches[0].clientY},[]),h=(0,o.useCallback)(function(e){var t=l.current-e.changedTouches[0].clientY;p(e,t)},[p]),m=(0,o.useCallback)(function(e){if(e){var t=!!Bi&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",h,t)}},[h,f,d]),b=(0,o.useCallback)(function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",h,!1))},[h,f,d]);return(0,o.useEffect)(function(){if(t){var e=u.current;return m(e),function(){b(e)}}},[t,m,b]),function(e){u.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),s=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,i=(0,o.useRef)({}),s=(0,o.useRef)(null),a=(0,o.useCallback)(function(e){if(Ws){var t=document.body,n=t&&t.style;if(r&&Fs.forEach(function(e){var t=n&&n[e];i.current[e]=t}),r&&$s<1){var o=parseInt(i.current.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,a=window.innerWidth-s+o||0;Object.keys(Vs).forEach(function(e){var t=Vs[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(a,"px"))}t&&zs()&&(t.addEventListener("touchmove",Us,qs),e&&(e.addEventListener("touchstart",Hs,qs),e.addEventListener("touchmove",Bs,qs))),$s+=1}},[r]),c=(0,o.useCallback)(function(e){if(Ws){var t=document.body,n=t&&t.style;$s=Math.max($s-1,0),r&&$s<1&&Fs.forEach(function(e){var t=i.current[e];n&&(n[e]=t)}),t&&zs()&&(t.removeEventListener("touchmove",Us,qs),e&&(e.removeEventListener("touchstart",Hs,qs),e.removeEventListener("touchmove",Bs,qs)))}},[r]);return(0,o.useEffect)(function(){if(t){var e=s.current;return a(e),function(){c(e)}}},[t,a,c]),function(e){s.current=e}}({isEnabled:n});return ei(o.Fragment,null,n&&ei("div",{onClick:Gs,css:Xs}),t(function(e){i(e),s(e)}))}var Ks={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Ys=function(e){var t=e.name,n=e.onFocus;return ei("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Ks,value:"",onChange:function(){}})};function Zs(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Qs(){return Zs(/^Mac/i)}var ea={clearIndicator:ls,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,s=o.borderRadius;return yr({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:cs,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return yr({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return yr({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,s=o.colors;return yr(yr({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},ms),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:s.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,s=o.spacing.baseUnit;return yr({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*s})},loadingMessage:es,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,s=o.spacing,a=o.colors;return yr((n={label:"menu"},(0,Jt.A)(n,function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),(0,Jt.A)(n,"position","absolute"),(0,Jt.A)(n,"width","100%"),(0,Jt.A)(n,"zIndex",1),n),t?{}:{backgroundColor:a.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return yr({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return yr({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return yr({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,s=e.isFocused;return yr({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:s?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Qi,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,s=i.spacing,a=i.colors;return yr({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?a.primary:r?a.primary25:"transparent",color:n?a.neutral20:o?a.neutral0:"inherit",padding:"".concat(2*s.baseUnit,"px ").concat(3*s.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?a.primary:a.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return yr({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return yr({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return yr({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},ta={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},na={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Mi(),captureMenuScroll:!Mi(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=yr({ignoreCase:!0,ignoreAccents:!0,stringify:Ns,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,s=n.trim,a=n.matchFrom,c=s?Ts(t):t,l=s?Ts(i(e)):i(e);return r&&(c=c.toLowerCase(),l=l.toLowerCase()),o&&(c=Is(c),l=Rs(l)),"start"===a?l.substr(0,c.length)===c:l.indexOf(c)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function ra(e,t,n,r){return{type:"option",data:t,isDisabled:pa(e,t,n),isSelected:da(e,t,n),label:la(e,t),value:ua(e,t),index:r}}function oa(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(n,r){return ra(e,n,t,r)}).filter(function(t){return aa(e,t)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=ra(e,n,t,r);return aa(e,i)?i:void 0}).filter(Hi)}function ia(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,p(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function sa(e,t){return e.reduce(function(e,n){return"group"===n.type?e.push.apply(e,p(n.options.map(function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}}))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e},[])}function aa(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,s=t.label,a=t.value;return(!ha(e)||!i)&&fa(e,{label:s,value:a,data:o},r)}var ca=function(e,t){var n;return(null===(n=e.find(function(e){return e.data===t}))||void 0===n?void 0:n.id)||null},la=function(e,t){return e.getOptionLabel(t)},ua=function(e,t){return e.getOptionValue(t)};function pa(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function da(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=ua(e,t);return n.some(function(t){return ua(e,t)===r})}function fa(e,t,n){return!e.filterOption||e.filterOption(t,n)}var ha=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},ma=1,ba=function(e){(0,Sr.A)(n,e);var t=function(e){var t=Cr();return function(){var n,r=_r(e);if(t){var o=_r(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==(0,Xt.A)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(e){var r;if((0,xr.A)(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=Qs()||Zs(/^iPhone/i)||Zs(/^iPad/i)||Qs()&&navigator.maxTouchPoints>1,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,s=o.isMulti,a=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:a}),i&&(r.setState({inputIsHiddenAfterUpdate:!s}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,s=r.state.selectValue,a=o&&r.isOptionSelected(e,s),c=r.isOptionDisabled(e,s);if(a){var l=r.getOptionValue(e);r.setValue(s.filter(function(e){return r.getOptionValue(e)!==l}),"deselect-option",e)}else{if(c)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(p(s),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter(function(e){return r.getOptionValue(e)!==o}),s=zi(t,i,i[0]||null);r.onChange(s,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(zi(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=zi(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return ca(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return sa(oa(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Pi.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return la(r.props,e)},r.getOptionValue=function(e){return ua(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=ea[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,yr(yr({},gs),e.components);var e},r.buildCategorizedOptions=function(){return oa(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return ia(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:yr({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout(function(){return r.focusInput()}))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Ri(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return ha(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,s=t.inputValue,a=t.isClearable,c=t.isDisabled,l=t.menuIsOpen,u=t.onKeyDown,p=t.tabSelectsValue,d=t.openMenuOnFocus,f=r.state,h=f.focusedOption,m=f.focusedValue,b=f.selectValue;if(!(c||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||s)return;r.focusValue("previous");break;case"ArrowRight":if(!n||s)return;r.focusValue("next");break;case"Delete":case"Backspace":if(s)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():a&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!l||!p||!h||d&&r.isOptionSelected(h,b))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(l){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":l?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:s}),r.onMenuClose()):a&&i&&r.clearValue();break;case" ":if(s)return;if(!l){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":l?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":l?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!l)return;r.focusOption("pageup");break;case"PageDown":if(!l)return;r.focusOption("pagedown");break;case"Home":if(!l)return;r.focusOption("first");break;case"End":if(!l)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++ma),r.state.selectValue=ki(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),s=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[s],r.state.focusedOptionId=ca(o,i[s])}return r}return(0,jr.A)(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Li(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Li(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),s="first"===e?0:i.length-1;if(!this.props.isMulti){var a=i.indexOf(r[0]);a>-1&&(s=a)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[s],focusedOptionId:this.getFocusedOptionId(i[s])},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,s=-1;if(n.length){switch(e){case"previous":s=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(s=o+1)}this.setState({inputIsHidden:-1!==s,focusedValue:n[s]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(ta):yr(yr({},ta),this.props.theme):ta}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,s=this.setValue,a=this.props,c=a.isMulti,l=a.isRtl,u=a.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:c,isRtl:l,options:u,selectOption:i,selectProps:a,setValue:s,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return pa(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return da(this.props,e,t)}},{key:"filterOption",value:function(e,t){return fa(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,s=e.tabIndex,a=e.form,c=e.menuIsOpen,l=e.required,u=this.getComponents().Input,p=this.state,d=p.inputIsHidden,f=p.ariaSelection,h=this.commonProps,m=r||this.getElementId("input"),b=yr(yr(yr({"aria-autocomplete":"list","aria-expanded":c,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},c&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?o.createElement(u,wr({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:s,form:a,type:"text",value:i},b)):o.createElement(Ms,wr({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ci,onFocus:this.onInputFocus,disabled:t,tabIndex:s,inputMode:"none",form:a,value:""},b))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,s=t.MultiValueRemove,a=t.SingleValue,c=t.Placeholder,l=this.commonProps,u=this.props,p=u.controlShouldRenderValue,d=u.isDisabled,f=u.isMulti,h=u.inputValue,m=u.placeholder,b=this.state,v=b.selectValue,g=b.focusedValue,y=b.isFocused;if(!this.hasValue()||!p)return h?null:o.createElement(c,wr({},l,{key:"placeholder",isDisabled:d,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),m);if(f)return v.map(function(t,a){var c=t===g,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return o.createElement(n,wr({},l,{components:{Container:r,Label:i,Remove:s},isFocused:c,isDisabled:d,key:u,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))});if(h)return null;var O=v[0];return o.createElement(a,wr({},l,{data:O,isDisabled:d}),this.formatOptionLabel(O,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,s=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,wr({},t,{innerProps:a,isFocused:s}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,s=this.state.isFocused;return e&&i?o.createElement(e,wr({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:s})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,s=this.state.isFocused;return o.createElement(n,wr({},r,{isDisabled:i,isFocused:s}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return o.createElement(e,wr({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,i=t.Menu,s=t.MenuList,a=t.MenuPortal,c=t.LoadingMessage,l=t.NoOptionsMessage,u=t.Option,p=this.commonProps,d=this.state.focusedOption,f=this.props,h=f.captureMenuScroll,m=f.inputValue,b=f.isLoading,v=f.loadingMessage,g=f.minMenuHeight,y=f.maxMenuHeight,O=f.menuIsOpen,w=f.menuPlacement,x=f.menuPosition,j=f.menuPortalTarget,S=f.menuShouldBlockScroll,_=f.menuShouldScrollIntoView,C=f.noOptionsMessage,E=f.onMenuScrollToTop,P=f.onMenuScrollToBottom;if(!O)return null;var k,A=function(t,n){var r=t.type,i=t.data,s=t.isDisabled,a=t.isSelected,c=t.label,l=t.value,f=d===i,h=s?void 0:function(){return e.onOptionHover(i)},m=s?void 0:function(){return e.selectOption(i)},b="".concat(e.getElementId("option"),"-").concat(n),v={id:b,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return o.createElement(u,wr({},p,{innerProps:v,data:i,isDisabled:s,isSelected:a,key:b,label:c,type:r,value:l,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())k=this.getCategorizedOptions().map(function(t){if("group"===t.type){var i=t.data,s=t.options,a=t.index,c="".concat(e.getElementId("group"),"-").concat(a),l="".concat(c,"-heading");return o.createElement(n,wr({},p,{key:c,data:i,options:s,Heading:r,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return A(e,"".concat(a,"-").concat(e.index))}))}if("option"===t.type)return A(t,"".concat(t.index))});else if(b){var D=v({inputValue:m});if(null===D)return null;k=o.createElement(c,p,D)}else{var R=C({inputValue:m});if(null===R)return null;k=o.createElement(l,p,R)}var I={minMenuHeight:g,maxMenuHeight:y,menuPlacement:w,menuPosition:x,menuShouldScrollIntoView:_},T=o.createElement(Yi,wr({},p,I),function(t){var n=t.ref,r=t.placerProps,a=r.placement,c=r.maxHeight;return o.createElement(i,wr({},p,I,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:a}),o.createElement(Js,{captureEnabled:h,onTopArrive:E,onBottomArrive:P,lockEnabled:S},function(t){return o.createElement(s,wr({},p,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":p.isMulti,id:e.getElementId("listbox")},isLoading:b,maxHeight:c,focusedOption:d}),k)}))});return j||"fixed"===x?o.createElement(a,wr({},p,{appendTo:j,controlElement:this.controlRef,menuPlacement:w,menuPosition:x}),T):T}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,s=t.name,a=t.required,c=this.state.selectValue;if(a&&!this.hasValue()&&!r)return o.createElement(Ys,{name:s,onFocus:this.onValueInputFocus});if(s&&!r){if(i){if(n){var l=c.map(function(t){return e.getOptionValue(t)}).join(n);return o.createElement("input",{name:s,type:"hidden",value:l})}var u=c.length>0?c.map(function(t,n){return o.createElement("input",{key:"i-".concat(n),name:s,type:"hidden",value:e.getOptionValue(t)})}):o.createElement("input",{name:s,type:"hidden",value:""});return o.createElement("div",null,u)}var p=c[0]?this.getOptionValue(c[0]):"";return o.createElement("input",{name:s,type:"hidden",value:p})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,s=t.isFocused,a=t.selectValue,c=this.getFocusableOptions();return o.createElement(_s,wr({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:i,isFocused:s,selectValue:a,focusableOptions:c,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,s=this.props,a=s.className,c=s.id,l=s.isDisabled,u=s.menuIsOpen,p=this.state.isFocused,d=this.commonProps=this.getCommonProps();return o.createElement(r,wr({},d,{className:a,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:p}),this.renderLiveRegion(),o.createElement(t,wr({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:p,menuIsOpen:u}),o.createElement(i,wr({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),o.createElement(n,wr({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,s=t.isFocused,a=t.prevWasFocused,c=t.instancePrefix,l=e.options,u=e.value,p=e.menuIsOpen,d=e.inputValue,f=e.isMulti,h=ki(u),m={};if(n&&(u!==n.value||l!==n.options||p!==n.menuIsOpen||d!==n.inputValue)){var b=p?function(e,t){return ia(oa(e,t))}(e,h):[],v=p?sa(oa(e,h),"".concat(c,"-option")):[],g=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,h):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,b);m={selectValue:h,focusedOption:y,focusedOptionId:ca(v,y),focusableOptionsWithIds:v,focusedValue:g,clearFocusValueOnUpdate:!1}}var O=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},w=i,x=s&&a;return s&&!x&&(w={value:zi(f,h,h[0]||null),options:h,action:"initial-input-focus"},x=!a),"initial-input-focus"===(null==i?void 0:i.action)&&(w=null),yr(yr(yr({},m),O),{},{prevProps:e,ariaSelection:w,prevWasFocused:x})}}]),n}(o.Component);ba.defaultProps=na;var va=(0,o.forwardRef)(function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,s=void 0!==r&&r,a=e.defaultValue,c=void 0===a?null:a,l=e.inputValue,u=e.menuIsOpen,p=e.onChange,d=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,m=e.value,b=ir(e,Or),v=(0,o.useState)(void 0!==l?l:n),g=(0,i.A)(v,2),y=g[0],O=g[1],w=(0,o.useState)(void 0!==u?u:s),x=(0,i.A)(w,2),j=x[0],S=x[1],_=(0,o.useState)(void 0!==m?m:c),C=(0,i.A)(_,2),E=C[0],P=C[1],k=(0,o.useCallback)(function(e,t){"function"==typeof p&&p(e,t),P(e)},[p]),A=(0,o.useCallback)(function(e,t){var n;"function"==typeof d&&(n=d(e,t)),O(void 0!==n?n:e)},[d]),D=(0,o.useCallback)(function(){"function"==typeof h&&h(),S(!0)},[h]),R=(0,o.useCallback)(function(){"function"==typeof f&&f(),S(!1)},[f]),I=void 0!==l?l:y,T=void 0!==u?u:j,N=void 0!==m?m:E;return yr(yr({},b),{},{inputValue:I,menuIsOpen:T,onChange:k,onInputChange:A,onMenuClose:R,onMenuOpen:D,value:N})}(e);return o.createElement(ba,wr({ref:t},n))}),ga=va;function ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Oa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ya(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ya(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var wa={global:"admin-site",admin:"admin-tools","front-end":"admin-appearance","single-use":"clock",content:"shortcode","head-content":"editor-code","body-content":"editor-code","footer-content":"editor-code","admin-css":"dashboard","site-css":"admin-customizer","site-head-js":"media-code","site-footer-js":"media-code"},xa={global:(0,c.__)("Run everywhere","code-snippets"),admin:(0,c.__)("Only run in administration area","code-snippets"),"front-end":(0,c.__)("Only run on site front-end","code-snippets"),"single-use":(0,c.__)("Only run once","code-snippets"),content:(0,c.__)("Where inserted in editor","code-snippets"),"head-content":(0,c.__)("In site header (<head> section)","code-snippets"),"body-content":(0,c.__)("In site content (start of <body>)","code-snippets"),"footer-content":(0,c.__)("In site footer (end of <body>)","code-snippets"),"site-css":(0,c.__)("Site front-end","code-snippets"),"admin-css":(0,c.__)("Administration area","code-snippets"),"site-head-js":(0,c.__)("In site header (<head> section)","code-snippets"),"site-footer-js":(0,c.__)("In site footer (end of <body>)","code-snippets")},ja=function(){var e=Bn(),t=e.snippet,n=e.setSnippet,r=e.isReadOnly,i=(0,o.useId)(),s=Kt[an(t)].filter(function(e){return"condition"!==e}).map(function(e){return{key:e,value:e,label:xa[e]}});return cn(t)?null:(0,Ut.jsxs)("div",{className:"block-form-field",children:[(0,Ut.jsx)("label",{htmlFor:i,children:(0,c.__)("Location","code-snippets")}),(0,Ut.jsx)(ga,{inputId:i,className:"code-snippets-select code-snippets-select-location",options:s,isSearchable:!1,isDisabled:r,styles:{menu:function(e){return Oa(Oa({},e),{},{zIndex:9999})},input:function(e){return Oa(Oa({},e),{},{":focus":{boxShadow:"none"}})}},value:s.find(function(e){return e.value===t.scope}),formatOptionLabel:function(e){var t=e.label,n=e.value;return(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)("span",{className:"dashicons dashicons-".concat(wa[n]),"aria-hidden":"true"})," ".concat(t)]})},onChange:function(e){return(null==e?void 0:e.value)&&n(function(t){return Oa(Oa({},t),{},{scope:e.value})})}})]})},Sa=["className","type","children"],_a=["className","onDismiss","children"];function Ca(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ea(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ca(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ca(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Pa=function(e){return"error"===e||"warning"===e},ka=function(e){var t=e.className,n=e.type,r=e.children,o=ir(e,Sa);return(0,Ut.jsx)("div",Ea(Ea({className:a()("notice","code-snippets-notice",(0,Jt.A)({},"notice-".concat(n),n),t),role:Pa(n)?"alert":"status","aria-live":Pa(n)?"assertive":"polite"},o),{},{children:r}))},Aa=function(e){var t=e.className,n=e.onDismiss,r=e.children,o=ir(e,_a);return(0,Ut.jsxs)(ka,Ea(Ea({className:a()("is-dismissible",t)},o),{},{children:[r,(0,Ut.jsx)("button",{type:"button",className:"notice-dismiss",onClick:function(e){e.preventDefault(),n()},children:(0,Ut.jsx)("span",{className:"screen-reader-text",children:(0,c.__)("Dismiss notice.","code-snippets")})})]}))};function Da(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ra(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Da(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Da(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ia=function(e){return Boolean(null==e?void 0:e[3])},Ta=function(e){return"string"==typeof e?(0,or.createInterpolateElement)(e,{strong:(0,Ut.jsx)("strong",{})}):e},Na=function(e){var t=e.trace,n=(0,o.useRef)(null),r=(0,o.useState)(!1),s=(0,i.A)(r,2),a=s[0],l=s[1],u=(0,o.useState)(!1),p=(0,i.A)(u,2),d=p[0],f=p[1];return(0,o.useEffect)(function(){if(a){var e=function(){var e=n.current;f(Boolean(e&&e.scrollWidth>e.clientWidth))};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}f(!1)},[a,t]),(0,Ut.jsxs)("details",{onToggle:function(e){return l(e.currentTarget.open)},children:[(0,Ut.jsx)("summary",{children:(0,c.__)("View stack trace","code-snippets")}),(0,Ut.jsx)("pre",{ref:n,children:t}),d?(0,Ut.jsx)("p",{className:"stack-trace-hint",children:(0,Ut.jsx)("em",{children:(0,c.__)("Scroll horizontally if the trace is cut off.","code-snippets")})}):null]})},La=function(e){var t=e.placement,n=Bn(),r=n.currentNotice,o=n.setCurrentNotice,i=n.snippet,s=n.setSnippet,a="above-form"===t?Ia(r):!Ia(r),l="sidebar"===t&&!i.code_error_trace;return(0,Ut.jsxs)(Ut.Fragment,{children:[a&&r?(0,Ut.jsxs)(Aa,{className:"".concat(r[0]," code-snippets-notice"),type:"error"===r[0]?"error":void 0,onDismiss:function(){return o(void 0)},children:[(0,Ut.jsx)("p",{children:Ta(r[1])}),r[2]?(0,Ut.jsx)("p",{children:Ta(r[2])}):null,r[3]?(0,Ut.jsx)(Na,{trace:r[3]}):null]}):null,l&&!r&&i.code_error?(0,Ut.jsx)(Aa,{className:"notice-error",type:"error",onDismiss:function(){return s(function(e){return Ra(Ra({},e),{},{code_error:null,code_error_trace:null})})},children:(0,Ut.jsxs)("p",{children:[(0,Ut.jsx)("strong",{children:(0,c.sprintf)((0,c.__)("Snippet automatically deactivated due to an error on line %d:","code-snippets"),i.code_error[1])}),(0,Ut.jsx)("blockquote",{children:i.code_error[0]})]})}):null]})};function Ma(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ma(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ma(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Va=function(e){return(0,Ut.jsx)("svg",Fa(Fa({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:(0,Ut.jsx)("path",{d:"M12 6V4.5C12 4.10218 11.842 3.72064 11.5607 3.43934C11.2794 3.15804 10.8978 3 10.5 3H4.5C4.10218 3 3.72064 3.15804 3.43934 3.43934C3.15804 3.72064 3 4.10218 3 4.5V10.5C3 10.8978 3.15804 11.2794 3.43934 11.5607C3.72064 11.842 4.10218 12 4.5 12H6M6 7.5C6 7.10218 6.15804 6.72065 6.43934 6.43934C6.72065 6.15804 7.10218 6 7.5 6H13.5C13.8978 6 14.2794 6.15804 14.5607 6.43934C14.842 6.72065 15 7.10218 15 7.5V13.5C15 13.8978 14.842 14.2794 14.5607 14.5607C14.2794 14.842 13.8978 15 13.5 15H7.5C7.10218 15 6.72065 14.842 6.43934 14.5607C6.15804 14.2794 6 13.8978 6 13.5V7.5Z",stroke:"#F0F0F0",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},Ua=["text","timeout"];function Ba(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ha(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ba(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ba(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var za=function(e){return e[e.INITIAL=0]="INITIAL",e[e.PROGRESSING=1]="PROGRESSING",e[e.SUCCESS=2]="SUCCESS",e[e.ERROR=3]="ERROR",e}(za||{}),Wa=function(e){switch(e.status){case za.INITIAL:return(0,Ut.jsx)(Va,{"aria-hidden":"true"});case za.PROGRESSING:return(0,Ut.jsx)("span",{className:"spinner-wrapper","aria-hidden":"true",children:(0,Ut.jsx)(tr.Spinner,{})});case za.SUCCESS:return(0,Ut.jsx)("span",{className:"dashicons dashicons-yes","aria-hidden":"true"});case za.ERROR:return(0,Ut.jsx)("span",{className:"dashicons dashicons-warning","aria-hidden":"true"})}},$a=(0,Jt.A)((0,Jt.A)((0,Jt.A)((0,Jt.A)({},za.INITIAL,""),za.PROGRESSING,(0,c.__)("Copying to clipboard…","code-snippets")),za.SUCCESS,(0,c.__)("Copied to clipboard.","code-snippets")),za.ERROR,(0,c.__)("Failed to copy to clipboard. Please try again.","code-snippets")),qa=function(e){var t=e.text,n=e.timeout,r=void 0===n?1500:n,s=ir(e,Ua),a=(0,o.useState)(za.INITIAL),l=(0,i.A)(a,2),u=l[0],p=l[1],d=window.navigator.clipboard;return d&&window.isSecureContext?(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsxs)(lr,Ha(Ha({className:"code-snippets-copy-text",onClick:function(){p(za.PROGRESSING),null==d||d.writeText(t).then(function(){p(za.SUCCESS),setTimeout(function(){return p(za.INITIAL)},r)}).catch(function(e){console.error("Failed to copy text to clipboard.",e),p(za.ERROR),setTimeout(function(){return p(za.INITIAL)},r)})}},s),{},{children:[(0,Ut.jsx)(Wa,{status:u}),(0,c.__)("Copy","code-snippets")]})),(0,Ut.jsx)("span",{className:"screen-reader-text",role:za.ERROR===u?"alert":"status","aria-live":za.ERROR===u?"assertive":"polite",children:$a[u]})]}):null};function Ga(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ga(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ga(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ja=function(e){var t=e.options,n=e.checked,r=e.disabled,o=e.setChecked,i=e.optionLabels,s=e.optionDescriptions;return(0,Ut.jsx)("ul",{children:t.map(function(e){return(0,Ut.jsx)("li",{children:(0,Ut.jsx)(tr.CheckboxControl,{label:i[e],help:s[e],checked:n[e],disabled:r,onChange:function(t){return o(function(n){return Xa(Xa({},n),{},(0,Jt.A)({},e,t))})}})},e)})})},Ka=function(){return(0,Ut.jsxs)("p",{className:"description",children:[(0,c.__)("Copy the below shortcode to insert this snippet into a post, page, or other content.","code-snippets"),"\n",(0,c.__)("You can also use the Classic Editor button, Block editor (Pro) or Elementor widget (Pro).","code-snippets"),"\n",(0,Ut.jsx)(tr.ExternalLink,{href:(0,c.__)("https://codesnippets.pro/doc/inserting-content-snippets/","code-snippets"),children:(0,c.__)("Learn more","code-snippets")})]})},Ya={php:(0,c.__)("Evaluate PHP code","code-snippets"),format:(0,c.__)("Add paragraphs and formatting","code-snippets"),shortcodes:(0,c.__)("Evaluate additional shortcode tags","code-snippets")},Za={php:(0,c.__)("Run code within <?php ?> tags.","code-snippets"),format:(0,c.__)("Wrap output in paragraphs and apply formatting.","code-snippets"),shortcodes:(0,c.__)("Replace [shortcodes] embedded within the snippet.","code-snippets")},Qa=function(){var e,t=Bn(),n=t.snippet,r=t.isReadOnly,s=(0,o.useState)(function(){return{php:n.code.includes("<?"),format:!0,shortcodes:!1}}),a=(0,i.A)(s,2),l=a[0],u=a[1],d=(e=Xa(Xa({id:n.id,network:n.network},l),{},{name:n.name}),"[".concat(["code_snippet"].concat(p(Object.entries(e).filter(function(e){var t=(0,i.A)(e,2)[1];return Boolean(t)}).map(function(e){var t=(0,i.A)(e,2),n=t[0],r=t[1];return"boolean"==typeof r?n:"".concat(n,"=").concat(JSON.stringify(r))}))).filter(Boolean).join(" "),"]"));return(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)(Ka,{}),(0,Ut.jsxs)("p",{className:"shortcode-tag-wrapper",children:[(0,Ut.jsx)("code",{className:"shortcode-tag",children:d}),(0,Ut.jsx)(qa,{primary:!0,text:d})]}),(0,Ut.jsx)("h2",{children:(0,c.__)("Shortcode Options","code-snippets")}),(0,Ut.jsx)("hr",{className:"wp-header-end"}),(0,Ut.jsx)(Ja,{options:["php","format","shortcodes"],checked:l,disabled:r,setChecked:u,optionLabels:Ya,optionDescriptions:Za})]})},ec=function(){var e=Bn(),t=e.snippet,n=e.isReadOnly,r=(0,o.useState)(!1),s=(0,i.A)(r,2),a=s[0],l=s[1];return"content"===t.scope&&t.id?(0,Ut.jsxs)("div",{className:"inline-form-field",children:[(0,Ut.jsx)("strong",{children:(0,c.__)("Shortcode","code-snippets")}),(0,Ut.jsx)(lr,{onClick:function(){return l(!0)},disabled:n,children:(0,c.__)("See options","code-snippets")}),a?(0,Ut.jsxs)(tr.Modal,{size:"medium",className:"code-snippets-modal",title:(0,c.__)("Embed Snippet with Shortcode","code-snippets"),onRequestClose:function(){return l(!1)},children:[(0,Ut.jsx)("div",{className:"modal-content",children:(0,Ut.jsx)(Qa,{})}),(0,Ut.jsx)("div",{className:"modal-footer",children:(0,Ut.jsx)(lr,{link:!0,large:!0,onClick:function(){return l(!1)},children:(0,c.__)("Close Popup","code-snippets")})})]}):null]}):null},tc=function(e){var t=e.block,n=e.inline,r=e.start,i=e.end,s=e.icon,l=e.className,u=e.children,p=e.label,d=(0,o.useId)();return(0,Ut.jsxs)("div",{className:a()("tooltip help-tooltip",{"tooltip-block":t,"tooltip-inline":n,"tooltip-start":r,"tooltip-end":i},l),children:[(0,Ut.jsx)("button",{type:"button",className:"tooltip-trigger","aria-label":null!=p?p:(0,c.__)("More information","code-snippets"),"aria-describedby":d,children:null!=s?s:(0,Ut.jsx)("span",{className:"dashicons dashicons-editor-help","aria-hidden":"true"})}),(0,Ut.jsx)("div",{role:"tooltip",className:"tooltip-content",id:d,children:u})]})};function nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nc(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var oc=function(){var e=Bn(),t=e.snippet,n=e.setSnippet,r=e.isReadOnly,i=(0,o.useId)();return(0,Ut.jsxs)("div",{className:"inline-form-field activation-switch-container",children:[(0,Ut.jsx)("label",{htmlFor:i,id:"snippet-sharing-label",children:(0,c.__)("Share with Subsites","code-snippets")}),(0,Ut.jsx)(tc,{inline:!0,start:!0,children:(0,c.__)("Instead of running on every site, allow this snippet to be activated on individual sites on the network.","code-snippets")}),(0,Ut.jsx)("span",{className:"sharing-status-text",children:t.shared_network?(0,c.__)("Enabled","code-snippets"):(0,c.__)("Disabled","code-snippets")}),(0,Ut.jsx)("input",{id:i,name:"snippet_sharing",type:"checkbox",className:"switch",checked:!!t.shared_network,disabled:r,"aria-labelledby":"snippet-sharing-label",onChange:function(e){return n(function(t){return rc(rc({},t),{},{active:!1,shared_network:e.target.checked})})}})]})},ic={php:["php","text/php"],html:["php","text/php"],css:["css","text/css"],js:["js","text/javascript"],cond:["json","application/json"],json:["json","application/json"]},sc=function(e,t,n){var r=document.createElement("a");r.download=t,r.href=URL.createObjectURL(new Blob([e],{type:n})),setTimeout(function(){return URL.revokeObjectURL(r.href)},4e4),r.style.display="none",document.body.appendChild(r),setTimeout(function(){r.click(),r.remove()},0)},ac=function(e){var t=e.name,n=e.label,r=e.makeRequest,o=Bn(),s=o.snippet,a=o.isWorking,l=o.setIsWorking,u=o.handleRequestError;return(0,Ut.jsx)(lr,{name:t,onClick:function(){l(!0),r(s).then(function(e){return function(e,t){var n=t.id,r=t.name,o=t.scope,s=r.toLowerCase().replace(/[^\w-]+/g,"-").trim(),a=""===s?"snippet-".concat(n):s;if("string"==typeof e){var c=(0,i.A)(ic[an({scope:o})],2),l=c[0],u=c[1],p="".concat(a,".code-snippets.").concat(l);sc(e,p,u)}else{var d="".concat(a,".code-snippets.json");sc(JSON.stringify(e,void 0,2),d,"application/json")}}(e,s)}).catch(function(e){return u(e,(0,c.__)("Could not download export file.","code-snippets"))}).finally(function(){return l(!1)})},disabled:a,children:n})},cc=function(){var e,t=mn(),n=Bn().snippet;return(0,Ut.jsxs)("div",{className:"snippet-export-buttons",children:[(0,Ut.jsx)(ac,{name:"export_snippet",label:(0,c.__)("Export","code-snippets"),makeRequest:t.export}),(null===(e=window.CODE_SNIPPETS_EDIT)||void 0===e?void 0:e.enableDownloads)&&"cond"!==an(n)&&(0,Ut.jsx)(ac,{name:"export_snippet_code",label:(0,c.__)("Download Code","code-snippets"),makeRequest:t.exportCode})]})},lc=["id","text","name","primary","secondary","small","large","wrap","className"];function uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var pc=function(e){var t=e.id,n=e.text,r=e.name,o=void 0===r?"submit":r,i=e.primary,s=e.secondary,l=e.small,u=e.large,p=e.wrap,d=e.className,f=ir(e,lc),h=(0,Ut.jsx)("input",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uc(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({id:null!=t?t:o,type:"submit",name:o,value:null!=n?n:(0,c.__)("Save Changes","code-snippets"),className:a()("button",{"button-primary":i,"button-secondary":s,"button-small":l,"button-large":u},d)},f));return p?(0,Ut.jsx)("p",{className:"submit",children:h}):h};function dc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var fc=function(e){var t=Bn().snippet;return(0,Ut.jsx)(pc,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dc(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({large:!0,name:Kn.SAVE,text:cn(t)?(0,c.__)("Save Condition","code-snippets"):(0,c.__)("Save Snippet","code-snippets")},e))},hc=function(e){var t=e.primaryActivate,n=Bn(),r=n.snippet,o=n.isWorking;switch(!0){case cn(r)||r.shared_network&&(0,Yt.i_)():return null;case"single-use"===r.scope:return(0,Ut.jsx)(pc,{large:!0,name:Kn.SAVE_AND_EXECUTE,disabled:o,text:(0,c.__)("Save and Execute Once","code-snippets")});case r.active:return(0,Ut.jsx)(pc,{name:Kn.SAVE_AND_DEACTIVATE,disabled:o,large:!0,text:(0,c.__)("Save and Deactivate","code-snippets")});default:case!r.active:return(0,Ut.jsx)(pc,{name:Kn.SAVE_AND_ACTIVATE,primary:t,disabled:o,large:!0,text:(0,c.__)("Save and Activate","code-snippets")})}},mc=function(){var e,t=Bn().snippet,n=!(null===(e=window.CODE_SNIPPETS_EDIT)||void 0===e||!e.activateByDefault||t.active||"single-use"===t.scope||t.shared_network&&(0,Yt.i_)());return(0,Ut.jsxs)(Ut.Fragment,{children:[n&&(0,Ut.jsx)(fc,{primary:!n}),(0,Ut.jsx)(hc,{primaryActivate:n}),!n&&(0,Ut.jsx)(fc,{primary:!0})]})},bc=function(){var e=Bn(),t=e.snippet,n=e.isWorking,r=Qn().submitSnippet,i=(0,o.useId)();return(0,Ut.jsxs)("div",{className:"inline-form-field activation-switch-container",children:[(0,Ut.jsx)("label",{htmlFor:i,id:"snippet-activation-switch-label",children:(0,c.__)("Status","code-snippets")}),(0,Ut.jsx)("span",{className:"status-text",children:t.active?(0,c.__)("Active","code-snippets"):(0,c.__)("Inactive","code-snippets")}),(0,Ut.jsx)("input",{id:i,type:"checkbox",checked:t.active,disabled:n||!!t.shared_network,className:"switch","aria-labelledby":"snippet-activation-switch-label",onChange:function(){r({id:t.id,network:t.network,active:!t.active},t.active?Kn.SAVE_AND_DEACTIVATE:Kn.SAVE_AND_ACTIVATE).then(function(){}).catch(er)}})]})},vc=["block","inline","start","end","tooltip","disabled","children","containerClassName"];function gc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gc(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Oc=function(e){var t=e.block,n=e.inline,r=e.start,o=e.end,i=e.tooltip,s=e.disabled,c=e.children,l=e.containerClassName,u=ir(e,vc);return(0,Ut.jsx)("div",{className:a()(l,!s&&{"tooltip-block":t,"tooltip-inline":n,"tooltip-start":r,"tooltip-end":o}),children:(0,Ut.jsxs)(lr,yc(yc({},u),{},{disabled:s,children:[c,!s&&(0,Ut.jsx)("div",{role:"tooltip",className:"tooltip-content",children:i})]}))})};function wc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wc(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var jc=function(){var e=mn().update,t=Bn(),n=t.acceptSnippet,r=t.snippet,o=t.setSnippet,i=t.isWorking,s=t.setIsWorking,l=t.setCurrentNotice;return(0,Ut.jsx)("div",{className:a()("snippet-lock-control",{"tooltip tooltip-block tooltip-end":!i}),children:(0,Ut.jsx)(Oc,{small:!0,block:!0,end:!0,primary:r.locked,className:"snippet-lock-button",containerClassName:"snippet-lock-control",disabled:i,onClick:function(){s(!0),o(function(e){return xc(xc({},e),{},{locked:!e.locked})}),e({id:r.id,network:r.network,locked:!r.locked}).then(function(e){n(e),l(["updated",e.locked?(0,c.__)("Snippet <strong>locked</strong>.","code-snippets"):(0,c.__)("Snippet <strong>unlocked</strong>.","code-snippets")])}).catch(function(){return l(["error",(0,c.__)("Unable to lock snippet.","code-snippets")])}).finally(function(){return s(!1)})},tooltip:r.locked?(0,c.__)("Unlock this snippet to allow editing and deletion.","code-snippets"):(0,c.__)("Mark this snippet as read-only to prevent accidental changes or deletion.","code-snippets"),children:r.locked?(0,Ut.jsx)("span",{className:"dashicons dashicons-unlock","aria-hidden":"true"}):(0,Ut.jsx)("span",{className:"dashicons dashicons-lock","aria-hidden":"true"})})})};function Sc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sc(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Cc=function(){var e=Bn(),t=e.snippet,n=e.isReadOnly,r=e.setSnippet,i=(0,o.useId)();return(0,Ut.jsxs)("div",{className:"snippet-priority inline-form-field",children:[(0,Ut.jsx)("label",{htmlFor:i,id:"snippet-priority-label",children:(0,c.__)("Priority","code-snippets")}),(0,Ut.jsx)(tc,{block:!0,end:!0,className:"priority-input-tooltip",children:(0,c.__)("Snippets with a lower priority number will run before those with a higher number.","code-snippets")}),(0,Ut.jsx)("input",{type:"number",id:i,name:"snippet_priority",value:t.priority,disabled:n,"aria-labelledby":"snippet-priority-label",onChange:function(e){return r(function(t){return _c(_c({},t),{},{priority:parseInt(e.target.value,10)})})}})]})},Ec=function(){var e=Bn().codeEditorInstance,t=(0,o.useId)();return(0,Ut.jsxs)("div",{className:"inline-form-field",children:[(0,Ut.jsx)("label",{htmlFor:t,children:(0,c.__)("Code Direction","code-snippets")}),(0,Ut.jsxs)("select",{id:t,onChange:function(t){return null==e?void 0:e.codemirror.setOption("direction","rtl"===t.target.value?"rtl":"ltr")},children:[(0,Ut.jsx)("option",{value:"ltr",children:(0,c.__)("LTR","code-snippets")}),(0,Ut.jsx)("option",{value:"rtl",children:(0,c.__)("RTL","code-snippets")})]})]})};function Pc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pc(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ac=function(e){var t=e.setIsUpgradeDialogOpen,n=Bn(),r=n.snippet,s=n.isWorking,a=n.setIsWorking,l=n.handleRequestError,u=function(e){var t=e.snippet,n=e.setIsWorking,r=e.onSuccess,s=e.onError,a=mn(),c=(0,o.useState)(!1),l=(0,i.A)(c,2),u=l[0],p=l[1],f=function(){var e=(0,d.A)(h().mark(function e(){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return null==n||n(!0),e.prev=1,e.next=4,a.delete(t);case 4:return e.next=6,null==r?void 0:r();case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),null==s||s(e.t0);case 11:return e.prev=11,null==n||n(!1),e.finish(11);case 14:case"end":return e.stop()}},e,null,[[1,8,11,14]])}));return function(){return e.apply(this,arguments)}}(),m=function(){var e=(0,d.A)(h().mark(function e(){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.active&&!t.trashed){e.next=4;break}p(!0),e.next=6;break;case 4:return e.next=6,f();case 6:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();return{requestDelete:m,deleteDialogProps:{snippet:t,isDialogOpen:u,setIsDialogOpen:p,makeDeleteRequest:f}}}({snippet:r,setIsWorking:a,onSuccess:function(){var e;window.location.replace((0,Gt.c$)(null===(e=window.CODE_SNIPPETS)||void 0===e?void 0:e.urls.manage,{result:"deleted"}))},onError:function(e){l(e,(0,c.__)("Could not delete snippet.","code-snippets"))}}),p=u.requestDelete,f=u.deleteDialogProps;return(0,Ut.jsxs)("div",{className:"snippet-editor-sidebar",children:[(0,Ut.jsxs)("div",{className:"box",children:[r.id&&!cn(r)?(0,Ut.jsx)(bc,{}):null,(0,Yt.i_)()&&(0,Ut.jsx)(oc,{}),(0,c.isRTL)()&&(0,Ut.jsx)(Ec,{}),(0,Ut.jsx)(vr,{setIsDialogOpen:t}),(0,Ut.jsx)(ja,{}),(0,Ut.jsx)(ec,{}),(0,Ut.jsx)(Cc,{}),!!r.id&&(0,Ut.jsxs)("div",{className:"row-actions visible inline-form-field",children:[(0,Ut.jsx)(cc,{}),(0,Ut.jsx)(lr,{className:"delete-button",onClick:function(){p()},disabled:s||r.locked,children:r.trashed?(0,c.__)("Delete Permanently","code-snippets"):(0,c.__)("Trash","code-snippets")}),(0,Ut.jsx)(jc,{})]})]}),(0,Ut.jsxs)("p",{className:"submit",children:[(0,Ut.jsx)(mc,{}),s?(0,Ut.jsx)(tr.Spinner,{}):""]}),(0,Ut.jsx)(La,{placement:"sidebar"}),(0,Ut.jsx)(hr,kc({},f))]})};function Dc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dc(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ic,Tc={css:"text/css",js:"javascript",php:"text/x-php",html:"application/x-httpd-php"},Nc=["php","html","css","js","cond"].map(function(e){return{value:e,label:on[e]}}),Lc={menu:function(e){return Rc(Rc({},e),{},{zIndex:9999,width:"max-content",minWidth:"100%"})},input:function(e){return Rc(Rc({},e),{},{boxShadow:"none"})}},Mc=function(e){var t=e.option,n=t.value,r=t.label,o=e.context;return(0,Ut.jsxs)("div",{className:a()("snippet-type-option",{"inverted-badges":ln(n)&&!(0,Yt.QX)()}),children:[(0,Ut.jsxs)("span",{className:"snippet-type-option-main",children:[(0,Ut.jsx)(br,{name:n}),"menu"===o?r:null]}),"menu"===o&&ln(n)&&!(0,Yt.QX)()?(0,Ut.jsx)(br,{name:"pro",small:!0,children:(0,c._x)("Pro","Upgrade to Pro","code-snippets")}):null]})},Fc=function(e){var t=e.setIsUpgradeDialogOpen,n=Bn(),r=n.snippet,i=n.setSnippet,s=n.codeEditorInstance,a=n.isReadOnly,l=an(r),u=(0,o.useId)();return(0,o.useEffect)(function(){if(s){var e=s.codemirror;e.setOption("lint","php"===l||"css"===l),"cond"!==l&&Tc[l]&&(e.setOption("mode",Tc[l]),e.refresh())}},[s,l]),(0,Ut.jsxs)("div",{className:"snippet-type-container",children:[(0,Ut.jsx)("label",{htmlFor:u,className:"screen-reader-text",children:(0,c.__)("Snippet Type","code-snippets")}),(0,Ut.jsx)(ga,{inputId:u,className:"code-snippets-select",isSearchable:!1,isDisabled:a||0!==r.id&&"cond"===l,options:0===r.id?Nc:Nc.filter(function(e){return"cond"!==e.value}),menuPlacement:"bottom",styles:Lc,value:Nc.find(function(e){return e.value===l}),formatOptionLabel:function(e,t){return(0,Ut.jsx)(Mc,{option:e,context:t.context})},onChange:function(e){e&&ln(e.value)&&!(0,Yt.QX)()?t(!0):e&&i(function(t){return Rc(Rc({},t),{},{scope:Kt[e.value][0]})})}})]})};function Vc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Uc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vc(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Bc=null===(Ic=window.CODE_SNIPPETS_EDIT)||void 0===Ic?void 0:Ic.tagOptions,Hc=function(){var e=Bn(),t=e.snippet,n=e.setSnippet,r=e.isReadOnly;return null!=Bc&&Bc.enabled?(0,Ut.jsx)("div",{className:"snippet-tags-container",children:(0,Ut.jsx)(tr.FormTokenField,{label:(0,c.__)("Snippet Tags","code-snippets"),value:t.tags,disabled:r,suggestions:Bc.availableTags,tokenizeOnBlur:!0,tokenizeOnSpace:!Bc.allowSpaces,onChange:function(e){n(function(t){return Uc(Uc({},t),{},{tags:e.map(function(e){return"string"==typeof e?e:e.value})})})}})}):null};function zc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zc(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var $c=function(e){return(0,Ut.jsxs)("svg",Wc(Wc({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:[(0,Ut.jsx)("path",{d:"M12 3H15V6"}),(0,Ut.jsx)("path",{d:"M10.5 7.5L15 3L10.5 7.5Z"}),(0,Ut.jsx)("path",{d:"M6 15H3V12"}),(0,Ut.jsx)("path",{d:"M3 15L7.5 10.5L3 15Z"}),(0,Ut.jsx)("path",{d:"M12 15H15V12"}),(0,Ut.jsx)("path",{d:"M10.5 10.5L15 15L10.5 10.5Z"}),(0,Ut.jsx)("path",{d:"M6 3H3V6"}),(0,Ut.jsx)("path",{d:"M3 3L7.5 7.5L3 3Z"}),(0,Ut.jsx)("path",{d:"M12 3H15M15 3V6M15 3L10.5 7.5M6 15H3M3 15V12M3 15L7.5 10.5M12 15H15M15 15V12M15 15L10.5 10.5M6 3H3M3 3V6M3 3L7.5 7.5",stroke:"currentcolor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}))};function qc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Gc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qc(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Xc=function(e){return(0,Ut.jsxs)("svg",Gc(Gc({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:[(0,Ut.jsx)("path",{d:"M3.75 6.75H6.75V3.75"}),(0,Ut.jsx)("path",{d:"M2.25 2.25L6.75 6.75L2.25 2.25Z"}),(0,Ut.jsx)("path",{d:"M3.75 11.25H6.75V14.25"}),(0,Ut.jsx)("path",{d:"M2.25 15.75L6.75 11.25L2.25 15.75Z"}),(0,Ut.jsx)("path",{d:"M14.25 6.75H11.25V3.75"}),(0,Ut.jsx)("path",{d:"M11.25 6.75L15.75 2.25L11.25 6.75Z"}),(0,Ut.jsx)("path",{d:"M14.25 11.25H11.25V14.25"}),(0,Ut.jsx)("path",{d:"M11.25 11.25L15.75 15.75L11.25 11.25Z"}),(0,Ut.jsx)("path",{d:"M3.75 6.75H6.75M6.75 6.75V3.75M6.75 6.75L2.25 2.25M3.75 11.25H6.75M6.75 11.25V14.25M6.75 11.25L2.25 15.75M14.25 6.75H11.25M11.25 6.75V3.75M11.25 6.75L15.75 2.25M14.25 11.25H11.25M11.25 11.25V14.25M11.25 11.25L15.75 15.75",stroke:"currentcolor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}))};let Jc=navigator.userAgent,Kc=navigator.platform,Yc=(/gecko\/\d/i.test(Jc),/MSIE \d/.test(Jc)),Zc=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Jc),Qc=/Edge\/(\d+)/.exec(Jc),el=((Yc||Zc||Qc)&&(Yc?document.documentMode:(Qc||Zc)[1]),!Qc&&/WebKit\//.test(Jc)),tl=(el&&/Qt\/\d+\.\d+/.test(Jc),!Qc&&/Chrome\/(\d+)/.exec(Jc)),nl=(tl&&tl[1],/Opera\//.test(Jc)),rl=/Apple Computer/.test(navigator.vendor),ol=(/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Jc),/PhantomJS/.test(Jc),rl&&(/Mobile\/\w+/.test(Jc)||navigator.maxTouchPoints>2)),il=/Android/.test(Jc),sl=(ol||il||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Jc),ol||/Mac/.test(Kc)),al=(/\bCrOS\b/.test(Jc),/win/i.test(Kc),nl&&Jc.match(/Version\/(\d*\.\d*)/));al&&(al=Number(al[1])),al&&al>=15&&(nl=!1,el=!0);let cl={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};for(let e=0;e<10;e++)cl[e+48]=cl[e+96]=String(e);for(let e=65;e<=90;e++)cl[e]=String.fromCharCode(e);for(let e=1;e<=12;e++)cl[e+111]=cl[e+63235]="F"+e;let ll={};function ul(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ul(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ul(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}ll.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ll.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ll.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},ll.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ll.default=sl?ll.macDefault:ll.pcDefault;var dl={Fn:(0,c._x)("Fn","keyboard key","code-snippets"),Cmd:(0,c._x)("Ctrl","keyboard key","code-snippets"),Ctrl:(0,c._x)("Ctrl","keyboard key","code-snippets"),Shift:(0,c._x)("Shift","keyboard key","code-snippets"),Alt:(0,c._x)("Alt","keyboard key","code-snippets"),Tab:(0,c._x)("Tab","keyboard key","code-snippets"),Up:(0,c._x)("Up","keyboard key","code-snippets"),Down:(0,c._x)("Down","keyboard key","code-snippets"),Left:(0,c._x)("Left","keyboard key","code-snippets"),Right:(0,c._x)("Right","keyboard key","code-snippets"),A:(0,c._x)("A","keyboard key","code-snippets"),B:(0,c._x)("B","keyboard key","code-snippets"),C:(0,c._x)("C","keyboard key","code-snippets"),D:(0,c._x)("D","keyboard key","code-snippets"),E:(0,c._x)("E","keyboard key","code-snippets"),F:(0,c._x)("F","keyboard key","code-snippets"),G:(0,c._x)("G","keyboard key","code-snippets"),H:(0,c._x)("H","keyboard key","code-snippets"),I:(0,c._x)("I","keyboard key","code-snippets"),J:(0,c._x)("J","keyboard key","code-snippets"),K:(0,c._x)("K","keyboard key","code-snippets"),L:(0,c._x)("L","keyboard key","code-snippets"),M:(0,c._x)("M","keyboard key","code-snippets"),N:(0,c._x)("N","keyboard key","code-snippets"),O:(0,c._x)("O","keyboard key","code-snippets"),P:(0,c._x)("P","keyboard key","code-snippets"),Q:(0,c._x)("Q","keyboard key","code-snippets"),R:(0,c._x)("R","keyboard key","code-snippets"),S:(0,c._x)("S","keyboard key","code-snippets"),T:(0,c._x)("T","keyboard key","code-snippets"),U:(0,c._x)("U","keyboard key","code-snippets"),V:(0,c._x)("V","keyboard key","code-snippets"),W:(0,c._x)("W","keyboard key","code-snippets"),X:(0,c._x)("X","keyboard key","code-snippets"),Y:(0,c._x)("Y","keyboard key","code-snippets"),Z:(0,c._x)("Z","keyboard key","code-snippets"),"/":(0,c._x)("/","keyboard key","code-snippets"),"[":(0,c._x)("]","keyboard key","code-snippets"),"]":(0,c._x)("]","keyboard key","code-snippets")},fl={Cmd:"⌘",Ctrl:"⌃",Alt:"⌥",Shift:"⇧",Tab:"⇥",Up:"↑",Down:"↓",Left:"←",Right:"→"},hl={saveChanges:(0,c.__)("Save changes","code-snippets"),selectAll:(0,c.__)("Select all","code-snippets"),find:(0,c.__)("Begin searching","code-snippets"),findNext:(0,c.__)("Find next","code-snippets"),findPrev:(0,c.__)("Find previous","code-snippets"),replace:(0,c.__)("Replace","code-snippets"),replaceAll:(0,c.__)("Replace all","code-snippets"),findPersistent:(0,c.__)("Persistent search","code-snippets"),toggleComment:(0,c.__)("Toggle comment","code-snippets"),swapLineUp:(0,c.__)("Swap line up","code-snippets"),swapLineDown:(0,c.__)("Swap line down","code-snippets"),autoIndent:(0,c.__)("Auto-indent current line or selection","code-snippets")},ml=(0,Yt.U0)()?["Fn","Ctrl","Alt","Shift","Cmd"]:["Cmd","Ctrl","Shift","Alt","Fn"],bl=function(e){return ml.includes(e)?String(ml.indexOf(e)):e},vl=function(e){var t=e.keys,n=e.keyLabels,r=e.keySymbols;return(0,Ut.jsx)("span",{className:"keyboard-shortcut mac-keyboard-shortcut",children:t.map(function(e){var t,o;return(0,Ut.jsx)("kbd",{children:null!==(t=null!==(o=r[e])&&void 0!==o?o:n[e])&&void 0!==t?t:e},e)})})},gl=(0,c._x)("+","keyboard shortcut separator","code-snippets"),yl=function(e){var t=e.keys,n=e.keyLabels;return(0,Ut.jsx)("span",{className:"keyboard-shortcut pc-keyboard-shortcot",children:t.map(function(e,r){var i;return(0,Ut.jsxs)(o.Fragment,{children:[(0,Ut.jsx)("kbd",{children:null!==(i=n[e])&&void 0!==i?i:e}),r<t.length-1&&(0,Ut.jsx)("span",{className:"shortcut-separator",children:gl})]},e)})})},Ol={"Ctrl-S":"saveChanges","Shift-Tab":"autoIndent"},wl={"Cmd-S":"saveChanges","Shift-Tab":"autoIndent"},xl=function(e){var t=e.editorTheme,n=Bn().codeEditorInstance,r=(0,o.useMemo)(function(){if(n){var e=n.codemirror.getOption("extraKeys"),t=n.codemirror.getOption("keyMap");return function(e){for(var t=new Map,n=0,r=Object.entries(e);n<r.length;n++){var o=(0,i.A)(r[n],2),s=o[0],a=o[1];if("string"==typeof a&&hl[a]){var c=s.split("-");c.sort(function(e,t){return bl(e).localeCompare(bl(t))}),t.set(a,c)}}return t}(pl(pl(pl({},(0,Yt.U0)()?wl:Ol),t&&("string"==typeof(r=t)?ll[r]:r)),"object"===(0,Xt.A)(e)?e:void 0))}var r},[n]);return r?(0,Ut.jsxs)("div",{className:"snippet-editor-help tooltip tooltip-inline tooltip-start",children:[(0,Ut.jsx)("span",{className:"dashicons dashicons-editor-help cm-s-".concat(t),"aria-hidden":"true"}),(0,Ut.jsx)("div",{className:"tooltip-content",children:(0,Ut.jsx)("table",{children:(0,Ut.jsx)("tbody",{children:Object.entries(hl).map(function(e){var t=(0,i.A)(e,2),n=t[0],o=t[1],s=r.get(n);return s?(0,Ut.jsxs)("tr",{children:[(0,Ut.jsx)("td",{children:o}),(0,Ut.jsx)("td",{children:(0,Yt.U0)()?(0,Ut.jsx)(vl,{keys:s,keyLabels:dl,keySymbols:fl}):(0,Ut.jsx)(yl,{keys:s,keyLabels:dl})})]},n):null})})})})]}):null};function jl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Sl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jl(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var _l=function(e){var t,n,r=e.textareaRef,i=e.snippetCodeId,s=(0,o.useId)(),a=Bn(),l=a.snippet,u=a.setSnippet;return(0,Ut.jsxs)("div",{className:"snippet-editor",role:"application","aria-label":(0,c.__)("Code editor","code-snippets"),"aria-describedby":s,children:[(0,Ut.jsx)("p",{id:s,className:"screen-reader-text",children:(0,c.__)("In the editing area, the Tab key enters a tab character. To exit the code editor, press the Escape key and then the Tab key.","code-snippets")}),(0,Ut.jsx)("textarea",{ref:r,id:i,name:"snippet_code",value:l.code,"aria-label":(0,c.__)("Snippet code","code-snippets"),rows:200,spellCheck:!1,onChange:function(e){u(function(t){return Sl(Sl({},t),{},{code:e.target.value})})}}),(0,Ut.jsx)(xl,{editorTheme:null!==(t=null===(n=window.CODE_SNIPPETS_EDIT)||void 0===n?void 0:n.editorTheme)&&void 0!==t?t:"default"})]})},Cl=function(e){var t=e.isExpanded,n=e.setIsExpanded,r=Bn(),i=r.snippet,s=r.setSnippet,a=r.codeEditorInstance,l=r.setCodeEditorInstance,u=Qn().submitSnippet,p=(0,o.useRef)(null),d=(0,o.useId)();return(0,o.useEffect)(function(){l(function(e){return p.current&&!e&&window.wp.codeEditor&&(e=window.wp.codeEditor.initialize(p.current)).codemirror.on("changes",function(e){s(function(t){return Sl(Sl({},t),{},{code:e.getValue()})})}),e})},[l,p,s]),(0,o.useEffect)(function(){if(a){var e,t=null!==(e=a.codemirror.getOption("extraKeys"))&&void 0!==e?e:{},n=(0,Yt.U0)()?"Cmd":"Ctrl",r=function(){u(i).then(function(){}).catch(er)};a.codemirror.setOption("extraKeys",Sl(Sl({},"object"===(0,Xt.A)(t)?t:void 0),{},(0,Jt.A)((0,Jt.A)({},"".concat(n,"-S"),r),"".concat(n,"-Enter"),r)))}},[u,a,i]),(0,Ut.jsxs)("div",{className:"snippet-code-container",children:[(0,Ut.jsxs)("div",{className:"above-snippet-code",children:[(0,Ut.jsx)("label",{htmlFor:d,children:(0,c.__)("Snippet Content","code-snippets")}),(0,Ut.jsxs)(lr,{small:!0,className:"expand-editor-button",onClick:function(){return n(function(e){return!e})},children:[t?(0,Ut.jsx)(Xc,{"aria-hidden":"true"}):(0,Ut.jsx)($c,{"aria-hidden":"true"}),t?(0,c.__)("Minimize","code-snippets"):(0,c.__)("Expand","code-snippets")]})]}),(0,Ut.jsx)(_l,{textareaRef:p,snippetCodeId:d})]})};const El=window.wp.domReady;var Pl=n.n(El);function kl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Al(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kl(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Dl="snippet_description",Rl=[["bold","italic","underline","strikethrough","blockquote","bullist","numlist","alignleft","aligncenter","alignright","link","wp_adv","code_snippets"],["formatselect","forecolor","pastetext","removeformat","charmap","outdent","indent","undo","redo","spellchecker"]],Il=function(){var e,t=Bn(),n=t.snippet,r=t.setSnippet,i=t.isReadOnly,s=(0,o.useCallback)(function(e){return r(function(t){return Al(Al({},t),{},{desc:e})})},[r]);return(0,o.useEffect)(function(){Pl()(function(){return function(e){var t,n;null===(t=window.wp.editor)||void 0===t||t.initialize(Dl,{mediaButtons:null===(n=window.CODE_SNIPPETS_EDIT)||void 0===n?void 0:n.descEditorOptions.mediaButtons,quicktags:!0,tinymce:{toolbar:Rl.map(function(e){return e.join(" ")}),setup:function(t){t.on("change",function(){return e(t.getContent())})}}})}(s)})},[s]),(0,Ut.jsx)("textarea",{id:Dl,"aria-label":(0,c.__)("Snippet description","code-snippets"),className:"wp-editor-area",onChange:function(e){return s(e.target.value)},autoComplete:"off",disabled:i,rows:null===(e=window.CODE_SNIPPETS_EDIT)||void 0===e?void 0:e.descEditorOptions.rows,cols:40,value:n.desc})},Tl=function(){var e;return null!==(e=window.CODE_SNIPPETS_EDIT)&&void 0!==e&&e.enableDescription?(0,Ut.jsxs)("div",{className:"snippet-description-container",children:[(0,Ut.jsx)("label",{htmlFor:Dl,children:(0,c.__)("Description","code-snippets")}),(0,Ut.jsx)(Il,{})]}):null};function Nl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ll(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nl(Object(n),!0).forEach(function(t){(0,Jt.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nl(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ml=function(){var e=Bn(),t=e.snippet,n=e.setSnippet,r=e.isReadOnly;return(0,Ut.jsx)("div",{id:"titlediv",children:(0,Ut.jsxs)("div",{id:"titlewrap",children:[(0,Ut.jsx)("label",{htmlFor:"title",className:"screen-reader-text",id:"snippet-title-label",children:(0,c.__)("Snippet Name","code-snippets")}),(0,Ut.jsx)("input",{id:"title",type:"text",name:"snippet_name",autoComplete:"off",value:t.name,disabled:r,"aria-labelledby":"snippet-title-label",placeholder:(0,c.__)("Enter snippet title","code-snippets"),onChange:function(e){return n(function(t){return Ll(Ll({},t),{},{name:e.target.value})})}})]})})},Fl=window.CODE_SNIPPETS_EDIT,Vl=function(e){return cn(e)?(0,c.__)("Add New Condition","code-snippets"):(0,c.__)("Create New Snippet","code-snippets")},Ul=function(e){return cn(e)?e.locked?(0,c.__)("View Condition","code-snippets"):(0,c.__)("Edit Condition","code-snippets"):e.locked?(0,c.__)("View Snippet","code-snippets"):(0,c.__)("Edit Snippet","code-snippets")},Bl=function(){var e,t=Bn(),n=t.snippet,r=t.updateSnippet,o=t.setCurrentNotice;return(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsxs)("h1",{children:[n.id?(0,Ut.jsxs)(Ut.Fragment,{children:["".concat(Ul(n)," "),(0,Ut.jsx)("a",{href:null===(e=window.CODE_SNIPPETS)||void 0===e?void 0:e.urls.addNew,className:"page-title-action",onClick:function(e){var t;e.preventDefault(),r(function(e){var t=e.scope;return sn({scope:t})}),o(void 0),window.document.title=window.document.title.replace((0,c.__)("Edit Snippet","code-snippets"),Vl(n)).replace((0,c.__)("Edit Condition","code-snippets"),Vl(n)),window.history.pushState({},"",null===(t=window.CODE_SNIPPETS)||void 0===t?void 0:t.urls.addNew)},children:(0,c._x)("Add New","snippet","code-snippets")})]}):Vl(n),(null==Fl?void 0:Fl.pageTitleActions)&&Object.entries(Fl.pageTitleActions).map(function(e){var t=(0,i.A)(e,2),n=t[0],r=t[1];return(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)("a",{href:r,className:"page-title-action",children:n},n)," "]})})]}),(0,Ut.jsx)("hr",{className:"wp-header-end"})]})},Hl=function(e){var t=e.snippet,n=e.isReadOnly,r=e.isExpanded;return a()("snippet-form",r?"snippet-form-expanded":"snippet-form-collapsed","".concat(t.scope,"-snippet"),"".concat(an(t),"-snippet"),"".concat(t.id?"saved":"new","-snippet"),"".concat(t.active?"active":"inactive","-snippet"),{"erroneous-snippet":!!t.code_error,"read-only-snippet":n})},zl=function(e){var t=e.doSubmit,n=e.submitAction,r=e.setSubmitAction,o=e.validationWarning,i=e.setValidationWarning;return(0,Ut.jsx)(nr,{open:void 0!==o,title:(0,c.__)("Snippet incomplete","code-snippets"),confirmLabel:(0,c.__)("Continue","code-snippets"),onCancel:function(){r(void 0),i(void 0)},onConfirm:function(){t(n),r(void 0),i(void 0)},children:(0,Ut.jsx)("p",{children:"".concat(o," ").concat((0,c.__)("Continue?","code-snippets"))})})},Wl=function(e){var t=e.children,n=e.className,r=Qn().submitSnippet,s=Bn().snippet,a=On().refreshSnippetsList,l=(0,o.useState)(),u=(0,i.A)(l,2),p=u[0],d=u[1],f=(0,o.useState)(),h=(0,i.A)(f,2),m=h[0],b=h[1],v=function(e){r(s,e).then(function(e){if(e&&0!==e.id&&window.CODE_SNIPPETS&&window.location.href.includes(window.CODE_SNIPPETS.urls.addNew)){document.title=document.title.replace((0,c.__)("Create New Snippet","code-snippets"),(0,c.__)("Edit Snippet","code-snippets")).replace((0,c.__)("Create New Condition","code-snippets"),(0,c.__)("Edit Condition","code-snippets"));var t=(0,Gt.c$)(window.CODE_SNIPPETS.urls.edit,{id:e.id});window.history.replaceState({},document.title,t)}}).then(a).catch(er)};return(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)("form",{id:"snippet-form",method:"post",onSubmit:function(e){e.preventDefault();var t=Object.values(Kn).find(function(e){var t;return e===(null===(t=document.activeElement)||void 0===t?void 0:t.getAttribute("name"))}),n=function(e){var t=""===e.name.trim(),n=""===e.code.trim();switch(!0){case n&&t:return(0,c.__)("This snippet has no code or title.","code-snippets");case n:return(0,c.__)("This snippet has no snippet code.","code-snippets");case t:return(0,c.__)("This snippet has no title.","code-snippets");default:return}}(s);n?(d(n),b(t)):v(t)},className:n,children:t}),(0,Ut.jsx)(zl,{doSubmit:v,submitAction:m,setSubmitAction:b,validationWarning:p,setValidationWarning:d})]})},$l=function(){var e=Bn().snippet;return cn(e)?(0,Ut.jsx)("div",{id:"snippet_conditions",className:"snippet-condition-editor-container",children:(0,Ut.jsx)("p",{children:(0,c.__)("This snippet type is not supported in this version of Code Snippets.")})}):null},ql=function(){var e=Bn(),t=e.snippet,n=e.isReadOnly,r=e.isDirty,s=(0,o.useState)(!1),a=(0,i.A)(s,2),l=a[0],u=a[1],p=(0,o.useState)(!1),d=(0,i.A)(p,2),f=d[0],h=d[1];return function(e){var t=(0,o.useRef)(window.location.href),n=(0,o.useRef)(!1);(0,o.useEffect)(function(){t.current=window.location.href}),(0,o.useEffect)(function(){var t=function(e){n.current?n.current=!1:(e.preventDefault(),e.returnValue=!0)};return e&&window.addEventListener("beforeunload",t),function(){return window.removeEventListener("beforeunload",t)}},[e]),(0,o.useEffect)(function(){var r=function(){!e||window.confirm((0,c.__)("You have unsaved changes. Leave this page and discard them?","code-snippets"))?(n.current=e,window.location.reload()):window.history.pushState({},document.title,t.current)};return window.addEventListener("popstate",r),function(){return window.removeEventListener("popstate",r)}},[e])}(r),(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)(Bl,{}),(0,Ut.jsx)(La,{placement:"above-form"}),(0,Ut.jsxs)(Wl,{className:Hl({snippet:t,isReadOnly:n,isExpanded:l}),children:[(0,Ut.jsxs)("div",{className:"snippet-form-upper",children:[(0,Ut.jsxs)("div",{className:"snippet-name-wrapper",children:[(0,Ut.jsx)(Ml,{}),(0,Ut.jsx)(Fc,{setIsUpgradeDialogOpen:h})]}),(0,Ut.jsx)(Cl,{isExpanded:l,setIsExpanded:u}),(0,Ut.jsx)($l,{})]}),(0,Ut.jsxs)("div",{className:"snippet-form-lower",children:[(0,Ut.jsx)(ur,{}),(0,Ut.jsx)(Tl,{}),(0,Ut.jsx)(Hc,{})]}),(0,Ut.jsx)(Ac,{setIsUpgradeDialogOpen:h})]}),(0,Ut.jsx)(pr.o,{isOpen:f,setIsOpen:h})]})},Gl=function(){return(0,Ut.jsx)(qt,{children:(0,Ut.jsx)(bn,{children:(0,Ut.jsx)(wn,{children:(0,Ut.jsxs)(zn,{initialSnippet:function(){var e;return sn(null===(e=window.CODE_SNIPPETS_EDIT)||void 0===e?void 0:e.snippet)},children:[(0,Ut.jsx)(rr.M,{}),(0,Ut.jsx)(ql,{})]})})})})};(0,Tt.o)("edit-snippet-container",function(){return(0,Ut.jsx)(Gl,{})})},9028(e,t,n){"use strict";n.d(t,{h:()=>a,o:()=>s});var r=n(1609),o=n(5795),i=n(790),s=function(e,t){var n=document.getElementById(e);n?(0,o.createRoot)(n).render((0,i.jsx)(t,{})):console.error("Could not find element #".concat(e,"."))},a=function(e){var t=(0,r.createContext)(void 0);return[t,function(){var n=(0,r.useContext)(t);if(void 0===n)throw Error("".concat(e," can only be used within a corresponding context provider."));return n}]}},6492(e,t,n){"use strict";n.d(t,{QX:()=>i,U0:()=>o,W9:()=>s,i_:()=>r});var r=function(){var e;return!0===(null===(e=window.pagenow)||void 0===e?void 0:e.endsWith("-network"))},o=function(){return null!==/mac/i.exec(window.navigator.userAgent)},i=function(){var e;return!(null===(e=window.CODE_SNIPPETS)||void 0===e||!e.isLicensed)},s=function(){var e;return!(i()||null!==(e=window.CODE_SNIPPETS)&&void 0!==e&&e.hideUpsell)}},6842(e,t,n){"use strict";n.d(t,{c$:()=>c,ev:()=>s});var r=n(2284),o=n(3453),i=n(3832),s=function(e){if("URLSearchParams"in window){for(var t=new URLSearchParams(window.location.search),n=0,r=Object.entries(e);n<r.length;n++){var i=(0,o.A)(r[n],2),s=i[0],a=i[1];a?t.set(s,String(a)):t.delete(s)}var c=window.location.toString().replace(window.location.search,"?".concat(t.toString()));window.history.replaceState({},document.title,c)}},a=function(e){switch(!0){case null==e:return;case"boolean"==typeof e:return e?"1":"0";case"number"==typeof e:case"string"==typeof e:return String(e);default:throw new Error("Unsupported query arg type: ".concat((0,r.A)(e)))}},c=function(e,t){for(var n={},r=0,s=Object.entries(t);r<s.length;r++){var c=(0,o.A)(s[r],2),l=c[0],u=c[1],p=a(u);void 0!==p&&(n[l]=p)}return(0,i.addQueryArgs)(e,n)}},4146(e,t,n){"use strict";var r=n(4363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function c(e){return r.isMemo(e)?s:a[e.$$typeof]||o}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var l=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var s=u(n);p&&(s=s.concat(p(n)));for(var a=c(t),m=c(n),b=0;b<s.length;++b){var v=s[b];if(!(i[v]||r&&r[v]||m&&m[v]||a&&a[v])){var g=d(n,v);try{l(t,v,g)}catch(e){}}}}return t}},4405(e,t){"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler");Symbol.for("react.provider");var a=Symbol.for("react.consumer"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=Symbol.for("react.client.reference");function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case s:case i:case u:case p:return e;default:switch(e=e&&e.$$typeof){case c:case l:case f:case d:case a:return e;default:return t}}case r:return t}}}t.ContextConsumer=a,t.ContextProvider=c,t.Element=n,t.ForwardRef=l,t.Fragment=o,t.Lazy=f,t.Memo=d,t.Portal=r,t.Profiler=s,t.StrictMode=i,t.Suspense=u,t.SuspenseList=p,t.isContextConsumer=function(e){return b(e)===a},t.isContextProvider=function(e){return b(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return b(e)===l},t.isFragment=function(e){return b(e)===o},t.isLazy=function(e){return b(e)===f},t.isMemo=function(e){return b(e)===d},t.isPortal=function(e){return b(e)===r},t.isProfiler=function(e){return b(e)===s},t.isStrictMode=function(e){return b(e)===i},t.isSuspense=function(e){return b(e)===u},t.isSuspenseList=function(e){return b(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===i||e===u||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===c||e.$$typeof===a||e.$$typeof===l||e.$$typeof===m||void 0!==e.getModuleId)},t.typeOf=b},4363(e,t,n){"use strict";e.exports=n(4405)},1609(e){"use strict";e.exports=window.React},5795(e){"use strict";e.exports=window.ReactDOM},790(e){"use strict";e.exports=window.ReactJSXRuntime},6427(e){"use strict";e.exports=window.wp.components},6087(e){"use strict";e.exports=window.wp.element},7723(e){"use strict";e.exports=window.wp.i18n},3832(e){"use strict";e.exports=window.wp.url},5172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},6993(e,t,n){var r=n(5546);function o(){var t,n,i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",a=i.toStringTag||"@@toStringTag";function c(e,o,i,s){var a=o&&o.prototype instanceof u?o:u,c=Object.create(a.prototype);return r(c,"_invoke",function(e,r,o){var i,s,a,c=0,u=o||[],p=!1,d={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return i=e,s=0,a=t,d.n=n,l}};function f(e,r){for(s=e,a=r,n=0;!p&&c&&!o&&n<u.length;n++){var o,i=u[n],f=d.p,h=i[2];e>3?(o=h===r)&&(a=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=f&&((o=e<2&&f<i[1])?(s=0,d.v=r,d.n=i[1]):f<h&&(o=e<3||i[0]>r||r>h)&&(i[4]=e,i[5]=r,d.n=h,s=0))}if(o||e>1)return l;throw p=!0,r}return function(o,u,h){if(c>1)throw TypeError("Generator is already running");for(p&&1===u&&f(u,h),s=u,a=h;(n=s<2?t:a)||!p;){i||(s?s<3?(s>1&&(d.n=-1),f(s,a)):d.n=a:d.v=a);try{if(c=2,i){if(s||(o="next"),n=i[o]){if(!(n=n.call(i,a)))throw TypeError("iterator result is not an object");if(!n.done)return n;a=n.value,s<2&&(s=0)}else 1===s&&(n=i.return)&&n.call(i),s<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((n=(p=d.n<0)?a:e.call(r,d))!==l)break}catch(e){i=t,s=1,a=e}finally{c=1}}return{value:n,done:p}}}(e,i,s),!0),c}var l={};function u(){}function p(){}function d(){}n=Object.getPrototypeOf;var f=[][s]?n(n([][s]())):(r(n={},s,function(){return this}),n),h=d.prototype=u.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,r(e,a,"GeneratorFunction")),e.prototype=Object.create(h),e}return p.prototype=d,r(h,"constructor",d),r(d,"constructor",p),p.displayName="GeneratorFunction",r(d,a,"GeneratorFunction"),r(h),r(h,a,"Generator"),r(h,s,function(){return this}),r(h,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:c,m}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},5869(e,t,n){var r=n(887);e.exports=function(e,t,n,o,i){var s=r(e,t,n,o,i);return s.next().then(function(e){return e.done?e.value:s.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887(e,t,n){var r=n(6993),o=n(1791);e.exports=function(e,t,n,i,s){return new o(r().w(e,t,n,i),s||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},1791(e,t,n){var r=n(5172),o=n(5546);e.exports=function e(t,n){function i(e,o,s,a){try{var c=t[e](o),l=c.value;return l instanceof r?n.resolve(l.v).then(function(e){i("next",e,s,a)},function(e){i("throw",e,s,a)}):n.resolve(l).then(function(e){c.value=e,s(c)},function(e){return i("throw",e,s,a)})}catch(e){a(e)}}var s;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,r){function o(){return new n(function(t,n){i(e,r,t,n)})}return s=s?s.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},5546(e){function t(n,r,o,i){var s=Object.defineProperty;try{s({},"",{})}catch(n){s=0}e.exports=t=function(e,n,r,o){function i(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?s?s(e,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[n]=r:(i("next",0),i("throw",1),i("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,o,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4373(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4633(e,t,n){var r=n(5172),o=n(6993),i=n(5869),s=n(887),a=n(1791),c=n(4373),l=n(579);function u(){"use strict";var t=o(),n=t.m(u),p=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function d(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))}var f={throw:1,return:2,break:3,continue:3};function h(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,f[e],t)},delegateYield:function(e,o,i){return t.resultName=o,n(r.d,l(e),i)},finish:function(e){return n(r.f,e)}},n=function(e,n,o){r.p=t.prev,r.n=t.next;try{return e(n,o)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=u=function(){return{wrap:function(e,n,r,o){return t.w(h(e),n,r,o&&o.reverse())},isGeneratorFunction:d,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:a,async:function(e,t,n,r,o){return(d(t)?s:i)(h(e),t,n,r,o)},keys:c,values:l}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports},579(e,t,n){var r=n(3738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},3738(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4756(e,t,n){var r=n(4633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},6942(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=s(t,n));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},467(e,t,n){"use strict";function r(e,t,n,r,o,i,s){try{var a=e[i](s),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var s=e.apply(t,n);function a(e){r(s,o,i,a,c,"next",e)}function c(e){r(s,o,i,a,c,"throw",e)}a(void 0)})}}n.d(t,{A:()=>o})},4467(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(9922);function o(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},5501(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(3662);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.A)(e,t)}},3662(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})}},e=>{e(e.s=3203)}]);