| 2 |
(()=>{var t,e={4206:(t,e,r)=>{t.exports=r(8057)},4387:(t,e,r)=>{"use strict";var n=r(7485),o=r(4570),i=r(2940),a=r(581),c=r(574),s=r(3845),u=r(8338),l=r(4832),f=r(7354),h=r(8870),d=r(4906);t.exports=function(t){return new Promise((function(e,r){var p,y=t.data,v=t.headers,m=t.responseType;function g(){t.cancelToken&&t.cancelToken.unsubscribe(p),t.signal&&t.signal.removeEventListener("abort",p)}n.isFormData(y)&&n.isStandardBrowserEnv()&&delete v["Content-Type"];var x=new XMLHttpRequest;if(t.auth){var w=t.auth.username||"",b=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";v.Authorization="Basic "+btoa(w+":"+b)}var E=c(t.baseURL,t.url);function j(){if(x){var n="getAllResponseHeaders"in x?s(x.getAllResponseHeaders()):null,i={data:m&&"text"!==m&&"json"!==m?x.response:x.responseText,status:x.status,statusText:x.statusText,headers:n,config:t,request:x};o((function(t){e(t),g()}),(function(t){r(t),g()}),i),x=null}}if(x.open(t.method.toUpperCase(),a(E,t.params,t.paramsSerializer),!0),x.timeout=t.timeout,"onloadend"in x?x.onloadend=j:x.onreadystatechange=function(){x&&4===x.readyState&&(0!==x.status||x.responseURL&&0===x.responseURL.indexOf("file:"))&&setTimeout(j)},x.onabort=function(){x&&(r(new f("Request aborted",f.ECONNABORTED,t,x)),x=null)},x.onerror=function(){r(new f("Network Error",f.ERR_NETWORK,t,x,x)),x=null},x.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",n=t.transitional||l;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new f(e,n.clarifyTimeoutError?f.ETIMEDOUT:f.ECONNABORTED,t,x)),x=null},n.isStandardBrowserEnv()){var _=(t.withCredentials||u(E))&&t.xsrfCookieName?i.read(t.xsrfCookieName):void 0;_&&(v[t.xsrfHeaderName]=_)}"setRequestHeader"in x&&n.forEach(v,(function(t,e){void 0===y&&"content-type"===e.toLowerCase()?delete v[e]:x.setRequestHeader(e,t)})),n.isUndefined(t.withCredentials)||(x.withCredentials=!!t.withCredentials),m&&"json"!==m&&(x.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&x.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&x.upload&&x.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(p=function(t){x&&(r(!t||t&&t.type?new h:t),x.abort(),x=null)},t.cancelToken&&t.cancelToken.subscribe(p),t.signal&&(t.signal.aborted?p():t.signal.addEventListener("abort",p))),y||(y=null);var L=d(E);L&&-1===["http","https","file"].indexOf(L)?r(new f("Unsupported protocol "+L+":",f.ERR_BAD_REQUEST,t)):x.send(y)}))}},8057:(t,e,r)=>{"use strict";var n=r(7485),o=r(875),i=r(5029),a=r(4941);var c=function t(e){var r=new i(e),c=o(i.prototype.request,r);return n.extend(c,i.prototype,r),n.extend(c,r),c.create=function(r){return t(a(e,r))},c}(r(8396));c.Axios=i,c.CanceledError=r(8870),c.CancelToken=r(4603),c.isCancel=r(1475),c.VERSION=r(3345).version,c.toFormData=r(1020),c.AxiosError=r(7354),c.Cancel=c.CanceledError,c.all=function(t){return Promise.all(t)},c.spread=r(5739),c.isAxiosError=r(5835),t.exports=c,t.exports.default=c},4603:(t,e,r)=>{"use strict";var n=r(8870);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;this.promise.then((function(t){if(r._listeners){var e,n=r._listeners.length;for(e=0;e<n;e++)r._listeners[e](t);r._listeners=null}})),this.promise.then=function(t){var e,n=new Promise((function(t){r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t){r.reason||(r.reason=new n(t),e(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},o.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},o.source=function(){var t;return{token:new o((function(e){t=e})),cancel:t}},t.exports=o},8870:(t,e,r)=>{"use strict";var n=r(7354);function o(t){n.call(this,null==t?"canceled":t,n.ERR_CANCELED),this.name="CanceledError"}r(7485).inherits(o,n,{__CANCEL__:!0}),t.exports=o},1475:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},5029:(t,e,r)=>{"use strict";var n=r(7485),o=r(581),i=r(8096),a=r(5009),c=r(4941),s=r(574),u=r(6144),l=u.validators;function f(t){this.defaults=t,this.interceptors={request:new i,response:new i}}f.prototype.request=function(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},(e=c(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;void 0!==r&&u.assertOptions(r,{silentJSONParsing:l.transitional(l.boolean),forcedJSONParsing:l.transitional(l.boolean),clarifyTimeoutError:l.transitional(l.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(o=o&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,s=[];if(this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)})),!o){var f=[a,void 0];for(Array.prototype.unshift.apply(f,n),f=f.concat(s),i=Promise.resolve(e);f.length;)i=i.then(f.shift(),f.shift());return i}for(var h=e;n.length;){var d=n.shift(),p=n.shift();try{h=d(h)}catch(t){p(t);break}}try{i=a(h)}catch(t){return Promise.reject(t)}for(;s.length;)i=i.then(s.shift(),s.shift());return i},f.prototype.getUri=function(t){t=c(this.defaults,t);var e=s(t.baseURL,t.url);return o(e,t.params,t.paramsSerializer)},n.forEach(["delete","get","head","options"],(function(t){f.prototype[t]=function(e,r){return this.request(c(r||{},{method:t,url:e,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,o){return this.request(c(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}f.prototype[t]=e(),f.prototype[t+"Form"]=e(!0)})),t.exports=f},7354:(t,e,r)=>{"use strict";var n=r(7485);function o(t,e,r,n,o){Error.call(this),this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}n.inherits(o,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var i=o.prototype,a={};["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"].forEach((function(t){a[t]={value:t}})),Object.defineProperties(o,a),Object.defineProperty(i,"isAxiosError",{value:!0}),o.from=function(t,e,r,a,c,s){var u=Object.create(i);return n.toFlatObject(t,u,(function(t){return t!==Error.prototype})),o.call(u,t.message,e,r,a,c),u.name=t.name,s&&Object.assign(u,s),u},t.exports=o},8096:(t,e,r)=>{"use strict";var n=r(7485);function o(){this.handlers=[]}o.prototype.use=function(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){n.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},574:(t,e,r)=>{"use strict";var n=r(2642),o=r(2288);t.exports=function(t,e){return t&&!n(e)?o(t,e):e}},5009:(t,e,r)=>{"use strict";var n=r(7485),o=r(9212),i=r(1475),a=r(8396),c=r(8870);function s(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new c}t.exports=function(t){return s(t),t.headers=t.headers||{},t.data=o.call(t,t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return s(t),e.data=o.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return i(e)||(s(t),e&&e.response&&(e.response.data=o.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},4941:(t,e,r)=>{"use strict";var n=r(7485);t.exports=function(t,e){e=e||{};var r={};function o(t,e){return n.isPlainObject(t)&&n.isPlainObject(e)?n.merge(t,e):n.isPlainObject(e)?n.merge({},e):n.isArray(e)?e.slice():e}function i(r){return n.isUndefined(e[r])?n.isUndefined(t[r])?void 0:o(void 0,t[r]):o(t[r],e[r])}function a(t){if(!n.isUndefined(e[t]))return o(void 0,e[t])}function c(r){return n.isUndefined(e[r])?n.isUndefined(t[r])?void 0:o(void 0,t[r]):o(void 0,e[r])}function s(r){return r in e?o(t[r],e[r]):r in t?o(void 0,t[r]):void 0}var u={url:a,method:a,data:a,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:s};return n.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=u[t]||i,o=e(t);n.isUndefined(o)&&e!==s||(r[t]=o)})),r}},4570:(t,e,r)=>{"use strict";var n=r(7354);t.exports=function(t,e,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?e(new n("Request failed with status code "+r.status,[n.ERR_BAD_REQUEST,n.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}},9212:(t,e,r)=>{"use strict";var n=r(7485),o=r(8396);t.exports=function(t,e,r){var i=this||o;return n.forEach(r,(function(r){t=r.call(i,t,e)})),t}},8396:(t,e,r)=>{"use strict";var n=r(7061),o=r(7485),i=r(1446),a=r(7354),c=r(4832),s=r(1020),u={"Content-Type":"application/x-www-form-urlencoded"};function l(t,e){!o.isUndefined(t)&&o.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var f,h={transitional:c,adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==n&&"[object process]"===Object.prototype.toString.call(n))&&(f=r(4387)),f),transformRequest:[function(t,e){if(i(e,"Accept"),i(e,"Content-Type"),o.isFormData(t)||o.isArrayBuffer(t)||o.isBuffer(t)||o.isStream(t)||o.isFile(t)||o.isBlob(t))return t;if(o.isArrayBufferView(t))return t.buffer;if(o.isURLSearchParams(t))return l(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var r,n=o.isObject(t),a=e&&e["Content-Type"];if((r=o.isFileList(t))||n&&"multipart/form-data"===a){var c=this.env&&this.env.FormData;return s(r?{"files[]":t}:t,c&&new c)}return n||"application/json"===a?(l(e,"application/json"),function(t,e,r){if(o.isString(t))try{return(e||JSON.parse)(t),o.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||h.transitional,r=e&&e.silentJSONParsing,n=e&&e.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||n&&o.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(i){if("SyntaxError"===t.name)throw a.from(t,a.ERR_BAD_RESPONSE,this,null,this.response);throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:r(8750)},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(t){h.headers[t]={}})),o.forEach(["post","put","patch"],(function(t){h.headers[t]=o.merge(u)})),t.exports=h},4832:t=>{"use strict";t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},3345:t=>{t.exports={version:"0.27.2"}},875:t=>{"use strict";t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return t.apply(e,r)}}},581:(t,e,r)=>{"use strict";var n=r(7485);function o(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,r){if(!e)return t;var i;if(r)i=r(e);else if(n.isURLSearchParams(e))i=e.toString();else{var a=[];n.forEach(e,(function(t,e){null!=t&&(n.isArray(t)?e+="[]":t=[t],n.forEach(t,(function(t){n.isDate(t)?t=t.toISOString():n.isObject(t)&&(t=JSON.stringify(t)),a.push(o(e)+"="+o(t))})))})),i=a.join("&")}if(i){var c=t.indexOf("#");-1!==c&&(t=t.slice(0,c)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}},2288:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},2940:(t,e,r)=>{"use strict";var n=r(7485);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,o,i,a){var c=[];c.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&c.push("expires="+new Date(r).toGMTString()),n.isString(o)&&c.push("path="+o),n.isString(i)&&c.push("domain="+i),!0===a&&c.push("secure"),document.cookie=c.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},2642:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}},5835:(t,e,r)=>{"use strict";var n=r(7485);t.exports=function(t){return n.isObject(t)&&!0===t.isAxiosError}},8338:(t,e,r)=>{"use strict";var n=r(7485);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return t=o(window.location.href),function(e){var r=n.isString(e)?o(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},1446:(t,e,r)=>{"use strict";var n=r(7485);t.exports=function(t,e){n.forEach(t,(function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])}))}},8750:t=>{t.exports=null},3845:(t,e,r)=>{"use strict";var n=r(7485),o=["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"];t.exports=function(t){var e,r,i,a={};return t?(n.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=n.trim(t.substr(0,i)).toLowerCase(),r=n.trim(t.substr(i+1)),e){if(a[e]&&o.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}})),a):a}},4906:t=>{"use strict";t.exports=function(t){var e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}},5739:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},1020:(t,e,r)=>{"use strict";var n=r(816).lW,o=r(7485);t.exports=function(t,e){e=e||new FormData;var r=[];function i(t){return null===t?"":o.isDate(t)?t.toISOString():o.isArrayBuffer(t)||o.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):n.from(t):t}return function t(n,a){if(o.isPlainObject(n)||o.isArray(n)){if(-1!==r.indexOf(n))throw Error("Circular reference detected in "+a);r.push(n),o.forEach(n,(function(r,n){if(!o.isUndefined(r)){var c,s=a?a+"."+n:n;if(r&&!a&&"object"==typeof r)if(o.endsWith(n,"{}"))r=JSON.stringify(r);else if(o.endsWith(n,"[]")&&(c=o.toArray(r)))return void c.forEach((function(t){!o.isUndefined(t)&&e.append(s,i(t))}));t(r,s)}})),r.pop()}else e.append(a,i(n))}(t),e}},6144:(t,e,r)=>{"use strict";var n=r(3345).version,o=r(7354),i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));var a={};i.transitional=function(t,e,r){function i(t,e){return"[Axios v"+n+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,n,c){if(!1===t)throw new o(i(n," has been removed"+(e?" in "+e:"")),o.ERR_DEPRECATED);return e&&!a[n]&&(a[n]=!0,console.warn(i(n," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,n,c)}},t.exports={assertOptions:function(t,e,r){if("object"!=typeof t)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(t),i=n.length;i-- >0;){var a=n[i],c=e[a];if(c){var s=t[a],u=void 0===s||c(s,a,t);if(!0!==u)throw new o("option "+a+" must be "+u,o.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new o("Unknown option "+a,o.ERR_BAD_OPTION)}},validators:i}},7485:(t,e,r)=>{"use strict";var n,o=r(875),i=Object.prototype.toString,a=(n=Object.create(null),function(t){var e=i.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())});function c(t){return t=t.toLowerCase(),function(e){return a(e)===t}}function s(t){return Array.isArray(t)}function u(t){return void 0===t}var l=c("ArrayBuffer");function f(t){return null!==t&&"object"==typeof t}function h(t){if("object"!==a(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}var d=c("Date"),p=c("File"),y=c("Blob"),v=c("FileList");function m(t){return"[object Function]"===i.call(t)}var g=c("URLSearchParams");function x(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}var w,b=(w="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(t){return w&&t instanceof w});t.exports={isArray:s,isArrayBuffer:l,isBuffer:function(t){return null!==t&&!u(t)&&null!==t.constructor&&!u(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){var e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||i.call(t)===e||m(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&l(t.buffer)},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:f,isPlainObject:h,isUndefined:u,isDate:d,isFile:p,isBlob:y,isFunction:m,isStream:function(t){return f(t)&&m(t.pipe)},isURLSearchParams:g,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:x,merge:function t(){var e={};function r(r,n){h(e[n])&&h(r)?e[n]=t(e[n],r):h(r)?e[n]=t({},r):s(r)?e[n]=r.slice():e[n]=r}for(var n=0,o=arguments.length;n<o;n++)x(arguments[n],r);return e},extend:function(t,e,r){return x(e,(function(e,n){t[n]=r&&"function"==typeof e?o(e,r):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t},inherits:function(t,e,r,n){t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,r&&Object.assign(t.prototype,r)},toFlatObject:function(t,e,r){var n,o,i,a={};e=e||{};do{for(o=(n=Object.getOwnPropertyNames(t)).length;o-- >0;)a[i=n[o]]||(e[i]=t[i],a[i]=!0);t=Object.getPrototypeOf(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:a,kindOfTest:c,endsWith:function(t,e,r){t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;var n=t.indexOf(e,r);return-1!==n&&n===r},toArray:function(t){if(!t)return null;var e=t.length;if(u(e))return null;for(var r=new Array(e);e-- >0;)r[e]=t[e];return r},isTypedArray:b,isFileList:v}},4106:(t,e,r)=>{"use strict";const n=wp.blocks,o=wp.element;var i=r(7363),a=r.n(i);function c(t){let e;const r=new Set,n=(t,n)=>{const o="function"==typeof t?t(e):t;if(o!==e){const t=e;e=n?o:Object.assign({},e,o),r.forEach((r=>r(e,t)))}},o=()=>e,i={setState:n,getState:o,subscribe:(t,n,i)=>n||i?((t,n=o,i=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let a=n(e);function c(){const r=n(e);if(!i(a,r)){const e=a;t(a=r,e)}}return r.add(c),()=>r.delete(c)})(t,n,i):(r.add(t),()=>r.delete(t)),destroy:()=>r.clear()};return e=t(n,o,i),i}const s="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?i.useEffect:i.useLayoutEffect;function u(t){const e="function"==typeof t?c(t):t,r=(t=e.getState,r=Object.is)=>{const[,n]=(0,i.useReducer)((t=>t+1),0),o=e.getState(),a=(0,i.useRef)(o),c=(0,i.useRef)(t),u=(0,i.useRef)(r),l=(0,i.useRef)(!1),f=(0,i.useRef)();let h;void 0===f.current&&(f.current=t(o));let d=!1;(a.current!==o||c.current!==t||u.current!==r||l.current)&&(h=t(o),d=!r(f.current,h)),s((()=>{d&&(f.current=h),a.current=o,c.current=t,u.current=r,l.current=!1}));const p=(0,i.useRef)(o);s((()=>{const t=()=>{try{const t=e.getState(),r=c.current(t);u.current(f.current,r)||(a.current=t,f.current=r,n())}catch(t){l.current=!0,n()}},r=e.subscribe(t);return e.getState()!==p.current&&t(),r}),[]);const y=d?h:f.current;return(0,i.useDebugValue)(y),y};return Object.assign(r,e),r[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const t=[r,e];return{next(){const e=t.length<=0;return{value:t.shift(),done:e}}}},r}Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;const l=t=>(e,r,n)=>{const o=n.subscribe;n.subscribe=(t,e,r)=>{let i=t;if(e){const o=(null==r?void 0:r.equalityFn)||Object.is;let a=t(n.getState());i=r=>{const n=t(r);if(!o(a,n)){const t=a;e(a=n,t)}},(null==r?void 0:r.fireImmediately)&&e(a,a)}return o(i)};return t(e,r,n)};var f=Object.defineProperty,h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,y=(t,e,r)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,v=(t,e)=>{for(var r in e||(e={}))d.call(e,r)&&y(t,r,e[r]);if(h)for(var r of h(e))p.call(e,r)&&y(t,r,e[r]);return t};const m=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then:t=>m(t)(r),catch(t){return this}}}catch(t){return{then(t){return this},catch:e=>m(e)(t)}}},g=(t,e)=>(r,n,o)=>{let i=v({getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:t=>t,version:0,merge:(t,e)=>v(v({},e),t)},e);(i.blacklist||i.whitelist)&&console.warn(`The ${i.blacklist?"blacklist":"whitelist"} option is deprecated and will be removed in the next version. Please use the 'partialize' option instead.`);let a=!1;const c=new Set,s=new Set;let u;try{u=i.getStorage()}catch(t){}if(!u)return t(((...t)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...t)}),n,o);u.removeItem||console.warn(`[zustand persist middleware] The given storage for item '${i.name}' does not contain a 'removeItem' method, which will be required in v4.`);const l=m(i.serialize),f=()=>{const t=i.partialize(v({},n()));let e;i.whitelist&&Object.keys(t).forEach((e=>{var r;!(null==(r=i.whitelist)?void 0:r.includes(e))&&delete t[e]})),i.blacklist&&i.blacklist.forEach((e=>delete t[e]));const r=l({state:t,version:i.version}).then((t=>u.setItem(i.name,t))).catch((t=>{e=t}));if(e)throw e;return r},h=o.setState;o.setState=(t,e)=>{h(t,e),f()};const d=t(((...t)=>{r(...t),f()}),n,o);let p;const y=()=>{var t;if(!u)return;a=!1,c.forEach((t=>t(n())));const e=(null==(t=i.onRehydrateStorage)?void 0:t.call(i,n()))||void 0;return m(u.getItem.bind(u))(i.name).then((t=>{if(t)return i.deserialize(t)})).then((t=>{if(t){if("number"!=typeof t.version||t.version===i.version)return t.state;if(i.migrate)return i.migrate(t.state,t.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((t=>{var e;return p=i.merge(t,null!=(e=n())?e:d),r(p,!0),f()})).then((()=>{null==e||e(p,void 0),a=!0,s.forEach((t=>t(p)))})).catch((t=>{null==e||e(void 0,t)}))};return o.persist={setOptions:t=>{i=v(v({},i),t),t.getStorage&&(u=t.getStorage())},clearStorage:()=>{var t;null==(t=null==u?void 0:u.removeItem)||t.call(u,i.name)},rehydrate:()=>y(),hasHydrated:()=>a,onHydrate:t=>(c.add(t),()=>{c.delete(t)}),onFinishHydration:t=>(s.add(t),()=>{s.delete(t)})},y(),p||d};function x(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?x(Object(r),!0).forEach((function(e){b(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function b(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function E(t){return function(t){if(Array.isArray(t))return j(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return j(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(t,e)}(t)||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 j(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var _=u(l(g((function(t,e){return{open:!1,ready:!1,metaData:{},currentTaxonomies:{},currentType:"pattern",modals:[],pushModal:function(r){return t({modals:[r].concat(E(e().modals))})},popModal:function(){return t({modals:e().modals.slice(1)})},removeAllModals:function(){return t({modals:[]})},updateCurrentTaxonomies:function(e){return t({currentTaxonomies:w({},e)})},updateCurrentType:function(e){return t({currentType:e})},setOpen:function(e){return t({open:e})},setReady:function(e){return t({ready:e})}}}),{name:"extendify-global-state",partialize:function(t){return delete t.modals,delete t.ready,t}}))),L=r(4206),k=r.n(L);function S(t){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(t)}function O(){O=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==S(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function P(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}var N=function(){return(t=O().mark((function t(){var e;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(window.extendifyData.root,"/user"),{method:"GET",headers:{"X-WP-Nonce":window.extendifyData.nonce,"X-Requested-With":"XMLHttpRequest","X-Extendify":!0}});case 2:return e=t.sent,t.next=5,e.json();case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){P(i,n,o,a,c,"next",t)}function c(t){P(i,n,o,a,c,"throw",t)}a(void 0)}))})();var t},C=function(t,e){var r=new FormData;return r.append("email",t),r.append("key",e),V.post("login",r,{headers:{"Content-Type":"multipart/form-data"}})},A=function(t){var e=new FormData;return e.append("data",JSON.stringify(t)),V.post("user",e,{headers:{"Content-Type":"multipart/form-data"}})},T=function(){return V.post("clear-user")},I=function(){return V.get("max-free-imports")};function R(t){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R(t)}function F(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function M(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?F(Object(r),!0).forEach((function(e){D(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function D(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function B(){B=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==R(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function G(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function U(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){G(i,n,o,a,c,"next",t)}function c(t){G(i,n,o,a,c,"throw",t)}a(void 0)}))}}var z,Y,$,W={getItem:($=U(B().mark((function t(){return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,N();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),function(){return $.apply(this,arguments)}),setItem:(Y=U(B().mark((function t(e,r){return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A(r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),function(t,e){return Y.apply(this,arguments)}),removeItem:(z=U(B().mark((function t(){return B().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,T();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),function(){return z.apply(this,arguments)})},H=function(){var t,e,r;return null===window.extendifyData.sitesettings||(null===(t=window.extendifyData)||void 0===t||null===(e=t.sitesettings)||void 0===e||null===(r=e.state)||void 0===r?void 0:r.enabled)},q=u(g((function(t,e){return{_hasHydrated:!1,firstLoadedOn:(new Date).toISOString(),email:"",apiKey:"",uuid:"",sdkPartner:"",noticesDismissedAt:{},modalNoticesDismissedAt:{},imports:0,runningImports:0,allowedImports:0,freebieImports:0,entryPoint:"not-set",enabled:H(),canInstallPlugins:!1,canActivatePlugins:!1,incrementImports:function(){var r=Number(e().freebieImports)>0?Number(e().freebieImports)-1:Number(e().freebieImports),n=Number(e().runningImports)+ +(r<1);t({imports:Number(e().imports)+1,runningImports:n,freebieImports:r})},giveFreebieImports:function(r){t({freebieImports:e().freebieImports+r})},totalAvailableImports:function(){return Number(e().allowedImports)+Number(e().freebieImports)},hasAvailableImports:function(){return!!e().apiKey||Number(e().runningImports)<Number(e().totalAvailableImports())},remainingImports:function(){var t=Number(e().totalAvailableImports())-Number(e().runningImports);return e().allowedImports?t>0?t:0:null},markNoticeSeen:function(r,n){t(D({},"".concat(n,"DismissedAt"),M(M({},e()["".concat(n,"DismissedAt")]),{},D({},r,(new Date).toISOString()))))}}}),{name:"extendify-user",getStorage:function(){return W},onRehydrateStorage:function(){return function(){q.setState({_hasHydrated:!0})}},partialize:function(t){return delete t._hasHydrated,t}})),V=k().create({baseURL:window.extendifyData.root,headers:{"X-WP-Nonce":window.extendifyData.nonce,"X-Requested-With":"XMLHttpRequest","X-Extendify-Library":!0,"X-Extendify":!0}});function J(t){return Object.prototype.hasOwnProperty.call(t,"data")?t.data:t}V.interceptors.response.use((function(t){return function(t){return Object.prototype.hasOwnProperty.call(t,"soft_error")&&window.dispatchEvent(new CustomEvent("extendify::softerror-encountered",{detail:t.soft_error,bubbles:!0})),t}(J(t))}),(function(t){return function(t){if(t.response)return console.error(t.response),Promise.reject(J(t.response))}(t)})),V.interceptors.request.use((function(t){var e=new URLSearchParams(window.location.search);if(["onboarding"].includes(e.get("extendify")))throw new(k().Cancel)("Library is not available while running Launch");return function(t){return t.headers["X-Extendify-Dev-Mode"]=window.location.search.indexOf("DEVMODE")>-1,t.headers["X-Extendify-Local-Mode"]=window.location.search.indexOf("LOCALMODE")>-1,t}(function(t){var e=q.getState(),r=e.apiKey?"unlimited":e.remainingImports();return t.data&&(t.data.remaining_imports=r,t.data.entry_point=e.entryPoint,t.data.total_imports=e.imports),t}(t))}),(function(t){return t}));var K=function(){return V.get("site-settings")},X=function(t){var e=new FormData;return e.append("data",JSON.stringify(t)),V.post("site-settings",e,{headers:{"Content-Type":"multipart/form-data"}})},Z=function(t,e){return V.post("site-settings/options",{option:t,value:e})};function Q(t){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(t)}function tt(){tt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==Q(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function et(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function rt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){et(i,n,o,a,c,"next",t)}function c(t){et(i,n,o,a,c,"throw",t)}a(void 0)}))}}var nt={getItem:function(){var t=rt(tt().mark((function t(){return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,K();case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),setItem:function(){var t=rt(tt().mark((function t(e,r){return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,X(r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),removeItem:function(){}},ot=u(g((function(t){return{enabled:!0,siteType:{},setSiteType:(e=rt(tt().mark((function e(r){return tt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t({siteType:r}),e.next=3,Z("extendify_siteType",r);case 3:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)})};var e}),{name:"extendify-sitesettings",getStorage:function(){return nt}}));function it(t){return it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},it(t)}function at(){at=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==it(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function ct(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}var st=function(){return(t=at().mark((function t(){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,V.get("taxonomies");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ct(i,n,o,a,c,"next",t)}function c(t){ct(i,n,o,a,c,"throw",t)}a(void 0)}))})();var t};function ut(t){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ut(t)}function lt(){lt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==ut(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function ft(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}var ht=u(g((function(t,e){return{taxonomies:{},setTaxonomies:function(e){return t({taxonomies:e})},fetchTaxonomies:(r=lt().mark((function t(){var r,n;return lt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,st();case 2:if(n=t.sent,n=Object.keys(n).reduce((function(t,e){return t[e]=n[e],t}),{}),null!==(r=Object.keys(n))&&void 0!==r&&r.length){t.next=6;break}return t.abrupt("return");case 6:e().setTaxonomies(n);case 7:case"end":return t.stop()}}),t)})),n=function(){var t=this,e=arguments;return new Promise((function(n,o){var i=r.apply(t,e);function a(t){ft(i,n,o,a,c,"next",t)}function c(t){ft(i,n,o,a,c,"throw",t)}a(void 0)}))},function(){return n.apply(this,arguments)})};var r,n}),{name:"extendify-taxonomies"}));function dt(t){return dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dt(t)}function pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function yt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pt(Object(r),!0).forEach((function(e){vt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function vt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mt(){mt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==dt(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function gt(t){return function(t){if(Array.isArray(t))return bt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||wt(t)||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 xt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=wt(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function wt(t,e){if(t){if("string"==typeof t)return bt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bt(t,e):void 0}}function bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Et(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}var jt=u(l((function(t,e){return{templates:[],skipNextFetch:!1,fetchToken:null,taxonomyDefaultState:{},nextPage:"",searchParams:{taxonomies:{},type:"pattern"},initTemplateData:function(){t({activeTemplate:{}}),e().setupDefaultTaxonomies(),e().updateType(_.getState().currentType)},appendTemplates:(r=mt().mark((function r(n){var o,i,a;return mt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:o=xt(n),r.prev=1,a=mt().mark((function r(){var n;return mt().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=i.value,!e().templates.find((function(t){return t.id===n.id}))){r.next=3;break}return r.abrupt("return","continue");case 3:return r.next=5,new Promise((function(t){return setTimeout(t,5)}));case 5:requestAnimationFrame((function(){var r=[].concat(gt(e().templates),[n]);t({templates:r})}));case 6:case"end":return r.stop()}}),r)})),o.s();case 4:if((i=o.n()).done){r.next=11;break}return r.delegateYield(a(),"t0",6);case 6:if("continue"!==r.t0){r.next=9;break}return r.abrupt("continue",9);case 9:r.next=4;break;case 11:r.next=16;break;case 13:r.prev=13,r.t1=r.catch(1),o.e(r.t1);case 16:return r.prev=16,o.f(),r.finish(16);case 19:case"end":return r.stop()}}),r,null,[[1,13,16,19]])})),n=function(){var t=this,e=arguments;return new Promise((function(n,o){var i=r.apply(t,e);function a(t){Et(i,n,o,a,c,"next",t)}function c(t){Et(i,n,o,a,c,"throw",t)}a(void 0)}))},function(t){return n.apply(this,arguments)}),setupDefaultTaxonomies:function(){var e,r,n=ht.getState().taxonomies,o=Object.entries(n).reduce((function(t,e){return t[e[0]]={slug:"",title:"Featured"},t}),{}),i={taxonomies:yt(yt(yt({},o),null!==(e=null===(r=_.getState())||void 0===r?void 0:r.currentTaxonomies)&&void 0!==e?e:{}),{},{siteType:ot.getState().siteType})};t((function(t){return{taxonomyDefaultState:o,searchParams:yt(yt({},t.searchParams),i)}})),_.getState().updateCurrentTaxonomies(i.taxonomies)},updateTaxonomies:function(t){var r={};r.taxonomies=Object.assign({},e().searchParams.taxonomies,t),_.getState().updateCurrentTaxonomies(null==r?void 0:r.taxonomies),e().updateSearchParams(r)},updateType:function(t){_.getState().updateCurrentType(t),e().updateSearchParams({type:t})},updateSearchParams:function(r){null!=r&&r.taxonomies&&!Object.keys(r.taxonomies).length&&(r.taxonomies=e().taxonomyDefaultState);var n=Object.assign({},e().searchParams,r);JSON.stringify(n)!==JSON.stringify(e().searchParams)&&t({templates:[],nextPage:"",searchParams:n})},resetTemplates:function(){return t({templates:[],nextPage:""})}};var r,n}))),_t=function(){return V.get("meta-data")},Lt=function(t){var e,r,n,o,i,a=null!==(e=null===(r=jt.getState())||void 0===r||null===(n=r.searchParams)||void 0===n?void 0:n.taxonomies)&&void 0!==e?e:[];return V.post("simple-ping",{action:t,categories:a,sdk_partner:null!==(o=null===(i=q.getState())||void 0===i?void 0:i.sdkPartner)&&void 0!==o?o:""})};function kt(t,e,...r){if(t in e){let n=e[t];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${t}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map((t=>`"${t}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,kt),n}var St,Ot=((St=Ot||{})[St.None=0]="None",St[St.RenderStrategy=1]="RenderStrategy",St[St.Static=2]="Static",St),Pt=(t=>(t[t.Unmount=0]="Unmount",t[t.Hidden=1]="Hidden",t))(Pt||{});function Nt({ourProps:t,theirProps:e,slot:r,defaultTag:n,features:o,visible:i=!0,name:a}){let c=At(e,t);if(i)return Ct(c,r,n,a);let s=null!=o?o:0;if(2&s){let{static:t=!1,...e}=c;if(t)return Ct(e,r,n,a)}if(1&s){let{unmount:t=!0,...e}=c;return kt(t?0:1,{0:()=>null,1:()=>Ct({...e,hidden:!0,style:{display:"none"}},r,n,a)})}return Ct(c,r,n,a)}function Ct(t,e={},r,n){let{as:o=r,children:a,refName:c="ref",...s}=Rt(t,["unmount","static"]),u=void 0!==t.ref?{[c]:t.ref}:{},l="function"==typeof a?a(e):a;s.className&&"function"==typeof s.className&&(s.className=s.className(e));let f={};if(o===i.Fragment&&Object.keys(It(s)).length>0){if(!(0,i.isValidElement)(l)||Array.isArray(l)&&l.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(s).map((t=>` - ${t}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((t=>` - ${t}`)).join("\n")].join("\n"));return(0,i.cloneElement)(l,Object.assign({},At(l.props,It(Rt(s,["ref"]))),f,u))}return(0,i.createElement)(o,Object.assign({},Rt(s,["ref"]),o!==i.Fragment&&u,o!==i.Fragment&&f),l)}function At(...t){if(0===t.length)return{};if(1===t.length)return t[0];let e={},r={};for(let n of t)for(let t in n)t.startsWith("on")&&"function"==typeof n[t]?(null!=r[t]||(r[t]=[]),r[t].push(n[t])):e[t]=n[t];if(e.disabled||e["aria-disabled"])return Object.assign(e,Object.fromEntries(Object.keys(r).map((t=>[t,void 0]))));for(let t in r)Object.assign(e,{[t](e,...n){let o=r[t];for(let t of o){if(e.defaultPrevented)return;t(e,...n)}}});return e}function Tt(t){var e;return Object.assign((0,i.forwardRef)(t),{displayName:null!=(e=t.displayName)?e:t.name})}function It(t){let e=Object.assign({},t);for(let t in e)void 0===e[t]&&delete e[t];return e}function Rt(t,e=[]){let r=Object.assign({},t);for(let t of e)t in r&&delete r[t];return r}let Ft="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;function Mt(t){let e=(0,i.useRef)(t);return Ft((()=>{e.current=t}),[t]),e}let Dt=function(t){let e=Mt(t);return i.useCallback(((...t)=>e.current(...t)),[e])},Bt=Symbol();function Gt(t,e=!0){return Object.assign(t,{[Bt]:e})}function Ut(...t){let e=(0,i.useRef)(t);(0,i.useEffect)((()=>{e.current=t}),[t]);let r=Dt((t=>{for(let r of e.current)null!=r&&("function"==typeof r?r(t):r.current=t)}));return t.every((t=>null==t||(null==t?void 0:t[Bt])))?void 0:r}var zt=(t=>(t.Space=" ",t.Enter="Enter",t.Escape="Escape",t.Backspace="Backspace",t.Delete="Delete",t.ArrowLeft="ArrowLeft",t.ArrowUp="ArrowUp",t.ArrowRight="ArrowRight",t.ArrowDown="ArrowDown",t.Home="Home",t.End="End",t.PageUp="PageUp",t.PageDown="PageDown",t.Tab="Tab",t))(zt||{});function Yt(t){let e=t.parentElement,r=null;for(;e&&!(e instanceof HTMLFieldSetElement);)e instanceof HTMLLegendElement&&(r=e),e=e.parentElement;let n=""===(null==e?void 0:e.getAttribute("disabled"));return(!n||!function(t){if(!t)return!1;let e=t.previousElementSibling;for(;null!==e;){if(e instanceof HTMLLegendElement)return!1;e=e.previousElementSibling}return!0}(r))&&n}let $t={serverHandoffComplete:!1};function Wt(){let[t,e]=(0,i.useState)($t.serverHandoffComplete);return(0,i.useEffect)((()=>{!0!==t&&e(!0)}),[t]),(0,i.useEffect)((()=>{!1===$t.serverHandoffComplete&&($t.serverHandoffComplete=!0)}),[]),t}var Ht;let qt=0;function Vt(){return++qt}let Jt=null!=(Ht=i.useId)?Ht:function(){let t=Wt(),[e,r]=i.useState(t?Vt:null);return Ft((()=>{null===e&&r(Vt())}),[e]),null!=e?""+e:void 0};var Kt=(t=>(t[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t))(Kt||{});let Xt=Tt((function(t,e){let{features:r=1,...n}=t;return Nt({ourProps:{ref:e,"aria-hidden":2==(2&r)||void 0,style:{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...4==(4&r)&&2!=(2&r)&&{display:"none"}}},theirProps:n,slot:{},defaultTag:"div",name:"Hidden"})}));function Zt(t){return"undefined"==typeof window?null:t instanceof Node?t.ownerDocument:null!=t&&t.hasOwnProperty("current")&&t.current instanceof Node?t.current.ownerDocument:document}let Qt=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((t=>`${t}:not([tabindex='-1'])`)).join(",");var te,ee=(t=>(t[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t))(ee||{}),re=(t=>(t[t.Error=0]="Error",t[t.Overflow=1]="Overflow",t[t.Success=2]="Success",t[t.Underflow=3]="Underflow",t))(re||{}),ne=((te=ne||{})[te.Previous=-1]="Previous",te[te.Next=1]="Next",te);var oe=(t=>(t[t.Strict=0]="Strict",t[t.Loose=1]="Loose",t))(oe||{});function ie(t){null==t||t.focus({preventScroll:!0})}let ae=["textarea","input"].join(",");function ce(t,e,r=!0){let n,o=Array.isArray(t)?t.length>0?t[0].ownerDocument:document:t.ownerDocument,i=Array.isArray(t)?r?function(t,e=(t=>t)){return t.slice().sort(((t,r)=>{let n=e(t),o=e(r);if(null===n||null===o)return 0;let i=n.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}(t):t:function(t=document.body){return null==t?[]:Array.from(t.querySelectorAll(Qt))}(t),a=o.activeElement,c=(()=>{if(5&e)return 1;if(10&e)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=(()=>{if(1&e)return 0;if(2&e)return Math.max(0,i.indexOf(a))-1;if(4&e)return Math.max(0,i.indexOf(a))+1;if(8&e)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=32&e?{preventScroll:!0}:{},l=0,f=i.length;do{if(l>=f||l+f<=0)return 0;let t=s+l;if(16&e)t=(t+f)%f;else{if(t<0)return 3;if(t>=f)return 1}n=i[t],null==n||n.focus(u),l+=c}while(n!==o.activeElement);return 6&e&&function(t){var e,r;return null!=(r=null==(e=null==t?void 0:t.matches)?void 0:e.call(t,ae))&&r}(n)&&n.select(),n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),2}function se(t,e,r){let n=Mt(e);(0,i.useEffect)((()=>{function e(t){n.current(t)}return window.addEventListener(t,e,r),()=>window.removeEventListener(t,e,r)}),[t,r])}var ue=(t=>(t[t.Forwards=0]="Forwards",t[t.Backwards=1]="Backwards",t))(ue||{});function le(){let t=(0,i.useRef)(0);return se("keydown",(e=>{"Tab"===e.key&&(t.current=e.shiftKey?1:0)}),!0),t}function fe(){let t=(0,i.useRef)(!1);return Ft((()=>(t.current=!0,()=>{t.current=!1})),[]),t}function he(...t){return(0,i.useMemo)((()=>Zt(...t)),[...t])}function de(t,e,r,n){let o=Mt(r);(0,i.useEffect)((()=>{function r(t){o.current(t)}return(t=null!=t?t:window).addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)}),[t,e,n])}function pe(t){"function"==typeof queueMicrotask?queueMicrotask(t):Promise.resolve().then(t).catch((t=>setTimeout((()=>{throw t}))))}function ye(t,e){let r=(0,i.useRef)([]),n=Dt(t);(0,i.useEffect)((()=>{for(let[t,o]of e.entries())if(r.current[t]!==o){let t=n(e);return r.current=e,t}}),[n,...e])}var ve=(t=>(t[t.None=1]="None",t[t.InitialFocus=2]="InitialFocus",t[t.TabLock=4]="TabLock",t[t.FocusLock=8]="FocusLock",t[t.RestoreFocus=16]="RestoreFocus",t[t.All=30]="All",t))(ve||{});let me=Object.assign(Tt((function(t,e){let r=(0,i.useRef)(null),n=Ut(r,e),{initialFocus:o,containers:a,features:c=30,...s}=t;Wt()||(c=1);let u=he(r);!function({ownerDocument:t},e){let r=(0,i.useRef)(null);de(null==t?void 0:t.defaultView,"focusout",(t=>{!e||r.current||(r.current=t.target)}),!0),ye((()=>{e||((null==t?void 0:t.activeElement)===(null==t?void 0:t.body)&&ie(r.current),r.current=null)}),[e]);let n=(0,i.useRef)(!1);(0,i.useEffect)((()=>(n.current=!1,()=>{n.current=!0,pe((()=>{!n.current||(ie(r.current),r.current=null)}))})),[])}({ownerDocument:u},Boolean(16&c));let l=function({ownerDocument:t,container:e,initialFocus:r},n){let o=(0,i.useRef)(null);return ye((()=>{if(!n)return;let i=e.current;if(!i)return;let a=null==t?void 0:t.activeElement;if(null!=r&&r.current){if((null==r?void 0:r.current)===a)return void(o.current=a)}else if(i.contains(a))return void(o.current=a);null!=r&&r.current?ie(r.current):ce(i,ee.First)===re.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=null==t?void 0:t.activeElement}),[n]),o}({ownerDocument:u,container:r,initialFocus:o},Boolean(2&c));!function({ownerDocument:t,container:e,containers:r,previousActiveElement:n},o){let i=fe();de(null==t?void 0:t.defaultView,"focus",(t=>{if(!o||!i.current)return;let a=new Set(null==r?void 0:r.current);a.add(e);let c=n.current;if(!c)return;let s=t.target;s&&s instanceof HTMLElement?function(t,e){var r;for(let n of t)if(null!=(r=n.current)&&r.contains(e))return!0;return!1}(a,s)?(n.current=s,ie(s)):(t.preventDefault(),t.stopPropagation(),ie(c)):ie(n.current)}),!0)}({ownerDocument:u,container:r,containers:a,previousActiveElement:l},Boolean(8&c));let f=le(),h=Dt((()=>{let t=r.current;!t||kt(f.current,{[ue.Forwards]:()=>ce(t,ee.First),[ue.Backwards]:()=>ce(t,ee.Last)})})),d={ref:n};return i.createElement(i.Fragment,null,Boolean(4&c)&&i.createElement(Xt,{as:"button",type:"button",onFocus:h,features:Kt.Focusable}),Nt({ourProps:d,theirProps:s,defaultTag:"div",name:"FocusTrap"}),Boolean(4&c)&&i.createElement(Xt,{as:"button",type:"button",onFocus:h,features:Kt.Focusable}))})),{features:ve});let ge=new Set,xe=new Map;function we(t){t.setAttribute("aria-hidden","true"),t.inert=!0}function be(t){let e=xe.get(t);!e||(null===e["aria-hidden"]?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",e["aria-hidden"]),t.inert=e.inert)}const Ee=ReactDOM;let je=(0,i.createContext)(!1);function _e(){return(0,i.useContext)(je)}function Le(t){return i.createElement(je.Provider,{value:t.force},t.children)}let ke=i.Fragment,Se=Tt((function(t,e){let r=t,n=(0,i.useRef)(null),o=Ut(Gt((t=>{n.current=t})),e),a=he(n),c=function(t){let e=_e(),r=(0,i.useContext)(Pe),n=he(t),[o,a]=(0,i.useState)((()=>{if(!e&&null!==r||"undefined"==typeof window)return null;let t=null==n?void 0:n.getElementById("headlessui-portal-root");if(t)return t;if(null===n)return null;let o=n.createElement("div");return o.setAttribute("id","headlessui-portal-root"),n.body.appendChild(o)}));return(0,i.useEffect)((()=>{null!==o&&(null!=n&&n.body.contains(o)||null==n||n.body.appendChild(o))}),[o,n]),(0,i.useEffect)((()=>{e||null!==r&&a(r.current)}),[r,a,e]),o}(n),[s]=(0,i.useState)((()=>{var t;return"undefined"==typeof window?null:null!=(t=null==a?void 0:a.createElement("div"))?t:null})),u=Wt(),l=(0,i.useRef)(!1);return Ft((()=>{if(l.current=!1,c&&s)return c.contains(s)||(s.setAttribute("data-headlessui-portal",""),c.appendChild(s)),()=>{l.current=!0,pe((()=>{var t;!l.current||!c||!s||(c.removeChild(s),c.childNodes.length<=0&&(null==(t=c.parentElement)||t.removeChild(c)))}))}}),[c,s]),u&&c&&s?(0,Ee.createPortal)(Nt({ourProps:{ref:o},theirProps:r,defaultTag:ke,name:"Portal"}),s):null})),Oe=i.Fragment,Pe=(0,i.createContext)(null),Ne=Tt((function(t,e){let{target:r,...n}=t,o={ref:Ut(e)};return i.createElement(Pe.Provider,{value:r},Nt({ourProps:o,theirProps:n,defaultTag:Oe,name:"Popover.Group"}))})),Ce=Object.assign(Se,{Group:Ne}),Ae=(0,i.createContext)(null);function Te(){let t=(0,i.useContext)(Ae);if(null===t){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Te),t}return t}function Ie(){let[t,e]=(0,i.useState)([]);return[t.length>0?t.join(" "):void 0,(0,i.useMemo)((()=>function(t){let r=Dt((t=>(e((e=>[...e,t])),()=>e((e=>{let r=e.slice(),n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}))))),n=(0,i.useMemo)((()=>({register:r,slot:t.slot,name:t.name,props:t.props})),[r,t.slot,t.name,t.props]);return i.createElement(Ae.Provider,{value:n},t.children)}),[e])]}let Re=Tt((function(t,e){let r=Te(),n=`headlessui-description-${Jt()}`,o=Ut(e);Ft((()=>r.register(n)),[n,r.register]);let i=t;return Nt({ourProps:{ref:o,...r.props,id:n},theirProps:i,slot:r.slot||{},defaultTag:"p",name:r.name||"Description"})})),Fe=(0,i.createContext)(null);Fe.displayName="OpenClosedContext";var Me=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))(Me||{});function De(){return(0,i.useContext)(Fe)}function Be({value:t,children:e}){return i.createElement(Fe.Provider,{value:t},e)}let Ge=(0,i.createContext)((()=>{}));Ge.displayName="StackContext";var Ue=(t=>(t[t.Add=0]="Add",t[t.Remove=1]="Remove",t))(Ue||{});function ze({children:t,onUpdate:e,type:r,element:n}){let o=(0,i.useContext)(Ge),a=Dt(((...t)=>{null==e||e(...t),o(...t)}));return Ft((()=>(a(0,r,n),()=>a(1,r,n))),[a,r,n]),i.createElement(Ge.Provider,{value:a},t)}function Ye(t,e,r=!0){let n=(0,i.useRef)(!1);function o(r,o){if(!n.current||r.defaultPrevented)return;let i=function t(e){return"function"==typeof e?t(e()):Array.isArray(e)||e instanceof Set?e:[e]}(t),a=o(r);if(null!==a&&a.ownerDocument.documentElement.contains(a)){for(let t of i){if(null===t)continue;let e=t instanceof HTMLElement?t:t.current;if(null!=e&&e.contains(a))return}return!function(t,e=0){var r;return t!==(null==(r=Zt(t))?void 0:r.body)&&kt(e,{0:()=>t.matches(Qt),1(){let e=t;for(;null!==e;){if(e.matches(Qt))return!0;e=e.parentElement}return!1}})}(a,oe.Loose)&&-1!==a.tabIndex&&r.preventDefault(),e(r,a)}}(0,i.useEffect)((()=>{requestAnimationFrame((()=>{n.current=r}))}),[r]),se("click",(t=>o(t,(t=>t.target))),!0),se("blur",(t=>o(t,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}var $e=(t=>(t[t.Open=0]="Open",t[t.Closed=1]="Closed",t))($e||{}),We=(t=>(t[t.SetTitleId=0]="SetTitleId",t))(We||{});let He={0:(t,e)=>t.titleId===e.id?t:{...t,titleId:e.id}},qe=(0,i.createContext)(null);function Ve(t){let e=(0,i.useContext)(qe);if(null===e){let e=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Ve),e}return e}function Je(t,e){return kt(e.type,He,t,e)}qe.displayName="DialogContext";let Ke=Ot.RenderStrategy|Ot.Static,Xe=Tt((function(t,e){let{open:r,onClose:n,initialFocus:o,__demoMode:a=!1,...c}=t,[s,u]=(0,i.useState)(0),l=De();void 0===r&&null!==l&&(r=kt(l,{[Me.Open]:!0,[Me.Closed]:!1}));let f=(0,i.useRef)(new Set),h=(0,i.useRef)(null),d=Ut(h,e),p=(0,i.useRef)(null),y=he(h),v=t.hasOwnProperty("open")||null!==l,m=t.hasOwnProperty("onClose");if(!v&&!m)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!v)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!m)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof r)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${r}`);if("function"!=typeof n)throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${n}`);let g=r?0:1,[x,w]=(0,i.useReducer)(Je,{titleId:null,descriptionId:null,panelRef:(0,i.createRef)()}),b=Dt((()=>n(!1))),E=Dt((t=>w({type:0,id:t}))),j=!!Wt()&&(!a&&0===g),_=s>1,L=null!==(0,i.useContext)(qe),k=_?"parent":"leaf";(function(t,e=!0){Ft((()=>{if(!e||!t.current)return;let r=t.current,n=Zt(r);if(n){ge.add(r);for(let t of xe.keys())t.contains(r)&&(be(t),xe.delete(t));return n.querySelectorAll("body > *").forEach((t=>{if(t instanceof HTMLElement){for(let e of ge)if(t.contains(e))return;1===ge.size&&(xe.set(t,{"aria-hidden":t.getAttribute("aria-hidden"),inert:t.inert}),we(t))}})),()=>{if(ge.delete(r),ge.size>0)n.querySelectorAll("body > *").forEach((t=>{if(t instanceof HTMLElement&&!xe.has(t)){for(let e of ge)if(t.contains(e))return;xe.set(t,{"aria-hidden":t.getAttribute("aria-hidden"),inert:t.inert}),we(t)}}));else for(let t of xe.keys())be(t),xe.delete(t)}}}),[e])})(h,!!_&&j),Ye((()=>{var t,e;return[...Array.from(null!=(t=null==y?void 0:y.querySelectorAll("body > *, [data-headlessui-portal]"))?t:[]).filter((t=>!(!(t instanceof HTMLElement)||t.contains(p.current)||x.panelRef.current&&t.contains(x.panelRef.current)))),null!=(e=x.panelRef.current)?e:h.current]}),b,j&&!_),de(null==y?void 0:y.defaultView,"keydown",(t=>{t.defaultPrevented||t.key===zt.Escape&&0===g&&(_||(t.preventDefault(),t.stopPropagation(),b()))})),(0,i.useEffect)((()=>{var t;if(0!==g||L)return;let e=Zt(h);if(!e)return;let r=e.documentElement,n=null!=(t=e.defaultView)?t:window,o=r.style.overflow,i=r.style.paddingRight,a=n.innerWidth-r.clientWidth;if(r.style.overflow="hidden",a>0){let t=a-(r.clientWidth-r.offsetWidth);r.style.paddingRight=`${t}px`}return()=>{r.style.overflow=o,r.style.paddingRight=i}}),[g,L]),(0,i.useEffect)((()=>{if(0!==g||!h.current)return;let t=new IntersectionObserver((t=>{for(let e of t)0===e.boundingClientRect.x&&0===e.boundingClientRect.y&&0===e.boundingClientRect.width&&0===e.boundingClientRect.height&&b()}));return t.observe(h.current),()=>t.disconnect()}),[g,h,b]);let[S,O]=Ie(),P=`headlessui-dialog-${Jt()}`,N=(0,i.useMemo)((()=>[{dialogState:g,close:b,setTitleId:E},x]),[g,x,b,E]),C=(0,i.useMemo)((()=>({open:0===g})),[g]),A={ref:d,id:P,role:"dialog","aria-modal":0===g||void 0,"aria-labelledby":x.titleId,"aria-describedby":S};return i.createElement(ze,{type:"Dialog",element:h,onUpdate:Dt(((t,e,r)=>{"Dialog"===e&&kt(t,{[Ue.Add](){f.current.add(r),u((t=>t+1))},[Ue.Remove](){f.current.add(r),u((t=>t-1))}})}))},i.createElement(Le,{force:!0},i.createElement(Ce,null,i.createElement(qe.Provider,{value:N},i.createElement(Ce.Group,{target:h},i.createElement(Le,{force:!1},i.createElement(O,{slot:C,name:"Dialog.Description"},i.createElement(me,{initialFocus:o,containers:f,features:j?kt(k,{parent:me.features.RestoreFocus,leaf:me.features.All&~me.features.FocusLock}):me.features.None},Nt({ourProps:A,theirProps:c,slot:C,defaultTag:"div",features:Ke,visible:0===g,name:"Dialog"})))))))),i.createElement(Xt,{features:Kt.Hidden,ref:p}))})),Ze=Tt((function(t,e){let[{dialogState:r,close:n}]=Ve("Dialog.Overlay"),o=Ut(e),a=`headlessui-dialog-overlay-${Jt()}`,c=Dt((t=>{if(t.target===t.currentTarget){if(Yt(t.currentTarget))return t.preventDefault();t.preventDefault(),t.stopPropagation(),n()}}));return Nt({ourProps:{ref:o,id:a,"aria-hidden":!0,onClick:c},theirProps:t,slot:(0,i.useMemo)((()=>({open:0===r})),[r]),defaultTag:"div",name:"Dialog.Overlay"})})),Qe=Tt((function(t,e){let[{dialogState:r},n]=Ve("Dialog.Backdrop"),o=Ut(e),a=`headlessui-dialog-backdrop-${Jt()}`;(0,i.useEffect)((()=>{if(null===n.panelRef.current)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")}),[n.panelRef]);let c=(0,i.useMemo)((()=>({open:0===r})),[r]);return i.createElement(Le,{force:!0},i.createElement(Ce,null,Nt({ourProps:{ref:o,id:a,"aria-hidden":!0},theirProps:t,slot:c,defaultTag:"div",name:"Dialog.Backdrop"})))})),tr=Tt((function(t,e){let[{dialogState:r},n]=Ve("Dialog.Panel"),o=Ut(e,n.panelRef),a=`headlessui-dialog-panel-${Jt()}`,c=(0,i.useMemo)((()=>({open:0===r})),[r]),s=Dt((t=>{t.stopPropagation()}));return Nt({ourProps:{ref:o,id:a,onClick:s},theirProps:t,slot:c,defaultTag:"div",name:"Dialog.Panel"})})),er=Tt((function(t,e){let[{dialogState:r,setTitleId:n}]=Ve("Dialog.Title"),o=`headlessui-dialog-title-${Jt()}`,a=Ut(e);(0,i.useEffect)((()=>(n(o),()=>n(null))),[o,n]);let c=(0,i.useMemo)((()=>({open:0===r})),[r]);return Nt({ourProps:{ref:a,id:o},theirProps:t,slot:c,defaultTag:"h2",name:"Dialog.Title"})})),rr=Object.assign(Xe,{Backdrop:Qe,Panel:tr,Overlay:Ze,Title:er,Description:Re});const nr=wp.components,or=wp.i18n;const ir=function(t){let{icon:e,size:r=24,...n}=t;return(0,o.cloneElement)(e,{width:r,height:r,...n})};var ar=r(42),cr=r.n(ar);const sr=t=>(0,o.createElement)("circle",t),ur=t=>(0,o.createElement)("g",t),lr=t=>(0,o.createElement)("path",t),fr=t=>(0,o.createElement)("rect",t),hr=t=>{let{className:e,isPressed:r,...n}=t;const i={...n,className:cr()(e,{"is-pressed":r})||void 0,"aria-hidden":!0,focusable:!1};return(0,o.createElement)("svg",i)},dr=(0,o.createElement)(hr,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(lr,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));var pr=r(4246);function yr(t){return yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yr(t)}function vr(){vr=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==yr(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function mr(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function gr(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){mr(i,n,o,a,c,"next",t)}function c(t){mr(i,n,o,a,c,"throw",t)}a(void 0)}))}}var xr=function(){return V.get("plugins")},wr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=new FormData;return e.append("plugins",JSON.stringify(t)),V.post("plugins",e,{headers:{"Content-Type":"multipart/form-data"}})},br=function(){return V.get("active-plugins")};function Er(t){return Er="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Er(t)}function jr(){jr=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==Er(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function _r(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Lr(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){_r(i,n,o,a,c,"next",t)}function c(t){_r(i,n,o,a,c,"throw",t)}a(void 0)}))}}function kr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Sr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sr(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Or(t){return Or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Or(t)}function Pr(){Pr=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==Or(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function Nr(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Cr(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Nr(i,n,o,a,c,"next",t)}function c(t){Nr(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Ar(t){return Ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ar(t)}function Tr(){Tr=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==Ar(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function Ir(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Rr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Fr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fr(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Mr={promotion:function(t){var e,r=t.promotionData;return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("span",{className:"text-black",children:null!==(e=null==r?void 0:r.text)&&void 0!==e?e:""}),(0,pr.jsx)("span",{className:"px-2 opacity-50","aria-hidden":"true",children:"|"}),(0,pr.jsx)("div",{className:"flex items-center justify-center space-x-2",children:(null==r?void 0:r.url)&&(0,pr.jsx)(nr.Button,{variant:"link",className:"h-auto p-0 text-black underline hover:no-underline",href:"".concat(r.url,"&utm_source=").concat(window.extendifyData.sdk_partner),onClick:Cr(Pr().mark((function t(){return Pr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Lt("promotion-notice-click");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),target:"_blank",children:null==r?void 0:r.button_text})})]})},feedback:function(){return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("span",{className:"text-black",children:(0,or.__)("Tell us how to make the Extendify Library work better for you","extendify")}),(0,pr.jsx)("span",{className:"px-2 opacity-50","aria-hidden":"true",children:"|"}),(0,pr.jsx)("div",{className:"flex items-center justify-center space-x-2",children:(0,pr.jsx)(nr.Button,{variant:"link",className:"h-auto p-0 text-black underline hover:no-underline",href:"https://extendify.com/feedback/?utm_source=".concat(window.extendifyData.sdk_partner,"&utm_medium=library&utm_campaign=feedback-notice&utm_content=give-feedback"),onClick:gr(vr().mark((function t(){return vr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Lt("feedback-notice-click");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),target:"_blank",children:(0,or.__)("Give feedback","extendify")})})]})},standalone:function(){var t=kr((0,o.useState)(""),2),e=t[0],r=t[1],n=q((function(t){return t.giveFreebieImports}));return(0,pr.jsxs)("div",{children:[(0,pr.jsx)("span",{className:"text-black",children:(0,or.__)("Install the new Extendify Library plugin to get the latest we have to offer","extendify")}),(0,pr.jsx)("span",{className:"px-2 opacity-50","aria-hidden":"true",children:"|"}),(0,pr.jsxs)("div",{className:"relative inline-flex items-center space-x-2",children:[(0,pr.jsx)(nr.Button,{variant:"link",className:cr()("h-auto p-0 text-black underline hover:no-underline",{"opacity-0":e}),onClick:function(){r((0,or.__)("Installing...","extendify")),Promise.all([Lt("stln-footer-install"),wr(["extendify"]),new Promise((function(t){return setTimeout(t,1e3)}))]).then(Lr(jr().mark((function t(){return jr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n(10),r((0,or.__)("Success! Reloading...","extendify")),t.next=4,Lt("stln-footer-success");case 4:window.location.reload();case 5:case"end":return t.stop()}}),t)})))).catch(function(){var t=Lr(jr().mark((function t(e){return jr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.error(e),r((0,or.__)("Error. See console.","extendify")),t.next=4,Lt("stln-footer-fail");case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},children:(0,or.__)("Install Extendify standalone plugin","extendify")}),e?(0,pr.jsx)(nr.Button,{variant:"link",disabled:!0,className:"absolute left-0 h-auto p-0 text-black underline opacity-100 hover:no-underline",onClick:function(){},children:e}):null]})]})}};function Dr(t){var e,r=t.className,n=void 0===r?"":r,i=Rr((0,o.useState)(null),2),a=i[0],c=i[1],s=(0,o.useRef)(!1),u=_((function(t){var e,r;return null===(e=t.metaData)||void 0===e||null===(r=e.banners)||void 0===r?void 0:r.footer})),l=null!==(e=Object.keys(Mr).find((function(t){var e,r,n,o,i,a,c;return"promotion"===t?!(null!==(e=q.getState().apiKey)&&void 0!==e&&e.length)&&(null==u?void 0:u.key)&&!q.getState().noticesDismissedAt[u.key]:"feedback"===t?(i=null!==(r=q.getState().imports)&&void 0!==r?r:0,a=null!==(n=null===(o=q.getState())||void 0===o?void 0:o.firstLoadedOn)&&void 0!==n?n:new Date,c=(new Date).getTime()-new Date(a).getTime(),i>=3&&c/864e5>3&&!q.getState().noticesDismissedAt[t]):"standalone"===t?!window.extendifyData.standalone&&!q.getState().noticesDismissedAt[t]:!q.getState().noticesDismissedAt[t]})))&&void 0!==e?e:null,f=Mr[l],h=function(){var t,e=(t=Tr().mark((function t(){var e;return Tr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c(!1),e="promotion"===l?u.key:l,q.getState().markNoticeSeen(e,"notices"),t.next=5,Lt("footer-notice-x-".concat(e));case 5:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ir(i,n,o,a,c,"next",t)}function c(t){Ir(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();return(0,o.useEffect)((function(){Mr[l]&&!s.current&&(c(!0),s.current=!0)}),[l]),a&&f?(0,pr.jsxs)("div",{className:"".concat(n," relative mx-auto hidden max-w-screen-4xl items-center justify-center space-x-4 bg-extendify-secondary py-3 px-5 lg:flex"),children:[(0,pr.jsx)(f,{promotionData:u}),(0,pr.jsx)("div",{className:"absolute right-1",children:(0,pr.jsx)(nr.Button,{className:"text-extendify-black opacity-50 hover:opacity-100 focus:opacity-100",icon:(0,pr.jsx)(ir,{icon:dr}),label:(0,or.__)("Dismiss this notice","extendify"),onClick:h,showTooltip:!1})})]}):null}function Br(t){const{body:e}=document.implementation.createHTMLDocument("");e.innerHTML=t;const r=e.getElementsByTagName("*");let n=r.length;for(;n--;){const t=r[n];if("SCRIPT"===t.tagName)(o=t).parentNode,o.parentNode.removeChild(o);else{let e=t.attributes.length;for(;e--;){const{name:r}=t.attributes[e];r.startsWith("on")&&t.removeAttribute(r)}}}var o;return e.innerHTML}const Gr=(0,pr.jsxs)(hr,{viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg",children:[(0,pr.jsx)(lr,{d:"M7.32457 0.907043C3.98785 0.907043 1.2829 3.61199 1.2829 6.94871C1.2829 10.2855 3.98785 12.9904 7.32457 12.9904C10.6613 12.9904 13.3663 10.2855 13.3663 6.94871C13.3663 3.61199 10.6613 0.907043 7.32457 0.907043V0.907043Z",stroke:"currentColor",strokeWidth:"1.25",fill:"none"}),(0,pr.jsx)(lr,{d:"M6.34684 9.72526C6.34684 9.18224 6.77716 8.74168 7.32018 8.74168C7.8632 8.74168 8.30377 9.18224 8.30377 9.72526C8.30377 10.2683 7.8632 10.6986 7.32018 10.6986C6.77716 10.6986 6.34684 10.2683 6.34684 9.72526Z",fill:"currentColor"}),(0,pr.jsx)(lr,{d:"M7.9759 7.11261C7.93492 7.47121 7.67878 7.76834 7.32018 7.76834C6.95134 7.76834 6.70544 7.46097 6.6747 7.11261L6.34684 4.1721C6.28537 3.67006 6.81814 3.19876 7.32018 3.19876C7.82222 3.19876 8.35499 3.67006 8.30377 4.1721L7.9759 7.11261Z",fill:"currentColor"})]});const Ur=(0,pr.jsx)(hr,{fill:"none",viewBox:"0 0 25 24",xmlns:"http://www.w3.org/2000/svg",children:(0,pr.jsx)(lr,{clipRule:"evenodd",d:"m14.4063 2h4.1856c1.1856 0 1.6147.12701 2.0484.36409.4336.23802.7729.58706 1.0049 1.03111.2319.445.3548.8853.3548 2.10175v4.29475c0 1.2165-.1238 1.6567-.3548 2.1017-.232.445-.5722.7931-1.0049 1.0312-.1939.1064-.3873.1939-.6476.2567v3.4179c0 1.8788-.1912 2.5588-.5481 3.246-.3582.6873-.8836 1.2249-1.552 1.5925-.6697.3676-1.3325.5623-3.1634.5623h-6.46431c-1.83096 0-2.49367-.1962-3.16346-.5623-.6698-.3676-1.19374-.9067-1.552-1.5925s-.54943-1.3672-.54943-3.246v-6.63138c0-1.87871.19117-2.55871.54801-3.24597.35827-.68727.88362-1.22632 1.55342-1.59393.66837-.36615 1.3325-.56231 3.16346-.56231h2.76781c.0519-.55814.1602-.86269.3195-1.16946.232-.445.5721-.79404 1.0058-1.03206.4328-.23708.8628-.36409 2.0483-.36409zm-2.1512 2.73372c0-.79711.6298-1.4433 1.4067-1.4433h5.6737c.777 0 1.4068.64619 1.4068 1.4433v5.82118c0 .7971-.6298 1.4433-1.4068 1.4433h-5.6737c-.7769 0-1.4067-.6462-1.4067-1.4433z",fill:"currentColor",fillRule:"evenodd"})});const zr=(0,pr.jsx)(hr,{fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,pr.jsx)(lr,{clipRule:"evenodd",d:"m13.505 4h3.3044c.936 0 1.2747.10161 1.6171.29127.3424.19042.6102.46965.7934.82489.1831.356.2801.70824.2801 1.6814v3.43584c0 .9731-.0977 1.3254-.2801 1.6814-.1832.356-.4517.6344-.7934.8248-.153.0852-.3057.1552-.5112.2054v2.7344c0 1.503-.151 2.047-.4327 2.5968-.2828.5498-.6976.9799-1.2252 1.274-.5288.294-1.052.4498-2.4975.4498h-5.10341c-1.44549 0-1.96869-.1569-2.49747-.4498-.52878-.2941-.94242-.7254-1.22526-1.274-.28284-.5487-.43376-1.0938-.43376-2.5968v-5.3051c0-1.50301.15092-2.04701.43264-2.59682.28284-.54981.6976-.98106 1.22638-1.27514.52767-.29293 1.05198-.44985 2.49747-.44985h2.18511c.041-.44652.1265-.69015.2522-.93557.1832-.356.4517-.63523.7941-.82565.3417-.18966.6812-.29127 1.6171-.29127zm-1.6984 2.18698c0-.63769.4973-1.15464 1.1106-1.15464h4.4793c.6133 0 1.1106.51695 1.1106 1.15464v4.65692c0 .6377-.4973 1.1547-1.1106 1.1547h-4.4793c-.6133 0-1.1106-.517-1.1106-1.1547z",fill:"currentColor",fillRule:"evenodd"})});const Yr=(0,pr.jsx)(hr,{fill:"none",width:"150",height:"30",viewBox:"0 0 2524 492",xmlns:"http://www.w3.org/2000/svg",children:(0,pr.jsxs)(ur,{fill:"currentColor",children:[(0,pr.jsx)(lr,{d:"m609.404 378.5c-24.334 0-46-5.5-65-16.5-18.667-11.333-33.334-26.667-44-46-10.667-19.667-16-42.167-16-67.5 0-25.667 5.166-48.333 15.5-68 10.333-19.667 24.833-35 43.5-46 18.666-11.333 40-17 64-17 25 0 46.5 5.333 64.5 16 18 10.333 31.833 24.833 41.5 43.5 10 18.667 15 41 15 67v18.5l-212 .5 1-39h150.5c0-17-5.5-30.667-16.5-41-10.667-10.333-25.167-15.5-43.5-15.5-14.334 0-26.5 3-36.5 9-9.667 6-17 15-22 27s-7.5 26.667-7.5 44c0 26.667 5.666 46.833 17 60.5 11.666 13.667 28.833 20.5 51.5 20.5 16.666 0 30.333-3.167 41-9.5 11-6.333 18.166-15.333 21.5-27h56.5c-5.334 27-18.667 48.167-40 63.5-21 15.333-47.667 23-80 23z"}),(0,pr.jsx)("path",{d:"m797.529 372h-69.5l85-121-85-126h71l54.5 84 52.5-84h68.5l-84 125.5 81.5 121.5h-70l-53-81.5z"}),(0,pr.jsx)("path",{d:"m994.142 125h155.998v51h-155.998zm108.498 247h-61v-324h61z"}),(0,pr.jsx)("path",{d:"m1278.62 378.5c-24.33 0-46-5.5-65-16.5-18.66-11.333-33.33-26.667-44-46-10.66-19.667-16-42.167-16-67.5 0-25.667 5.17-48.333 15.5-68 10.34-19.667 24.84-35 43.5-46 18.67-11.333 40-17 64-17 25 0 46.5 5.333 64.5 16 18 10.333 31.84 24.833 41.5 43.5 10 18.667 15 41 15 67v18.5l-212 .5 1-39h150.5c0-17-5.5-30.667-16.5-41-10.66-10.333-25.16-15.5-43.5-15.5-14.33 0-26.5 3-36.5 9-9.66 6-17 15-22 27s-7.5 26.667-7.5 44c0 26.667 5.67 46.833 17 60.5 11.67 13.667 28.84 20.5 51.5 20.5 16.67 0 30.34-3.167 41-9.5 11-6.333 18.17-15.333 21.5-27h56.5c-5.33 27-18.66 48.167-40 63.5-21 15.333-47.66 23-80 23z"}),(0,pr.jsx)("path",{d:"m1484.44 372h-61v-247h56.5l5 32c7.67-12.333 18.5-22 32.5-29 14.34-7 29.84-10.5 46.5-10.5 31 0 54.34 9.167 70 27.5 16 18.333 24 43.333 24 75v152h-61v-137.5c0-20.667-4.66-36-14-46-9.33-10.333-22-15.5-38-15.5-19 0-33.83 6-44.5 18-10.66 12-16 28-16 48z"}),(0,pr.jsx)("path",{d:"m1798.38 378.5c-24 0-44.67-5.333-62-16-17-11-30.34-26.167-40-45.5-9.34-19.333-14-41.833-14-67.5s4.66-48.333 14-68c9.66-20 23.5-35.667 41.5-47s39.33-17 64-17c17.33 0 33.16 3.5 47.5 10.5 14.33 6.667 25.33 16.167 33 28.5v-156.5h60.5v372h-56l-4-38.5c-7.34 14-18.67 25-34 33-15 8-31.84 12-50.5 12zm13.5-56c14.33 0 26.66-3 37-9 10.33-6.333 18.33-15.167 24-26.5 6-11.667 9-24.833 9-39.5 0-15-3-28-9-39-5.67-11.333-13.67-20.167-24-26.5-10.34-6.667-22.67-10-37-10-14 0-26.17 3.333-36.5 10-10.34 6.333-18.34 15.167-24 26.5-5.34 11.333-8 24.333-8 39s2.66 27.667 8 39c5.66 11.333 13.66 20.167 24 26.5 10.33 6.333 22.5 9.5 36.5 9.5z"}),(0,pr.jsx)("path",{d:"m1996.45 372v-247h61v247zm30-296.5c-10.34 0-19.17-3.5-26.5-10.5-7-7.3333-10.5-16.1667-10.5-26.5s3.5-19 10.5-26c7.33-6.99999 16.16-10.49998 26.5-10.49998 10.33 0 19 3.49999 26 10.49998 7.33 7 11 15.6667 11 26s-3.67 19.1667-11 26.5c-7 7-15.67 10.5-26 10.5z"}),(0,pr.jsx)("path",{d:"m2085.97 125h155v51h-155zm155.5-122.5v52c-3.33 0-6.83 0-10.5 0-3.33 0-6.83 0-10.5 0-15.33 0-25.67 3.6667-31 11-5 7.3333-7.5 17.1667-7.5 29.5v277h-60.5v-277c0-22.6667 3.67-40.8333 11-54.5 7.33-14 17.67-24.1667 31-30.5 13.33-6.66666 28.83-10 46.5-10 5 0 10.17.166671 15.5.5 5.67.333329 11 .99999 16 2z"}),(0,pr.jsx)("path",{d:"m2330.4 125 80.5 228-33 62.5-112-290.5zm-58 361.5v-50.5h36.5c8 0 15-1 21-3 6-1.667 11.34-5 16-10 5-5 9.17-12.333 12.5-22l102.5-276h63l-121 302c-9 22.667-20.33 39.167-34 49.5-13.66 10.333-30.66 15.5-51 15.5-8.66 0-16.83-.5-24.5-1.5-7.33-.667-14.33-2-21-4z"}),(0,pr.jsx)("path",{clipRule:"evenodd",d:"m226.926 25.1299h83.271c23.586 0 32.123 2.4639 40.751 7.0633 8.628 4.6176 15.378 11.389 19.993 20.0037 4.615 8.6329 7.059 17.1746 7.059 40.7738v83.3183c0 23.599-2.463 32.141-7.059 40.774-4.615 8.633-11.383 15.386-19.993 20.003-3.857 2.065-7.704 3.764-12.884 4.981v66.308c0 36.447-3.803 49.639-10.902 62.972-7.128 13.333-17.579 23.763-30.877 30.894-13.325 7.132-26.51 10.909-62.936 10.909h-128.605c-36.4268 0-49.6113-3.805-62.9367-10.909-13.3254-7.131-23.749-17.589-30.8765-30.894-7.12757-13.304-10.9308-26.525-10.9308-62.972v-128.649c0-36.447 3.80323-49.639 10.9026-62.972 7.1275-13.333 17.5793-23.7909 30.9047-30.9224 13.2972-7.1034 26.5099-10.9088 62.9367-10.9088h55.064c1.033-10.8281 3.188-16.7362 6.357-22.6877 4.615-8.6329 11.382-15.4043 20.01-20.0219 8.61-4.5994 17.165-7.0633 40.751-7.0633zm-42.798 53.0342c0-15.464 12.53-28 27.986-28h112.877c15.457 0 27.987 12.536 27.987 28v112.9319c0 15.464-12.53 28-27.987 28h-112.877c-15.456 0-27.986-12.536-27.986-28z",fillRule:"evenodd"})]})});const $r=(0,pr.jsx)(hr,{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,pr.jsx)("path",{d:"m11.9893 2.59931c-.1822.00285-.3558.07789-.4827.20864s-.1967.30653-.1941.48871v1.375c-.0013.0911.0156.18155.0495.26609.034.08454.0844.16149.1484.22637s.1402.11639.2242.15156c.0841.03516.1743.05327.2654.05327s.1813-.01811.2654-.05327c.084-.03517.1603-.08668.2242-.15156.064-.06488.1144-.14183.1484-.22637s.0508-.17499.0495-.26609v-1.375c.0013-.09202-.0158-.18337-.0505-.26863-.0346-.08526-.086-.1627-.1511-.22773s-.1426-.11633-.2279-.15085c-.0853-.03453-.1767-.05158-.2687-.05014zm-5.72562.46013c-.1251.00033-.24775.0348-.35471.09968-.10697.06488-.19421.15771-.25232.2685-.05812.1108-.0849.23534-.07747.36023.00744.12488.0488.24537.11964.34849l.91667 1.375c.04939.07667.11354.14274.18872.19437.07517.05164.15987.0878.24916.10639.08928.01858.18137.01922.27091.00187.08953-.01734.17472-.05233.2506-.10292.07589-.05059.14095-.11577.1914-.19174.05045-.07598.08528-.16123.10246-.2508.01719-.08956.01638-.18165-.00237-.2709s-.05507-.17388-.10684-.24897l-.91666-1.375c-.06252-.09667-.14831-.1761-.2495-.231-.1012-.0549-.21456-.08351-.32969-.0832zm11.45212 0c-.1117.00307-.2209.03329-.3182.08804-.0973.05474-.1798.13237-.2404.22616l-.9167 1.375c-.0518.07509-.0881.15972-.1068.24897-.0188.08925-.0196.18134-.0024.2709.0172.08957.052.17482.1024.2508.0505.07597.1156.14115.1914.19174.0759.05059.1611.08558.2506.10292.0896.01735.1817.01671.271-.00187.0892-.01859.1739-.05475.2491-.10639.0752-.05163.1393-.1177.1887-.19437l.9167-1.375c.0719-.10456.1135-.22698.1201-.3537s-.022-.25281-.0826-.36429c-.0606-.11149-.1508-.20403-.2608-.26738-.11-.06334-.2353-.09502-.3621-.09153zm-9.61162 3.67472c-.09573-.00001-.1904.01998-.27795.05867-.08756.03869-.16607.09524-.23052.16602l-4.58333 5.04165c-.11999.1319-.18407.3052-.17873.4834.00535.1782.0797.3473.20738.4718l8.47917 8.25c.1284.1251.3006.1951.4798.1951.1793 0 .3514-.07.4798-.1951l8.4792-8.25c.1277-.1245.202-.2936.2074-.4718.0053-.1782-.0588-.3515-.1788-.4834l-4.5833-5.04165c-.0644-.07078-.1429-.12733-.2305-.16602s-.1822-.05868-.278-.05867h-3.877zm.30436 1.375h2.21646l-2.61213 3.48314c-.04258.0557-.07639.1176-.10026.1835h-2.83773zm4.96646 0h2.2165l3.3336 3.66664h-2.8368c-.0241-.066-.0582-.1278-.1011-.1835zm-1.375.45833 2.4063 3.20831h-4.81254zm-6.78637 4.58331h2.70077c.00665.0188.01412.0374.02238.0555l2.11442 4.6505zm4.20826 0h5.15621l-2.5781 5.6719zm6.66371 0h2.7008l-4.8376 4.706 2.1144-4.6505c.0083-.0181.0158-.0367.0224-.0555z",fill:"#000"})});const Wr=(0,pr.jsxs)(hr,{viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,pr.jsx)(lr,{d:"M7.32457 0.907043C3.98785 0.907043 1.2829 3.61199 1.2829 6.94871C1.2829 10.2855 3.98785 12.9904 7.32457 12.9904C10.6613 12.9904 13.3663 10.2855 13.3663 6.94871C13.3663 3.61199 10.6613 0.907043 7.32457 0.907043V0.907043Z",stroke:"white",strokeWidth:"1.25"}),(0,pr.jsx)(lr,{d:"M7.32458 10.0998L4.82458 7.59977M7.32458 10.0998V3.79764V10.0998ZM7.32458 10.0998L9.82458 7.59977L7.32458 10.0998Z",stroke:"white",strokeWidth:"1.25"})]});const Hr=(0,pr.jsxs)(hr,{viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,pr.jsx)("path",{d:"M7.93298 20.2773L17.933 20.2773C18.1982 20.2773 18.4526 20.172 18.6401 19.9845C18.8276 19.7969 18.933 19.5426 18.933 19.2773C18.933 19.0121 18.8276 18.7578 18.6401 18.5702C18.4526 18.3827 18.1982 18.2773 17.933 18.2773L7.93298 18.2773C7.66777 18.2773 7.41341 18.3827 7.22588 18.5702C7.03834 18.7578 6.93298 19.0121 6.93298 19.2773C6.93298 19.5426 7.03834 19.7969 7.22588 19.9845C7.41341 20.172 7.66777 20.2773 7.93298 20.2773Z",fill:"white"}),(0,pr.jsx)("path",{d:"M12.933 4.27734C12.6678 4.27734 12.4134 4.3827 12.2259 4.57024C12.0383 4.75777 11.933 5.01213 11.933 5.27734L11.933 12.8673L9.64298 10.5773C9.55333 10.4727 9.44301 10.3876 9.31895 10.3276C9.19488 10.2676 9.05975 10.2339 8.92203 10.2285C8.78431 10.2232 8.64698 10.2464 8.51865 10.2967C8.39033 10.347 8.27378 10.4232 8.17632 10.5207C8.07887 10.6181 8.00261 10.7347 7.95234 10.863C7.90206 10.9913 7.87886 11.1287 7.88418 11.2664C7.8895 11.4041 7.92323 11.5392 7.98325 11.6633C8.04327 11.7874 8.12829 11.8977 8.23297 11.9873L12.233 15.9873C12.3259 16.0811 12.4365 16.1555 12.5584 16.2062C12.6803 16.257 12.811 16.2831 12.943 16.2831C13.075 16.2831 13.2057 16.257 13.3276 16.2062C13.4494 16.1555 13.56 16.0811 13.653 15.9873L17.653 11.9873C17.8168 11.796 17.9024 11.55 17.8927 11.2983C17.883 11.0466 17.7786 10.8079 17.6005 10.6298C17.4224 10.4517 17.1837 10.3474 16.932 10.3376C16.6804 10.3279 16.4343 10.4135 16.243 10.5773L13.933 12.8673L13.933 5.27734C13.933 5.01213 13.8276 4.75777 13.6401 4.57024C13.4525 4.3827 13.1982 4.27734 12.933 4.27734Z",fill:"white"})]});const qr=(0,pr.jsxs)(hr,{fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,pr.jsx)(lr,{d:"m11.2721 16.9866.6041 2.2795.6042-2.2795.6213-2.3445c.0001-.0002.0001-.0004.0002-.0006.2404-.9015.8073-1.5543 1.4638-1.8165.0005-.0002.0009-.0004.0013-.0006l1.9237-.7555 1.4811-.5818-1.4811-.5817-1.9264-.7566c0-.0001-.0001-.0001-.0001-.0001-.0001 0-.0001 0-.0001 0-.654-.25727-1.2213-.90816-1.4621-1.81563-.0001-.00006-.0001-.00011-.0001-.00017l-.6215-2.34519-.6042-2.27947-.6041 2.27947-.6216 2.34519v.00017c-.2409.90747-.80819 1.55836-1.46216 1.81563-.00002 0-.00003 0-.00005 0-.00006 0-.00011 0-.00017.0001l-1.92637.7566-1.48108.5817 1.48108.5818 1.92637.7566c.00007 0 .00015.0001.00022.0001.65397.2572 1.22126.9082 1.46216 1.8156v.0002z",stroke:"currentColor",strokeWidth:"1.25",fill:"none"}),(0,pr.jsxs)(ur,{fill:"currentColor",children:[(0,pr.jsx)(lr,{d:"m18.1034 18.3982-.2787.8625-.2787-.8625c-.1314-.4077-.4511-.7275-.8589-.8589l-.8624-.2786.8624-.2787c.4078-.1314.7275-.4512.8589-.8589l.2787-.8624.2787.8624c.1314.4077.4511.7275.8589.8589l.8624.2787-.8624.2786c-.4078.1314-.7269.4512-.8589.8589z"}),(0,pr.jsx)(lr,{d:"m6.33141 6.97291-.27868.86242-.27867-.86242c-.13142-.40775-.45116-.72749-.8589-.85891l-.86243-.27867.86243-.27868c.40774-.13141.72748-.45115.8589-.8589l.27867-.86242.27868.86242c.13142.40775.45116.72749.8589.8589l.86242.27868-.86242.27867c-.40774.13142-.7269.45116-.8589.85891z"})]})]});const Vr=(0,pr.jsx)(hr,{fill:"none",height:"25",viewBox:"0 0 25 25",width:"25",xmlns:"http://www.w3.org/2000/svg",children:(0,pr.jsx)(lr,{d:"m16.2382 9.17969.7499.00645.0066-.75988-.7599.00344zm-5.5442.77506 5.5475-.02507-.0067-1.49998-5.5476.02506zm4.7942-.78152-.0476 5.52507 1.5.0129.0475-5.52506zm.2196-.52387-7.68099 7.68104 1.06066 1.0606 7.68103-7.68098z",fill:"currentColor"})});const Jr=(0,pr.jsx)(hr,{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,pr.jsxs)(ur,{stroke:"currentColor",strokeWidth:"1.5",children:[(0,pr.jsx)(lr,{d:"m6 4.75h12c.6904 0 1.25.55964 1.25 1.25v12c0 .6904-.5596 1.25-1.25 1.25h-12c-.69036 0-1.25-.5596-1.25-1.25v-12c0-.69036.55964-1.25 1.25-1.25z"}),(0,pr.jsx)(lr,{d:"m9.25 19v-14"})]})});const Kr=(0,pr.jsxs)(hr,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,pr.jsx)(lr,{fillRule:"evenodd",clipRule:"evenodd",d:"M7.49271 18.0092C6.97815 17.1176 7.28413 15.9755 8.17569 15.4609C9.06724 14.946 10.2094 15.252 10.7243 16.1435C11.2389 17.0355 10.9329 18.1772 10.0413 18.6922C9.14978 19.2071 8.00764 18.9011 7.49271 18.0092V18.0092Z",fill:"currentColor"}),(0,pr.jsx)(lr,{fillRule:"evenodd",clipRule:"evenodd",d:"M16.5073 6.12747C17.0218 7.01903 16.7158 8.16117 15.8243 8.67573C14.9327 9.19066 13.7906 8.88467 13.2757 7.99312C12.7611 7.10119 13.0671 5.95942 13.9586 5.44449C14.8502 4.92956 15.9923 5.23555 16.5073 6.12747V6.12747Z",fill:"currentColor"}),(0,pr.jsx)(lr,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.60135 11.1355C5.11628 10.2439 6.25805 9.93793 7.14998 10.4525C8.04153 10.9674 8.34752 12.1096 7.83296 13.0011C7.31803 13.8927 6.17588 14.1987 5.28433 13.6841C4.39278 13.1692 4.08679 12.0274 4.60135 11.1355V11.1355Z",fill:"currentColor"}),(0,pr.jsx)(lr,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.3986 13.0011C18.8837 13.8927 17.7419 14.1987 16.85 13.6841C15.9584 13.1692 15.6525 12.027 16.167 11.1355C16.682 10.2439 17.8241 9.93793 18.7157 10.4525C19.6072 10.9674 19.9132 12.1092 19.3986 13.0011V13.0011Z",fill:"currentColor"}),(0,pr.jsx)(lr,{d:"M9.10857 8.92594C10.1389 8.92594 10.9742 8.09066 10.9742 7.06029C10.9742 6.02992 10.1389 5.19464 9.10857 5.19464C8.0782 5.19464 7.24292 6.02992 7.24292 7.06029C7.24292 8.09066 8.0782 8.92594 9.10857 8.92594Z",fill:"currentColor"}),(0,pr.jsx)(lr,{d:"M14.8913 18.942C15.9217 18.942 16.7569 18.1067 16.7569 17.0763C16.7569 16.046 15.9217 15.2107 14.8913 15.2107C13.8609 15.2107 13.0256 16.046 13.0256 17.0763C13.0256 18.1067 13.8609 18.942 14.8913 18.942Z",fill:"currentColor"}),(0,pr.jsx)(lr,{fillRule:"evenodd",clipRule:"evenodd",d:"M10.3841 13.0011C9.86951 12.1096 10.1755 10.9674 11.067 10.4525C11.9586 9.93793 13.1007 10.2439 13.6157 11.1355C14.1302 12.0274 13.8242 13.1692 12.9327 13.6841C12.0411 14.1987 10.899 13.8927 10.3841 13.0011V13.0011Z",fill:"currentColor"})]});const Xr=(0,pr.jsxs)(hr,{fill:"none",viewBox:"0 0 151 148",width:"151",xmlns:"http://www.w3.org/2000/svg",children:[(0,pr.jsx)(sr,{cx:"65.6441",cy:"66.6114",fill:"#0b4a43",r:"65.3897"}),(0,pr.jsxs)(ur,{fill:"#cbc3f5",stroke:"#0b4a43",children:[(0,pr.jsx)(lr,{d:"m61.73 11.3928 3.0825 8.3304.1197.3234.3234.1197 8.3304 3.0825-8.3304 3.0825-.3234.1197-.1197.3234-3.0825 8.3304-3.0825-8.3304-.1197-.3234-.3234-.1197-8.3304-3.0825 8.3304-3.0825.3234-.1197.1197-.3234z",strokeWidth:"1.5"}),(0,pr.jsx)(lr,{d:"m84.3065 31.2718c0 5.9939-12.4614 22.323-18.6978 22.323h-17.8958v56.1522c3.5249.9 11.6535 0 17.8958 0h6.2364c11.2074 3.33 36.0089 7.991 45.5529 0l-9.294-62.1623c-2.267-1.7171-5.949-6.6968-2.55-12.8786 3.4-6.1817 2.55-18.0406 0-24.5756-1.871-4.79616-8.3289-8.90882-14.4482-8.90882s-7.0825 4.00668-6.7993 6.01003z",strokeWidth:"1.75"}),(0,pr.jsx)(fr,{height:"45.5077",rx:"9.13723",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 191.5074 -96.0026)",width:"18.2745",x:"143.755",y:"47.7524"}),(0,pr.jsx)(fr,{height:"42.3038",rx:"8.73674",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 241.97 -50.348)",width:"17.4735",x:"146.159",y:"95.811"}),(0,pr.jsx)(fr,{height:"55.9204",rx:"8.73674",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 213.1347 -85.5913)",width:"17.4735",x:"149.363",y:"63.7717"}),(0,pr.jsx)(fr,{height:"51.1145",rx:"8.73674",strokeWidth:"1.75",transform:"matrix(0 1 -1 0 229.1545 -69.5715)",width:"17.4735",x:"149.363",y:"79.7915"}),(0,pr.jsx)(lr,{d:"m75.7483 105.349c.9858-25.6313-19.2235-42.0514-32.8401-44.0538v12.0146c8.5438 1.068 24.8303 9.7642 24.8303 36.0442 0 23.228 19.4905 33.374 29.6362 33.641v-10.413s-22.6122-1.602-21.6264-27.233z",strokeWidth:"1.75"}),(0,pr.jsx)(lr,{d:"m68.5388 109.354c.9858-25.6312-19.2234-42.0513-32.8401-44.0537v12.0147c8.5438 1.0679 24.8303 9.7641 24.8303 36.044 0 23.228 19.4905 33.374 29.6362 33.641v-10.413s-22.6122-1.602-21.6264-27.233z",strokeWidth:"1.75"})]})]});const Zr=(0,pr.jsxs)(hr,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,pr.jsx)(sr,{cx:"12",cy:"12",r:"7.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,pr.jsx)(sr,{cx:"12",cy:"12",r:"4.25",stroke:"currentColor",strokeWidth:"1.5"}),(0,pr.jsx)(sr,{cx:"11.9999",cy:"12.2",r:"6",transform:"rotate(-45 11.9999 12.2)",stroke:"currentColor",strokeWidth:"3",strokeDasharray:"1.5 4"})]});const Qr=(0,pr.jsx)(hr,{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,pr.jsx)(lr,{d:"m11.7758 3.45425c.0917-.18582.3567-.18581.4484 0l2.3627 4.78731c.0364.07379.1068.12493.1882.13676l5.2831.76769c.2051.02979.287.28178.1386.42642l-3.8229 3.72637c-.0589.0575-.0858.1402-.0719.2213l.9024 5.2618c.0351.2042-.1793.36-.3627.2635l-4.7254-2.4842c-.0728-.0383-.1598-.0383-.2326 0l-4.7254 2.4842c-.18341.0965-.39776-.0593-.36274-.2635l.90247-5.2618c.01391-.0811-.01298-.1638-.0719-.2213l-3.8229-3.72637c-.14838-.14464-.0665-.39663.13855-.42642l5.28312-.76769c.08143-.01183.15182-.06297.18823-.13676z",fill:"currentColor"})});const tn=(0,pr.jsx)(hr,{fill:"none",viewBox:"0 0 25 25",xmlns:"http://www.w3.org/2000/svg",children:(0,pr.jsx)(lr,{clipRule:"evenodd",d:"m13 4c4.9545 0 9 4.04545 9 9 0 4.9545-4.0455 9-9 9-4.95455 0-9-4.0455-9-9 0-4.95455 4.04545-9 9-9zm5.0909 13.4545c-1.9545 3.8637-8.22726 3.8637-10.22726 0-.04546-.1818-.04546-.3636 0-.5454 2-3.8636 8.27276-3.8636 10.22726 0 .0909.1818.0909.3636 0 .5454zm-5.0909-8.90905c-1.2727 0-2.3182 1.04546-2.3182 2.31815 0 1.2728 1.0455 2.3182 2.3182 2.3182s2.3182-1.0454 2.3182-2.3182c0-1.27269-1.0455-2.31815-2.3182-2.31815z",fill:"currentColor",fillRule:"evenodd"})}),en=(0,o.createElement)(hr,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(lr,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function rn(){let t=[],e=[],r={enqueue(t){e.push(t)},addEventListener:(t,e,n,o)=>(t.addEventListener(e,n,o),r.add((()=>t.removeEventListener(e,n,o)))),requestAnimationFrame(...t){let e=requestAnimationFrame(...t);return r.add((()=>cancelAnimationFrame(e)))},nextFrame:(...t)=>r.requestAnimationFrame((()=>r.requestAnimationFrame(...t))),setTimeout(...t){let e=setTimeout(...t);return r.add((()=>clearTimeout(e)))},add:e=>(t.push(e),()=>{let r=t.indexOf(e);if(r>=0){let[e]=t.splice(r,1);e()}}),dispose(){for(let e of t.splice(0))e()},async workQueue(){for(let t of e.splice(0))await t()}};return r}function nn(t,...e){t&&e.length>0&&t.classList.add(...e)}function on(t,...e){t&&e.length>0&&t.classList.remove(...e)}var an=(t=>(t.Ended="ended",t.Cancelled="cancelled",t))(an||{});function cn(t,e,r,n){let o=r?"enter":"leave",i=rn(),a=void 0!==n?function(t){let e={called:!1};return(...r)=>{if(!e.called)return e.called=!0,t(...r)}}(n):()=>{},c=kt(o,{enter:()=>e.enter,leave:()=>e.leave}),s=kt(o,{enter:()=>e.enterTo,leave:()=>e.leaveTo}),u=kt(o,{enter:()=>e.enterFrom,leave:()=>e.leaveFrom});return on(t,...e.enter,...e.enterTo,...e.enterFrom,...e.leave,...e.leaveFrom,...e.leaveTo,...e.entered),nn(t,...c,...u),i.nextFrame((()=>{on(t,...u),nn(t,...s),function(t,e){let r=rn();if(!t)return r.dispose;let{transitionDuration:n,transitionDelay:o}=getComputedStyle(t),[i,a]=[n,o].map((t=>{let[e=0]=t.split(",").filter(Boolean).map((t=>t.includes("ms")?parseFloat(t):1e3*parseFloat(t))).sort(((t,e)=>e-t));return e}));if(i+a!==0){let n=[];n.push(r.addEventListener(t,"transitionrun",(o=>{o.target===o.currentTarget&&(n.splice(0).forEach((t=>t())),n.push(r.addEventListener(t,"transitionend",(t=>{t.target===t.currentTarget&&(e("ended"),n.splice(0).forEach((t=>t())))})),r.addEventListener(t,"transitioncancel",(t=>{t.target===t.currentTarget&&(e("cancelled"),n.splice(0).forEach((t=>t())))}))))})))}else e("ended");r.add((()=>e("cancelled"))),r.dispose}(t,(r=>("ended"===r&&(on(t,...c),nn(t,...e.entered)),a(r))))})),i.dispose}function sn({container:t,direction:e,classes:r,events:n,onStart:o,onStop:a}){let c=fe(),s=function(){let[t]=(0,i.useState)(rn);return(0,i.useEffect)((()=>()=>t.dispose()),[t]),t}(),u=Mt(e),l=Dt((()=>kt(u.current,{enter:()=>n.current.beforeEnter(),leave:()=>n.current.beforeLeave(),idle:()=>{}}))),f=Dt((()=>kt(u.current,{enter:()=>n.current.afterEnter(),leave:()=>n.current.afterLeave(),idle:()=>{}})));Ft((()=>{let e=rn();s.add(e.dispose);let n=t.current;if(n&&"idle"!==u.current&&c.current)return e.dispose(),l(),o.current(u.current),e.add(cn(n,r.current,"enter"===u.current,(t=>{e.dispose(),kt(t,{[an.Ended](){f(),a.current(u.current)},[an.Cancelled]:()=>{}})}))),e.dispose}),[e])}function un(t=""){return t.split(" ").filter((t=>t.trim().length>1))}let ln=(0,i.createContext)(null);ln.displayName="TransitionContext";var fn=(t=>(t.Visible="visible",t.Hidden="hidden",t))(fn||{});let hn=(0,i.createContext)(null);function dn(t){return"children"in t?dn(t.children):t.current.filter((({state:t})=>"visible"===t)).length>0}function pn(t){let e=Mt(t),r=(0,i.useRef)([]),n=fe(),o=Dt(((t,o=Pt.Hidden)=>{let i=r.current.findIndex((({id:e})=>e===t));-1!==i&&(kt(o,{[Pt.Unmount](){r.current.splice(i,1)},[Pt.Hidden](){r.current[i].state="hidden"}}),pe((()=>{var t;!dn(r)&&n.current&&(null==(t=e.current)||t.call(e))})))})),a=Dt((t=>{let e=r.current.find((({id:e})=>e===t));return e?"visible"!==e.state&&(e.state="visible"):r.current.push({id:t,state:"visible"}),()=>o(t,Pt.Unmount)}));return(0,i.useMemo)((()=>({children:r,register:a,unregister:o})),[a,o,r])}function yn(){}hn.displayName="NestingContext";let vn=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function mn(t){var e;let r={};for(let n of vn)r[n]=null!=(e=t[n])?e:yn;return r}let gn=Ot.RenderStrategy,xn=Tt((function(t,e){let{beforeEnter:r,afterEnter:n,beforeLeave:o,afterLeave:a,enter:c,enterFrom:s,enterTo:u,entered:l,leave:f,leaveFrom:h,leaveTo:d,...p}=t,y=(0,i.useRef)(null),v=Ut(y,e),[m,g]=(0,i.useState)("visible"),x=p.unmount?Pt.Unmount:Pt.Hidden,{show:w,appear:b,initial:E}=function(){let t=(0,i.useContext)(ln);if(null===t)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}(),{register:j,unregister:_}=function(){let t=(0,i.useContext)(hn);if(null===t)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return t}(),L=(0,i.useRef)(null),k=Jt();(0,i.useEffect)((()=>{if(k)return j(k)}),[j,k]),(0,i.useEffect)((()=>{if(x===Pt.Hidden&&k){if(w&&"visible"!==m)return void g("visible");kt(m,{hidden:()=>_(k),visible:()=>j(k)})}}),[m,k,j,_,w,x]);let S=Mt({enter:un(c),enterFrom:un(s),enterTo:un(u),entered:un(l),leave:un(f),leaveFrom:un(h),leaveTo:un(d)}),O=function(t){let e=(0,i.useRef)(mn(t));return(0,i.useEffect)((()=>{e.current=mn(t)}),[t]),e}({beforeEnter:r,afterEnter:n,beforeLeave:o,afterLeave:a}),P=Wt();(0,i.useEffect)((()=>{if(P&&"visible"===m&&null===y.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[y,m,P]);let N=E&&!b,C=!P||N||L.current===w?"idle":w?"enter":"leave",A=(0,i.useRef)(!1),T=pn((()=>{A.current||(g("hidden"),_(k))}));sn({container:y,classes:S,events:O,direction:C,onStart:Mt((()=>{A.current=!0})),onStop:Mt((t=>{A.current=!1,"leave"===t&&!dn(T)&&(g("hidden"),_(k))}))}),(0,i.useEffect)((()=>{!N||(x===Pt.Hidden?L.current=null:L.current=w)}),[w,N,m]);let I=p,R={ref:v};return i.createElement(hn.Provider,{value:T},i.createElement(Be,{value:kt(m,{visible:Me.Open,hidden:Me.Closed})},Nt({ourProps:R,theirProps:I,defaultTag:"div",features:gn,visible:"visible"===m,name:"Transition.Child"})))})),wn=Tt((function(t,e){let{show:r,appear:n=!1,unmount:o,...a}=t,c=(0,i.useRef)(null),s=Ut(c,e);Wt();let u=De();if(void 0===r&&null!==u&&(r=kt(u,{[Me.Open]:!0,[Me.Closed]:!1})),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[l,f]=(0,i.useState)(r?"visible":"hidden"),h=pn((()=>{f("hidden")})),[d,p]=(0,i.useState)(!0),y=(0,i.useRef)([r]);Ft((()=>{!1!==d&&y.current[y.current.length-1]!==r&&(y.current.push(r),p(!1))}),[y,r]);let v=(0,i.useMemo)((()=>({show:r,appear:n,initial:d})),[r,n,d]);(0,i.useEffect)((()=>{if(r)f("visible");else if(dn(h)){let t=c.current;if(!t)return;let e=t.getBoundingClientRect();0===e.x&&0===e.y&&0===e.width&&0===e.height&&f("hidden")}else f("hidden")}),[r,h]);let m={unmount:o};return i.createElement(hn.Provider,{value:h},i.createElement(ln.Provider,{value:v},Nt({ourProps:{...m,as:i.Fragment,children:i.createElement(xn,{ref:s,...m,...a})},theirProps:{},defaultTag:i.Fragment,features:gn,visible:"visible"===l,name:"Transition"})))})),bn=Tt((function(t,e){let r=null!==(0,i.useContext)(ln),n=null!==De();return i.createElement(i.Fragment,null,!r&&n?i.createElement(wn,{ref:e,...t}):i.createElement(xn,{ref:e,...t}))})),En=Object.assign(wn,{Child:bn,Root:wn});var jn=(0,o.forwardRef)((function(t,e){var r,n=t.onClose,i=t.isOpen,a=t.invertedButtonColor,c=t.children,s=t.leftContainerBgColor,u=void 0===s?"bg-white":s,l=t.rightContainerBgColor,f=void 0===l?"bg-gray-100":l,h=(0,o.useRef)(null),d=_((function(t){return t.removeAllModals}));return n=null!==(r=n)&&void 0!==r?r:d,(0,pr.jsx)(En.Root,{appear:!0,show:!0,as:o.Fragment,children:(0,pr.jsx)(rr,{as:"div",static:!0,open:i,className:"extendify",initialFocus:null!=e?e:h,onClose:n,children:(0,pr.jsxs)("div",{className:"fixed inset-0 z-high flex",children:[(0,pr.jsx)(En.Child,{as:o.Fragment,enter:"ease-out duration-50 transition",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,pr.jsx)(rr.Overlay,{className:"fixed inset-0 bg-black bg-opacity-40 transition-opacity"})}),(0,pr.jsx)(En.Child,{as:o.Fragment,enter:"ease-out duration-300 translate transform",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,pr.jsx)("div",{className:"m-auto",children:(0,pr.jsxs)("div",{className:"relative m-8 max-w-md justify-between rounded-sm shadow-modal md:m-0 md:flex md:max-w-2xl",children:[(0,pr.jsxs)("button",{onClick:n,ref:h,className:"absolute top-0 right-0 block cursor-pointer rounded-md bg-transparent p-4 text-gray-700 opacity-30 hover:opacity-100",style:a&&{filter:"invert(1)"},children:[(0,pr.jsx)("span",{className:"sr-only",children:(0,or.__)("Close","extendify")}),(0,pr.jsx)(ir,{icon:en})]}),(0,pr.jsx)("div",{className:"w-7/12 p-12 ".concat(u),children:c[0]}),(0,pr.jsx)("div",{className:"hidden w-6/12 md:block ".concat(f),children:c[1]})]})})})]})})})}));function _n(t){return _n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_n(t)}function Ln(){Ln=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==_n(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function kn(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Sn(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){kn(i,n,o,a,c,"next",t)}function c(t){kn(i,n,o,a,c,"throw",t)}a(void 0)}))}}function On(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Pn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Pn(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Nn=function(){var t=On((0,o.useState)((0,or.__)("Install Extendify","extendify")),2),e=t[0],r=t[1],n=On((0,o.useState)(!1),2),i=n[0],a=n[1],c=On((0,o.useState)(!1),2),s=c[0],u=c[1],l=(0,o.useRef)(null),f=q((function(t){return t.markNoticeSeen})),h=q((function(t){return t.giveFreebieImports})),d=_((function(t){return t.removeAllModals})),p=function(){var t=Sn(Ln().mark((function t(){return Ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return d(),f("standalone","modalNotices"),t.next=4,Lt("stln-modal-x");case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,pr.jsxs)(jn,{ref:l,onClose:p,children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"mb-10 flex items-center space-x-2 text-extendify-black",children:Yr}),(0,pr.jsx)("h3",{className:"text-xl",children:(0,or.__)("Get the brand new Extendify plugin today!","extendify")}),(0,pr.jsx)("p",{className:"text-sm text-black",dangerouslySetInnerHTML:{__html:Br((0,or.sprintf)((0,or.__)("Install the new Extendify Library plugin to get the latest we have to offer — right from WordPress.org. Plus, well send you %1$s10 more imports%2$s. Nice.","extendify"),"<strong>","</strong>"))}}),(0,pr.jsx)("div",{children:(0,pr.jsxs)("button",{onClick:function(){r((0,or.__)("Installing...","extendify")),u(!0),Promise.all([Lt("stln-modal-install"),wr(["extendify"]),new Promise((function(t){return setTimeout(t,1e3)}))]).then(Sn(Ln().mark((function t(){return Ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r((0,or.__)("Success! Reloading...","extendify")),a(!0),h(10),t.next=5,Lt("stln-modal-success");case 5:window.location.reload();case 6:case"end":return t.stop()}}),t)})))).catch(function(){var t=Sn(Ln().mark((function t(e){return Ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.error(e),r((0,or.__)("Error. See console.","extendify")),t.next=4,Lt("stln-modal-fail");case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},ref:l,disabled:s,className:"button-extendify-main button-focus mt-2 inline-flex justify-center px-4 py-3",style:{minWidth:"225px"},children:[e,i||(0,pr.jsx)(nr.Icon,{icon:Hr,size:24,className:"ml-2 w-6 flex-grow-0"})]})})]}),(0,pr.jsx)("div",{className:"flex w-full justify-end rounded-tr-sm rounded-br-sm bg-extendify-secondary",children:(0,pr.jsx)("img",{alt:(0,or.__)("Upgrade Now","extendify"),className:"rounded-br-sm max-w-full rounded-tr-sm",src:window.extendifyData.asset_path+"/modal-extendify-purple.png"})})]})};function Cn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return An(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return An(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function An(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const Tn=lodash;function In(){return In=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},In.apply(this,arguments)}function Rn(t,e){return Rn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Rn(t,e)}var Fn=new Map,Mn=new WeakMap,Dn=0,Bn=void 0;function Gn(t){return Object.keys(t).sort().filter((function(e){return void 0!==t[e]})).map((function(e){return e+"_"+("root"===e?(r=t.root)?(Mn.has(r)||(Dn+=1,Mn.set(r,Dn.toString())),Mn.get(r)):"0":t[e]);var r})).toString()}function Un(t,e,r,n){if(void 0===r&&(r={}),void 0===n&&(n=Bn),void 0===window.IntersectionObserver&&void 0!==n){var o=t.getBoundingClientRect();return e(n,{isIntersecting:n,target:t,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),function(){}}var i=function(t){var e=Gn(t),r=Fn.get(e);if(!r){var n,o=new Map,i=new IntersectionObserver((function(e){e.forEach((function(e){var r,i=e.isIntersecting&&n.some((function(t){return e.intersectionRatio>=t}));t.trackVisibility&&void 0===e.isVisible&&(e.isVisible=i),null==(r=o.get(e.target))||r.forEach((function(t){t(i,e)}))}))}),t);n=i.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),r={id:e,observer:i,elements:o},Fn.set(e,r)}return r}(r),a=i.id,c=i.observer,s=i.elements,u=s.get(t)||[];return s.has(t)||s.set(t,u),u.push(e),c.observe(t),function(){u.splice(u.indexOf(e),1),0===u.length&&(s.delete(t),c.unobserve(t)),0===s.size&&(c.disconnect(),Fn.delete(a))}}var zn=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function Yn(t){return"function"!=typeof t.children}var $n=function(t){var e,r;function n(e){var r;return(r=t.call(this,e)||this).node=null,r._unobserveCb=null,r.handleNode=function(t){r.node&&(r.unobserve(),t||r.props.triggerOnce||r.props.skip||r.setState({inView:!!r.props.initialInView,entry:void 0})),r.node=t||null,r.observeNode()},r.handleChange=function(t,e){t&&r.props.triggerOnce&&r.unobserve(),Yn(r.props)||r.setState({inView:t,entry:e}),r.props.onChange&&r.props.onChange(t,e)},r.state={inView:!!e.initialInView,entry:void 0},r}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,Rn(e,r);var o=n.prototype;return o.componentDidUpdate=function(t){t.rootMargin===this.props.rootMargin&&t.root===this.props.root&&t.threshold===this.props.threshold&&t.skip===this.props.skip&&t.trackVisibility===this.props.trackVisibility&&t.delay===this.props.delay||(this.unobserve(),this.observeNode())},o.componentWillUnmount=function(){this.unobserve(),this.node=null},o.observeNode=function(){if(this.node&&!this.props.skip){var t=this.props,e=t.threshold,r=t.root,n=t.rootMargin,o=t.trackVisibility,i=t.delay,a=t.fallbackInView;this._unobserveCb=Un(this.node,this.handleChange,{threshold:e,root:r,rootMargin:n,trackVisibility:o,delay:i},a)}},o.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},o.render=function(){if(!Yn(this.props)){var t=this.state,e=t.inView,r=t.entry;return this.props.children({inView:e,entry:r,ref:this.handleNode})}var n=this.props,o=n.children,a=n.as,c=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(n,zn);return i.createElement(a||"div",In({ref:this.handleNode},c),o)},n}(i.Component);function Wn(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function Hn(){return Hn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Hn.apply(this,arguments)}function qn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Vn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qn(Object(r),!0).forEach((function(e){Jn(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Jn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}$n.displayName="InView",$n.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};const Kn={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0};class Xn extends a().Component{constructor(t){let e;super(t),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this),e=this.props.breakpointCols&&this.props.breakpointCols.default?this.props.breakpointCols.default:parseInt(this.props.breakpointCols)||2,this.state={columnCount:e}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){window&&window.requestAnimationFrame?(window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame((()=>{this.reCalculateColumnCount()}))):this.reCalculateColumnCount()}reCalculateColumnCount(){const t=window&&window.innerWidth||1/0;let e=this.props.breakpointCols;"object"!=typeof e&&(e={default:parseInt(e)||2});let r=1/0,n=e.default||2;for(let o in e){const i=parseInt(o);i>0&&t<=i&&i<r&&(r=i,n=e[o])}n=Math.max(1,parseInt(n)||1),this.state.columnCount!==n&&this.setState({columnCount:n})}itemsInColumns(){const t=this.state.columnCount,e=new Array(t),r=a().Children.toArray(this.props.children);for(let n=0;n<r.length;n++){const o=n%t;e[o]||(e[o]=[]),e[o].push(r[n])}return e}renderColumns(){const{column:t,columnAttrs:e={},columnClassName:r}=this.props,n=this.itemsInColumns(),o=100/n.length+"%";let i=r;i&&"string"!=typeof i&&(this.logDeprecated('The property "columnClassName" requires a string'),void 0===i&&(i="my-masonry-grid_column"));const c=Vn(Vn(Vn({},t),e),{},{style:Vn(Vn({},e.style),{},{width:o}),className:i});return n.map(((t,e)=>a().createElement("div",Hn({},c,{key:e}),t)))}logDeprecated(t){console.error("[Masonry]",t)}render(){const t=this.props,{children:e,breakpointCols:r,columnClassName:n,columnAttrs:o,column:i,className:c}=t,s=Wn(t,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let u=c;return"string"!=typeof c&&(this.logDeprecated('The property "className" requires a string'),void 0===c&&(u="my-masonry-grid")),a().createElement("div",Hn({},s,{className:u}),this.renderColumns())}}Xn.defaultProps=Kn;const Zn=Xn;function Qn(t){return Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(t)}function to(){to=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==Qn(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function eo(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function ro(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){eo(i,n,o,a,c,"next",t)}function c(t){eo(i,n,o,a,c,"throw",t)}a(void 0)}))}}var no=0,oo=function(t){var e=arguments;return ro(to().mark((function r(){var n,o,i,a,c;return to().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=e.length>1&&void 0!==e[1]?e[1]:{},no++,i="pattern"===t.type?"8":"4",a="pattern"===t.type?"patternType":"layoutType",c=Object.assign({filterByFormula:co(t,a),pageSize:i,categories:t.taxonomies,search:t.search,type:t.type,offset:"",initial:1===no,request_count:no,sdk_partner:null!==(n=q.getState().sdkPartner)&&void 0!==n?n:""},o),r.next=7,V.post("templates",c);case 7:return r.abrupt("return",r.sent);case 8:case"end":return r.stop()}}),r)})))()},io=function(t){var e,r,n,o,i,a,c=null!==(e=null===(r=jt.getState())||void 0===r||null===(n=r.searchParams)||void 0===n?void 0:n.taxonomies)&&void 0!==e?e:[];return V.post("templates/".concat(t.id),{template_id:null==t?void 0:t.id,categories:c,maybe_import:!0,type:null===(o=t.fields)||void 0===o?void 0:o.type,sdk_partner:null!==(i=q.getState().sdkPartner)&&void 0!==i?i:"",pageSize:"1",template_name:null===(a=t.fields)||void 0===a?void 0:a.title})},ao=function(t){var e,r,n,o,i,a,c,s,u,l=null!==(e=null===(r=jt.getState())||void 0===r||null===(n=r.searchParams)||void 0===n?void 0:n.taxonomies)&&void 0!==e?e:[];return V.post("templates/".concat(t.id),{template_id:t.id,categories:l,imported:!0,basePattern:null!==(o=null!==(i=null===(a=t.fields)||void 0===a?void 0:a.basePattern)&&void 0!==i?i:null===(c=t.fields)||void 0===c?void 0:c.baseLayout)&&void 0!==o?o:"",type:t.fields.type,sdk_partner:null!==(s=q.getState().sdkPartner)&&void 0!==s?s:"",pageSize:"1",template_name:null===(u=t.fields)||void 0===u?void 0:u.title})},co=function(t,e){var r,n,o=t.taxonomies,i=null==o||null===(r=o.siteType)||void 0===r?void 0:r.slug,a=['{type}="'.concat(e.replace("Type",""),'"'),'{siteType}="'.concat(i,'"')];return null!==(n=o[e])&&void 0!==n&&n.slug&&a.push("{".concat(e,'}="').concat(o[e].slug,'"')),"AND(".concat(a.join(", "),")").replace(/\r?\n|\r/g,"")};const so=wp.blockEditor;function uo(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return lo(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lo(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var fo=function(){var t=uo((0,o.useState)(!1),2),e=t[0],r=t[1];return(0,o.useEffect)((function(){var t=function(){return r(window.location.search.indexOf("DEVMODE")>-1||window.location.search.indexOf("LOCALMODE")>-1)};return t(),window.addEventListener("popstate",t),function(){window.removeEventListener("popstate",t)}}),[]),e};function ho(t){return ho="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ho(t)}function po(){po=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==ho(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function yo(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function vo(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){yo(i,n,o,a,c,"next",t)}function c(t){yo(i,n,o,a,c,"throw",t)}a(void 0)}))}}var mo=[],go=[];function xo(t){return wo.apply(this,arguments)}function wo(){return wo=vo(po().mark((function t(e){var r,n,o,i,a,c,s;return po().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=(c=null!==(r=null==e||null===(n=e.fields)||void 0===n?void 0:n.required_plugins)&&void 0!==r?r:[]).filter((function(t){return"editorplus"!==t})),null!==(o=c)&&void 0!==o&&o.length){t.next=4;break}return t.abrupt("return",!1);case 4:if(null!==(i=mo)&&void 0!==i&&i.length){t.next=10;break}return t.t0=Object,t.next=8,xr();case 8:t.t1=t.sent,mo=t.t0.keys.call(t.t0,t.t1);case 10:return s=!(null===(a=c)||void 0===a||!a.length)&&c.filter((function(t){return!mo.some((function(e){return e.includes(t)}))})),t.abrupt("return",s.length);case 12:case"end":return t.stop()}}),t)}))),wo.apply(this,arguments)}function bo(t){return Eo.apply(this,arguments)}function Eo(){return Eo=vo(po().mark((function t(e){var r,n,o,i,a,c,s;return po().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=(c=null!==(r=null==e||null===(n=e.fields)||void 0===n?void 0:n.required_plugins)&&void 0!==r?r:[]).filter((function(t){return"editorplus"!==t})),null!==(o=c)&&void 0!==o&&o.length){t.next=4;break}return t.abrupt("return",!1);case 4:if(null!==(i=go)&&void 0!==i&&i.length){t.next=10;break}return t.t0=Object,t.next=8,br();case 8:t.t1=t.sent,go=t.t0.values.call(t.t0,t.t1);case 10:if(s=!(null===(a=c)||void 0===a||!a.length)&&c.filter((function(t){return!go.some((function(e){return e.includes(t)}))})),!s){t.next=16;break}return t.next=14,xo(e);case 14:if(!t.sent){t.next=16;break}return t.abrupt("return",!1);case 16:return t.abrupt("return",null==s?void 0:s.length);case 17:case"end":return t.stop()}}),t)}))),Eo.apply(this,arguments)}var jo=u(g((function(t){return{wantedTemplate:{},importOnLoad:!1,setWanted:function(e){return t({wantedTemplate:e})},removeWanted:function(){return t({wantedTemplate:{}})}}}),{name:"extendify-wanted-template"}));var _o=function(t){return Lo(t,"open")};function Lo(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"broken-event",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"open";q.setState({entryPoint:t}),window.dispatchEvent(new CustomEvent("extendify::".concat(e,"-library"),{detail:t,bubbles:!0}))}function ko(t){switch(t){case"editorplus":return"Editor Plus";case"ml-slider":return"MetaSlider"}return t}function So(t){switch(t){case"siteType":return(0,or.__)("Site Type","extendify");case"patternType":return(0,or.__)("Content","extendify");case"layoutType":return(0,or.__)("Page Types","extendify")}return t}function Oo(){var t,e,r,n=jo((function(t){return t.wantedTemplate})),i=(null==n||null===(t=n.fields)||void 0===t?void 0:t.required_plugins)||[];return(0,pr.jsxs)(nr.Modal,{title:(0,or.__)("Plugins required","extendify"),isDismissible:!1,children:[(0,pr.jsx)("p",{style:{maxWidth:"400px"},children:(0,or.sprintf)((0,or.__)("In order to add this %s to your site, the following plugins are required to be installed and activated.","extendify"),null!==(e=null==n||null===(r=n.fields)||void 0===r?void 0:r.type)&&void 0!==e?e:"template")}),(0,pr.jsx)("ul",{children:i.filter((function(t){return"editorplus"!==t})).map((function(t){return(0,pr.jsx)("li",{children:ko(t)},t)}))}),(0,pr.jsx)("p",{style:{maxWidth:"400px",fontWeight:"bold"},children:(0,or.__)("Please contact a site admin for assistance in adding these plugins to your site.","extendify")}),(0,pr.jsx)(nr.Button,{isPrimary:!0,onClick:function(){return(0,o.render)((0,pr.jsx)(Nc,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none"},children:(0,or.__)("Return to library","extendify")})]})}const Po=wp.data;function No(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Co(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Co(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Co(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ao(){var t=No((0,o.useState)(!1),2),e=t[0],r=t[1],n=function(){};return(0,(0,Po.select)("core/editor").isEditedPostDirty)()?(0,pr.jsxs)(nr.Modal,{title:(0,or.__)("Reload required","extendify"),isDismissible:!1,children:[(0,pr.jsx)("p",{style:{maxWidth:"400px"},children:(0,or.__)("Just one more thing! We need to reload the page to continue.","extendify")}),(0,pr.jsxs)(nr.ButtonGroup,{children:[(0,pr.jsx)(nr.Button,{isPrimary:!0,onClick:n,disabled:e,children:(0,or.__)("Reload page","extendify")}),(0,pr.jsx)(nr.Button,{isSecondary:!0,onClick:function(){r(!0),(0,Po.dispatch)("core/editor").savePost(),r(!1)},isBusy:e,style:{margin:"0 4px"},children:(0,or.__)("Save changes","extendify")})]})]}):null}function To(t){var e=t.msg;return(0,pr.jsxs)(nr.Modal,{style:{maxWidth:"500px"},title:(0,or.__)("Error Activating plugins","extendify"),isDismissible:!1,children:[(0,or.__)("You have encountered an error that we cannot recover from. Please try again.","extendify"),(0,pr.jsx)("br",{}),(0,pr.jsx)(nr.Notice,{isDismissible:!1,status:"error",children:e}),(0,pr.jsx)(nr.Button,{isPrimary:!0,onClick:function(){(0,o.render)((0,pr.jsx)(Uo,{}),document.getElementById("extendify-root"))},children:(0,or.__)("Go back","extendify")})]})}function Io(t){return Io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Io(t)}function Ro(){Ro=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==Io(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function Fo(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Mo(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Fo(i,n,o,a,c,"next",t)}function c(t){Fo(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Do(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Bo(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bo(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Go(){var t,e=Do((0,o.useState)(""),2),r=e[0],n=e[1],i=jo((function(t){return t.wantedTemplate})),a=null==i||null===(t=i.fields)||void 0===t?void 0:t.required_plugins.filter((function(t){return"editorplus"!==t}));return wr(a).then((function(){jo.setState({importOnLoad:!0})})).then(Mo(Ro().mark((function t(){return Ro().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise((function(t){return setTimeout(t,1e3)}));case 2:(0,o.render)((0,pr.jsx)(Ao,{}),document.getElementById("extendify-root"));case 3:case"end":return t.stop()}}),t)})))).catch((function(t){var e=t.response;n(e.data.message)})),r?(0,pr.jsx)(To,{msg:r}):(0,pr.jsx)(nr.Modal,{title:(0,or.__)("Activating plugins","extendify"),isDismissible:!1,children:(0,pr.jsx)(nr.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,or.__)("Activating...","extendify")})})}function Uo(t){var e,r,n,i,a,c=jo((function(t){return t.wantedTemplate})),s=(null==c||null===(e=c.fields)||void 0===e?void 0:e.required_plugins)||[];return null!==(r=q.getState())&&void 0!==r&&r.canActivatePlugins?(0,pr.jsx)(nr.Modal,{title:(0,or.__)("Activate required plugins","extendify"),isDismissible:!1,children:(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{style:{maxWidth:"400px"},children:null!==(n=t.message)&&void 0!==n?n:(0,or.__)((0,or.sprintf)("There is just one more step. This %s requires the following plugins to be installed and activated:",null!==(i=null==c||null===(a=c.fields)||void 0===a?void 0:a.type)&&void 0!==i?i:"template"),"extendify")}),(0,pr.jsx)("ul",{children:s.filter((function(t){return"editorplus"!==t})).map((function(t){return(0,pr.jsx)("li",{children:ko(t)},t)}))}),(0,pr.jsxs)(nr.ButtonGroup,{children:[(0,pr.jsx)(nr.Button,{isPrimary:!0,onClick:function(){return(0,o.render)((0,pr.jsx)(Go,{}),document.getElementById("extendify-root"))},children:(0,or.__)("Activate Plugins","extendify")}),t.showClose&&(0,pr.jsx)(nr.Button,{isTertiary:!0,onClick:function(){return(0,o.render)((0,pr.jsx)(Nc,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none",margin:"0 4px"},children:(0,or.__)("No thanks, return to library","extendify")})]})]})}):(0,pr.jsx)(Oo,{})}function zo(t){return zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zo(t)}function Yo(){Yo=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==zo(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function $o(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}var Wo=function(){var t,e=(t=Yo().mark((function t(e){return Yo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,bo(e);case 2:return t.t0=!t.sent,t.t1=function(){},t.t2=function(){return new Promise((function(){(0,o.render)((0,pr.jsx)(Uo,{showClose:!0}),document.getElementById("extendify-root"))}))},t.abrupt("return",{id:"hasPluginsActivated",pass:t.t0,allow:t.t1,deny:t.t2});case 6:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){$o(i,n,o,a,c,"next",t)}function c(t){$o(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}();function Ho(t){var e=t.msg;return(0,pr.jsxs)(nr.Modal,{style:{maxWidth:"500px"},title:(0,or.__)("Error installing plugins","extendify"),isDismissible:!1,children:[(0,or.__)("You have encountered an error that we cannot recover from. Please try again.","extendify"),(0,pr.jsx)("br",{}),(0,pr.jsx)(nr.Notice,{isDismissible:!1,status:"error",children:e}),(0,pr.jsx)(nr.Button,{isPrimary:!0,onClick:function(){return(0,o.render)((0,pr.jsx)(Ko,{}),document.getElementById("extendify-root"))},children:(0,or.__)("Go back","extendify")})]})}function qo(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Vo(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vo(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Jo(t){var e,r=t.requiredPlugins,n=qo((0,o.useState)(""),2),i=n[0],a=n[1],c=jo((function(t){return t.wantedTemplate})),s=null!=r?r:null==c||null===(e=c.fields)||void 0===e?void 0:e.required_plugins.filter((function(t){return"editorplus"!==t}));return wr(s).then((function(){jo.setState({importOnLoad:!0}),(0,o.render)((0,pr.jsx)(Ao,{}),document.getElementById("extendify-root"))})).catch((function(t){var e=t.message;a(e)})),i?(0,pr.jsx)(Ho,{msg:i}):(0,pr.jsx)(nr.Modal,{title:(0,or.__)("Installing plugins","extendify"),isDismissible:!1,children:(0,pr.jsx)(nr.Button,{style:{width:"100%"},disabled:!0,isPrimary:!0,isBusy:!0,onClick:function(){},children:(0,or.__)("Installing...","extendify")})})}function Ko(t){var e,r,n,i,a,c=t.forceOpen,s=t.buttonLabel,u=t.title,l=t.message,f=t.requiredPlugins,h=jo((function(t){return t.wantedTemplate}));f=null!==(e=f)&&void 0!==e?e:null==h||null===(r=h.fields)||void 0===r?void 0:r.required_plugins;return null!==(n=q.getState())&&void 0!==n&&n.canInstallPlugins?(0,pr.jsxs)(nr.Modal,{title:null!=u?u:(0,or.__)("Install required plugins","extendify"),isDismissible:!1,children:[(0,pr.jsx)("p",{style:{maxWidth:"400px"},children:null!=l?l:(0,or.__)((0,or.sprintf)("There is just one more step. This %s requires the following to be automatically installed and activated:",null!==(i=null==h||null===(a=h.fields)||void 0===a?void 0:a.type)&&void 0!==i?i:"template"),"extendify")}),(null==l?void 0:l.length)>0||(0,pr.jsx)("ul",{children:f.filter((function(t){return"editorplus"!==t})).map((function(t){return(0,pr.jsx)("li",{children:ko(t)},t)}))}),(0,pr.jsxs)(nr.ButtonGroup,{children:[(0,pr.jsx)(nr.Button,{isPrimary:!0,onClick:function(){return(0,o.render)((0,pr.jsx)(Jo,{requiredPlugins:f}),document.getElementById("extendify-root"))},children:null!=s?s:(0,or.__)("Install Plugins","extendify")}),c||(0,pr.jsx)(nr.Button,{isTertiary:!0,onClick:function(){c||(0,o.render)((0,pr.jsx)(Nc,{show:!0}),document.getElementById("extendify-root"))},style:{boxShadow:"none",margin:"0 4px"},children:(0,or.__)("No thanks, take me back","extendify")})]})]}):(0,pr.jsx)(Oo,{})}function Xo(t){return Xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xo(t)}function Zo(){Zo=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==Xo(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function Qo(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}var ti=function(){var t,e=(t=Zo().mark((function t(e){return Zo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,xo(e);case 2:return t.t0=!t.sent,t.t1=function(){},t.t2=function(){return new Promise((function(){(0,o.render)((0,pr.jsx)(Ko,{}),document.getElementById("extendify-root"))}))},t.abrupt("return",{id:"hasRequiredPlugins",pass:t.t0,allow:t.t1,deny:t.t2});case 6:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Qo(i,n,o,a,c,"next",t)}function c(t){Qo(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}();function ei(t){return ei="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ei(t)}function ri(){ri=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==ei(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function ni(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return oi(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oi(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function oi(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ii(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function ai(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ii(i,n,o,a,c,"next",t)}function c(t){ii(i,n,o,a,c,"throw",t)}a(void 0)}))}}function ci(t){return new li(t)}function si(t){return function(){return new ui(t.apply(this,arguments))}}function ui(t){var e,r;function n(e,r){try{var i=t[e](r),a=i.value,c=a instanceof li;Promise.resolve(c?a.wrapped:a).then((function(t){c?n("return"===e?"return":"next",t):o(i.done?"return":"normal",t)}),(function(t){n("throw",t)}))}catch(t){o("throw",t)}}function o(t,o){switch(t){case"return":e.resolve({value:o,done:!0});break;case"throw":e.reject(o);break;default:e.resolve({value:o,done:!1})}(e=e.next)?n(e.key,e.arg):r=null}this._invoke=function(t,o){return new Promise((function(i,a){var c={key:t,arg:o,resolve:i,reject:a,next:null};r?r=r.next=c:(e=r=c,n(t,o))}))},"function"!=typeof t.return&&(this.return=void 0)}function li(t){this.wrapped=t}ui.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},ui.prototype.next=function(t){return this._invoke("next",t)},ui.prototype.throw=function(t){return this._invoke("throw",t)},ui.prototype.return=function(t){return this._invoke("return",t)};function fi(t){return hi.apply(this,arguments)}function hi(){return(hi=ai(ri().mark((function t(e){var r,n;return ri().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=di(e.stack);case 1:return n=void 0,t.prev=3,t.next=6,r.next();case 6:n=t.sent,t.next=13;break;case 9:throw t.prev=9,t.t0=t.catch(3),e.reset(),"Middleware exited";case 13:if(!n.done){t.next=15;break}return t.abrupt("break",17);case 15:t.next=1;break;case 17:case"end":return t.stop()}}),t,null,[[3,9]])})))).apply(this,arguments)}function di(t){return pi.apply(this,arguments)}function pi(){return pi=si(ri().mark((function t(e){var r,n,o;return ri().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=ni(e),t.prev=1,r.s();case 3:if((n=r.n()).done){t.next=11;break}return o=n.value,t.next=7,ci(o());case 7:return t.next=9,t.sent;case 9:t.next=3;break;case 11:t.next=16;break;case 13:t.prev=13,t.t0=t.catch(1),r.e(t.t0);case 16:return t.prev=16,r.f(),t.finish(16);case 19:case"end":return t.stop()}}),t,null,[[1,13,16,19]])}))),pi.apply(this,arguments)}function yi(t,e){var r=(0,Po.dispatch)("core/block-editor"),n=r.insertBlocks,o=r.replaceBlock,i=(0,Po.select)("core/block-editor"),a=i.getSelectedBlock,c=i.getBlockHierarchyRootClientId,s=i.getBlockIndex,u=i.getGlobalBlockCount,l=a()||{},f=l.clientId,h=l.name,d=l.attributes,p=f?c(f):"",y=(p?s(p):u())+1;return("core/paragraph"===h&&""===(null==d?void 0:d.content)?o(f,t):n(t,y)).then((function(){return window.dispatchEvent(new CustomEvent("extendify::template-inserted",{detail:{template:e},bubbles:!0}))}))}var vi=r(4306);function mi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return gi(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gi(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gi(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var xi=function(t){var e,r,n,i,a,c=t.template,s=null!=c&&null!==(e=c.fields)&&void 0!==e&&null!==(r=e.basePattern)&&void 0!==r&&r.length?null==c||null===(n=c.fields)||void 0===n?void 0:n.basePattern[0]:"",u=mi((0,o.useState)(s),2),l=u[0],f=u[1];return(0,o.useEffect)((function(){null!=s&&s.length&&l!==s&&setTimeout((function(){return f(s)}),1e3)}),[l,s]),s?(0,pr.jsxs)("div",{className:"absolute bottom-0 left-0 z-50 mb-4 ml-4 flex items-center space-x-2 opacity-0 transition duration-100 group-hover:opacity-100 space-x-0.5",children:[(0,pr.jsx)(vi.CopyToClipboard,{text:null==c||null===(i=c.fields)||void 0===i?void 0:i.basePattern,onCopy:function(){return f((0,or.__)("Copied!","extendify"))},children:(0,pr.jsx)("button",{className:"text-sm rounded-md border border-black bg-white py-1 px-2.5 font-medium text-black no-underline m-0 cursor-pointer",children:(0,or.sprintf)((0,or.__)("Base: %s","extendify"),l)})}),(0,pr.jsx)("a",{target:"_blank",className:"text-sm rounded-md border border-black bg-white py-1 px-2.5 font-medium text-black no-underline m-0",href:null==c||null===(a=c.fields)||void 0===a?void 0:a.editURL,rel:"noreferrer",children:(0,or.__)("Edit","extendify")})]}):null};function wi(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function bi(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?wi(Object(r),!0).forEach((function(e){Ei(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wi(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ei(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ji=(0,o.forwardRef)((function(t,e){var r,n=t.isOpen,i=t.heading,a=t.onClose,c=t.children,s=(0,o.useRef)(null),u=_((function(t){return t.removeAllModals}));return a=null!==(r=a)&&void 0!==r?r:u,(0,pr.jsx)(En,{appear:!0,show:n,as:o.Fragment,className:"extendify",children:(0,pr.jsx)(rr,{initialFocus:null!=e?e:s,onClose:a,children:(0,pr.jsxs)("div",{className:"fixed inset-0 z-high flex",children:[(0,pr.jsx)(En.Child,{as:o.Fragment,enter:"ease-out duration-200 transition",enterFrom:"opacity-0",enterTo:"opacity-100",children:(0,pr.jsx)(rr.Overlay,{className:"fixed inset-0 bg-black bg-opacity-40"})}),(0,pr.jsx)(En.Child,{as:o.Fragment,enter:"ease-out duration-300 translate transform",enterFrom:"opacity-0 translate-y-4 sm:translate-y-5",enterTo:"opacity-100 translate-y-0",children:(0,pr.jsx)("div",{className:"relative m-auto w-full",children:(0,pr.jsxs)("div",{className:"relative m-auto w-full max-w-lg items-center justify-center rounded-sm bg-white shadow-modal",children:[i?(0,pr.jsxs)("div",{className:"flex items-center justify-between border-b py-2 pl-6 pr-3 leading-none",children:[(0,pr.jsx)("span",{className:"whitespace-nowrap text-base text-extendify-black",children:i}),(0,pr.jsx)(_i,{onClick:a})]}):(0,pr.jsx)("div",{className:"absolute top-0 right-0 block px-4 py-4 ",children:(0,pr.jsx)(_i,{ref:s,onClick:a})}),(0,pr.jsx)("div",{children:c})]})})})]})})})})),_i=(0,o.forwardRef)((function(t,e){return(0,pr.jsx)(nr.Button,bi(bi({},t),{},{icon:(0,pr.jsx)(ir,{icon:en}),ref:e,className:"text-extendify-black opacity-75 hover:opacity-100",showTooltip:!1,label:(0,or.__)("Close dialog","extendify")}))}));function Li(t){return Li="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Li(t)}function ki(){ki=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==Li(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function Si(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Oi(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Si(i,n,o,a,c,"next",t)}function c(t){Si(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Pi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ni(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ni(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ni(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Ci=function(){var t=Pi((0,o.useState)(!1),2),e=t[0],r=t[1],n=Pi((0,o.useState)(!1),2),i=n[0],a=n[1],c=fo(),s=function(){var t=Oi(ki().mark((function t(){return ki().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=2;break}return t.abrupt("return");case 2:if(r(!0),!i){t.next=10;break}return a(!1),t.next=7,q.persist.rehydrate();case 7:return window.extendifyData._canRehydrate=!1,r(!1),t.abrupt("return");case 10:return q.persist.clearStorage(),_.persist.clearStorage(),t.next=14,new Promise((function(t){return setTimeout(t,1e3)}));case 14:window.extendifyData._canRehydrate=!0,a(!0),r(!1);case 17:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),u=function(){var t=Oi(ki().mark((function t(){var e;return ki().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new URLSearchParams(window.location.search)).delete("LOCALMODE",1),e[e.has("DEVMODE")||c?"delete":"append"]("DEVMODE",1),window.history.replaceState(null,null,window.location.pathname+"?"+e.toString()),t.next=6,new Promise((function(t){return setTimeout(t,500)}));case 6:window.dispatchEvent(new Event("popstate")),jt.getState().resetTemplates(),jt.getState().updateSearchParams({}),ht.persist.clearStorage(),ht.persist.rehydrate(),jt.setState({taxonomyDefaultState:{}}),ht.getState().fetchTaxonomies().then((function(){jt.getState().setupDefaultTaxonomies()}));case 13:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return window.extendifyData.devbuild?(0,pr.jsxs)("section",{className:"p-6 flex flex-col space-y-6 border-l-8 border-extendify-secondary",children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{className:"text-base m-0 text-extendify-black",children:"Development Settings"}),(0,pr.jsx)("p",{className:"text-sm italic m-0 text-gray-500",children:"Only available on dev builds"})]}),(0,pr.jsxs)("div",{className:"flex space-x-2",children:[(0,pr.jsxs)(nr.Button,{isSecondary:!0,onClick:u,children:["Switch to ",c?"Live":"Dev"," Server"]}),(0,pr.jsx)(nr.Button,{isSecondary:!0,onClick:s,children:e?"Processing...":i?"OK! Press to rehydrate app":"Reset User Data"})]})]}):null};function Ai(t){return Ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ai(t)}function Ti(){Ti=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==Ai(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function Ii(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Ri(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ii(i,n,o,a,c,"next",t)}function c(t){Ii(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Fi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Mi(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mi(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mi(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Di(t){var e=t.actionCallback,r=t.initialFocus,n=q((function(t){return t.apiKey.length})),i=Fi((0,o.useState)(""),2),a=i[0],c=i[1],s=Fi((0,o.useState)(""),2),u=s[0],l=s[1],f=Fi((0,o.useState)(""),2),h=f[0],d=f[1],p=Fi((0,o.useState)("info"),2),y=p[0],v=p[1],m=Fi((0,o.useState)(!1),2),g=m[0],x=m[1],w=Fi((0,o.useState)(!1),2),b=w[0],E=w[1],j=(0,o.useRef)(null),_=(0,o.useRef)(null),L=fo();(0,o.useEffect)((function(){return c(q.getState().email),function(){return v("info")}}),[]),(0,o.useEffect)((function(){var t;b&&(null==j||null===(t=j.current)||void 0===t||t.focus())}),[b]);var k=function(){var t=Ri(Ti().mark((function t(e){var r,n,o,i,c;return Ti().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.preventDefault(),x(!0),d(""),t.next=5,C(a,u);case 5:if(r=t.sent,n=r.token,o=r.error,i=r.exception,void 0===(c=r.message)){t.next=15;break}return v("error"),x(!1),d(null!=c&&c.length?c:"Error: Are you interacting with the wrong server?"),t.abrupt("return");case 15:if(!o&&!i){t.next=20;break}return v("error"),x(!1),d(null!=o&&o.length?o:i),t.abrupt("return");case 20:if(n&&"string"==typeof n){t.next=25;break}return v("error"),x(!1),d((0,or.__)("Something went wrong","extendify")),t.abrupt("return");case 25:v("success"),d("Success!"),E(!0),x(!1),q.setState({email:a,apiKey:n});case 30:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return b?(0,pr.jsxs)("section",{className:"space-y-6 p-6 text-center flex flex-col items-center",children:[(0,pr.jsx)(ir,{icon:Xr,size:148}),(0,pr.jsx)("p",{className:"text-center text-lg font-semibold m-0 text-extendify-black",children:(0,or.__)("You've signed in to Extendify","extendify")}),(0,pr.jsx)(nr.Button,{ref:j,className:"cursor-pointer rounded bg-extendify-main p-2 px-4 text-center text-white",onClick:e,children:(0,or.__)("View patterns","extendify")})]}):n?(0,pr.jsxs)("section",{className:"w-full space-y-6 p-6",children:[(0,pr.jsx)("p",{className:"text-base m-0 text-extendify-black",children:(0,or.__)("Account","extendify")}),(0,pr.jsxs)("div",{className:"flex items-center justify-between",children:[(0,pr.jsxs)("div",{className:"-ml-2 flex items-center space-x-2",children:[(0,pr.jsx)(ir,{icon:tn,size:48}),(0,pr.jsx)("p",{className:"text-extendify-black",children:null!=a&&a.length?a:(0,or.__)("Logged In","extendify")})]}),L&&(0,pr.jsx)(nr.Button,{className:"cursor-pointer rounded bg-extendify-main px-4 py-3 text-center text-white hover:bg-extendify-main-dark",onClick:function(){l(""),q.setState({apiKey:""}),setTimeout((function(){var t;null==_||null===(t=_.current)||void 0===t||t.focus()}),0)},children:(0,or.__)("Sign out","extendify")})]})]}):(0,pr.jsxs)("section",{className:"space-y-6 p-6 text-left",children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)("p",{className:"text-center text-lg font-semibold m-0 text-extendify-black",children:(0,or.__)("Sign in to Extendify","extendify")}),(0,pr.jsxs)("p",{className:"space-x-1 text-center text-sm m-0 text-extendify-gray",children:[(0,pr.jsx)("span",{children:(0,or.__)("Don't have an account?","extendify")}),(0,pr.jsx)("a",{href:"https://extendify.com/pricing?utm_source=".concat(window.extendifyData.sdk_partner,"&utm_medium=library&utm_campaign=sign-in-form&utm_content=sign-up"),target:"_blank",onClick:Ri(Ti().mark((function t(){return Ti().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Lt("sign-up-link-from-login-modal-click");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),className:"underline hover:no-underline text-extendify-gray",rel:"noreferrer",children:(0,or.__)("Sign up","extendify")})]})]}),(0,pr.jsxs)("form",{onSubmit:k,className:"flex flex-col items-center justify-center space-y-2",children:[(0,pr.jsxs)("div",{className:"flex items-center",children:[(0,pr.jsx)("label",{className:"sr-only",htmlFor:"extendify-login-email",children:(0,or.__)("Email address","extendify")}),(0,pr.jsx)("input",{ref:r,id:"extendify-login-email",name:"extendify-login-email",style:{minWidth:"320px"},type:"email",className:"w-full rounded border-2 p-2",placeholder:(0,or.__)("Email address","extendify"),value:a.length?a:"",onChange:function(t){return c(t.target.value)}})]}),(0,pr.jsxs)("div",{className:"flex items-center",children:[(0,pr.jsx)("label",{className:"sr-only",htmlFor:"extendify-login-license",children:(0,or.__)("License key","extendify")}),(0,pr.jsx)("input",{ref:_,id:"extendify-login-license",name:"extendify-login-license",style:{minWidth:"320px"},type:"text",className:"w-full rounded border-2 p-2",placeholder:(0,or.__)("License key","extendify"),value:u,onChange:function(t){return l(t.target.value)}})]}),(0,pr.jsx)("div",{className:"flex justify-center pt-2",children:(0,pr.jsxs)("button",{type:"submit",className:"relative flex w-72 max-w-full cursor-pointer justify-center rounded bg-extendify-main p-2 py-3 text-center text-base text-white hover:bg-extendify-main-dark ",children:[(0,pr.jsx)("span",{children:(0,or.__)("Sign In","extendify")}),g&&(0,pr.jsx)("div",{className:"absolute right-2.5",children:(0,pr.jsx)(nr.Spinner,{})})]})}),h&&(0,pr.jsx)("div",{className:cr()({"border-gray-900 text-gray-900":"info"===y,"border-wp-alert-red text-wp-alert-red":"error"===y,"border-extendify-main text-extendify-main":"success"===y}),children:h}),(0,pr.jsx)("div",{className:"pt-4 text-center",children:(0,pr.jsx)("a",{target:"_blank",rel:"noreferrer",href:"https://extendify.com/guides/sign-in?utm_source=".concat(window.extendifyData.sdk_partner,"&utm_medium=library&utm_campaign=sign-in-form&utm_content=need-help"),onClick:Ri(Ti().mark((function t(){return Ti().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Lt("need-help-link-from-login-modal-click");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),className:"underline hover:no-underline text-sm text-extendify-gray",children:(0,or.__)("Need Help?","extendify")})})]})]})}var Bi=function(){var t=(0,o.useRef)(null),e=_((function(t){return t.removeAllModals}));return(0,pr.jsx)(ji,{heading:(0,or.__)("Settings","extendify"),isOpen:!0,ref:t,children:(0,pr.jsxs)("div",{className:"flex justify-center flex-col divide-y",children:[(0,pr.jsx)(Ci,{}),(0,pr.jsx)(Di,{initialFocus:t,actionCallback:e})]})})};function Gi(t){return Gi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gi(t)}function Ui(){Ui=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==Gi(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function zi(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Yi(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){zi(i,n,o,a,c,"next",t)}function c(t){zi(i,n,o,a,c,"throw",t)}a(void 0)}))}}var $i=function(){var t=_((function(t){return t.pushModal})),e=(0,o.useRef)(null);return(0,pr.jsxs)(jn,{isOpen:!0,ref:e,leftContainerBgColor:"bg-white",children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"mb-5 flex items-center space-x-2 text-extendify-black",children:Yr}),(0,pr.jsx)("h3",{className:"mt-0 text-xl",children:(0,or.__)("You're out of imports","extendify")}),(0,pr.jsx)("p",{className:"text-sm text-black",children:(0,or.__)("Sign up today and get unlimited access to our entire collection of patterns and page layouts.","extendify")}),(0,pr.jsxs)("div",{children:[(0,pr.jsxs)("a",{target:"_blank",ref:e,className:"button-extendify-main button-focus mt-2 inline-flex justify-center px-4 py-3",style:{minWidth:"225px"},href:"https://extendify.com/pricing/?utm_source=".concat(window.extendifyData.sdk_partner,"&utm_medium=library&utm_campaign=no-imports-modal&utm_content=get-unlimited-imports"),onClick:Yi(Ui().mark((function t(){return Ui().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Lt("no-imports-modal-click");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),rel:"noreferrer",children:[(0,or.__)("Get Unlimited Imports","extendify"),(0,pr.jsx)(nr.Icon,{icon:Vr,size:24,className:"-mr-1"})]}),(0,pr.jsxs)("p",{className:"mb-0 text-left text-sm text-extendify-gray",children:[(0,or.__)("Have an account?","extendify"),(0,pr.jsx)(nr.Button,{onClick:function(){return t((0,pr.jsx)(Bi,{}))},className:"pl-2 text-sm text-extendify-gray underline hover:no-underline",children:(0,or.__)("Sign in","extendify")})]})]})]}),(0,pr.jsxs)("div",{className:"flex h-full flex-col justify-center space-y-2 p-10 text-black",children:[(0,pr.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,pr.jsx)(nr.Icon,{icon:Kr,size:24}),(0,pr.jsx)("span",{className:"text-sm leading-none",children:(0,or.__)("Access to 100's of Patterns","extendify")})]}),(0,pr.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,pr.jsx)(nr.Icon,{icon:$r,size:24}),(0,pr.jsx)("span",{className:"text-sm leading-none",children:(0,or.__)('Access to "Pro" catalog',"extendify")})]}),(0,pr.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,pr.jsx)(nr.Icon,{icon:Jr,size:24}),(0,pr.jsx)("span",{className:"text-sm leading-none",children:(0,or.__)("Beautiful full page layouts","extendify")})]}),(0,pr.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,pr.jsx)(nr.Icon,{icon:Zr,size:24}),(0,pr.jsx)("span",{className:"text-sm leading-none",children:(0,or.__)("Fast and friendly support","extendify")})]}),(0,pr.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,pr.jsx)(nr.Icon,{icon:Qr,size:24}),(0,pr.jsx)("span",{className:"text-sm leading-none",children:(0,or.__)("14-Day guarantee","extendify")})]})]})]})};function Wi(t){return Wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wi(t)}function Hi(){Hi=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==Wi(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function qi(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Vi(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){qi(i,n,o,a,c,"next",t)}function c(t){qi(i,n,o,a,c,"throw",t)}a(void 0)}))}}var Ji=function(){var t=(0,o.useRef)(null);return(0,pr.jsxs)(jn,{isOpen:!0,invertedButtonColor:!0,ref:t,children:[(0,pr.jsxs)("div",{children:[(0,pr.jsx)("div",{className:"mb-5 flex items-center space-x-2 text-extendify-black",children:Yr}),(0,pr.jsx)("h3",{className:"mt-0 text-xl",children:(0,or.__)("Get unlimited access to all our Pro patterns & layouts","extendify")}),(0,pr.jsx)("p",{className:"text-sm text-black",children:(0,or.__)("Upgrade to Extendify Pro and use all the patterns and layouts you'd like, including our exclusive Pro catalog.","extendify")}),(0,pr.jsx)("div",{children:(0,pr.jsxs)("a",{target:"_blank",ref:t,className:"button-extendify-main button-focus mt-2 inline-flex justify-center px-4 py-3",style:{minWidth:"225px"},href:"https://extendify.com/pricing/?utm_source=".concat(window.extendifyData.sdk_partner,"&utm_medium=library&utm_campaign=pro-modal&utm_content=upgrade-now"),onClick:Vi(Hi().mark((function t(){return Hi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Lt("pro-modal-click");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),rel:"noreferrer",children:[(0,or.__)("Upgrade Now","extendify"),(0,pr.jsx)(nr.Icon,{icon:Vr,size:24,className:"-mr-1"})]})})]}),(0,pr.jsx)("div",{className:"justify-endrounded-tr-sm flex w-full rounded-br-sm bg-black",children:(0,pr.jsx)("img",{alt:(0,or.__)("Upgrade Now","extendify"),className:"max-w-full rounded-tr-sm rounded-br-sm",src:window.extendifyData.asset_path+"/modal-extendify-black.png"})})]})};function Ki(t){return Ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ki(t)}function Xi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zi(){Zi=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==Ki(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function Qi(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function ta(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ea(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ea(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ea(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ra=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{hasRequiredPlugins:ti,hasPluginsActivated:Wo,stack:[],check:function(e){var r=this;return ai(ri().mark((function n(){var o,i,a,c;return ri().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:o=ni(t),n.prev=1,o.s();case 3:if((i=o.n()).done){n.next=11;break}return a=i.value,n.next=7,r["".concat(a)](e);case 7:c=n.sent,r.stack.push(c.pass?c.allow:c.deny);case 9:n.next=3;break;case 11:n.next=16;break;case 13:n.prev=13,n.t0=n.catch(1),o.e(n.t0);case 16:return n.prev=16,o.f(),n.finish(16);case 19:case"end":return n.stop()}}),n,null,[[1,13,16,19]])})))()},reset:function(){this.stack=[]}}}(["hasRequiredPlugins","hasPluginsActivated"]);function na(t){var e,r,i,a,c,s,u=t.template,l=t.maxHeight,f=(0,o.useRef)(null),h=q((function(t){return t.hasAvailableImports})),d=q((function(t){return t.apiKey.length})),p=_((function(t){return t.setOpen})),y=_((function(t){return t.pushModal})),v=_((function(t){return t.removeAllModals})),m=ta((0,o.useState)(0),2),g=m[0],x=m[1],w=Array.isArray(null==u||null===(e=u.fields)||void 0===e?void 0:e.type)?u.fields.type[0]:null==u||null===(r=u.fields)||void 0===r?void 0:r.type,b=(0,o.useMemo)((function(){return(0,n.rawHandler)({HTML:oa(u.fields.code)})}),[u.fields.code]),E=(0,o.useMemo)((function(){return(0,n.rawHandler)({HTML:u.fields.code})}),[u.fields.code]),j=fo(),L=function(){var t,e=(t=Zi().mark((function t(){return Zi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ra.check(u);case 2:fi(ra).then((function(){setTimeout((function(){yi(E,u).then((function(){return v()})).then((function(){return p(!1)})).then((function(){return ra.reset()}))}),100)})).catch((function(){}));case 3:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Qi(i,n,o,a,c,"next",t)}function c(t){Qi(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}(),k=function(){var t;io(u),null==u||null===(t=u.fields)||void 0===t||!t.pro||d?h()?L():y((0,pr.jsx)($i,{})):y((0,pr.jsx)(Ji,{}))};return(0,o.useEffect)((function(){if(Number.isInteger(l)&&"layout"===w){var t=f.current,e=function(){var e=t.offsetHeight;t.style.transitionDuration=1.5*e+"ms",x(-1*Math.abs(e-l))},r=function(){var e=t.offsetHeight;t.style.transitionDuration=e/1.5+"ms",x(0)};return t.addEventListener("focus",e),t.addEventListener("mouseenter",e),t.addEventListener("blur",r),t.addEventListener("mouseleave",r),function(){t.removeEventListener("focus",e),t.removeEventListener("mouseenter",e),t.removeEventListener("blur",r),t.removeEventListener("mouseleave",r)}}}),[l,w]),(0,pr.jsxs)("div",{className:"group relative",children:[(0,pr.jsx)("div",{role:"button",tabIndex:"0","aria-label":(0,or.sprintf)((0,or.__)("Press to import %s","extendify"),null==u||null===(i=u.fields)||void 0===i?void 0:i.type),style:{maxHeight:l},className:"button-focus relative m-0 cursor-pointer overflow-hidden bg-gray-100 ease-in-out",onClick:k,onKeyDown:function(t){["Enter","Space"," "].includes(t.key)&&(t.stopPropagation(),t.preventDefault(),k())},children:(0,pr.jsx)("div",{ref:f,style:{top:g,transitionProperty:"all"},className:cr()("with-light-shadow relative",(c={},Xi(c,"is-template--".concat(u.fields.status),(null==u||null===(a=u.fields)||void 0===a?void 0:a.status)&&j),Xi(c,"p-6 md:p-8",Number.isInteger(l)),c)),children:(0,pr.jsx)(so.BlockPreview,{blocks:b,live:!1,viewportWidth:1400})})}),j&&(0,pr.jsx)(xi,{template:u}),(null==u||null===(s=u.fields)||void 0===s?void 0:s.pro)&&(0,pr.jsx)("div",{className:"pointer-events-none absolute top-4 right-4 z-20 rounded-md border border-none bg-white bg-wp-theme-500 py-1 px-2.5 font-medium text-white no-underline shadow-sm",children:(0,or.__)("Pro","extendify")})]})}var oa=function(t){return t.replace(/\w+:\/\/\S*(w=(\d*))&(h=(\d*))&\w+\S*"/g,(function(t,e,r,n,o){return t.replace(e,"w="+Math.floor(Number(r)/2)).replace(n,"h="+Math.floor(Number(o)/2))}))};function ia(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return aa(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aa(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aa(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ca=(0,o.memo)((function(){var t=function(){var t=(0,o.useRef)(!1);return(0,o.useEffect)((function(){return t.current=!0,function(){return t.current=!1}})),t}(),e=jt((function(t){return t.templates})),r=ia((0,o.useState)(0),2),n=r[0],a=r[1],c=jt((function(t){return t.appendTemplates})),s=ia((0,o.useState)(""),2),u=s[0],l=s[1],f=(0,o.useRef)(!1),h=ia((0,o.useState)(!1),2),d=h[0],p=h[1],y=ia((0,o.useState)(!1),2),v=y[0],m=y[1],g=function(t){var e=void 0===t?{}:t,r=e.threshold,n=e.delay,o=e.trackVisibility,a=e.rootMargin,c=e.root,s=e.triggerOnce,u=e.skip,l=e.initialInView,f=e.fallbackInView,h=i.useRef(),d=i.useState({inView:!!l}),p=d[0],y=d[1],v=i.useCallback((function(t){void 0!==h.current&&(h.current(),h.current=void 0),u||t&&(h.current=Un(t,(function(t,e){y({inView:t,entry:e}),e.isIntersecting&&s&&h.current&&(h.current(),h.current=void 0)}),{root:c,rootMargin:a,threshold:r,trackVisibility:o,delay:n},f))}),[Array.isArray(r)?r.toString():r,c,a,s,u,o,f,n]);(0,i.useEffect)((function(){h.current||!p.entry||s||u||y({inView:!!l})}));var m=[v,p.inView,p.entry];return m.ref=m[0],m.inView=m[1],m.entry=m[2],m}(),x=ia(g,2),w=x[0],b=x[1],E=jt((function(t){return t.searchParams})),j=_((function(t){return t.currentType})),L=jt((function(t){return t.resetTemplates})),k=_((function(t){return t.open})),S=ht((function(t){return t.taxonomies})),O=jt((function(t){return t.updateType})),P=jt((function(t){return t.updateTaxonomies})),N=(0,o.useRef)(jt.getState().nextPage),C=(0,o.useRef)(jt.getState().searchParams),A="pattern"===C.current.type?"patternType":"layoutType",T=C.current.taxonomies[A];(0,o.useEffect)((function(){return jt.subscribe((function(t){return t.nextPage}),(function(t){return N.current=t}))}),[]),(0,o.useEffect)((function(){return jt.subscribe((function(t){return t.searchParams}),(function(t){return C.current=t}))}),[]);var I,R=(0,o.useCallback)((function(){var e,r,n;l(""),p(!1);var o=(0,or.__)("Unknown error occurred. Check browser console or contact support.","extendify"),i={offset:N.current},s=null!==(e=C.current.taxonomies)&&void 0!==e&&null!==(r=e.siteType)&&void 0!==r&&null!==(n=r.slug)&&void 0!==n&&n.length?C.current.taxonomies.siteType:{slug:"default"},u=(0,Tn.cloneDeep)(C.current);u.taxonomies.siteType=s,oo(u,i).then((function(e){var r,n,o,i;t.current&&(null!=e&&null!==(r=e.error)&&void 0!==r&&r.length?l(null==e?void 0:e.error):(null==e||null===(n=e.records)||void 0===n?void 0:n.length)<=0?p(!0):E===C.current&&null!=e&&null!==(o=e.records)&&void 0!==o&&o.length&&(jt.setState({nextPage:null!==(i=null==e?void 0:e.offset)&&void 0!==i?i:""}),c(e.records),a((function(t){return e.records.length+t})),m(!1)))})).catch((function(e){t.current&&(console.error(e),l(o))}))}),[c,t,E]);return(0,o.useEffect)((function(){0!==(null==e?void 0:e.length)||m(!0)}),[null==e?void 0:e.length,E]),(0,o.useEffect)((function(){!f.current&&u.length&&(f.current=!0,R())}),[u,R]),(0,o.useEffect)((function(){var t;if(k&&null!=S&&null!==(t=S.patternType)&&void 0!==t&&t.length){var e=new URLSearchParams(window.location.search);if(e.has("ext-patternType")){var r=e.get("ext-patternType");e.delete("ext-patternType"),window.history.replaceState(null,null,window.location.pathname+"?"+e.toString());var n=S.patternType.find((function(t){return t.slug===r}));n&&(P({patternType:n}),O("pattern"))}}}),[k,S,O,P]),(0,o.useEffect)((function(){var t,e;if(null!==(t=Object.keys(null===(e=C.current)||void 0===e?void 0:e.taxonomies))&&void 0!==t&&t.length){if(!jt.getState().skipNextFetch)return R(),function(){return L()};jt.setState({skipNextFetch:!1})}}),[R,C,L]),(0,o.useEffect)((function(){N.current&&b&&R()}),[b,R,n]),u.length&&f.current?(0,pr.jsxs)("div",{className:"text-left",children:[(0,pr.jsx)("h2",{className:"text-left",children:(0,or.__)("Server error","extendify")}),(0,pr.jsx)("code",{className:"mb-4 block max-w-xl p-4",style:{minHeight:"10rem"},children:u}),(0,pr.jsx)(nr.Button,{isTertiary:!0,onClick:function(){f.current=!1,R()},children:(0,or.__)("Press here to reload")})]}):d?(0,pr.jsx)("div",{className:"-mt-2 flex h-full w-full items-center justify-center sm:mt-0",children:(0,pr.jsx)("h2",{className:"text-sm font-normal text-extendify-gray",children:(0,or.sprintf)("template"===C.current.type?(0,or.__)('We couldn\'t find any layouts in the "%s" category.',"extendify"):(0,or.__)('We couldn\'t find any patterns in the "%s" category.',"extendify"),null!==(I=null==T?void 0:T.title)&&void 0!==I?I:T.slug)})}):(0,pr.jsxs)(pr.Fragment,{children:[v&&(0,pr.jsx)("div",{className:"-mt-2 flex h-full w-full items-center justify-center sm:mt-0",children:(0,pr.jsx)(nr.Spinner,{})}),(0,pr.jsx)(sa,{type:j,templates:e,children:e.map((function(t){return(0,pr.jsx)(na,{maxHeight:"template"===j?520:"none",template:t},t.id)}))}),N.current&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"mt-8",children:(0,pr.jsx)(nr.Spinner,{})}),(0,pr.jsx)("div",{className:"relative flex flex-col items-end justify-end -top-1/4 h-4",ref:w,style:{zIndex:-1}})]})]})})),sa=function(t){var e=t.type,r=t.children,n="relative min-h-screen z-10 pb-40 pt-0.5";if("template"===e)return(0,pr.jsx)("div",{className:"grid gap-6 md:gap-8 lg:grid-cols-2 ".concat(n),children:r});return(0,pr.jsx)(Zn,{breakpointCols:{default:3,1600:2,860:1,599:2,400:1},className:"-ml-6 flex w-auto px-0.5 md:-ml-8 ".concat(n),columnClassName:"pl-6 md:pl-8 bg-clip-padding space-y-6 md:space-y-8",children:r})};function ua(t){return ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ua(t)}function la(){la=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==ua(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function fa(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function ha(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){fa(i,n,o,a,c,"next",t)}function c(t){fa(i,n,o,a,c,"throw",t)}a(void 0)}))}}var da=(0,o.memo)((function(){var t=q((function(t){return t.remainingImports})),e=q((function(t){return t.allowedImports})),r=t(),n=r>0?"has-imports":"no-imports",i=(0,o.useRef)();return(0,o.useEffect)((function(){if(e<1||!e){I().then((function(t){t=/^[1-9]\d*$/.test(t)?t:5,q.setState({allowedImports:t})})).catch((function(){return q.setState({allowedImports:5})}))}}),[e]),e?(0,pr.jsxs)("div",{tabIndex:"0",className:"group relative mb-5",children:[(0,pr.jsxs)("a",{target:"_blank",ref:i,rel:"noreferrer",className:cr()("button-focus hidden w-full justify-between rounded py-3 px-4 text-sm text-white no-underline sm:flex",{"bg-wp-theme-500 hover:bg-wp-theme-600":r>0,"bg-extendify-alert":!r}),onClick:ha(la().mark((function t(){return la().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Lt("import-counter-click");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),href:"https://www.extendify.com/pricing/?utm_source=".concat(encodeURIComponent(window.extendifyData.sdk_partner),"&utm_medium=library&utm_campaign=import-counter&utm_content=get-more&utm_term=").concat(n),children:[(0,pr.jsxs)("span",{className:"flex items-center space-x-2 text-xs no-underline",children:[(0,pr.jsx)(ir,{icon:r>0?Wr:Gr,size:14}),(0,pr.jsx)("span",{children:(0,or.sprintf)((0,or._n)("%s Import","%s Imports",r,"extendify"),r)})]}),(0,pr.jsxs)("span",{className:"outline-none flex items-center text-sm font-medium text-white no-underline",children:[(0,or.__)("Get more","extendify"),(0,pr.jsx)(ir,{icon:Vr,size:24,className:"-mr-1.5"})]})]}),(0,pr.jsx)("div",{className:"extendify-bottom-arrow invisible absolute top-0 w-full -translate-y-full transform opacity-0 shadow-md transition-all delay-200 duration-300 ease-in-out group-hover:visible group-hover:-top-2.5 group-hover:opacity-100 group-focus:visible group-focus:-top-2.5 group-focus:opacity-100",tabIndex:"-1",children:(0,pr.jsx)("a",{href:"https://www.extendify.com/pricing/?utm_source=".concat(encodeURIComponent(window.extendifyData.sdk_partner),"&utm_medium=library&utm_campaign=import-counter-tooltip&utm_content=get-50-off&utm_term=").concat(n),className:"block bg-gray-900 text-white p-4 no-underline rounded bg-cover",onClick:ha(la().mark((function t(){return la().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Lt("import-counter-tooltip-click");case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),style:{backgroundImage:"url(".concat(window.extendifyData.asset_path,"/logo-tips.png)"),backgroundSize:"100% 100%"},children:(0,pr.jsx)("span",{dangerouslySetInnerHTML:{__html:Br((0,or.sprintf)((0,or.__)("%1$sGet %2$s off%3$s Extendify Pro when you upgrade today!","extendify"),"<strong>","50%","</strong>"))}})})})]}):null}));function pa(t){return Array.isArray?Array.isArray(t):"[object Array]"===ba(t)}function ya(t){return"string"==typeof t}function va(t){return"number"==typeof t}function ma(t){return!0===t||!1===t||function(t){return ga(t)&&null!==t}(t)&&"[object Boolean]"==ba(t)}function ga(t){return"object"==typeof t}function xa(t){return null!=t}function wa(t){return!t.trim().length}function ba(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Ea=Object.prototype.hasOwnProperty;class ja{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach((t=>{let r=_a(t);e+=r.weight,this._keys.push(r),this._keyMap[r.id]=r,e+=r.weight})),this._keys.forEach((t=>{t.weight/=e}))}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function _a(t){let e=null,r=null,n=null,o=1,i=null;if(ya(t)||pa(t))n=t,e=La(t),r=ka(t);else{if(!Ea.call(t,"name"))throw new Error((t=>`Missing ${t} property in key`)("name"));const a=t.name;if(n=a,Ea.call(t,"weight")&&(o=t.weight,o<=0))throw new Error((t=>`Property 'weight' in key '${t}' must be a positive integer`)(a));e=La(a),r=ka(a),i=t.getFn}return{path:e,id:r,weight:o,src:n,getFn:i}}function La(t){return pa(t)?t:t.split(".")}function ka(t){return pa(t)?t.join("."):t}const Sa={useExtendedSearch:!1,getFn:function(t,e){let r=[],n=!1;const o=(t,e,i)=>{if(xa(t))if(e[i]){const a=t[e[i]];if(!xa(a))return;if(i===e.length-1&&(ya(a)||va(a)||ma(a)))r.push(function(t){return null==t?"":function(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}(a));else if(pa(a)){n=!0;for(let t=0,r=a.length;t<r;t+=1)o(a[t],e,i+1)}else e.length&&o(a,e,i+1)}else r.push(t)};return o(t,ya(e)?e.split("."):e,0),n?r:r[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Oa={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,...Sa};const Pa=/[^ ]+/g;class Na{constructor({getFn:t=Oa.getFn,fieldNormWeight:e=Oa.fieldNormWeight}={}){this.norm=function(t=1,e=3){const r=new Map,n=Math.pow(10,e);return{get(e){const o=e.match(Pa).length;if(r.has(o))return r.get(o);const i=1/Math.pow(o,.5*t),a=parseFloat(Math.round(i*n)/n);return r.set(o,a),a},clear(){r.clear()}}}(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach(((t,e)=>{this._keysMap[t.id]=e}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,ya(this.docs[0])?this.docs.forEach(((t,e)=>{this._addString(t,e)})):this.docs.forEach(((t,e)=>{this._addObject(t,e)})),this.norm.clear())}add(t){const e=this.size();ya(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,r=this.size();e<r;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!xa(t)||wa(t))return;let r={v:t,i:e,n:this.norm.get(t)};this.records.push(r)}_addObject(t,e){let r={i:e,$:{}};this.keys.forEach(((e,n)=>{let o=e.getFn?e.getFn(t):this.getFn(t,e.path);if(xa(o))if(pa(o)){let t=[];const e=[{nestedArrIndex:-1,value:o}];for(;e.length;){const{nestedArrIndex:r,value:n}=e.pop();if(xa(n))if(ya(n)&&!wa(n)){let e={v:n,i:r,n:this.norm.get(n)};t.push(e)}else pa(n)&&n.forEach(((t,r)=>{e.push({nestedArrIndex:r,value:t})}))}r.$[n]=t}else if(ya(o)&&!wa(o)){let t={v:o,n:this.norm.get(o)};r.$[n]=t}})),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function Ca(t,e,{getFn:r=Oa.getFn,fieldNormWeight:n=Oa.fieldNormWeight}={}){const o=new Na({getFn:r,fieldNormWeight:n});return o.setKeys(t.map(_a)),o.setSources(e),o.create(),o}function Aa(t,{errors:e=0,currentLocation:r=0,expectedLocation:n=0,distance:o=Oa.distance,ignoreLocation:i=Oa.ignoreLocation}={}){const a=e/t.length;if(i)return a;const c=Math.abs(n-r);return o?a+c/o:c?1:a}const Ta=32;function Ia(t,e,r,{location:n=Oa.location,distance:o=Oa.distance,threshold:i=Oa.threshold,findAllMatches:a=Oa.findAllMatches,minMatchCharLength:c=Oa.minMatchCharLength,includeMatches:s=Oa.includeMatches,ignoreLocation:u=Oa.ignoreLocation}={}){if(e.length>Ta)throw new Error(`Pattern length exceeds max of ${Ta}.`);const l=e.length,f=t.length,h=Math.max(0,Math.min(n,f));let d=i,p=h;const y=c>1||s,v=y?Array(f):[];let m;for(;(m=t.indexOf(e,p))>-1;){let t=Aa(e,{currentLocation:m,expectedLocation:h,distance:o,ignoreLocation:u});if(d=Math.min(t,d),p=m+l,y){let t=0;for(;t<l;)v[m+t]=1,t+=1}}p=-1;let g=[],x=1,w=l+f;const b=1<<l-1;for(let n=0;n<l;n+=1){let i=0,c=w;for(;i<c;){Aa(e,{errors:n,currentLocation:h+c,expectedLocation:h,distance:o,ignoreLocation:u})<=d?i=c:w=c,c=Math.floor((w-i)/2+i)}w=c;let s=Math.max(1,h-c+1),m=a?f:Math.min(h+c,f)+l,E=Array(m+2);E[m+1]=(1<<n)-1;for(let i=m;i>=s;i-=1){let a=i-1,c=r[t.charAt(a)];if(y&&(v[a]=+!!c),E[i]=(E[i+1]<<1|1)&c,n&&(E[i]|=(g[i+1]|g[i])<<1|1|g[i+1]),E[i]&b&&(x=Aa(e,{errors:n,currentLocation:a,expectedLocation:h,distance:o,ignoreLocation:u}),x<=d)){if(d=x,p=a,p<=h)break;s=Math.max(1,2*h-p)}}if(Aa(e,{errors:n+1,currentLocation:h,expectedLocation:h,distance:o,ignoreLocation:u})>d)break;g=E}const E={isMatch:p>=0,score:Math.max(.001,x)};if(y){const t=function(t=[],e=Oa.minMatchCharLength){let r=[],n=-1,o=-1,i=0;for(let a=t.length;i<a;i+=1){let a=t[i];a&&-1===n?n=i:a||-1===n||(o=i-1,o-n+1>=e&&r.push([n,o]),n=-1)}return t[i-1]&&i-n>=e&&r.push([n,i-1]),r}(v,c);t.length?s&&(E.indices=t):E.isMatch=!1}return E}function Ra(t){let e={};for(let r=0,n=t.length;r<n;r+=1){const o=t.charAt(r);e[o]=(e[o]||0)|1<<n-r-1}return e}class Fa{constructor(t,{location:e=Oa.location,threshold:r=Oa.threshold,distance:n=Oa.distance,includeMatches:o=Oa.includeMatches,findAllMatches:i=Oa.findAllMatches,minMatchCharLength:a=Oa.minMatchCharLength,isCaseSensitive:c=Oa.isCaseSensitive,ignoreLocation:s=Oa.ignoreLocation}={}){if(this.options={location:e,threshold:r,distance:n,includeMatches:o,findAllMatches:i,minMatchCharLength:a,isCaseSensitive:c,ignoreLocation:s},this.pattern=c?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const u=(t,e)=>{this.chunks.push({pattern:t,alphabet:Ra(t),startIndex:e})},l=this.pattern.length;if(l>Ta){let t=0;const e=l%Ta,r=l-e;for(;t<r;)u(this.pattern.substr(t,Ta),t),t+=Ta;if(e){const t=l-Ta;u(this.pattern.substr(t),t)}}else u(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,includeMatches:r}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let e={isMatch:!0,score:0};return r&&(e.indices=[[0,t.length-1]]),e}const{location:n,distance:o,threshold:i,findAllMatches:a,minMatchCharLength:c,ignoreLocation:s}=this.options;let u=[],l=0,f=!1;this.chunks.forEach((({pattern:e,alphabet:h,startIndex:d})=>{const{isMatch:p,score:y,indices:v}=Ia(t,e,h,{location:n+d,distance:o,threshold:i,findAllMatches:a,minMatchCharLength:c,includeMatches:r,ignoreLocation:s});p&&(f=!0),l+=y,p&&v&&(u=[...u,...v])}));let h={isMatch:f,score:f?l/this.chunks.length:1};return f&&r&&(h.indices=u),h}}class Ma{constructor(t){this.pattern=t}static isMultiMatch(t){return Da(t,this.multiRegex)}static isSingleMatch(t){return Da(t,this.singleRegex)}search(){}}function Da(t,e){const r=t.match(e);return r?r[1]:null}class Ba extends Ma{constructor(t,{location:e=Oa.location,threshold:r=Oa.threshold,distance:n=Oa.distance,includeMatches:o=Oa.includeMatches,findAllMatches:i=Oa.findAllMatches,minMatchCharLength:a=Oa.minMatchCharLength,isCaseSensitive:c=Oa.isCaseSensitive,ignoreLocation:s=Oa.ignoreLocation}={}){super(t),this._bitapSearch=new Fa(t,{location:e,threshold:r,distance:n,includeMatches:o,findAllMatches:i,minMatchCharLength:a,isCaseSensitive:c,ignoreLocation:s})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class Ga extends Ma{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,r=0;const n=[],o=this.pattern.length;for(;(e=t.indexOf(this.pattern,r))>-1;)r=e+o,n.push([e,r-1]);const i=!!n.length;return{isMatch:i,score:i?0:1,indices:n}}}const Ua=[class extends Ma{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},Ga,class extends Ma{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},class extends Ma{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends Ma{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends Ma{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},class extends Ma{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},Ba],za=Ua.length,Ya=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;const $a=new Set([Ba.type,Ga.type]);class Wa{constructor(t,{isCaseSensitive:e=Oa.isCaseSensitive,includeMatches:r=Oa.includeMatches,minMatchCharLength:n=Oa.minMatchCharLength,ignoreLocation:o=Oa.ignoreLocation,findAllMatches:i=Oa.findAllMatches,location:a=Oa.location,threshold:c=Oa.threshold,distance:s=Oa.distance}={}){this.query=null,this.options={isCaseSensitive:e,includeMatches:r,minMatchCharLength:n,findAllMatches:i,ignoreLocation:o,location:a,threshold:c,distance:s},this.pattern=e?t:t.toLowerCase(),this.query=function(t,e={}){return t.split("|").map((t=>{let r=t.trim().split(Ya).filter((t=>t&&!!t.trim())),n=[];for(let t=0,o=r.length;t<o;t+=1){const o=r[t];let i=!1,a=-1;for(;!i&&++a<za;){const t=Ua[a];let r=t.isMultiMatch(o);r&&(n.push(new t(r,e)),i=!0)}if(!i)for(a=-1;++a<za;){const t=Ua[a];let r=t.isSingleMatch(o);if(r){n.push(new t(r,e));break}}}return n}))}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:n}=this.options;t=n?t:t.toLowerCase();let o=0,i=[],a=0;for(let n=0,c=e.length;n<c;n+=1){const c=e[n];i.length=0,o=0;for(let e=0,n=c.length;e<n;e+=1){const n=c[e],{isMatch:s,indices:u,score:l}=n.search(t);if(!s){a=0,o=0,i.length=0;break}if(o+=1,a+=l,r){const t=n.constructor.type;$a.has(t)?i=[...i,...u]:i.push(u)}}if(o){let t={isMatch:!0,score:a/o};return r&&(t.indices=i),t}}return{isMatch:!1,score:1}}}const Ha=[];function qa(t,e){for(let r=0,n=Ha.length;r<n;r+=1){let n=Ha[r];if(n.condition(t,e))return new n(t,e)}return new Fa(t,e)}const Va="$and",Ja="$or",Ka="$path",Xa="$val",Za=t=>!(!t[Va]&&!t[Ja]),Qa=t=>({[Va]:Object.keys(t).map((e=>({[e]:t[e]})))});function tc(t,e,{auto:r=!0}={}){const n=t=>{let o=Object.keys(t);const i=(t=>!!t[Ka])(t);if(!i&&o.length>1&&!Za(t))return n(Qa(t));if((t=>!pa(t)&&ga(t)&&!Za(t))(t)){const n=i?t[Ka]:o[0],a=i?t[Xa]:t[n];if(!ya(a))throw new Error((t=>`Invalid value for key ${t}`)(n));const c={keyId:ka(n),pattern:a};return r&&(c.searcher=qa(a,e)),c}let a={children:[],operator:o[0]};return o.forEach((e=>{const r=t[e];pa(r)&&r.forEach((t=>{a.children.push(n(t))}))})),a};return Za(t)||(t=Qa(t)),n(t)}function ec(t,e){const r=t.matches;e.matches=[],xa(r)&&r.forEach((t=>{if(!xa(t.indices)||!t.indices.length)return;const{indices:r,value:n}=t;let o={indices:r,value:n};t.key&&(o.key=t.key.src),t.idx>-1&&(o.refIndex=t.idx),e.matches.push(o)}))}function rc(t,e){e.score=t.score}class nc{constructor(t,e={},r){this.options={...Oa,...e},this.options.useExtendedSearch,this._keyStore=new ja(this.options.keys),this.setCollection(t,r)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof Na))throw new Error("Incorrect 'index' type");this._myIndex=e||Ca(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){xa(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=(()=>!1)){const e=[];for(let r=0,n=this._docs.length;r<n;r+=1){const o=this._docs[r];t(o,r)&&(this.removeAt(r),r-=1,n-=1,e.push(o))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){const{includeMatches:r,includeScore:n,shouldSort:o,sortFn:i,ignoreFieldNorm:a}=this.options;let c=ya(t)?ya(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return function(t,{ignoreFieldNorm:e=Oa.ignoreFieldNorm}){t.forEach((t=>{let r=1;t.matches.forEach((({key:t,norm:n,score:o})=>{const i=t?t.weight:null;r*=Math.pow(0===o&&i?Number.EPSILON:o,(i||1)*(e?1:n))})),t.score=r}))}(c,{ignoreFieldNorm:a}),o&&c.sort(i),va(e)&&e>-1&&(c=c.slice(0,e)),function(t,e,{includeMatches:r=Oa.includeMatches,includeScore:n=Oa.includeScore}={}){const o=[];return r&&o.push(ec),n&&o.push(rc),t.map((t=>{const{idx:r}=t,n={item:e[r],refIndex:r};return o.length&&o.forEach((e=>{e(t,n)})),n}))}(c,this._docs,{includeMatches:r,includeScore:n})}_searchStringList(t){const e=qa(t,this.options),{records:r}=this._myIndex,n=[];return r.forEach((({v:t,i:r,n:o})=>{if(!xa(t))return;const{isMatch:i,score:a,indices:c}=e.searchIn(t);i&&n.push({item:t,idx:r,matches:[{score:a,value:t,norm:o,indices:c}]})})),n}_searchLogical(t){const e=tc(t,this.options),r=(t,e,n)=>{if(!t.children){const{keyId:r,searcher:o}=t,i=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(e,r),searcher:o});return i&&i.length?[{idx:n,item:e,matches:i}]:[]}const o=[];for(let i=0,a=t.children.length;i<a;i+=1){const a=t.children[i],c=r(a,e,n);if(c.length)o.push(...c);else if(t.operator===Va)return[]}return o},n=this._myIndex.records,o={},i=[];return n.forEach((({$:t,i:n})=>{if(xa(t)){let a=r(e,t,n);a.length&&(o[n]||(o[n]={idx:n,item:t,matches:[]},i.push(o[n])),a.forEach((({matches:t})=>{o[n].matches.push(...t)})))}})),i}_searchObjectList(t){const e=qa(t,this.options),{keys:r,records:n}=this._myIndex,o=[];return n.forEach((({$:t,i:n})=>{if(!xa(t))return;let i=[];r.forEach(((r,n)=>{i.push(...this._findMatches({key:r,value:t[n],searcher:e}))})),i.length&&o.push({idx:n,item:t,matches:i})})),o}_findMatches({key:t,value:e,searcher:r}){if(!xa(e))return[];let n=[];if(pa(e))e.forEach((({v:e,i:o,n:i})=>{if(!xa(e))return;const{isMatch:a,score:c,indices:s}=r.searchIn(e);a&&n.push({score:c,key:t,value:e,idx:o,norm:i,indices:s})}));else{const{v:o,n:i}=e,{isMatch:a,score:c,indices:s}=r.searchIn(o);a&&n.push({score:c,key:t,value:o,norm:i,indices:s})}return n}}function oc(t){return function(t){if(Array.isArray(t))return cc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ac(t)||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 ic(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||ac(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ac(t,e){if(t){if("string"==typeof t)return cc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cc(t,e):void 0}}function cc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}nc.version="6.6.2",nc.createIndex=Ca,nc.parseIndex=function(t,{getFn:e=Oa.getFn,fieldNormWeight:r=Oa.fieldNormWeight}={}){const{keys:n,records:o}=t,i=new Na({getFn:e,fieldNormWeight:r});return i.setKeys(n),i.setIndexRecords(o),i},nc.config=Oa,nc.parseQuery=tc,function(...t){Ha.push(...t)}(Wa);var sc=new Map,uc=function(t){var e,r,n=t.value,i=t.setValue,a=t.terms,c=jt((function(t){return t.searchParams})),s=ic((0,o.useState)(!1),2),u=s[0],l=s[1],f=(0,o.useRef)(),h=ic((0,o.useState)({}),2),d=h[0],p=h[1],y=ic((0,o.useState)(""),2),v=y[0],m=y[1],g=ic((0,o.useState)([]),2),x=g[0],w=g[1],b=ic((0,o.useState)(!0),2),E=b[0],j=b[1],_=(0,o.useMemo)((function(){return oc(a).sort((function(t,e){return t.slug<e.slug?-1:t.slug>e.slug?1:0}))}),[a]),L=(0,o.useMemo)((function(){return _.filter((function(t){return null==t?void 0:t.featured}))}),[_]),k=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(sc.has(t))w(sc.get(t));else{var e=d.search(t);sc.set(t,null!=e&&e.length?e.map((function(t){return t.item})):L),w(sc.get(t))}};(0,o.useEffect)((function(){p(new nc(a,{keys:["slug","title","keywords"],minMatchCharLength:1,threshold:.3}))}),[a]),(0,o.useEffect)((function(){null!=v&&v.length||w(E?L:_)}),[L,v,_,E]),(0,o.useEffect)((function(){var t;u&&(null===(t=f.current)||void 0===t||t.focus())}),[u]),(0,o.useEffect)((function(){n.slug||l(!0)}),[n.slug]);var S,O,P;return(0,pr.jsxs)("div",{className:"w-full rounded bg-gray-50 border border-gray-900",children:[(0,pr.jsx)("button",{type:"button",onClick:function(){return l((function(t){return!t}))},className:"button-focus m-0 flex w-full cursor-pointer items-center justify-between rounded bg-transparent p-4 text-gray-800",children:(O=u?(0,or.__)("Choose a site industry","extendify"):null!==(e=null!==(r=null==n?void 0:n.title)&&void 0!==r?r:n.slug)&&void 0!==e?e:"Not set",(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("span",{className:"flex flex-col text-left",children:[(0,pr.jsx)("span",{className:cr()("mb-1",{"text-base font-normal":!n.slug,"text-sm font-normal":null===(P=n.slug)||void 0===P?void 0:P.length}),children:(0,or.__)("Site Type","extendify")}),(0,pr.jsx)("span",{className:"text-xs font-light",children:O})]}),(0,pr.jsxs)("span",{className:"flex items-center space-x-4",children:[!u&&!n.slug&&(0,pr.jsxs)("svg",{className:"text-wp-alert-red","aria-hidden":"true",focusable:"false",width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,pr.jsx)("title",{children:(0,or.__)("Click to select a preferred site industry","extendify")}),(0,pr.jsx)("path",{className:"stroke-current",d:"M10.9982 4.05371C7.66149 4.05371 4.95654 6.75866 4.95654 10.0954C4.95654 13.4321 7.66149 16.137 10.9982 16.137C14.3349 16.137 17.0399 13.4321 17.0399 10.0954C17.0399 6.75866 14.3349 4.05371 10.9982 4.05371V4.05371Z",strokeWidth:"1.25"}),(0,pr.jsx)("path",{className:"fill-current",d:"M10.0205 12.8717C10.0205 12.3287 10.4508 11.8881 10.9938 11.8881C11.5368 11.8881 11.9774 12.3287 11.9774 12.8717C11.9774 13.4147 11.5368 13.8451 10.9938 13.8451C10.4508 13.8451 10.0205 13.4147 10.0205 12.8717Z"}),(0,pr.jsx)("path",{className:"fill-current",d:"M11.6495 10.2591C11.6086 10.6177 11.3524 10.9148 10.9938 10.9148C10.625 10.9148 10.3791 10.6074 10.3483 10.2591L10.0205 7.31855C9.95901 6.81652 10.4918 6.34521 10.9938 6.34521C11.4959 6.34521 12.0286 6.81652 11.9774 7.31855L11.6495 10.2591Z"})]}),(0,pr.jsx)("svg",{className:cr()("stroke-current text-gray-900",{"-translate-x-1 rotate-90 transform":u}),"aria-hidden":"true",focusable:"false",width:"8",height:"13",viewBox:"0 0 8 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,pr.jsx)("path",{d:"M1.24194 11.5952L6.24194 6.09519L1.24194 0.595215",strokeWidth:"1.5"})})]})]}))}),u&&(0,pr.jsxs)("div",{className:"max-h-96 overflow-y-auto px-4 py-0",children:[(0,pr.jsx)("div",{className:"sticky top-0 pt-0.5 pb-2 bg-gray-50",children:(0,pr.jsxs)("div",{className:"relative",children:[(0,pr.jsx)("label",{htmlFor:"site-type-search",className:"sr-only",children:(0,or.__)("Search","extendify")}),(0,pr.jsx)("input",{ref:f,id:"site-type-search",value:null!=v?v:"",onChange:function(t){return e=t.target.value,m(e),void k(e);var e},type:"text",className:"button-focus m-0 w-full bg-white p-3.5 py-2.5 text-sm border border-gray-900",placeholder:(0,or.__)("Search","extendify")}),(0,pr.jsx)("svg",{className:"pointer-events-none absolute top-2 right-2 hidden lg:block",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",role:"img","aria-hidden":"true",focusable:"false",children:(0,pr.jsx)("path",{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})})]})}),(null==v?void 0:v.length)>1&&x===L&&(0,pr.jsx)("p",{className:"text-left",children:(0,or.__)("Nothing found...","extendify")}),(null==x?void 0:x.length)>0&&(0,pr.jsx)("div",{children:(S=x,(0,pr.jsx)(pr.Fragment,{children:(0,pr.jsx)("ul",{className:"mt-4 mb-0",children:S.map((function(t){var e,r,n,o=null!==(e=null==t?void 0:t.title)&&void 0!==e?e:t.slug,a=(null==c||null===(r=c.taxonomies)||void 0===r||null===(n=r.siteType)||void 0===n?void 0:n.slug)===t.slug;return(0,pr.jsx)("li",{className:"m-0 mb-1",children:(0,pr.jsx)("button",{type:"button",className:cr()("m-0 w-full cursor-pointer bg-transparent pl-0 text-left text-sm font-normal hover:text-wp-theme-500",{"text-gray-800":!a}),onClick:function(){l(!1),i(t)},children:o})},t.slug+(null==t?void 0:t.title))}))})}))})]}),v||!u?null:(0,pr.jsx)("button",{type:"button",className:"w-full cursor-pointer bg-transparent p-4 py-2 text-left text-sm text-wp-theme-500 hover:text-wp-theme-500",onClick:function(){return j((function(t){return!t}))},children:E?(0,or.__)("Show all","extendify"):(0,or.__)("Close","extendify")})]})};var lc=function(t){var e,r=t.active,n=t.tax,o=t.update;return(0,pr.jsx)("li",{className:"m-0 w-full",children:(0,pr.jsx)("button",{type:"button",className:"group m-0 p-0 flex w-full cursor-pointer text-left text-sm leading-none my-px bg-transparent",onClick:o,children:(0,pr.jsx)("span",{className:cr()("w-full group-hover:bg-gray-900 p-2 group-hover:text-gray-50 rounded",{"bg-transparent text-gray-900":!r,"bg-gray-900 text-gray-50":r}),children:null!==(e=null==n?void 0:n.title)&&void 0!==e?e:n.slug})})},n.slug)},fc=function(t){var e=t.taxType,r=t.taxonomies,n=t.taxLabel,o=jt((function(t){return t.searchParams})),i=jt((function(t){return t.updateTaxonomies}));return!(null!=r&&r.length)>0?null:(0,pr.jsx)(nr.PanelBody,{title:So(null!=n?n:e),className:"ext-type-control p-0",initialOpen:!0,children:(0,pr.jsx)(nr.PanelRow,{children:(0,pr.jsx)("div",{className:"relative w-full overflow-hidden",children:(0,pr.jsx)("ul",{className:"m-0 w-full px-5 py-1",children:r.map((function(t){var r,n=(null==o||null===(r=o.taxonomies[e])||void 0===r?void 0:r.slug)===(null==t?void 0:t.slug);return(0,pr.jsx)(lc,{active:n,tax:t,update:function(){return i((o=t,(n=e)in(r={})?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,r));var r,n,o}},null==t?void 0:t.slug)}))})})})})},hc=function(t){var e=t.className,r=jt((function(t){return t.updateType})),n=_((function(t){var e;return null!==(e=null==t?void 0:t.currentType)&&void 0!==e?e:"pattern"}));return(0,pr.jsxs)("div",{className:e,children:[(0,pr.jsx)("h4",{className:"sr-only",children:(0,or.__)("Type select","extendify")}),(0,pr.jsxs)("div",{className:"flex justify-evenly border border-gray-900 p-0.5 rounded",children:[(0,pr.jsx)("button",{type:"button",className:cr()({"w-full m-0 min-w-sm cursor-pointer rounded py-2.5 px-4 text-xs leading-none":!0,"bg-gray-900 text-white":"pattern"===n,"bg-transparent text-black":"pattern"!==n}),onClick:function(){return r("pattern")},children:(0,pr.jsx)("span",{className:"",children:(0,or.__)("Patterns","extendify")})}),(0,pr.jsx)("button",{type:"button",className:cr()({"outline-none w-full m-0 -ml-px min-w-sm cursor-pointer items-center rounded py-2.5 px-4 text-xs leading-none":!0,"bg-gray-900 text-white":"template"===n,"bg-transparent text-black":"template"!==n}),onClick:function(){return r("template")},children:(0,pr.jsx)("span",{className:"",children:(0,or.__)("Templates","extendify")})})]})]})};function dc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return pc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pc(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var yc=(0,o.memo)((function(){var t,e,r,n,o=ht((function(t){return t.taxonomies})),i=jt((function(t){return t.searchParams})),a=jt((function(t){return t.updateTaxonomies})),c=q((function(t){return t.apiKey})),s="pattern"===i.type?"patternType":"layoutType",u=!(null!=i&&null!==(t=i.taxonomies[s])&&void 0!==t&&null!==(e=t.slug)&&void 0!==e&&e.length),l=_((function(t){return t.setOpen})),f=dc(ot((function(t){var e;return[(null===(e=Object.keys(null==t?void 0:t.siteType))||void 0===e?void 0:e.length)>0?null==t?void 0:t.siteType:{slug:"",title:"Not set"},t.setSiteType]})),2),h=f[0],d=f[1];return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("div",{className:"-ml-1.5 hidden px-5 text-extendify-black sm:flex",children:(0,pr.jsx)(ir,{icon:zr,size:40})}),(0,pr.jsx)("div",{className:"flex md:hidden items-center justify-end -mt-5 mx-1",children:(0,pr.jsx)(nr.Button,{onClick:function(){return l(!1)},icon:(0,pr.jsx)(ir,{icon:en,size:24}),label:(0,or.__)("Close library","extendify")})}),(0,pr.jsx)("div",{className:"px-5 hidden md:block",children:(0,pr.jsxs)("button",{onClick:function(){return a((r={slug:"",title:"Featured"},(e=s)in(t={})?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t));var t,e,r},className:cr()("m-0 flex w-full cursor-pointer items-center space-x-1 bg-transparent px-0 py-2 text-left text-sm leading-none transition duration-200 hover:text-wp-theme-500",{"text-wp-theme-500":u}),children:[(0,pr.jsx)(ir,{icon:qr,size:24}),(0,pr.jsx)("span",{className:"text-sm",children:(0,or.__)("Featured","extendify")})]})}),(0,pr.jsx)("div",{className:"mx-6 px-5 pt-0.5 sm:mx-0 sm:mb-8 sm:mt-0",children:Object.keys(h).length>0&&(0,pr.jsx)(uc,{value:h,setValue:function(t){d(t),a({siteType:t})},terms:o.siteType})}),(0,pr.jsx)(hc,{className:"mx-6 px-5 pt-0.5 sm:mx-0 sm:mb-8 sm:mt-0"}),(0,pr.jsxs)("div",{className:"mt-px hidden flex-grow overflow-y-auto overflow-x-hidden pb-36 pt-px sm:block space-y-6",children:[(0,pr.jsx)(nr.Panel,{className:"bg-transparent",children:(0,pr.jsx)(fc,{taxType:s,taxonomies:null===(r=o[s])||void 0===r?void 0:r.filter((function(t){return!(null!=t&&t.designType)}))})}),(0,pr.jsx)(nr.Panel,{className:"bg-transparent",children:(0,pr.jsx)(fc,{taxLabel:(0,or.__)("Design","extendify"),taxType:s,taxonomies:null===(n=o[s])||void 0===n?void 0:n.filter((function(t){return Boolean(null==t?void 0:t.designType)}))})})]}),!c.length&&(0,pr.jsx)("div",{className:"px-5",children:(0,pr.jsx)(da,{})})]})}));function vc(t){var e=t.children,r=_((function(t){return t.ready}));return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("aside",{className:"relative flex-shrink-0 border-r border-extendify-transparent-black-100 bg-extendify-transparent-white py-0 backdrop-blur-xl backdrop-saturate-200 backdrop-filter sm:pt-5",children:(0,pr.jsx)("div",{className:"flex h-full flex-col py-6 sm:w-72 sm:space-y-6 sm:py-0",children:r?e[0]:null})}),(0,pr.jsx)("main",{id:"extendify-templates",className:"h-full w-full overflow-hidden bg-gray-50 pt-6 sm:pt-0",children:r?e[1]:null})]})}var mc=(0,o.memo)((function(t){var e=t.className,r=_((function(t){return t.setOpen})),n=_((function(t){return t.pushModal})),o=q((function(t){return t.apiKey.length}));return(0,pr.jsx)("div",{className:e,children:(0,pr.jsx)("div",{className:"flex h-full items-center justify-between",children:(0,pr.jsxs)("div",{className:"flex flex-1 items-center justify-end lg:-mr-1",children:[(0,pr.jsx)(nr.Button,{onClick:function(){return n((0,pr.jsx)(Bi,{}))},icon:(0,pr.jsx)(ir,{icon:tn,size:24}),label:(0,or.__)("Login and settings area","extendify"),children:o?"":(0,or.__)("Sign in","extendify")}),(0,pr.jsx)(nr.Button,{onClick:function(){return r(!1)},icon:(0,pr.jsx)(ir,{icon:en,size:24}),label:(0,or.__)("Close library","extendify")})]})})})})),gc=function(t){var e=t.setOpen,r=(0,o.useRef)(),n=jt((function(t){return t.searchParams}));return(0,o.useEffect)((function(){r.current&&(r.current.scrollTop=0)}),[n]),(0,pr.jsx)("div",{className:"relative mx-auto flex h-full max-w-screen-4xl flex-col items-center",children:(0,pr.jsxs)("div",{className:"w-full flex-grow overflow-hidden",children:[(0,pr.jsx)("button",{onClick:function(){return document.getElementById("extendify-templates").querySelector("button").focus()},className:"extendify-skip-to-sr-link sr-only focus:not-sr-only focus:text-blue-500",children:(0,or.__)("Skip to templates","extendify")}),(0,pr.jsx)("div",{className:"relative mx-auto h-full sm:flex",children:(0,pr.jsxs)(vc,{children:[(0,pr.jsx)(yc,{}),(0,pr.jsxs)("div",{className:"relative z-30 flex h-full flex-col",children:[(0,pr.jsx)(mc,{className:"hidden h-12 w-full flex-shrink-0 px-6 sm:block md:px-8",hideLibrary:function(){return e(!1)}}),(0,pr.jsx)("div",{ref:r,className:"z-20 flex-grow overflow-y-auto px-6 md:px-8",children:(0,pr.jsx)(ca,{})})]})]})})]})})};function xc(){var t=(0,o.useRef)(null),e=_((function(t){return t.open})),r=_((function(t){return t.setOpen})),n=function(){var t=Cn((0,o.useState)(null),2),e=t[0],r=t[1],n=_((function(t){return t.open})),i=_((function(t){return t.pushModal})),a=_((function(t){return t.removeAllModals}));return(0,o.useEffect)((function(){return _.subscribe((function(t){return t.modals}),(function(t){return r((null==t?void 0:t.length)>0?t[0]:null)}))}),[]),(0,o.useEffect)((function(){var t;if(n){var e={standalone:Nn},r=e[null!==(t=Object.keys(e).find((function(t){return"standalone"===t?!window.extendifyData.standalone&&!q.getState().modalNoticesDismissedAt[t]:!q.getState().modalNoticesDismissedAt[t]})))&&void 0!==t?t:null];r&&i((0,pr.jsx)(r,{}))}else a()}),[n,i,a]),e}(),i=_((function(t){return t.ready}));return(0,pr.jsxs)(rr,{as:"div",className:"extendify",initialFocus:t,open:e,onClose:function(){return r(!1)},children:[(0,pr.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-40 transition-opacity"}),(0,pr.jsx)("div",{className:"fixed inset-0 z-high m-auto h-screen w-screen overflow-y-auto sm:h-auto sm:w-auto",children:(0,pr.jsx)("div",{className:"flex min-h-screen items-end justify-center px-4 pt-4 pb-20 text-center sm:block sm:p-0",children:(0,pr.jsxs)("div",{ref:t,tabIndex:"0",onClick:function(t){return t.target===t.currentTarget&&r(!1)},className:"fixed inset-0 transform p-2 transition-all lg:absolute lg:overflow-hidden lg:p-16",children:[(0,pr.jsx)(gc,{}),i?(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(Dr,{}),n]}):null]})})})]})}const wc=wp.compose,bc=wp.hooks,Ec=JSON.parse('{"t":["ext-absolute","ext-relative","ext-top-base","ext-top-lg","ext--top-base","ext--top-lg","ext-right-base","ext-right-lg","ext--right-base","ext--right-lg","ext-bottom-base","ext-bottom-lg","ext--bottom-base","ext--bottom-lg","ext-left-base","ext-left-lg","ext--left-base","ext--left-lg","ext-order-1","ext-order-2","ext-col-auto","ext-col-span-1","ext-col-span-2","ext-col-span-3","ext-col-span-4","ext-col-span-5","ext-col-span-6","ext-col-span-7","ext-col-span-8","ext-col-span-9","ext-col-span-10","ext-col-span-11","ext-col-span-12","ext-col-span-full","ext-col-start-1","ext-col-start-2","ext-col-start-3","ext-col-start-4","ext-col-start-5","ext-col-start-6","ext-col-start-7","ext-col-start-8","ext-col-start-9","ext-col-start-10","ext-col-start-11","ext-col-start-12","ext-col-start-13","ext-col-start-auto","ext-col-end-1","ext-col-end-2","ext-col-end-3","ext-col-end-4","ext-col-end-5","ext-col-end-6","ext-col-end-7","ext-col-end-8","ext-col-end-9","ext-col-end-10","ext-col-end-11","ext-col-end-12","ext-col-end-13","ext-col-end-auto","ext-row-auto","ext-row-span-1","ext-row-span-2","ext-row-span-3","ext-row-span-4","ext-row-span-5","ext-row-span-6","ext-row-span-full","ext-row-start-1","ext-row-start-2","ext-row-start-3","ext-row-start-4","ext-row-start-5","ext-row-start-6","ext-row-start-7","ext-row-start-auto","ext-row-end-1","ext-row-end-2","ext-row-end-3","ext-row-end-4","ext-row-end-5","ext-row-end-6","ext-row-end-7","ext-row-end-auto","ext-m-0","ext-m-auto","ext-m-base","ext-m-lg","ext--m-base","ext--m-lg","ext-mx-0","ext-mx-auto","ext-mx-base","ext-mx-lg","ext--mx-base","ext--mx-lg","ext-my-0","ext-my-auto","ext-my-base","ext-my-lg","ext--my-base","ext--my-lg","ext-mt-0","ext-mt-auto","ext-mt-base","ext-mt-lg","ext--mt-base","ext--mt-lg","ext-mr-0","ext-mr-auto","ext-mr-base","ext-mr-lg","ext--mr-base","ext--mr-lg","ext-mb-0","ext-mb-auto","ext-mb-base","ext-mb-lg","ext--mb-base","ext--mb-lg","ext-ml-0","ext-ml-auto","ext-ml-base","ext-ml-lg","ext--ml-base","ext--ml-lg","ext-block","ext-inline-block","ext-inline","ext-flex","ext-inline-flex","ext-grid","ext-inline-grid","ext-hidden","ext-w-auto","ext-w-full","ext-max-w-full","ext-flex-1","ext-flex-auto","ext-flex-initial","ext-flex-none","ext-flex-shrink-0","ext-flex-shrink","ext-flex-grow-0","ext-flex-grow","ext-list-none","ext-grid-cols-1","ext-grid-cols-2","ext-grid-cols-3","ext-grid-cols-4","ext-grid-cols-5","ext-grid-cols-6","ext-grid-cols-7","ext-grid-cols-8","ext-grid-cols-9","ext-grid-cols-10","ext-grid-cols-11","ext-grid-cols-12","ext-grid-cols-none","ext-grid-rows-1","ext-grid-rows-2","ext-grid-rows-3","ext-grid-rows-4","ext-grid-rows-5","ext-grid-rows-6","ext-grid-rows-none","ext-flex-row","ext-flex-row-reverse","ext-flex-col","ext-flex-col-reverse","ext-flex-wrap","ext-flex-wrap-reverse","ext-flex-nowrap","ext-items-start","ext-items-end","ext-items-center","ext-items-baseline","ext-items-stretch","ext-justify-start","ext-justify-end","ext-justify-center","ext-justify-between","ext-justify-around","ext-justify-evenly","ext-justify-items-start","ext-justify-items-end","ext-justify-items-center","ext-justify-items-stretch","ext-gap-0","ext-gap-base","ext-gap-lg","ext-gap-x-0","ext-gap-x-base","ext-gap-x-lg","ext-gap-y-0","ext-gap-y-base","ext-gap-y-lg","ext-justify-self-auto","ext-justify-self-start","ext-justify-self-end","ext-justify-self-center","ext-justify-self-stretch","ext-rounded-none","ext-rounded-full","ext-rounded-t-none","ext-rounded-t-full","ext-rounded-r-none","ext-rounded-r-full","ext-rounded-b-none","ext-rounded-b-full","ext-rounded-l-none","ext-rounded-l-full","ext-rounded-tl-none","ext-rounded-tl-full","ext-rounded-tr-none","ext-rounded-tr-full","ext-rounded-br-none","ext-rounded-br-full","ext-rounded-bl-none","ext-rounded-bl-full","ext-border-0","ext-border-t-0","ext-border-r-0","ext-border-b-0","ext-border-l-0","ext-p-0","ext-p-base","ext-p-lg","ext-px-0","ext-px-base","ext-px-lg","ext-py-0","ext-py-base","ext-py-lg","ext-pt-0","ext-pt-base","ext-pt-lg","ext-pr-0","ext-pr-base","ext-pr-lg","ext-pb-0","ext-pb-base","ext-pb-lg","ext-pl-0","ext-pl-base","ext-pl-lg","ext-text-left","ext-text-center","ext-text-right","ext-leading-none","ext-leading-tight","ext-leading-snug","ext-leading-normal","ext-leading-relaxed","ext-leading-loose","ext-aspect-square","ext-aspect-landscape","ext-aspect-landscape-wide","ext-aspect-portrait","clip-path--rhombus","clip-path--diamond","clip-path--rhombus-alt","tablet\\\\:fullwidth-cols","desktop\\\\:fullwidth-cols","direction-rtl","direction-ltr","bring-to-front","text-stroke","text-stroke--primary","text-stroke--secondary","editor\\\\:no-caption","editor\\\\:no-inserter","editor\\\\:no-resize","editor\\\\:pointer-events-none","tablet\\\\:ext-absolute","tablet\\\\:ext-relative","tablet\\\\:ext-top-base","tablet\\\\:ext-top-lg","tablet\\\\:ext--top-base","tablet\\\\:ext--top-lg","tablet\\\\:ext-right-base","tablet\\\\:ext-right-lg","tablet\\\\:ext--right-base","tablet\\\\:ext--right-lg","tablet\\\\:ext-bottom-base","tablet\\\\:ext-bottom-lg","tablet\\\\:ext--bottom-base","tablet\\\\:ext--bottom-lg","tablet\\\\:ext-left-base","tablet\\\\:ext-left-lg","tablet\\\\:ext--left-base","tablet\\\\:ext--left-lg","tablet\\\\:ext-order-1","tablet\\\\:ext-order-2","tablet\\\\:ext-m-0","tablet\\\\:ext-m-auto","tablet\\\\:ext-m-base","tablet\\\\:ext-m-lg","tablet\\\\:ext--m-base","tablet\\\\:ext--m-lg","tablet\\\\:ext-mx-0","tablet\\\\:ext-mx-auto","tablet\\\\:ext-mx-base","tablet\\\\:ext-mx-lg","tablet\\\\:ext--mx-base","tablet\\\\:ext--mx-lg","tablet\\\\:ext-my-0","tablet\\\\:ext-my-auto","tablet\\\\:ext-my-base","tablet\\\\:ext-my-lg","tablet\\\\:ext--my-base","tablet\\\\:ext--my-lg","tablet\\\\:ext-mt-0","tablet\\\\:ext-mt-auto","tablet\\\\:ext-mt-base","tablet\\\\:ext-mt-lg","tablet\\\\:ext--mt-base","tablet\\\\:ext--mt-lg","tablet\\\\:ext-mr-0","tablet\\\\:ext-mr-auto","tablet\\\\:ext-mr-base","tablet\\\\:ext-mr-lg","tablet\\\\:ext--mr-base","tablet\\\\:ext--mr-lg","tablet\\\\:ext-mb-0","tablet\\\\:ext-mb-auto","tablet\\\\:ext-mb-base","tablet\\\\:ext-mb-lg","tablet\\\\:ext--mb-base","tablet\\\\:ext--mb-lg","tablet\\\\:ext-ml-0","tablet\\\\:ext-ml-auto","tablet\\\\:ext-ml-base","tablet\\\\:ext-ml-lg","tablet\\\\:ext--ml-base","tablet\\\\:ext--ml-lg","tablet\\\\:ext-block","tablet\\\\:ext-inline-block","tablet\\\\:ext-inline","tablet\\\\:ext-flex","tablet\\\\:ext-inline-flex","tablet\\\\:ext-grid","tablet\\\\:ext-inline-grid","tablet\\\\:ext-hidden","tablet\\\\:ext-w-auto","tablet\\\\:ext-w-full","tablet\\\\:ext-max-w-full","tablet\\\\:ext-flex-1","tablet\\\\:ext-flex-auto","tablet\\\\:ext-flex-initial","tablet\\\\:ext-flex-none","tablet\\\\:ext-flex-shrink-0","tablet\\\\:ext-flex-shrink","tablet\\\\:ext-flex-grow-0","tablet\\\\:ext-flex-grow","tablet\\\\:ext-list-none","tablet\\\\:ext-grid-cols-1","tablet\\\\:ext-grid-cols-2","tablet\\\\:ext-grid-cols-3","tablet\\\\:ext-grid-cols-4","tablet\\\\:ext-grid-cols-5","tablet\\\\:ext-grid-cols-6","tablet\\\\:ext-grid-cols-7","tablet\\\\:ext-grid-cols-8","tablet\\\\:ext-grid-cols-9","tablet\\\\:ext-grid-cols-10","tablet\\\\:ext-grid-cols-11","tablet\\\\:ext-grid-cols-12","tablet\\\\:ext-grid-cols-none","tablet\\\\:ext-flex-row","tablet\\\\:ext-flex-row-reverse","tablet\\\\:ext-flex-col","tablet\\\\:ext-flex-col-reverse","tablet\\\\:ext-flex-wrap","tablet\\\\:ext-flex-wrap-reverse","tablet\\\\:ext-flex-nowrap","tablet\\\\:ext-items-start","tablet\\\\:ext-items-end","tablet\\\\:ext-items-center","tablet\\\\:ext-items-baseline","tablet\\\\:ext-items-stretch","tablet\\\\:ext-justify-start","tablet\\\\:ext-justify-end","tablet\\\\:ext-justify-center","tablet\\\\:ext-justify-between","tablet\\\\:ext-justify-around","tablet\\\\:ext-justify-evenly","tablet\\\\:ext-justify-items-start","tablet\\\\:ext-justify-items-end","tablet\\\\:ext-justify-items-center","tablet\\\\:ext-justify-items-stretch","tablet\\\\:ext-justify-self-auto","tablet\\\\:ext-justify-self-start","tablet\\\\:ext-justify-self-end","tablet\\\\:ext-justify-self-center","tablet\\\\:ext-justify-self-stretch","tablet\\\\:ext-p-0","tablet\\\\:ext-p-base","tablet\\\\:ext-p-lg","tablet\\\\:ext-px-0","tablet\\\\:ext-px-base","tablet\\\\:ext-px-lg","tablet\\\\:ext-py-0","tablet\\\\:ext-py-base","tablet\\\\:ext-py-lg","tablet\\\\:ext-pt-0","tablet\\\\:ext-pt-base","tablet\\\\:ext-pt-lg","tablet\\\\:ext-pr-0","tablet\\\\:ext-pr-base","tablet\\\\:ext-pr-lg","tablet\\\\:ext-pb-0","tablet\\\\:ext-pb-base","tablet\\\\:ext-pb-lg","tablet\\\\:ext-pl-0","tablet\\\\:ext-pl-base","tablet\\\\:ext-pl-lg","tablet\\\\:ext-text-left","tablet\\\\:ext-text-center","tablet\\\\:ext-text-right","desktop\\\\:ext-absolute","desktop\\\\:ext-relative","desktop\\\\:ext-top-base","desktop\\\\:ext-top-lg","desktop\\\\:ext--top-base","desktop\\\\:ext--top-lg","desktop\\\\:ext-right-base","desktop\\\\:ext-right-lg","desktop\\\\:ext--right-base","desktop\\\\:ext--right-lg","desktop\\\\:ext-bottom-base","desktop\\\\:ext-bottom-lg","desktop\\\\:ext--bottom-base","desktop\\\\:ext--bottom-lg","desktop\\\\:ext-left-base","desktop\\\\:ext-left-lg","desktop\\\\:ext--left-base","desktop\\\\:ext--left-lg","desktop\\\\:ext-order-1","desktop\\\\:ext-order-2","desktop\\\\:ext-m-0","desktop\\\\:ext-m-auto","desktop\\\\:ext-m-base","desktop\\\\:ext-m-lg","desktop\\\\:ext--m-base","desktop\\\\:ext--m-lg","desktop\\\\:ext-mx-0","desktop\\\\:ext-mx-auto","desktop\\\\:ext-mx-base","desktop\\\\:ext-mx-lg","desktop\\\\:ext--mx-base","desktop\\\\:ext--mx-lg","desktop\\\\:ext-my-0","desktop\\\\:ext-my-auto","desktop\\\\:ext-my-base","desktop\\\\:ext-my-lg","desktop\\\\:ext--my-base","desktop\\\\:ext--my-lg","desktop\\\\:ext-mt-0","desktop\\\\:ext-mt-auto","desktop\\\\:ext-mt-base","desktop\\\\:ext-mt-lg","desktop\\\\:ext--mt-base","desktop\\\\:ext--mt-lg","desktop\\\\:ext-mr-0","desktop\\\\:ext-mr-auto","desktop\\\\:ext-mr-base","desktop\\\\:ext-mr-lg","desktop\\\\:ext--mr-base","desktop\\\\:ext--mr-lg","desktop\\\\:ext-mb-0","desktop\\\\:ext-mb-auto","desktop\\\\:ext-mb-base","desktop\\\\:ext-mb-lg","desktop\\\\:ext--mb-base","desktop\\\\:ext--mb-lg","desktop\\\\:ext-ml-0","desktop\\\\:ext-ml-auto","desktop\\\\:ext-ml-base","desktop\\\\:ext-ml-lg","desktop\\\\:ext--ml-base","desktop\\\\:ext--ml-lg","desktop\\\\:ext-block","desktop\\\\:ext-inline-block","desktop\\\\:ext-inline","desktop\\\\:ext-flex","desktop\\\\:ext-inline-flex","desktop\\\\:ext-grid","desktop\\\\:ext-inline-grid","desktop\\\\:ext-hidden","desktop\\\\:ext-w-auto","desktop\\\\:ext-w-full","desktop\\\\:ext-max-w-full","desktop\\\\:ext-flex-1","desktop\\\\:ext-flex-auto","desktop\\\\:ext-flex-initial","desktop\\\\:ext-flex-none","desktop\\\\:ext-flex-shrink-0","desktop\\\\:ext-flex-shrink","desktop\\\\:ext-flex-grow-0","desktop\\\\:ext-flex-grow","desktop\\\\:ext-list-none","desktop\\\\:ext-grid-cols-1","desktop\\\\:ext-grid-cols-2","desktop\\\\:ext-grid-cols-3","desktop\\\\:ext-grid-cols-4","desktop\\\\:ext-grid-cols-5","desktop\\\\:ext-grid-cols-6","desktop\\\\:ext-grid-cols-7","desktop\\\\:ext-grid-cols-8","desktop\\\\:ext-grid-cols-9","desktop\\\\:ext-grid-cols-10","desktop\\\\:ext-grid-cols-11","desktop\\\\:ext-grid-cols-12","desktop\\\\:ext-grid-cols-none","desktop\\\\:ext-flex-row","desktop\\\\:ext-flex-row-reverse","desktop\\\\:ext-flex-col","desktop\\\\:ext-flex-col-reverse","desktop\\\\:ext-flex-wrap","desktop\\\\:ext-flex-wrap-reverse","desktop\\\\:ext-flex-nowrap","desktop\\\\:ext-items-start","desktop\\\\:ext-items-end","desktop\\\\:ext-items-center","desktop\\\\:ext-items-baseline","desktop\\\\:ext-items-stretch","desktop\\\\:ext-justify-start","desktop\\\\:ext-justify-end","desktop\\\\:ext-justify-center","desktop\\\\:ext-justify-between","desktop\\\\:ext-justify-around","desktop\\\\:ext-justify-evenly","desktop\\\\:ext-justify-items-start","desktop\\\\:ext-justify-items-end","desktop\\\\:ext-justify-items-center","desktop\\\\:ext-justify-items-stretch","desktop\\\\:ext-justify-self-auto","desktop\\\\:ext-justify-self-start","desktop\\\\:ext-justify-self-end","desktop\\\\:ext-justify-self-center","desktop\\\\:ext-justify-self-stretch","desktop\\\\:ext-p-0","desktop\\\\:ext-p-base","desktop\\\\:ext-p-lg","desktop\\\\:ext-px-0","desktop\\\\:ext-px-base","desktop\\\\:ext-px-lg","desktop\\\\:ext-py-0","desktop\\\\:ext-py-base","desktop\\\\:ext-py-lg","desktop\\\\:ext-pt-0","desktop\\\\:ext-pt-base","desktop\\\\:ext-pt-lg","desktop\\\\:ext-pr-0","desktop\\\\:ext-pr-base","desktop\\\\:ext-pr-lg","desktop\\\\:ext-pb-0","desktop\\\\:ext-pb-base","desktop\\\\:ext-pb-lg","desktop\\\\:ext-pl-0","desktop\\\\:ext-pl-base","desktop\\\\:ext-pl-lg","desktop\\\\:ext-text-left","desktop\\\\:ext-text-center","desktop\\\\:ext-text-right"]}');function jc(t){return function(t){if(Array.isArray(t))return _c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return _c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _c(t,e)}(t)||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 _c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Lc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function kc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Lc(Object(r),!0).forEach((function(e){Sc(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lc(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Sc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Oc=(0,wc.createHigherOrderComponent)((function(t){return function(e){var r,n,o=null!==(r=null==e||null===(n=e.attributes)||void 0===n?void 0:n.extUtilities)&&void 0!==r?r:[],i=Ec.t.map((function(t){return t.replace(".","").replace(new RegExp("\\\\","g"),"")}));return(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(t,kc({},e)),o&&(0,pr.jsx)(so.InspectorAdvancedControls,{children:(0,pr.jsx)(nr.FormTokenField,{label:(0,or.__)("Extendify Utilities","extendify"),tokenizeOnSpace:!0,value:o,suggestions:i,onChange:function(t){e.setAttributes({extUtilities:t})}})})]})}}),"utilityClassEdit");function Pc(t,e,r){var n,o,i,a=null!==(n=null==t?void 0:t.className)&&void 0!==n?n:[],c=null!==(o=null==r?void 0:r.extUtilities)&&void 0!==o?o:[],s=null!==(i=null==r?void 0:r.className)&&void 0!==i?i:[];if(!c||!Object.keys(c).length)return t;var u=function(t){switch(Object.prototype.toString.call(t)){case"[object String]":return t.split(" ");case"[object Array]":return t;default:return[]}},l=new Set([].concat(jc(u(s)),jc(u(a)),jc(u(c))));return Object.assign({},t,{className:jc(l).join(" ")})}function Nc(t){var e=t.show,r=void 0!==e&&e,n=_(),i=n.open,a=n.setReady,c=n.setOpen,s=(0,o.useCallback)((function(){return c(!0)}),[c]),u=(0,o.useCallback)((function(){return c(!1)}),[c]),l=jt().initTemplateData,f=ht((function(t){return t.fetchTaxonomies})),h=q((function(t){return t._hasHydrated})),d=jt((function(t){return Object.keys(t.taxonomyDefaultState).length>0}));return(0,o.useEffect)((function(){i&&f().then((function(){jt.getState().setupDefaultTaxonomies()}))}),[i,f]),(0,o.useEffect)((function(){h&&d&&(l(),a(!0))}),[h,d,l,a]),(0,o.useEffect)((function(){var t=new URLSearchParams(window.location.search);(r||t.has("ext-open"))&&c(!0)}),[r,c]),(0,o.useEffect)((function(){_t().then((function(t){_.setState({metaData:t})}))}),[]),(0,o.useEffect)((function(){return window.addEventListener("extendify::open-library",s),window.addEventListener("extendify::close-library",u),function(){window.removeEventListener("extendify::open-library",s),window.removeEventListener("extendify::close-library",u)}}),[u,s]),(0,pr.jsx)(xc,{})}function Cc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}(0,bc.addFilter)("blocks.registerBlockType","extendify/utilities/attributes",(function(t){return kc(kc({},t),{},{attributes:kc(kc({},t.attributes),{},{extUtilities:{type:"array",default:[]}})})})),(0,bc.addFilter)("blocks.registerBlockType","extendify/utilities/addEditProps",(function(t){var e=t.getEditWrapperProps;return t.getEditWrapperProps=function(r){var n={};return e&&(n=e(r)),Pc(n,t,r)},t})),(0,bc.addFilter)("editor.BlockEdit","extendify/utilities/advancedClassControls",Oc),(0,bc.addFilter)("blocks.getSaveContent.extraProps","extendify/utilities/extra-props",Pc);var Ac,Tc=(0,Po.select)("core/blocks").getCategories();(0,n.setCategories)([{slug:"extendify",title:"Extendify",icon:null}].concat(function(t){if(Array.isArray(t))return Cc(t)}(Ac=Tc)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(Ac)||function(t,e){if(t){if("string"==typeof t)return Cc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Cc(t,e):void 0}}(Ac)||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.")}())),(0,n.registerBlockCollection)("extendify",{title:"Extendify",icon:(0,pr.jsx)(nr.Icon,{icon:Ur})});const Ic=(0,o.createElement)(hr,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(lr,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8h-1.5zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zM4.5 4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1V12l-2.3-1.7c-.3-.2-.6-.2-.9 0l-2.9 2.1L8 11.3c-.2-.1-.5-.1-.7 0l-2.9 1.5V4.6zm0 11.8v-1.8l3.2-1.7 2.4 1.2c.2.1.5.1.8-.1l2.8-2 2.8 2v2.5c0 .1-.1.1-.1.1H4.6c0-.1-.1-.2-.1-.2z"})),Rc=(0,o.createElement)(hr,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(lr,{d:"M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",fillRule:"evenodd",clipRule:"evenodd"})),Fc=(0,o.createElement)(hr,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(lr,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z"})),Mc=(0,o.createElement)(hr,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(lr,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"})),Dc=(0,o.createElement)(hr,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(lr,{d:"M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z"})),Bc=(0,o.createElement)(hr,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(lr,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"})),Gc=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"extendify/library","title":"Pattern Library","description":"Add block patterns and full page layouts with the Extendify Library.","keywords":["template","layouts"],"textdomain":"extendify","attributes":{"preview":{"type":"string"},"search":{"type":"string"}}}');(0,n.registerBlockType)(Gc,{icon:Ur,category:"extendify",example:{attributes:{preview:window.extendifyData.asset_path+"/preview.png"}},variations:[{name:"gallery",icon:(0,pr.jsx)(ir,{icon:Ic}),category:"extendify",attributes:{search:"gallery"},title:(0,or.__)("Gallery Patterns","extendify"),description:(0,or.__)("Add gallery patterns and layouts.","extendify"),keywords:[(0,or.__)("slideshow","extendify"),(0,or.__)("images","extendify")]},{name:"team",icon:(0,pr.jsx)(ir,{icon:Rc}),category:"extendify",attributes:{search:"team"},title:(0,or.__)("Team Patterns","extendify"),description:(0,or.__)("Add team patterns and layouts.","extendify"),keywords:[(0,or._x)("crew","As in team","extendify"),(0,or.__)("colleagues","extendify"),(0,or.__)("members","extendify")]},{name:"hero",icon:(0,pr.jsx)(ir,{icon:Fc}),category:"extendify",attributes:{search:"hero"},title:(0,or._x)("Hero Patterns","Hero being a hero/top section of a webpage","extendify"),description:(0,or.__)("Add hero patterns and layouts.","extendify"),keywords:[(0,or.__)("heading","extendify"),(0,or.__)("headline","extendify")]},{name:"text",icon:(0,pr.jsx)(ir,{icon:Mc}),category:"extendify",attributes:{search:"text"},title:(0,or._x)("Text Patterns","Relating to patterns that feature text only","extendify"),description:(0,or.__)("Add text patterns and layouts.","extendify"),keywords:[(0,or.__)("simple","extendify"),(0,or.__)("paragraph","extendify")]},{name:"about",icon:(0,pr.jsx)(ir,{icon:Dc}),category:"extendify",attributes:{search:"about"},title:(0,or._x)("About Page Patterns","Add patterns relating to an about us page","extendify"),description:(0,or.__)("About patterns and layouts.","extendify"),keywords:[(0,or.__)("who we are","extendify"),(0,or.__)("team","extendify")]},{name:"call-to-action",icon:(0,pr.jsx)(ir,{icon:Bc}),category:"extendify",attributes:{search:"call-to-action"},title:(0,or.__)("Call to Action Patterns","extendify"),description:(0,or.__)("Add call to action patterns and layouts.","extendify"),keywords:[(0,or._x)("cta","Initialism for call to action","extendify"),(0,or.__)("callout","extendify"),(0,or.__)("buttons","extendify")]}],edit:function(t){var e=t.clientId,r=t.attributes,n=(0,Po.useDispatch)("core/block-editor").removeBlock;return(0,o.useEffect)((function(){r.preview||(r.search&&Uc(r.search),Lo("library-block","open"),n(e))}),[e,r,n]),(0,pr.jsx)("img",{style:{display:"block",maxWidth:"100%"},src:r.preview,alt:(0,or.sprintf)((0,or.__)("%s Pattern Library","extendify"),"Extendify")})}});var Uc=function(t){var e=new URLSearchParams(window.location.search);e.append("ext-patternType",t),window.history.replaceState(null,null,window.location.pathname+"?"+e.toString())};const zc=wp.editPost,Yc=wp.plugins;function $c(t){return $c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$c(t)}function Wc(){Wc=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==$c(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function Hc(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function qc(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Hc(i,n,o,a,c,"next",t)}function c(t){Hc(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Vc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Jc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jc(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}const Kc=function(){var t=(0,Po.useSelect)((function(t){return t("core").canUser("create","users")})),e=Vc((0,o.useState)(q.getState().enabled),2),r=e[0],n=e[1],i=Vc((0,o.useState)(ot.getState().enabled),2),a=i[0],c=i[1];function s(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=document.getElementById("extendify-templates-inserter-btn");e&&(t?e.classList.add("hidden"):e.classList.remove("hidden"))}function u(t){return l.apply(this,arguments)}function l(){return(l=qc(Wc().mark((function t(e){return Wc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,q.setState({enabled:e});case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function f(t){return h.apply(this,arguments)}function h(){return(h=qc(Wc().mark((function t(e){return Wc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ot.setState({enabled:e});case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function d(t,e){return p.apply(this,arguments)}function p(){return(p=qc(Wc().mark((function t(e,r){return Wc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("global"!==r){t.next=5;break}return t.next=3,f(e);case 3:t.next=7;break;case 5:return t.next=7,u(e);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function y(t){"global"===t?c((function(e){return d(!e,t),!e})):n((function(e){return s(!e),d(!e,t),!e}))}return(0,o.useEffect)((function(){s(!r)}),[r]),(0,pr.jsxs)(nr.Modal,{title:(0,or.__)("Extendify Settings","extendify"),onRequestClose:function(){var t=document.getElementById("extendify-util");(0,o.unmountComponentAtNode)(t)},children:[(0,pr.jsx)(nr.ToggleControl,{label:t?(0,or.__)("Enable the library for myself","extendify"):(0,or.__)("Enable the library","extendify"),help:(0,or.__)("Publish with hundreds of patterns & page layouts","extendify"),checked:r,onChange:function(){return y("user")}}),t&&(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)("br",{}),(0,pr.jsx)(nr.ToggleControl,{label:(0,or.__)("Allow all users to publish with the library"),help:(0,or.__)("Everyone publishes with patterns & page layouts","extendify"),checked:a,onChange:function(){return y("global")}})]})]})};var Xc=function(t){var e=t.anchorRef,r=t.onPressX,n=t.onClick,o=t.onClickOutside;return e.current?(0,pr.jsx)(nr.Popover,{anchorRef:e.current,shouldAnchorIncludePadding:!0,className:"extendify-tooltip-default",focusOnMount:!1,onFocusOutside:o,onClick:n,position:"bottom center",noArrow:!1,children:(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.5rem"},children:[(0,pr.jsx)("span",{style:{textTransform:"uppercase",color:"#8b8b8b"},children:(0,or.__)("Monthly Imports","extendify")}),(0,pr.jsx)(nr.Button,{style:{color:"white",position:"relative",right:"-5px",padding:"0",minWidth:"0",height:"20px",width:"20px"},onClick:function(t){t.stopPropagation(),r()},icon:(0,pr.jsx)(ir,{icon:en,size:12}),showTooltip:!1,label:(0,or.__)("Close callout","extendify")})]}),(0,pr.jsx)("div",{dangerouslySetInnerHTML:{__html:Br((0,or.sprintf)((0,or.__)("%1$sGood news!%2$s We've added more imports to your library. Enjoy!","extendify"),"<strong>","</strong>"))}})]})}):null};function Zc(t){return Zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zc(t)}function Qc(){Qc=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return L()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=w(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),i}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l={};function f(){}function h(){}function d(){}var p={};c(p,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(_([])));v&&v!==e&&r.call(v,o)&&(p=v);var m=d.prototype=f.prototype=Object.create(p);function g(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(o,i,a,c){var s=u(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==Zc(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return h.prototype=d,c(m,"constructor",d),c(d,"constructor",h),h.displayName=c(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(x.prototype),c(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),c(m,a,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function ts(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function es(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ts(i,n,o,a,c,"next",t)}function c(t){ts(i,n,o,a,c,"throw",t)}a(void 0)}))}}function rs(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,c=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ns(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ns(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ns(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var os,is,as,cs,ss,us,ls,fs,hs,ds,ps=function(){var t=rs((0,o.useState)(!1),2),e=t[0],r=t[1],n=(0,o.useRef)(!1),i=(0,o.useRef)(),a=q((function(t){return t.apiKey.length})),c=q((function(t){return t.imports>0})),s=_((function(t){return t.open})),u=q((function(t){return 0===t.allowedImports})),l=function(){var t=es(Qc().mark((function t(){return Qc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Lt("mb-tooltip-closed");case 2:r(!1),q.setState({allowedImports:-1});case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,o.useEffect)((function(){s&&(r(!1),n.current=!0),!a&&u&&c&&(n.current||r(!0),n.current=!0)}),[a,u,c,s]),(0,pr.jsxs)(pr.Fragment,{children:[(0,pr.jsx)(ys,{buttonRef:i,text:(0,or.__)("Design Library","extendify")}),e&&(0,pr.jsx)(Xc,{anchorRef:i,onClick:es(Qc().mark((function t(){return Qc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Lt("mb-tooltip-pressed");case 2:_o("main-button-tooltip");case 3:case"end":return t.stop()}}),t)}))),onPressX:l})]})},ys=function(t){var e=t.buttonRef,r=t.text;return(0,pr.jsx)("div",{className:"extendify",children:(0,pr.jsx)(nr.Button,{isPrimary:!0,ref:e,className:"h-8 xs:h-9 px-1 min-w-0 xs:pl-2 xs:pr-3 sm:ml-2",onClick:function(){return _o("main-button")},id:"extendify-templates-inserter-btn",icon:(0,pr.jsx)(ir,{icon:zr,size:24,style:{marginRight:0}}),children:(0,pr.jsx)("span",{className:"hidden xs:inline ml-1",children:r})})})},vs=function(){return(0,pr.jsx)(nr.Button,{id:"extendify-cta-button",style:{margin:"1rem 1rem 0",width:"calc(100% - 2rem)",justifyContent:" center"},onClick:function(){return _o("patterns-cta")},isSecondary:!0,children:(0,or.__)("Discover patterns in Extendify Library","extendify")})},ms=null===(os=window.extendifyData)||void 0===os||null===(is=os.user)||void 0===is?void 0:is.state,gs=function(){return null===window.extendifyData.user||(null==ms?void 0:ms.isAdmin)},xs=function(){var t,e,r;return null===window.extendifyData.sitesettings||(null===(t=window.extendifyData)||void 0===t||null===(e=t.sitesettings)||void 0===e||null===(r=e.state)||void 0===r?void 0:r.enabled)},ws=null===(as=window)||void 0===as||null===(cs=as.wp)||void 0===cs||null===(ss=cs.data)||void 0===ss?void 0:ss.subscribe((function(){requestAnimationFrame((function(){var t,e;if((xs()||gs())&&!document.getElementById("extendify-templates-inserter")&&(document.querySelector(".edit-post-header-toolbar")||document.querySelector(".edit-site-header_start"))){var r=Object.assign(document.createElement("div"),{id:"extendify-templates-inserter"});null===(t=document.querySelector(".edit-post-header-toolbar"))||void 0===t||t.append(r),null===(e=document.querySelector(".edit-site-header_start"))||void 0===e||e.append(r),(0,o.render)((0,pr.jsx)(ps,{}),r),(null===window.extendifyData.user?xs():null==ms?void 0:ms.enabled)||document.getElementById("extendify-templates-inserter-btn").classList.add("hidden"),ws()}}))})),bs=null===(us=window)||void 0===us||null===(ls=us.wp)||void 0===ls||null===(fs=ls.data)||void 0===fs?void 0:fs.subscribe((function(){requestAnimationFrame((function(){if((xs()||gs())&&document.querySelector("[id$=patterns-view]")&&!document.getElementById("extendify-cta-button")){var t=Object.assign(document.createElement("div"),{id:"extendify-cta-button-container"});document.querySelector("[id$=patterns-view]").prepend(t),(0,o.render)((0,pr.jsx)(vs,{}),t),bs()}}))}));try{(0,Yc.registerPlugin)("extendify-settings-enable-disable",{render:function(){return(0,pr.jsx)(pr.Fragment,{children:(0,pr.jsxs)(zc.PluginSidebarMoreMenuItem,{onClick:function(){var t=document.getElementById("extendify-util");(0,o.render)((0,pr.jsx)(Kc,{}),t)},icon:(0,pr.jsx)(ir,{icon:zr,size:24}),children:[" ",(0,or.__)("Extendify","extendify")]})})}})}catch(je){console.error("registerPlugin not supported? (error handled gracefully)",je.message)}[{register:function(){var t=(0,Po.dispatch)("core/notices").createNotice,e=q.getState().incrementImports;window.addEventListener("extendify::template-inserted",(function(r){t("info",(0,or.__)("Page layout added"),{isDismissible:!0,type:"snackbar"}),setTimeout((function(){var t;e(),ao(null===(t=r.detail)||void 0===t?void 0:t.template)}),0)}))}},{register:function(){var t=this;window.addEventListener("extendify::softerror-encountered",(function(e){t[(0,Tn.camelCase)(e.detail.type)](e.detail)}))},versionOutdated:function(t){(0,o.render)((0,pr.jsx)(Ko,{title:t.data.title,requiredPlugins:["extendify"],message:t.data.message,buttonLabel:t.data.buttonLabel,forceOpen:!0}),document.getElementById("extendify-root"))}}].forEach((function(t){return t.register()})),null===(hs=window)||void 0===hs||null===(ds=hs.wp)||void 0===ds||ds.domReady((function(){var t=Object.assign(document.createElement("div"),{id:"extendify-root"});if(document.body.append(t),(0,o.render)((0,pr.jsx)(Nc,{}),t),t.parentNode.insertBefore(Object.assign(document.createElement("div"),{id:"extendify-util"}),t.nextSibling),jo.getState().importOnLoad){var e=jo.getState().wantedTemplate;setTimeout((function(){yi((0,n.rawHandler)({HTML:e.fields.code}),e)}),0)}jo.setState({importOnLoad:!1,wantedTemplate:{}})}))},4782:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=s(t),a=i[0],c=i[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,c)),l=0,f=c>0?a-4:a;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===c&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[l++]=255&e);1===c&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=16383,c=0,s=n-o;c<s;c+=a)i.push(u(t,c,c+a>s?s:c+a));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=i.length;a<c;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var o,i,a=[],c=e;c<n;c+=3)o=(t[c]<<16&16711680)+(t[c+1]<<8&65280)+(255&t[c+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},816:(t,e,r)=>{"use strict";var n=r(4782),o=r(8898),i=r(5182);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=s.prototype:(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,r){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return u(this,t,e,r)}function u(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);s.TYPED_ARRAY_SUPPORT?(t=e).__proto__=s.prototype:t=h(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!s.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),o=(t=c(t,n)).write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(s.isBuffer(e)){var r=0|d(e.length);return 0===(t=c(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?c(t,0):h(t,e);if("Buffer"===e.type&&i(e.data))return h(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(l(e),t=c(t,e<0?0:0|d(e)),!s.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e){var r=e.length<0?0:0|d(e.length);t=c(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function d(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(t).length;default:if(n)return U(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return N(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return L(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,o);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,o){var i,a=1,c=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,c/=2,s/=2,r/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var l=-1;for(i=r;i<c;i++)if(u(t,i)===u(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===s)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(r+s>c&&(r=c-s),i=r;i>=0;i--){for(var f=!0,h=0;h<s;h++)if(u(t,i+h)!==u(e,h)){f=!1;break}if(f)return i}return-1}function x(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var c=parseInt(e.substr(2*a,2),16);if(isNaN(c))return a;t[r+a]=c}return a}function w(t,e,r,n){return Y(U(e,t.length-r),t,r,n)}function b(t,e,r,n){return Y(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return b(t,e,r,n)}function j(t,e,r,n){return Y(z(e),t,r,n)}function _(t,e,r,n){return Y(function(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)n=(r=t.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function L(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,a,c,s,u=t[o],l=null,f=u>239?4:u>223?3:u>191?2:1;if(o+f<=r)switch(f){case 1:u<128&&(l=u);break;case 2:128==(192&(i=t[o+1]))&&(s=(31&u)<<6|63&i)>127&&(l=s);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(s=(15&u)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:i=t[o+1],a=t[o+2],c=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&c)&&(s=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&c)>65535&&s<1114112&&(l=s)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(t){var e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=S));return r}(n)}e.lW=s,e.h2=50,s.TYPED_ARRAY_SUPPORT=void 0!==r.g.TYPED_ARRAY_SUPPORT?r.g.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),a(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,r){return u(null,t,e,r)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,r){return function(t,e,r,n){return l(e),e<=0?c(t,e):void 0!==r?"string"==typeof n?c(t,e).fill(r,n):c(t,e).fill(r):c(t,e)}(null,t,e,r)},s.allocUnsafe=function(t){return f(null,t)},s.allocUnsafeSlow=function(t){return f(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var a=t[r];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,o),o+=a.length}return n},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?k(this,0,t):y.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",r=e.h2;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,e,r,n,o){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),c=Math.min(i,a),u=this.slice(n,o),l=t.slice(e,r),f=0;f<c;++f)if(u[f]!==l[f]){i=u[f],a=l[f];break}return i<a?-1:a<i?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return x(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return j(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function O(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function P(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function N(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=G(t[i]);return o}function C(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function A(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,r,n,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function I(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function R(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function F(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(t,e,r,n,i){return i||F(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function D(t,e,r,n,i){return i||F(t,0,r,8),o.write(t,e,r,n,52,8),r+8}s.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),s.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=s.prototype;else{var o=e-t;r=new s(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},s.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||A(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},s.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||A(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},s.prototype.readUInt8=function(t,e){return e||A(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||A(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||A(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||A(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||A(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||A(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return e||A(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||A(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){e||A(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||A(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||A(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||A(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||A(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||T(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},s.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||T(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},s.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);T(this,t,e,r,o-1,-o)}var i=0,a=1,c=0;for(this[e]=255&t;++i<r&&(a*=256);)t<0&&0===c&&0!==this[e+i-1]&&(c=1),this[e+i]=(t/a>>0)-c&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);T(this,t,e,r,o-1,-o)}var i=r-1,a=1,c=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===c&&0!==this[e+i+1]&&(c=1),this[e+i]=(t/a>>0)-c&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,r){return M(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return M(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=s.isBuffer(t)?t:U(new s(t,n).toString()),c=a.length;for(i=0;i<r-e;++i)this[i+e]=a[i%c]}return this};var B=/[^+\/0-9A-Za-z-_]/g;function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}},42:(t,e)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var r=arguments[e];if(r){var i=typeof r;if("string"===i||"number"===i)t.push(r);else if(Array.isArray(r)){if(r.length){var a=o.apply(null,r);a&&t.push(a)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var c in r)n.call(r,c)&&r[c]&&t.push(c);else t.push(r.toString())}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(r=function(){return o}.apply(e,[]))||(t.exports=r)}()},6012:(t,e,r)=>{"use strict";var n=r(3185),o={"text/plain":"Text","text/html":"Url",default:"Text"};t.exports=function(t,e){var r,i,a,c,s,u,l=!1;e||(e={}),r=e.debug||!1;try{if(a=n(),c=document.createRange(),s=document.getSelection(),(u=document.createElement("span")).textContent=t,u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",(function(n){if(n.stopPropagation(),e.format)if(n.preventDefault(),void 0===n.clipboardData){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[e.format]||o.default;window.clipboardData.setData(i,t)}else n.clipboardData.clearData(),n.clipboardData.setData(e.format,t);e.onCopy&&(n.preventDefault(),e.onCopy(n.clipboardData))})),document.body.appendChild(u),c.selectNodeContents(u),s.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(n){r&&console.error("unable to copy using execCommand: ",n),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),l=!0}catch(n){r&&console.error("unable to copy using clipboardData: ",n),r&&console.error("falling back to prompt"),i=function(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}("message"in e?e.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,t)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(c):s.removeAllRanges()),u&&document.body.removeChild(u),a()}return l}},8898:(t,e)=>{e.read=function(t,e,r,n,o){var i,a,c=8*o-n-1,s=(1<<c)-1,u=s>>1,l=-7,f=r?o-1:0,h=r?-1:1,d=t[e+f];for(f+=h,i=d&(1<<-l)-1,d>>=-l,l+=c;l>0;i=256*i+t[e+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===i)i=1-u;else{if(i===s)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),i-=u}return(d?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var a,c,s,u=8*i-o-1,l=(1<<u)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,p=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+f>=1?h/s:h*Math.pow(2,1-f))*s>=2&&(a++,s/=2),a+f>=l?(c=0,a=l):a+f>=1?(c=(e*s-1)*Math.pow(2,o),a+=f):(c=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;t[r+d]=255&c,d+=p,c/=256,o-=8);for(a=a<<o|c,u+=o;u>0;t[r+d]=255&a,d+=p,a/=256,u-=8);t[r+d-p]|=128*y}},5182:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},7721:()=>{},1461:()=>{},6118:()=>{},9716:()=>{},2525:t=>{"use strict";var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,i){for(var a,c,s=o(t),u=1;u<arguments.length;u++){for(var l in a=Object(arguments[u]))r.call(a,l)&&(s[l]=a[l]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(s[c[f]]=a[c[f]])}}return s}},7061:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(t){r=i}}();var c,s=[],u=!1,l=-1;function f(){u&&c&&(u=!1,c.length?s=c.concat(s):l=-1,s.length&&h())}function h(){if(!u){var t=a(f);u=!0;for(var e=s.length;e;){for(c=s,s=[];++l<e;)c&&c[l].run();l=-1,e=s.length}c=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new d(t,e)),1!==s.length||u||a(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},4218:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.CopyToClipboard=void 0;var o=c(r(7363)),i=c(r(6012)),a=["text","onCopy","options","children"];function c(t){return t&&t.__esModule?t:{default:t}}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){g(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function l(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m(t);if(e){var o=m(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return y(this,r)}}function y(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return v(t)}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function g(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var x=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(s,t);var e,r,n,c=p(s);function s(){var t;f(this,s);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return g(v(t=c.call.apply(c,[this].concat(r))),"onClick",(function(e){var r=t.props,n=r.text,a=r.onCopy,c=r.children,s=r.options,u=o.default.Children.only(c),l=(0,i.default)(n,s);a&&a(n,l),u&&u.props&&"function"==typeof u.props.onClick&&u.props.onClick(e)})),t}return e=s,(r=[{key:"render",value:function(){var t=this.props,e=(t.text,t.onCopy,t.options,t.children),r=l(t,a),n=o.default.Children.only(e);return o.default.cloneElement(n,u(u({},r),{},{onClick:this.onClick}))}}])&&h(e.prototype,r),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.default.PureComponent);e.CopyToClipboard=x,g(x,"defaultProps",{onCopy:void 0,options:void 0})},4306:(t,e,r)=>{"use strict";var n=r(4218).CopyToClipboard;n.CopyToClipboard=n,t.exports=n},1426:(t,e,r)=>{"use strict";r(2525);var n=r(7363),o=60103;if(e.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var i=Symbol.for;o=i("react.element"),e.Fragment=i("react.fragment")}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function u(t,e,r){var n,i={},u=null,l=null;for(n in void 0!==r&&(u=""+r),void 0!==e.key&&(u=""+e.key),void 0!==e.ref&&(l=e.ref),e)c.call(e,n)&&!s.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps)void 0===i[n]&&(i[n]=e[n]);return{$$typeof:o,type:t,key:u,ref:l,props:i,_owner:a.current}}e.jsx=u,e.jsxs=u},4246:(t,e,r)=>{"use strict";t.exports=r(1426)},3185:t=>{t.exports=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],n=0;n<t.rangeCount;n++)r.push(t.getRangeAt(n));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null}return t.removeAllRanges(),function(){"Caret"===t.type&&t.removeAllRanges(),t.rangeCount||r.forEach((function(e){t.addRange(e)})),e&&e.focus()}}},7363:t=>{"use strict";t.exports=React}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,n),i.exports}n.m=e,t=[],n.O=(e,r,o,i)=>{if(!r){var a=1/0;for(l=0;l<t.length;l++){for(var[r,o,i]=t[l],c=!0,s=0;s<r.length;s++)(!1&i||a>=i)&&Object.keys(n.O).every((t=>n.O[t](r[s])))?r.splice(s--,1):(c=!1,i<a&&(a=i));if(c){t.splice(l--,1);var u=o();void 0!==u&&(e=u)}}return e}i=i||0;for(var l=t.length;l>0&&t[l-1][2]>i;l--)t[l]=t[l-1];t[l]=[r,o,i]},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t={76:0,885:0,36:0,394:0,786:0};n.O.j=e=>0===t[e];var e=(e,r)=>{var o,i,[a,c,s]=r,u=0;if(a.some((e=>0!==t[e]))){for(o in c)n.o(c,o)&&(n.m[o]=c[o]);if(s)var l=s(n)}for(e&&e(r);u<a.length;u++)i=a[u],n.o(t,i)&&t[i]&&t[i][0](),t[i]=0;return n.O(l)},r=self.webpackChunk=self.webpackChunk||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})(),n.O(void 0,[885,36,394,786],(()=>n(4106))),n.O(void 0,[885,36,394,786],(()=>n(7721))),n.O(void 0,[885,36,394,786],(()=>n(1461))),n.O(void 0,[885,36,394,786],(()=>n(6118)));var o=n.O(void 0,[885,36,394,786],(()=>n(9716)));o=n.O(o)})(); |