(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e,t){return function(){return e.apply(t,arguments)}}e.r(t),e.d(t,{hasBrowserEnv:()=>le,hasStandardBrowserEnv:()=>ue,hasStandardBrowserWebWorkerEnv:()=>de,navigator:()=>ce,origin:()=>fe});const{toString:o}=Object.prototype,{getPrototypeOf:r}=Object,i=(s=Object.create(null),e=>{const t=o.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())});var s;const a=e=>(e=e.toLowerCase(),t=>i(t)===e),l=e=>t=>typeof t===e,{isArray:c}=Array,u=l("undefined"),d=a("ArrayBuffer"),f=l("string"),p=l("function"),m=l("number"),h=e=>null!==e&&"object"==typeof e,g=e=>{if("object"!==i(e))return!1;const t=r(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},y=a("Date"),b=a("File"),w=a("Blob"),E=a("FileList"),T=a("URLSearchParams"),[S,A,R,O]=["ReadableStream","Request","Response","Headers"].map(a);function _(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let o,r;if("object"!=typeof e&&(e=[e]),c(e))for(o=0,r=e.length;o0;)if(o=n[r],t===o.toLowerCase())return o;return null}const x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,N=e=>!u(e)&&e!==x,C=(D="undefined"!=typeof Uint8Array&&r(Uint8Array),e=>D&&e instanceof D);var D;const k=a("HTMLFormElement"),L=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),P=a("RegExp"),j=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};_(n,((n,r)=>{let i;!1!==(i=t(n,r,e))&&(o[r]=i||n)})),Object.defineProperties(e,o)},M=a("AsyncFunction"),U=(z="function"==typeof setImmediate,I=p(x.postMessage),z?setImmediate:I?(F=`axios@${Math.random()}`,B=[],x.addEventListener("message",(({source:e,data:t})=>{e===x&&t===F&&B.length&&B.shift()()}),!1),e=>{B.push(e),x.postMessage(F,"*")}):e=>setTimeout(e));var z,I,F,B;const H="undefined"!=typeof queueMicrotask?queueMicrotask.bind(x):"undefined"!=typeof process&&process.nextTick||U,q={isArray:c,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||p(e.append)&&("formdata"===(t=i(e))||"object"===t&&p(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer),t},isString:f,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:h,isPlainObject:g,isReadableStream:S,isRequest:A,isResponse:R,isHeaders:O,isUndefined:u,isDate:y,isFile:b,isBlob:w,isRegExp:P,isFunction:p,isStream:e=>h(e)&&p(e.pipe),isURLSearchParams:T,isTypedArray:C,isFileList:E,forEach:_,merge:function e(){const{caseless:t}=N(this)&&this||{},n={},o=(o,r)=>{const i=t&&v(n,r)||r;g(n[i])&&g(o)?n[i]=e(n[i],o):g(o)?n[i]=e({},o):c(o)?n[i]=o.slice():n[i]=o};for(let e=0,t=arguments.length;e(_(t,((t,r)=>{o&&p(t)?e[r]=n(t,o):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,o)=>{let i,s,a;const l={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)a=i[s],o&&!o(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==n&&r(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:a,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return-1!==o&&o===n},toArray:e=>{if(!e)return null;if(c(e))return e;let t=e.length;if(!m(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const n=o.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const o=[];for(;null!==(n=e.exec(t));)o.push(n);return o},isHTMLForm:k,hasOwnProperty:L,hasOwnProp:L,reduceDescriptors:j,freezeMethods:e=>{j(e,((t,n)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const o=e[n];p(o)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},o=e=>{e.forEach((e=>{n[e]=!0}))};return c(e)?o(e):o(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:v,global:x,isContextDefined:N,isSpecCompliantForm:function(e){return!!(e&&p(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,o)=>{if(h(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[o]=e;const r=c(e)?[]:{};return _(e,((e,t)=>{const i=n(e,o+1);!u(i)&&(r[t]=i)})),t[o]=void 0,r}}return e};return n(e,0)},isAsyncFn:M,isThenable:e=>e&&(h(e)||p(e))&&p(e.then)&&p(e.catch),setImmediate:U,asap:H};function W(e,t,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r,this.status=r.status?r.status:null)}q.inherits(W,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:q.toJSONObject(this.config),code:this.code,status:this.status}}});const G=W.prototype,V={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{V[e]={value:e}})),Object.defineProperties(W,V),Object.defineProperty(G,"isAxiosError",{value:!0}),W.from=(e,t,n,o,r,i)=>{const s=Object.create(G);return q.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),W.call(s,e.message,t,n,o,r),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Y=W;function J(e){return q.isPlainObject(e)||q.isArray(e)}function K(e){return q.endsWith(e,"[]")?e.slice(0,-2):e}function X(e,t,n){return e?e.concat(t).map((function(e,t){return e=K(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const $=q.toFlatObject(q,{},null,(function(e){return/^is[A-Z]/.test(e)})),Z=function(e,t,n){if(!q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const o=(n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!q.isUndefined(t[e])}))).metaTokens,r=n.visitor||c,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&q.isSpecCompliantForm(t);if(!q.isFunction(r))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(q.isDate(e))return e.toISOString();if(!a&&q.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(e)||q.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,r){let a=e;if(e&&!r&&"object"==typeof e)if(q.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=JSON.stringify(e);else if(q.isArray(e)&&function(e){return q.isArray(e)&&!e.some(J)}(e)||(q.isFileList(e)||q.endsWith(n,"[]"))&&(a=q.toArray(e)))return n=K(n),a.forEach((function(e,o){!q.isUndefined(e)&&null!==e&&t.append(!0===s?X([n],o,i):null===s?n:n+"[]",l(e))})),!1;return!!J(e)||(t.append(X(r,n,i),l(e)),!1)}const u=[],d=Object.assign($,{defaultVisitor:c,convertValue:l,isVisitable:J});if(!q.isObject(e))throw new TypeError("data must be an object");return function e(n,o){if(!q.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+o.join("."));u.push(n),q.forEach(n,(function(n,i){!0===(!(q.isUndefined(n)||null===n)&&r.call(t,n,q.isString(i)?i.trim():i,o,d))&&e(n,o?o.concat(i):[i])})),u.pop()}}(e),t};function Q(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ee(e,t){this._pairs=[],e&&Z(e,this,t)}const te=ee.prototype;te.append=function(e,t){this._pairs.push([e,t])},te.toString=function(e){const t=e?function(t){return e.call(this,t,Q)}:Q;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ne=ee;function oe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function re(e,t,n){if(!t)return e;const o=n&&n.encode||oe;q.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let i;if(i=r?r(t,n):q.isURLSearchParams(t)?t.toString():new ne(t,n).toString(o),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const ie=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){q.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},se={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ae={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ne,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},le="undefined"!=typeof window&&"undefined"!=typeof document,ce="object"==typeof navigator&&navigator||void 0,ue=le&&(!ce||["ReactNative","NativeScript","NS"].indexOf(ce.product)<0),de="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,fe=le&&window.location.href||"http://localhost",pe={...t,...ae},me=function(e){function t(e,n,o,r){let i=e[r++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=r>=e.length;return i=!i&&q.isArray(o)?o.length:i,a?(q.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!s):(o[i]&&q.isObject(o[i])||(o[i]=[]),t(e,n,o[i],r)&&q.isArray(o[i])&&(o[i]=function(e){const t={},n=Object.keys(e);let o;const r=n.length;let i;for(o=0;o{t(function(e){return q.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),o,n,0)})),n}return null},he={transitional:se,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",o=n.indexOf("application/json")>-1,r=q.isObject(e);if(r&&q.isHTMLForm(e)&&(e=new FormData(e)),q.isFormData(e))return o?JSON.stringify(me(e)):e;if(q.isArrayBuffer(e)||q.isBuffer(e)||q.isStream(e)||q.isFile(e)||q.isBlob(e)||q.isReadableStream(e))return e;if(q.isArrayBufferView(e))return e.buffer;if(q.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Z(e,new pe.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,o){return pe.isNode&&q.isBuffer(e)?(this.append(t,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=q.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Z(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||o?(t.setContentType("application/json",!1),function(e){if(q.isString(e))try{return(0,JSON.parse)(e),q.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||he.transitional,n=t&&t.forcedJSONParsing,o="json"===this.responseType;if(q.isResponse(e)||q.isReadableStream(e))return e;if(e&&q.isString(e)&&(n&&!this.responseType||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Y.from(e,Y.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pe.classes.FormData,Blob:pe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],(e=>{he.headers[e]={}}));const ge=he,ye=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),be=Symbol("internals");function we(e){return e&&String(e).trim().toLowerCase()}function Ee(e){return!1===e||null==e?e:q.isArray(e)?e.map(Ee):String(e)}function Te(e,t,n,o,r){return q.isFunction(o)?o.call(this,t,n):(r&&(t=n),q.isString(t)?q.isString(o)?-1!==t.indexOf(o):q.isRegExp(o)?o.test(t):void 0:void 0)}class Se{constructor(e){e&&this.set(e)}set(e,t,n){const o=this;function r(e,t,n){const r=we(t);if(!r)throw new Error("header name must be a non-empty string");const i=q.findKey(o,r);(!i||void 0===o[i]||!0===n||void 0===n&&!1!==o[i])&&(o[i||t]=Ee(e))}const i=(e,t)=>q.forEach(e,((e,n)=>r(e,n,t)));if(q.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(q.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,o,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),o=e.substring(r+1).trim(),!n||t[n]&&ye[n]||("set-cookie"===n?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)})),t})(e),t);else if(q.isHeaders(e))for(const[t,o]of e.entries())r(o,t,n);else null!=e&&r(t,e,n);return this}get(e,t){if(e=we(e)){const n=q.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}(e);if(q.isFunction(t))return t.call(this,e,n);if(q.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=we(e)){const n=q.findKey(this,e);return!(!n||void 0===this[n]||t&&!Te(0,this[n],n,t))}return!1}delete(e,t){const n=this;let o=!1;function r(e){if(e=we(e)){const r=q.findKey(n,e);!r||t&&!Te(0,n[r],r,t)||(delete n[r],o=!0)}}return q.isArray(e)?e.forEach(r):r(e),o}clear(e){const t=Object.keys(this);let n=t.length,o=!1;for(;n--;){const r=t[n];e&&!Te(0,this[r],r,e,!0)||(delete this[r],o=!0)}return o}normalize(e){const t=this,n={};return q.forEach(this,((o,r)=>{const i=q.findKey(n,r);if(i)return t[i]=Ee(o),void delete t[r];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(r):String(r).trim();s!==r&&delete t[r],t[s]=Ee(o),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return q.forEach(this,((n,o)=>{null!=n&&!1!==n&&(t[o]=e&&q.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[be]=this[be]={accessors:{}}).accessors,n=this.prototype;function o(e){const o=we(e);t[o]||(function(e,t){const n=q.toCamelCase(" "+t);["get","set","has"].forEach((o=>{Object.defineProperty(e,o+n,{value:function(e,n,r){return this[o].call(this,t,e,n,r)},configurable:!0})}))}(n,e),t[o]=!0)}return q.isArray(e)?e.forEach(o):o(e),this}}Se.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),q.reduceDescriptors(Se.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),q.freezeMethods(Se);const Ae=Se;function Re(e,t){const n=this||ge,o=t||n,r=Ae.from(o.headers);let i=o.data;return q.forEach(e,(function(e){i=e.call(n,i,r.normalize(),t?t.status:void 0)})),r.normalize(),i}function Oe(e){return!(!e||!e.__CANCEL__)}function _e(e,t,n){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,n),this.name="CanceledError"}q.inherits(_e,Y,{__CANCEL__:!0});const ve=_e;function xe(e,t,n){const o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Ne=(e,t,n=3)=>{let o=0;const r=function(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=o[s];r||(r=l),n[i]=a,o[i]=l;let u=s,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),l-r{r=i,n=null,o&&(clearTimeout(o),o=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-r;a>=i?s(e,t):(n=e,o||(o=setTimeout((()=>{o=null,s(n)}),i-a)))},()=>n&&s(n)]}((n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=i-o,l=r(a);o=i,e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&i<=s?(s-i)/l:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),n)},Ce=(e,t)=>{const n=null!=e;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},De=e=>(...t)=>q.asap((()=>e(...t))),ke=pe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,pe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(pe.origin),pe.navigator&&/(msie|trident)/i.test(pe.navigator.userAgent)):()=>!0,Le=pe.hasStandardBrowserEnv?{write(e,t,n,o,r,i){const s=[e+"="+encodeURIComponent(t)];q.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),q.isString(o)&&s.push("path="+o),q.isString(r)&&s.push("domain="+r),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Pe(e,t,n){let o=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(o||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const je=e=>e instanceof Ae?{...e}:e;function Me(e,t){t=t||{};const n={};function o(e,t,n,o){return q.isPlainObject(e)&&q.isPlainObject(t)?q.merge.call({caseless:o},e,t):q.isPlainObject(t)?q.merge({},t):q.isArray(t)?t.slice():t}function r(e,t,n,r){return q.isUndefined(t)?q.isUndefined(e)?void 0:o(void 0,e,0,r):o(e,t,0,r)}function i(e,t){if(!q.isUndefined(t))return o(void 0,t)}function s(e,t){return q.isUndefined(t)?q.isUndefined(e)?void 0:o(void 0,e):o(void 0,t)}function a(n,r,i){return i in t?o(n,r):i in e?o(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,n)=>r(je(e),je(t),0,!0)};return q.forEach(Object.keys(Object.assign({},e,t)),(function(o){const i=l[o]||r,s=i(e[o],t[o],o);q.isUndefined(s)&&i!==a||(n[o]=s)})),n}const Ue=e=>{const t=Me({},e);let n,{data:o,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:l}=t;if(t.headers=a=Ae.from(a),t.url=re(Pe(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),q.isFormData(o))if(pe.hasStandardBrowserEnv||pe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(pe.hasStandardBrowserEnv&&(r&&q.isFunction(r)&&(r=r(t)),r||!1!==r&&ke(t.url))){const e=i&&s&&Le.read(s);e&&a.set(i,e)}return t},ze="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const o=Ue(e);let r=o.data;const i=Ae.from(o.headers).normalize();let s,a,l,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=o;function m(){c&&c(),u&&u(),o.cancelToken&&o.cancelToken.unsubscribe(s),o.signal&&o.signal.removeEventListener("abort",s)}let h=new XMLHttpRequest;function g(){if(!h)return;const o=Ae.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders());xe((function(e){t(e),m()}),(function(e){n(e),m()}),{data:d&&"text"!==d&&"json"!==d?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:o,config:e,request:h}),h=null}h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout,"onloadend"in h?h.onloadend=g:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(g)},h.onabort=function(){h&&(n(new Y("Request aborted",Y.ECONNABORTED,e,h)),h=null)},h.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const r=o.transitional||se;o.timeoutErrorMessage&&(t=o.timeoutErrorMessage),n(new Y(t,r.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,h)),h=null},void 0===r&&i.setContentType(null),"setRequestHeader"in h&&q.forEach(i.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),q.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),d&&"json"!==d&&(h.responseType=o.responseType),p&&([l,u]=Ne(p,!0),h.addEventListener("progress",l)),f&&h.upload&&([a,c]=Ne(f),h.upload.addEventListener("progress",a),h.upload.addEventListener("loadend",c)),(o.cancelToken||o.signal)&&(s=t=>{h&&(n(!t||t.type?new ve(null,e,h):t),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(s),o.signal&&(o.signal.aborted?s():o.signal.addEventListener("abort",s)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(o.url);y&&-1===pe.protocols.indexOf(y)?n(new Y("Unsupported protocol "+y+":",Y.ERR_BAD_REQUEST,e)):h.send(r||null)}))},Ie=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,o=new AbortController;const r=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;o.abort(t instanceof Y?t:new ve(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,r(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))}),t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)})),e=null)};e.forEach((e=>e.addEventListener("abort",r)));const{signal:a}=o;return a.unsubscribe=()=>q.asap(s),a}},Fe=function*(e,t){let n=e.byteLength;if(!t||n{const r=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*Fe(n,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,o&&o(e))};return new ReadableStream({async pull(e){try{const{done:t,value:o}=await r.next();if(t)return a(),void e.close();let i=o.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(o))}catch(e){throw a(e),e}},cancel:e=>(a(e),r.return())},{highWaterMark:2})},He="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,qe=He&&"function"==typeof ReadableStream,We=He&&("function"==typeof TextEncoder?(Ge=new TextEncoder,e=>Ge.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Ge;const Ve=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Ye=qe&&Ve((()=>{let e=!1;const t=new Request(pe.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),Je=qe&&Ve((()=>q.isReadableStream(new Response("").body))),Ke={stream:Je&&(e=>e.body)};var Xe;He&&(Xe=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Ke[e]&&(Ke[e]=q.isFunction(Xe[e])?t=>t[e]():(t,n)=>{throw new Y(`Response type '${e}' is not supported`,Y.ERR_NOT_SUPPORT,n)})})));const $e={http:null,xhr:ze,fetch:He&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Ue(e);c=c?(c+"").toLowerCase():"text";let p,m=Ie([r,i&&i.toAbortSignal()],s);const h=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let g;try{if(l&&Ye&&"get"!==n&&"head"!==n&&0!==(g=await(async(e,t)=>{const n=q.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(q.isBlob(e))return e.size;if(q.isSpecCompliantForm(e)){const t=new Request(pe.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return q.isArrayBufferView(e)||q.isArrayBuffer(e)?e.byteLength:(q.isURLSearchParams(e)&&(e+=""),q.isString(e)?(await We(e)).byteLength:void 0)})(t):n})(u,o))){let e,n=new Request(t,{method:"POST",body:o,duplex:"half"});if(q.isFormData(o)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Ce(g,Ne(De(l)));o=Be(n.body,65536,e,t)}}q.isString(d)||(d=d?"include":"omit");const r="credentials"in Request.prototype;p=new Request(t,{...f,signal:m,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:o,duplex:"half",credentials:r?d:void 0});let i=await fetch(p);const s=Je&&("stream"===c||"response"===c);if(Je&&(a||s&&h)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=q.toFiniteNumber(i.headers.get("content-length")),[n,o]=a&&Ce(t,Ne(De(a),!0))||[];i=new Response(Be(i.body,65536,n,(()=>{o&&o(),h&&h()})),e)}c=c||"text";let y=await Ke[q.findKey(Ke,c)||"text"](i,e);return!s&&h&&h(),await new Promise(((t,n)=>{xe(t,n,{data:y,headers:Ae.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})}))}catch(t){if(h&&h(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new Y("Network Error",Y.ERR_NETWORK,e,p),{cause:t.cause||t});throw Y.from(t,t&&t.code,e,p)}})};q.forEach($e,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ze=e=>`- ${e}`,Qe=e=>q.isFunction(e)||null===e||!1===e,et=e=>{e=q.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Ze).join("\n"):" "+Ze(e[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return o};function tt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ve(null,e)}function nt(e){return tt(e),e.headers=Ae.from(e.headers),e.data=Re.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),et(e.adapter||ge.adapter)(e).then((function(t){return tt(e),t.data=Re.call(e,e.transformResponse,t),t.headers=Ae.from(t.headers),t}),(function(t){return Oe(t)||(tt(e),t&&t.response&&(t.response.data=Re.call(e,e.transformResponse,t.response),t.response.headers=Ae.from(t.response.headers))),Promise.reject(t)}))}const ot={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ot[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const rt={};ot.transitional=function(e,t,n){function o(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,i)=>{if(!1===e)throw new Y(o(r," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!rt[r]&&(rt[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,i)}},ot.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const it={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const i=o[r],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new Y("option "+i+" must be "+n,Y.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}},validators:ot},st=it.validators;class at{constructor(e){this.defaults=e,this.interceptors={request:new ie,response:new ie}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Me(this.defaults,t);const{transitional:n,paramsSerializer:o,headers:r}=t;void 0!==n&&it.assertOptions(n,{silentJSONParsing:st.transitional(st.boolean),forcedJSONParsing:st.transitional(st.boolean),clarifyTimeoutError:st.transitional(st.boolean)},!1),null!=o&&(q.isFunction(o)?t.paramsSerializer={serialize:o}:it.assertOptions(o,{encode:st.function,serialize:st.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),it.assertOptions(t,{baseUrl:st.spelling("baseURL"),withXsrfToken:st.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=r&&q.merge(r.common,r[t.method]);r&&q.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete r[e]})),t.headers=Ae.concat(i,r);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!a){const e=[nt.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const o=new Promise((e=>{n.subscribe(e),t=e})).then(e);return o.cancel=function(){n.unsubscribe(t)},o},e((function(e,o,r){n.reason||(n.reason=new ve(e,o,r),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ct((function(t){e=t})),cancel:e}}}const ut=ct,dt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(dt).forEach((([e,t])=>{dt[t]=e}));const ft=dt,pt=function e(t){const o=new lt(t),r=n(lt.prototype.request,o);return q.extend(r,lt.prototype,o,{allOwnKeys:!0}),q.extend(r,o,null,{allOwnKeys:!0}),r.create=function(n){return e(Me(t,n))},r}(ge);pt.Axios=lt,pt.CanceledError=ve,pt.CancelToken=ut,pt.isCancel=Oe,pt.VERSION="1.8.4",pt.toFormData=Z,pt.AxiosError=Y,pt.Cancel=pt.CanceledError,pt.all=function(e){return Promise.all(e)},pt.spread=function(e){return function(t){return e.apply(null,t)}},pt.isAxiosError=function(e){return q.isObject(e)&&!0===e.isAxiosError},pt.mergeConfig=Me,pt.AxiosHeaders=Ae,pt.formToJSON=e=>me(q.isHTMLForm(e)?new FormData(e):e),pt.getAdapter=et,pt.HttpStatusCode=ft,pt.default=pt;const mt=pt,ht=window.wp.element,{entries:gt,setPrototypeOf:yt,isFrozen:bt,getPrototypeOf:wt,getOwnPropertyDescriptor:Et}=Object;let{freeze:Tt,seal:St,create:At}=Object,{apply:Rt,construct:Ot}="undefined"!=typeof Reflect&&Reflect;Tt||(Tt=function(e){return e}),St||(St=function(e){return e}),Rt||(Rt=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r1?t-1:0),o=1;o1?n-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:Dt;yt&&yt(e,null);let o=t.length;for(;o--;){let r=t[o];if("string"==typeof r){const e=n(r);e!==r&&(bt(t)||(t[o]=e),r=e)}e[r]=!0}return e}function qt(e){for(let t=0;t/gm),sn=St(/\$\{[\w\W]*/gm),an=St(/^data-[\-\w.\u00B7-\uFFFF]+$/),ln=St(/^aria-[\-\w]+$/),cn=St(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),un=St(/^(?:\w+script|data):/i),dn=St(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fn=St(/^html$/i),pn=St(/^[a-z][.\w]*(-[.\w]+)+$/i);var mn=Object.freeze({__proto__:null,ARIA_ATTR:ln,ATTR_WHITESPACE:dn,CUSTOM_ELEMENT:pn,DATA_ATTR:an,DOCTYPE_NAME:fn,ERB_EXPR:rn,IS_ALLOWED_URI:cn,IS_SCRIPT_OR_DATA:un,MUSTACHE_EXPR:on,TMPLIT_EXPR:sn});const hn=function(){return"undefined"==typeof window?null:window};var gn=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hn();const n=t=>e(t);if(n.version="3.3.3",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:o}=t;const r=o,i=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:l,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:m}=t,h=c.prototype,g=Gt(h,"cloneNode"),y=Gt(h,"remove"),b=Gt(h,"nextSibling"),w=Gt(h,"childNodes"),E=Gt(h,"parentNode");if("function"==typeof a){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let T,S="";const{implementation:A,createNodeIterator:R,createDocumentFragment:O,getElementsByTagName:_}=o,{importNode:v}=r;let x={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof gt&&"function"==typeof E&&A&&void 0!==A.createHTMLDocument;const{MUSTACHE_EXPR:N,ERB_EXPR:C,TMPLIT_EXPR:D,DATA_ATTR:k,ARIA_ATTR:L,IS_SCRIPT_OR_DATA:P,ATTR_WHITESPACE:j,CUSTOM_ELEMENT:M}=mn;let{IS_ALLOWED_URI:U}=mn,z=null;const I=Ht({},[...Vt,...Yt,...Jt,...Xt,...Zt]);let F=null;const B=Ht({},[...Qt,...en,...tn,...nn]);let H=Object.seal(At(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,W=null;const G=Object.seal(At(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let V=!0,Y=!0,J=!1,K=!0,X=!1,$=!0,Z=!1,Q=!1,ee=!1,te=!1,ne=!1,oe=!1,re=!0,ie=!1,se=!0,ae=!1,le={},ce=null;const ue=Ht({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let de=null;const fe=Ht({},["audio","video","img","source","image","track"]);let pe=null;const me=Ht({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),he="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let be=ye,we=!1,Ee=null;const Te=Ht({},[he,ge,ye],kt);let Se=Ht({},["mi","mo","mn","ms","mtext"]),Ae=Ht({},["annotation-xml"]);const Re=Ht({},["title","style","font","a","script"]);let Oe=null;const _e=["application/xhtml+xml","text/html"];let ve=null,xe=null;const Ne=o.createElement("form"),Ce=function(e){return e instanceof RegExp||e instanceof Function},De=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!xe||xe!==e){if(e&&"object"==typeof e||(e={}),e=Wt(e),Oe=-1===_e.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ve="application/xhtml+xml"===Oe?kt:Dt,z=Ut(e,"ALLOWED_TAGS")?Ht({},e.ALLOWED_TAGS,ve):I,F=Ut(e,"ALLOWED_ATTR")?Ht({},e.ALLOWED_ATTR,ve):B,Ee=Ut(e,"ALLOWED_NAMESPACES")?Ht({},e.ALLOWED_NAMESPACES,kt):Te,pe=Ut(e,"ADD_URI_SAFE_ATTR")?Ht(Wt(me),e.ADD_URI_SAFE_ATTR,ve):me,de=Ut(e,"ADD_DATA_URI_TAGS")?Ht(Wt(fe),e.ADD_DATA_URI_TAGS,ve):fe,ce=Ut(e,"FORBID_CONTENTS")?Ht({},e.FORBID_CONTENTS,ve):ue,q=Ut(e,"FORBID_TAGS")?Ht({},e.FORBID_TAGS,ve):Wt({}),W=Ut(e,"FORBID_ATTR")?Ht({},e.FORBID_ATTR,ve):Wt({}),le=!!Ut(e,"USE_PROFILES")&&e.USE_PROFILES,V=!1!==e.ALLOW_ARIA_ATTR,Y=!1!==e.ALLOW_DATA_ATTR,J=e.ALLOW_UNKNOWN_PROTOCOLS||!1,K=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,X=e.SAFE_FOR_TEMPLATES||!1,$=!1!==e.SAFE_FOR_XML,Z=e.WHOLE_DOCUMENT||!1,te=e.RETURN_DOM||!1,ne=e.RETURN_DOM_FRAGMENT||!1,oe=e.RETURN_TRUSTED_TYPE||!1,ee=e.FORCE_BODY||!1,re=!1!==e.SANITIZE_DOM,ie=e.SANITIZE_NAMED_PROPS||!1,se=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,U=e.ALLOWED_URI_REGEXP||cn,be=e.NAMESPACE||ye,Se=e.MATHML_TEXT_INTEGRATION_POINTS||Se,Ae=e.HTML_INTEGRATION_POINTS||Ae,H=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ce(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(H.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(Y=!1),ne&&(te=!0),le&&(z=Ht({},Zt),F=At(null),!0===le.html&&(Ht(z,Vt),Ht(F,Qt)),!0===le.svg&&(Ht(z,Yt),Ht(F,en),Ht(F,nn)),!0===le.svgFilters&&(Ht(z,Jt),Ht(F,en),Ht(F,nn)),!0===le.mathMl&&(Ht(z,Xt),Ht(F,tn),Ht(F,nn))),Ut(e,"ADD_TAGS")||(G.tagCheck=null),Ut(e,"ADD_ATTR")||(G.attributeCheck=null),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?G.tagCheck=e.ADD_TAGS:(z===I&&(z=Wt(z)),Ht(z,e.ADD_TAGS,ve))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?G.attributeCheck=e.ADD_ATTR:(F===B&&(F=Wt(F)),Ht(F,e.ADD_ATTR,ve))),e.ADD_URI_SAFE_ATTR&&Ht(pe,e.ADD_URI_SAFE_ATTR,ve),e.FORBID_CONTENTS&&(ce===ue&&(ce=Wt(ce)),Ht(ce,e.FORBID_CONTENTS,ve)),e.ADD_FORBID_CONTENTS&&(ce===ue&&(ce=Wt(ce)),Ht(ce,e.ADD_FORBID_CONTENTS,ve)),se&&(z["#text"]=!0),Z&&Ht(z,["html","head","body"]),z.table&&(Ht(z,["tbody"]),delete q.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw It('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=e.TRUSTED_TYPES_POLICY,S=T.createHTML("")}else void 0===T&&(T=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(m,i)),null!==T&&"string"==typeof S&&(S=T.createHTML(""));Tt&&Tt(e),xe=e}},ke=Ht({},[...Yt,...Jt,...Kt]),Le=Ht({},[...Xt,...$t]),Pe=function(e){Nt(n.removed,{element:e});try{E(e).removeChild(e)}catch(t){y(e)}},je=function(e,t){try{Nt(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Nt(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(te||ne)try{Pe(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Me=function(e){let t=null,n=null;if(ee)e=""+e;else{const t=Lt(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Oe&&be===ye&&(e=''+e+"");const r=T?T.createHTML(e):e;if(be===ye)try{t=(new p).parseFromString(r,Oe)}catch(e){}if(!t||!t.documentElement){t=A.createDocument(be,"template",null);try{t.documentElement.innerHTML=we?S:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),be===ye?_.call(t,Z?"html":"body")[0]:Z?t.documentElement:i},Ue=function(e){return R.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},ze=function(e){return e instanceof f&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Ie=function(e){return"function"==typeof l&&e instanceof l};function Fe(e,t,o){_t(e,(e=>{e.call(n,t,o,xe)}))}const Be=function(e){let t=null;if(Fe(x.beforeSanitizeElements,e,null),ze(e))return Pe(e),!0;const o=ve(e.nodeName);if(Fe(x.uponSanitizeElement,e,{tagName:o,allowedTags:z}),$&&e.hasChildNodes()&&!Ie(e.firstElementChild)&&zt(/<[/\w!]/g,e.innerHTML)&&zt(/<[/\w!]/g,e.textContent))return Pe(e),!0;if(7===e.nodeType)return Pe(e),!0;if($&&8===e.nodeType&&zt(/<[/\w]/g,e.data))return Pe(e),!0;if(!(G.tagCheck instanceof Function&&G.tagCheck(o))&&(!z[o]||q[o])){if(!q[o]&&qe(o)){if(H.tagNameCheck instanceof RegExp&&zt(H.tagNameCheck,o))return!1;if(H.tagNameCheck instanceof Function&&H.tagNameCheck(o))return!1}if(se&&!ce[o]){const t=E(e)||e.parentNode,n=w(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=g(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,b(e))}}return Pe(e),!0}return e instanceof c&&!function(e){let t=E(e);t&&t.tagName||(t={namespaceURI:be,tagName:"template"});const n=Dt(e.tagName),o=Dt(t.tagName);return!!Ee[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===ye?"svg"===n:t.namespaceURI===he?"svg"===n&&("annotation-xml"===o||Se[o]):Boolean(ke[n]):e.namespaceURI===he?t.namespaceURI===ye?"math"===n:t.namespaceURI===ge?"math"===n&&Ae[o]:Boolean(Le[n]):e.namespaceURI===ye?!(t.namespaceURI===ge&&!Ae[o])&&!(t.namespaceURI===he&&!Se[o])&&!Le[n]&&(Re[n]||!ke[n]):!("application/xhtml+xml"!==Oe||!Ee[e.namespaceURI]))}(e)?(Pe(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!zt(/<\/no(script|embed|frames)/i,e.innerHTML)?(X&&3===e.nodeType&&(t=e.textContent,_t([N,C,D],(e=>{t=Pt(t,e," ")})),e.textContent!==t&&(Nt(n.removed,{element:e.cloneNode()}),e.textContent=t)),Fe(x.afterSanitizeElements,e,null),!1):(Pe(e),!0)},He=function(e,t,n){if(W[t])return!1;if(re&&("id"===t||"name"===t)&&(n in o||n in Ne))return!1;if(Y&&!W[t]&&zt(k,t));else if(V&&zt(L,t));else if(G.attributeCheck instanceof Function&&G.attributeCheck(t,e));else if(!F[t]||W[t]){if(!(qe(e)&&(H.tagNameCheck instanceof RegExp&&zt(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&zt(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t,e))||"is"===t&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&zt(H.tagNameCheck,n)||H.tagNameCheck instanceof Function&&H.tagNameCheck(n))))return!1}else if(pe[t]);else if(zt(U,Pt(n,j,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==jt(n,"data:")||!de[e])if(J&&!zt(P,Pt(n,j,"")));else if(n)return!1;return!0},qe=function(e){return"annotation-xml"!==e&&Lt(e,M)},We=function(e){Fe(x.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||ze(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:s,namespaceURI:a,value:l}=i,c=ve(s),u=l;let d="value"===s?u:Mt(u);if(o.attrName=c,o.attrValue=d,o.keepAttr=!0,o.forceKeepAttr=void 0,Fe(x.uponSanitizeAttribute,e,o),d=o.attrValue,!ie||"id"!==c&&"name"!==c||(je(s,e),d="user-content-"+d),$&&zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){je(s,e);continue}if("attributename"===c&&Lt(d,"href")){je(s,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){je(s,e);continue}if(!K&&zt(/\/>/i,d)){je(s,e);continue}X&&_t([N,C,D],(e=>{d=Pt(d,e," ")}));const f=ve(e.nodeName);if(He(f,c,d)){if(T&&"object"==typeof m&&"function"==typeof m.getAttributeType)if(a);else switch(m.getAttributeType(f,c)){case"TrustedHTML":d=T.createHTML(d);break;case"TrustedScriptURL":d=T.createScriptURL(d)}if(d!==u)try{a?e.setAttributeNS(a,s,d):e.setAttribute(s,d),ze(e)?Pe(e):xt(n.removed)}catch(t){je(s,e)}}else je(s,e)}Fe(x.afterSanitizeAttributes,e,null)},Ge=function e(t){let n=null;const o=Ue(t);for(Fe(x.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Fe(x.uponSanitizeShadowNode,n,null),Be(n),We(n),n.content instanceof s&&e(n.content);Fe(x.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,i=null,a=null,c=null;if(we=!e,we&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ie(e)){if("function"!=typeof e.toString)throw It("toString is not a function");if("string"!=typeof(e=e.toString()))throw It("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Q||De(t),n.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=ve(e.nodeName);if(!z[t]||q[t])throw It("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)o=Me("\x3c!----\x3e"),i=o.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?o=i:o.appendChild(i);else{if(!te&&!X&&!Z&&-1===e.indexOf("<"))return T&&oe?T.createHTML(e):e;if(o=Me(e),!o)return te?null:oe?S:""}o&&ee&&Pe(o.firstChild);const u=Ue(ae?e:o);for(;a=u.nextNode();)Be(a),We(a),a.content instanceof s&&Ge(a.content);if(ae)return e;if(te){if(ne)for(c=O.call(o.ownerDocument);o.firstChild;)c.appendChild(o.firstChild);else c=o;return(F.shadowroot||F.shadowrootmode)&&(c=v.call(r,c,!0)),c}let d=Z?o.outerHTML:o.innerHTML;return Z&&z["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&zt(fn,o.ownerDocument.doctype.name)&&(d="\n"+d),X&&_t([N,C,D],(e=>{d=Pt(d,e," ")})),T&&oe?T.createHTML(d):d},n.setConfig=function(){De(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Q=!0},n.clearConfig=function(){xe=null,Q=!1},n.isValidAttribute=function(e,t,n){xe||De({});const o=ve(e),r=ve(t);return He(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&Nt(x[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=vt(x[e],t);return-1===n?void 0:Ct(x[e],n,1)[0]}return xt(x[e])},n.removeHooks=function(e){x[e]=[]},n.removeAllHooks=function(){x={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();const yn=window.ReactJSXRuntime,bn=window.React,{__}=wp.i18n,{registerBlockType:wn}=wp.blocks,{InspectorControls:En,BlockControls:Tn,useBlockProps:Sn}=wp.blockEditor,{PanelBody:An,PanelRow:Rn,SelectControl:On,TextControl:vn,TextareaControl:xn,ToolbarButton:Nn,ToolbarGroup:Cn,Icon:Dn}=wp.components,kn=()=>(0,yn.jsx)(Dn,{icon:(0,yn.jsxs)("svg",{id:"uuid-098657ec-4091-4c5d-b2f8-761b37dc9655",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 22 19.26",children:[(0,yn.jsx)("path",{className:"uuid-fb9dd603-42c0-4281-8513-899f01887edf",d:"m13.54,4.47c-.06-.06-.15-.06-.21,0l-4.9,4.9.21.21,4.9-4.9c.06-.06.06-.16,0-.21h0Zm-4.48,3.19c-.06-.06-.15-.06-.21,0l-1.06,1.06.21.21,1.06-1.06c.06-.06.06-.15,0-.21ZM15.14,1.21c.46,0,.9.19,1.22.53.61.66.56,1.7-.08,2.34l-2.89,2.89c-.06.06-.06.15,0,.21.06.06.15.06.21,0l2.89-2.89c.76-.76.8-2.05.04-2.81-.38-.38-.88-.57-1.39-.57s-1,.19-1.39.57l-6.6,6.6.21.21L13.96,1.7c.31-.32.73-.49,1.17-.49h0Zm-5.64,3.46c-.06-.06-.15-.06-.21,0l-2.77,2.78.21.21,2.78-2.78c.06-.06.06-.15,0-.21h0Zm.74-.52l3.09-3.09c.48-.48,1.13-.75,1.81-.75.52,0,1.01.16,1.43.44.06.04.14.04.19-.02.07-.07.06-.18-.02-.23-.48-.33-1.04-.49-1.6-.49-.73,0-1.47.28-2.03.84l-3.09,3.1c-.06.06-.06.15,0,.21.06.06.16.06.21,0h0Zm2.63,3.56c-.06-.06-.15-.06-.21,0l-2.3,2.3c-.06.06-.06.15,0,.21h0c.06.06.15.06.21,0l2.3-2.3c.06-.06.06-.15,0-.21h0Zm3.46-2.39l-5.97,5.97.21.21,5.97-5.97c.06-.06.06-.15,0-.21-.06-.06-.16-.06-.22,0Zm1.2-4.03c-.05-.08-.17-.09-.23-.03-.05.05-.06.13-.02.19.28.42.43.91.43,1.42,0,.64-.23,1.24-.65,1.71-.06.06-.06.15,0,.21.06.06.16.06.22,0,.88-.98.97-2.43.25-3.5h0Zm-3.24,2.66l.93-.93c.06-.06.06-.15,0-.21-.06-.06-.15-.06-.21,0l-.93.93c-.06.06-.06.15,0,.21.06.06.16.06.21,0h0Zm1.59-1.84c-.2-.19-.47-.29-.73-.29s-.54.1-.75.31l-4.8,4.81c-.06.06-.06.15,0,.21.06.06.15.06.21,0l4.78-4.79c.12-.12.28-.21.46-.24.24-.03.47.05.63.21.14.14.22.33.22.53s-.08.39-.22.53l-6.6,6.6.21.21,6.57-6.57c.42-.42.44-1.13.01-1.54h0Z"}),(0,yn.jsxs)("g",{children:[(0,yn.jsx)("rect",{className:"uuid-fb9dd603-42c0-4281-8513-899f01887edf",x:"7.81",y:"5.93",width:"2.91",height:"5.64",transform:"translate(-3.47 9.11) rotate(-45)"}),(0,yn.jsx)("path",{className:"uuid-fb9dd603-42c0-4281-8513-899f01887edf",d:"m10.7,11.35l-4.62-4.62h0l-1.28-1.28c-.55-.55-1.27-.83-1.99-.83s-1.44.27-1.99.83c-1.1,1.1-1.1,2.89,0,3.99l3.54,3.54h0l1.6,1.6c.06.06.15.06.21,0,0,0,0,0,0,0s0,0,0,0l.36-.36.03.88s0,.04.01.06c0,.02.02.04.03.05.06.06.15.06.21,0h0s0-.01,0-.01l3.82-3.82h0s.04-.04.04-.04Z"}),(0,yn.jsx)("path",{className:"uuid-fb9dd603-42c0-4281-8513-899f01887edf",d:"m11.09,10.9l4.62-4.62h0l1.28-1.28c.55-.55.83-1.27.83-1.99s-.27-1.44-.83-1.99c-1.1-1.1-2.89-1.1-3.99,0l-3.54,3.54h0l-1.6,1.6c-.06.06-.06.15,0,.21,0,0,0,0,0,0s0,0,0,0l.36.36-.88.03s-.04,0-.06.01c-.02,0-.04.02-.05.03-.06.06-.06.15,0,.21h0s0,.01,0,.01l3.82,3.82h0s.04.04.04.04Z"})]})]})});wn("complianz/document",{apiVersion:3,title:__("Legal document - Complianz","complianz-gdpr"),icon:kn,category:"widgets",example:{attributes:{preview:!0}},keywords:[__("Privacy Statement","complianz-gdpr"),__("Cookie Policy","complianz-gdpr"),__("Disclaimer","complianz-gdpr")],attributes:{documentSyncStatus:{type:"string",default:"sync"},customDocument:{type:"string",default:""},hasDocuments:{type:"string",default:"false"},content:{type:"string",source:"html",selector:"p"},selectedDocument:{type:"string",default:""},documents:{type:"array"},document:{type:"array"},preview:{type:"boolean",default:!1}},edit:({className:e,isSelected:t,attributes:n,setAttributes:o})=>{const[r,i]=(0,ht.useState)([]),[s,a]=(0,ht.useState)(!1),[l,c]=(0,ht.useState)(n.selectedDocument),[u,d]=(0,ht.useState)(n.documentSyncStatus),[f,p]=(0,ht.useState)("");(0,ht.useEffect)((()=>{mt.get(complianz.site_url+"complianz/v1/documents").then((e=>{let t=e.data;i(t),a(!0);let r=!1;t&&0!==l&&(r=t.find((e=>e.id===l)),0===t.length&&o({hasDocuments:!1}));let s="";r&&(s=r.content),n.customDocument&&n.customDocument.length>0&&(s=n.customDocument),p(s)}))}),[]);const m=e=>{c(e),o({selectedDocument:e})},h=e=>{d(e),o({documentSyncStatus:e});const t=r.find((e=>e.id===l));p(t.content),o({customDocument:t.content})};let g=[{value:0,label:__("Select a document","complianz-gdpr")}],y=__("Loading...","complianz-gdpr"),b=[{value:"sync",label:__("Synchronize document with Complianz","complianz-gdpr")},{value:"unlink",label:__("Edit document and stop synchronization","complianz-gdpr")}];if(n.hasDocuments||(y=__("No documents found. Please finish the Complianz Privacy Suite wizard to generate documents","complianz-gdpr")),n.preview)return(0,yn.jsx)("img",{alt:"preview",src:complianz.cmplz_preview});if(s&&(y=__(t?"Select a document type from the dropdownlist":"Click this block to show the options","complianz-gdpr"),r.forEach((e=>{g.push({value:e.id,label:e.title})}))),0!==n.selectedDocument&&s&&n.selectedDocument.length>0){const e=r.find((e=>e.id===n.selectedDocument));e&&(y=e.content)}if("sync"===u)return[!!t&&(0,yn.jsx)(En,{children:(0,yn.jsxs)(An,{title:__("Document settings","complianz-gdpr"),initialOpen:!0,children:[(0,yn.jsx)(Rn,{children:(0,yn.jsx)(On,{onChange:e=>m(e),value:l,label:__("Select a document","complianz-gdpr"),options:g,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})},"1"),(0,yn.jsx)(Rn,{children:(0,yn.jsx)(On,{onChange:e=>h(e),value:u,label:__("Document sync status","complianz-gdpr"),options:b,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})},"2")]})},"inspector-document"),(0,yn.jsx)("div",{className:e,dangerouslySetInnerHTML:{__html:gn.sanitize(y)}},n.selectedDocument)];{s||__("Loading...","complianz-gdpr");let r=e+" cmplz-unlinked-mode";return[!!t&&(0,yn.jsx)(En,{children:(0,yn.jsxs)(An,{title:__("Document settings","complianz-gdpr"),initialOpen:!0,children:[(0,yn.jsx)(Rn,{children:(0,yn.jsx)(On,{onChange:e=>m(e),value:n.selectedDocument,label:__("Select a document","complianz-gdpr"),options:g,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})}),(0,yn.jsx)(Rn,{children:(0,yn.jsx)(On,{onChange:e=>h(e),value:u,label:__("Document sync status","complianz-gdpr"),options:b,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})})]})},"inspector-document-settings"),(0,yn.jsx)("div",{contentEditable:!0,onInput:e=>(e=>{o({customDocument:e})})(e.currentTarget.innerHTML),dangerouslySetInnerHTML:{__html:gn.sanitize(f)},className:r})]}},save:function(){return null}}),wn("complianz/consent-area",{apiVersion:3,title:__("Consent Area Block"),icon:kn,category:"widgets",example:{attributes:{preview:!0}},attributes:{category:{type:"string",default:"marketing"},service:{type:"service",default:"general"},blockId:{type:"string",default:""},postId:{type:"integer",default:-1},placeholderContent:{type:"string",default:""},consentedContent:{type:"string",default:""}},edit:e=>{const{getCurrentPostId:t}=wp.data.select("core/editor"),n=t(),{attributes:o,setAttributes:r,isSelected:i,className:s}=e,[a,l]=(0,ht.useState)("consented"),[c,u]=(0,ht.useState)(!1);(0,ht.useEffect)((()=>{if(r({postId:n,category:o.category,service:o.service}),""===o.blockId){let e=(Math.random()+1).toString(36).substring(7);r({blockId:e})}}),[o]);const d=Sn();let f=!complianz.user_can_unfiltered_html;return[!!i&&(0,yn.jsx)(En,{children:(0,yn.jsxs)(An,{title:__("Document settings","complianz-gdpr"),initialOpen:!0,children:[(0,yn.jsx)(Rn,{children:(0,yn.jsx)(On,{disabled:f,label:__("Category","complianz-gdpr"),value:o.category,options:[{label:__("Preferences","complianz-gdpr"),value:"preferences"},{label:__("Statistics","complianz-gdpr"),value:"statistics"},{label:__("Marketing","complianz-gdpr"),value:"marketing"}],onChange:e=>r({category:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})},"1"),(0,yn.jsx)(Rn,{children:(0,yn.jsx)(vn,{disabled:f,label:__("Service","complianz-gdpr"),value:o.service,onChange:e=>r({service:e})})},"2"),(0,yn.jsx)(Rn,{children:(0,yn.jsx)(On,{disabled:f,label:__("View"),value:a,options:[{label:__("Placeholder","complianz-gdpr"),value:"placeholder"},{label:__("Default","complianz-gdpr"),value:"consented"}],onChange:e=>(e=>{l(e)})(e),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})},"3")]})},"inspector-document-settings"),(0,bn.createElement)("div",{...d,key:"cmplz-consent-area"},(0,yn.jsx)(Tn,{children:(0,yn.jsxs)(Cn,{children:[(0,yn.jsx)(Nn,{className:"components-tab-button",isPressed:!c,onClick:()=>u(!1),children:"HTML"}),(0,yn.jsx)(Nn,{className:"components-tab-button",isPressed:c,onClick:()=>u(!0),children:__("Preview")})]})}),f&&(0,yn.jsx)("div",{children:__("You do not have sufficient permissions to edit this block.","complianz-gdpr")}),!c&&(0,yn.jsxs)(yn.Fragment,{children:["placeholder"===a&&(0,yn.jsx)(xn,{disabled:f,placeholder:__("You can add custom HTML to create your own placeholder. This placeholder is visible before consent.","complianz-gdpr"),className:s,value:o.placeholderContent,onChange:e=>r({placeholderContent:e})},"1"),"consented"===a&&(0,yn.jsx)(xn,{disabled:f,placeholder:__("You can add custom HTML that requires consent. In the right-side bar you will find the options for this custom block. For instructions, please go to complianz.io/gutenberg for more information.","complianz-gdpr"),className:s,value:o.consentedContent,onChange:e=>r({consentedContent:e})},"2")]}),!!c&&(0,yn.jsxs)(yn.Fragment,{children:["placeholder"===a&&(0,yn.jsx)("div",{children:(0,yn.jsx)("div",{dangerouslySetInnerHTML:{__html:gn.sanitize(o.placeholderContent)}})}),"consented"===a&&(0,yn.jsx)("div",{children:(0,yn.jsx)("div",{dangerouslySetInnerHTML:{__html:gn.sanitize(o.consentedContent)}})})]}))]},save:function(){return null}})})();