File: /var/www/clients/client1/web95/web/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],{896:(e,t,n)=>{"use strict";var r={};n.r(r),n.d(r,{hasBrowserEnv:()=>xe,hasStandardBrowserEnv:()=>Se,hasStandardBrowserWebWorkerEnv:()=>Ee,navigator:()=>je,origin:()=>_e});var o=n(1609),i=n(5338),s=n(3453),a=n(6942),c=n.n(a);const u=window.wp.i18n,l=window.wp.url;var p=n(3145),d=n(7800);function f(e){return function(e){if(Array.isArray(e))return(0,p.A)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,d.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.")}()}function h(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 m(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function s(e){h(i,r,o,s,a,"next",e)}function a(e){h(i,r,o,s,a,"throw",e)}s(void 0)}))}}var v=n(4756),b=n.n(v);function g(e,t){return function(){return e.apply(t,arguments)}}const{toString:y}=Object.prototype,{getPrototypeOf:w}=Object,O=(x=Object.create(null),e=>{const t=y.call(e);return x[t]||(x[t]=t.slice(8,-1).toLowerCase())});var x;const j=e=>(e=e.toLowerCase(),t=>O(t)===e),S=e=>t=>typeof t===e,{isArray:E}=Array,_=S("undefined"),C=j("ArrayBuffer"),P=S("string"),k=S("function"),A=S("number"),R=e=>null!==e&&"object"==typeof e,D=e=>{if("object"!==O(e))return!1;const t=w(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},I=j("Date"),T=j("File"),N=j("Blob"),L=j("FileList"),M=j("URLSearchParams"),[F,V,U,B]=["ReadableStream","Request","Response","Headers"].map(j);function H(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),E(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{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){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:global,$=e=>!_(e)&&e!==W,q=(G="undefined"!=typeof Uint8Array&&w(Uint8Array),e=>G&&e instanceof G);var G;const J=j("HTMLFormElement"),K=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),X=j("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=j("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:E,isArrayBuffer:C,isBuffer:function(e){return null!==e&&!_(e)&&null!==e.constructor&&!_(e.constructor)&&k(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},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&&C(e.buffer),t},isString:P,isNumber:A,isBoolean:e=>!0===e||!1===e,isObject:R,isPlainObject:D,isReadableStream:F,isRequest:V,isResponse:U,isHeaders:B,isUndefined:_,isDate:I,isFile:T,isBlob:N,isRegExp:X,isFunction:k,isStream:e=>R(e)&&k(e.pipe),isURLSearchParams:M,isTypedArray:q,isFileList:L,forEach:H,merge:function e(){const{caseless:t}=$(this)&&this||{},n={},r=(r,o)=>{const i=t&&z(n,o)||o;D(n[i])&&D(r)?n[i]=e(n[i],r):D(r)?n[i]=e({},r):E(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&H(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(H(t,((t,r)=>{n&&k(t)?e[r]=g(t,n):e[r]=t}),{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),e.prototype.constructor=e,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&&w(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:O,kindOfTest:j,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(E(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[Symbol.iterator]).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:J,hasOwnProperty:K,hasOwnProp:K,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 E(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[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(R(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=E(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&&(R(e)||k(e))&&k(e.then)&&k(e.catch),setImmediate:Q,asap:ne};function oe(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}re.inherits(oe,Error,{toJSON:function(){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}}});const ie=oe.prototype,se={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{se[e]={value:e}})),Object.defineProperties(oe,se),Object.defineProperty(ie,"isAxiosError",{value:!0}),oe.from=(e,t,n,r,o,i)=>{const s=Object.create(ie);return re.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),oe.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const ae=oe;function ce(e){return re.isPlainObject(e)||re.isArray(e)}function ue(e){return re.endsWith(e,"[]")?e.slice(0,-2):e}function le(e,t,n){return e?e.concat(t).map((function(e,t){return e=ue(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const pe=re.toFlatObject(re,{},null,(function(e){return/^is[A-Z]/.test(e)})),de=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||u,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(!a&&re.isBlob(e))throw new ae("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 u(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(ce)}(e)||(re.isFileList(e)||re.endsWith(n,"[]"))&&(a=re.toArray(e)))return n=ue(n),a.forEach((function(e,r){!re.isUndefined(e)&&null!==e&&t.append(!0===s?le([n],r,i):null===s?n:n+"[]",c(e))})),!1;return!!ce(e)||(t.append(le(o,n,i),c(e)),!1)}const l=[],p=Object.assign(pe,{defaultVisitor:u,convertValue:c,isVisitable:ce});if(!re.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!re.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.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])})),l.pop()}}(e),t};function fe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function he(e,t){this._pairs=[],e&&de(e,this,t)}const me=he.prototype;me.append=function(e,t){this._pairs.push([e,t])},me.toString=function(e){const t=e?function(t){return e.call(this,t,fe)}:fe;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ve=he;function be(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ge(e,t,n){if(!t)return e;const r=n&&n.encode||be;re.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):re.isURLSearchParams(t)?t.toString():new ve(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const ye=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)}))}},we={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Oe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ve,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},xe="undefined"!=typeof window&&"undefined"!=typeof document,je="object"==typeof navigator&&navigator||void 0,Se=xe&&(!je||["ReactNative","NativeScript","NS"].indexOf(je.product)<0),Ee="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,_e=xe&&window.location.href||"http://localhost",Ce={...r,...Oe},Pe=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},ke={transitional:we,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(Pe(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 de(e,new Ce.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Ce.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 de(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||ke.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)}catch(e){if(n){if("SyntaxError"===e.name)throw ae.from(e,ae.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:Ce.classes.FormData,Blob:Ce.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=>{ke.headers[e]={}}));const Ae=ke,Re=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"]),De=Symbol("internals");function Ie(e){return e&&String(e).trim().toLowerCase()}function Te(e){return!1===e||null==e?e:re.isArray(e)?e.map(Te):String(e)}function Ne(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 Le{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Ie(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]=Te(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]&&Re[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.isHeaders(e))for(const[t,r]of e.entries())o(r,t,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=Ie(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=Ie(e)){const n=re.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ne(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Ie(e)){const o=re.findKey(n,e);!o||t&&!Ne(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&&!Ne(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]=Te(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]=Te(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")}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[De]=this[De]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Ie(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}}Le.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),re.reduceDescriptors(Le.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),re.freezeMethods(Le);const Me=Le;function Fe(e,t){const n=this||Ae,r=t||n,o=Me.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 Ve(e){return!(!e||!e.__CANCEL__)}function Ue(e,t,n){ae.call(this,null==e?"canceled":e,ae.ERR_CANCELED,t,n),this.name="CanceledError"}re.inherits(Ue,ae,{__CANCEL__:!0});const Be=Ue;function He(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new ae("Request failed with status code "+n.status,[ae.ERR_BAD_REQUEST,ae.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const ze=(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(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,p=0;for(;l!==i;)p+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const d=u&&c-u;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.apply(null,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)},We=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},$e=e=>(...t)=>re.asap((()=>e(...t))),qe=Ce.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ce.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ce.origin),Ce.navigator&&/(msie|trident)/i.test(Ce.navigator.userAgent)):()=>!0,Ge=Ce.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];re.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),re.isString(r)&&s.push("path="+r),re.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Je(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ke=e=>e instanceof Me?{...e}:e;function Xe(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(Ke(e),Ke(t),0,!0)};return re.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=c[r]||o,s=i(e[r],t[r],r);re.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Ye=e=>{const t=Xe({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=Me.from(a),t.url=ge(Je(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),re.isFormData(r))if(Ce.hasStandardBrowserEnv||Ce.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(Ce.hasStandardBrowserEnv&&(o&&re.isFunction(o)&&(o=o(t)),o||!1!==o&&qe(t.url))){const e=i&&s&&Ge.read(s);e&&a.set(i,e)}return t},Ze="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Ye(e);let o=r.data;const i=Me.from(r.headers).normalize();let s,a,c,u,l,{responseType:p,onUploadProgress:d,onDownloadProgress:f}=r;function h(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function v(){if(!m)return;const r=Me.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());He((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=v:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(v)},m.onabort=function(){m&&(n(new ae("Request aborted",ae.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new ae("Network Error",ae.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||we;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new ae(t,o.clarifyTimeoutError?ae.ETIMEDOUT:ae.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,l]=ze(f,!0),m.addEventListener("progress",c)),d&&m.upload&&([a,u]=ze(d),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(s=t=>{m&&(n(!t||t.type?new Be(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 b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===Ce.protocols.indexOf(b)?n(new ae("Unsupported protocol "+b+":",ae.ERR_BAD_REQUEST,e)):m.send(o||null)}))},Qe=(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 ae?t:new Be(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new ae(`timeout ${t} of ms exceeded`,ae.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}},et=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},tt=(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*et(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})},nt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,rt=nt&&"function"==typeof ReadableStream,ot=nt&&("function"==typeof TextEncoder?(it=new TextEncoder,e=>it.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var it;const st=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},at=rt&&st((()=>{let e=!1;const t=new Request(Ce.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),ct=rt&&st((()=>re.isReadableStream(new Response("").body))),ut={stream:ct&&(e=>e.body)};var lt;nt&&(lt=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!ut[e]&&(ut[e]=re.isFunction(lt[e])?t=>t[e]():(t,n)=>{throw new ae(`Response type '${e}' is not supported`,ae.ERR_NOT_SUPPORT,n)})})));const pt=nt&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:p="same-origin",fetchOptions:d}=Ye(e);u=u?(u+"").toLowerCase():"text";let f,h=Qe([o,i&&i.toAbortSignal()],s);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(c&&at&&"get"!==n&&"head"!==n&&0!==(v=await(async(e,t)=>{const n=re.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(re.isBlob(e))return e.size;if(re.isSpecCompliantForm(e)){const t=new Request(Ce.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 ot(e)).byteLength:void 0)})(t):n})(l,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(re.isFormData(r)&&(e=n.headers.get("content-type"))&&l.setContentType(e),n.body){const[e,t]=We(v,ze($e(c)));r=tt(n.body,65536,e,t)}}re.isString(p)||(p=p?"include":"omit");const o="credentials"in Request.prototype;f=new Request(t,{...d,signal:h,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:o?p:void 0});let i=await fetch(f);const s=ct&&("stream"===u||"response"===u);if(ct&&(a||s&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=re.toFiniteNumber(i.headers.get("content-length")),[n,r]=a&&We(t,ze($e(a),!0))||[];i=new Response(tt(i.body,65536,n,(()=>{r&&r(),m&&m()})),e)}u=u||"text";let b=await ut[re.findKey(ut,u)||"text"](i,e);return!s&&m&&m(),await new Promise(((t,n)=>{He(t,n,{data:b,headers:Me.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:f})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new ae("Network Error",ae.ERR_NETWORK,e,f),{cause:t.cause||t});throw ae.from(t,t&&t.code,e,f)}}),dt={http:null,xhr:Ze,fetch:pt};re.forEach(dt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const ft=e=>`- ${e}`,ht=e=>re.isFunction(e)||null===e||!1===e,mt=e=>{e=re.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!ht(n)&&(r=dt[(t=String(n)).toLowerCase()],void 0===r))throw new ae(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(ft).join("\n"):" "+ft(e[0]):"as no adapter specified";throw new ae("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function vt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Be(null,e)}function bt(e){return vt(e),e.headers=Me.from(e.headers),e.data=Fe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),mt(e.adapter||Ae.adapter)(e).then((function(t){return vt(e),t.data=Fe.call(e,e.transformResponse,t),t.headers=Me.from(t.headers),t}),(function(t){return Ve(t)||(vt(e),t&&t.response&&(t.response.data=Fe.call(e,e.transformResponse,t.response),t.response.headers=Me.from(t.response.headers))),Promise.reject(t)}))}const gt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{gt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const yt={};gt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new ae(r(o," has been removed"+(t?" in "+t:"")),ae.ERR_DEPRECATED);return t&&!yt[o]&&(yt[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)}},gt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const wt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new ae("options must be an object",ae.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 ae("option "+i+" must be "+n,ae.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ae("Unknown option "+i,ae.ERR_BAD_OPTION)}},validators:gt},Ot=wt.validators;class xt{constructor(e){this.defaults=e,this.interceptors={request:new ye,response:new ye}}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=Xe(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&wt.assertOptions(n,{silentJSONParsing:Ot.transitional(Ot.boolean),forcedJSONParsing:Ot.transitional(Ot.boolean),clarifyTimeoutError:Ot.transitional(Ot.boolean)},!1),null!=r&&(re.isFunction(r)?t.paramsSerializer={serialize:r}:wt.assertOptions(r,{encode:Ot.function,serialize:Ot.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),wt.assertOptions(t,{baseUrl:Ot.spelling("baseURL"),withXsrfToken:Ot.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=Me.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,p=0;if(!a){const e=[bt.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);p<l;)u=u.then(e[p++],e[p++]);return u}l=s.length;let d=t;for(p=0;p<l;){const e=s[p++],t=s[p++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=bt.call(this,d)}catch(e){return Promise.reject(e)}for(p=0,l=c.length;p<l;)u=u.then(c[p++],c[p++]);return u}getUri(e){return ge(Je((e=Xe(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}re.forEach(["delete","get","head","options"],(function(e){xt.prototype[e]=function(t,n){return this.request(Xe(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(Xe(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}xt.prototype[e]=t(),xt.prototype[e+"Form"]=t(!0)}));const jt=xt;class St{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 Be(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 St((function(t){e=t})),cancel:e}}}const Et=St,_t={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};Object.entries(_t).forEach((([e,t])=>{_t[t]=e}));const Ct=_t,Pt=function e(t){const n=new jt(t),r=g(jt.prototype.request,n);return re.extend(r,jt.prototype,n,{allOwnKeys:!0}),re.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Xe(t,n))},r}(Ae);Pt.Axios=jt,Pt.CanceledError=Be,Pt.CancelToken=Et,Pt.isCancel=Ve,Pt.VERSION="1.8.4",Pt.toFormData=de,Pt.AxiosError=ae,Pt.Cancel=Pt.CanceledError,Pt.all=function(e){return Promise.all(e)},Pt.spread=function(e){return function(t){return e.apply(null,t)}},Pt.isAxiosError=function(e){return re.isObject(e)&&!0===e.isAxiosError},Pt.mergeConfig=Xe,Pt.AxiosHeaders=Me,Pt.formToJSON=e=>Pe(re.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=mt,Pt.HttpStatusCode=Ct,Pt.default=Pt;const kt=Pt;var At,Rt,Dt,It,Tt,Nt,Lt=function(e){var t=(0,o.createContext)(void 0);return[t,function(){var n=(0,o.useContext)(t);if(void 0===n)throw Error("use".concat(e," can only be used within a ").concat(e," context provider."));return n}]},Mt=function(e,t){return t===e.charAt(e.length-1)?e.slice(0,-1):e},Ft=(Mt(null!==(At=null===(Rt=window.CODE_SNIPPETS)||void 0===Rt?void 0:Rt.restAPI.base)&&void 0!==At?At:"","/"),Mt(null!==(Dt=null===(It=window.CODE_SNIPPETS)||void 0===It?void 0:It.restAPI.snippets)&&void 0!==Dt?Dt:"","/")),Vt={headers:{"X-WP-Nonce":null===(Tt=window.CODE_SNIPPETS)||void 0===Tt?void 0:Tt.restAPI.nonce,"Access-Control":null===(Nt=window.CODE_SNIPPETS)||void 0===Nt?void 0:Nt.restAPI.localToken}},Ut=n(2284),Bt=n(9922);function Ht(e,t,n){return(t=(0,Bt.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zt={php:["global","admin","front-end","single-use"],html:["content","head-content","footer-content"],css:["admin-css","site-css"],js:["site-head-js","site-footer-js"],cond:["condition"]},Wt=function(){return window.pagenow.endsWith("-network")},$t=function(){return null!==/mac/i.exec(window.navigator.userAgent)},qt=function(){var e;return!(null===(e=window.CODE_SNIPPETS)||void 0===e||!e.isLicensed)};function Gt(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 Jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gt(Object(n),!0).forEach((function(t){Ht(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Kt={id:0,name:"",code:"",desc:"",scope:"global",modified:"",active:!1,network:Wt(),shared_network:null,priority:10,conditionId:0},Xt=function(e){return"number"==typeof e&&0<e},Yt=new Set(["css","js","cond"]),Zt=function(e){return function(e){var t,n,r,o=Jt(Jt({},Kt),{},{tags:[]});return"object"!==(0,Ut.A)(e)||null===e?o:Jt(Jt(Jt(Jt(Jt(Jt(Jt(Jt(Jt(Jt(Jt(Jt(Jt({},o),"id"in e&&Xt(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(zt).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}),"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}),"condition_id"in e&&Xt(e.condition_id)&&{conditionId:e.condition_id})}(e)},Qt=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"}},en=function(e){return"condition"===e.scope},tn=function(e){return Yt.has(e)},nn=function(e,t){var n=e.id,r=e.network;return(0,l.addQueryArgs)([Ft,n,t].filter(Boolean).join("/"),{network:!!r||void 0})},rn=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,condition_id:e.conditionId}},on=n(4848),sn=function(){var e=m(b().mark((function e(t,n,r,o){var i,s;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=console).debug.apply(i,["".concat(t," ").concat(n)].concat(f(o?[o]:[]))),e.next=3,r;case 3:return s=e.sent,console.debug("Response",s),e.abrupt("return",s.data);case 6:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}(),an=Lt("RestAPI"),cn=(0,s.A)(an,2),un=cn[0],ln=cn[1],pn=function(e){var t=e.children,n=(0,o.useMemo)((function(){return kt.create(Vt)}),[]),r=(0,o.useMemo)((function(){return function(e){return{get:function(t){return sn("GET",t,e.get(t))},post:function(t,n){return sn("POST",t,e.post(t,n),n)},del:function(t){return sn("DELETE",t,e.delete(t))},put:function(t,n){return sn("PUT",t,e.put(t,n),n)}}}(n)}),[n]),i=(0,o.useMemo)((function(){return t=(e=r).get,n=e.post,o=e.del,i=e.put,{fetchAll:function(e){return t((0,l.addQueryArgs)(Ft,{network:e})).then((function(e){return e.map(Zt)}))},fetch:function(e,n){return t((0,l.addQueryArgs)("".concat(Ft,"/").concat(e),{network:n})).then(Zt)},create:function(e){return n(Ft,rn(e)).then(Zt)},update:function(e){return n(e.id?nn(e):Ft,rn(e)).then(Zt)},delete:function(e){return o(nn(e))},activate:function(e){return n(nn(e,"activate")).then(Zt)},deactivate:function(e){return n(nn(e,"deactivate")).then(Zt)},export:function(e){return t(nn(e,"export"))},exportCode:function(e){return t(nn(e,"export-code"))},attach:function(e){return i(nn(e,"attach"),{condition_id:e.conditionId})},detach:function(e){return i(nn(e,"detach"))}};var e,t,n,o,i}),[r]),s={api:r,snippetsAPI:i,axiosInstance:n};return(0,on.jsx)(un.Provider,{value:s,children:t})},dn=Lt("SnippetsList"),fn=(0,s.A)(dn,2),hn=fn[0],mn=fn[1],vn=function(e){var t=e.children,n=ln().snippetsAPI.fetchAll,r=(0,o.useState)(),i=(0,s.A)(r,2),a=i[0],c=i[1],u=(0,o.useCallback)(m(b().mark((function e(){var t;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,console.info("Fetching snippets list"),e.next=4,n(Wt());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(){u().catch((function(){}))}),[u]);var l={snippetsList:a,refreshSnippetsList:u};return(0,on.jsx)(hn.Provider,{value:l,children:t})};const{Axios:bn,AxiosError:gn,CanceledError:yn,isCancel:wn,CancelToken:On,VERSION:xn,all:jn,Cancel:Sn,isAxiosError:En,spread:_n,toFormData:Cn,AxiosHeaders:Pn,HttpStatusCode:kn,formToJSON:An,getAdapter:Rn,mergeConfig:Dn}=kt;var In=Lt("SnippetForm"),Tn=(0,s.A)(In,2),Nn=Tn[0],Ln=Tn[1],Mn=function(e){var t=e.children,n=e.initialSnippet,r=(0,o.useState)(n),i=(0,s.A)(r,2),a=i[0],c=i[1],u=(0,o.useState)(!1),l=(0,s.A)(u,2),p=l[0],d=l[1],f=(0,o.useState)(),h=(0,s.A)(f,2),m=h[0],v=h[1],b=(0,o.useState)(),g=(0,s.A)(b,2),y=g[0],w=g[1],O=(0,o.useMemo)((function(){return!qt()&&function(e){return Yt.has(Qt(e))}({scope:a.scope})}),[a.scope]),x=(0,o.useCallback)((function(e,t){console.error("Request failed",e),d(!1),v(["error",[t,En(e)?e.message:""].filter(Boolean).join(" ")])}),[d,v]),j=(0,o.useCallback)((function(e){c((function(t){var n,r="object"===(0,Ut.A)(e)?e:e(t);return null==y||y.codemirror.setValue(r.code),null===(n=window.tinymce)||void 0===n||n.activeEditor.setContent(r.desc),r}))}),[null==y?void 0:y.codemirror]),S={snippet:a,isWorking:p,isReadOnly:O,setSnippet:c,setIsWorking:d,updateSnippet:j,currentNotice:m,setCurrentNotice:v,codeEditorInstance:y,handleRequestError:x,setCodeEditorInstance:w};return(0,on.jsx)(Nn.Provider,{value:S,children:t})};function Fn(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 Vn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fn(Object(n),!0).forEach((function(t){Ht(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Un={addNew:(0,u.__)("Add New Snippet","code-snippets"),edit:(0,u.__)("Edit Snippet","code-snippets"),created:(0,u.__)("Snippet <strong>created</strong>.","code-snippets"),updated:(0,u.__)("Snippet <strong>updated</strong>.","code-snippets"),createdActivated:(0,u.__)("Snippet <strong>created</strong> and <strong>activated</strong>.","code-snippets"),updatedActivated:(0,u.__)("Snippet <strong>updated</strong> and <strong>activated</strong>.","code-snippets"),updatedDeactivated:(0,u.__)("Snippet <strong>updated</strong> and <strong>deactivated</strong>"),updatedExecuted:(0,u.__)("Snippet <strong>updated</strong> and <strong>executed</strong>.","code-snippets"),failedCreate:(0,u.__)("Could not create snippet.","code-snippets"),failedUpdate:(0,u.__)("Could not update snippet.","code-snippets")},Bn=(0,u.__)("Condition <strong>created</strong>.","code-snippets"),Hn=(0,u.__)("Condition <strong>updated</strong>.","code-snippets"),zn={addNew:(0,u.__)("Add New Condition","code-snippets"),edit:(0,u.__)("Edit Condition","code-snippets"),created:Bn,updated:Hn,createdActivated:Bn,updatedActivated:Hn,updatedDeactivated:Hn,updatedExecuted:Hn,failedCreate:(0,u.__)("Could not create condition.","code-snippets"),failedUpdate:(0,u.__)("Could not update condition.","code-snippets")},Wn=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}({}),$n=function(e,t,n){var r="condition"===e.scope?zn:Un,o=0===e.id;switch(n){case Wn.SAVE:return o?r.created:r.updated;case Wn.SAVE_AND_EXECUTE:return r.updatedExecuted;case Wn.SAVE_AND_ACTIVATE:return"single-use"===t.scope?r.updatedExecuted:o?r.createdActivated:r.updatedActivated;case Wn.SAVE_AND_DEACTIVATE:return r.updatedDeactivated}},qn=Ht(Ht(Ht(Ht({},Wn.SAVE,{}),Wn.SAVE_AND_ACTIVATE,{active:!0}),Wn.SAVE_AND_DEACTIVATE,{active:!1}),Wn.SAVE_AND_EXECUTE,{active:!0}),Gn=function(){var e=ln().snippetsAPI,t=Ln(),n=t.setIsWorking,r=t.setCurrentNotice,i=t.snippet,s=t.setSnippet,a=(0,o.useCallback)(m(b().mark((function t(){var o,a,c,p,d,f=arguments;return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=f.length>0&&void 0!==f[0]?f[0]:Wn.SAVE,r(void 0),t.next=4,m(b().mark((function t(){var r,s;return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,r=Vn(Vn({},i),qn[o]),t.next=4,0===r.id?e.create(r):e.update(r);case 4:return s=t.sent,n(!1),t.abrupt("return",s.id?s:void 0);case 9:return t.prev=9,t.t0=t.catch(0),n(!1),t.abrupt("return",En(t.t0)?t.t0.message:void 0);case 13:case"end":return t.stop()}}),t,null,[[0,9]])})))();case 4:if(a=t.sent,c=en(i)?zn:Un,void 0!==a&&"string"!=typeof a){t.next=12;break}return p=[i.id?c.failedUpdate:c.failedCreate,null!=a?a:(0,u.__)("The server did not send a valid response.","code-snippets")],r(["error",p.filter(Boolean).join(" ")]),t.abrupt("return",void 0);case 12:return s(Zt(a)),r(["updated",$n(i,a,o)]),i.id&&a.id&&(window.document.title=window.document.title.replace(Un.addNew,c.edit),window.history.replaceState({},"",(0,l.addQueryArgs)(null===(d=window.CODE_SNIPPETS)||void 0===d?void 0:d.urls.edit,{id:a.id}))),t.abrupt("return",a);case 16:case"end":return t.stop()}}),t)}))),[e,n,r,i,s]);return{submitSnippet:a}},Jn=function(e){console.error(e)};const Kn=window.wp.components;var Xn=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,u.__)("OK","code-snippets"):s,c=e.cancelLabel,l=void 0===c?(0,u.__)("Cancel","code-snippets"):c,p=e.confirmButtonClassName;return t?(0,on.jsxs)(Kn.Modal,{title:n,onRequestClose:o,closeButtonLabel:l,isDismissible:!0,onKeyDown:function(e){"Enter"===e.key&&(null==r||r())},children:[i,(0,on.jsxs)(Kn.Flex,{direction:"row",justify:"flex-end",children:[(0,on.jsx)(Kn.Button,{variant:"tertiary",onClick:o,children:l}),(0,on.jsx)(Kn.Button,{variant:"primary",onClick:r,className:p,children:a})]})]}):null};const Yn=window.wp.element;var Zn=function(e){var t,n=e.isOpen,r=e.setIsOpen;return n?(0,on.jsxs)(Kn.Modal,{title:"",className:"code-snippets-upsell-dialog",onRequestClose:function(){r(!1)},children:[(0,on.jsx)("img",{src:"".concat(null===(t=window.CODE_SNIPPETS)||void 0===t?void 0:t.urls.plugin,"/assets/icon.svg"),alt:(0,u.__)("Code Snippets logo","code-snippets")}),(0,on.jsx)("h1",{children:(0,Yn.createInterpolateElement)((0,u.__)("Unlock all cloud sync features and many more, with <span>Code Snippets Pro</span>","code-snippets"),{span:(0,on.jsx)("span",{})})}),(0,on.jsx)("p",{children:(0,Yn.createInterpolateElement)((0,u.__)("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,on.jsx)("strong",{})})}),(0,on.jsx)("a",{href:"https://codesnippets.pro/pricing/",className:"button button-primary button-large",rel:"noreferrer",target:"_blank",children:(0,u.__)("Explore Code Snippets Pro","code-snippets")}),(0,on.jsx)("h2",{children:(0,u.__)("Here's what else you get with Pro:","code-snippets")}),(0,on.jsxs)("ul",{children:[(0,on.jsx)("li",{children:(0,u.__)("Create, explain and verify snippets with AI","code-snippets")}),(0,on.jsx)("li",{children:(0,u.__)("Control when snippets run with Conditions","code-snippets")}),(0,on.jsx)("li",{children:(0,u.__)("CSS stylesheet snippets","code-snippets")}),(0,on.jsx)("li",{children:(0,u.__)("Minified JavaScript snippets","code-snippets")}),(0,on.jsx)("li",{children:(0,u.__)("Editor blocks and Elementor widgets","code-snippets")}),(0,on.jsx)("li",{children:(0,u.__)("Cloud sync and backup","code-snippets")}),(0,on.jsx)("li",{children:(0,u.__)("Cloud share and deploy","code-snippets")}),(0,on.jsx)("li",{children:(0,u.__)("Cloud bundles and teams","code-snippets")}),(0,on.jsx)("li",{children:(0,u.__)("WP-CLI commands","code-snippets")}),(0,on.jsx)("li",{children:(0,u.__)("And much more!","code-snippets")})]})]}):null},Qn={cond:"randomize",cloud:"cloud",bundles:"screenoptions",cloud_search:"search"},er=function(e){var t=e.name,n=e.small,r=e.inverted,o=e.children;return(0,on.jsx)("span",{className:c()("badge","".concat(t,"-badge"),{"small-badge":n,"inverted-badge":r}),children:Qn[t]?(0,on.jsx)("span",{className:"dashicons dashicons-".concat(Qn[t])}):null!=o?o:t})};function tr(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(t.includes(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],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var nr=["id","children","className","name","primary","secondary","small","large","link","type","onClick"];function rr(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 or(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rr(Object(n),!0).forEach((function(t){Ht(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ir=function(e){var t=e.id,n=e.children,r=e.className,o=e.name,i=e.primary,s=void 0!==i&&i,a=e.secondary,u=void 0!==a&&a,l=e.small,p=void 0!==l&&l,d=e.large,f=void 0!==d&&d,h=e.link,m=void 0!==h&&h,v=e.type,b=void 0===v?"button":v,g=e.onClick,y=tr(e,nr);return(0,on.jsx)("button",or(or({id:null!=t?t:o,name:o,type:b},y),{},{onClick:function(e){g&&(e.preventDefault(),g(e))},className:c()("button",r,{"button-primary":s,"button-secondary":u,"button-large":f,"button-small":p,"button-link":m}),children:n}))},sr=function(e){var t=e.setIsDialogOpen,n=Ln(),r=n.snippet,o=n.isReadOnly,i=0!==r.conditionId;return(0,on.jsx)("div",{className:c()("conditions-editor-open block-form-field",i?"has-condition":"no-condition"),children:en(r)?null:(0,on.jsxs)(on.Fragment,{children:[(0,on.jsxs)("h4",{children:[(0,u.__)("Conditions","code-snippets"),(0,on.jsx)(er,{name:"beta",small:!0,children:(0,u.__)("beta","code-snippets")}),!qt()&&(0,on.jsx)(er,{name:"pro",small:!0,children:(0,u.__)("Pro","code-snippets")})]}),(0,on.jsxs)(ir,{large:!0,disabled:o,onClick:function(){return t(!0)},children:[(0,on.jsx)(er,{name:"cond",small:!0}),i?(0,u.__)("Edit Conditions","code-snippets"):(0,u.__)("Add Conditions","code-snippets")]})]})})};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){Ht(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 ur=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function lr(){return lr=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},lr.apply(null,arguments)}var pr=n(3029),dr=n(2901),fr=n(5501);function hr(e){return hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hr(e)}function mr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(mr=function(){return!!e})()}var vr=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}(),br=Math.abs,gr=String.fromCharCode,yr=Object.assign;function wr(e){return e.trim()}function Or(e,t,n){return e.replace(t,n)}function xr(e,t){return e.indexOf(t)}function jr(e,t){return 0|e.charCodeAt(t)}function Sr(e,t,n){return e.slice(t,n)}function Er(e){return e.length}function _r(e){return e.length}function Cr(e,t){return t.push(e),e}var Pr=1,kr=1,Ar=0,Rr=0,Dr=0,Ir="";function Tr(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Pr,column:kr,length:s,return:""}}function Nr(e,t){return yr(Tr("",null,null,"",null,null,0),e,{length:-e.length},t)}function Lr(){return Dr=Rr>0?jr(Ir,--Rr):0,kr--,10===Dr&&(kr=1,Pr--),Dr}function Mr(){return Dr=Rr<Ar?jr(Ir,Rr++):0,kr++,10===Dr&&(kr=1,Pr++),Dr}function Fr(){return jr(Ir,Rr)}function Vr(){return Rr}function Ur(e,t){return Sr(Ir,e,t)}function Br(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 Hr(e){return Pr=kr=1,Ar=Er(Ir=e),Rr=0,[]}function zr(e){return Ir="",e}function Wr(e){return wr(Ur(Rr-1,Gr(91===e?e+2:40===e?e+1:e)))}function $r(e){for(;(Dr=Fr())&&Dr<33;)Mr();return Br(e)>2||Br(Dr)>3?"":" "}function qr(e,t){for(;--t&&Mr()&&!(Dr<48||Dr>102||Dr>57&&Dr<65||Dr>70&&Dr<97););return Ur(e,Vr()+(t<6&&32==Fr()&&32==Mr()))}function Gr(e){for(;Mr();)switch(Dr){case e:return Rr;case 34:case 39:34!==e&&39!==e&&Gr(Dr);break;case 40:41===e&&Gr(e);break;case 92:Mr()}return Rr}function Jr(e,t){for(;Mr()&&e+Dr!==57&&(e+Dr!==84||47!==Fr()););return"/*"+Ur(t,Rr-1)+"*"+gr(47===e?e:Mr())}function Kr(e){for(;!Br(Fr());)Mr();return Ur(e,Rr)}var Xr="-ms-",Yr="-moz-",Zr="-webkit-",Qr="comm",eo="rule",to="decl",no="@keyframes";function ro(e,t){for(var n="",r=_r(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function oo(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case to:return e.return=e.return||e.value;case Qr:return"";case no:return e.return=e.value+"{"+ro(e.children,r)+"}";case eo:e.value=e.props.join(",")}return Er(n=ro(e.children,r))?e.return=e.value+"{"+n+"}":""}function io(e){return zr(so("",null,null,null,[""],e=Hr(e),0,[0],e))}function so(e,t,n,r,o,i,s,a,c){for(var u=0,l=0,p=s,d=0,f=0,h=0,m=1,v=1,b=1,g=0,y="",w=o,O=i,x=r,j=y;v;)switch(h=g,g=Mr()){case 40:if(108!=h&&58==jr(j,p-1)){-1!=xr(j+=Or(Wr(g),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:j+=Wr(g);break;case 9:case 10:case 13:case 32:j+=$r(h);break;case 92:j+=qr(Vr()-1,7);continue;case 47:switch(Fr()){case 42:case 47:Cr(co(Jr(Mr(),Vr()),t,n),c);break;default:j+="/"}break;case 123*m:a[u++]=Er(j)*b;case 125*m:case 59:case 0:switch(g){case 0:case 125:v=0;case 59+l:-1==b&&(j=Or(j,/\f/g,"")),f>0&&Er(j)-p&&Cr(f>32?uo(j+";",r,n,p-1):uo(Or(j," ","")+";",r,n,p-2),c);break;case 59:j+=";";default:if(Cr(x=ao(j,t,n,u,l,o,a,y,w=[],O=[],p),i),123===g)if(0===l)so(j,t,x,x,w,i,p,a,O);else switch(99===d&&110===jr(j,3)?100:d){case 100:case 108:case 109:case 115:so(e,x,x,r&&Cr(ao(e,x,x,0,0,o,a,y,o,w=[],p),O),o,O,p,a,r?w:O);break;default:so(j,x,x,x,[""],O,0,a,O)}}u=l=f=0,m=b=1,y=j="",p=s;break;case 58:p=1+Er(j),f=h;default:if(m<1)if(123==g)--m;else if(125==g&&0==m++&&125==Lr())continue;switch(j+=gr(g),g*m){case 38:b=l>0?1:(j+="\f",-1);break;case 44:a[u++]=(Er(j)-1)*b,b=1;break;case 64:45===Fr()&&(j+=Wr(Mr())),d=Fr(),l=p=Er(y=j+=Kr(Vr())),g++;break;case 45:45===h&&2==Er(j)&&(m=0)}}return i}function ao(e,t,n,r,o,i,s,a,c,u,l){for(var p=o-1,d=0===o?i:[""],f=_r(d),h=0,m=0,v=0;h<r;++h)for(var b=0,g=Sr(e,p+1,p=br(m=s[h])),y=e;b<f;++b)(y=wr(m>0?d[b]+" "+g:Or(g,/&\f/g,d[b])))&&(c[v++]=y);return Tr(e,t,n,0===o?eo:a,c,u,l)}function co(e,t,n){return Tr(e,t,n,Qr,gr(Dr),Sr(e,2,-2),0)}function uo(e,t,n,r){return Tr(e,t,n,to,Sr(e,0,r),Sr(e,r+1,-1),r)}var lo=function(e,t,n){for(var r=0,o=0;r=o,o=Fr(),38===r&&12===o&&(t[n]=1),!Br(o);)Mr();return Ur(e,Rr)},po=new WeakMap,fo=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)||po.get(n))&&!r){po.set(e,!0);for(var o=[],i=function(e,t){return zr(function(e,t){var n=-1,r=44;do{switch(Br(r)){case 0:38===r&&12===Fr()&&(t[n]=1),e[n]+=lo(Rr-1,t,n);break;case 2:e[n]+=Wr(r);break;case 4:if(44===r){e[++n]=58===Fr()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=gr(r)}}while(r=Mr());return e}(Hr(e),t))}(t,o),s=n.props,a=0,c=0;a<i.length;a++)for(var u=0;u<s.length;u++,c++)e.props[c]=o[a]?i[a].replace(/&\f/g,s[u]):s[u]+" "+i[a]}}},ho=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function mo(e,t){switch(function(e,t){return 45^jr(e,0)?(((t<<2^jr(e,0))<<2^jr(e,1))<<2^jr(e,2))<<2^jr(e,3):0}(e,t)){case 5103:return Zr+"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 Zr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Zr+e+Yr+e+Xr+e+e;case 6828:case 4268:return Zr+e+Xr+e+e;case 6165:return Zr+e+Xr+"flex-"+e+e;case 5187:return Zr+e+Or(e,/(\w+).+(:[^]+)/,Zr+"box-$1$2"+Xr+"flex-$1$2")+e;case 5443:return Zr+e+Xr+"flex-item-"+Or(e,/flex-|-self/,"")+e;case 4675:return Zr+e+Xr+"flex-line-pack"+Or(e,/align-content|flex-|-self/,"")+e;case 5548:return Zr+e+Xr+Or(e,"shrink","negative")+e;case 5292:return Zr+e+Xr+Or(e,"basis","preferred-size")+e;case 6060:return Zr+"box-"+Or(e,"-grow","")+Zr+e+Xr+Or(e,"grow","positive")+e;case 4554:return Zr+Or(e,/([^-])(transform)/g,"$1"+Zr+"$2")+e;case 6187:return Or(Or(Or(e,/(zoom-|grab)/,Zr+"$1"),/(image-set)/,Zr+"$1"),e,"")+e;case 5495:case 3959:return Or(e,/(image-set\([^]*)/,Zr+"$1$`$1");case 4968:return Or(Or(e,/(.+:)(flex-)?(.*)/,Zr+"box-pack:$3"+Xr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Zr+e+e;case 4095:case 3583:case 4068:case 2532:return Or(e,/(.+)-inline(.+)/,Zr+"$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(Er(e)-1-t>6)switch(jr(e,t+1)){case 109:if(45!==jr(e,t+4))break;case 102:return Or(e,/(.+:)(.+)-([^]+)/,"$1"+Zr+"$2-$3$1"+Yr+(108==jr(e,t+3)?"$3":"$2-$3"))+e;case 115:return~xr(e,"stretch")?mo(Or(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==jr(e,t+1))break;case 6444:switch(jr(e,Er(e)-3-(~xr(e,"!important")&&10))){case 107:return Or(e,":",":"+Zr)+e;case 101:return Or(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Zr+(45===jr(e,14)?"inline-":"")+"box$3$1"+Zr+"$2$3$1"+Xr+"$2box$3")+e}break;case 5936:switch(jr(e,t+11)){case 114:return Zr+e+Xr+Or(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Zr+e+Xr+Or(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Zr+e+Xr+Or(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Zr+e+Xr+e+e}return e}var vo=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case to:e.return=mo(e.value,e.length);break;case no:return ro([Nr(e,{value:Or(e.value,"@","@"+Zr)})],r);case eo: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 ro([Nr(e,{props:[Or(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return ro([Nr(e,{props:[Or(t,/:(plac\w+)/,":"+Zr+"input-$1")]}),Nr(e,{props:[Or(t,/:(plac\w+)/,":-moz-$1")]}),Nr(e,{props:[Or(t,/:(plac\w+)/,Xr+"input-$1")]})],r)}return""}))}}],bo=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||vo,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,u,l,p,d=[oo,(p=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&p(e)})],f=(u=[fo,ho].concat(i,d),l=_r(u),function(e,t,n,r){for(var o="",i=0;i<l;i++)o+=u[i](e,t,n,r)||"";return o});o=function(e,t,n,r){c=n,ro(io(e?e+"{"+t.styles+"}":t.styles),f),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new vr({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},go=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},yo={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 wo(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Oo=!1,xo=/[A-Z]|^ms/g,jo=/_EMO_([^_]+?)_([^]*?)_EMO_/g,So=function(e){return 45===e.charCodeAt(1)},Eo=function(e){return null!=e&&"boolean"!=typeof e},_o=wo((function(e){return So(e)?e:e.replace(xo,"-$&").toLowerCase()})),Co=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(jo,(function(e,t,n){return Ao={name:t,styles:n,next:Ao},t}))}return 1===yo[e]||So(e)||"number"!=typeof t||0===t?t:t+"px"},Po="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ko(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 Ao={name:o.name,styles:o.styles,next:Ao},o.name;var i=n;if(void 0!==i.styles){var s=i.next;if(void 0!==s)for(;void 0!==s;)Ao={name:s.name,styles:s.styles,next:Ao},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+=ko(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]+"}":Eo(a)&&(r+=_o(i)+":"+Co(i,a)+";")}else{if("NO_COMPONENT_SELECTOR"===i&&Oo)throw new Error(Po);if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var c=ko(e,t,s);switch(i){case"animation":case"animationName":r+=_o(i)+":"+c+";";break;default:r+=i+"{"+c+"}"}}else for(var u=0;u<s.length;u++)Eo(s[u])&&(r+=_o(i)+":"+Co(i,s[u])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var a=Ao,c=n(e);return Ao=a,ko(e,t,c)}}var u=n;if(null==t)return u;var l=t[u];return void 0!==l?l:u}var Ao,Ro=/label:\s*([^\s;{]+)\s*(;|$)/g;function Do(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="";Ao=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=ko(n,t,i)):o+=i[0];for(var s=1;s<e.length;s++)o+=ko(n,t,e[s]),r&&(o+=i[s]);Ro.lastIndex=0;for(var a,c="";null!==(a=Ro.exec(o));)c+="-"+a[1];var u=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:u,styles:o,next:Ao}}var Io,To,No=!!o.useInsertionEffect&&o.useInsertionEffect,Lo=No||function(e){return e()},Mo=(No||o.useLayoutEffect,o.createContext("undefined"!=typeof HTMLElement?bo({key:"css"}):null)),Fo=(Mo.Provider,function(e){return(0,o.forwardRef)((function(t,n){var r=(0,o.useContext)(Mo);return e(t,r,n)}))}),Vo=o.createContext({}),Uo={}.hasOwnProperty,Bo="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Ho=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return go(t,n,r),Lo((function(){return function(e,t,n){go(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=Fo((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[Bo],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=Do(s,void 0,o.useContext(Vo));a+=t.key+"-"+c.name;var u={};for(var l in e)Uo.call(e,l)&&"css"!==l&&l!==Bo&&(u[l]=e[l]);return u.className=a,n&&(u.ref=n),o.createElement(o.Fragment,null,o.createElement(Ho,{cache:t,serialized:c,isStringTag:"string"==typeof i}),o.createElement(i,u))})),Wo=zo,$o=(n(4146),function(e,t){var n=arguments;if(null==t||!Uo.call(t,"css"))return o.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=Wo,i[1]=function(e,t){var n={};for(var r in t)Uo.call(t,r)&&(n[r]=t[r]);return n[Bo]=e,n}(e,t);for(var s=2;s<r;s++)i[s]=n[s];return o.createElement.apply(null,i)});function qo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Do(t)}Io=$o||($o={}),To||(To=Io.JSX||(Io.JSX={}));var Go=n(5795);const Jo=Math.min,Ko=Math.max,Xo=Math.round,Yo=Math.floor,Zo=e=>({x:e,y:e});function Qo(e){return ni(e)?(e.nodeName||"").toLowerCase():"#document"}function ei(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ti(e){var t;return null==(t=(ni(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ni(e){return e instanceof Node||e instanceof ei(e).Node}function ri(e){return e instanceof Element||e instanceof ei(e).Element}function oi(e){return e instanceof HTMLElement||e instanceof ei(e).HTMLElement}function ii(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof ei(e).ShadowRoot)}function si(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ai(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ai(e){return ei(e).getComputedStyle(e)}function ci(e){const t=function(e){if("html"===Qo(e))return e;const t=e.assignedSlot||e.parentNode||ii(e)&&e.host||ti(e);return ii(t)?t.host:t}(e);return function(e){return["html","body","#document"].includes(Qo(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:oi(t)&&si(t)?t:ci(t)}function ui(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ci(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=ei(o);return i?t.concat(s,s.visualViewport||[],si(o)?o:[],s.frameElement&&n?ui(s.frameElement):[]):t.concat(o,ui(o,[],n))}function li(e){return ri(e)?e:e.contextElement}function pi(e){const t=li(e);if(!oi(t))return Zo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=function(e){const t=ai(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=oi(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Xo(n)!==i||Xo(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}(t);let s=(i?Xo(n.width):n.width)/r,a=(i?Xo(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const di=Zo(0);function fi(e){const t=ei(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:di}function hi(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=li(e);let s=Zo(1);t&&(r?ri(r)&&(s=pi(r)):s=pi(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ei(e))&&t}(i,n,r)?fi(i):Zo(0);let c=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,l=o.width/s.x,p=o.height/s.y;if(i){const e=ei(i),t=r&&ri(r)?ei(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=pi(n),t=n.getBoundingClientRect(),r=ai(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,l*=e.x,p*=e.y,c+=o,u+=i,n=ei(n).frameElement}}return d={width:l,height:p,x:c,y:u},{...d,top:d.y,left:d.x,right:d.x+d.width,bottom:d.y+d.height};var d}var mi=o.useLayoutEffect,vi=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],bi=function(){};function gi(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function yi(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(gi(e,s)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var wi=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===(0,Ut.A)(e)&&null!==e?[e]:[];var t},Oi=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,cr({},tr(e,vi))},xi=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 ji(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Si(e){return ji(e)?window.pageYOffset:e.scrollTop}function Ei(e,t){ji(e)?window.scrollTo(0,t):e.scrollTop=t}function _i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:bi,o=Si(e),i=t-o,s=0;!function t(){var a,c=i*((a=(a=s+=10)/n-1)*a*a+1)+o;Ei(e,c),s<n?window.requestAnimationFrame(t):r(e)}()}function Ci(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Ei(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Ei(e,Math.max(t.offsetTop-o,0))}function Pi(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var ki=!1,Ai={get passive(){return ki=!0}},Ri="undefined"!=typeof window?window:{};Ri.addEventListener&&Ri.removeEventListener&&(Ri.addEventListener("p",bi,Ai),Ri.removeEventListener("p",bi,!1));var Di=ki;function Ii(e){return null!=e}function Ti(e,t,n){return e?t:n}var Ni=["children","innerProps"],Li=["children","innerProps"];var Mi,Fi,Vi,Ui=function(e){return"auto"===e?"bottom":e},Bi=(0,o.createContext)(null),Hi=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,i=e.menuPlacement,a=e.menuPosition,c=e.menuShouldScrollIntoView,u=e.theme,l=((0,o.useContext)(Bi)||{}).setPortalPlacement,p=(0,o.useRef)(null),d=(0,o.useState)(r),f=(0,s.A)(d,2),h=f[0],m=f[1],v=(0,o.useState)(null),b=(0,s.A)(v,2),g=b[0],y=b[1],w=u.spacing.controlHeight;return mi((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),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var l,p=c.getBoundingClientRect().height,d=n.getBoundingClientRect(),f=d.bottom,h=d.height,m=d.top,v=n.offsetParent.getBoundingClientRect().top,b=s||ji(l=c)?window.innerHeight:l.clientHeight,g=Si(c),y=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),O=v-w,x=b-m,j=O+g,S=p-g-m,E=f-b+g+y,_=g+m-w,C=160;switch(o){case"auto":case"bottom":if(x>=h)return{placement:"bottom",maxHeight:t};if(S>=h&&!s)return i&&_i(c,E,C),{placement:"bottom",maxHeight:t};if(!s&&S>=r||s&&x>=r)return i&&_i(c,E,C),{placement:"bottom",maxHeight:s?x-y:S-y};if("auto"===o||s){var P=t,k=s?O:j;return k>=r&&(P=Math.min(k-y-a,t)),{placement:"top",maxHeight:P}}if("bottom"===o)return i&&Ei(c,E),{placement:"bottom",maxHeight:t};break;case"top":if(O>=h)return{placement:"top",maxHeight:t};if(j>=h&&!s)return i&&_i(c,_,C),{placement:"top",maxHeight:t};if(!s&&j>=r||s&&O>=r){var A=t;return(!s&&j>=r||s&&O>=r)&&(A=s?O-w:j-w),i&&_i(c,_,C),{placement:"top",maxHeight:A}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}({maxHeight:r,menuEl:e,minHeight:n,placement:i,shouldScroll:c&&!t,isFixedPosition:t,controlHeight:w});m(o.maxHeight),y(o.placement),null==l||l(o.placement)}}),[r,i,a,c,n,l,w]),t({ref:p,placerProps:cr(cr({},e),{},{placement:g||Ui(i),maxHeight:h})})},zi=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return cr({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Wi=zi,$i=zi,qi=["size"],Gi=["innerProps","isRtl","size"],Ji={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Ki=function(e){var t=e.size,n=tr(e,qi);return $o("svg",lr({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Ji},n))},Xi=function(e){return $o(Ki,lr({size:20},e),$o("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"}))},Yi=function(e){return $o(Ki,lr({size:20},e),$o("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"}))},Zi=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return cr({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},Qi=Zi,es=Zi,ts=function(){var e=qo.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_"}}}(Mi||(Fi=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],Vi||(Vi=Fi.slice(0)),Mi=Object.freeze(Object.defineProperties(Fi,{raw:{value:Object.freeze(Vi)}})))),ns=function(e){var t=e.delay,n=e.offset;return $o("span",{css:qo({animation:"".concat(ts," 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"},"","")})},rs=["data"],os=["innerRef","isDisabled","isHidden","inputClassName"],is={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},ss={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":cr({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},is)},as=function(e){return cr({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},is)},cs=function(e){var t=e.children,n=e.innerProps;return $o("div",n,t)},us={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return $o("div",lr({},xi(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||$o(Xi,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,s=e.menuIsOpen;return $o("div",lr({ref:o},xi(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 $o("div",lr({},xi(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||$o(Yi,null))},DownChevron:Yi,CrossIcon:Xi,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,u=e.theme,l=e.selectProps;return $o("div",lr({},xi(e,"group",{group:!0}),a),$o(i,lr({},s,{selectProps:l,theme:u,getStyles:r,getClassNames:o,cx:n}),c),$o("div",null,t))},GroupHeading:function(e){var t=Oi(e);t.data;var n=tr(t,rs);return $o("div",lr({},xi(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return $o("div",lr({},xi(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return $o("span",lr({},t,xi(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=Oi(e),o=r.innerRef,i=r.isDisabled,s=r.isHidden,a=r.inputClassName,c=tr(r,os);return $o("div",lr({},xi(e,"input",{"input-container":!0}),{"data-value":n||""}),$o("input",lr({className:t({input:!0},a),ref:o,style:as(s),disabled:i},c)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=tr(e,Gi);return $o("div",lr({},xi(cr(cr({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),$o(ns,{delay:0,offset:n}),$o(ns,{delay:160,offset:!0}),$o(ns,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return $o("div",lr({},xi(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 $o("div",lr({},xi(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,i=e.innerProps,a=e.menuPlacement,c=e.menuPosition,u=(0,o.useRef)(null),l=(0,o.useRef)(null),p=(0,o.useState)(Ui(a)),d=(0,s.A)(p,2),f=d[0],h=d[1],m=(0,o.useMemo)((function(){return{setPortalPlacement:h}}),[]),v=(0,o.useState)(null),b=(0,s.A)(v,2),g=b[0],y=b[1],w=(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]);mi((function(){w()}),[w]);var O=(0,o.useCallback)((function(){"function"==typeof l.current&&(l.current(),l.current=null),r&&u.current&&(l.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,u=li(e),l=o||i?[...u?ui(u):[],...ui(t)]:[];l.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const p=u&&a?function(e,t){let n,r=null;const o=ti(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:u,top:l,width:p,height:d}=e.getBoundingClientRect();if(a||t(),!p||!d)return;const f={rootMargin:-Yo(l)+"px "+-Yo(o.clientWidth-(u+p))+"px "+-Yo(o.clientHeight-(l+d))+"px "+-Yo(u)+"px",threshold:Ko(0,Jo(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}(u,n):null;let d,f=-1,h=null;s&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{h&&h.observe(t)}))),n()})),u&&!c&&h.observe(u),h.observe(t));let m=c?hi(e):null;return c&&function t(){const r=hi(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(),()=>{l.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),p&&p(),h&&h.disconnect(),h=null,c&&cancelAnimationFrame(d)}}(r,u.current,w,{elementResize:"ResizeObserver"in window}))}),[r,w]);mi((function(){O()}),[O]);var x=(0,o.useCallback)((function(e){u.current=e,O()}),[O]);if(!t&&"fixed"!==c||!g)return null;var j=$o("div",lr({ref:x},xi(cr(cr({},e),{},{offset:g.offset,position:c,rect:g.rect}),"menuPortal",{"menu-portal":!0}),i),n);return $o(Bi.Provider,{value:m},t?(0,Go.createPortal)(j,t):j)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=tr(e,Li);return $o("div",lr({},xi(cr(cr({},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=tr(e,Ni);return $o("div",lr({},xi(cr(cr({},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,u=n.Label,l=n.Remove;return $o(c,{data:r,innerProps:cr(cr({},xi(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:a},$o(u,{data:r,innerProps:cr({},xi(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:a},t),$o(l,{data:r,innerProps:cr(cr({},xi(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},s),selectProps:a}))},MultiValueContainer:cs,MultiValueLabel:cs,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return $o("div",lr({role:"button"},n),t||$o(Xi,{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 $o("div",lr({},xi(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 $o("div",lr({},xi(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return $o("div",lr({},xi(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return $o("div",lr({},xi(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 $o("div",lr({},xi(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},ls=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ps(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((r=e[n])===(o=t[n])||ls(r)&&ls(o)))return!1;var r,o;return!0}for(var ds={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"},fs=function(e){return $o("span",lr({css:ds},e))},hs={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,u=e.isAppleDevice,l=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(l(s,n),".");if("menu"===t&&u){var p=a?" disabled":"",d="".concat(c?" selected":"").concat(p);return"".concat(i).concat(d,", ").concat(l(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},ms=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,s=e.isFocused,a=e.selectValue,c=e.selectProps,u=e.id,l=e.isAppleDevice,p=c.ariaLiveMessages,d=c.getOptionLabel,f=c.inputValue,h=c.isMulti,m=c.isOptionDisabled,v=c.isSearchable,b=c.menuIsOpen,g=c.options,y=c.screenReaderStatus,w=c.tabSelectsValue,O=c.isLoading,x=c["aria-label"],j=c["aria-live"],S=(0,o.useMemo)((function(){return cr(cr({},hs),p||{})}),[p]),E=(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,u=i||r||(e=c,Array.isArray(e)?null:e),l=u?d(u):"",p=o||s||void 0,f=p?p.map(d):[],h=cr({isDisabled:u&&m(u,a),label:l,labels:f},t);n=S.onChange(h)}return n}),[t,S,m,a,d]),_=(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:l};e=S.onFocus(s)}return e}),[n,r,d,m,S,i,a,l]),C=(0,o.useMemo)((function(){var e="";if(b&&g.length&&!O&&S.onFilter){var t=y({count:i.length});e=S.onFilter({inputValue:f,resultsMessage:t})}return e}),[i,f,b,S,g,y,O]),P="initial-input-focus"===(null==t?void 0:t.action),k=(0,o.useMemo)((function(){var e="";if(S.guidance){var t=r?"value":b?"menu":"input";e=S.guidance({"aria-label":x,context:t,isDisabled:n&&m(n,a),isMulti:h,isSearchable:v,tabSelectsValue:w,isInitialFocus:P})}return e}),[x,n,r,h,m,v,b,S,a,w,P]),A=$o(o.Fragment,null,$o("span",{id:"aria-selection"},E),$o("span",{id:"aria-focused"},_),$o("span",{id:"aria-results"},C),$o("span",{id:"aria-guidance"},k));return $o(o.Fragment,null,$o(fs,{id:u},P&&A),$o(fs,{"aria-live":j,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!P&&A))},vs=[{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źẑżžẓẕƶȥɀⱬꝣ"}],bs=new RegExp("["+vs.map((function(e){return e.letters})).join("")+"]","g"),gs={},ys=0;ys<vs.length;ys++)for(var ws=vs[ys],Os=0;Os<ws.letters.length;Os++)gs[ws.letters[Os]]=ws.base;var xs=function(e){return e.replace(bs,(function(e){return gs[e]}))},js=function(e,t){void 0===t&&(t=ps);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}(xs),Ss=function(e){return e.replace(/^\s+|\s+$/g,"")},Es=function(e){return"".concat(e.label," ").concat(e.value)},_s=["innerRef"];function Cs(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,s.A)(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=(0,s.A)(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(tr(e,_s),"onExited","in","enter","exit","appear");return $o("input",lr({ref:t},n,{css:qo({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 Ps=["boxSizing","height","overflow","paddingRight","position"],ks={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function As(e){e.cancelable&&e.preventDefault()}function Rs(e){e.stopPropagation()}function Ds(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Is(){return"ontouchstart"in window||navigator.maxTouchPoints}var Ts=!("undefined"==typeof window||!window.document||!window.document.createElement),Ns=0,Ls={capture:!1,passive:!1},Ms=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Fs={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Vs(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),u=(0,o.useRef)(0),l=(0,o.useRef)(null),p=(0,o.useCallback)((function(e,t){if(null!==l.current){var o=l.current,u=o.scrollTop,p=o.scrollHeight,d=o.clientHeight,f=l.current,h=t>0,m=p-d-u,v=!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,v=!0,a.current=!0):!h&&-t>u&&(i&&!c.current&&i(e),f.scrollTop=0,v=!0,c.current=!0),v&&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){u.current=e.changedTouches[0].clientY}),[]),h=(0,o.useCallback)((function(e){var t=u.current-e.changedTouches[0].clientY;p(e,t)}),[p]),m=(0,o.useCallback)((function(e){if(e){var t=!!Di&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",h,t)}}),[h,f,d]),v=(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=l.current;return m(e),function(){v(e)}}}),[t,m,v]),function(e){l.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(Ts){var t=document.body,n=t&&t.style;if(r&&Ps.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&Ns<1){var o=parseInt(i.current.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,a=window.innerWidth-s+o||0;Object.keys(ks).forEach((function(e){var t=ks[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(a,"px"))}t&&Is()&&(t.addEventListener("touchmove",As,Ls),e&&(e.addEventListener("touchstart",Ds,Ls),e.addEventListener("touchmove",Rs,Ls))),Ns+=1}}),[r]),c=(0,o.useCallback)((function(e){if(Ts){var t=document.body,n=t&&t.style;Ns=Math.max(Ns-1,0),r&&Ns<1&&Ps.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&Is()&&(t.removeEventListener("touchmove",As,Ls),e&&(e.removeEventListener("touchstart",Ds,Ls),e.removeEventListener("touchmove",Rs,Ls)))}}),[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 $o(o.Fragment,null,n&&$o("div",{onClick:Ms,css:Fs}),t((function(e){i(e),s(e)})))}var Us={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Bs=function(e){var t=e.name,n=e.onFocus;return $o("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Us,value:"",onChange:function(){}})};function Hs(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 zs(){return Hs(/^Mac/i)}var Ws={clearIndicator:es,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 cr({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:Qi,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 cr({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 cr({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 cr(cr({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},ss),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 cr({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:$i,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,s=o.spacing,a=o.colors;return cr((Ht(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),Ht(n,"position","absolute"),Ht(n,"width","100%"),Ht(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 cr({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 cr({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 cr({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 cr({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:Wi,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,s=i.spacing,a=i.colors;return cr({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 cr({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 cr({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 cr({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")})}},$s={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}},qs={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Pi(),captureMenuScroll:!Pi(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=cr({ignoreCase:!0,ignoreAccents:!0,stringify:Es,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,s=n.trim,a=n.matchFrom,c=s?Ss(t):t,u=s?Ss(i(e)):i(e);return r&&(c=c.toLowerCase(),u=u.toLowerCase()),o&&(c=js(c),u=xs(u)),"start"===a?u.substr(0,c.length)===c:u.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 Gs(e,t,n,r){return{type:"option",data:t,isDisabled:ta(e,t,n),isSelected:na(e,t,n),label:Qs(e,t),value:ea(e,t),index:r}}function Js(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return Gs(e,n,t,r)})).filter((function(t){return Ys(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=Gs(e,n,t,r);return Ys(e,i)?i:void 0})).filter(Ii)}function Ks(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,f(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Xs(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,f(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 Ys(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,s=t.label,a=t.value;return(!oa(e)||!i)&&ra(e,{label:s,value:a,data:o},r)}var Zs=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},Qs=function(e,t){return e.getOptionLabel(t)},ea=function(e,t){return e.getOptionValue(t)};function ta(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function na(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=ea(e,t);return n.some((function(t){return ea(e,t)===r}))}function ra(e,t,n){return!e.filterOption||e.filterOption(t,n)}var oa=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},ia=1,sa=function(e){(0,fr.A)(n,e);var t=function(e){var t=mr();return function(){var n,r=hr(e);if(t){var o=hr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==(0,Ut.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,pr.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=zs()||Hs(/^iPhone/i)||Hs(/^iPad/i)||zs()&&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 u=r.getOptionValue(e);r.setValue(s.filter((function(e){return r.getOptionValue(e)!==u})),"deselect-option",e)}else{if(c)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(f(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=Ti(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(Ti(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=Ti(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return Zs(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return Xs(Js(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 yi.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return Qs(r.props,e)},r.getOptionValue=function(e){return ea(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=Ws[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,cr(cr({},us),e.components);var e},r.buildCategorizedOptions=function(){return Js(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return Ks(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:cr({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&&ji(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 oa(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,u=t.menuIsOpen,l=t.onKeyDown,p=t.tabSelectsValue,d=t.openMenuOnFocus,f=r.state,h=f.focusedOption,m=f.focusedValue,v=f.selectValue;if(!(c||"function"==typeof l&&(l(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||!u||!p||!h||d&&r.isOptionSelected(h,v))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":u?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:s}),r.onMenuClose()):a&&i&&r.clearValue();break;case" ":if(s)return;if(!u){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":u?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":u?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!u)return;r.focusOption("pageup");break;case"PageDown":if(!u)return;r.focusOption("pagedown");break;case"Home":if(!u)return;r.focusOption("first");break;case"End":if(!u)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++ia),r.state.selectValue=wi(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=Zs(o,i[s])}return r}return(0,dr.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&&Ci(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&&(Ci(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($s):cr(cr({},$s),this.props.theme):$s}},{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,u=a.isRtl,l=a.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:c,isRtl:u,options:l,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 ta(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return na(this.props,e,t)}},{key:"filterOption",value:function(e,t){return ra(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,u=e.required,l=this.getComponents().Input,p=this.state,d=p.inputIsHidden,f=p.ariaSelection,h=this.commonProps,m=r||this.getElementId("input"),v=cr(cr(cr({"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":u,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(l,lr({},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},v)):o.createElement(Cs,lr({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:bi,onFocus:this.onInputFocus,disabled:t,tabIndex:s,inputMode:"none",form:a,value:""},v))}},{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,u=this.commonProps,l=this.props,p=l.controlShouldRenderValue,d=l.isDisabled,f=l.isMulti,h=l.inputValue,m=l.placeholder,v=this.state,b=v.selectValue,g=v.focusedValue,y=v.isFocused;if(!this.hasValue()||!p)return h?null:o.createElement(c,lr({},u,{key:"placeholder",isDisabled:d,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),m);if(f)return b.map((function(t,a){var c=t===g,l="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return o.createElement(n,lr({},u,{components:{Container:r,Label:i,Remove:s},isFocused:c,isDisabled:d,key:l,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 w=b[0];return o.createElement(a,lr({},u,{data:w,isDisabled:d}),this.formatOptionLabel(w,"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,lr({},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,lr({},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,lr({},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,lr({},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,u=t.NoOptionsMessage,l=t.Option,p=this.commonProps,d=this.state.focusedOption,f=this.props,h=f.captureMenuScroll,m=f.inputValue,v=f.isLoading,b=f.loadingMessage,g=f.minMenuHeight,y=f.maxMenuHeight,w=f.menuIsOpen,O=f.menuPlacement,x=f.menuPosition,j=f.menuPortalTarget,S=f.menuShouldBlockScroll,E=f.menuShouldScrollIntoView,_=f.noOptionsMessage,C=f.onMenuScrollToTop,P=f.onMenuScrollToBottom;if(!w)return null;var k,A=function(t,n){var r=t.type,i=t.data,s=t.isDisabled,a=t.isSelected,c=t.label,u=t.value,f=d===i,h=s?void 0:function(){return e.onOptionHover(i)},m=s?void 0:function(){return e.selectOption(i)},v="".concat(e.getElementId("option"),"-").concat(n),b={id:v,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return o.createElement(l,lr({},p,{innerProps:b,data:i,isDisabled:s,isSelected:a,key:v,label:c,type:r,value:u,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),u="".concat(c,"-heading");return o.createElement(n,lr({},p,{key:c,data:i,options:s,Heading:r,headingProps:{id:u,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(v){var R=b({inputValue:m});if(null===R)return null;k=o.createElement(c,p,R)}else{var D=_({inputValue:m});if(null===D)return null;k=o.createElement(u,p,D)}var I={minMenuHeight:g,maxMenuHeight:y,menuPlacement:O,menuPosition:x,menuShouldScrollIntoView:E},T=o.createElement(Hi,lr({},p,I),(function(t){var n=t.ref,r=t.placerProps,a=r.placement,c=r.maxHeight;return o.createElement(i,lr({},p,I,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:a}),o.createElement(Vs,{captureEnabled:h,onTopArrive:C,onBottomArrive:P,lockEnabled:S},(function(t){return o.createElement(s,lr({},p,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":p.isMulti,id:e.getElementId("listbox")},isLoading:v,maxHeight:c,focusedOption:d}),k)})))}));return j||"fixed"===x?o.createElement(a,lr({},p,{appendTo:j,controlElement:this.controlRef,menuPlacement:O,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(Bs,{name:s,onFocus:this.onValueInputFocus});if(s&&!r){if(i){if(n){var u=c.map((function(t){return e.getOptionValue(t)})).join(n);return o.createElement("input",{name:s,type:"hidden",value:u})}var l=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,l)}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(ms,lr({},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,u=s.isDisabled,l=s.menuIsOpen,p=this.state.isFocused,d=this.commonProps=this.getCommonProps();return o.createElement(r,lr({},d,{className:a,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:p}),this.renderLiveRegion(),o.createElement(t,lr({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:p,menuIsOpen:l}),o.createElement(i,lr({},d,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),o.createElement(n,lr({},d,{isDisabled:u}),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,u=e.options,l=e.value,p=e.menuIsOpen,d=e.inputValue,f=e.isMulti,h=wi(l),m={};if(n&&(l!==n.value||u!==n.options||p!==n.menuIsOpen||d!==n.inputValue)){var v=p?function(e,t){return Ks(Js(e,t))}(e,h):[],b=p?Xs(Js(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,v);m={selectValue:h,focusedOption:y,focusedOptionId:Zs(b,y),focusableOptionsWithIds:b,focusedValue:g,clearFocusValueOnUpdate:!1}}var w=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},O=i,x=s&&a;return s&&!x&&(O={value:Ti(f,h,h[0]||null),options:h,action:"initial-input-focus"},x=!a),"initial-input-focus"===(null==i?void 0:i.action)&&(O=null),cr(cr(cr({},m),w),{},{prevProps:e,ariaSelection:O,prevWasFocused:x})}}]),n}(o.Component);sa.defaultProps=qs;var aa=(0,o.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,i=void 0!==r&&r,a=e.defaultValue,c=void 0===a?null:a,u=e.inputValue,l=e.menuIsOpen,p=e.onChange,d=e.onInputChange,f=e.onMenuClose,h=e.onMenuOpen,m=e.value,v=tr(e,ur),b=(0,o.useState)(void 0!==u?u:n),g=(0,s.A)(b,2),y=g[0],w=g[1],O=(0,o.useState)(void 0!==l?l:i),x=(0,s.A)(O,2),j=x[0],S=x[1],E=(0,o.useState)(void 0!==m?m:c),_=(0,s.A)(E,2),C=_[0],P=_[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)),w(void 0!==n?n:e)}),[d]),R=(0,o.useCallback)((function(){"function"==typeof h&&h(),S(!0)}),[h]),D=(0,o.useCallback)((function(){"function"==typeof f&&f(),S(!1)}),[f]),I=void 0!==u?u:y,T=void 0!==l?l:j,N=void 0!==m?m:C;return cr(cr({},v),{},{inputValue:I,menuIsOpen:T,onChange:k,onInputChange:A,onMenuClose:D,onMenuOpen:R,value:N})}(e);return o.createElement(sa,lr({ref:t},n))})),ca=aa;function ua(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 la(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ua(Object(n),!0).forEach((function(t){Ht(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ua(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pa={global:"admin-site",admin:"admin-tools","front-end":"admin-appearance","single-use":"clock",content:"shortcode","head-content":"editor-code","footer-content":"editor-code","admin-css":"dashboard","site-css":"admin-customizer","site-head-js":"media-code","site-footer-js":"media-code"},da={global:(0,u.__)("Run everywhere","code-snippets"),admin:(0,u.__)("Only run in administration area","code-snippets"),"front-end":(0,u.__)("Only run on site front-end","code-snippets"),"single-use":(0,u.__)("Only run once","code-snippets"),content:(0,u.__)("Where inserted in editor","code-snippets"),"head-content":(0,u.__)("In site <head> section","code-snippets"),"footer-content":(0,u.__)("In site footer (end of <body>)","code-snippets"),"site-css":(0,u.__)("Site front-end","code-snippets"),"admin-css":(0,u.__)("Administration area","code-snippets"),"site-footer-js":(0,u.__)("In site footer (end of <body>)","code-snippets"),"site-head-js":(0,u.__)("In site <head> section","code-snippets")},fa=function(){var e=Ln(),t=e.snippet,n=e.setSnippet,r=e.isReadOnly,o=zt[Qt(t)].filter((function(e){return"condition"!==e})).map((function(e){return{key:e,value:e,label:da[e]}}));return en(t)?null:(0,on.jsxs)("div",{className:"block-form-field",children:[(0,on.jsx)("h4",{children:(0,on.jsx)("label",{htmlFor:"snippet-location",children:(0,u.__)("Location","code-snippets")})}),(0,on.jsx)(ca,{inputId:"snippet-location",className:"code-snippets-select",options:o,isDisabled:r,styles:{menu:function(e){return la(la({},e),{},{zIndex:9999})},input:function(e){return la(la({},e),{},{":focus":{boxShadow:"none"}})}},value:o.find((function(e){return e.value===t.scope})),formatOptionLabel:function(e){var t=e.label,n=e.value;return(0,on.jsxs)(on.Fragment,{children:[(0,on.jsx)("span",{className:"dashicons dashicons-".concat(pa[n])})," ".concat(t)]})},onChange:function(e){return(null==e?void 0:e.value)&&n((function(t){return la(la({},t),{},{scope:e.value})}))}})]})},ha=function(e){var t=e.className,n=e.onDismiss,r=e.children;return(0,on.jsxs)("div",{id:"message",className:c()("notice fade is-dismissible",t),children:[(0,on.jsx)(on.Fragment,{children:r}),(0,on.jsx)("button",{type:"button",className:"notice-dismiss",onClick:function(e){e.preventDefault(),n()},children:(0,on.jsx)("span",{className:"screen-reader-text",children:(0,u.__)("Dismiss notice.","code-snippets")})})]})};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 va(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){Ht(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 ba=function(){var e=Ln(),t=e.currentNotice,n=e.setCurrentNotice,r=e.snippet,o=e.setSnippet;return(0,on.jsxs)(on.Fragment,{children:[t?(0,on.jsx)(ha,{className:t[0],onDismiss:function(){return n(void 0)},children:(0,on.jsx)("p",{children:(0,Yn.createInterpolateElement)(t[1],{strong:(0,on.jsx)("strong",{})})})}):null,r.code_error?(0,on.jsx)(ha,{className:"notice-error",onDismiss:function(){return o((function(e){return va(va({},e),{},{code_error:null})}))},children:(0,on.jsxs)("p",{children:[(0,on.jsx)("strong",{children:(0,u.sprintf)((0,u.__)("Snippet automatically deactivated due to an error on line %d:","code-snippets"),r.code_error[1])}),(0,on.jsx)("blockquote",{children:r.code_error[0]})]})}):null]})},ga=function(){return(0,on.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,on.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"})})},ya=["text","timeout"];function wa(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?wa(Object(n),!0).forEach((function(t){Ht(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xa=function(e){return e[e.INITIAL=0]="INITIAL",e[e.PROGRESSING=1]="PROGRESSING",e[e.SUCCESS=2]="SUCCESS",e[e.ERROR=3]="ERROR",e}(xa||{}),ja=function(e){switch(e.status){case xa.INITIAL:return(0,on.jsx)(ga,{});case xa.PROGRESSING:return(0,on.jsx)("span",{className:"spinner-wrapper",children:(0,on.jsx)(Kn.Spinner,{})});case xa.SUCCESS:return(0,on.jsx)("span",{className:"dashicons dashicons-yes"});case xa.ERROR:return(0,on.jsx)("span",{className:"dashicons dashicons-warning"})}},Sa=function(e){var t=e.text,n=e.timeout,r=void 0===n?1500:n,i=tr(e,ya),a=(0,o.useState)(xa.INITIAL),c=(0,s.A)(a,2),l=c[0],p=c[1],d=window.navigator.clipboard;return d&&window.isSecureContext?(0,on.jsxs)(ir,Oa(Oa({className:"code-snippets-copy-text",onClick:function(){p(xa.PROGRESSING),null==d||d.writeText(t).then((function(){p(xa.SUCCESS),setTimeout((function(){return p(xa.INITIAL)}),r)})).catch((function(e){console.error("Failed to copy text to clipboard.",e),p(xa.ERROR)}))}},i),{},{children:[(0,on.jsx)(ja,{status:l}),(0,u.__)("Copy","code-snippets")]})):null};function Ea(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 _a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ea(Object(n),!0).forEach((function(t){Ht(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ea(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ca=function(e){var t=e.options,n=e.checked,r=e.disabled,o=e.setChecked,i=e.optionLabels,s=e.optionDescriptions;return(0,on.jsx)("ul",{children:t.map((function(e){return(0,on.jsx)("li",{children:(0,on.jsx)(Kn.CheckboxControl,{label:i[e],help:s[e],checked:n[e],disabled:r,onChange:function(t){return o((function(n){return _a(_a({},n),{},Ht({},e,t))}))}})},e)}))})},Pa=function(){return(0,on.jsxs)("p",{className:"description",children:[(0,u.__)("Copy the below shortcode to insert this snippet into a post, page, or other content.","code-snippets"),"\n",(0,u.__)("You can also use the Classic Editor button, Block editor (Pro) or Elementor widget (Pro).","code-snippets"),"\n",(0,on.jsx)(Kn.ExternalLink,{href:(0,u.__)("https://codesnippets.pro/doc/inserting-content-snippets/","code-snippets"),children:(0,u.__)("Learn more","code-snippets")})]})},ka={php:(0,u.__)("Evaluate PHP code","code-snippets"),format:(0,u.__)("Add paragraphs and formatting","code-snippets"),shortcodes:(0,u.__)("Evaluate additional shortcode tags","code-snippets")},Aa={php:(0,u.__)("Run code within <?php ?> tags.","code-snippets"),format:(0,u.__)("Wrap output in paragraphs and apply formatting.","code-snippets"),shortcodes:(0,u.__)("Replace [shortcodes] embedded within the snippet.","code-snippets")},Ra=function(){var e,t=Ln(),n=t.snippet,r=t.isReadOnly,i=(0,o.useState)((function(){return{php:n.code.includes("<?"),format:!0,shortcodes:!1}})),a=(0,s.A)(i,2),c=a[0],l=a[1],p=(e=_a(_a({id:n.id,network:n.network},c),{},{name:n.name}),"[".concat(["code_snippet"].concat(f(Object.entries(e).filter((function(e){var t=(0,s.A)(e,2)[1];return Boolean(t)})).map((function(e){var t=(0,s.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,on.jsxs)(on.Fragment,{children:[(0,on.jsx)(Pa,{}),(0,on.jsxs)("p",{className:"shortcode-tag-wrapper",children:[(0,on.jsx)("code",{className:"shortcode-tag",children:p}),(0,on.jsx)(Sa,{primary:!0,text:p})]}),(0,on.jsxs)("p",{children:[(0,on.jsx)("h4",{children:(0,u.__)("Shortcode Options","code-snippets")}),(0,on.jsx)(Ca,{options:["php","format","shortcodes"],checked:c,disabled:r,setChecked:l,optionLabels:ka,optionDescriptions:Aa})]})]})},Da=function(){var e=Ln(),t=e.snippet,n=e.isReadOnly,r=(0,o.useState)(!1),i=(0,s.A)(r,2),a=i[0],c=i[1];return"content"===t.scope&&t.id?(0,on.jsxs)("div",{className:"inline-form-field",children:[(0,on.jsx)("h4",{children:(0,u.__)("Shortcode","code-snippets")}),(0,on.jsx)(ir,{onClick:function(){return c(!0)},disabled:n,children:(0,u.__)("See options","code-snippets")}),a?(0,on.jsxs)(Kn.Modal,{size:"medium",className:"code-snippets-modal",title:(0,u.__)("Embed Snippet with Shortcode","code-snippets"),onRequestClose:function(){return c(!1)},children:[(0,on.jsx)("div",{className:"modal-content",children:(0,on.jsx)(Ra,{})}),(0,on.jsx)("div",{className:"modal-footer",children:(0,on.jsx)(ir,{link:!0,large:!0,onClick:function(){return c(!1)},children:(0,u.__)("Close Popup","code-snippets")})})]}):null]}):null};function Ia(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 Ta(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ia(Object(n),!0).forEach((function(t){Ht(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ia(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Na=function(){var e=Ln(),t=e.snippet,n=e.setSnippet,r=e.isReadOnly;return(0,on.jsxs)("div",{children:[(0,on.jsx)("h4",{children:(0,on.jsx)("label",{htmlFor:"snippet_sharing",children:(0,u.__)("Share with Subsites","code-snippets")})}),(0,on.jsxs)("div",{className:"tooltip-bottom",children:[(0,on.jsx)("span",{className:"dashicons dashicons-editor-help"}),(0,on.jsx)("span",{className:"tooltip-content",children:(0,u.__)("Instead of running on every site, allow this snippet to be activated on individual sites on the network.","code-snippets")})]}),(0,on.jsx)("input",{id:"snippet_sharing",name:"snippet_sharing",type:"checkbox",className:"switch",checked:!0===t.shared_network,disabled:r,onChange:function(e){return n((function(t){return Ta(Ta({},t),{},{active:!1,shared_network:e.target.checked})}))}})]})},La={php:["php","text/php"],html:["php","text/php"],css:["css","text/css"],js:["js","text/javascript"],cond:["json","application/json"],json:["json","application/json"]},Ma=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),setTimeout((function(){return r.click()}),0)},Fa=function(e){var t=e.name,n=e.label,r=e.makeRequest,o=Ln(),i=o.snippet,a=o.isWorking,c=o.setIsWorking,l=o.handleRequestError;return(0,on.jsx)(ir,{name:t,onClick:function(){c(!0),r(i).then((function(e){return function(e,t){var n=t.id,r=t.name,o=t.scope,i=r.toLowerCase().replace(/[^\w-]+/g,"-").trim(),a=""===i?"snippet-".concat(n):i;if("string"==typeof e){var c=(0,s.A)(La[Qt({scope:o})],2),u=c[0],l=c[1],p="".concat(a,".code-snippets.").concat(u);Ma(e,p,l)}else{var d="".concat(a,".code-snippets.json");Ma(JSON.stringify(e,void 0,2),d,"application/json")}}(e,i)})).catch((function(e){return l(e,(0,u.__)("Could not download export file.","code-snippets"))})).finally((function(){return c(!1)}))},disabled:a,children:n})},Va=function(){var e,t=ln().snippetsAPI;return(0,on.jsxs)("div",{className:"snippet-export-buttons",children:[(0,on.jsx)(Fa,{name:"export_snippet",label:(0,u.__)("Export","code-snippets"),makeRequest:t.export}),null!==(e=window.CODE_SNIPPETS_EDIT)&&void 0!==e&&e.enableDownloads?(0,on.jsx)(Fa,{name:"export_snippet_code",label:(0,u.__)("Export Code","code-snippets"),makeRequest:t.exportCode}):null]})},Ua=["id","text","name","primary","small","large","wrap","className"];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}var Ha=function(e){var t=e.id,n=e.text,r=e.name,o=void 0===r?"submit":r,i=e.primary,s=e.small,a=e.large,l=e.wrap,p=e.className,d=tr(e,Ua),f=(0,on.jsx)("input",function(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){Ht(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}({id:null!=t?t:o,type:"submit",name:o,value:null!=n?n:(0,u.__)("Save Changes","code-snippets"),className:c()("button",{"button-primary":i,"button-small":s,"button-large":a},p)},d));return l?(0,on.jsx)("p",{className:"submit",children:f}):f};function za(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 Wa=function(e){var t=Ln().snippet;return(0,on.jsx)(Ha,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?za(Object(n),!0).forEach((function(t){Ht(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):za(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({large:!0,name:Wn.SAVE,text:en(t)?(0,u.__)("Save Condition","code-snippets"):(0,u.__)("Save Snippet","code-snippets")},e))},$a=function(e){var t=e.primaryActivate,n=Ln(),r=n.snippet,o=n.isWorking;switch(!0){case en(r)||r.shared_network&&Wt():return null;case"single-use"===r.scope:return(0,on.jsx)(Ha,{large:!0,name:Wn.SAVE_AND_EXECUTE,disabled:o,text:(0,u.__)("Save and Execute Once","code-snippets")});case r.active:return(0,on.jsx)(Ha,{name:Wn.SAVE_AND_DEACTIVATE,disabled:o,large:!0,text:(0,u.__)("Save and Deactivate","code-snippets")});default:case!r.active:return(0,on.jsx)(Ha,{name:Wn.SAVE_AND_ACTIVATE,primary:t,disabled:o,large:!0,text:(0,u.__)("Save and Activate","code-snippets")})}},qa=function(){var e,t=Ln().snippet,n=!(null===(e=window.CODE_SNIPPETS_EDIT)||void 0===e||!e.activateByDefault||t.active||"single-use"===t.scope||t.shared_network&&Wt());return(0,on.jsxs)(on.Fragment,{children:[n&&(0,on.jsx)(Wa,{primary:!n}),(0,on.jsx)($a,{primaryActivate:n}),!n&&(0,on.jsx)(Wa,{primary:!0})]})},Ga=function(){var e=Ln(),t=e.snippet,n=e.isWorking,r=Gn().submitSnippet;return(0,on.jsxs)("div",{className:"inline-form-field activation-switch-container",children:[(0,on.jsx)("h4",{children:(0,u.__)("Status")}),(0,on.jsxs)("label",{children:[t.active?(0,u.__)("Active","code-snippets"):(0,u.__)("Inactive","code-snippets"),(0,on.jsx)("input",{id:"activation-switch",type:"checkbox",checked:t.active,disabled:n||!!t.shared_network,className:"switch",onChange:function(){r(t.active?Wn.SAVE_AND_DEACTIVATE:Wn.SAVE_AND_ACTIVATE).then((function(){})).catch(Jn)}})]})]})},Ja=function(){var e=ln().snippetsAPI,t=Ln(),n=t.snippet,r=t.setIsWorking,i=t.isWorking,a=t.handleRequestError,c=(0,o.useState)(!1),p=(0,s.A)(c,2),d=p[0],f=p[1];return(0,on.jsxs)(on.Fragment,{children:[(0,on.jsx)(ir,{id:"delete-snippet",className:"delete-button",disabled:i,onClick:function(){f(!0)},children:(0,u.__)("Delete","code-snippets")}),(0,on.jsxs)(Xn,{open:d,title:(0,u.__)("Permanently delete?","code-snippets"),confirmLabel:(0,u.__)("Delete","code-snippets"),confirmButtonClassName:"is-destructive",onCancel:function(){return f(!1)},onConfirm:function(){f(!1),r(!0),e.delete(n).then((function(){var e;r(!1),window.location.replace((0,l.addQueryArgs)(null===(e=window.CODE_SNIPPETS)||void 0===e?void 0:e.urls.manage,{result:"deleted"}))})).catch((function(e){return a(e,(0,u.__)("Could not delete snippet.","code-snippets"))}))},children:[(0,on.jsxs)("p",{style:{marginBlockStart:0},children:[(0,u.__)("You are about to permanently delete this snippet.","code-snippets")," ",(0,u.__)("Are you sure?","code-snippets")]}),(0,on.jsx)("p",{children:(0,on.jsx)("strong",{children:(0,u.__)("This action cannot be undone.","code-snippets")})})]})]})},Ka=function(e){var t=e.block,n=e.inline,r=e.start,o=e.end,i=e.icon,s=e.className,a=e.children;return(0,on.jsxs)("div",{className:c()("tooltip",{"tooltip-block":t,"tooltip-inline":n,"tooltip-start":r,"tooltip-end":o},s),children:[null!=i?i:(0,on.jsx)("span",{className:"dashicons dashicons-editor-help"}),(0,on.jsx)("div",{className:"tooltip-content",children:a})]})};function Xa(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 Ya(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xa(Object(n),!0).forEach((function(t){Ht(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Za=function(){var e=Ln(),t=e.snippet,n=e.isReadOnly,r=e.setSnippet;return(0,on.jsxs)("div",{className:"snippet-priority inline-form-field",children:[(0,on.jsx)("h4",{children:(0,on.jsx)("label",{htmlFor:"snippet-priority",children:(0,u.__)("Priority","code-snippets")})}),(0,on.jsx)(Ka,{block:!0,end:!0,children:(0,u.__)("Snippets with a lower priority number will run before those with a higher number.","code-snippets")}),(0,on.jsx)("input",{type:"number",id:"snippet-priority",name:"snippet_priority",value:t.priority,disabled:n,onChange:function(e){return r((function(t){return Ya(Ya({},t),{},{priority:parseInt(e.target.value,10)})}))}})]})},Qa=function(){var e=Ln().codeEditorInstance;return(0,on.jsxs)("div",{children:[(0,on.jsx)("h4",{children:(0,on.jsx)("label",{htmlFor:"snippet-code-direction",children:(0,u.__)("Code Direction","code-snippets")})}),(0,on.jsxs)("select",{id:"snippet-code-direction",onChange:function(t){return null==e?void 0:e.codemirror.setOption("direction","rtl"===t.target.value?"rtl":"ltr")},children:[(0,on.jsx)("option",{value:"ltr",children:(0,u.__)("LTR","code-snippets")}),(0,on.jsx)("option",{value:"rtl",children:(0,u.__)("RTL","code-snippets")})]})]})},ec=function(e){var t=e.setIsUpgradeDialogOpen,n=Ln(),r=n.snippet,o=n.isWorking;return(0,on.jsxs)("div",{className:"snippet-editor-sidebar",children:[(0,on.jsxs)("div",{className:"box",children:[r.id&&!en(r)?(0,on.jsx)(Ga,{}):null,Wt()?(0,on.jsx)(Na,{}):null,(0,u.isRTL)()?(0,on.jsx)(Qa,{}):null,(0,on.jsx)(sr,{setIsDialogOpen:t}),(0,on.jsx)(fa,{}),(0,on.jsx)(Da,{}),(0,on.jsx)(Za,{}),r.id?(0,on.jsxs)("div",{className:"row-actions visible inline-form-field",children:[(0,on.jsx)(Va,{}),(0,on.jsx)(Ja,{})]}):null]}),(0,on.jsxs)("p",{className:"submit",children:[(0,on.jsx)(qa,{}),o?(0,on.jsx)(Kn.Spinner,{}):""]}),(0,on.jsx)(ba,{})]})},tc=function(){var e,t,n=(0,o.useState)(!1),r=(0,s.A)(n,2),i=r[0],a=r[1];return i||qt()||null!==(e=window.CODE_SNIPPETS_EDIT)&&void 0!==e&&e.hideUpsell?null:(0,on.jsxs)("div",{className:"code-snippets-upsell-banner",children:[(0,on.jsx)("img",{src:"".concat(null===(t=window.CODE_SNIPPETS)||void 0===t?void 0:t.urls.plugin,"/assets/icon.svg"),alt:(0,u.__)("Code Snippets logo","code-snippets"),height:"34"}),(0,on.jsx)("p",{children:(0,Yn.createInterpolateElement)((0,u.__)("Unlock <strong>cloud sync, snippet conditions, AI features</strong> and much more with Code Snippets Pro.","code-snippets"),{strong:(0,on.jsx)("strong",{})})}),(0,on.jsx)(Kn.ExternalLink,{className:"button button-primary button-large",href:"https://codesnippets.pro/pricing/",children:(0,u.__)("Get Started","code-snippets")}),(0,on.jsx)(ir,{small:!0,link:!0,onClick:function(){return a(!0)},children:(0,on.jsx)("span",{className:"dashicons dashicons-no-alt"})})]})};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){Ht(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,ic={css:"text/css",js:"javascript",php:"text/x-php",html:"application/x-httpd-php"},sc=[{value:"php",label:(0,u.__)("Functions","code-snippets")},{value:"html",label:(0,u.__)("Content","code-snippets")},{value:"css",label:(0,u.__)("Styles","code-snippets")},{value:"js",label:(0,u.__)("Scripts","code-snippets")},{value:"cond",label:(0,u.__)("Conditions","code-snippets")}],ac=function(e){var t=e.option,n=t.value,r=t.label,o=e.context;return(0,on.jsxs)("div",{className:c()("snippet-type-option",{"inverted-badges":tn(n)&&!qt()}),children:["menu"===o?(0,on.jsxs)("div",{children:[r,tn(n)&&!qt()?(0,on.jsx)(er,{name:"pro",small:!0,children:(0,u._x)("Pro","Upgrade to Pro","code-snippets")}):null]}):null,(0,on.jsx)(er,{name:n})]})},cc=function(e){var t=e.setIsUpgradeDialogOpen,n=Ln(),r=n.snippet,i=n.setSnippet,s=n.codeEditorInstance,a=n.isReadOnly,c=Qt(r);return(0,o.useEffect)((function(){if(s){var e=s.codemirror;e.setOption("lint","php"===c||"css"===c),"cond"!==c&&ic[c]&&(e.setOption("mode",ic[c]),e.refresh())}}),[s,c]),(0,on.jsxs)("div",{className:"snippet-type-container",children:[(0,on.jsx)("label",{htmlFor:"snippet-type-select-input",className:"screen-reader-text",children:(0,u.__)("Snippet Type","code-snippets")}),(0,on.jsx)(ca,{inputId:"snippet-type-select-input",className:"code-snippets-select",isDisabled:a,options:0===r.id?sc:sc.filter((function(e){return"cond"!==e.value})),menuPlacement:"bottom",styles:{menu:function(e){return rc(rc({},e),{},{zIndex:9999,width:"max-content",minWidth:"100%"})},input:function(e){return rc(rc({},e),{},{boxShadow:"none"})}},value:sc.find((function(e){return e.value===c})),formatOptionLabel:function(e,t){return(0,on.jsx)(ac,{option:e,context:t.context})},onChange:function(e){e&&tn(e.value)&&!qt()?t(!0):e&&i((function(t){return rc(rc({},t),{},{scope:zt[e.value][0]})}))}})]})};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}function lc(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){Ht(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}var pc=null===(oc=window.CODE_SNIPPETS_EDIT)||void 0===oc?void 0:oc.tagOptions,dc=function(){var e=Ln(),t=e.snippet,n=e.setSnippet,r=e.isReadOnly;return null!=pc&&pc.enabled?(0,on.jsxs)("div",{className:"snippet-tags-container",children:[(0,on.jsx)("h3",{children:(0,on.jsx)("label",{htmlFor:"components-form-token-input-0",children:(0,u.__)("Snippet Tags","code-snippets")})}),(0,on.jsx)(Kn.FormTokenField,{label:"",value:t.tags,disabled:r,suggestions:pc.availableTags,tokenizeOnBlur:!0,tokenizeOnSpace:!pc.allowSpaces,onChange:function(e){n((function(t){return lc(lc({},t),{},{tags:e.map((function(e){return"string"==typeof e?e:e.value}))})}))}})]}):null},fc=function(){return(0,on.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,on.jsx)("path",{d:"M12 3H15V6"}),(0,on.jsx)("path",{d:"M10.5 7.5L15 3L10.5 7.5Z"}),(0,on.jsx)("path",{d:"M6 15H3V12"}),(0,on.jsx)("path",{d:"M3 15L7.5 10.5L3 15Z"}),(0,on.jsx)("path",{d:"M12 15H15V12"}),(0,on.jsx)("path",{d:"M10.5 10.5L15 15L10.5 10.5Z"}),(0,on.jsx)("path",{d:"M6 3H3V6"}),(0,on.jsx)("path",{d:"M3 3L7.5 7.5L3 3Z"}),(0,on.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"})]})},hc=function(){return(0,on.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,on.jsx)("path",{d:"M3.75 6.75H6.75V3.75"}),(0,on.jsx)("path",{d:"M2.25 2.25L6.75 6.75L2.25 2.25Z"}),(0,on.jsx)("path",{d:"M3.75 11.25H6.75V14.25"}),(0,on.jsx)("path",{d:"M2.25 15.75L6.75 11.25L2.25 15.75Z"}),(0,on.jsx)("path",{d:"M14.25 6.75H11.25V3.75"}),(0,on.jsx)("path",{d:"M11.25 6.75L15.75 2.25L11.25 6.75Z"}),(0,on.jsx)("path",{d:"M14.25 11.25H11.25V14.25"}),(0,on.jsx)("path",{d:"M11.25 11.25L15.75 15.75L11.25 11.25Z"}),(0,on.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"})]})},mc={Cmd:(0,u._x)("Cmd","keyboard key","code-snippets"),Ctrl:(0,u._x)("Ctrl","keyboard key","code-snippets"),Shift:(0,u._x)("Shift","keyboard key","code-snippets"),Option:(0,u._x)("Option","keyboard key","code-snippets"),Alt:(0,u._x)("Alt","keyboard key","code-snippets"),Tab:(0,u._x)("Tab","keyboard key","code-snippets"),Up:(0,u._x)("Up","keyboard key","code-snippets"),Down:(0,u._x)("Down","keyboard key","code-snippets"),A:(0,u._x)("A","keyboard key","code-snippets"),D:(0,u._x)("D","keyboard key","code-snippets"),F:(0,u._x)("F","keyboard key","code-snippets"),G:(0,u._x)("G","keyboard key","code-snippets"),R:(0,u._x)("R","keyboard key","code-snippets"),S:(0,u._x)("S","keyboard key","code-snippets"),Y:(0,u._x)("Y","keyboard key","code-snippets"),Z:(0,u._x)("Z","keyboard key","code-snippets"),"/":(0,u._x)("/","keyboard key","code-snippets"),"[":(0,u._x)("]","keyboard key","code-snippets"),"]":(0,u._x)("]","keyboard key","code-snippets")},vc={saveChanges:{label:(0,u.__)("Save changes","code-snippets"),mod:"Cmd",key:"S"},selectAll:{label:(0,u.__)("Select all","code-snippets"),mod:"Cmd",key:"A"},beginSearch:{label:(0,u.__)("Begin searching","code-snippets"),mod:"Cmd",key:"F"},findNext:{label:(0,u.__)("Find next","code-snippets"),mod:"Cmd",key:"G"},findPrevious:{label:(0,u.__)("Find previous","code-snippets"),mod:["Shift","Cmd"],key:"G"},replace:{label:(0,u.__)("Replace","code-snippets"),mod:["Shift","Cmd"],key:"F"},replaceAll:{label:(0,u.__)("Replace all","code-snippets"),mod:["Shift","Cmd","Option"],key:"R"},search:{label:(0,u.__)("Persistent search","code-snippets"),mod:"Alt",key:"F"},toggleComment:{label:(0,u.__)("Toggle comment","code-snippets"),mod:"Cmd",key:"/"},swapLineUp:{label:(0,u.__)("Swap line up","code-snippets"),mod:"Option",key:"Up"},swapLineDown:{label:(0,u.__)("Swap line down","code-snippets"),mod:"Option",key:"Down"},autoIndent:{label:(0,u.__)("Auto-indent current line or selection","code-snippets"),mod:"Shift",key:"Tab"}},bc=(0,u._x)("-","keyboard shortcut separator","code-snippets"),gc=function(e){var t=e.modifier;switch(t){case"Ctrl":case"Cmd":return(0,on.jsxs)(on.Fragment,{children:[(0,on.jsx)("kbd",{className:"pc-key",children:mc.Ctrl}),(0,on.jsx)("kbd",{className:"mac-key",children:mc.Cmd}),bc]});case"Option":return(0,on.jsxs)("span",{className:"mac-key",children:[(0,on.jsx)("kbd",{className:"mac-key",children:mc.Option}),bc]});default:return(0,on.jsxs)(on.Fragment,{children:[(0,on.jsx)("kbd",{children:mc[t]}),bc]})}},yc=function(e){var t=e.editorTheme;return(0,on.jsxs)("div",{className:"snippet-editor-help tooltip tooltip-inline tooltip-start",children:[(0,on.jsx)("span",{className:"dashicons dashicons-editor-help cm-s-".concat(t)}),(0,on.jsx)("div",{className:c()("tooltip-content",{"platform-mac":$t()}),children:(0,on.jsx)("table",{children:(0,on.jsx)("tbody",{children:Object.entries(vc).map((function(e){var t=(0,s.A)(e,2),n=t[0],r=t[1],o=r.label,i=r.mod,a=r.key;return(0,on.jsxs)("tr",{children:[(0,on.jsx)("td",{children:o}),(0,on.jsxs)("td",{children:[(Array.isArray(i)?i:[i]).map((function(e){return(0,on.jsx)("span",{children:(0,on.jsx)(gc,{modifier:e})},e)})),(0,on.jsx)("kbd",{children:mc[a]})]})]},n)}))})})})]})};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 Oc(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){Ht(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 xc=function(e){var t,n,r=e.textareaRef,o=Ln(),i=o.snippet,s=o.setSnippet;return(0,on.jsxs)("div",{className:"snippet-editor",children:[(0,on.jsx)("textarea",{ref:r,id:"snippet-code",name:"snippet_code",value:i.code,rows:200,spellCheck:!1,onChange:function(e){s((function(t){return Oc(Oc({},t),{},{code:e.target.value})}))}}),(0,on.jsx)(yc,{editorTheme:null!==(t=null===(n=window.CODE_SNIPPETS_EDIT)||void 0===n?void 0:n.editorTheme)&&void 0!==t?t:"default"})]})},jc=function(e){var t=e.isExpanded,n=e.setIsExpanded,r=Ln(),i=r.snippet,s=r.setSnippet,a=r.codeEditorInstance,c=r.setCodeEditorInstance,l=Gn().submitSnippet,p=(0,o.useRef)(null);return(0,o.useEffect)((function(){c((function(e){return p.current&&!e&&(e=window.wp.codeEditor.initialize(p.current)).codemirror.on("changes",(function(e){s((function(t){return Oc(Oc({},t),{},{code:e.getValue()})}))})),e}))}),[c,p,s]),(0,o.useEffect)((function(){if(a){var e,t=null!==(e=a.codemirror.getOption("extraKeys"))&&void 0!==e?e:{},n=$t()?"Cmd":"Ctrl",r=function(){l().then((function(){})).catch(Jn)};a.codemirror.setOption("extraKeys",Oc(Oc({},"object"===(0,Ut.A)(t)?t:void 0),{},Ht(Ht({},"".concat(n,"-S"),r),"".concat(n,"-Enter"),r)))}}),[l,a,i]),(0,on.jsxs)("div",{className:"snippet-code-container",children:[(0,on.jsxs)("div",{className:"above-snippet-code",children:[(0,on.jsx)("h2",{children:(0,on.jsx)("label",{htmlFor:"snippet-code",children:(0,u.__)("Snippet Content","code-snippets")})}),(0,on.jsxs)(ir,{small:!0,className:"expand-editor-button",onClick:function(){return n((function(e){return!e}))},children:[t?(0,on.jsx)(hc,{}):(0,on.jsx)(fc,{}),t?(0,u.__)("Minimize","code-snippets"):(0,u.__)("Expand","code-snippets")]})]}),(0,on.jsx)(xc,{textareaRef:p})]})};const Sc=window.wp.domReady;var Ec=n.n(Sc);function _c(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 Cc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_c(Object(n),!0).forEach((function(t){Ht(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pc="snippet_description",kc=[["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"]],Ac=function(){var e,t=Ln(),n=t.snippet,r=t.setSnippet,i=t.isReadOnly,s=(0,o.useCallback)((function(e){return r((function(t){return Cc(Cc({},t),{},{desc:e})}))}),[r]);return(0,o.useEffect)((function(){Ec()((function(){return function(e){var t,n;null===(t=window.wp.editor)||void 0===t||t.initialize(Pc,{mediaButtons:null===(n=window.CODE_SNIPPETS_EDIT)||void 0===n?void 0:n.descEditorOptions.mediaButtons,quicktags:!0,tinymce:{toolbar:kc.map((function(e){return e.join(" ")})),setup:function(t){t.on("change",(function(){return e(t.getContent())}))}}})}(s)}))}),[s]),(0,on.jsx)("textarea",{id:Pc,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})},Rc=function(){var e;return null!==(e=window.CODE_SNIPPETS_EDIT)&&void 0!==e&&e.enableDescription?(0,on.jsxs)("div",{className:"snippet-description-container",children:[(0,on.jsx)("h2",{children:(0,on.jsx)("label",{htmlFor:Pc,children:(0,u.__)("Description","code-snippets")})}),(0,on.jsx)(Ac,{})]}):null};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 Ic(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){Ht(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 Tc=function(){var e=Ln(),t=e.snippet,n=e.setSnippet,r=e.isReadOnly;return(0,on.jsx)("div",{id:"titlediv",children:(0,on.jsxs)("div",{id:"titlewrap",children:[(0,on.jsx)("label",{htmlFor:"title",className:"screen-reader-text",children:(0,u.__)("Name","code-snippets")}),(0,on.jsx)("input",{id:"title",type:"text",name:"snippet_name",autoComplete:"off",value:t.name,disabled:r,placeholder:(0,u.__)("Enter snippet title","code-snippets"),onChange:function(e){return n((function(t){return Ic(Ic({},t),{},{name:e.target.value})}))}})]})})},Nc=window.CODE_SNIPPETS_EDIT,Lc=function(e){return"condition"===e.scope?(0,u.__)("Add New Condition","code-snippets"):(0,u.__)("Add New Snippet","code-snippets")},Mc=function(){var e,t=Ln(),n=t.snippet,r=t.updateSnippet,o=t.setCurrentNotice;return(0,on.jsxs)("h1",{children:[n.id?(0,on.jsxs)(on.Fragment,{children:["".concat("condition"===n.scope?(0,u.__)("Edit Condition","code-snippets"):(0,u.__)("Edit Snippet","code-snippets")," "),(0,on.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 Zt({scope:t})})),o(void 0),window.document.title=window.document.title.replace((0,u.__)("Edit Snippet","code-snippets"),Lc(n)).replace((0,u.__)("Edit Condition","code-snippets"),Lc(n)),window.history.pushState({},"",null===(t=window.CODE_SNIPPETS)||void 0===t?void 0:t.urls.addNew)},children:(0,u._x)("Add New","snippet","code-snippets")})]}):Lc(n),(null==Nc?void 0:Nc.pageTitleActions)&&Object.entries(Nc.pageTitleActions).map((function(e){var t=(0,s.A)(e,2),n=t[0],r=t[1];return(0,on.jsxs)(on.Fragment,{children:[(0,on.jsx)("a",{href:r,className:"page-title-action",children:n},n)," "]})}))]})},Fc=function(e){var t=e.snippet,n=e.isReadOnly,r=e.isExpanded;return c()("snippet-form",r?"snippet-form-expanded":"snippet-form-collapsed","".concat(t.scope,"-snippet"),"".concat(Qt(t),"-snippet"),"".concat(t.id?"saved":"new","-snippet"),"".concat(t.active?"active":"inactive","-snippet"),{"erroneous-snippet":!!t.code_error,"read-only-snippet":n})},Vc=function(e){var t=e.doSubmit,n=e.submitAction,r=e.setSubmitAction,o=e.validationWarning,i=e.setValidationWarning;return(0,on.jsx)(Xn,{open:void 0!==o,title:(0,u.__)("Snippet incomplete","code-snippets"),confirmLabel:(0,u.__)("Continue","code-snippets"),onCancel:function(){r(void 0),i(void 0)},onConfirm:function(){t(n),r(void 0),i(void 0)},children:(0,on.jsx)("p",{children:"".concat(o," ").concat((0,u.__)("Continue?","code-snippets"))})})},Uc=function(e){var t=e.children,n=e.className,r=Gn().submitSnippet,i=Ln().snippet,a=mn().refreshSnippetsList,c=(0,o.useState)(),p=(0,s.A)(c,2),d=p[0],f=p[1],h=(0,o.useState)(),m=(0,s.A)(h,2),v=m[0],b=m[1],g=function(e){r(e).then((function(e){if(e&&0!==e.id&&window.CODE_SNIPPETS&&window.location.href.toString().includes(window.CODE_SNIPPETS.urls.addNew)){document.title=document.title.replace((0,u.__)("Add New Snippet","code-snippets"),(0,u.__)("Edit Snippet","code-snippets")).replace((0,u.__)("Add New Condition","code-snippets"),(0,u.__)("Edit Condition","code-snippets"));var t=(0,l.addQueryArgs)(window.CODE_SNIPPETS.urls.edit,{id:e.id});window.history.pushState({},document.title,t)}})).then(a).catch(Jn)};return(0,on.jsxs)(on.Fragment,{children:[(0,on.jsx)("form",{id:"snippet-form",method:"post",onSubmit:function(e){e.preventDefault();var t=Object.values(Wn).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,u.__)("This snippet has no code or title.","code-snippets");case n:return(0,u.__)("This snippet has no snippet code.","code-snippets");case t:return(0,u.__)("This snippet has no title.","code-snippets");default:return}}(i);n?(f(n),b(t)):g(t)},className:n,children:t}),(0,on.jsx)(Vc,{doSubmit:g,submitAction:v,setSubmitAction:b,validationWarning:d,setValidationWarning:f})]})},Bc=function(){var e=Ln().snippet;return en(e)?(0,on.jsx)("div",{id:"snippet_conditions",className:"snippet-condition-editor-container",children:(0,on.jsx)("p",{children:(0,u.__)("This snippet type is not supported in this version of Code Snippets.")})}):null},Hc=function(){var e,t,n=Ln(),r=n.snippet,i=n.isReadOnly,a=(0,o.useState)(!1),c=(0,s.A)(a,2),p=c[0],d=c[1],f=(0,o.useState)(!1),h=(0,s.A)(f,2),m=h[0],v=h[1];return(0,on.jsxs)("div",{className:"wrap",children:[(0,on.jsx)("p",{children:(0,on.jsx)("small",{children:en(r)?(0,on.jsx)("a",{href:(0,l.addQueryArgs)(null===(e=window.CODE_SNIPPETS)||void 0===e?void 0:e.urls.manage,{type:"cond"}),children:(0,u.__)("Back to all conditions","code-snippets")}):(0,on.jsx)("a",{href:null===(t=window.CODE_SNIPPETS)||void 0===t?void 0:t.urls.manage,children:(0,u.__)("Back to all snippets","code-snippets")})})}),(0,on.jsx)(Mc,{}),(0,on.jsxs)(Uc,{className:Fc({snippet:r,isReadOnly:i,isExpanded:p}),children:[(0,on.jsxs)("main",{className:"snippet-form-upper",children:[(0,on.jsxs)("div",{className:"snippet-name-wrapper",children:[(0,on.jsx)(Tc,{}),(0,on.jsx)(cc,{setIsUpgradeDialogOpen:v})]}),(0,on.jsx)(jc,{isExpanded:p,setIsExpanded:d}),(0,on.jsx)(Bc,{})]}),(0,on.jsxs)("div",{className:"snippet-form-lower",children:[(0,on.jsx)(tc,{}),(0,on.jsx)(Rc,{}),(0,on.jsx)(dc,{})]}),(0,on.jsx)(ec,{setIsUpgradeDialogOpen:v})]}),(0,on.jsx)(Zn,{isOpen:m,setIsOpen:v})]})},zc=function(){return(0,on.jsx)(pn,{children:(0,on.jsx)(vn,{children:(0,on.jsx)(Mn,{initialSnippet:function(){var e;return Zt(null===(e=window.CODE_SNIPPETS_EDIT)||void 0===e?void 0:e.snippet)},children:(0,on.jsx)(Hc,{})})})})},Wc=document.getElementById("edit-snippet-form-container");Wc?(0,i.H)(Wc).render((0,on.jsx)(zc,{})):console.error("Could not find snippet edit form container.")},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 u=Object.defineProperty,l=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=l(n);p&&(s=s.concat(p(n)));for(var a=c(t),m=c(n),v=0;v<s.length;++v){var b=s[v];if(!(i[b]||r&&r[b]||m&&m[b]||a&&a[b])){var g=d(n,b);try{u(t,b,g)}catch(e){}}}}return t}},5338:(e,t,n)=>{"use strict";var r=n(5795);t.H=r.createRoot,r.hydrateRoot},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"),u=Symbol.for("react.forward_ref"),l=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 v(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 l:case p:return e;default:switch(e=e&&e.$$typeof){case c:case u: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=u,t.Fragment=o,t.Lazy=f,t.Memo=d,t.Portal=r,t.Profiler=s,t.StrictMode=i,t.Suspense=l,t.SuspenseList=p,t.isContextConsumer=function(e){return v(e)===a},t.isContextProvider=function(e){return v(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return v(e)===u},t.isFragment=function(e){return v(e)===o},t.isLazy=function(e){return v(e)===f},t.isMemo=function(e){return v(e)===d},t.isPortal=function(e){return v(e)===r},t.isProfiler=function(e){return v(e)===s},t.isStrictMode=function(e){return v(e)===i},t.isSuspense=function(e){return v(e)===l},t.isSuspenseList=function(e){return v(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===i||e===l||e===p||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===c||e.$$typeof===a||e.$$typeof===u||e.$$typeof===m||void 0!==e.getModuleId)},t.typeOf=v},4363:(e,t,n)=>{"use strict";e.exports=n(4405)},1020:(e,t,n)=>{"use strict";var r=n(1609),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,i={},u=null,l=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,r)&&!c.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:u,ref:l,props:i,_owner:a.current}}t.Fragment=i,t.jsx=u,t.jsxs=u},4848:(e,t,n)=>{"use strict";e.exports=n(1020)},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM},4633:(e,t,n)=>{var r=n(3738).default;function o(){"use strict";e.exports=o=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},i=Object.prototype,s=i.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",p=c.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(t){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof w?t:w,i=Object.create(o.prototype),s=new I(r||[]);return a(i,"_invoke",{value:k(e,n,s)}),i}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=f;var m="suspendedStart",v="suspendedYield",b="executing",g="completed",y={};function w(){}function O(){}function x(){}var j={};d(j,u,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(T([])));E&&E!==i&&s.call(E,u)&&(j=E);var _=x.prototype=w.prototype=Object.create(j);function C(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(o,i,a,c){var u=h(e[o],e,i);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==r(p)&&s.call(p,"__await")?t.resolve(p.__await).then((function(e){n("next",e,a,c)}),(function(e){n("throw",e,a,c)})):t.resolve(p).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,c)}))}c(u.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function k(e,n,r){var o=m;return function(i,s){if(o===b)throw Error("Generator is already running");if(o===g){if("throw"===i)throw s;return{value:t,done:!0}}for(r.method=i,r.arg=s;;){var a=r.delegate;if(a){var c=A(a,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===m)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=b;var u=h(e,n,r);if("normal"===u.type){if(o=r.done?g:v,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=g,r.method="throw",r.arg=u.arg)}}}function A(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,A(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var i=h(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;var s=i.arg;return s?s.done?(n[e.resultName]=s.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function R(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(s.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(r(e)+" is not iterable")}return O.prototype=x,a(_,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:O,configurable:!0}),O.displayName=d(x,p,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===O||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,d(e,p,"GeneratorFunction")),e.prototype=Object.create(_),e},n.awrap=function(e){return{__await:e}},C(P.prototype),d(P.prototype,l,(function(){return this})),n.AsyncIterator=P,n.async=function(e,t,r,o,i){void 0===i&&(i=Promise);var s=new P(f(e,t,r,o),i);return n.isGeneratorFunction(t)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},C(_),d(_,p,"Generator"),d(_,u,(function(){return this})),d(_,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},n.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(D),!e)for(var n in this)"t"===n.charAt(0)&&s.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,o){return a.type="throw",a.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=s.call(i,"catchLoc"),u=s.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&s.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),D(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;D(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},n}e.exports=o,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)}()},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=896)}]);