@apolitical/component-library 1.8.0-beta.3 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +17 -17
  2. package/index.mjs +468 -472
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -21,17 +21,17 @@
21
21
  *
22
22
  * This source code is licensed under the MIT license found in the
23
23
  * LICENSE file in the root directory of this source tree.
24
- */var wc;function ay(){return wc||(wc=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,l=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function E(ne){return typeof ne=="string"||typeof ne=="function"||ne===n||ne===f||ne===o||ne===i||ne===h||ne===d||typeof ne=="object"&&ne!==null&&(ne.$$typeof===p||ne.$$typeof===l||ne.$$typeof===s||ne.$$typeof===a||ne.$$typeof===c||ne.$$typeof===b||ne.$$typeof===T||ne.$$typeof===_||ne.$$typeof===m)}function A(ne){if(typeof ne=="object"&&ne!==null){var Ye=ne.$$typeof;switch(Ye){case t:var je=ne.type;switch(je){case u:case f:case n:case o:case i:case h:return je;default:var wt=je&&je.$$typeof;switch(wt){case a:case c:case p:case l:case s:return wt;default:return Ye}}case r:return Ye}}}var w=u,N=f,F=a,B=s,G=t,W=c,z=n,$=p,Y=l,te=r,K=o,k=i,V=h,J=!1;function de(ne){return J||(J=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),X(ne)||A(ne)===u}function X(ne){return A(ne)===f}function Z(ne){return A(ne)===a}function re(ne){return A(ne)===s}function ue(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===t}function Fe(ne){return A(ne)===c}function Q(ne){return A(ne)===n}function oe(ne){return A(ne)===p}function Pe(ne){return A(ne)===l}function Ae(ne){return A(ne)===r}function ut(ne){return A(ne)===o}function ft(ne){return A(ne)===i}function bt(ne){return A(ne)===h}Re.AsyncMode=w,Re.ConcurrentMode=N,Re.ContextConsumer=F,Re.ContextProvider=B,Re.Element=G,Re.ForwardRef=W,Re.Fragment=z,Re.Lazy=$,Re.Memo=Y,Re.Portal=te,Re.Profiler=K,Re.StrictMode=k,Re.Suspense=V,Re.isAsyncMode=de,Re.isConcurrentMode=X,Re.isContextConsumer=Z,Re.isContextProvider=re,Re.isElement=ue,Re.isForwardRef=Fe,Re.isFragment=Q,Re.isLazy=oe,Re.isMemo=Pe,Re.isPortal=Ae,Re.isProfiler=ut,Re.isStrictMode=ft,Re.isSuspense=bt,Re.isValidElementType=E,Re.typeOf=A}()),Re}process.env.NODE_ENV==="production"?nu.exports=oy():nu.exports=ay();var sy=nu.exports,zd=sy,uy={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},cy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Yd={};Yd[zd.ForwardRef]=uy;Yd[zd.Memo]=cy;function ly(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function Kd(e){const t=U.useContext(ny);if(!t)throw new Error("Missing <CookiesProvider>");const[r,n]=U.useState(()=>t.getAll());ly()&&U.useLayoutEffect(()=>{function a(){const u=t.getAll({doNotUpdate:!0});fy(e||null,u,r)&&n(u)}return t.addChangeListener(a),()=>{t.removeChangeListener(a)}},[t,r]);const i=U.useMemo(()=>t.set.bind(t),[t]),o=U.useMemo(()=>t.remove.bind(t),[t]),s=U.useMemo(()=>t.update.bind(t),[t]);return[r,i,o,s]}function fy(e,t,r){if(!e)return!0;for(let n of e)if(t[n]!==r[n])return!0;return!1}var Qd={exports:{}},ya={exports:{}},co={},lo={exports:{}},va,Sc;function Xd(){return Sc||(Sc=1,va=function(t,r){return function(){for(var i=new Array(arguments.length),o=0;o<i.length;o++)i[o]=arguments[o];return t.apply(r,i)}}),va}var _a,Tc;function et(){if(Tc)return _a;Tc=1;var e=Xd(),t=Object.prototype.toString,r=function(k){return function(V){var J=t.call(V);return k[J]||(k[J]=J.slice(8,-1).toLowerCase())}}(Object.create(null));function n(k){return k=k.toLowerCase(),function(J){return r(J)===k}}function i(k){return Array.isArray(k)}function o(k){return typeof k>"u"}function s(k){return k!==null&&!o(k)&&k.constructor!==null&&!o(k.constructor)&&typeof k.constructor.isBuffer=="function"&&k.constructor.isBuffer(k)}var a=n("ArrayBuffer");function u(k){var V;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?V=ArrayBuffer.isView(k):V=k&&k.buffer&&a(k.buffer),V}function f(k){return typeof k=="string"}function c(k){return typeof k=="number"}function h(k){return k!==null&&typeof k=="object"}function d(k){if(r(k)!=="object")return!1;var V=Object.getPrototypeOf(k);return V===null||V===Object.prototype}var l=n("Date"),p=n("File"),m=n("Blob"),b=n("FileList");function T(k){return t.call(k)==="[object Function]"}function _(k){return h(k)&&T(k.pipe)}function E(k){var V="[object FormData]";return k&&(typeof FormData=="function"&&k instanceof FormData||t.call(k)===V||T(k.toString)&&k.toString()===V)}var A=n("URLSearchParams");function w(k){return k.trim?k.trim():k.replace(/^\s+|\s+$/g,"")}function N(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function F(k,V){if(!(k===null||typeof k>"u"))if(typeof k!="object"&&(k=[k]),i(k))for(var J=0,de=k.length;J<de;J++)V.call(null,k[J],J,k);else for(var X in k)Object.prototype.hasOwnProperty.call(k,X)&&V.call(null,k[X],X,k)}function B(){var k={};function V(X,Z){d(k[Z])&&d(X)?k[Z]=B(k[Z],X):d(X)?k[Z]=B({},X):i(X)?k[Z]=X.slice():k[Z]=X}for(var J=0,de=arguments.length;J<de;J++)F(arguments[J],V);return k}function G(k,V,J){return F(V,function(X,Z){J&&typeof X=="function"?k[Z]=e(X,J):k[Z]=X}),k}function W(k){return k.charCodeAt(0)===65279&&(k=k.slice(1)),k}function z(k,V,J,de){k.prototype=Object.create(V.prototype,de),k.prototype.constructor=k,J&&Object.assign(k.prototype,J)}function $(k,V,J){var de,X,Z,re={};V=V||{};do{for(de=Object.getOwnPropertyNames(k),X=de.length;X-- >0;)Z=de[X],re[Z]||(V[Z]=k[Z],re[Z]=!0);k=Object.getPrototypeOf(k)}while(k&&(!J||J(k,V))&&k!==Object.prototype);return V}function Y(k,V,J){k=String(k),(J===void 0||J>k.length)&&(J=k.length),J-=V.length;var de=k.indexOf(V,J);return de!==-1&&de===J}function te(k){if(!k)return null;var V=k.length;if(o(V))return null;for(var J=new Array(V);V-- >0;)J[V]=k[V];return J}var K=function(k){return function(V){return k&&V instanceof k}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));return _a={isArray:i,isArrayBuffer:a,isBuffer:s,isFormData:E,isArrayBufferView:u,isString:f,isNumber:c,isObject:h,isPlainObject:d,isUndefined:o,isDate:l,isFile:p,isBlob:m,isFunction:T,isStream:_,isURLSearchParams:A,isStandardBrowserEnv:N,forEach:F,merge:B,extend:G,trim:w,stripBOM:W,inherits:z,toFlatObject:$,kindOf:r,kindOfTest:n,endsWith:Y,toArray:te,isTypedArray:K,isFileList:b},_a}var Ea,xc;function Jd(){if(xc)return Ea;xc=1;var e=et();function t(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}return Ea=function(n,i,o){if(!i)return n;var s;if(o)s=o(i);else if(e.isURLSearchParams(i))s=i.toString();else{var a=[];e.forEach(i,function(c,h){c===null||typeof c>"u"||(e.isArray(c)?h=h+"[]":c=[c],e.forEach(c,function(l){e.isDate(l)?l=l.toISOString():e.isObject(l)&&(l=JSON.stringify(l)),a.push(t(h)+"="+t(l))}))}),s=a.join("&")}if(s){var u=n.indexOf("#");u!==-1&&(n=n.slice(0,u)),n+=(n.indexOf("?")===-1?"?":"&")+s}return n},Ea}var ba,Oc;function dy(){if(Oc)return ba;Oc=1;var e=et();function t(){this.handlers=[]}return t.prototype.use=function(n,i,o){return this.handlers.push({fulfilled:n,rejected:i,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1},t.prototype.eject=function(n){this.handlers[n]&&(this.handlers[n]=null)},t.prototype.forEach=function(n){e.forEach(this.handlers,function(o){o!==null&&n(o)})},ba=t,ba}var wa,Ac;function hy(){if(Ac)return wa;Ac=1;var e=et();return wa=function(r,n){e.forEach(r,function(o,s){s!==n&&s.toUpperCase()===n.toUpperCase()&&(r[n]=o,delete r[s])})},wa}var Sa,Cc;function Mn(){if(Cc)return Sa;Cc=1;var e=et();function t(i,o,s,a,u){Error.call(this),this.message=i,this.name="AxiosError",o&&(this.code=o),s&&(this.config=s),a&&(this.request=a),u&&(this.response=u)}e.inherits(t,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 r=t.prototype,n={};return["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(i){n[i]={value:i}}),Object.defineProperties(t,n),Object.defineProperty(r,"isAxiosError",{value:!0}),t.from=function(i,o,s,a,u,f){var c=Object.create(r);return e.toFlatObject(i,c,function(d){return d!==Error.prototype}),t.call(c,i.message,o,s,a,u),c.name=i.name,f&&Object.assign(c,f),c},Sa=t,Sa}var Ta,Rc;function Zd(){return Rc||(Rc=1,Ta={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}),Ta}var xa,Nc;function eh(){if(Nc)return xa;Nc=1;var e=et();function t(r,n){n=n||new FormData;var i=[];function o(a){return a===null?"":e.isDate(a)?a.toISOString():e.isArrayBuffer(a)||e.isTypedArray(a)?typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function s(a,u){if(e.isPlainObject(a)||e.isArray(a)){if(i.indexOf(a)!==-1)throw Error("Circular reference detected in "+u);i.push(a),e.forEach(a,function(c,h){if(!e.isUndefined(c)){var d=u?u+"."+h:h,l;if(c&&!u&&typeof c=="object"){if(e.endsWith(h,"{}"))c=JSON.stringify(c);else if(e.endsWith(h,"[]")&&(l=e.toArray(c))){l.forEach(function(p){!e.isUndefined(p)&&n.append(d,o(p))});return}}s(c,d)}}),i.pop()}else n.append(u,o(a))}return s(r),n}return xa=t,xa}var Oa,Pc;function py(){if(Pc)return Oa;Pc=1;var e=Mn();return Oa=function(r,n,i){var o=i.config.validateStatus;!i.status||!o||o(i.status)?r(i):n(new e("Request failed with status code "+i.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))},Oa}var Aa,Ic;function my(){if(Ic)return Aa;Ic=1;var e=et();return Aa=e.isStandardBrowserEnv()?function(){return{write:function(n,i,o,s,a,u){var f=[];f.push(n+"="+encodeURIComponent(i)),e.isNumber(o)&&f.push("expires="+new Date(o).toGMTString()),e.isString(s)&&f.push("path="+s),e.isString(a)&&f.push("domain="+a),u===!0&&f.push("secure"),document.cookie=f.join("; ")},read:function(n){var i=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Aa}var Ca,Lc;function gy(){return Lc||(Lc=1,Ca=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),Ca}var Ra,kc;function yy(){return kc||(kc=1,Ra=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t}),Ra}var Na,Mc;function th(){if(Mc)return Na;Mc=1;var e=gy(),t=yy();return Na=function(n,i){return n&&!e(i)?t(n,i):i},Na}var Pa,Bc;function vy(){if(Bc)return Pa;Bc=1;var e=et(),t=["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"];return Pa=function(n){var i={},o,s,a;return n&&e.forEach(n.split(`
25
- `),function(f){if(a=f.indexOf(":"),o=e.trim(f.substr(0,a)).toLowerCase(),s=e.trim(f.substr(a+1)),o){if(i[o]&&t.indexOf(o)>=0)return;o==="set-cookie"?i[o]=(i[o]?i[o]:[]).concat([s]):i[o]=i[o]?i[o]+", "+s:s}}),i},Pa}var Ia,Fc;function _y(){if(Fc)return Ia;Fc=1;var e=et();return Ia=e.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),i;function o(s){var a=s;return r&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=o(window.location.href),function(a){var u=e.isString(a)?o(a):a;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),Ia}var La,Dc;function ta(){if(Dc)return La;Dc=1;var e=Mn(),t=et();function r(n){e.call(this,n??"canceled",e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(r,e,{__CANCEL__:!0}),La=r,La}var ka,Uc;function Ey(){return Uc||(Uc=1,ka=function(t){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return r&&r[1]||""}),ka}var Ma,$c;function jc(){if($c)return Ma;$c=1;var e=et(),t=py(),r=my(),n=Jd(),i=th(),o=vy(),s=_y(),a=Zd(),u=Mn(),f=ta(),c=Ey();return Ma=function(d){return new Promise(function(p,m){var b=d.data,T=d.headers,_=d.responseType,E;function A(){d.cancelToken&&d.cancelToken.unsubscribe(E),d.signal&&d.signal.removeEventListener("abort",E)}e.isFormData(b)&&e.isStandardBrowserEnv()&&delete T["Content-Type"];var w=new XMLHttpRequest;if(d.auth){var N=d.auth.username||"",F=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";T.Authorization="Basic "+btoa(N+":"+F)}var B=i(d.baseURL,d.url);w.open(d.method.toUpperCase(),n(B,d.params,d.paramsSerializer),!0),w.timeout=d.timeout;function G(){if(w){var $="getAllResponseHeaders"in w?o(w.getAllResponseHeaders()):null,Y=!_||_==="text"||_==="json"?w.responseText:w.response,te={data:Y,status:w.status,statusText:w.statusText,headers:$,config:d,request:w};t(function(k){p(k),A()},function(k){m(k),A()},te),w=null}}if("onloadend"in w?w.onloadend=G:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(G)},w.onabort=function(){w&&(m(new u("Request aborted",u.ECONNABORTED,d,w)),w=null)},w.onerror=function(){m(new u("Network Error",u.ERR_NETWORK,d,w,w)),w=null},w.ontimeout=function(){var Y=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",te=d.transitional||a;d.timeoutErrorMessage&&(Y=d.timeoutErrorMessage),m(new u(Y,te.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,d,w)),w=null},e.isStandardBrowserEnv()){var W=(d.withCredentials||s(B))&&d.xsrfCookieName?r.read(d.xsrfCookieName):void 0;W&&(T[d.xsrfHeaderName]=W)}"setRequestHeader"in w&&e.forEach(T,function(Y,te){typeof b>"u"&&te.toLowerCase()==="content-type"?delete T[te]:w.setRequestHeader(te,Y)}),e.isUndefined(d.withCredentials)||(w.withCredentials=!!d.withCredentials),_&&_!=="json"&&(w.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&w.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(E=function($){w&&(m(!$||$&&$.type?new f:$),w.abort(),w=null)},d.cancelToken&&d.cancelToken.subscribe(E),d.signal&&(d.signal.aborted?E():d.signal.addEventListener("abort",E))),b||(b=null);var z=c(B);if(z&&["http","https","file"].indexOf(z)===-1){m(new u("Unsupported protocol "+z+":",u.ERR_BAD_REQUEST,d));return}w.send(b)})},Ma}var Ba,Hc;function by(){return Hc||(Hc=1,Ba=null),Ba}var Fa,qc;function Fu(){if(qc)return Fa;qc=1;var e=et(),t=hy(),r=Mn(),n=Zd(),i=eh(),o={"Content-Type":"application/x-www-form-urlencoded"};function s(c,h){!e.isUndefined(c)&&e.isUndefined(c["Content-Type"])&&(c["Content-Type"]=h)}function a(){var c;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(c=jc()),c}function u(c,h,d){if(e.isString(c))try{return(h||JSON.parse)(c),e.trim(c)}catch(l){if(l.name!=="SyntaxError")throw l}return(d||JSON.stringify)(c)}var f={transitional:n,adapter:a(),transformRequest:[function(h,d){if(t(d,"Accept"),t(d,"Content-Type"),e.isFormData(h)||e.isArrayBuffer(h)||e.isBuffer(h)||e.isStream(h)||e.isFile(h)||e.isBlob(h))return h;if(e.isArrayBufferView(h))return h.buffer;if(e.isURLSearchParams(h))return s(d,"application/x-www-form-urlencoded;charset=utf-8"),h.toString();var l=e.isObject(h),p=d&&d["Content-Type"],m;if((m=e.isFileList(h))||l&&p==="multipart/form-data"){var b=this.env&&this.env.FormData;return i(m?{"files[]":h}:h,b&&new b)}else if(l||p==="application/json")return s(d,"application/json"),u(h);return h}],transformResponse:[function(h){var d=this.transitional||f.transitional,l=d&&d.silentJSONParsing,p=d&&d.forcedJSONParsing,m=!l&&this.responseType==="json";if(m||p&&e.isString(h)&&h.length)try{return JSON.parse(h)}catch(b){if(m)throw b.name==="SyntaxError"?r.from(b,r.ERR_BAD_RESPONSE,this,null,this.response):b}return h}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:by()},validateStatus:function(h){return h>=200&&h<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(h){f.headers[h]={}}),e.forEach(["post","put","patch"],function(h){f.headers[h]=e.merge(o)}),Fa=f,Fa}var Da,Gc;function wy(){if(Gc)return Da;Gc=1;var e=et(),t=Fu();return Da=function(n,i,o){var s=this||t;return e.forEach(o,function(u){n=u.call(s,n,i)}),n},Da}var Ua,Wc;function rh(){return Wc||(Wc=1,Ua=function(t){return!!(t&&t.__CANCEL__)}),Ua}var $a,Vc;function Sy(){if(Vc)return $a;Vc=1;var e=et(),t=wy(),r=rh(),n=Fu(),i=ta();function o(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new i}return $a=function(a){o(a),a.headers=a.headers||{},a.data=t.call(a,a.data,a.headers,a.transformRequest),a.headers=e.merge(a.headers.common||{},a.headers[a.method]||{},a.headers),e.forEach(["delete","get","head","post","put","patch","common"],function(c){delete a.headers[c]});var u=a.adapter||n.adapter;return u(a).then(function(c){return o(a),c.data=t.call(a,c.data,c.headers,a.transformResponse),c},function(c){return r(c)||(o(a),c&&c.response&&(c.response.data=t.call(a,c.response.data,c.response.headers,a.transformResponse))),Promise.reject(c)})},$a}var ja,zc;function nh(){if(zc)return ja;zc=1;var e=et();return ja=function(r,n){n=n||{};var i={};function o(h,d){return e.isPlainObject(h)&&e.isPlainObject(d)?e.merge(h,d):e.isPlainObject(d)?e.merge({},d):e.isArray(d)?d.slice():d}function s(h){if(e.isUndefined(n[h])){if(!e.isUndefined(r[h]))return o(void 0,r[h])}else return o(r[h],n[h])}function a(h){if(!e.isUndefined(n[h]))return o(void 0,n[h])}function u(h){if(e.isUndefined(n[h])){if(!e.isUndefined(r[h]))return o(void 0,r[h])}else return o(void 0,n[h])}function f(h){if(h in n)return o(r[h],n[h]);if(h in r)return o(void 0,r[h])}var c={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f};return e.forEach(Object.keys(r).concat(Object.keys(n)),function(d){var l=c[d]||s,p=l(d);e.isUndefined(p)&&l!==f||(i[d]=p)}),i},ja}var Ha,Yc;function ih(){return Yc||(Yc=1,Ha={version:"0.27.2"}),Ha}var qa,Kc;function Ty(){if(Kc)return qa;Kc=1;var e=ih().version,t=Mn(),r={};["object","boolean","number","function","string","symbol"].forEach(function(o,s){r[o]=function(u){return typeof u===o||"a"+(s<1?"n ":" ")+o}});var n={};r.transitional=function(s,a,u){function f(c,h){return"[Axios v"+e+"] Transitional option '"+c+"'"+h+(u?". "+u:"")}return function(c,h,d){if(s===!1)throw new t(f(h," has been removed"+(a?" in "+a:"")),t.ERR_DEPRECATED);return a&&!n[h]&&(n[h]=!0,console.warn(f(h," has been deprecated since v"+a+" and will be removed in the near future"))),s?s(c,h,d):!0}};function i(o,s,a){if(typeof o!="object")throw new t("options must be an object",t.ERR_BAD_OPTION_VALUE);for(var u=Object.keys(o),f=u.length;f-- >0;){var c=u[f],h=s[c];if(h){var d=o[c],l=d===void 0||h(d,c,o);if(l!==!0)throw new t("option "+c+" must be "+l,t.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new t("Unknown option "+c,t.ERR_BAD_OPTION)}}return qa={assertOptions:i,validators:r},qa}var Ga,Qc;function xy(){if(Qc)return Ga;Qc=1;var e=et(),t=Jd(),r=dy(),n=Sy(),i=nh(),o=th(),s=Ty(),a=s.validators;function u(f){this.defaults=f,this.interceptors={request:new r,response:new r}}return u.prototype.request=function(c,h){typeof c=="string"?(h=h||{},h.url=c):h=c||{},h=i(this.defaults,h),h.method?h.method=h.method.toLowerCase():this.defaults.method?h.method=this.defaults.method.toLowerCase():h.method="get";var d=h.transitional;d!==void 0&&s.assertOptions(d,{silentJSONParsing:a.transitional(a.boolean),forcedJSONParsing:a.transitional(a.boolean),clarifyTimeoutError:a.transitional(a.boolean)},!1);var l=[],p=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(h)===!1||(p=p&&N.synchronous,l.unshift(N.fulfilled,N.rejected))});var m=[];this.interceptors.response.forEach(function(N){m.push(N.fulfilled,N.rejected)});var b;if(!p){var T=[n,void 0];for(Array.prototype.unshift.apply(T,l),T=T.concat(m),b=Promise.resolve(h);T.length;)b=b.then(T.shift(),T.shift());return b}for(var _=h;l.length;){var E=l.shift(),A=l.shift();try{_=E(_)}catch(w){A(w);break}}try{b=n(_)}catch(w){return Promise.reject(w)}for(;m.length;)b=b.then(m.shift(),m.shift());return b},u.prototype.getUri=function(c){c=i(this.defaults,c);var h=o(c.baseURL,c.url);return t(h,c.params,c.paramsSerializer)},e.forEach(["delete","get","head","options"],function(c){u.prototype[c]=function(h,d){return this.request(i(d||{},{method:c,url:h,data:(d||{}).data}))}}),e.forEach(["post","put","patch"],function(c){function h(d){return function(p,m,b){return this.request(i(b||{},{method:c,headers:d?{"Content-Type":"multipart/form-data"}:{},url:p,data:m}))}}u.prototype[c]=h(),u.prototype[c+"Form"]=h(!0)}),Ga=u,Ga}var Wa,Xc;function Oy(){if(Xc)return Wa;Xc=1;var e=ta();function t(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(s){n=s});var i=this;this.promise.then(function(o){if(i._listeners){var s,a=i._listeners.length;for(s=0;s<a;s++)i._listeners[s](o);i._listeners=null}}),this.promise.then=function(o){var s,a=new Promise(function(u){i.subscribe(u),s=u}).then(o);return a.cancel=function(){i.unsubscribe(s)},a},r(function(s){i.reason||(i.reason=new e(s),n(i.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]},t.prototype.unsubscribe=function(n){if(this._listeners){var i=this._listeners.indexOf(n);i!==-1&&this._listeners.splice(i,1)}},t.source=function(){var n,i=new t(function(s){n=s});return{token:i,cancel:n}},Wa=t,Wa}var Va,Jc;function Ay(){return Jc||(Jc=1,Va=function(t){return function(n){return t.apply(null,n)}}),Va}var za,Zc;function Cy(){if(Zc)return za;Zc=1;var e=et();return za=function(r){return e.isObject(r)&&r.isAxiosError===!0},za}var el;function Ry(){if(el)return lo.exports;el=1;var e=et(),t=Xd(),r=xy(),n=nh(),i=Fu();function o(a){var u=new r(a),f=t(r.prototype.request,u);return e.extend(f,r.prototype,u),e.extend(f,u),f.create=function(h){return o(n(a,h))},f}var s=o(i);return s.Axios=r,s.CanceledError=ta(),s.CancelToken=Oy(),s.isCancel=rh(),s.VERSION=ih().version,s.toFormData=eh(),s.AxiosError=Mn(),s.Cancel=s.CanceledError,s.all=function(u){return Promise.all(u)},s.spread=Ay(),s.isAxiosError=Cy(),lo.exports=s,lo.exports.default=s,lo.exports}var Ya,tl;function oh(){return tl||(tl=1,Ya=Ry()),Ya}var Ny=Function.prototype.toString,Ka=Object.create,Py=Object.defineProperty,Iy=Object.getOwnPropertyDescriptor,rl=Object.getOwnPropertyNames,Du=Object.getOwnPropertySymbols,Ly=Object.getPrototypeOf,ah=Object.prototype,ky=ah.hasOwnProperty,My=ah.propertyIsEnumerable,sh=typeof Du=="function",By=typeof WeakMap=="function",Fy=function(){if(By)return function(){return new WeakMap};var e=function(){function t(){this._keys=[],this._values=[]}return t.prototype.has=function(r){return!!~this._keys.indexOf(r)},t.prototype.get=function(r){return this._values[this._keys.indexOf(r)]},t.prototype.set=function(r,n){this._keys.push(r),this._values.push(n)},t}();return function(){return new e}}(),uh=function(e,t){var r=e.__proto__||Ly(e);if(!r)return Ka(null);var n=r.constructor;if(n===t.Object)return r===t.Object.prototype?{}:Ka(r);if(~Ny.call(n).indexOf("[native code]"))try{return new n}catch{}return Ka(r)},Dy=function(e,t,r,n){var i=uh(e,t);n.set(e,i);for(var o in e)ky.call(e,o)&&(i[o]=r(e[o],n));if(sh)for(var s=Du(e),a=0,u=s.length,f=void 0;a<u;++a)f=s[a],My.call(e,f)&&(i[f]=r(e[f],n));return i},nl=function(e,t,r,n){var i=uh(e,t);n.set(e,i);for(var o=sh?rl(e).concat(Du(e)):rl(e),s=0,a=o.length,u=void 0,f=void 0;s<a;++s)if(u=o[s],u!=="callee"&&u!=="caller")if(f=Iy(e,u),f){!f.get&&!f.set&&(f.value=r(e[u],n));try{Py(i,u,f)}catch{i[u]=f.value}}else i[u]=r(e[u],n);return i},Uy=function(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},$y=Array.isArray,jy=Object.getPrototypeOf,Hy=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function Er(e,t){var r=!!(t&&t.isStrict),n=t&&t.realm||Hy,i=r?nl:Dy,o=function(s,a){if(!s||typeof s!="object")return s;if(a.has(s))return a.get(s);var u=s.__proto__||jy(s),f=u&&u.constructor;if(!f||f===n.Object)return i(s,n,o,a);var c;if($y(s)){if(r)return nl(s,n,o,a);c=new f,a.set(s,c);for(var h=0,d=s.length;h<d;++h)c[h]=o(s[h],a);return c}if(s instanceof n.Date)return new f(s.getTime());if(s instanceof n.RegExp)return c=new f(s.source,s.flags||Uy(s)),c.lastIndex=s.lastIndex,c;if(n.Map&&s instanceof n.Map)return c=new f,a.set(s,c),s.forEach(function(l,p){c.set(p,o(l,a))}),c;if(n.Set&&s instanceof n.Set)return c=new f,a.set(s,c),s.forEach(function(l){c.add(o(l,a))}),c;if(n.Blob&&s instanceof n.Blob)return s.slice(0,s.size,s.type);if(n.Buffer&&n.Buffer.isBuffer(s))return c=n.Buffer.allocUnsafe?n.Buffer.allocUnsafe(s.length):new f(s.length),a.set(s,c),s.copy(c),c;if(n.ArrayBuffer){if(n.ArrayBuffer.isView(s))return c=new f(s.buffer.slice(0)),a.set(s,c),c;if(s instanceof n.ArrayBuffer)return c=s.slice(0),a.set(s,c),c}return typeof s.then=="function"||s instanceof Error||n.WeakMap&&s instanceof n.WeakMap||n.WeakSet&&s instanceof n.WeakSet?s:i(s,n,o,a)};return o(e,Fy())}Er.default=Er;Er.strict=function(t,r){return Er(t,{isStrict:!0,realm:r?r.realm:void 0})};var qy=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0},il=typeof Symbol<"u"&&Symbol,Gy=qy,Wy=function(){return typeof il!="function"||typeof Symbol!="function"||typeof il("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Gy()},ol={foo:{}},Vy=Object,zy=function(){return{__proto__:ol}.foo===ol.foo&&!({__proto__:null}instanceof Vy)},Yy="Function.prototype.bind called on incompatible ",Ky=Object.prototype.toString,Qy=Math.max,Xy="[object Function]",al=function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var o=0;o<r.length;o+=1)n[o+t.length]=r[o];return n},Jy=function(t,r){for(var n=[],i=r||0,o=0;i<t.length;i+=1,o+=1)n[o]=t[i];return n},Zy=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},ev=function(t){var r=this;if(typeof r!="function"||Ky.apply(r)!==Xy)throw new TypeError(Yy+r);for(var n=Jy(arguments,1),i,o=function(){if(this instanceof i){var c=r.apply(this,al(n,arguments));return Object(c)===c?c:this}return r.apply(t,al(n,arguments))},s=Qy(0,r.length-n.length),a=[],u=0;u<s;u++)a[u]="$"+u;if(i=Function("binder","return function ("+Zy(a,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var f=function(){};f.prototype=r.prototype,i.prototype=new f,f.prototype=null}return i},tv=ev,Uu=Function.prototype.bind||tv,rv=Function.prototype.call,nv=Object.prototype.hasOwnProperty,iv=Uu,ov=iv.call(rv,nv),ge,Nn=SyntaxError,ch=Function,Rn=TypeError,Qa=function(e){try{return ch('"use strict"; return ('+e+").constructor;")()}catch{}},Xr=Object.getOwnPropertyDescriptor;if(Xr)try{Xr({},"")}catch{Xr=null}var Xa=function(){throw new Rn},av=Xr?function(){try{return arguments.callee,Xa}catch{try{return Xr(arguments,"callee").get}catch{return Xa}}}():Xa,wn=Wy(),sv=zy(),ze=Object.getPrototypeOf||(sv?function(e){return e.__proto__}:null),On={},uv=typeof Uint8Array>"u"||!ze?ge:ze(Uint8Array),Jr={"%AggregateError%":typeof AggregateError>"u"?ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ge:ArrayBuffer,"%ArrayIteratorPrototype%":wn&&ze?ze([][Symbol.iterator]()):ge,"%AsyncFromSyncIteratorPrototype%":ge,"%AsyncFunction%":On,"%AsyncGenerator%":On,"%AsyncGeneratorFunction%":On,"%AsyncIteratorPrototype%":On,"%Atomics%":typeof Atomics>"u"?ge:Atomics,"%BigInt%":typeof BigInt>"u"?ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ge:FinalizationRegistry,"%Function%":ch,"%GeneratorFunction%":On,"%Int8Array%":typeof Int8Array>"u"?ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":wn&&ze?ze(ze([][Symbol.iterator]())):ge,"%JSON%":typeof JSON=="object"?JSON:ge,"%Map%":typeof Map>"u"?ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!wn||!ze?ge:ze(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ge:Promise,"%Proxy%":typeof Proxy>"u"?ge:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!wn||!ze?ge:ze(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":wn&&ze?ze(""[Symbol.iterator]()):ge,"%Symbol%":wn?Symbol:ge,"%SyntaxError%":Nn,"%ThrowTypeError%":av,"%TypedArray%":uv,"%TypeError%":Rn,"%Uint8Array%":typeof Uint8Array>"u"?ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ge:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ge:WeakSet};if(ze)try{null.error}catch(e){var cv=ze(ze(e));Jr["%Error.prototype%"]=cv}var lv=function e(t){var r;if(t==="%AsyncFunction%")r=Qa("async function () {}");else if(t==="%GeneratorFunction%")r=Qa("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Qa("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&ze&&(r=ze(i.prototype))}return Jr[t]=r,r},sl={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Zi=Uu,jo=ov,fv=Zi.call(Function.call,Array.prototype.concat),dv=Zi.call(Function.apply,Array.prototype.splice),ul=Zi.call(Function.call,String.prototype.replace),Ho=Zi.call(Function.call,String.prototype.slice),hv=Zi.call(Function.call,RegExp.prototype.exec),pv=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,mv=/\\(\\)?/g,gv=function(t){var r=Ho(t,0,1),n=Ho(t,-1);if(r==="%"&&n!=="%")throw new Nn("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Nn("invalid intrinsic syntax, expected opening `%`");var i=[];return ul(t,pv,function(o,s,a,u){i[i.length]=a?ul(u,mv,"$1"):s||o}),i},yv=function(t,r){var n=t,i;if(jo(sl,n)&&(i=sl[n],n="%"+i[0]+"%"),jo(Jr,n)){var o=Jr[n];if(o===On&&(o=lv(n)),typeof o>"u"&&!r)throw new Rn("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new Nn("intrinsic "+t+" does not exist!")},nn=function(t,r){if(typeof t!="string"||t.length===0)throw new Rn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Rn('"allowMissing" argument must be a boolean');if(hv(/^%?[^%]*%?$/,t)===null)throw new Nn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=gv(t),i=n.length>0?n[0]:"",o=yv("%"+i+"%",r),s=o.name,a=o.value,u=!1,f=o.alias;f&&(i=f[0],dv(n,fv([0,1],f)));for(var c=1,h=!0;c<n.length;c+=1){var d=n[c],l=Ho(d,0,1),p=Ho(d,-1);if((l==='"'||l==="'"||l==="`"||p==='"'||p==="'"||p==="`")&&l!==p)throw new Nn("property names with quotes must have matching quotes");if((d==="constructor"||!h)&&(u=!0),i+="."+d,s="%"+i+"%",jo(Jr,s))a=Jr[s];else if(a!=null){if(!(d in a)){if(!r)throw new Rn("base intrinsic for "+t+" exists, but the property is not available.");return}if(Xr&&c+1>=n.length){var m=Xr(a,d);h=!!m,h&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else h=jo(a,d),a=a[d];h&&!u&&(Jr[s]=a)}}return a},lh={exports:{}},vv=nn,iu=vv("%Object.defineProperty%",!0),ou=function(){if(iu)try{return iu({},"a",{value:1}),!0}catch{return!1}return!1};ou.hasArrayLengthDefineBug=function(){if(!ou())return null;try{return iu([],"length",{value:1}).length!==1}catch{return!0}};var fh=ou,_v=nn,Fo=_v("%Object.getOwnPropertyDescriptor%",!0);if(Fo)try{Fo([],"length")}catch{Fo=null}var dh=Fo,Ev=fh(),$u=nn,qi=Ev&&$u("%Object.defineProperty%",!0);if(qi)try{qi({},"a",{value:1})}catch{qi=!1}var bv=$u("%SyntaxError%"),Sn=$u("%TypeError%"),cl=dh,wv=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new Sn("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Sn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Sn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Sn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Sn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Sn("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,u=!!cl&&cl(t,r);if(qi)qi(t,r,{configurable:s===null&&u?u.configurable:!s,enumerable:i===null&&u?u.enumerable:!i,value:n,writable:o===null&&u?u.writable:!o});else if(a||!i&&!o&&!s)t[r]=n;else throw new bv("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},hh=nn,ll=wv,Sv=fh(),fl=dh,dl=hh("%TypeError%"),Tv=hh("%Math.floor%"),xv=function(t,r){if(typeof t!="function")throw new dl("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Tv(r)!==r)throw new dl("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in t&&fl){var s=fl(t,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(o=!1)}return(i||o||!n)&&(Sv?ll(t,"length",r,!0,!0):ll(t,"length",r)),t};(function(e){var t=Uu,r=nn,n=xv,i=r("%TypeError%"),o=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||t.call(s,o),u=r("%Object.defineProperty%",!0),f=r("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var l=a(t,s,arguments);return n(l,1+f(0,d.length-(arguments.length-1)),!0)};var c=function(){return a(t,o,arguments)};u?u(e.exports,"apply",{value:c}):e.exports.apply=c})(lh);var Ov=lh.exports,ph=nn,mh=Ov,Av=mh(ph("String.prototype.indexOf")),Cv=function(t,r){var n=ph(t,!!r);return typeof n=="function"&&Av(t,".prototype.")>-1?mh(n):n};const Rv={},Nv=Object.freeze(Object.defineProperty({__proto__:null,default:Rv},Symbol.toStringTag,{value:"Module"})),Pv=Ji(Nv);var ju=typeof Map=="function"&&Map.prototype,Ja=Object.getOwnPropertyDescriptor&&ju?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,qo=ju&&Ja&&typeof Ja.get=="function"?Ja.get:null,hl=ju&&Map.prototype.forEach,Hu=typeof Set=="function"&&Set.prototype,Za=Object.getOwnPropertyDescriptor&&Hu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Go=Hu&&Za&&typeof Za.get=="function"?Za.get:null,pl=Hu&&Set.prototype.forEach,Iv=typeof WeakMap=="function"&&WeakMap.prototype,Gi=Iv?WeakMap.prototype.has:null,Lv=typeof WeakSet=="function"&&WeakSet.prototype,Wi=Lv?WeakSet.prototype.has:null,kv=typeof WeakRef=="function"&&WeakRef.prototype,ml=kv?WeakRef.prototype.deref:null,Mv=Boolean.prototype.valueOf,Bv=Object.prototype.toString,Fv=Function.prototype.toString,Dv=String.prototype.match,qu=String.prototype.slice,vr=String.prototype.replace,Uv=String.prototype.toUpperCase,gl=String.prototype.toLowerCase,gh=RegExp.prototype.test,yl=Array.prototype.concat,$t=Array.prototype.join,$v=Array.prototype.slice,vl=Math.floor,au=typeof BigInt=="function"?BigInt.prototype.valueOf:null,es=Object.getOwnPropertySymbols,su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Pn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",nt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Pn||"symbol")?Symbol.toStringTag:null,yh=Object.prototype.propertyIsEnumerable,_l=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function El(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||gh.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-vl(-e):vl(e);if(n!==e){var i=String(n),o=qu.call(t,i.length+1);return vr.call(i,r,"$&_")+"."+vr.call(vr.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return vr.call(t,r,"$&_")}var uu=Pv,bl=uu.custom,wl=_h(bl)?bl:null,jv=function e(t,r,n,i){var o=r||{};if(yr(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(yr(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=yr(o,"customInspect")?o.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(yr(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(yr(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return bh(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return a?El(t,u):u}if(typeof t=="bigint"){var f=String(t)+"n";return a?El(t,f):f}var c=typeof o.depth>"u"?5:o.depth;if(typeof n>"u"&&(n=0),n>=c&&c>0&&typeof t=="object")return cu(t)?"[Array]":"[Object]";var h=o0(o,n);if(typeof i>"u")i=[];else if(Eh(i,t)>=0)return"[Circular]";function d(Y,te,K){if(te&&(i=$v.call(i),i.push(te)),K){var k={depth:o.depth};return yr(o,"quoteStyle")&&(k.quoteStyle=o.quoteStyle),e(Y,k,n+1,i)}return e(Y,o,n+1,i)}if(typeof t=="function"&&!Sl(t)){var l=Qv(t),p=fo(t,d);return"[Function"+(l?": "+l:" (anonymous)")+"]"+(p.length>0?" { "+$t.call(p,", ")+" }":"")}if(_h(t)){var m=Pn?vr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):su.call(t);return typeof t=="object"&&!Pn?gi(m):m}if(r0(t)){for(var b="<"+gl.call(String(t.nodeName)),T=t.attributes||[],_=0;_<T.length;_++)b+=" "+T[_].name+"="+vh(Hv(T[_].value),"double",o);return b+=">",t.childNodes&&t.childNodes.length&&(b+="..."),b+="</"+gl.call(String(t.nodeName))+">",b}if(cu(t)){if(t.length===0)return"[]";var E=fo(t,d);return h&&!i0(E)?"["+lu(E,h)+"]":"[ "+$t.call(E,", ")+" ]"}if(Gv(t)){var A=fo(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!yh.call(t,"cause")?"{ ["+String(t)+"] "+$t.call(yl.call("[cause]: "+d(t.cause),A),", ")+" }":A.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+$t.call(A,", ")+" }"}if(typeof t=="object"&&s){if(wl&&typeof t[wl]=="function"&&uu)return uu(t,{depth:c-n});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Xv(t)){var w=[];return hl&&hl.call(t,function(Y,te){w.push(d(te,t,!0)+" => "+d(Y,t))}),Tl("Map",qo.call(t),w,h)}if(e0(t)){var N=[];return pl&&pl.call(t,function(Y){N.push(d(Y,t))}),Tl("Set",Go.call(t),N,h)}if(Jv(t))return ts("WeakMap");if(t0(t))return ts("WeakSet");if(Zv(t))return ts("WeakRef");if(Vv(t))return gi(d(Number(t)));if(Yv(t))return gi(d(au.call(t)));if(zv(t))return gi(Mv.call(t));if(Wv(t))return gi(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===ce)return"{ [object globalThis] }";if(!qv(t)&&!Sl(t)){var F=fo(t,d),B=_l?_l(t)===Object.prototype:t instanceof Object||t.constructor===Object,G=t instanceof Object?"":"null prototype",W=!B&&nt&&Object(t)===t&&nt in t?qu.call(wr(t),8,-1):G?"Object":"",z=B||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",$=z+(W||G?"["+$t.call(yl.call([],W||[],G||[]),": ")+"] ":"");return F.length===0?$+"{}":h?$+"{"+lu(F,h)+"}":$+"{ "+$t.call(F,", ")+" }"}return String(t)};function vh(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function Hv(e){return vr.call(String(e),/"/g,"&quot;")}function cu(e){return wr(e)==="[object Array]"&&(!nt||!(typeof e=="object"&&nt in e))}function qv(e){return wr(e)==="[object Date]"&&(!nt||!(typeof e=="object"&&nt in e))}function Sl(e){return wr(e)==="[object RegExp]"&&(!nt||!(typeof e=="object"&&nt in e))}function Gv(e){return wr(e)==="[object Error]"&&(!nt||!(typeof e=="object"&&nt in e))}function Wv(e){return wr(e)==="[object String]"&&(!nt||!(typeof e=="object"&&nt in e))}function Vv(e){return wr(e)==="[object Number]"&&(!nt||!(typeof e=="object"&&nt in e))}function zv(e){return wr(e)==="[object Boolean]"&&(!nt||!(typeof e=="object"&&nt in e))}function _h(e){if(Pn)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!su)return!1;try{return su.call(e),!0}catch{}return!1}function Yv(e){if(!e||typeof e!="object"||!au)return!1;try{return au.call(e),!0}catch{}return!1}var Kv=Object.prototype.hasOwnProperty||function(e){return e in this};function yr(e,t){return Kv.call(e,t)}function wr(e){return Bv.call(e)}function Qv(e){if(e.name)return e.name;var t=Dv.call(Fv.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Eh(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Xv(e){if(!qo||!e||typeof e!="object")return!1;try{qo.call(e);try{Go.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Jv(e){if(!Gi||!e||typeof e!="object")return!1;try{Gi.call(e,Gi);try{Wi.call(e,Wi)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Zv(e){if(!ml||!e||typeof e!="object")return!1;try{return ml.call(e),!0}catch{}return!1}function e0(e){if(!Go||!e||typeof e!="object")return!1;try{Go.call(e);try{qo.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function t0(e){if(!Wi||!e||typeof e!="object")return!1;try{Wi.call(e,Wi);try{Gi.call(e,Gi)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function r0(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function bh(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return bh(qu.call(e,0,t.maxStringLength),t)+n}var i=vr.call(vr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,n0);return vh(i,"single",t)}function n0(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+Uv.call(t.toString(16))}function gi(e){return"Object("+e+")"}function ts(e){return e+" { ? }"}function Tl(e,t,r,n){var i=n?lu(r,n):$t.call(r,", ");return e+" ("+t+") {"+i+"}"}function i0(e){for(var t=0;t<e.length;t++)if(Eh(e[t],`
24
+ */var wc;function ay(){return wc||(wc=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,l=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function E(ne){return typeof ne=="string"||typeof ne=="function"||ne===n||ne===f||ne===o||ne===i||ne===h||ne===d||typeof ne=="object"&&ne!==null&&(ne.$$typeof===p||ne.$$typeof===l||ne.$$typeof===s||ne.$$typeof===a||ne.$$typeof===c||ne.$$typeof===b||ne.$$typeof===T||ne.$$typeof===_||ne.$$typeof===m)}function A(ne){if(typeof ne=="object"&&ne!==null){var Ye=ne.$$typeof;switch(Ye){case t:var je=ne.type;switch(je){case u:case f:case n:case o:case i:case h:return je;default:var wt=je&&je.$$typeof;switch(wt){case a:case c:case p:case l:case s:return wt;default:return Ye}}case r:return Ye}}}var w=u,N=f,F=a,B=s,G=t,W=c,z=n,$=p,Y=l,te=r,K=o,M=i,V=h,J=!1;function de(ne){return J||(J=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),X(ne)||A(ne)===u}function X(ne){return A(ne)===f}function Z(ne){return A(ne)===a}function re(ne){return A(ne)===s}function ue(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===t}function Fe(ne){return A(ne)===c}function Q(ne){return A(ne)===n}function oe(ne){return A(ne)===p}function Pe(ne){return A(ne)===l}function Ae(ne){return A(ne)===r}function ut(ne){return A(ne)===o}function ft(ne){return A(ne)===i}function bt(ne){return A(ne)===h}Re.AsyncMode=w,Re.ConcurrentMode=N,Re.ContextConsumer=F,Re.ContextProvider=B,Re.Element=G,Re.ForwardRef=W,Re.Fragment=z,Re.Lazy=$,Re.Memo=Y,Re.Portal=te,Re.Profiler=K,Re.StrictMode=M,Re.Suspense=V,Re.isAsyncMode=de,Re.isConcurrentMode=X,Re.isContextConsumer=Z,Re.isContextProvider=re,Re.isElement=ue,Re.isForwardRef=Fe,Re.isFragment=Q,Re.isLazy=oe,Re.isMemo=Pe,Re.isPortal=Ae,Re.isProfiler=ut,Re.isStrictMode=ft,Re.isSuspense=bt,Re.isValidElementType=E,Re.typeOf=A}()),Re}process.env.NODE_ENV==="production"?nu.exports=oy():nu.exports=ay();var sy=nu.exports,zd=sy,uy={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},cy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Yd={};Yd[zd.ForwardRef]=uy;Yd[zd.Memo]=cy;function ly(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function Kd(e){const t=U.useContext(ny);if(!t)throw new Error("Missing <CookiesProvider>");const[r,n]=U.useState(()=>t.getAll());ly()&&U.useLayoutEffect(()=>{function a(){const u=t.getAll({doNotUpdate:!0});fy(e||null,u,r)&&n(u)}return t.addChangeListener(a),()=>{t.removeChangeListener(a)}},[t,r]);const i=U.useMemo(()=>t.set.bind(t),[t]),o=U.useMemo(()=>t.remove.bind(t),[t]),s=U.useMemo(()=>t.update.bind(t),[t]);return[r,i,o,s]}function fy(e,t,r){if(!e)return!0;for(let n of e)if(t[n]!==r[n])return!0;return!1}var Qd={exports:{}},ya={exports:{}},co={},lo={exports:{}},va,Sc;function Xd(){return Sc||(Sc=1,va=function(t,r){return function(){for(var i=new Array(arguments.length),o=0;o<i.length;o++)i[o]=arguments[o];return t.apply(r,i)}}),va}var _a,Tc;function et(){if(Tc)return _a;Tc=1;var e=Xd(),t=Object.prototype.toString,r=function(M){return function(V){var J=t.call(V);return M[J]||(M[J]=J.slice(8,-1).toLowerCase())}}(Object.create(null));function n(M){return M=M.toLowerCase(),function(J){return r(J)===M}}function i(M){return Array.isArray(M)}function o(M){return typeof M>"u"}function s(M){return M!==null&&!o(M)&&M.constructor!==null&&!o(M.constructor)&&typeof M.constructor.isBuffer=="function"&&M.constructor.isBuffer(M)}var a=n("ArrayBuffer");function u(M){var V;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?V=ArrayBuffer.isView(M):V=M&&M.buffer&&a(M.buffer),V}function f(M){return typeof M=="string"}function c(M){return typeof M=="number"}function h(M){return M!==null&&typeof M=="object"}function d(M){if(r(M)!=="object")return!1;var V=Object.getPrototypeOf(M);return V===null||V===Object.prototype}var l=n("Date"),p=n("File"),m=n("Blob"),b=n("FileList");function T(M){return t.call(M)==="[object Function]"}function _(M){return h(M)&&T(M.pipe)}function E(M){var V="[object FormData]";return M&&(typeof FormData=="function"&&M instanceof FormData||t.call(M)===V||T(M.toString)&&M.toString()===V)}var A=n("URLSearchParams");function w(M){return M.trim?M.trim():M.replace(/^\s+|\s+$/g,"")}function N(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function F(M,V){if(!(M===null||typeof M>"u"))if(typeof M!="object"&&(M=[M]),i(M))for(var J=0,de=M.length;J<de;J++)V.call(null,M[J],J,M);else for(var X in M)Object.prototype.hasOwnProperty.call(M,X)&&V.call(null,M[X],X,M)}function B(){var M={};function V(X,Z){d(M[Z])&&d(X)?M[Z]=B(M[Z],X):d(X)?M[Z]=B({},X):i(X)?M[Z]=X.slice():M[Z]=X}for(var J=0,de=arguments.length;J<de;J++)F(arguments[J],V);return M}function G(M,V,J){return F(V,function(X,Z){J&&typeof X=="function"?M[Z]=e(X,J):M[Z]=X}),M}function W(M){return M.charCodeAt(0)===65279&&(M=M.slice(1)),M}function z(M,V,J,de){M.prototype=Object.create(V.prototype,de),M.prototype.constructor=M,J&&Object.assign(M.prototype,J)}function $(M,V,J){var de,X,Z,re={};V=V||{};do{for(de=Object.getOwnPropertyNames(M),X=de.length;X-- >0;)Z=de[X],re[Z]||(V[Z]=M[Z],re[Z]=!0);M=Object.getPrototypeOf(M)}while(M&&(!J||J(M,V))&&M!==Object.prototype);return V}function Y(M,V,J){M=String(M),(J===void 0||J>M.length)&&(J=M.length),J-=V.length;var de=M.indexOf(V,J);return de!==-1&&de===J}function te(M){if(!M)return null;var V=M.length;if(o(V))return null;for(var J=new Array(V);V-- >0;)J[V]=M[V];return J}var K=function(M){return function(V){return M&&V instanceof M}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));return _a={isArray:i,isArrayBuffer:a,isBuffer:s,isFormData:E,isArrayBufferView:u,isString:f,isNumber:c,isObject:h,isPlainObject:d,isUndefined:o,isDate:l,isFile:p,isBlob:m,isFunction:T,isStream:_,isURLSearchParams:A,isStandardBrowserEnv:N,forEach:F,merge:B,extend:G,trim:w,stripBOM:W,inherits:z,toFlatObject:$,kindOf:r,kindOfTest:n,endsWith:Y,toArray:te,isTypedArray:K,isFileList:b},_a}var Ea,xc;function Jd(){if(xc)return Ea;xc=1;var e=et();function t(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}return Ea=function(n,i,o){if(!i)return n;var s;if(o)s=o(i);else if(e.isURLSearchParams(i))s=i.toString();else{var a=[];e.forEach(i,function(c,h){c===null||typeof c>"u"||(e.isArray(c)?h=h+"[]":c=[c],e.forEach(c,function(l){e.isDate(l)?l=l.toISOString():e.isObject(l)&&(l=JSON.stringify(l)),a.push(t(h)+"="+t(l))}))}),s=a.join("&")}if(s){var u=n.indexOf("#");u!==-1&&(n=n.slice(0,u)),n+=(n.indexOf("?")===-1?"?":"&")+s}return n},Ea}var ba,Oc;function dy(){if(Oc)return ba;Oc=1;var e=et();function t(){this.handlers=[]}return t.prototype.use=function(n,i,o){return this.handlers.push({fulfilled:n,rejected:i,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1},t.prototype.eject=function(n){this.handlers[n]&&(this.handlers[n]=null)},t.prototype.forEach=function(n){e.forEach(this.handlers,function(o){o!==null&&n(o)})},ba=t,ba}var wa,Ac;function hy(){if(Ac)return wa;Ac=1;var e=et();return wa=function(r,n){e.forEach(r,function(o,s){s!==n&&s.toUpperCase()===n.toUpperCase()&&(r[n]=o,delete r[s])})},wa}var Sa,Cc;function kn(){if(Cc)return Sa;Cc=1;var e=et();function t(i,o,s,a,u){Error.call(this),this.message=i,this.name="AxiosError",o&&(this.code=o),s&&(this.config=s),a&&(this.request=a),u&&(this.response=u)}e.inherits(t,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 r=t.prototype,n={};return["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(i){n[i]={value:i}}),Object.defineProperties(t,n),Object.defineProperty(r,"isAxiosError",{value:!0}),t.from=function(i,o,s,a,u,f){var c=Object.create(r);return e.toFlatObject(i,c,function(d){return d!==Error.prototype}),t.call(c,i.message,o,s,a,u),c.name=i.name,f&&Object.assign(c,f),c},Sa=t,Sa}var Ta,Rc;function Zd(){return Rc||(Rc=1,Ta={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}),Ta}var xa,Nc;function eh(){if(Nc)return xa;Nc=1;var e=et();function t(r,n){n=n||new FormData;var i=[];function o(a){return a===null?"":e.isDate(a)?a.toISOString():e.isArrayBuffer(a)||e.isTypedArray(a)?typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function s(a,u){if(e.isPlainObject(a)||e.isArray(a)){if(i.indexOf(a)!==-1)throw Error("Circular reference detected in "+u);i.push(a),e.forEach(a,function(c,h){if(!e.isUndefined(c)){var d=u?u+"."+h:h,l;if(c&&!u&&typeof c=="object"){if(e.endsWith(h,"{}"))c=JSON.stringify(c);else if(e.endsWith(h,"[]")&&(l=e.toArray(c))){l.forEach(function(p){!e.isUndefined(p)&&n.append(d,o(p))});return}}s(c,d)}}),i.pop()}else n.append(u,o(a))}return s(r),n}return xa=t,xa}var Oa,Pc;function py(){if(Pc)return Oa;Pc=1;var e=kn();return Oa=function(r,n,i){var o=i.config.validateStatus;!i.status||!o||o(i.status)?r(i):n(new e("Request failed with status code "+i.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))},Oa}var Aa,Ic;function my(){if(Ic)return Aa;Ic=1;var e=et();return Aa=e.isStandardBrowserEnv()?function(){return{write:function(n,i,o,s,a,u){var f=[];f.push(n+"="+encodeURIComponent(i)),e.isNumber(o)&&f.push("expires="+new Date(o).toGMTString()),e.isString(s)&&f.push("path="+s),e.isString(a)&&f.push("domain="+a),u===!0&&f.push("secure"),document.cookie=f.join("; ")},read:function(n){var i=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Aa}var Ca,Lc;function gy(){return Lc||(Lc=1,Ca=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),Ca}var Ra,Mc;function yy(){return Mc||(Mc=1,Ra=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t}),Ra}var Na,kc;function th(){if(kc)return Na;kc=1;var e=gy(),t=yy();return Na=function(n,i){return n&&!e(i)?t(n,i):i},Na}var Pa,Bc;function vy(){if(Bc)return Pa;Bc=1;var e=et(),t=["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"];return Pa=function(n){var i={},o,s,a;return n&&e.forEach(n.split(`
25
+ `),function(f){if(a=f.indexOf(":"),o=e.trim(f.substr(0,a)).toLowerCase(),s=e.trim(f.substr(a+1)),o){if(i[o]&&t.indexOf(o)>=0)return;o==="set-cookie"?i[o]=(i[o]?i[o]:[]).concat([s]):i[o]=i[o]?i[o]+", "+s:s}}),i},Pa}var Ia,Fc;function _y(){if(Fc)return Ia;Fc=1;var e=et();return Ia=e.isStandardBrowserEnv()?function(){var r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),i;function o(s){var a=s;return r&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=o(window.location.href),function(a){var u=e.isString(a)?o(a):a;return u.protocol===i.protocol&&u.host===i.host}}():function(){return function(){return!0}}(),Ia}var La,Dc;function ta(){if(Dc)return La;Dc=1;var e=kn(),t=et();function r(n){e.call(this,n??"canceled",e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(r,e,{__CANCEL__:!0}),La=r,La}var Ma,Uc;function Ey(){return Uc||(Uc=1,Ma=function(t){var r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return r&&r[1]||""}),Ma}var ka,$c;function jc(){if($c)return ka;$c=1;var e=et(),t=py(),r=my(),n=Jd(),i=th(),o=vy(),s=_y(),a=Zd(),u=kn(),f=ta(),c=Ey();return ka=function(d){return new Promise(function(p,m){var b=d.data,T=d.headers,_=d.responseType,E;function A(){d.cancelToken&&d.cancelToken.unsubscribe(E),d.signal&&d.signal.removeEventListener("abort",E)}e.isFormData(b)&&e.isStandardBrowserEnv()&&delete T["Content-Type"];var w=new XMLHttpRequest;if(d.auth){var N=d.auth.username||"",F=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";T.Authorization="Basic "+btoa(N+":"+F)}var B=i(d.baseURL,d.url);w.open(d.method.toUpperCase(),n(B,d.params,d.paramsSerializer),!0),w.timeout=d.timeout;function G(){if(w){var $="getAllResponseHeaders"in w?o(w.getAllResponseHeaders()):null,Y=!_||_==="text"||_==="json"?w.responseText:w.response,te={data:Y,status:w.status,statusText:w.statusText,headers:$,config:d,request:w};t(function(M){p(M),A()},function(M){m(M),A()},te),w=null}}if("onloadend"in w?w.onloadend=G:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(G)},w.onabort=function(){w&&(m(new u("Request aborted",u.ECONNABORTED,d,w)),w=null)},w.onerror=function(){m(new u("Network Error",u.ERR_NETWORK,d,w,w)),w=null},w.ontimeout=function(){var Y=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",te=d.transitional||a;d.timeoutErrorMessage&&(Y=d.timeoutErrorMessage),m(new u(Y,te.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,d,w)),w=null},e.isStandardBrowserEnv()){var W=(d.withCredentials||s(B))&&d.xsrfCookieName?r.read(d.xsrfCookieName):void 0;W&&(T[d.xsrfHeaderName]=W)}"setRequestHeader"in w&&e.forEach(T,function(Y,te){typeof b>"u"&&te.toLowerCase()==="content-type"?delete T[te]:w.setRequestHeader(te,Y)}),e.isUndefined(d.withCredentials)||(w.withCredentials=!!d.withCredentials),_&&_!=="json"&&(w.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&w.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(E=function($){w&&(m(!$||$&&$.type?new f:$),w.abort(),w=null)},d.cancelToken&&d.cancelToken.subscribe(E),d.signal&&(d.signal.aborted?E():d.signal.addEventListener("abort",E))),b||(b=null);var z=c(B);if(z&&["http","https","file"].indexOf(z)===-1){m(new u("Unsupported protocol "+z+":",u.ERR_BAD_REQUEST,d));return}w.send(b)})},ka}var Ba,Hc;function by(){return Hc||(Hc=1,Ba=null),Ba}var Fa,qc;function Fu(){if(qc)return Fa;qc=1;var e=et(),t=hy(),r=kn(),n=Zd(),i=eh(),o={"Content-Type":"application/x-www-form-urlencoded"};function s(c,h){!e.isUndefined(c)&&e.isUndefined(c["Content-Type"])&&(c["Content-Type"]=h)}function a(){var c;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(c=jc()),c}function u(c,h,d){if(e.isString(c))try{return(h||JSON.parse)(c),e.trim(c)}catch(l){if(l.name!=="SyntaxError")throw l}return(d||JSON.stringify)(c)}var f={transitional:n,adapter:a(),transformRequest:[function(h,d){if(t(d,"Accept"),t(d,"Content-Type"),e.isFormData(h)||e.isArrayBuffer(h)||e.isBuffer(h)||e.isStream(h)||e.isFile(h)||e.isBlob(h))return h;if(e.isArrayBufferView(h))return h.buffer;if(e.isURLSearchParams(h))return s(d,"application/x-www-form-urlencoded;charset=utf-8"),h.toString();var l=e.isObject(h),p=d&&d["Content-Type"],m;if((m=e.isFileList(h))||l&&p==="multipart/form-data"){var b=this.env&&this.env.FormData;return i(m?{"files[]":h}:h,b&&new b)}else if(l||p==="application/json")return s(d,"application/json"),u(h);return h}],transformResponse:[function(h){var d=this.transitional||f.transitional,l=d&&d.silentJSONParsing,p=d&&d.forcedJSONParsing,m=!l&&this.responseType==="json";if(m||p&&e.isString(h)&&h.length)try{return JSON.parse(h)}catch(b){if(m)throw b.name==="SyntaxError"?r.from(b,r.ERR_BAD_RESPONSE,this,null,this.response):b}return h}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:by()},validateStatus:function(h){return h>=200&&h<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(h){f.headers[h]={}}),e.forEach(["post","put","patch"],function(h){f.headers[h]=e.merge(o)}),Fa=f,Fa}var Da,Gc;function wy(){if(Gc)return Da;Gc=1;var e=et(),t=Fu();return Da=function(n,i,o){var s=this||t;return e.forEach(o,function(u){n=u.call(s,n,i)}),n},Da}var Ua,Wc;function rh(){return Wc||(Wc=1,Ua=function(t){return!!(t&&t.__CANCEL__)}),Ua}var $a,Vc;function Sy(){if(Vc)return $a;Vc=1;var e=et(),t=wy(),r=rh(),n=Fu(),i=ta();function o(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new i}return $a=function(a){o(a),a.headers=a.headers||{},a.data=t.call(a,a.data,a.headers,a.transformRequest),a.headers=e.merge(a.headers.common||{},a.headers[a.method]||{},a.headers),e.forEach(["delete","get","head","post","put","patch","common"],function(c){delete a.headers[c]});var u=a.adapter||n.adapter;return u(a).then(function(c){return o(a),c.data=t.call(a,c.data,c.headers,a.transformResponse),c},function(c){return r(c)||(o(a),c&&c.response&&(c.response.data=t.call(a,c.response.data,c.response.headers,a.transformResponse))),Promise.reject(c)})},$a}var ja,zc;function nh(){if(zc)return ja;zc=1;var e=et();return ja=function(r,n){n=n||{};var i={};function o(h,d){return e.isPlainObject(h)&&e.isPlainObject(d)?e.merge(h,d):e.isPlainObject(d)?e.merge({},d):e.isArray(d)?d.slice():d}function s(h){if(e.isUndefined(n[h])){if(!e.isUndefined(r[h]))return o(void 0,r[h])}else return o(r[h],n[h])}function a(h){if(!e.isUndefined(n[h]))return o(void 0,n[h])}function u(h){if(e.isUndefined(n[h])){if(!e.isUndefined(r[h]))return o(void 0,r[h])}else return o(void 0,n[h])}function f(h){if(h in n)return o(r[h],n[h]);if(h in r)return o(void 0,r[h])}var c={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f};return e.forEach(Object.keys(r).concat(Object.keys(n)),function(d){var l=c[d]||s,p=l(d);e.isUndefined(p)&&l!==f||(i[d]=p)}),i},ja}var Ha,Yc;function ih(){return Yc||(Yc=1,Ha={version:"0.27.2"}),Ha}var qa,Kc;function Ty(){if(Kc)return qa;Kc=1;var e=ih().version,t=kn(),r={};["object","boolean","number","function","string","symbol"].forEach(function(o,s){r[o]=function(u){return typeof u===o||"a"+(s<1?"n ":" ")+o}});var n={};r.transitional=function(s,a,u){function f(c,h){return"[Axios v"+e+"] Transitional option '"+c+"'"+h+(u?". "+u:"")}return function(c,h,d){if(s===!1)throw new t(f(h," has been removed"+(a?" in "+a:"")),t.ERR_DEPRECATED);return a&&!n[h]&&(n[h]=!0,console.warn(f(h," has been deprecated since v"+a+" and will be removed in the near future"))),s?s(c,h,d):!0}};function i(o,s,a){if(typeof o!="object")throw new t("options must be an object",t.ERR_BAD_OPTION_VALUE);for(var u=Object.keys(o),f=u.length;f-- >0;){var c=u[f],h=s[c];if(h){var d=o[c],l=d===void 0||h(d,c,o);if(l!==!0)throw new t("option "+c+" must be "+l,t.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new t("Unknown option "+c,t.ERR_BAD_OPTION)}}return qa={assertOptions:i,validators:r},qa}var Ga,Qc;function xy(){if(Qc)return Ga;Qc=1;var e=et(),t=Jd(),r=dy(),n=Sy(),i=nh(),o=th(),s=Ty(),a=s.validators;function u(f){this.defaults=f,this.interceptors={request:new r,response:new r}}return u.prototype.request=function(c,h){typeof c=="string"?(h=h||{},h.url=c):h=c||{},h=i(this.defaults,h),h.method?h.method=h.method.toLowerCase():this.defaults.method?h.method=this.defaults.method.toLowerCase():h.method="get";var d=h.transitional;d!==void 0&&s.assertOptions(d,{silentJSONParsing:a.transitional(a.boolean),forcedJSONParsing:a.transitional(a.boolean),clarifyTimeoutError:a.transitional(a.boolean)},!1);var l=[],p=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(h)===!1||(p=p&&N.synchronous,l.unshift(N.fulfilled,N.rejected))});var m=[];this.interceptors.response.forEach(function(N){m.push(N.fulfilled,N.rejected)});var b;if(!p){var T=[n,void 0];for(Array.prototype.unshift.apply(T,l),T=T.concat(m),b=Promise.resolve(h);T.length;)b=b.then(T.shift(),T.shift());return b}for(var _=h;l.length;){var E=l.shift(),A=l.shift();try{_=E(_)}catch(w){A(w);break}}try{b=n(_)}catch(w){return Promise.reject(w)}for(;m.length;)b=b.then(m.shift(),m.shift());return b},u.prototype.getUri=function(c){c=i(this.defaults,c);var h=o(c.baseURL,c.url);return t(h,c.params,c.paramsSerializer)},e.forEach(["delete","get","head","options"],function(c){u.prototype[c]=function(h,d){return this.request(i(d||{},{method:c,url:h,data:(d||{}).data}))}}),e.forEach(["post","put","patch"],function(c){function h(d){return function(p,m,b){return this.request(i(b||{},{method:c,headers:d?{"Content-Type":"multipart/form-data"}:{},url:p,data:m}))}}u.prototype[c]=h(),u.prototype[c+"Form"]=h(!0)}),Ga=u,Ga}var Wa,Xc;function Oy(){if(Xc)return Wa;Xc=1;var e=ta();function t(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(s){n=s});var i=this;this.promise.then(function(o){if(i._listeners){var s,a=i._listeners.length;for(s=0;s<a;s++)i._listeners[s](o);i._listeners=null}}),this.promise.then=function(o){var s,a=new Promise(function(u){i.subscribe(u),s=u}).then(o);return a.cancel=function(){i.unsubscribe(s)},a},r(function(s){i.reason||(i.reason=new e(s),n(i.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]},t.prototype.unsubscribe=function(n){if(this._listeners){var i=this._listeners.indexOf(n);i!==-1&&this._listeners.splice(i,1)}},t.source=function(){var n,i=new t(function(s){n=s});return{token:i,cancel:n}},Wa=t,Wa}var Va,Jc;function Ay(){return Jc||(Jc=1,Va=function(t){return function(n){return t.apply(null,n)}}),Va}var za,Zc;function Cy(){if(Zc)return za;Zc=1;var e=et();return za=function(r){return e.isObject(r)&&r.isAxiosError===!0},za}var el;function Ry(){if(el)return lo.exports;el=1;var e=et(),t=Xd(),r=xy(),n=nh(),i=Fu();function o(a){var u=new r(a),f=t(r.prototype.request,u);return e.extend(f,r.prototype,u),e.extend(f,u),f.create=function(h){return o(n(a,h))},f}var s=o(i);return s.Axios=r,s.CanceledError=ta(),s.CancelToken=Oy(),s.isCancel=rh(),s.VERSION=ih().version,s.toFormData=eh(),s.AxiosError=kn(),s.Cancel=s.CanceledError,s.all=function(u){return Promise.all(u)},s.spread=Ay(),s.isAxiosError=Cy(),lo.exports=s,lo.exports.default=s,lo.exports}var Ya,tl;function oh(){return tl||(tl=1,Ya=Ry()),Ya}var Ny=Function.prototype.toString,Ka=Object.create,Py=Object.defineProperty,Iy=Object.getOwnPropertyDescriptor,rl=Object.getOwnPropertyNames,Du=Object.getOwnPropertySymbols,Ly=Object.getPrototypeOf,ah=Object.prototype,My=ah.hasOwnProperty,ky=ah.propertyIsEnumerable,sh=typeof Du=="function",By=typeof WeakMap=="function",Fy=function(){if(By)return function(){return new WeakMap};var e=function(){function t(){this._keys=[],this._values=[]}return t.prototype.has=function(r){return!!~this._keys.indexOf(r)},t.prototype.get=function(r){return this._values[this._keys.indexOf(r)]},t.prototype.set=function(r,n){this._keys.push(r),this._values.push(n)},t}();return function(){return new e}}(),uh=function(e,t){var r=e.__proto__||Ly(e);if(!r)return Ka(null);var n=r.constructor;if(n===t.Object)return r===t.Object.prototype?{}:Ka(r);if(~Ny.call(n).indexOf("[native code]"))try{return new n}catch{}return Ka(r)},Dy=function(e,t,r,n){var i=uh(e,t);n.set(e,i);for(var o in e)My.call(e,o)&&(i[o]=r(e[o],n));if(sh)for(var s=Du(e),a=0,u=s.length,f=void 0;a<u;++a)f=s[a],ky.call(e,f)&&(i[f]=r(e[f],n));return i},nl=function(e,t,r,n){var i=uh(e,t);n.set(e,i);for(var o=sh?rl(e).concat(Du(e)):rl(e),s=0,a=o.length,u=void 0,f=void 0;s<a;++s)if(u=o[s],u!=="callee"&&u!=="caller")if(f=Iy(e,u),f){!f.get&&!f.set&&(f.value=r(e[u],n));try{Py(i,u,f)}catch{i[u]=f.value}}else i[u]=r(e[u],n);return i},Uy=function(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},$y=Array.isArray,jy=Object.getPrototypeOf,Hy=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function Er(e,t){var r=!!(t&&t.isStrict),n=t&&t.realm||Hy,i=r?nl:Dy,o=function(s,a){if(!s||typeof s!="object")return s;if(a.has(s))return a.get(s);var u=s.__proto__||jy(s),f=u&&u.constructor;if(!f||f===n.Object)return i(s,n,o,a);var c;if($y(s)){if(r)return nl(s,n,o,a);c=new f,a.set(s,c);for(var h=0,d=s.length;h<d;++h)c[h]=o(s[h],a);return c}if(s instanceof n.Date)return new f(s.getTime());if(s instanceof n.RegExp)return c=new f(s.source,s.flags||Uy(s)),c.lastIndex=s.lastIndex,c;if(n.Map&&s instanceof n.Map)return c=new f,a.set(s,c),s.forEach(function(l,p){c.set(p,o(l,a))}),c;if(n.Set&&s instanceof n.Set)return c=new f,a.set(s,c),s.forEach(function(l){c.add(o(l,a))}),c;if(n.Blob&&s instanceof n.Blob)return s.slice(0,s.size,s.type);if(n.Buffer&&n.Buffer.isBuffer(s))return c=n.Buffer.allocUnsafe?n.Buffer.allocUnsafe(s.length):new f(s.length),a.set(s,c),s.copy(c),c;if(n.ArrayBuffer){if(n.ArrayBuffer.isView(s))return c=new f(s.buffer.slice(0)),a.set(s,c),c;if(s instanceof n.ArrayBuffer)return c=s.slice(0),a.set(s,c),c}return typeof s.then=="function"||s instanceof Error||n.WeakMap&&s instanceof n.WeakMap||n.WeakSet&&s instanceof n.WeakSet?s:i(s,n,o,a)};return o(e,Fy())}Er.default=Er;Er.strict=function(t,r){return Er(t,{isStrict:!0,realm:r?r.realm:void 0})};var qy=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==i||s.enumerable!==!0)return!1}return!0},il=typeof Symbol<"u"&&Symbol,Gy=qy,Wy=function(){return typeof il!="function"||typeof Symbol!="function"||typeof il("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Gy()},ol={foo:{}},Vy=Object,zy=function(){return{__proto__:ol}.foo===ol.foo&&!({__proto__:null}instanceof Vy)},Yy="Function.prototype.bind called on incompatible ",Ky=Object.prototype.toString,Qy=Math.max,Xy="[object Function]",al=function(t,r){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var o=0;o<r.length;o+=1)n[o+t.length]=r[o];return n},Jy=function(t,r){for(var n=[],i=r||0,o=0;i<t.length;i+=1,o+=1)n[o]=t[i];return n},Zy=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},ev=function(t){var r=this;if(typeof r!="function"||Ky.apply(r)!==Xy)throw new TypeError(Yy+r);for(var n=Jy(arguments,1),i,o=function(){if(this instanceof i){var c=r.apply(this,al(n,arguments));return Object(c)===c?c:this}return r.apply(t,al(n,arguments))},s=Qy(0,r.length-n.length),a=[],u=0;u<s;u++)a[u]="$"+u;if(i=Function("binder","return function ("+Zy(a,",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var f=function(){};f.prototype=r.prototype,i.prototype=new f,f.prototype=null}return i},tv=ev,Uu=Function.prototype.bind||tv,rv=Function.prototype.call,nv=Object.prototype.hasOwnProperty,iv=Uu,ov=iv.call(rv,nv),ge,Nn=SyntaxError,ch=Function,Rn=TypeError,Qa=function(e){try{return ch('"use strict"; return ('+e+").constructor;")()}catch{}},Xr=Object.getOwnPropertyDescriptor;if(Xr)try{Xr({},"")}catch{Xr=null}var Xa=function(){throw new Rn},av=Xr?function(){try{return arguments.callee,Xa}catch{try{return Xr(arguments,"callee").get}catch{return Xa}}}():Xa,wn=Wy(),sv=zy(),ze=Object.getPrototypeOf||(sv?function(e){return e.__proto__}:null),On={},uv=typeof Uint8Array>"u"||!ze?ge:ze(Uint8Array),Jr={"%AggregateError%":typeof AggregateError>"u"?ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ge:ArrayBuffer,"%ArrayIteratorPrototype%":wn&&ze?ze([][Symbol.iterator]()):ge,"%AsyncFromSyncIteratorPrototype%":ge,"%AsyncFunction%":On,"%AsyncGenerator%":On,"%AsyncGeneratorFunction%":On,"%AsyncIteratorPrototype%":On,"%Atomics%":typeof Atomics>"u"?ge:Atomics,"%BigInt%":typeof BigInt>"u"?ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ge:FinalizationRegistry,"%Function%":ch,"%GeneratorFunction%":On,"%Int8Array%":typeof Int8Array>"u"?ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":wn&&ze?ze(ze([][Symbol.iterator]())):ge,"%JSON%":typeof JSON=="object"?JSON:ge,"%Map%":typeof Map>"u"?ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!wn||!ze?ge:ze(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ge:Promise,"%Proxy%":typeof Proxy>"u"?ge:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!wn||!ze?ge:ze(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":wn&&ze?ze(""[Symbol.iterator]()):ge,"%Symbol%":wn?Symbol:ge,"%SyntaxError%":Nn,"%ThrowTypeError%":av,"%TypedArray%":uv,"%TypeError%":Rn,"%Uint8Array%":typeof Uint8Array>"u"?ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ge:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ge:WeakSet};if(ze)try{null.error}catch(e){var cv=ze(ze(e));Jr["%Error.prototype%"]=cv}var lv=function e(t){var r;if(t==="%AsyncFunction%")r=Qa("async function () {}");else if(t==="%GeneratorFunction%")r=Qa("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Qa("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&ze&&(r=ze(i.prototype))}return Jr[t]=r,r},sl={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Zi=Uu,jo=ov,fv=Zi.call(Function.call,Array.prototype.concat),dv=Zi.call(Function.apply,Array.prototype.splice),ul=Zi.call(Function.call,String.prototype.replace),Ho=Zi.call(Function.call,String.prototype.slice),hv=Zi.call(Function.call,RegExp.prototype.exec),pv=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,mv=/\\(\\)?/g,gv=function(t){var r=Ho(t,0,1),n=Ho(t,-1);if(r==="%"&&n!=="%")throw new Nn("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Nn("invalid intrinsic syntax, expected opening `%`");var i=[];return ul(t,pv,function(o,s,a,u){i[i.length]=a?ul(u,mv,"$1"):s||o}),i},yv=function(t,r){var n=t,i;if(jo(sl,n)&&(i=sl[n],n="%"+i[0]+"%"),jo(Jr,n)){var o=Jr[n];if(o===On&&(o=lv(n)),typeof o>"u"&&!r)throw new Rn("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new Nn("intrinsic "+t+" does not exist!")},nn=function(t,r){if(typeof t!="string"||t.length===0)throw new Rn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Rn('"allowMissing" argument must be a boolean');if(hv(/^%?[^%]*%?$/,t)===null)throw new Nn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=gv(t),i=n.length>0?n[0]:"",o=yv("%"+i+"%",r),s=o.name,a=o.value,u=!1,f=o.alias;f&&(i=f[0],dv(n,fv([0,1],f)));for(var c=1,h=!0;c<n.length;c+=1){var d=n[c],l=Ho(d,0,1),p=Ho(d,-1);if((l==='"'||l==="'"||l==="`"||p==='"'||p==="'"||p==="`")&&l!==p)throw new Nn("property names with quotes must have matching quotes");if((d==="constructor"||!h)&&(u=!0),i+="."+d,s="%"+i+"%",jo(Jr,s))a=Jr[s];else if(a!=null){if(!(d in a)){if(!r)throw new Rn("base intrinsic for "+t+" exists, but the property is not available.");return}if(Xr&&c+1>=n.length){var m=Xr(a,d);h=!!m,h&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else h=jo(a,d),a=a[d];h&&!u&&(Jr[s]=a)}}return a},lh={exports:{}},vv=nn,iu=vv("%Object.defineProperty%",!0),ou=function(){if(iu)try{return iu({},"a",{value:1}),!0}catch{return!1}return!1};ou.hasArrayLengthDefineBug=function(){if(!ou())return null;try{return iu([],"length",{value:1}).length!==1}catch{return!0}};var fh=ou,_v=nn,Fo=_v("%Object.getOwnPropertyDescriptor%",!0);if(Fo)try{Fo([],"length")}catch{Fo=null}var dh=Fo,Ev=fh(),$u=nn,qi=Ev&&$u("%Object.defineProperty%",!0);if(qi)try{qi({},"a",{value:1})}catch{qi=!1}var bv=$u("%SyntaxError%"),Sn=$u("%TypeError%"),cl=dh,wv=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new Sn("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Sn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Sn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Sn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Sn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Sn("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,u=!!cl&&cl(t,r);if(qi)qi(t,r,{configurable:s===null&&u?u.configurable:!s,enumerable:i===null&&u?u.enumerable:!i,value:n,writable:o===null&&u?u.writable:!o});else if(a||!i&&!o&&!s)t[r]=n;else throw new bv("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},hh=nn,ll=wv,Sv=fh(),fl=dh,dl=hh("%TypeError%"),Tv=hh("%Math.floor%"),xv=function(t,r){if(typeof t!="function")throw new dl("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||Tv(r)!==r)throw new dl("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in t&&fl){var s=fl(t,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(o=!1)}return(i||o||!n)&&(Sv?ll(t,"length",r,!0,!0):ll(t,"length",r)),t};(function(e){var t=Uu,r=nn,n=xv,i=r("%TypeError%"),o=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||t.call(s,o),u=r("%Object.defineProperty%",!0),f=r("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var l=a(t,s,arguments);return n(l,1+f(0,d.length-(arguments.length-1)),!0)};var c=function(){return a(t,o,arguments)};u?u(e.exports,"apply",{value:c}):e.exports.apply=c})(lh);var Ov=lh.exports,ph=nn,mh=Ov,Av=mh(ph("String.prototype.indexOf")),Cv=function(t,r){var n=ph(t,!!r);return typeof n=="function"&&Av(t,".prototype.")>-1?mh(n):n};const Rv={},Nv=Object.freeze(Object.defineProperty({__proto__:null,default:Rv},Symbol.toStringTag,{value:"Module"})),Pv=Ji(Nv);var ju=typeof Map=="function"&&Map.prototype,Ja=Object.getOwnPropertyDescriptor&&ju?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,qo=ju&&Ja&&typeof Ja.get=="function"?Ja.get:null,hl=ju&&Map.prototype.forEach,Hu=typeof Set=="function"&&Set.prototype,Za=Object.getOwnPropertyDescriptor&&Hu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Go=Hu&&Za&&typeof Za.get=="function"?Za.get:null,pl=Hu&&Set.prototype.forEach,Iv=typeof WeakMap=="function"&&WeakMap.prototype,Gi=Iv?WeakMap.prototype.has:null,Lv=typeof WeakSet=="function"&&WeakSet.prototype,Wi=Lv?WeakSet.prototype.has:null,Mv=typeof WeakRef=="function"&&WeakRef.prototype,ml=Mv?WeakRef.prototype.deref:null,kv=Boolean.prototype.valueOf,Bv=Object.prototype.toString,Fv=Function.prototype.toString,Dv=String.prototype.match,qu=String.prototype.slice,vr=String.prototype.replace,Uv=String.prototype.toUpperCase,gl=String.prototype.toLowerCase,gh=RegExp.prototype.test,yl=Array.prototype.concat,$t=Array.prototype.join,$v=Array.prototype.slice,vl=Math.floor,au=typeof BigInt=="function"?BigInt.prototype.valueOf:null,es=Object.getOwnPropertySymbols,su=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Pn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",nt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Pn||"symbol")?Symbol.toStringTag:null,yh=Object.prototype.propertyIsEnumerable,_l=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function El(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||gh.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-vl(-e):vl(e);if(n!==e){var i=String(n),o=qu.call(t,i.length+1);return vr.call(i,r,"$&_")+"."+vr.call(vr.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return vr.call(t,r,"$&_")}var uu=Pv,bl=uu.custom,wl=_h(bl)?bl:null,jv=function e(t,r,n,i){var o=r||{};if(yr(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(yr(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=yr(o,"customInspect")?o.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(yr(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(yr(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return bh(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return a?El(t,u):u}if(typeof t=="bigint"){var f=String(t)+"n";return a?El(t,f):f}var c=typeof o.depth>"u"?5:o.depth;if(typeof n>"u"&&(n=0),n>=c&&c>0&&typeof t=="object")return cu(t)?"[Array]":"[Object]";var h=o0(o,n);if(typeof i>"u")i=[];else if(Eh(i,t)>=0)return"[Circular]";function d(Y,te,K){if(te&&(i=$v.call(i),i.push(te)),K){var M={depth:o.depth};return yr(o,"quoteStyle")&&(M.quoteStyle=o.quoteStyle),e(Y,M,n+1,i)}return e(Y,o,n+1,i)}if(typeof t=="function"&&!Sl(t)){var l=Qv(t),p=fo(t,d);return"[Function"+(l?": "+l:" (anonymous)")+"]"+(p.length>0?" { "+$t.call(p,", ")+" }":"")}if(_h(t)){var m=Pn?vr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):su.call(t);return typeof t=="object"&&!Pn?gi(m):m}if(r0(t)){for(var b="<"+gl.call(String(t.nodeName)),T=t.attributes||[],_=0;_<T.length;_++)b+=" "+T[_].name+"="+vh(Hv(T[_].value),"double",o);return b+=">",t.childNodes&&t.childNodes.length&&(b+="..."),b+="</"+gl.call(String(t.nodeName))+">",b}if(cu(t)){if(t.length===0)return"[]";var E=fo(t,d);return h&&!i0(E)?"["+lu(E,h)+"]":"[ "+$t.call(E,", ")+" ]"}if(Gv(t)){var A=fo(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!yh.call(t,"cause")?"{ ["+String(t)+"] "+$t.call(yl.call("[cause]: "+d(t.cause),A),", ")+" }":A.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+$t.call(A,", ")+" }"}if(typeof t=="object"&&s){if(wl&&typeof t[wl]=="function"&&uu)return uu(t,{depth:c-n});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Xv(t)){var w=[];return hl&&hl.call(t,function(Y,te){w.push(d(te,t,!0)+" => "+d(Y,t))}),Tl("Map",qo.call(t),w,h)}if(e0(t)){var N=[];return pl&&pl.call(t,function(Y){N.push(d(Y,t))}),Tl("Set",Go.call(t),N,h)}if(Jv(t))return ts("WeakMap");if(t0(t))return ts("WeakSet");if(Zv(t))return ts("WeakRef");if(Vv(t))return gi(d(Number(t)));if(Yv(t))return gi(d(au.call(t)));if(zv(t))return gi(kv.call(t));if(Wv(t))return gi(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===ce)return"{ [object globalThis] }";if(!qv(t)&&!Sl(t)){var F=fo(t,d),B=_l?_l(t)===Object.prototype:t instanceof Object||t.constructor===Object,G=t instanceof Object?"":"null prototype",W=!B&&nt&&Object(t)===t&&nt in t?qu.call(wr(t),8,-1):G?"Object":"",z=B||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",$=z+(W||G?"["+$t.call(yl.call([],W||[],G||[]),": ")+"] ":"");return F.length===0?$+"{}":h?$+"{"+lu(F,h)+"}":$+"{ "+$t.call(F,", ")+" }"}return String(t)};function vh(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function Hv(e){return vr.call(String(e),/"/g,"&quot;")}function cu(e){return wr(e)==="[object Array]"&&(!nt||!(typeof e=="object"&&nt in e))}function qv(e){return wr(e)==="[object Date]"&&(!nt||!(typeof e=="object"&&nt in e))}function Sl(e){return wr(e)==="[object RegExp]"&&(!nt||!(typeof e=="object"&&nt in e))}function Gv(e){return wr(e)==="[object Error]"&&(!nt||!(typeof e=="object"&&nt in e))}function Wv(e){return wr(e)==="[object String]"&&(!nt||!(typeof e=="object"&&nt in e))}function Vv(e){return wr(e)==="[object Number]"&&(!nt||!(typeof e=="object"&&nt in e))}function zv(e){return wr(e)==="[object Boolean]"&&(!nt||!(typeof e=="object"&&nt in e))}function _h(e){if(Pn)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!su)return!1;try{return su.call(e),!0}catch{}return!1}function Yv(e){if(!e||typeof e!="object"||!au)return!1;try{return au.call(e),!0}catch{}return!1}var Kv=Object.prototype.hasOwnProperty||function(e){return e in this};function yr(e,t){return Kv.call(e,t)}function wr(e){return Bv.call(e)}function Qv(e){if(e.name)return e.name;var t=Dv.call(Fv.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Eh(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Xv(e){if(!qo||!e||typeof e!="object")return!1;try{qo.call(e);try{Go.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Jv(e){if(!Gi||!e||typeof e!="object")return!1;try{Gi.call(e,Gi);try{Wi.call(e,Wi)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Zv(e){if(!ml||!e||typeof e!="object")return!1;try{return ml.call(e),!0}catch{}return!1}function e0(e){if(!Go||!e||typeof e!="object")return!1;try{Go.call(e);try{qo.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function t0(e){if(!Wi||!e||typeof e!="object")return!1;try{Wi.call(e,Wi);try{Gi.call(e,Gi)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function r0(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function bh(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return bh(qu.call(e,0,t.maxStringLength),t)+n}var i=vr.call(vr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,n0);return vh(i,"single",t)}function n0(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+Uv.call(t.toString(16))}function gi(e){return"Object("+e+")"}function ts(e){return e+" { ? }"}function Tl(e,t,r,n){var i=n?lu(r,n):$t.call(r,", ");return e+" ("+t+") {"+i+"}"}function i0(e){for(var t=0;t<e.length;t++)if(Eh(e[t],`
26
26
  `)>=0)return!1;return!0}function o0(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=$t.call(Array(e.indent+1)," ");else return null;return{base:r,prev:$t.call(Array(t+1),r)}}function lu(e,t){if(e.length===0)return"";var r=`
27
27
  `+t.prev+t.base;return r+$t.call(e,","+r)+`
28
- `+t.prev}function fo(e,t){var r=cu(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=yr(e,i)?t(e[i],e):""}var o=typeof es=="function"?es(e):[],s;if(Pn){s={};for(var a=0;a<o.length;a++)s["$"+o[a]]=o[a]}for(var u in e)yr(e,u)&&(r&&String(Number(u))===u&&u<e.length||Pn&&s["$"+u]instanceof Symbol||(gh.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if(typeof es=="function")for(var f=0;f<o.length;f++)yh.call(e,o[f])&&n.push("["+t(o[f])+"]: "+t(e[o[f]],e));return n}var Gu=nn,Bn=Cv,a0=jv,s0=Gu("%TypeError%"),ho=Gu("%WeakMap%",!0),po=Gu("%Map%",!0),u0=Bn("WeakMap.prototype.get",!0),c0=Bn("WeakMap.prototype.set",!0),l0=Bn("WeakMap.prototype.has",!0),f0=Bn("Map.prototype.get",!0),d0=Bn("Map.prototype.set",!0),h0=Bn("Map.prototype.has",!0),Wu=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},p0=function(e,t){var r=Wu(e,t);return r&&r.value},m0=function(e,t,r){var n=Wu(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},g0=function(e,t){return!!Wu(e,t)},y0=function(){var t,r,n,i={assert:function(o){if(!i.has(o))throw new s0("Side channel does not contain "+a0(o))},get:function(o){if(ho&&o&&(typeof o=="object"||typeof o=="function")){if(t)return u0(t,o)}else if(po){if(r)return f0(r,o)}else if(n)return p0(n,o)},has:function(o){if(ho&&o&&(typeof o=="object"||typeof o=="function")){if(t)return l0(t,o)}else if(po){if(r)return h0(r,o)}else if(n)return g0(n,o);return!1},set:function(o,s){ho&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new ho),c0(t,o,s)):po?(r||(r=new po),d0(r,o,s)):(n||(n={key:{},next:null}),m0(n,o,s))}};return i},v0=String.prototype.replace,_0=/%20/g,rs={RFC1738:"RFC1738",RFC3986:"RFC3986"},Vu={default:rs.RFC3986,formatters:{RFC1738:function(e){return v0.call(e,_0,"+")},RFC3986:function(e){return String(e)}},RFC1738:rs.RFC1738,RFC3986:rs.RFC3986},E0=Vu,ns=Object.prototype.hasOwnProperty,Kr=Array.isArray,Bt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),b0=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(Kr(n)){for(var i=[],o=0;o<n.length;++o)typeof n[o]<"u"&&i.push(n[o]);r.obj[r.prop]=i}}},wh=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(n[i]=t[i]);return n},w0=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(Kr(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!ns.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return Kr(t)&&!Kr(r)&&(i=wh(t,n)),Kr(t)&&Kr(r)?(r.forEach(function(o,s){if(ns.call(t,s)){var a=t[s];a&&typeof a=="object"&&o&&typeof o=="object"?t[s]=e(a,o,n):t.push(o)}else t[s]=o}),t):Object.keys(r).reduce(function(o,s){var a=r[s];return ns.call(o,s)?o[s]=e(o[s],a,n):o[s]=a,o},i)},S0=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},T0=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},x0=function(t,r,n,i,o){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),n==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(c){return"%26%23"+parseInt(c.slice(2),16)+"%3B"});for(var a="",u=0;u<s.length;++u){var f=s.charCodeAt(u);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||o===E0.RFC1738&&(f===40||f===41)){a+=s.charAt(u);continue}if(f<128){a=a+Bt[f];continue}if(f<2048){a=a+(Bt[192|f>>6]+Bt[128|f&63]);continue}if(f<55296||f>=57344){a=a+(Bt[224|f>>12]+Bt[128|f>>6&63]+Bt[128|f&63]);continue}u+=1,f=65536+((f&1023)<<10|s.charCodeAt(u)&1023),a+=Bt[240|f>>18]+Bt[128|f>>12&63]+Bt[128|f>>6&63]+Bt[128|f&63]}return a},O0=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var o=r[i],s=o.obj[o.prop],a=Object.keys(s),u=0;u<a.length;++u){var f=a[u],c=s[f];typeof c=="object"&&c!==null&&n.indexOf(c)===-1&&(r.push({obj:s,prop:f}),n.push(c))}return b0(r),t},A0=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},C0=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},R0=function(t,r){return[].concat(t,r)},N0=function(t,r){if(Kr(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},Sh={arrayToObject:wh,assign:S0,combine:R0,compact:O0,decode:T0,encode:x0,isBuffer:C0,isRegExp:A0,maybeMap:N0,merge:w0},Th=y0,Do=Sh,Vi=Vu,P0=Object.prototype.hasOwnProperty,xl={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},ir=Array.isArray,I0=Array.prototype.push,xh=function(e,t){I0.apply(e,ir(t)?t:[t])},L0=Date.prototype.toISOString,Ol=Vi.default,rt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Do.encode,encodeValuesOnly:!1,format:Ol,formatter:Vi.formatters[Ol],indices:!1,serializeDate:function(t){return L0.call(t)},skipNulls:!1,strictNullHandling:!1},k0=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},is={},M0=function e(t,r,n,i,o,s,a,u,f,c,h,d,l,p,m,b){for(var T=t,_=b,E=0,A=!1;(_=_.get(is))!==void 0&&!A;){var w=_.get(t);if(E+=1,typeof w<"u"){if(w===E)throw new RangeError("Cyclic object value");A=!0}typeof _.get(is)>"u"&&(E=0)}if(typeof u=="function"?T=u(r,T):T instanceof Date?T=h(T):n==="comma"&&ir(T)&&(T=Do.maybeMap(T,function(k){return k instanceof Date?h(k):k})),T===null){if(o)return a&&!p?a(r,rt.encoder,m,"key",d):r;T=""}if(k0(T)||Do.isBuffer(T)){if(a){var N=p?r:a(r,rt.encoder,m,"key",d);return[l(N)+"="+l(a(T,rt.encoder,m,"value",d))]}return[l(r)+"="+l(String(T))]}var F=[];if(typeof T>"u")return F;var B;if(n==="comma"&&ir(T))p&&a&&(T=Do.maybeMap(T,a)),B=[{value:T.length>0?T.join(",")||null:void 0}];else if(ir(u))B=u;else{var G=Object.keys(T);B=f?G.sort(f):G}for(var W=i&&ir(T)&&T.length===1?r+"[]":r,z=0;z<B.length;++z){var $=B[z],Y=typeof $=="object"&&typeof $.value<"u"?$.value:T[$];if(!(s&&Y===null)){var te=ir(T)?typeof n=="function"?n(W,$):W:W+(c?"."+$:"["+$+"]");b.set(t,E);var K=Th();K.set(is,b),xh(F,e(Y,te,n,i,o,s,n==="comma"&&p&&ir(T)?null:a,u,f,c,h,d,l,p,m,K))}}return F},B0=function(t){if(!t)return rt;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||rt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Vi.default;if(typeof t.format<"u"){if(!P0.call(Vi.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=Vi.formatters[n],o=rt.filter;return(typeof t.filter=="function"||ir(t.filter))&&(o=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:rt.addQueryPrefix,allowDots:typeof t.allowDots>"u"?rt.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:rt.charsetSentinel,delimiter:typeof t.delimiter>"u"?rt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:rt.encode,encoder:typeof t.encoder=="function"?t.encoder:rt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:rt.encodeValuesOnly,filter:o,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:rt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:rt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:rt.strictNullHandling}},F0=function(e,t){var r=e,n=B0(t),i,o;typeof n.filter=="function"?(o=n.filter,r=o("",r)):ir(n.filter)&&(o=n.filter,i=o);var s=[];if(typeof r!="object"||r===null)return"";var a;t&&t.arrayFormat in xl?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var u=xl[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=u==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var c=Th(),h=0;h<i.length;++h){var d=i[h];n.skipNulls&&r[d]===null||xh(s,M0(r[d],d,u,f,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,c))}var l=s.join(n.delimiter),p=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),l.length>0?p+l:""},In=Sh,fu=Object.prototype.hasOwnProperty,D0=Array.isArray,Ve={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:In.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},U0=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Oh=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},$0="utf8=%26%2310003%3B",j0="utf8=%E2%9C%93",H0=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=r.parameterLimit===1/0?void 0:r.parameterLimit,s=i.split(r.delimiter,o),a=-1,u,f=r.charset;if(r.charsetSentinel)for(u=0;u<s.length;++u)s[u].indexOf("utf8=")===0&&(s[u]===j0?f="utf-8":s[u]===$0&&(f="iso-8859-1"),a=u,u=s.length);for(u=0;u<s.length;++u)if(u!==a){var c=s[u],h=c.indexOf("]="),d=h===-1?c.indexOf("="):h+1,l,p;d===-1?(l=r.decoder(c,Ve.decoder,f,"key"),p=r.strictNullHandling?null:""):(l=r.decoder(c.slice(0,d),Ve.decoder,f,"key"),p=In.maybeMap(Oh(c.slice(d+1),r),function(m){return r.decoder(m,Ve.decoder,f,"value")})),p&&r.interpretNumericEntities&&f==="iso-8859-1"&&(p=U0(p)),c.indexOf("[]=")>-1&&(p=D0(p)?[p]:p),fu.call(n,l)?n[l]=In.combine(n[l],p):n[l]=p}return n},q0=function(e,t,r,n){for(var i=n?t:Oh(t,r),o=e.length-1;o>=0;--o){var s,a=e[o];if(a==="[]"&&r.parseArrays)s=[].concat(i);else{s=r.plainObjects?Object.create(null):{};var u=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,f=parseInt(u,10);!r.parseArrays&&u===""?s={0:i}:!isNaN(f)&&a!==u&&String(f)===u&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(s=[],s[f]=i):u!=="__proto__"&&(s[u]=i)}i=s}return i},G0=function(t,r,n,i){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,u=n.depth>0&&s.exec(o),f=u?o.slice(0,u.index):o,c=[];if(f){if(!n.plainObjects&&fu.call(Object.prototype,f)&&!n.allowPrototypes)return;c.push(f)}for(var h=0;n.depth>0&&(u=a.exec(o))!==null&&h<n.depth;){if(h+=1,!n.plainObjects&&fu.call(Object.prototype,u[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(u[1])}return u&&c.push("["+o.slice(u.index)+"]"),q0(c,r,n,i)}},W0=function(t){if(!t)return Ve;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?Ve.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ve.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ve.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ve.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ve.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ve.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ve.comma,decoder:typeof t.decoder=="function"?t.decoder:Ve.decoder,delimiter:typeof t.delimiter=="string"||In.isRegExp(t.delimiter)?t.delimiter:Ve.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ve.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ve.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ve.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ve.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ve.strictNullHandling}},V0=function(e,t){var r=W0(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?H0(e,r):e,i=r.plainObjects?Object.create(null):{},o=Object.keys(n),s=0;s<o.length;++s){var a=o[s],u=G0(a,n[a],r,typeof e=="string");i=In.merge(i,u,r)}return r.allowSparse===!0?i:In.compact(i)},z0=F0,Y0=V0,K0=Vu,Q0={formats:K0,parse:Y0,stringify:z0};const X0=qt(Q0);var J0="[object String]",Z0=Object.prototype,e_=Z0.toString,t_=Array.isArray;function r_(e){return!!e&&typeof e=="object"}function n_(e){return typeof e=="string"||!t_(e)&&r_(e)&&e_.call(e)==J0}var i_=n_;const Al=qt(i_);var zu={exports:{}};class Ah extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}}const o_=({limit:e,interval:t,strict:r})=>{if(!Number.isFinite(e))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(t))throw new TypeError("Expected `interval` to be a finite number");const n=new Map;let i=0,o=0;function s(){const c=Date.now();return c-i>t?(o=1,i=c,0):(o<e?o++:(i+=t,o=1),i-c)}const a=[];function u(){const c=Date.now();if(a.length<e)return a.push(c),0;const h=a.shift()+t;return c>=h?(a.push(c),0):(a.push(h),h-c)}const f=r?u:s;return c=>{const h=function(...d){if(!h.isEnabled)return(async()=>c.apply(this,d))();let l;return new Promise((p,m)=>{l=setTimeout(()=>{p(c.apply(this,d)),n.delete(l)},f()),n.set(l,m)})};return h.abort=()=>{for(const d of n.keys())clearTimeout(d),n.get(d)(new Ah);n.clear(),a.splice(0,a.length)},h.isEnabled=!0,h}};zu.exports=o_;zu.exports.AbortError=Ah;var a_=zu.exports;const s_=qt(a_);var u_="[object Object]";function c_(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function l_(e,t){return function(r){return e(t(r))}}var f_=Function.prototype,Ch=Object.prototype,Rh=f_.toString,d_=Ch.hasOwnProperty,h_=Rh.call(Object),p_=Ch.toString,m_=l_(Object.getPrototypeOf,Object);function g_(e){return!!e&&typeof e=="object"}function y_(e){if(!g_(e)||p_.call(e)!=u_||c_(e))return!1;var t=m_(e);if(t===null)return!0;var r=d_.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Rh.call(r)==h_}var v_=y_;const mo=qt(v_);function __(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,s,a=[],u=!0,f=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);u=!0);}catch(c){f=!0,i=c}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return a}}function Cl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function An(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cl(Object(r),!0).forEach(function(n){E_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function du(e){"@babel/helpers - typeof";return du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},du(e)}function hu(){hu=function(i,o){return new r(i,void 0,o)};var e=RegExp.prototype,t=new WeakMap;function r(i,o,s){var a=new RegExp(i,o);return t.set(a,s||t.get(i)),Wo(a,r.prototype)}function n(i,o){var s=t.get(o);return Object.keys(s).reduce(function(a,u){var f=s[u];if(typeof f=="number")a[u]=i[f];else{for(var c=0;i[f[c]]===void 0&&c+1<f.length;)c++;a[u]=i[f[c]]}return a},Object.create(null))}return b_(r,RegExp),r.prototype.exec=function(i){var o=e.exec.call(this,i);if(o){o.groups=n(o,this);var s=o.indices;s&&(s.groups=n(s,this))}return o},r.prototype[Symbol.replace]=function(i,o){if(typeof o=="string"){var s=t.get(this);return e[Symbol.replace].call(this,i,o.replace(/\$<([^>]+)>/g,function(u,f){var c=s[f];return"$"+(Array.isArray(c)?c.join("$"):c)}))}if(typeof o=="function"){var a=this;return e[Symbol.replace].call(this,i,function(){var u=arguments;return typeof u[u.length-1]!="object"&&(u=[].slice.call(u)).push(n(u,a)),o.apply(this,u)})}return e[Symbol.replace].call(this,i,o)},hu.apply(this,arguments)}function E_(e,t,r){return t=A_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b_(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wo(e,t)}function Wo(e,t){return Wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Wo(e,t)}function w_(e,t){return S_(e)||__(e,t)||Nh(e,t)||T_()}function S_(e){if(Array.isArray(e))return e}function Nh(e,t){if(e){if(typeof e=="string")return Rl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rl(e,t)}}function Rl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function T_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
28
+ `+t.prev}function fo(e,t){var r=cu(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=yr(e,i)?t(e[i],e):""}var o=typeof es=="function"?es(e):[],s;if(Pn){s={};for(var a=0;a<o.length;a++)s["$"+o[a]]=o[a]}for(var u in e)yr(e,u)&&(r&&String(Number(u))===u&&u<e.length||Pn&&s["$"+u]instanceof Symbol||(gh.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if(typeof es=="function")for(var f=0;f<o.length;f++)yh.call(e,o[f])&&n.push("["+t(o[f])+"]: "+t(e[o[f]],e));return n}var Gu=nn,Bn=Cv,a0=jv,s0=Gu("%TypeError%"),ho=Gu("%WeakMap%",!0),po=Gu("%Map%",!0),u0=Bn("WeakMap.prototype.get",!0),c0=Bn("WeakMap.prototype.set",!0),l0=Bn("WeakMap.prototype.has",!0),f0=Bn("Map.prototype.get",!0),d0=Bn("Map.prototype.set",!0),h0=Bn("Map.prototype.has",!0),Wu=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},p0=function(e,t){var r=Wu(e,t);return r&&r.value},m0=function(e,t,r){var n=Wu(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},g0=function(e,t){return!!Wu(e,t)},y0=function(){var t,r,n,i={assert:function(o){if(!i.has(o))throw new s0("Side channel does not contain "+a0(o))},get:function(o){if(ho&&o&&(typeof o=="object"||typeof o=="function")){if(t)return u0(t,o)}else if(po){if(r)return f0(r,o)}else if(n)return p0(n,o)},has:function(o){if(ho&&o&&(typeof o=="object"||typeof o=="function")){if(t)return l0(t,o)}else if(po){if(r)return h0(r,o)}else if(n)return g0(n,o);return!1},set:function(o,s){ho&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new ho),c0(t,o,s)):po?(r||(r=new po),d0(r,o,s)):(n||(n={key:{},next:null}),m0(n,o,s))}};return i},v0=String.prototype.replace,_0=/%20/g,rs={RFC1738:"RFC1738",RFC3986:"RFC3986"},Vu={default:rs.RFC3986,formatters:{RFC1738:function(e){return v0.call(e,_0,"+")},RFC3986:function(e){return String(e)}},RFC1738:rs.RFC1738,RFC3986:rs.RFC3986},E0=Vu,ns=Object.prototype.hasOwnProperty,Kr=Array.isArray,Bt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),b0=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(Kr(n)){for(var i=[],o=0;o<n.length;++o)typeof n[o]<"u"&&i.push(n[o]);r.obj[r.prop]=i}}},wh=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(n[i]=t[i]);return n},w0=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(Kr(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!ns.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return Kr(t)&&!Kr(r)&&(i=wh(t,n)),Kr(t)&&Kr(r)?(r.forEach(function(o,s){if(ns.call(t,s)){var a=t[s];a&&typeof a=="object"&&o&&typeof o=="object"?t[s]=e(a,o,n):t.push(o)}else t[s]=o}),t):Object.keys(r).reduce(function(o,s){var a=r[s];return ns.call(o,s)?o[s]=e(o[s],a,n):o[s]=a,o},i)},S0=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},T0=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},x0=function(t,r,n,i,o){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),n==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(c){return"%26%23"+parseInt(c.slice(2),16)+"%3B"});for(var a="",u=0;u<s.length;++u){var f=s.charCodeAt(u);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||o===E0.RFC1738&&(f===40||f===41)){a+=s.charAt(u);continue}if(f<128){a=a+Bt[f];continue}if(f<2048){a=a+(Bt[192|f>>6]+Bt[128|f&63]);continue}if(f<55296||f>=57344){a=a+(Bt[224|f>>12]+Bt[128|f>>6&63]+Bt[128|f&63]);continue}u+=1,f=65536+((f&1023)<<10|s.charCodeAt(u)&1023),a+=Bt[240|f>>18]+Bt[128|f>>12&63]+Bt[128|f>>6&63]+Bt[128|f&63]}return a},O0=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var o=r[i],s=o.obj[o.prop],a=Object.keys(s),u=0;u<a.length;++u){var f=a[u],c=s[f];typeof c=="object"&&c!==null&&n.indexOf(c)===-1&&(r.push({obj:s,prop:f}),n.push(c))}return b0(r),t},A0=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},C0=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},R0=function(t,r){return[].concat(t,r)},N0=function(t,r){if(Kr(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},Sh={arrayToObject:wh,assign:S0,combine:R0,compact:O0,decode:T0,encode:x0,isBuffer:C0,isRegExp:A0,maybeMap:N0,merge:w0},Th=y0,Do=Sh,Vi=Vu,P0=Object.prototype.hasOwnProperty,xl={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},ir=Array.isArray,I0=Array.prototype.push,xh=function(e,t){I0.apply(e,ir(t)?t:[t])},L0=Date.prototype.toISOString,Ol=Vi.default,rt={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Do.encode,encodeValuesOnly:!1,format:Ol,formatter:Vi.formatters[Ol],indices:!1,serializeDate:function(t){return L0.call(t)},skipNulls:!1,strictNullHandling:!1},M0=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},is={},k0=function e(t,r,n,i,o,s,a,u,f,c,h,d,l,p,m,b){for(var T=t,_=b,E=0,A=!1;(_=_.get(is))!==void 0&&!A;){var w=_.get(t);if(E+=1,typeof w<"u"){if(w===E)throw new RangeError("Cyclic object value");A=!0}typeof _.get(is)>"u"&&(E=0)}if(typeof u=="function"?T=u(r,T):T instanceof Date?T=h(T):n==="comma"&&ir(T)&&(T=Do.maybeMap(T,function(M){return M instanceof Date?h(M):M})),T===null){if(o)return a&&!p?a(r,rt.encoder,m,"key",d):r;T=""}if(M0(T)||Do.isBuffer(T)){if(a){var N=p?r:a(r,rt.encoder,m,"key",d);return[l(N)+"="+l(a(T,rt.encoder,m,"value",d))]}return[l(r)+"="+l(String(T))]}var F=[];if(typeof T>"u")return F;var B;if(n==="comma"&&ir(T))p&&a&&(T=Do.maybeMap(T,a)),B=[{value:T.length>0?T.join(",")||null:void 0}];else if(ir(u))B=u;else{var G=Object.keys(T);B=f?G.sort(f):G}for(var W=i&&ir(T)&&T.length===1?r+"[]":r,z=0;z<B.length;++z){var $=B[z],Y=typeof $=="object"&&typeof $.value<"u"?$.value:T[$];if(!(s&&Y===null)){var te=ir(T)?typeof n=="function"?n(W,$):W:W+(c?"."+$:"["+$+"]");b.set(t,E);var K=Th();K.set(is,b),xh(F,e(Y,te,n,i,o,s,n==="comma"&&p&&ir(T)?null:a,u,f,c,h,d,l,p,m,K))}}return F},B0=function(t){if(!t)return rt;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||rt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Vi.default;if(typeof t.format<"u"){if(!P0.call(Vi.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=Vi.formatters[n],o=rt.filter;return(typeof t.filter=="function"||ir(t.filter))&&(o=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:rt.addQueryPrefix,allowDots:typeof t.allowDots>"u"?rt.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:rt.charsetSentinel,delimiter:typeof t.delimiter>"u"?rt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:rt.encode,encoder:typeof t.encoder=="function"?t.encoder:rt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:rt.encodeValuesOnly,filter:o,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:rt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:rt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:rt.strictNullHandling}},F0=function(e,t){var r=e,n=B0(t),i,o;typeof n.filter=="function"?(o=n.filter,r=o("",r)):ir(n.filter)&&(o=n.filter,i=o);var s=[];if(typeof r!="object"||r===null)return"";var a;t&&t.arrayFormat in xl?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var u=xl[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=u==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var c=Th(),h=0;h<i.length;++h){var d=i[h];n.skipNulls&&r[d]===null||xh(s,k0(r[d],d,u,f,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,c))}var l=s.join(n.delimiter),p=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),l.length>0?p+l:""},In=Sh,fu=Object.prototype.hasOwnProperty,D0=Array.isArray,Ve={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:In.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},U0=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Oh=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},$0="utf8=%26%2310003%3B",j0="utf8=%E2%9C%93",H0=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=r.parameterLimit===1/0?void 0:r.parameterLimit,s=i.split(r.delimiter,o),a=-1,u,f=r.charset;if(r.charsetSentinel)for(u=0;u<s.length;++u)s[u].indexOf("utf8=")===0&&(s[u]===j0?f="utf-8":s[u]===$0&&(f="iso-8859-1"),a=u,u=s.length);for(u=0;u<s.length;++u)if(u!==a){var c=s[u],h=c.indexOf("]="),d=h===-1?c.indexOf("="):h+1,l,p;d===-1?(l=r.decoder(c,Ve.decoder,f,"key"),p=r.strictNullHandling?null:""):(l=r.decoder(c.slice(0,d),Ve.decoder,f,"key"),p=In.maybeMap(Oh(c.slice(d+1),r),function(m){return r.decoder(m,Ve.decoder,f,"value")})),p&&r.interpretNumericEntities&&f==="iso-8859-1"&&(p=U0(p)),c.indexOf("[]=")>-1&&(p=D0(p)?[p]:p),fu.call(n,l)?n[l]=In.combine(n[l],p):n[l]=p}return n},q0=function(e,t,r,n){for(var i=n?t:Oh(t,r),o=e.length-1;o>=0;--o){var s,a=e[o];if(a==="[]"&&r.parseArrays)s=[].concat(i);else{s=r.plainObjects?Object.create(null):{};var u=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,f=parseInt(u,10);!r.parseArrays&&u===""?s={0:i}:!isNaN(f)&&a!==u&&String(f)===u&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(s=[],s[f]=i):u!=="__proto__"&&(s[u]=i)}i=s}return i},G0=function(t,r,n,i){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,u=n.depth>0&&s.exec(o),f=u?o.slice(0,u.index):o,c=[];if(f){if(!n.plainObjects&&fu.call(Object.prototype,f)&&!n.allowPrototypes)return;c.push(f)}for(var h=0;n.depth>0&&(u=a.exec(o))!==null&&h<n.depth;){if(h+=1,!n.plainObjects&&fu.call(Object.prototype,u[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(u[1])}return u&&c.push("["+o.slice(u.index)+"]"),q0(c,r,n,i)}},W0=function(t){if(!t)return Ve;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?Ve.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ve.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ve.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ve.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ve.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ve.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ve.comma,decoder:typeof t.decoder=="function"?t.decoder:Ve.decoder,delimiter:typeof t.delimiter=="string"||In.isRegExp(t.delimiter)?t.delimiter:Ve.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ve.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ve.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ve.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ve.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ve.strictNullHandling}},V0=function(e,t){var r=W0(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?H0(e,r):e,i=r.plainObjects?Object.create(null):{},o=Object.keys(n),s=0;s<o.length;++s){var a=o[s],u=G0(a,n[a],r,typeof e=="string");i=In.merge(i,u,r)}return r.allowSparse===!0?i:In.compact(i)},z0=F0,Y0=V0,K0=Vu,Q0={formats:K0,parse:Y0,stringify:z0};const X0=qt(Q0);var J0="[object String]",Z0=Object.prototype,e_=Z0.toString,t_=Array.isArray;function r_(e){return!!e&&typeof e=="object"}function n_(e){return typeof e=="string"||!t_(e)&&r_(e)&&e_.call(e)==J0}var i_=n_;const Al=qt(i_);var zu={exports:{}};class Ah extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}}const o_=({limit:e,interval:t,strict:r})=>{if(!Number.isFinite(e))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(t))throw new TypeError("Expected `interval` to be a finite number");const n=new Map;let i=0,o=0;function s(){const c=Date.now();return c-i>t?(o=1,i=c,0):(o<e?o++:(i+=t,o=1),i-c)}const a=[];function u(){const c=Date.now();if(a.length<e)return a.push(c),0;const h=a.shift()+t;return c>=h?(a.push(c),0):(a.push(h),h-c)}const f=r?u:s;return c=>{const h=function(...d){if(!h.isEnabled)return(async()=>c.apply(this,d))();let l;return new Promise((p,m)=>{l=setTimeout(()=>{p(c.apply(this,d)),n.delete(l)},f()),n.set(l,m)})};return h.abort=()=>{for(const d of n.keys())clearTimeout(d),n.get(d)(new Ah);n.clear(),a.splice(0,a.length)},h.isEnabled=!0,h}};zu.exports=o_;zu.exports.AbortError=Ah;var a_=zu.exports;const s_=qt(a_);var u_="[object Object]";function c_(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function l_(e,t){return function(r){return e(t(r))}}var f_=Function.prototype,Ch=Object.prototype,Rh=f_.toString,d_=Ch.hasOwnProperty,h_=Rh.call(Object),p_=Ch.toString,m_=l_(Object.getPrototypeOf,Object);function g_(e){return!!e&&typeof e=="object"}function y_(e){if(!g_(e)||p_.call(e)!=u_||c_(e))return!1;var t=m_(e);if(t===null)return!0;var r=d_.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Rh.call(r)==h_}var v_=y_;const mo=qt(v_);function __(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,s,a=[],u=!0,f=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);u=!0);}catch(c){f=!0,i=c}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(f)throw i}}return a}}function Cl(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function An(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cl(Object(r),!0).forEach(function(n){E_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cl(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function du(e){"@babel/helpers - typeof";return du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},du(e)}function hu(){hu=function(i,o){return new r(i,void 0,o)};var e=RegExp.prototype,t=new WeakMap;function r(i,o,s){var a=new RegExp(i,o);return t.set(a,s||t.get(i)),Wo(a,r.prototype)}function n(i,o){var s=t.get(o);return Object.keys(s).reduce(function(a,u){var f=s[u];if(typeof f=="number")a[u]=i[f];else{for(var c=0;i[f[c]]===void 0&&c+1<f.length;)c++;a[u]=i[f[c]]}return a},Object.create(null))}return b_(r,RegExp),r.prototype.exec=function(i){var o=e.exec.call(this,i);if(o){o.groups=n(o,this);var s=o.indices;s&&(s.groups=n(s,this))}return o},r.prototype[Symbol.replace]=function(i,o){if(typeof o=="string"){var s=t.get(this);return e[Symbol.replace].call(this,i,o.replace(/\$<([^>]+)>/g,function(u,f){var c=s[f];return"$"+(Array.isArray(c)?c.join("$"):c)}))}if(typeof o=="function"){var a=this;return e[Symbol.replace].call(this,i,function(){var u=arguments;return typeof u[u.length-1]!="object"&&(u=[].slice.call(u)).push(n(u,a)),o.apply(this,u)})}return e[Symbol.replace].call(this,i,o)},hu.apply(this,arguments)}function E_(e,t,r){return t=A_(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b_(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wo(e,t)}function Wo(e,t){return Wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Wo(e,t)}function w_(e,t){return S_(e)||__(e,t)||Nh(e,t)||T_()}function S_(e){if(Array.isArray(e))return e}function Nh(e,t){if(e){if(typeof e=="string")return Rl(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rl(e,t)}}function Rl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function T_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
29
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x_(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Nh(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){r=r.call(e)},n:function(){var u=r.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw a}}}}function O_(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A_(e){var t=O_(e,"string");return typeof t=="symbol"?t:String(t)}function C_(){return typeof process<"u"&&!process.browser}function R_(){return typeof window<"u"&&"navigator"in window&&"product"in window.navigator&&window.navigator.product==="ReactNative"}function N_(){return process.versions&&process.versions.node?"v".concat(process.versions.node):process.version}function P_(){return window}function pu(){}var mu=hu(/(\d+)(%)/,{value:1});function os(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:7,r=t;if(mu.test(e)){var n,i=(n=e.match(mu))===null||n===void 0?void 0:n.groups;if(i&&i.value){var o=parseInt(i.value)/100;r=Math.round(t*o)}}return Math.min(30,Math.max(1,r))}function Nl(e,t){return t("info","Throttle request to ".concat(e,"/s")),s_({limit:e,interval:1e3,strict:!1})}var I_=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"auto",r=e.defaults.logHandler,n=r===void 0?pu:r,i=Al(t)?os(t):os("auto",t),o=Nl(i,n),s=!1,a=e.interceptors.request.use(function(f){return o(function(){return f})()},function(f){return Promise.reject(f)}),u=e.interceptors.response.use(function(f){if(!s&&Al(t)&&(t==="auto"||mu.test(t))&&f.headers&&f.headers["x-contentful-ratelimit-second-limit"]){var c=parseInt(f.headers["x-contentful-ratelimit-second-limit"]),h=os(t,c);h!==i&&(a&&e.interceptors.request.eject(a),i=h,o=Nl(h,n),a=e.interceptors.request.use(function(d){return o(function(){return d})()},function(d){return Promise.reject(d)})),s=!0}return f},function(f){return Promise.reject(f)});return function(){e.interceptors.request.eject(a),e.interceptors.response.eject(u)}},L_=function(t){return new Promise(function(r){setTimeout(r,t)})},k_=function(t){return Math.pow(Math.SQRT2,t)};function M_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,r=e.defaults,n=r.responseLogger,i=n===void 0?pu:n,o=r.requestLogger,s=o===void 0?pu:o;e.interceptors.request.use(function(a){return s(a),a},function(a){return s(a),Promise.reject(a)}),e.interceptors.response.use(function(a){return i(a),a},function(a){var u=a.response,f=a.config;if(i(a),!f||!e.defaults.retryOnError)return Promise.reject(a);var c=f.attempts||1;if(c>t)return a.attempts=f.attempts,Promise.reject(a);var h=null,d=k_(c);return u?u.status>=500&&u.status<600?h="Server ".concat(u.status):u.status===429&&(h="Rate limit",u.headers&&a.response.headers["x-contentful-ratelimit-reset"]&&(d=u.headers["x-contentful-ratelimit-reset"])):h="Connection",h?(d=Math.floor(d*1e3+Math.random()*200+500),e.defaults.logHandler("warning","".concat(h," error occurred. Waiting for ").concat(d," ms before retrying...")),f.attempts=c+1,delete f.httpAgent,delete f.httpsAgent,L_(d).then(function(){return e(f)})):Promise.reject(a)})}function B_(e,t){e.interceptors.request.use(function(r){return t().then(function(n){return r.headers=An(An({},r.headers),{},{Authorization:"Bearer ".concat(n)}),r})})}var F_=/^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;function Ph(e,t){var r={insecure:!1,retryOnError:!0,logHandler:function(m,b){if(m==="error"&&b){var T=[b.name,b.message].filter(function(_){return _}).join(" - ");console.error("[error] ".concat(T)),console.error(b);return}console.log("[".concat(m,"] ").concat(b))},headers:{},httpAgent:!1,httpsAgent:!1,timeout:3e4,throttle:0,proxy:!1,basePath:"",adapter:void 0,maxContentLength:1073741824,maxBodyLength:1073741824},n=An(An({},r),t);if(!n.accessToken){var i=new TypeError("Expected parameter accessToken");throw n.logHandler("error",i),i}var o=n.insecure?"http":"https",s=n.space?"".concat(n.space,"/"):"",a=n.defaultHostname,u=n.insecure?80:443;if(n.host&&F_.test(n.host)){var f=n.host.split(":");if(f.length===2){var c=w_(f,2);a=c[0],u=c[1]}else a=f[0]}n.basePath&&(n.basePath="/".concat(n.basePath.split("/").filter(Boolean).join("/")));var h=t.baseURL||"".concat(o,"://").concat(a,":").concat(u).concat(n.basePath,"/spaces/").concat(s);!n.headers.Authorization&&typeof n.accessToken!="function"&&(n.headers.Authorization="Bearer "+n.accessToken);var d={baseURL:h,headers:n.headers,httpAgent:n.httpAgent,httpsAgent:n.httpsAgent,paramsSerializer:X0.stringify,proxy:n.proxy,timeout:n.timeout,adapter:n.adapter,maxContentLength:n.maxContentLength,maxBodyLength:n.maxBodyLength,logHandler:n.logHandler,responseLogger:n.responseLogger,requestLogger:n.requestLogger,retryOnError:n.retryOnError},l=e.create(d);return l.httpClientParams=t,l.cloneWithNewParams=function(p){return Ph(e,An(An({},Er(t)),p))},n.onBeforeRequest&&l.interceptors.request.use(n.onBeforeRequest),typeof n.accessToken=="function"&&B_(l,n.accessToken),n.throttle&&I_(l,n.throttle),M_(l,n.retryLimit),n.onError&&l.interceptors.response.use(function(p){return p},n.onError),l}function D_(e){var t=e.query,r={};return delete t.resolveLinks,r.params=Er(t),r}function U_(e,t){if(!(t in e)){var r=new Error;throw r.name="PropertyMissing",r.message="Required property ".concat(t,` missing from:
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){r=r.call(e)},n:function(){var u=r.next();return o=u.done,u},e:function(u){s=!0,a=u},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw a}}}}function O_(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A_(e){var t=O_(e,"string");return typeof t=="symbol"?t:String(t)}function C_(){return typeof process<"u"&&!process.browser}function R_(){return typeof window<"u"&&"navigator"in window&&"product"in window.navigator&&window.navigator.product==="ReactNative"}function N_(){return process.versions&&process.versions.node?"v".concat(process.versions.node):process.version}function P_(){return window}function pu(){}var mu=hu(/(\d+)(%)/,{value:1});function os(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:7,r=t;if(mu.test(e)){var n,i=(n=e.match(mu))===null||n===void 0?void 0:n.groups;if(i&&i.value){var o=parseInt(i.value)/100;r=Math.round(t*o)}}return Math.min(30,Math.max(1,r))}function Nl(e,t){return t("info","Throttle request to ".concat(e,"/s")),s_({limit:e,interval:1e3,strict:!1})}var I_=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"auto",r=e.defaults.logHandler,n=r===void 0?pu:r,i=Al(t)?os(t):os("auto",t),o=Nl(i,n),s=!1,a=e.interceptors.request.use(function(f){return o(function(){return f})()},function(f){return Promise.reject(f)}),u=e.interceptors.response.use(function(f){if(!s&&Al(t)&&(t==="auto"||mu.test(t))&&f.headers&&f.headers["x-contentful-ratelimit-second-limit"]){var c=parseInt(f.headers["x-contentful-ratelimit-second-limit"]),h=os(t,c);h!==i&&(a&&e.interceptors.request.eject(a),i=h,o=Nl(h,n),a=e.interceptors.request.use(function(d){return o(function(){return d})()},function(d){return Promise.reject(d)})),s=!0}return f},function(f){return Promise.reject(f)});return function(){e.interceptors.request.eject(a),e.interceptors.response.eject(u)}},L_=function(t){return new Promise(function(r){setTimeout(r,t)})},M_=function(t){return Math.pow(Math.SQRT2,t)};function k_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,r=e.defaults,n=r.responseLogger,i=n===void 0?pu:n,o=r.requestLogger,s=o===void 0?pu:o;e.interceptors.request.use(function(a){return s(a),a},function(a){return s(a),Promise.reject(a)}),e.interceptors.response.use(function(a){return i(a),a},function(a){var u=a.response,f=a.config;if(i(a),!f||!e.defaults.retryOnError)return Promise.reject(a);var c=f.attempts||1;if(c>t)return a.attempts=f.attempts,Promise.reject(a);var h=null,d=M_(c);return u?u.status>=500&&u.status<600?h="Server ".concat(u.status):u.status===429&&(h="Rate limit",u.headers&&a.response.headers["x-contentful-ratelimit-reset"]&&(d=u.headers["x-contentful-ratelimit-reset"])):h="Connection",h?(d=Math.floor(d*1e3+Math.random()*200+500),e.defaults.logHandler("warning","".concat(h," error occurred. Waiting for ").concat(d," ms before retrying...")),f.attempts=c+1,delete f.httpAgent,delete f.httpsAgent,L_(d).then(function(){return e(f)})):Promise.reject(a)})}function B_(e,t){e.interceptors.request.use(function(r){return t().then(function(n){return r.headers=An(An({},r.headers),{},{Authorization:"Bearer ".concat(n)}),r})})}var F_=/^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;function Ph(e,t){var r={insecure:!1,retryOnError:!0,logHandler:function(m,b){if(m==="error"&&b){var T=[b.name,b.message].filter(function(_){return _}).join(" - ");console.error("[error] ".concat(T)),console.error(b);return}console.log("[".concat(m,"] ").concat(b))},headers:{},httpAgent:!1,httpsAgent:!1,timeout:3e4,throttle:0,proxy:!1,basePath:"",adapter:void 0,maxContentLength:1073741824,maxBodyLength:1073741824},n=An(An({},r),t);if(!n.accessToken){var i=new TypeError("Expected parameter accessToken");throw n.logHandler("error",i),i}var o=n.insecure?"http":"https",s=n.space?"".concat(n.space,"/"):"",a=n.defaultHostname,u=n.insecure?80:443;if(n.host&&F_.test(n.host)){var f=n.host.split(":");if(f.length===2){var c=w_(f,2);a=c[0],u=c[1]}else a=f[0]}n.basePath&&(n.basePath="/".concat(n.basePath.split("/").filter(Boolean).join("/")));var h=t.baseURL||"".concat(o,"://").concat(a,":").concat(u).concat(n.basePath,"/spaces/").concat(s);!n.headers.Authorization&&typeof n.accessToken!="function"&&(n.headers.Authorization="Bearer "+n.accessToken);var d={baseURL:h,headers:n.headers,httpAgent:n.httpAgent,httpsAgent:n.httpsAgent,paramsSerializer:X0.stringify,proxy:n.proxy,timeout:n.timeout,adapter:n.adapter,maxContentLength:n.maxContentLength,maxBodyLength:n.maxBodyLength,logHandler:n.logHandler,responseLogger:n.responseLogger,requestLogger:n.requestLogger,retryOnError:n.retryOnError},l=e.create(d);return l.httpClientParams=t,l.cloneWithNewParams=function(p){return Ph(e,An(An({},Er(t)),p))},n.onBeforeRequest&&l.interceptors.request.use(n.onBeforeRequest),typeof n.accessToken=="function"&&B_(l,n.accessToken),n.throttle&&I_(l,n.throttle),k_(l,n.retryLimit),n.onError&&l.interceptors.response.use(function(p){return p},n.onError),l}function D_(e){var t=e.query,r={};return delete t.resolveLinks,r.params=Er(t),r}function U_(e,t){if(!(t in e)){var r=new Error;throw r.name="PropertyMissing",r.message="Required property ".concat(t,` missing from:
31
31
 
32
32
  `).concat(JSON.stringify(e),`
33
33
 
34
- `),r}return!0}function Ih(e){var t=Object.getOwnPropertyNames(e),r=x_(t),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=e[i];o&&du(o)==="object"&&Ih(o)}}catch(s){r.e(s)}finally{r.f()}return Object.freeze(e)}function $_(e){return Ih(e.sys||{}),e}function Pl(){var e=P_();if(!e)return null;var t=e.navigator.userAgent,r=e.navigator.platform,n=["Macintosh","MacIntel","MacPPC","Mac68K"],i=["Win32","Win64","Windows","WinCE"],o=["iPhone","iPad","iPod"];return n.indexOf(r)!==-1?"macOS":o.indexOf(r)!==-1?"iOS":i.indexOf(r)!==-1?"Windows":/Android/.test(t)?"Android":/Linux/.test(r)?"Linux":null}function j_(){var e=process.platform||"linux",t=process.version||"0.0.0",r={android:"Android",aix:"Linux",darwin:"macOS",freebsd:"Linux",linux:"Linux",openbsd:"Linux",sunos:"Linux",win32:"Windows"};return e in r?"".concat(r[e]||"Linux","/").concat(t):null}function H_(e,t,r,n){var i=[];t&&i.push("app ".concat(t)),r&&i.push("integration ".concat(r)),n&&i.push("feature "+n),i.push("sdk ".concat(e));var o=null;try{R_()?(o=Pl(),i.push("platform ReactNative")):C_()?(o=j_(),i.push("platform node.js/".concat(N_()))):(o=Pl(),i.push("platform browser"))}catch{o=null}return o&&i.push("os ".concat(o)),"".concat(i.filter(function(s){return s!==""}).join("; "),";")}function q_(e){return Object.defineProperty(e,"toPlainObject",{enumerable:!1,configurable:!1,writable:!1,value:function(){return Er(this)}})}function G_(e){var t=e.config,r=e.response,n;if(t&&t.headers&&t.headers.Authorization){var i="...".concat(t.headers.Authorization.toString().substr(-5));t.headers.Authorization="Bearer ".concat(i)}if(!mo(r)||!mo(t))throw e;var o=r==null?void 0:r.data,s={status:r==null?void 0:r.status,statusText:r==null?void 0:r.statusText,message:"",details:{}};mo(t)&&(s.request={url:t.url,headers:t.headers,method:t.method,payloadData:t.data}),o&&mo(o)&&("requestId"in o&&(s.requestId=o.requestId||"UNKNOWN"),"message"in o&&(s.message=o.message||""),"details"in o&&(s.details=o.details||{}),"sys"in o&&"id"in o.sys&&(n=o.sys.id));var a=new Error;a.name=n&&n!=="Unknown"?n:"".concat(r==null?void 0:r.status," ").concat(r==null?void 0:r.statusText);try{a.message=JSON.stringify(s,null," ")}catch{var u;a.message=(u=s==null?void 0:s.message)!==null&&u!==void 0?u:""}throw a}const W_=Object.freeze(Object.defineProperty({__proto__:null,createHttpClient:Ph,createRequestConfig:D_,enforceObjPath:U_,errorHandler:G_,freezeSys:$_,getUserAgentHeader:H_,toPlainObject:q_},Symbol.toStringTag,{value:"Module"})),Gt=Ji(W_);var go={},yi={},yo={},Il;function V_(){if(Il)return yo;Il=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.wrapSpace=t;var e=Gt;function t(r){return(0,e.freezeSys)((0,e.toPlainObject)(r))}return yo}var vi={},as={exports:{}},Ll;function Fn(){return Ll||(Ll=1,function(e,t){(function(r,n){e.exports=n()})(ce,function(){var r=Function.prototype.toString,n=Object.create,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,u=Object.getPrototypeOf,f=Object.prototype,c=f.hasOwnProperty,h=f.propertyIsEnumerable,d=typeof a=="function",l=typeof WeakMap=="function",p=function(){if(l)return function(){return new WeakMap};var F=function(){function B(){this._keys=[],this._values=[]}return B.prototype.has=function(G){return!!~this._keys.indexOf(G)},B.prototype.get=function(G){return this._values[this._keys.indexOf(G)]},B.prototype.set=function(G,W){this._keys.push(G),this._values.push(W)},B}();return function(){return new F}}(),m=function(F,B){var G=F.__proto__||u(F);if(!G)return n(null);var W=G.constructor;if(W===B.Object)return G===B.Object.prototype?{}:n(G);if(~r.call(W).indexOf("[native code]"))try{return new W}catch{}return n(G)},b=function(F,B,G,W){var z=m(F,B);W.set(F,z);for(var $ in F)c.call(F,$)&&(z[$]=G(F[$],W));if(d)for(var Y=a(F),te=0,K=Y.length,k=void 0;te<K;++te)k=Y[te],h.call(F,k)&&(z[k]=G(F[k],W));return z},T=function(F,B,G,W){var z=m(F,B);W.set(F,z);for(var $=d?s(F).concat(a(F)):s(F),Y=0,te=$.length,K=void 0,k=void 0;Y<te;++Y)if(K=$[Y],K!=="callee"&&K!=="caller")if(k=o(F,K),k){!k.get&&!k.set&&(k.value=G(F[K],W));try{i(z,K,k)}catch{z[K]=k.value}}else z[K]=G(F[K],W);return z},_=function(F){var B="";return F.global&&(B+="g"),F.ignoreCase&&(B+="i"),F.multiline&&(B+="m"),F.unicode&&(B+="u"),F.sticky&&(B+="y"),B},E=Array.isArray,A=Object.getPrototypeOf,w=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ce<"u"?ce:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function N(F,B){var G=!!(B&&B.isStrict),W=B&&B.realm||w,z=G?T:b,$=function(Y,te){if(!Y||typeof Y!="object")return Y;if(te.has(Y))return te.get(Y);var K=Y.__proto__||A(Y),k=K&&K.constructor;if(!k||k===W.Object)return z(Y,W,$,te);var V;if(E(Y)){if(G)return T(Y,W,$,te);V=new k,te.set(Y,V);for(var J=0,de=Y.length;J<de;++J)V[J]=$(Y[J],te);return V}if(Y instanceof W.Date)return new k(Y.getTime());if(Y instanceof W.RegExp)return V=new k(Y.source,Y.flags||_(Y)),V.lastIndex=Y.lastIndex,V;if(W.Map&&Y instanceof W.Map)return V=new k,te.set(Y,V),Y.forEach(function(X,Z){V.set(Z,$(X,te))}),V;if(W.Set&&Y instanceof W.Set)return V=new k,te.set(Y,V),Y.forEach(function(X){V.add($(X,te))}),V;if(W.Blob&&Y instanceof W.Blob)return Y.slice(0,Y.size,Y.type);if(W.Buffer&&W.Buffer.isBuffer(Y))return V=W.Buffer.allocUnsafe?W.Buffer.allocUnsafe(Y.length):new k(Y.length),te.set(Y,V),Y.copy(V),V;if(W.ArrayBuffer){if(W.ArrayBuffer.isView(Y))return V=new k(Y.buffer.slice(0)),te.set(Y,V),V;if(Y instanceof W.ArrayBuffer)return V=Y.slice(0),te.set(Y,V),V}return typeof Y.then=="function"||Y instanceof Error||W.WeakMap&&Y instanceof W.WeakMap||W.WeakSet&&Y instanceof W.WeakSet?Y:z(Y,W,$,te)};return $(F,p())}return N.default=N,N.strict=function(B,G){return N(B,{isStrict:!0,realm:G?G.realm:void 0})},N})}(as)),as.exports}var vo={},_o={exports:{}},kl;function z_(){return kl||(kl=1,function(e,t){t=e.exports=r,t.getSerialize=n;function r(i,o,s,a){return JSON.stringify(i,n(o,a),s)}function n(i,o){var s=[],a=[];return o==null&&(o=function(u,f){return s[0]===f?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(f)).join(".")+"]"}),function(u,f){if(s.length>0){var c=s.indexOf(this);~c?s.splice(c+1):s.push(this),~c?a.splice(c,1/0,u):a.push(u),~s.indexOf(f)&&(f=o.call(this,u,f))}else s.push(f);return i==null?f:i.call(this,u,f)}}}(_o,_o.exports)),_o.exports}var Ml;function Lh(){if(Ml)return vo;Ml=1,Object.defineProperty(vo,"__esModule",{value:!0}),vo.default=r;var e=t(z_());function t(n){return n&&n.__esModule?n:{default:n}}function r(n){return Object.defineProperty(n,"stringifySafe",{enumerable:!1,configurable:!1,writable:!1,value:function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,e.default)(this,i,o,(s,a)=>({sys:{type:"Link",linkType:"Entry",id:a.sys.id,circular:!0}}))}})}return vo}var Y_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},K_=function(){function e(t,r){var n=[],i=!0,o=!1,s=void 0;try{for(var a=t[Symbol.iterator](),u;!(i=(u=a.next()).done)&&(n.push(u.value),!(r&&n.length===r));i=!0);}catch(f){o=!0,s=f}finally{try{!i&&a.return&&a.return()}finally{if(o)throw s}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function _i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}else return Array.from(e)}var Yi={},Q_=function(t){return t&&t.sys&&t.sys.type==="Link"},X_=function(t){return t&&t.sys&&t.sys.type==="ResourceLink"},J_=function(t){return t.space&&t.environment?[t.type+"!"+t.id,t.space.sys.id+"!"+t.environment.sys.id+"!"+t.type+"!"+t.id]:[t.type+"!"+t.id]},Bl=function(t,r){var n=r.entryId,i=r.linkType,o=r.spaceId,s=r.environmentId;return o&&s?t.get(o+"!"+s+"!"+i+"!"+n):t.get(i+"!"+n)},Z_=function(t){var r=/.*:spaces\/([^/]+)(?:\/environments\/([^/]+))?\/entries\/([^/]+)$/;if(r.test(t)){var n=t.match(r),i=K_(n,4);i[0];var o=i[1],s=i[2],a=s===void 0?"master":s,u=i[3];return{spaceId:o,environmentId:a,entryId:u}}},eE=function(t,r){var n=r.sys,i=n.type,o=n.linkType;if(i==="ResourceLink"){var s=r.sys.urn,a=Z_(s),u=a.spaceId,f=a.environmentId,c=a.entryId,h=o.split(":")[1];return Bl(t,{linkType:h,entryId:c,spaceId:u,environmentId:f})||Yi}var d=r.sys.id;return Bl(t,{linkType:o,entryId:d})||Yi},tE=function(t){if(Array.isArray(t))return t.filter(function(n){return n!==Yi});for(var r in t)t[r]===Yi&&delete t[r];return t},rE=function e(t,r,n,i){if(r(t))return n(t);if(t&&(typeof t>"u"?"undefined":Y_(t))==="object"){for(var o in t)t.hasOwnProperty(o)&&(t[o]=e(t[o],r,n,i));i&&(t=tE(t))}return t},nE=function(t,r,n){var i=eE(t,r);return i===Yi?n?i:r:i},iE=function(t,r){if(!Array.isArray(r))return t;var n=Object.keys(t).filter(function(i){return r.indexOf(i)!==-1});return n.reduce(function(i,o){return i[o]=t[o],i},{})},oE=function(t,r){if(r=r||{},!t.items)return[];var n=Er(t),i=Object.keys(n.includes||{}).reduce(function(a,u){return[].concat(_i(a),_i(t.includes[u]))},[]),o=[].concat(_i(n.items),_i(i)).filter(function(a){return!!a.sys}),s=new Map(o.reduce(function(a,u){var f=J_(u.sys).map(function(c){return[c,u]});return a.push.apply(a,_i(f)),a},[]));return o.forEach(function(a){var u=iE(a,r.itemEntryPoints);Object.assign(a,rE(u,function(f){return Q_(f)||X_(f)},function(f){return nE(s,f,r.removeUnresolved)},r.removeUnresolved))}),n.items};const aE=Object.freeze(Object.defineProperty({__proto__:null,default:oE},Symbol.toStringTag,{value:"Module"})),kh=Ji(aE);var Fl;function sE(){if(Fl)return vi;Fl=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.wrapEntry=o,vi.wrapEntryCollection=s;var e=i(Fn()),t=Gt,r=i(Lh()),n=i(kh);function i(a){return a&&a.__esModule?a:{default:a}}function o(a){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(a)))}function s(a,u){let{resolveLinks:f,removeUnresolved:c}=u;const h=(0,r.default)((0,t.toPlainObject)((0,e.default)(a)));return f&&(h.items=(0,n.default)(h,{removeUnresolved:c,itemEntryPoints:["fields"]})),(0,t.freezeSys)(h)}return vi}var Ei={},Dl;function uE(){if(Dl)return Ei;Dl=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.wrapAsset=n,Ei.wrapAssetCollection=i;var e=r(Fn()),t=Gt;function r(o){return o&&o.__esModule?o:{default:o}}function n(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function i(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return Ei}var Eo={},Ul;function cE(){if(Ul)return Eo;Ul=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.wrapAssetKey=n;var e=r(Fn()),t=Gt;function r(i){return i&&i.__esModule?i:{default:i}}function n(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return Eo}var bi={},$l;function lE(){if($l)return bi;$l=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.wrapContentType=n,bi.wrapContentTypeCollection=i;var e=r(Fn()),t=Gt;function r(o){return o&&o.__esModule?o:{default:o}}function n(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function i(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return bi}var wi={},jl;function fE(){if(jl)return wi;jl=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.wrapLocale=n,wi.wrapLocaleCollection=i;var e=r(Fn()),t=Gt;function r(o){return o&&o.__esModule?o:{default:o}}function n(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function i(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return wi}var Si={},Hl;function dE(){if(Hl)return Si;Hl=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.wrapTag=n,Si.wrapTagCollection=i;var e=r(Fn()),t=Gt;function r(o){return o&&o.__esModule?o:{default:o}}function n(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function i(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return Si}var ql;function hE(){if(ql)return yi;ql=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.default=void 0;var e=u(V_()),t=u(sE()),r=u(uE()),n=u(cE()),i=u(lE()),o=u(fE()),s=u(dE());function a(c){if(typeof WeakMap!="function")return null;var h=new WeakMap,d=new WeakMap;return(a=function(l){return l?d:h})(c)}function u(c,h){if(!h&&c&&c.__esModule)return c;if(c===null||typeof c!="object"&&typeof c!="function")return{default:c};var d=a(h);if(d&&d.has(c))return d.get(c);var l={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in c)if(m!=="default"&&Object.prototype.hasOwnProperty.call(c,m)){var b=p?Object.getOwnPropertyDescriptor(c,m):null;b&&(b.get||b.set)?Object.defineProperty(l,m,b):l[m]=c[m]}return l.default=c,d&&d.set(c,l),l}var f={space:e,entry:t,asset:r,assetKey:n,contentType:i,locale:o,tag:s};return yi.default=f,yi}var bo={},Gl;function pE(){if(Gl)return bo;Gl=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.default=a;var e=Gt,t=n(kh),r=n(Lh());function n(h){return h&&h.__esModule?h:{default:h}}function i(h,d){var l=Object.keys(h);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(h);d&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(h,m).enumerable})),l.push.apply(l,p)}return l}function o(h){for(var d=1;d<arguments.length;d++){var l=arguments[d]!=null?arguments[d]:{};d%2?i(Object(l),!0).forEach(function(p){s(h,p,l[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(l)):i(Object(l)).forEach(function(p){Object.defineProperty(h,p,Object.getOwnPropertyDescriptor(l,p))})}return h}function s(h,d,l){return d in h?Object.defineProperty(h,d,{value:l,enumerable:!0,configurable:!0,writable:!0}):h[d]=l,h}async function a(h,d){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!d||!d.initial&&!d.nextSyncToken&&!d.nextPageToken)throw new Error("Please provide one of `initial`, `nextSyncToken` or `nextPageToken` parameters for syncing");if(d&&d.content_type&&!d.type)d.type="Entry";else if(d&&d.content_type&&d.type&&d.type!=="Entry")throw new Error("When using the `content_type` filter your `type` parameter cannot be different from `Entry`.");const p={resolveLinks:!0,removeUnresolved:!1,paginate:!0},{resolveLinks:m,removeUnresolved:b,paginate:T}=o(o({},p),l),E=await f(h,[],d,{paginate:T});m&&(E.items=(0,t.default)(E,{removeUnresolved:b,itemEntryPoints:["fields"]}));const A=u(E.items);return E.nextSyncToken&&(A.nextSyncToken=E.nextSyncToken),E.nextPageToken&&(A.nextPageToken=E.nextPageToken),(0,e.freezeSys)((0,r.default)((0,e.toPlainObject)(A)))}function u(h){const d=l=>(p,m)=>(m.sys.type===l&&p.push((0,e.toPlainObject)(m)),p);return{entries:h.reduce(d("Entry"),[]),assets:h.reduce(d("Asset"),[]),deletedEntries:h.reduce(d("DeletedEntry"),[]),deletedAssets:h.reduce(d("DeletedAsset"),[])}}async function f(h,d,l,p){let{paginate:m}=p;l.nextSyncToken&&(l.sync_token=l.nextSyncToken,delete l.nextSyncToken),l.nextPageToken&&(l.sync_token=l.nextPageToken,delete l.nextPageToken),l.sync_token&&(delete l.initial,delete l.type,delete l.content_type,delete l.limit);const T=(await h.get("sync",(0,e.createRequestConfig)({query:l}))).data||{};return d=d.concat(T.items||[]),T.nextPageUrl?m?(delete l.initial,l.sync_token=c(T.nextPageUrl),f(h,d,l,{paginate:m})):{items:d,nextPageToken:c(T.nextPageUrl)}:T.nextSyncUrl?{items:d,nextSyncToken:c(T.nextSyncUrl)}:{items:[]}}function c(h){const d=h.split("?");return d.length>0?d[1].replace("sync_token=",""):""}return bo}var wo={},Wl;function mE(){if(Wl)return wo;Wl=1,Object.defineProperty(wo,"__esModule",{value:!0}),wo.default=n;function e(i,o){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(i);o&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(i,u).enumerable})),s.push.apply(s,a)}return s}function t(i){for(var o=1;o<arguments.length;o++){var s=arguments[o]!=null?arguments[o]:{};o%2?e(Object(s),!0).forEach(function(a){r(i,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):e(Object(s)).forEach(function(a){Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(s,a))})}return i}function r(i,o,s){return o in i?Object.defineProperty(i,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[o]=s,i}function n(i){if(!i.select)return i;const o=Array.isArray(i.select)?i.select:i.select.split(","),s=new Set(o);return s.has("sys")?i:(s.add("sys.id"),s.add("sys.type"),t(t({},i),{},{select:[...s].join(",")}))}return wo}var Tn={},Vl;function gE(){if(Vl)return Tn;Vl=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.ValidationError=void 0,Tn.default=t;class e extends Error{constructor(n,i){super(`Invalid "${n}" provided, `+i),this.name="ValidationError"}}Tn.ValidationError=e;function t(r,n,i){if(i=i||{},typeof n!="number")throw new e(r,`only numeric values are allowed for timestamps, provided type was "${typeof n}"`);if(i.maximum&&n>i.maximum)throw new e(r,`value (${n}) cannot be further in the future than expected maximum (${i.maximum})`);if(i.now&&n<i.now)throw new e(r,`value (${n}) cannot be in the past, current time was ${i.now}`)}return Tn}var zl;function yE(){if(zl)return go;zl=1,Object.defineProperty(go,"__esModule",{value:!0}),go.default=c;var e=Gt,t=o(hE()),r=o(pE()),n=o(mE()),i=o(gE());function o(h){return h&&h.__esModule?h:{default:h}}function s(h,d){var l=Object.keys(h);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(h);d&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(h,m).enumerable})),l.push.apply(l,p)}return l}function a(h){for(var d=1;d<arguments.length;d++){var l=arguments[d]!=null?arguments[d]:{};d%2?s(Object(l),!0).forEach(function(p){u(h,p,l[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(l)):s(Object(l)).forEach(function(p){Object.defineProperty(h,p,Object.getOwnPropertyDescriptor(l,p))})}return h}function u(h,d,l){return d in h?Object.defineProperty(h,d,{value:l,enumerable:!0,configurable:!0,writable:!0}):h[d]=l,h}const f=48*60*60;function c(h){let{http:d,getGlobalOptions:l}=h;const{wrapSpace:p}=t.default.space,{wrapContentType:m,wrapContentTypeCollection:b}=t.default.contentType,{wrapEntry:T,wrapEntryCollection:_}=t.default.entry,{wrapAsset:E,wrapAssetCollection:A}=t.default.asset,{wrapTag:w,wrapTagCollection:N}=t.default.tag,{wrapAssetKey:F}=t.default.assetKey,{wrapLocaleCollection:B}=t.default.locale,G=Q=>{const oe=new Error("The resource could not be found.");return oe.sys={type:"Error",id:"NotFound"},oe.details={type:"Entry",id:Q,environment:l().environment,space:l().space},oe};async function W(){Fe(d);try{const Q=await d.get("/");return p(Q.data)}catch(Q){(0,e.errorHandler)(Q)}}async function z(Q){ue(d);try{const oe=await d.get(`content_types/${Q}`);return m(oe.data)}catch(oe){(0,e.errorHandler)(oe)}}async function $(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ue(d);try{const oe=await d.get("content_types",(0,e.createRequestConfig)({query:Q}));return b(oe.data)}catch(oe){(0,e.errorHandler)(oe)}}async function Y(Q){let oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Q)throw G(Q);try{const Pe=await this.getEntries(a({"sys.id":Q},oe));if(Pe.items.length>0)return T(Pe.items[0]);throw G(Q)}catch(Pe){(0,e.errorHandler)(Pe)}}async function te(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ue(d);const{resolveLinks:oe,removeUnresolved:Pe}=l(Q);Q=(0,n.default)(Q);try{const Ae=await d.get("entries",(0,e.createRequestConfig)({query:Q}));return _(Ae.data,{resolveLinks:oe,removeUnresolved:Pe})}catch(Ae){(0,e.errorHandler)(Ae)}}async function K(Q){let oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ue(d),oe=(0,n.default)(oe);try{const Pe=await d.get(`assets/${Q}`,(0,e.createRequestConfig)({query:oe}));return E(Pe.data)}catch(Pe){(0,e.errorHandler)(Pe)}}async function k(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ue(d),Q=(0,n.default)(Q);try{const oe=await d.get("assets",(0,e.createRequestConfig)({query:Q}));return A(oe.data)}catch(oe){(0,e.errorHandler)(oe)}}async function V(Q){ue(d);try{const oe=await d.get(`tags/${Q}`);return w(oe.data)}catch(oe){(0,e.errorHandler)(oe)}}async function J(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ue(d),Q=(0,n.default)(Q);try{const oe=await d.get("tags",(0,e.createRequestConfig)({query:Q}));return N(oe.data)}catch(oe){(0,e.errorHandler)(oe)}}async function de(Q){ue(d);try{const oe=Math.floor(Date.now()/1e3),Pe=oe+f;(0,i.default)("expiresAt",Q,{maximum:Pe,now:oe});const Ae={expiresAt:Q},ut=await d.post("asset_keys",Ae);return F(ut.data)}catch(oe){(0,e.errorHandler)(oe)}}async function X(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ue(d);try{const oe=await d.get("locales",(0,e.createRequestConfig)({query:Q}));return B(oe.data)}catch(oe){(0,e.errorHandler)(oe)}}async function Z(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{paginate:!0};const{resolveLinks:Pe,removeUnresolved:Ae}=l(Q);return ue(d),(0,r.default)(d,Q,a({resolveLinks:Pe,removeUnresolved:Ae},oe))}function re(Q){const{resolveLinks:oe,removeUnresolved:Pe}=l({});return _(Q,{resolveLinks:oe,removeUnresolved:Pe})}function ue(Q){Q.defaults.baseURL=l().environmentBaseUrl}function Fe(Q){Q.defaults.baseURL=l().spaceBaseUrl}return{getSpace:W,getContentType:z,getContentTypes:$,getEntry:Y,getEntries:te,getAsset:K,getAssets:k,getTag:V,getTags:J,createAssetKey:de,getLocales:X,parseEntries:re,sync:Z}}return go}var So={},Yl;function vE(){if(Yl)return So;Yl=1,Object.defineProperty(So,"__esModule",{value:!0}),So.default=e;function e(t){return function(n){return Object.assign({},t,n)}}return So}var Kl;function _E(){if(Kl)return co;Kl=1,Object.defineProperty(co,"__esModule",{value:!0}),co.createClient=u;var e=i(oh()),t=Gt,r=i(yE()),n=i(vE());function i(f){return f&&f.__esModule?f:{default:f}}function o(f,c){var h=Object.keys(f);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(f);c&&(d=d.filter(function(l){return Object.getOwnPropertyDescriptor(f,l).enumerable})),h.push.apply(h,d)}return h}function s(f){for(var c=1;c<arguments.length;c++){var h=arguments[c]!=null?arguments[c]:{};c%2?o(Object(h),!0).forEach(function(d){a(f,d,h[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(h)):o(Object(h)).forEach(function(d){Object.defineProperty(f,d,Object.getOwnPropertyDescriptor(h,d))})}return f}function a(f,c,h){return c in f?Object.defineProperty(f,c,{value:h,enumerable:!0,configurable:!0,writable:!0}):f[c]=h,f}function u(f){if(!f.accessToken)throw new TypeError("Expected parameter accessToken");if(!f.space)throw new TypeError("Expected parameter space");const h=s(s({},{resolveLinks:!0,removeUnresolved:!1,defaultHostname:"cdn.contentful.com",environment:"master"}),f),d=(0,t.getUserAgentHeader)("contentful.js/9.1.34",h.application,h.integration);h.headers=s(s({},h.headers),{},{"Content-Type":"application/vnd.contentful.delivery.v1+json","X-Contentful-User-Agent":d});const l=(0,t.createHttpClient)(e.default,h),p=(0,n.default)({resolveLinks:h.resolveLinks,environment:h.environment,removeUnresolved:h.removeUnresolved,spaceBaseUrl:l.defaults.baseURL,environmentBaseUrl:`${l.defaults.baseURL}environments/${h.environment}`});return l.defaults.baseURL=p().environmentBaseUrl,(0,r.default)({http:l,getGlobalOptions:p})}return co}var ss={},us,Ql;function EE(){return Ql||(Ql=1,us=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),us}var cs,Xl;function bE(){if(Xl)return cs;Xl=1;var e="%[a-f0-9]{2}",t=new RegExp("("+e+")|([^%]+?)","gi"),r=new RegExp("("+e+")+","gi");function n(s,a){try{return[decodeURIComponent(s.join(""))]}catch{}if(s.length===1)return s;a=a||1;var u=s.slice(0,a),f=s.slice(a);return Array.prototype.concat.call([],n(u),n(f))}function i(s){try{return decodeURIComponent(s)}catch{for(var a=s.match(t)||[],u=1;u<a.length;u++)s=n(a,u).join(""),a=s.match(t)||[];return s}}function o(s){for(var a={"%FE%FF":"��","%FF%FE":"��"},u=r.exec(s);u;){try{a[u[0]]=decodeURIComponent(u[0])}catch{var f=i(u[0]);f!==u[0]&&(a[u[0]]=f)}u=r.exec(s)}a["%C2"]="�";for(var c=Object.keys(a),h=0;h<c.length;h++){var d=c[h];s=s.replace(new RegExp(d,"g"),a[d])}return s}return cs=function(s){if(typeof s!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof s+"`");try{return s=s.replace(/\+/g," "),decodeURIComponent(s)}catch{return o(s)}},cs}var ls,Jl;function wE(){return Jl||(Jl=1,ls=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]}),ls}var fs,Zl;function SE(){return Zl||(Zl=1,fs=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),o=0;o<n.length;o++){var s=n[o],a=e[s];(i?t.indexOf(s)!==-1:t(s,a,e))&&(r[s]=a)}return r}),fs}var ef;function TE(){return ef||(ef=1,function(e){const t=EE(),r=bE(),n=wE(),i=SE(),o=_=>_==null,s=Symbol("encodeFragmentIdentifier");function a(_){switch(_.arrayFormat){case"index":return E=>(A,w)=>{const N=A.length;return w===void 0||_.skipNull&&w===null||_.skipEmptyString&&w===""?A:w===null?[...A,[c(E,_),"[",N,"]"].join("")]:[...A,[c(E,_),"[",c(N,_),"]=",c(w,_)].join("")]};case"bracket":return E=>(A,w)=>w===void 0||_.skipNull&&w===null||_.skipEmptyString&&w===""?A:w===null?[...A,[c(E,_),"[]"].join("")]:[...A,[c(E,_),"[]=",c(w,_)].join("")];case"colon-list-separator":return E=>(A,w)=>w===void 0||_.skipNull&&w===null||_.skipEmptyString&&w===""?A:w===null?[...A,[c(E,_),":list="].join("")]:[...A,[c(E,_),":list=",c(w,_)].join("")];case"comma":case"separator":case"bracket-separator":{const E=_.arrayFormat==="bracket-separator"?"[]=":"=";return A=>(w,N)=>N===void 0||_.skipNull&&N===null||_.skipEmptyString&&N===""?w:(N=N===null?"":N,w.length===0?[[c(A,_),E,c(N,_)].join("")]:[[w,c(N,_)].join(_.arrayFormatSeparator)])}default:return E=>(A,w)=>w===void 0||_.skipNull&&w===null||_.skipEmptyString&&w===""?A:w===null?[...A,c(E,_)]:[...A,[c(E,_),"=",c(w,_)].join("")]}}function u(_){let E;switch(_.arrayFormat){case"index":return(A,w,N)=>{if(E=/\[(\d*)\]$/.exec(A),A=A.replace(/\[\d*\]$/,""),!E){N[A]=w;return}N[A]===void 0&&(N[A]={}),N[A][E[1]]=w};case"bracket":return(A,w,N)=>{if(E=/(\[\])$/.exec(A),A=A.replace(/\[\]$/,""),!E){N[A]=w;return}if(N[A]===void 0){N[A]=[w];return}N[A]=[].concat(N[A],w)};case"colon-list-separator":return(A,w,N)=>{if(E=/(:list)$/.exec(A),A=A.replace(/:list$/,""),!E){N[A]=w;return}if(N[A]===void 0){N[A]=[w];return}N[A]=[].concat(N[A],w)};case"comma":case"separator":return(A,w,N)=>{const F=typeof w=="string"&&w.includes(_.arrayFormatSeparator),B=typeof w=="string"&&!F&&h(w,_).includes(_.arrayFormatSeparator);w=B?h(w,_):w;const G=F||B?w.split(_.arrayFormatSeparator).map(W=>h(W,_)):w===null?w:h(w,_);N[A]=G};case"bracket-separator":return(A,w,N)=>{const F=/(\[\])$/.test(A);if(A=A.replace(/\[\]$/,""),!F){N[A]=w&&h(w,_);return}const B=w===null?[]:w.split(_.arrayFormatSeparator).map(G=>h(G,_));if(N[A]===void 0){N[A]=B;return}N[A]=[].concat(N[A],B)};default:return(A,w,N)=>{if(N[A]===void 0){N[A]=w;return}N[A]=[].concat(N[A],w)}}}function f(_){if(typeof _!="string"||_.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function c(_,E){return E.encode?E.strict?t(_):encodeURIComponent(_):_}function h(_,E){return E.decode?r(_):_}function d(_){return Array.isArray(_)?_.sort():typeof _=="object"?d(Object.keys(_)).sort((E,A)=>Number(E)-Number(A)).map(E=>_[E]):_}function l(_){const E=_.indexOf("#");return E!==-1&&(_=_.slice(0,E)),_}function p(_){let E="";const A=_.indexOf("#");return A!==-1&&(E=_.slice(A)),E}function m(_){_=l(_);const E=_.indexOf("?");return E===-1?"":_.slice(E+1)}function b(_,E){return E.parseNumbers&&!Number.isNaN(Number(_))&&typeof _=="string"&&_.trim()!==""?_=Number(_):E.parseBooleans&&_!==null&&(_.toLowerCase()==="true"||_.toLowerCase()==="false")&&(_=_.toLowerCase()==="true"),_}function T(_,E){E=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},E),f(E.arrayFormatSeparator);const A=u(E),w=Object.create(null);if(typeof _!="string"||(_=_.trim().replace(/^[?#&]/,""),!_))return w;for(const N of _.split("&")){if(N==="")continue;let[F,B]=n(E.decode?N.replace(/\+/g," "):N,"=");B=B===void 0?null:["comma","separator","bracket-separator"].includes(E.arrayFormat)?B:h(B,E),A(h(F,E),B,w)}for(const N of Object.keys(w)){const F=w[N];if(typeof F=="object"&&F!==null)for(const B of Object.keys(F))F[B]=b(F[B],E);else w[N]=b(F,E)}return E.sort===!1?w:(E.sort===!0?Object.keys(w).sort():Object.keys(w).sort(E.sort)).reduce((N,F)=>{const B=w[F];return B&&typeof B=="object"&&!Array.isArray(B)?N[F]=d(B):N[F]=B,N},Object.create(null))}e.extract=m,e.parse=T,e.stringify=(_,E)=>{if(!_)return"";E=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},E),f(E.arrayFormatSeparator);const A=B=>E.skipNull&&o(_[B])||E.skipEmptyString&&_[B]==="",w=a(E),N={};for(const B of Object.keys(_))A(B)||(N[B]=_[B]);const F=Object.keys(N);return E.sort!==!1&&F.sort(E.sort),F.map(B=>{const G=_[B];return G===void 0?"":G===null?c(B,E):Array.isArray(G)?G.length===0&&E.arrayFormat==="bracket-separator"?c(B,E)+"[]":G.reduce(w(B),[]).join("&"):c(B,E)+"="+c(G,E)}).filter(B=>B.length>0).join("&")},e.parseUrl=(_,E)=>{E=Object.assign({decode:!0},E);const[A,w]=n(_,"#");return Object.assign({url:A.split("?")[0]||"",query:T(m(_),E)},E&&E.parseFragmentIdentifier&&w?{fragmentIdentifier:h(w,E)}:{})},e.stringifyUrl=(_,E)=>{E=Object.assign({encode:!0,strict:!0,[s]:!0},E);const A=l(_.url).split("?")[0]||"",w=e.extract(_.url),N=e.parse(w,{sort:!1}),F=Object.assign(N,_.query);let B=e.stringify(F,E);B&&(B=`?${B}`);let G=p(_.url);return _.fragmentIdentifier&&(G=`#${E[s]?c(_.fragmentIdentifier,E):_.fragmentIdentifier}`),`${A}${B}${G}`},e.pick=(_,E,A)=>{A=Object.assign({parseFragmentIdentifier:!0,[s]:!1},A);const{url:w,query:N,fragmentIdentifier:F}=e.parseUrl(_,A);return e.stringifyUrl({url:w,query:i(N,E),fragmentIdentifier:F},A)},e.exclude=(_,E,A)=>{const w=Array.isArray(E)?N=>!E.includes(N):(N,F)=>!E(N,F);return e.pick(_,w,A)}}(ss)),ss}var tf;function xE(){return tf||(tf=1,function(e,t){(function(r,n){e.exports=n(_E(),TE())})(ce,function(r,n){return function(){var i={897:function(u){u.exports=r},48:function(u){u.exports=n}},o={};function s(u){var f=o[u];if(f!==void 0)return f.exports;var c=o[u]={exports:{}};return i[u](c,c.exports,s),c.exports}s.d=function(u,f){for(var c in f)s.o(f,c)&&!s.o(u,c)&&Object.defineProperty(u,c,{enumerable:!0,get:f[c]})},s.o=function(u,f){return Object.prototype.hasOwnProperty.call(u,f)},s.r=function(u){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var a={};return function(){s.r(a),s.d(a,{getEntries:function(){return te},getEntry:function(){return Y},setContext:function(){return m}});var u=s(897),f=s(48),c={CONTENTFUL:{ENVIRONMENTS_MAPING:{beta:"beta",rc:"rc",live:"master",local:"beta"},LOCALES:{DEFAULT:"en",SUPPORTED:["en","es","fr","pt"]},SPACE:"txbhe1wabmyx",HOSTS:{CDN:"cdn.contentful.com",PREVIEW:"preview.contentful.com"}}};const{CONTENTFUL:{ENVIRONMENTS_MAPING:h,SPACE:d,HOSTS:l}}=c;let p={apiKey:null,previewKey:null,environment:null,isPreview:!1,host:l.CDN,space:d};const m=({apiKey:K,environment:k,isPreview:V=!1,location:J,previewKey:de,space:X=null})=>{p.apiKey=K,p.previewKey=de,p.environment=(Z=>{if(!Z)throw new Error("Cannot map environment: Environment not defined");if(!h[Z])throw new Error(`Cannot map environment: No mapping found for environment ${Z}`);return h[Z]})(k),p.isPreview=V||(Z=>{let re=!1;if(Z&&Z.search){const ue=(0,f.parse)(Z.search);re=ue.isPreview&&ue.isPreview==="true"}return re})(J),p.space=X||d},b=(K=!1)=>{const{apiKey:k,environment:V,isPreview:J,previewKey:de,space:X}=p;return J===!0||K===!0?{accessToken:de,environment:V,host:l.PREVIEW,space:X}:{accessToken:k,environment:V,host:l.CDN,space:X}},T=K=>typeof K=="object"&&K!==null,_=K=>Array.isArray(K)&&K.length,E=K=>{if(!T(K))throw new Error("Cannot flatten fields");const{fields:k,sys:V}=K;if(!k)throw new Error("Cannot flatten fields");let J={...k};if(T(V)){const{contentType:de,createdAt:X,updatedAt:Z}=V;de&&Object.assign(J,{contentType:de.sys.id}),X&&Object.assign(J,{createdAt:X}),Z&&Object.assign(J,{updatedAt:Z})}return J},{CONTENTFUL:{LOCALES:A}}=c,w=(K,k)=>T(K)&&((V,J)=>Object.prototype.hasOwnProperty.call(V,J))(K,k),N=(K,k)=>{const V=(J=>A.SUPPORTED.includes(J)?J:A.DEFAULT)(k);return w(K,V)?K[V]:w(K,A.DEFAULT)?K[A.DEFAULT]:K},F=K=>T(K)&&K.sys&&K.sys.type==="Asset",B=(K,k,V)=>{const{title:J,file:de}=E(K);if(!de)throw new Error("Cannot flatten asset");const{contentType:X,fileName:Z,url:re,details:ue}=N(de,k);if(!re)throw new Error("Cannot flatten asset");return V?{description:J||Z,height:ue&&ue.image&&ue.image.height,type:X,url:re,width:ue&&ue.image&&ue.image.width}:re},G=K=>T(K)&&K.sys&&K.sys.type==="Entry",W=(K,k,V)=>{const J={},de=((X,Z)=>{const re={};for(const[ue,Fe]of Object.entries(X))re[ue]=N(Fe,Z);return re})(E(K),k);for(const[X,Z]of Object.entries(de))F(Z)?J[X]=B(Z,k,V):G(Z)?J[X]=W(Z,k,V):_(Z)?J[X]=Z.map(re=>F(re)?B(re,k,V):G(re)?W(re,k,V):re):J[X]=Z;return J},z=({items:K})=>{if(!_(K))throw new Error("Cannot read items");return K},$=async(K,k)=>{const V=b(k);return await(await(0,u.createClient)(V)).getEntries(K)},Y=async(K={},k={},V=!1)=>((J,{flatten:de=!0,locale:X="en",assetDetails:Z=!1})=>{const re=z(J);return de?W(re[0],X,Z):re[0]})(await $(K,V),{...K,...k}),te=async(K={},k={},V=!1)=>((J,{flatten:de=!0,locale:X="en",assetDetails:Z=!1})=>{const re=z(J);return de?((ue,Fe,Q)=>ue.map(oe=>W(oe,Fe,Q)))(re,X,Z):re})(await $(K,V),{...K,...k})}(),a}()})}(ya)),ya.exports}var ds={exports:{}},hs={exports:{}},ps={exports:{}},ms={exports:{}},rf;function Yu(){return rf||(rf=1,function(e,t){(function(r,n){e.exports=n()})(ce,function(){function r(m){return!isNaN(parseFloat(m))&&isFinite(m)}function n(m){return m.charAt(0).toUpperCase()+m.substring(1)}function i(m){return function(){return this[m]}}var o=["isConstructor","isEval","isNative","isToplevel"],s=["columnNumber","lineNumber"],a=["fileName","functionName","source"],u=["args"],f=["evalOrigin"],c=o.concat(s,a,u,f);function h(m){if(m)for(var b=0;b<c.length;b++)m[c[b]]!==void 0&&this["set"+n(c[b])](m[c[b]])}h.prototype={getArgs:function(){return this.args},setArgs:function(m){if(Object.prototype.toString.call(m)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=m},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(m){if(m instanceof h)this.evalOrigin=m;else if(m instanceof Object)this.evalOrigin=new h(m);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var m=this.getFileName()||"",b=this.getLineNumber()||"",T=this.getColumnNumber()||"",_=this.getFunctionName()||"";return this.getIsEval()?m?"[eval] ("+m+":"+b+":"+T+")":"[eval]:"+b+":"+T:_?_+" ("+m+":"+b+":"+T+")":m+":"+b+":"+T}},h.fromString=function(b){var T=b.indexOf("("),_=b.lastIndexOf(")"),E=b.substring(0,T),A=b.substring(T+1,_).split(","),w=b.substring(_+1);if(w.indexOf("@")===0)var N=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(w,""),F=N[1],B=N[2],G=N[3];return new h({functionName:E,args:A||void 0,fileName:F,lineNumber:B||void 0,columnNumber:G||void 0})};for(var d=0;d<o.length;d++)h.prototype["get"+n(o[d])]=i(o[d]),h.prototype["set"+n(o[d])]=function(m){return function(b){this[m]=!!b}}(o[d]);for(var l=0;l<s.length;l++)h.prototype["get"+n(s[l])]=i(s[l]),h.prototype["set"+n(s[l])]=function(m){return function(b){if(!r(b))throw new TypeError(m+" must be a Number");this[m]=Number(b)}}(s[l]);for(var p=0;p<a.length;p++)h.prototype["get"+n(a[p])]=i(a[p]),h.prototype["set"+n(a[p])]=function(m){return function(b){this[m]=String(b)}}(a[p]);return h})}(ms)),ms.exports}var nf;function OE(){return nf||(nf=1,function(e,t){(function(r,n){e.exports=n(Yu())})(ce,function(n){var i=/(^|@)\S+:\d+/,o=/^\s*at .*(\S+:\d+|\(native\))/m,s=/^(eval@)?(\[native code])?$/;return{parse:function(u){if(typeof u.stacktrace<"u"||typeof u["opera#sourceloc"]<"u")return this.parseOpera(u);if(u.stack&&u.stack.match(o))return this.parseV8OrIE(u);if(u.stack)return this.parseFFOrSafari(u);throw new Error("Cannot parse given Error object")},extractLocation:function(u){if(u.indexOf(":")===-1)return[u];var f=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=f.exec(u.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(u){var f=u.stack.split(`
34
+ `),r}return!0}function Ih(e){var t=Object.getOwnPropertyNames(e),r=x_(t),n;try{for(r.s();!(n=r.n()).done;){var i=n.value,o=e[i];o&&du(o)==="object"&&Ih(o)}}catch(s){r.e(s)}finally{r.f()}return Object.freeze(e)}function $_(e){return Ih(e.sys||{}),e}function Pl(){var e=P_();if(!e)return null;var t=e.navigator.userAgent,r=e.navigator.platform,n=["Macintosh","MacIntel","MacPPC","Mac68K"],i=["Win32","Win64","Windows","WinCE"],o=["iPhone","iPad","iPod"];return n.indexOf(r)!==-1?"macOS":o.indexOf(r)!==-1?"iOS":i.indexOf(r)!==-1?"Windows":/Android/.test(t)?"Android":/Linux/.test(r)?"Linux":null}function j_(){var e=process.platform||"linux",t=process.version||"0.0.0",r={android:"Android",aix:"Linux",darwin:"macOS",freebsd:"Linux",linux:"Linux",openbsd:"Linux",sunos:"Linux",win32:"Windows"};return e in r?"".concat(r[e]||"Linux","/").concat(t):null}function H_(e,t,r,n){var i=[];t&&i.push("app ".concat(t)),r&&i.push("integration ".concat(r)),n&&i.push("feature "+n),i.push("sdk ".concat(e));var o=null;try{R_()?(o=Pl(),i.push("platform ReactNative")):C_()?(o=j_(),i.push("platform node.js/".concat(N_()))):(o=Pl(),i.push("platform browser"))}catch{o=null}return o&&i.push("os ".concat(o)),"".concat(i.filter(function(s){return s!==""}).join("; "),";")}function q_(e){return Object.defineProperty(e,"toPlainObject",{enumerable:!1,configurable:!1,writable:!1,value:function(){return Er(this)}})}function G_(e){var t=e.config,r=e.response,n;if(t&&t.headers&&t.headers.Authorization){var i="...".concat(t.headers.Authorization.toString().substr(-5));t.headers.Authorization="Bearer ".concat(i)}if(!mo(r)||!mo(t))throw e;var o=r==null?void 0:r.data,s={status:r==null?void 0:r.status,statusText:r==null?void 0:r.statusText,message:"",details:{}};mo(t)&&(s.request={url:t.url,headers:t.headers,method:t.method,payloadData:t.data}),o&&mo(o)&&("requestId"in o&&(s.requestId=o.requestId||"UNKNOWN"),"message"in o&&(s.message=o.message||""),"details"in o&&(s.details=o.details||{}),"sys"in o&&"id"in o.sys&&(n=o.sys.id));var a=new Error;a.name=n&&n!=="Unknown"?n:"".concat(r==null?void 0:r.status," ").concat(r==null?void 0:r.statusText);try{a.message=JSON.stringify(s,null," ")}catch{var u;a.message=(u=s==null?void 0:s.message)!==null&&u!==void 0?u:""}throw a}const W_=Object.freeze(Object.defineProperty({__proto__:null,createHttpClient:Ph,createRequestConfig:D_,enforceObjPath:U_,errorHandler:G_,freezeSys:$_,getUserAgentHeader:H_,toPlainObject:q_},Symbol.toStringTag,{value:"Module"})),Gt=Ji(W_);var go={},yi={},yo={},Il;function V_(){if(Il)return yo;Il=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.wrapSpace=t;var e=Gt;function t(r){return(0,e.freezeSys)((0,e.toPlainObject)(r))}return yo}var vi={},as={exports:{}},Ll;function Fn(){return Ll||(Ll=1,function(e,t){(function(r,n){e.exports=n()})(ce,function(){var r=Function.prototype.toString,n=Object.create,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,u=Object.getPrototypeOf,f=Object.prototype,c=f.hasOwnProperty,h=f.propertyIsEnumerable,d=typeof a=="function",l=typeof WeakMap=="function",p=function(){if(l)return function(){return new WeakMap};var F=function(){function B(){this._keys=[],this._values=[]}return B.prototype.has=function(G){return!!~this._keys.indexOf(G)},B.prototype.get=function(G){return this._values[this._keys.indexOf(G)]},B.prototype.set=function(G,W){this._keys.push(G),this._values.push(W)},B}();return function(){return new F}}(),m=function(F,B){var G=F.__proto__||u(F);if(!G)return n(null);var W=G.constructor;if(W===B.Object)return G===B.Object.prototype?{}:n(G);if(~r.call(W).indexOf("[native code]"))try{return new W}catch{}return n(G)},b=function(F,B,G,W){var z=m(F,B);W.set(F,z);for(var $ in F)c.call(F,$)&&(z[$]=G(F[$],W));if(d)for(var Y=a(F),te=0,K=Y.length,M=void 0;te<K;++te)M=Y[te],h.call(F,M)&&(z[M]=G(F[M],W));return z},T=function(F,B,G,W){var z=m(F,B);W.set(F,z);for(var $=d?s(F).concat(a(F)):s(F),Y=0,te=$.length,K=void 0,M=void 0;Y<te;++Y)if(K=$[Y],K!=="callee"&&K!=="caller")if(M=o(F,K),M){!M.get&&!M.set&&(M.value=G(F[K],W));try{i(z,K,M)}catch{z[K]=M.value}}else z[K]=G(F[K],W);return z},_=function(F){var B="";return F.global&&(B+="g"),F.ignoreCase&&(B+="i"),F.multiline&&(B+="m"),F.unicode&&(B+="u"),F.sticky&&(B+="y"),B},E=Array.isArray,A=Object.getPrototypeOf,w=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ce<"u"?ce:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function N(F,B){var G=!!(B&&B.isStrict),W=B&&B.realm||w,z=G?T:b,$=function(Y,te){if(!Y||typeof Y!="object")return Y;if(te.has(Y))return te.get(Y);var K=Y.__proto__||A(Y),M=K&&K.constructor;if(!M||M===W.Object)return z(Y,W,$,te);var V;if(E(Y)){if(G)return T(Y,W,$,te);V=new M,te.set(Y,V);for(var J=0,de=Y.length;J<de;++J)V[J]=$(Y[J],te);return V}if(Y instanceof W.Date)return new M(Y.getTime());if(Y instanceof W.RegExp)return V=new M(Y.source,Y.flags||_(Y)),V.lastIndex=Y.lastIndex,V;if(W.Map&&Y instanceof W.Map)return V=new M,te.set(Y,V),Y.forEach(function(X,Z){V.set(Z,$(X,te))}),V;if(W.Set&&Y instanceof W.Set)return V=new M,te.set(Y,V),Y.forEach(function(X){V.add($(X,te))}),V;if(W.Blob&&Y instanceof W.Blob)return Y.slice(0,Y.size,Y.type);if(W.Buffer&&W.Buffer.isBuffer(Y))return V=W.Buffer.allocUnsafe?W.Buffer.allocUnsafe(Y.length):new M(Y.length),te.set(Y,V),Y.copy(V),V;if(W.ArrayBuffer){if(W.ArrayBuffer.isView(Y))return V=new M(Y.buffer.slice(0)),te.set(Y,V),V;if(Y instanceof W.ArrayBuffer)return V=Y.slice(0),te.set(Y,V),V}return typeof Y.then=="function"||Y instanceof Error||W.WeakMap&&Y instanceof W.WeakMap||W.WeakSet&&Y instanceof W.WeakSet?Y:z(Y,W,$,te)};return $(F,p())}return N.default=N,N.strict=function(B,G){return N(B,{isStrict:!0,realm:G?G.realm:void 0})},N})}(as)),as.exports}var vo={},_o={exports:{}},Ml;function z_(){return Ml||(Ml=1,function(e,t){t=e.exports=r,t.getSerialize=n;function r(i,o,s,a){return JSON.stringify(i,n(o,a),s)}function n(i,o){var s=[],a=[];return o==null&&(o=function(u,f){return s[0]===f?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(f)).join(".")+"]"}),function(u,f){if(s.length>0){var c=s.indexOf(this);~c?s.splice(c+1):s.push(this),~c?a.splice(c,1/0,u):a.push(u),~s.indexOf(f)&&(f=o.call(this,u,f))}else s.push(f);return i==null?f:i.call(this,u,f)}}}(_o,_o.exports)),_o.exports}var kl;function Lh(){if(kl)return vo;kl=1,Object.defineProperty(vo,"__esModule",{value:!0}),vo.default=r;var e=t(z_());function t(n){return n&&n.__esModule?n:{default:n}}function r(n){return Object.defineProperty(n,"stringifySafe",{enumerable:!1,configurable:!1,writable:!1,value:function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,e.default)(this,i,o,(s,a)=>({sys:{type:"Link",linkType:"Entry",id:a.sys.id,circular:!0}}))}})}return vo}var Y_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},K_=function(){function e(t,r){var n=[],i=!0,o=!1,s=void 0;try{for(var a=t[Symbol.iterator](),u;!(i=(u=a.next()).done)&&(n.push(u.value),!(r&&n.length===r));i=!0);}catch(f){o=!0,s=f}finally{try{!i&&a.return&&a.return()}finally{if(o)throw s}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function _i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}else return Array.from(e)}var Yi={},Q_=function(t){return t&&t.sys&&t.sys.type==="Link"},X_=function(t){return t&&t.sys&&t.sys.type==="ResourceLink"},J_=function(t){return t.space&&t.environment?[t.type+"!"+t.id,t.space.sys.id+"!"+t.environment.sys.id+"!"+t.type+"!"+t.id]:[t.type+"!"+t.id]},Bl=function(t,r){var n=r.entryId,i=r.linkType,o=r.spaceId,s=r.environmentId;return o&&s?t.get(o+"!"+s+"!"+i+"!"+n):t.get(i+"!"+n)},Z_=function(t){var r=/.*:spaces\/([^/]+)(?:\/environments\/([^/]+))?\/entries\/([^/]+)$/;if(r.test(t)){var n=t.match(r),i=K_(n,4);i[0];var o=i[1],s=i[2],a=s===void 0?"master":s,u=i[3];return{spaceId:o,environmentId:a,entryId:u}}},eE=function(t,r){var n=r.sys,i=n.type,o=n.linkType;if(i==="ResourceLink"){var s=r.sys.urn,a=Z_(s),u=a.spaceId,f=a.environmentId,c=a.entryId,h=o.split(":")[1];return Bl(t,{linkType:h,entryId:c,spaceId:u,environmentId:f})||Yi}var d=r.sys.id;return Bl(t,{linkType:o,entryId:d})||Yi},tE=function(t){if(Array.isArray(t))return t.filter(function(n){return n!==Yi});for(var r in t)t[r]===Yi&&delete t[r];return t},rE=function e(t,r,n,i){if(r(t))return n(t);if(t&&(typeof t>"u"?"undefined":Y_(t))==="object"){for(var o in t)t.hasOwnProperty(o)&&(t[o]=e(t[o],r,n,i));i&&(t=tE(t))}return t},nE=function(t,r,n){var i=eE(t,r);return i===Yi?n?i:r:i},iE=function(t,r){if(!Array.isArray(r))return t;var n=Object.keys(t).filter(function(i){return r.indexOf(i)!==-1});return n.reduce(function(i,o){return i[o]=t[o],i},{})},oE=function(t,r){if(r=r||{},!t.items)return[];var n=Er(t),i=Object.keys(n.includes||{}).reduce(function(a,u){return[].concat(_i(a),_i(t.includes[u]))},[]),o=[].concat(_i(n.items),_i(i)).filter(function(a){return!!a.sys}),s=new Map(o.reduce(function(a,u){var f=J_(u.sys).map(function(c){return[c,u]});return a.push.apply(a,_i(f)),a},[]));return o.forEach(function(a){var u=iE(a,r.itemEntryPoints);Object.assign(a,rE(u,function(f){return Q_(f)||X_(f)},function(f){return nE(s,f,r.removeUnresolved)},r.removeUnresolved))}),n.items};const aE=Object.freeze(Object.defineProperty({__proto__:null,default:oE},Symbol.toStringTag,{value:"Module"})),Mh=Ji(aE);var Fl;function sE(){if(Fl)return vi;Fl=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.wrapEntry=o,vi.wrapEntryCollection=s;var e=i(Fn()),t=Gt,r=i(Lh()),n=i(Mh);function i(a){return a&&a.__esModule?a:{default:a}}function o(a){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(a)))}function s(a,u){let{resolveLinks:f,removeUnresolved:c}=u;const h=(0,r.default)((0,t.toPlainObject)((0,e.default)(a)));return f&&(h.items=(0,n.default)(h,{removeUnresolved:c,itemEntryPoints:["fields"]})),(0,t.freezeSys)(h)}return vi}var Ei={},Dl;function uE(){if(Dl)return Ei;Dl=1,Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.wrapAsset=n,Ei.wrapAssetCollection=i;var e=r(Fn()),t=Gt;function r(o){return o&&o.__esModule?o:{default:o}}function n(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function i(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return Ei}var Eo={},Ul;function cE(){if(Ul)return Eo;Ul=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.wrapAssetKey=n;var e=r(Fn()),t=Gt;function r(i){return i&&i.__esModule?i:{default:i}}function n(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return Eo}var bi={},$l;function lE(){if($l)return bi;$l=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.wrapContentType=n,bi.wrapContentTypeCollection=i;var e=r(Fn()),t=Gt;function r(o){return o&&o.__esModule?o:{default:o}}function n(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function i(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return bi}var wi={},jl;function fE(){if(jl)return wi;jl=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.wrapLocale=n,wi.wrapLocaleCollection=i;var e=r(Fn()),t=Gt;function r(o){return o&&o.__esModule?o:{default:o}}function n(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function i(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return wi}var Si={},Hl;function dE(){if(Hl)return Si;Hl=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.wrapTag=n,Si.wrapTagCollection=i;var e=r(Fn()),t=Gt;function r(o){return o&&o.__esModule?o:{default:o}}function n(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function i(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return Si}var ql;function hE(){if(ql)return yi;ql=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.default=void 0;var e=u(V_()),t=u(sE()),r=u(uE()),n=u(cE()),i=u(lE()),o=u(fE()),s=u(dE());function a(c){if(typeof WeakMap!="function")return null;var h=new WeakMap,d=new WeakMap;return(a=function(l){return l?d:h})(c)}function u(c,h){if(!h&&c&&c.__esModule)return c;if(c===null||typeof c!="object"&&typeof c!="function")return{default:c};var d=a(h);if(d&&d.has(c))return d.get(c);var l={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in c)if(m!=="default"&&Object.prototype.hasOwnProperty.call(c,m)){var b=p?Object.getOwnPropertyDescriptor(c,m):null;b&&(b.get||b.set)?Object.defineProperty(l,m,b):l[m]=c[m]}return l.default=c,d&&d.set(c,l),l}var f={space:e,entry:t,asset:r,assetKey:n,contentType:i,locale:o,tag:s};return yi.default=f,yi}var bo={},Gl;function pE(){if(Gl)return bo;Gl=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.default=a;var e=Gt,t=n(Mh),r=n(Lh());function n(h){return h&&h.__esModule?h:{default:h}}function i(h,d){var l=Object.keys(h);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(h);d&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(h,m).enumerable})),l.push.apply(l,p)}return l}function o(h){for(var d=1;d<arguments.length;d++){var l=arguments[d]!=null?arguments[d]:{};d%2?i(Object(l),!0).forEach(function(p){s(h,p,l[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(l)):i(Object(l)).forEach(function(p){Object.defineProperty(h,p,Object.getOwnPropertyDescriptor(l,p))})}return h}function s(h,d,l){return d in h?Object.defineProperty(h,d,{value:l,enumerable:!0,configurable:!0,writable:!0}):h[d]=l,h}async function a(h,d){let l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!d||!d.initial&&!d.nextSyncToken&&!d.nextPageToken)throw new Error("Please provide one of `initial`, `nextSyncToken` or `nextPageToken` parameters for syncing");if(d&&d.content_type&&!d.type)d.type="Entry";else if(d&&d.content_type&&d.type&&d.type!=="Entry")throw new Error("When using the `content_type` filter your `type` parameter cannot be different from `Entry`.");const p={resolveLinks:!0,removeUnresolved:!1,paginate:!0},{resolveLinks:m,removeUnresolved:b,paginate:T}=o(o({},p),l),E=await f(h,[],d,{paginate:T});m&&(E.items=(0,t.default)(E,{removeUnresolved:b,itemEntryPoints:["fields"]}));const A=u(E.items);return E.nextSyncToken&&(A.nextSyncToken=E.nextSyncToken),E.nextPageToken&&(A.nextPageToken=E.nextPageToken),(0,e.freezeSys)((0,r.default)((0,e.toPlainObject)(A)))}function u(h){const d=l=>(p,m)=>(m.sys.type===l&&p.push((0,e.toPlainObject)(m)),p);return{entries:h.reduce(d("Entry"),[]),assets:h.reduce(d("Asset"),[]),deletedEntries:h.reduce(d("DeletedEntry"),[]),deletedAssets:h.reduce(d("DeletedAsset"),[])}}async function f(h,d,l,p){let{paginate:m}=p;l.nextSyncToken&&(l.sync_token=l.nextSyncToken,delete l.nextSyncToken),l.nextPageToken&&(l.sync_token=l.nextPageToken,delete l.nextPageToken),l.sync_token&&(delete l.initial,delete l.type,delete l.content_type,delete l.limit);const T=(await h.get("sync",(0,e.createRequestConfig)({query:l}))).data||{};return d=d.concat(T.items||[]),T.nextPageUrl?m?(delete l.initial,l.sync_token=c(T.nextPageUrl),f(h,d,l,{paginate:m})):{items:d,nextPageToken:c(T.nextPageUrl)}:T.nextSyncUrl?{items:d,nextSyncToken:c(T.nextSyncUrl)}:{items:[]}}function c(h){const d=h.split("?");return d.length>0?d[1].replace("sync_token=",""):""}return bo}var wo={},Wl;function mE(){if(Wl)return wo;Wl=1,Object.defineProperty(wo,"__esModule",{value:!0}),wo.default=n;function e(i,o){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(i);o&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(i,u).enumerable})),s.push.apply(s,a)}return s}function t(i){for(var o=1;o<arguments.length;o++){var s=arguments[o]!=null?arguments[o]:{};o%2?e(Object(s),!0).forEach(function(a){r(i,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):e(Object(s)).forEach(function(a){Object.defineProperty(i,a,Object.getOwnPropertyDescriptor(s,a))})}return i}function r(i,o,s){return o in i?Object.defineProperty(i,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):i[o]=s,i}function n(i){if(!i.select)return i;const o=Array.isArray(i.select)?i.select:i.select.split(","),s=new Set(o);return s.has("sys")?i:(s.add("sys.id"),s.add("sys.type"),t(t({},i),{},{select:[...s].join(",")}))}return wo}var Tn={},Vl;function gE(){if(Vl)return Tn;Vl=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.ValidationError=void 0,Tn.default=t;class e extends Error{constructor(n,i){super(`Invalid "${n}" provided, `+i),this.name="ValidationError"}}Tn.ValidationError=e;function t(r,n,i){if(i=i||{},typeof n!="number")throw new e(r,`only numeric values are allowed for timestamps, provided type was "${typeof n}"`);if(i.maximum&&n>i.maximum)throw new e(r,`value (${n}) cannot be further in the future than expected maximum (${i.maximum})`);if(i.now&&n<i.now)throw new e(r,`value (${n}) cannot be in the past, current time was ${i.now}`)}return Tn}var zl;function yE(){if(zl)return go;zl=1,Object.defineProperty(go,"__esModule",{value:!0}),go.default=c;var e=Gt,t=o(hE()),r=o(pE()),n=o(mE()),i=o(gE());function o(h){return h&&h.__esModule?h:{default:h}}function s(h,d){var l=Object.keys(h);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(h);d&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(h,m).enumerable})),l.push.apply(l,p)}return l}function a(h){for(var d=1;d<arguments.length;d++){var l=arguments[d]!=null?arguments[d]:{};d%2?s(Object(l),!0).forEach(function(p){u(h,p,l[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(l)):s(Object(l)).forEach(function(p){Object.defineProperty(h,p,Object.getOwnPropertyDescriptor(l,p))})}return h}function u(h,d,l){return d in h?Object.defineProperty(h,d,{value:l,enumerable:!0,configurable:!0,writable:!0}):h[d]=l,h}const f=48*60*60;function c(h){let{http:d,getGlobalOptions:l}=h;const{wrapSpace:p}=t.default.space,{wrapContentType:m,wrapContentTypeCollection:b}=t.default.contentType,{wrapEntry:T,wrapEntryCollection:_}=t.default.entry,{wrapAsset:E,wrapAssetCollection:A}=t.default.asset,{wrapTag:w,wrapTagCollection:N}=t.default.tag,{wrapAssetKey:F}=t.default.assetKey,{wrapLocaleCollection:B}=t.default.locale,G=Q=>{const oe=new Error("The resource could not be found.");return oe.sys={type:"Error",id:"NotFound"},oe.details={type:"Entry",id:Q,environment:l().environment,space:l().space},oe};async function W(){Fe(d);try{const Q=await d.get("/");return p(Q.data)}catch(Q){(0,e.errorHandler)(Q)}}async function z(Q){ue(d);try{const oe=await d.get(`content_types/${Q}`);return m(oe.data)}catch(oe){(0,e.errorHandler)(oe)}}async function $(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ue(d);try{const oe=await d.get("content_types",(0,e.createRequestConfig)({query:Q}));return b(oe.data)}catch(oe){(0,e.errorHandler)(oe)}}async function Y(Q){let oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Q)throw G(Q);try{const Pe=await this.getEntries(a({"sys.id":Q},oe));if(Pe.items.length>0)return T(Pe.items[0]);throw G(Q)}catch(Pe){(0,e.errorHandler)(Pe)}}async function te(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ue(d);const{resolveLinks:oe,removeUnresolved:Pe}=l(Q);Q=(0,n.default)(Q);try{const Ae=await d.get("entries",(0,e.createRequestConfig)({query:Q}));return _(Ae.data,{resolveLinks:oe,removeUnresolved:Pe})}catch(Ae){(0,e.errorHandler)(Ae)}}async function K(Q){let oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ue(d),oe=(0,n.default)(oe);try{const Pe=await d.get(`assets/${Q}`,(0,e.createRequestConfig)({query:oe}));return E(Pe.data)}catch(Pe){(0,e.errorHandler)(Pe)}}async function M(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ue(d),Q=(0,n.default)(Q);try{const oe=await d.get("assets",(0,e.createRequestConfig)({query:Q}));return A(oe.data)}catch(oe){(0,e.errorHandler)(oe)}}async function V(Q){ue(d);try{const oe=await d.get(`tags/${Q}`);return w(oe.data)}catch(oe){(0,e.errorHandler)(oe)}}async function J(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ue(d),Q=(0,n.default)(Q);try{const oe=await d.get("tags",(0,e.createRequestConfig)({query:Q}));return N(oe.data)}catch(oe){(0,e.errorHandler)(oe)}}async function de(Q){ue(d);try{const oe=Math.floor(Date.now()/1e3),Pe=oe+f;(0,i.default)("expiresAt",Q,{maximum:Pe,now:oe});const Ae={expiresAt:Q},ut=await d.post("asset_keys",Ae);return F(ut.data)}catch(oe){(0,e.errorHandler)(oe)}}async function X(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ue(d);try{const oe=await d.get("locales",(0,e.createRequestConfig)({query:Q}));return B(oe.data)}catch(oe){(0,e.errorHandler)(oe)}}async function Z(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{paginate:!0};const{resolveLinks:Pe,removeUnresolved:Ae}=l(Q);return ue(d),(0,r.default)(d,Q,a({resolveLinks:Pe,removeUnresolved:Ae},oe))}function re(Q){const{resolveLinks:oe,removeUnresolved:Pe}=l({});return _(Q,{resolveLinks:oe,removeUnresolved:Pe})}function ue(Q){Q.defaults.baseURL=l().environmentBaseUrl}function Fe(Q){Q.defaults.baseURL=l().spaceBaseUrl}return{getSpace:W,getContentType:z,getContentTypes:$,getEntry:Y,getEntries:te,getAsset:K,getAssets:M,getTag:V,getTags:J,createAssetKey:de,getLocales:X,parseEntries:re,sync:Z}}return go}var So={},Yl;function vE(){if(Yl)return So;Yl=1,Object.defineProperty(So,"__esModule",{value:!0}),So.default=e;function e(t){return function(n){return Object.assign({},t,n)}}return So}var Kl;function _E(){if(Kl)return co;Kl=1,Object.defineProperty(co,"__esModule",{value:!0}),co.createClient=u;var e=i(oh()),t=Gt,r=i(yE()),n=i(vE());function i(f){return f&&f.__esModule?f:{default:f}}function o(f,c){var h=Object.keys(f);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(f);c&&(d=d.filter(function(l){return Object.getOwnPropertyDescriptor(f,l).enumerable})),h.push.apply(h,d)}return h}function s(f){for(var c=1;c<arguments.length;c++){var h=arguments[c]!=null?arguments[c]:{};c%2?o(Object(h),!0).forEach(function(d){a(f,d,h[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(h)):o(Object(h)).forEach(function(d){Object.defineProperty(f,d,Object.getOwnPropertyDescriptor(h,d))})}return f}function a(f,c,h){return c in f?Object.defineProperty(f,c,{value:h,enumerable:!0,configurable:!0,writable:!0}):f[c]=h,f}function u(f){if(!f.accessToken)throw new TypeError("Expected parameter accessToken");if(!f.space)throw new TypeError("Expected parameter space");const h=s(s({},{resolveLinks:!0,removeUnresolved:!1,defaultHostname:"cdn.contentful.com",environment:"master"}),f),d=(0,t.getUserAgentHeader)("contentful.js/9.1.34",h.application,h.integration);h.headers=s(s({},h.headers),{},{"Content-Type":"application/vnd.contentful.delivery.v1+json","X-Contentful-User-Agent":d});const l=(0,t.createHttpClient)(e.default,h),p=(0,n.default)({resolveLinks:h.resolveLinks,environment:h.environment,removeUnresolved:h.removeUnresolved,spaceBaseUrl:l.defaults.baseURL,environmentBaseUrl:`${l.defaults.baseURL}environments/${h.environment}`});return l.defaults.baseURL=p().environmentBaseUrl,(0,r.default)({http:l,getGlobalOptions:p})}return co}var ss={},us,Ql;function EE(){return Ql||(Ql=1,us=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),us}var cs,Xl;function bE(){if(Xl)return cs;Xl=1;var e="%[a-f0-9]{2}",t=new RegExp("("+e+")|([^%]+?)","gi"),r=new RegExp("("+e+")+","gi");function n(s,a){try{return[decodeURIComponent(s.join(""))]}catch{}if(s.length===1)return s;a=a||1;var u=s.slice(0,a),f=s.slice(a);return Array.prototype.concat.call([],n(u),n(f))}function i(s){try{return decodeURIComponent(s)}catch{for(var a=s.match(t)||[],u=1;u<a.length;u++)s=n(a,u).join(""),a=s.match(t)||[];return s}}function o(s){for(var a={"%FE%FF":"��","%FF%FE":"��"},u=r.exec(s);u;){try{a[u[0]]=decodeURIComponent(u[0])}catch{var f=i(u[0]);f!==u[0]&&(a[u[0]]=f)}u=r.exec(s)}a["%C2"]="�";for(var c=Object.keys(a),h=0;h<c.length;h++){var d=c[h];s=s.replace(new RegExp(d,"g"),a[d])}return s}return cs=function(s){if(typeof s!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof s+"`");try{return s=s.replace(/\+/g," "),decodeURIComponent(s)}catch{return o(s)}},cs}var ls,Jl;function wE(){return Jl||(Jl=1,ls=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]}),ls}var fs,Zl;function SE(){return Zl||(Zl=1,fs=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),o=0;o<n.length;o++){var s=n[o],a=e[s];(i?t.indexOf(s)!==-1:t(s,a,e))&&(r[s]=a)}return r}),fs}var ef;function TE(){return ef||(ef=1,function(e){const t=EE(),r=bE(),n=wE(),i=SE(),o=_=>_==null,s=Symbol("encodeFragmentIdentifier");function a(_){switch(_.arrayFormat){case"index":return E=>(A,w)=>{const N=A.length;return w===void 0||_.skipNull&&w===null||_.skipEmptyString&&w===""?A:w===null?[...A,[c(E,_),"[",N,"]"].join("")]:[...A,[c(E,_),"[",c(N,_),"]=",c(w,_)].join("")]};case"bracket":return E=>(A,w)=>w===void 0||_.skipNull&&w===null||_.skipEmptyString&&w===""?A:w===null?[...A,[c(E,_),"[]"].join("")]:[...A,[c(E,_),"[]=",c(w,_)].join("")];case"colon-list-separator":return E=>(A,w)=>w===void 0||_.skipNull&&w===null||_.skipEmptyString&&w===""?A:w===null?[...A,[c(E,_),":list="].join("")]:[...A,[c(E,_),":list=",c(w,_)].join("")];case"comma":case"separator":case"bracket-separator":{const E=_.arrayFormat==="bracket-separator"?"[]=":"=";return A=>(w,N)=>N===void 0||_.skipNull&&N===null||_.skipEmptyString&&N===""?w:(N=N===null?"":N,w.length===0?[[c(A,_),E,c(N,_)].join("")]:[[w,c(N,_)].join(_.arrayFormatSeparator)])}default:return E=>(A,w)=>w===void 0||_.skipNull&&w===null||_.skipEmptyString&&w===""?A:w===null?[...A,c(E,_)]:[...A,[c(E,_),"=",c(w,_)].join("")]}}function u(_){let E;switch(_.arrayFormat){case"index":return(A,w,N)=>{if(E=/\[(\d*)\]$/.exec(A),A=A.replace(/\[\d*\]$/,""),!E){N[A]=w;return}N[A]===void 0&&(N[A]={}),N[A][E[1]]=w};case"bracket":return(A,w,N)=>{if(E=/(\[\])$/.exec(A),A=A.replace(/\[\]$/,""),!E){N[A]=w;return}if(N[A]===void 0){N[A]=[w];return}N[A]=[].concat(N[A],w)};case"colon-list-separator":return(A,w,N)=>{if(E=/(:list)$/.exec(A),A=A.replace(/:list$/,""),!E){N[A]=w;return}if(N[A]===void 0){N[A]=[w];return}N[A]=[].concat(N[A],w)};case"comma":case"separator":return(A,w,N)=>{const F=typeof w=="string"&&w.includes(_.arrayFormatSeparator),B=typeof w=="string"&&!F&&h(w,_).includes(_.arrayFormatSeparator);w=B?h(w,_):w;const G=F||B?w.split(_.arrayFormatSeparator).map(W=>h(W,_)):w===null?w:h(w,_);N[A]=G};case"bracket-separator":return(A,w,N)=>{const F=/(\[\])$/.test(A);if(A=A.replace(/\[\]$/,""),!F){N[A]=w&&h(w,_);return}const B=w===null?[]:w.split(_.arrayFormatSeparator).map(G=>h(G,_));if(N[A]===void 0){N[A]=B;return}N[A]=[].concat(N[A],B)};default:return(A,w,N)=>{if(N[A]===void 0){N[A]=w;return}N[A]=[].concat(N[A],w)}}}function f(_){if(typeof _!="string"||_.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function c(_,E){return E.encode?E.strict?t(_):encodeURIComponent(_):_}function h(_,E){return E.decode?r(_):_}function d(_){return Array.isArray(_)?_.sort():typeof _=="object"?d(Object.keys(_)).sort((E,A)=>Number(E)-Number(A)).map(E=>_[E]):_}function l(_){const E=_.indexOf("#");return E!==-1&&(_=_.slice(0,E)),_}function p(_){let E="";const A=_.indexOf("#");return A!==-1&&(E=_.slice(A)),E}function m(_){_=l(_);const E=_.indexOf("?");return E===-1?"":_.slice(E+1)}function b(_,E){return E.parseNumbers&&!Number.isNaN(Number(_))&&typeof _=="string"&&_.trim()!==""?_=Number(_):E.parseBooleans&&_!==null&&(_.toLowerCase()==="true"||_.toLowerCase()==="false")&&(_=_.toLowerCase()==="true"),_}function T(_,E){E=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},E),f(E.arrayFormatSeparator);const A=u(E),w=Object.create(null);if(typeof _!="string"||(_=_.trim().replace(/^[?#&]/,""),!_))return w;for(const N of _.split("&")){if(N==="")continue;let[F,B]=n(E.decode?N.replace(/\+/g," "):N,"=");B=B===void 0?null:["comma","separator","bracket-separator"].includes(E.arrayFormat)?B:h(B,E),A(h(F,E),B,w)}for(const N of Object.keys(w)){const F=w[N];if(typeof F=="object"&&F!==null)for(const B of Object.keys(F))F[B]=b(F[B],E);else w[N]=b(F,E)}return E.sort===!1?w:(E.sort===!0?Object.keys(w).sort():Object.keys(w).sort(E.sort)).reduce((N,F)=>{const B=w[F];return B&&typeof B=="object"&&!Array.isArray(B)?N[F]=d(B):N[F]=B,N},Object.create(null))}e.extract=m,e.parse=T,e.stringify=(_,E)=>{if(!_)return"";E=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},E),f(E.arrayFormatSeparator);const A=B=>E.skipNull&&o(_[B])||E.skipEmptyString&&_[B]==="",w=a(E),N={};for(const B of Object.keys(_))A(B)||(N[B]=_[B]);const F=Object.keys(N);return E.sort!==!1&&F.sort(E.sort),F.map(B=>{const G=_[B];return G===void 0?"":G===null?c(B,E):Array.isArray(G)?G.length===0&&E.arrayFormat==="bracket-separator"?c(B,E)+"[]":G.reduce(w(B),[]).join("&"):c(B,E)+"="+c(G,E)}).filter(B=>B.length>0).join("&")},e.parseUrl=(_,E)=>{E=Object.assign({decode:!0},E);const[A,w]=n(_,"#");return Object.assign({url:A.split("?")[0]||"",query:T(m(_),E)},E&&E.parseFragmentIdentifier&&w?{fragmentIdentifier:h(w,E)}:{})},e.stringifyUrl=(_,E)=>{E=Object.assign({encode:!0,strict:!0,[s]:!0},E);const A=l(_.url).split("?")[0]||"",w=e.extract(_.url),N=e.parse(w,{sort:!1}),F=Object.assign(N,_.query);let B=e.stringify(F,E);B&&(B=`?${B}`);let G=p(_.url);return _.fragmentIdentifier&&(G=`#${E[s]?c(_.fragmentIdentifier,E):_.fragmentIdentifier}`),`${A}${B}${G}`},e.pick=(_,E,A)=>{A=Object.assign({parseFragmentIdentifier:!0,[s]:!1},A);const{url:w,query:N,fragmentIdentifier:F}=e.parseUrl(_,A);return e.stringifyUrl({url:w,query:i(N,E),fragmentIdentifier:F},A)},e.exclude=(_,E,A)=>{const w=Array.isArray(E)?N=>!E.includes(N):(N,F)=>!E(N,F);return e.pick(_,w,A)}}(ss)),ss}var tf;function xE(){return tf||(tf=1,function(e,t){(function(r,n){e.exports=n(_E(),TE())})(ce,function(r,n){return function(){var i={897:function(u){u.exports=r},48:function(u){u.exports=n}},o={};function s(u){var f=o[u];if(f!==void 0)return f.exports;var c=o[u]={exports:{}};return i[u](c,c.exports,s),c.exports}s.d=function(u,f){for(var c in f)s.o(f,c)&&!s.o(u,c)&&Object.defineProperty(u,c,{enumerable:!0,get:f[c]})},s.o=function(u,f){return Object.prototype.hasOwnProperty.call(u,f)},s.r=function(u){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var a={};return function(){s.r(a),s.d(a,{getEntries:function(){return te},getEntry:function(){return Y},setContext:function(){return m}});var u=s(897),f=s(48),c={CONTENTFUL:{ENVIRONMENTS_MAPING:{beta:"beta",rc:"rc",live:"master",local:"beta"},LOCALES:{DEFAULT:"en",SUPPORTED:["en","es","fr","pt"]},SPACE:"txbhe1wabmyx",HOSTS:{CDN:"cdn.contentful.com",PREVIEW:"preview.contentful.com"}}};const{CONTENTFUL:{ENVIRONMENTS_MAPING:h,SPACE:d,HOSTS:l}}=c;let p={apiKey:null,previewKey:null,environment:null,isPreview:!1,host:l.CDN,space:d};const m=({apiKey:K,environment:M,isPreview:V=!1,location:J,previewKey:de,space:X=null})=>{p.apiKey=K,p.previewKey=de,p.environment=(Z=>{if(!Z)throw new Error("Cannot map environment: Environment not defined");if(!h[Z])throw new Error(`Cannot map environment: No mapping found for environment ${Z}`);return h[Z]})(M),p.isPreview=V||(Z=>{let re=!1;if(Z&&Z.search){const ue=(0,f.parse)(Z.search);re=ue.isPreview&&ue.isPreview==="true"}return re})(J),p.space=X||d},b=(K=!1)=>{const{apiKey:M,environment:V,isPreview:J,previewKey:de,space:X}=p;return J===!0||K===!0?{accessToken:de,environment:V,host:l.PREVIEW,space:X}:{accessToken:M,environment:V,host:l.CDN,space:X}},T=K=>typeof K=="object"&&K!==null,_=K=>Array.isArray(K)&&K.length,E=K=>{if(!T(K))throw new Error("Cannot flatten fields");const{fields:M,sys:V}=K;if(!M)throw new Error("Cannot flatten fields");let J={...M};if(T(V)){const{contentType:de,createdAt:X,updatedAt:Z}=V;de&&Object.assign(J,{contentType:de.sys.id}),X&&Object.assign(J,{createdAt:X}),Z&&Object.assign(J,{updatedAt:Z})}return J},{CONTENTFUL:{LOCALES:A}}=c,w=(K,M)=>T(K)&&((V,J)=>Object.prototype.hasOwnProperty.call(V,J))(K,M),N=(K,M)=>{const V=(J=>A.SUPPORTED.includes(J)?J:A.DEFAULT)(M);return w(K,V)?K[V]:w(K,A.DEFAULT)?K[A.DEFAULT]:K},F=K=>T(K)&&K.sys&&K.sys.type==="Asset",B=(K,M,V)=>{const{title:J,file:de}=E(K);if(!de)throw new Error("Cannot flatten asset");const{contentType:X,fileName:Z,url:re,details:ue}=N(de,M);if(!re)throw new Error("Cannot flatten asset");return V?{description:J||Z,height:ue&&ue.image&&ue.image.height,type:X,url:re,width:ue&&ue.image&&ue.image.width}:re},G=K=>T(K)&&K.sys&&K.sys.type==="Entry",W=(K,M,V)=>{const J={},de=((X,Z)=>{const re={};for(const[ue,Fe]of Object.entries(X))re[ue]=N(Fe,Z);return re})(E(K),M);for(const[X,Z]of Object.entries(de))F(Z)?J[X]=B(Z,M,V):G(Z)?J[X]=W(Z,M,V):_(Z)?J[X]=Z.map(re=>F(re)?B(re,M,V):G(re)?W(re,M,V):re):J[X]=Z;return J},z=({items:K})=>{if(!_(K))throw new Error("Cannot read items");return K},$=async(K,M)=>{const V=b(M);return await(await(0,u.createClient)(V)).getEntries(K)},Y=async(K={},M={},V=!1)=>((J,{flatten:de=!0,locale:X="en",assetDetails:Z=!1})=>{const re=z(J);return de?W(re[0],X,Z):re[0]})(await $(K,V),{...K,...M}),te=async(K={},M={},V=!1)=>((J,{flatten:de=!0,locale:X="en",assetDetails:Z=!1})=>{const re=z(J);return de?((ue,Fe,Q)=>ue.map(oe=>W(oe,Fe,Q)))(re,X,Z):re})(await $(K,V),{...K,...M})}(),a}()})}(ya)),ya.exports}var ds={exports:{}},hs={exports:{}},ps={exports:{}},ms={exports:{}},rf;function Yu(){return rf||(rf=1,function(e,t){(function(r,n){e.exports=n()})(ce,function(){function r(m){return!isNaN(parseFloat(m))&&isFinite(m)}function n(m){return m.charAt(0).toUpperCase()+m.substring(1)}function i(m){return function(){return this[m]}}var o=["isConstructor","isEval","isNative","isToplevel"],s=["columnNumber","lineNumber"],a=["fileName","functionName","source"],u=["args"],f=["evalOrigin"],c=o.concat(s,a,u,f);function h(m){if(m)for(var b=0;b<c.length;b++)m[c[b]]!==void 0&&this["set"+n(c[b])](m[c[b]])}h.prototype={getArgs:function(){return this.args},setArgs:function(m){if(Object.prototype.toString.call(m)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=m},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(m){if(m instanceof h)this.evalOrigin=m;else if(m instanceof Object)this.evalOrigin=new h(m);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var m=this.getFileName()||"",b=this.getLineNumber()||"",T=this.getColumnNumber()||"",_=this.getFunctionName()||"";return this.getIsEval()?m?"[eval] ("+m+":"+b+":"+T+")":"[eval]:"+b+":"+T:_?_+" ("+m+":"+b+":"+T+")":m+":"+b+":"+T}},h.fromString=function(b){var T=b.indexOf("("),_=b.lastIndexOf(")"),E=b.substring(0,T),A=b.substring(T+1,_).split(","),w=b.substring(_+1);if(w.indexOf("@")===0)var N=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(w,""),F=N[1],B=N[2],G=N[3];return new h({functionName:E,args:A||void 0,fileName:F,lineNumber:B||void 0,columnNumber:G||void 0})};for(var d=0;d<o.length;d++)h.prototype["get"+n(o[d])]=i(o[d]),h.prototype["set"+n(o[d])]=function(m){return function(b){this[m]=!!b}}(o[d]);for(var l=0;l<s.length;l++)h.prototype["get"+n(s[l])]=i(s[l]),h.prototype["set"+n(s[l])]=function(m){return function(b){if(!r(b))throw new TypeError(m+" must be a Number");this[m]=Number(b)}}(s[l]);for(var p=0;p<a.length;p++)h.prototype["get"+n(a[p])]=i(a[p]),h.prototype["set"+n(a[p])]=function(m){return function(b){this[m]=String(b)}}(a[p]);return h})}(ms)),ms.exports}var nf;function OE(){return nf||(nf=1,function(e,t){(function(r,n){e.exports=n(Yu())})(ce,function(n){var i=/(^|@)\S+:\d+/,o=/^\s*at .*(\S+:\d+|\(native\))/m,s=/^(eval@)?(\[native code])?$/;return{parse:function(u){if(typeof u.stacktrace<"u"||typeof u["opera#sourceloc"]<"u")return this.parseOpera(u);if(u.stack&&u.stack.match(o))return this.parseV8OrIE(u);if(u.stack)return this.parseFFOrSafari(u);throw new Error("Cannot parse given Error object")},extractLocation:function(u){if(u.indexOf(":")===-1)return[u];var f=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=f.exec(u.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(u){var f=u.stack.split(`
35
35
  `).filter(function(c){return!!c.match(o)},this);return f.map(function(c){c.indexOf("(eval ")>-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var h=c.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),d=h.match(/ (\(.+\)$)/);h=d?h.replace(d[0],""):h;var l=this.extractLocation(d?d[1]:h),p=d&&h||void 0,m=["eval","<anonymous>"].indexOf(l[0])>-1?void 0:l[0];return new n({functionName:p,fileName:m,lineNumber:l[1],columnNumber:l[2],source:c})},this)},parseFFOrSafari:function(u){var f=u.stack.split(`
36
36
  `).filter(function(c){return!c.match(s)},this);return f.map(function(c){if(c.indexOf(" > eval")>-1&&(c=c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),c.indexOf("@")===-1&&c.indexOf(":")===-1)return new n({functionName:c});var h=/((.*".+"[^@]*)?[^@]*)(?:@)/,d=c.match(h),l=d&&d[1]?d[1]:void 0,p=this.extractLocation(c.replace(h,""));return new n({functionName:l,fileName:p[0],lineNumber:p[1],columnNumber:p[2],source:c})},this)},parseOpera:function(u){return!u.stacktrace||u.message.indexOf(`
37
37
  `)>-1&&u.message.split(`
@@ -39,8 +39,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
39
39
  `).length?this.parseOpera9(u):u.stack?this.parseOpera11(u):this.parseOpera10(u)},parseOpera9:function(u){for(var f=/Line (\d+).*script (?:in )?(\S+)/i,c=u.message.split(`
40
40
  `),h=[],d=2,l=c.length;d<l;d+=2){var p=f.exec(c[d]);p&&h.push(new n({fileName:p[2],lineNumber:p[1],source:c[d]}))}return h},parseOpera10:function(u){for(var f=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,c=u.stacktrace.split(`
41
41
  `),h=[],d=0,l=c.length;d<l;d+=2){var p=f.exec(c[d]);p&&h.push(new n({functionName:p[3]||void 0,fileName:p[2],lineNumber:p[1],source:c[d]}))}return h},parseOpera11:function(u){var f=u.stack.split(`
42
- `).filter(function(c){return!!c.match(i)&&!c.match(/^Error created at/)},this);return f.map(function(c){var h=c.split("@"),d=this.extractLocation(h.pop()),l=h.shift()||"",p=l.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,m;l.match(/\(([^)]*)\)/)&&(m=l.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var b=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new n({functionName:p,args:b,fileName:d[0],lineNumber:d[1],columnNumber:d[2],source:c})},this)}}})}(ps)),ps.exports}var gs={exports:{}},of;function AE(){return of||(of=1,function(e,t){(function(r,n){e.exports=n(Yu())})(ce,function(r){return{backtrace:function(i){var o=[],s=10;typeof i=="object"&&typeof i.maxStackSize=="number"&&(s=i.maxStackSize);for(var a=arguments.callee;a&&o.length<s&&a.arguments;){for(var u=new Array(a.arguments.length),f=0;f<u.length;++f)u[f]=a.arguments[f];/function(?:\s+([\w$]+))+\s*\(/.test(a.toString())?o.push(new r({functionName:RegExp.$1||void 0,args:u})):o.push(new r({args:u}));try{a=a.caller}catch{break}}return o}}})}(gs)),gs.exports}var ys={exports:{}},Ti={},vs={},af;function Mh(){return af||(af=1,function(e){function t(_,E,A){if(E in _)return _[E];if(arguments.length===3)return A;throw new Error('"'+E+'" is a required argument.')}e.getArg=t;var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,n=/^data:.+\,.+$/;function i(_){var E=_.match(r);return E?{scheme:E[1],auth:E[2],host:E[3],port:E[4],path:E[5]}:null}e.urlParse=i;function o(_){var E="";return _.scheme&&(E+=_.scheme+":"),E+="//",_.auth&&(E+=_.auth+"@"),_.host&&(E+=_.host),_.port&&(E+=":"+_.port),_.path&&(E+=_.path),E}e.urlGenerate=o;function s(_){var E=_,A=i(_);if(A){if(!A.path)return _;E=A.path}for(var w=e.isAbsolute(E),N=E.split(/\/+/),F,B=0,G=N.length-1;G>=0;G--)F=N[G],F==="."?N.splice(G,1):F===".."?B++:B>0&&(F===""?(N.splice(G+1,B),B=0):(N.splice(G,2),B--));return E=N.join("/"),E===""&&(E=w?"/":"."),A?(A.path=E,o(A)):E}e.normalize=s;function a(_,E){_===""&&(_="."),E===""&&(E=".");var A=i(E),w=i(_);if(w&&(_=w.path||"/"),A&&!A.scheme)return w&&(A.scheme=w.scheme),o(A);if(A||E.match(n))return E;if(w&&!w.host&&!w.path)return w.host=E,o(w);var N=E.charAt(0)==="/"?E:s(_.replace(/\/+$/,"")+"/"+E);return w?(w.path=N,o(w)):N}e.join=a,e.isAbsolute=function(_){return _.charAt(0)==="/"||!!_.match(r)};function u(_,E){_===""&&(_="."),_=_.replace(/\/$/,"");for(var A=0;E.indexOf(_+"/")!==0;){var w=_.lastIndexOf("/");if(w<0||(_=_.slice(0,w),_.match(/^([^\/]+:\/)?\/*$/)))return E;++A}return Array(A+1).join("../")+E.substr(_.length+1)}e.relative=u;var f=function(){var _=Object.create(null);return!("__proto__"in _)}();function c(_){return _}function h(_){return l(_)?"$"+_:_}e.toSetString=f?c:h;function d(_){return l(_)?_.slice(1):_}e.fromSetString=f?c:d;function l(_){if(!_)return!1;var E=_.length;if(E<9||_.charCodeAt(E-1)!==95||_.charCodeAt(E-2)!==95||_.charCodeAt(E-3)!==111||_.charCodeAt(E-4)!==116||_.charCodeAt(E-5)!==111||_.charCodeAt(E-6)!==114||_.charCodeAt(E-7)!==112||_.charCodeAt(E-8)!==95||_.charCodeAt(E-9)!==95)return!1;for(var A=E-10;A>=0;A--)if(_.charCodeAt(A)!==36)return!1;return!0}function p(_,E,A){var w=_.source-E.source;return w!==0||(w=_.originalLine-E.originalLine,w!==0)||(w=_.originalColumn-E.originalColumn,w!==0||A)||(w=_.generatedColumn-E.generatedColumn,w!==0)||(w=_.generatedLine-E.generatedLine,w!==0)?w:_.name-E.name}e.compareByOriginalPositions=p;function m(_,E,A){var w=_.generatedLine-E.generatedLine;return w!==0||(w=_.generatedColumn-E.generatedColumn,w!==0||A)||(w=_.source-E.source,w!==0)||(w=_.originalLine-E.originalLine,w!==0)||(w=_.originalColumn-E.originalColumn,w!==0)?w:_.name-E.name}e.compareByGeneratedPositionsDeflated=m;function b(_,E){return _===E?0:_>E?1:-1}function T(_,E){var A=_.generatedLine-E.generatedLine;return A!==0||(A=_.generatedColumn-E.generatedColumn,A!==0)||(A=b(_.source,E.source),A!==0)||(A=_.originalLine-E.originalLine,A!==0)||(A=_.originalColumn-E.originalColumn,A!==0)?A:b(_.name,E.name)}e.compareByGeneratedPositionsInflated=T}(vs)),vs}var _s={},sf;function CE(){return sf||(sf=1,function(e){e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(r,n,i,o,s,a){var u=Math.floor((n-r)/2)+r,f=s(i,o[u],!0);return f===0?u:f>0?n-u>1?t(u,n,i,o,s,a):a==e.LEAST_UPPER_BOUND?n<o.length?n:-1:u:u-r>1?t(r,u,i,o,s,a):a==e.LEAST_UPPER_BOUND?u:r<0?-1:r}e.search=function(n,i,o,s){if(i.length===0)return-1;var a=t(-1,i.length,n,i,o,s||e.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&o(i[a],i[a-1],!0)===0;)--a;return a}}(_s)),_s}var Es={},uf;function RE(){if(uf)return Es;uf=1;var e=Mh(),t=Object.prototype.hasOwnProperty;function r(){this._array=[],this._set=Object.create(null)}return r.fromArray=function(i,o){for(var s=new r,a=0,u=i.length;a<u;a++)s.add(i[a],o);return s},r.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(i,o){var s=e.toSetString(i),a=t.call(this._set,s),u=this._array.length;(!a||o)&&this._array.push(i),a||(this._set[s]=u)},r.prototype.has=function(i){var o=e.toSetString(i);return t.call(this._set,o)},r.prototype.indexOf=function(i){var o=e.toSetString(i);if(t.call(this._set,o))return this._set[o];throw new Error('"'+i+'" is not in the set.')},r.prototype.at=function(i){if(i>=0&&i<this._array.length)return this._array[i];throw new Error("No element indexed by "+i)},r.prototype.toArray=function(){return this._array.slice()},Es.ArraySet=r,Es}var To={},xo={},cf;function NE(){if(cf)return xo;cf=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return xo.encode=function(t){if(0<=t&&t<e.length)return e[t];throw new TypeError("Must be between 0 and 63: "+t)},xo.decode=function(t){var r=65,n=90,i=97,o=122,s=48,a=57,u=43,f=47,c=26,h=52;return r<=t&&t<=n?t-r:i<=t&&t<=o?t-i+c:s<=t&&t<=a?t-s+h:t==u?62:t==f?63:-1},xo}var lf;function PE(){if(lf)return To;lf=1;var e=NE(),t=5,r=1<<t,n=r-1,i=r;function o(a){return a<0?(-a<<1)+1:(a<<1)+0}function s(a){var u=(a&1)===1,f=a>>1;return u?-f:f}return To.encode=function(u){var f="",c,h=o(u);do c=h&n,h>>>=t,h>0&&(c|=i),f+=e.encode(c);while(h>0);return f},To.decode=function(u,f,c){var h=u.length,d=0,l=0,p,m;do{if(f>=h)throw new Error("Expected more digits in base 64 VLQ value.");if(m=e.decode(u.charCodeAt(f++)),m===-1)throw new Error("Invalid base64 digit: "+u.charAt(f-1));p=!!(m&i),m&=n,d=d+(m<<l),l+=t}while(p);c.value=s(d),c.rest=f},To}var bs={},ff;function IE(){if(ff)return bs;ff=1;function e(n,i,o){var s=n[i];n[i]=n[o],n[o]=s}function t(n,i){return Math.round(n+Math.random()*(i-n))}function r(n,i,o,s){if(o<s){var a=t(o,s),u=o-1;e(n,a,s);for(var f=n[s],c=o;c<s;c++)i(n[c],f)<=0&&(u+=1,e(n,u,c));e(n,u+1,c);var h=u+1;r(n,i,o,h-1),r(n,i,h+1,s)}}return bs.quickSort=function(n,i){r(n,i,0,n.length-1)},bs}var df;function LE(){if(df)return Ti;df=1;var e=Mh(),t=CE(),r=RE().ArraySet,n=PE(),i=IE().quickSort;function o(f){var c=f;return typeof f=="string"&&(c=JSON.parse(f.replace(/^\)\]\}'/,""))),c.sections!=null?new u(c):new s(c)}o.fromSourceMap=function(f){return s.fromSourceMap(f)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(c,h){var d=c.charAt(h);return d===";"||d===","},o.prototype._parseMappings=function(c,h){throw new Error("Subclasses must implement _parseMappings")},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(c,h,d){var l=h||null,p=d||o.GENERATED_ORDER,m;switch(p){case o.GENERATED_ORDER:m=this._generatedMappings;break;case o.ORIGINAL_ORDER:m=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var b=this.sourceRoot;m.map(function(T){var _=T.source===null?null:this._sources.at(T.source);return _!=null&&b!=null&&(_=e.join(b,_)),{source:_,generatedLine:T.generatedLine,generatedColumn:T.generatedColumn,originalLine:T.originalLine,originalColumn:T.originalColumn,name:T.name===null?null:this._names.at(T.name)}},this).forEach(c,l)},o.prototype.allGeneratedPositionsFor=function(c){var h=e.getArg(c,"line"),d={source:e.getArg(c,"source"),originalLine:h,originalColumn:e.getArg(c,"column",0)};if(this.sourceRoot!=null&&(d.source=e.relative(this.sourceRoot,d.source)),!this._sources.has(d.source))return[];d.source=this._sources.indexOf(d.source);var l=[],p=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(p>=0){var m=this._originalMappings[p];if(c.column===void 0)for(var b=m.originalLine;m&&m.originalLine===b;)l.push({line:e.getArg(m,"generatedLine",null),column:e.getArg(m,"generatedColumn",null),lastColumn:e.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++p];else for(var T=m.originalColumn;m&&m.originalLine===h&&m.originalColumn==T;)l.push({line:e.getArg(m,"generatedLine",null),column:e.getArg(m,"generatedColumn",null),lastColumn:e.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++p]}return l},Ti.SourceMapConsumer=o;function s(f){var c=f;typeof f=="string"&&(c=JSON.parse(f.replace(/^\)\]\}'/,"")));var h=e.getArg(c,"version"),d=e.getArg(c,"sources"),l=e.getArg(c,"names",[]),p=e.getArg(c,"sourceRoot",null),m=e.getArg(c,"sourcesContent",null),b=e.getArg(c,"mappings"),T=e.getArg(c,"file",null);if(h!=this._version)throw new Error("Unsupported version: "+h);d=d.map(String).map(e.normalize).map(function(_){return p&&e.isAbsolute(p)&&e.isAbsolute(_)?e.relative(p,_):_}),this._names=r.fromArray(l.map(String),!0),this._sources=r.fromArray(d,!0),this.sourceRoot=p,this.sourcesContent=m,this._mappings=b,this.file=T}s.prototype=Object.create(o.prototype),s.prototype.consumer=o,s.fromSourceMap=function(c){var h=Object.create(s.prototype),d=h._names=r.fromArray(c._names.toArray(),!0),l=h._sources=r.fromArray(c._sources.toArray(),!0);h.sourceRoot=c._sourceRoot,h.sourcesContent=c._generateSourcesContent(h._sources.toArray(),h.sourceRoot),h.file=c._file;for(var p=c._mappings.toArray().slice(),m=h.__generatedMappings=[],b=h.__originalMappings=[],T=0,_=p.length;T<_;T++){var E=p[T],A=new a;A.generatedLine=E.generatedLine,A.generatedColumn=E.generatedColumn,E.source&&(A.source=l.indexOf(E.source),A.originalLine=E.originalLine,A.originalColumn=E.originalColumn,E.name&&(A.name=d.indexOf(E.name)),b.push(A)),m.push(A)}return i(h.__originalMappings,e.compareByOriginalPositions),h},s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){return this._sources.toArray().map(function(f){return this.sourceRoot!=null?e.join(this.sourceRoot,f):f},this)}});function a(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s.prototype._parseMappings=function(c,h){for(var d=1,l=0,p=0,m=0,b=0,T=0,_=c.length,E=0,A={},w={},N=[],F=[],B,G,W,z,$;E<_;)if(c.charAt(E)===";")d++,E++,l=0;else if(c.charAt(E)===",")E++;else{for(B=new a,B.generatedLine=d,z=E;z<_&&!this._charIsMappingSeparator(c,z);z++);if(G=c.slice(E,z),W=A[G],W)E+=G.length;else{for(W=[];E<z;)n.decode(c,E,w),$=w.value,E=w.rest,W.push($);if(W.length===2)throw new Error("Found a source, but no line and column");if(W.length===3)throw new Error("Found a source and line, but no column");A[G]=W}B.generatedColumn=l+W[0],l=B.generatedColumn,W.length>1&&(B.source=b+W[1],b+=W[1],B.originalLine=p+W[2],p=B.originalLine,B.originalLine+=1,B.originalColumn=m+W[3],m=B.originalColumn,W.length>4&&(B.name=T+W[4],T+=W[4])),F.push(B),typeof B.originalLine=="number"&&N.push(B)}i(F,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=F,i(N,e.compareByOriginalPositions),this.__originalMappings=N},s.prototype._findMapping=function(c,h,d,l,p,m){if(c[d]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+c[d]);if(c[l]<0)throw new TypeError("Column must be greater than or equal to 0, got "+c[l]);return t.search(c,h,p,m)},s.prototype.computeColumnSpans=function(){for(var c=0;c<this._generatedMappings.length;++c){var h=this._generatedMappings[c];if(c+1<this._generatedMappings.length){var d=this._generatedMappings[c+1];if(h.generatedLine===d.generatedLine){h.lastGeneratedColumn=d.generatedColumn-1;continue}}h.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(c){var h={generatedLine:e.getArg(c,"line"),generatedColumn:e.getArg(c,"column")},d=this._findMapping(h,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(c,"bias",o.GREATEST_LOWER_BOUND));if(d>=0){var l=this._generatedMappings[d];if(l.generatedLine===h.generatedLine){var p=e.getArg(l,"source",null);p!==null&&(p=this._sources.at(p),this.sourceRoot!=null&&(p=e.join(this.sourceRoot,p)));var m=e.getArg(l,"name",null);return m!==null&&(m=this._names.at(m)),{source:p,line:e.getArg(l,"originalLine",null),column:e.getArg(l,"originalColumn",null),name:m}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(c){return c==null}):!1},s.prototype.sourceContentFor=function(c,h){if(!this.sourcesContent)return null;if(this.sourceRoot!=null&&(c=e.relative(this.sourceRoot,c)),this._sources.has(c))return this.sourcesContent[this._sources.indexOf(c)];var d;if(this.sourceRoot!=null&&(d=e.urlParse(this.sourceRoot))){var l=c.replace(/^file:\/\//,"");if(d.scheme=="file"&&this._sources.has(l))return this.sourcesContent[this._sources.indexOf(l)];if((!d.path||d.path=="/")&&this._sources.has("/"+c))return this.sourcesContent[this._sources.indexOf("/"+c)]}if(h)return null;throw new Error('"'+c+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(c){var h=e.getArg(c,"source");if(this.sourceRoot!=null&&(h=e.relative(this.sourceRoot,h)),!this._sources.has(h))return{line:null,column:null,lastColumn:null};h=this._sources.indexOf(h);var d={source:h,originalLine:e.getArg(c,"line"),originalColumn:e.getArg(c,"column")},l=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(c,"bias",o.GREATEST_LOWER_BOUND));if(l>=0){var p=this._originalMappings[l];if(p.source===d.source)return{line:e.getArg(p,"generatedLine",null),column:e.getArg(p,"generatedColumn",null),lastColumn:e.getArg(p,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Ti.BasicSourceMapConsumer=s;function u(f){var c=f;typeof f=="string"&&(c=JSON.parse(f.replace(/^\)\]\}'/,"")));var h=e.getArg(c,"version"),d=e.getArg(c,"sections");if(h!=this._version)throw new Error("Unsupported version: "+h);this._sources=new r,this._names=new r;var l={line:-1,column:0};this._sections=d.map(function(p){if(p.url)throw new Error("Support for url field in sections not implemented.");var m=e.getArg(p,"offset"),b=e.getArg(m,"line"),T=e.getArg(m,"column");if(b<l.line||b===l.line&&T<l.column)throw new Error("Section offsets must be ordered and non-overlapping.");return l=m,{generatedOffset:{generatedLine:b+1,generatedColumn:T+1},consumer:new o(e.getArg(p,"map"))}})}return u.prototype=Object.create(o.prototype),u.prototype.constructor=o,u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){for(var f=[],c=0;c<this._sections.length;c++)for(var h=0;h<this._sections[c].consumer.sources.length;h++)f.push(this._sections[c].consumer.sources[h]);return f}}),u.prototype.originalPositionFor=function(c){var h={generatedLine:e.getArg(c,"line"),generatedColumn:e.getArg(c,"column")},d=t.search(h,this._sections,function(p,m){var b=p.generatedLine-m.generatedOffset.generatedLine;return b||p.generatedColumn-m.generatedOffset.generatedColumn}),l=this._sections[d];return l?l.consumer.originalPositionFor({line:h.generatedLine-(l.generatedOffset.generatedLine-1),column:h.generatedColumn-(l.generatedOffset.generatedLine===h.generatedLine?l.generatedOffset.generatedColumn-1:0),bias:c.bias}):{source:null,line:null,column:null,name:null}},u.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(c){return c.consumer.hasContentsOfAllSources()})},u.prototype.sourceContentFor=function(c,h){for(var d=0;d<this._sections.length;d++){var l=this._sections[d],p=l.consumer.sourceContentFor(c,!0);if(p)return p}if(h)return null;throw new Error('"'+c+'" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(c){for(var h=0;h<this._sections.length;h++){var d=this._sections[h];if(d.consumer.sources.indexOf(e.getArg(c,"source"))!==-1){var l=d.consumer.generatedPositionFor(c);if(l){var p={line:l.line+(d.generatedOffset.generatedLine-1),column:l.column+(d.generatedOffset.generatedLine===l.line?d.generatedOffset.generatedColumn-1:0)};return p}}}return{line:null,column:null}},u.prototype._parseMappings=function(c,h){this.__generatedMappings=[],this.__originalMappings=[];for(var d=0;d<this._sections.length;d++)for(var l=this._sections[d],p=l.consumer._generatedMappings,m=0;m<p.length;m++){var b=p[m],T=l.consumer._sources.at(b.source);l.consumer.sourceRoot!==null&&(T=e.join(l.consumer.sourceRoot,T)),this._sources.add(T),T=this._sources.indexOf(T);var _=l.consumer._names.at(b.name);this._names.add(_),_=this._names.indexOf(_);var E={source:T,generatedLine:b.generatedLine+(l.generatedOffset.generatedLine-1),generatedColumn:b.generatedColumn+(l.generatedOffset.generatedLine===b.generatedLine?l.generatedOffset.generatedColumn-1:0),originalLine:b.originalLine,originalColumn:b.originalColumn,name:_};this.__generatedMappings.push(E),typeof E.originalLine=="number"&&this.__originalMappings.push(E)}i(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),i(this.__originalMappings,e.compareByOriginalPositions)},Ti.IndexedSourceMapConsumer=u,Ti}var hf;function kE(){return hf||(hf=1,function(e,t){(function(r,n){e.exports=n(LE(),Yu())})(ce,function(r,n){function i(d){return new Promise(function(l,p){var m=new XMLHttpRequest;m.open("get",d),m.onerror=p,m.onreadystatechange=function(){m.readyState===4&&(m.status>=200&&m.status<300||d.substr(0,7)==="file://"&&m.responseText?l(m.responseText):p(new Error("HTTP status: "+m.status+" retrieving "+d)))},m.send()})}function o(d){if(typeof window<"u"&&window.atob)return window.atob(d);throw new Error("You must supply a polyfill for window.atob in this environment")}function s(d){if(typeof JSON<"u"&&JSON.parse)return JSON.parse(d);throw new Error("You must supply a polyfill for JSON.parse in this environment")}function a(d,l){for(var p=[/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,/function\s+([^('"`]*?)\s*\(([^)]*)\)/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,/\b(?!(?:if|for|switch|while|with|catch)\b)(?:(?:static)\s+)?(\S+)\s*\(.*?\)\s*\{/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*\(.*?\)\s*=>/],m=d.split(`
43
- `),b="",T=Math.min(l,20),_=0;_<T;++_){var E=m[l-_-1],A=E.indexOf("//");if(A>=0&&(E=E.substr(0,A)),E){b=E+b;for(var w=p.length,N=0;N<w;N++){var F=p[N].exec(b);if(F&&F[1])return F[1]}}}}function u(){if(typeof Object.defineProperty!="function"||typeof Object.create!="function")throw new Error("Unable to consume source maps in older browsers")}function f(d){if(typeof d!="object")throw new TypeError("Given StackFrame is not an object");if(typeof d.fileName!="string")throw new TypeError("Given file name is not a String");if(typeof d.lineNumber!="number"||d.lineNumber%1!==0||d.lineNumber<1)throw new TypeError("Given line number must be a positive integer");if(typeof d.columnNumber!="number"||d.columnNumber%1!==0||d.columnNumber<0)throw new TypeError("Given column number must be a non-negative integer");return!0}function c(d){for(var l=/\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/mg,p,m;m=l.exec(d);)p=m[1];if(p)return p;throw new Error("sourceMappingURL not found")}function h(d,l,p){return new Promise(function(m,b){var T=l.originalPositionFor({line:d.lineNumber,column:d.columnNumber});if(T.source){var _=l.sourceContentFor(T.source);_&&(p[T.source]=_),m(new n({functionName:T.name||d.functionName,args:d.args,fileName:T.source,lineNumber:T.line,columnNumber:T.column}))}else b(new Error("Could not get original source for given stackframe and source map"))})}return function d(l){if(!(this instanceof d))return new d(l);l=l||{},this.sourceCache=l.sourceCache||{},this.sourceMapConsumerCache=l.sourceMapConsumerCache||{},this.ajax=l.ajax||i,this._atob=l.atob||o,this._get=function(m){return new Promise((function(b,T){var _=m.substr(0,5)==="data:";if(this.sourceCache[m])b(this.sourceCache[m]);else if(l.offline&&!_)T(new Error("Cannot make network requests in offline mode"));else if(_){var E=/^data:application\/json;([\w=:"-]+;)*base64,/,A=m.match(E);if(A){var w=A[0].length,N=m.substr(w),F=this._atob(N);this.sourceCache[m]=F,b(F)}else T(new Error("The encoding of the inline sourcemap is not supported"))}else{var B=this.ajax(m,{method:"get"});this.sourceCache[m]=B,B.then(b,T)}}).bind(this))},this._getSourceMapConsumer=function(m,b){return new Promise((function(T){if(this.sourceMapConsumerCache[m])T(this.sourceMapConsumerCache[m]);else{var _=new Promise((function(E,A){return this._get(m).then(function(w){typeof w=="string"&&(w=s(w.replace(/^\)\]\}'/,""))),typeof w.sourceRoot>"u"&&(w.sourceRoot=b),E(new r.SourceMapConsumer(w))}).catch(A)}).bind(this));this.sourceMapConsumerCache[m]=_,T(_)}}).bind(this))},this.pinpoint=function(m){return new Promise((function(b,T){this.getMappedLocation(m).then((function(_){function E(){b(_)}this.findFunctionName(_).then(b,E).catch(E)}).bind(this),T)}).bind(this))},this.findFunctionName=function(m){return new Promise((function(b,T){f(m),this._get(m.fileName).then(function(E){var A=m.lineNumber,w=m.columnNumber,N=a(E,A);b(N?new n({functionName:N,args:m.args,fileName:m.fileName,lineNumber:A,columnNumber:w}):m)},T).catch(T)}).bind(this))},this.getMappedLocation=function(m){return new Promise((function(b,T){u(),f(m);var _=this.sourceCache,E=m.fileName;this._get(E).then((function(A){var w=c(A),N=w.substr(0,5)==="data:",F=E.substring(0,E.lastIndexOf("/")+1);return w[0]!=="/"&&!N&&!/^https?:\/\/|^\/\//i.test(w)&&(w=F+w),this._getSourceMapConsumer(w,F).then(function(B){return h(m,B,_).then(b).catch(function(){b(m)})})}).bind(this),T).catch(T)}).bind(this))}}})}(ys)),ys.exports}var pf;function ME(){return pf||(pf=1,function(e,t){(function(r,n){e.exports=n(OE(),AE(),kE())})(ce,function(n,i,o){var s={filter:function(h){return(h.functionName||"").indexOf("StackTrace$$")===-1&&(h.functionName||"").indexOf("ErrorStackParser$$")===-1&&(h.functionName||"").indexOf("StackTraceGPS$$")===-1&&(h.functionName||"").indexOf("StackGenerator$$")===-1},sourceCache:{}},a=function(){try{throw new Error}catch(d){return d}};function u(h,d){var l={};return[h,d].forEach(function(p){for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(l[m]=p[m]);return l}),l}function f(h){return h.stack||h["opera#sourceloc"]}function c(h,d){return typeof d=="function"?h.filter(d):h}return{get:function(d){var l=a();return f(l)?this.fromError(l,d):this.generateArtificially(d)},getSync:function(d){d=u(s,d);var l=a(),p=f(l)?n.parse(l):i.backtrace(d);return c(p,d.filter)},fromError:function(d,l){l=u(s,l);var p=new o(l);return new Promise((function(m){var b=c(n.parse(d),l.filter);m(Promise.all(b.map(function(T){return new Promise(function(_){function E(){_(T)}p.pinpoint(T).then(_,E).catch(E)})})))}).bind(this))},generateArtificially:function(d){d=u(s,d);var l=i.backtrace(d);return typeof d.filter=="function"&&(l=l.filter(d.filter)),Promise.resolve(l)},instrument:function(d,l,p,m){if(typeof d!="function")throw new Error("Cannot instrument non-function object");if(typeof d.__stacktraceOriginalFn=="function")return d;var b=(function(){try{return this.get().then(l,p).catch(p),d.apply(m||this,arguments)}catch(_){throw f(_)&&this.fromError(_).then(l,p).catch(p),_}}).bind(this);return b.__stacktraceOriginalFn=d,b},deinstrument:function(d){if(typeof d!="function")throw new Error("Cannot de-instrument non-function object");return typeof d.__stacktraceOriginalFn=="function"?d.__stacktraceOriginalFn:d},report:function(d,l,p,m){return new Promise(function(b,T){var _=new XMLHttpRequest;if(_.onerror=T,_.onreadystatechange=function(){_.readyState===4&&(_.status>=200&&_.status<400?b(_.responseText):T(new Error("POST to "+l+" failed with status: "+_.status)))},_.open("post",l),_.setRequestHeader("Content-Type","application/json"),m&&typeof m.headers=="object"){var E=m.headers;for(var A in E)Object.prototype.hasOwnProperty.call(E,A)&&_.setRequestHeader(A,E[A])}var w={stack:d};p!=null&&(w.message=p),_.send(JSON.stringify(w))})}}})}(hs)),hs.exports}var ws,mf;function BE(){if(mf)return ws;mf=1;var e=ME(),t="https://clouderrorreporting.googleapis.com/v1beta1/projects/",r=function(){};r.prototype.start=function(s){if(!s.key&&!s.targetUrl&&!s.customReportingFunction)throw new Error("Cannot initialize: No API key, target url or custom reporting function provided.");if(!s.projectId&&!s.targetUrl&&!s.customReportingFunction)throw new Error("Cannot initialize: No project ID, target url or custom reporting function provided.");this.customReportingFunction=s.customReportingFunction,this.apiKey=s.key,this.projectId=s.projectId,this.targetUrl=s.targetUrl,this.context=s.context||{},this.serviceContext={service:s.service||"web"},s.version&&(this.serviceContext.version=s.version),this.reportUncaughtExceptions=s.reportUncaughtExceptions!==!1,this.reportUnhandledPromiseRejections=s.reportUnhandledPromiseRejections!==!1,this.disabled=!!s.disabled,n(this)};function n(s){var a=function(){};if(s.reportUncaughtExceptions){var u=window.onerror||a;window.onerror=function(c,h,d,l,p){return p&&s.report(p).catch(a),u(c,h,d,l,p),!0}}if(s.reportUnhandledPromiseRejections){var f=window.onunhandledrejection||a;window.onunhandledrejection=function(c){return c&&s.report(c.reason).catch(a),f(c.reason),!0}}}r.prototype.report=function(s,a){if(this.disabled)return Promise.resolve(null);if(!s)return Promise.reject(new Error("no error to report"));a=a||{};var u={};u.serviceContext=this.serviceContext,u.context=this.context,u.context.httpRequest={userAgent:window.navigator.userAgent,url:window.location.href};var f=0;if(typeof s=="string"||s instanceof String){try{throw new Error(s)}catch(d){s=d}f=a.skipLocalFrames||1}var c=this.targetUrl||t+this.projectId+"/events:report?key="+this.apiKey,h=this.customReportingFunction;return i(s,f).then(function(d){return u.message=d,h?h(u):o(c,u)})};function i(s,a){return e.fromError(s).then(function(u){for(var f=[s.toString()],c=a;c<u.length;c++)f.push([" at ",u[c].getFunctionName()||"<anonymous>"," (",u[c].getFileName(),":",u[c].getLineNumber(),":",u[c].getColumnNumber(),")"].join(""));return f.join(`
42
+ `).filter(function(c){return!!c.match(i)&&!c.match(/^Error created at/)},this);return f.map(function(c){var h=c.split("@"),d=this.extractLocation(h.pop()),l=h.shift()||"",p=l.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,m;l.match(/\(([^)]*)\)/)&&(m=l.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var b=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new n({functionName:p,args:b,fileName:d[0],lineNumber:d[1],columnNumber:d[2],source:c})},this)}}})}(ps)),ps.exports}var gs={exports:{}},of;function AE(){return of||(of=1,function(e,t){(function(r,n){e.exports=n(Yu())})(ce,function(r){return{backtrace:function(i){var o=[],s=10;typeof i=="object"&&typeof i.maxStackSize=="number"&&(s=i.maxStackSize);for(var a=arguments.callee;a&&o.length<s&&a.arguments;){for(var u=new Array(a.arguments.length),f=0;f<u.length;++f)u[f]=a.arguments[f];/function(?:\s+([\w$]+))+\s*\(/.test(a.toString())?o.push(new r({functionName:RegExp.$1||void 0,args:u})):o.push(new r({args:u}));try{a=a.caller}catch{break}}return o}}})}(gs)),gs.exports}var ys={exports:{}},Ti={},vs={},af;function kh(){return af||(af=1,function(e){function t(_,E,A){if(E in _)return _[E];if(arguments.length===3)return A;throw new Error('"'+E+'" is a required argument.')}e.getArg=t;var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,n=/^data:.+\,.+$/;function i(_){var E=_.match(r);return E?{scheme:E[1],auth:E[2],host:E[3],port:E[4],path:E[5]}:null}e.urlParse=i;function o(_){var E="";return _.scheme&&(E+=_.scheme+":"),E+="//",_.auth&&(E+=_.auth+"@"),_.host&&(E+=_.host),_.port&&(E+=":"+_.port),_.path&&(E+=_.path),E}e.urlGenerate=o;function s(_){var E=_,A=i(_);if(A){if(!A.path)return _;E=A.path}for(var w=e.isAbsolute(E),N=E.split(/\/+/),F,B=0,G=N.length-1;G>=0;G--)F=N[G],F==="."?N.splice(G,1):F===".."?B++:B>0&&(F===""?(N.splice(G+1,B),B=0):(N.splice(G,2),B--));return E=N.join("/"),E===""&&(E=w?"/":"."),A?(A.path=E,o(A)):E}e.normalize=s;function a(_,E){_===""&&(_="."),E===""&&(E=".");var A=i(E),w=i(_);if(w&&(_=w.path||"/"),A&&!A.scheme)return w&&(A.scheme=w.scheme),o(A);if(A||E.match(n))return E;if(w&&!w.host&&!w.path)return w.host=E,o(w);var N=E.charAt(0)==="/"?E:s(_.replace(/\/+$/,"")+"/"+E);return w?(w.path=N,o(w)):N}e.join=a,e.isAbsolute=function(_){return _.charAt(0)==="/"||!!_.match(r)};function u(_,E){_===""&&(_="."),_=_.replace(/\/$/,"");for(var A=0;E.indexOf(_+"/")!==0;){var w=_.lastIndexOf("/");if(w<0||(_=_.slice(0,w),_.match(/^([^\/]+:\/)?\/*$/)))return E;++A}return Array(A+1).join("../")+E.substr(_.length+1)}e.relative=u;var f=function(){var _=Object.create(null);return!("__proto__"in _)}();function c(_){return _}function h(_){return l(_)?"$"+_:_}e.toSetString=f?c:h;function d(_){return l(_)?_.slice(1):_}e.fromSetString=f?c:d;function l(_){if(!_)return!1;var E=_.length;if(E<9||_.charCodeAt(E-1)!==95||_.charCodeAt(E-2)!==95||_.charCodeAt(E-3)!==111||_.charCodeAt(E-4)!==116||_.charCodeAt(E-5)!==111||_.charCodeAt(E-6)!==114||_.charCodeAt(E-7)!==112||_.charCodeAt(E-8)!==95||_.charCodeAt(E-9)!==95)return!1;for(var A=E-10;A>=0;A--)if(_.charCodeAt(A)!==36)return!1;return!0}function p(_,E,A){var w=_.source-E.source;return w!==0||(w=_.originalLine-E.originalLine,w!==0)||(w=_.originalColumn-E.originalColumn,w!==0||A)||(w=_.generatedColumn-E.generatedColumn,w!==0)||(w=_.generatedLine-E.generatedLine,w!==0)?w:_.name-E.name}e.compareByOriginalPositions=p;function m(_,E,A){var w=_.generatedLine-E.generatedLine;return w!==0||(w=_.generatedColumn-E.generatedColumn,w!==0||A)||(w=_.source-E.source,w!==0)||(w=_.originalLine-E.originalLine,w!==0)||(w=_.originalColumn-E.originalColumn,w!==0)?w:_.name-E.name}e.compareByGeneratedPositionsDeflated=m;function b(_,E){return _===E?0:_>E?1:-1}function T(_,E){var A=_.generatedLine-E.generatedLine;return A!==0||(A=_.generatedColumn-E.generatedColumn,A!==0)||(A=b(_.source,E.source),A!==0)||(A=_.originalLine-E.originalLine,A!==0)||(A=_.originalColumn-E.originalColumn,A!==0)?A:b(_.name,E.name)}e.compareByGeneratedPositionsInflated=T}(vs)),vs}var _s={},sf;function CE(){return sf||(sf=1,function(e){e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(r,n,i,o,s,a){var u=Math.floor((n-r)/2)+r,f=s(i,o[u],!0);return f===0?u:f>0?n-u>1?t(u,n,i,o,s,a):a==e.LEAST_UPPER_BOUND?n<o.length?n:-1:u:u-r>1?t(r,u,i,o,s,a):a==e.LEAST_UPPER_BOUND?u:r<0?-1:r}e.search=function(n,i,o,s){if(i.length===0)return-1;var a=t(-1,i.length,n,i,o,s||e.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&o(i[a],i[a-1],!0)===0;)--a;return a}}(_s)),_s}var Es={},uf;function RE(){if(uf)return Es;uf=1;var e=kh(),t=Object.prototype.hasOwnProperty;function r(){this._array=[],this._set=Object.create(null)}return r.fromArray=function(i,o){for(var s=new r,a=0,u=i.length;a<u;a++)s.add(i[a],o);return s},r.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},r.prototype.add=function(i,o){var s=e.toSetString(i),a=t.call(this._set,s),u=this._array.length;(!a||o)&&this._array.push(i),a||(this._set[s]=u)},r.prototype.has=function(i){var o=e.toSetString(i);return t.call(this._set,o)},r.prototype.indexOf=function(i){var o=e.toSetString(i);if(t.call(this._set,o))return this._set[o];throw new Error('"'+i+'" is not in the set.')},r.prototype.at=function(i){if(i>=0&&i<this._array.length)return this._array[i];throw new Error("No element indexed by "+i)},r.prototype.toArray=function(){return this._array.slice()},Es.ArraySet=r,Es}var To={},xo={},cf;function NE(){if(cf)return xo;cf=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return xo.encode=function(t){if(0<=t&&t<e.length)return e[t];throw new TypeError("Must be between 0 and 63: "+t)},xo.decode=function(t){var r=65,n=90,i=97,o=122,s=48,a=57,u=43,f=47,c=26,h=52;return r<=t&&t<=n?t-r:i<=t&&t<=o?t-i+c:s<=t&&t<=a?t-s+h:t==u?62:t==f?63:-1},xo}var lf;function PE(){if(lf)return To;lf=1;var e=NE(),t=5,r=1<<t,n=r-1,i=r;function o(a){return a<0?(-a<<1)+1:(a<<1)+0}function s(a){var u=(a&1)===1,f=a>>1;return u?-f:f}return To.encode=function(u){var f="",c,h=o(u);do c=h&n,h>>>=t,h>0&&(c|=i),f+=e.encode(c);while(h>0);return f},To.decode=function(u,f,c){var h=u.length,d=0,l=0,p,m;do{if(f>=h)throw new Error("Expected more digits in base 64 VLQ value.");if(m=e.decode(u.charCodeAt(f++)),m===-1)throw new Error("Invalid base64 digit: "+u.charAt(f-1));p=!!(m&i),m&=n,d=d+(m<<l),l+=t}while(p);c.value=s(d),c.rest=f},To}var bs={},ff;function IE(){if(ff)return bs;ff=1;function e(n,i,o){var s=n[i];n[i]=n[o],n[o]=s}function t(n,i){return Math.round(n+Math.random()*(i-n))}function r(n,i,o,s){if(o<s){var a=t(o,s),u=o-1;e(n,a,s);for(var f=n[s],c=o;c<s;c++)i(n[c],f)<=0&&(u+=1,e(n,u,c));e(n,u+1,c);var h=u+1;r(n,i,o,h-1),r(n,i,h+1,s)}}return bs.quickSort=function(n,i){r(n,i,0,n.length-1)},bs}var df;function LE(){if(df)return Ti;df=1;var e=kh(),t=CE(),r=RE().ArraySet,n=PE(),i=IE().quickSort;function o(f){var c=f;return typeof f=="string"&&(c=JSON.parse(f.replace(/^\)\]\}'/,""))),c.sections!=null?new u(c):new s(c)}o.fromSourceMap=function(f){return s.fromSourceMap(f)},o.prototype._version=3,o.prototype.__generatedMappings=null,Object.defineProperty(o.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),o.prototype.__originalMappings=null,Object.defineProperty(o.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),o.prototype._charIsMappingSeparator=function(c,h){var d=c.charAt(h);return d===";"||d===","},o.prototype._parseMappings=function(c,h){throw new Error("Subclasses must implement _parseMappings")},o.GENERATED_ORDER=1,o.ORIGINAL_ORDER=2,o.GREATEST_LOWER_BOUND=1,o.LEAST_UPPER_BOUND=2,o.prototype.eachMapping=function(c,h,d){var l=h||null,p=d||o.GENERATED_ORDER,m;switch(p){case o.GENERATED_ORDER:m=this._generatedMappings;break;case o.ORIGINAL_ORDER:m=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var b=this.sourceRoot;m.map(function(T){var _=T.source===null?null:this._sources.at(T.source);return _!=null&&b!=null&&(_=e.join(b,_)),{source:_,generatedLine:T.generatedLine,generatedColumn:T.generatedColumn,originalLine:T.originalLine,originalColumn:T.originalColumn,name:T.name===null?null:this._names.at(T.name)}},this).forEach(c,l)},o.prototype.allGeneratedPositionsFor=function(c){var h=e.getArg(c,"line"),d={source:e.getArg(c,"source"),originalLine:h,originalColumn:e.getArg(c,"column",0)};if(this.sourceRoot!=null&&(d.source=e.relative(this.sourceRoot,d.source)),!this._sources.has(d.source))return[];d.source=this._sources.indexOf(d.source);var l=[],p=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(p>=0){var m=this._originalMappings[p];if(c.column===void 0)for(var b=m.originalLine;m&&m.originalLine===b;)l.push({line:e.getArg(m,"generatedLine",null),column:e.getArg(m,"generatedColumn",null),lastColumn:e.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++p];else for(var T=m.originalColumn;m&&m.originalLine===h&&m.originalColumn==T;)l.push({line:e.getArg(m,"generatedLine",null),column:e.getArg(m,"generatedColumn",null),lastColumn:e.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++p]}return l},Ti.SourceMapConsumer=o;function s(f){var c=f;typeof f=="string"&&(c=JSON.parse(f.replace(/^\)\]\}'/,"")));var h=e.getArg(c,"version"),d=e.getArg(c,"sources"),l=e.getArg(c,"names",[]),p=e.getArg(c,"sourceRoot",null),m=e.getArg(c,"sourcesContent",null),b=e.getArg(c,"mappings"),T=e.getArg(c,"file",null);if(h!=this._version)throw new Error("Unsupported version: "+h);d=d.map(String).map(e.normalize).map(function(_){return p&&e.isAbsolute(p)&&e.isAbsolute(_)?e.relative(p,_):_}),this._names=r.fromArray(l.map(String),!0),this._sources=r.fromArray(d,!0),this.sourceRoot=p,this.sourcesContent=m,this._mappings=b,this.file=T}s.prototype=Object.create(o.prototype),s.prototype.consumer=o,s.fromSourceMap=function(c){var h=Object.create(s.prototype),d=h._names=r.fromArray(c._names.toArray(),!0),l=h._sources=r.fromArray(c._sources.toArray(),!0);h.sourceRoot=c._sourceRoot,h.sourcesContent=c._generateSourcesContent(h._sources.toArray(),h.sourceRoot),h.file=c._file;for(var p=c._mappings.toArray().slice(),m=h.__generatedMappings=[],b=h.__originalMappings=[],T=0,_=p.length;T<_;T++){var E=p[T],A=new a;A.generatedLine=E.generatedLine,A.generatedColumn=E.generatedColumn,E.source&&(A.source=l.indexOf(E.source),A.originalLine=E.originalLine,A.originalColumn=E.originalColumn,E.name&&(A.name=d.indexOf(E.name)),b.push(A)),m.push(A)}return i(h.__originalMappings,e.compareByOriginalPositions),h},s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){return this._sources.toArray().map(function(f){return this.sourceRoot!=null?e.join(this.sourceRoot,f):f},this)}});function a(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s.prototype._parseMappings=function(c,h){for(var d=1,l=0,p=0,m=0,b=0,T=0,_=c.length,E=0,A={},w={},N=[],F=[],B,G,W,z,$;E<_;)if(c.charAt(E)===";")d++,E++,l=0;else if(c.charAt(E)===",")E++;else{for(B=new a,B.generatedLine=d,z=E;z<_&&!this._charIsMappingSeparator(c,z);z++);if(G=c.slice(E,z),W=A[G],W)E+=G.length;else{for(W=[];E<z;)n.decode(c,E,w),$=w.value,E=w.rest,W.push($);if(W.length===2)throw new Error("Found a source, but no line and column");if(W.length===3)throw new Error("Found a source and line, but no column");A[G]=W}B.generatedColumn=l+W[0],l=B.generatedColumn,W.length>1&&(B.source=b+W[1],b+=W[1],B.originalLine=p+W[2],p=B.originalLine,B.originalLine+=1,B.originalColumn=m+W[3],m=B.originalColumn,W.length>4&&(B.name=T+W[4],T+=W[4])),F.push(B),typeof B.originalLine=="number"&&N.push(B)}i(F,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=F,i(N,e.compareByOriginalPositions),this.__originalMappings=N},s.prototype._findMapping=function(c,h,d,l,p,m){if(c[d]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+c[d]);if(c[l]<0)throw new TypeError("Column must be greater than or equal to 0, got "+c[l]);return t.search(c,h,p,m)},s.prototype.computeColumnSpans=function(){for(var c=0;c<this._generatedMappings.length;++c){var h=this._generatedMappings[c];if(c+1<this._generatedMappings.length){var d=this._generatedMappings[c+1];if(h.generatedLine===d.generatedLine){h.lastGeneratedColumn=d.generatedColumn-1;continue}}h.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(c){var h={generatedLine:e.getArg(c,"line"),generatedColumn:e.getArg(c,"column")},d=this._findMapping(h,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(c,"bias",o.GREATEST_LOWER_BOUND));if(d>=0){var l=this._generatedMappings[d];if(l.generatedLine===h.generatedLine){var p=e.getArg(l,"source",null);p!==null&&(p=this._sources.at(p),this.sourceRoot!=null&&(p=e.join(this.sourceRoot,p)));var m=e.getArg(l,"name",null);return m!==null&&(m=this._names.at(m)),{source:p,line:e.getArg(l,"originalLine",null),column:e.getArg(l,"originalColumn",null),name:m}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(c){return c==null}):!1},s.prototype.sourceContentFor=function(c,h){if(!this.sourcesContent)return null;if(this.sourceRoot!=null&&(c=e.relative(this.sourceRoot,c)),this._sources.has(c))return this.sourcesContent[this._sources.indexOf(c)];var d;if(this.sourceRoot!=null&&(d=e.urlParse(this.sourceRoot))){var l=c.replace(/^file:\/\//,"");if(d.scheme=="file"&&this._sources.has(l))return this.sourcesContent[this._sources.indexOf(l)];if((!d.path||d.path=="/")&&this._sources.has("/"+c))return this.sourcesContent[this._sources.indexOf("/"+c)]}if(h)return null;throw new Error('"'+c+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(c){var h=e.getArg(c,"source");if(this.sourceRoot!=null&&(h=e.relative(this.sourceRoot,h)),!this._sources.has(h))return{line:null,column:null,lastColumn:null};h=this._sources.indexOf(h);var d={source:h,originalLine:e.getArg(c,"line"),originalColumn:e.getArg(c,"column")},l=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(c,"bias",o.GREATEST_LOWER_BOUND));if(l>=0){var p=this._originalMappings[l];if(p.source===d.source)return{line:e.getArg(p,"generatedLine",null),column:e.getArg(p,"generatedColumn",null),lastColumn:e.getArg(p,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Ti.BasicSourceMapConsumer=s;function u(f){var c=f;typeof f=="string"&&(c=JSON.parse(f.replace(/^\)\]\}'/,"")));var h=e.getArg(c,"version"),d=e.getArg(c,"sections");if(h!=this._version)throw new Error("Unsupported version: "+h);this._sources=new r,this._names=new r;var l={line:-1,column:0};this._sections=d.map(function(p){if(p.url)throw new Error("Support for url field in sections not implemented.");var m=e.getArg(p,"offset"),b=e.getArg(m,"line"),T=e.getArg(m,"column");if(b<l.line||b===l.line&&T<l.column)throw new Error("Section offsets must be ordered and non-overlapping.");return l=m,{generatedOffset:{generatedLine:b+1,generatedColumn:T+1},consumer:new o(e.getArg(p,"map"))}})}return u.prototype=Object.create(o.prototype),u.prototype.constructor=o,u.prototype._version=3,Object.defineProperty(u.prototype,"sources",{get:function(){for(var f=[],c=0;c<this._sections.length;c++)for(var h=0;h<this._sections[c].consumer.sources.length;h++)f.push(this._sections[c].consumer.sources[h]);return f}}),u.prototype.originalPositionFor=function(c){var h={generatedLine:e.getArg(c,"line"),generatedColumn:e.getArg(c,"column")},d=t.search(h,this._sections,function(p,m){var b=p.generatedLine-m.generatedOffset.generatedLine;return b||p.generatedColumn-m.generatedOffset.generatedColumn}),l=this._sections[d];return l?l.consumer.originalPositionFor({line:h.generatedLine-(l.generatedOffset.generatedLine-1),column:h.generatedColumn-(l.generatedOffset.generatedLine===h.generatedLine?l.generatedOffset.generatedColumn-1:0),bias:c.bias}):{source:null,line:null,column:null,name:null}},u.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(c){return c.consumer.hasContentsOfAllSources()})},u.prototype.sourceContentFor=function(c,h){for(var d=0;d<this._sections.length;d++){var l=this._sections[d],p=l.consumer.sourceContentFor(c,!0);if(p)return p}if(h)return null;throw new Error('"'+c+'" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(c){for(var h=0;h<this._sections.length;h++){var d=this._sections[h];if(d.consumer.sources.indexOf(e.getArg(c,"source"))!==-1){var l=d.consumer.generatedPositionFor(c);if(l){var p={line:l.line+(d.generatedOffset.generatedLine-1),column:l.column+(d.generatedOffset.generatedLine===l.line?d.generatedOffset.generatedColumn-1:0)};return p}}}return{line:null,column:null}},u.prototype._parseMappings=function(c,h){this.__generatedMappings=[],this.__originalMappings=[];for(var d=0;d<this._sections.length;d++)for(var l=this._sections[d],p=l.consumer._generatedMappings,m=0;m<p.length;m++){var b=p[m],T=l.consumer._sources.at(b.source);l.consumer.sourceRoot!==null&&(T=e.join(l.consumer.sourceRoot,T)),this._sources.add(T),T=this._sources.indexOf(T);var _=l.consumer._names.at(b.name);this._names.add(_),_=this._names.indexOf(_);var E={source:T,generatedLine:b.generatedLine+(l.generatedOffset.generatedLine-1),generatedColumn:b.generatedColumn+(l.generatedOffset.generatedLine===b.generatedLine?l.generatedOffset.generatedColumn-1:0),originalLine:b.originalLine,originalColumn:b.originalColumn,name:_};this.__generatedMappings.push(E),typeof E.originalLine=="number"&&this.__originalMappings.push(E)}i(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),i(this.__originalMappings,e.compareByOriginalPositions)},Ti.IndexedSourceMapConsumer=u,Ti}var hf;function ME(){return hf||(hf=1,function(e,t){(function(r,n){e.exports=n(LE(),Yu())})(ce,function(r,n){function i(d){return new Promise(function(l,p){var m=new XMLHttpRequest;m.open("get",d),m.onerror=p,m.onreadystatechange=function(){m.readyState===4&&(m.status>=200&&m.status<300||d.substr(0,7)==="file://"&&m.responseText?l(m.responseText):p(new Error("HTTP status: "+m.status+" retrieving "+d)))},m.send()})}function o(d){if(typeof window<"u"&&window.atob)return window.atob(d);throw new Error("You must supply a polyfill for window.atob in this environment")}function s(d){if(typeof JSON<"u"&&JSON.parse)return JSON.parse(d);throw new Error("You must supply a polyfill for JSON.parse in this environment")}function a(d,l){for(var p=[/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,/function\s+([^('"`]*?)\s*\(([^)]*)\)/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,/\b(?!(?:if|for|switch|while|with|catch)\b)(?:(?:static)\s+)?(\S+)\s*\(.*?\)\s*\{/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*\(.*?\)\s*=>/],m=d.split(`
43
+ `),b="",T=Math.min(l,20),_=0;_<T;++_){var E=m[l-_-1],A=E.indexOf("//");if(A>=0&&(E=E.substr(0,A)),E){b=E+b;for(var w=p.length,N=0;N<w;N++){var F=p[N].exec(b);if(F&&F[1])return F[1]}}}}function u(){if(typeof Object.defineProperty!="function"||typeof Object.create!="function")throw new Error("Unable to consume source maps in older browsers")}function f(d){if(typeof d!="object")throw new TypeError("Given StackFrame is not an object");if(typeof d.fileName!="string")throw new TypeError("Given file name is not a String");if(typeof d.lineNumber!="number"||d.lineNumber%1!==0||d.lineNumber<1)throw new TypeError("Given line number must be a positive integer");if(typeof d.columnNumber!="number"||d.columnNumber%1!==0||d.columnNumber<0)throw new TypeError("Given column number must be a non-negative integer");return!0}function c(d){for(var l=/\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/mg,p,m;m=l.exec(d);)p=m[1];if(p)return p;throw new Error("sourceMappingURL not found")}function h(d,l,p){return new Promise(function(m,b){var T=l.originalPositionFor({line:d.lineNumber,column:d.columnNumber});if(T.source){var _=l.sourceContentFor(T.source);_&&(p[T.source]=_),m(new n({functionName:T.name||d.functionName,args:d.args,fileName:T.source,lineNumber:T.line,columnNumber:T.column}))}else b(new Error("Could not get original source for given stackframe and source map"))})}return function d(l){if(!(this instanceof d))return new d(l);l=l||{},this.sourceCache=l.sourceCache||{},this.sourceMapConsumerCache=l.sourceMapConsumerCache||{},this.ajax=l.ajax||i,this._atob=l.atob||o,this._get=function(m){return new Promise((function(b,T){var _=m.substr(0,5)==="data:";if(this.sourceCache[m])b(this.sourceCache[m]);else if(l.offline&&!_)T(new Error("Cannot make network requests in offline mode"));else if(_){var E=/^data:application\/json;([\w=:"-]+;)*base64,/,A=m.match(E);if(A){var w=A[0].length,N=m.substr(w),F=this._atob(N);this.sourceCache[m]=F,b(F)}else T(new Error("The encoding of the inline sourcemap is not supported"))}else{var B=this.ajax(m,{method:"get"});this.sourceCache[m]=B,B.then(b,T)}}).bind(this))},this._getSourceMapConsumer=function(m,b){return new Promise((function(T){if(this.sourceMapConsumerCache[m])T(this.sourceMapConsumerCache[m]);else{var _=new Promise((function(E,A){return this._get(m).then(function(w){typeof w=="string"&&(w=s(w.replace(/^\)\]\}'/,""))),typeof w.sourceRoot>"u"&&(w.sourceRoot=b),E(new r.SourceMapConsumer(w))}).catch(A)}).bind(this));this.sourceMapConsumerCache[m]=_,T(_)}}).bind(this))},this.pinpoint=function(m){return new Promise((function(b,T){this.getMappedLocation(m).then((function(_){function E(){b(_)}this.findFunctionName(_).then(b,E).catch(E)}).bind(this),T)}).bind(this))},this.findFunctionName=function(m){return new Promise((function(b,T){f(m),this._get(m.fileName).then(function(E){var A=m.lineNumber,w=m.columnNumber,N=a(E,A);b(N?new n({functionName:N,args:m.args,fileName:m.fileName,lineNumber:A,columnNumber:w}):m)},T).catch(T)}).bind(this))},this.getMappedLocation=function(m){return new Promise((function(b,T){u(),f(m);var _=this.sourceCache,E=m.fileName;this._get(E).then((function(A){var w=c(A),N=w.substr(0,5)==="data:",F=E.substring(0,E.lastIndexOf("/")+1);return w[0]!=="/"&&!N&&!/^https?:\/\/|^\/\//i.test(w)&&(w=F+w),this._getSourceMapConsumer(w,F).then(function(B){return h(m,B,_).then(b).catch(function(){b(m)})})}).bind(this),T).catch(T)}).bind(this))}}})}(ys)),ys.exports}var pf;function kE(){return pf||(pf=1,function(e,t){(function(r,n){e.exports=n(OE(),AE(),ME())})(ce,function(n,i,o){var s={filter:function(h){return(h.functionName||"").indexOf("StackTrace$$")===-1&&(h.functionName||"").indexOf("ErrorStackParser$$")===-1&&(h.functionName||"").indexOf("StackTraceGPS$$")===-1&&(h.functionName||"").indexOf("StackGenerator$$")===-1},sourceCache:{}},a=function(){try{throw new Error}catch(d){return d}};function u(h,d){var l={};return[h,d].forEach(function(p){for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(l[m]=p[m]);return l}),l}function f(h){return h.stack||h["opera#sourceloc"]}function c(h,d){return typeof d=="function"?h.filter(d):h}return{get:function(d){var l=a();return f(l)?this.fromError(l,d):this.generateArtificially(d)},getSync:function(d){d=u(s,d);var l=a(),p=f(l)?n.parse(l):i.backtrace(d);return c(p,d.filter)},fromError:function(d,l){l=u(s,l);var p=new o(l);return new Promise((function(m){var b=c(n.parse(d),l.filter);m(Promise.all(b.map(function(T){return new Promise(function(_){function E(){_(T)}p.pinpoint(T).then(_,E).catch(E)})})))}).bind(this))},generateArtificially:function(d){d=u(s,d);var l=i.backtrace(d);return typeof d.filter=="function"&&(l=l.filter(d.filter)),Promise.resolve(l)},instrument:function(d,l,p,m){if(typeof d!="function")throw new Error("Cannot instrument non-function object");if(typeof d.__stacktraceOriginalFn=="function")return d;var b=(function(){try{return this.get().then(l,p).catch(p),d.apply(m||this,arguments)}catch(_){throw f(_)&&this.fromError(_).then(l,p).catch(p),_}}).bind(this);return b.__stacktraceOriginalFn=d,b},deinstrument:function(d){if(typeof d!="function")throw new Error("Cannot de-instrument non-function object");return typeof d.__stacktraceOriginalFn=="function"?d.__stacktraceOriginalFn:d},report:function(d,l,p,m){return new Promise(function(b,T){var _=new XMLHttpRequest;if(_.onerror=T,_.onreadystatechange=function(){_.readyState===4&&(_.status>=200&&_.status<400?b(_.responseText):T(new Error("POST to "+l+" failed with status: "+_.status)))},_.open("post",l),_.setRequestHeader("Content-Type","application/json"),m&&typeof m.headers=="object"){var E=m.headers;for(var A in E)Object.prototype.hasOwnProperty.call(E,A)&&_.setRequestHeader(A,E[A])}var w={stack:d};p!=null&&(w.message=p),_.send(JSON.stringify(w))})}}})}(hs)),hs.exports}var ws,mf;function BE(){if(mf)return ws;mf=1;var e=kE(),t="https://clouderrorreporting.googleapis.com/v1beta1/projects/",r=function(){};r.prototype.start=function(s){if(!s.key&&!s.targetUrl&&!s.customReportingFunction)throw new Error("Cannot initialize: No API key, target url or custom reporting function provided.");if(!s.projectId&&!s.targetUrl&&!s.customReportingFunction)throw new Error("Cannot initialize: No project ID, target url or custom reporting function provided.");this.customReportingFunction=s.customReportingFunction,this.apiKey=s.key,this.projectId=s.projectId,this.targetUrl=s.targetUrl,this.context=s.context||{},this.serviceContext={service:s.service||"web"},s.version&&(this.serviceContext.version=s.version),this.reportUncaughtExceptions=s.reportUncaughtExceptions!==!1,this.reportUnhandledPromiseRejections=s.reportUnhandledPromiseRejections!==!1,this.disabled=!!s.disabled,n(this)};function n(s){var a=function(){};if(s.reportUncaughtExceptions){var u=window.onerror||a;window.onerror=function(c,h,d,l,p){return p&&s.report(p).catch(a),u(c,h,d,l,p),!0}}if(s.reportUnhandledPromiseRejections){var f=window.onunhandledrejection||a;window.onunhandledrejection=function(c){return c&&s.report(c.reason).catch(a),f(c.reason),!0}}}r.prototype.report=function(s,a){if(this.disabled)return Promise.resolve(null);if(!s)return Promise.reject(new Error("no error to report"));a=a||{};var u={};u.serviceContext=this.serviceContext,u.context=this.context,u.context.httpRequest={userAgent:window.navigator.userAgent,url:window.location.href};var f=0;if(typeof s=="string"||s instanceof String){try{throw new Error(s)}catch(d){s=d}f=a.skipLocalFrames||1}var c=this.targetUrl||t+this.projectId+"/events:report?key="+this.apiKey,h=this.customReportingFunction;return i(s,f).then(function(d){return u.message=d,h?h(u):o(c,u)})};function i(s,a){return e.fromError(s).then(function(u){for(var f=[s.toString()],c=a;c<u.length;c++)f.push([" at ",u[c].getFunctionName()||"<anonymous>"," (",u[c].getFileName(),":",u[c].getLineNumber(),":",u[c].getColumnNumber(),")"].join(""));return f.join(`
44
44
  `)},function(u){return["Error extracting stack trace: ",u,`
45
45
  `,s.toString(),`
46
46
  `," (",s.file,":",s.line,":",s.column,")"].join("")})}function o(s,a){var u=new XMLHttpRequest;return u.open("POST",s,!0),u.setRequestHeader("Content-Type","application/json; charset=UTF-8"),new Promise(function(f,c){u.onreadystatechange=function(){if(u.readyState===4){var h=u.status;if(h>=200&&h<300)f({message:a.message});else if(h===429)c({message:"quota or rate limiting error on stackdriver report",name:"Http429FakeError"});else{var d=h?h+" http response":"network error";c(new Error(d+" on stackdriver report"))}}},u.send(JSON.stringify(a))})}return r.prototype.setUser=function(s){this.context.user=s},ws=r,ws}var gf;function FE(){return gf||(gf=1,function(e,t){(function(r,n){e.exports=n(BE())})(ce,function(r){return function(){var n={542:function(a){a.exports=r}},i={};function o(a){var u=i[a];if(u!==void 0)return u.exports;var f=i[a]={exports:{}};return n[a](f,f.exports,o),f.exports}o.n=function(a){var u=a&&a.__esModule?function(){return a.default}:function(){return a};return o.d(u,{a:u}),u},o.d=function(a,u){for(var f in u)o.o(u,f)&&!o.o(a,f)&&Object.defineProperty(a,f,{enumerable:!0,get:u[f]})},o.o=function(a,u){return Object.prototype.hasOwnProperty.call(a,u)},o.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var s={};return function(){o.r(s),o.d(s,{reportError:function(){return d},setContext:function(){return h}});var a=o(542),u=o.n(a);const{GCP:{PROJECT_ID:f}}={GCP:{PROJECT_ID:"hazel-tea-194609"}};let c={key:null,environment:null,projectId:f};const h=({apiKey:l,environment:p,projectId:m,serviceName:b})=>{if(!l)throw new Error("Cannot set context: REACT_APP_GCP_ERRORS_API_KEY not defined");if(c.key=l,!p)throw new Error("Cannot set context: Environment not defined");c.environment=p,c.projectId=m||f,b&&(c.service=`${b}:${c.environment}`)},d=async(l,p)=>{try{const m=new(u());m.start(c),typeof p=="string"&&m.setUser(p),await m.report(l)}catch(m){console.warn(`Cannot report error: ${m.message}`)}}}(),s}()})}(ds)),ds.exports}var Ss={exports:{}},Oo={},yf;function DE(){if(yf)return Oo;yf=1,Object.defineProperty(Oo,"__esModule",{value:!0});var e=function(r){console.warn("[react-gtm]",r)};return Oo.default=e,Oo}var Ts,vf;function UE(){if(vf)return Ts;vf=1;var e=DE(),t=r(e);function r(i){return i&&i.__esModule?i:{default:i}}var n={tags:function(o){var s=o.id,a=o.events,u=o.dataLayer,f=o.dataLayerName,c=o.preview,h=o.auth,d="&gtm_auth="+h,l="&gtm_preview="+c;s||(0,t.default)("GTM Id is required");var p=`
@@ -53,16 +53,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
53
53
  f.parentNode.insertBefore(j,f);
54
54
  })(window,document,'script','`+f+"','"+s+"');",b=this.dataLayer(u,f);return{iframe:p,script:m,dataLayerVar:b}},dataLayer:function(o,s){return`
55
55
  window.`+s+" = window."+s+` || [];
56
- window.`+s+".push("+JSON.stringify(o)+")"}};return Ts=n,Ts}var xs,_f;function $E(){if(_f)return xs;_f=1;var e=UE(),t=r(e);function r(i){return i&&i.__esModule?i:{default:i}}var n={dataScript:function(o){var s=document.createElement("script");return s.innerHTML=o,s},gtm:function(o){var s=t.default.tags(o),a=function(){var h=document.createElement("noscript");return h.innerHTML=s.iframe,h},u=function(){var h=document.createElement("script");return h.innerHTML=s.script,h},f=this.dataScript(s.dataLayerVar);return{noScript:a,script:u,dataScript:f}},initialize:function(o){var s=o.gtmId,a=o.events,u=a===void 0?{}:a,f=o.dataLayer,c=o.dataLayerName,h=c===void 0?"dataLayer":c,d=o.auth,l=d===void 0?"":d,p=o.preview,m=p===void 0?"":p,b=this.gtm({id:s,events:u,dataLayer:f||void 0,dataLayerName:h,auth:l,preview:m});f&&document.head.appendChild(b.dataScript),document.head.insertBefore(b.script(),document.head.childNodes[0]),document.body.insertBefore(b.noScript(),document.body.childNodes[0])},dataLayer:function(o){var s=o.dataLayer,a=o.dataLayerName,u=a===void 0?"dataLayer":a;if(window[u])return window[u].push(s);var f=t.default.dataLayer(s,u),c=this.dataScript(f);document.head.insertBefore(c,document.head.childNodes[0])}};return xs=n,xs}var Os,Ef;function jE(){if(Ef)return Os;Ef=1;var e=$E(),t=r(e);function r(n){return n&&n.__esModule?n:{default:n}}return Os=t.default,Os}var bf;function HE(){return bf||(bf=1,function(e,t){(function(r,n){e.exports=n(jE())})(ce,function(r){return function(){var n={273:function(a){a.exports=r}},i={};function o(a){var u=i[a];if(u!==void 0)return u.exports;var f=i[a]={exports:{}};return n[a](f,f.exports,o),f.exports}o.n=function(a){var u=a&&a.__esModule?function(){return a.default}:function(){return a};return o.d(u,{a:u}),u},o.d=function(a,u){for(var f in u)o.o(u,f)&&!o.o(a,f)&&Object.defineProperty(a,f,{enumerable:!0,get:u[f]})},o.o=function(a,u){return Object.prototype.hasOwnProperty.call(a,u)},o.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var s={};return function(){o.r(s),o.d(s,{setContext:function(){return c},setupGTM:function(){return d}});var a=o(273),u=o.n(a);let f=null;const c=({configs:l,environment:p})=>{if(!p)throw new Error("Cannot set context: Environment not defined");if(!l)throw new Error("Cannot set context: REACT_APP_GTM_ID not defined");if(!l[p])throw new Error(`Cannot set context: REACT_APP_GTM_ID not defined for environment - ${JSON.stringify({configs:l,environment:p})}`);f=l[p]},h=()=>f,d=()=>{const l=h();u().initialize({gtmId:l.id})}}(),s}()})}(Ss)),Ss.exports}var Bh=202,Fh=502,Dh=400,Uh=409,$h=100,jh=201,Hh=417,qE=424,qh=403,Gh=504,Wh=410,Vh=505,zh=418,Yh=419,Kh=507,Qh=500,Xh=411,Jh=423,Zh=420,ep=405,tp=301,rp=302,np=207,ip=300,op=511,ap=204,sp=203,up=406,cp=404,lp=501,fp=304,dp=200,hp=206,pp=402,mp=308,gp=412,yp=428,vp=102,_p=407,Ep=431,bp=408,wp=413,Sp=414,Tp=416,xp=205,Op=303,Ap=503,Cp=101,Rp=307,Np=429,Pp=401,Ip=422,Lp=415,kp=305;const GE={ACCEPTED:Bh,BAD_GATEWAY:Fh,BAD_REQUEST:Dh,CONFLICT:Uh,CONTINUE:$h,CREATED:jh,EXPECTATION_FAILED:Hh,FORBIDDEN:qh,GATEWAY_TIMEOUT:Gh,GONE:Wh,HTTP_VERSION_NOT_SUPPORTED:Vh,IM_A_TEAPOT:zh,INSUFFICIENT_SPACE_ON_RESOURCE:Yh,INSUFFICIENT_STORAGE:Kh,INTERNAL_SERVER_ERROR:Qh,LENGTH_REQUIRED:Xh,LOCKED:Jh,METHOD_FAILURE:Zh,METHOD_NOT_ALLOWED:ep,MOVED_PERMANENTLY:tp,MOVED_TEMPORARILY:rp,MULTI_STATUS:np,MULTIPLE_CHOICES:ip,NETWORK_AUTHENTICATION_REQUIRED:op,NO_CONTENT:ap,NON_AUTHORITATIVE_INFORMATION:sp,NOT_ACCEPTABLE:up,NOT_FOUND:cp,NOT_IMPLEMENTED:lp,NOT_MODIFIED:fp,OK:dp,PARTIAL_CONTENT:hp,PAYMENT_REQUIRED:pp,PERMANENT_REDIRECT:mp,PRECONDITION_FAILED:gp,PRECONDITION_REQUIRED:yp,PROCESSING:vp,PROXY_AUTHENTICATION_REQUIRED:_p,REQUEST_HEADER_FIELDS_TOO_LARGE:Ep,REQUEST_TIMEOUT:bp,REQUEST_TOO_LONG:wp,REQUEST_URI_TOO_LONG:Sp,REQUESTED_RANGE_NOT_SATISFIABLE:Tp,RESET_CONTENT:xp,SEE_OTHER:Op,SERVICE_UNAVAILABLE:Ap,SWITCHING_PROTOCOLS:Cp,TEMPORARY_REDIRECT:Rp,TOO_MANY_REQUESTS:Np,UNAUTHORIZED:Pp,UNPROCESSABLE_ENTITY:Ip,UNSUPPORTED_MEDIA_TYPE:Lp,USE_PROXY:kp};var WE={202:"Accepted",502:"Bad Gateway",400:"Bad Request",409:"Conflict",100:"Continue",201:"Created",417:"Expectation Failed",424:"Failed Dependency",403:"Forbidden",504:"Gateway Timeout",410:"Gone",505:"HTTP Version Not Supported",418:"I'm a teapot",419:"Insufficient Space on Resource",507:"Insufficient Storage",500:"Internal Server Error",411:"Length Required",423:"Locked",420:"Method Failure",405:"Method Not Allowed",301:"Moved Permanently",302:"Moved Temporarily",207:"Multi-Status",300:"Multiple Choices",511:"Network Authentication Required",204:"No Content",203:"Non Authoritative Information",406:"Not Acceptable",404:"Not Found",501:"Not Implemented",304:"Not Modified",200:"OK",206:"Partial Content",402:"Payment Required",308:"Permanent Redirect",412:"Precondition Failed",428:"Precondition Required",102:"Processing",407:"Proxy Authentication Required",431:"Request Header Fields Too Large",408:"Request Timeout",413:"Request Entity Too Large",414:"Request-URI Too Long",416:"Requested Range Not Satisfiable",205:"Reset Content",303:"See Other",503:"Service Unavailable",101:"Switching Protocols",307:"Temporary Redirect",429:"Too Many Requests",401:"Unauthorized",451:"Unavailable For Legal Reasons",422:"Unprocessable Entity",415:"Unsupported Media Type",305:"Use Proxy",421:"Misdirected Request"},VE={Accepted:202,"Bad Gateway":502,"Bad Request":400,Conflict:409,Continue:100,Created:201,"Expectation Failed":417,"Failed Dependency":424,Forbidden:403,"Gateway Timeout":504,Gone:410,"HTTP Version Not Supported":505,"I'm a teapot":418,"Insufficient Space on Resource":419,"Insufficient Storage":507,"Internal Server Error":500,"Length Required":411,Locked:423,"Method Failure":420,"Method Not Allowed":405,"Moved Permanently":301,"Moved Temporarily":302,"Multi-Status":207,"Multiple Choices":300,"Network Authentication Required":511,"No Content":204,"Non Authoritative Information":203,"Not Acceptable":406,"Not Found":404,"Not Implemented":501,"Not Modified":304,OK:200,"Partial Content":206,"Payment Required":402,"Permanent Redirect":308,"Precondition Failed":412,"Precondition Required":428,Processing:102,"Proxy Authentication Required":407,"Request Header Fields Too Large":431,"Request Timeout":408,"Request Entity Too Large":413,"Request-URI Too Long":414,"Requested Range Not Satisfiable":416,"Reset Content":205,"See Other":303,"Service Unavailable":503,"Switching Protocols":101,"Temporary Redirect":307,"Too Many Requests":429,Unauthorized:401,"Unavailable For Legal Reasons":451,"Unprocessable Entity":422,"Unsupported Media Type":415,"Use Proxy":305,"Misdirected Request":421};function Mp(e){var t=WE[e.toString()];if(!t)throw new Error("Status code does not exist: "+e);return t}function Bp(e){var t=VE[e];if(!t)throw new Error("Reason phrase does not exist: "+e);return t}var Fp=Mp,gu;(function(e){e[e.ACCEPTED=202]="ACCEPTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.CONFLICT=409]="CONFLICT",e[e.CONTINUE=100]="CONTINUE",e[e.CREATED=201]="CREATED",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.GONE=410]="GONE",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.IM_A_TEAPOT=418]="IM_A_TEAPOT",e[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.LOCKED=423]="LOCKED",e[e.METHOD_FAILURE=420]="METHOD_FAILURE",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.OK=200]="OK",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.PROCESSING=102]="PROCESSING",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",e[e.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",e[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.USE_PROXY=305]="USE_PROXY",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST"})(gu||(gu={}));var yu;(function(e){e.ACCEPTED="Accepted",e.BAD_GATEWAY="Bad Gateway",e.BAD_REQUEST="Bad Request",e.CONFLICT="Conflict",e.CONTINUE="Continue",e.CREATED="Created",e.EXPECTATION_FAILED="Expectation Failed",e.FAILED_DEPENDENCY="Failed Dependency",e.FORBIDDEN="Forbidden",e.GATEWAY_TIMEOUT="Gateway Timeout",e.GONE="Gone",e.HTTP_VERSION_NOT_SUPPORTED="HTTP Version Not Supported",e.IM_A_TEAPOT="I'm a teapot",e.INSUFFICIENT_SPACE_ON_RESOURCE="Insufficient Space on Resource",e.INSUFFICIENT_STORAGE="Insufficient Storage",e.INTERNAL_SERVER_ERROR="Internal Server Error",e.LENGTH_REQUIRED="Length Required",e.LOCKED="Locked",e.METHOD_FAILURE="Method Failure",e.METHOD_NOT_ALLOWED="Method Not Allowed",e.MOVED_PERMANENTLY="Moved Permanently",e.MOVED_TEMPORARILY="Moved Temporarily",e.MULTI_STATUS="Multi-Status",e.MULTIPLE_CHOICES="Multiple Choices",e.NETWORK_AUTHENTICATION_REQUIRED="Network Authentication Required",e.NO_CONTENT="No Content",e.NON_AUTHORITATIVE_INFORMATION="Non Authoritative Information",e.NOT_ACCEPTABLE="Not Acceptable",e.NOT_FOUND="Not Found",e.NOT_IMPLEMENTED="Not Implemented",e.NOT_MODIFIED="Not Modified",e.OK="OK",e.PARTIAL_CONTENT="Partial Content",e.PAYMENT_REQUIRED="Payment Required",e.PERMANENT_REDIRECT="Permanent Redirect",e.PRECONDITION_FAILED="Precondition Failed",e.PRECONDITION_REQUIRED="Precondition Required",e.PROCESSING="Processing",e.PROXY_AUTHENTICATION_REQUIRED="Proxy Authentication Required",e.REQUEST_HEADER_FIELDS_TOO_LARGE="Request Header Fields Too Large",e.REQUEST_TIMEOUT="Request Timeout",e.REQUEST_TOO_LONG="Request Entity Too Large",e.REQUEST_URI_TOO_LONG="Request-URI Too Long",e.REQUESTED_RANGE_NOT_SATISFIABLE="Requested Range Not Satisfiable",e.RESET_CONTENT="Reset Content",e.SEE_OTHER="See Other",e.SERVICE_UNAVAILABLE="Service Unavailable",e.SWITCHING_PROTOCOLS="Switching Protocols",e.TEMPORARY_REDIRECT="Temporary Redirect",e.TOO_MANY_REQUESTS="Too Many Requests",e.UNAUTHORIZED="Unauthorized",e.UNAVAILABLE_FOR_LEGAL_REASONS="Unavailable For Legal Reasons",e.UNPROCESSABLE_ENTITY="Unprocessable Entity",e.UNSUPPORTED_MEDIA_TYPE="Unsupported Media Type",e.USE_PROXY="Use Proxy",e.MISDIRECTED_REQUEST="Misdirected Request"})(yu||(yu={}));var Vo=globalThis&&globalThis.__assign||function(){return Vo=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Vo.apply(this,arguments)};const zE=Vo(Vo({},GE),{getStatusCode:Bp,getStatusText:Fp}),YE=Object.freeze(Object.defineProperty({__proto__:null,ACCEPTED:Bh,BAD_GATEWAY:Fh,BAD_REQUEST:Dh,CONFLICT:Uh,CONTINUE:$h,CREATED:jh,EXPECTATION_FAILED:Hh,FAILED_DEPENDENCY:qE,FORBIDDEN:qh,GATEWAY_TIMEOUT:Gh,GONE:Wh,HTTP_VERSION_NOT_SUPPORTED:Vh,IM_A_TEAPOT:zh,INSUFFICIENT_SPACE_ON_RESOURCE:Yh,INSUFFICIENT_STORAGE:Kh,INTERNAL_SERVER_ERROR:Qh,LENGTH_REQUIRED:Xh,LOCKED:Jh,METHOD_FAILURE:Zh,METHOD_NOT_ALLOWED:ep,MOVED_PERMANENTLY:tp,MOVED_TEMPORARILY:rp,MULTIPLE_CHOICES:ip,MULTI_STATUS:np,NETWORK_AUTHENTICATION_REQUIRED:op,NON_AUTHORITATIVE_INFORMATION:sp,NOT_ACCEPTABLE:up,NOT_FOUND:cp,NOT_IMPLEMENTED:lp,NOT_MODIFIED:fp,NO_CONTENT:ap,OK:dp,PARTIAL_CONTENT:hp,PAYMENT_REQUIRED:pp,PERMANENT_REDIRECT:mp,PRECONDITION_FAILED:gp,PRECONDITION_REQUIRED:yp,PROCESSING:vp,PROXY_AUTHENTICATION_REQUIRED:_p,REQUESTED_RANGE_NOT_SATISFIABLE:Tp,REQUEST_HEADER_FIELDS_TOO_LARGE:Ep,REQUEST_TIMEOUT:bp,REQUEST_TOO_LONG:wp,REQUEST_URI_TOO_LONG:Sp,RESET_CONTENT:xp,get ReasonPhrases(){return yu},SEE_OTHER:Op,SERVICE_UNAVAILABLE:Ap,SWITCHING_PROTOCOLS:Cp,get StatusCodes(){return gu},TEMPORARY_REDIRECT:Rp,TOO_MANY_REQUESTS:Np,UNAUTHORIZED:Pp,UNPROCESSABLE_ENTITY:Ip,UNSUPPORTED_MEDIA_TYPE:Lp,USE_PROXY:kp,default:zE,getReasonPhrase:Mp,getStatusCode:Bp,getStatusText:Fp},Symbol.toStringTag,{value:"Module"})),KE=Ji(YE);var Ao={exports:{}},xi={},As={},Oi={},Ai={},jr={},Ci={},Cs={},Hr={},Zt={},wf;function Ku(){if(wf)return Zt;wf=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.ERROR_PACKET=Zt.PACKET_TYPES_REVERSE=Zt.PACKET_TYPES=void 0;const e=Object.create(null);Zt.PACKET_TYPES=e,e.open="0",e.close="1",e.ping="2",e.pong="3",e.message="4",e.upgrade="5",e.noop="6";const t=Object.create(null);Zt.PACKET_TYPES_REVERSE=t,Object.keys(e).forEach(n=>{t[e[n]]=n});const r={type:"error",data:"parser error"};return Zt.ERROR_PACKET=r,Zt}var Sf;function QE(){if(Sf)return Hr;Sf=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.encodePacket=Hr.encodePacketToBinary=void 0;const e=Ku(),t=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",r=typeof ArrayBuffer=="function",n=f=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(f):f&&f.buffer instanceof ArrayBuffer,i=({type:f,data:c},h,d)=>t&&c instanceof Blob?h?d(c):o(c,d):r&&(c instanceof ArrayBuffer||n(c))?h?d(c):o(new Blob([c]),d):d(e.PACKET_TYPES[f]+(c||""));Hr.encodePacket=i;const o=(f,c)=>{const h=new FileReader;return h.onload=function(){const d=h.result.split(",")[1];c("b"+(d||""))},h.readAsDataURL(f)};function s(f){return f instanceof Uint8Array?f:f instanceof ArrayBuffer?new Uint8Array(f):new Uint8Array(f.buffer,f.byteOffset,f.byteLength)}let a;function u(f,c){if(t&&f.data instanceof Blob)return f.data.arrayBuffer().then(s).then(c);if(r&&(f.data instanceof ArrayBuffer||n(f.data)))return c(s(f.data));i(f,!1,h=>{a||(a=new TextEncoder),c(a.encode(h))})}return Hr.encodePacketToBinary=u,Hr}var Ri={},qr={},Tf;function XE(){if(Tf)return qr;Tf=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.decode=qr.encode=void 0;const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<e.length;i++)t[e.charCodeAt(i)]=i;const r=i=>{let o=new Uint8Array(i),s,a=o.length,u="";for(s=0;s<a;s+=3)u+=e[o[s]>>2],u+=e[(o[s]&3)<<4|o[s+1]>>4],u+=e[(o[s+1]&15)<<2|o[s+2]>>6],u+=e[o[s+2]&63];return a%3===2?u=u.substring(0,u.length-1)+"=":a%3===1&&(u=u.substring(0,u.length-2)+"=="),u};qr.encode=r;const n=i=>{let o=i.length*.75,s=i.length,a,u=0,f,c,h,d;i[i.length-1]==="="&&(o--,i[i.length-2]==="="&&o--);const l=new ArrayBuffer(o),p=new Uint8Array(l);for(a=0;a<s;a+=4)f=t[i.charCodeAt(a)],c=t[i.charCodeAt(a+1)],h=t[i.charCodeAt(a+2)],d=t[i.charCodeAt(a+3)],p[u++]=f<<2|c>>4,p[u++]=(c&15)<<4|h>>2,p[u++]=(h&3)<<6|d&63;return l};return qr.decode=n,qr}var xf;function JE(){if(xf)return Ri;xf=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.decodePacket=void 0;const e=Ku(),t=XE(),r=typeof ArrayBuffer=="function",n=(s,a)=>{if(typeof s!="string")return{type:"message",data:o(s,a)};const u=s.charAt(0);return u==="b"?{type:"message",data:i(s.substring(1),a)}:e.PACKET_TYPES_REVERSE[u]?s.length>1?{type:e.PACKET_TYPES_REVERSE[u],data:s.substring(1)}:{type:e.PACKET_TYPES_REVERSE[u]}:e.ERROR_PACKET};Ri.decodePacket=n;const i=(s,a)=>{if(r){const u=(0,t.decode)(s);return o(u,a)}else return{base64:!0,data:s}},o=(s,a)=>{switch(a){case"blob":return s instanceof Blob?s:new Blob([s]);case"arraybuffer":default:return s instanceof ArrayBuffer?s:s.buffer}};return Ri}var Of;function eo(){return Of||(Of=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=QE();Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const r=JE();Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return r.decodePacket}});const n=Ku(),i=String.fromCharCode(30),o=(d,l)=>{const p=d.length,m=new Array(p);let b=0;d.forEach((T,_)=>{(0,t.encodePacket)(T,!1,E=>{m[_]=E,++b===p&&l(m.join(i))})})};e.encodePayload=o;const s=(d,l)=>{const p=d.split(i),m=[];for(let b=0;b<p.length;b++){const T=(0,r.decodePacket)(p[b],l);if(m.push(T),T.type==="error")break}return m};e.decodePayload=s;function a(){return new TransformStream({transform(d,l){(0,t.encodePacketToBinary)(d,p=>{const m=p.length;let b;if(m<126)b=new Uint8Array(1),new DataView(b.buffer).setUint8(0,m);else if(m<65536){b=new Uint8Array(3);const T=new DataView(b.buffer);T.setUint8(0,126),T.setUint16(1,m)}else{b=new Uint8Array(9);const T=new DataView(b.buffer);T.setUint8(0,127),T.setBigUint64(1,BigInt(m))}d.data&&typeof d.data!="string"&&(b[0]|=128),l.enqueue(b),l.enqueue(p)})}})}e.createPacketEncoderStream=a;let u;function f(d){return d.reduce((l,p)=>l+p.length,0)}function c(d,l){if(d[0].length===l)return d.shift();const p=new Uint8Array(l);let m=0;for(let b=0;b<l;b++)p[b]=d[0][m++],m===d[0].length&&(d.shift(),m=0);return d.length&&m<d[0].length&&(d[0]=d[0].slice(m)),p}function h(d,l){u||(u=new TextDecoder);const p=[];let m=0,b=-1,T=!1;return new TransformStream({transform(_,E){for(p.push(_);;){if(m===0){if(f(p)<1)break;const A=c(p,1);T=(A[0]&128)===128,b=A[0]&127,b<126?m=3:b===126?m=1:m=2}else if(m===1){if(f(p)<2)break;const A=c(p,2);b=new DataView(A.buffer,A.byteOffset,A.length).getUint16(0),m=3}else if(m===2){if(f(p)<8)break;const A=c(p,8),w=new DataView(A.buffer,A.byteOffset,A.length),N=w.getUint32(0);if(N>Math.pow(2,53-32)-1){E.enqueue(n.ERROR_PACKET);break}b=N*Math.pow(2,32)+w.getUint32(4),m=3}else{if(f(p)<b)break;const A=c(p,b);E.enqueue((0,r.decodePacket)(T?A:u.decode(A),l)),m=0}if(b===0||b>d){E.enqueue(n.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=h,e.protocol=4}(Cs)),Cs}function st(e){if(e)return ZE(e)}function ZE(e){for(var t in st.prototype)e[t]=st.prototype[t];return e}st.prototype.on=st.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};st.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};st.prototype.off=st.prototype.removeListener=st.prototype.removeAllListeners=st.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,i=0;i<r.length;i++)if(n=r[i],n===t||n.fn===t){r.splice(i,1);break}return r.length===0&&delete this._callbacks["$"+e],this};st.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,i=r.length;n<i;++n)r[n].apply(this,t)}return this};st.prototype.emitReserved=st.prototype.emit;st.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};st.prototype.hasListeners=function(e){return!!this.listeners(e).length};const eb=Object.freeze(Object.defineProperty({__proto__:null,Emitter:st},Symbol.toStringTag,{value:"Module"})),Dn=Ji(eb);var er={},Ni={},Af;function ra(){return Af||(Af=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.globalThisShim=void 0,Ni.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())()),Ni}var Cf;function to(){if(Cf)return er;Cf=1,Object.defineProperty(er,"__esModule",{value:!0}),er.byteLength=er.installTimerFunctions=er.pick=void 0;const e=ra();function t(u,...f){return f.reduce((c,h)=>(u.hasOwnProperty(h)&&(c[h]=u[h]),c),{})}er.pick=t;const r=e.globalThisShim.setTimeout,n=e.globalThisShim.clearTimeout;function i(u,f){f.useNativeTimers?(u.setTimeoutFn=r.bind(e.globalThisShim),u.clearTimeoutFn=n.bind(e.globalThisShim)):(u.setTimeoutFn=e.globalThisShim.setTimeout.bind(e.globalThisShim),u.clearTimeoutFn=e.globalThisShim.clearTimeout.bind(e.globalThisShim))}er.installTimerFunctions=i;const o=1.33;function s(u){return typeof u=="string"?a(u):Math.ceil((u.byteLength||u.size)*o)}er.byteLength=s;function a(u){let f=0,c=0;for(let h=0,d=u.length;h<d;h++)f=u.charCodeAt(h),f<128?c+=1:f<2048?c+=2:f<55296||f>=57344?c+=3:(h++,c+=4);return c}return er}var Co={exports:{}},Rs,Rf;function tb(){if(Rf)return Rs;Rf=1;var e=1e3,t=e*60,r=t*60,n=r*24,i=n*7,o=n*365.25;Rs=function(c,h){h=h||{};var d=typeof c;if(d==="string"&&c.length>0)return s(c);if(d==="number"&&isFinite(c))return h.long?u(c):a(c);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))};function s(c){if(c=String(c),!(c.length>100)){var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(h){var d=parseFloat(h[1]),l=(h[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return d*o;case"weeks":case"week":case"w":return d*i;case"days":case"day":case"d":return d*n;case"hours":case"hour":case"hrs":case"hr":case"h":return d*r;case"minutes":case"minute":case"mins":case"min":case"m":return d*t;case"seconds":case"second":case"secs":case"sec":case"s":return d*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function a(c){var h=Math.abs(c);return h>=n?Math.round(c/n)+"d":h>=r?Math.round(c/r)+"h":h>=t?Math.round(c/t)+"m":h>=e?Math.round(c/e)+"s":c+"ms"}function u(c){var h=Math.abs(c);return h>=n?f(c,h,n,"day"):h>=r?f(c,h,r,"hour"):h>=t?f(c,h,t,"minute"):h>=e?f(c,h,e,"second"):c+" ms"}function f(c,h,d,l){var p=h>=d*1.5;return Math.round(c/d)+" "+l+(p?"s":"")}return Rs}var Ns,Nf;function rb(){if(Nf)return Ns;Nf=1;function e(t){n.debug=n,n.default=n,n.coerce=f,n.disable=s,n.enable=o,n.enabled=a,n.humanize=tb(),n.destroy=c,Object.keys(t).forEach(h=>{n[h]=t[h]}),n.names=[],n.skips=[],n.formatters={};function r(h){let d=0;for(let l=0;l<h.length;l++)d=(d<<5)-d+h.charCodeAt(l),d|=0;return n.colors[Math.abs(d)%n.colors.length]}n.selectColor=r;function n(h){let d,l=null,p,m;function b(...T){if(!b.enabled)return;const _=b,E=Number(new Date),A=E-(d||E);_.diff=A,_.prev=d,_.curr=E,d=E,T[0]=n.coerce(T[0]),typeof T[0]!="string"&&T.unshift("%O");let w=0;T[0]=T[0].replace(/%([a-zA-Z%])/g,(F,B)=>{if(F==="%%")return"%";w++;const G=n.formatters[B];if(typeof G=="function"){const W=T[w];F=G.call(_,W),T.splice(w,1),w--}return F}),n.formatArgs.call(_,T),(_.log||n.log).apply(_,T)}return b.namespace=h,b.useColors=n.useColors(),b.color=n.selectColor(h),b.extend=i,b.destroy=n.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>l!==null?l:(p!==n.namespaces&&(p=n.namespaces,m=n.enabled(h)),m),set:T=>{l=T}}),typeof n.init=="function"&&n.init(b),b}function i(h,d){const l=n(this.namespace+(typeof d>"u"?":":d)+h);return l.log=this.log,l}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let d;const l=(typeof h=="string"?h:"").split(/[\s,]+/),p=l.length;for(d=0;d<p;d++)l[d]&&(h=l[d].replace(/\*/g,".*?"),h[0]==="-"?n.skips.push(new RegExp("^"+h.slice(1)+"$")):n.names.push(new RegExp("^"+h+"$")))}function s(){const h=[...n.names.map(u),...n.skips.map(u).map(d=>"-"+d)].join(",");return n.enable(""),h}function a(h){if(h[h.length-1]==="*")return!0;let d,l;for(d=0,l=n.skips.length;d<l;d++)if(n.skips[d].test(h))return!1;for(d=0,l=n.names.length;d<l;d++)if(n.names[d].test(h))return!0;return!1}function u(h){return h.toString().substring(2,h.toString().length-2).replace(/\.\*\?$/,"*")}function f(h){return h instanceof Error?h.stack||h.message:h}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}return Ns=e,Ns}var Pf;function Wt(){return Pf||(Pf=1,function(e,t){t.formatArgs=n,t.save=i,t.load=o,t.useColors=r,t.storage=s(),t.destroy=(()=>{let u=!1;return()=>{u||(u=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(u){if(u[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const f="color: "+this.color;u.splice(1,0,f,"color: inherit");let c=0,h=0;u[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(c++,d==="%c"&&(h=c))}),u.splice(h,0,f)}t.log=console.debug||console.log||(()=>{});function i(u){try{u?t.storage.setItem("debug",u):t.storage.removeItem("debug")}catch{}}function o(){let u;try{u=t.storage.getItem("debug")}catch{}return!u&&typeof process<"u"&&"env"in process&&(u=process.env.DEBUG),u}function s(){try{return localStorage}catch{}}e.exports=rb()(t);const{formatters:a}=e.exports;a.j=function(u){try{return JSON.stringify(u)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}(Co,Co.exports)),Co.exports}var Gr={},If;function Dp(){if(If)return Gr;If=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.decode=Gr.encode=void 0;function e(r){let n="";for(let i in r)r.hasOwnProperty(i)&&(n.length&&(n+="&"),n+=encodeURIComponent(i)+"="+encodeURIComponent(r[i]));return n}Gr.encode=e;function t(r){let n={},i=r.split("&");for(let o=0,s=i.length;o<s;o++){let a=i[o].split("=");n[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return n}return Gr.decode=t,Gr}var Lf;function na(){if(Lf)return Ci;Lf=1;var e=ce&&ce.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.Transport=void 0;const t=eo(),r=Dn,n=to(),i=e(Wt()),o=Dp(),s=(0,i.default)("engine.io-client:transport");class a extends Error{constructor(c,h,d){super(c),this.description=h,this.context=d,this.type="TransportError"}}class u extends r.Emitter{constructor(c){super(),this.writable=!1,(0,n.installTimerFunctions)(this,c),this.opts=c,this.query=c.query,this.socket=c.socket}onError(c,h,d){return super.emitReserved("error",new a(c,h,d)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(c){this.readyState==="open"?this.write(c):s("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(c){const h=(0,t.decodePacket)(c,this.socket.binaryType);this.onPacket(h)}onPacket(c){super.emitReserved("packet",c)}onClose(c){this.readyState="closed",super.emitReserved("close",c)}pause(c){}createUri(c,h={}){return c+"://"+this._hostname()+this._port()+this.opts.path+this._query(h)}_hostname(){const c=this.opts.hostname;return c.indexOf(":")===-1?c:"["+c+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(c){const h=(0,o.encode)(c);return h.length?"?"+h:""}}return Ci.Transport=u,Ci}var tr={},kf;function Up(){if(kf)return tr;kf=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.yeast=tr.decode=tr.encode=void 0;const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),t=64,r={};let n=0,i=0,o;function s(f){let c="";do c=e[f%t]+c,f=Math.floor(f/t);while(f>0);return c}tr.encode=s;function a(f){let c=0;for(i=0;i<f.length;i++)c=c*t+r[f.charAt(i)];return c}tr.decode=a;function u(){const f=s(+new Date);return f!==o?(n=0,o=f):f+"."+s(n++)}for(tr.yeast=u;i<t;i++)r[e[i]]=i;return tr}var Wr={},Pi={},Mf;function nb(){if(Mf)return Pi;Mf=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.hasCORS=void 0;let e=!1;try{e=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}return Pi.hasCORS=e,Pi}var Bf;function ib(){if(Bf)return Wr;Bf=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.createCookieJar=Wr.XHR=void 0;const e=nb(),t=ra();function r(i){const o=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!o||e.hasCORS))return new XMLHttpRequest}catch{}if(!o)try{return new t.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}Wr.XHR=r;function n(){}return Wr.createCookieJar=n,Wr}var Ff;function ob(){if(Ff)return jr;Ff=1;var e=ce&&ce.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(jr,"__esModule",{value:!0}),jr.Request=jr.Polling=void 0;const t=na(),r=e(Wt()),n=Up(),i=eo(),o=ib(),s=Dn,a=to(),u=ra(),f=(0,r.default)("engine.io-client:polling");function c(){}const h=function(){return new o.XHR({xdomain:!1}).responseType!=null}();class d extends t.Transport{constructor(b){if(super(b),this.polling=!1,typeof location<"u"){const _=location.protocol==="https:";let E=location.port;E||(E=_?"443":"80"),this.xd=typeof location<"u"&&b.hostname!==location.hostname||E!==b.port}const T=b&&b.forceBase64;this.supportsBinary=h&&!T,this.opts.withCredentials&&(this.cookieJar=(0,o.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(b){this.readyState="pausing";const T=()=>{f("paused"),this.readyState="paused",b()};if(this.polling||!this.writable){let _=0;this.polling&&(f("we are currently polling - waiting to pause"),_++,this.once("pollComplete",function(){f("pre-pause polling complete"),--_||T()})),this.writable||(f("we are currently writing - waiting to pause"),_++,this.once("drain",function(){f("pre-pause writing complete"),--_||T()}))}else T()}poll(){f("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(b){f("polling got data %s",b);const T=_=>{if(this.readyState==="opening"&&_.type==="open"&&this.onOpen(),_.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(_)};(0,i.decodePayload)(b,this.socket.binaryType).forEach(T),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():f('ignoring poll - transport state "%s"',this.readyState))}doClose(){const b=()=>{f("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(f("transport open - closing"),b()):(f("transport not open - deferring close"),this.once("open",b))}write(b){this.writable=!1,(0,i.encodePayload)(b,T=>{this.doWrite(T,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const b=this.opts.secure?"https":"http",T=this.query||{};return this.opts.timestampRequests!==!1&&(T[this.opts.timestampParam]=(0,n.yeast)()),!this.supportsBinary&&!T.sid&&(T.b64=1),this.createUri(b,T)}request(b={}){return Object.assign(b,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new l(this.uri(),b)}doWrite(b,T){const _=this.request({method:"POST",data:b});_.on("success",T),_.on("error",(E,A)=>{this.onError("xhr post error",E,A)})}doPoll(){f("xhr poll");const b=this.request();b.on("data",this.onData.bind(this)),b.on("error",(T,_)=>{this.onError("xhr poll error",T,_)}),this.pollXhr=b}}jr.Polling=d;class l extends s.Emitter{constructor(b,T){super(),(0,a.installTimerFunctions)(this,T),this.opts=T,this.method=T.method||"GET",this.uri=b,this.data=T.data!==void 0?T.data:null,this.create()}create(){var b;const T=(0,a.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");T.xdomain=!!this.opts.xd;const _=this.xhr=new o.XHR(T);try{f("xhr open %s: %s",this.method,this.uri),_.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){_.setDisableHeaderCheck&&_.setDisableHeaderCheck(!0);for(let E in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(E)&&_.setRequestHeader(E,this.opts.extraHeaders[E])}}catch{}if(this.method==="POST")try{_.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{_.setRequestHeader("Accept","*/*")}catch{}(b=this.opts.cookieJar)===null||b===void 0||b.addCookies(_),"withCredentials"in _&&(_.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(_.timeout=this.opts.requestTimeout),_.onreadystatechange=()=>{var E;_.readyState===3&&((E=this.opts.cookieJar)===null||E===void 0||E.parseCookies(_)),_.readyState===4&&(_.status===200||_.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof _.status=="number"?_.status:0)},0))},f("xhr data %s",this.data),_.send(this.data)}catch(E){this.setTimeoutFn(()=>{this.onError(E)},0);return}typeof document<"u"&&(this.index=l.requestsCount++,l.requests[this.index]=this)}onError(b){this.emitReserved("error",b,this.xhr),this.cleanup(!0)}cleanup(b){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=c,b)try{this.xhr.abort()}catch{}typeof document<"u"&&delete l.requests[this.index],this.xhr=null}}onLoad(){const b=this.xhr.responseText;b!==null&&(this.emitReserved("data",b),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(jr.Request=l,l.requestsCount=0,l.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",p);else if(typeof addEventListener=="function"){const m="onpagehide"in u.globalThisShim?"pagehide":"unload";addEventListener(m,p,!1)}}function p(){for(let m in l.requests)l.requests.hasOwnProperty(m)&&l.requests[m].abort()}return jr}var Ii={},Rt={},Df;function ia(){if(Df)return Rt;Df=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.defaultBinaryType=Rt.usingBrowserWebSocket=Rt.WebSocket=Rt.nextTick=void 0;const e=ra();return Rt.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,n)=>n(r,0))(),Rt.WebSocket=e.globalThisShim.WebSocket||e.globalThisShim.MozWebSocket,Rt.usingBrowserWebSocket=!0,Rt.defaultBinaryType="arraybuffer",Rt}var Uf;function ab(){if(Uf)return Ii;Uf=1;var e=ce&&ce.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.WS=void 0;const t=na(),r=Up(),n=to(),i=ia(),o=e(Wt()),s=eo(),a=(0,o.default)("engine.io-client:websocket"),u=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class f extends t.Transport{constructor(h){super(h),this.supportsBinary=!h.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const h=this.uri(),d=this.opts.protocols,l=u?{}:(0,n.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(l.headers=this.opts.extraHeaders);try{this.ws=i.usingBrowserWebSocket&&!u?d?new i.WebSocket(h,d):new i.WebSocket(h):new i.WebSocket(h,d,l)}catch(p){return this.emitReserved("error",p)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=h=>this.onClose({description:"websocket connection closed",context:h}),this.ws.onmessage=h=>this.onData(h.data),this.ws.onerror=h=>this.onError("websocket error",h)}write(h){this.writable=!1;for(let d=0;d<h.length;d++){const l=h[d],p=d===h.length-1;(0,s.encodePacket)(l,this.supportsBinary,m=>{const b={};i.usingBrowserWebSocket||(l.options&&(b.compress=l.options.compress),this.opts.perMessageDeflate&&(typeof m=="string"?Buffer.byteLength(m):m.length)<this.opts.perMessageDeflate.threshold&&(b.compress=!1));try{i.usingBrowserWebSocket?this.ws.send(m):this.ws.send(m,b)}catch{a("websocket closed before onclose event")}p&&(0,i.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const h=this.opts.secure?"wss":"ws",d=this.query||{};return this.opts.timestampRequests&&(d[this.opts.timestampParam]=(0,r.yeast)()),this.supportsBinary||(d.b64=1),this.createUri(h,d)}check(){return!!i.WebSocket}}return Ii.WS=f,Ii}var Li={},$f;function sb(){if($f)return Li;$f=1;var e=ce&&ce.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Li,"__esModule",{value:!0}),Li.WT=void 0;const t=na(),r=ia(),n=eo(),o=(0,e(Wt()).default)("engine.io-client:webtransport");class s extends t.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{o("transport closed gracefully"),this.onClose()}).catch(u=>{o("transport closed due to %s",u),this.onError("webtransport error",u)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(u=>{const f=(0,n.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),c=u.readable.pipeThrough(f).getReader(),h=(0,n.createPacketEncoderStream)();h.readable.pipeTo(u.writable),this.writer=h.writable.getWriter();const d=()=>{c.read().then(({done:p,value:m})=>{if(p){o("session is closed");return}o("received chunk: %o",m),this.onPacket(m),d()}).catch(p=>{o("an error occurred while reading: %s",p)})};d();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this.writer.write(l).then(()=>this.onOpen())})}))}write(u){this.writable=!1;for(let f=0;f<u.length;f++){const c=u[f],h=f===u.length-1;this.writer.write(c).then(()=>{h&&(0,r.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var u;(u=this.transport)===null||u===void 0||u.close()}}return Li.WT=s,Li}var jf;function $p(){if(jf)return Ai;jf=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.transports=void 0;const e=ob(),t=ab(),r=sb();return Ai.transports={websocket:t.WS,webtransport:r.WT,polling:e.Polling},Ai}var ki={},Hf;function jp(){if(Hf)return ki;Hf=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.parse=void 0;const e=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,t=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function r(o){const s=o,a=o.indexOf("["),u=o.indexOf("]");a!=-1&&u!=-1&&(o=o.substring(0,a)+o.substring(a,u).replace(/:/g,";")+o.substring(u,o.length));let f=e.exec(o||""),c={},h=14;for(;h--;)c[t[h]]=f[h]||"";return a!=-1&&u!=-1&&(c.source=s,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=n(c,c.path),c.queryKey=i(c,c.query),c}ki.parse=r;function n(o,s){const a=/\/{2,9}/g,u=s.replace(a,"/").split("/");return(s.slice(0,1)=="/"||s.length===0)&&u.splice(0,1),s.slice(-1)=="/"&&u.splice(u.length-1,1),u}function i(o,s){const a={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(u,f,c){f&&(a[f]=c)}),a}return ki}var qf;function ub(){if(qf)return Oi;qf=1;var e=ce&&ce.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.Socket=void 0;const t=$p(),r=to(),n=Dp(),i=jp(),o=e(Wt()),s=Dn,a=eo(),u=ia(),f=(0,o.default)("engine.io-client:socket");class c extends s.Emitter{constructor(d,l={}){super(),this.binaryType=u.defaultBinaryType,this.writeBuffer=[],d&&typeof d=="object"&&(l=d,d=null),d?(d=(0,i.parse)(d),l.hostname=d.host,l.secure=d.protocol==="https"||d.protocol==="wss",l.port=d.port,d.query&&(l.query=d.query)):l.host&&(l.hostname=(0,i.parse)(l.host).host),(0,r.installTimerFunctions)(this,l),this.secure=l.secure!=null?l.secure:typeof location<"u"&&location.protocol==="https:",l.hostname&&!l.port&&(l.port=this.secure?"443":"80"),this.hostname=l.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=l.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=l.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},l),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,n.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(d){f('creating transport "%s"',d);const l=Object.assign({},this.opts.query);l.EIO=a.protocol,l.transport=d,this.id&&(l.sid=this.id);const p=Object.assign({},this.opts,{query:l,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[d]);return f("options: %j",p),new t.transports[d](p)}open(){let d;if(this.opts.rememberUpgrade&&c.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)d="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else d=this.transports[0];this.readyState="opening";try{d=this.createTransport(d)}catch(l){f("error while creating transport: %s",l),this.transports.shift(),this.open();return}d.open(),this.setTransport(d)}setTransport(d){f("setting transport %s",d.name),this.transport&&(f("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=d,d.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",l=>this.onClose("transport close",l))}probe(d){f('probing transport "%s"',d);let l=this.createTransport(d),p=!1;c.priorWebsocketSuccess=!1;const m=()=>{p||(f('probe transport "%s" opened',d),l.send([{type:"ping",data:"probe"}]),l.once("packet",N=>{if(!p)if(N.type==="pong"&&N.data==="probe"){if(f('probe transport "%s" pong',d),this.upgrading=!0,this.emitReserved("upgrading",l),!l)return;c.priorWebsocketSuccess=l.name==="websocket",f('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{p||this.readyState!=="closed"&&(f("changing transport and sending upgrade packet"),w(),this.setTransport(l),l.send([{type:"upgrade"}]),this.emitReserved("upgrade",l),l=null,this.upgrading=!1,this.flush())})}else{f('probe transport "%s" failed',d);const F=new Error("probe error");F.transport=l.name,this.emitReserved("upgradeError",F)}}))};function b(){p||(p=!0,w(),l.close(),l=null)}const T=N=>{const F=new Error("probe error: "+N);F.transport=l.name,b(),f('probe transport "%s" failed because of error: %s',d,N),this.emitReserved("upgradeError",F)};function _(){T("transport closed")}function E(){T("socket closed")}function A(N){l&&N.name!==l.name&&(f('"%s" works - aborting "%s"',N.name,l.name),b())}const w=()=>{l.removeListener("open",m),l.removeListener("error",T),l.removeListener("close",_),this.off("close",E),this.off("upgrading",A)};l.once("open",m),l.once("error",T),l.once("close",_),this.once("close",E),this.once("upgrading",A),this.upgrades.indexOf("webtransport")!==-1&&d!=="webtransport"?this.setTimeoutFn(()=>{p||l.open()},200):l.open()}onOpen(){if(f("socket open"),this.readyState="open",c.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){f("starting upgrade probes");let d=0;const l=this.upgrades.length;for(;d<l;d++)this.probe(this.upgrades[d])}}onPacket(d){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(f('socket receive: type "%s", data "%s"',d.type,d.data),this.emitReserved("packet",d),this.emitReserved("heartbeat"),this.resetPingTimeout(),d.type){case"open":this.onHandshake(JSON.parse(d.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const l=new Error("server error");l.code=d.data,this.onError(l);break;case"message":this.emitReserved("data",d.data),this.emitReserved("message",d.data);break}else f('packet received with socket readyState "%s"',this.readyState)}onHandshake(d){this.emitReserved("handshake",d),this.id=d.sid,this.transport.query.sid=d.sid,this.upgrades=this.filterUpgrades(d.upgrades),this.pingInterval=d.pingInterval,this.pingTimeout=d.pingTimeout,this.maxPayload=d.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const d=this.getWritablePackets();f("flushing %d packets in socket",d.length),this.transport.send(d),this.prevBufferLen=d.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let l=1;for(let p=0;p<this.writeBuffer.length;p++){const m=this.writeBuffer[p].data;if(m&&(l+=(0,r.byteLength)(m)),p>0&&l>this.maxPayload)return f("only send %d out of %d packets",p,this.writeBuffer.length),this.writeBuffer.slice(0,p);l+=2}return f("payload size is %d (max: %d)",l,this.maxPayload),this.writeBuffer}write(d,l,p){return this.sendPacket("message",d,l,p),this}send(d,l,p){return this.sendPacket("message",d,l,p),this}sendPacket(d,l,p,m){if(typeof l=="function"&&(m=l,l=void 0),typeof p=="function"&&(m=p,p=null),this.readyState==="closing"||this.readyState==="closed")return;p=p||{},p.compress=p.compress!==!1;const b={type:d,data:l,options:p};this.emitReserved("packetCreate",b),this.writeBuffer.push(b),m&&this.once("flush",m),this.flush()}close(){const d=()=>{this.onClose("forced close"),f("socket closing - telling transport to close"),this.transport.close()},l=()=>{this.off("upgrade",l),this.off("upgradeError",l),d()},p=()=>{this.once("upgrade",l),this.once("upgradeError",l)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?p():d()}):this.upgrading?p():d()),this}onError(d){f("socket error %j",d),c.priorWebsocketSuccess=!1,this.emitReserved("error",d),this.onClose("transport error",d)}onClose(d,l){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(f('socket close with reason: "%s"',d),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",d,l),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(d){const l=[];let p=0;const m=d.length;for(;p<m;p++)~this.transports.indexOf(d[p])&&l.push(d[p]);return l}}return Oi.Socket=c,c.protocol=a.protocol,Oi}var Gf;function Hp(){return Gf||(Gf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=ub();Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var r=na();Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return r.Transport}});var n=$p();Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return n.transports}});var i=to();Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return i.installTimerFunctions}});var o=jp();Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return o.parse}});var s=ia();Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return s.nextTick}})}(As)),As}var Wf;function cb(){if(Wf)return xi;Wf=1;var e=ce&&ce.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(xi,"__esModule",{value:!0}),xi.url=void 0;const t=Hp(),n=e(Wt()).default("socket.io-client:url");function i(o,s="",a){let u=o;a=a||typeof location<"u"&&location,o==null&&(o=a.protocol+"//"+a.host),typeof o=="string"&&(o.charAt(0)==="/"&&(o.charAt(1)==="/"?o=a.protocol+o:o=a.host+o),/^(https?|wss?):\/\//.test(o)||(n("protocol-less url %s",o),typeof a<"u"?o=a.protocol+"//"+o:o="https://"+o),n("parse %s",o),u=t.parse(o)),u.port||(/^(http|ws)$/.test(u.protocol)?u.port="80":/^(http|ws)s$/.test(u.protocol)&&(u.port="443")),u.path=u.path||"/";const c=u.host.indexOf(":")!==-1?"["+u.host+"]":u.host;return u.id=u.protocol+"://"+c+":"+u.port+s,u.href=u.protocol+"://"+c+(a&&a.port===u.port?"":":"+u.port),u}return xi.url=i,xi}var Mi={},Bi={},Ps={},Vr={},zr={},Vf;function qp(){if(Vf)return zr;Vf=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.hasBinary=zr.isBinary=void 0;const e=typeof ArrayBuffer=="function",t=a=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(a):a.buffer instanceof ArrayBuffer,r=Object.prototype.toString,n=typeof Blob=="function"||typeof Blob<"u"&&r.call(Blob)==="[object BlobConstructor]",i=typeof File=="function"||typeof File<"u"&&r.call(File)==="[object FileConstructor]";function o(a){return e&&(a instanceof ArrayBuffer||t(a))||n&&a instanceof Blob||i&&a instanceof File}zr.isBinary=o;function s(a,u){if(!a||typeof a!="object")return!1;if(Array.isArray(a)){for(let f=0,c=a.length;f<c;f++)if(s(a[f]))return!0;return!1}if(o(a))return!0;if(a.toJSON&&typeof a.toJSON=="function"&&arguments.length===1)return s(a.toJSON(),!0);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)&&s(a[f]))return!0;return!1}return zr.hasBinary=s,zr}var zf;function lb(){if(zf)return Vr;zf=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.reconstructPacket=Vr.deconstructPacket=void 0;const e=qp();function t(o){const s=[],a=o.data,u=o;return u.data=r(a,s),u.attachments=s.length,{packet:u,buffers:s}}Vr.deconstructPacket=t;function r(o,s){if(!o)return o;if((0,e.isBinary)(o)){const a={_placeholder:!0,num:s.length};return s.push(o),a}else if(Array.isArray(o)){const a=new Array(o.length);for(let u=0;u<o.length;u++)a[u]=r(o[u],s);return a}else if(typeof o=="object"&&!(o instanceof Date)){const a={};for(const u in o)Object.prototype.hasOwnProperty.call(o,u)&&(a[u]=r(o[u],s));return a}return o}function n(o,s){return o.data=i(o.data,s),delete o.attachments,o}Vr.reconstructPacket=n;function i(o,s){if(!o)return o;if(o&&o._placeholder===!0){if(typeof o.num=="number"&&o.num>=0&&o.num<s.length)return s[o.num];throw new Error("illegal attachments")}else if(Array.isArray(o))for(let a=0;a<o.length;a++)o[a]=i(o[a],s);else if(typeof o=="object")for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&(o[a]=i(o[a],s));return o}return Vr}var Yf;function Qu(){return Yf||(Yf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=Dn,r=lb(),n=qp(),o=(0,Wt().default)("socket.io-parser"),s=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var a;(function(d){d[d.CONNECT=0]="CONNECT",d[d.DISCONNECT=1]="DISCONNECT",d[d.EVENT=2]="EVENT",d[d.ACK=3]="ACK",d[d.CONNECT_ERROR=4]="CONNECT_ERROR",d[d.BINARY_EVENT=5]="BINARY_EVENT",d[d.BINARY_ACK=6]="BINARY_ACK"})(a=e.PacketType||(e.PacketType={}));class u{constructor(l){this.replacer=l}encode(l){return o("encoding packet %j",l),(l.type===a.EVENT||l.type===a.ACK)&&(0,n.hasBinary)(l)?this.encodeAsBinary({type:l.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,nsp:l.nsp,data:l.data,id:l.id}):[this.encodeAsString(l)]}encodeAsString(l){let p=""+l.type;return(l.type===a.BINARY_EVENT||l.type===a.BINARY_ACK)&&(p+=l.attachments+"-"),l.nsp&&l.nsp!=="/"&&(p+=l.nsp+","),l.id!=null&&(p+=l.id),l.data!=null&&(p+=JSON.stringify(l.data,this.replacer)),o("encoded %j as %s",l,p),p}encodeAsBinary(l){const p=(0,r.deconstructPacket)(l),m=this.encodeAsString(p.packet),b=p.buffers;return b.unshift(m),b}}e.Encoder=u;function f(d){return Object.prototype.toString.call(d)==="[object Object]"}class c extends t.Emitter{constructor(l){super(),this.reviver=l}add(l){let p;if(typeof l=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");p=this.decodeString(l);const m=p.type===a.BINARY_EVENT;m||p.type===a.BINARY_ACK?(p.type=m?a.EVENT:a.ACK,this.reconstructor=new h(p),p.attachments===0&&super.emitReserved("decoded",p)):super.emitReserved("decoded",p)}else if((0,n.isBinary)(l)||l.base64)if(this.reconstructor)p=this.reconstructor.takeBinaryData(l),p&&(this.reconstructor=null,super.emitReserved("decoded",p));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+l)}decodeString(l){let p=0;const m={type:Number(l.charAt(0))};if(a[m.type]===void 0)throw new Error("unknown packet type "+m.type);if(m.type===a.BINARY_EVENT||m.type===a.BINARY_ACK){const T=p+1;for(;l.charAt(++p)!=="-"&&p!=l.length;);const _=l.substring(T,p);if(_!=Number(_)||l.charAt(p)!=="-")throw new Error("Illegal attachments");m.attachments=Number(_)}if(l.charAt(p+1)==="/"){const T=p+1;for(;++p&&!(l.charAt(p)===","||p===l.length););m.nsp=l.substring(T,p)}else m.nsp="/";const b=l.charAt(p+1);if(b!==""&&Number(b)==b){const T=p+1;for(;++p;){const _=l.charAt(p);if(_==null||Number(_)!=_){--p;break}if(p===l.length)break}m.id=Number(l.substring(T,p+1))}if(l.charAt(++p)){const T=this.tryParse(l.substr(p));if(c.isPayloadValid(m.type,T))m.data=T;else throw new Error("invalid payload")}return o("decoded %s as %j",l,m),m}tryParse(l){try{return JSON.parse(l,this.reviver)}catch{return!1}}static isPayloadValid(l,p){switch(l){case a.CONNECT:return f(p);case a.DISCONNECT:return p===void 0;case a.CONNECT_ERROR:return typeof p=="string"||f(p);case a.EVENT:case a.BINARY_EVENT:return Array.isArray(p)&&(typeof p[0]=="number"||typeof p[0]=="string"&&s.indexOf(p[0])===-1);case a.ACK:case a.BINARY_ACK:return Array.isArray(p)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=c;class h{constructor(l){this.packet=l,this.buffers=[],this.reconPack=l}takeBinaryData(l){if(this.buffers.push(l),this.buffers.length===this.reconPack.attachments){const p=(0,r.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),p}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}}(Ps)),Ps}var Fi={},Kf;function Gp(){if(Kf)return Fi;Kf=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.on=void 0;function e(t,r,n){return t.on(r,n),function(){t.off(r,n)}}return Fi.on=e,Fi}var Qf;function Wp(){if(Qf)return Bi;Qf=1;var e=ce&&ce.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.Socket=void 0;const t=Qu(),r=Gp(),n=Dn,o=e(Wt()).default("socket.io-client:socket"),s=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class a extends n.Emitter{constructor(f,c,h){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=f,this.nsp=c,h&&h.auth&&(this.auth=h.auth),this._opts=Object.assign({},h),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const f=this.io;this.subs=[r.on(f,"open",this.onopen.bind(this)),r.on(f,"packet",this.onpacket.bind(this)),r.on(f,"error",this.onerror.bind(this)),r.on(f,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...f){return f.unshift("message"),this.emit.apply(this,f),this}emit(f,...c){if(s.hasOwnProperty(f))throw new Error('"'+f.toString()+'" is a reserved event name');if(c.unshift(f),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(c),this;const h={type:t.PacketType.EVENT,data:c};if(h.options={},h.options.compress=this.flags.compress!==!1,typeof c[c.length-1]=="function"){const p=this.ids++;o("emitting packet with ack id %d",p);const m=c.pop();this._registerAckCallback(p,m),h.id=p}const d=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!d||!this.connected)?o("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(h),this.packet(h)):this.sendBuffer.push(h),this.flags={},this}_registerAckCallback(f,c){var h;const d=(h=this.flags.timeout)!==null&&h!==void 0?h:this._opts.ackTimeout;if(d===void 0){this.acks[f]=c;return}const l=this.io.setTimeoutFn(()=>{delete this.acks[f];for(let p=0;p<this.sendBuffer.length;p++)this.sendBuffer[p].id===f&&(o("removing packet with ack id %d from the buffer",f),this.sendBuffer.splice(p,1));o("event with ack id %d has timed out after %d ms",f,d),c.call(this,new Error("operation has timed out"))},d);this.acks[f]=(...p)=>{this.io.clearTimeoutFn(l),c.apply(this,[null,...p])}}emitWithAck(f,...c){const h=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((d,l)=>{c.push((p,m)=>h?p?l(p):d(m):d(p)),this.emit(f,...c)})}_addToQueue(f){let c;typeof f[f.length-1]=="function"&&(c=f.pop());const h={id:this._queueSeq++,tryCount:0,pending:!1,args:f,flags:Object.assign({fromQueue:!0},this.flags)};f.push((d,...l)=>h!==this._queue[0]?void 0:(d!==null?h.tryCount>this._opts.retries&&(o("packet [%d] is discarded after %d tries",h.id,h.tryCount),this._queue.shift(),c&&c(d)):(o("packet [%d] was successfully sent",h.id),this._queue.shift(),c&&c(null,...l)),h.pending=!1,this._drainQueue())),this._queue.push(h),this._drainQueue()}_drainQueue(f=!1){if(o("draining queue"),!this.connected||this._queue.length===0)return;const c=this._queue[0];if(c.pending&&!f){o("packet [%d] has already been sent and is waiting for an ack",c.id);return}c.pending=!0,c.tryCount++,o("sending packet [%d] (try n°%d)",c.id,c.tryCount),this.flags=c.flags,this.emit.apply(this,c.args)}packet(f){f.nsp=this.nsp,this.io._packet(f)}onopen(){o("transport is open - connecting"),typeof this.auth=="function"?this.auth(f=>{this._sendConnectPacket(f)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(f){this.packet({type:t.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},f):f})}onerror(f){this.connected||this.emitReserved("connect_error",f)}onclose(f,c){o("close (%s)",f),this.connected=!1,delete this.id,this.emitReserved("disconnect",f,c)}onpacket(f){if(f.nsp===this.nsp)switch(f.type){case t.PacketType.CONNECT:f.data&&f.data.sid?this.onconnect(f.data.sid,f.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case t.PacketType.EVENT:case t.PacketType.BINARY_EVENT:this.onevent(f);break;case t.PacketType.ACK:case t.PacketType.BINARY_ACK:this.onack(f);break;case t.PacketType.DISCONNECT:this.ondisconnect();break;case t.PacketType.CONNECT_ERROR:this.destroy();const h=new Error(f.data.message);h.data=f.data.data,this.emitReserved("connect_error",h);break}}onevent(f){const c=f.data||[];o("emitting event %j",c),f.id!=null&&(o("attaching ack callback to event"),c.push(this.ack(f.id))),this.connected?this.emitEvent(c):this.receiveBuffer.push(Object.freeze(c))}emitEvent(f){if(this._anyListeners&&this._anyListeners.length){const c=this._anyListeners.slice();for(const h of c)h.apply(this,f)}super.emit.apply(this,f),this._pid&&f.length&&typeof f[f.length-1]=="string"&&(this._lastOffset=f[f.length-1])}ack(f){const c=this;let h=!1;return function(...d){h||(h=!0,o("sending ack %j",d),c.packet({type:t.PacketType.ACK,id:f,data:d}))}}onack(f){const c=this.acks[f.id];typeof c=="function"?(o("calling ack %s with %j",f.id,f.data),c.apply(this,f.data),delete this.acks[f.id]):o("bad ack %s",f.id)}onconnect(f,c){o("socket connected with id %s",f),this.id=f,this.recovered=c&&this._pid===c,this._pid=c,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(f=>this.emitEvent(f)),this.receiveBuffer=[],this.sendBuffer.forEach(f=>{this.notifyOutgoingListeners(f),this.packet(f)}),this.sendBuffer=[]}ondisconnect(){o("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(f=>f()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(o("performing disconnect (%s)",this.nsp),this.packet({type:t.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(f){return this.flags.compress=f,this}get volatile(){return this.flags.volatile=!0,this}timeout(f){return this.flags.timeout=f,this}onAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(f),this}prependAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(f),this}offAny(f){if(!this._anyListeners)return this;if(f){const c=this._anyListeners;for(let h=0;h<c.length;h++)if(f===c[h])return c.splice(h,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(f),this}prependAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(f),this}offAnyOutgoing(f){if(!this._anyOutgoingListeners)return this;if(f){const c=this._anyOutgoingListeners;for(let h=0;h<c.length;h++)if(f===c[h])return c.splice(h,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(f){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const c=this._anyOutgoingListeners.slice();for(const h of c)h.apply(this,f.data)}}}return Bi.Socket=a,Bi}var Di={},Xf;function fb(){if(Xf)return Di;Xf=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.Backoff=void 0;function e(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}return Di.Backoff=e,e.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),n=Math.floor(r*this.jitter*t);t=Math.floor(r*10)&1?t+n:t-n}return Math.min(t,this.max)|0},e.prototype.reset=function(){this.attempts=0},e.prototype.setMin=function(t){this.ms=t},e.prototype.setMax=function(t){this.max=t},e.prototype.setJitter=function(t){this.jitter=t},Di}var Jf;function db(){if(Jf)return Mi;Jf=1;var e=ce&&ce.__createBinding||(Object.create?function(l,p,m,b){b===void 0&&(b=m),Object.defineProperty(l,b,{enumerable:!0,get:function(){return p[m]}})}:function(l,p,m,b){b===void 0&&(b=m),l[b]=p[m]}),t=ce&&ce.__setModuleDefault||(Object.create?function(l,p){Object.defineProperty(l,"default",{enumerable:!0,value:p})}:function(l,p){l.default=p}),r=ce&&ce.__importStar||function(l){if(l&&l.__esModule)return l;var p={};if(l!=null)for(var m in l)m!=="default"&&Object.prototype.hasOwnProperty.call(l,m)&&e(p,l,m);return t(p,l),p},n=ce&&ce.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.Manager=void 0;const i=Hp(),o=Wp(),s=r(Qu()),a=Gp(),u=fb(),f=Dn,h=n(Wt()).default("socket.io-client:manager");class d extends f.Emitter{constructor(p,m){var b;super(),this.nsps={},this.subs=[],p&&typeof p=="object"&&(m=p,p=void 0),m=m||{},m.path=m.path||"/socket.io",this.opts=m,i.installTimerFunctions(this,m),this.reconnection(m.reconnection!==!1),this.reconnectionAttempts(m.reconnectionAttempts||1/0),this.reconnectionDelay(m.reconnectionDelay||1e3),this.reconnectionDelayMax(m.reconnectionDelayMax||5e3),this.randomizationFactor((b=m.randomizationFactor)!==null&&b!==void 0?b:.5),this.backoff=new u.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(m.timeout==null?2e4:m.timeout),this._readyState="closed",this.uri=p;const T=m.parser||s;this.encoder=new T.Encoder,this.decoder=new T.Decoder,this._autoConnect=m.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(p){return arguments.length?(this._reconnection=!!p,this):this._reconnection}reconnectionAttempts(p){return p===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=p,this)}reconnectionDelay(p){var m;return p===void 0?this._reconnectionDelay:(this._reconnectionDelay=p,(m=this.backoff)===null||m===void 0||m.setMin(p),this)}randomizationFactor(p){var m;return p===void 0?this._randomizationFactor:(this._randomizationFactor=p,(m=this.backoff)===null||m===void 0||m.setJitter(p),this)}reconnectionDelayMax(p){var m;return p===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=p,(m=this.backoff)===null||m===void 0||m.setMax(p),this)}timeout(p){return arguments.length?(this._timeout=p,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(p){if(h("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;h("opening %s",this.uri),this.engine=new i.Socket(this.uri,this.opts);const m=this.engine,b=this;this._readyState="opening",this.skipReconnect=!1;const T=a.on(m,"open",function(){b.onopen(),p&&p()}),_=A=>{h("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",A),p?p(A):this.maybeReconnectOnOpen()},E=a.on(m,"error",_);if(this._timeout!==!1){const A=this._timeout;h("connect attempt will timeout after %d",A);const w=this.setTimeoutFn(()=>{h("connect attempt timed out after %d",A),T(),_(new Error("timeout")),m.close()},A);this.opts.autoUnref&&w.unref(),this.subs.push(()=>{this.clearTimeoutFn(w)})}return this.subs.push(T),this.subs.push(E),this}connect(p){return this.open(p)}onopen(){h("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const p=this.engine;this.subs.push(a.on(p,"ping",this.onping.bind(this)),a.on(p,"data",this.ondata.bind(this)),a.on(p,"error",this.onerror.bind(this)),a.on(p,"close",this.onclose.bind(this)),a.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(p){try{this.decoder.add(p)}catch(m){this.onclose("parse error",m)}}ondecoded(p){i.nextTick(()=>{this.emitReserved("packet",p)},this.setTimeoutFn)}onerror(p){h("error",p),this.emitReserved("error",p)}socket(p,m){let b=this.nsps[p];return b?this._autoConnect&&!b.active&&b.connect():(b=new o.Socket(this,p,m),this.nsps[p]=b),b}_destroy(p){const m=Object.keys(this.nsps);for(const b of m)if(this.nsps[b].active){h("socket %s is still active, skipping close",b);return}this._close()}_packet(p){h("writing packet %j",p);const m=this.encoder.encode(p);for(let b=0;b<m.length;b++)this.engine.write(m[b],p.options)}cleanup(){h("cleanup"),this.subs.forEach(p=>p()),this.subs.length=0,this.decoder.destroy()}_close(){h("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(p,m){h("closed due to %s",p),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",p,m),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const p=this;if(this.backoff.attempts>=this._reconnectionAttempts)h("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const m=this.backoff.duration();h("will wait %dms before reconnect attempt",m),this._reconnecting=!0;const b=this.setTimeoutFn(()=>{p.skipReconnect||(h("attempting reconnect"),this.emitReserved("reconnect_attempt",p.backoff.attempts),!p.skipReconnect&&p.open(T=>{T?(h("reconnect attempt error"),p._reconnecting=!1,p.reconnect(),this.emitReserved("reconnect_error",T)):(h("reconnect success"),p.onreconnect())}))},m);this.opts.autoUnref&&b.unref(),this.subs.push(()=>{this.clearTimeoutFn(b)})}}onreconnect(){const p=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",p)}}return Mi.Manager=d,Mi}var Zf;function hb(){return Zf||(Zf=1,function(e,t){var r=ce&&ce.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const n=cb(),i=db();Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return i.Manager}});const o=Wp();Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return o.Socket}});const a=r(Wt()).default("socket.io-client"),u={};function f(h,d){typeof h=="object"&&(d=h,h=void 0),d=d||{};const l=n.url(h,d.path||"/socket.io"),p=l.source,m=l.id,b=l.path,T=u[m]&&b in u[m].nsps,_=d.forceNew||d["force new connection"]||d.multiplex===!1||T;let E;return _?(a("ignoring socket cache for %s",p),E=new i.Manager(p,d)):(u[m]||(a("new io instance for %s",p),u[m]=new i.Manager(p,d)),E=u[m]),l.query&&!d.query&&(d.query=l.queryKey),E.socket(l.path,d)}t.io=f,t.connect=f,t.default=f,Object.assign(f,{Manager:i.Manager,Socket:o.Socket,io:f,connect:f});var c=Qu();Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return c.protocol}}),e.exports=f}(Ao,Ao.exports)),Ao.exports}var Is={},Ui={},ed;function pb(){if(ed)return Ui;ed=1,Ui.byteLength=a,Ui.toByteArray=f,Ui.fromByteArray=d;for(var e=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=n.length;i<o;++i)e[i]=n[i],t[n.charCodeAt(i)]=i;t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;function s(l){var p=l.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var m=l.indexOf("=");m===-1&&(m=p);var b=m===p?0:4-m%4;return[m,b]}function a(l){var p=s(l),m=p[0],b=p[1];return(m+b)*3/4-b}function u(l,p,m){return(p+m)*3/4-m}function f(l){var p,m=s(l),b=m[0],T=m[1],_=new r(u(l,b,T)),E=0,A=T>0?b-4:b,w;for(w=0;w<A;w+=4)p=t[l.charCodeAt(w)]<<18|t[l.charCodeAt(w+1)]<<12|t[l.charCodeAt(w+2)]<<6|t[l.charCodeAt(w+3)],_[E++]=p>>16&255,_[E++]=p>>8&255,_[E++]=p&255;return T===2&&(p=t[l.charCodeAt(w)]<<2|t[l.charCodeAt(w+1)]>>4,_[E++]=p&255),T===1&&(p=t[l.charCodeAt(w)]<<10|t[l.charCodeAt(w+1)]<<4|t[l.charCodeAt(w+2)]>>2,_[E++]=p>>8&255,_[E++]=p&255),_}function c(l){return e[l>>18&63]+e[l>>12&63]+e[l>>6&63]+e[l&63]}function h(l,p,m){for(var b,T=[],_=p;_<m;_+=3)b=(l[_]<<16&16711680)+(l[_+1]<<8&65280)+(l[_+2]&255),T.push(c(b));return T.join("")}function d(l){for(var p,m=l.length,b=m%3,T=[],_=16383,E=0,A=m-b;E<A;E+=_)T.push(h(l,E,E+_>A?A:E+_));return b===1?(p=l[m-1],T.push(e[p>>2]+e[p<<4&63]+"==")):b===2&&(p=(l[m-2]<<8)+l[m-1],T.push(e[p>>10]+e[p>>4&63]+e[p<<2&63]+"=")),T.join("")}return Ui}var Ro={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var td;function mb(){return td||(td=1,Ro.read=function(e,t,r,n,i){var o,s,a=i*8-n-1,u=(1<<a)-1,f=u>>1,c=-7,h=r?i-1:0,d=r?-1:1,l=e[t+h];for(h+=d,o=l&(1<<-c)-1,l>>=-c,c+=a;c>0;o=o*256+e[t+h],h+=d,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=s*256+e[t+h],h+=d,c-=8);if(o===0)o=1-f;else{if(o===u)return s?NaN:(l?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-f}return(l?-1:1)*s*Math.pow(2,o-n)},Ro.write=function(e,t,r,n,i,o){var s,a,u,f=o*8-i-1,c=(1<<f)-1,h=c>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,p=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+h>=1?t+=d/u:t+=d*Math.pow(2,1-h),t*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*u-1)*Math.pow(2,i),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[r+l]=a&255,l+=p,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;e[r+l]=s&255,l+=p,s/=256,f-=8);e[r+l-p]|=m*128}),Ro}/*!
56
+ window.`+s+".push("+JSON.stringify(o)+")"}};return Ts=n,Ts}var xs,_f;function $E(){if(_f)return xs;_f=1;var e=UE(),t=r(e);function r(i){return i&&i.__esModule?i:{default:i}}var n={dataScript:function(o){var s=document.createElement("script");return s.innerHTML=o,s},gtm:function(o){var s=t.default.tags(o),a=function(){var h=document.createElement("noscript");return h.innerHTML=s.iframe,h},u=function(){var h=document.createElement("script");return h.innerHTML=s.script,h},f=this.dataScript(s.dataLayerVar);return{noScript:a,script:u,dataScript:f}},initialize:function(o){var s=o.gtmId,a=o.events,u=a===void 0?{}:a,f=o.dataLayer,c=o.dataLayerName,h=c===void 0?"dataLayer":c,d=o.auth,l=d===void 0?"":d,p=o.preview,m=p===void 0?"":p,b=this.gtm({id:s,events:u,dataLayer:f||void 0,dataLayerName:h,auth:l,preview:m});f&&document.head.appendChild(b.dataScript),document.head.insertBefore(b.script(),document.head.childNodes[0]),document.body.insertBefore(b.noScript(),document.body.childNodes[0])},dataLayer:function(o){var s=o.dataLayer,a=o.dataLayerName,u=a===void 0?"dataLayer":a;if(window[u])return window[u].push(s);var f=t.default.dataLayer(s,u),c=this.dataScript(f);document.head.insertBefore(c,document.head.childNodes[0])}};return xs=n,xs}var Os,Ef;function jE(){if(Ef)return Os;Ef=1;var e=$E(),t=r(e);function r(n){return n&&n.__esModule?n:{default:n}}return Os=t.default,Os}var bf;function HE(){return bf||(bf=1,function(e,t){(function(r,n){e.exports=n(jE())})(ce,function(r){return function(){var n={273:function(a){a.exports=r}},i={};function o(a){var u=i[a];if(u!==void 0)return u.exports;var f=i[a]={exports:{}};return n[a](f,f.exports,o),f.exports}o.n=function(a){var u=a&&a.__esModule?function(){return a.default}:function(){return a};return o.d(u,{a:u}),u},o.d=function(a,u){for(var f in u)o.o(u,f)&&!o.o(a,f)&&Object.defineProperty(a,f,{enumerable:!0,get:u[f]})},o.o=function(a,u){return Object.prototype.hasOwnProperty.call(a,u)},o.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var s={};return function(){o.r(s),o.d(s,{setContext:function(){return c},setupGTM:function(){return d}});var a=o(273),u=o.n(a);let f=null;const c=({configs:l,environment:p})=>{if(!p)throw new Error("Cannot set context: Environment not defined");if(!l)throw new Error("Cannot set context: REACT_APP_GTM_ID not defined");if(!l[p])throw new Error(`Cannot set context: REACT_APP_GTM_ID not defined for environment - ${JSON.stringify({configs:l,environment:p})}`);f=l[p]},h=()=>f,d=()=>{const l=h();u().initialize({gtmId:l.id})}}(),s}()})}(Ss)),Ss.exports}var Bh=202,Fh=502,Dh=400,Uh=409,$h=100,jh=201,Hh=417,qE=424,qh=403,Gh=504,Wh=410,Vh=505,zh=418,Yh=419,Kh=507,Qh=500,Xh=411,Jh=423,Zh=420,ep=405,tp=301,rp=302,np=207,ip=300,op=511,ap=204,sp=203,up=406,cp=404,lp=501,fp=304,dp=200,hp=206,pp=402,mp=308,gp=412,yp=428,vp=102,_p=407,Ep=431,bp=408,wp=413,Sp=414,Tp=416,xp=205,Op=303,Ap=503,Cp=101,Rp=307,Np=429,Pp=401,Ip=422,Lp=415,Mp=305;const GE={ACCEPTED:Bh,BAD_GATEWAY:Fh,BAD_REQUEST:Dh,CONFLICT:Uh,CONTINUE:$h,CREATED:jh,EXPECTATION_FAILED:Hh,FORBIDDEN:qh,GATEWAY_TIMEOUT:Gh,GONE:Wh,HTTP_VERSION_NOT_SUPPORTED:Vh,IM_A_TEAPOT:zh,INSUFFICIENT_SPACE_ON_RESOURCE:Yh,INSUFFICIENT_STORAGE:Kh,INTERNAL_SERVER_ERROR:Qh,LENGTH_REQUIRED:Xh,LOCKED:Jh,METHOD_FAILURE:Zh,METHOD_NOT_ALLOWED:ep,MOVED_PERMANENTLY:tp,MOVED_TEMPORARILY:rp,MULTI_STATUS:np,MULTIPLE_CHOICES:ip,NETWORK_AUTHENTICATION_REQUIRED:op,NO_CONTENT:ap,NON_AUTHORITATIVE_INFORMATION:sp,NOT_ACCEPTABLE:up,NOT_FOUND:cp,NOT_IMPLEMENTED:lp,NOT_MODIFIED:fp,OK:dp,PARTIAL_CONTENT:hp,PAYMENT_REQUIRED:pp,PERMANENT_REDIRECT:mp,PRECONDITION_FAILED:gp,PRECONDITION_REQUIRED:yp,PROCESSING:vp,PROXY_AUTHENTICATION_REQUIRED:_p,REQUEST_HEADER_FIELDS_TOO_LARGE:Ep,REQUEST_TIMEOUT:bp,REQUEST_TOO_LONG:wp,REQUEST_URI_TOO_LONG:Sp,REQUESTED_RANGE_NOT_SATISFIABLE:Tp,RESET_CONTENT:xp,SEE_OTHER:Op,SERVICE_UNAVAILABLE:Ap,SWITCHING_PROTOCOLS:Cp,TEMPORARY_REDIRECT:Rp,TOO_MANY_REQUESTS:Np,UNAUTHORIZED:Pp,UNPROCESSABLE_ENTITY:Ip,UNSUPPORTED_MEDIA_TYPE:Lp,USE_PROXY:Mp};var WE={202:"Accepted",502:"Bad Gateway",400:"Bad Request",409:"Conflict",100:"Continue",201:"Created",417:"Expectation Failed",424:"Failed Dependency",403:"Forbidden",504:"Gateway Timeout",410:"Gone",505:"HTTP Version Not Supported",418:"I'm a teapot",419:"Insufficient Space on Resource",507:"Insufficient Storage",500:"Internal Server Error",411:"Length Required",423:"Locked",420:"Method Failure",405:"Method Not Allowed",301:"Moved Permanently",302:"Moved Temporarily",207:"Multi-Status",300:"Multiple Choices",511:"Network Authentication Required",204:"No Content",203:"Non Authoritative Information",406:"Not Acceptable",404:"Not Found",501:"Not Implemented",304:"Not Modified",200:"OK",206:"Partial Content",402:"Payment Required",308:"Permanent Redirect",412:"Precondition Failed",428:"Precondition Required",102:"Processing",407:"Proxy Authentication Required",431:"Request Header Fields Too Large",408:"Request Timeout",413:"Request Entity Too Large",414:"Request-URI Too Long",416:"Requested Range Not Satisfiable",205:"Reset Content",303:"See Other",503:"Service Unavailable",101:"Switching Protocols",307:"Temporary Redirect",429:"Too Many Requests",401:"Unauthorized",451:"Unavailable For Legal Reasons",422:"Unprocessable Entity",415:"Unsupported Media Type",305:"Use Proxy",421:"Misdirected Request"},VE={Accepted:202,"Bad Gateway":502,"Bad Request":400,Conflict:409,Continue:100,Created:201,"Expectation Failed":417,"Failed Dependency":424,Forbidden:403,"Gateway Timeout":504,Gone:410,"HTTP Version Not Supported":505,"I'm a teapot":418,"Insufficient Space on Resource":419,"Insufficient Storage":507,"Internal Server Error":500,"Length Required":411,Locked:423,"Method Failure":420,"Method Not Allowed":405,"Moved Permanently":301,"Moved Temporarily":302,"Multi-Status":207,"Multiple Choices":300,"Network Authentication Required":511,"No Content":204,"Non Authoritative Information":203,"Not Acceptable":406,"Not Found":404,"Not Implemented":501,"Not Modified":304,OK:200,"Partial Content":206,"Payment Required":402,"Permanent Redirect":308,"Precondition Failed":412,"Precondition Required":428,Processing:102,"Proxy Authentication Required":407,"Request Header Fields Too Large":431,"Request Timeout":408,"Request Entity Too Large":413,"Request-URI Too Long":414,"Requested Range Not Satisfiable":416,"Reset Content":205,"See Other":303,"Service Unavailable":503,"Switching Protocols":101,"Temporary Redirect":307,"Too Many Requests":429,Unauthorized:401,"Unavailable For Legal Reasons":451,"Unprocessable Entity":422,"Unsupported Media Type":415,"Use Proxy":305,"Misdirected Request":421};function kp(e){var t=WE[e.toString()];if(!t)throw new Error("Status code does not exist: "+e);return t}function Bp(e){var t=VE[e];if(!t)throw new Error("Reason phrase does not exist: "+e);return t}var Fp=kp,gu;(function(e){e[e.ACCEPTED=202]="ACCEPTED",e[e.BAD_GATEWAY=502]="BAD_GATEWAY",e[e.BAD_REQUEST=400]="BAD_REQUEST",e[e.CONFLICT=409]="CONFLICT",e[e.CONTINUE=100]="CONTINUE",e[e.CREATED=201]="CREATED",e[e.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",e[e.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",e[e.FORBIDDEN=403]="FORBIDDEN",e[e.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",e[e.GONE=410]="GONE",e[e.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",e[e.IM_A_TEAPOT=418]="IM_A_TEAPOT",e[e.INSUFFICIENT_SPACE_ON_RESOURCE=419]="INSUFFICIENT_SPACE_ON_RESOURCE",e[e.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",e[e.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",e[e.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",e[e.LOCKED=423]="LOCKED",e[e.METHOD_FAILURE=420]="METHOD_FAILURE",e[e.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",e[e.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",e[e.MOVED_TEMPORARILY=302]="MOVED_TEMPORARILY",e[e.MULTI_STATUS=207]="MULTI_STATUS",e[e.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",e[e.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",e[e.NO_CONTENT=204]="NO_CONTENT",e[e.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",e[e.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",e[e.NOT_FOUND=404]="NOT_FOUND",e[e.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",e[e.NOT_MODIFIED=304]="NOT_MODIFIED",e[e.OK=200]="OK",e[e.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",e[e.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",e[e.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",e[e.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",e[e.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",e[e.PROCESSING=102]="PROCESSING",e[e.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",e[e.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",e[e.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",e[e.REQUEST_TOO_LONG=413]="REQUEST_TOO_LONG",e[e.REQUEST_URI_TOO_LONG=414]="REQUEST_URI_TOO_LONG",e[e.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",e[e.RESET_CONTENT=205]="RESET_CONTENT",e[e.SEE_OTHER=303]="SEE_OTHER",e[e.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",e[e.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",e[e.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",e[e.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",e[e.UNAUTHORIZED=401]="UNAUTHORIZED",e[e.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",e[e.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",e[e.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",e[e.USE_PROXY=305]="USE_PROXY",e[e.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST"})(gu||(gu={}));var yu;(function(e){e.ACCEPTED="Accepted",e.BAD_GATEWAY="Bad Gateway",e.BAD_REQUEST="Bad Request",e.CONFLICT="Conflict",e.CONTINUE="Continue",e.CREATED="Created",e.EXPECTATION_FAILED="Expectation Failed",e.FAILED_DEPENDENCY="Failed Dependency",e.FORBIDDEN="Forbidden",e.GATEWAY_TIMEOUT="Gateway Timeout",e.GONE="Gone",e.HTTP_VERSION_NOT_SUPPORTED="HTTP Version Not Supported",e.IM_A_TEAPOT="I'm a teapot",e.INSUFFICIENT_SPACE_ON_RESOURCE="Insufficient Space on Resource",e.INSUFFICIENT_STORAGE="Insufficient Storage",e.INTERNAL_SERVER_ERROR="Internal Server Error",e.LENGTH_REQUIRED="Length Required",e.LOCKED="Locked",e.METHOD_FAILURE="Method Failure",e.METHOD_NOT_ALLOWED="Method Not Allowed",e.MOVED_PERMANENTLY="Moved Permanently",e.MOVED_TEMPORARILY="Moved Temporarily",e.MULTI_STATUS="Multi-Status",e.MULTIPLE_CHOICES="Multiple Choices",e.NETWORK_AUTHENTICATION_REQUIRED="Network Authentication Required",e.NO_CONTENT="No Content",e.NON_AUTHORITATIVE_INFORMATION="Non Authoritative Information",e.NOT_ACCEPTABLE="Not Acceptable",e.NOT_FOUND="Not Found",e.NOT_IMPLEMENTED="Not Implemented",e.NOT_MODIFIED="Not Modified",e.OK="OK",e.PARTIAL_CONTENT="Partial Content",e.PAYMENT_REQUIRED="Payment Required",e.PERMANENT_REDIRECT="Permanent Redirect",e.PRECONDITION_FAILED="Precondition Failed",e.PRECONDITION_REQUIRED="Precondition Required",e.PROCESSING="Processing",e.PROXY_AUTHENTICATION_REQUIRED="Proxy Authentication Required",e.REQUEST_HEADER_FIELDS_TOO_LARGE="Request Header Fields Too Large",e.REQUEST_TIMEOUT="Request Timeout",e.REQUEST_TOO_LONG="Request Entity Too Large",e.REQUEST_URI_TOO_LONG="Request-URI Too Long",e.REQUESTED_RANGE_NOT_SATISFIABLE="Requested Range Not Satisfiable",e.RESET_CONTENT="Reset Content",e.SEE_OTHER="See Other",e.SERVICE_UNAVAILABLE="Service Unavailable",e.SWITCHING_PROTOCOLS="Switching Protocols",e.TEMPORARY_REDIRECT="Temporary Redirect",e.TOO_MANY_REQUESTS="Too Many Requests",e.UNAUTHORIZED="Unauthorized",e.UNAVAILABLE_FOR_LEGAL_REASONS="Unavailable For Legal Reasons",e.UNPROCESSABLE_ENTITY="Unprocessable Entity",e.UNSUPPORTED_MEDIA_TYPE="Unsupported Media Type",e.USE_PROXY="Use Proxy",e.MISDIRECTED_REQUEST="Misdirected Request"})(yu||(yu={}));var Vo=globalThis&&globalThis.__assign||function(){return Vo=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Vo.apply(this,arguments)};const zE=Vo(Vo({},GE),{getStatusCode:Bp,getStatusText:Fp}),YE=Object.freeze(Object.defineProperty({__proto__:null,ACCEPTED:Bh,BAD_GATEWAY:Fh,BAD_REQUEST:Dh,CONFLICT:Uh,CONTINUE:$h,CREATED:jh,EXPECTATION_FAILED:Hh,FAILED_DEPENDENCY:qE,FORBIDDEN:qh,GATEWAY_TIMEOUT:Gh,GONE:Wh,HTTP_VERSION_NOT_SUPPORTED:Vh,IM_A_TEAPOT:zh,INSUFFICIENT_SPACE_ON_RESOURCE:Yh,INSUFFICIENT_STORAGE:Kh,INTERNAL_SERVER_ERROR:Qh,LENGTH_REQUIRED:Xh,LOCKED:Jh,METHOD_FAILURE:Zh,METHOD_NOT_ALLOWED:ep,MOVED_PERMANENTLY:tp,MOVED_TEMPORARILY:rp,MULTIPLE_CHOICES:ip,MULTI_STATUS:np,NETWORK_AUTHENTICATION_REQUIRED:op,NON_AUTHORITATIVE_INFORMATION:sp,NOT_ACCEPTABLE:up,NOT_FOUND:cp,NOT_IMPLEMENTED:lp,NOT_MODIFIED:fp,NO_CONTENT:ap,OK:dp,PARTIAL_CONTENT:hp,PAYMENT_REQUIRED:pp,PERMANENT_REDIRECT:mp,PRECONDITION_FAILED:gp,PRECONDITION_REQUIRED:yp,PROCESSING:vp,PROXY_AUTHENTICATION_REQUIRED:_p,REQUESTED_RANGE_NOT_SATISFIABLE:Tp,REQUEST_HEADER_FIELDS_TOO_LARGE:Ep,REQUEST_TIMEOUT:bp,REQUEST_TOO_LONG:wp,REQUEST_URI_TOO_LONG:Sp,RESET_CONTENT:xp,get ReasonPhrases(){return yu},SEE_OTHER:Op,SERVICE_UNAVAILABLE:Ap,SWITCHING_PROTOCOLS:Cp,get StatusCodes(){return gu},TEMPORARY_REDIRECT:Rp,TOO_MANY_REQUESTS:Np,UNAUTHORIZED:Pp,UNPROCESSABLE_ENTITY:Ip,UNSUPPORTED_MEDIA_TYPE:Lp,USE_PROXY:Mp,default:zE,getReasonPhrase:kp,getStatusCode:Bp,getStatusText:Fp},Symbol.toStringTag,{value:"Module"})),KE=Ji(YE);var Ao={exports:{}},xi={},As={},Oi={},Ai={},jr={},Ci={},Cs={},Hr={},Zt={},wf;function Ku(){if(wf)return Zt;wf=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.ERROR_PACKET=Zt.PACKET_TYPES_REVERSE=Zt.PACKET_TYPES=void 0;const e=Object.create(null);Zt.PACKET_TYPES=e,e.open="0",e.close="1",e.ping="2",e.pong="3",e.message="4",e.upgrade="5",e.noop="6";const t=Object.create(null);Zt.PACKET_TYPES_REVERSE=t,Object.keys(e).forEach(n=>{t[e[n]]=n});const r={type:"error",data:"parser error"};return Zt.ERROR_PACKET=r,Zt}var Sf;function QE(){if(Sf)return Hr;Sf=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.encodePacket=Hr.encodePacketToBinary=void 0;const e=Ku(),t=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",r=typeof ArrayBuffer=="function",n=f=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(f):f&&f.buffer instanceof ArrayBuffer,i=({type:f,data:c},h,d)=>t&&c instanceof Blob?h?d(c):o(c,d):r&&(c instanceof ArrayBuffer||n(c))?h?d(c):o(new Blob([c]),d):d(e.PACKET_TYPES[f]+(c||""));Hr.encodePacket=i;const o=(f,c)=>{const h=new FileReader;return h.onload=function(){const d=h.result.split(",")[1];c("b"+(d||""))},h.readAsDataURL(f)};function s(f){return f instanceof Uint8Array?f:f instanceof ArrayBuffer?new Uint8Array(f):new Uint8Array(f.buffer,f.byteOffset,f.byteLength)}let a;function u(f,c){if(t&&f.data instanceof Blob)return f.data.arrayBuffer().then(s).then(c);if(r&&(f.data instanceof ArrayBuffer||n(f.data)))return c(s(f.data));i(f,!1,h=>{a||(a=new TextEncoder),c(a.encode(h))})}return Hr.encodePacketToBinary=u,Hr}var Ri={},qr={},Tf;function XE(){if(Tf)return qr;Tf=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.decode=qr.encode=void 0;const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<e.length;i++)t[e.charCodeAt(i)]=i;const r=i=>{let o=new Uint8Array(i),s,a=o.length,u="";for(s=0;s<a;s+=3)u+=e[o[s]>>2],u+=e[(o[s]&3)<<4|o[s+1]>>4],u+=e[(o[s+1]&15)<<2|o[s+2]>>6],u+=e[o[s+2]&63];return a%3===2?u=u.substring(0,u.length-1)+"=":a%3===1&&(u=u.substring(0,u.length-2)+"=="),u};qr.encode=r;const n=i=>{let o=i.length*.75,s=i.length,a,u=0,f,c,h,d;i[i.length-1]==="="&&(o--,i[i.length-2]==="="&&o--);const l=new ArrayBuffer(o),p=new Uint8Array(l);for(a=0;a<s;a+=4)f=t[i.charCodeAt(a)],c=t[i.charCodeAt(a+1)],h=t[i.charCodeAt(a+2)],d=t[i.charCodeAt(a+3)],p[u++]=f<<2|c>>4,p[u++]=(c&15)<<4|h>>2,p[u++]=(h&3)<<6|d&63;return l};return qr.decode=n,qr}var xf;function JE(){if(xf)return Ri;xf=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.decodePacket=void 0;const e=Ku(),t=XE(),r=typeof ArrayBuffer=="function",n=(s,a)=>{if(typeof s!="string")return{type:"message",data:o(s,a)};const u=s.charAt(0);return u==="b"?{type:"message",data:i(s.substring(1),a)}:e.PACKET_TYPES_REVERSE[u]?s.length>1?{type:e.PACKET_TYPES_REVERSE[u],data:s.substring(1)}:{type:e.PACKET_TYPES_REVERSE[u]}:e.ERROR_PACKET};Ri.decodePacket=n;const i=(s,a)=>{if(r){const u=(0,t.decode)(s);return o(u,a)}else return{base64:!0,data:s}},o=(s,a)=>{switch(a){case"blob":return s instanceof Blob?s:new Blob([s]);case"arraybuffer":default:return s instanceof ArrayBuffer?s:s.buffer}};return Ri}var Of;function eo(){return Of||(Of=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=QE();Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const r=JE();Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return r.decodePacket}});const n=Ku(),i=String.fromCharCode(30),o=(d,l)=>{const p=d.length,m=new Array(p);let b=0;d.forEach((T,_)=>{(0,t.encodePacket)(T,!1,E=>{m[_]=E,++b===p&&l(m.join(i))})})};e.encodePayload=o;const s=(d,l)=>{const p=d.split(i),m=[];for(let b=0;b<p.length;b++){const T=(0,r.decodePacket)(p[b],l);if(m.push(T),T.type==="error")break}return m};e.decodePayload=s;function a(){return new TransformStream({transform(d,l){(0,t.encodePacketToBinary)(d,p=>{const m=p.length;let b;if(m<126)b=new Uint8Array(1),new DataView(b.buffer).setUint8(0,m);else if(m<65536){b=new Uint8Array(3);const T=new DataView(b.buffer);T.setUint8(0,126),T.setUint16(1,m)}else{b=new Uint8Array(9);const T=new DataView(b.buffer);T.setUint8(0,127),T.setBigUint64(1,BigInt(m))}d.data&&typeof d.data!="string"&&(b[0]|=128),l.enqueue(b),l.enqueue(p)})}})}e.createPacketEncoderStream=a;let u;function f(d){return d.reduce((l,p)=>l+p.length,0)}function c(d,l){if(d[0].length===l)return d.shift();const p=new Uint8Array(l);let m=0;for(let b=0;b<l;b++)p[b]=d[0][m++],m===d[0].length&&(d.shift(),m=0);return d.length&&m<d[0].length&&(d[0]=d[0].slice(m)),p}function h(d,l){u||(u=new TextDecoder);const p=[];let m=0,b=-1,T=!1;return new TransformStream({transform(_,E){for(p.push(_);;){if(m===0){if(f(p)<1)break;const A=c(p,1);T=(A[0]&128)===128,b=A[0]&127,b<126?m=3:b===126?m=1:m=2}else if(m===1){if(f(p)<2)break;const A=c(p,2);b=new DataView(A.buffer,A.byteOffset,A.length).getUint16(0),m=3}else if(m===2){if(f(p)<8)break;const A=c(p,8),w=new DataView(A.buffer,A.byteOffset,A.length),N=w.getUint32(0);if(N>Math.pow(2,53-32)-1){E.enqueue(n.ERROR_PACKET);break}b=N*Math.pow(2,32)+w.getUint32(4),m=3}else{if(f(p)<b)break;const A=c(p,b);E.enqueue((0,r.decodePacket)(T?A:u.decode(A),l)),m=0}if(b===0||b>d){E.enqueue(n.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=h,e.protocol=4}(Cs)),Cs}function st(e){if(e)return ZE(e)}function ZE(e){for(var t in st.prototype)e[t]=st.prototype[t];return e}st.prototype.on=st.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};st.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};st.prototype.off=st.prototype.removeListener=st.prototype.removeAllListeners=st.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,i=0;i<r.length;i++)if(n=r[i],n===t||n.fn===t){r.splice(i,1);break}return r.length===0&&delete this._callbacks["$"+e],this};st.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,i=r.length;n<i;++n)r[n].apply(this,t)}return this};st.prototype.emitReserved=st.prototype.emit;st.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};st.prototype.hasListeners=function(e){return!!this.listeners(e).length};const eb=Object.freeze(Object.defineProperty({__proto__:null,Emitter:st},Symbol.toStringTag,{value:"Module"})),Dn=Ji(eb);var er={},Ni={},Af;function ra(){return Af||(Af=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.globalThisShim=void 0,Ni.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())()),Ni}var Cf;function to(){if(Cf)return er;Cf=1,Object.defineProperty(er,"__esModule",{value:!0}),er.byteLength=er.installTimerFunctions=er.pick=void 0;const e=ra();function t(u,...f){return f.reduce((c,h)=>(u.hasOwnProperty(h)&&(c[h]=u[h]),c),{})}er.pick=t;const r=e.globalThisShim.setTimeout,n=e.globalThisShim.clearTimeout;function i(u,f){f.useNativeTimers?(u.setTimeoutFn=r.bind(e.globalThisShim),u.clearTimeoutFn=n.bind(e.globalThisShim)):(u.setTimeoutFn=e.globalThisShim.setTimeout.bind(e.globalThisShim),u.clearTimeoutFn=e.globalThisShim.clearTimeout.bind(e.globalThisShim))}er.installTimerFunctions=i;const o=1.33;function s(u){return typeof u=="string"?a(u):Math.ceil((u.byteLength||u.size)*o)}er.byteLength=s;function a(u){let f=0,c=0;for(let h=0,d=u.length;h<d;h++)f=u.charCodeAt(h),f<128?c+=1:f<2048?c+=2:f<55296||f>=57344?c+=3:(h++,c+=4);return c}return er}var Co={exports:{}},Rs,Rf;function tb(){if(Rf)return Rs;Rf=1;var e=1e3,t=e*60,r=t*60,n=r*24,i=n*7,o=n*365.25;Rs=function(c,h){h=h||{};var d=typeof c;if(d==="string"&&c.length>0)return s(c);if(d==="number"&&isFinite(c))return h.long?u(c):a(c);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))};function s(c){if(c=String(c),!(c.length>100)){var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(h){var d=parseFloat(h[1]),l=(h[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return d*o;case"weeks":case"week":case"w":return d*i;case"days":case"day":case"d":return d*n;case"hours":case"hour":case"hrs":case"hr":case"h":return d*r;case"minutes":case"minute":case"mins":case"min":case"m":return d*t;case"seconds":case"second":case"secs":case"sec":case"s":return d*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function a(c){var h=Math.abs(c);return h>=n?Math.round(c/n)+"d":h>=r?Math.round(c/r)+"h":h>=t?Math.round(c/t)+"m":h>=e?Math.round(c/e)+"s":c+"ms"}function u(c){var h=Math.abs(c);return h>=n?f(c,h,n,"day"):h>=r?f(c,h,r,"hour"):h>=t?f(c,h,t,"minute"):h>=e?f(c,h,e,"second"):c+" ms"}function f(c,h,d,l){var p=h>=d*1.5;return Math.round(c/d)+" "+l+(p?"s":"")}return Rs}var Ns,Nf;function rb(){if(Nf)return Ns;Nf=1;function e(t){n.debug=n,n.default=n,n.coerce=f,n.disable=s,n.enable=o,n.enabled=a,n.humanize=tb(),n.destroy=c,Object.keys(t).forEach(h=>{n[h]=t[h]}),n.names=[],n.skips=[],n.formatters={};function r(h){let d=0;for(let l=0;l<h.length;l++)d=(d<<5)-d+h.charCodeAt(l),d|=0;return n.colors[Math.abs(d)%n.colors.length]}n.selectColor=r;function n(h){let d,l=null,p,m;function b(...T){if(!b.enabled)return;const _=b,E=Number(new Date),A=E-(d||E);_.diff=A,_.prev=d,_.curr=E,d=E,T[0]=n.coerce(T[0]),typeof T[0]!="string"&&T.unshift("%O");let w=0;T[0]=T[0].replace(/%([a-zA-Z%])/g,(F,B)=>{if(F==="%%")return"%";w++;const G=n.formatters[B];if(typeof G=="function"){const W=T[w];F=G.call(_,W),T.splice(w,1),w--}return F}),n.formatArgs.call(_,T),(_.log||n.log).apply(_,T)}return b.namespace=h,b.useColors=n.useColors(),b.color=n.selectColor(h),b.extend=i,b.destroy=n.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>l!==null?l:(p!==n.namespaces&&(p=n.namespaces,m=n.enabled(h)),m),set:T=>{l=T}}),typeof n.init=="function"&&n.init(b),b}function i(h,d){const l=n(this.namespace+(typeof d>"u"?":":d)+h);return l.log=this.log,l}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let d;const l=(typeof h=="string"?h:"").split(/[\s,]+/),p=l.length;for(d=0;d<p;d++)l[d]&&(h=l[d].replace(/\*/g,".*?"),h[0]==="-"?n.skips.push(new RegExp("^"+h.slice(1)+"$")):n.names.push(new RegExp("^"+h+"$")))}function s(){const h=[...n.names.map(u),...n.skips.map(u).map(d=>"-"+d)].join(",");return n.enable(""),h}function a(h){if(h[h.length-1]==="*")return!0;let d,l;for(d=0,l=n.skips.length;d<l;d++)if(n.skips[d].test(h))return!1;for(d=0,l=n.names.length;d<l;d++)if(n.names[d].test(h))return!0;return!1}function u(h){return h.toString().substring(2,h.toString().length-2).replace(/\.\*\?$/,"*")}function f(h){return h instanceof Error?h.stack||h.message:h}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}return Ns=e,Ns}var Pf;function Wt(){return Pf||(Pf=1,function(e,t){t.formatArgs=n,t.save=i,t.load=o,t.useColors=r,t.storage=s(),t.destroy=(()=>{let u=!1;return()=>{u||(u=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(u){if(u[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const f="color: "+this.color;u.splice(1,0,f,"color: inherit");let c=0,h=0;u[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(c++,d==="%c"&&(h=c))}),u.splice(h,0,f)}t.log=console.debug||console.log||(()=>{});function i(u){try{u?t.storage.setItem("debug",u):t.storage.removeItem("debug")}catch{}}function o(){let u;try{u=t.storage.getItem("debug")}catch{}return!u&&typeof process<"u"&&"env"in process&&(u=process.env.DEBUG),u}function s(){try{return localStorage}catch{}}e.exports=rb()(t);const{formatters:a}=e.exports;a.j=function(u){try{return JSON.stringify(u)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}(Co,Co.exports)),Co.exports}var Gr={},If;function Dp(){if(If)return Gr;If=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.decode=Gr.encode=void 0;function e(r){let n="";for(let i in r)r.hasOwnProperty(i)&&(n.length&&(n+="&"),n+=encodeURIComponent(i)+"="+encodeURIComponent(r[i]));return n}Gr.encode=e;function t(r){let n={},i=r.split("&");for(let o=0,s=i.length;o<s;o++){let a=i[o].split("=");n[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return n}return Gr.decode=t,Gr}var Lf;function na(){if(Lf)return Ci;Lf=1;var e=ce&&ce.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.Transport=void 0;const t=eo(),r=Dn,n=to(),i=e(Wt()),o=Dp(),s=(0,i.default)("engine.io-client:transport");class a extends Error{constructor(c,h,d){super(c),this.description=h,this.context=d,this.type="TransportError"}}class u extends r.Emitter{constructor(c){super(),this.writable=!1,(0,n.installTimerFunctions)(this,c),this.opts=c,this.query=c.query,this.socket=c.socket}onError(c,h,d){return super.emitReserved("error",new a(c,h,d)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(c){this.readyState==="open"?this.write(c):s("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(c){const h=(0,t.decodePacket)(c,this.socket.binaryType);this.onPacket(h)}onPacket(c){super.emitReserved("packet",c)}onClose(c){this.readyState="closed",super.emitReserved("close",c)}pause(c){}createUri(c,h={}){return c+"://"+this._hostname()+this._port()+this.opts.path+this._query(h)}_hostname(){const c=this.opts.hostname;return c.indexOf(":")===-1?c:"["+c+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(c){const h=(0,o.encode)(c);return h.length?"?"+h:""}}return Ci.Transport=u,Ci}var tr={},Mf;function Up(){if(Mf)return tr;Mf=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.yeast=tr.decode=tr.encode=void 0;const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),t=64,r={};let n=0,i=0,o;function s(f){let c="";do c=e[f%t]+c,f=Math.floor(f/t);while(f>0);return c}tr.encode=s;function a(f){let c=0;for(i=0;i<f.length;i++)c=c*t+r[f.charAt(i)];return c}tr.decode=a;function u(){const f=s(+new Date);return f!==o?(n=0,o=f):f+"."+s(n++)}for(tr.yeast=u;i<t;i++)r[e[i]]=i;return tr}var Wr={},Pi={},kf;function nb(){if(kf)return Pi;kf=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.hasCORS=void 0;let e=!1;try{e=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}return Pi.hasCORS=e,Pi}var Bf;function ib(){if(Bf)return Wr;Bf=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.createCookieJar=Wr.XHR=void 0;const e=nb(),t=ra();function r(i){const o=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!o||e.hasCORS))return new XMLHttpRequest}catch{}if(!o)try{return new t.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}Wr.XHR=r;function n(){}return Wr.createCookieJar=n,Wr}var Ff;function ob(){if(Ff)return jr;Ff=1;var e=ce&&ce.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(jr,"__esModule",{value:!0}),jr.Request=jr.Polling=void 0;const t=na(),r=e(Wt()),n=Up(),i=eo(),o=ib(),s=Dn,a=to(),u=ra(),f=(0,r.default)("engine.io-client:polling");function c(){}const h=function(){return new o.XHR({xdomain:!1}).responseType!=null}();class d extends t.Transport{constructor(b){if(super(b),this.polling=!1,typeof location<"u"){const _=location.protocol==="https:";let E=location.port;E||(E=_?"443":"80"),this.xd=typeof location<"u"&&b.hostname!==location.hostname||E!==b.port}const T=b&&b.forceBase64;this.supportsBinary=h&&!T,this.opts.withCredentials&&(this.cookieJar=(0,o.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(b){this.readyState="pausing";const T=()=>{f("paused"),this.readyState="paused",b()};if(this.polling||!this.writable){let _=0;this.polling&&(f("we are currently polling - waiting to pause"),_++,this.once("pollComplete",function(){f("pre-pause polling complete"),--_||T()})),this.writable||(f("we are currently writing - waiting to pause"),_++,this.once("drain",function(){f("pre-pause writing complete"),--_||T()}))}else T()}poll(){f("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(b){f("polling got data %s",b);const T=_=>{if(this.readyState==="opening"&&_.type==="open"&&this.onOpen(),_.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(_)};(0,i.decodePayload)(b,this.socket.binaryType).forEach(T),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():f('ignoring poll - transport state "%s"',this.readyState))}doClose(){const b=()=>{f("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(f("transport open - closing"),b()):(f("transport not open - deferring close"),this.once("open",b))}write(b){this.writable=!1,(0,i.encodePayload)(b,T=>{this.doWrite(T,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const b=this.opts.secure?"https":"http",T=this.query||{};return this.opts.timestampRequests!==!1&&(T[this.opts.timestampParam]=(0,n.yeast)()),!this.supportsBinary&&!T.sid&&(T.b64=1),this.createUri(b,T)}request(b={}){return Object.assign(b,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new l(this.uri(),b)}doWrite(b,T){const _=this.request({method:"POST",data:b});_.on("success",T),_.on("error",(E,A)=>{this.onError("xhr post error",E,A)})}doPoll(){f("xhr poll");const b=this.request();b.on("data",this.onData.bind(this)),b.on("error",(T,_)=>{this.onError("xhr poll error",T,_)}),this.pollXhr=b}}jr.Polling=d;class l extends s.Emitter{constructor(b,T){super(),(0,a.installTimerFunctions)(this,T),this.opts=T,this.method=T.method||"GET",this.uri=b,this.data=T.data!==void 0?T.data:null,this.create()}create(){var b;const T=(0,a.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");T.xdomain=!!this.opts.xd;const _=this.xhr=new o.XHR(T);try{f("xhr open %s: %s",this.method,this.uri),_.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){_.setDisableHeaderCheck&&_.setDisableHeaderCheck(!0);for(let E in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(E)&&_.setRequestHeader(E,this.opts.extraHeaders[E])}}catch{}if(this.method==="POST")try{_.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{_.setRequestHeader("Accept","*/*")}catch{}(b=this.opts.cookieJar)===null||b===void 0||b.addCookies(_),"withCredentials"in _&&(_.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(_.timeout=this.opts.requestTimeout),_.onreadystatechange=()=>{var E;_.readyState===3&&((E=this.opts.cookieJar)===null||E===void 0||E.parseCookies(_)),_.readyState===4&&(_.status===200||_.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof _.status=="number"?_.status:0)},0))},f("xhr data %s",this.data),_.send(this.data)}catch(E){this.setTimeoutFn(()=>{this.onError(E)},0);return}typeof document<"u"&&(this.index=l.requestsCount++,l.requests[this.index]=this)}onError(b){this.emitReserved("error",b,this.xhr),this.cleanup(!0)}cleanup(b){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=c,b)try{this.xhr.abort()}catch{}typeof document<"u"&&delete l.requests[this.index],this.xhr=null}}onLoad(){const b=this.xhr.responseText;b!==null&&(this.emitReserved("data",b),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(jr.Request=l,l.requestsCount=0,l.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",p);else if(typeof addEventListener=="function"){const m="onpagehide"in u.globalThisShim?"pagehide":"unload";addEventListener(m,p,!1)}}function p(){for(let m in l.requests)l.requests.hasOwnProperty(m)&&l.requests[m].abort()}return jr}var Ii={},Rt={},Df;function ia(){if(Df)return Rt;Df=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.defaultBinaryType=Rt.usingBrowserWebSocket=Rt.WebSocket=Rt.nextTick=void 0;const e=ra();return Rt.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,n)=>n(r,0))(),Rt.WebSocket=e.globalThisShim.WebSocket||e.globalThisShim.MozWebSocket,Rt.usingBrowserWebSocket=!0,Rt.defaultBinaryType="arraybuffer",Rt}var Uf;function ab(){if(Uf)return Ii;Uf=1;var e=ce&&ce.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.WS=void 0;const t=na(),r=Up(),n=to(),i=ia(),o=e(Wt()),s=eo(),a=(0,o.default)("engine.io-client:websocket"),u=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class f extends t.Transport{constructor(h){super(h),this.supportsBinary=!h.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const h=this.uri(),d=this.opts.protocols,l=u?{}:(0,n.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(l.headers=this.opts.extraHeaders);try{this.ws=i.usingBrowserWebSocket&&!u?d?new i.WebSocket(h,d):new i.WebSocket(h):new i.WebSocket(h,d,l)}catch(p){return this.emitReserved("error",p)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=h=>this.onClose({description:"websocket connection closed",context:h}),this.ws.onmessage=h=>this.onData(h.data),this.ws.onerror=h=>this.onError("websocket error",h)}write(h){this.writable=!1;for(let d=0;d<h.length;d++){const l=h[d],p=d===h.length-1;(0,s.encodePacket)(l,this.supportsBinary,m=>{const b={};i.usingBrowserWebSocket||(l.options&&(b.compress=l.options.compress),this.opts.perMessageDeflate&&(typeof m=="string"?Buffer.byteLength(m):m.length)<this.opts.perMessageDeflate.threshold&&(b.compress=!1));try{i.usingBrowserWebSocket?this.ws.send(m):this.ws.send(m,b)}catch{a("websocket closed before onclose event")}p&&(0,i.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const h=this.opts.secure?"wss":"ws",d=this.query||{};return this.opts.timestampRequests&&(d[this.opts.timestampParam]=(0,r.yeast)()),this.supportsBinary||(d.b64=1),this.createUri(h,d)}check(){return!!i.WebSocket}}return Ii.WS=f,Ii}var Li={},$f;function sb(){if($f)return Li;$f=1;var e=ce&&ce.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Li,"__esModule",{value:!0}),Li.WT=void 0;const t=na(),r=ia(),n=eo(),o=(0,e(Wt()).default)("engine.io-client:webtransport");class s extends t.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{o("transport closed gracefully"),this.onClose()}).catch(u=>{o("transport closed due to %s",u),this.onError("webtransport error",u)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(u=>{const f=(0,n.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),c=u.readable.pipeThrough(f).getReader(),h=(0,n.createPacketEncoderStream)();h.readable.pipeTo(u.writable),this.writer=h.writable.getWriter();const d=()=>{c.read().then(({done:p,value:m})=>{if(p){o("session is closed");return}o("received chunk: %o",m),this.onPacket(m),d()}).catch(p=>{o("an error occurred while reading: %s",p)})};d();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this.writer.write(l).then(()=>this.onOpen())})}))}write(u){this.writable=!1;for(let f=0;f<u.length;f++){const c=u[f],h=f===u.length-1;this.writer.write(c).then(()=>{h&&(0,r.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var u;(u=this.transport)===null||u===void 0||u.close()}}return Li.WT=s,Li}var jf;function $p(){if(jf)return Ai;jf=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.transports=void 0;const e=ob(),t=ab(),r=sb();return Ai.transports={websocket:t.WS,webtransport:r.WT,polling:e.Polling},Ai}var Mi={},Hf;function jp(){if(Hf)return Mi;Hf=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.parse=void 0;const e=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,t=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function r(o){const s=o,a=o.indexOf("["),u=o.indexOf("]");a!=-1&&u!=-1&&(o=o.substring(0,a)+o.substring(a,u).replace(/:/g,";")+o.substring(u,o.length));let f=e.exec(o||""),c={},h=14;for(;h--;)c[t[h]]=f[h]||"";return a!=-1&&u!=-1&&(c.source=s,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=n(c,c.path),c.queryKey=i(c,c.query),c}Mi.parse=r;function n(o,s){const a=/\/{2,9}/g,u=s.replace(a,"/").split("/");return(s.slice(0,1)=="/"||s.length===0)&&u.splice(0,1),s.slice(-1)=="/"&&u.splice(u.length-1,1),u}function i(o,s){const a={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(u,f,c){f&&(a[f]=c)}),a}return Mi}var qf;function ub(){if(qf)return Oi;qf=1;var e=ce&&ce.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.Socket=void 0;const t=$p(),r=to(),n=Dp(),i=jp(),o=e(Wt()),s=Dn,a=eo(),u=ia(),f=(0,o.default)("engine.io-client:socket");class c extends s.Emitter{constructor(d,l={}){super(),this.binaryType=u.defaultBinaryType,this.writeBuffer=[],d&&typeof d=="object"&&(l=d,d=null),d?(d=(0,i.parse)(d),l.hostname=d.host,l.secure=d.protocol==="https"||d.protocol==="wss",l.port=d.port,d.query&&(l.query=d.query)):l.host&&(l.hostname=(0,i.parse)(l.host).host),(0,r.installTimerFunctions)(this,l),this.secure=l.secure!=null?l.secure:typeof location<"u"&&location.protocol==="https:",l.hostname&&!l.port&&(l.port=this.secure?"443":"80"),this.hostname=l.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=l.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=l.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},l),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,n.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(d){f('creating transport "%s"',d);const l=Object.assign({},this.opts.query);l.EIO=a.protocol,l.transport=d,this.id&&(l.sid=this.id);const p=Object.assign({},this.opts,{query:l,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[d]);return f("options: %j",p),new t.transports[d](p)}open(){let d;if(this.opts.rememberUpgrade&&c.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)d="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else d=this.transports[0];this.readyState="opening";try{d=this.createTransport(d)}catch(l){f("error while creating transport: %s",l),this.transports.shift(),this.open();return}d.open(),this.setTransport(d)}setTransport(d){f("setting transport %s",d.name),this.transport&&(f("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=d,d.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",l=>this.onClose("transport close",l))}probe(d){f('probing transport "%s"',d);let l=this.createTransport(d),p=!1;c.priorWebsocketSuccess=!1;const m=()=>{p||(f('probe transport "%s" opened',d),l.send([{type:"ping",data:"probe"}]),l.once("packet",N=>{if(!p)if(N.type==="pong"&&N.data==="probe"){if(f('probe transport "%s" pong',d),this.upgrading=!0,this.emitReserved("upgrading",l),!l)return;c.priorWebsocketSuccess=l.name==="websocket",f('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{p||this.readyState!=="closed"&&(f("changing transport and sending upgrade packet"),w(),this.setTransport(l),l.send([{type:"upgrade"}]),this.emitReserved("upgrade",l),l=null,this.upgrading=!1,this.flush())})}else{f('probe transport "%s" failed',d);const F=new Error("probe error");F.transport=l.name,this.emitReserved("upgradeError",F)}}))};function b(){p||(p=!0,w(),l.close(),l=null)}const T=N=>{const F=new Error("probe error: "+N);F.transport=l.name,b(),f('probe transport "%s" failed because of error: %s',d,N),this.emitReserved("upgradeError",F)};function _(){T("transport closed")}function E(){T("socket closed")}function A(N){l&&N.name!==l.name&&(f('"%s" works - aborting "%s"',N.name,l.name),b())}const w=()=>{l.removeListener("open",m),l.removeListener("error",T),l.removeListener("close",_),this.off("close",E),this.off("upgrading",A)};l.once("open",m),l.once("error",T),l.once("close",_),this.once("close",E),this.once("upgrading",A),this.upgrades.indexOf("webtransport")!==-1&&d!=="webtransport"?this.setTimeoutFn(()=>{p||l.open()},200):l.open()}onOpen(){if(f("socket open"),this.readyState="open",c.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){f("starting upgrade probes");let d=0;const l=this.upgrades.length;for(;d<l;d++)this.probe(this.upgrades[d])}}onPacket(d){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(f('socket receive: type "%s", data "%s"',d.type,d.data),this.emitReserved("packet",d),this.emitReserved("heartbeat"),this.resetPingTimeout(),d.type){case"open":this.onHandshake(JSON.parse(d.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const l=new Error("server error");l.code=d.data,this.onError(l);break;case"message":this.emitReserved("data",d.data),this.emitReserved("message",d.data);break}else f('packet received with socket readyState "%s"',this.readyState)}onHandshake(d){this.emitReserved("handshake",d),this.id=d.sid,this.transport.query.sid=d.sid,this.upgrades=this.filterUpgrades(d.upgrades),this.pingInterval=d.pingInterval,this.pingTimeout=d.pingTimeout,this.maxPayload=d.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const d=this.getWritablePackets();f("flushing %d packets in socket",d.length),this.transport.send(d),this.prevBufferLen=d.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let l=1;for(let p=0;p<this.writeBuffer.length;p++){const m=this.writeBuffer[p].data;if(m&&(l+=(0,r.byteLength)(m)),p>0&&l>this.maxPayload)return f("only send %d out of %d packets",p,this.writeBuffer.length),this.writeBuffer.slice(0,p);l+=2}return f("payload size is %d (max: %d)",l,this.maxPayload),this.writeBuffer}write(d,l,p){return this.sendPacket("message",d,l,p),this}send(d,l,p){return this.sendPacket("message",d,l,p),this}sendPacket(d,l,p,m){if(typeof l=="function"&&(m=l,l=void 0),typeof p=="function"&&(m=p,p=null),this.readyState==="closing"||this.readyState==="closed")return;p=p||{},p.compress=p.compress!==!1;const b={type:d,data:l,options:p};this.emitReserved("packetCreate",b),this.writeBuffer.push(b),m&&this.once("flush",m),this.flush()}close(){const d=()=>{this.onClose("forced close"),f("socket closing - telling transport to close"),this.transport.close()},l=()=>{this.off("upgrade",l),this.off("upgradeError",l),d()},p=()=>{this.once("upgrade",l),this.once("upgradeError",l)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?p():d()}):this.upgrading?p():d()),this}onError(d){f("socket error %j",d),c.priorWebsocketSuccess=!1,this.emitReserved("error",d),this.onClose("transport error",d)}onClose(d,l){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(f('socket close with reason: "%s"',d),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",d,l),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(d){const l=[];let p=0;const m=d.length;for(;p<m;p++)~this.transports.indexOf(d[p])&&l.push(d[p]);return l}}return Oi.Socket=c,c.protocol=a.protocol,Oi}var Gf;function Hp(){return Gf||(Gf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=ub();Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var r=na();Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return r.Transport}});var n=$p();Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return n.transports}});var i=to();Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return i.installTimerFunctions}});var o=jp();Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return o.parse}});var s=ia();Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return s.nextTick}})}(As)),As}var Wf;function cb(){if(Wf)return xi;Wf=1;var e=ce&&ce.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(xi,"__esModule",{value:!0}),xi.url=void 0;const t=Hp(),n=e(Wt()).default("socket.io-client:url");function i(o,s="",a){let u=o;a=a||typeof location<"u"&&location,o==null&&(o=a.protocol+"//"+a.host),typeof o=="string"&&(o.charAt(0)==="/"&&(o.charAt(1)==="/"?o=a.protocol+o:o=a.host+o),/^(https?|wss?):\/\//.test(o)||(n("protocol-less url %s",o),typeof a<"u"?o=a.protocol+"//"+o:o="https://"+o),n("parse %s",o),u=t.parse(o)),u.port||(/^(http|ws)$/.test(u.protocol)?u.port="80":/^(http|ws)s$/.test(u.protocol)&&(u.port="443")),u.path=u.path||"/";const c=u.host.indexOf(":")!==-1?"["+u.host+"]":u.host;return u.id=u.protocol+"://"+c+":"+u.port+s,u.href=u.protocol+"://"+c+(a&&a.port===u.port?"":":"+u.port),u}return xi.url=i,xi}var ki={},Bi={},Ps={},Vr={},zr={},Vf;function qp(){if(Vf)return zr;Vf=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.hasBinary=zr.isBinary=void 0;const e=typeof ArrayBuffer=="function",t=a=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(a):a.buffer instanceof ArrayBuffer,r=Object.prototype.toString,n=typeof Blob=="function"||typeof Blob<"u"&&r.call(Blob)==="[object BlobConstructor]",i=typeof File=="function"||typeof File<"u"&&r.call(File)==="[object FileConstructor]";function o(a){return e&&(a instanceof ArrayBuffer||t(a))||n&&a instanceof Blob||i&&a instanceof File}zr.isBinary=o;function s(a,u){if(!a||typeof a!="object")return!1;if(Array.isArray(a)){for(let f=0,c=a.length;f<c;f++)if(s(a[f]))return!0;return!1}if(o(a))return!0;if(a.toJSON&&typeof a.toJSON=="function"&&arguments.length===1)return s(a.toJSON(),!0);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)&&s(a[f]))return!0;return!1}return zr.hasBinary=s,zr}var zf;function lb(){if(zf)return Vr;zf=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.reconstructPacket=Vr.deconstructPacket=void 0;const e=qp();function t(o){const s=[],a=o.data,u=o;return u.data=r(a,s),u.attachments=s.length,{packet:u,buffers:s}}Vr.deconstructPacket=t;function r(o,s){if(!o)return o;if((0,e.isBinary)(o)){const a={_placeholder:!0,num:s.length};return s.push(o),a}else if(Array.isArray(o)){const a=new Array(o.length);for(let u=0;u<o.length;u++)a[u]=r(o[u],s);return a}else if(typeof o=="object"&&!(o instanceof Date)){const a={};for(const u in o)Object.prototype.hasOwnProperty.call(o,u)&&(a[u]=r(o[u],s));return a}return o}function n(o,s){return o.data=i(o.data,s),delete o.attachments,o}Vr.reconstructPacket=n;function i(o,s){if(!o)return o;if(o&&o._placeholder===!0){if(typeof o.num=="number"&&o.num>=0&&o.num<s.length)return s[o.num];throw new Error("illegal attachments")}else if(Array.isArray(o))for(let a=0;a<o.length;a++)o[a]=i(o[a],s);else if(typeof o=="object")for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&(o[a]=i(o[a],s));return o}return Vr}var Yf;function Qu(){return Yf||(Yf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=Dn,r=lb(),n=qp(),o=(0,Wt().default)("socket.io-parser"),s=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var a;(function(d){d[d.CONNECT=0]="CONNECT",d[d.DISCONNECT=1]="DISCONNECT",d[d.EVENT=2]="EVENT",d[d.ACK=3]="ACK",d[d.CONNECT_ERROR=4]="CONNECT_ERROR",d[d.BINARY_EVENT=5]="BINARY_EVENT",d[d.BINARY_ACK=6]="BINARY_ACK"})(a=e.PacketType||(e.PacketType={}));class u{constructor(l){this.replacer=l}encode(l){return o("encoding packet %j",l),(l.type===a.EVENT||l.type===a.ACK)&&(0,n.hasBinary)(l)?this.encodeAsBinary({type:l.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,nsp:l.nsp,data:l.data,id:l.id}):[this.encodeAsString(l)]}encodeAsString(l){let p=""+l.type;return(l.type===a.BINARY_EVENT||l.type===a.BINARY_ACK)&&(p+=l.attachments+"-"),l.nsp&&l.nsp!=="/"&&(p+=l.nsp+","),l.id!=null&&(p+=l.id),l.data!=null&&(p+=JSON.stringify(l.data,this.replacer)),o("encoded %j as %s",l,p),p}encodeAsBinary(l){const p=(0,r.deconstructPacket)(l),m=this.encodeAsString(p.packet),b=p.buffers;return b.unshift(m),b}}e.Encoder=u;function f(d){return Object.prototype.toString.call(d)==="[object Object]"}class c extends t.Emitter{constructor(l){super(),this.reviver=l}add(l){let p;if(typeof l=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");p=this.decodeString(l);const m=p.type===a.BINARY_EVENT;m||p.type===a.BINARY_ACK?(p.type=m?a.EVENT:a.ACK,this.reconstructor=new h(p),p.attachments===0&&super.emitReserved("decoded",p)):super.emitReserved("decoded",p)}else if((0,n.isBinary)(l)||l.base64)if(this.reconstructor)p=this.reconstructor.takeBinaryData(l),p&&(this.reconstructor=null,super.emitReserved("decoded",p));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+l)}decodeString(l){let p=0;const m={type:Number(l.charAt(0))};if(a[m.type]===void 0)throw new Error("unknown packet type "+m.type);if(m.type===a.BINARY_EVENT||m.type===a.BINARY_ACK){const T=p+1;for(;l.charAt(++p)!=="-"&&p!=l.length;);const _=l.substring(T,p);if(_!=Number(_)||l.charAt(p)!=="-")throw new Error("Illegal attachments");m.attachments=Number(_)}if(l.charAt(p+1)==="/"){const T=p+1;for(;++p&&!(l.charAt(p)===","||p===l.length););m.nsp=l.substring(T,p)}else m.nsp="/";const b=l.charAt(p+1);if(b!==""&&Number(b)==b){const T=p+1;for(;++p;){const _=l.charAt(p);if(_==null||Number(_)!=_){--p;break}if(p===l.length)break}m.id=Number(l.substring(T,p+1))}if(l.charAt(++p)){const T=this.tryParse(l.substr(p));if(c.isPayloadValid(m.type,T))m.data=T;else throw new Error("invalid payload")}return o("decoded %s as %j",l,m),m}tryParse(l){try{return JSON.parse(l,this.reviver)}catch{return!1}}static isPayloadValid(l,p){switch(l){case a.CONNECT:return f(p);case a.DISCONNECT:return p===void 0;case a.CONNECT_ERROR:return typeof p=="string"||f(p);case a.EVENT:case a.BINARY_EVENT:return Array.isArray(p)&&(typeof p[0]=="number"||typeof p[0]=="string"&&s.indexOf(p[0])===-1);case a.ACK:case a.BINARY_ACK:return Array.isArray(p)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=c;class h{constructor(l){this.packet=l,this.buffers=[],this.reconPack=l}takeBinaryData(l){if(this.buffers.push(l),this.buffers.length===this.reconPack.attachments){const p=(0,r.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),p}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}}(Ps)),Ps}var Fi={},Kf;function Gp(){if(Kf)return Fi;Kf=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.on=void 0;function e(t,r,n){return t.on(r,n),function(){t.off(r,n)}}return Fi.on=e,Fi}var Qf;function Wp(){if(Qf)return Bi;Qf=1;var e=ce&&ce.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.Socket=void 0;const t=Qu(),r=Gp(),n=Dn,o=e(Wt()).default("socket.io-client:socket"),s=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class a extends n.Emitter{constructor(f,c,h){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=f,this.nsp=c,h&&h.auth&&(this.auth=h.auth),this._opts=Object.assign({},h),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const f=this.io;this.subs=[r.on(f,"open",this.onopen.bind(this)),r.on(f,"packet",this.onpacket.bind(this)),r.on(f,"error",this.onerror.bind(this)),r.on(f,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...f){return f.unshift("message"),this.emit.apply(this,f),this}emit(f,...c){if(s.hasOwnProperty(f))throw new Error('"'+f.toString()+'" is a reserved event name');if(c.unshift(f),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(c),this;const h={type:t.PacketType.EVENT,data:c};if(h.options={},h.options.compress=this.flags.compress!==!1,typeof c[c.length-1]=="function"){const p=this.ids++;o("emitting packet with ack id %d",p);const m=c.pop();this._registerAckCallback(p,m),h.id=p}const d=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!d||!this.connected)?o("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(h),this.packet(h)):this.sendBuffer.push(h),this.flags={},this}_registerAckCallback(f,c){var h;const d=(h=this.flags.timeout)!==null&&h!==void 0?h:this._opts.ackTimeout;if(d===void 0){this.acks[f]=c;return}const l=this.io.setTimeoutFn(()=>{delete this.acks[f];for(let p=0;p<this.sendBuffer.length;p++)this.sendBuffer[p].id===f&&(o("removing packet with ack id %d from the buffer",f),this.sendBuffer.splice(p,1));o("event with ack id %d has timed out after %d ms",f,d),c.call(this,new Error("operation has timed out"))},d);this.acks[f]=(...p)=>{this.io.clearTimeoutFn(l),c.apply(this,[null,...p])}}emitWithAck(f,...c){const h=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((d,l)=>{c.push((p,m)=>h?p?l(p):d(m):d(p)),this.emit(f,...c)})}_addToQueue(f){let c;typeof f[f.length-1]=="function"&&(c=f.pop());const h={id:this._queueSeq++,tryCount:0,pending:!1,args:f,flags:Object.assign({fromQueue:!0},this.flags)};f.push((d,...l)=>h!==this._queue[0]?void 0:(d!==null?h.tryCount>this._opts.retries&&(o("packet [%d] is discarded after %d tries",h.id,h.tryCount),this._queue.shift(),c&&c(d)):(o("packet [%d] was successfully sent",h.id),this._queue.shift(),c&&c(null,...l)),h.pending=!1,this._drainQueue())),this._queue.push(h),this._drainQueue()}_drainQueue(f=!1){if(o("draining queue"),!this.connected||this._queue.length===0)return;const c=this._queue[0];if(c.pending&&!f){o("packet [%d] has already been sent and is waiting for an ack",c.id);return}c.pending=!0,c.tryCount++,o("sending packet [%d] (try n°%d)",c.id,c.tryCount),this.flags=c.flags,this.emit.apply(this,c.args)}packet(f){f.nsp=this.nsp,this.io._packet(f)}onopen(){o("transport is open - connecting"),typeof this.auth=="function"?this.auth(f=>{this._sendConnectPacket(f)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(f){this.packet({type:t.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},f):f})}onerror(f){this.connected||this.emitReserved("connect_error",f)}onclose(f,c){o("close (%s)",f),this.connected=!1,delete this.id,this.emitReserved("disconnect",f,c)}onpacket(f){if(f.nsp===this.nsp)switch(f.type){case t.PacketType.CONNECT:f.data&&f.data.sid?this.onconnect(f.data.sid,f.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case t.PacketType.EVENT:case t.PacketType.BINARY_EVENT:this.onevent(f);break;case t.PacketType.ACK:case t.PacketType.BINARY_ACK:this.onack(f);break;case t.PacketType.DISCONNECT:this.ondisconnect();break;case t.PacketType.CONNECT_ERROR:this.destroy();const h=new Error(f.data.message);h.data=f.data.data,this.emitReserved("connect_error",h);break}}onevent(f){const c=f.data||[];o("emitting event %j",c),f.id!=null&&(o("attaching ack callback to event"),c.push(this.ack(f.id))),this.connected?this.emitEvent(c):this.receiveBuffer.push(Object.freeze(c))}emitEvent(f){if(this._anyListeners&&this._anyListeners.length){const c=this._anyListeners.slice();for(const h of c)h.apply(this,f)}super.emit.apply(this,f),this._pid&&f.length&&typeof f[f.length-1]=="string"&&(this._lastOffset=f[f.length-1])}ack(f){const c=this;let h=!1;return function(...d){h||(h=!0,o("sending ack %j",d),c.packet({type:t.PacketType.ACK,id:f,data:d}))}}onack(f){const c=this.acks[f.id];typeof c=="function"?(o("calling ack %s with %j",f.id,f.data),c.apply(this,f.data),delete this.acks[f.id]):o("bad ack %s",f.id)}onconnect(f,c){o("socket connected with id %s",f),this.id=f,this.recovered=c&&this._pid===c,this._pid=c,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(f=>this.emitEvent(f)),this.receiveBuffer=[],this.sendBuffer.forEach(f=>{this.notifyOutgoingListeners(f),this.packet(f)}),this.sendBuffer=[]}ondisconnect(){o("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(f=>f()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(o("performing disconnect (%s)",this.nsp),this.packet({type:t.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(f){return this.flags.compress=f,this}get volatile(){return this.flags.volatile=!0,this}timeout(f){return this.flags.timeout=f,this}onAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(f),this}prependAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(f),this}offAny(f){if(!this._anyListeners)return this;if(f){const c=this._anyListeners;for(let h=0;h<c.length;h++)if(f===c[h])return c.splice(h,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(f),this}prependAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(f),this}offAnyOutgoing(f){if(!this._anyOutgoingListeners)return this;if(f){const c=this._anyOutgoingListeners;for(let h=0;h<c.length;h++)if(f===c[h])return c.splice(h,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(f){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const c=this._anyOutgoingListeners.slice();for(const h of c)h.apply(this,f.data)}}}return Bi.Socket=a,Bi}var Di={},Xf;function fb(){if(Xf)return Di;Xf=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.Backoff=void 0;function e(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}return Di.Backoff=e,e.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),n=Math.floor(r*this.jitter*t);t=Math.floor(r*10)&1?t+n:t-n}return Math.min(t,this.max)|0},e.prototype.reset=function(){this.attempts=0},e.prototype.setMin=function(t){this.ms=t},e.prototype.setMax=function(t){this.max=t},e.prototype.setJitter=function(t){this.jitter=t},Di}var Jf;function db(){if(Jf)return ki;Jf=1;var e=ce&&ce.__createBinding||(Object.create?function(l,p,m,b){b===void 0&&(b=m),Object.defineProperty(l,b,{enumerable:!0,get:function(){return p[m]}})}:function(l,p,m,b){b===void 0&&(b=m),l[b]=p[m]}),t=ce&&ce.__setModuleDefault||(Object.create?function(l,p){Object.defineProperty(l,"default",{enumerable:!0,value:p})}:function(l,p){l.default=p}),r=ce&&ce.__importStar||function(l){if(l&&l.__esModule)return l;var p={};if(l!=null)for(var m in l)m!=="default"&&Object.prototype.hasOwnProperty.call(l,m)&&e(p,l,m);return t(p,l),p},n=ce&&ce.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(ki,"__esModule",{value:!0}),ki.Manager=void 0;const i=Hp(),o=Wp(),s=r(Qu()),a=Gp(),u=fb(),f=Dn,h=n(Wt()).default("socket.io-client:manager");class d extends f.Emitter{constructor(p,m){var b;super(),this.nsps={},this.subs=[],p&&typeof p=="object"&&(m=p,p=void 0),m=m||{},m.path=m.path||"/socket.io",this.opts=m,i.installTimerFunctions(this,m),this.reconnection(m.reconnection!==!1),this.reconnectionAttempts(m.reconnectionAttempts||1/0),this.reconnectionDelay(m.reconnectionDelay||1e3),this.reconnectionDelayMax(m.reconnectionDelayMax||5e3),this.randomizationFactor((b=m.randomizationFactor)!==null&&b!==void 0?b:.5),this.backoff=new u.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(m.timeout==null?2e4:m.timeout),this._readyState="closed",this.uri=p;const T=m.parser||s;this.encoder=new T.Encoder,this.decoder=new T.Decoder,this._autoConnect=m.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(p){return arguments.length?(this._reconnection=!!p,this):this._reconnection}reconnectionAttempts(p){return p===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=p,this)}reconnectionDelay(p){var m;return p===void 0?this._reconnectionDelay:(this._reconnectionDelay=p,(m=this.backoff)===null||m===void 0||m.setMin(p),this)}randomizationFactor(p){var m;return p===void 0?this._randomizationFactor:(this._randomizationFactor=p,(m=this.backoff)===null||m===void 0||m.setJitter(p),this)}reconnectionDelayMax(p){var m;return p===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=p,(m=this.backoff)===null||m===void 0||m.setMax(p),this)}timeout(p){return arguments.length?(this._timeout=p,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(p){if(h("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;h("opening %s",this.uri),this.engine=new i.Socket(this.uri,this.opts);const m=this.engine,b=this;this._readyState="opening",this.skipReconnect=!1;const T=a.on(m,"open",function(){b.onopen(),p&&p()}),_=A=>{h("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",A),p?p(A):this.maybeReconnectOnOpen()},E=a.on(m,"error",_);if(this._timeout!==!1){const A=this._timeout;h("connect attempt will timeout after %d",A);const w=this.setTimeoutFn(()=>{h("connect attempt timed out after %d",A),T(),_(new Error("timeout")),m.close()},A);this.opts.autoUnref&&w.unref(),this.subs.push(()=>{this.clearTimeoutFn(w)})}return this.subs.push(T),this.subs.push(E),this}connect(p){return this.open(p)}onopen(){h("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const p=this.engine;this.subs.push(a.on(p,"ping",this.onping.bind(this)),a.on(p,"data",this.ondata.bind(this)),a.on(p,"error",this.onerror.bind(this)),a.on(p,"close",this.onclose.bind(this)),a.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(p){try{this.decoder.add(p)}catch(m){this.onclose("parse error",m)}}ondecoded(p){i.nextTick(()=>{this.emitReserved("packet",p)},this.setTimeoutFn)}onerror(p){h("error",p),this.emitReserved("error",p)}socket(p,m){let b=this.nsps[p];return b?this._autoConnect&&!b.active&&b.connect():(b=new o.Socket(this,p,m),this.nsps[p]=b),b}_destroy(p){const m=Object.keys(this.nsps);for(const b of m)if(this.nsps[b].active){h("socket %s is still active, skipping close",b);return}this._close()}_packet(p){h("writing packet %j",p);const m=this.encoder.encode(p);for(let b=0;b<m.length;b++)this.engine.write(m[b],p.options)}cleanup(){h("cleanup"),this.subs.forEach(p=>p()),this.subs.length=0,this.decoder.destroy()}_close(){h("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(p,m){h("closed due to %s",p),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",p,m),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const p=this;if(this.backoff.attempts>=this._reconnectionAttempts)h("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const m=this.backoff.duration();h("will wait %dms before reconnect attempt",m),this._reconnecting=!0;const b=this.setTimeoutFn(()=>{p.skipReconnect||(h("attempting reconnect"),this.emitReserved("reconnect_attempt",p.backoff.attempts),!p.skipReconnect&&p.open(T=>{T?(h("reconnect attempt error"),p._reconnecting=!1,p.reconnect(),this.emitReserved("reconnect_error",T)):(h("reconnect success"),p.onreconnect())}))},m);this.opts.autoUnref&&b.unref(),this.subs.push(()=>{this.clearTimeoutFn(b)})}}onreconnect(){const p=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",p)}}return ki.Manager=d,ki}var Zf;function hb(){return Zf||(Zf=1,function(e,t){var r=ce&&ce.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const n=cb(),i=db();Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return i.Manager}});const o=Wp();Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return o.Socket}});const a=r(Wt()).default("socket.io-client"),u={};function f(h,d){typeof h=="object"&&(d=h,h=void 0),d=d||{};const l=n.url(h,d.path||"/socket.io"),p=l.source,m=l.id,b=l.path,T=u[m]&&b in u[m].nsps,_=d.forceNew||d["force new connection"]||d.multiplex===!1||T;let E;return _?(a("ignoring socket cache for %s",p),E=new i.Manager(p,d)):(u[m]||(a("new io instance for %s",p),u[m]=new i.Manager(p,d)),E=u[m]),l.query&&!d.query&&(d.query=l.queryKey),E.socket(l.path,d)}t.io=f,t.connect=f,t.default=f,Object.assign(f,{Manager:i.Manager,Socket:o.Socket,io:f,connect:f});var c=Qu();Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return c.protocol}}),e.exports=f}(Ao,Ao.exports)),Ao.exports}var Is={},Ui={},ed;function pb(){if(ed)return Ui;ed=1,Ui.byteLength=a,Ui.toByteArray=f,Ui.fromByteArray=d;for(var e=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,o=n.length;i<o;++i)e[i]=n[i],t[n.charCodeAt(i)]=i;t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;function s(l){var p=l.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var m=l.indexOf("=");m===-1&&(m=p);var b=m===p?0:4-m%4;return[m,b]}function a(l){var p=s(l),m=p[0],b=p[1];return(m+b)*3/4-b}function u(l,p,m){return(p+m)*3/4-m}function f(l){var p,m=s(l),b=m[0],T=m[1],_=new r(u(l,b,T)),E=0,A=T>0?b-4:b,w;for(w=0;w<A;w+=4)p=t[l.charCodeAt(w)]<<18|t[l.charCodeAt(w+1)]<<12|t[l.charCodeAt(w+2)]<<6|t[l.charCodeAt(w+3)],_[E++]=p>>16&255,_[E++]=p>>8&255,_[E++]=p&255;return T===2&&(p=t[l.charCodeAt(w)]<<2|t[l.charCodeAt(w+1)]>>4,_[E++]=p&255),T===1&&(p=t[l.charCodeAt(w)]<<10|t[l.charCodeAt(w+1)]<<4|t[l.charCodeAt(w+2)]>>2,_[E++]=p>>8&255,_[E++]=p&255),_}function c(l){return e[l>>18&63]+e[l>>12&63]+e[l>>6&63]+e[l&63]}function h(l,p,m){for(var b,T=[],_=p;_<m;_+=3)b=(l[_]<<16&16711680)+(l[_+1]<<8&65280)+(l[_+2]&255),T.push(c(b));return T.join("")}function d(l){for(var p,m=l.length,b=m%3,T=[],_=16383,E=0,A=m-b;E<A;E+=_)T.push(h(l,E,E+_>A?A:E+_));return b===1?(p=l[m-1],T.push(e[p>>2]+e[p<<4&63]+"==")):b===2&&(p=(l[m-2]<<8)+l[m-1],T.push(e[p>>10]+e[p>>4&63]+e[p<<2&63]+"=")),T.join("")}return Ui}var Ro={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var td;function mb(){return td||(td=1,Ro.read=function(e,t,r,n,i){var o,s,a=i*8-n-1,u=(1<<a)-1,f=u>>1,c=-7,h=r?i-1:0,d=r?-1:1,l=e[t+h];for(h+=d,o=l&(1<<-c)-1,l>>=-c,c+=a;c>0;o=o*256+e[t+h],h+=d,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=s*256+e[t+h],h+=d,c-=8);if(o===0)o=1-f;else{if(o===u)return s?NaN:(l?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-f}return(l?-1:1)*s*Math.pow(2,o-n)},Ro.write=function(e,t,r,n,i,o){var s,a,u,f=o*8-i-1,c=(1<<f)-1,h=c>>1,d=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,p=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+h>=1?t+=d/u:t+=d*Math.pow(2,1-h),t*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*u-1)*Math.pow(2,i),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[r+l]=a&255,l+=p,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;e[r+l]=s&255,l+=p,s/=256,f-=8);e[r+l-p]|=m*128}),Ro}/*!
57
57
  * The buffer module from node.js, for the browser.
58
58
  *
59
59
  * @author Feross Aboukhadijeh <https://feross.org>
60
60
  * @license MIT
61
- */var rd;function gb(){return rd||(rd=1,function(e){const t=pb(),r=mb(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=o(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const S=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(S,g),S.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(S){if(S>i)throw new RangeError('The value "'+S+'" is invalid for option "size"');const g=new Uint8Array(S);return Object.setPrototypeOf(g,a.prototype),g}function a(S,g,v){if(typeof S=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(S)}return u(S,g,v)}a.poolSize=8192;function u(S,g,v){if(typeof S=="string")return d(S,g);if(ArrayBuffer.isView(S))return p(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if(He(S,ArrayBuffer)||S&&He(S.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(He(S,SharedArrayBuffer)||S&&He(S.buffer,SharedArrayBuffer)))return m(S,g,v);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const C=S.valueOf&&S.valueOf();if(C!=null&&C!==S)return a.from(C,g,v);const P=b(S);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return a.from(S[Symbol.toPrimitive]("string"),g,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S)}a.from=function(S,g,v){return u(S,g,v)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function f(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function c(S,g,v){return f(S),S<=0?s(S):g!==void 0?typeof v=="string"?s(S).fill(g,v):s(S).fill(g):s(S)}a.alloc=function(S,g,v){return c(S,g,v)};function h(S){return f(S),s(S<0?0:T(S)|0)}a.allocUnsafe=function(S){return h(S)},a.allocUnsafeSlow=function(S){return h(S)};function d(S,g){if((typeof g!="string"||g==="")&&(g="utf8"),!a.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const v=E(S,g)|0;let C=s(v);const P=C.write(S,g);return P!==v&&(C=C.slice(0,P)),C}function l(S){const g=S.length<0?0:T(S.length)|0,v=s(g);for(let C=0;C<g;C+=1)v[C]=S[C]&255;return v}function p(S){if(He(S,Uint8Array)){const g=new Uint8Array(S);return m(g.buffer,g.byteOffset,g.byteLength)}return l(S)}function m(S,g,v){if(g<0||S.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(S.byteLength<g+(v||0))throw new RangeError('"length" is outside of buffer bounds');let C;return g===void 0&&v===void 0?C=new Uint8Array(S):v===void 0?C=new Uint8Array(S,g):C=new Uint8Array(S,g,v),Object.setPrototypeOf(C,a.prototype),C}function b(S){if(a.isBuffer(S)){const g=T(S.length)|0,v=s(g);return v.length===0||S.copy(v,0,0,g),v}if(S.length!==void 0)return typeof S.length!="number"||Tt(S.length)?s(0):l(S);if(S.type==="Buffer"&&Array.isArray(S.data))return l(S.data)}function T(S){if(S>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return S|0}function _(S){return+S!=S&&(S=0),a.alloc(+S)}a.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==a.prototype},a.compare=function(g,v){if(He(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),He(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),!a.isBuffer(g)||!a.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===v)return 0;let C=g.length,P=v.length;for(let D=0,q=Math.min(C,P);D<q;++D)if(g[D]!==v[D]){C=g[D],P=v[D];break}return C<P?-1:P<C?1:0},a.isEncoding=function(g){switch(String(g).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}},a.concat=function(g,v){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return a.alloc(0);let C;if(v===void 0)for(v=0,C=0;C<g.length;++C)v+=g[C].length;const P=a.allocUnsafe(v);let D=0;for(C=0;C<g.length;++C){let q=g[C];if(He(q,Uint8Array))D+q.length>P.length?(a.isBuffer(q)||(q=a.from(q)),q.copy(P,D)):Uint8Array.prototype.set.call(P,q,D);else if(a.isBuffer(q))q.copy(P,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=q.length}return P};function E(S,g){if(a.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||He(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);const v=S.length,C=arguments.length>2&&arguments[2]===!0;if(!C&&v===0)return 0;let P=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return Nt(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return St(S).length;default:if(P)return C?-1:Nt(S).length;g=(""+g).toLowerCase(),P=!0}}a.byteLength=E;function A(S,g,v){let C=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,g>>>=0,v<=g))return"";for(S||(S="utf8");;)switch(S){case"hex":return de(this,g,v);case"utf8":case"utf-8":return te(this,g,v);case"ascii":return V(this,g,v);case"latin1":case"binary":return J(this,g,v);case"base64":return Y(this,g,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,g,v);default:if(C)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),C=!0}}a.prototype._isBuffer=!0;function w(S,g,v){const C=S[g];S[g]=S[v],S[v]=C}a.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let v=0;v<g;v+=2)w(this,v,v+1);return this},a.prototype.swap32=function(){const g=this.length;if(g%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let v=0;v<g;v+=4)w(this,v,v+3),w(this,v+1,v+2);return this},a.prototype.swap64=function(){const g=this.length;if(g%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let v=0;v<g;v+=8)w(this,v,v+7),w(this,v+1,v+6),w(this,v+2,v+5),w(this,v+3,v+4);return this},a.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?te(this,0,g):A.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(g){if(!a.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:a.compare(this,g)===0},a.prototype.inspect=function(){let g="";const v=e.INSPECT_MAX_BYTES;return g=this.toString("hex",0,v).replace(/(.{2})/g,"$1 ").trim(),this.length>v&&(g+=" ... "),"<Buffer "+g+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(g,v,C,P,D){if(He(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),!a.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(v===void 0&&(v=0),C===void 0&&(C=g?g.length:0),P===void 0&&(P=0),D===void 0&&(D=this.length),v<0||C>g.length||P<0||D>this.length)throw new RangeError("out of range index");if(P>=D&&v>=C)return 0;if(P>=D)return-1;if(v>=C)return 1;if(v>>>=0,C>>>=0,P>>>=0,D>>>=0,this===g)return 0;let q=D-P,le=C-v;const we=Math.min(q,le),Se=this.slice(P,D),Te=g.slice(v,C);for(let he=0;he<we;++he)if(Se[he]!==Te[he]){q=Se[he],le=Te[he];break}return q<le?-1:le<q?1:0};function N(S,g,v,C,P){if(S.length===0)return-1;if(typeof v=="string"?(C=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,Tt(v)&&(v=P?0:S.length-1),v<0&&(v=S.length+v),v>=S.length){if(P)return-1;v=S.length-1}else if(v<0)if(P)v=0;else return-1;if(typeof g=="string"&&(g=a.from(g,C)),a.isBuffer(g))return g.length===0?-1:F(S,g,v,C,P);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(S,g,v):Uint8Array.prototype.lastIndexOf.call(S,g,v):F(S,[g],v,C,P);throw new TypeError("val must be string, number or Buffer")}function F(S,g,v,C,P){let D=1,q=S.length,le=g.length;if(C!==void 0&&(C=String(C).toLowerCase(),C==="ucs2"||C==="ucs-2"||C==="utf16le"||C==="utf-16le")){if(S.length<2||g.length<2)return-1;D=2,q/=2,le/=2,v/=2}function we(Te,he){return D===1?Te[he]:Te.readUInt16BE(he*D)}let Se;if(P){let Te=-1;for(Se=v;Se<q;Se++)if(we(S,Se)===we(g,Te===-1?0:Se-Te)){if(Te===-1&&(Te=Se),Se-Te+1===le)return Te*D}else Te!==-1&&(Se-=Se-Te),Te=-1}else for(v+le>q&&(v=q-le),Se=v;Se>=0;Se--){let Te=!0;for(let he=0;he<le;he++)if(we(S,Se+he)!==we(g,he)){Te=!1;break}if(Te)return Se}return-1}a.prototype.includes=function(g,v,C){return this.indexOf(g,v,C)!==-1},a.prototype.indexOf=function(g,v,C){return N(this,g,v,C,!0)},a.prototype.lastIndexOf=function(g,v,C){return N(this,g,v,C,!1)};function B(S,g,v,C){v=Number(v)||0;const P=S.length-v;C?(C=Number(C),C>P&&(C=P)):C=P;const D=g.length;C>D/2&&(C=D/2);let q;for(q=0;q<C;++q){const le=parseInt(g.substr(q*2,2),16);if(Tt(le))return q;S[v+q]=le}return q}function G(S,g,v,C){return yt(Nt(g,S.length-v),S,v,C)}function W(S,g,v,C){return yt(gt(g),S,v,C)}function z(S,g,v,C){return yt(St(g),S,v,C)}function $(S,g,v,C){return yt(Tr(g,S.length-v),S,v,C)}a.prototype.write=function(g,v,C,P){if(v===void 0)P="utf8",C=this.length,v=0;else if(C===void 0&&typeof v=="string")P=v,C=this.length,v=0;else if(isFinite(v))v=v>>>0,isFinite(C)?(C=C>>>0,P===void 0&&(P="utf8")):(P=C,C=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const D=this.length-v;if((C===void 0||C>D)&&(C=D),g.length>0&&(C<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");let q=!1;for(;;)switch(P){case"hex":return B(this,g,v,C);case"utf8":case"utf-8":return G(this,g,v,C);case"ascii":case"latin1":case"binary":return W(this,g,v,C);case"base64":return z(this,g,v,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,g,v,C);default:if(q)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),q=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Y(S,g,v){return g===0&&v===S.length?t.fromByteArray(S):t.fromByteArray(S.slice(g,v))}function te(S,g,v){v=Math.min(S.length,v);const C=[];let P=g;for(;P<v;){const D=S[P];let q=null,le=D>239?4:D>223?3:D>191?2:1;if(P+le<=v){let we,Se,Te,he;switch(le){case 1:D<128&&(q=D);break;case 2:we=S[P+1],(we&192)===128&&(he=(D&31)<<6|we&63,he>127&&(q=he));break;case 3:we=S[P+1],Se=S[P+2],(we&192)===128&&(Se&192)===128&&(he=(D&15)<<12|(we&63)<<6|Se&63,he>2047&&(he<55296||he>57343)&&(q=he));break;case 4:we=S[P+1],Se=S[P+2],Te=S[P+3],(we&192)===128&&(Se&192)===128&&(Te&192)===128&&(he=(D&15)<<18|(we&63)<<12|(Se&63)<<6|Te&63,he>65535&&he<1114112&&(q=he))}}q===null?(q=65533,le=1):q>65535&&(q-=65536,C.push(q>>>10&1023|55296),q=56320|q&1023),C.push(q),P+=le}return k(C)}const K=4096;function k(S){const g=S.length;if(g<=K)return String.fromCharCode.apply(String,S);let v="",C=0;for(;C<g;)v+=String.fromCharCode.apply(String,S.slice(C,C+=K));return v}function V(S,g,v){let C="";v=Math.min(S.length,v);for(let P=g;P<v;++P)C+=String.fromCharCode(S[P]&127);return C}function J(S,g,v){let C="";v=Math.min(S.length,v);for(let P=g;P<v;++P)C+=String.fromCharCode(S[P]);return C}function de(S,g,v){const C=S.length;(!g||g<0)&&(g=0),(!v||v<0||v>C)&&(v=C);let P="";for(let D=g;D<v;++D)P+=it[S[D]];return P}function X(S,g,v){const C=S.slice(g,v);let P="";for(let D=0;D<C.length-1;D+=2)P+=String.fromCharCode(C[D]+C[D+1]*256);return P}a.prototype.slice=function(g,v){const C=this.length;g=~~g,v=v===void 0?C:~~v,g<0?(g+=C,g<0&&(g=0)):g>C&&(g=C),v<0?(v+=C,v<0&&(v=0)):v>C&&(v=C),v<g&&(v=g);const P=this.subarray(g,v);return Object.setPrototypeOf(P,a.prototype),P};function Z(S,g,v){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+g>v)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(g,v,C){g=g>>>0,v=v>>>0,C||Z(g,v,this.length);let P=this[g],D=1,q=0;for(;++q<v&&(D*=256);)P+=this[g+q]*D;return P},a.prototype.readUintBE=a.prototype.readUIntBE=function(g,v,C){g=g>>>0,v=v>>>0,C||Z(g,v,this.length);let P=this[g+--v],D=1;for(;v>0&&(D*=256);)P+=this[g+--v]*D;return P},a.prototype.readUint8=a.prototype.readUInt8=function(g,v){return g=g>>>0,v||Z(g,1,this.length),this[g]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(g,v){return g=g>>>0,v||Z(g,2,this.length),this[g]|this[g+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(g,v){return g=g>>>0,v||Z(g,2,this.length),this[g]<<8|this[g+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},a.prototype.readBigUInt64LE=Ke(function(g){g=g>>>0,Ye(g,"offset");const v=this[g],C=this[g+7];(v===void 0||C===void 0)&&je(g,this.length-8);const P=v+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,D=this[++g]+this[++g]*2**8+this[++g]*2**16+C*2**24;return BigInt(P)+(BigInt(D)<<BigInt(32))}),a.prototype.readBigUInt64BE=Ke(function(g){g=g>>>0,Ye(g,"offset");const v=this[g],C=this[g+7];(v===void 0||C===void 0)&&je(g,this.length-8);const P=v*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],D=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+C;return(BigInt(P)<<BigInt(32))+BigInt(D)}),a.prototype.readIntLE=function(g,v,C){g=g>>>0,v=v>>>0,C||Z(g,v,this.length);let P=this[g],D=1,q=0;for(;++q<v&&(D*=256);)P+=this[g+q]*D;return D*=128,P>=D&&(P-=Math.pow(2,8*v)),P},a.prototype.readIntBE=function(g,v,C){g=g>>>0,v=v>>>0,C||Z(g,v,this.length);let P=v,D=1,q=this[g+--P];for(;P>0&&(D*=256);)q+=this[g+--P]*D;return D*=128,q>=D&&(q-=Math.pow(2,8*v)),q},a.prototype.readInt8=function(g,v){return g=g>>>0,v||Z(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},a.prototype.readInt16LE=function(g,v){g=g>>>0,v||Z(g,2,this.length);const C=this[g]|this[g+1]<<8;return C&32768?C|4294901760:C},a.prototype.readInt16BE=function(g,v){g=g>>>0,v||Z(g,2,this.length);const C=this[g+1]|this[g]<<8;return C&32768?C|4294901760:C},a.prototype.readInt32LE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},a.prototype.readInt32BE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},a.prototype.readBigInt64LE=Ke(function(g){g=g>>>0,Ye(g,"offset");const v=this[g],C=this[g+7];(v===void 0||C===void 0)&&je(g,this.length-8);const P=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(C<<24);return(BigInt(P)<<BigInt(32))+BigInt(v+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),a.prototype.readBigInt64BE=Ke(function(g){g=g>>>0,Ye(g,"offset");const v=this[g],C=this[g+7];(v===void 0||C===void 0)&&je(g,this.length-8);const P=(v<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(P)<<BigInt(32))+BigInt(this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+C)}),a.prototype.readFloatLE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),r.read(this,g,!0,23,4)},a.prototype.readFloatBE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),r.read(this,g,!1,23,4)},a.prototype.readDoubleLE=function(g,v){return g=g>>>0,v||Z(g,8,this.length),r.read(this,g,!0,52,8)},a.prototype.readDoubleBE=function(g,v){return g=g>>>0,v||Z(g,8,this.length),r.read(this,g,!1,52,8)};function re(S,g,v,C,P,D){if(!a.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>P||g<D)throw new RangeError('"value" argument is out of bounds');if(v+C>S.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(g,v,C,P){if(g=+g,v=v>>>0,C=C>>>0,!P){const le=Math.pow(2,8*C)-1;re(this,g,v,C,le,0)}let D=1,q=0;for(this[v]=g&255;++q<C&&(D*=256);)this[v+q]=g/D&255;return v+C},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(g,v,C,P){if(g=+g,v=v>>>0,C=C>>>0,!P){const le=Math.pow(2,8*C)-1;re(this,g,v,C,le,0)}let D=C-1,q=1;for(this[v+D]=g&255;--D>=0&&(q*=256);)this[v+D]=g/q&255;return v+C},a.prototype.writeUint8=a.prototype.writeUInt8=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,1,255,0),this[v]=g&255,v+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,2,65535,0),this[v]=g&255,this[v+1]=g>>>8,v+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,2,65535,0),this[v]=g>>>8,this[v+1]=g&255,v+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,4,4294967295,0),this[v+3]=g>>>24,this[v+2]=g>>>16,this[v+1]=g>>>8,this[v]=g&255,v+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,4,4294967295,0),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4};function ue(S,g,v,C,P){ne(g,C,P,S,v,7);let D=Number(g&BigInt(4294967295));S[v++]=D,D=D>>8,S[v++]=D,D=D>>8,S[v++]=D,D=D>>8,S[v++]=D;let q=Number(g>>BigInt(32)&BigInt(4294967295));return S[v++]=q,q=q>>8,S[v++]=q,q=q>>8,S[v++]=q,q=q>>8,S[v++]=q,v}function Fe(S,g,v,C,P){ne(g,C,P,S,v,7);let D=Number(g&BigInt(4294967295));S[v+7]=D,D=D>>8,S[v+6]=D,D=D>>8,S[v+5]=D,D=D>>8,S[v+4]=D;let q=Number(g>>BigInt(32)&BigInt(4294967295));return S[v+3]=q,q=q>>8,S[v+2]=q,q=q>>8,S[v+1]=q,q=q>>8,S[v]=q,v+8}a.prototype.writeBigUInt64LE=Ke(function(g,v=0){return ue(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Ke(function(g,v=0){return Fe(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(g,v,C,P){if(g=+g,v=v>>>0,!P){const we=Math.pow(2,8*C-1);re(this,g,v,C,we-1,-we)}let D=0,q=1,le=0;for(this[v]=g&255;++D<C&&(q*=256);)g<0&&le===0&&this[v+D-1]!==0&&(le=1),this[v+D]=(g/q>>0)-le&255;return v+C},a.prototype.writeIntBE=function(g,v,C,P){if(g=+g,v=v>>>0,!P){const we=Math.pow(2,8*C-1);re(this,g,v,C,we-1,-we)}let D=C-1,q=1,le=0;for(this[v+D]=g&255;--D>=0&&(q*=256);)g<0&&le===0&&this[v+D+1]!==0&&(le=1),this[v+D]=(g/q>>0)-le&255;return v+C},a.prototype.writeInt8=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,1,127,-128),g<0&&(g=255+g+1),this[v]=g&255,v+1},a.prototype.writeInt16LE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,2,32767,-32768),this[v]=g&255,this[v+1]=g>>>8,v+2},a.prototype.writeInt16BE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,2,32767,-32768),this[v]=g>>>8,this[v+1]=g&255,v+2},a.prototype.writeInt32LE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,4,2147483647,-2147483648),this[v]=g&255,this[v+1]=g>>>8,this[v+2]=g>>>16,this[v+3]=g>>>24,v+4},a.prototype.writeInt32BE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4},a.prototype.writeBigInt64LE=Ke(function(g,v=0){return ue(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Ke(function(g,v=0){return Fe(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Q(S,g,v,C,P,D){if(v+C>S.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function oe(S,g,v,C,P){return g=+g,v=v>>>0,P||Q(S,g,v,4),r.write(S,g,v,C,23,4),v+4}a.prototype.writeFloatLE=function(g,v,C){return oe(this,g,v,!0,C)},a.prototype.writeFloatBE=function(g,v,C){return oe(this,g,v,!1,C)};function Pe(S,g,v,C,P){return g=+g,v=v>>>0,P||Q(S,g,v,8),r.write(S,g,v,C,52,8),v+8}a.prototype.writeDoubleLE=function(g,v,C){return Pe(this,g,v,!0,C)},a.prototype.writeDoubleBE=function(g,v,C){return Pe(this,g,v,!1,C)},a.prototype.copy=function(g,v,C,P){if(!a.isBuffer(g))throw new TypeError("argument should be a Buffer");if(C||(C=0),!P&&P!==0&&(P=this.length),v>=g.length&&(v=g.length),v||(v=0),P>0&&P<C&&(P=C),P===C||g.length===0||this.length===0)return 0;if(v<0)throw new RangeError("targetStart out of bounds");if(C<0||C>=this.length)throw new RangeError("Index out of range");if(P<0)throw new RangeError("sourceEnd out of bounds");P>this.length&&(P=this.length),g.length-v<P-C&&(P=g.length-v+C);const D=P-C;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(v,C,P):Uint8Array.prototype.set.call(g,this.subarray(C,P),v),D},a.prototype.fill=function(g,v,C,P){if(typeof g=="string"){if(typeof v=="string"?(P=v,v=0,C=this.length):typeof C=="string"&&(P=C,C=this.length),P!==void 0&&typeof P!="string")throw new TypeError("encoding must be a string");if(typeof P=="string"&&!a.isEncoding(P))throw new TypeError("Unknown encoding: "+P);if(g.length===1){const q=g.charCodeAt(0);(P==="utf8"&&q<128||P==="latin1")&&(g=q)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(v<0||this.length<v||this.length<C)throw new RangeError("Out of range index");if(C<=v)return this;v=v>>>0,C=C===void 0?this.length:C>>>0,g||(g=0);let D;if(typeof g=="number")for(D=v;D<C;++D)this[D]=g;else{const q=a.isBuffer(g)?g:a.from(g,P),le=q.length;if(le===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(D=0;D<C-v;++D)this[D+v]=q[D%le]}return this};const Ae={};function ut(S,g,v){Ae[S]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:g.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${S}]`,this.stack,delete this.name}get code(){return S}set code(P){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:P,writable:!0})}toString(){return`${this.name} [${S}]: ${this.message}`}}}ut("ERR_BUFFER_OUT_OF_BOUNDS",function(S){return S?`${S} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ut("ERR_INVALID_ARG_TYPE",function(S,g){return`The "${S}" argument must be of type number. Received type ${typeof g}`},TypeError),ut("ERR_OUT_OF_RANGE",function(S,g,v){let C=`The value of "${S}" is out of range.`,P=v;return Number.isInteger(v)&&Math.abs(v)>2**32?P=ft(String(v)):typeof v=="bigint"&&(P=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(P=ft(P)),P+="n"),C+=` It must be ${g}. Received ${P}`,C},RangeError);function ft(S){let g="",v=S.length;const C=S[0]==="-"?1:0;for(;v>=C+4;v-=3)g=`_${S.slice(v-3,v)}${g}`;return`${S.slice(0,v)}${g}`}function bt(S,g,v){Ye(g,"offset"),(S[g]===void 0||S[g+v]===void 0)&&je(g,S.length-(v+1))}function ne(S,g,v,C,P,D){if(S>v||S<g){const q=typeof g=="bigint"?"n":"";let le;throw D>3?g===0||g===BigInt(0)?le=`>= 0${q} and < 2${q} ** ${(D+1)*8}${q}`:le=`>= -(2${q} ** ${(D+1)*8-1}${q}) and < 2 ** ${(D+1)*8-1}${q}`:le=`>= ${g}${q} and <= ${v}${q}`,new Ae.ERR_OUT_OF_RANGE("value",le,S)}bt(C,P,D)}function Ye(S,g){if(typeof S!="number")throw new Ae.ERR_INVALID_ARG_TYPE(g,"number",S)}function je(S,g,v){throw Math.floor(S)!==S?(Ye(S,v),new Ae.ERR_OUT_OF_RANGE(v||"offset","an integer",S)):g<0?new Ae.ERR_BUFFER_OUT_OF_BOUNDS:new Ae.ERR_OUT_OF_RANGE(v||"offset",`>= ${v?1:0} and <= ${g}`,S)}const wt=/[^+/0-9A-Za-z-_]/g;function Vt(S){if(S=S.split("=")[0],S=S.trim().replace(wt,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function Nt(S,g){g=g||1/0;let v;const C=S.length;let P=null;const D=[];for(let q=0;q<C;++q){if(v=S.charCodeAt(q),v>55295&&v<57344){if(!P){if(v>56319){(g-=3)>-1&&D.push(239,191,189);continue}else if(q+1===C){(g-=3)>-1&&D.push(239,191,189);continue}P=v;continue}if(v<56320){(g-=3)>-1&&D.push(239,191,189),P=v;continue}v=(P-55296<<10|v-56320)+65536}else P&&(g-=3)>-1&&D.push(239,191,189);if(P=null,v<128){if((g-=1)<0)break;D.push(v)}else if(v<2048){if((g-=2)<0)break;D.push(v>>6|192,v&63|128)}else if(v<65536){if((g-=3)<0)break;D.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((g-=4)<0)break;D.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return D}function gt(S){const g=[];for(let v=0;v<S.length;++v)g.push(S.charCodeAt(v)&255);return g}function Tr(S,g){let v,C,P;const D=[];for(let q=0;q<S.length&&!((g-=2)<0);++q)v=S.charCodeAt(q),C=v>>8,P=v%256,D.push(P),D.push(C);return D}function St(S){return t.toByteArray(Vt(S))}function yt(S,g,v,C){let P;for(P=0;P<C&&!(P+v>=g.length||P>=S.length);++P)g[P+v]=S[P];return P}function He(S,g){return S instanceof g||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===g.name}function Tt(S){return S!==S}const it=function(){const S="0123456789abcdef",g=new Array(256);for(let v=0;v<16;++v){const C=v*16;for(let P=0;P<16;++P)g[C+P]=S[v]+S[P]}return g}();function Ke(S){return typeof BigInt>"u"?xr:S}function xr(){throw new Error("BigInt not supported")}}(Is)),Is}(function(e,t){(function(r,n){e.exports=n(xE(),FE(),HE(),oh(),KE,hb(),gb())})(ce,function(r,n,i,o,s,a,u){return function(){var f={809:function(l){l.exports=r},30:function(l){l.exports=n},36:function(l){l.exports=i},300:function(l){l.exports=o},408:function(l){l.exports=u},25:function(l){l.exports=s},130:function(l){l.exports=a}},c={};function h(l){var p=c[l];if(p!==void 0)return p.exports;var m=c[l]={exports:{}};return f[l](m,m.exports,h),m.exports}h.n=function(l){var p=l&&l.__esModule?function(){return l.default}:function(){return l};return h.d(p,{a:p}),p},h.d=function(l,p){for(var m in p)h.o(p,m)&&!h.o(l,m)&&Object.defineProperty(l,m,{enumerable:!0,get:p[m]})},h.o=function(l,p){return Object.prototype.hasOwnProperty.call(l,p)},h.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var d={};return function(){h.r(d),h.d(d,{assets:function(){return k},auth:function(){return Z},buildAnswer:function(){return Fg},buildCarouselCard:function(){return Bg},buildQuestion:function(){return Be},carouselCards:function(){return bn},contentInteraction:function(){return Ke},decodeBase64:function(){return Ug},default:function(){return $g},editorialPages:function(){return H},features:function(){return v},getEntries:function(){return l.getEntries},getEntry:function(){return l.getEntry},management:function(){return Ar},payments:function(){return Nr},people:function(){return It},peopleEngagement:function(){return dr},qaQuestions:function(){return Xe},reportError:function(){return p.reportError},search:function(){return _n}});var l=h(809),p=h(30),m=h(36),b={APOLITICAL:{WEBSITES:{LIVE:"https://apolitical.co",LOCALHOST:"localhost",STAGING:/https:\/\/([\w|\d|-]+)\.apolitical\.co/i,STAGING_SPLITTER:"-"},ENVIRONMENTS:{PRODUCTION:"live",LOCAL:"local"}},APIS:{ASSETS_API:{BASE_URL:"/api/assets-api",ENDPOINTS:{USERS:"/users",CERTIFICATES:"/certificates"}},AUTH_API:{BASE_URL:"/api/auth-api",ENDPOINTS:{USER_PASSWORD:"/password",USERS:"/users"}},CONTENT_INTERACTION_API:{BASE_URL:"/api/content-interaction-api",ENDPOINTS:{QUESTIONS:"/questions",ANSWERS:"/answers",REPLIES:"/replies",LIKES:"/likes"}},FEATURES_API:{BASE_URL:"/api/features-api",ENDPOINTS:{FLAGS:"/features"}},MANAGEMENT_API:{BASE_URL:"/api/management-api",ENDPOINTS:{ACCOUNTS:"/accounts",EVENT_REGISTRATIONS:"/event-registrations",LOGINS:"/logins",LOGIN_PASSWORDLESS:"/passwordless",BULK_ENROLMENTS:"/bulk-enrolments"}},PAYMENTS_API:{BASE_URL:"/api/payments-api",BASE_URL_V2:"/api/payments-api/v2",ENDPOINTS:{PRODUCTS:"/products"}},PEOPLE_API:{BASE_URL:"/api/people-api",BASE_URL_V2:"/api/people-api/v2",ENDPOINTS:{BULK_ENROLMENTS:"/bulk-enrolments",REGISTRATIONS:"/registrations",USERS:"/users",USER_ANSWERS:"/answers",USER_COURSES:"/courses",USER_EVENTS:"/events",USER_LIKES:"/likes",USER_LESSONS:"/lessons",USER_PRODUCTS:"/products",USER_RATINGS:"/ratings",USER_SUBSCRIPTIONS:"/subscriptions"}},PEOPLE_ENGAGEMENT_API:{BASE_URL:"/api/people-engagement-api",ENDPOINTS:{ENQUIRY_EMAILS:"/enquiry-emails",USERS:"/users",USER_PROPERTIES:"/properties"}},SEARCH_API:{BASE_URL:"/api/search-api",ENDPOINTS:{SEARCH:"/search"}}},CONTENTFUL:{ARTICLES:{TYPE:"solutionArticle"},CAROUSELS:{CARD_TYPES:{solutionArticle:{INCLUDE:1,SELECT:"fields.authorIds,fields.authorTag,fields.image,fields.publishedDate,fields.readingTime,fields.slug,fields.title"},microcourse:{INCLUDE:2,SELECT:"fields.banner,fields.freeCourse,fields.partnershipDetails,fields.slug,fields.title"},event:{INCLUDE:1,SELECT:"fields.bannerImage,fields.defaultStartDate,fields.slug,fields.speakers,fields.title,fields.isEventOngoing"},listPage:{INCLUDE:1,SELECT:"fields.hero,fields.slug,fields.title"},qaQuestion:{INCLUDE:0,SELECT:"fields.answers,fields.authorId,fields.slug,fields.title,sys.createdAt,fields.projectNames"},learningHub:{INCLUDE:1,SELECT:"fields.bannerSection,fields.customLabel,fields.slug,fields.title"}}},COURSES:{TYPE:"microcourse"},EDITORIAL_PAGES:{INCLUDE:1,SELECT:"fields.carousels,fields.slug",TYPE:"editorialPage"},EVENTS:{TYPE:"event"},LISTS:{TYPE:"listPage"},QUESTIONS:{TYPE:"qaQuestion",INCLUDE:1,LIMIT:10,ORDER:"-sys.createdAt",SELECT:"sys.createdAt,sys.updatedAt,fields.title,fields.slug,fields.authorId,fields.answers,fields.isEdited,fields.projectNames",SKIP:0},ANSWERS:{TYPE:"qaAnswer"},REPLIES:{TYPE:"reply"},LEARNING_HUB:{TYPE:"learningHub"}},HUBSPOT:{ENVIRONMENTS_MAPPING:{local:"SANDBOX",beta:"SANDBOX",rc:"SANDBOX",live:"LIVE"},EMAIL_IDS:{SANDBOX:{internalEmailId:49099078634,externalEmailId:55196526554},LIVE:{internalEmailId:55233583049,externalEmailId:55231159239}}},USERS:{MYSELF:"me"}};const{APOLITICAL:{WEBSITES:{LIVE:T,LOCALHOST:_,STAGING:E,STAGING_SPLITTER:A},ENVIRONMENTS:{PRODUCTION:w,LOCAL:N}}}=b,{HUBSPOT:{ENVIRONMENTS_MAPPING:F,EMAIL_IDS:B}}=b;let G={emailIds:{}};var W=h(300),z=h.n(W);const $=async I=>{try{const{message:M,response:L,request:j}=I;let ee=M;return L?ee+=` - The request was made and the server responded with ${JSON.stringify({status:L.status,data:L.data})}`:j&&(ee+=" - The request was made but no response was received"),console.warn(ee),await(0,p.reportError)(new Error(ee)),ee}catch(M){return console.warn(`Cannot handle error: ${M.message}`),M.message}},{APIS:{ASSETS_API:{BASE_URL:Y,ENDPOINTS:{USERS:te,CERTIFICATES:K}}}}=b;var k={certificates:{create:async(I,M)=>{let L=[];try{const{data:j}=await z().post(`${Y}${te}/${I}${K}`,M);j&&(L=j)}catch(j){await $(j)}return L}}};const{APIS:{AUTH_API:{BASE_URL:V,ENDPOINTS:{USER_PASSWORD:J,USERS:de}}},USERS:{MYSELF:X}}=b;var Z={userPassword:{update:async I=>{let M=null;try{M=await z().put(`${V}${de}/${X}${J}`,I)}catch(L){M={message:(((L||{}).response||{}).data||{}).message},await $(L)}return M}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:re,ENDPOINTS:{ANSWERS:ue,QUESTIONS:Fe,LIKES:Q}}}}=b,oe=`${re}${Fe}`;var Pe={create:async({questionSlug:I},M)=>{try{await z().post(`${oe}/${encodeURIComponent(I)}${ue}`,M)}catch(L){const j=await $(L);throw new Error(j)}},remove:async({questionSlug:I,answerSlug:M})=>{try{await z().delete(`${oe}/${encodeURIComponent(I)}${ue}/${encodeURIComponent(M)}`)}catch(L){const j=await $(L);throw new Error(j)}},update:async({questionSlug:I,answerSlug:M},L)=>{try{return await z().put(`${oe}/${encodeURIComponent(I)}${ue}/${encodeURIComponent(M)}`,L)}catch(j){const ee=await $(j);throw new Error(ee)}},like:async({questionSlug:I,answerSlug:M},L)=>{try{return await z().post(`${oe}/${encodeURIComponent(I)}${ue}/${encodeURIComponent(M)}${Q}`,L)}catch(j){const ee=await $(j);throw new Error(ee)}},unlike:async({questionSlug:I,answerSlug:M})=>{try{return await z().delete(`${oe}/${encodeURIComponent(I)}${ue}/${encodeURIComponent(M)}${Q}`)}catch(L){const j=await $(L);throw new Error(j)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:Ae,ENDPOINTS:{QUESTIONS:ut}}}}=b,ft=`${Ae}${ut}`;var bt={create:async I=>{try{return await z().post(ft,I)}catch(M){const L=await $(M);throw new Error(L)}},remove:async({questionSlug:I})=>{try{await z().delete(`${ft}/${encodeURIComponent(I)}`)}catch(M){const L=await $(M);throw new Error(L)}},update:async({questionSlug:I},M)=>{try{return await z().put(`${ft}/${encodeURIComponent(I)}`,M)}catch(L){const j=await $(L);throw new Error(j)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:ne,ENDPOINTS:{REPLIES:Ye,ANSWERS:je,QUESTIONS:wt,LIKES:Vt}}}}=b,Nt=`${ne}${wt}`,gt=({questionSlug:I,answerSlug:M,replySlug:L},j=!1)=>{let ee=`${Nt}/${encodeURIComponent(I)}${je}/${encodeURIComponent(M)}${Ye}`;return L&&(ee=`${ee}/${encodeURIComponent(L)}`,j&&(ee=`${ee}${Vt}`)),ee};var Tr={create:async({questionSlug:I,answerSlug:M},L)=>{try{return await z().post(gt({questionSlug:I,answerSlug:M}),L)}catch(j){const ee=await $(j);throw new Error(ee)}},update:async({questionSlug:I,answerSlug:M,replySlug:L},j)=>{try{return await z().put(gt({questionSlug:I,answerSlug:M,replySlug:L}),j)}catch(ee){const xe=await $(ee);throw new Error(xe)}},remove:async({questionSlug:I,answerSlug:M,replySlug:L})=>{try{await z().delete(gt({questionSlug:I,answerSlug:M,replySlug:L}))}catch(j){const ee=await $(j);throw new Error(ee)}},like:async({questionSlug:I,answerSlug:M,replySlug:L},j)=>{try{await z().post(gt({questionSlug:I,answerSlug:M,replySlug:L},!0),j)}catch(ee){const xe=await $(ee);throw new Error(xe)}},unlike:async({questionSlug:I,answerSlug:M,replySlug:L})=>{try{await z().delete(gt({questionSlug:I,answerSlug:M,replySlug:L},!0))}catch(j){const ee=await $(j);throw new Error(ee)}},getReplyUrl:gt};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:St,ENDPOINTS:{QUESTIONS:yt,ANSWERS:He,LIKES:Tt}}}}=b,it=`${St}${yt}`;var Ke={answers:Pe,questions:bt,replies:Tr,likes:{create:async(I,M)=>{try{return await z().post(`${it}/${encodeURIComponent(I)}${He}/${encodeURIComponent(M)}${Tt}`)}catch(L){const j=await $(L);throw new Error(j)}},remove:async(I,M)=>{try{return await z().delete(`${it}/${encodeURIComponent(I)}${He}/${encodeURIComponent(M)}${Tt}`)}catch(L){const j=await $(L);throw new Error(j)}}}};const{APIS:{FEATURES_API:{BASE_URL:xr,ENDPOINTS:{FLAGS:S}}}}=b,g=`${xr}${S}`;var v={flags:{read:async I=>{let M=null;try{const{data:L}=await z().get(`${g}/${encodeURIComponent(I)}`);L!=null&&L.name&&(L!=null&&L.featureState)&&(M=L)}catch(L){await $(L)}return M}}};const{APIS:{MANAGEMENT_API:{BASE_URL:C,ENDPOINTS:{ACCOUNTS:P}}}}=b;var D={create:async I=>{try{await z().post(`${C}${P}`,I)}catch(M){throw await $(M),M}},read:async I=>{let M=null;try{({data:M}=await z().get(`${C}${P}/${encodeURIComponent(I)}`))}catch(L){await $(L)}return M},update:async(I,M)=>{try{await z().put(`${C}${P}/${encodeURIComponent(I)}`,M)}catch(L){throw await $(L),L}}};const{APIS:{MANAGEMENT_API:{BASE_URL:q,ENDPOINTS:{BULK_ENROLMENTS:le}}}}=b;var we={create:async I=>{try{await z().post(`${q}${le}`,I)}catch(M){throw await $(M),M}}};const{APIS:{MANAGEMENT_API:{BASE_URL:Se,ENDPOINTS:{EVENT_REGISTRATIONS:Te}}}}=b;var he={create:async I=>{try{await z().post(`${Se}${Te}`,I)}catch(M){const L=await $(M);throw new Error(L)}}};const{APIS:{MANAGEMENT_API:{BASE_URL:dt,ENDPOINTS:{LOGINS:sr,LOGIN_PASSWORDLESS:Or}}}}=b,zt=`${dt}${sr}`;var Ar={accounts:D,bulkEnrolments:we,eventRegistrations:he,passwordless:{update:async I=>{try{await z().put(`${zt}/${encodeURIComponent(I)}${Or}`)}catch(M){throw await $(M),M}}}};const{APIS:{PAYMENTS_API:{BASE_URL_V2:Yt,ENDPOINTS:{PRODUCTS:Cr}}}}=b,Rr=`${Yt}${Cr}`;var Nr={products:{list:async I=>{let M=[],L=I?{params:I}:{params:{}};try{const{data:j}=await z().get(Rr,L);j&&j.length&&(M=j)}catch(j){await $(j)}return M}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Pt,ENDPOINTS:{BULK_ENROLMENTS:un}}}}=b;var xt={list:async I=>{let M=[];try{const{data:L}=await z().get(`${Pt}${un}`,{params:I});L&&L.length&&(M=L)}catch(L){await $(L)}return M}},Hn=h(25);const{OK:qn,MULTIPLE_CHOICES:Gn,NOT_FOUND:cn,FORBIDDEN:Pr}=Hn.StatusCodes,De=I=>I>=qn&&I<Gn||I===Pr||I===cn,{APIS:{PEOPLE_API:{BASE_URL_V2:Ir,ENDPOINTS:{USERS:Lr}}}}=b,Kt=async I=>{let M=null;try{const{data:L}=await z().get(`${Ir}${Lr}/${encodeURIComponent(I)}`,{validateStatus:De});L&&L.id&&(M=L)}catch(L){await $(L)}return M},ln=async I=>{let M=[];try{if(I&&I.length<2)throw new Error("users list method requires at least two ids");const L=I.map(ee=>`ids=${encodeURIComponent(ee)}`).join("&"),j=await z().get(`${Ir}${Lr}?${L}`,{validateStatus:De});j&&j.length&&(M=j)}catch(L){await $(L)}return M};var Wn={read:Kt,update:async(I,M)=>{let L=!1;try{const{data:j}=await z().put(`${Ir}${Lr}/${encodeURIComponent(I)}`,M);L=!(!j||!j.id)}catch(j){await $(j)}return L},list:ln};const{APIS:{PEOPLE_API:{BASE_URL_V2:qe,ENDPOINTS:{USERS:Vn,USER_LIKES:zn}}},USERS:{MYSELF:Yn}}=b,Kn=`${qe}${Vn}/${Yn}${zn}`,kr=async I=>{let M=[],L=I?{params:I}:{params:{}};try{const{data:j}=await z().get(Kn,L);j&&j.length&&(M=j)}catch(j){await $(j)}return M};var tt={list:kr},Qn={authors:{readQuestionAuthors:async(I,M,L)=>{try{if(I.author=await Kt(I.authorId),I.answers&&I.answers.length&&!L.ignoreAnswersAuthors){I.answers.sort((ee,xe)=>new Date(xe.updatedAt)-new Date(ee.updatedAt)),I.totalAnswers=I.answers.length;let j=I.answers;if(L.limit&&L.pageNumber){const ee=L.limit*(L.pageNumber-1);j=I.answers.slice(ee,ee+L.limit)}for(let ee of j){ee.author=ee.authorId&&await Kt(ee.authorId)||{};const[xe]=M?await kr({contentType:b.CONTENTFUL.ANSWERS.TYPE,contentSlug:ee.slug}):[null];ee.userLiked=!!xe}I.answers=j}else I.answers||(I.answers=[]);return I}catch(j){throw await $(j),new Error(`Cannot read authors for question: ${j.message}`)}},readAuthors:async(I=[])=>{let M=[];try{if(Array.isArray(I)===!1)throw new Error("authorIds is not an array!");if(I&&I.length===1){const L=await Kt(I[0]);L&&M.push(L)}else if(I&&I.length>1){const L=await ln(I);L&&L.length>0&&(M=L)}}catch(L){throw await $(L),new Error(`Cannot read authors: ${L.message}`)}return M}}};const{APIS:{PEOPLE_API:{BASE_URL:Xn,ENDPOINTS:{REGISTRATIONS:Jn}}}}=b;var Zn={list:async I=>{let M=[];try{const{data:L}=await z().get(`${Xn}${Jn}`,{params:I});L&&L.length&&(M=L)}catch(L){await $(L)}return M}};const{APIS:{PEOPLE_API:{BASE_URL_V2:ei,ENDPOINTS:{USERS:ur,USER_COURSES:fn}}},USERS:{MYSELF:cr}}=b,ct=`${ei}${ur}/${cr}${fn}`;var Mr={create:async I=>{try{await z().post(ct,I)}catch(M){await $(M)}},list:async I=>{let M=[],L=I?{params:I}:{params:{}};try{const{data:j}=await z().get(ct,L);j&&j.length&&(M=j)}catch(j){await $(j)}return M},update:async(I,M)=>{try{await z().put(`${ct}/${I}`,M)}catch(L){await $(L)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:ti,ENDPOINTS:{USERS:ri,USER_EVENTS:ni}}},USERS:{MYSELF:ii}}=b,oi=`${ti}${ri}/${ii}${ni}`;var lr={list:async I=>{let M=[],L=I?{params:I}:{params:{}};try{const{data:j}=await z().get(oi,L);j&&j.length&&(M=j)}catch(j){await $(j)}return M}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Br,ENDPOINTS:{USERS:Qt,USER_LESSONS:dn}}},USERS:{MYSELF:hn}}=b,pn=`${Br}${Qt}/${hn}${dn}`;var ai={create:async I=>{let M=null;try{M=await z().post(pn,I)}catch(L){await $(L)}return M},list:async I=>{let M=[],L=I?{params:I}:{params:{}};try{const{data:j}=await z().get(pn,L);j&&j.length&&(M=j)}catch(j){await $(j)}return M}};const{APIS:{PEOPLE_API:{BASE_URL_V2:si,ENDPOINTS:{USERS:ui,USER_PRODUCTS:Fr}}},USERS:{MYSELF:ci}}=b,Dr=`${si}${ui}/${ci}${Fr}`;var Xt={create:async I=>{let M=null;try{M=await z().post(Dr,I)}catch(L){await $(L)}return M},list:async I=>{let M=[],L=I?{params:I}:{params:{}};try{const{data:j}=await z().get(Dr,L);j&&j.length&&(M=j)}catch(j){await $(j)}return M},update:async(I,M)=>{try{await z().put(`${Dr}/${I}`,M)}catch(L){await $(L)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:ht,ENDPOINTS:{USERS:Ot,USER_RATINGS:At}}},USERS:{MYSELF:li}}=b,pt=`${ht}${Ot}/${li}${At}`;var It={bulkEnrolments:xt,handlers:Qn,registrations:Zn,users:Wn,userCourses:Mr,userEvents:lr,userLessons:ai,userLikes:tt,userProducts:Xt,userRatings:{create:async I=>{let M=null;try{const{data:L}=await z().post(pt,I);L!=null&&L.id&&(M=L)}catch(L){await $(L)}return M},update:async(I,M)=>{try{await z().put(`${pt}/${I}`,M)}catch(L){await $(L)}}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:fi,ENDPOINTS:{ENQUIRY_EMAILS:di}}}}=b;var hi={create:async I=>{let M=null;try{const{data:L}=await z().post(`${fi}${di}`,I);L&&(M=L)}catch(L){await $(L)}return M}},mn={forms:{sendEnquiryEmails:async I=>{let M=null;try{const{emailIds:L}=G;M=await dr.emails.create({...L,...I})}catch(L){await $(L)}return M}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:Qe,ENDPOINTS:{USERS:gn,USER_PROPERTIES:yn}}},USERS:{MYSELF:fr}}=b;var dr={emails:hi,handlers:mn,userProperties:{update:async(I,M)=>{try{await z().put(`${Qe}${gn}/${fr}${yn}/${I}`,M)}catch(L){await $(L)}}}},hr=h(130);const{APIS:{SEARCH_API:{BASE_URL:pi,ENDPOINTS:{SEARCH:vn}}}}=b,Ur=`${pi}${vn}`;var _n={ask:async I=>{try{let M=null;const{data:L}=await z().get(Ur,{params:{question:I}});return L!=null&&L.answer&&(L!=null&&L.references)&&(L!=null&&L.version)&&(M=L),M}catch(M){const L=await $(M);throw new Error(L)}},stream:(I,M,L)=>{const j=(0,hr.io)(void 0,{path:"/api/search-api/web-sockets"});function ee(){j.emit("search",{question:I})}function xe(Me){L(Me),Ie(),j.disconnect()}function Ie(){j.off("connect",ee),j.off("update",M),j.off("result",xe)}return j.on("connect",ee),j.on("update",M),j.on("result",xe),Ie}};const{CONTENTFUL:vt}=b,{CARD_TYPES:$r}=vt.CAROUSELS;var bn={read:async(I,M)=>{try{if(!M||!M.sys||!M.sys.id)throw new Error("Invalid link to card");if(!I||!$r[I])throw new Error("Unsupported card content type");const{INCLUDE:L,SELECT:j}=$r[I];return await(0,l.getEntry)({content_type:I,"sys.id":M.sys.id,include:L,select:j},{assetDetails:!0})}catch(L){throw await $(L),new Error(`Cannot read carousel card: ${L.message}`)}}};const{CONTENTFUL:mi}=b,{INCLUDE:y,SELECT:x,TYPE:R}=mi.EDITORIAL_PAGES;var H={read:async I=>{try{return await(0,l.getEntry)({content_type:R,"fields.slug":I,include:y,select:x})}catch(M){throw await $(M),new Error(`Cannot read editorial page: ${M.message}`)}}};const{CONTENTFUL:fe}=b,{TYPE:se,ORDER:pe,SELECT:me,SKIP:ke,LIMIT:be,INCLUDE:Ge}=fe.QUESTIONS;var Xe={read:async I=>{try{return await(0,l.getEntry)({content_type:se,"fields.slug":I,include:2,select:me})}catch(M){throw await $(M),new Error(`Cannot read question: ${M.message}`)}},list:async(I={})=>{try{return await(0,l.getEntries)({content_type:se,include:Ge,limit:be,order:pe,select:me,skip:ke,...I})}catch(M){throw await $(M),new Error(`Cannot list questions: ${M.message}`)}}},Be=async(I,M,L={ignoreAnswersAuthors:!1})=>{try{let j={};return j=await Xe.read(I),j=await It.handlers.authors.readQuestionAuthors(j,M,L),j}catch(j){throw await $(j),new Error(`Cannot build question: ${j.message}`)}};const{ARTICLES:{TYPE:We},COURSES:{TYPE:$e},EVENTS:{TYPE:Lt},LISTS:{TYPE:Ct},QUESTIONS:{TYPE:Jt},LEARNING_HUB:{TYPE:ao}}=b.CONTENTFUL,kt=I=>I&&I.url?(Object.assign(I,{aspect:"responsiveCard",query:"q=90&fit=fill"}),I):null,pr={[We]:async I=>{const{authorIds:M,authorTag:L,image:j,publishedDate:ee,readingTime:xe,slug:Ie,title:Me}=I,mt=await It.handlers.authors.readAuthors(M),Mt=mt&&mt.length?mt:L?[L]:null;return{banner:kt(j),contributors:Mt,publishedDate:ee,readingTime:xe,slug:Ie,title:Me}},[$e]:async(I,M)=>{const{banner:L,freeCourse:j,partnershipDetails:ee,slug:xe,title:Ie,registered:Me}=I,mt={banner:kt(L),slug:xe,title:Ie,pill:j?"free":"premium",registered:!!Me};if(ee){const{partners:Mt}=ee;mt.partner=Mt&&Mt.length&&ee.partners[0]}if(Me===void 0&&M){const[Mt]=await It.userProducts.list({courseSlug:xe,isEnrolled:!0,scope:"active"});mt.registered=!!Mt}return mt},[Lt]:async(I,M)=>{const{bannerImage:L,defaultStartDate:j,isEventOngoing:ee,slug:xe,speakers:Ie,title:Me,registered:mt}=I,Mt=new Date(j),jg=!!Mt&&Mt<new Date;if(Ie&&Ie.length)for(const so of Ie)so.image=(ma=so.image)&&ma.url?`${ma.url}?w=100&h=100&fit=thumb&f=center`:null;var ma;const _c={banner:kt(L),dateHasPassed:jg,title:Me,slug:xe,isOngoingEvent:ee,contributors:Ie,startDate:Mt,registered:!!mt};if(mt===void 0&&M){const[so]=await It.userEvents.list({eventSlug:xe});_c.registered=!!so}return _c},[Ct]:async I=>{const{hero:M,slug:L,title:j}=I;return{banner:kt(M),slug:L,title:j}},[Jt]:async I=>{const{answers:M,authorId:L,createdAt:j,slug:ee,title:xe}=I;let Ie=null;if(L){const Me=await It.users.read(L);Me&&(Ie=Me)}return{answers:M&&M.length?M.length:0,contributors:Ie?[Ie]:[],createdAt:j,slug:ee,title:xe}},[ao]:I=>{const{bannerSection:M,customLabel:L,slug:j,title:ee}=I;return{banner:kt(M.image),slug:j,title:ee,customLabel:L}},people:I=>{const{id:M,name:L,jobTitle:j,location:ee,image:xe}=I;return{profile:xe,slug:M,title:L,text:j,secondaryText:ee}}};var Bg=async({contentType:I,...M}={},L)=>{try{if(!pr[I])throw new Error("Content type not supported");if(typeof pr[I]!="function")throw new Error("No builder function for content type");return I!=="people"&&M.sys&&M.sys.type&&M.sys.type==="Link"&&(M=await bn.read(I,M)),{contentType:I,...await pr[I](M,L)}}catch(j){throw await $(j),new Error(`Cannot build carousel card: ${j.message}`)}},Fg=async(I,M,L={})=>{try{if(!I.replies||I.replies.length===0)return I.replies=[],I;I.replies.sort((ee,xe)=>new Date(ee.createdAt)-new Date(xe.createdAt)),I.totalReplies=I.totalReplies||I.replies.length;let j=I.replies;if(L.limit&&L.pageNumber){const ee=L.limit*(L.pageNumber-1);j=I.replies.slice(ee,ee+L.limit)}for(const ee of j){if(ee.authorId===I.authorId){ee.author=I.author,ee.userLiked=!1;continue}ee.author=ee.authorId&&await Kt(ee.authorId)||{};const[xe]=M?await kr({contentType:b.CONTENTFUL.REPLIES.TYPE,contentSlug:ee.slug}):[null];ee.userLiked=!!xe}return I.replies=j,I}catch(j){throw await $(j),new Error(`Cannot build replies for answer: ${j.message}`)}},Dg=h(408);const Ug=I=>I&&Dg.Buffer.from(I,"base64").toString("ascii");function $g({contentContext:I=null,errorsContext:M=null,gtmContext:L=null,origin:j}){try{const ee=(xe=>{let Ie=null;xe?Ie=xe:typeof window<"u"&&(Ie=window.origin||window.location.origin),Ie||new Error("Cannot select environment: Website not defined");let Me=null;const mt=Ie.match(E);return mt?Me=mt[1].split(A)[0]:Ie===T?Me=w:Ie.includes(_)&&(Me=N),Me||new Error(`Cannot select environment: No rule for website ${Ie}`),Me})(j);return I&&(0,l.setContext)(Object.assign({},I,{environment:ee})),M&&(0,p.setContext)(Object.assign({},M,{environment:ee})),L&&((0,m.setContext)(Object.assign({},L,{environment:ee})),(0,m.setupGTM)()),(({environment:xe})=>{const Ie=(Me=>{if(!Me)throw new Error("Cannot map environment: Environment not defined");if(!F[Me])throw new Error(`Cannot map environment: No mapping found for environment ${Me}`);return F[Me]})(xe);G.emailIds=B[Ie]})(Object.assign({},{environment:ee})),ee}catch(ee){console.warn(`Cannot load SDK: ${ee.message}`)}}}(),d}()})})(Qd);var yb=Qd.exports;const $i={Off:"off",On:"on",Cookie:"cookie"},vb=e=>{const[t]=Kd(),[r,n]=U.useState(null),[i,o]=U.useState(!1),[s,a]=U.useState($i.Off);return U.useEffect(()=>{e&&yb.features.flags.read(e).then(u=>{a(u.featureState),n(null)}).catch(u=>{a($i.Off),n(u)})},[e]),U.useEffect(()=>{switch(s){case $i.Off:o(!1);break;case $i.On:o(!0);break;case $i.Cookie:o(!!t[`feature-${e}`]);break;default:o(!1)}},[s,t]),{isFeatureActive:i,error:r}};function _b(e,t,r){var n=this,i=U.useRef(null),o=U.useRef(0),s=U.useRef(null),a=U.useRef([]),u=U.useRef(),f=U.useRef(),c=U.useRef(e),h=U.useRef(!0);U.useEffect(function(){c.current=e},[e]);var d=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var l=!!(r=r||{}).leading,p=!("trailing"in r)||!!r.trailing,m="maxWait"in r,b=m?Math.max(+r.maxWait||0,t):null;U.useEffect(function(){return h.current=!0,function(){h.current=!1}},[]);var T=U.useMemo(function(){var _=function(B){var G=a.current,W=u.current;return a.current=u.current=null,o.current=B,f.current=c.current.apply(W,G)},E=function(B,G){d&&cancelAnimationFrame(s.current),s.current=d?requestAnimationFrame(B):setTimeout(B,G)},A=function(B){if(!h.current)return!1;var G=B-i.current;return!i.current||G>=t||G<0||m&&B-o.current>=b},w=function(B){return s.current=null,p&&a.current?_(B):(a.current=u.current=null,f.current)},N=function B(){var G=Date.now();if(A(G))return w(G);if(h.current){var W=t-(G-i.current),z=m?Math.min(W,b-(G-o.current)):W;E(B,z)}},F=function(){var B=Date.now(),G=A(B);if(a.current=[].slice.call(arguments),u.current=n,i.current=B,G){if(!s.current&&h.current)return o.current=i.current,E(N,t),l?_(i.current):f.current;if(m)return E(N,t),_(i.current)}return s.current||E(N,t),f.current};return F.cancel=function(){s.current&&(d?cancelAnimationFrame(s.current):clearTimeout(s.current)),o.current=0,a.current=i.current=u.current=s.current=null},F.isPending=function(){return!!s.current},F.flush=function(){return s.current?w(Date.now()):f.current},F},[l,m,t,b,p,d]);return T}function Vp(e,t,r){var n=r===void 0?{}:r,i=n.leading,o=n.trailing;return _b(e,t,{maxWait:t,leading:i===void 0||i,trailing:o===void 0||o})}let Ls;const ro=(e=!0,t=!1)=>{if(!e)return;const[r,n]=U.useState(0)||[!1,()=>{}];U.useEffect(()=>(o(),window.addEventListener("resize",s),()=>{clearTimeout(Ls),s.flush(),window.removeEventListener("resize",s)}),[]);const i=()=>window.innerWidth,o=()=>{n(i())},s=Vp(()=>{i()!==r&&(t&&(clearTimeout(Ls),document.body.classList.add("is-resizing"),Ls=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),o())},500,{leading:!0});return r},zp=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:r=()=>{},scrollUp:n=()=>{}}})=>{if(!window)return;const[i,o]=U.useState({current:0,past:0})||[!1,()=>{}],[s,a]=U.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];U.useEffect(()=>(u(),window.addEventListener("scroll",f),()=>{f.flush(),window.removeEventListener("scroll",f)}),[]);const u=()=>{const c=window.scrollY,h=i.current,d=c-h,l=d>0?"down":"up";if(o({current:c,past:h}),l==="down"){c>=e+t.down&&!s.scrollDown&&(!s.scrollUp||d>t.up)&&(r(),a({scrollUp:!1,scrollDown:!0}));return}Math.abs(d)>=t.up&&!s.scrollUp&&(n(),a({scrollUp:!0,scrollDown:!1}))},f=Vp(()=>{u()},250);return i},Eb=(e=[],t=!0)=>{e=Array.isArray(e)?e:[e];const r=U.useRef(!1),{hash:n}=Ze.useLocation();Zr(()=>{if(n){if(r.current)return;const i=document.getElementById(n.replace("#",""));i&&(i.scrollIntoView(t?{behavior:"smooth"}:null),r.current=!0)}},e)};var zo={exports:{}};zo.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Array]",a="[object Boolean]",u="[object Date]",f="[object Error]",c="[object Function]",h="[object GeneratorFunction]",d="[object Map]",l="[object Number]",p="[object Object]",m="[object Promise]",b="[object RegExp]",T="[object Set]",_="[object String]",E="[object Symbol]",A="[object WeakMap]",w="[object ArrayBuffer]",N="[object DataView]",F="[object Float32Array]",B="[object Float64Array]",G="[object Int8Array]",W="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",Y="[object Uint8ClampedArray]",te="[object Uint16Array]",K="[object Uint32Array]",k=/[\\^$.*+?()[\]{}|]/g,V=/\w*$/,J=/^\[object .+?Constructor\]$/,de=/^(?:0|[1-9]\d*)$/,X={};X[o]=X[s]=X[w]=X[N]=X[a]=X[u]=X[F]=X[B]=X[G]=X[W]=X[z]=X[d]=X[l]=X[p]=X[b]=X[T]=X[_]=X[E]=X[$]=X[Y]=X[te]=X[K]=!0,X[f]=X[c]=X[A]=!1;var Z=typeof ce=="object"&&ce&&ce.Object===Object&&ce,re=typeof self=="object"&&self&&self.Object===Object&&self,ue=Z||re||Function("return this")(),Fe=t&&!t.nodeType&&t,Q=Fe&&!0&&e&&!e.nodeType&&e,oe=Q&&Q.exports===Fe;function Pe(y,x){return y.set(x[0],x[1]),y}function Ae(y,x){return y.add(x),y}function ut(y,x){for(var R=-1,H=y?y.length:0;++R<H&&x(y[R],R,y)!==!1;);return y}function ft(y,x){for(var R=-1,H=x.length,fe=y.length;++R<H;)y[fe+R]=x[R];return y}function bt(y,x,R,H){var fe=-1,se=y?y.length:0;for(H&&se&&(R=y[++fe]);++fe<se;)R=x(R,y[fe],fe,y);return R}function ne(y,x){for(var R=-1,H=Array(y);++R<y;)H[R]=x(R);return H}function Ye(y,x){return y==null?void 0:y[x]}function je(y){var x=!1;if(y!=null&&typeof y.toString!="function")try{x=!!(y+"")}catch{}return x}function wt(y){var x=-1,R=Array(y.size);return y.forEach(function(H,fe){R[++x]=[fe,H]}),R}function Vt(y,x){return function(R){return y(x(R))}}function Nt(y){var x=-1,R=Array(y.size);return y.forEach(function(H){R[++x]=H}),R}var gt=Array.prototype,Tr=Function.prototype,St=Object.prototype,yt=ue["__core-js_shared__"],He=function(){var y=/[^.]+$/.exec(yt&&yt.keys&&yt.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),Tt=Tr.toString,it=St.hasOwnProperty,Ke=St.toString,xr=RegExp("^"+Tt.call(it).replace(k,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=oe?ue.Buffer:void 0,g=ue.Symbol,v=ue.Uint8Array,C=Vt(Object.getPrototypeOf,Object),P=Object.create,D=St.propertyIsEnumerable,q=gt.splice,le=Object.getOwnPropertySymbols,we=S?S.isBuffer:void 0,Se=Vt(Object.keys,Object),Te=ht(ue,"DataView"),he=ht(ue,"Map"),dt=ht(ue,"Promise"),sr=ht(ue,"Set"),Or=ht(ue,"WeakMap"),zt=ht(Object,"create"),Ar=Qe(Te),Yt=Qe(he),Cr=Qe(dt),Rr=Qe(sr),Nr=Qe(Or),Pt=g?g.prototype:void 0,un=Pt?Pt.valueOf:void 0;function xt(y){var x=-1,R=y?y.length:0;for(this.clear();++x<R;){var H=y[x];this.set(H[0],H[1])}}function Hn(){this.__data__=zt?zt(null):{}}function qn(y){return this.has(y)&&delete this.__data__[y]}function Gn(y){var x=this.__data__;if(zt){var R=x[y];return R===n?void 0:R}return it.call(x,y)?x[y]:void 0}function cn(y){var x=this.__data__;return zt?x[y]!==void 0:it.call(x,y)}function Pr(y,x){var R=this.__data__;return R[y]=zt&&x===void 0?n:x,this}xt.prototype.clear=Hn,xt.prototype.delete=qn,xt.prototype.get=Gn,xt.prototype.has=cn,xt.prototype.set=Pr;function De(y){var x=-1,R=y?y.length:0;for(this.clear();++x<R;){var H=y[x];this.set(H[0],H[1])}}function Ir(){this.__data__=[]}function Lr(y){var x=this.__data__,R=cr(x,y);if(R<0)return!1;var H=x.length-1;return R==H?x.pop():q.call(x,R,1),!0}function Kt(y){var x=this.__data__,R=cr(x,y);return R<0?void 0:x[R][1]}function ln(y){return cr(this.__data__,y)>-1}function Wn(y,x){var R=this.__data__,H=cr(R,y);return H<0?R.push([y,x]):R[H][1]=x,this}De.prototype.clear=Ir,De.prototype.delete=Lr,De.prototype.get=Kt,De.prototype.has=ln,De.prototype.set=Wn;function qe(y){var x=-1,R=y?y.length:0;for(this.clear();++x<R;){var H=y[x];this.set(H[0],H[1])}}function Vn(){this.__data__={hash:new xt,map:new(he||De),string:new xt}}function zn(y){return Xt(this,y).delete(y)}function Yn(y){return Xt(this,y).get(y)}function Kn(y){return Xt(this,y).has(y)}function kr(y,x){return Xt(this,y).set(y,x),this}qe.prototype.clear=Vn,qe.prototype.delete=zn,qe.prototype.get=Yn,qe.prototype.has=Kn,qe.prototype.set=kr;function tt(y){this.__data__=new De(y)}function Qn(){this.__data__=new De}function Xn(y){return this.__data__.delete(y)}function Jn(y){return this.__data__.get(y)}function Zn(y){return this.__data__.has(y)}function ei(y,x){var R=this.__data__;if(R instanceof De){var H=R.__data__;if(!he||H.length<r-1)return H.push([y,x]),this;R=this.__data__=new qe(H)}return R.set(y,x),this}tt.prototype.clear=Qn,tt.prototype.delete=Xn,tt.prototype.get=Jn,tt.prototype.has=Zn,tt.prototype.set=ei;function ur(y,x){var R=dr(y)||fr(y)?ne(y.length,String):[],H=R.length,fe=!!H;for(var se in y)(x||it.call(y,se))&&!(fe&&(se=="length"||fi(se,H)))&&R.push(se);return R}function fn(y,x,R){var H=y[x];(!(it.call(y,x)&&yn(H,R))||R===void 0&&!(x in y))&&(y[x]=R)}function cr(y,x){for(var R=y.length;R--;)if(yn(y[R][0],x))return R;return-1}function ct(y,x){return y&&Fr(x,En(x),y)}function Mr(y,x,R,H,fe,se,pe){var me;if(H&&(me=se?H(y,fe,se,pe):H(y)),me!==void 0)return me;if(!vt(y))return y;var ke=dr(y);if(ke){if(me=li(y),!x)return ui(y,me)}else{var be=At(y),Ge=be==c||be==h;if(vn(y))return lr(y,x);if(be==p||be==o||Ge&&!se){if(je(y))return se?y:{};if(me=pt(Ge?{}:y),!x)return ci(y,ct(me,y))}else{if(!X[be])return se?y:{};me=It(y,be,Mr,x)}}pe||(pe=new tt);var Xe=pe.get(y);if(Xe)return Xe;if(pe.set(y,me),!ke)var Be=R?Dr(y):En(y);return ut(Be||y,function(We,$e){Be&&($e=We,We=y[$e]),fn(me,$e,Mr(We,x,R,H,$e,y,pe))}),me}function ti(y){return vt(y)?P(y):{}}function ri(y,x,R){var H=x(y);return dr(y)?H:ft(H,R(y))}function ni(y){return Ke.call(y)}function ii(y){if(!vt(y)||hi(y))return!1;var x=Ur(y)||je(y)?xr:J;return x.test(Qe(y))}function oi(y){if(!mn(y))return Se(y);var x=[];for(var R in Object(y))it.call(y,R)&&R!="constructor"&&x.push(R);return x}function lr(y,x){if(x)return y.slice();var R=new y.constructor(y.length);return y.copy(R),R}function Br(y){var x=new y.constructor(y.byteLength);return new v(x).set(new v(y)),x}function Qt(y,x){var R=x?Br(y.buffer):y.buffer;return new y.constructor(R,y.byteOffset,y.byteLength)}function dn(y,x,R){var H=x?R(wt(y),!0):wt(y);return bt(H,Pe,new y.constructor)}function hn(y){var x=new y.constructor(y.source,V.exec(y));return x.lastIndex=y.lastIndex,x}function pn(y,x,R){var H=x?R(Nt(y),!0):Nt(y);return bt(H,Ae,new y.constructor)}function ai(y){return un?Object(un.call(y)):{}}function si(y,x){var R=x?Br(y.buffer):y.buffer;return new y.constructor(R,y.byteOffset,y.length)}function ui(y,x){var R=-1,H=y.length;for(x||(x=Array(H));++R<H;)x[R]=y[R];return x}function Fr(y,x,R,H){R||(R={});for(var fe=-1,se=x.length;++fe<se;){var pe=x[fe],me=H?H(R[pe],y[pe],pe,R,y):void 0;fn(R,pe,me===void 0?y[pe]:me)}return R}function ci(y,x){return Fr(y,Ot(y),x)}function Dr(y){return ri(y,En,Ot)}function Xt(y,x){var R=y.__data__;return di(x)?R[typeof x=="string"?"string":"hash"]:R.map}function ht(y,x){var R=Ye(y,x);return ii(R)?R:void 0}var Ot=le?Vt(le,Object):bn,At=ni;(Te&&At(new Te(new ArrayBuffer(1)))!=N||he&&At(new he)!=d||dt&&At(dt.resolve())!=m||sr&&At(new sr)!=T||Or&&At(new Or)!=A)&&(At=function(y){var x=Ke.call(y),R=x==p?y.constructor:void 0,H=R?Qe(R):void 0;if(H)switch(H){case Ar:return N;case Yt:return d;case Cr:return m;case Rr:return T;case Nr:return A}return x});function li(y){var x=y.length,R=y.constructor(x);return x&&typeof y[0]=="string"&&it.call(y,"index")&&(R.index=y.index,R.input=y.input),R}function pt(y){return typeof y.constructor=="function"&&!mn(y)?ti(C(y)):{}}function It(y,x,R,H){var fe=y.constructor;switch(x){case w:return Br(y);case a:case u:return new fe(+y);case N:return Qt(y,H);case F:case B:case G:case W:case z:case $:case Y:case te:case K:return si(y,H);case d:return dn(y,H,R);case l:case _:return new fe(y);case b:return hn(y);case T:return pn(y,H,R);case E:return ai(y)}}function fi(y,x){return x=x??i,!!x&&(typeof y=="number"||de.test(y))&&y>-1&&y%1==0&&y<x}function di(y){var x=typeof y;return x=="string"||x=="number"||x=="symbol"||x=="boolean"?y!=="__proto__":y===null}function hi(y){return!!He&&He in y}function mn(y){var x=y&&y.constructor,R=typeof x=="function"&&x.prototype||St;return y===R}function Qe(y){if(y!=null){try{return Tt.call(y)}catch{}try{return y+""}catch{}}return""}function gn(y){return Mr(y,!0,!0)}function yn(y,x){return y===x||y!==y&&x!==x}function fr(y){return pi(y)&&it.call(y,"callee")&&(!D.call(y,"callee")||Ke.call(y)==o)}var dr=Array.isArray;function hr(y){return y!=null&&_n(y.length)&&!Ur(y)}function pi(y){return $r(y)&&hr(y)}var vn=we||mi;function Ur(y){var x=vt(y)?Ke.call(y):"";return x==c||x==h}function _n(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=i}function vt(y){var x=typeof y;return!!y&&(x=="object"||x=="function")}function $r(y){return!!y&&typeof y=="object"}function En(y){return hr(y)?ur(y):oi(y)}function bn(){return[]}function mi(){return!1}e.exports=gn})(zo,zo.exports);var bb=zo.exports;const wb=qt(bb);var Sb="Expected a function",Yp="__lodash_hash_undefined__",Kp=1/0,Tb=9007199254740991,xb="[object Function]",Ob="[object GeneratorFunction]",Ab="[object Symbol]",Cb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rb=/^\w*$/,Nb=/^\./,Pb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ib=/[\\^$.*+?()[\]{}|]/g,Lb=/\\(\\)?/g,kb=/^\[object .+?Constructor\]$/,Mb=/^(?:0|[1-9]\d*)$/,Bb=typeof ce=="object"&&ce&&ce.Object===Object&&ce,Fb=typeof self=="object"&&self&&self.Object===Object&&self,Xu=Bb||Fb||Function("return this")();function Db(e,t){return e==null?void 0:e[t]}function Ub(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var $b=Array.prototype,jb=Function.prototype,Qp=Object.prototype,ks=Xu["__core-js_shared__"],nd=function(){var e=/[^.]+$/.exec(ks&&ks.keys&&ks.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Xp=jb.toString,oa=Qp.hasOwnProperty,Jp=Qp.toString,Hb=RegExp("^"+Xp.call(oa).replace(Ib,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),id=Xu.Symbol,qb=$b.splice,Gb=Zp(Xu,"Map"),Ki=Zp(Object,"create"),od=id?id.prototype:void 0,ad=od?od.toString:void 0;function en(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Wb(){this.__data__=Ki?Ki(null):{}}function Vb(e){return this.has(e)&&delete this.__data__[e]}function zb(e){var t=this.__data__;if(Ki){var r=t[e];return r===Yp?void 0:r}return oa.call(t,e)?t[e]:void 0}function Yb(e){var t=this.__data__;return Ki?t[e]!==void 0:oa.call(t,e)}function Kb(e,t){var r=this.__data__;return r[e]=Ki&&t===void 0?Yp:t,this}en.prototype.clear=Wb;en.prototype.delete=Vb;en.prototype.get=zb;en.prototype.has=Yb;en.prototype.set=Kb;function Un(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Qb(){this.__data__=[]}function Xb(e){var t=this.__data__,r=aa(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():qb.call(t,r,1),!0}function Jb(e){var t=this.__data__,r=aa(t,e);return r<0?void 0:t[r][1]}function Zb(e){return aa(this.__data__,e)>-1}function ew(e,t){var r=this.__data__,n=aa(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Un.prototype.clear=Qb;Un.prototype.delete=Xb;Un.prototype.get=Jb;Un.prototype.has=Zb;Un.prototype.set=ew;function on(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function tw(){this.__data__={hash:new en,map:new(Gb||Un),string:new en}}function rw(e){return sa(this,e).delete(e)}function nw(e){return sa(this,e).get(e)}function iw(e){return sa(this,e).has(e)}function ow(e,t){return sa(this,e).set(e,t),this}on.prototype.clear=tw;on.prototype.delete=rw;on.prototype.get=nw;on.prototype.has=iw;on.prototype.set=ow;function aw(e,t,r){var n=e[t];(!(oa.call(e,t)&&em(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function aa(e,t){for(var r=e.length;r--;)if(em(e[r][0],t))return r;return-1}function sw(e){if(!Yo(e)||pw(e))return!1;var t=vw(e)||Ub(e)?Hb:kb;return t.test(yw(e))}function uw(e,t,r,n){if(!Yo(e))return e;t=dw(t,e)?[t]:lw(t);for(var i=-1,o=t.length,s=o-1,a=e;a!=null&&++i<o;){var u=gw(t[i]),f=r;if(i!=s){var c=a[u];f=n?n(c,u,a):void 0,f===void 0&&(f=Yo(c)?c:fw(t[i+1])?[]:{})}aw(a,u,f),a=a[u]}return e}function cw(e){if(typeof e=="string")return e;if(Zu(e))return ad?ad.call(e):"";var t=e+"";return t=="0"&&1/e==-Kp?"-0":t}function lw(e){return tm(e)?e:mw(e)}function sa(e,t){var r=e.__data__;return hw(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Zp(e,t){var r=Db(e,t);return sw(r)?r:void 0}function fw(e,t){return t=t??Tb,!!t&&(typeof e=="number"||Mb.test(e))&&e>-1&&e%1==0&&e<t}function dw(e,t){if(tm(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Zu(e)?!0:Rb.test(e)||!Cb.test(e)||t!=null&&e in Object(t)}function hw(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function pw(e){return!!nd&&nd in e}var mw=Ju(function(e){e=Ew(e);var t=[];return Nb.test(e)&&t.push(""),e.replace(Pb,function(r,n,i,o){t.push(i?o.replace(Lb,"$1"):n||r)}),t});function gw(e){if(typeof e=="string"||Zu(e))return e;var t=e+"";return t=="0"&&1/e==-Kp?"-0":t}function yw(e){if(e!=null){try{return Xp.call(e)}catch{}try{return e+""}catch{}}return""}function Ju(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(Sb);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(Ju.Cache||on),r}Ju.Cache=on;function em(e,t){return e===t||e!==e&&t!==t}var tm=Array.isArray;function vw(e){var t=Yo(e)?Jp.call(e):"";return t==xb||t==Ob}function Yo(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function _w(e){return!!e&&typeof e=="object"}function Zu(e){return typeof e=="symbol"||_w(e)&&Jp.call(e)==Ab}function Ew(e){return e==null?"":cw(e)}function bw(e,t,r){return e==null?e:uw(e,t,r)}var ww=bw;const Sw=qt(ww),Tw=(e,t)=>{Array.isArray(t)||(t=[t]);const r=wb(e);return t.forEach(({type:n,value:i})=>{Sw(r,n,i)}),r},rm=e=>{const t=[];return e.forEach(r=>{const n=parseInt(r);isNaN(n)||t.push(n)}),t.sort((r,n)=>r-n)},nm=(e,t,r)=>{let n=r.mobile;for(const i in t){const o=parseInt(String(t[i]));if(e>=o)n=r[o];else if(e<o)break}return n},xw=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),Ow=e=>{let o;try{o=new Date().getTime()-new Date(e).getTime()}catch{return""}const s=o/36e5,a=Math.floor(o/864e5);if(a<1)return s<1?{path:"now"}:{path:"hours",number:Math.floor(s)};if(a<7)return{path:"days",number:a};const u=Math.floor(a/7);return u<=52?{path:"weeks",number:u}:{path:"years",number:Math.floor(a/365)}},Aw=e=>new Promise(t=>setTimeout(t,e)),ec={apolitical:"Apolitical",breadcrumbs_label:"Go back to:",breadcrumbs_currentPage:"Current page:",card_bootcamp:"Email boot camp",card_ended:"Ended",card_registered:"Registered",card_answers:"{number, plural, =0 {0 answers} one {# answer} other {# answers}}",card_time_ago:"{time} ago",card_time_read:"{time} min read",card_watch:"Watch recording",card_cta_people:"View profile",collapsibleSection_summary:"Find out more",communityDetails_members:"Members",communityDetails_viewAll:"View all",communityDetails_invite:"Invite colleagues",contactFooter_title:"Contact us",contactFooter_text:"We're always open to new ideas, so please reach out to see how we can collaborate.",contactFooter_phone:"+44 203 608 2241",contactFooter_email:"hello@apolitical.co",contactForm_name:"Name",contactForm_email:"Email address",contactForm_organisation:"Government department or organisation",contactForm_interests:"I'm interested in",contactForm_interests_publishingCourse:"Publishing or creating a course",contactForm_interests_buyingCourse:"Buying courses for my team",contactForm_interests_learningExperience:"Customised learning experiences",contactForm_interests_somethingElse:"Something else",contactForm_message:"Message",cookieBanner_title:"Cookies and your privacy",cookieBanner_text:"We take your trust and privacy very seriously. Apolitical uses safe cookies (small files on your device) to run the site. You can reject non-essential cookies, but some site features may not work without them.",cookieBanner_buttons_settings:"Change my settings",cookieBanner_buttons_reject:"Reject all",cookieBanner_buttons_accept:"Accept all",dates_now:"now",dates_hours:"{number}h",dates_days:"{number}d",dates_weeks:"{number}w",dates_years:"{number}y",discussion_action_answer:"answer",discussion_action_comment:"comment",discussion_action_post:"post",discussion_action_response:"response",discussion_action_reply:"reply",discussion_action_question:"question",discussion_answer_likes:"{count, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_answer_likes_like:"Like this answer",discussion_answer_likes_unlike:"Unlike answer",discussion_edited:"Edited",discussion_delete_title:"Delete {action}",discussion_delete_text:"<p>Are you sure you want to delete your {action}?</p><p>This can't be undone.</p>",discussion_delete_cancel:"Cancel",discussion_delete_delete:"Delete",discussion_delete_error:"We are unable to delete your {action} at the moment. Please try again later or contact us if problem persists.",discussion_reply:"Reply",discussion_reply_likes:"{count, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_reply_likes_like:"Like this reply",discussion_reply_likes_unlike:"Unlike reply",discussion_report_subject:"Report a post on Apolitical",discussion_report_body:`I'd like to report the {contentType} <{contentSlug}> at {contentUrl}.
61
+ */var rd;function gb(){return rd||(rd=1,function(e){const t=pb(),r=mb(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=o(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const S=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(S,g),S.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(S){if(S>i)throw new RangeError('The value "'+S+'" is invalid for option "size"');const g=new Uint8Array(S);return Object.setPrototypeOf(g,a.prototype),g}function a(S,g,v){if(typeof S=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(S)}return u(S,g,v)}a.poolSize=8192;function u(S,g,v){if(typeof S=="string")return d(S,g);if(ArrayBuffer.isView(S))return p(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if(He(S,ArrayBuffer)||S&&He(S.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(He(S,SharedArrayBuffer)||S&&He(S.buffer,SharedArrayBuffer)))return m(S,g,v);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const C=S.valueOf&&S.valueOf();if(C!=null&&C!==S)return a.from(C,g,v);const P=b(S);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return a.from(S[Symbol.toPrimitive]("string"),g,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S)}a.from=function(S,g,v){return u(S,g,v)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function f(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function c(S,g,v){return f(S),S<=0?s(S):g!==void 0?typeof v=="string"?s(S).fill(g,v):s(S).fill(g):s(S)}a.alloc=function(S,g,v){return c(S,g,v)};function h(S){return f(S),s(S<0?0:T(S)|0)}a.allocUnsafe=function(S){return h(S)},a.allocUnsafeSlow=function(S){return h(S)};function d(S,g){if((typeof g!="string"||g==="")&&(g="utf8"),!a.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const v=E(S,g)|0;let C=s(v);const P=C.write(S,g);return P!==v&&(C=C.slice(0,P)),C}function l(S){const g=S.length<0?0:T(S.length)|0,v=s(g);for(let C=0;C<g;C+=1)v[C]=S[C]&255;return v}function p(S){if(He(S,Uint8Array)){const g=new Uint8Array(S);return m(g.buffer,g.byteOffset,g.byteLength)}return l(S)}function m(S,g,v){if(g<0||S.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(S.byteLength<g+(v||0))throw new RangeError('"length" is outside of buffer bounds');let C;return g===void 0&&v===void 0?C=new Uint8Array(S):v===void 0?C=new Uint8Array(S,g):C=new Uint8Array(S,g,v),Object.setPrototypeOf(C,a.prototype),C}function b(S){if(a.isBuffer(S)){const g=T(S.length)|0,v=s(g);return v.length===0||S.copy(v,0,0,g),v}if(S.length!==void 0)return typeof S.length!="number"||Tt(S.length)?s(0):l(S);if(S.type==="Buffer"&&Array.isArray(S.data))return l(S.data)}function T(S){if(S>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return S|0}function _(S){return+S!=S&&(S=0),a.alloc(+S)}a.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==a.prototype},a.compare=function(g,v){if(He(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),He(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),!a.isBuffer(g)||!a.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===v)return 0;let C=g.length,P=v.length;for(let D=0,q=Math.min(C,P);D<q;++D)if(g[D]!==v[D]){C=g[D],P=v[D];break}return C<P?-1:P<C?1:0},a.isEncoding=function(g){switch(String(g).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}},a.concat=function(g,v){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return a.alloc(0);let C;if(v===void 0)for(v=0,C=0;C<g.length;++C)v+=g[C].length;const P=a.allocUnsafe(v);let D=0;for(C=0;C<g.length;++C){let q=g[C];if(He(q,Uint8Array))D+q.length>P.length?(a.isBuffer(q)||(q=a.from(q)),q.copy(P,D)):Uint8Array.prototype.set.call(P,q,D);else if(a.isBuffer(q))q.copy(P,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=q.length}return P};function E(S,g){if(a.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||He(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);const v=S.length,C=arguments.length>2&&arguments[2]===!0;if(!C&&v===0)return 0;let P=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return Nt(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return St(S).length;default:if(P)return C?-1:Nt(S).length;g=(""+g).toLowerCase(),P=!0}}a.byteLength=E;function A(S,g,v){let C=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,g>>>=0,v<=g))return"";for(S||(S="utf8");;)switch(S){case"hex":return de(this,g,v);case"utf8":case"utf-8":return te(this,g,v);case"ascii":return V(this,g,v);case"latin1":case"binary":return J(this,g,v);case"base64":return Y(this,g,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,g,v);default:if(C)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),C=!0}}a.prototype._isBuffer=!0;function w(S,g,v){const C=S[g];S[g]=S[v],S[v]=C}a.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let v=0;v<g;v+=2)w(this,v,v+1);return this},a.prototype.swap32=function(){const g=this.length;if(g%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let v=0;v<g;v+=4)w(this,v,v+3),w(this,v+1,v+2);return this},a.prototype.swap64=function(){const g=this.length;if(g%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let v=0;v<g;v+=8)w(this,v,v+7),w(this,v+1,v+6),w(this,v+2,v+5),w(this,v+3,v+4);return this},a.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?te(this,0,g):A.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(g){if(!a.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:a.compare(this,g)===0},a.prototype.inspect=function(){let g="";const v=e.INSPECT_MAX_BYTES;return g=this.toString("hex",0,v).replace(/(.{2})/g,"$1 ").trim(),this.length>v&&(g+=" ... "),"<Buffer "+g+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(g,v,C,P,D){if(He(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),!a.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(v===void 0&&(v=0),C===void 0&&(C=g?g.length:0),P===void 0&&(P=0),D===void 0&&(D=this.length),v<0||C>g.length||P<0||D>this.length)throw new RangeError("out of range index");if(P>=D&&v>=C)return 0;if(P>=D)return-1;if(v>=C)return 1;if(v>>>=0,C>>>=0,P>>>=0,D>>>=0,this===g)return 0;let q=D-P,le=C-v;const we=Math.min(q,le),Se=this.slice(P,D),Te=g.slice(v,C);for(let he=0;he<we;++he)if(Se[he]!==Te[he]){q=Se[he],le=Te[he];break}return q<le?-1:le<q?1:0};function N(S,g,v,C,P){if(S.length===0)return-1;if(typeof v=="string"?(C=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,Tt(v)&&(v=P?0:S.length-1),v<0&&(v=S.length+v),v>=S.length){if(P)return-1;v=S.length-1}else if(v<0)if(P)v=0;else return-1;if(typeof g=="string"&&(g=a.from(g,C)),a.isBuffer(g))return g.length===0?-1:F(S,g,v,C,P);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(S,g,v):Uint8Array.prototype.lastIndexOf.call(S,g,v):F(S,[g],v,C,P);throw new TypeError("val must be string, number or Buffer")}function F(S,g,v,C,P){let D=1,q=S.length,le=g.length;if(C!==void 0&&(C=String(C).toLowerCase(),C==="ucs2"||C==="ucs-2"||C==="utf16le"||C==="utf-16le")){if(S.length<2||g.length<2)return-1;D=2,q/=2,le/=2,v/=2}function we(Te,he){return D===1?Te[he]:Te.readUInt16BE(he*D)}let Se;if(P){let Te=-1;for(Se=v;Se<q;Se++)if(we(S,Se)===we(g,Te===-1?0:Se-Te)){if(Te===-1&&(Te=Se),Se-Te+1===le)return Te*D}else Te!==-1&&(Se-=Se-Te),Te=-1}else for(v+le>q&&(v=q-le),Se=v;Se>=0;Se--){let Te=!0;for(let he=0;he<le;he++)if(we(S,Se+he)!==we(g,he)){Te=!1;break}if(Te)return Se}return-1}a.prototype.includes=function(g,v,C){return this.indexOf(g,v,C)!==-1},a.prototype.indexOf=function(g,v,C){return N(this,g,v,C,!0)},a.prototype.lastIndexOf=function(g,v,C){return N(this,g,v,C,!1)};function B(S,g,v,C){v=Number(v)||0;const P=S.length-v;C?(C=Number(C),C>P&&(C=P)):C=P;const D=g.length;C>D/2&&(C=D/2);let q;for(q=0;q<C;++q){const le=parseInt(g.substr(q*2,2),16);if(Tt(le))return q;S[v+q]=le}return q}function G(S,g,v,C){return yt(Nt(g,S.length-v),S,v,C)}function W(S,g,v,C){return yt(gt(g),S,v,C)}function z(S,g,v,C){return yt(St(g),S,v,C)}function $(S,g,v,C){return yt(Tr(g,S.length-v),S,v,C)}a.prototype.write=function(g,v,C,P){if(v===void 0)P="utf8",C=this.length,v=0;else if(C===void 0&&typeof v=="string")P=v,C=this.length,v=0;else if(isFinite(v))v=v>>>0,isFinite(C)?(C=C>>>0,P===void 0&&(P="utf8")):(P=C,C=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const D=this.length-v;if((C===void 0||C>D)&&(C=D),g.length>0&&(C<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");let q=!1;for(;;)switch(P){case"hex":return B(this,g,v,C);case"utf8":case"utf-8":return G(this,g,v,C);case"ascii":case"latin1":case"binary":return W(this,g,v,C);case"base64":return z(this,g,v,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,g,v,C);default:if(q)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),q=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Y(S,g,v){return g===0&&v===S.length?t.fromByteArray(S):t.fromByteArray(S.slice(g,v))}function te(S,g,v){v=Math.min(S.length,v);const C=[];let P=g;for(;P<v;){const D=S[P];let q=null,le=D>239?4:D>223?3:D>191?2:1;if(P+le<=v){let we,Se,Te,he;switch(le){case 1:D<128&&(q=D);break;case 2:we=S[P+1],(we&192)===128&&(he=(D&31)<<6|we&63,he>127&&(q=he));break;case 3:we=S[P+1],Se=S[P+2],(we&192)===128&&(Se&192)===128&&(he=(D&15)<<12|(we&63)<<6|Se&63,he>2047&&(he<55296||he>57343)&&(q=he));break;case 4:we=S[P+1],Se=S[P+2],Te=S[P+3],(we&192)===128&&(Se&192)===128&&(Te&192)===128&&(he=(D&15)<<18|(we&63)<<12|(Se&63)<<6|Te&63,he>65535&&he<1114112&&(q=he))}}q===null?(q=65533,le=1):q>65535&&(q-=65536,C.push(q>>>10&1023|55296),q=56320|q&1023),C.push(q),P+=le}return M(C)}const K=4096;function M(S){const g=S.length;if(g<=K)return String.fromCharCode.apply(String,S);let v="",C=0;for(;C<g;)v+=String.fromCharCode.apply(String,S.slice(C,C+=K));return v}function V(S,g,v){let C="";v=Math.min(S.length,v);for(let P=g;P<v;++P)C+=String.fromCharCode(S[P]&127);return C}function J(S,g,v){let C="";v=Math.min(S.length,v);for(let P=g;P<v;++P)C+=String.fromCharCode(S[P]);return C}function de(S,g,v){const C=S.length;(!g||g<0)&&(g=0),(!v||v<0||v>C)&&(v=C);let P="";for(let D=g;D<v;++D)P+=it[S[D]];return P}function X(S,g,v){const C=S.slice(g,v);let P="";for(let D=0;D<C.length-1;D+=2)P+=String.fromCharCode(C[D]+C[D+1]*256);return P}a.prototype.slice=function(g,v){const C=this.length;g=~~g,v=v===void 0?C:~~v,g<0?(g+=C,g<0&&(g=0)):g>C&&(g=C),v<0?(v+=C,v<0&&(v=0)):v>C&&(v=C),v<g&&(v=g);const P=this.subarray(g,v);return Object.setPrototypeOf(P,a.prototype),P};function Z(S,g,v){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+g>v)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(g,v,C){g=g>>>0,v=v>>>0,C||Z(g,v,this.length);let P=this[g],D=1,q=0;for(;++q<v&&(D*=256);)P+=this[g+q]*D;return P},a.prototype.readUintBE=a.prototype.readUIntBE=function(g,v,C){g=g>>>0,v=v>>>0,C||Z(g,v,this.length);let P=this[g+--v],D=1;for(;v>0&&(D*=256);)P+=this[g+--v]*D;return P},a.prototype.readUint8=a.prototype.readUInt8=function(g,v){return g=g>>>0,v||Z(g,1,this.length),this[g]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(g,v){return g=g>>>0,v||Z(g,2,this.length),this[g]|this[g+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(g,v){return g=g>>>0,v||Z(g,2,this.length),this[g]<<8|this[g+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},a.prototype.readBigUInt64LE=Ke(function(g){g=g>>>0,Ye(g,"offset");const v=this[g],C=this[g+7];(v===void 0||C===void 0)&&je(g,this.length-8);const P=v+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,D=this[++g]+this[++g]*2**8+this[++g]*2**16+C*2**24;return BigInt(P)+(BigInt(D)<<BigInt(32))}),a.prototype.readBigUInt64BE=Ke(function(g){g=g>>>0,Ye(g,"offset");const v=this[g],C=this[g+7];(v===void 0||C===void 0)&&je(g,this.length-8);const P=v*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],D=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+C;return(BigInt(P)<<BigInt(32))+BigInt(D)}),a.prototype.readIntLE=function(g,v,C){g=g>>>0,v=v>>>0,C||Z(g,v,this.length);let P=this[g],D=1,q=0;for(;++q<v&&(D*=256);)P+=this[g+q]*D;return D*=128,P>=D&&(P-=Math.pow(2,8*v)),P},a.prototype.readIntBE=function(g,v,C){g=g>>>0,v=v>>>0,C||Z(g,v,this.length);let P=v,D=1,q=this[g+--P];for(;P>0&&(D*=256);)q+=this[g+--P]*D;return D*=128,q>=D&&(q-=Math.pow(2,8*v)),q},a.prototype.readInt8=function(g,v){return g=g>>>0,v||Z(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},a.prototype.readInt16LE=function(g,v){g=g>>>0,v||Z(g,2,this.length);const C=this[g]|this[g+1]<<8;return C&32768?C|4294901760:C},a.prototype.readInt16BE=function(g,v){g=g>>>0,v||Z(g,2,this.length);const C=this[g+1]|this[g]<<8;return C&32768?C|4294901760:C},a.prototype.readInt32LE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},a.prototype.readInt32BE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},a.prototype.readBigInt64LE=Ke(function(g){g=g>>>0,Ye(g,"offset");const v=this[g],C=this[g+7];(v===void 0||C===void 0)&&je(g,this.length-8);const P=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(C<<24);return(BigInt(P)<<BigInt(32))+BigInt(v+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),a.prototype.readBigInt64BE=Ke(function(g){g=g>>>0,Ye(g,"offset");const v=this[g],C=this[g+7];(v===void 0||C===void 0)&&je(g,this.length-8);const P=(v<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(P)<<BigInt(32))+BigInt(this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+C)}),a.prototype.readFloatLE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),r.read(this,g,!0,23,4)},a.prototype.readFloatBE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),r.read(this,g,!1,23,4)},a.prototype.readDoubleLE=function(g,v){return g=g>>>0,v||Z(g,8,this.length),r.read(this,g,!0,52,8)},a.prototype.readDoubleBE=function(g,v){return g=g>>>0,v||Z(g,8,this.length),r.read(this,g,!1,52,8)};function re(S,g,v,C,P,D){if(!a.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>P||g<D)throw new RangeError('"value" argument is out of bounds');if(v+C>S.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(g,v,C,P){if(g=+g,v=v>>>0,C=C>>>0,!P){const le=Math.pow(2,8*C)-1;re(this,g,v,C,le,0)}let D=1,q=0;for(this[v]=g&255;++q<C&&(D*=256);)this[v+q]=g/D&255;return v+C},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(g,v,C,P){if(g=+g,v=v>>>0,C=C>>>0,!P){const le=Math.pow(2,8*C)-1;re(this,g,v,C,le,0)}let D=C-1,q=1;for(this[v+D]=g&255;--D>=0&&(q*=256);)this[v+D]=g/q&255;return v+C},a.prototype.writeUint8=a.prototype.writeUInt8=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,1,255,0),this[v]=g&255,v+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,2,65535,0),this[v]=g&255,this[v+1]=g>>>8,v+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,2,65535,0),this[v]=g>>>8,this[v+1]=g&255,v+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,4,4294967295,0),this[v+3]=g>>>24,this[v+2]=g>>>16,this[v+1]=g>>>8,this[v]=g&255,v+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,4,4294967295,0),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4};function ue(S,g,v,C,P){ne(g,C,P,S,v,7);let D=Number(g&BigInt(4294967295));S[v++]=D,D=D>>8,S[v++]=D,D=D>>8,S[v++]=D,D=D>>8,S[v++]=D;let q=Number(g>>BigInt(32)&BigInt(4294967295));return S[v++]=q,q=q>>8,S[v++]=q,q=q>>8,S[v++]=q,q=q>>8,S[v++]=q,v}function Fe(S,g,v,C,P){ne(g,C,P,S,v,7);let D=Number(g&BigInt(4294967295));S[v+7]=D,D=D>>8,S[v+6]=D,D=D>>8,S[v+5]=D,D=D>>8,S[v+4]=D;let q=Number(g>>BigInt(32)&BigInt(4294967295));return S[v+3]=q,q=q>>8,S[v+2]=q,q=q>>8,S[v+1]=q,q=q>>8,S[v]=q,v+8}a.prototype.writeBigUInt64LE=Ke(function(g,v=0){return ue(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Ke(function(g,v=0){return Fe(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(g,v,C,P){if(g=+g,v=v>>>0,!P){const we=Math.pow(2,8*C-1);re(this,g,v,C,we-1,-we)}let D=0,q=1,le=0;for(this[v]=g&255;++D<C&&(q*=256);)g<0&&le===0&&this[v+D-1]!==0&&(le=1),this[v+D]=(g/q>>0)-le&255;return v+C},a.prototype.writeIntBE=function(g,v,C,P){if(g=+g,v=v>>>0,!P){const we=Math.pow(2,8*C-1);re(this,g,v,C,we-1,-we)}let D=C-1,q=1,le=0;for(this[v+D]=g&255;--D>=0&&(q*=256);)g<0&&le===0&&this[v+D+1]!==0&&(le=1),this[v+D]=(g/q>>0)-le&255;return v+C},a.prototype.writeInt8=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,1,127,-128),g<0&&(g=255+g+1),this[v]=g&255,v+1},a.prototype.writeInt16LE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,2,32767,-32768),this[v]=g&255,this[v+1]=g>>>8,v+2},a.prototype.writeInt16BE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,2,32767,-32768),this[v]=g>>>8,this[v+1]=g&255,v+2},a.prototype.writeInt32LE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,4,2147483647,-2147483648),this[v]=g&255,this[v+1]=g>>>8,this[v+2]=g>>>16,this[v+3]=g>>>24,v+4},a.prototype.writeInt32BE=function(g,v,C){return g=+g,v=v>>>0,C||re(this,g,v,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4},a.prototype.writeBigInt64LE=Ke(function(g,v=0){return ue(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Ke(function(g,v=0){return Fe(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Q(S,g,v,C,P,D){if(v+C>S.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function oe(S,g,v,C,P){return g=+g,v=v>>>0,P||Q(S,g,v,4),r.write(S,g,v,C,23,4),v+4}a.prototype.writeFloatLE=function(g,v,C){return oe(this,g,v,!0,C)},a.prototype.writeFloatBE=function(g,v,C){return oe(this,g,v,!1,C)};function Pe(S,g,v,C,P){return g=+g,v=v>>>0,P||Q(S,g,v,8),r.write(S,g,v,C,52,8),v+8}a.prototype.writeDoubleLE=function(g,v,C){return Pe(this,g,v,!0,C)},a.prototype.writeDoubleBE=function(g,v,C){return Pe(this,g,v,!1,C)},a.prototype.copy=function(g,v,C,P){if(!a.isBuffer(g))throw new TypeError("argument should be a Buffer");if(C||(C=0),!P&&P!==0&&(P=this.length),v>=g.length&&(v=g.length),v||(v=0),P>0&&P<C&&(P=C),P===C||g.length===0||this.length===0)return 0;if(v<0)throw new RangeError("targetStart out of bounds");if(C<0||C>=this.length)throw new RangeError("Index out of range");if(P<0)throw new RangeError("sourceEnd out of bounds");P>this.length&&(P=this.length),g.length-v<P-C&&(P=g.length-v+C);const D=P-C;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(v,C,P):Uint8Array.prototype.set.call(g,this.subarray(C,P),v),D},a.prototype.fill=function(g,v,C,P){if(typeof g=="string"){if(typeof v=="string"?(P=v,v=0,C=this.length):typeof C=="string"&&(P=C,C=this.length),P!==void 0&&typeof P!="string")throw new TypeError("encoding must be a string");if(typeof P=="string"&&!a.isEncoding(P))throw new TypeError("Unknown encoding: "+P);if(g.length===1){const q=g.charCodeAt(0);(P==="utf8"&&q<128||P==="latin1")&&(g=q)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(v<0||this.length<v||this.length<C)throw new RangeError("Out of range index");if(C<=v)return this;v=v>>>0,C=C===void 0?this.length:C>>>0,g||(g=0);let D;if(typeof g=="number")for(D=v;D<C;++D)this[D]=g;else{const q=a.isBuffer(g)?g:a.from(g,P),le=q.length;if(le===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(D=0;D<C-v;++D)this[D+v]=q[D%le]}return this};const Ae={};function ut(S,g,v){Ae[S]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:g.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${S}]`,this.stack,delete this.name}get code(){return S}set code(P){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:P,writable:!0})}toString(){return`${this.name} [${S}]: ${this.message}`}}}ut("ERR_BUFFER_OUT_OF_BOUNDS",function(S){return S?`${S} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ut("ERR_INVALID_ARG_TYPE",function(S,g){return`The "${S}" argument must be of type number. Received type ${typeof g}`},TypeError),ut("ERR_OUT_OF_RANGE",function(S,g,v){let C=`The value of "${S}" is out of range.`,P=v;return Number.isInteger(v)&&Math.abs(v)>2**32?P=ft(String(v)):typeof v=="bigint"&&(P=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(P=ft(P)),P+="n"),C+=` It must be ${g}. Received ${P}`,C},RangeError);function ft(S){let g="",v=S.length;const C=S[0]==="-"?1:0;for(;v>=C+4;v-=3)g=`_${S.slice(v-3,v)}${g}`;return`${S.slice(0,v)}${g}`}function bt(S,g,v){Ye(g,"offset"),(S[g]===void 0||S[g+v]===void 0)&&je(g,S.length-(v+1))}function ne(S,g,v,C,P,D){if(S>v||S<g){const q=typeof g=="bigint"?"n":"";let le;throw D>3?g===0||g===BigInt(0)?le=`>= 0${q} and < 2${q} ** ${(D+1)*8}${q}`:le=`>= -(2${q} ** ${(D+1)*8-1}${q}) and < 2 ** ${(D+1)*8-1}${q}`:le=`>= ${g}${q} and <= ${v}${q}`,new Ae.ERR_OUT_OF_RANGE("value",le,S)}bt(C,P,D)}function Ye(S,g){if(typeof S!="number")throw new Ae.ERR_INVALID_ARG_TYPE(g,"number",S)}function je(S,g,v){throw Math.floor(S)!==S?(Ye(S,v),new Ae.ERR_OUT_OF_RANGE(v||"offset","an integer",S)):g<0?new Ae.ERR_BUFFER_OUT_OF_BOUNDS:new Ae.ERR_OUT_OF_RANGE(v||"offset",`>= ${v?1:0} and <= ${g}`,S)}const wt=/[^+/0-9A-Za-z-_]/g;function Vt(S){if(S=S.split("=")[0],S=S.trim().replace(wt,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function Nt(S,g){g=g||1/0;let v;const C=S.length;let P=null;const D=[];for(let q=0;q<C;++q){if(v=S.charCodeAt(q),v>55295&&v<57344){if(!P){if(v>56319){(g-=3)>-1&&D.push(239,191,189);continue}else if(q+1===C){(g-=3)>-1&&D.push(239,191,189);continue}P=v;continue}if(v<56320){(g-=3)>-1&&D.push(239,191,189),P=v;continue}v=(P-55296<<10|v-56320)+65536}else P&&(g-=3)>-1&&D.push(239,191,189);if(P=null,v<128){if((g-=1)<0)break;D.push(v)}else if(v<2048){if((g-=2)<0)break;D.push(v>>6|192,v&63|128)}else if(v<65536){if((g-=3)<0)break;D.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((g-=4)<0)break;D.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return D}function gt(S){const g=[];for(let v=0;v<S.length;++v)g.push(S.charCodeAt(v)&255);return g}function Tr(S,g){let v,C,P;const D=[];for(let q=0;q<S.length&&!((g-=2)<0);++q)v=S.charCodeAt(q),C=v>>8,P=v%256,D.push(P),D.push(C);return D}function St(S){return t.toByteArray(Vt(S))}function yt(S,g,v,C){let P;for(P=0;P<C&&!(P+v>=g.length||P>=S.length);++P)g[P+v]=S[P];return P}function He(S,g){return S instanceof g||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===g.name}function Tt(S){return S!==S}const it=function(){const S="0123456789abcdef",g=new Array(256);for(let v=0;v<16;++v){const C=v*16;for(let P=0;P<16;++P)g[C+P]=S[v]+S[P]}return g}();function Ke(S){return typeof BigInt>"u"?xr:S}function xr(){throw new Error("BigInt not supported")}}(Is)),Is}(function(e,t){(function(r,n){e.exports=n(xE(),FE(),HE(),oh(),KE,hb(),gb())})(ce,function(r,n,i,o,s,a,u){return function(){var f={809:function(l){l.exports=r},30:function(l){l.exports=n},36:function(l){l.exports=i},300:function(l){l.exports=o},408:function(l){l.exports=u},25:function(l){l.exports=s},130:function(l){l.exports=a}},c={};function h(l){var p=c[l];if(p!==void 0)return p.exports;var m=c[l]={exports:{}};return f[l](m,m.exports,h),m.exports}h.n=function(l){var p=l&&l.__esModule?function(){return l.default}:function(){return l};return h.d(p,{a:p}),p},h.d=function(l,p){for(var m in p)h.o(p,m)&&!h.o(l,m)&&Object.defineProperty(l,m,{enumerable:!0,get:p[m]})},h.o=function(l,p){return Object.prototype.hasOwnProperty.call(l,p)},h.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var d={};return function(){h.r(d),h.d(d,{assets:function(){return M},auth:function(){return Z},buildAnswer:function(){return Fg},buildCarouselCard:function(){return Bg},buildQuestion:function(){return Be},carouselCards:function(){return bn},contentInteraction:function(){return Ke},decodeBase64:function(){return Ug},default:function(){return $g},editorialPages:function(){return H},features:function(){return v},getEntries:function(){return l.getEntries},getEntry:function(){return l.getEntry},management:function(){return Ar},payments:function(){return Nr},people:function(){return It},peopleEngagement:function(){return dr},qaQuestions:function(){return Xe},reportError:function(){return p.reportError},search:function(){return _n}});var l=h(809),p=h(30),m=h(36),b={APOLITICAL:{WEBSITES:{LIVE:"https://apolitical.co",LOCALHOST:"localhost",STAGING:/https:\/\/([\w|\d|-]+)\.apolitical\.co/i,STAGING_SPLITTER:"-"},ENVIRONMENTS:{PRODUCTION:"live",LOCAL:"local"}},APIS:{ASSETS_API:{BASE_URL:"/api/assets-api",ENDPOINTS:{USERS:"/users",CERTIFICATES:"/certificates"}},AUTH_API:{BASE_URL:"/api/auth-api",ENDPOINTS:{USER_PASSWORD:"/password",USERS:"/users"}},CONTENT_INTERACTION_API:{BASE_URL:"/api/content-interaction-api",ENDPOINTS:{QUESTIONS:"/questions",ANSWERS:"/answers",REPLIES:"/replies",LIKES:"/likes"}},FEATURES_API:{BASE_URL:"/api/features-api",ENDPOINTS:{FLAGS:"/features"}},MANAGEMENT_API:{BASE_URL:"/api/management-api",ENDPOINTS:{ACCOUNTS:"/accounts",EVENT_REGISTRATIONS:"/event-registrations",LOGINS:"/logins",LOGIN_PASSWORDLESS:"/passwordless",BULK_ENROLMENTS:"/bulk-enrolments"}},PAYMENTS_API:{BASE_URL:"/api/payments-api",BASE_URL_V2:"/api/payments-api/v2",ENDPOINTS:{PRODUCTS:"/products"}},PEOPLE_API:{BASE_URL:"/api/people-api",BASE_URL_V2:"/api/people-api/v2",ENDPOINTS:{BULK_ENROLMENTS:"/bulk-enrolments",REGISTRATIONS:"/registrations",USERS:"/users",USER_ANSWERS:"/answers",USER_COURSES:"/courses",USER_EVENTS:"/events",USER_LIKES:"/likes",USER_LESSONS:"/lessons",USER_PRODUCTS:"/products",USER_RATINGS:"/ratings",USER_SUBSCRIPTIONS:"/subscriptions"}},PEOPLE_ENGAGEMENT_API:{BASE_URL:"/api/people-engagement-api",ENDPOINTS:{ENQUIRY_EMAILS:"/enquiry-emails",USERS:"/users",USER_PROPERTIES:"/properties"}},SEARCH_API:{BASE_URL:"/api/search-api",ENDPOINTS:{SEARCH:"/search"}}},CONTENTFUL:{ARTICLES:{TYPE:"solutionArticle"},CAROUSELS:{CARD_TYPES:{solutionArticle:{INCLUDE:1,SELECT:"fields.authorIds,fields.authorTag,fields.image,fields.publishedDate,fields.readingTime,fields.slug,fields.title"},microcourse:{INCLUDE:2,SELECT:"fields.banner,fields.freeCourse,fields.partnershipDetails,fields.slug,fields.title"},event:{INCLUDE:1,SELECT:"fields.bannerImage,fields.defaultStartDate,fields.slug,fields.speakers,fields.title,fields.isEventOngoing"},listPage:{INCLUDE:1,SELECT:"fields.hero,fields.slug,fields.title"},qaQuestion:{INCLUDE:0,SELECT:"fields.answers,fields.authorId,fields.slug,fields.title,sys.createdAt,fields.projectNames"},learningHub:{INCLUDE:1,SELECT:"fields.bannerSection,fields.customLabel,fields.slug,fields.title"}}},COURSES:{TYPE:"microcourse"},EDITORIAL_PAGES:{INCLUDE:1,SELECT:"fields.carousels,fields.slug",TYPE:"editorialPage"},EVENTS:{TYPE:"event"},LISTS:{TYPE:"listPage"},QUESTIONS:{TYPE:"qaQuestion",INCLUDE:1,LIMIT:10,ORDER:"-sys.createdAt",SELECT:"sys.createdAt,sys.updatedAt,fields.title,fields.slug,fields.authorId,fields.answers,fields.isEdited,fields.projectNames",SKIP:0},ANSWERS:{TYPE:"qaAnswer"},REPLIES:{TYPE:"reply"},LEARNING_HUB:{TYPE:"learningHub"}},HUBSPOT:{ENVIRONMENTS_MAPPING:{local:"SANDBOX",beta:"SANDBOX",rc:"SANDBOX",live:"LIVE"},EMAIL_IDS:{SANDBOX:{internalEmailId:49099078634,externalEmailId:55196526554},LIVE:{internalEmailId:55233583049,externalEmailId:55231159239}}},USERS:{MYSELF:"me"}};const{APOLITICAL:{WEBSITES:{LIVE:T,LOCALHOST:_,STAGING:E,STAGING_SPLITTER:A},ENVIRONMENTS:{PRODUCTION:w,LOCAL:N}}}=b,{HUBSPOT:{ENVIRONMENTS_MAPPING:F,EMAIL_IDS:B}}=b;let G={emailIds:{}};var W=h(300),z=h.n(W);const $=async I=>{try{const{message:k,response:L,request:j}=I;let ee=k;return L?ee+=` - The request was made and the server responded with ${JSON.stringify({status:L.status,data:L.data})}`:j&&(ee+=" - The request was made but no response was received"),console.warn(ee),await(0,p.reportError)(new Error(ee)),ee}catch(k){return console.warn(`Cannot handle error: ${k.message}`),k.message}},{APIS:{ASSETS_API:{BASE_URL:Y,ENDPOINTS:{USERS:te,CERTIFICATES:K}}}}=b;var M={certificates:{create:async(I,k)=>{let L=[];try{const{data:j}=await z().post(`${Y}${te}/${I}${K}`,k);j&&(L=j)}catch(j){await $(j)}return L}}};const{APIS:{AUTH_API:{BASE_URL:V,ENDPOINTS:{USER_PASSWORD:J,USERS:de}}},USERS:{MYSELF:X}}=b;var Z={userPassword:{update:async I=>{let k=null;try{k=await z().put(`${V}${de}/${X}${J}`,I)}catch(L){k={message:(((L||{}).response||{}).data||{}).message},await $(L)}return k}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:re,ENDPOINTS:{ANSWERS:ue,QUESTIONS:Fe,LIKES:Q}}}}=b,oe=`${re}${Fe}`;var Pe={create:async({questionSlug:I},k)=>{try{await z().post(`${oe}/${encodeURIComponent(I)}${ue}`,k)}catch(L){const j=await $(L);throw new Error(j)}},remove:async({questionSlug:I,answerSlug:k})=>{try{await z().delete(`${oe}/${encodeURIComponent(I)}${ue}/${encodeURIComponent(k)}`)}catch(L){const j=await $(L);throw new Error(j)}},update:async({questionSlug:I,answerSlug:k},L)=>{try{return await z().put(`${oe}/${encodeURIComponent(I)}${ue}/${encodeURIComponent(k)}`,L)}catch(j){const ee=await $(j);throw new Error(ee)}},like:async({questionSlug:I,answerSlug:k},L)=>{try{return await z().post(`${oe}/${encodeURIComponent(I)}${ue}/${encodeURIComponent(k)}${Q}`,L)}catch(j){const ee=await $(j);throw new Error(ee)}},unlike:async({questionSlug:I,answerSlug:k})=>{try{return await z().delete(`${oe}/${encodeURIComponent(I)}${ue}/${encodeURIComponent(k)}${Q}`)}catch(L){const j=await $(L);throw new Error(j)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:Ae,ENDPOINTS:{QUESTIONS:ut}}}}=b,ft=`${Ae}${ut}`;var bt={create:async I=>{try{return await z().post(ft,I)}catch(k){const L=await $(k);throw new Error(L)}},remove:async({questionSlug:I})=>{try{await z().delete(`${ft}/${encodeURIComponent(I)}`)}catch(k){const L=await $(k);throw new Error(L)}},update:async({questionSlug:I},k)=>{try{return await z().put(`${ft}/${encodeURIComponent(I)}`,k)}catch(L){const j=await $(L);throw new Error(j)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:ne,ENDPOINTS:{REPLIES:Ye,ANSWERS:je,QUESTIONS:wt,LIKES:Vt}}}}=b,Nt=`${ne}${wt}`,gt=({questionSlug:I,answerSlug:k,replySlug:L},j=!1)=>{let ee=`${Nt}/${encodeURIComponent(I)}${je}/${encodeURIComponent(k)}${Ye}`;return L&&(ee=`${ee}/${encodeURIComponent(L)}`,j&&(ee=`${ee}${Vt}`)),ee};var Tr={create:async({questionSlug:I,answerSlug:k},L)=>{try{return await z().post(gt({questionSlug:I,answerSlug:k}),L)}catch(j){const ee=await $(j);throw new Error(ee)}},update:async({questionSlug:I,answerSlug:k,replySlug:L},j)=>{try{return await z().put(gt({questionSlug:I,answerSlug:k,replySlug:L}),j)}catch(ee){const xe=await $(ee);throw new Error(xe)}},remove:async({questionSlug:I,answerSlug:k,replySlug:L})=>{try{await z().delete(gt({questionSlug:I,answerSlug:k,replySlug:L}))}catch(j){const ee=await $(j);throw new Error(ee)}},like:async({questionSlug:I,answerSlug:k,replySlug:L},j)=>{try{await z().post(gt({questionSlug:I,answerSlug:k,replySlug:L},!0),j)}catch(ee){const xe=await $(ee);throw new Error(xe)}},unlike:async({questionSlug:I,answerSlug:k,replySlug:L})=>{try{await z().delete(gt({questionSlug:I,answerSlug:k,replySlug:L},!0))}catch(j){const ee=await $(j);throw new Error(ee)}},getReplyUrl:gt};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:St,ENDPOINTS:{QUESTIONS:yt,ANSWERS:He,LIKES:Tt}}}}=b,it=`${St}${yt}`;var Ke={answers:Pe,questions:bt,replies:Tr,likes:{create:async(I,k)=>{try{return await z().post(`${it}/${encodeURIComponent(I)}${He}/${encodeURIComponent(k)}${Tt}`)}catch(L){const j=await $(L);throw new Error(j)}},remove:async(I,k)=>{try{return await z().delete(`${it}/${encodeURIComponent(I)}${He}/${encodeURIComponent(k)}${Tt}`)}catch(L){const j=await $(L);throw new Error(j)}}}};const{APIS:{FEATURES_API:{BASE_URL:xr,ENDPOINTS:{FLAGS:S}}}}=b,g=`${xr}${S}`;var v={flags:{read:async I=>{let k=null;try{const{data:L}=await z().get(`${g}/${encodeURIComponent(I)}`);L!=null&&L.name&&(L!=null&&L.featureState)&&(k=L)}catch(L){await $(L)}return k}}};const{APIS:{MANAGEMENT_API:{BASE_URL:C,ENDPOINTS:{ACCOUNTS:P}}}}=b;var D={create:async I=>{try{await z().post(`${C}${P}`,I)}catch(k){throw await $(k),k}},read:async I=>{let k=null;try{({data:k}=await z().get(`${C}${P}/${encodeURIComponent(I)}`))}catch(L){await $(L)}return k},update:async(I,k)=>{try{await z().put(`${C}${P}/${encodeURIComponent(I)}`,k)}catch(L){throw await $(L),L}}};const{APIS:{MANAGEMENT_API:{BASE_URL:q,ENDPOINTS:{BULK_ENROLMENTS:le}}}}=b;var we={create:async I=>{try{await z().post(`${q}${le}`,I)}catch(k){throw await $(k),k}}};const{APIS:{MANAGEMENT_API:{BASE_URL:Se,ENDPOINTS:{EVENT_REGISTRATIONS:Te}}}}=b;var he={create:async I=>{try{await z().post(`${Se}${Te}`,I)}catch(k){const L=await $(k);throw new Error(L)}}};const{APIS:{MANAGEMENT_API:{BASE_URL:dt,ENDPOINTS:{LOGINS:sr,LOGIN_PASSWORDLESS:Or}}}}=b,zt=`${dt}${sr}`;var Ar={accounts:D,bulkEnrolments:we,eventRegistrations:he,passwordless:{update:async I=>{try{await z().put(`${zt}/${encodeURIComponent(I)}${Or}`)}catch(k){throw await $(k),k}}}};const{APIS:{PAYMENTS_API:{BASE_URL_V2:Yt,ENDPOINTS:{PRODUCTS:Cr}}}}=b,Rr=`${Yt}${Cr}`;var Nr={products:{list:async I=>{let k=[],L=I?{params:I}:{params:{}};try{const{data:j}=await z().get(Rr,L);j&&j.length&&(k=j)}catch(j){await $(j)}return k}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Pt,ENDPOINTS:{BULK_ENROLMENTS:un}}}}=b;var xt={list:async I=>{let k=[];try{const{data:L}=await z().get(`${Pt}${un}`,{params:I});L&&L.length&&(k=L)}catch(L){await $(L)}return k}},Hn=h(25);const{OK:qn,MULTIPLE_CHOICES:Gn,NOT_FOUND:cn,FORBIDDEN:Pr}=Hn.StatusCodes,De=I=>I>=qn&&I<Gn||I===Pr||I===cn,{APIS:{PEOPLE_API:{BASE_URL_V2:Ir,ENDPOINTS:{USERS:Lr}}}}=b,Kt=async I=>{let k=null;try{const{data:L}=await z().get(`${Ir}${Lr}/${encodeURIComponent(I)}`,{validateStatus:De});L&&L.id&&(k=L)}catch(L){await $(L)}return k},ln=async I=>{let k=[];try{if(I&&I.length<2)throw new Error("users list method requires at least two ids");const L=I.map(ee=>`ids=${encodeURIComponent(ee)}`).join("&"),j=await z().get(`${Ir}${Lr}?${L}`,{validateStatus:De});j&&j.length&&(k=j)}catch(L){await $(L)}return k};var Wn={read:Kt,update:async(I,k)=>{let L=!1;try{const{data:j}=await z().put(`${Ir}${Lr}/${encodeURIComponent(I)}`,k);L=!(!j||!j.id)}catch(j){await $(j)}return L},list:ln};const{APIS:{PEOPLE_API:{BASE_URL_V2:qe,ENDPOINTS:{USERS:Vn,USER_LIKES:zn}}},USERS:{MYSELF:Yn}}=b,Kn=`${qe}${Vn}/${Yn}${zn}`,Mr=async I=>{let k=[],L=I?{params:I}:{params:{}};try{const{data:j}=await z().get(Kn,L);j&&j.length&&(k=j)}catch(j){await $(j)}return k};var tt={list:Mr},Qn={authors:{readQuestionAuthors:async(I,k,L)=>{try{if(I.author=await Kt(I.authorId),I.answers&&I.answers.length&&!L.ignoreAnswersAuthors){I.answers.sort((ee,xe)=>new Date(xe.updatedAt)-new Date(ee.updatedAt)),I.totalAnswers=I.answers.length;let j=I.answers;if(L.limit&&L.pageNumber){const ee=L.limit*(L.pageNumber-1);j=I.answers.slice(ee,ee+L.limit)}for(let ee of j){ee.author=ee.authorId&&await Kt(ee.authorId)||{};const[xe]=k?await Mr({contentType:b.CONTENTFUL.ANSWERS.TYPE,contentSlug:ee.slug}):[null];ee.userLiked=!!xe}I.answers=j}else I.answers||(I.answers=[]);return I}catch(j){throw await $(j),new Error(`Cannot read authors for question: ${j.message}`)}},readAuthors:async(I=[])=>{let k=[];try{if(Array.isArray(I)===!1)throw new Error("authorIds is not an array!");if(I&&I.length===1){const L=await Kt(I[0]);L&&k.push(L)}else if(I&&I.length>1){const L=await ln(I);L&&L.length>0&&(k=L)}}catch(L){throw await $(L),new Error(`Cannot read authors: ${L.message}`)}return k}}};const{APIS:{PEOPLE_API:{BASE_URL:Xn,ENDPOINTS:{REGISTRATIONS:Jn}}}}=b;var Zn={list:async I=>{let k=[];try{const{data:L}=await z().get(`${Xn}${Jn}`,{params:I});L&&L.length&&(k=L)}catch(L){await $(L)}return k}};const{APIS:{PEOPLE_API:{BASE_URL_V2:ei,ENDPOINTS:{USERS:ur,USER_COURSES:fn}}},USERS:{MYSELF:cr}}=b,ct=`${ei}${ur}/${cr}${fn}`;var kr={create:async I=>{try{await z().post(ct,I)}catch(k){await $(k)}},list:async I=>{let k=[],L=I?{params:I}:{params:{}};try{const{data:j}=await z().get(ct,L);j&&j.length&&(k=j)}catch(j){await $(j)}return k},update:async(I,k)=>{try{await z().put(`${ct}/${I}`,k)}catch(L){await $(L)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:ti,ENDPOINTS:{USERS:ri,USER_EVENTS:ni}}},USERS:{MYSELF:ii}}=b,oi=`${ti}${ri}/${ii}${ni}`;var lr={list:async I=>{let k=[],L=I?{params:I}:{params:{}};try{const{data:j}=await z().get(oi,L);j&&j.length&&(k=j)}catch(j){await $(j)}return k}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Br,ENDPOINTS:{USERS:Qt,USER_LESSONS:dn}}},USERS:{MYSELF:hn}}=b,pn=`${Br}${Qt}/${hn}${dn}`;var ai={create:async I=>{let k=null;try{k=await z().post(pn,I)}catch(L){await $(L)}return k},list:async I=>{let k=[],L=I?{params:I}:{params:{}};try{const{data:j}=await z().get(pn,L);j&&j.length&&(k=j)}catch(j){await $(j)}return k}};const{APIS:{PEOPLE_API:{BASE_URL_V2:si,ENDPOINTS:{USERS:ui,USER_PRODUCTS:Fr}}},USERS:{MYSELF:ci}}=b,Dr=`${si}${ui}/${ci}${Fr}`;var Xt={create:async I=>{let k=null;try{k=await z().post(Dr,I)}catch(L){await $(L)}return k},list:async I=>{let k=[],L=I?{params:I}:{params:{}};try{const{data:j}=await z().get(Dr,L);j&&j.length&&(k=j)}catch(j){await $(j)}return k},update:async(I,k)=>{try{await z().put(`${Dr}/${I}`,k)}catch(L){await $(L)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:ht,ENDPOINTS:{USERS:Ot,USER_RATINGS:At}}},USERS:{MYSELF:li}}=b,pt=`${ht}${Ot}/${li}${At}`;var It={bulkEnrolments:xt,handlers:Qn,registrations:Zn,users:Wn,userCourses:kr,userEvents:lr,userLessons:ai,userLikes:tt,userProducts:Xt,userRatings:{create:async I=>{let k=null;try{const{data:L}=await z().post(pt,I);L!=null&&L.id&&(k=L)}catch(L){await $(L)}return k},update:async(I,k)=>{try{await z().put(`${pt}/${I}`,k)}catch(L){await $(L)}}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:fi,ENDPOINTS:{ENQUIRY_EMAILS:di}}}}=b;var hi={create:async I=>{let k=null;try{const{data:L}=await z().post(`${fi}${di}`,I);L&&(k=L)}catch(L){await $(L)}return k}},mn={forms:{sendEnquiryEmails:async I=>{let k=null;try{const{emailIds:L}=G;k=await dr.emails.create({...L,...I})}catch(L){await $(L)}return k}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:Qe,ENDPOINTS:{USERS:gn,USER_PROPERTIES:yn}}},USERS:{MYSELF:fr}}=b;var dr={emails:hi,handlers:mn,userProperties:{update:async(I,k)=>{try{await z().put(`${Qe}${gn}/${fr}${yn}/${I}`,k)}catch(L){await $(L)}}}},hr=h(130);const{APIS:{SEARCH_API:{BASE_URL:pi,ENDPOINTS:{SEARCH:vn}}}}=b,Ur=`${pi}${vn}`;var _n={ask:async I=>{try{let k=null;const{data:L}=await z().get(Ur,{params:{question:I}});return L!=null&&L.answer&&(L!=null&&L.references)&&(L!=null&&L.version)&&(k=L),k}catch(k){const L=await $(k);throw new Error(L)}},stream:(I,k,L)=>{const j=(0,hr.io)(void 0,{path:"/api/search-api/web-sockets"});function ee(){j.emit("search",{question:I})}function xe(ke){L(ke),Ie(),j.disconnect()}function Ie(){j.off("connect",ee),j.off("update",k),j.off("result",xe)}return j.on("connect",ee),j.on("update",k),j.on("result",xe),Ie}};const{CONTENTFUL:vt}=b,{CARD_TYPES:$r}=vt.CAROUSELS;var bn={read:async(I,k)=>{try{if(!k||!k.sys||!k.sys.id)throw new Error("Invalid link to card");if(!I||!$r[I])throw new Error("Unsupported card content type");const{INCLUDE:L,SELECT:j}=$r[I];return await(0,l.getEntry)({content_type:I,"sys.id":k.sys.id,include:L,select:j},{assetDetails:!0})}catch(L){throw await $(L),new Error(`Cannot read carousel card: ${L.message}`)}}};const{CONTENTFUL:mi}=b,{INCLUDE:y,SELECT:x,TYPE:R}=mi.EDITORIAL_PAGES;var H={read:async I=>{try{return await(0,l.getEntry)({content_type:R,"fields.slug":I,include:y,select:x})}catch(k){throw await $(k),new Error(`Cannot read editorial page: ${k.message}`)}}};const{CONTENTFUL:fe}=b,{TYPE:se,ORDER:pe,SELECT:me,SKIP:Me,LIMIT:be,INCLUDE:Ge}=fe.QUESTIONS;var Xe={read:async I=>{try{return await(0,l.getEntry)({content_type:se,"fields.slug":I,include:2,select:me})}catch(k){throw await $(k),new Error(`Cannot read question: ${k.message}`)}},list:async(I={})=>{try{return await(0,l.getEntries)({content_type:se,include:Ge,limit:be,order:pe,select:me,skip:Me,...I})}catch(k){throw await $(k),new Error(`Cannot list questions: ${k.message}`)}}},Be=async(I,k,L={ignoreAnswersAuthors:!1})=>{try{let j={};return j=await Xe.read(I),j=await It.handlers.authors.readQuestionAuthors(j,k,L),j}catch(j){throw await $(j),new Error(`Cannot build question: ${j.message}`)}};const{ARTICLES:{TYPE:We},COURSES:{TYPE:$e},EVENTS:{TYPE:Lt},LISTS:{TYPE:Ct},QUESTIONS:{TYPE:Jt},LEARNING_HUB:{TYPE:ao}}=b.CONTENTFUL,Mt=I=>I&&I.url?(Object.assign(I,{aspect:"responsiveCard",query:"q=90&fit=fill"}),I):null,pr={[We]:async I=>{const{authorIds:k,authorTag:L,image:j,publishedDate:ee,readingTime:xe,slug:Ie,title:ke}=I,mt=await It.handlers.authors.readAuthors(k),kt=mt&&mt.length?mt:L?[L]:null;return{banner:Mt(j),contributors:kt,publishedDate:ee,readingTime:xe,slug:Ie,title:ke}},[$e]:async(I,k)=>{const{banner:L,freeCourse:j,partnershipDetails:ee,slug:xe,title:Ie,registered:ke}=I,mt={banner:Mt(L),slug:xe,title:Ie,pill:j?"free":"premium",registered:!!ke};if(ee){const{partners:kt}=ee;mt.partner=kt&&kt.length&&ee.partners[0]}if(ke===void 0&&k){const[kt]=await It.userProducts.list({courseSlug:xe,isEnrolled:!0,scope:"active"});mt.registered=!!kt}return mt},[Lt]:async(I,k)=>{const{bannerImage:L,defaultStartDate:j,isEventOngoing:ee,slug:xe,speakers:Ie,title:ke,registered:mt}=I,kt=new Date(j),jg=!!kt&&kt<new Date;if(Ie&&Ie.length)for(const so of Ie)so.image=(ma=so.image)&&ma.url?`${ma.url}?w=100&h=100&fit=thumb&f=center`:null;var ma;const _c={banner:Mt(L),dateHasPassed:jg,title:ke,slug:xe,isOngoingEvent:ee,contributors:Ie,startDate:kt,registered:!!mt};if(mt===void 0&&k){const[so]=await It.userEvents.list({eventSlug:xe});_c.registered=!!so}return _c},[Ct]:async I=>{const{hero:k,slug:L,title:j}=I;return{banner:Mt(k),slug:L,title:j}},[Jt]:async I=>{const{answers:k,authorId:L,createdAt:j,slug:ee,title:xe}=I;let Ie=null;if(L){const ke=await It.users.read(L);ke&&(Ie=ke)}return{answers:k&&k.length?k.length:0,contributors:Ie?[Ie]:[],createdAt:j,slug:ee,title:xe}},[ao]:I=>{const{bannerSection:k,customLabel:L,slug:j,title:ee}=I;return{banner:Mt(k.image),slug:j,title:ee,customLabel:L}},people:I=>{const{id:k,name:L,jobTitle:j,location:ee,image:xe}=I;return{profile:xe,slug:k,title:L,text:j,secondaryText:ee}}};var Bg=async({contentType:I,...k}={},L)=>{try{if(!pr[I])throw new Error("Content type not supported");if(typeof pr[I]!="function")throw new Error("No builder function for content type");return I!=="people"&&k.sys&&k.sys.type&&k.sys.type==="Link"&&(k=await bn.read(I,k)),{contentType:I,...await pr[I](k,L)}}catch(j){throw await $(j),new Error(`Cannot build carousel card: ${j.message}`)}},Fg=async(I,k,L={})=>{try{if(!I.replies||I.replies.length===0)return I.replies=[],I;I.replies.sort((ee,xe)=>new Date(ee.createdAt)-new Date(xe.createdAt)),I.totalReplies=I.totalReplies||I.replies.length;let j=I.replies;if(L.limit&&L.pageNumber){const ee=L.limit*(L.pageNumber-1);j=I.replies.slice(ee,ee+L.limit)}for(const ee of j){if(ee.authorId===I.authorId){ee.author=I.author,ee.userLiked=!1;continue}ee.author=ee.authorId&&await Kt(ee.authorId)||{};const[xe]=k?await Mr({contentType:b.CONTENTFUL.REPLIES.TYPE,contentSlug:ee.slug}):[null];ee.userLiked=!!xe}return I.replies=j,I}catch(j){throw await $(j),new Error(`Cannot build replies for answer: ${j.message}`)}},Dg=h(408);const Ug=I=>I&&Dg.Buffer.from(I,"base64").toString("ascii");function $g({contentContext:I=null,errorsContext:k=null,gtmContext:L=null,origin:j}){try{const ee=(xe=>{let Ie=null;xe?Ie=xe:typeof window<"u"&&(Ie=window.origin||window.location.origin),Ie||new Error("Cannot select environment: Website not defined");let ke=null;const mt=Ie.match(E);return mt?ke=mt[1].split(A)[0]:Ie===T?ke=w:Ie.includes(_)&&(ke=N),ke||new Error(`Cannot select environment: No rule for website ${Ie}`),ke})(j);return I&&(0,l.setContext)(Object.assign({},I,{environment:ee})),k&&(0,p.setContext)(Object.assign({},k,{environment:ee})),L&&((0,m.setContext)(Object.assign({},L,{environment:ee})),(0,m.setupGTM)()),(({environment:xe})=>{const Ie=(ke=>{if(!ke)throw new Error("Cannot map environment: Environment not defined");if(!F[ke])throw new Error(`Cannot map environment: No mapping found for environment ${ke}`);return F[ke]})(xe);G.emailIds=B[Ie]})(Object.assign({},{environment:ee})),ee}catch(ee){console.warn(`Cannot load SDK: ${ee.message}`)}}}(),d}()})})(Qd);var yb=Qd.exports;const $i={Off:"off",On:"on",Cookie:"cookie"},vb=e=>{const[t]=Kd(),[r,n]=U.useState(null),[i,o]=U.useState(!1),[s,a]=U.useState($i.Off);return U.useEffect(()=>{e&&yb.features.flags.read(e).then(u=>{a(u.featureState),n(null)}).catch(u=>{a($i.Off),n(u)})},[e]),U.useEffect(()=>{switch(s){case $i.Off:o(!1);break;case $i.On:o(!0);break;case $i.Cookie:o(!!t[`feature-${e}`]);break;default:o(!1)}},[s,t]),{isFeatureActive:i,error:r}};function _b(e,t,r){var n=this,i=U.useRef(null),o=U.useRef(0),s=U.useRef(null),a=U.useRef([]),u=U.useRef(),f=U.useRef(),c=U.useRef(e),h=U.useRef(!0);U.useEffect(function(){c.current=e},[e]);var d=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var l=!!(r=r||{}).leading,p=!("trailing"in r)||!!r.trailing,m="maxWait"in r,b=m?Math.max(+r.maxWait||0,t):null;U.useEffect(function(){return h.current=!0,function(){h.current=!1}},[]);var T=U.useMemo(function(){var _=function(B){var G=a.current,W=u.current;return a.current=u.current=null,o.current=B,f.current=c.current.apply(W,G)},E=function(B,G){d&&cancelAnimationFrame(s.current),s.current=d?requestAnimationFrame(B):setTimeout(B,G)},A=function(B){if(!h.current)return!1;var G=B-i.current;return!i.current||G>=t||G<0||m&&B-o.current>=b},w=function(B){return s.current=null,p&&a.current?_(B):(a.current=u.current=null,f.current)},N=function B(){var G=Date.now();if(A(G))return w(G);if(h.current){var W=t-(G-i.current),z=m?Math.min(W,b-(G-o.current)):W;E(B,z)}},F=function(){var B=Date.now(),G=A(B);if(a.current=[].slice.call(arguments),u.current=n,i.current=B,G){if(!s.current&&h.current)return o.current=i.current,E(N,t),l?_(i.current):f.current;if(m)return E(N,t),_(i.current)}return s.current||E(N,t),f.current};return F.cancel=function(){s.current&&(d?cancelAnimationFrame(s.current):clearTimeout(s.current)),o.current=0,a.current=i.current=u.current=s.current=null},F.isPending=function(){return!!s.current},F.flush=function(){return s.current?w(Date.now()):f.current},F},[l,m,t,b,p,d]);return T}function Vp(e,t,r){var n=r===void 0?{}:r,i=n.leading,o=n.trailing;return _b(e,t,{maxWait:t,leading:i===void 0||i,trailing:o===void 0||o})}let Ls;const ro=(e=!0,t=!1)=>{if(!e)return;const[r,n]=U.useState(0)||[!1,()=>{}];U.useEffect(()=>(o(),window.addEventListener("resize",s),()=>{clearTimeout(Ls),s.flush(),window.removeEventListener("resize",s)}),[]);const i=()=>window.innerWidth,o=()=>{n(i())},s=Vp(()=>{i()!==r&&(t&&(clearTimeout(Ls),document.body.classList.add("is-resizing"),Ls=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),o())},500,{leading:!0});return r},zp=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:r=()=>{},scrollUp:n=()=>{}}})=>{if(!window)return;const[i,o]=U.useState({current:0,past:0})||[!1,()=>{}],[s,a]=U.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];U.useEffect(()=>(u(),window.addEventListener("scroll",f),()=>{f.flush(),window.removeEventListener("scroll",f)}),[]);const u=()=>{const c=window.scrollY,h=i.current,d=c-h,l=d>0?"down":"up";if(o({current:c,past:h}),l==="down"){c>=e+t.down&&!s.scrollDown&&(!s.scrollUp||d>t.up)&&(r(),a({scrollUp:!1,scrollDown:!0}));return}Math.abs(d)>=t.up&&!s.scrollUp&&(n(),a({scrollUp:!0,scrollDown:!1}))},f=Vp(()=>{u()},250);return i},Eb=(e=[],t=!0)=>{e=Array.isArray(e)?e:[e];const r=U.useRef(!1),{hash:n}=Ze.useLocation();Zr(()=>{if(n){if(r.current)return;const i=document.getElementById(n.replace("#",""));i&&(i.scrollIntoView(t?{behavior:"smooth"}:null),r.current=!0)}},e)};var zo={exports:{}};zo.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",s="[object Array]",a="[object Boolean]",u="[object Date]",f="[object Error]",c="[object Function]",h="[object GeneratorFunction]",d="[object Map]",l="[object Number]",p="[object Object]",m="[object Promise]",b="[object RegExp]",T="[object Set]",_="[object String]",E="[object Symbol]",A="[object WeakMap]",w="[object ArrayBuffer]",N="[object DataView]",F="[object Float32Array]",B="[object Float64Array]",G="[object Int8Array]",W="[object Int16Array]",z="[object Int32Array]",$="[object Uint8Array]",Y="[object Uint8ClampedArray]",te="[object Uint16Array]",K="[object Uint32Array]",M=/[\\^$.*+?()[\]{}|]/g,V=/\w*$/,J=/^\[object .+?Constructor\]$/,de=/^(?:0|[1-9]\d*)$/,X={};X[o]=X[s]=X[w]=X[N]=X[a]=X[u]=X[F]=X[B]=X[G]=X[W]=X[z]=X[d]=X[l]=X[p]=X[b]=X[T]=X[_]=X[E]=X[$]=X[Y]=X[te]=X[K]=!0,X[f]=X[c]=X[A]=!1;var Z=typeof ce=="object"&&ce&&ce.Object===Object&&ce,re=typeof self=="object"&&self&&self.Object===Object&&self,ue=Z||re||Function("return this")(),Fe=t&&!t.nodeType&&t,Q=Fe&&!0&&e&&!e.nodeType&&e,oe=Q&&Q.exports===Fe;function Pe(y,x){return y.set(x[0],x[1]),y}function Ae(y,x){return y.add(x),y}function ut(y,x){for(var R=-1,H=y?y.length:0;++R<H&&x(y[R],R,y)!==!1;);return y}function ft(y,x){for(var R=-1,H=x.length,fe=y.length;++R<H;)y[fe+R]=x[R];return y}function bt(y,x,R,H){var fe=-1,se=y?y.length:0;for(H&&se&&(R=y[++fe]);++fe<se;)R=x(R,y[fe],fe,y);return R}function ne(y,x){for(var R=-1,H=Array(y);++R<y;)H[R]=x(R);return H}function Ye(y,x){return y==null?void 0:y[x]}function je(y){var x=!1;if(y!=null&&typeof y.toString!="function")try{x=!!(y+"")}catch{}return x}function wt(y){var x=-1,R=Array(y.size);return y.forEach(function(H,fe){R[++x]=[fe,H]}),R}function Vt(y,x){return function(R){return y(x(R))}}function Nt(y){var x=-1,R=Array(y.size);return y.forEach(function(H){R[++x]=H}),R}var gt=Array.prototype,Tr=Function.prototype,St=Object.prototype,yt=ue["__core-js_shared__"],He=function(){var y=/[^.]+$/.exec(yt&&yt.keys&&yt.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),Tt=Tr.toString,it=St.hasOwnProperty,Ke=St.toString,xr=RegExp("^"+Tt.call(it).replace(M,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=oe?ue.Buffer:void 0,g=ue.Symbol,v=ue.Uint8Array,C=Vt(Object.getPrototypeOf,Object),P=Object.create,D=St.propertyIsEnumerable,q=gt.splice,le=Object.getOwnPropertySymbols,we=S?S.isBuffer:void 0,Se=Vt(Object.keys,Object),Te=ht(ue,"DataView"),he=ht(ue,"Map"),dt=ht(ue,"Promise"),sr=ht(ue,"Set"),Or=ht(ue,"WeakMap"),zt=ht(Object,"create"),Ar=Qe(Te),Yt=Qe(he),Cr=Qe(dt),Rr=Qe(sr),Nr=Qe(Or),Pt=g?g.prototype:void 0,un=Pt?Pt.valueOf:void 0;function xt(y){var x=-1,R=y?y.length:0;for(this.clear();++x<R;){var H=y[x];this.set(H[0],H[1])}}function Hn(){this.__data__=zt?zt(null):{}}function qn(y){return this.has(y)&&delete this.__data__[y]}function Gn(y){var x=this.__data__;if(zt){var R=x[y];return R===n?void 0:R}return it.call(x,y)?x[y]:void 0}function cn(y){var x=this.__data__;return zt?x[y]!==void 0:it.call(x,y)}function Pr(y,x){var R=this.__data__;return R[y]=zt&&x===void 0?n:x,this}xt.prototype.clear=Hn,xt.prototype.delete=qn,xt.prototype.get=Gn,xt.prototype.has=cn,xt.prototype.set=Pr;function De(y){var x=-1,R=y?y.length:0;for(this.clear();++x<R;){var H=y[x];this.set(H[0],H[1])}}function Ir(){this.__data__=[]}function Lr(y){var x=this.__data__,R=cr(x,y);if(R<0)return!1;var H=x.length-1;return R==H?x.pop():q.call(x,R,1),!0}function Kt(y){var x=this.__data__,R=cr(x,y);return R<0?void 0:x[R][1]}function ln(y){return cr(this.__data__,y)>-1}function Wn(y,x){var R=this.__data__,H=cr(R,y);return H<0?R.push([y,x]):R[H][1]=x,this}De.prototype.clear=Ir,De.prototype.delete=Lr,De.prototype.get=Kt,De.prototype.has=ln,De.prototype.set=Wn;function qe(y){var x=-1,R=y?y.length:0;for(this.clear();++x<R;){var H=y[x];this.set(H[0],H[1])}}function Vn(){this.__data__={hash:new xt,map:new(he||De),string:new xt}}function zn(y){return Xt(this,y).delete(y)}function Yn(y){return Xt(this,y).get(y)}function Kn(y){return Xt(this,y).has(y)}function Mr(y,x){return Xt(this,y).set(y,x),this}qe.prototype.clear=Vn,qe.prototype.delete=zn,qe.prototype.get=Yn,qe.prototype.has=Kn,qe.prototype.set=Mr;function tt(y){this.__data__=new De(y)}function Qn(){this.__data__=new De}function Xn(y){return this.__data__.delete(y)}function Jn(y){return this.__data__.get(y)}function Zn(y){return this.__data__.has(y)}function ei(y,x){var R=this.__data__;if(R instanceof De){var H=R.__data__;if(!he||H.length<r-1)return H.push([y,x]),this;R=this.__data__=new qe(H)}return R.set(y,x),this}tt.prototype.clear=Qn,tt.prototype.delete=Xn,tt.prototype.get=Jn,tt.prototype.has=Zn,tt.prototype.set=ei;function ur(y,x){var R=dr(y)||fr(y)?ne(y.length,String):[],H=R.length,fe=!!H;for(var se in y)(x||it.call(y,se))&&!(fe&&(se=="length"||fi(se,H)))&&R.push(se);return R}function fn(y,x,R){var H=y[x];(!(it.call(y,x)&&yn(H,R))||R===void 0&&!(x in y))&&(y[x]=R)}function cr(y,x){for(var R=y.length;R--;)if(yn(y[R][0],x))return R;return-1}function ct(y,x){return y&&Fr(x,En(x),y)}function kr(y,x,R,H,fe,se,pe){var me;if(H&&(me=se?H(y,fe,se,pe):H(y)),me!==void 0)return me;if(!vt(y))return y;var Me=dr(y);if(Me){if(me=li(y),!x)return ui(y,me)}else{var be=At(y),Ge=be==c||be==h;if(vn(y))return lr(y,x);if(be==p||be==o||Ge&&!se){if(je(y))return se?y:{};if(me=pt(Ge?{}:y),!x)return ci(y,ct(me,y))}else{if(!X[be])return se?y:{};me=It(y,be,kr,x)}}pe||(pe=new tt);var Xe=pe.get(y);if(Xe)return Xe;if(pe.set(y,me),!Me)var Be=R?Dr(y):En(y);return ut(Be||y,function(We,$e){Be&&($e=We,We=y[$e]),fn(me,$e,kr(We,x,R,H,$e,y,pe))}),me}function ti(y){return vt(y)?P(y):{}}function ri(y,x,R){var H=x(y);return dr(y)?H:ft(H,R(y))}function ni(y){return Ke.call(y)}function ii(y){if(!vt(y)||hi(y))return!1;var x=Ur(y)||je(y)?xr:J;return x.test(Qe(y))}function oi(y){if(!mn(y))return Se(y);var x=[];for(var R in Object(y))it.call(y,R)&&R!="constructor"&&x.push(R);return x}function lr(y,x){if(x)return y.slice();var R=new y.constructor(y.length);return y.copy(R),R}function Br(y){var x=new y.constructor(y.byteLength);return new v(x).set(new v(y)),x}function Qt(y,x){var R=x?Br(y.buffer):y.buffer;return new y.constructor(R,y.byteOffset,y.byteLength)}function dn(y,x,R){var H=x?R(wt(y),!0):wt(y);return bt(H,Pe,new y.constructor)}function hn(y){var x=new y.constructor(y.source,V.exec(y));return x.lastIndex=y.lastIndex,x}function pn(y,x,R){var H=x?R(Nt(y),!0):Nt(y);return bt(H,Ae,new y.constructor)}function ai(y){return un?Object(un.call(y)):{}}function si(y,x){var R=x?Br(y.buffer):y.buffer;return new y.constructor(R,y.byteOffset,y.length)}function ui(y,x){var R=-1,H=y.length;for(x||(x=Array(H));++R<H;)x[R]=y[R];return x}function Fr(y,x,R,H){R||(R={});for(var fe=-1,se=x.length;++fe<se;){var pe=x[fe],me=H?H(R[pe],y[pe],pe,R,y):void 0;fn(R,pe,me===void 0?y[pe]:me)}return R}function ci(y,x){return Fr(y,Ot(y),x)}function Dr(y){return ri(y,En,Ot)}function Xt(y,x){var R=y.__data__;return di(x)?R[typeof x=="string"?"string":"hash"]:R.map}function ht(y,x){var R=Ye(y,x);return ii(R)?R:void 0}var Ot=le?Vt(le,Object):bn,At=ni;(Te&&At(new Te(new ArrayBuffer(1)))!=N||he&&At(new he)!=d||dt&&At(dt.resolve())!=m||sr&&At(new sr)!=T||Or&&At(new Or)!=A)&&(At=function(y){var x=Ke.call(y),R=x==p?y.constructor:void 0,H=R?Qe(R):void 0;if(H)switch(H){case Ar:return N;case Yt:return d;case Cr:return m;case Rr:return T;case Nr:return A}return x});function li(y){var x=y.length,R=y.constructor(x);return x&&typeof y[0]=="string"&&it.call(y,"index")&&(R.index=y.index,R.input=y.input),R}function pt(y){return typeof y.constructor=="function"&&!mn(y)?ti(C(y)):{}}function It(y,x,R,H){var fe=y.constructor;switch(x){case w:return Br(y);case a:case u:return new fe(+y);case N:return Qt(y,H);case F:case B:case G:case W:case z:case $:case Y:case te:case K:return si(y,H);case d:return dn(y,H,R);case l:case _:return new fe(y);case b:return hn(y);case T:return pn(y,H,R);case E:return ai(y)}}function fi(y,x){return x=x??i,!!x&&(typeof y=="number"||de.test(y))&&y>-1&&y%1==0&&y<x}function di(y){var x=typeof y;return x=="string"||x=="number"||x=="symbol"||x=="boolean"?y!=="__proto__":y===null}function hi(y){return!!He&&He in y}function mn(y){var x=y&&y.constructor,R=typeof x=="function"&&x.prototype||St;return y===R}function Qe(y){if(y!=null){try{return Tt.call(y)}catch{}try{return y+""}catch{}}return""}function gn(y){return kr(y,!0,!0)}function yn(y,x){return y===x||y!==y&&x!==x}function fr(y){return pi(y)&&it.call(y,"callee")&&(!D.call(y,"callee")||Ke.call(y)==o)}var dr=Array.isArray;function hr(y){return y!=null&&_n(y.length)&&!Ur(y)}function pi(y){return $r(y)&&hr(y)}var vn=we||mi;function Ur(y){var x=vt(y)?Ke.call(y):"";return x==c||x==h}function _n(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=i}function vt(y){var x=typeof y;return!!y&&(x=="object"||x=="function")}function $r(y){return!!y&&typeof y=="object"}function En(y){return hr(y)?ur(y):oi(y)}function bn(){return[]}function mi(){return!1}e.exports=gn})(zo,zo.exports);var bb=zo.exports;const wb=qt(bb);var Sb="Expected a function",Yp="__lodash_hash_undefined__",Kp=1/0,Tb=9007199254740991,xb="[object Function]",Ob="[object GeneratorFunction]",Ab="[object Symbol]",Cb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rb=/^\w*$/,Nb=/^\./,Pb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ib=/[\\^$.*+?()[\]{}|]/g,Lb=/\\(\\)?/g,Mb=/^\[object .+?Constructor\]$/,kb=/^(?:0|[1-9]\d*)$/,Bb=typeof ce=="object"&&ce&&ce.Object===Object&&ce,Fb=typeof self=="object"&&self&&self.Object===Object&&self,Xu=Bb||Fb||Function("return this")();function Db(e,t){return e==null?void 0:e[t]}function Ub(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var $b=Array.prototype,jb=Function.prototype,Qp=Object.prototype,Ms=Xu["__core-js_shared__"],nd=function(){var e=/[^.]+$/.exec(Ms&&Ms.keys&&Ms.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Xp=jb.toString,oa=Qp.hasOwnProperty,Jp=Qp.toString,Hb=RegExp("^"+Xp.call(oa).replace(Ib,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),id=Xu.Symbol,qb=$b.splice,Gb=Zp(Xu,"Map"),Ki=Zp(Object,"create"),od=id?id.prototype:void 0,ad=od?od.toString:void 0;function en(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Wb(){this.__data__=Ki?Ki(null):{}}function Vb(e){return this.has(e)&&delete this.__data__[e]}function zb(e){var t=this.__data__;if(Ki){var r=t[e];return r===Yp?void 0:r}return oa.call(t,e)?t[e]:void 0}function Yb(e){var t=this.__data__;return Ki?t[e]!==void 0:oa.call(t,e)}function Kb(e,t){var r=this.__data__;return r[e]=Ki&&t===void 0?Yp:t,this}en.prototype.clear=Wb;en.prototype.delete=Vb;en.prototype.get=zb;en.prototype.has=Yb;en.prototype.set=Kb;function Un(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Qb(){this.__data__=[]}function Xb(e){var t=this.__data__,r=aa(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():qb.call(t,r,1),!0}function Jb(e){var t=this.__data__,r=aa(t,e);return r<0?void 0:t[r][1]}function Zb(e){return aa(this.__data__,e)>-1}function ew(e,t){var r=this.__data__,n=aa(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Un.prototype.clear=Qb;Un.prototype.delete=Xb;Un.prototype.get=Jb;Un.prototype.has=Zb;Un.prototype.set=ew;function on(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function tw(){this.__data__={hash:new en,map:new(Gb||Un),string:new en}}function rw(e){return sa(this,e).delete(e)}function nw(e){return sa(this,e).get(e)}function iw(e){return sa(this,e).has(e)}function ow(e,t){return sa(this,e).set(e,t),this}on.prototype.clear=tw;on.prototype.delete=rw;on.prototype.get=nw;on.prototype.has=iw;on.prototype.set=ow;function aw(e,t,r){var n=e[t];(!(oa.call(e,t)&&em(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function aa(e,t){for(var r=e.length;r--;)if(em(e[r][0],t))return r;return-1}function sw(e){if(!Yo(e)||pw(e))return!1;var t=vw(e)||Ub(e)?Hb:Mb;return t.test(yw(e))}function uw(e,t,r,n){if(!Yo(e))return e;t=dw(t,e)?[t]:lw(t);for(var i=-1,o=t.length,s=o-1,a=e;a!=null&&++i<o;){var u=gw(t[i]),f=r;if(i!=s){var c=a[u];f=n?n(c,u,a):void 0,f===void 0&&(f=Yo(c)?c:fw(t[i+1])?[]:{})}aw(a,u,f),a=a[u]}return e}function cw(e){if(typeof e=="string")return e;if(Zu(e))return ad?ad.call(e):"";var t=e+"";return t=="0"&&1/e==-Kp?"-0":t}function lw(e){return tm(e)?e:mw(e)}function sa(e,t){var r=e.__data__;return hw(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Zp(e,t){var r=Db(e,t);return sw(r)?r:void 0}function fw(e,t){return t=t??Tb,!!t&&(typeof e=="number"||kb.test(e))&&e>-1&&e%1==0&&e<t}function dw(e,t){if(tm(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Zu(e)?!0:Rb.test(e)||!Cb.test(e)||t!=null&&e in Object(t)}function hw(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function pw(e){return!!nd&&nd in e}var mw=Ju(function(e){e=Ew(e);var t=[];return Nb.test(e)&&t.push(""),e.replace(Pb,function(r,n,i,o){t.push(i?o.replace(Lb,"$1"):n||r)}),t});function gw(e){if(typeof e=="string"||Zu(e))return e;var t=e+"";return t=="0"&&1/e==-Kp?"-0":t}function yw(e){if(e!=null){try{return Xp.call(e)}catch{}try{return e+""}catch{}}return""}function Ju(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(Sb);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(Ju.Cache||on),r}Ju.Cache=on;function em(e,t){return e===t||e!==e&&t!==t}var tm=Array.isArray;function vw(e){var t=Yo(e)?Jp.call(e):"";return t==xb||t==Ob}function Yo(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function _w(e){return!!e&&typeof e=="object"}function Zu(e){return typeof e=="symbol"||_w(e)&&Jp.call(e)==Ab}function Ew(e){return e==null?"":cw(e)}function bw(e,t,r){return e==null?e:uw(e,t,r)}var ww=bw;const Sw=qt(ww),Tw=(e,t)=>{Array.isArray(t)||(t=[t]);const r=wb(e);return t.forEach(({type:n,value:i})=>{Sw(r,n,i)}),r},rm=e=>{const t=[];return e.forEach(r=>{const n=parseInt(r);isNaN(n)||t.push(n)}),t.sort((r,n)=>r-n)},nm=(e,t,r)=>{let n=r.mobile;for(const i in t){const o=parseInt(String(t[i]));if(e>=o)n=r[o];else if(e<o)break}return n},xw=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),Ow=e=>{let o;try{o=new Date().getTime()-new Date(e).getTime()}catch{return""}const s=o/36e5,a=Math.floor(o/864e5);if(a<1)return s<1?{path:"now"}:{path:"hours",number:Math.floor(s)};if(a<7)return{path:"days",number:a};const u=Math.floor(a/7);return u<=52?{path:"weeks",number:u}:{path:"years",number:Math.floor(a/365)}},Aw=e=>new Promise(t=>setTimeout(t,e)),ec={apolitical:"Apolitical",breadcrumbs_label:"Go back to:",breadcrumbs_currentPage:"Current page:",card_bootcamp:"Email boot camp",card_ended:"Ended",card_registered:"Registered",card_answers:"{number, plural, =0 {0 answers} one {# answer} other {# answers}}",card_time_ago:"{time} ago",card_time_read:"{time} min read",card_watch:"Watch recording",card_cta_people:"View profile",collapsibleSection_summary:"Find out more",communityDetails_members:"Members",communityDetails_viewAll:"View all",communityDetails_invite:"Invite colleagues",contactFooter_title:"Contact us",contactFooter_text:"We're always open to new ideas, so please reach out to see how we can collaborate.",contactFooter_phone:"+44 203 608 2241",contactFooter_email:"hello@apolitical.co",contactForm_name:"Name",contactForm_email:"Email address",contactForm_organisation:"Government department or organisation",contactForm_interests:"I'm interested in",contactForm_interests_publishingCourse:"Publishing or creating a course",contactForm_interests_buyingCourse:"Buying courses for my team",contactForm_interests_learningExperience:"Customised learning experiences",contactForm_interests_somethingElse:"Something else",contactForm_message:"Message",cookieBanner_title:"Cookies and your privacy",cookieBanner_text:"We take your trust and privacy very seriously. Apolitical uses safe cookies (small files on your device) to run the site. You can reject non-essential cookies, but some site features may not work without them.",cookieBanner_buttons_settings:"Change my settings",cookieBanner_buttons_reject:"Reject all",cookieBanner_buttons_accept:"Accept all",dates_now:"now",dates_hours:"{number}h",dates_days:"{number}d",dates_weeks:"{number}w",dates_years:"{number}y",discussion_action_answer:"answer",discussion_action_comment:"comment",discussion_action_post:"post",discussion_action_response:"response",discussion_action_reply:"reply",discussion_action_question:"question",discussion_edited:"Edited",discussion_delete_title:"Delete {action}",discussion_delete_text:"<p>Are you sure you want to delete your {action}?</p><p>This can't be undone.</p>",discussion_delete_cancel:"Cancel",discussion_delete_delete:"Delete",discussion_delete_error:"We are unable to delete your {action} at the moment. Please try again later or contact us if problem persists.",discussion_reply:"Reply",discussion_report_subject:"Report a post on Apolitical",discussion_report_body:`I'd like to report the {contentType} <{contentSlug}> at {contentUrl}.
62
62
 
63
63
  Please explain why you're reporting this post. Reasons could include: inappropriate language, harassment, spam, hate speech, false information, among others. Include as much detail as you feel comfortable.
64
64
 
65
- Thank you for helping to protect the Apolitical community from abusive content.`,discussion_form_title:"Write your {action}",discussion_form_placeholder:"Type your {action} here...",discussion_form_label:"Your {action}",discussion_form_explainer:"Try to make your {action} specific and practical. Be respectful and kind. See our <a>community guidelines</a>",discussion_form_success:"Your {action} has been submitted.",discussion_form_post:"Post",discussion_form_posting:"Posting...",discussion_form_save:"Save",discussion_form_saving:"Saving...",discussion_form_cancel:"Cancel",discussion_form_submitting:"Submitting...",discussion_form_placeholder_post:"Write something...",discussion_form_error:"We are unable to process your {action} right now. Please try again later or contact us if the problem persists",discussion_form_error_tooLong:"Please keep your content to {maxLength, plural, one {1 character} other {# characters}}.",discussion_form_error_tooMany:"You have posted too many times in a row. Please wait and try again.",discussion_form_error_loggedOut:"Please log in to submit your {action}.",discussion_form_error_noPermission:"You do not have permission to {action}.",discussion_form_error_alreadyExists:"This {action} already exists.",discussion_form_title_question:"Start a conversation",discussion_form_placeholder_question:"Ask your question here",discussion_form_explainer_question:"Unsure what you can post? See our <a>community guidelines</a>.",discussion_likes:"{number, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_likes_short:"{number}",discussion_likes_more:"and {number} more...",discussion_moreMenu_edit:"Edit",discussion_moreMenu_delete:"Delete",discussion_moreMenu_report:"Report",discussion_comments_screenReader:"See {count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_comments:"{count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_responses_answer:"Answers",discussion_responses_comment:"Comments",discussion_responses_title:"{action} ({count})",discussion_responses_empty:"Be the first to respond",discussion_responses_empty_answer:"Be the first to answer this question",discussion_thread_show:"Show {count, plural, =0 {replies} one {# reply} other {# replies}}",discussion_thread_hide:"Hide replies",emailHelperTextBox_fallback_title:"Who can join",emailHelperTextBox_fallback_text:"Apolitical is a private community for public servants and policymakers.",emailHelperTextBox_default_title:"Who can join",emailHelperTextBox_default_text:"Apolitical is a private community for public servants and policymakers. <link>Learn more</link>.",emailHelperTextBox_autoApproved_title:"Email check",emailHelperTextBox_autoApproved_text:"Great! Looks like you are using a **government email domain we recognise.** You will be **auto-approved** once you sign up.",emailHelperTextBox_unrecognisedEmail_title:"Not a recognised government email",emailHelperTextBox_unrecognisedEmail_text:"To confirm you work in government or policy, please add more details below. <link>Learn more</link>.",emailHelperTextBox_pendingApproval_title:"Email is pending approval",emailHelperTextBox_pendingApproval_text:"Looks like this email has been used to sign up to Apolitical before, but <strong>we have not yet approved it.</strong> If you cannot wait to join, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_emailUnverified_title:"Hello again!",emailHelperTextBox_emailUnverified_text:"It looks like you're already an Apolitical member. To access your account, please verify your email address. <link>Click here to get a verification code sent to your email</link>.",emailHelperTextBox_emailAlreadyExists_title:"Email is already registered",emailHelperTextBox_emailAlreadyExists_text:"Looks like this email has been used to sign up to Apolitical before, try <link>logging in</link> instead. If you're still having issues, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_error_verificationFailedToSend_title:"Verification code failed to send",emailHelperTextBox_error_verificationFailedToSend_text:"Error details: <em>{error}</em>{br}<link>Click here to try again</link>.{br}If you continue to have problems, contact us at <mail>concierge@apolitical.co</mail>",emailHelperTextBox_error_noFunction:"Cannot resend verification code.",filters_all:"Show all",filters_disabled:"{name} - no results",footer_platform:"Platform",footer_platform_events:"Events",footer_platform_courses:"Courses",footer_platform_qanda:"Q&A",footer_platform_articles:"Articles",footer_community:"Community",footer_community_support:"Support FAQ",footer_community_post:"Post on Apolitical",footer_community_join:"Who can join",footer_community_guidelines:"Guidelines & values",footer_company:"Company",footer_company_story:"Our story",footer_company_team:"Meet our team",footer_company_careers:"Careers",footer_company_partner:"Partner with us",footer_company_contact:"Get in touch",footer_legal:"Legal",footer_legal_privacy:"Privacy policy",footer_legal_terms:"Terms & conditions",footer_legal_cookie:"Cookie policy",footer_legal_accessibility:"Accessibility statement",footer_legal_dataProtection:"Data protection officer",footer_legal_euDataProtection:"EU data protection officer",footer_contact:"Contact",footer_contact_correspondence:"Correspondence address",footer_contact_correspondence_address:"251 Southwark Bridge Road{br}London, SE1 6FL{br}United Kingdom",footer_contact_registered:"Registered address",footer_contact_registered_address:"20–22 Wenlock Road{br}London, N1 7GU{br}United Kingdom",footer_contact_berlin:"Berlin address",footer_contact_berlin_address:"Torstraße 220{br}10115 Berlin{br}Germany",footer_contact_support:"For platform support",footer_contact_business:"For business inquiries",footer_social_linkedin:"LinkedIn",footer_social_twitter:"Twitter",footer_social_facebook:"Facebook",footer_copyright:"Copyright © {currentYear} Apolitical Group Limited",form_fieldWrapper_required:"required",form_fieldWrapper_characterLimit:"Character limit:",form_error_generalError:"Sorry, something has gone. Please refresh the page and try again.",form_error_required:"Please fill in this required field",form_error_numbers:"Numbers are not allowed in this text field",form_error_email:"Please enter a valid email address",form_error_url:"Please enter a valid URL",form_submit:"Submit",form_submitting:"Submitting form...",form_submitted:"Submitted",header_skip:"Skip to main content",header_search_show:"Show search bar",header_search_hide:"Close search bar",header_menu_show:"Show navigation",header_menu_hide:"Close navigation",header_home_loggedOut:"Home",header_home_loggedIn:"My Home",header_topics:"Topics",header_topics_explore:"Explore",header_topics_explore_events:"Events",header_topics_explore_courses:"Courses","header_topics_explore_q-and-a":"Q&A",header_topics_explore_articles:"Articles",header_topics_topics:"Topics",header_topics_topics_climate:"Climate","header_topics_topics_cities-and-local-government":"Cities and local government","header_topics_topics_digital-and-data":"Digital and data",header_topics_topics_education:"Education","header_topics_topics_equity-justice-and-inclusion":"Equity, justice and inclusion","header_topics_topics_health-and-social-care":"Health and social care",header_topics_topics_innovation:"Innovation","header_topics_topics_leadership-and-skills":"Leadership and skills","header_topics_topics_life-in-government":"Life in government",header_topics_topics_policymaking:"Policymaking","header_topics_topics_transport-and-infrastructure":"Transport and infrastructure","header_topics_topics_work-and-the-economy":"Work and the economy",header_partners:"For partners",header_account:"My account",header_account_show:"Show account menu",header_account_hide:"Close account menu",header_account_profile:"My profile",header_account_settings:"Settings & privacy","header_account_log-out":"Log out",header_buttons_login:"Log in",header_buttons_signup:"Sign up",hideShowTextBox_hide:"View less",hideShowTextBox_show:"View more",joinCommunityButton:"Join community",joinCommunityButton_short:"Join",joinCommunityButton_joining:"Joining...",joinCommunityButton_member:"Member",joinCommunityButton_member_aria:"Leave community",joinCommunityButton_leave:"Leave",joinCommunityButton_leaving:"Leaving...",loadMore_button:"Load more",loadMore_endOfFeed:"You're all caught up",loadMore_error:"We're having trouble loading more content. Please refresh the page or try again later.",loadingBlock_loading:"Loading...",loadingBlock_almostDone:"Almost done...",loadingBlock_complete:"Complete!",markdown_collapsibleSection_summary:"Resources",markdown_skip_video:"Skip past video",markdown_skip_padlet:"Skip past interactive board",markdown_skip_poll:"Skip past poll",markdown_skip:"Skip to next section",markdown_iframe_title:"Course information",markdown_iframe_video:"Video",markdown_iframe_padlet:"Interactive board",markdown_iframe_poll:"Poll",member_apolitical:"Apolitical",member_community:"Community post",membersList:"Members",membersList_admin:"Admin",moreMenu:"See more options",overlay_close:"Close",pageLayout_error:"An error occurred while rendering this page. Please refresh the page or try again later.",passwordRules_intro:"We advise you not to use your name or email in your password.",passwordRules_rule_label:"Password",passwordRules_rule_8Characters:"must be longer than 8 characters",passwordRules_rule_numberSymbol:"must include a number and a symbol",passwordRules_rule_lowercaseUppercase:"must include both lower and upper case characters",passwordRules_notMet:"Your password does not meet this requirement",progressBar:"{number}% loaded",ratings_text:"Rate answer",ratings_stars:"{number} out of {total}",ratings_low:"this is incorrect or confusing",ratings_high:"this is a fantastic answer",ratings_success:"Thank you!",search_label:"Search for:",search_placeholder:"Ask Apolitical",search_clear:"Clear search",search_cta:"Search",signup_title:"Sign up",signup_full_name:"Full name",signup_full_name_placeholder:"Lionel Messi",signup_email_address:"Work email",signup_email_address_placeholder:"lionel.messi@argentina.gov",signup_job_title:"Job title",signup_job_title_placeholder:"e.g. Senior Policy Advisor",signup_organization:"Organisation",signup_organization_placeholder:"e.g. Department of Justice",signup_url:"Link to official government bio / LinkedIn <small>(optional)</small>",signup_url_placeholder:"https://organisation.com/bio",signup_expectation:"What do you want to know<small>Optional, but we will use your response to build the session!</small>",signup_expectation_placeholder:"What do you want to know?",signup_terms:"I accept Apolitical's <terms>Terms of Service</terms>, <privacy>Privacy Policy</privacy> and that I'll get essential emails for my use of Apolitical",signup_error:"We're really sorry, but we've had a problem trying to sign you up. This could be an issue with our system, so we suggest you try again later.",signup_button_join:"Join for free",signup_button_login:"Log in",signup_submitting:"Submitting form...",signup_success_title:"Thank you for applying to join Apolitical!",signup_success_text:"<p>Once we've vetted your application, you'll get a secure login link to help you get started.</p><p>Please note that trust is everything to our community, so you can't login until your identity has been verified.</p>",sharedLinks_copy_text:"Copy link",tags_community:"From the community",tooltip_loading:"Loading..."},Cw={collapsibleSection_summary:"En savoir plus"},Rw=Object.freeze(Object.defineProperty({__proto__:null,en:ec,fr:Cw},Symbol.toStringTag,{value:"Module"})),Ft=(e,t,r,n,i={})=>{let o="";return`${t}_${r}`in ec?o=e({id:`${t}_${r}`},i):o=e({id:t},{[n]:r,...i}),o},Nw=(e,t,r)=>{if(!e||e===0)return"0";t||(t=0),r||(r=["k","m","b","t"]);let n=e.toString();t=Math.pow(10,t);for(let i=r.length-1;i>=0;i--){const o=Math.pow(10,(i+1)*3);if(o<=e){e=Math.round(e*t/o)/t,e===1e3&&i<r.length-1&&(e=1,i++),n=`${e}${r[i]}`;break}}return n},im=(e,t)=>U.Children.map(e,r=>U.cloneElement(r,{...t})),Pw=e=>e.replace(/\s+/g,"").length>0,Ue=({variant:e="primary",size:t="medium",styling:r={muted:!1,fullWidth:!1},icon:n=!1,href:i=!1,element:o="button",onClick:s=!1,className:a="",disabled:u=!1,screenreaderText:f=!1,children:c=!1,...h})=>{const l=ro(typeof t=="object");if(typeof t=="object"&&typeof l=="number"){const b=Object.assign({},t),T=rm(Object.keys(b));t=nm(l,T,b)}const p=[];typeof t=="string"&&p.push(t),n&&(p.push("icon"),typeof n=="object"?(p.push(n.icon),n.position?p.push(n.position):p.push("left"),n.hover&&p.push(`hover_${n.hover}`),n.animate&&(p.push("animate"),typeof n.animate=="string"&&p.push(n.animate))):(p.push(n),!n.includes("right")&&!n.includes("left")&&p.push("left"))),r.muted&&p.push("muted"),r.fullWidth&&p.push("full-width");const m={...h,className:ie(e,a,p,{"no-text":!c,disabled:u,button:i}),onClick:b=>{(!i||i[0]==="#")&&s&&(b.preventDefault(),b.stopPropagation()),s&&s(b)},disabled:typeof u=="object"&&"isClickable"in u?!u.isClickable:u};return i&&(o="a",m.href=i),U.createElement(o,m,c||(f?O.jsx(Je,{showOnFocus:!1,children:f}):null))},no=({buttons:e,className:t="",...r})=>{const n=e.length>1?"ul":"p",i=e.map((o,s)=>n==="p"?O.jsx(Ue,{...o},s):O.jsx("li",{children:O.jsx(Ue,{...o})},s));return U.createElement(n,{className:ie("button-wrapper",t),...r,children:i})};const Ko=({maxWidth:e=!1})=>{const t=e?{"--max-width":`${e/16}rem`}:{};return O.jsx("hr",{className:ie({"has-max-width":e}),style:t})},ua=({href:e,children:t,className:r="",onClick:n,gtmContext:i,gtmType:o,...s})=>{if(e){const a={...s};return n&&(a.onClick=n),i&&(a["data-gtm-event-context"]=i),o&&(a["data-gtm-event-type"]=o),O.jsx(Ze.Link,{to:e,className:ie("gtm-trackable",r),...a,children:t})}return t},sd={card:{range:[{height:320,width:320},{height:425,width:687},{height:510,width:768}],sizes:"(min-width: 1024px) 720px, 30vw"},responsiveCard:{range:[{height:125,width:200},{height:188,width:300},{height:313,width:500}],sizes:"(min-width: 1024px) 720px, 30vw"},banner:{range:[{height:124,width:425},{height:320,width:768},{height:510,width:1368}],sizes:"(min-width: 1024px) 975px, 50vw"},feed:{range:[{height:270,width:124},{height:320,width:425},{height:425,width:687}],sizes:"(min-width: 1024px) 510px, 20vw"},fallback:{range:[{height:124,width:375},{height:320,width:687},{height:510,width:990}],sizes:"(min-width: 1024px) 885px, 35vw"},thumbnail:{range:[{height:124,width:124},{height:320,width:320},{height:510,width:510}],sizes:"(min-width: 1024px) 453px, 20vw"}},Iw=({aspect:e,range:t,sizes:r})=>{const{range:n,sizes:i}=e?sd[e]:sd.fallback;return{range:t&&t.length>0?t:n,sizes:r||i}},Lw=({format:e,height:t,query:r,width:n})=>{let i=`w=${n}&h=${t}`;return i=e?`${i}&fm=${e}`:i,i=r?`${i}&${r}`:i,i},Ms=({format:e,range:t,url:r,query:n})=>t.map(({height:i,width:o})=>`${r}?${Lw({format:e,height:i,query:n,width:o})} ${o}w`).join(", ");const om=({image:e,className:t,testId:r})=>{const{description:n,height:i,type:o,query:s,url:a,width:u,loading:f,decoding:c,fetchPriority:h}=e,{range:d,sizes:l}=Iw(e),p=Ms({format:"avif",query:s,range:d,url:a}),m=Ms({format:"webp",query:s,range:d,url:a}),b=Ms({format:"",query:s,range:d,url:a});return O.jsxs("picture",{className:t,children:[o!=="image/gif"&&O.jsx("source",{type:"image/avif",srcSet:p,sizes:l,"data-testid":"source"}),O.jsx("source",{type:"image/webp",srcSet:m,sizes:l,"data-testid":"source"}),O.jsx("img",{srcSet:b,sizes:l,src:a,alt:n,loading:f||"lazy",decoding:c||"async",fetchpriority:h||"auto",width:u,height:i,"data-testid":r||"image"})]})};var vu=function(e,t){return vu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},vu(e,t)};function _t(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");vu(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var ae=function(){return ae=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},ae.apply(this,arguments)};function Ln(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function jt(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function am(e,t,r){if(r===void 0&&(r=Error),!e)throw new r(t)}var ye;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(ye||(ye={}));var Le;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(Le||(Le={}));var kn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(kn||(kn={}));function ud(e){return e.type===Le.literal}function kw(e){return e.type===Le.argument}function sm(e){return e.type===Le.number}function um(e){return e.type===Le.date}function cm(e){return e.type===Le.time}function lm(e){return e.type===Le.select}function fm(e){return e.type===Le.plural}function Mw(e){return e.type===Le.pound}function dm(e){return e.type===Le.tag}function hm(e){return!!(e&&typeof e=="object"&&e.type===kn.number)}function _u(e){return!!(e&&typeof e=="object"&&e.type===kn.dateTime)}var pm=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Bw=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Fw(e){var t={};return e.replace(Bw,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"short":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var Dw=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Uw(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Dw).filter(function(d){return d.length>0}),r=[],n=0,i=t;n<i.length;n++){var o=i[n],s=o.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var a=s[0],u=s.slice(1),f=0,c=u;f<c.length;f++){var h=c[f];if(h.length===0)throw new Error("Invalid number skeleton")}r.push({stem:a,options:u})}return r}function $w(e){return e.replace(/^(.*?)-/,"")}var cd=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,mm=/^(@+)?(\+|#+)?[rs]?$/g,jw=/(\*)(0+)|(#+)(0+)|(0+)/g,gm=/^(0+)$/;function ld(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(mm,function(r,n,i){return typeof i!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):i==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),t}function ym(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Hw(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!gm.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function fd(e){var t={},r=ym(e);return r||t}function qw(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=$w(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=ae(ae(ae({},t),{notation:"scientific"}),i.options.reduce(function(u,f){return ae(ae({},u),fd(f))},{}));continue;case"engineering":t=ae(ae(ae({},t),{notation:"engineering"}),i.options.reduce(function(u,f){return ae(ae({},u),fd(f))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(jw,function(u,f,c,h,d,l){if(f)t.minimumIntegerDigits=c.length;else{if(h&&d)throw new Error("We currently do not support maximum integer digits");if(l)throw new Error("We currently do not support exact integer digits")}return""});continue}if(gm.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(cd.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(cd,function(u,f,c,h,d,l){return c==="*"?t.minimumFractionDigits=f.length:h&&h[0]==="#"?t.maximumFractionDigits=h.length:d&&l?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.length+l.length):(t.minimumFractionDigits=f.length,t.maximumFractionDigits=f.length),""});var o=i.options[0];o==="w"?t=ae(ae({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=ae(ae({},t),ld(o)));continue}if(mm.test(i.stem)){t=ae(ae({},t),ld(i.stem));continue}var s=ym(i.stem);s&&(t=ae(ae({},t),s));var a=Hw(i.stem);a&&(t=ae(ae({},t),a))}return t}var No={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Gw(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if(i==="j"){for(var o=0;n+1<e.length&&e.charAt(n+1)===i;)o++,n++;var s=1+(o&1),a=o<2?1:3+(o>>1),u="a",f=Ww(t);for((f=="H"||f=="k")&&(a=0);a-- >0;)r+=u;for(;s-- >0;)r=f+r}else i==="J"?r+="H":r+=i}return r}function Ww(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=No[n||""]||No[r||""]||No["".concat(r,"-001")]||No["001"];return i[0]}var Bs,Vw=new RegExp("^".concat(pm.source,"*")),zw=new RegExp("".concat(pm.source,"*$"));function _e(e,t){return{start:e,end:t}}var Yw=!!String.prototype.startsWith,Kw=!!String.fromCodePoint,Qw=!!Object.fromEntries,Xw=!!String.prototype.codePointAt,Jw=!!String.prototype.trimStart,Zw=!!String.prototype.trimEnd,eS=!!Number.isSafeInteger,tS=eS?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Eu=!0;try{var rS=_m("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Eu=((Bs=rS.exec("a"))===null||Bs===void 0?void 0:Bs[0])==="a"}catch{Eu=!1}var dd=Yw?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},bu=Kw?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,o=0,s;i>o;){if(s=t[o++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},hd=Qw?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var o=i[n],s=o[0],a=o[1];r[s]=a}return r},vm=Xw?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var i=t.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},nS=Jw?function(t){return t.trimStart()}:function(t){return t.replace(Vw,"")},iS=Zw?function(t){return t.trimEnd()}:function(t){return t.replace(zw,"")};function _m(e,t){return new RegExp(e,t)}var wu;if(Eu){var pd=_m("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");wu=function(t,r){var n;pd.lastIndex=r;var i=pd.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else wu=function(t,r){for(var n=[];;){var i=vm(t,r);if(i===void 0||Em(i)||uS(i))break;n.push(i),r+=i>=65536?2:1}return bu.apply(void 0,n)};var oS=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(t,n);if(s.err)return s;i.push(s.val)}else{if(o===125&&t>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:Le.pound,location:_e(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(ye.UNMATCHED_CLOSING_TAG,_e(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Su(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Le.literal,value:"<".concat(i,"/>"),location:_e(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,r,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Su(this.char()))return this.error(ye.INVALID_TAG,_e(a,this.clonePosition()));var u=this.clonePosition(),f=this.parseTagName();return i!==f?this.error(ye.UNMATCHED_CLOSING_TAG,_e(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Le.tag,value:i,children:s,location:_e(n,this.clonePosition())},err:null}:this.error(ye.INVALID_TAG,_e(a,this.clonePosition())))}else return this.error(ye.UNCLOSED_TAG,_e(n,this.clonePosition()))}else return this.error(ye.INVALID_TAG,_e(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&sS(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var s=this.tryParseUnquoted(t,r);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var u=_e(n,this.clonePosition());return{val:{type:Le.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!aS(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return bu.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),bu(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,_e(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ye.EMPTY_ARGUMENT,_e(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(ye.MALFORMED_ARGUMENT,_e(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,_e(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Le.argument,value:i,location:_e(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,_e(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(ye.MALFORMED_ARGUMENT,_e(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=wu(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),s=_e(t,o);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(a){case"":return this.error(ye.EXPECT_ARGUMENT_TYPE,_e(s,u));case"number":case"date":case"time":{this.bumpSpace();var f=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),h=this.parseSimpleArgStyleIfPossible();if(h.err)return h;var d=iS(h.val);if(d.length===0)return this.error(ye.EXPECT_ARGUMENT_STYLE,_e(this.clonePosition(),this.clonePosition()));var l=_e(c,this.clonePosition());f={style:d,styleLocation:l}}var p=this.tryParseArgumentClose(i);if(p.err)return p;var m=_e(i,this.clonePosition());if(f&&dd(f==null?void 0:f.style,"::",0)){var b=nS(f.style.slice(2));if(a==="number"){var h=this.parseNumberSkeletonFromString(b,f.styleLocation);return h.err?h:{val:{type:Le.number,value:n,location:m,style:h.val},err:null}}else{if(b.length===0)return this.error(ye.EXPECT_DATE_TIME_SKELETON,m);var T=b;this.locale&&(T=Gw(b,this.locale));var d={type:kn.dateTime,pattern:T,location:f.styleLocation,parsedOptions:this.shouldParseSkeletons?Fw(T):{}},_=a==="date"?Le.date:Le.time;return{val:{type:_,value:n,location:m,style:d},err:null}}}return{val:{type:a==="number"?Le.number:a==="date"?Le.date:Le.time,value:n,location:m,style:(o=f==null?void 0:f.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var E=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ye.EXPECT_SELECT_ARGUMENT_OPTIONS,_e(E,ae({},E)));this.bumpSpace();var A=this.parseIdentifierIfPossible(),w=0;if(a!=="select"&&A.value==="offset"){if(!this.bumpIf(":"))return this.error(ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,_e(this.clonePosition(),this.clonePosition()));this.bumpSpace();var h=this.tryParseDecimalInteger(ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ye.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(h.err)return h;this.bumpSpace(),A=this.parseIdentifierIfPossible(),w=h.val}var N=this.tryParsePluralOrSelectOptions(t,a,r,A);if(N.err)return N;var p=this.tryParseArgumentClose(i);if(p.err)return p;var F=_e(i,this.clonePosition());return a==="select"?{val:{type:Le.select,value:n,options:hd(N.val),location:F},err:null}:{val:{type:Le.plural,value:n,options:hd(N.val),offset:w,pluralType:a==="plural"?"cardinal":"ordinal",location:F},err:null}}default:return this.error(ye.INVALID_ARGUMENT_TYPE,_e(s,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,_e(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ye.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,_e(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=Uw(t)}catch{return this.error(ye.INVALID_NUMBER_SKELETON,r)}return{val:{type:kn.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?qw(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,s=!1,a=[],u=new Set,f=i.value,c=i.location;;){if(f.length===0){var h=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,ye.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;c=_e(h,this.clonePosition()),f=this.message.slice(h.offset,this.offset())}else break}if(u.has(f))return this.error(r==="select"?ye.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ye.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);f==="other"&&(s=!0),this.bumpSpace();var l=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?ye.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ye.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,_e(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,r,n);if(p.err)return p;var m=this.tryParseArgumentClose(l);if(m.err)return m;a.push([f,{value:p.val,location:_e(l,this.clonePosition())}]),u.add(f),this.bumpSpace(),o=this.parseIdentifierIfPossible(),f=o.value,c=o.location}return a.length===0?this.error(r==="select"?ye.EXPECT_SELECT_ARGUMENT_SELECTOR:ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,_e(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(ye.MISSING_OTHER_CLAUSE,_e(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var u=_e(i,this.clonePosition());return o?(s*=n,tS(s)?{val:s,err:null}:this.error(r,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=vm(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(dd(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Em(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function Su(e){return e>=97&&e<=122||e>=65&&e<=90}function aS(e){return Su(e)||e===47}function sS(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Em(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function uS(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Tu(e){e.forEach(function(t){if(delete t.location,lm(t)||fm(t))for(var r in t.options)delete t.options[r].location,Tu(t.options[r].value);else sm(t)&&hm(t.style)||(um(t)||cm(t))&&_u(t.style)?delete t.style.location:dm(t)&&Tu(t.children)})}function cS(e,t){t===void 0&&(t={}),t=ae({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new oS(e,t).parse();if(r.err){var n=SyntaxError(ye[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||Tu(r.val),r.val}function Dt(e,t){var r=t&&t.cache?t.cache:mS,n=t&&t.serializer?t.serializer:pS,i=t&&t.strategy?t.strategy:fS;return i(e,{cache:r,serializer:n})}function lS(e){return e==null||typeof e=="number"||typeof e=="boolean"}function bm(e,t,r,n){var i=lS(n)?n:r(n),o=t.get(i);return typeof o>"u"&&(o=e.call(this,n),t.set(i,o)),o}function wm(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,n),t.set(i,o)),o}function tc(e,t,r,n,i){return r.bind(t,e,n,i)}function fS(e,t){var r=e.length===1?bm:wm;return tc(e,this,r,t.cache.create(),t.serializer)}function dS(e,t){return tc(e,this,wm,t.cache.create(),t.serializer)}function hS(e,t){return tc(e,this,bm,t.cache.create(),t.serializer)}var pS=function(){return JSON.stringify(arguments)};function rc(){this.cache=Object.create(null)}rc.prototype.get=function(e){return this.cache[e]};rc.prototype.set=function(e,t){this.cache[e]=t};var mS={create:function(){return new rc}},Ut={variadic:dS,monadic:hS},Ht;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ht||(Ht={}));var Sr=function(e){_t(t,e);function t(r,n,i){var o=e.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),md=function(e){_t(t,e);function t(r,n,i,o){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Ht.INVALID_VALUE,o)||this}return t}(Sr),gS=function(e){_t(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Ht.INVALID_VALUE,i)||this}return t}(Sr),yS=function(e){_t(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),Ht.MISSING_VALUE,n)||this}return t}(Sr),at;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(at||(at={}));function vS(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==at.literal||r.type!==at.literal?t.push(r):n.value+=r.value,t},[])}function Sm(e){return typeof e=="function"}function Uo(e,t,r,n,i,o,s){if(e.length===1&&ud(e[0]))return[{type:at.literal,value:e[0].value}];for(var a=[],u=0,f=e;u<f.length;u++){var c=f[u];if(ud(c)){a.push({type:at.literal,value:c.value});continue}if(Mw(c)){typeof o=="number"&&a.push({type:at.literal,value:r.getNumberFormat(t).format(o)});continue}var h=c.value;if(!(i&&h in i))throw new yS(h,s);var d=i[h];if(kw(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?at.literal:at.object,value:d});continue}if(um(c)){var l=typeof c.style=="string"?n.date[c.style]:_u(c.style)?c.style.parsedOptions:void 0;a.push({type:at.literal,value:r.getDateTimeFormat(t,l).format(d)});continue}if(cm(c)){var l=typeof c.style=="string"?n.time[c.style]:_u(c.style)?c.style.parsedOptions:n.time.medium;a.push({type:at.literal,value:r.getDateTimeFormat(t,l).format(d)});continue}if(sm(c)){var l=typeof c.style=="string"?n.number[c.style]:hm(c.style)?c.style.parsedOptions:void 0;l&&l.scale&&(d=d*(l.scale||1)),a.push({type:at.literal,value:r.getNumberFormat(t,l).format(d)});continue}if(dm(c)){var p=c.children,m=c.value,b=i[m];if(!Sm(b))throw new gS(m,"function",s);var T=Uo(p,t,r,n,i,o),_=b(T.map(function(w){return w.value}));Array.isArray(_)||(_=[_]),a.push.apply(a,_.map(function(w){return{type:typeof w=="string"?at.literal:at.object,value:w}}))}if(lm(c)){var E=c.options[d]||c.options.other;if(!E)throw new md(c.value,d,Object.keys(c.options),s);a.push.apply(a,Uo(E.value,t,r,n,i));continue}if(fm(c)){var E=c.options["=".concat(d)];if(!E){if(!Intl.PluralRules)throw new Sr(`Intl.PluralRules is not available in this environment.
65
+ Thank you for helping to protect the Apolitical community from abusive content.`,discussion_form_title:"Write your {action}",discussion_form_placeholder:"Type your {action} here...",discussion_form_label:"Your {action}",discussion_form_explainer:"Try to make your {action} specific and practical. Be respectful and kind. See our <a>community guidelines</a>",discussion_form_success:"Your {action} has been submitted.",discussion_form_post:"Post",discussion_form_posting:"Posting...",discussion_form_save:"Save",discussion_form_saving:"Saving...",discussion_form_cancel:"Cancel",discussion_form_submitting:"Submitting...",discussion_form_placeholder_post:"Write something...",discussion_form_error:"We are unable to process your {action} right now. Please try again later or contact us if the problem persists",discussion_form_error_tooLong:"Please keep your content to {maxLength, plural, one {1 character} other {# characters}}.",discussion_form_error_tooMany:"You have posted too many times in a row. Please wait and try again.",discussion_form_error_loggedOut:"Please log in to submit your {action}.",discussion_form_error_noPermission:"You do not have permission to {action}.",discussion_form_error_alreadyExists:"This {action} already exists.",discussion_form_title_question:"Start a conversation",discussion_form_placeholder_question:"Ask your question here",discussion_form_explainer_question:"Unsure what you can post? See our <a>community guidelines</a>.",discussion_likes:"{number, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_likes_short:"{number}",discussion_likes_more:"and {number} more...",discussion_likes_like:"Like this {action}",discussion_likes_unlike:"Unlike {action}",discussion_moreMenu_edit:"Edit",discussion_moreMenu_delete:"Delete",discussion_moreMenu_report:"Report",discussion_comments_screenReader:"See {count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_comments:"{count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_responses_answer:"Answers",discussion_responses_comment:"Comments",discussion_responses_title:"{action} ({count})",discussion_responses_empty:"Be the first to respond",discussion_responses_empty_answer:"Be the first to answer this question",discussion_thread_show:"Show {count, plural, =0 {replies} one {# reply} other {# replies}}",discussion_thread_hide:"Hide replies",emailHelperTextBox_fallback_title:"Who can join",emailHelperTextBox_fallback_text:"Apolitical is a private community for public servants and policymakers.",emailHelperTextBox_default_title:"Who can join",emailHelperTextBox_default_text:"Apolitical is a private community for public servants and policymakers. <link>Learn more</link>.",emailHelperTextBox_autoApproved_title:"Email check",emailHelperTextBox_autoApproved_text:"Great! Looks like you are using a **government email domain we recognise.** You will be **auto-approved** once you sign up.",emailHelperTextBox_unrecognisedEmail_title:"Not a recognised government email",emailHelperTextBox_unrecognisedEmail_text:"To confirm you work in government or policy, please add more details below. <link>Learn more</link>.",emailHelperTextBox_pendingApproval_title:"Email is pending approval",emailHelperTextBox_pendingApproval_text:"Looks like this email has been used to sign up to Apolitical before, but <strong>we have not yet approved it.</strong> If you cannot wait to join, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_emailUnverified_title:"Hello again!",emailHelperTextBox_emailUnverified_text:"It looks like you're already an Apolitical member. To access your account, please verify your email address. <link>Click here to get a verification code sent to your email</link>.",emailHelperTextBox_emailAlreadyExists_title:"Email is already registered",emailHelperTextBox_emailAlreadyExists_text:"Looks like this email has been used to sign up to Apolitical before, try <link>logging in</link> instead. If you're still having issues, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_error_verificationFailedToSend_title:"Verification code failed to send",emailHelperTextBox_error_verificationFailedToSend_text:"Error details: <em>{error}</em>{br}<link>Click here to try again</link>.{br}If you continue to have problems, contact us at <mail>concierge@apolitical.co</mail>",emailHelperTextBox_error_noFunction:"Cannot resend verification code.",filters_all:"Show all",filters_disabled:"{name} - no results",footer_platform:"Platform",footer_platform_events:"Events",footer_platform_courses:"Courses",footer_platform_qanda:"Q&A",footer_platform_articles:"Articles",footer_community:"Community",footer_community_support:"Support FAQ",footer_community_post:"Post on Apolitical",footer_community_join:"Who can join",footer_community_guidelines:"Guidelines & values",footer_company:"Company",footer_company_story:"Our story",footer_company_team:"Meet our team",footer_company_careers:"Careers",footer_company_partner:"Partner with us",footer_company_contact:"Get in touch",footer_legal:"Legal",footer_legal_privacy:"Privacy policy",footer_legal_terms:"Terms & conditions",footer_legal_cookie:"Cookie policy",footer_legal_accessibility:"Accessibility statement",footer_legal_dataProtection:"Data protection officer",footer_legal_euDataProtection:"EU data protection officer",footer_contact:"Contact",footer_contact_correspondence:"Correspondence address",footer_contact_correspondence_address:"251 Southwark Bridge Road{br}London, SE1 6FL{br}United Kingdom",footer_contact_registered:"Registered address",footer_contact_registered_address:"20–22 Wenlock Road{br}London, N1 7GU{br}United Kingdom",footer_contact_berlin:"Berlin address",footer_contact_berlin_address:"Torstraße 220{br}10115 Berlin{br}Germany",footer_contact_support:"For platform support",footer_contact_business:"For business inquiries",footer_social_linkedin:"LinkedIn",footer_social_twitter:"Twitter",footer_social_facebook:"Facebook",footer_copyright:"Copyright © {currentYear} Apolitical Group Limited",form_fieldWrapper_required:"required",form_fieldWrapper_characterLimit:"Character limit:",form_error_generalError:"Sorry, something has gone. Please refresh the page and try again.",form_error_required:"Please fill in this required field",form_error_numbers:"Numbers are not allowed in this text field",form_error_email:"Please enter a valid email address",form_error_url:"Please enter a valid URL",form_submit:"Submit",form_submitting:"Submitting form...",form_submitted:"Submitted",header_skip:"Skip to main content",header_search_show:"Show search bar",header_search_hide:"Close search bar",header_menu_show:"Show navigation",header_menu_hide:"Close navigation",header_home_loggedOut:"Home",header_home_loggedIn:"My Home",header_topics:"Topics",header_topics_explore:"Explore",header_topics_explore_events:"Events",header_topics_explore_courses:"Courses","header_topics_explore_q-and-a":"Q&A",header_topics_explore_articles:"Articles",header_topics_topics:"Topics",header_topics_topics_climate:"Climate","header_topics_topics_cities-and-local-government":"Cities and local government","header_topics_topics_digital-and-data":"Digital and data",header_topics_topics_education:"Education","header_topics_topics_equity-justice-and-inclusion":"Equity, justice and inclusion","header_topics_topics_health-and-social-care":"Health and social care",header_topics_topics_innovation:"Innovation","header_topics_topics_leadership-and-skills":"Leadership and skills","header_topics_topics_life-in-government":"Life in government",header_topics_topics_policymaking:"Policymaking","header_topics_topics_transport-and-infrastructure":"Transport and infrastructure","header_topics_topics_work-and-the-economy":"Work and the economy",header_partners:"For partners",header_account:"My account",header_account_show:"Show account menu",header_account_hide:"Close account menu",header_account_profile:"My profile",header_account_settings:"Settings & privacy","header_account_log-out":"Log out",header_buttons_login:"Log in",header_buttons_signup:"Sign up",hideShowTextBox_hide:"View less",hideShowTextBox_show:"View more",joinCommunityButton:"Join community",joinCommunityButton_short:"Join",joinCommunityButton_joining:"Joining...",joinCommunityButton_member:"Member",joinCommunityButton_member_aria:"Leave community",joinCommunityButton_leave:"Leave",joinCommunityButton_leaving:"Leaving...",loadMore_button:"Load more",loadMore_endOfFeed:"You're all caught up",loadMore_error:"We're having trouble loading more content. Please refresh the page or try again later.",loadingBlock_loading:"Loading...",loadingBlock_almostDone:"Almost done...",loadingBlock_complete:"Complete!",markdown_collapsibleSection_summary:"Resources",markdown_skip_video:"Skip past video",markdown_skip_padlet:"Skip past interactive board",markdown_skip_poll:"Skip past poll",markdown_skip:"Skip to next section",markdown_iframe_title:"Course information",markdown_iframe_video:"Video",markdown_iframe_padlet:"Interactive board",markdown_iframe_poll:"Poll",member_apolitical:"Apolitical",member_community:"Community post",membersList:"Members",membersList_admin:"Admin",moreMenu:"See more options",overlay_close:"Close",pageLayout_error:"An error occurred while rendering this page. Please refresh the page or try again later.",passwordRules_intro:"We advise you not to use your name or email in your password.",passwordRules_rule_label:"Password",passwordRules_rule_8Characters:"must be longer than 8 characters",passwordRules_rule_numberSymbol:"must include a number and a symbol",passwordRules_rule_lowercaseUppercase:"must include both lower and upper case characters",passwordRules_notMet:"Your password does not meet this requirement",progressBar:"{number}% loaded",ratings_text:"Rate answer",ratings_stars:"{number} out of {total}",ratings_low:"this is incorrect or confusing",ratings_high:"this is a fantastic answer",ratings_success:"Thank you!",search_label:"Search for:",search_placeholder:"Ask Apolitical",search_clear:"Clear search",search_cta:"Search",signup_title:"Sign up",signup_full_name:"Full name",signup_full_name_placeholder:"Lionel Messi",signup_email_address:"Work email",signup_email_address_placeholder:"lionel.messi@argentina.gov",signup_job_title:"Job title",signup_job_title_placeholder:"e.g. Senior Policy Advisor",signup_organization:"Organisation",signup_organization_placeholder:"e.g. Department of Justice",signup_url:"Link to official government bio / LinkedIn <small>(optional)</small>",signup_url_placeholder:"https://organisation.com/bio",signup_expectation:"What do you want to know<small>Optional, but we will use your response to build the session!</small>",signup_expectation_placeholder:"What do you want to know?",signup_terms:"I accept Apolitical's <terms>Terms of Service</terms>, <privacy>Privacy Policy</privacy> and that I'll get essential emails for my use of Apolitical",signup_error:"We're really sorry, but we've had a problem trying to sign you up. This could be an issue with our system, so we suggest you try again later.",signup_button_join:"Join for free",signup_button_login:"Log in",signup_submitting:"Submitting form...",signup_success_title:"Thank you for applying to join Apolitical!",signup_success_text:"<p>Once we've vetted your application, you'll get a secure login link to help you get started.</p><p>Please note that trust is everything to our community, so you can't login until your identity has been verified.</p>",sharedLinks_copy_text:"Copy link",tags_community:"From the community",tooltip_loading:"Loading..."},Cw={collapsibleSection_summary:"En savoir plus"},Rw=Object.freeze(Object.defineProperty({__proto__:null,en:ec,fr:Cw},Symbol.toStringTag,{value:"Module"})),Ft=(e,t,r,n,i={})=>{let o="";return`${t}_${r}`in ec?o=e({id:`${t}_${r}`},i):o=e({id:t},{[n]:r,...i}),o},Nw=(e,t,r)=>{if(!e||e===0)return"0";t||(t=0),r||(r=["k","m","b","t"]);let n=e.toString();t=Math.pow(10,t);for(let i=r.length-1;i>=0;i--){const o=Math.pow(10,(i+1)*3);if(o<=e){e=Math.round(e*t/o)/t,e===1e3&&i<r.length-1&&(e=1,i++),n=`${e}${r[i]}`;break}}return n},im=(e,t)=>U.Children.map(e,r=>U.cloneElement(r,{...t})),Pw=e=>e.replace(/\s+/g,"").length>0,Ue=({variant:e="primary",size:t="medium",styling:r={muted:!1,fullWidth:!1},icon:n=!1,href:i=!1,element:o="button",onClick:s=!1,className:a="",disabled:u=!1,screenreaderText:f=!1,children:c=!1,...h})=>{const l=ro(typeof t=="object");if(typeof t=="object"&&typeof l=="number"){const b=Object.assign({},t),T=rm(Object.keys(b));t=nm(l,T,b)}const p=[];typeof t=="string"&&p.push(t),n&&(p.push("icon"),typeof n=="object"?(p.push(n.icon),n.position?p.push(n.position):p.push("left"),n.hover&&p.push(`hover_${n.hover}`),n.animate&&(p.push("animate"),typeof n.animate=="string"&&p.push(n.animate))):(p.push(n),!n.includes("right")&&!n.includes("left")&&p.push("left"))),r.muted&&p.push("muted"),r.fullWidth&&p.push("full-width");const m={...h,className:ie(e,a,p,{"no-text":!c,disabled:u,button:i}),onClick:b=>{(!i||i[0]==="#")&&s&&(b.preventDefault(),b.stopPropagation()),s&&s(b)},disabled:typeof u=="object"&&"isClickable"in u?!u.isClickable:u};return i&&(o="a",m.href=i),U.createElement(o,m,c||(f?O.jsx(Je,{showOnFocus:!1,children:f}):null))},no=({buttons:e,className:t="",...r})=>{const n=e.length>1?"ul":"p",i=e.map((o,s)=>n==="p"?O.jsx(Ue,{...o},s):O.jsx("li",{children:O.jsx(Ue,{...o})},s));return U.createElement(n,{className:ie("button-wrapper",t),...r,children:i})};const Ko=({maxWidth:e=!1})=>{const t=e?{"--max-width":`${e/16}rem`}:{};return O.jsx("hr",{className:ie({"has-max-width":e}),style:t})},ua=({href:e,children:t,className:r="",onClick:n,gtmContext:i,gtmType:o,...s})=>{if(e){const a={...s};return n&&(a.onClick=n),i&&(a["data-gtm-event-context"]=i),o&&(a["data-gtm-event-type"]=o),O.jsx(Ze.Link,{to:e,className:ie("gtm-trackable",r),...a,children:t})}return t},sd={card:{range:[{height:320,width:320},{height:425,width:687},{height:510,width:768}],sizes:"(min-width: 1024px) 720px, 30vw"},responsiveCard:{range:[{height:125,width:200},{height:188,width:300},{height:313,width:500}],sizes:"(min-width: 1024px) 720px, 30vw"},banner:{range:[{height:124,width:425},{height:320,width:768},{height:510,width:1368}],sizes:"(min-width: 1024px) 975px, 50vw"},feed:{range:[{height:270,width:124},{height:320,width:425},{height:425,width:687}],sizes:"(min-width: 1024px) 510px, 20vw"},fallback:{range:[{height:124,width:375},{height:320,width:687},{height:510,width:990}],sizes:"(min-width: 1024px) 885px, 35vw"},thumbnail:{range:[{height:124,width:124},{height:320,width:320},{height:510,width:510}],sizes:"(min-width: 1024px) 453px, 20vw"}},Iw=({aspect:e,range:t,sizes:r})=>{const{range:n,sizes:i}=e?sd[e]:sd.fallback;return{range:t&&t.length>0?t:n,sizes:r||i}},Lw=({format:e,height:t,query:r,width:n})=>{let i=`w=${n}&h=${t}`;return i=e?`${i}&fm=${e}`:i,i=r?`${i}&${r}`:i,i},ks=({format:e,range:t,url:r,query:n})=>t.map(({height:i,width:o})=>`${r}?${Lw({format:e,height:i,query:n,width:o})} ${o}w`).join(", ");const om=({image:e,className:t,testId:r})=>{const{description:n,height:i,type:o,query:s,url:a,width:u,loading:f,decoding:c,fetchPriority:h}=e,{range:d,sizes:l}=Iw(e),p=ks({format:"avif",query:s,range:d,url:a}),m=ks({format:"webp",query:s,range:d,url:a}),b=ks({format:"",query:s,range:d,url:a});return O.jsxs("picture",{className:t,children:[o!=="image/gif"&&O.jsx("source",{type:"image/avif",srcSet:p,sizes:l,"data-testid":"source"}),O.jsx("source",{type:"image/webp",srcSet:m,sizes:l,"data-testid":"source"}),O.jsx("img",{srcSet:b,sizes:l,src:a,alt:n,loading:f||"lazy",decoding:c||"async",fetchpriority:h||"auto",width:u,height:i,"data-testid":r||"image"})]})};var vu=function(e,t){return vu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},vu(e,t)};function _t(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");vu(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var ae=function(){return ae=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},ae.apply(this,arguments)};function Ln(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function jt(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function am(e,t,r){if(r===void 0&&(r=Error),!e)throw new r(t)}var ye;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(ye||(ye={}));var Le;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(Le||(Le={}));var Mn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Mn||(Mn={}));function ud(e){return e.type===Le.literal}function Mw(e){return e.type===Le.argument}function sm(e){return e.type===Le.number}function um(e){return e.type===Le.date}function cm(e){return e.type===Le.time}function lm(e){return e.type===Le.select}function fm(e){return e.type===Le.plural}function kw(e){return e.type===Le.pound}function dm(e){return e.type===Le.tag}function hm(e){return!!(e&&typeof e=="object"&&e.type===Mn.number)}function _u(e){return!!(e&&typeof e=="object"&&e.type===Mn.dateTime)}var pm=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Bw=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Fw(e){var t={};return e.replace(Bw,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"short":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var Dw=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Uw(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Dw).filter(function(d){return d.length>0}),r=[],n=0,i=t;n<i.length;n++){var o=i[n],s=o.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var a=s[0],u=s.slice(1),f=0,c=u;f<c.length;f++){var h=c[f];if(h.length===0)throw new Error("Invalid number skeleton")}r.push({stem:a,options:u})}return r}function $w(e){return e.replace(/^(.*?)-/,"")}var cd=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,mm=/^(@+)?(\+|#+)?[rs]?$/g,jw=/(\*)(0+)|(#+)(0+)|(0+)/g,gm=/^(0+)$/;function ld(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(mm,function(r,n,i){return typeof i!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):i==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),t}function ym(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Hw(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!gm.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function fd(e){var t={},r=ym(e);return r||t}function qw(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=$w(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=ae(ae(ae({},t),{notation:"scientific"}),i.options.reduce(function(u,f){return ae(ae({},u),fd(f))},{}));continue;case"engineering":t=ae(ae(ae({},t),{notation:"engineering"}),i.options.reduce(function(u,f){return ae(ae({},u),fd(f))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(jw,function(u,f,c,h,d,l){if(f)t.minimumIntegerDigits=c.length;else{if(h&&d)throw new Error("We currently do not support maximum integer digits");if(l)throw new Error("We currently do not support exact integer digits")}return""});continue}if(gm.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(cd.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(cd,function(u,f,c,h,d,l){return c==="*"?t.minimumFractionDigits=f.length:h&&h[0]==="#"?t.maximumFractionDigits=h.length:d&&l?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.length+l.length):(t.minimumFractionDigits=f.length,t.maximumFractionDigits=f.length),""});var o=i.options[0];o==="w"?t=ae(ae({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=ae(ae({},t),ld(o)));continue}if(mm.test(i.stem)){t=ae(ae({},t),ld(i.stem));continue}var s=ym(i.stem);s&&(t=ae(ae({},t),s));var a=Hw(i.stem);a&&(t=ae(ae({},t),a))}return t}var No={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Gw(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if(i==="j"){for(var o=0;n+1<e.length&&e.charAt(n+1)===i;)o++,n++;var s=1+(o&1),a=o<2?1:3+(o>>1),u="a",f=Ww(t);for((f=="H"||f=="k")&&(a=0);a-- >0;)r+=u;for(;s-- >0;)r=f+r}else i==="J"?r+="H":r+=i}return r}function Ww(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=No[n||""]||No[r||""]||No["".concat(r,"-001")]||No["001"];return i[0]}var Bs,Vw=new RegExp("^".concat(pm.source,"*")),zw=new RegExp("".concat(pm.source,"*$"));function _e(e,t){return{start:e,end:t}}var Yw=!!String.prototype.startsWith,Kw=!!String.fromCodePoint,Qw=!!Object.fromEntries,Xw=!!String.prototype.codePointAt,Jw=!!String.prototype.trimStart,Zw=!!String.prototype.trimEnd,eS=!!Number.isSafeInteger,tS=eS?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Eu=!0;try{var rS=_m("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Eu=((Bs=rS.exec("a"))===null||Bs===void 0?void 0:Bs[0])==="a"}catch{Eu=!1}var dd=Yw?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},bu=Kw?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,o=0,s;i>o;){if(s=t[o++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},hd=Qw?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var o=i[n],s=o[0],a=o[1];r[s]=a}return r},vm=Xw?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var i=t.charCodeAt(r),o;return i<55296||i>56319||r+1===n||(o=t.charCodeAt(r+1))<56320||o>57343?i:(i-55296<<10)+(o-56320)+65536}},nS=Jw?function(t){return t.trimStart()}:function(t){return t.replace(Vw,"")},iS=Zw?function(t){return t.trimEnd()}:function(t){return t.replace(zw,"")};function _m(e,t){return new RegExp(e,t)}var wu;if(Eu){var pd=_m("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");wu=function(t,r){var n;pd.lastIndex=r;var i=pd.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else wu=function(t,r){for(var n=[];;){var i=vm(t,r);if(i===void 0||Em(i)||uS(i))break;n.push(i),r+=i>=65536?2:1}return bu.apply(void 0,n)};var oS=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var i=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(t,n);if(s.err)return s;i.push(s.val)}else{if(o===125&&t>0)break;if(o===35&&(r==="plural"||r==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:Le.pound,location:_e(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(ye.UNMATCHED_CLOSING_TAG,_e(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Su(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Le.literal,value:"<".concat(i,"/>"),location:_e(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(t+1,r,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Su(this.char()))return this.error(ye.INVALID_TAG,_e(a,this.clonePosition()));var u=this.clonePosition(),f=this.parseTagName();return i!==f?this.error(ye.UNMATCHED_CLOSING_TAG,_e(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Le.tag,value:i,children:s,location:_e(n,this.clonePosition())},err:null}:this.error(ye.INVALID_TAG,_e(a,this.clonePosition())))}else return this.error(ye.UNCLOSED_TAG,_e(n,this.clonePosition()))}else return this.error(ye.INVALID_TAG,_e(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&sS(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var o=this.tryParseQuote(r);if(o){i+=o;continue}var s=this.tryParseUnquoted(t,r);if(s){i+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var u=_e(n,this.clonePosition());return{val:{type:Le.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!aS(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return bu.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),bu(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,_e(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ye.EMPTY_ARGUMENT,_e(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(ye.MALFORMED_ARGUMENT,_e(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,_e(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Le.argument,value:i,location:_e(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,_e(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(ye.MALFORMED_ARGUMENT,_e(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=wu(this.message,r),i=r+n.length;this.bumpTo(i);var o=this.clonePosition(),s=_e(t,o);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,i){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(a){case"":return this.error(ye.EXPECT_ARGUMENT_TYPE,_e(s,u));case"number":case"date":case"time":{this.bumpSpace();var f=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),h=this.parseSimpleArgStyleIfPossible();if(h.err)return h;var d=iS(h.val);if(d.length===0)return this.error(ye.EXPECT_ARGUMENT_STYLE,_e(this.clonePosition(),this.clonePosition()));var l=_e(c,this.clonePosition());f={style:d,styleLocation:l}}var p=this.tryParseArgumentClose(i);if(p.err)return p;var m=_e(i,this.clonePosition());if(f&&dd(f==null?void 0:f.style,"::",0)){var b=nS(f.style.slice(2));if(a==="number"){var h=this.parseNumberSkeletonFromString(b,f.styleLocation);return h.err?h:{val:{type:Le.number,value:n,location:m,style:h.val},err:null}}else{if(b.length===0)return this.error(ye.EXPECT_DATE_TIME_SKELETON,m);var T=b;this.locale&&(T=Gw(b,this.locale));var d={type:Mn.dateTime,pattern:T,location:f.styleLocation,parsedOptions:this.shouldParseSkeletons?Fw(T):{}},_=a==="date"?Le.date:Le.time;return{val:{type:_,value:n,location:m,style:d},err:null}}}return{val:{type:a==="number"?Le.number:a==="date"?Le.date:Le.time,value:n,location:m,style:(o=f==null?void 0:f.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var E=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ye.EXPECT_SELECT_ARGUMENT_OPTIONS,_e(E,ae({},E)));this.bumpSpace();var A=this.parseIdentifierIfPossible(),w=0;if(a!=="select"&&A.value==="offset"){if(!this.bumpIf(":"))return this.error(ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,_e(this.clonePosition(),this.clonePosition()));this.bumpSpace();var h=this.tryParseDecimalInteger(ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ye.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(h.err)return h;this.bumpSpace(),A=this.parseIdentifierIfPossible(),w=h.val}var N=this.tryParsePluralOrSelectOptions(t,a,r,A);if(N.err)return N;var p=this.tryParseArgumentClose(i);if(p.err)return p;var F=_e(i,this.clonePosition());return a==="select"?{val:{type:Le.select,value:n,options:hd(N.val),location:F},err:null}:{val:{type:Le.plural,value:n,options:hd(N.val),offset:w,pluralType:a==="plural"?"cardinal":"ordinal",location:F},err:null}}default:return this.error(ye.INVALID_ARGUMENT_TYPE,_e(s,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,_e(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ye.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,_e(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=Uw(t)}catch{return this.error(ye.INVALID_NUMBER_SKELETON,r)}return{val:{type:Mn.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?qw(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var o,s=!1,a=[],u=new Set,f=i.value,c=i.location;;){if(f.length===0){var h=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,ye.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;c=_e(h,this.clonePosition()),f=this.message.slice(h.offset,this.offset())}else break}if(u.has(f))return this.error(r==="select"?ye.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ye.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);f==="other"&&(s=!0),this.bumpSpace();var l=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?ye.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ye.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,_e(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,r,n);if(p.err)return p;var m=this.tryParseArgumentClose(l);if(m.err)return m;a.push([f,{value:p.val,location:_e(l,this.clonePosition())}]),u.add(f),this.bumpSpace(),o=this.parseIdentifierIfPossible(),f=o.value,c=o.location}return a.length===0?this.error(r==="select"?ye.EXPECT_SELECT_ARGUMENT_SELECTOR:ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,_e(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(ye.MISSING_OTHER_CLAUSE,_e(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var u=_e(i,this.clonePosition());return o?(s*=n,tS(s)?{val:s,err:null}:this.error(r,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=vm(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(dd(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Em(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function Su(e){return e>=97&&e<=122||e>=65&&e<=90}function aS(e){return Su(e)||e===47}function sS(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Em(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function uS(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function Tu(e){e.forEach(function(t){if(delete t.location,lm(t)||fm(t))for(var r in t.options)delete t.options[r].location,Tu(t.options[r].value);else sm(t)&&hm(t.style)||(um(t)||cm(t))&&_u(t.style)?delete t.style.location:dm(t)&&Tu(t.children)})}function cS(e,t){t===void 0&&(t={}),t=ae({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new oS(e,t).parse();if(r.err){var n=SyntaxError(ye[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||Tu(r.val),r.val}function Dt(e,t){var r=t&&t.cache?t.cache:mS,n=t&&t.serializer?t.serializer:pS,i=t&&t.strategy?t.strategy:fS;return i(e,{cache:r,serializer:n})}function lS(e){return e==null||typeof e=="number"||typeof e=="boolean"}function bm(e,t,r,n){var i=lS(n)?n:r(n),o=t.get(i);return typeof o>"u"&&(o=e.call(this,n),t.set(i,o)),o}function wm(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),o=t.get(i);return typeof o>"u"&&(o=e.apply(this,n),t.set(i,o)),o}function tc(e,t,r,n,i){return r.bind(t,e,n,i)}function fS(e,t){var r=e.length===1?bm:wm;return tc(e,this,r,t.cache.create(),t.serializer)}function dS(e,t){return tc(e,this,wm,t.cache.create(),t.serializer)}function hS(e,t){return tc(e,this,bm,t.cache.create(),t.serializer)}var pS=function(){return JSON.stringify(arguments)};function rc(){this.cache=Object.create(null)}rc.prototype.get=function(e){return this.cache[e]};rc.prototype.set=function(e,t){this.cache[e]=t};var mS={create:function(){return new rc}},Ut={variadic:dS,monadic:hS},Ht;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ht||(Ht={}));var Sr=function(e){_t(t,e);function t(r,n,i){var o=e.call(this,r)||this;return o.code=n,o.originalMessage=i,o}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),md=function(e){_t(t,e);function t(r,n,i,o){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Ht.INVALID_VALUE,o)||this}return t}(Sr),gS=function(e){_t(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Ht.INVALID_VALUE,i)||this}return t}(Sr),yS=function(e){_t(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),Ht.MISSING_VALUE,n)||this}return t}(Sr),at;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(at||(at={}));function vS(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==at.literal||r.type!==at.literal?t.push(r):n.value+=r.value,t},[])}function Sm(e){return typeof e=="function"}function Uo(e,t,r,n,i,o,s){if(e.length===1&&ud(e[0]))return[{type:at.literal,value:e[0].value}];for(var a=[],u=0,f=e;u<f.length;u++){var c=f[u];if(ud(c)){a.push({type:at.literal,value:c.value});continue}if(kw(c)){typeof o=="number"&&a.push({type:at.literal,value:r.getNumberFormat(t).format(o)});continue}var h=c.value;if(!(i&&h in i))throw new yS(h,s);var d=i[h];if(Mw(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?at.literal:at.object,value:d});continue}if(um(c)){var l=typeof c.style=="string"?n.date[c.style]:_u(c.style)?c.style.parsedOptions:void 0;a.push({type:at.literal,value:r.getDateTimeFormat(t,l).format(d)});continue}if(cm(c)){var l=typeof c.style=="string"?n.time[c.style]:_u(c.style)?c.style.parsedOptions:n.time.medium;a.push({type:at.literal,value:r.getDateTimeFormat(t,l).format(d)});continue}if(sm(c)){var l=typeof c.style=="string"?n.number[c.style]:hm(c.style)?c.style.parsedOptions:void 0;l&&l.scale&&(d=d*(l.scale||1)),a.push({type:at.literal,value:r.getNumberFormat(t,l).format(d)});continue}if(dm(c)){var p=c.children,m=c.value,b=i[m];if(!Sm(b))throw new gS(m,"function",s);var T=Uo(p,t,r,n,i,o),_=b(T.map(function(w){return w.value}));Array.isArray(_)||(_=[_]),a.push.apply(a,_.map(function(w){return{type:typeof w=="string"?at.literal:at.object,value:w}}))}if(lm(c)){var E=c.options[d]||c.options.other;if(!E)throw new md(c.value,d,Object.keys(c.options),s);a.push.apply(a,Uo(E.value,t,r,n,i));continue}if(fm(c)){var E=c.options["=".concat(d)];if(!E){if(!Intl.PluralRules)throw new Sr(`Intl.PluralRules is not available in this environment.
66
66
  Try polyfilling it using "@formatjs/intl-pluralrules"
67
67
  `,Ht.MISSING_INTL_API,s);var A=r.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));E=c.options[A]||c.options.other}if(!E)throw new md(c.value,d,Object.keys(c.options),s);a.push.apply(a,Uo(E.value,t,r,n,i,d-(c.offset||0)));continue}}return vS(a)}function _S(e,t){return t?ae(ae(ae({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=ae(ae({},e[n]),t[n]||{}),r},{})):e}function ES(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=_S(e[n],t[n]),r},ae({},e)):e}function Fs(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function bS(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Dt(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,jt([void 0],r,!1)))},{cache:Fs(e.number),strategy:Ut.variadic}),getDateTimeFormat:Dt(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,jt([void 0],r,!1)))},{cache:Fs(e.dateTime),strategy:Ut.variadic}),getPluralRules:Dt(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,jt([void 0],r,!1)))},{cache:Fs(e.pluralRules),strategy:Ut.variadic})}}var Tm=function(){function e(t,r,n,i){r===void 0&&(r=e.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var f=o.formatToParts(u);if(f.length===1)return f[0].value;var c=f.reduce(function(h,d){return!h.length||d.type!==at.literal||typeof h[h.length-1]!="string"?h.push(d.value):h[h.length-1]+=d.value,h},[]);return c.length<=1?c[0]||"":c},this.formatToParts=function(u){return Uo(o.ast,o.locales,o.formatters,o.formats,u,void 0,o.message)},this.resolvedOptions=function(){var u;return{locale:((u=o.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=i||{};s.formatters;var a=Ln(s,["formatters"]);this.ast=e.__parse(t,ae(ae({},a),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=ES(e.formats,n),this.formatters=i&&i.formatters||bS(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=cS,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),tn;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(tn||(tn={}));var io=function(e){_t(t,e);function t(r,n,i){var o=this,s=i?i instanceof Error?i:new Error(String(i)):void 0;return o=e.call(this,"[@formatjs/intl Error ".concat(r,"] ").concat(n,`
68
68
  `).concat(s?`
@@ -73,17 +73,17 @@ Locale: `).concat(n,`
73
73
  MessageID: `).concat(i==null?void 0:i.id,`
74
74
  Default Message: `).concat(i==null?void 0:i.defaultMessage,`
75
75
  Description: `).concat(i==null?void 0:i.description,`
76
- `),n,o)||this;return s.descriptor=i,s.locale=n,s}return t}(Et),TS=function(e){_t(t,e);function t(r,n){var i=e.call(this,tn.MISSING_TRANSLATION,'Missing message: "'.concat(r.id,'" for locale "').concat(n,'", using ').concat(r.defaultMessage?"default message (".concat(typeof r.defaultMessage=="string"?r.defaultMessage:r.defaultMessage.map(function(o){var s;return(s=o.value)!==null&&s!==void 0?s:JSON.stringify(o)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=r,i}return t}(io);function an(e,t,r){return r===void 0&&(r={}),t.reduce(function(n,i){return i in e?n[i]=e[i]:i in r&&(n[i]=r[i]),n},{})}var xS=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},OS=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},xm={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:xS,onWarn:OS};function Om(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Yr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function AS(e){e===void 0&&(e=Om());var t=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,i=Dt(function(){for(var a,u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return new((a=Intl.DateTimeFormat).bind.apply(a,jt([void 0],u,!1)))},{cache:Yr(e.dateTime),strategy:Ut.variadic}),o=Dt(function(){for(var a,u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return new((a=Intl.NumberFormat).bind.apply(a,jt([void 0],u,!1)))},{cache:Yr(e.number),strategy:Ut.variadic}),s=Dt(function(){for(var a,u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return new((a=Intl.PluralRules).bind.apply(a,jt([void 0],u,!1)))},{cache:Yr(e.pluralRules),strategy:Ut.variadic});return{getDateTimeFormat:i,getNumberFormat:o,getMessageFormat:Dt(function(a,u,f,c){return new Tm(a,u,f,ae({formatters:{getNumberFormat:o,getDateTimeFormat:i,getPluralRules:s}},c||{}))},{cache:Yr(e.message),strategy:Ut.variadic}),getRelativeTimeFormat:Dt(function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return new(t.bind.apply(t,jt([void 0],a,!1)))},{cache:Yr(e.relativeTime),strategy:Ut.variadic}),getPluralRules:s,getListFormat:Dt(function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return new(r.bind.apply(r,jt([void 0],a,!1)))},{cache:Yr(e.list),strategy:Ut.variadic}),getDisplayNames:Dt(function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return new(n.bind.apply(n,jt([void 0],a,!1)))},{cache:Yr(e.displayNames),strategy:Ut.variadic})}}function nc(e,t,r,n){var i=e&&e[t],o;if(i&&(o=i[r]),o)return o;n(new wS("No ".concat(t," format named: ").concat(r)))}function Po(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=ae({timeZone:t},e[n]),r},{})}function yd(e,t){var r=Object.keys(ae(ae({},e),t));return r.reduce(function(n,i){return n[i]=ae(ae({},e[i]||{}),t[i]||{}),n},{})}function vd(e,t){if(!t)return e;var r=Tm.formats;return ae(ae(ae({},r),e),{date:yd(Po(r.date,t),Po(e.date||{},t)),time:yd(Po(r.time,t),Po(e.time||{},t))})}var xu=function(e,t,r,n,i){var o=e.locale,s=e.formats,a=e.messages,u=e.defaultLocale,f=e.defaultFormats,c=e.fallbackOnEmptyString,h=e.onError,d=e.timeZone,l=e.defaultRichTextElements;r===void 0&&(r={id:""});var p=r.id,m=r.defaultMessage;am(!!p,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var b=String(p),T=a&&Object.prototype.hasOwnProperty.call(a,b)&&a[b];if(Array.isArray(T)&&T.length===1&&T[0].type===Le.literal)return T[0].value;if(!n&&T&&typeof T=="string"&&!l)return T.replace(/'\{(.*?)\}'/gi,"{$1}");if(n=ae(ae({},l),n||{}),s=vd(s,d),f=vd(f,d),!T){if(c===!1&&T==="")return T;if((!m||o&&o.toLowerCase()!==u.toLowerCase())&&h(new TS(r,o)),m)try{var _=t.getMessageFormat(m,u,f,i);return _.format(n)}catch(E){return h(new Ds('Error formatting default message for: "'.concat(b,'", rendering default message verbatim'),o,r,E)),typeof m=="string"?m:b}return b}try{var _=t.getMessageFormat(T,o,s,ae({formatters:t},i||{}));return _.format(n)}catch(E){h(new Ds('Error formatting message: "'.concat(b,'", using ').concat(m?"default message":"id"," as fallback."),o,r,E))}if(m)try{var _=t.getMessageFormat(m,u,f,i);return _.format(n)}catch(E){h(new Ds('Error formatting the default message for: "'.concat(b,'", rendering message verbatim'),o,r,E))}return typeof T=="string"?T:typeof m=="string"?m:b},Am=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function ca(e,t,r,n){var i=e.locale,o=e.formats,s=e.onError,a=e.timeZone;n===void 0&&(n={});var u=n.format,f=ae(ae({},a&&{timeZone:a}),u&&nc(o,t,u,s)),c=an(n,Am,f);return t==="time"&&!c.hour&&!c.minute&&!c.second&&!c.timeStyle&&!c.dateStyle&&(c=ae(ae({},c),{hour:"numeric",minute:"numeric"})),r(i,c)}function CS(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],o=r[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return ca(e,"date",t,s).format(a)}catch(u){e.onError(new Et("Error formatting date.",e.locale,u))}return String(a)}function RS(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],o=r[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return ca(e,"time",t,s).format(a)}catch(u){e.onError(new Et("Error formatting time.",e.locale,u))}return String(a)}function NS(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],o=r[1],s=r[2],a=s===void 0?{}:s,u=e.timeZone,f=e.locale,c=e.onError,h=an(a,Am,u?{timeZone:u}:{});try{return t(f,h).formatRange(i,o)}catch(d){c(new Et("Error formatting date time range.",e.locale,d))}return String(i)}function PS(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],o=r[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return ca(e,"date",t,s).formatToParts(a)}catch(u){e.onError(new Et("Error formatting date.",e.locale,u))}return[]}function IS(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],o=r[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return ca(e,"time",t,s).formatToParts(a)}catch(u){e.onError(new Et("Error formatting time.",e.locale,u))}return[]}var LS=["style","type","fallback","languageDisplay"];function kS(e,t,r,n){var i=e.locale,o=e.onError,s=Intl.DisplayNames;s||o(new Sr(`Intl.DisplayNames is not available in this environment.
76
+ `),n,o)||this;return s.descriptor=i,s.locale=n,s}return t}(Et),TS=function(e){_t(t,e);function t(r,n){var i=e.call(this,tn.MISSING_TRANSLATION,'Missing message: "'.concat(r.id,'" for locale "').concat(n,'", using ').concat(r.defaultMessage?"default message (".concat(typeof r.defaultMessage=="string"?r.defaultMessage:r.defaultMessage.map(function(o){var s;return(s=o.value)!==null&&s!==void 0?s:JSON.stringify(o)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=r,i}return t}(io);function an(e,t,r){return r===void 0&&(r={}),t.reduce(function(n,i){return i in e?n[i]=e[i]:i in r&&(n[i]=r[i]),n},{})}var xS=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},OS=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},xm={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:xS,onWarn:OS};function Om(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Yr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function AS(e){e===void 0&&(e=Om());var t=Intl.RelativeTimeFormat,r=Intl.ListFormat,n=Intl.DisplayNames,i=Dt(function(){for(var a,u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return new((a=Intl.DateTimeFormat).bind.apply(a,jt([void 0],u,!1)))},{cache:Yr(e.dateTime),strategy:Ut.variadic}),o=Dt(function(){for(var a,u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return new((a=Intl.NumberFormat).bind.apply(a,jt([void 0],u,!1)))},{cache:Yr(e.number),strategy:Ut.variadic}),s=Dt(function(){for(var a,u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return new((a=Intl.PluralRules).bind.apply(a,jt([void 0],u,!1)))},{cache:Yr(e.pluralRules),strategy:Ut.variadic});return{getDateTimeFormat:i,getNumberFormat:o,getMessageFormat:Dt(function(a,u,f,c){return new Tm(a,u,f,ae({formatters:{getNumberFormat:o,getDateTimeFormat:i,getPluralRules:s}},c||{}))},{cache:Yr(e.message),strategy:Ut.variadic}),getRelativeTimeFormat:Dt(function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return new(t.bind.apply(t,jt([void 0],a,!1)))},{cache:Yr(e.relativeTime),strategy:Ut.variadic}),getPluralRules:s,getListFormat:Dt(function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return new(r.bind.apply(r,jt([void 0],a,!1)))},{cache:Yr(e.list),strategy:Ut.variadic}),getDisplayNames:Dt(function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return new(n.bind.apply(n,jt([void 0],a,!1)))},{cache:Yr(e.displayNames),strategy:Ut.variadic})}}function nc(e,t,r,n){var i=e&&e[t],o;if(i&&(o=i[r]),o)return o;n(new wS("No ".concat(t," format named: ").concat(r)))}function Po(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=ae({timeZone:t},e[n]),r},{})}function yd(e,t){var r=Object.keys(ae(ae({},e),t));return r.reduce(function(n,i){return n[i]=ae(ae({},e[i]||{}),t[i]||{}),n},{})}function vd(e,t){if(!t)return e;var r=Tm.formats;return ae(ae(ae({},r),e),{date:yd(Po(r.date,t),Po(e.date||{},t)),time:yd(Po(r.time,t),Po(e.time||{},t))})}var xu=function(e,t,r,n,i){var o=e.locale,s=e.formats,a=e.messages,u=e.defaultLocale,f=e.defaultFormats,c=e.fallbackOnEmptyString,h=e.onError,d=e.timeZone,l=e.defaultRichTextElements;r===void 0&&(r={id:""});var p=r.id,m=r.defaultMessage;am(!!p,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var b=String(p),T=a&&Object.prototype.hasOwnProperty.call(a,b)&&a[b];if(Array.isArray(T)&&T.length===1&&T[0].type===Le.literal)return T[0].value;if(!n&&T&&typeof T=="string"&&!l)return T.replace(/'\{(.*?)\}'/gi,"{$1}");if(n=ae(ae({},l),n||{}),s=vd(s,d),f=vd(f,d),!T){if(c===!1&&T==="")return T;if((!m||o&&o.toLowerCase()!==u.toLowerCase())&&h(new TS(r,o)),m)try{var _=t.getMessageFormat(m,u,f,i);return _.format(n)}catch(E){return h(new Ds('Error formatting default message for: "'.concat(b,'", rendering default message verbatim'),o,r,E)),typeof m=="string"?m:b}return b}try{var _=t.getMessageFormat(T,o,s,ae({formatters:t},i||{}));return _.format(n)}catch(E){h(new Ds('Error formatting message: "'.concat(b,'", using ').concat(m?"default message":"id"," as fallback."),o,r,E))}if(m)try{var _=t.getMessageFormat(m,u,f,i);return _.format(n)}catch(E){h(new Ds('Error formatting the default message for: "'.concat(b,'", rendering message verbatim'),o,r,E))}return typeof T=="string"?T:typeof m=="string"?m:b},Am=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function ca(e,t,r,n){var i=e.locale,o=e.formats,s=e.onError,a=e.timeZone;n===void 0&&(n={});var u=n.format,f=ae(ae({},a&&{timeZone:a}),u&&nc(o,t,u,s)),c=an(n,Am,f);return t==="time"&&!c.hour&&!c.minute&&!c.second&&!c.timeStyle&&!c.dateStyle&&(c=ae(ae({},c),{hour:"numeric",minute:"numeric"})),r(i,c)}function CS(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],o=r[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return ca(e,"date",t,s).format(a)}catch(u){e.onError(new Et("Error formatting date.",e.locale,u))}return String(a)}function RS(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],o=r[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return ca(e,"time",t,s).format(a)}catch(u){e.onError(new Et("Error formatting time.",e.locale,u))}return String(a)}function NS(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],o=r[1],s=r[2],a=s===void 0?{}:s,u=e.timeZone,f=e.locale,c=e.onError,h=an(a,Am,u?{timeZone:u}:{});try{return t(f,h).formatRange(i,o)}catch(d){c(new Et("Error formatting date time range.",e.locale,d))}return String(i)}function PS(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],o=r[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return ca(e,"date",t,s).formatToParts(a)}catch(u){e.onError(new Et("Error formatting date.",e.locale,u))}return[]}function IS(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=r[0],o=r[1],s=o===void 0?{}:o,a=typeof i=="string"?new Date(i||0):i;try{return ca(e,"time",t,s).formatToParts(a)}catch(u){e.onError(new Et("Error formatting time.",e.locale,u))}return[]}var LS=["style","type","fallback","languageDisplay"];function MS(e,t,r,n){var i=e.locale,o=e.onError,s=Intl.DisplayNames;s||o(new Sr(`Intl.DisplayNames is not available in this environment.
77
77
  Try polyfilling it using "@formatjs/intl-displaynames"
78
- `,Ht.MISSING_INTL_API));var a=an(n,LS);try{return t(i,a).of(r)}catch(u){o(new Et("Error formatting display name.",i,u))}}var MS=["type","style"],_d=Date.now();function BS(e){return"".concat(_d,"_").concat(e,"_").concat(_d)}function FS(e,t,r,n){n===void 0&&(n={});var i=Cm(e,t,r,n).reduce(function(o,s){var a=s.value;return typeof a!="string"?o.push(a):typeof o[o.length-1]=="string"?o[o.length-1]+=a:o.push(a),o},[]);return i.length===1?i[0]:i.length===0?"":i}function Cm(e,t,r,n){var i=e.locale,o=e.onError;n===void 0&&(n={});var s=Intl.ListFormat;s||o(new Sr(`Intl.ListFormat is not available in this environment.
78
+ `,Ht.MISSING_INTL_API));var a=an(n,LS);try{return t(i,a).of(r)}catch(u){o(new Et("Error formatting display name.",i,u))}}var kS=["type","style"],_d=Date.now();function BS(e){return"".concat(_d,"_").concat(e,"_").concat(_d)}function FS(e,t,r,n){n===void 0&&(n={});var i=Cm(e,t,r,n).reduce(function(o,s){var a=s.value;return typeof a!="string"?o.push(a):typeof o[o.length-1]=="string"?o[o.length-1]+=a:o.push(a),o},[]);return i.length===1?i[0]:i.length===0?"":i}function Cm(e,t,r,n){var i=e.locale,o=e.onError;n===void 0&&(n={});var s=Intl.ListFormat;s||o(new Sr(`Intl.ListFormat is not available in this environment.
79
79
  Try polyfilling it using "@formatjs/intl-listformat"
80
- `,Ht.MISSING_INTL_API));var a=an(n,MS);try{var u={},f=r.map(function(c,h){if(typeof c=="object"){var d=BS(h);return u[d]=c,d}return String(c)});return t(i,a).formatToParts(f).map(function(c){return c.type==="literal"?c:ae(ae({},c),{value:u[c.value]||c.value})})}catch(c){o(new Et("Error formatting list.",i,c))}return r}var DS=["type"];function US(e,t,r,n){var i=e.locale,o=e.onError;n===void 0&&(n={}),Intl.PluralRules||o(new Sr(`Intl.PluralRules is not available in this environment.
80
+ `,Ht.MISSING_INTL_API));var a=an(n,kS);try{var u={},f=r.map(function(c,h){if(typeof c=="object"){var d=BS(h);return u[d]=c,d}return String(c)});return t(i,a).formatToParts(f).map(function(c){return c.type==="literal"?c:ae(ae({},c),{value:u[c.value]||c.value})})}catch(c){o(new Et("Error formatting list.",i,c))}return r}var DS=["type"];function US(e,t,r,n){var i=e.locale,o=e.onError;n===void 0&&(n={}),Intl.PluralRules||o(new Sr(`Intl.PluralRules is not available in this environment.
81
81
  Try polyfilling it using "@formatjs/intl-pluralrules"
82
82
  `,Ht.MISSING_INTL_API));var s=an(n,DS);try{return t(i,s).select(r)}catch(a){o(new Et("Error formatting plural.",i,a))}return"other"}var $S=["numeric","style"];function jS(e,t,r){var n=e.locale,i=e.formats,o=e.onError;r===void 0&&(r={});var s=r.format,a=!!s&&nc(i,"relative",s,o)||{},u=an(r,$S,a);return t(n,u)}function HS(e,t,r,n,i){i===void 0&&(i={}),n||(n="second");var o=Intl.RelativeTimeFormat;o||e.onError(new Sr(`Intl.RelativeTimeFormat is not available in this environment.
83
83
  Try polyfilling it using "@formatjs/intl-relativetimeformat"
84
84
  `,Ht.MISSING_INTL_API));try{return jS(e,t,i).format(r,n)}catch(s){e.onError(new Et("Error formatting relative time.",e.locale,s))}return String(r)}var qS=["style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem"];function Rm(e,t,r){var n=e.locale,i=e.formats,o=e.onError;r===void 0&&(r={});var s=r.format,a=s&&nc(i,"number",s,o)||{},u=an(r,qS,a);return t(n,u)}function GS(e,t,r,n){n===void 0&&(n={});try{return Rm(e,t,n).format(r)}catch(i){e.onError(new Et("Error formatting number.",e.locale,i))}return String(r)}function WS(e,t,r,n){n===void 0&&(n={});try{return Rm(e,t,n).formatToParts(r)}catch(i){e.onError(new Et("Error formatting number.",e.locale,i))}return[]}function VS(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function zS(e){e.onWarn&&e.defaultRichTextElements&&VS(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
85
85
  Please consider using "@formatjs/cli" to pre-compile your messages for performance.
86
- For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function YS(e,t){var r=AS(t),n=ae(ae({},xm),e),i=n.locale,o=n.defaultLocale,s=n.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new gd('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new gd('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new SS('"locale" was not configured, using "'.concat(o,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),n.locale=n.defaultLocale||"en"),zS(n),ae(ae({},n),{formatters:r,formatNumber:GS.bind(null,n,r.getNumberFormat),formatNumberToParts:WS.bind(null,n,r.getNumberFormat),formatRelativeTime:HS.bind(null,n,r.getRelativeTimeFormat),formatDate:CS.bind(null,n,r.getDateTimeFormat),formatDateToParts:PS.bind(null,n,r.getDateTimeFormat),formatTime:RS.bind(null,n,r.getDateTimeFormat),formatDateTimeRange:NS.bind(null,n,r.getDateTimeFormat),formatTimeToParts:IS.bind(null,n,r.getDateTimeFormat),formatPlural:US.bind(null,n,r.getPluralRules),formatMessage:xu.bind(null,n,r),$t:xu.bind(null,n,r),formatList:FS.bind(null,n,r.getListFormat),formatListToParts:Cm.bind(null,n,r.getListFormat),formatDisplayName:kS.bind(null,n,r.getDisplayNames)})}function Nm(e){am(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var Pm=ae(ae({},xm),{textComponent:Oe.Fragment});function KS(e){return function(t){return e(Oe.Children.toArray(t))}}function Ou(e,t){if(e===t)return!0;if(!e||!t)return!1;var r=Object.keys(e),n=Object.keys(t),i=r.length;if(n.length!==i)return!1;for(var o=0;o<i;o++){var s=r[o];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var ic=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Oe.createContext(null)):Oe.createContext(null);ic.Consumer;var QS=ic.Provider,XS=QS,JS=ic;function Ee(){var e=Oe.useContext(JS);return Nm(e),e}var Au;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Au||(Au={}));var Cu;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(Cu||(Cu={}));function Im(e){var t=function(r){var n=Ee(),i=r.value,o=r.children,s=Ln(r,["value","children"]),a=typeof i=="string"?new Date(i||0):i,u=e==="formatDate"?n.formatDateToParts(a,s):n.formatTimeToParts(a,s);return o(u)};return t.displayName=Cu[e],t}function oo(e){var t=function(r){var n=Ee(),i=r.value,o=r.children,s=Ln(r,["value","children"]),a=n[e](i,s);if(typeof o=="function")return o(a);var u=n.textComponent||Oe.Fragment;return Oe.createElement(u,null,a)};return t.displayName=Au[e],t}function Us(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}function Lm(e){return e&&Object.keys(e).reduce(function(t,r){var n=e[r];return t[r]=Sm(n)?KS(n):n,t},{})}var Ed=function(e,t,r,n){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];var s=Lm(n),a=xu.apply(void 0,jt([e,t,r,s],i,!1));return Array.isArray(a)?Oe.Children.toArray(a):a},Ru=function(e,t){var r=e.defaultRichTextElements,n=Ln(e,["defaultRichTextElements"]),i=Lm(r),o=YS(ae(ae(ae({},Pm),n),{defaultRichTextElements:i}),t),s={locale:o.locale,timeZone:o.timeZone,fallbackOnEmptyString:o.fallbackOnEmptyString,formats:o.formats,defaultLocale:o.defaultLocale,defaultFormats:o.defaultFormats,messages:o.messages,onError:o.onError,defaultRichTextElements:i};return ae(ae({},o),{formatMessage:Ed.bind(null,s,o.formatters),$t:Ed.bind(null,s,o.formatters)})},ZS=function(e){_t(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.cache=Om(),r.state={cache:r.cache,intl:Ru(Us(r.props),r.cache),prevConfig:Us(r.props)},r}return t.getDerivedStateFromProps=function(r,n){var i=n.prevConfig,o=n.cache,s=Us(r);return Ou(i,s)?null:{intl:Ru(s,o),prevConfig:s}},t.prototype.render=function(){return Nm(this.state.intl),Oe.createElement(XS,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=Pm,t}(Oe.PureComponent);function eT(e,t){var r=e.values,n=Ln(e,["values"]),i=t.values,o=Ln(t,["values"]);return Ou(i,r)&&Ou(n,o)}function km(e){var t=Ee(),r=t.formatMessage,n=t.textComponent,i=n===void 0?Oe.Fragment:n,o=e.id,s=e.description,a=e.defaultMessage,u=e.values,f=e.children,c=e.tagName,h=c===void 0?i:c,d=e.ignoreTag,l={id:o,description:s,defaultMessage:a},p=r(l,u,{ignoreTag:d});return typeof f=="function"?f(Array.isArray(p)?p:[p]):h?Oe.createElement(h,null,Oe.Children.toArray(p)):Oe.createElement(Oe.Fragment,null,p)}km.displayName="FormattedMessage";var Mm=Oe.memo(km,eT);Mm.displayName="MemoizedFormattedMessage";const _r=Mm;oo("formatDate");oo("formatTime");oo("formatNumber");oo("formatList");oo("formatDisplayName");Im("formatDate");Im("formatTime");let ji=!1;const Bm=({isOpen:e=!1,isLoading:t=!1,children:r})=>{const n=Ee(),i=U.useRef(null),[o,s]=U.useState("hidden");U.useEffect(()=>{const u=i.current;if(u)return u.addEventListener("transitionend",a),()=>{u.removeEventListener("transitionend",a)}},[]);const a=({propertyName:u})=>{u==="opacity"&&(ji!==!1&&clearTimeout(ji),s(f=>f==="opening"?"open":f==="closing"?"closed":f==="closed"?"hidden":f))};return Zr(()=>{ji!==!1&&clearTimeout(ji);let u="open";e?s("opening"):(s("closing"),u="hidden"),ji=setTimeout(()=>{s(u)},300)},[e]),O.jsx("aside",{ref:i,className:ie("tooltip text-medium",o,{loading:t}),hidden:o==="hidden",children:t?O.jsx("p",{children:n.formatMessage({id:"tooltip_loading"})}):typeof r=="string"?O.jsx("p",{children:r}):r})};const oc=({children:e,className:t="",...r})=>O.jsx("section",{className:ie("full-width-section",t),...r,children:e});const tT=({text:e,buttons:t,className:r=""})=>{const n=[];return t.forEach(i=>{n.push({href:i.link,variant:"secondary",size:{mobile:"medium",1024:"large"},className:"gtm-trackable","data-gtm-event-type":"download-click","data-gtm-event-context":i.eventContext||"Download",target:"_blank",children:i.text})}),O.jsx(oc,{className:ie("download-section",r),children:O.jsxs(O.Fragment,{children:[U.createElement(typeof e=="string"?"h2":e.element,{className:"text"},typeof e=="string"?e:e.text),O.jsx(no,{buttons:n})]})})};const rT=({title:e=!1,logos:t=[],className:r=""})=>{const n=t.length;if(n===0)return null;const i={element:typeof e=="object"?e.element:"h2",text:typeof e=="string"?e:typeof e=="object"?e.text:""};return O.jsxs("div",{className:ie("logos",r),children:[e&&U.createElement(i.element,{className:"title"},i.text),O.jsx("ul",{className:ie({"two-col":n===2||n===4,"three-col":n===5||n<=10&&n%3===0}),children:t.map(({logo:o,nameOfBusiness:s,link:a=!1,description:u=!1},f)=>{if(!o||!o.url)return null;const c=O.jsx("img",{src:o.url,width:o.width||"auto",height:o.height||"auto",alt:s});return O.jsxs("li",{children:[O.jsx("p",{className:"img-wrapper",children:a?O.jsx("a",{href:a,target:"_blank",rel:"nofollow noreferrer noopener",children:c}):c}),u&&O.jsx("small",{children:u})]},window.btoa(`${o.url}_${f}`))})})]})};const nT=["small","span","strong","em","p","h1","h2","h3","h4","h5","h6","blockquote","q"],iT=({content:e,image:t,variant:r="default",spacing:n="normal",cta:i,children:o})=>{const s=["eyebrow","title","text"],a={eyebrow:"small",title:"h1",text:"p"},u={};return s.forEach(f=>{if(!e[f]){u[f]=!1;return}if(typeof e[f]=="object"){u[f]=e[f];const{text:c,element:h}=e[f];if(h&&nT.includes(h.toLowerCase()))return;u[f]={text:c,element:a[f]};return}u[f]={text:e[f],element:a[f]}}),i&&i.link&&i.link[0]==="#"&&(i.props||(i.props={}),i.props.onClick=f=>{f.preventDefault(),f.stopPropagation();const c=document.getElementById(i.link.substring(1));c&&c.scrollIntoView({behavior:"smooth"})}),O.jsx(oc,{className:ie("banner-section",r,n,{"has-image":t,"has-extra-spacing":n==="normal"&&u.eyebrow&&u.title}),children:O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"content-wrapper",children:[s.map(f=>{if(u[f]&&typeof u[f]=="object"){const{text:c,element:h=""}=u[f];return U.createElement(h.toLowerCase(),{key:f,className:f},c)}return null}),o,i&&i.text&&i.link&&O.jsx(Ue,{variant:t||r==="light"?"primary":"secondary",size:{mobile:"medium",768:"large"},href:i.link,...i.props,children:i.text})]}),t&&O.jsx(om,{image:{...t,aspect:"banner"}})]})})},oT=U.memo(iT);const aT=({variant:e="primary",button:t=null,title:r,text:n,gtmContext:i})=>!r&&!n?null:O.jsxs("aside",{className:ie("marketing-block",e),children:[r&&O.jsx("p",{className:"title",children:r}),n&&O.jsx("p",{children:n}),t&&O.jsx(Ue,{variant:"secondary",size:"medium",href:t.link,className:"gtm-trackable","data-gtm-event-context":i,"data-gtm-event-type":"learn-more-click",children:t.text})]});var Fm={exports:{}};(function(e){(function(t,r){var n="…",i=/(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w-]{1,300}@(.{1,300}\.)[a-zA-Z]{2,3})/g;function o(a,u,f){return f.length===a.length||!u.ellipsis||(f+=u.ellipsis),f}function s(a,u,f){var c="",h=!0,d=u,l,p;if(f=f||{},f.ellipsis=typeof f.ellipsis>"u"?n:f.ellipsis,!a||a.length===0)return"";for(h=!0;h;){if(i.lastIndex=c.length,h=i.exec(a),!h||h.index-c.length>=d||i.lastIndex>=u+3e3)return c+=a.substring(c.length,u),o(a,f,c);if(l=h[0],p=h.index,c+=a.substring(c.length,p+l.length),d-=p+l.length,d<=0)break}return o(a,f,c)}e.exports?e.exports=s:t.truncate=s})(String)})(Fm);var sT=Fm.exports;const ac=qt(sT),Qo="https://storage.googleapis.com/apolitical-assets/",uT="200,000+";const sc=({label:e=!1,className:t="",children:r})=>{const n=Ee();return O.jsxs("details",{className:ie("collapsible-section",t),children:[O.jsx("summary",{children:e||n.formatMessage({id:"collapsibleSection_summary"})}),O.jsx("div",{className:"content",children:r})]})};function Qr(){return Qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qr.apply(this,arguments)}const cT=["children","options"],bd=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","className","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),wd={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},lT=["style","script"],fT=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,dT=/mailto:/i,hT=/\n{2,}$/,Dm=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,pT=/^ *> ?/gm,mT=/^ {2,}\n/,gT=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,Um=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,$m=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,yT=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,vT=/^(?:\n *)*\n/,_T=/\r\n?/g,ET=/^\[\^([^\]]+)](:.*)\n/,bT=/^\[\^([^\]]+)]/,wT=/\f/g,ST=/^\s*?\[(x|\s)\]/,jm=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Hm=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,qm=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Nu=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,TT=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Gm=/^<!--[\s\S]*?(?:-->)/,xT=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Pu=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,OT=/^\{.*\}$/,AT=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,CT=/^<([^ >]+@[^ >]+)>/,RT=/^<([^ >]+:\/[^ >]+)>/,NT=/-([a-z])?/gi,Wm=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,PT=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,IT=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,LT=/^\[([^\]]*)\] ?\[([^\]]*)\]/,kT=/(\[|\])/g,MT=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,BT=/\t/g,FT=/^ *\| */,DT=/(^ *\||\| *$)/g,UT=/ *$/,$T=/^ *:-+: *$/,jT=/^ *:-+ *$/,HT=/^ *-+: *$/,qT=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,GT=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,WT=/^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,VT=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,zT=/^\\([^0-9A-Za-z\s])/,YT=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,KT=/^\n+/,QT=/^([ \t]*)/,XT=/\\([^\\])/g,Sd=/ *\n+$/,JT=/(?:^|\n)( *)$/,uc="(?:\\d+\\.)",cc="(?:[*+-])";function Vm(e){return"( *)("+(e===1?uc:cc)+") +"}const zm=Vm(1),Ym=Vm(2);function Km(e){return new RegExp("^"+(e===1?zm:Ym))}const ZT=Km(1),ex=Km(2);function Qm(e){return new RegExp("^"+(e===1?zm:Ym)+"[^\\n]*(?:\\n(?!\\1"+(e===1?uc:cc)+" )[^\\n]*)*(\\n|$)","gm")}const Xm=Qm(1),Jm=Qm(2);function Zm(e){const t=e===1?uc:cc;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const eg=Zm(1),tg=Zm(2);function Td(e,t){const r=t===1,n=r?eg:tg,i=r?Xm:Jm,o=r?ZT:ex;return{t(s,a,u){const f=JT.exec(u);return f&&(a.o||!a._&&!a.u)?n.exec(s=f[1]+s):null},i:ve.HIGH,l(s,a,u){const f=r?+s[2]:void 0,c=s[0].replace(hT,`
86
+ For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function YS(e,t){var r=AS(t),n=ae(ae({},xm),e),i=n.locale,o=n.defaultLocale,s=n.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&s?s(new gd('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&s&&s(new gd('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(o,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new SS('"locale" was not configured, using "'.concat(o,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),n.locale=n.defaultLocale||"en"),zS(n),ae(ae({},n),{formatters:r,formatNumber:GS.bind(null,n,r.getNumberFormat),formatNumberToParts:WS.bind(null,n,r.getNumberFormat),formatRelativeTime:HS.bind(null,n,r.getRelativeTimeFormat),formatDate:CS.bind(null,n,r.getDateTimeFormat),formatDateToParts:PS.bind(null,n,r.getDateTimeFormat),formatTime:RS.bind(null,n,r.getDateTimeFormat),formatDateTimeRange:NS.bind(null,n,r.getDateTimeFormat),formatTimeToParts:IS.bind(null,n,r.getDateTimeFormat),formatPlural:US.bind(null,n,r.getPluralRules),formatMessage:xu.bind(null,n,r),$t:xu.bind(null,n,r),formatList:FS.bind(null,n,r.getListFormat),formatListToParts:Cm.bind(null,n,r.getListFormat),formatDisplayName:MS.bind(null,n,r.getDisplayNames)})}function Nm(e){am(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var Pm=ae(ae({},xm),{textComponent:Oe.Fragment});function KS(e){return function(t){return e(Oe.Children.toArray(t))}}function Ou(e,t){if(e===t)return!0;if(!e||!t)return!1;var r=Object.keys(e),n=Object.keys(t),i=r.length;if(n.length!==i)return!1;for(var o=0;o<i;o++){var s=r[o];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var ic=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Oe.createContext(null)):Oe.createContext(null);ic.Consumer;var QS=ic.Provider,XS=QS,JS=ic;function Ee(){var e=Oe.useContext(JS);return Nm(e),e}var Au;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Au||(Au={}));var Cu;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(Cu||(Cu={}));function Im(e){var t=function(r){var n=Ee(),i=r.value,o=r.children,s=Ln(r,["value","children"]),a=typeof i=="string"?new Date(i||0):i,u=e==="formatDate"?n.formatDateToParts(a,s):n.formatTimeToParts(a,s);return o(u)};return t.displayName=Cu[e],t}function oo(e){var t=function(r){var n=Ee(),i=r.value,o=r.children,s=Ln(r,["value","children"]),a=n[e](i,s);if(typeof o=="function")return o(a);var u=n.textComponent||Oe.Fragment;return Oe.createElement(u,null,a)};return t.displayName=Au[e],t}function Us(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}function Lm(e){return e&&Object.keys(e).reduce(function(t,r){var n=e[r];return t[r]=Sm(n)?KS(n):n,t},{})}var Ed=function(e,t,r,n){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];var s=Lm(n),a=xu.apply(void 0,jt([e,t,r,s],i,!1));return Array.isArray(a)?Oe.Children.toArray(a):a},Ru=function(e,t){var r=e.defaultRichTextElements,n=Ln(e,["defaultRichTextElements"]),i=Lm(r),o=YS(ae(ae(ae({},Pm),n),{defaultRichTextElements:i}),t),s={locale:o.locale,timeZone:o.timeZone,fallbackOnEmptyString:o.fallbackOnEmptyString,formats:o.formats,defaultLocale:o.defaultLocale,defaultFormats:o.defaultFormats,messages:o.messages,onError:o.onError,defaultRichTextElements:i};return ae(ae({},o),{formatMessage:Ed.bind(null,s,o.formatters),$t:Ed.bind(null,s,o.formatters)})},ZS=function(e){_t(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.cache=Om(),r.state={cache:r.cache,intl:Ru(Us(r.props),r.cache),prevConfig:Us(r.props)},r}return t.getDerivedStateFromProps=function(r,n){var i=n.prevConfig,o=n.cache,s=Us(r);return Ou(i,s)?null:{intl:Ru(s,o),prevConfig:s}},t.prototype.render=function(){return Nm(this.state.intl),Oe.createElement(XS,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=Pm,t}(Oe.PureComponent);function eT(e,t){var r=e.values,n=Ln(e,["values"]),i=t.values,o=Ln(t,["values"]);return Ou(i,r)&&Ou(n,o)}function Mm(e){var t=Ee(),r=t.formatMessage,n=t.textComponent,i=n===void 0?Oe.Fragment:n,o=e.id,s=e.description,a=e.defaultMessage,u=e.values,f=e.children,c=e.tagName,h=c===void 0?i:c,d=e.ignoreTag,l={id:o,description:s,defaultMessage:a},p=r(l,u,{ignoreTag:d});return typeof f=="function"?f(Array.isArray(p)?p:[p]):h?Oe.createElement(h,null,Oe.Children.toArray(p)):Oe.createElement(Oe.Fragment,null,p)}Mm.displayName="FormattedMessage";var km=Oe.memo(Mm,eT);km.displayName="MemoizedFormattedMessage";const _r=km;oo("formatDate");oo("formatTime");oo("formatNumber");oo("formatList");oo("formatDisplayName");Im("formatDate");Im("formatTime");let ji=!1;const Bm=({isOpen:e=!1,isLoading:t=!1,children:r})=>{const n=Ee(),i=U.useRef(null),[o,s]=U.useState("hidden");U.useEffect(()=>{const u=i.current;if(u)return u.addEventListener("transitionend",a),()=>{u.removeEventListener("transitionend",a)}},[]);const a=({propertyName:u})=>{u==="opacity"&&(ji!==!1&&clearTimeout(ji),s(f=>f==="opening"?"open":f==="closing"?"closed":f==="closed"?"hidden":f))};return Zr(()=>{ji!==!1&&clearTimeout(ji);let u="open";e?s("opening"):(s("closing"),u="hidden"),ji=setTimeout(()=>{s(u)},300)},[e]),O.jsx("aside",{ref:i,className:ie("tooltip text-medium",o,{loading:t}),hidden:o==="hidden",children:t?O.jsx("p",{children:n.formatMessage({id:"tooltip_loading"})}):typeof r=="string"?O.jsx("p",{children:r}):r})};const oc=({children:e,className:t="",...r})=>O.jsx("section",{className:ie("full-width-section",t),...r,children:e});const tT=({text:e,buttons:t,className:r=""})=>{const n=[];return t.forEach(i=>{n.push({href:i.link,variant:"secondary",size:{mobile:"medium",1024:"large"},className:"gtm-trackable","data-gtm-event-type":"download-click","data-gtm-event-context":i.eventContext||"Download",target:"_blank",children:i.text})}),O.jsx(oc,{className:ie("download-section",r),children:O.jsxs(O.Fragment,{children:[U.createElement(typeof e=="string"?"h2":e.element,{className:"text"},typeof e=="string"?e:e.text),O.jsx(no,{buttons:n})]})})};const rT=({title:e=!1,logos:t=[],className:r=""})=>{const n=t.length;if(n===0)return null;const i={element:typeof e=="object"?e.element:"h2",text:typeof e=="string"?e:typeof e=="object"?e.text:""};return O.jsxs("div",{className:ie("logos",r),children:[e&&U.createElement(i.element,{className:"title"},i.text),O.jsx("ul",{className:ie({"two-col":n===2||n===4,"three-col":n===5||n<=10&&n%3===0}),children:t.map(({logo:o,nameOfBusiness:s,link:a=!1,description:u=!1},f)=>{if(!o||!o.url)return null;const c=O.jsx("img",{src:o.url,width:o.width||"auto",height:o.height||"auto",alt:s});return O.jsxs("li",{children:[O.jsx("p",{className:"img-wrapper",children:a?O.jsx("a",{href:a,target:"_blank",rel:"nofollow noreferrer noopener",children:c}):c}),u&&O.jsx("small",{children:u})]},window.btoa(`${o.url}_${f}`))})})]})};const nT=["small","span","strong","em","p","h1","h2","h3","h4","h5","h6","blockquote","q"],iT=({content:e,image:t,variant:r="default",spacing:n="normal",cta:i,children:o})=>{const s=["eyebrow","title","text"],a={eyebrow:"small",title:"h1",text:"p"},u={};return s.forEach(f=>{if(!e[f]){u[f]=!1;return}if(typeof e[f]=="object"){u[f]=e[f];const{text:c,element:h}=e[f];if(h&&nT.includes(h.toLowerCase()))return;u[f]={text:c,element:a[f]};return}u[f]={text:e[f],element:a[f]}}),i&&i.link&&i.link[0]==="#"&&(i.props||(i.props={}),i.props.onClick=f=>{f.preventDefault(),f.stopPropagation();const c=document.getElementById(i.link.substring(1));c&&c.scrollIntoView({behavior:"smooth"})}),O.jsx(oc,{className:ie("banner-section",r,n,{"has-image":t,"has-extra-spacing":n==="normal"&&u.eyebrow&&u.title}),children:O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"content-wrapper",children:[s.map(f=>{if(u[f]&&typeof u[f]=="object"){const{text:c,element:h=""}=u[f];return U.createElement(h.toLowerCase(),{key:f,className:f},c)}return null}),o,i&&i.text&&i.link&&O.jsx(Ue,{variant:t||r==="light"?"primary":"secondary",size:{mobile:"medium",768:"large"},href:i.link,...i.props,children:i.text})]}),t&&O.jsx(om,{image:{...t,aspect:"banner"}})]})})},oT=U.memo(iT);const aT=({variant:e="primary",button:t=null,title:r,text:n,gtmContext:i})=>!r&&!n?null:O.jsxs("aside",{className:ie("marketing-block",e),children:[r&&O.jsx("p",{className:"title",children:r}),n&&O.jsx("p",{children:n}),t&&O.jsx(Ue,{variant:"secondary",size:"medium",href:t.link,className:"gtm-trackable","data-gtm-event-context":i,"data-gtm-event-type":"learn-more-click",children:t.text})]});var Fm={exports:{}};(function(e){(function(t,r){var n="…",i=/(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w-]{1,300}@(.{1,300}\.)[a-zA-Z]{2,3})/g;function o(a,u,f){return f.length===a.length||!u.ellipsis||(f+=u.ellipsis),f}function s(a,u,f){var c="",h=!0,d=u,l,p;if(f=f||{},f.ellipsis=typeof f.ellipsis>"u"?n:f.ellipsis,!a||a.length===0)return"";for(h=!0;h;){if(i.lastIndex=c.length,h=i.exec(a),!h||h.index-c.length>=d||i.lastIndex>=u+3e3)return c+=a.substring(c.length,u),o(a,f,c);if(l=h[0],p=h.index,c+=a.substring(c.length,p+l.length),d-=p+l.length,d<=0)break}return o(a,f,c)}e.exports?e.exports=s:t.truncate=s})(String)})(Fm);var sT=Fm.exports;const ac=qt(sT),Qo="https://storage.googleapis.com/apolitical-assets/",uT="200,000+";const sc=({label:e=!1,className:t="",children:r})=>{const n=Ee();return O.jsxs("details",{className:ie("collapsible-section",t),children:[O.jsx("summary",{children:e||n.formatMessage({id:"collapsibleSection_summary"})}),O.jsx("div",{className:"content",children:r})]})};function Qr(){return Qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qr.apply(this,arguments)}const cT=["children","options"],bd=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","className","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),wd={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},lT=["style","script"],fT=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,dT=/mailto:/i,hT=/\n{2,}$/,Dm=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,pT=/^ *> ?/gm,mT=/^ {2,}\n/,gT=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,Um=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,$m=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,yT=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,vT=/^(?:\n *)*\n/,_T=/\r\n?/g,ET=/^\[\^([^\]]+)](:.*)\n/,bT=/^\[\^([^\]]+)]/,wT=/\f/g,ST=/^\s*?\[(x|\s)\]/,jm=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Hm=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,qm=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Nu=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,TT=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Gm=/^<!--[\s\S]*?(?:-->)/,xT=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Pu=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,OT=/^\{.*\}$/,AT=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,CT=/^<([^ >]+@[^ >]+)>/,RT=/^<([^ >]+:\/[^ >]+)>/,NT=/-([a-z])?/gi,Wm=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,PT=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,IT=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,LT=/^\[([^\]]*)\] ?\[([^\]]*)\]/,MT=/(\[|\])/g,kT=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,BT=/\t/g,FT=/^ *\| */,DT=/(^ *\||\| *$)/g,UT=/ *$/,$T=/^ *:-+: *$/,jT=/^ *:-+ *$/,HT=/^ *-+: *$/,qT=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,GT=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,WT=/^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,VT=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,zT=/^\\([^0-9A-Za-z\s])/,YT=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,KT=/^\n+/,QT=/^([ \t]*)/,XT=/\\([^\\])/g,Sd=/ *\n+$/,JT=/(?:^|\n)( *)$/,uc="(?:\\d+\\.)",cc="(?:[*+-])";function Vm(e){return"( *)("+(e===1?uc:cc)+") +"}const zm=Vm(1),Ym=Vm(2);function Km(e){return new RegExp("^"+(e===1?zm:Ym))}const ZT=Km(1),ex=Km(2);function Qm(e){return new RegExp("^"+(e===1?zm:Ym)+"[^\\n]*(?:\\n(?!\\1"+(e===1?uc:cc)+" )[^\\n]*)*(\\n|$)","gm")}const Xm=Qm(1),Jm=Qm(2);function Zm(e){const t=e===1?uc:cc;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const eg=Zm(1),tg=Zm(2);function Td(e,t){const r=t===1,n=r?eg:tg,i=r?Xm:Jm,o=r?ZT:ex;return{t(s,a,u){const f=JT.exec(u);return f&&(a.o||!a._&&!a.u)?n.exec(s=f[1]+s):null},i:ve.HIGH,l(s,a,u){const f=r?+s[2]:void 0,c=s[0].replace(hT,`
87
87
  `).match(i);let h=!1;return{p:c.map(function(d,l){const p=o.exec(d)[0].length,m=new RegExp("^ {1,"+p+"}","gm"),b=d.replace(m,"").replace(o,""),T=l===c.length-1,_=b.indexOf(`
88
88
 
89
89
  `)!==-1||T&&h;h=_;const E=u._,A=u.o;let w;u.o=!0,_?(u._=!1,w=b.replace(Sd,`
@@ -92,10 +92,10 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
92
92
  `).map(function(f){return xd(f,a,u)})}(e[3],t,r);return r._=!1,{S:i,A:o,L:n,type:"table"}}function Od(e,t){return e.S[t]==null?{}:{textAlign:e.S[t]}}function mr(e){return function(t,r){return r._?e.exec(t):null}}function gr(e){return function(t,r){return r._||r.u?e.exec(t):null}}function rr(e){return function(t,r){return r._||r.u?null:e.exec(t)}}function Hi(e){return function(t){return e.exec(t)}}function sx(e,t,r){if(t._||t.u||r&&!r.endsWith(`
93
93
  `))return null;let n="";e.split(`
94
94
  `).every(o=>!rg.some(s=>s.test(o))&&(n+=o+`
95
- `,o.trim()));const i=n.trimEnd();return i==""?null:[n,i]}function xn(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch{return null}return e}function Ad(e){return e.replace(XT,"$1")}function $o(e,t,r){const n=r._||!1,i=r.u||!1;r._=!0,r.u=!0;const o=e(t,r);return r._=n,r.u=i,o}function ux(e,t,r){const n=r._||!1,i=r.u||!1;r._=!1,r.u=!0;const o=e(t,r);return r._=n,r.u=i,o}function cx(e,t,r){return r._=!1,e(t,r)}const $s=(e,t,r)=>({v:$o(t,e[1],r)});function js(){return{}}function Hs(){return null}function lx(...e){return e.filter(Boolean).join(" ")}function qs(e,t,r){let n=e;const i=t.split(".");for(;i.length&&(n=n[i[0]],n!==void 0);)i.shift();return n||r}var ve;function fx(e,t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||ix,t.namedCodesToUnicode=t.namedCodesToUnicode?Qr({},wd,t.namedCodesToUnicode):wd;const r=t.createElement||Oe.createElement;function n(l,p,...m){const b=qs(t.overrides,`${l}.props`,{});return r(function(T,_){const E=qs(_,T);return E?typeof E=="function"||typeof E=="object"&&"render"in E?E:qs(_,`${T}.component`,T):T}(l,t.overrides),Qr({},p,b,{className:lx(p==null?void 0:p.className,b.className)||void 0}),...m)}function i(l){let p=!1;t.forceInline?p=!0:t.forceBlock||(p=MT.test(l)===!1);const m=c(f(p?l:`${l.trimEnd().replace(KT,"")}
95
+ `,o.trim()));const i=n.trimEnd();return i==""?null:[n,i]}function xn(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch{return null}return e}function Ad(e){return e.replace(XT,"$1")}function $o(e,t,r){const n=r._||!1,i=r.u||!1;r._=!0,r.u=!0;const o=e(t,r);return r._=n,r.u=i,o}function ux(e,t,r){const n=r._||!1,i=r.u||!1;r._=!1,r.u=!0;const o=e(t,r);return r._=n,r.u=i,o}function cx(e,t,r){return r._=!1,e(t,r)}const $s=(e,t,r)=>({v:$o(t,e[1],r)});function js(){return{}}function Hs(){return null}function lx(...e){return e.filter(Boolean).join(" ")}function qs(e,t,r){let n=e;const i=t.split(".");for(;i.length&&(n=n[i[0]],n!==void 0);)i.shift();return n||r}var ve;function fx(e,t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||ix,t.namedCodesToUnicode=t.namedCodesToUnicode?Qr({},wd,t.namedCodesToUnicode):wd;const r=t.createElement||Oe.createElement;function n(l,p,...m){const b=qs(t.overrides,`${l}.props`,{});return r(function(T,_){const E=qs(_,T);return E?typeof E=="function"||typeof E=="object"&&"render"in E?E:qs(_,`${T}.component`,T):T}(l,t.overrides),Qr({},p,b,{className:lx(p==null?void 0:p.className,b.className)||void 0}),...m)}function i(l){let p=!1;t.forceInline?p=!0:t.forceBlock||(p=kT.test(l)===!1);const m=c(f(p?l:`${l.trimEnd().replace(KT,"")}
96
96
 
97
97
  `,{_:p}));for(;typeof m[m.length-1]=="string"&&!m[m.length-1].trim();)m.pop();if(t.wrapper===null)return m;const b=t.wrapper||(p?"span":"div");let T;if(m.length>1||t.forceWrapper)T=m;else{if(m.length===1)return T=m[0],typeof T=="string"?n("span",{key:"outer"},T):T;T=null}return Oe.createElement(b,{key:"outer"},T)}function o(l){const p=l.match(fT);return p?p.reduce(function(m,b,T){const _=b.indexOf("=");if(_!==-1){const E=function(F){return F.indexOf("-")!==-1&&F.match(xT)===null&&(F=F.replace(NT,function(B,G){return G.toUpperCase()})),F}(b.slice(0,_)).trim(),A=function(F){const B=F[0];return(B==='"'||B==="'")&&F.length>=2&&F[F.length-1]===B?F.slice(1,-1):F}(b.slice(_+1).trim()),w=bd[E]||E,N=m[w]=function(F,B){return F==="style"?B.split(/;\s?/).reduce(function(G,W){const z=W.slice(0,W.indexOf(":"));return G[z.replace(/(-[a-z])/g,$=>$[1].toUpperCase())]=W.slice(z.length+1).trim(),G},{}):F==="href"?xn(B):(B.match(OT)&&(B=B.slice(1,B.length-1)),B==="true"||B!=="false"&&B)}(E,A);typeof N=="string"&&(Nu.test(N)||Pu.test(N))&&(m[w]=Oe.cloneElement(i(N.trim()),{key:T}))}else b!=="style"&&(m[bd[b]||b]=!0);return m},{}):null}const s=[],a={},u={blockQuote:{t:rr(Dm),i:ve.HIGH,l:(l,p,m)=>({v:p(l[0].replace(pT,""),m)}),h:(l,p,m)=>n("blockquote",{key:m.k},p(l.v,m))},breakLine:{t:Hi(mT),i:ve.HIGH,l:js,h:(l,p,m)=>n("br",{key:m.k})},breakThematic:{t:rr(gT),i:ve.HIGH,l:js,h:(l,p,m)=>n("hr",{key:m.k})},codeBlock:{t:rr($m),i:ve.MAX,l:l=>({v:l[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(l,p,m)=>n("pre",{key:m.k},n("code",Qr({},l.O,{className:l.M?`lang-${l.M}`:""}),l.v))},codeFenced:{t:rr(Um),i:ve.MAX,l:l=>({O:o(l[3]||""),v:l[4],M:l[2]||void 0,type:"codeBlock"})},codeInline:{t:gr(yT),i:ve.LOW,l:l=>({v:l[2]}),h:(l,p,m)=>n("code",{key:m.k},l.v)},footnote:{t:rr(ET),i:ve.MAX,l:l=>(s.push({I:l[2],j:l[1]}),{}),h:Hs},footnoteReference:{t:mr(bT),i:ve.HIGH,l:l=>({v:l[1],B:`#${t.slugify(l[1])}`}),h:(l,p,m)=>n("a",{key:m.k,href:xn(l.B)},n("sup",{key:m.k},l.v))},gfmTask:{t:mr(ST),i:ve.HIGH,l:l=>({R:l[1].toLowerCase()==="x"}),h:(l,p,m)=>n("input",{checked:l.R,key:m.k,readOnly:!0,type:"checkbox"})},heading:{t:rr(t.enforceAtxHeadings?Hm:jm),i:ve.HIGH,l:(l,p,m)=>({v:$o(p,l[2],m),T:t.slugify(l[2]),C:l[1].length}),h:(l,p,m)=>n(`h${l.C}`,{id:l.T,key:m.k},p(l.v,m))},headingSetext:{t:rr(qm),i:ve.MAX,l:(l,p,m)=>({v:$o(p,l[1],m),C:l[2]==="="?1:2,type:"heading"})},htmlComment:{t:Hi(Gm),i:ve.HIGH,l:()=>({}),h:Hs},image:{t:gr(rx),i:ve.HIGH,l:l=>({D:l[1],B:Ad(l[2]),F:l[3]}),h:(l,p,m)=>n("img",{key:m.k,alt:l.D||void 0,title:l.F||void 0,src:xn(l.B)})},link:{t:mr(tx),i:ve.LOW,l:(l,p,m)=>({v:ux(p,l[1],m),B:Ad(l[2]),F:l[3]}),h:(l,p,m)=>n("a",{key:m.k,href:xn(l.B),title:l.F},p(l.v,m))},linkAngleBraceStyleDetector:{t:mr(RT),i:ve.MAX,l:l=>({v:[{v:l[1],type:"text"}],B:l[1],type:"link"})},linkBareUrlDetector:{t:(l,p)=>p.N?null:mr(AT)(l,p),i:ve.MAX,l:l=>({v:[{v:l[1],type:"text"}],B:l[1],F:void 0,type:"link"})},linkMailtoDetector:{t:mr(CT),i:ve.MAX,l(l){let p=l[1],m=l[1];return dT.test(m)||(m="mailto:"+m),{v:[{v:p.replace("mailto:",""),type:"text"}],B:m,type:"link"}}},orderedList:Td(n,1),unorderedList:Td(n,2),newlineCoalescer:{t:rr(vT),i:ve.LOW,l:js,h:()=>`
98
- `},paragraph:{t:sx,i:ve.LOW,l:$s,h:(l,p,m)=>n("p",{key:m.k},p(l.v,m))},ref:{t:mr(PT),i:ve.MAX,l:l=>(a[l[1]]={B:l[2],F:l[4]},{}),h:Hs},refImage:{t:gr(IT),i:ve.MAX,l:l=>({D:l[1]||void 0,P:l[2]}),h:(l,p,m)=>n("img",{key:m.k,alt:l.D,src:xn(a[l.P].B),title:a[l.P].F})},refLink:{t:mr(LT),i:ve.MAX,l:(l,p,m)=>({v:p(l[1],m),Z:p(l[0].replace(kT,"\\$1"),m),P:l[2]}),h:(l,p,m)=>a[l.P]?n("a",{key:m.k,href:xn(a[l.P].B),title:a[l.P].F},p(l.v,m)):n("span",{key:m.k},p(l.Z,m))},table:{t:rr(Wm),i:ve.HIGH,l:ax,h:(l,p,m)=>n("table",{key:m.k},n("thead",null,n("tr",null,l.L.map(function(b,T){return n("th",{key:T,style:Od(l,T)},p(b,m))}))),n("tbody",null,l.A.map(function(b,T){return n("tr",{key:T},b.map(function(_,E){return n("td",{key:E,style:Od(l,E)},p(_,m))}))})))},tableSeparator:{t:function(l,p){return p.$?(p._=!0,FT.exec(l)):null},i:ve.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:Hi(YT),i:ve.MIN,l:l=>({v:l[0].replace(TT,(p,m)=>t.namedCodesToUnicode[m]?t.namedCodesToUnicode[m]:p)}),h:l=>l.v},textBolded:{t:gr(qT),i:ve.MED,l:(l,p,m)=>({v:p(l[2],m)}),h:(l,p,m)=>n("strong",{key:m.k},p(l.v,m))},textEmphasized:{t:gr(GT),i:ve.LOW,l:(l,p,m)=>({v:p(l[2],m)}),h:(l,p,m)=>n("em",{key:m.k},p(l.v,m))},textEscaped:{t:gr(zT),i:ve.HIGH,l:l=>({v:l[1],type:"text"})},textMarked:{t:gr(WT),i:ve.LOW,l:$s,h:(l,p,m)=>n("mark",{key:m.k},p(l.v,m))},textStrikethroughed:{t:gr(VT),i:ve.LOW,l:$s,h:(l,p,m)=>n("del",{key:m.k},p(l.v,m))}};t.disableParsingRawHTML!==!0&&(u.htmlBlock={t:Hi(Nu),i:ve.HIGH,l(l,p,m){const[,b]=l[3].match(QT),T=new RegExp(`^${b}`,"gm"),_=l[3].replace(T,""),E=(A=_,nx.some(B=>B.test(A))?cx:$o);var A;const w=l[1].toLowerCase(),N=lT.indexOf(w)!==-1;m.N=m.N||w==="a";const F=N?l[3]:E(p,_,m);return m.N=!1,{O:o(l[2]),v:F,G:N,H:N?w:l[1]}},h:(l,p,m)=>n(l.H,Qr({key:m.k},l.O),l.G?l.v:p(l.v,m))},u.htmlSelfClosing={t:Hi(Pu),i:ve.HIGH,l:l=>({O:o(l[2]||""),H:l[1]}),h:(l,p,m)=>n(l.H,Qr({},l.O,{key:m.k}))});const f=function(l){let p=Object.keys(l);function m(b,T){let _=[],E="";for(;b;){let A=0;for(;A<p.length;){const w=p[A],N=l[w],F=N.t(b,T,E);if(F){const B=F[0];b=b.substring(B.length);const G=N.l(F,m,T);G.type==null&&(G.type=w),_.push(G),E=B;break}A++}}return _}return p.sort(function(b,T){let _=l[b].i,E=l[T].i;return _!==E?_-E:b<T?-1:1}),function(b,T){return m(function(_){return _.replace(_T,`
98
+ `},paragraph:{t:sx,i:ve.LOW,l:$s,h:(l,p,m)=>n("p",{key:m.k},p(l.v,m))},ref:{t:mr(PT),i:ve.MAX,l:l=>(a[l[1]]={B:l[2],F:l[4]},{}),h:Hs},refImage:{t:gr(IT),i:ve.MAX,l:l=>({D:l[1]||void 0,P:l[2]}),h:(l,p,m)=>n("img",{key:m.k,alt:l.D,src:xn(a[l.P].B),title:a[l.P].F})},refLink:{t:mr(LT),i:ve.MAX,l:(l,p,m)=>({v:p(l[1],m),Z:p(l[0].replace(MT,"\\$1"),m),P:l[2]}),h:(l,p,m)=>a[l.P]?n("a",{key:m.k,href:xn(a[l.P].B),title:a[l.P].F},p(l.v,m)):n("span",{key:m.k},p(l.Z,m))},table:{t:rr(Wm),i:ve.HIGH,l:ax,h:(l,p,m)=>n("table",{key:m.k},n("thead",null,n("tr",null,l.L.map(function(b,T){return n("th",{key:T,style:Od(l,T)},p(b,m))}))),n("tbody",null,l.A.map(function(b,T){return n("tr",{key:T},b.map(function(_,E){return n("td",{key:E,style:Od(l,E)},p(_,m))}))})))},tableSeparator:{t:function(l,p){return p.$?(p._=!0,FT.exec(l)):null},i:ve.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:Hi(YT),i:ve.MIN,l:l=>({v:l[0].replace(TT,(p,m)=>t.namedCodesToUnicode[m]?t.namedCodesToUnicode[m]:p)}),h:l=>l.v},textBolded:{t:gr(qT),i:ve.MED,l:(l,p,m)=>({v:p(l[2],m)}),h:(l,p,m)=>n("strong",{key:m.k},p(l.v,m))},textEmphasized:{t:gr(GT),i:ve.LOW,l:(l,p,m)=>({v:p(l[2],m)}),h:(l,p,m)=>n("em",{key:m.k},p(l.v,m))},textEscaped:{t:gr(zT),i:ve.HIGH,l:l=>({v:l[1],type:"text"})},textMarked:{t:gr(WT),i:ve.LOW,l:$s,h:(l,p,m)=>n("mark",{key:m.k},p(l.v,m))},textStrikethroughed:{t:gr(VT),i:ve.LOW,l:$s,h:(l,p,m)=>n("del",{key:m.k},p(l.v,m))}};t.disableParsingRawHTML!==!0&&(u.htmlBlock={t:Hi(Nu),i:ve.HIGH,l(l,p,m){const[,b]=l[3].match(QT),T=new RegExp(`^${b}`,"gm"),_=l[3].replace(T,""),E=(A=_,nx.some(B=>B.test(A))?cx:$o);var A;const w=l[1].toLowerCase(),N=lT.indexOf(w)!==-1;m.N=m.N||w==="a";const F=N?l[3]:E(p,_,m);return m.N=!1,{O:o(l[2]),v:F,G:N,H:N?w:l[1]}},h:(l,p,m)=>n(l.H,Qr({key:m.k},l.O),l.G?l.v:p(l.v,m))},u.htmlSelfClosing={t:Hi(Pu),i:ve.HIGH,l:l=>({O:o(l[2]||""),H:l[1]}),h:(l,p,m)=>n(l.H,Qr({},l.O,{key:m.k}))});const f=function(l){let p=Object.keys(l);function m(b,T){let _=[],E="";for(;b;){let A=0;for(;A<p.length;){const w=p[A],N=l[w],F=N.t(b,T,E);if(F){const B=F[0];b=b.substring(B.length);const G=N.l(F,m,T);G.type==null&&(G.type=w),_.push(G),E=B;break}A++}}return _}return p.sort(function(b,T){let _=l[b].i,E=l[T].i;return _!==E?_-E:b<T?-1:1}),function(b,T){return m(function(_){return _.replace(_T,`
99
99
  `).replace(wT,"").replace(BT," ")}(b),T)}}(u),c=(h=function(l){return function(p,m,b){return l[p.type].h(p,m,b)}}(u),function l(p,m={}){if(Array.isArray(p)){const b=m.k,T=[];let _=!1;for(let E=0;E<p.length;E++){m.k=E;const A=l(p[E],m),w=typeof A=="string";w&&_?T[T.length-1]+=A:A!==null&&T.push(A),_=w}return m.k=b,T}return h(p,l,m)});var h;const d=i(e);return s.length?n("div",null,d,n("footer",{key:"footer"},s.map(function(l){return n("div",{id:t.slugify(l.j),key:l.j},l.j,c(f(l.I,{_:!0})))}))):d}(function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"})(ve||(ve={}));const la=e=>{let{children:t,options:r}=e,n=function(i,o){if(i==null)return{};var s,a,u={},f=Object.keys(i);for(a=0;a<f.length;a++)o.indexOf(s=f[a])>=0||(u[s]=i[s]);return u}(e,cT);return Oe.cloneElement(fx(t,r),n)};const ar=({variant:e="primary",className:t="",children:r,...n})=>O.jsx("div",{className:ie("highlighted-text-box",e,t),...n,children:r});const ng=({variant:e="empty",text:t=!1,button:r=!1,className:n=""})=>{let i=r&&!!Object.keys(r).length;const o=typeof r=="object"&&"breakpoints"in r,s=ro(o);if(o&&typeof r=="object"&&typeof s=="number"){const h=Object.assign({},r.breakpoints),d=rm(Object.keys(h));i=nm(s,d,h)}const{breakpoints:a,text:u="",component:f,...c}=r;return O.jsx(ar,{variant:"subtle",className:ie("empty-state-box",e,n),children:O.jsxs(O.Fragment,{children:[t&&O.jsx(la,{options:{forceBlock:!0},children:t}),i&&typeof r=="object"&&(f||O.jsx(Ue,{...c,variant:r.variant?r.variant:"secondary",children:u}))]})})};const Iu=({children:e,...t})=>O.jsx("p",{...t,children:e}),ig={q:Iu,blockquote:Iu};for(let e=1;e<=6;e++)ig[`h${e}`]={component:Iu,props:{className:"title"}};const og=({type:e="default",className:t="",heading:r=!1,children:n})=>O.jsxs("div",{className:ie("helper-text-box text-small",e,t),children:[r&&O.jsx("p",{className:"title",children:r}),typeof n=="string"?O.jsx(la,{options:{wrapper:U.Fragment,forceBlock:!0,overrides:ig},children:n}):O.jsx("p",{children:n})]});const dx=({className:e="",show:t=!1,hide:r=!1,text:n,children:i})=>{const o=Ee(),s=U.useRef(null),[a,u]=U.useState(""),[f,c]=U.useState("closed");U.useEffect(()=>{const l=s.current;if(l)return l.addEventListener("transitionend",h),()=>{l.removeEventListener("transitionend",h)}},[]),U.useEffect(()=>{if(!n||typeof n!="string")return;const l=n.split(`
100
100
  `);u(l.length<3?`${n.substring(0,400)}...`:l.slice(0,3).join(`
101
- `))},[n]),U.useEffect(()=>{f==="ready-to-close"&&c("closing")},[f]);const h=({propertyName:l})=>{l==="max-height"&&c(p=>p==="opening"?"open":p==="closing"?"closed":p)};if(!n)return null;const d=["opening","open"].includes(f);return O.jsxs(ar,{variant:"subtle",className:ie("hide-show-text-box",e),children:[O.jsxs("div",{ref:s,className:ie("content",f),children:[O.jsx(la,{options:{forceBlock:!0},children:f==="closed"?a:n}),f!=="closed"&&i]}),O.jsx("p",{className:"cta",children:O.jsx(Ue,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:ie({"rotate-180":d}),onClick:()=>{c(d?"ready-to-close":"opening")},children:d?r||o.formatMessage({id:"hideShowTextBox_hide"}):t||o.formatMessage({id:"hideShowTextBox_show"})})})]})},hx=()=>U.Fragment,px=({children:e})=>O.jsx(ar,{variant:"secondary",children:e}),mx=["span","strong","h1","h2","h3","h4","h5","h6","p"],gx=({children:e})=>{const t=Ee();if(!e)return null;let r=t.formatMessage({id:"markdown_collapsibleSection_summary"});const n=[];for(const o of U.Children.toArray(e))if(!(!o||typeof o=="string"||typeof o=="number"))if(U.isValidElement(o)&&o.type==="summary"){if(o.props&&o.props.children){for(const s of U.Children.toArray(o.props.children))if(!(!s||typeof s=="string"||typeof s=="number")&&U.isValidElement(s)){const a=s.type;if(mx.includes(a)){for(r=s.props.children;typeof r!="string"&&(Array.isArray(r)&&r[0].props&&r[0].props.children&&r[0].props.children[0]);)r=r[0].props.children[0];break}}}}else n.push(o);const i=r?r.toString():"";return O.jsx(sc,{label:i,className:["Sources","Resources"].includes(i)?"discrete-links":"",children:n.map(o=>o)})},yx=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return O.jsx(ar,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return O.jsx(ar,{variant:"primary",children:e});case"pink-textbox":return O.jsx(ar,{variant:"tertiary",children:e});default:return O.jsx("div",{...t,children:e})}return O.jsx("div",{...t,children:e})},vx=e=>{const t=Ee(),r=Date.now().toString();let n="default";const i=e.src;return i.includes("youtube")||i.includes("vimeo")?n="video":i.includes("riddle")||i.includes("sli.do")?n="poll":i.includes("padlet")&&(n="padlet"),O.jsxs(O.Fragment,{children:[O.jsx(Je,{children:O.jsx(Ze.Link,{to:`#content-after-iframe-${r}`,children:t.formatMessage({id:`markdown_skip${n==="default"?"":`_${n}`}`})})}),O.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${n==="default"?"":`_${n}`}`})}),O.jsx("span",{id:`content-after-iframe-${r}`,tabIndex:-1})]})},Cd=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},_x=({children:e,...t})=>{let r={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(r.target="_blank");let n=e,i=!1;for(const o of U.Children.toArray(e))if(!(!o||typeof o=="string"||typeof o=="number")&&U.isValidElement(o)){const s=o.type;if(["button","center","span","strong"].includes(s)&&o.props&&o.props.children&&o.props.children[0])for((s==="button"||Cd(o.props.children[0])==="button")&&(i=!0),n=o.props.children[0];n&&typeof n!="string"&&!(typeof n=="boolean"||typeof n=="number"||!U.isValidElement(n));)if(n.props&&n.props.children&&n.props.children[0])n=n.props.children[0],n&&Cd(n)==="button"&&(i=!0);else break}return i?(r={...r,className:"button primary medium"},O.jsx("p",{className:"center",children:O.jsx(Ue,{variant:"primary",size:"medium",...r,children:n})})):O.jsx(Ze.Link,{to:r.href||"#",...r,children:n})},ag=({children:e})=>O.jsx("span",{children:e});const Lu=({className:e="",options:t={},children:r})=>{r=r.replace(/^<br\/?>/,"");const n={wrapper:U.Fragment,forceBlock:!0,overrides:{a:_x,CollapsibleSection:sc,TextBox:ar,CaseStudy:px,style:hx,details:gx,div:yx,iframe:vx}};return O.jsx("div",{className:ie("markdown-text",e),children:O.jsx(la,{options:{...n,...t},children:r})})};const sg=({size:e="medium",variant:t="default",className:r="",children:n})=>O.jsx("span",{className:ie("pill",e,t,r),children:n});const Xo=({element:e="p",children:t=null,className:r="",...n})=>U.createElement(e,{...n,className:ie("status-banner text-small",r),"aria-live":"assertive"},t);const Ex=({progress:e=0,text:t=!1,className:r=""})=>{const n=Ee(),i=e>75?100:e>50?75:e>25?50:e>5?25:0,o={"--progress":`${e}%`};return O.jsx("span",{className:ie(`progress-bar section-${i}`,r),style:o,children:O.jsx(Je,{children:t?`${e} ${t}`:n.formatMessage({id:"progressBar"},{number:e})})})},ug=U.memo(Ex);const Gs="loadingBlock_",bx=({progress:e=0,steps:t=!1,className:r=""})=>{const n=Ee();t||(t={0:{text:n.formatMessage({id:`${Gs}loading`})},75:{text:n.formatMessage({id:`${Gs}almostDone`})},100:{text:n.formatMessage({id:`${Gs}complete`})}});let i=null;const o=Object.keys(t);for(let a=0;a<o.length&&!(e<parseInt(o[a]));a++)i=o[a];const s=i&&t[i].icon?{"--icon":`url(${Qo}icons/${t[i].icon}.svg)`}:{};return O.jsxs(ar,{className:ie("loading-block",r,{"has-icon":i&&t[i].icon}),variant:"subtle",style:s,children:[i&&O.jsx("span",{className:"step",children:t[i].text}),O.jsx(ug,{progress:e})]})},wx=U.memo(bx);const br=({element:e="div",className:t="",...r})=>O.jsx(Bu,{element:e,className:ie("loading-placeholder",t),...r});const ku={header:["logo","link","link","search"],sidebar:["text","text","text","text","text"],"cards-section":["subtitle","cards"],cards:["card","card","card","card"],"overview-page":["header","sidebar","title","text","cards-section","cards-section","footer"]},cg=(e,t)=>e in ku?O.jsx("div",{className:e,children:ku[e].map((r,n)=>cg(r,n))},t):O.jsx(br,{className:e},t),lg=({layout:e="overview-page"})=>O.jsx("div",{className:ie("loading-state",e),children:ku[e].map((t,r)=>cg(t,r))}),fg=e=>{const t=e&&e.toUpperCase().split(" ");return Array.isArray(t)&&t.length>1&&t[0]!==""?t[1]===""?t[0][0]:t[0][0]+t[t.length-1][0]:e?e.substr(0,1):""},Io=["#5AB6A3","#A2D7AF","#806056","#3962B3"],Sx=e=>{const t=Math.ceil(26/Io.length),r=fg(e).toLowerCase();if(r==="")return Io[0];const n=r.charCodeAt(0)-96;for(let i=0;i<Io.length;i++)if(n<=t*(i+1))return Io[i]};const Rd=256,fa=({className:e="",src:t="",name:r,alt:n,width:i=Rd,height:o=Rd,...s})=>{const[a,u]=U.useState(!1),f=U.useRef(null);return U.useEffect(()=>{const c=f.current;if(!c)return;const h=c.getContext("2d");if(!h)return;const d=i,l=o;typeof window<"u"&&window.devicePixelRatio&&(c.width=d*window.devicePixelRatio,c.height=l*window.devicePixelRatio,h.scale(window.devicePixelRatio,window.devicePixelRatio)),h.fillStyle=Sx(r),h.fillRect(0,0,d,l),h.font=`${d/3}px Arial`,h.textAlign="center",h.fillStyle="white",h.fillText(fg(r),d/2,l/1.6)},[r]),O.jsxs("figure",{className:ie("profile-picture",e,{error:a}),...s,children:[t!==""&&!a&&O.jsx("img",{src:t,alt:n||r,onError:()=>{u(!0)},width:i,height:o}),(t===""||a)&&O.jsx("canvas",{ref:f})]})},lc=e=>e==="apolitical"?{image:`${Qo}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${Qo}logos/member_community.svg`}:{name:e.name,role:e.jobTitle||"",organisation:e.organization||"",country:e.location&&e.location.country||"",url:`/profiles/${e.id}`,image:e.image&&e.image.thumbnail},Tx=({role:e="",organisation:t="",country:r="",maximumCharacters:n=80})=>{const i=e!=="",o=t!=="",s=r!=="";if(!i&&!o&&!s)return"";const a=`${e}${i&&o?` — ${t}`:t}`;let u=`${a}${(i||o)&&s?`, ${r}`:r}`;return u.length>n&&(u=a),u.length>n&&(u=ac(u,n)),u};const da=({element:e="div",member:t="community",additionalContent:r=!1,gtmContext:n="member",gtmType:i="member-click",className:o=""})=>{const s=Ee(),a=lc(t);a.name||(a.name=s.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:u,url:f,image:c}=a,h=Tx(a),d=r&&r.createdAt?Ow(r.createdAt):!1,l=r&&r.createdAt?xw(r.createdAt):"";return U.createElement(e,{className:ie("member text-medium",o),children:O.jsxs(ua,{href:f,gtmType:i,gtmContext:n,onClick:p=>{p==null||p.stopPropagation()},children:[O.jsx(fa,{name:u,src:c}),O.jsxs("p",{className:"details",children:[O.jsx("strong",{children:u}),r&&O.jsxs("span",{className:"additional-content",children:[r.createdAt&&d&&O.jsx("span",{className:"date",title:l,"aria-label":l,children:s.formatMessage({id:`dates_${d.path}`},{number:d.number})}),r.didEdit&&O.jsx("em",{children:s.formatMessage({id:"discussion_edited"})})]}),h&&O.jsx("small",{children:h})]})]})})};const Nd={small:24,medium:48},dg=({element:e="div",contributors:{total:t,data:r}={total:void 0,data:[]},styling:{showText:n,size:i,showGap:o,showPlaceholders:s}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:a=2,className:u=""})=>{const f=Ee();return!r||r.length===0?null:U.createElement(e,{className:ie("contributors",u,i,{"has-gap":o}),children:O.jsxs(O.Fragment,{children:[O.jsx("ul",{children:r.map((c,h)=>{let d,l="";if(h<a){const{name:p="",image:m=""}=lc(c);if(s)return O.jsx(br,{element:"li",className:"contributor"},h);d=O.jsx(fa,{name:p,src:m,width:Nd[i||"medium"],height:Nd[i||"medium"]})}else if(h===a){const p=(t||r.length)-a;d=O.jsxs("small",{className:ie({"large-number":p>99}),children:["+",Nw(p,0)]}),l="number-left"}return d?O.jsx("li",{className:ie("contributor",l),children:d},h):null})}),n&&O.jsx("span",{className:"label",children:typeof n=="string"?n:r.length===1?typeof r[0]=="string"?f.formatMessage({id:`member_${r[0]}`}):ac(r[0].name||"",20):null})]})})},xx=({children:e,locale:t,messages:r})=>{const n=t||"en",i={...Rw[n],...r||{}};return O.jsx(ZS,{locale:n,messages:i,children:e})},$n=U.createContext(null),Ox=({children:e,user:t})=>O.jsx($n.Provider,{value:t,children:e});const Ws="joinCommunityButton",hg=({isMember:e=!1,isShort:t=!1,functions:{join:r,leave:n}={join:()=>{},leave:()=>{}}})=>{const i=Ee(),o=U.useContext($n),s=o&&typeof o.id=="string",[a,u]=U.useState(e),[f,c]=U.useState(e?"joined":"notJoined");U.useEffect(()=>{f==="joining"?c("joined"):f==="leaving"&&c("notJoined")},[a]);const h={},d={};return a&&f!=="leaving"&&(h["data-hover-text"]=i.formatMessage({id:`${Ws}_leave`}),h["aria-label"]=i.formatMessage({id:`${Ws}_member_aria`}),d["aria-hidden"]="true"),O.jsx(Ue,{variant:a?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:a&&f!=="leaving"?{icon:"tick",position:"left"}:!1,onClick:async l=>{s&&(l.currentTarget.blur(),a?(c("leaving"),typeof n=="function"&&await n()):(c("joining"),typeof r=="function"&&await r()),u(!a))},className:ie("join-community-button",f,{active:f==="joining"}),disabled:!s,...h,children:O.jsx("span",{className:"text",...d,children:i.formatMessage({id:`${Ws}${["joining","leaving"].includes(f)?`_${f}`:a?"_member":t?"_short":""}`})})})};const Vs="communityDetails_",Ax=({isMember:e=!1,slug:t,members:{number:r,data:n}={number:void 0,data:[]},className:i="",...o})=>{const s=Ee(),a=r||(n==null?void 0:n.length)||0;return O.jsxs("div",{className:ie("community-details",i),children:[O.jsx(Ko,{}),O.jsxs("div",{className:"member-details",children:[O.jsxs("div",{className:"top",children:[O.jsxs("h3",{children:[s.formatMessage({id:`${Vs}members`}),O.jsx("span",{className:"count",children:a})]}),O.jsx("p",{className:"text-small",children:O.jsx(Ze.Link,{to:`/communities/${t}/members`,children:s.formatMessage({id:`${Vs}viewAll`})})})]}),O.jsx(dg,{contributors:{total:r,data:n!=null&&n.length?n:[{},{},{},{},{}]},styling:{size:"medium",showGap:!0,showPlaceholders:a===0},cutoff:5})]}),O.jsx(hg,{isMember:e,...o}),e&&O.jsx(Ue,{variant:"primary",icon:{icon:"plus"},styling:{fullWidth:!0},children:s.formatMessage({id:`${Vs}invite`})})]})};const Cx=({breadcrumbs:e,cutoff:t=20,className:r=""})=>{const n=Ee();return O.jsxs(O.Fragment,{children:[O.jsx(Je,{element:"p",children:n.formatMessage({id:"breadcrumbs_label"})}),O.jsx("ul",{className:ie("breadcrumbs text-small",r),children:e.map(({text:i,href:o,current:s=!1},a)=>O.jsxs("li",{children:[s&&O.jsx(Je,{element:"span",children:n.formatMessage({id:"breadcrumbs_currentPage"})}),O.jsx(ua,{href:s?void 0:o,children:ac(i,t)})]},`${window.btoa(i)}_${a}`))})]})};const Rx=({options:e,allOption:t=!1,allowMultiple:r=!0,onChange:n=()=>{},className:i=""})=>{const o=Ee(),s=t?[{id:"all",text:typeof t!="boolean"&&t.text||o.formatMessage({id:"filters_all"})},...e]:e,[a,u]=U.useState(t?["all"]:[]),f=(c,h)=>{let d=[];a.includes(c)?d=a.filter(l=>l!==c):c==="all"?d=["all"]:r?d=[...a.filter(l=>l!=="all"),c]:d=[c],u(l=>(n&&typeof n=="function"&&n({current:d,previous:l}),d)),h&&typeof h=="function"&&h()};return O.jsx("ul",{className:ie("filters",i),children:s.map(({id:c,text:h,disabled:d=!1,callback:l=()=>{}})=>{let p={};return d&&(p={disabled:!0,"aria-label":o.formatMessage({id:"filters_disabled"},{name:h})}),O.jsx("li",{children:O.jsx("button",{className:ie(c,{selected:a.includes(c)}),onClick:m=>{m.preventDefault(),m.stopPropagation(),f(c,l)},...p,children:h})},c)})})};const zs=Ru({locale:"en",messages:ec}),pg=({page:e=1,length:t=0,limit:r=10,loadNextPage:n=()=>{},icon:i=!1,messages:o={button:zs.formatMessage({id:"loadMore_button"}),endOfFeed:zs.formatMessage({id:"loadMore_endOfFeed"}),error:zs.formatMessage({id:"loadMore_error"})},className:s="",gtmContext:a="LoadMore"})=>{const[u,f]=U.useState(!1),[c,h]=U.useState(!1);if(t<=0||t<r*e)return null;const d=async l=>{try{await n(l)}catch(p){p instanceof Error&&p.message&&p.message.includes("Cannot read items")?h(!0):f(!0)}};return O.jsxs("footer",{className:ie("load-more",s),children:[u&&O.jsx("p",{className:"error",children:o.error}),c?O.jsx("p",{children:o.endOfFeed}):O.jsx(Ue,{variant:"secondary",icon:i,onClick:d,"data-gtm-event-context":a,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:o.button})]})};let Lo=!1;const mg=({element:e="div",id:t="more-menu",options:r,className:n=""})=>{const i=Ee(),o=U.useRef(null),[s,a]=U.useState(!1),u=f=>{o.current&&f.target instanceof HTMLElement&&!o.current.contains(f.target)&&a(!1)};return U.useEffect(()=>(document.addEventListener("click",u,!0),()=>{document.removeEventListener("click",u,!0)})),U.createElement(e,{ref:o,className:ie("more-menu text-medium",n),children:O.jsxs(O.Fragment,{children:[O.jsx(Ue,{variant:"tertiary",size:"medium",icon:{icon:"ellipsis"},onClick:()=>a(!s),"aria-haspopup":"true","aria-expanded":s,"aria-controls":t,screenreaderText:i.formatMessage({id:"moreMenu"})}),O.jsx("ul",{id:t,hidden:!s,children:r.map(({href:f,onClick:c,text:h,icon:d,...l},p)=>{const m={...l,onClick:b=>{a(!1),typeof c=="function"&&c(b)},onFocus:()=>{Lo&&(clearTimeout(Lo),Lo=!1)},onBlur:()=>{Lo=setTimeout(()=>{a(!1)},100)}};return f&&(m.href=f),O.jsx("li",{children:O.jsx(Ue,{variant:"tertiary",size:"medium",icon:d?{icon:d,position:"left"}:!1,...m,children:h})},`${window.btoa(h)}_${p}`)})})]})})};const fc=({variant:e="default",version:t="default",className:r="",...n})=>O.jsx("p",{className:"logo-wrapper",children:O.jsx(Ze.Link,{to:"/home/",className:ie("logo",e,t,r),...n,children:O.jsx(Je,{children:O.jsx(_r,{id:"apolitical"})})})});const Nx={"2-1":901},Px=({layout:e="2-1",hideOnMobile:t=!1,className:r="",children:n})=>{const i=ro(!0);let o=n;return U.Children.count(n)===1&&(o=U.Children.toArray(n)[0],o.props&&(o=o.props.children)),O.jsx("section",{className:ie("columns",`layout-${e}`,r),children:U.Children.map(o,(s,a)=>t!==!1&&a===t&&i&&i<Nx[e]?null:s)})};const Ys="cookieBanner_",Ks=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],Qs=new Date(Date.now()+12*30*24*60*60*1e3),gg=()=>{const e=Ee(),t=Ze.useNavigate(),[r,n,i]=Kd(Ks),[o,s]=U.useState(!r["apol-cookie-banner"]),a=()=>{Ks.forEach(h=>{n(h,!0,{path:"/",expires:Qs,domain:h==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),s(!1),t(0)},u=()=>{n("apol-cookie-banner",!0,{path:"/",expires:Qs}),Ks.forEach(h=>{if(h==="apol-cookie-banner"){n(h,!0,{path:"/",expires:Qs});return}i(h)}),s(!1)};if(!o)return null;const f=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:u,gtmType:"reject-all"},{id:"accept",onClick:a,gtmType:"accepted-all"}],c=[];return f.forEach(h=>{c.push({variant:h.href?"tertiary":"primary",href:h.href,onClick:h.onClick,className:"gtm-trackable","data-gtm-event-context":"cookie-banner","data-gtm-event-type":`cookie-${h.gtmType}-click`,children:e.formatMessage({id:`${Ys}buttons_${h.id}`})})}),O.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[O.jsx("h6",{children:e.formatMessage({id:`${Ys}title`})}),O.jsx("p",{children:e.formatMessage({id:`${Ys}text`})}),O.jsx(no,{buttons:c})]})},or={platform:{order:["events","courses","qanda","articles"],events:{href:"/events/",gtmType:"events-click"},courses:{href:"/microcourses/",gtmType:"microcourses-click"},qanda:{href:"/questions-answers/",gtmType:"q-and-a-click"},articles:{href:"/solution-articles/",gtmType:"articles-click"}},community:{order:["support","post","join","guidelines"],support:{name:"Support FAQ",href:"/pages/support-faq",gtmType:"support-faq-click"},post:{href:"/pages/post-an-article",gtmType:"post-an-article-click"},join:{href:"/pages/who-can-join-the-community",gtmType:"who-can-join-click"},guidelines:{href:"/pages/values-and-guidelines",gtmType:"guidelines-and-values-click"}},company:{order:["story","team","careers","partner","contact"],story:{href:"/pages/our-story",gtmType:"our-story-click"},team:{href:"/pages/meet-our-team",gtmType:"team-click"},careers:{href:"/pages/careers",gtmType:"careers-click"},partner:{href:"/partnerships/",gtmType:"partner-with-us-click"},contact:{href:"/pages/get-in-touch",gtmType:"contact-click"},child:"legal"},legal:{order:["privacy","terms","cookie","accessibility"],privacy:{href:"https://about.apolitical.co/privacy-policy",gtmType:"privacy-policy-link"},terms:{href:"https://about.apolitical.co/terms-and-conditions",gtmType:"terms-conditions-link"},cookie:{href:"/pages/cookie-policy",gtmType:"cookie-policy-link"},accessibility:{href:"/pages/accessibility-statement",gtmType:"accessibility-link"},text:{order:["dataProtection","euDataProtection"],dataProtection:{email:"dpo@apolitical.co",gtmType:"email-dpo-link"},euDataProtection:{email:"dpo.agl@apolitical.foundation",gtmType:"email-eu-dpo-link"}}},contact:{text:{order:["correspondence","registered","berlin","support","business"],correspondence:{address:!0},registered:{address:!0},berlin:{address:!0},support:{email:"concierge@apolitical.co",gtmType:"concierge-email-click"},business:{email:"hello@apolitical.co",gtmType:"hello-email-click"}}},social:{order:["linkedin","twitter","facebook"],linkedin:{href:"https://www.linkedin.com/company/apolitical"},twitter:{href:"https://twitter.com/apoliticalco"},facebook:{href:"https://www.facebook.com/apoliticalco"}}};const Cn="footer_",Jo="SiteFooter",Pd=({group:e})=>{const t=or[e].order||[];let r=!1;return"text"in or[e]&&(r=or[e].text),O.jsxs(U.Fragment,{children:[O.jsx("p",{className:"pre-title",children:O.jsx(_r,{id:`${Cn}${e}`})}),Array.isArray(t)&&t.length>0&&O.jsx("ul",{className:"text-medium",children:t.map(n=>{if(["order","child","text"].includes(n))return null;const{href:i,gtmType:o}=or[e][n],s={};return["legal"].includes(e)&&(s.target="_blank",s.rel="noopener"),O.jsx("li",{children:O.jsx(Ze.Link,{to:i,className:"gtm-trackable","data-gtm-event-context":Jo,"data-gtm-event-type":o,...s,children:O.jsx(_r,{id:`${Cn}${e}_${n}`})})},`${e}_${n}`)})}),typeof r!="boolean"&&"order"in r&&Array.isArray(r.order)&&O.jsx("dl",{className:"text-medium",children:r.order.map(n=>O.jsxs(U.Fragment,{children:[O.jsx("dt",{children:O.jsx(_r,{id:`${Cn}${e}_${n}`})}),O.jsxs("dd",{children:[typeof r!="boolean"&&r[n].address&&O.jsx("address",{children:O.jsx(_r,{id:`${Cn}${e}_${n}_address`,values:{br:O.jsx("br",{})}})}),typeof r!="boolean"&&r[n].email&&O.jsx("a",{href:`mailto:${r[n].email}`,className:"gtm-trackable","data-gtm-event-context":Jo,"data-gtm-event-type":r[n].gtmType,children:r[n].email})]})]},`dl-${e}-${n}`))})]},e)},dc=()=>O.jsx("div",{id:"footer",children:O.jsxs("div",{className:"wrapper",children:[O.jsx(Bu,{element:"hr"}),O.jsx(fc,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":Jo,"data-gtm-event-type":"logo-homepage-link"}),O.jsx("footer",{children:["platform","community","company","contact"].map(e=>O.jsxs("div",{className:"group",children:[O.jsx(Pd,{group:e}),Object.keys(or[e]).includes("child")&&O.jsx(Pd,{group:or[e].child})]},e))}),O.jsx("hr",{}),O.jsxs("div",{className:"sub-footer",children:[O.jsx("ul",{children:Array.isArray(or.social.order)&&or.social.order.map(e=>{const t=or.social[e];return O.jsx("li",{className:e,children:O.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":Jo,"data-gtm-event-type":"social-click",children:O.jsx("span",{className:"hidden",children:O.jsx(_r,{id:`${Cn}social_${e}`})})})},e)})}),O.jsx("small",{children:O.jsx(_r,{id:`${Cn}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});const ko="emailHelperTextBox_",Ix=({type:e,email:t,redirectPath:r,resendVerificationCode:n})=>{const i=Ee(),o=Ze.useNavigate(),[s,a]=U.useState({path:`${ko}default`,type:"default",link:{},mail:{},error:""}),[u,f]=U.useState(!1),c=U.useCallback(p=>{p.preventDefault(),p.stopPropagation();const m=b=>{a({path:`${ko}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:T=>c(T),href:"#","data-testid":"send-verify-email-click"},mail:{href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"ErrorVerifyingBox","data-gtm-event-type":"email-concierge-click"},error:b})};if(typeof n!="function"){m(i.formatMessage({id:`${ko}error_noFunction`}));return}f(!0),n(t).then(()=>{localStorage.setItem("email",t),o(r||"/signup/verify-email")}).catch(b=>{m(b.message)}).finally(()=>{f(!1)})},[t,r,n]);U.useEffect(()=>{let p=ko,m="default",b={},T={};switch(e){case"gov":p+="autoApproved",m="success";break;case"nonGov":p+="unrecognisedEmail",m="error",b={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":p+="pendingApproval",m="error",T={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":p+="emailUnverified",m="error",b={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:_=>c(_),"data-testid":"send-verify-email-click"};break;case"exists":p+="emailAlreadyExists",m="error",b={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},T={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:p+="default",b={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}a({...s,path:p,type:m,link:b,mail:T})},[e]);const h={};return["link","mail"].forEach(p=>{h[p]=Object.keys(s[p]).length?m=>O.jsx("a",{...s[p],children:m}):m=>m}),O.jsx(og,{type:s.type,heading:u?!1:i.formatMessage({id:`${s.path}_title`}),children:u?O.jsxs(O.Fragment,{children:[O.jsx(br,{element:"span"}),O.jsx(br,{element:"span"})]}):i.formatMessage({id:`${s.path}_text`},{...h,strong:p=>O.jsx("strong",{children:p}),em:p=>O.jsx("em",{children:p}),br:O.jsxs(O.Fragment,{children:[O.jsx("br",{}),O.jsx("br",{})]}),error:s.error})})};const Mo="passwordRules_",yg="isMoreThanEightCharacters",vg="includesNumberAndSymbol",_g="includesLowerAndUppercase",Lx={[yg]:"8Characters",[vg]:"numberSymbol",[_g]:"lowercaseUppercase"},kx=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const r=Ee();return O.jsxs("aside",{className:ie("password-rules",t),children:[O.jsx("small",{children:r.formatMessage({id:`${Mo}intro`})}),O.jsx("ul",{children:[yg,vg,_g].map(n=>O.jsxs("li",{className:ie({matches:e[n]}),children:[O.jsxs(Je,{children:[r.formatMessage({id:`${Mo}rule_label`})," "]}),O.jsx("span",{children:r.formatMessage({id:`${Mo}rule_${Lx[n]}`})}),!e[n]&&O.jsxs(Je,{element:"strong",children:[" "," ",r.formatMessage({id:`${Mo}notMet`})]})]},`rule-${n}`))})]})},Mx=U.memo(kx);const Bx=({text:e={},topRating:t=5,functions:{createRating:r=()=>null,updateRating:n=()=>{},reportError:i=()=>{}},className:o="",hasLoaded:s=!1})=>{const a=Ee(),[u,f]=U.useState({setUp:!1,id:null,rating:null,disabled:!0}),c=async()=>{try{const T=await r();f(_=>({..._,setUp:!0,id:T&&T.id,disabled:!1}))}catch(T){f(_=>({..._,setUp:!0,disabled:!0})),i(T)}};if(U.useEffect(()=>{s&&!u.setUp&&c()},[s]),!s)return O.jsx(br,{className:"rating-placeholder"});const{id:h,rating:d,disabled:l}=u,p="ratings_",m={text:a.formatMessage({id:`${p}text`}),low:a.formatMessage({id:`${p}low`}),high:a.formatMessage({id:`${p}high`}),success:a.formatMessage({id:`${p}success`}),...e},b=async T=>{if(!(!h||l))try{f(_=>({..._,rating:T,disabled:!0})),await n({id:h,value:T})}catch(_){f(E=>({...E,rating:null})),i(_)}finally{f(_=>({..._,disabled:!1}))}};return O.jsxs("div",{className:ie("rating",o),children:[O.jsx("span",{className:"label",children:m[d?"success":"text"]}),O.jsx("ol",{children:Array.from(new Array(t).keys()).map(T=>{const _=T+1;return O.jsx("li",{className:ie({selected:d&&_<=d}),children:O.jsx(Ue,{variant:"tertiary",size:"small",icon:{icon:`star${!d||_>d?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${a.formatMessage({id:`${p}stars`},{number:_,total:t})}${_===1||_===t?` - ${m[_===1?"low":"high"]}`:""}`,onClick:E=>{E.preventDefault(),E.stopPropagation(),b(_)},disabled:l})},`rating-${_}`)})})]})};const Eg=({id:e="search",className:t="",handleToggle:r=!1,defaultValue:n="",gtmContext:i="search-bar",gtmEvent:o="form-submission"})=>{const{searchIsOpen:s=!0,isDesktopVersion:a=!1}=r||{},u=Ee(),f=Ze.useNavigate(),c=U.useRef(null);Zr(()=>{!r||a||!s||c.current&&c.current.focus()},[s]);const h=d=>{d.preventDefault(),d.stopPropagation(),!(!c.current||!c.current.value||c.current.value.length<1)&&f(`/search?search=${encodeURIComponent(c.current.value)}`)};return O.jsx("form",{onSubmit:h,className:ie("search-form gtm-trackable",t),"data-gtm-event-context":i,"data-gtm-event-type":o,children:O.jsx("fieldset",{id:`${e}-form`,hidden:r?!s:!1,role:"search",children:O.jsxs("p",{children:[O.jsx(Je,{element:"label",htmlFor:e,children:u.formatMessage({id:"search_label"})}),O.jsx("input",{ref:c,type:"search",id:e,name:e,defaultValue:n,placeholder:u.formatMessage({id:"search_placeholder"}),onKeyDown:d=>{d.key==="Enter"&&h(d)}}),O.jsx("button",{className:"clear",onClick:d=>{d.preventDefault(),d.stopPropagation(),c.current&&c.current.value&&(c.current.value="")},children:O.jsx(Je,{children:u.formatMessage({id:"search_clear"})})}),O.jsx("button",{className:"search",onClick:h,children:O.jsx(Je,{children:u.formatMessage({id:"search_cta"})})})]})})})};var Fx="Expected a function",bg="__lodash_hash_undefined__",wg=1/0,Dx="[object Function]",Ux="[object GeneratorFunction]",$x="[object Symbol]",jx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hx=/^\w*$/,qx=/^\./,Gx=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wx=/[\\^$.*+?()[\]{}|]/g,Vx=/\\(\\)?/g,zx=/^\[object .+?Constructor\]$/,Yx=typeof ce=="object"&&ce&&ce.Object===Object&&ce,Kx=typeof self=="object"&&self&&self.Object===Object&&self,hc=Yx||Kx||Function("return this")();function Qx(e,t){return e==null?void 0:e[t]}function Xx(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Jx=Array.prototype,Zx=Function.prototype,Sg=Object.prototype,Xs=hc["__core-js_shared__"],Id=function(){var e=/[^.]+$/.exec(Xs&&Xs.keys&&Xs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Tg=Zx.toString,pc=Sg.hasOwnProperty,xg=Sg.toString,eO=RegExp("^"+Tg.call(pc).replace(Wx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ld=hc.Symbol,tO=Jx.splice,rO=Og(hc,"Map"),Qi=Og(Object,"create"),kd=Ld?Ld.prototype:void 0,Md=kd?kd.toString:void 0;function rn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function nO(){this.__data__=Qi?Qi(null):{}}function iO(e){return this.has(e)&&delete this.__data__[e]}function oO(e){var t=this.__data__;if(Qi){var r=t[e];return r===bg?void 0:r}return pc.call(t,e)?t[e]:void 0}function aO(e){var t=this.__data__;return Qi?t[e]!==void 0:pc.call(t,e)}function sO(e,t){var r=this.__data__;return r[e]=Qi&&t===void 0?bg:t,this}rn.prototype.clear=nO;rn.prototype.delete=iO;rn.prototype.get=oO;rn.prototype.has=aO;rn.prototype.set=sO;function jn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function uO(){this.__data__=[]}function cO(e){var t=this.__data__,r=ha(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():tO.call(t,r,1),!0}function lO(e){var t=this.__data__,r=ha(t,e);return r<0?void 0:t[r][1]}function fO(e){return ha(this.__data__,e)>-1}function dO(e,t){var r=this.__data__,n=ha(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}jn.prototype.clear=uO;jn.prototype.delete=cO;jn.prototype.get=lO;jn.prototype.has=fO;jn.prototype.set=dO;function sn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function hO(){this.__data__={hash:new rn,map:new(rO||jn),string:new rn}}function pO(e){return pa(this,e).delete(e)}function mO(e){return pa(this,e).get(e)}function gO(e){return pa(this,e).has(e)}function yO(e,t){return pa(this,e).set(e,t),this}sn.prototype.clear=hO;sn.prototype.delete=pO;sn.prototype.get=mO;sn.prototype.has=gO;sn.prototype.set=yO;function ha(e,t){for(var r=e.length;r--;)if(CO(e[r][0],t))return r;return-1}function vO(e,t){t=wO(t,e)?[t]:bO(t);for(var r=0,n=t.length;e!=null&&r<n;)e=e[OO(t[r++])];return r&&r==n?e:void 0}function _O(e){if(!Cg(e)||TO(e))return!1;var t=RO(e)||Xx(e)?eO:zx;return t.test(AO(e))}function EO(e){if(typeof e=="string")return e;if(gc(e))return Md?Md.call(e):"";var t=e+"";return t=="0"&&1/e==-wg?"-0":t}function bO(e){return Ag(e)?e:xO(e)}function pa(e,t){var r=e.__data__;return SO(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Og(e,t){var r=Qx(e,t);return _O(r)?r:void 0}function wO(e,t){if(Ag(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||gc(e)?!0:Hx.test(e)||!jx.test(e)||t!=null&&e in Object(t)}function SO(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function TO(e){return!!Id&&Id in e}var xO=mc(function(e){e=PO(e);var t=[];return qx.test(e)&&t.push(""),e.replace(Gx,function(r,n,i,o){t.push(i?o.replace(Vx,"$1"):n||r)}),t});function OO(e){if(typeof e=="string"||gc(e))return e;var t=e+"";return t=="0"&&1/e==-wg?"-0":t}function AO(e){if(e!=null){try{return Tg.call(e)}catch{}try{return e+""}catch{}}return""}function mc(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(Fx);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(mc.Cache||sn),r}mc.Cache=sn;function CO(e,t){return e===t||e!==e&&t!==t}var Ag=Array.isArray;function RO(e){var t=Cg(e)?xg.call(e):"";return t==Dx||t==Ux}function Cg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function NO(e){return!!e&&typeof e=="object"}function gc(e){return typeof e=="symbol"||NO(e)&&xg.call(e)==$x}function PO(e){return e==null?"":EO(e)}function IO(e,t,r){var n=e==null?void 0:vO(e,t);return n===void 0?r:n}var LO=IO;const Rg=qt(LO),Ne={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const r={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},n=o=>{const s=`logged${e?"In":"Out"}`;return t>=r[o][s]};let i={};return["navigation","search"].forEach(o=>{i[o]=n(o)}),i},shouldChangeHeaderIsVisible:(e,t,r)=>{Object.values(t).filter(i=>i===!0).length||r([{type:"headerIsVisible",value:e}])},handleMenus:({id:e,value:t,menus:r,dispatch:n})=>{if(r[e]===t||e==="account"&&t===!1&&r.navigation===!0)return;const i=Date.now();if(!t&&Ne.handlerCalled[e]&&i-Ne.handlerCalled[e]<500)return;Ne.handlerCalled[e]=i;let o=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(r).forEach(s=>{s===e||r[s]===!1||o.push({type:`menus.${s}`,value:!1})}),n(o)},findFirstChild:(e,t,r=!1)=>{if(!e||!e[0])return!1;for(let n=0;n<=e.length;n++){if(!e[n])continue;if(e[n][t]&&(!r||e[n][t].includes(r)))return e[n];if(!t.includes("."))continue;const i=Rg(e[n],t);if(!(typeof i>"u")&&(!r||i[t]&&i[t].includes(r)||i.value&&i.value.includes(r)||i.toString().includes(r)))return e[n]}return e[0].children?Ne.findFirstChild(e[0].children,t,r):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:r,focusElements:n,dispatch:i})=>{if(!t.current||!t.current.children)return;const o=r?"desktop":"default";if(n[e][o]){n[e][o].focus();return}let s,a;switch(e){case"navigation":if(r){const u=Ne.findFirstChild(t.current.children,"attributes.aria-controls","navigation");s=Ne.findFirstChild(u.children,"href")}else s=Ne.findFirstChild(t.current.children,"href");s||(s=t.current);break;case"account":if(a=Ne.findFirstChild(t.current.children,"className","account"),!a||!a.children)return;s=Ne.findFirstChild(a.children,"href");break;default:return}s&&(i([{type:`focusElements.${e}.${o}`,value:s}]),s.focus())},events:{onClick:(e,{id:t,callback:r,isOpen:n})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(Ne.timeouts[t]),r(t,!n))},onFocus:({id:e})=>{clearTimeout(Ne.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(Ne.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{Ne.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},Xi={order:["home","topics","partners","account"],home:{href:"/home/",hasVariantText:!0,gtmType:"homepage-click"},topics:{order:["explore","topics"],menuId:"navigation",explore:{order:["events","courses","q-and-a","articles"],events:{href:"/events/",className:"icon events"},courses:{href:"/microcourses/",gtmType:"microcourses-click",className:"icon courses"},"q-and-a":{href:"/questions-answers/",className:"icon q-and-a"},articles:{href:"/solution-articles/",gtmType:"articles-click",className:"icon articles"}},topics:{order:["climate","cities-and-local-government","digital-and-data","education","equity-justice-and-inclusion","health-and-social-care","innovation","leadership-and-skills","life-in-government","policymaking","transport-and-infrastructure","work-and-the-economy"],className:"columns",climate:{href:"/topics/climate/"},"cities-and-local-government":{href:"/topics/cities-and-local-government/"},"digital-and-data":{href:"/topics/digital-and-data/"},education:{href:"/topics/education/"},"equity-justice-and-inclusion":{href:"/topics/equity-justice-and-inclusion/"},"health-and-social-care":{href:"/topics/health-and-social-care/"},innovation:{href:"/topics/innovation/"},"leadership-and-skills":{href:"/topics/leadership-and-skills/"},"life-in-government":{href:"/topics/life-in-government/"},policymaking:{href:"/topics/policymaking/"},"transport-and-infrastructure":{href:"/topics/transport-and-infrastructure/"},"work-and-the-economy":{href:"/topics/work-and-the-economy/"}}},partners:{href:"/partnerships/",onlyShow:"logged-out"},account:{order:["profile","settings","log-out"],className:"account",onlyShow:"logged-in",doTrack:!1,profile:{href:"/profiles/me"},settings:{href:"/profiles/me/manage-account"},"log-out":{href:"/user-onboarding/logout",className:"divider"}},buttons:{order:["login","signup"],login:{href:"/user-onboarding/login"},signup:{href:"/signup/?ref=header-banner",props:{variant:"primary"}}}},Zo=({id:e,isLoggedIn:t=!1,isDesktopVersion:r=!1,menus:n={},callback:i=()=>{},doTrack:o=null})=>{const s=Ee(),{pathname:a}=Ze.useLocation(),u=Rg(Xi,e);if(!u||u.onlyShow&&(u.onlyShow==="logged-in"&&!t||u.onlyShow==="logged-out"&&t))return null;const f="doTrack"in u,c=o===null?f?u.doTrack:!0:o,h=e.includes("buttons.");let d=`header_${e.replaceAll(".","_")}`;u.hasVariantText&&(d+=`_logged${t?"In":"Out"}`);let l=!1;if(u.href){let E=u.gtmType||`${e}-click`;if(E.includes(".")){const A=E.split("."),w=A[A.length-2];E=`${w==="topics"?`${w}-`:""}${A[A.length-1]}`}l={href:u.href,role:"menuitem"},c&&(l={...l,className:"gtm-trackable","data-gtm-event-type":E,"data-gtm-event-context":"HeaderButtons"}),h&&(l={...l,variant:"secondary",size:{mobile:"small",881:"large"},...u.props||{}})}const p=u.order&&u.order[0]&&u[u.order[0]],m=p&&u[u.order[0]].order,b=l&&a===u.href;let T={},_={};if(p){const E=u.menuId||e,A={onClick:w=>Ne.events.onClick(w,{id:E,callback:i,isOpen:n[E]}),onFocus:()=>Ne.events.onFocus({id:E}),onBlur:()=>Ne.events.onBlur({id:E,callback:i}),onMouseLeave:()=>Ne.events.onBlur({id:E,callback:i}),onMouseEnter:()=>Ne.events.onMouseEnter({id:E,callback:i})};r&&(m&&(T={...A,onKeyPress:w=>{w.key==="Enter"&&Ne.events.onClick(w,{id:E,callback:i,isOpen:n[E]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":n[E],"aria-controls":E}),_={hidden:E in n?!n[E]:!0}),m||(_={..._,...A})}return O.jsxs("li",{className:ie({[u.className]:u.className,"has-submenu":p,parent:m,active:b}),role:"none",...T,children:[l?U.createElement(h?Ue:"a",l,s.formatMessage({id:d})):s.formatMessage({id:d}),u.order&&O.jsx("ul",{..._,children:u.order.map(E=>{if(!u[E])return null;const A={isLoggedIn:t,isDesktopVersion:r,menus:n,callback:i,doTrack:f?c:null};return u[E].order?O.jsxs("li",{className:ie({[u[E].className]:u[E].className}),children:[s.formatMessage({id:`${d}_${E}`}),O.jsx("ul",{children:u[E].order.map(w=>O.jsx(Zo,{id:`${e}.${E}.${w}`,...A},w))})]},E):O.jsx(Zo,{id:`${e}.${E}`,...A},E)})})]},e)};const kO={height:67,height_desktop:83},yc=()=>{const e=Ee(),t=U.useContext($n),r=ro(!0,!0),n=t&&typeof t.id=="string",i=U.useMemo(()=>Ne.getIsDesktopVersion(n,r),[n,r]),[o,s]=U.useReducer(Tw,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:a,menus:u,focusElements:f}=o;zp({scrollPosition:kO[`height${i.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!i&&u.navigation||Ne.shouldChangeHeaderIsVisible(!0,u,s)},scrollDown:()=>{!i&&u.navigation||Ne.shouldChangeHeaderIsVisible(!1,u,s)}}});const c=(d,l)=>{Ne.handleMenus({id:d,value:l,menus:u,dispatch:s})},h=U.useRef(null);return Zr(()=>{u.navigation&&Ne.autoFocus({menu:"navigation",navigationRef:h,isDesktopVersion:i.navigation,focusElements:f,dispatch:s})},[u.navigation]),Zr(()=>{u.account&&Ne.autoFocus({menu:"account",navigationRef:h,isDesktopVersion:i.navigation,focusElements:f,dispatch:s})},[u.account]),t&&t.isLoading?null:O.jsxs(O.Fragment,{children:[O.jsxs("nav",{id:"header",className:ie({"logged-in":n,"logged-out":!n,visible:a}),children:[O.jsx(Je,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),O.jsx(fc,{}),!i.navigation&&O.jsx("button",{className:"menu-button gtm-trackable",onClick:d=>{d.preventDefault(),d.stopPropagation(),c("navigation",!u.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":u.navigation,"aria-controls":"navigation",children:O.jsx(Je,{children:e.formatMessage({id:`header_menu_${u.navigation?"hide":"show"}`})})}),O.jsx("ul",{ref:h,id:"navigation",hidden:i.navigation||u.account?!1:!u.navigation,role:"menu","data-showing":!i.navigation&&u.account?"account":"default",children:Xi.order.map(d=>O.jsx(Zo,{id:d,isLoggedIn:n,isDesktopVersion:i.navigation,menus:{navigation:u.navigation,account:u.account},callback:c},d))}),!i.search&&O.jsx("button",{className:"search toggle-search-button",onClick:d=>{d.preventDefault(),d.stopPropagation(),c("search",!u.search)},"aria-haspopup":"true","aria-expanded":u.search,"aria-controls":"search-form",children:O.jsx(Je,{children:e.formatMessage({id:`header_search_${u.search?"hide":"show"}`})})}),O.jsx(Eg,{id:"global-search",handleToggle:{searchIsOpen:u.search,isDesktopVersion:i.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),n?O.jsxs("button",{className:"account-button",onClick:d=>Ne.events.onClick(d,{id:"account",callback:c,isOpen:u.account}),onMouseEnter:()=>Ne.events.onMouseEnter({id:"account",callback:c}),onMouseLeave:()=>Ne.events.onBlur({id:"account",callback:c}),"aria-haspopup":"true","aria-expanded":u.account,"aria-controls":"navigation",children:[O.jsx(Je,{children:e.formatMessage({id:`header_account_${u.account?"hide":"show"}`})}),O.jsx(fa,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):O.jsx("ul",{className:"sign-in-buttons",children:Xi.buttons.order.map(d=>O.jsx(Zo,{id:`buttons.${d}`},d))})]}),O.jsx("hr",{id:"content-of-page"}),O.jsx("div",{className:ie("overlay",{open:u.navigation||u.account||!i.search&&u.search})})]})},MO=U.createContext(null),Js={didCatch:!1,error:null};class BO extends U.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Js}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:o,reason:"imperative-api"}),this.setState(Js)}}componentDidCatch(t,r){var n,i;(n=(i=this.props).onError)===null||n===void 0||n.call(i,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:i}=this.props;if(n&&r.error!==null&&FO(t.resetKeys,i)){var o,s;(o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Js)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:i}=this.props,{didCatch:o,error:s}=this.state;let a=t;if(o){const u={error:s,resetErrorBoundary:this.resetErrorBoundary};if(U.isValidElement(i))a=i;else if(typeof r=="function")a=r(u);else if(n)a=U.createElement(n,u);else throw s}return U.createElement(MO.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function FO(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}const DO=()=>{const e=Ee();return O.jsxs(O.Fragment,{children:[O.jsx(yc,{}),O.jsx("div",{className:"content",children:O.jsx(ng,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),O.jsx(dc,{})]})},UO=({children:e,reportError:t,showFooter:r=!0,background:n="default",className:i="",locale:o="en"})=>{const{pathname:s}=Ze.useLocation();U.useEffect(()=>{window.scrollTo(0,0)},[s]);const a=im(e,{locale:o});return O.jsx(BO,{onError:t,fallback:O.jsx(DO,{}),children:O.jsx(U.Suspense,{fallback:O.jsx(lg,{layout:"overview-page"}),children:O.jsx("div",{id:"wrapper",className:ie(i,{[n]:n!=="default"}),children:O.jsxs(iy,{children:[O.jsx(yc,{}),O.jsx("div",{className:"content",children:a}),r&&O.jsx(dc,{}),O.jsx(gg,{})]})})})})},Bd={default:"tags_",headerTopics:"header_topics_topics_"},Zs={topic:{Climate:"climate",CitiesAndLocalGovernment:"cities-and-local-government",DigitalAndData:"digital-and-data",Education:"education",EquityJusticeAndInclusion:"equity-justice-and-inclusion",HealthAndSocialCare:"health-and-social-care",Innovation:"innovation",LeadershipAndSkills:"leadership-and-skills",LifeInGovernment:"life-in-government",Policymaking:"policymaking",TransportAndInfrastructure:"transport-and-infrastructure",WorkAndTheEconomy:"work-and-the-economy"},"from the community":"community"},$O={getTagDetails:e=>{if(e.includes("topic_")){if(e=Zs.topic[e.replace("topic_","")],e){const t=Xi.topics.topics[e].href;return t?{id:e,href:t,text:`${Bd.headerTopics}${e}`}:null}return null}return Zs[e]?(e=Zs[e],{id:e,text:`${Bd.default}${e}`}):null}};const jO=({tags:e=[],color:t="default",forceOneLine:r=!1,canHaveLinks:n=!0,className:i="",gtmType:o="tag-click",gtmContext:s="tags"})=>{const a=Ee();if(!e||e.length<1)return null;const u=[];return e.forEach(f=>{if(!f)return;const c=$O.getTagDetails(f);c&&u.push(c)}),u.length<1?null:O.jsx("ul",{className:ie("tags text-small",t,i,{"one-line":r}),children:u.map(f=>{const c=a.formatMessage({id:f.text});return O.jsx("li",{children:f.href&&n?O.jsx(Ze.Link,{to:f.href,className:"gtm-trackable","data-gtm-event-type":o,"data-gtm-event-context":s,children:c}):c},f.id)})})};const HO=({members:{total:e,data:t=[]},pagination:r,gtmContext:n="member",gtmType:i="member-click",className:o=""})=>{const s=Ee();return t.length===0?null:(e||(e=t.length),O.jsxs("div",{className:ie("members-list",o),children:[O.jsxs("h1",{children:[s.formatMessage({id:"membersList"}),O.jsx("span",{className:"count",children:e})]}),O.jsx("ul",{children:t.map((a,u)=>O.jsxs("li",{children:[O.jsx(da,{member:a,gtmContext:n,gtmType:i}),a.isAdmin&&O.jsx(sg,{children:s.formatMessage({id:"membersList_admin"})})]},u))}),r&&O.jsx(pg,{...r,icon:{icon:"arrow-down",position:"right"},gtmContext:n})]}))},qO={showThread:!1,showForm:!1},vc=U.createContext(qO),GO=({children:e})=>{const[t,r]=U.useState({showThread:!1,showForm:!1});return O.jsx(vc.Provider,{value:{...t,updateConversation:r},children:e})};function Mu(){return Mu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mu.apply(this,arguments)}function WO(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var VO=U.useLayoutEffect,zO=function(t){var r=Oe.useRef(t);return VO(function(){r.current=t}),r},Fd=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},YO=function(t,r){var n=U.useRef();return U.useCallback(function(i){t.current=i,n.current&&Fd(n.current,null),n.current=r,r&&Fd(r,i)},[r])},Dd={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},KO=function(t){Object.keys(Dd).forEach(function(r){t.style.setProperty(r,Dd[r],"important")})},Ud=KO,ot=null,$d=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function QO(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),ot||(ot=document.createElement("textarea"),ot.setAttribute("tabindex","-1"),ot.setAttribute("aria-hidden","true"),Ud(ot)),ot.parentNode===null&&document.body.appendChild(ot);var i=e.paddingSize,o=e.borderSize,s=e.sizingStyle,a=s.boxSizing;Object.keys(s).forEach(function(d){var l=d;ot.style[l]=s[l]}),Ud(ot),ot.value=t;var u=$d(ot,e);ot.value=t,u=$d(ot,e),ot.value="x";var f=ot.scrollHeight-i,c=f*r;a==="border-box"&&(c=c+i+o),u=Math.max(c,u);var h=f*n;return a==="border-box"&&(h=h+i+o),u=Math.min(h,u),[u,f]}var jd=function(){},XO=function(t,r){return t.reduce(function(n,i){return n[i]=r[i],n},{})},JO=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],ZO=!!document.documentElement.currentStyle,eA=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=XO(JO,r),i=n.boxSizing;if(i==="")return null;ZO&&i==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var o=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),s=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:o,borderSize:s}},tA=eA;function Ng(e,t,r){var n=zO(r);Oe.useLayoutEffect(function(){var i=function(s){return n.current(s)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var rA=function(t){Ng(window,"resize",t)},nA=function(t){Ng(document.fonts,"loadingdone",t)},iA=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],oA=function(t,r){var n=t.cacheMeasurements,i=t.maxRows,o=t.minRows,s=t.onChange,a=s===void 0?jd:s,u=t.onHeightChange,f=u===void 0?jd:u,c=WO(t,iA),h=c.value!==void 0,d=Oe.useRef(null),l=YO(d,r),p=Oe.useRef(0),m=Oe.useRef(),b=function(){var E=d.current,A=n&&m.current?m.current:tA(E);if(A){m.current=A;var w=QO(A,E.value||E.placeholder||"x",o,i),N=w[0],F=w[1];p.current!==N&&(p.current=N,E.style.setProperty("height",N+"px","important"),f(N,{rowHeight:F}))}},T=function(E){h||b(),a(E)};return Oe.useLayoutEffect(b),rA(b),nA(b),Oe.createElement("textarea",Mu({},c,{onChange:T,ref:l}))},aA=Oe.forwardRef(oA);let Bo=null;const lt="discussion_form_",Pg=({content:e={type:"response",slugs:{}},userHasPermissions:t=!0,meta:r={isLoading:!1,isInWrapper:!1,isEditing:!1,showTitle:!1},inputRef:n,maxLength:i=5e4,minRows:o=4,forceShow:s={cancel:!1,error:!1},functions:a={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:u="DiscussionForm"})=>{var W,z;const f=Ee(),{pathname:c}=Ze.useLocation(),h=U.useContext($n),[d,l]=U.useState(r.isEditing&&r.isEditing.text||""),[p,m]=U.useState(s.error||!1),[b,T]=U.useState(!1),_=U.useRef(null);if(n||(n=_),r.isLoading)return O.jsx(br,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const E=$=>{const Y=$.target.value;l(Y);let te;!h||!h.id?te=Ft(f.formatMessage,`${lt}error_loggedOut`,e.type,"action"):t?Y.length>=i&&(te=`${lt}error_tooLong`):te=Ft(f.formatMessage,`${lt}error_noPermission`,e.type,"action"),te?m(te):p&&m(!1)};let A=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const $=e.type==="response"?((W=e.slugs)==null?void 0:W.question)||"":((z=e.slugs)==null?void 0:z.answer)||"";$&&(A=`${A}-${$.slice(-15)}`)}const w=async $=>{var Y;if($.preventDefault(),$.stopPropagation(),!(!h||!h.id||!t||F)){Bo&&clearTimeout(Bo),T("submitting");try{let te;switch(e.type){case"post":te=await a.create({content:d});break;case"question":te=await a.create({title:d,authorId:h&&h.id,...(Y=a.props)==null?void 0:Y.create});break;case"response":te=await a.create({question:e.slugs.question},{body:d,authorId:h&&h.id,contentPath:c});break;case"reply":te=await a.create({question:e.slugs.question,answer:e.slugs.answer},{body:d,authorId:h&&h.id,contentPath:c});break;default:break}await Aw(1e3),a.callback&&await a.callback(te),Bo=setTimeout(()=>{l(""),T("submitted"),N()},500)}catch(te){const K=te;let k=`${lt}error`;K.message.includes("entry already exists")&&(k=Ft(f.formatMessage,`${lt}error_alreadyExists`,e.type,"action")),K.message.includes("429")?k=Ft(f.formatMessage,`${lt}error_tooMany`,e.type,"action"):K.message.includes("400")&&(k=`${lt}error`),m(k),N()}}},N=()=>{Bo=setTimeout(()=>{m(!1),T(!1)},5e3)},F=!d||!Pw(d),B=b==="submitting",G=[];return(r.isEditing&&!B||s.cancel)&&G.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:a.handleCancel,className:"gtm-trackable","data-gtm-event-context":u,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!s.cancel&&(!h||!h.id||!d),children:f.formatMessage({id:`${lt}cancel`})}),G.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:$=>{if(r.isEditing){T("submitting"),a.handleSaveEdit&&a.handleSaveEdit(_.current&&"value"in _.current?_.current.value:"");return}w($)},className:"gtm-trackable","data-gtm-event-context":u,"data-gtm-event-type":`${r.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!h||!h.id||!t||F||B||r.isEditing&&d===r.isEditing.text,children:f.formatMessage({id:`${lt}${B?r.isEditing?"saving":"posting":r.isEditing?"save":"post"}`})}),O.jsxs("form",{id:A,className:ie("discussion-card discussion-form",{"no-styling":r.isInWrapper&&r.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[(r==null?void 0:r.showTitle)&&!r.isEditing&&["question"].includes(e.type)&&O.jsx("h2",{children:Ft(f.formatMessage,`${lt}title`,e.type,"action")}),O.jsx(da,{member:h||"community",gtmContext:u,gtmType:"profile-click"}),O.jsx(Je,{element:"label",showOnFocus:!1,htmlFor:`${A}-input`,children:Ft(f.formatMessage,`${lt}label`,e.type,"action")}),O.jsx(aA,{ref:n,id:`${A}-input`,name:e.type,placeholder:Ft(f.formatMessage,`${lt}placeholder`,e.type,"action"),onChange:E,value:d,maxLength:i,"aria-invalid":!!p,"aria-errormessage":"error-message",minRows:o,autoFocus:!!r.isEditing}),O.jsx("small",{children:Ft(f.formatMessage,`${lt}explainer`,e.type,"action",{a:$=>O.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",target:"_blank",className:"gtm-trackable","data-gtm-event-context":u,"data-gtm-event-type":"community-guidelines-link",children:$})})}),O.jsx(no,{buttons:G}),b==="submitted"&&O.jsx(Xo,{className:"success","data-testid":"success",children:Ft(f.formatMessage,`${lt}success`,e.type,"action")}),p&&O.jsx(Xo,{id:"error-message",className:"error","data-testid":"error",children:s.error?s.error:typeof p=="string"?p.includes(" ")?p:f.formatMessage({id:p},{action:f.formatMessage({id:`discussion_action_${e.type}`}),maxLength:i}):p})]})},sA=({question:e,answer:t,reply:r})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...r&&{replySlug:r}}),uA=(e,t=10)=>!e||e.length===0?[]:e.slice(0,t);let zi=!1;const eu=()=>{zi!==!1&&(clearTimeout(zi),zi=!1)},tu=10,Ig=({element:e="div",likes:t=0,peopleWhoLiked:r=!1,isShort:n=!0,userLiked:i=!1,content:o={type:"reply",slugs:{}},canLike:s=!0,functions:{createLike:a=()=>{},deleteLike:u=()=>{}}={}})=>{const f=Ee(),{pathname:c}=Ze.useLocation();U.useEffect(()=>{p(i)},[i]);const[h,d]=U.useState(t),[l,p]=U.useState(i),[m,b]=U.useState(!1),[T,_]=U.useState(!1),E=U.useMemo(()=>uA(r,tu),[r]),A=N=>{if(N.preventDefault(),N.stopPropagation(),_(!1),zi)return eu(),!1;if(eu(),m||!s)return!1;zi=setTimeout(w,350)},w=async()=>{if(eu(),m||!s)return!1;let N=l?h-1:h+1;N<0&&(N=0),b(!0),d(N),p(!l);try{if(o&&o.slugs){const F=sA(o.slugs);l?await u(F):await a(F,{contentPath:c})}}catch{d(t),p(i)}finally{b(!1)}};return U.createElement(e,{className:ie("likes-wrapper text-medium action-button",{"show-spinner":m,"is-liked":l,disabled:!s}),onClick:A,onMouseEnter:()=>{_(!0)},onMouseLeave:()=>{_(!1)},onFocus:()=>{_(!0)},onBlur:()=>{_(!1)},children:O.jsxs(O.Fragment,{children:[O.jsx(Ue,{variant:"tertiary",size:"medium",icon:{icon:l?"heart":"heart_empty",animate:"bounce"},className:ie({"do-animation":l&&!i}),screenreaderText:s?f.formatMessage({id:`discussion_${o.type}_likes_${l?"unlike":"like"}`}):!1,onClick:A,disabled:!s,"aria-hidden":!s,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${o.type}-click`}),O.jsx("span",{className:ie("number-of-likes",{"no-likes":h===0}),"data-testid":"number-of-likes",children:f.formatMessage({id:`discussion_likes${n?"_short":""}`},{number:h})}),r&&O.jsx(Bm,{isOpen:T,isLoading:r.length===0,children:r.length&&O.jsxs("ul",{children:[E.map(N=>typeof N=="string"||!N.name?null:O.jsx("li",{children:O.jsx(ua,{href:N.id?`/profiles/${N.id}`:void 0,gtmContext:"Likes",gtmType:"liked-name-click",children:N.name})},N.id||window.btoa(N.name))),r.length>tu&&O.jsx("li",{children:f.formatMessage({id:"discussion_likes_more"},{number:r.length-tu})})]})})]})})};var ea={exports:{}};ea.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=1,o=2,s=9007199254740991,a="[object Arguments]",u="[object Array]",f="[object AsyncFunction]",c="[object Boolean]",h="[object Date]",d="[object Error]",l="[object Function]",p="[object GeneratorFunction]",m="[object Map]",b="[object Number]",T="[object Null]",_="[object Object]",E="[object Promise]",A="[object Proxy]",w="[object RegExp]",N="[object Set]",F="[object String]",B="[object Symbol]",G="[object Undefined]",W="[object WeakMap]",z="[object ArrayBuffer]",$="[object DataView]",Y="[object Float32Array]",te="[object Float64Array]",K="[object Int8Array]",k="[object Int16Array]",V="[object Int32Array]",J="[object Uint8Array]",de="[object Uint8ClampedArray]",X="[object Uint16Array]",Z="[object Uint32Array]",re=/[\\^$.*+?()[\]{}|]/g,ue=/^\[object .+?Constructor\]$/,Fe=/^(?:0|[1-9]\d*)$/,Q={};Q[Y]=Q[te]=Q[K]=Q[k]=Q[V]=Q[J]=Q[de]=Q[X]=Q[Z]=!0,Q[a]=Q[u]=Q[z]=Q[c]=Q[$]=Q[h]=Q[d]=Q[l]=Q[m]=Q[b]=Q[_]=Q[w]=Q[N]=Q[F]=Q[W]=!1;var oe=typeof ce=="object"&&ce&&ce.Object===Object&&ce,Pe=typeof self=="object"&&self&&self.Object===Object&&self,Ae=oe||Pe||Function("return this")(),ut=t&&!t.nodeType&&t,ft=ut&&!0&&e&&!e.nodeType&&e,bt=ft&&ft.exports===ut,ne=bt&&oe.process,Ye=function(){try{return ne&&ne.binding&&ne.binding("util")}catch{}}(),je=Ye&&Ye.isTypedArray;function wt(y,x){for(var R=-1,H=y==null?0:y.length,fe=0,se=[];++R<H;){var pe=y[R];x(pe,R,y)&&(se[fe++]=pe)}return se}function Vt(y,x){for(var R=-1,H=x.length,fe=y.length;++R<H;)y[fe+R]=x[R];return y}function Nt(y,x){for(var R=-1,H=y==null?0:y.length;++R<H;)if(x(y[R],R,y))return!0;return!1}function gt(y,x){for(var R=-1,H=Array(y);++R<y;)H[R]=x(R);return H}function Tr(y){return function(x){return y(x)}}function St(y,x){return y.has(x)}function yt(y,x){return y==null?void 0:y[x]}function He(y){var x=-1,R=Array(y.size);return y.forEach(function(H,fe){R[++x]=[fe,H]}),R}function Tt(y,x){return function(R){return y(x(R))}}function it(y){var x=-1,R=Array(y.size);return y.forEach(function(H){R[++x]=H}),R}var Ke=Array.prototype,xr=Function.prototype,S=Object.prototype,g=Ae["__core-js_shared__"],v=xr.toString,C=S.hasOwnProperty,P=function(){var y=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),D=S.toString,q=RegExp("^"+v.call(C).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),le=bt?Ae.Buffer:void 0,we=Ae.Symbol,Se=Ae.Uint8Array,Te=S.propertyIsEnumerable,he=Ke.splice,dt=we?we.toStringTag:void 0,sr=Object.getOwnPropertySymbols,Or=le?le.isBuffer:void 0,zt=Tt(Object.keys,Object),Ar=Ot(Ae,"DataView"),Yt=Ot(Ae,"Map"),Cr=Ot(Ae,"Promise"),Rr=Ot(Ae,"Set"),Nr=Ot(Ae,"WeakMap"),Pt=Ot(Object,"create"),un=Qe(Ar),xt=Qe(Yt),Hn=Qe(Cr),qn=Qe(Rr),Gn=Qe(Nr),cn=we?we.prototype:void 0,Pr=cn?cn.valueOf:void 0;function De(y){var x=-1,R=y==null?0:y.length;for(this.clear();++x<R;){var H=y[x];this.set(H[0],H[1])}}function Ir(){this.__data__=Pt?Pt(null):{},this.size=0}function Lr(y){var x=this.has(y)&&delete this.__data__[y];return this.size-=x?1:0,x}function Kt(y){var x=this.__data__;if(Pt){var R=x[y];return R===n?void 0:R}return C.call(x,y)?x[y]:void 0}function ln(y){var x=this.__data__;return Pt?x[y]!==void 0:C.call(x,y)}function Wn(y,x){var R=this.__data__;return this.size+=this.has(y)?0:1,R[y]=Pt&&x===void 0?n:x,this}De.prototype.clear=Ir,De.prototype.delete=Lr,De.prototype.get=Kt,De.prototype.has=ln,De.prototype.set=Wn;function qe(y){var x=-1,R=y==null?0:y.length;for(this.clear();++x<R;){var H=y[x];this.set(H[0],H[1])}}function Vn(){this.__data__=[],this.size=0}function zn(y){var x=this.__data__,R=lr(x,y);if(R<0)return!1;var H=x.length-1;return R==H?x.pop():he.call(x,R,1),--this.size,!0}function Yn(y){var x=this.__data__,R=lr(x,y);return R<0?void 0:x[R][1]}function Kn(y){return lr(this.__data__,y)>-1}function kr(y,x){var R=this.__data__,H=lr(R,y);return H<0?(++this.size,R.push([y,x])):R[H][1]=x,this}qe.prototype.clear=Vn,qe.prototype.delete=zn,qe.prototype.get=Yn,qe.prototype.has=Kn,qe.prototype.set=kr;function tt(y){var x=-1,R=y==null?0:y.length;for(this.clear();++x<R;){var H=y[x];this.set(H[0],H[1])}}function Qn(){this.size=0,this.__data__={hash:new De,map:new(Yt||qe),string:new De}}function Xn(y){var x=ht(this,y).delete(y);return this.size-=x?1:0,x}function Jn(y){return ht(this,y).get(y)}function Zn(y){return ht(this,y).has(y)}function ei(y,x){var R=ht(this,y),H=R.size;return R.set(y,x),this.size+=R.size==H?0:1,this}tt.prototype.clear=Qn,tt.prototype.delete=Xn,tt.prototype.get=Jn,tt.prototype.has=Zn,tt.prototype.set=ei;function ur(y){var x=-1,R=y==null?0:y.length;for(this.__data__=new tt;++x<R;)this.add(y[x])}function fn(y){return this.__data__.set(y,n),this}function cr(y){return this.__data__.has(y)}ur.prototype.add=ur.prototype.push=fn,ur.prototype.has=cr;function ct(y){var x=this.__data__=new qe(y);this.size=x.size}function Mr(){this.__data__=new qe,this.size=0}function ti(y){var x=this.__data__,R=x.delete(y);return this.size=x.size,R}function ri(y){return this.__data__.get(y)}function ni(y){return this.__data__.has(y)}function ii(y,x){var R=this.__data__;if(R instanceof qe){var H=R.__data__;if(!Yt||H.length<r-1)return H.push([y,x]),this.size=++R.size,this;R=this.__data__=new tt(H)}return R.set(y,x),this.size=R.size,this}ct.prototype.clear=Mr,ct.prototype.delete=ti,ct.prototype.get=ri,ct.prototype.has=ni,ct.prototype.set=ii;function oi(y,x){var R=fr(y),H=!R&&yn(y),fe=!R&&!H&&hr(y),se=!R&&!H&&!fe&&$r(y),pe=R||H||fe||se,me=pe?gt(y.length,String):[],ke=me.length;for(var be in y)(x||C.call(y,be))&&!(pe&&(be=="length"||fe&&(be=="offset"||be=="parent")||se&&(be=="buffer"||be=="byteLength"||be=="byteOffset")||It(be,ke)))&&me.push(be);return me}function lr(y,x){for(var R=y.length;R--;)if(gn(y[R][0],x))return R;return-1}function Br(y,x,R){var H=x(y);return fr(y)?H:Vt(H,R(y))}function Qt(y){return y==null?y===void 0?G:T:dt&&dt in Object(y)?At(y):mn(y)}function dn(y){return vt(y)&&Qt(y)==a}function hn(y,x,R,H,fe){return y===x?!0:y==null||x==null||!vt(y)&&!vt(x)?y!==y&&x!==x:pn(y,x,R,H,hn,fe)}function pn(y,x,R,H,fe,se){var pe=fr(y),me=fr(x),ke=pe?u:pt(y),be=me?u:pt(x);ke=ke==a?_:ke,be=be==a?_:be;var Ge=ke==_,Xe=be==_,Be=ke==be;if(Be&&hr(y)){if(!hr(x))return!1;pe=!0,Ge=!1}if(Be&&!Ge)return se||(se=new ct),pe||$r(y)?Fr(y,x,R,H,fe,se):ci(y,x,ke,R,H,fe,se);if(!(R&i)){var We=Ge&&C.call(y,"__wrapped__"),$e=Xe&&C.call(x,"__wrapped__");if(We||$e){var Lt=We?y.value():y,Ct=$e?x.value():x;return se||(se=new ct),fe(Lt,Ct,R,H,se)}}return Be?(se||(se=new ct),Dr(y,x,R,H,fe,se)):!1}function ai(y){if(!_n(y)||di(y))return!1;var x=vn(y)?q:ue;return x.test(Qe(y))}function si(y){return vt(y)&&Ur(y.length)&&!!Q[Qt(y)]}function ui(y){if(!hi(y))return zt(y);var x=[];for(var R in Object(y))C.call(y,R)&&R!="constructor"&&x.push(R);return x}function Fr(y,x,R,H,fe,se){var pe=R&i,me=y.length,ke=x.length;if(me!=ke&&!(pe&&ke>me))return!1;var be=se.get(y);if(be&&se.get(x))return be==x;var Ge=-1,Xe=!0,Be=R&o?new ur:void 0;for(se.set(y,x),se.set(x,y);++Ge<me;){var We=y[Ge],$e=x[Ge];if(H)var Lt=pe?H($e,We,Ge,x,y,se):H(We,$e,Ge,y,x,se);if(Lt!==void 0){if(Lt)continue;Xe=!1;break}if(Be){if(!Nt(x,function(Ct,Jt){if(!St(Be,Jt)&&(We===Ct||fe(We,Ct,R,H,se)))return Be.push(Jt)})){Xe=!1;break}}else if(!(We===$e||fe(We,$e,R,H,se))){Xe=!1;break}}return se.delete(y),se.delete(x),Xe}function ci(y,x,R,H,fe,se,pe){switch(R){case $:if(y.byteLength!=x.byteLength||y.byteOffset!=x.byteOffset)return!1;y=y.buffer,x=x.buffer;case z:return!(y.byteLength!=x.byteLength||!se(new Se(y),new Se(x)));case c:case h:case b:return gn(+y,+x);case d:return y.name==x.name&&y.message==x.message;case w:case F:return y==x+"";case m:var me=He;case N:var ke=H&i;if(me||(me=it),y.size!=x.size&&!ke)return!1;var be=pe.get(y);if(be)return be==x;H|=o,pe.set(y,x);var Ge=Fr(me(y),me(x),H,fe,se,pe);return pe.delete(y),Ge;case B:if(Pr)return Pr.call(y)==Pr.call(x)}return!1}function Dr(y,x,R,H,fe,se){var pe=R&i,me=Xt(y),ke=me.length,be=Xt(x),Ge=be.length;if(ke!=Ge&&!pe)return!1;for(var Xe=ke;Xe--;){var Be=me[Xe];if(!(pe?Be in x:C.call(x,Be)))return!1}var We=se.get(y);if(We&&se.get(x))return We==x;var $e=!0;se.set(y,x),se.set(x,y);for(var Lt=pe;++Xe<ke;){Be=me[Xe];var Ct=y[Be],Jt=x[Be];if(H)var ao=pe?H(Jt,Ct,Be,x,y,se):H(Ct,Jt,Be,y,x,se);if(!(ao===void 0?Ct===Jt||fe(Ct,Jt,R,H,se):ao)){$e=!1;break}Lt||(Lt=Be=="constructor")}if($e&&!Lt){var kt=y.constructor,pr=x.constructor;kt!=pr&&"constructor"in y&&"constructor"in x&&!(typeof kt=="function"&&kt instanceof kt&&typeof pr=="function"&&pr instanceof pr)&&($e=!1)}return se.delete(y),se.delete(x),$e}function Xt(y){return Br(y,En,li)}function ht(y,x){var R=y.__data__;return fi(x)?R[typeof x=="string"?"string":"hash"]:R.map}function Ot(y,x){var R=yt(y,x);return ai(R)?R:void 0}function At(y){var x=C.call(y,dt),R=y[dt];try{y[dt]=void 0;var H=!0}catch{}var fe=D.call(y);return H&&(x?y[dt]=R:delete y[dt]),fe}var li=sr?function(y){return y==null?[]:(y=Object(y),wt(sr(y),function(x){return Te.call(y,x)}))}:bn,pt=Qt;(Ar&&pt(new Ar(new ArrayBuffer(1)))!=$||Yt&&pt(new Yt)!=m||Cr&&pt(Cr.resolve())!=E||Rr&&pt(new Rr)!=N||Nr&&pt(new Nr)!=W)&&(pt=function(y){var x=Qt(y),R=x==_?y.constructor:void 0,H=R?Qe(R):"";if(H)switch(H){case un:return $;case xt:return m;case Hn:return E;case qn:return N;case Gn:return W}return x});function It(y,x){return x=x??s,!!x&&(typeof y=="number"||Fe.test(y))&&y>-1&&y%1==0&&y<x}function fi(y){var x=typeof y;return x=="string"||x=="number"||x=="symbol"||x=="boolean"?y!=="__proto__":y===null}function di(y){return!!P&&P in y}function hi(y){var x=y&&y.constructor,R=typeof x=="function"&&x.prototype||S;return y===R}function mn(y){return D.call(y)}function Qe(y){if(y!=null){try{return v.call(y)}catch{}try{return y+""}catch{}}return""}function gn(y,x){return y===x||y!==y&&x!==x}var yn=dn(function(){return arguments}())?dn:function(y){return vt(y)&&C.call(y,"callee")&&!Te.call(y,"callee")},fr=Array.isArray;function dr(y){return y!=null&&Ur(y.length)&&!vn(y)}var hr=Or||mi;function pi(y,x){return hn(y,x)}function vn(y){if(!_n(y))return!1;var x=Qt(y);return x==l||x==p||x==f||x==A}function Ur(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=s}function _n(y){var x=typeof y;return y!=null&&(x=="object"||x=="function")}function vt(y){return y!=null&&typeof y=="object"}var $r=je?Tr(je):si;function En(y){return dr(y)?oi(y):ui(y)}function bn(){return[]}function mi(){return!1}e.exports=pi})(ea,ea.exports);var cA=ea.exports;const lA=qt(cA);const Lg=({element:e="section",children:t,className:r,...n})=>U.createElement(e,{className:ie("modal",r),children:typeof t=="string"?O.jsx("p",{children:t}):t,...n});const kg=({id:e="content-overlay",isOpen:t=!1,maxWidth:r,functions:{onOpen:n=()=>{},onClose:i=()=>{}}={},forceShow:{error:o=!1}={},title:s,children:a,buttons:u,className:f="",gtmContext:c="Modal"})=>{const h=Ee(),[d,l]=U.useState(t),p=b=>{l(b),b?(n(),document.body.classList.add("has-overlay")):(i(),document.body.classList.remove("has-overlay"))};U.useEffect(()=>{p(t)},[t]);const m=r?{"--max-width":`${r/16}rem`}:{};return O.jsx("div",{className:ie("overlay",{open:d}),children:O.jsx(Lg,{id:e,className:ie("overlay-modal",f,{"has-max-width":r}),hidden:!d,style:m,children:t&&O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"top",children:[O.jsx("h2",{children:s}),O.jsx(Ue,{variant:"tertiary",size:"medium",icon:{icon:"close"},onClick:()=>p(!1),className:"gtm-trackable","data-gtm-event-type":"close-modal-click","data-gtm-event-context":c,screenreaderText:h.formatMessage({id:"overlay_button"})})]}),O.jsx(Ko,{}),a,u&&O.jsxs("div",{className:"bottom",children:[O.jsx(Ko,{}),O.jsx(no,{buttons:u})]}),o&&O.jsx(Xo,{className:"error",children:o})]})})})},Mg=(e,t)=>({"aria-haspopup":!0,"aria-expanded":t,"aria-controls":e}),Hd=e=>{const t={};return Object.keys(e).forEach(r=>{t[`${r}Slug`]=e[r]}),t};const nr="discussion_",fA=({element:e="div",content:t,userHasPermissions:r=!0,isLoading:n=!1,originalAuthorId:i,functions:{content:{createContent:o,deleteContent:s,updateContent:a}={createContent:()=>{},deleteContent:()=>{},updateContent:()=>{}},likes:{createLike:u,deleteLike:f}={createLike:()=>{},deleteLike:()=>{}},comments:{openComments:c}={openComments:()=>{}}},links:h={},className:d,gtmContext:l="DiscussionAnswer",children:p})=>{const m=Ee(),b=Ze.useNavigate(),T=U.useContext($n),_=U.useContext(vc),[E,A]=U.useState({body:t&&t.body||"",isEditing:!1,didEdit:t&&t.isEdited||!1}),[w,N]=U.useState(!1),[F,B]=U.useState("");if(U.useEffect(()=>{A({...E,body:t&&t.body||"",didEdit:t&&t.isEdited||!1})},[t.isEdited]),n||!t||t.type==="answer"&&(!t.slugs||!t.slugs.question))return O.jsx(br,{className:"discussion-card discussion-post"});const{author:G,canLike:W,createdAt:z,id:$,likes:Y=0,userLiked:te,comments:K=0}=t,k=T&&T.id&&typeof G!="string"&&G.id&&G.id===T.id||!1,V=typeof W=="boolean"?W:r?!k:!1,J=async re=>{re||(re=""),B("");try{if(!lA(re,E.body)){const ue=t.type==="question"?{title:re}:{body:re};await a(Hd(t.slugs),ue)}A({body:re,isEditing:!1,didEdit:!0})}catch{B(`${nr}form_error`)}},de=()=>{_&&_.updateConversation&&_.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const ue=`reply-form-${(t.type==="answer"?t.slug:t.slugs.answer||"").toLowerCase().slice(-15)}`,Fe=document.getElementById(ue),Q=document.getElementById(`${ue}-input`);Q&&Q.focus(),Fe&&Fe.scrollIntoView({behavior:"smooth"})},0)},X=()=>{try{s(Hd(t.slugs))}catch{B("delete-error")}},Z=[{text:m.formatMessage({id:`${nr}moreMenu_report`}),href:`mailto:community@apolitical.co?subject=${encodeURI(m.formatMessage({id:`${nr}report_subject`}))}&body=${encodeURI(m.formatMessage({id:`${nr}report_body`},{contentType:t.type||"",contentSlug:t.slug||"",contentUrl:`${window.origin}${typeof process<"u"&&process.env.PUBLIC_URL||""}/${t.slugs.question||""}`}))}`,icon:"flag"}];return r&&k&&Z.push({text:m.formatMessage({id:`${nr}moreMenu_edit`}),onClick:()=>A({...E,isEditing:!0}),icon:"pencil-paper",className:"gtm-trackable","data-gtm-event-context":l,"data-gtm-event-type":`edit-${t.type}-click`},{text:m.formatMessage({id:`${nr}moreMenu_delete`}),onClick:re=>{re.preventDefault(),re.stopPropagation(),N(!0)},icon:"trash",className:"gtm-trackable","data-gtm-event-context":l,"data-gtm-event-type":`delete-${t.type}-click`,...Mg(`delete-${t.slug}-modal`,w)}),U.createElement(e,{className:ie("discussion-post",d),"data-testid":`discussion-${t.type}-thread`,children:O.jsxs(O.Fragment,{children:[O.jsxs("div",{id:$||t.slug,className:ie("discussion-card",t.type,{editing:E.isEditing,"has-link":h.post&&!E.isEditing}),onClick:re=>{!h.post||E.isEditing||(re.preventDefault(),re.stopPropagation(),b(h.post))},children:[!E.isEditing&&O.jsx(da,{member:G,additionalContent:{createdAt:z,didEdit:E.didEdit},className:typeof G!="string"&&G.id===i?"highlighted":"",gtmContext:l,gtmType:"profile-click"}),E.isEditing?O.jsx(Pg,{content:{type:t.type,slugs:t.slugs},userHasPermissions:r,meta:{isLoading:n,isInWrapper:!0,isEditing:{text:E.body}},maxLength:t.type==="question"?250:5e4,forceShow:{error:F!==""&&F!=="delete-error"?m.formatMessage({id:F},{action:m.formatMessage({id:`discussion_action_${t.type}`})}):!1},functions:{create:o,handleSaveEdit:J,handleCancel:()=>{B(""),A({...E,isEditing:!1})}},gtmContext:`${l}Form`}):h.post?O.jsx(Ze.Link,{to:h.post,className:"gtm-trackable","data-gtm-event-context":l,"data-gtm-event-type":"title-click",children:O.jsx(Lu,{options:{overrides:{a:ag}},children:E.body})}):O.jsx(Lu,{options:{wrapper:t.type==="question"?"h1":U.Fragment,forceWrapper:t.type==="question",forceInline:t.type==="question",forceBlock:t.type!=="question"},children:E.body}),!E.isEditing&&O.jsxs("ul",{className:ie("actions text-medium",t.type),"data-testid":`${t.type}-actions`,children:[O.jsx(Ig,{element:"li",likes:Y,isShort:!1,userLiked:te,content:{type:t.type,slugs:t.slugs},canLike:V,functions:{createLike:u,deleteLike:f}}),["question","post"].includes(t.type)||h.comments||typeof c=="function"&&O.jsxs("li",{className:"action-button",onClick:re=>{re.preventDefault(),re.stopPropagation(),h.comments&&b(h.comments),typeof c=="function"&&c()},children:[O.jsx(Ue,{variant:"tertiary",size:"medium",styling:{muted:!0},icon:{icon:"speech-bubble_square_thick"},href:h.comments?h.comments:!1,onClick:h.comments||typeof c!="function"?!1:c,className:"gtm-trackable","data-gtm-event-context":l,"data-gtm-event-type":`answer-${t.type}-click`,screenreaderText:m.formatMessage({id:`${nr}comments_screenReader`},{count:K})}),O.jsx("span",{children:m.formatMessage({id:`${nr}comments`},{count:K})})]}),(t.type==="answer"||t.type==="reply")&&O.jsx("li",{children:O.jsx(Ue,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:de,children:m.formatMessage({id:`${nr}reply`})})}),O.jsx(mg,{element:"li",id:`more-${t.slug}`,options:Z})]})]}),p,O.jsx(kg,{id:`delete-${t.slug}-modal`,isOpen:w,functions:{onOpen:()=>{},onClose:()=>N(!1)},forceShow:{error:F==="delete-error"?m.formatMessage({id:"discussion_delete_error"},{action:m.formatMessage({id:`discussion_action_${t.type}`})}):!1},title:m.formatMessage({id:"discussion_delete_title"},{action:m.formatMessage({id:`discussion_action_${t.type}`})}),buttons:[{variant:"secondary",onClick:()=>N(!1),children:m.formatMessage({id:"discussion_delete_cancel"})},{variant:"primary",className:"destructive",onClick:X,children:m.formatMessage({id:"discussion_delete_delete"})}],gtmContext:`${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,children:O.jsx(_r,{id:"discussion_delete_text",values:{p:re=>O.jsx("p",{children:re}),action:m.formatMessage({id:`discussion_action_${t.type}`})}})})]})})};const ru="discussion_responses_",dA=({type:e="answer",responses:t=0})=>{const r=Ee();return O.jsxs("div",{className:"responses-heading",children:[O.jsx("h3",{children:r.formatMessage({id:`${ru}title`},{action:r.formatMessage({id:`${ru}${e}`}),count:t})}),t===0&&O.jsx("p",{children:Ft(r.formatMessage,`${ru}empty`,e,e)})]})};const hA=({isOpen:e=!1,count:t=0,children:r})=>{const n=Ee(),i=U.useRef(null),[o,s]=U.useState(e),[a,u]=U.useState("closed");U.useEffect(()=>{const d=i.current;if(d)return d.addEventListener("transitionend",f),()=>{d.removeEventListener("transitionend",f)}},[]),Zr(()=>{a==="closed"&&!o||u(["opening","open"].includes(a)?"ready-to-close":"opening")},[o]),U.useEffect(()=>{a==="ready-to-close"&&u("closing")},[a]);const f=({propertyName:d})=>{d==="max-height"&&u(l=>l==="opening"?"open":l==="closing"?"closed":l)},c=["opening","open"].includes(a),h=im(r,{element:"li"});return O.jsxs("div",{className:"thread-wrapper",children:[O.jsx(Ue,{variant:"secondary",size:"small",styling:{muted:!0},icon:{icon:`arrow_corner-down_${c?"left":"right"}`},onClick:()=>{s(!o)},children:n.formatMessage({id:`discussion_thread_${c?"hide":"show"}`},{count:t})}),O.jsx("ul",{ref:i,className:ie("thread",a),hidden:!o,children:h})]})},pA=({id:e,data:{jobTitle:t,name:r,organization:n,thumbnail:i}})=>({id:e,name:r,jobTitle:t,organization:n,image:{thumbnail:i}});exports.ASSETS_BUCKET=Qo;exports.BannerSection=oT;exports.Breadcrumbs=Cx;exports.Button=Ue;exports.ButtonWrapper=no;exports.CollapsibleSection=sc;exports.Columns=Px;exports.CommunityDetails=Ax;exports.Contributors=dg;exports.ConversationContext=vc;exports.CookieBanner=gg;exports.DiscussionConversation=GO;exports.DiscussionForm=Pg;exports.DiscussionLikes=Ig;exports.DiscussionPost=fA;exports.DiscussionThread=hA;exports.Divider=Ko;exports.DownloadSection=tT;exports.EmailHelperTextBox=Ix;exports.EmptyStateBox=ng;exports.Filters=Rx;exports.Footer=dc;exports.FullWidthSection=oc;exports.Header=yc;exports.HelperTextBox=og;exports.HiddenFromScreenReaders=Bu;exports.HideShowTextBox=dx;exports.HighlightedTextBox=ar;exports.IntlProvider=xx;exports.JoinButton=hg;exports.Link=ua;exports.LoadMore=pg;exports.LoadingBlock=wx;exports.LoadingPlaceholder=br;exports.LoadingState=lg;exports.Logo=fc;exports.LogoSection=rT;exports.MarkdownText=Lu;exports.MarketingBox=aT;exports.Member=da;exports.MembersList=HO;exports.Modal=Lg;exports.MoreMenu=mg;exports.NUMBER_OF_USERS=uT;exports.Overlay=kg;exports.PageLayout=UO;exports.PasswordRules=Mx;exports.Pill=sg;exports.ProfilePicture=fa;exports.ProgressBar=ug;exports.Rating=Bx;exports.ResponsesHeading=dA;exports.ResponsiveImage=om;exports.SearchForm=Eg;exports.Span=ag;exports.StatusBanner=Xo;exports.Tags=jO;exports.Tooltip=Bm;exports.UserContext=$n;exports.UserProvider=Ox;exports.VisuallyHidden=Je;exports.addAriaProps=Mg;exports.getMember=lc;exports.headerData=Xi;exports.mapGetStreamData=pA;exports.useEffectAfterMount=Zr;exports.useFeatureFlag=vb;exports.useScreenWidth=ro;exports.useScrollListener=zp;exports.useScrollToHash=Eb;
101
+ `))},[n]),U.useEffect(()=>{f==="ready-to-close"&&c("closing")},[f]);const h=({propertyName:l})=>{l==="max-height"&&c(p=>p==="opening"?"open":p==="closing"?"closed":p)};if(!n)return null;const d=["opening","open"].includes(f);return O.jsxs(ar,{variant:"subtle",className:ie("hide-show-text-box",e),children:[O.jsxs("div",{ref:s,className:ie("content",f),children:[O.jsx(la,{options:{forceBlock:!0},children:f==="closed"?a:n}),f!=="closed"&&i]}),O.jsx("p",{className:"cta",children:O.jsx(Ue,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:ie({"rotate-180":d}),onClick:()=>{c(d?"ready-to-close":"opening")},children:d?r||o.formatMessage({id:"hideShowTextBox_hide"}):t||o.formatMessage({id:"hideShowTextBox_show"})})})]})},hx=()=>U.Fragment,px=({children:e})=>O.jsx(ar,{variant:"secondary",children:e}),mx=["span","strong","h1","h2","h3","h4","h5","h6","p"],gx=({children:e})=>{const t=Ee();if(!e)return null;let r=t.formatMessage({id:"markdown_collapsibleSection_summary"});const n=[];for(const o of U.Children.toArray(e))if(!(!o||typeof o=="string"||typeof o=="number"))if(U.isValidElement(o)&&o.type==="summary"){if(o.props&&o.props.children){for(const s of U.Children.toArray(o.props.children))if(!(!s||typeof s=="string"||typeof s=="number")&&U.isValidElement(s)){const a=s.type;if(mx.includes(a)){for(r=s.props.children;typeof r!="string"&&(Array.isArray(r)&&r[0].props&&r[0].props.children&&r[0].props.children[0]);)r=r[0].props.children[0];break}}}}else n.push(o);const i=r?r.toString():"";return O.jsx(sc,{label:i,className:["Sources","Resources"].includes(i)?"discrete-links":"",children:n.map(o=>o)})},yx=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return O.jsx(ar,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return O.jsx(ar,{variant:"primary",children:e});case"pink-textbox":return O.jsx(ar,{variant:"tertiary",children:e});default:return O.jsx("div",{...t,children:e})}return O.jsx("div",{...t,children:e})},vx=e=>{const t=Ee(),r=Date.now().toString();let n="default";const i=e.src;return i.includes("youtube")||i.includes("vimeo")?n="video":i.includes("riddle")||i.includes("sli.do")?n="poll":i.includes("padlet")&&(n="padlet"),O.jsxs(O.Fragment,{children:[O.jsx(Je,{children:O.jsx(Ze.Link,{to:`#content-after-iframe-${r}`,children:t.formatMessage({id:`markdown_skip${n==="default"?"":`_${n}`}`})})}),O.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${n==="default"?"":`_${n}`}`})}),O.jsx("span",{id:`content-after-iframe-${r}`,tabIndex:-1})]})},Cd=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},_x=({children:e,...t})=>{let r={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(r.target="_blank");let n=e,i=!1;for(const o of U.Children.toArray(e))if(!(!o||typeof o=="string"||typeof o=="number")&&U.isValidElement(o)){const s=o.type;if(["button","center","span","strong"].includes(s)&&o.props&&o.props.children&&o.props.children[0])for((s==="button"||Cd(o.props.children[0])==="button")&&(i=!0),n=o.props.children[0];n&&typeof n!="string"&&!(typeof n=="boolean"||typeof n=="number"||!U.isValidElement(n));)if(n.props&&n.props.children&&n.props.children[0])n=n.props.children[0],n&&Cd(n)==="button"&&(i=!0);else break}return i?(r={...r,className:"button primary medium"},O.jsx("p",{className:"center",children:O.jsx(Ue,{variant:"primary",size:"medium",...r,children:n})})):O.jsx(Ze.Link,{to:r.href||"#",...r,children:n})},ag=({children:e})=>O.jsx("span",{children:e});const Lu=({className:e="",options:t={},children:r})=>{r=r.replace(/^<br\/?>/,"");const n={wrapper:U.Fragment,forceBlock:!0,overrides:{a:_x,CollapsibleSection:sc,TextBox:ar,CaseStudy:px,style:hx,details:gx,div:yx,iframe:vx}};return O.jsx("div",{className:ie("markdown-text",e),children:O.jsx(la,{options:{...n,...t},children:r})})};const sg=({size:e="medium",variant:t="default",className:r="",children:n})=>O.jsx("span",{className:ie("pill",e,t,r),children:n});const Xo=({element:e="p",children:t=null,className:r="",...n})=>U.createElement(e,{...n,className:ie("status-banner text-small",r),"aria-live":"assertive"},t);const Ex=({progress:e=0,text:t=!1,className:r=""})=>{const n=Ee(),i=e>75?100:e>50?75:e>25?50:e>5?25:0,o={"--progress":`${e}%`};return O.jsx("span",{className:ie(`progress-bar section-${i}`,r),style:o,children:O.jsx(Je,{children:t?`${e} ${t}`:n.formatMessage({id:"progressBar"},{number:e})})})},ug=U.memo(Ex);const Gs="loadingBlock_",bx=({progress:e=0,steps:t=!1,className:r=""})=>{const n=Ee();t||(t={0:{text:n.formatMessage({id:`${Gs}loading`})},75:{text:n.formatMessage({id:`${Gs}almostDone`})},100:{text:n.formatMessage({id:`${Gs}complete`})}});let i=null;const o=Object.keys(t);for(let a=0;a<o.length&&!(e<parseInt(o[a]));a++)i=o[a];const s=i&&t[i].icon?{"--icon":`url(${Qo}icons/${t[i].icon}.svg)`}:{};return O.jsxs(ar,{className:ie("loading-block",r,{"has-icon":i&&t[i].icon}),variant:"subtle",style:s,children:[i&&O.jsx("span",{className:"step",children:t[i].text}),O.jsx(ug,{progress:e})]})},wx=U.memo(bx);const br=({element:e="div",className:t="",...r})=>O.jsx(Bu,{element:e,className:ie("loading-placeholder",t),...r});const Mu={header:["logo","link","link","search"],sidebar:["text","text","text","text","text"],"cards-section":["subtitle","cards"],cards:["card","card","card","card"],"overview-page":["header","sidebar","title","text","cards-section","cards-section","footer"]},cg=(e,t)=>e in Mu?O.jsx("div",{className:e,children:Mu[e].map((r,n)=>cg(r,n))},t):O.jsx(br,{className:e},t),lg=({layout:e="overview-page"})=>O.jsx("div",{className:ie("loading-state",e),children:Mu[e].map((t,r)=>cg(t,r))}),fg=e=>{const t=e&&e.toUpperCase().split(" ");return Array.isArray(t)&&t.length>1&&t[0]!==""?t[1]===""?t[0][0]:t[0][0]+t[t.length-1][0]:e?e.substr(0,1):""},Io=["#5AB6A3","#A2D7AF","#806056","#3962B3"],Sx=e=>{const t=Math.ceil(26/Io.length),r=fg(e).toLowerCase();if(r==="")return Io[0];const n=r.charCodeAt(0)-96;for(let i=0;i<Io.length;i++)if(n<=t*(i+1))return Io[i]};const Rd=256,fa=({className:e="",src:t="",name:r,alt:n,width:i=Rd,height:o=Rd,...s})=>{const[a,u]=U.useState(!1),f=U.useRef(null);return U.useEffect(()=>{const c=f.current;if(!c)return;const h=c.getContext("2d");if(!h)return;const d=i,l=o;typeof window<"u"&&window.devicePixelRatio&&(c.width=d*window.devicePixelRatio,c.height=l*window.devicePixelRatio,h.scale(window.devicePixelRatio,window.devicePixelRatio)),h.fillStyle=Sx(r),h.fillRect(0,0,d,l),h.font=`${d/3}px Arial`,h.textAlign="center",h.fillStyle="white",h.fillText(fg(r),d/2,l/1.6)},[r]),O.jsxs("figure",{className:ie("profile-picture",e,{error:a}),...s,children:[t!==""&&!a&&O.jsx("img",{src:t,alt:n||r,onError:()=>{u(!0)},width:i,height:o}),(t===""||a)&&O.jsx("canvas",{ref:f})]})},lc=e=>e==="apolitical"?{image:`${Qo}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${Qo}logos/member_community.svg`}:{name:e.name,role:e.jobTitle||"",organisation:e.organization||"",country:e.location&&e.location.country||"",url:`/profiles/${e.id}`,image:e.image&&e.image.thumbnail},Tx=({role:e="",organisation:t="",country:r="",maximumCharacters:n=80})=>{const i=e!=="",o=t!=="",s=r!=="";if(!i&&!o&&!s)return"";const a=`${e}${i&&o?` — ${t}`:t}`;let u=`${a}${(i||o)&&s?`, ${r}`:r}`;return u.length>n&&(u=a),u.length>n&&(u=ac(u,n)),u};const da=({element:e="div",member:t="community",additionalContent:r=!1,gtmContext:n="member",gtmType:i="member-click",className:o=""})=>{const s=Ee(),a=lc(t);a.name||(a.name=s.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:u,url:f,image:c}=a,h=Tx(a),d=r&&r.createdAt?Ow(r.createdAt):!1,l=r&&r.createdAt?xw(r.createdAt):"";return U.createElement(e,{className:ie("member text-medium",o),children:O.jsxs(ua,{href:f,gtmType:i,gtmContext:n,onClick:p=>{p==null||p.stopPropagation()},children:[O.jsx(fa,{name:u,src:c}),O.jsxs("p",{className:"details",children:[O.jsx("strong",{children:u}),r&&O.jsxs("span",{className:"additional-content",children:[r.createdAt&&d&&O.jsx("span",{className:"date",title:l,"aria-label":l,children:s.formatMessage({id:`dates_${d.path}`},{number:d.number})}),r.didEdit&&O.jsx("em",{children:s.formatMessage({id:"discussion_edited"})})]}),h&&O.jsx("small",{children:h})]})]})})};const Nd={small:24,medium:48},dg=({element:e="div",contributors:{total:t,data:r}={total:void 0,data:[]},styling:{showText:n,size:i,showGap:o,showPlaceholders:s}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:a=2,className:u=""})=>{const f=Ee();return!r||r.length===0?null:U.createElement(e,{className:ie("contributors",u,i,{"has-gap":o}),children:O.jsxs(O.Fragment,{children:[O.jsx("ul",{children:r.map((c,h)=>{let d,l="";if(h<a){const{name:p="",image:m=""}=lc(c);if(s)return O.jsx(br,{element:"li",className:"contributor"},h);d=O.jsx(fa,{name:p,src:m,width:Nd[i||"medium"],height:Nd[i||"medium"]})}else if(h===a){const p=(t||r.length)-a;d=O.jsxs("small",{className:ie({"large-number":p>99}),children:["+",Nw(p,0)]}),l="number-left"}return d?O.jsx("li",{className:ie("contributor",l),children:d},h):null})}),n&&O.jsx("span",{className:"label",children:typeof n=="string"?n:r.length===1?typeof r[0]=="string"?f.formatMessage({id:`member_${r[0]}`}):ac(r[0].name||"",20):null})]})})},xx=({children:e,locale:t,messages:r})=>{const n=t||"en",i={...Rw[n],...r||{}};return O.jsx(ZS,{locale:n,messages:i,children:e})},$n=U.createContext(null),Ox=({children:e,user:t})=>O.jsx($n.Provider,{value:t,children:e});const Ws="joinCommunityButton",hg=({isMember:e=!1,isShort:t=!1,functions:{join:r,leave:n}={join:()=>{},leave:()=>{}}})=>{const i=Ee(),o=U.useContext($n),s=o&&typeof o.id=="string",[a,u]=U.useState(e),[f,c]=U.useState(e?"joined":"notJoined");U.useEffect(()=>{f==="joining"?c("joined"):f==="leaving"&&c("notJoined")},[a]);const h={},d={};return a&&f!=="leaving"&&(h["data-hover-text"]=i.formatMessage({id:`${Ws}_leave`}),h["aria-label"]=i.formatMessage({id:`${Ws}_member_aria`}),d["aria-hidden"]="true"),O.jsx(Ue,{variant:a?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:a&&f!=="leaving"?{icon:"tick",position:"left"}:!1,onClick:async l=>{s&&(l.currentTarget.blur(),a?(c("leaving"),typeof n=="function"&&await n()):(c("joining"),typeof r=="function"&&await r()),u(!a))},className:ie("join-community-button",f,{active:f==="joining"}),disabled:!s,...h,children:O.jsx("span",{className:"text",...d,children:i.formatMessage({id:`${Ws}${["joining","leaving"].includes(f)?`_${f}`:a?"_member":t?"_short":""}`})})})};const Vs="communityDetails_",Ax=({isMember:e=!1,slug:t,members:{number:r,data:n}={number:void 0,data:[]},className:i="",...o})=>{const s=Ee(),a=r||(n==null?void 0:n.length)||0;return O.jsxs("div",{className:ie("community-details",i),children:[O.jsx(Ko,{}),O.jsxs("div",{className:"member-details",children:[O.jsxs("div",{className:"top",children:[O.jsxs("h3",{children:[s.formatMessage({id:`${Vs}members`}),O.jsx("span",{className:"count",children:a})]}),O.jsx("p",{className:"text-small",children:O.jsx(Ze.Link,{to:`/communities/${t}/members`,children:s.formatMessage({id:`${Vs}viewAll`})})})]}),O.jsx(dg,{contributors:{total:r,data:n!=null&&n.length?n:[{},{},{},{},{}]},styling:{size:"medium",showGap:!0,showPlaceholders:a===0},cutoff:5})]}),O.jsx(hg,{isMember:e,...o}),e&&O.jsx(Ue,{variant:"primary",icon:{icon:"plus"},styling:{fullWidth:!0},children:s.formatMessage({id:`${Vs}invite`})})]})};const Cx=({breadcrumbs:e,cutoff:t=20,className:r=""})=>{const n=Ee();return O.jsxs(O.Fragment,{children:[O.jsx(Je,{element:"p",children:n.formatMessage({id:"breadcrumbs_label"})}),O.jsx("ul",{className:ie("breadcrumbs text-small",r),children:e.map(({text:i,href:o,current:s=!1},a)=>O.jsxs("li",{children:[s&&O.jsx(Je,{element:"span",children:n.formatMessage({id:"breadcrumbs_currentPage"})}),O.jsx(ua,{href:s?void 0:o,children:ac(i,t)})]},`${window.btoa(i)}_${a}`))})]})};const Rx=({options:e,allOption:t=!1,allowMultiple:r=!0,onChange:n=()=>{},className:i=""})=>{const o=Ee(),s=t?[{id:"all",text:typeof t!="boolean"&&t.text||o.formatMessage({id:"filters_all"})},...e]:e,[a,u]=U.useState(t?["all"]:[]),f=(c,h)=>{let d=[];a.includes(c)?d=a.filter(l=>l!==c):c==="all"?d=["all"]:r?d=[...a.filter(l=>l!=="all"),c]:d=[c],u(l=>(n&&typeof n=="function"&&n({current:d,previous:l}),d)),h&&typeof h=="function"&&h()};return O.jsx("ul",{className:ie("filters",i),children:s.map(({id:c,text:h,disabled:d=!1,callback:l=()=>{}})=>{let p={};return d&&(p={disabled:!0,"aria-label":o.formatMessage({id:"filters_disabled"},{name:h})}),O.jsx("li",{children:O.jsx("button",{className:ie(c,{selected:a.includes(c)}),onClick:m=>{m.preventDefault(),m.stopPropagation(),f(c,l)},...p,children:h})},c)})})};const zs=Ru({locale:"en",messages:ec}),pg=({page:e=1,length:t=0,limit:r=10,loadNextPage:n=()=>{},icon:i=!1,messages:o={button:zs.formatMessage({id:"loadMore_button"}),endOfFeed:zs.formatMessage({id:"loadMore_endOfFeed"}),error:zs.formatMessage({id:"loadMore_error"})},className:s="",gtmContext:a="LoadMore"})=>{const[u,f]=U.useState(!1),[c,h]=U.useState(!1);if(t<=0||t<r*e)return null;const d=async l=>{try{await n(l)}catch(p){p instanceof Error&&p.message&&p.message.includes("Cannot read items")?h(!0):f(!0)}};return O.jsxs("footer",{className:ie("load-more",s),children:[u&&O.jsx("p",{className:"error",children:o.error}),c?O.jsx("p",{children:o.endOfFeed}):O.jsx(Ue,{variant:"secondary",icon:i,onClick:d,"data-gtm-event-context":a,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:o.button})]})};let Lo=!1;const mg=({element:e="div",id:t="more-menu",options:r,className:n=""})=>{const i=Ee(),o=U.useRef(null),[s,a]=U.useState(!1),u=f=>{o.current&&f.target instanceof HTMLElement&&!o.current.contains(f.target)&&a(!1)};return U.useEffect(()=>(document.addEventListener("click",u,!0),()=>{document.removeEventListener("click",u,!0)})),U.createElement(e,{ref:o,className:ie("more-menu text-medium",n),children:O.jsxs(O.Fragment,{children:[O.jsx(Ue,{variant:"tertiary",size:"medium",icon:{icon:"ellipsis"},onClick:()=>a(!s),"aria-haspopup":"true","aria-expanded":s,"aria-controls":t,screenreaderText:i.formatMessage({id:"moreMenu"})}),O.jsx("ul",{id:t,hidden:!s,children:r.map(({href:f,onClick:c,text:h,icon:d,...l},p)=>{const m={...l,onClick:b=>{a(!1),typeof c=="function"&&c(b)},onFocus:()=>{Lo&&(clearTimeout(Lo),Lo=!1)},onBlur:()=>{Lo=setTimeout(()=>{a(!1)},100)}};return f&&(m.href=f),O.jsx("li",{children:O.jsx(Ue,{variant:"tertiary",size:"medium",icon:d?{icon:d,position:"left"}:!1,...m,children:h})},`${window.btoa(h)}_${p}`)})})]})})};const fc=({variant:e="default",version:t="default",className:r="",...n})=>O.jsx("p",{className:"logo-wrapper",children:O.jsx(Ze.Link,{to:"/home/",className:ie("logo",e,t,r),...n,children:O.jsx(Je,{children:O.jsx(_r,{id:"apolitical"})})})});const Nx={"2-1":901},Px=({layout:e="2-1",hideOnMobile:t=!1,className:r="",children:n})=>{const i=ro(!0);let o=n;return U.Children.count(n)===1&&(o=U.Children.toArray(n)[0],o.props&&(o=o.props.children)),O.jsx("section",{className:ie("columns",`layout-${e}`,r),children:U.Children.map(o,(s,a)=>t!==!1&&a===t&&i&&i<Nx[e]?null:s)})};const Ys="cookieBanner_",Ks=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],Qs=new Date(Date.now()+12*30*24*60*60*1e3),gg=()=>{const e=Ee(),t=Ze.useNavigate(),[r,n,i]=Kd(Ks),[o,s]=U.useState(!r["apol-cookie-banner"]),a=()=>{Ks.forEach(h=>{n(h,!0,{path:"/",expires:Qs,domain:h==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),s(!1),t(0)},u=()=>{n("apol-cookie-banner",!0,{path:"/",expires:Qs}),Ks.forEach(h=>{if(h==="apol-cookie-banner"){n(h,!0,{path:"/",expires:Qs});return}i(h)}),s(!1)};if(!o)return null;const f=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:u,gtmType:"reject-all"},{id:"accept",onClick:a,gtmType:"accepted-all"}],c=[];return f.forEach(h=>{c.push({variant:h.href?"tertiary":"primary",href:h.href,onClick:h.onClick,className:"gtm-trackable","data-gtm-event-context":"cookie-banner","data-gtm-event-type":`cookie-${h.gtmType}-click`,children:e.formatMessage({id:`${Ys}buttons_${h.id}`})})}),O.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[O.jsx("h6",{children:e.formatMessage({id:`${Ys}title`})}),O.jsx("p",{children:e.formatMessage({id:`${Ys}text`})}),O.jsx(no,{buttons:c})]})},or={platform:{order:["events","courses","qanda","articles"],events:{href:"/events/",gtmType:"events-click"},courses:{href:"/microcourses/",gtmType:"microcourses-click"},qanda:{href:"/questions-answers/",gtmType:"q-and-a-click"},articles:{href:"/solution-articles/",gtmType:"articles-click"}},community:{order:["support","post","join","guidelines"],support:{name:"Support FAQ",href:"/pages/support-faq",gtmType:"support-faq-click"},post:{href:"/pages/post-an-article",gtmType:"post-an-article-click"},join:{href:"/pages/who-can-join-the-community",gtmType:"who-can-join-click"},guidelines:{href:"/pages/values-and-guidelines",gtmType:"guidelines-and-values-click"}},company:{order:["story","team","careers","partner","contact"],story:{href:"/pages/our-story",gtmType:"our-story-click"},team:{href:"/pages/meet-our-team",gtmType:"team-click"},careers:{href:"/pages/careers",gtmType:"careers-click"},partner:{href:"/partnerships/",gtmType:"partner-with-us-click"},contact:{href:"/pages/get-in-touch",gtmType:"contact-click"},child:"legal"},legal:{order:["privacy","terms","cookie","accessibility"],privacy:{href:"https://about.apolitical.co/privacy-policy",gtmType:"privacy-policy-link"},terms:{href:"https://about.apolitical.co/terms-and-conditions",gtmType:"terms-conditions-link"},cookie:{href:"/pages/cookie-policy",gtmType:"cookie-policy-link"},accessibility:{href:"/pages/accessibility-statement",gtmType:"accessibility-link"},text:{order:["dataProtection","euDataProtection"],dataProtection:{email:"dpo@apolitical.co",gtmType:"email-dpo-link"},euDataProtection:{email:"dpo.agl@apolitical.foundation",gtmType:"email-eu-dpo-link"}}},contact:{text:{order:["correspondence","registered","berlin","support","business"],correspondence:{address:!0},registered:{address:!0},berlin:{address:!0},support:{email:"concierge@apolitical.co",gtmType:"concierge-email-click"},business:{email:"hello@apolitical.co",gtmType:"hello-email-click"}}},social:{order:["linkedin","twitter","facebook"],linkedin:{href:"https://www.linkedin.com/company/apolitical"},twitter:{href:"https://twitter.com/apoliticalco"},facebook:{href:"https://www.facebook.com/apoliticalco"}}};const Cn="footer_",Jo="SiteFooter",Pd=({group:e})=>{const t=or[e].order||[];let r=!1;return"text"in or[e]&&(r=or[e].text),O.jsxs(U.Fragment,{children:[O.jsx("p",{className:"pre-title",children:O.jsx(_r,{id:`${Cn}${e}`})}),Array.isArray(t)&&t.length>0&&O.jsx("ul",{className:"text-medium",children:t.map(n=>{if(["order","child","text"].includes(n))return null;const{href:i,gtmType:o}=or[e][n],s={};return["legal"].includes(e)&&(s.target="_blank",s.rel="noopener"),O.jsx("li",{children:O.jsx(Ze.Link,{to:i,className:"gtm-trackable","data-gtm-event-context":Jo,"data-gtm-event-type":o,...s,children:O.jsx(_r,{id:`${Cn}${e}_${n}`})})},`${e}_${n}`)})}),typeof r!="boolean"&&"order"in r&&Array.isArray(r.order)&&O.jsx("dl",{className:"text-medium",children:r.order.map(n=>O.jsxs(U.Fragment,{children:[O.jsx("dt",{children:O.jsx(_r,{id:`${Cn}${e}_${n}`})}),O.jsxs("dd",{children:[typeof r!="boolean"&&r[n].address&&O.jsx("address",{children:O.jsx(_r,{id:`${Cn}${e}_${n}_address`,values:{br:O.jsx("br",{})}})}),typeof r!="boolean"&&r[n].email&&O.jsx("a",{href:`mailto:${r[n].email}`,className:"gtm-trackable","data-gtm-event-context":Jo,"data-gtm-event-type":r[n].gtmType,children:r[n].email})]})]},`dl-${e}-${n}`))})]},e)},dc=()=>O.jsx("div",{id:"footer",children:O.jsxs("div",{className:"wrapper",children:[O.jsx(Bu,{element:"hr"}),O.jsx(fc,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":Jo,"data-gtm-event-type":"logo-homepage-link"}),O.jsx("footer",{children:["platform","community","company","contact"].map(e=>O.jsxs("div",{className:"group",children:[O.jsx(Pd,{group:e}),Object.keys(or[e]).includes("child")&&O.jsx(Pd,{group:or[e].child})]},e))}),O.jsx("hr",{}),O.jsxs("div",{className:"sub-footer",children:[O.jsx("ul",{children:Array.isArray(or.social.order)&&or.social.order.map(e=>{const t=or.social[e];return O.jsx("li",{className:e,children:O.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":Jo,"data-gtm-event-type":"social-click",children:O.jsx("span",{className:"hidden",children:O.jsx(_r,{id:`${Cn}social_${e}`})})})},e)})}),O.jsx("small",{children:O.jsx(_r,{id:`${Cn}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});const Mo="emailHelperTextBox_",Ix=({type:e,email:t,redirectPath:r,resendVerificationCode:n})=>{const i=Ee(),o=Ze.useNavigate(),[s,a]=U.useState({path:`${Mo}default`,type:"default",link:{},mail:{},error:""}),[u,f]=U.useState(!1),c=U.useCallback(p=>{p.preventDefault(),p.stopPropagation();const m=b=>{a({path:`${Mo}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:T=>c(T),href:"#","data-testid":"send-verify-email-click"},mail:{href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"ErrorVerifyingBox","data-gtm-event-type":"email-concierge-click"},error:b})};if(typeof n!="function"){m(i.formatMessage({id:`${Mo}error_noFunction`}));return}f(!0),n(t).then(()=>{localStorage.setItem("email",t),o(r||"/signup/verify-email")}).catch(b=>{m(b.message)}).finally(()=>{f(!1)})},[t,r,n]);U.useEffect(()=>{let p=Mo,m="default",b={},T={};switch(e){case"gov":p+="autoApproved",m="success";break;case"nonGov":p+="unrecognisedEmail",m="error",b={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":p+="pendingApproval",m="error",T={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":p+="emailUnverified",m="error",b={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:_=>c(_),"data-testid":"send-verify-email-click"};break;case"exists":p+="emailAlreadyExists",m="error",b={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},T={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:p+="default",b={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}a({...s,path:p,type:m,link:b,mail:T})},[e]);const h={};return["link","mail"].forEach(p=>{h[p]=Object.keys(s[p]).length?m=>O.jsx("a",{...s[p],children:m}):m=>m}),O.jsx(og,{type:s.type,heading:u?!1:i.formatMessage({id:`${s.path}_title`}),children:u?O.jsxs(O.Fragment,{children:[O.jsx(br,{element:"span"}),O.jsx(br,{element:"span"})]}):i.formatMessage({id:`${s.path}_text`},{...h,strong:p=>O.jsx("strong",{children:p}),em:p=>O.jsx("em",{children:p}),br:O.jsxs(O.Fragment,{children:[O.jsx("br",{}),O.jsx("br",{})]}),error:s.error})})};const ko="passwordRules_",yg="isMoreThanEightCharacters",vg="includesNumberAndSymbol",_g="includesLowerAndUppercase",Lx={[yg]:"8Characters",[vg]:"numberSymbol",[_g]:"lowercaseUppercase"},Mx=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const r=Ee();return O.jsxs("aside",{className:ie("password-rules",t),children:[O.jsx("small",{children:r.formatMessage({id:`${ko}intro`})}),O.jsx("ul",{children:[yg,vg,_g].map(n=>O.jsxs("li",{className:ie({matches:e[n]}),children:[O.jsxs(Je,{children:[r.formatMessage({id:`${ko}rule_label`})," "]}),O.jsx("span",{children:r.formatMessage({id:`${ko}rule_${Lx[n]}`})}),!e[n]&&O.jsxs(Je,{element:"strong",children:[" "," ",r.formatMessage({id:`${ko}notMet`})]})]},`rule-${n}`))})]})},kx=U.memo(Mx);const Bx=({text:e={},topRating:t=5,functions:{createRating:r=()=>null,updateRating:n=()=>{},reportError:i=()=>{}},className:o="",hasLoaded:s=!1})=>{const a=Ee(),[u,f]=U.useState({setUp:!1,id:null,rating:null,disabled:!0}),c=async()=>{try{const T=await r();f(_=>({..._,setUp:!0,id:T&&T.id,disabled:!1}))}catch(T){f(_=>({..._,setUp:!0,disabled:!0})),i(T)}};if(U.useEffect(()=>{s&&!u.setUp&&c()},[s]),!s)return O.jsx(br,{className:"rating-placeholder"});const{id:h,rating:d,disabled:l}=u,p="ratings_",m={text:a.formatMessage({id:`${p}text`}),low:a.formatMessage({id:`${p}low`}),high:a.formatMessage({id:`${p}high`}),success:a.formatMessage({id:`${p}success`}),...e},b=async T=>{if(!(!h||l))try{f(_=>({..._,rating:T,disabled:!0})),await n({id:h,value:T})}catch(_){f(E=>({...E,rating:null})),i(_)}finally{f(_=>({..._,disabled:!1}))}};return O.jsxs("div",{className:ie("rating",o),children:[O.jsx("span",{className:"label",children:m[d?"success":"text"]}),O.jsx("ol",{children:Array.from(new Array(t).keys()).map(T=>{const _=T+1;return O.jsx("li",{className:ie({selected:d&&_<=d}),children:O.jsx(Ue,{variant:"tertiary",size:"small",icon:{icon:`star${!d||_>d?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${a.formatMessage({id:`${p}stars`},{number:_,total:t})}${_===1||_===t?` - ${m[_===1?"low":"high"]}`:""}`,onClick:E=>{E.preventDefault(),E.stopPropagation(),b(_)},disabled:l})},`rating-${_}`)})})]})};const Eg=({id:e="search",className:t="",handleToggle:r=!1,defaultValue:n="",gtmContext:i="search-bar",gtmEvent:o="form-submission"})=>{const{searchIsOpen:s=!0,isDesktopVersion:a=!1}=r||{},u=Ee(),f=Ze.useNavigate(),c=U.useRef(null);Zr(()=>{!r||a||!s||c.current&&c.current.focus()},[s]);const h=d=>{d.preventDefault(),d.stopPropagation(),!(!c.current||!c.current.value||c.current.value.length<1)&&f(`/search?search=${encodeURIComponent(c.current.value)}`)};return O.jsx("form",{onSubmit:h,className:ie("search-form gtm-trackable",t),"data-gtm-event-context":i,"data-gtm-event-type":o,children:O.jsx("fieldset",{id:`${e}-form`,hidden:r?!s:!1,role:"search",children:O.jsxs("p",{children:[O.jsx(Je,{element:"label",htmlFor:e,children:u.formatMessage({id:"search_label"})}),O.jsx("input",{ref:c,type:"search",id:e,name:e,defaultValue:n,placeholder:u.formatMessage({id:"search_placeholder"}),onKeyDown:d=>{d.key==="Enter"&&h(d)}}),O.jsx("button",{className:"clear",onClick:d=>{d.preventDefault(),d.stopPropagation(),c.current&&c.current.value&&(c.current.value="")},children:O.jsx(Je,{children:u.formatMessage({id:"search_clear"})})}),O.jsx("button",{className:"search",onClick:h,children:O.jsx(Je,{children:u.formatMessage({id:"search_cta"})})})]})})})};var Fx="Expected a function",bg="__lodash_hash_undefined__",wg=1/0,Dx="[object Function]",Ux="[object GeneratorFunction]",$x="[object Symbol]",jx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hx=/^\w*$/,qx=/^\./,Gx=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wx=/[\\^$.*+?()[\]{}|]/g,Vx=/\\(\\)?/g,zx=/^\[object .+?Constructor\]$/,Yx=typeof ce=="object"&&ce&&ce.Object===Object&&ce,Kx=typeof self=="object"&&self&&self.Object===Object&&self,hc=Yx||Kx||Function("return this")();function Qx(e,t){return e==null?void 0:e[t]}function Xx(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Jx=Array.prototype,Zx=Function.prototype,Sg=Object.prototype,Xs=hc["__core-js_shared__"],Id=function(){var e=/[^.]+$/.exec(Xs&&Xs.keys&&Xs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Tg=Zx.toString,pc=Sg.hasOwnProperty,xg=Sg.toString,eO=RegExp("^"+Tg.call(pc).replace(Wx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ld=hc.Symbol,tO=Jx.splice,rO=Og(hc,"Map"),Qi=Og(Object,"create"),Md=Ld?Ld.prototype:void 0,kd=Md?Md.toString:void 0;function rn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function nO(){this.__data__=Qi?Qi(null):{}}function iO(e){return this.has(e)&&delete this.__data__[e]}function oO(e){var t=this.__data__;if(Qi){var r=t[e];return r===bg?void 0:r}return pc.call(t,e)?t[e]:void 0}function aO(e){var t=this.__data__;return Qi?t[e]!==void 0:pc.call(t,e)}function sO(e,t){var r=this.__data__;return r[e]=Qi&&t===void 0?bg:t,this}rn.prototype.clear=nO;rn.prototype.delete=iO;rn.prototype.get=oO;rn.prototype.has=aO;rn.prototype.set=sO;function jn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function uO(){this.__data__=[]}function cO(e){var t=this.__data__,r=ha(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():tO.call(t,r,1),!0}function lO(e){var t=this.__data__,r=ha(t,e);return r<0?void 0:t[r][1]}function fO(e){return ha(this.__data__,e)>-1}function dO(e,t){var r=this.__data__,n=ha(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}jn.prototype.clear=uO;jn.prototype.delete=cO;jn.prototype.get=lO;jn.prototype.has=fO;jn.prototype.set=dO;function sn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function hO(){this.__data__={hash:new rn,map:new(rO||jn),string:new rn}}function pO(e){return pa(this,e).delete(e)}function mO(e){return pa(this,e).get(e)}function gO(e){return pa(this,e).has(e)}function yO(e,t){return pa(this,e).set(e,t),this}sn.prototype.clear=hO;sn.prototype.delete=pO;sn.prototype.get=mO;sn.prototype.has=gO;sn.prototype.set=yO;function ha(e,t){for(var r=e.length;r--;)if(CO(e[r][0],t))return r;return-1}function vO(e,t){t=wO(t,e)?[t]:bO(t);for(var r=0,n=t.length;e!=null&&r<n;)e=e[OO(t[r++])];return r&&r==n?e:void 0}function _O(e){if(!Cg(e)||TO(e))return!1;var t=RO(e)||Xx(e)?eO:zx;return t.test(AO(e))}function EO(e){if(typeof e=="string")return e;if(gc(e))return kd?kd.call(e):"";var t=e+"";return t=="0"&&1/e==-wg?"-0":t}function bO(e){return Ag(e)?e:xO(e)}function pa(e,t){var r=e.__data__;return SO(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Og(e,t){var r=Qx(e,t);return _O(r)?r:void 0}function wO(e,t){if(Ag(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||gc(e)?!0:Hx.test(e)||!jx.test(e)||t!=null&&e in Object(t)}function SO(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function TO(e){return!!Id&&Id in e}var xO=mc(function(e){e=PO(e);var t=[];return qx.test(e)&&t.push(""),e.replace(Gx,function(r,n,i,o){t.push(i?o.replace(Vx,"$1"):n||r)}),t});function OO(e){if(typeof e=="string"||gc(e))return e;var t=e+"";return t=="0"&&1/e==-wg?"-0":t}function AO(e){if(e!=null){try{return Tg.call(e)}catch{}try{return e+""}catch{}}return""}function mc(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(Fx);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(mc.Cache||sn),r}mc.Cache=sn;function CO(e,t){return e===t||e!==e&&t!==t}var Ag=Array.isArray;function RO(e){var t=Cg(e)?xg.call(e):"";return t==Dx||t==Ux}function Cg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function NO(e){return!!e&&typeof e=="object"}function gc(e){return typeof e=="symbol"||NO(e)&&xg.call(e)==$x}function PO(e){return e==null?"":EO(e)}function IO(e,t,r){var n=e==null?void 0:vO(e,t);return n===void 0?r:n}var LO=IO;const Rg=qt(LO),Ne={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const r={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},n=o=>{const s=`logged${e?"In":"Out"}`;return t>=r[o][s]};let i={};return["navigation","search"].forEach(o=>{i[o]=n(o)}),i},shouldChangeHeaderIsVisible:(e,t,r)=>{Object.values(t).filter(i=>i===!0).length||r([{type:"headerIsVisible",value:e}])},handleMenus:({id:e,value:t,menus:r,dispatch:n})=>{if(r[e]===t||e==="account"&&t===!1&&r.navigation===!0)return;const i=Date.now();if(!t&&Ne.handlerCalled[e]&&i-Ne.handlerCalled[e]<500)return;Ne.handlerCalled[e]=i;let o=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(r).forEach(s=>{s===e||r[s]===!1||o.push({type:`menus.${s}`,value:!1})}),n(o)},findFirstChild:(e,t,r=!1)=>{if(!e||!e[0])return!1;for(let n=0;n<=e.length;n++){if(!e[n])continue;if(e[n][t]&&(!r||e[n][t].includes(r)))return e[n];if(!t.includes("."))continue;const i=Rg(e[n],t);if(!(typeof i>"u")&&(!r||i[t]&&i[t].includes(r)||i.value&&i.value.includes(r)||i.toString().includes(r)))return e[n]}return e[0].children?Ne.findFirstChild(e[0].children,t,r):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:r,focusElements:n,dispatch:i})=>{if(!t.current||!t.current.children)return;const o=r?"desktop":"default";if(n[e][o]){n[e][o].focus();return}let s,a;switch(e){case"navigation":if(r){const u=Ne.findFirstChild(t.current.children,"attributes.aria-controls","navigation");s=Ne.findFirstChild(u.children,"href")}else s=Ne.findFirstChild(t.current.children,"href");s||(s=t.current);break;case"account":if(a=Ne.findFirstChild(t.current.children,"className","account"),!a||!a.children)return;s=Ne.findFirstChild(a.children,"href");break;default:return}s&&(i([{type:`focusElements.${e}.${o}`,value:s}]),s.focus())},events:{onClick:(e,{id:t,callback:r,isOpen:n})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(Ne.timeouts[t]),r(t,!n))},onFocus:({id:e})=>{clearTimeout(Ne.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(Ne.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{Ne.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},Xi={order:["home","topics","partners","account"],home:{href:"/home/",hasVariantText:!0,gtmType:"homepage-click"},topics:{order:["explore","topics"],menuId:"navigation",explore:{order:["events","courses","q-and-a","articles"],events:{href:"/events/",className:"icon events"},courses:{href:"/microcourses/",gtmType:"microcourses-click",className:"icon courses"},"q-and-a":{href:"/questions-answers/",className:"icon q-and-a"},articles:{href:"/solution-articles/",gtmType:"articles-click",className:"icon articles"}},topics:{order:["climate","cities-and-local-government","digital-and-data","education","equity-justice-and-inclusion","health-and-social-care","innovation","leadership-and-skills","life-in-government","policymaking","transport-and-infrastructure","work-and-the-economy"],className:"columns",climate:{href:"/topics/climate/"},"cities-and-local-government":{href:"/topics/cities-and-local-government/"},"digital-and-data":{href:"/topics/digital-and-data/"},education:{href:"/topics/education/"},"equity-justice-and-inclusion":{href:"/topics/equity-justice-and-inclusion/"},"health-and-social-care":{href:"/topics/health-and-social-care/"},innovation:{href:"/topics/innovation/"},"leadership-and-skills":{href:"/topics/leadership-and-skills/"},"life-in-government":{href:"/topics/life-in-government/"},policymaking:{href:"/topics/policymaking/"},"transport-and-infrastructure":{href:"/topics/transport-and-infrastructure/"},"work-and-the-economy":{href:"/topics/work-and-the-economy/"}}},partners:{href:"/partnerships/",onlyShow:"logged-out"},account:{order:["profile","settings","log-out"],className:"account",onlyShow:"logged-in",doTrack:!1,profile:{href:"/profiles/me"},settings:{href:"/profiles/me/manage-account"},"log-out":{href:"/user-onboarding/logout",className:"divider"}},buttons:{order:["login","signup"],login:{href:"/user-onboarding/login"},signup:{href:"/signup/?ref=header-banner",props:{variant:"primary"}}}},Zo=({id:e,isLoggedIn:t=!1,isDesktopVersion:r=!1,menus:n={},callback:i=()=>{},doTrack:o=null})=>{const s=Ee(),{pathname:a}=Ze.useLocation(),u=Rg(Xi,e);if(!u||u.onlyShow&&(u.onlyShow==="logged-in"&&!t||u.onlyShow==="logged-out"&&t))return null;const f="doTrack"in u,c=o===null?f?u.doTrack:!0:o,h=e.includes("buttons.");let d=`header_${e.replaceAll(".","_")}`;u.hasVariantText&&(d+=`_logged${t?"In":"Out"}`);let l=!1;if(u.href){let E=u.gtmType||`${e}-click`;if(E.includes(".")){const A=E.split("."),w=A[A.length-2];E=`${w==="topics"?`${w}-`:""}${A[A.length-1]}`}l={href:u.href,role:"menuitem"},c&&(l={...l,className:"gtm-trackable","data-gtm-event-type":E,"data-gtm-event-context":"HeaderButtons"}),h&&(l={...l,variant:"secondary",size:{mobile:"small",881:"large"},...u.props||{}})}const p=u.order&&u.order[0]&&u[u.order[0]],m=p&&u[u.order[0]].order,b=l&&a===u.href;let T={},_={};if(p){const E=u.menuId||e,A={onClick:w=>Ne.events.onClick(w,{id:E,callback:i,isOpen:n[E]}),onFocus:()=>Ne.events.onFocus({id:E}),onBlur:()=>Ne.events.onBlur({id:E,callback:i}),onMouseLeave:()=>Ne.events.onBlur({id:E,callback:i}),onMouseEnter:()=>Ne.events.onMouseEnter({id:E,callback:i})};r&&(m&&(T={...A,onKeyPress:w=>{w.key==="Enter"&&Ne.events.onClick(w,{id:E,callback:i,isOpen:n[E]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":n[E],"aria-controls":E}),_={hidden:E in n?!n[E]:!0}),m||(_={..._,...A})}return O.jsxs("li",{className:ie({[u.className]:u.className,"has-submenu":p,parent:m,active:b}),role:"none",...T,children:[l?U.createElement(h?Ue:"a",l,s.formatMessage({id:d})):s.formatMessage({id:d}),u.order&&O.jsx("ul",{..._,children:u.order.map(E=>{if(!u[E])return null;const A={isLoggedIn:t,isDesktopVersion:r,menus:n,callback:i,doTrack:f?c:null};return u[E].order?O.jsxs("li",{className:ie({[u[E].className]:u[E].className}),children:[s.formatMessage({id:`${d}_${E}`}),O.jsx("ul",{children:u[E].order.map(w=>O.jsx(Zo,{id:`${e}.${E}.${w}`,...A},w))})]},E):O.jsx(Zo,{id:`${e}.${E}`,...A},E)})})]},e)};const MO={height:67,height_desktop:83},yc=()=>{const e=Ee(),t=U.useContext($n),r=ro(!0,!0),n=t&&typeof t.id=="string",i=U.useMemo(()=>Ne.getIsDesktopVersion(n,r),[n,r]),[o,s]=U.useReducer(Tw,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:a,menus:u,focusElements:f}=o;zp({scrollPosition:MO[`height${i.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!i&&u.navigation||Ne.shouldChangeHeaderIsVisible(!0,u,s)},scrollDown:()=>{!i&&u.navigation||Ne.shouldChangeHeaderIsVisible(!1,u,s)}}});const c=(d,l)=>{Ne.handleMenus({id:d,value:l,menus:u,dispatch:s})},h=U.useRef(null);return Zr(()=>{u.navigation&&Ne.autoFocus({menu:"navigation",navigationRef:h,isDesktopVersion:i.navigation,focusElements:f,dispatch:s})},[u.navigation]),Zr(()=>{u.account&&Ne.autoFocus({menu:"account",navigationRef:h,isDesktopVersion:i.navigation,focusElements:f,dispatch:s})},[u.account]),t&&t.isLoading?null:O.jsxs(O.Fragment,{children:[O.jsxs("nav",{id:"header",className:ie({"logged-in":n,"logged-out":!n,visible:a}),children:[O.jsx(Je,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),O.jsx(fc,{}),!i.navigation&&O.jsx("button",{className:"menu-button gtm-trackable",onClick:d=>{d.preventDefault(),d.stopPropagation(),c("navigation",!u.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":u.navigation,"aria-controls":"navigation",children:O.jsx(Je,{children:e.formatMessage({id:`header_menu_${u.navigation?"hide":"show"}`})})}),O.jsx("ul",{ref:h,id:"navigation",hidden:i.navigation||u.account?!1:!u.navigation,role:"menu","data-showing":!i.navigation&&u.account?"account":"default",children:Xi.order.map(d=>O.jsx(Zo,{id:d,isLoggedIn:n,isDesktopVersion:i.navigation,menus:{navigation:u.navigation,account:u.account},callback:c},d))}),!i.search&&O.jsx("button",{className:"search toggle-search-button",onClick:d=>{d.preventDefault(),d.stopPropagation(),c("search",!u.search)},"aria-haspopup":"true","aria-expanded":u.search,"aria-controls":"search-form",children:O.jsx(Je,{children:e.formatMessage({id:`header_search_${u.search?"hide":"show"}`})})}),O.jsx(Eg,{id:"global-search",handleToggle:{searchIsOpen:u.search,isDesktopVersion:i.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),n?O.jsxs("button",{className:"account-button",onClick:d=>Ne.events.onClick(d,{id:"account",callback:c,isOpen:u.account}),onMouseEnter:()=>Ne.events.onMouseEnter({id:"account",callback:c}),onMouseLeave:()=>Ne.events.onBlur({id:"account",callback:c}),"aria-haspopup":"true","aria-expanded":u.account,"aria-controls":"navigation",children:[O.jsx(Je,{children:e.formatMessage({id:`header_account_${u.account?"hide":"show"}`})}),O.jsx(fa,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):O.jsx("ul",{className:"sign-in-buttons",children:Xi.buttons.order.map(d=>O.jsx(Zo,{id:`buttons.${d}`},d))})]}),O.jsx("hr",{id:"content-of-page"}),O.jsx("div",{className:ie("overlay",{open:u.navigation||u.account||!i.search&&u.search})})]})},kO=U.createContext(null),Js={didCatch:!1,error:null};class BO extends U.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Js}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var r,n,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:o,reason:"imperative-api"}),this.setState(Js)}}componentDidCatch(t,r){var n,i;(n=(i=this.props).onError)===null||n===void 0||n.call(i,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:i}=this.props;if(n&&r.error!==null&&FO(t.resetKeys,i)){var o,s;(o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Js)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:i}=this.props,{didCatch:o,error:s}=this.state;let a=t;if(o){const u={error:s,resetErrorBoundary:this.resetErrorBoundary};if(U.isValidElement(i))a=i;else if(typeof r=="function")a=r(u);else if(n)a=U.createElement(n,u);else throw s}return U.createElement(kO.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function FO(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}const DO=()=>{const e=Ee();return O.jsxs(O.Fragment,{children:[O.jsx(yc,{}),O.jsx("div",{className:"content",children:O.jsx(ng,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),O.jsx(dc,{})]})},UO=({children:e,reportError:t,showFooter:r=!0,background:n="default",className:i="",locale:o="en"})=>{const{pathname:s}=Ze.useLocation();U.useEffect(()=>{window.scrollTo(0,0)},[s]);const a=im(e,{locale:o});return O.jsx(BO,{onError:t,fallback:O.jsx(DO,{}),children:O.jsx(U.Suspense,{fallback:O.jsx(lg,{layout:"overview-page"}),children:O.jsx("div",{id:"wrapper",className:ie(i,{[n]:n!=="default"}),children:O.jsxs(iy,{children:[O.jsx(yc,{}),O.jsx("div",{className:"content",children:a}),r&&O.jsx(dc,{}),O.jsx(gg,{})]})})})})},Bd={default:"tags_",headerTopics:"header_topics_topics_"},Zs={topic:{Climate:"climate",CitiesAndLocalGovernment:"cities-and-local-government",DigitalAndData:"digital-and-data",Education:"education",EquityJusticeAndInclusion:"equity-justice-and-inclusion",HealthAndSocialCare:"health-and-social-care",Innovation:"innovation",LeadershipAndSkills:"leadership-and-skills",LifeInGovernment:"life-in-government",Policymaking:"policymaking",TransportAndInfrastructure:"transport-and-infrastructure",WorkAndTheEconomy:"work-and-the-economy"},"from the community":"community"},$O={getTagDetails:e=>{if(e.includes("topic_")){if(e=Zs.topic[e.replace("topic_","")],e){const t=Xi.topics.topics[e].href;return t?{id:e,href:t,text:`${Bd.headerTopics}${e}`}:null}return null}return Zs[e]?(e=Zs[e],{id:e,text:`${Bd.default}${e}`}):null}};const jO=({tags:e=[],color:t="default",forceOneLine:r=!1,canHaveLinks:n=!0,className:i="",gtmType:o="tag-click",gtmContext:s="tags"})=>{const a=Ee();if(!e||e.length<1)return null;const u=[];return e.forEach(f=>{if(!f)return;const c=$O.getTagDetails(f);c&&u.push(c)}),u.length<1?null:O.jsx("ul",{className:ie("tags text-small",t,i,{"one-line":r}),children:u.map(f=>{const c=a.formatMessage({id:f.text});return O.jsx("li",{children:f.href&&n?O.jsx(Ze.Link,{to:f.href,className:"gtm-trackable","data-gtm-event-type":o,"data-gtm-event-context":s,children:c}):c},f.id)})})};const HO=({members:{total:e,data:t=[]},pagination:r,gtmContext:n="member",gtmType:i="member-click",className:o=""})=>{const s=Ee();return t.length===0?null:(e||(e=t.length),O.jsxs("div",{className:ie("members-list",o),children:[O.jsxs("h1",{children:[s.formatMessage({id:"membersList"}),O.jsx("span",{className:"count",children:e})]}),O.jsx("ul",{children:t.map((a,u)=>O.jsxs("li",{children:[O.jsx(da,{member:a,gtmContext:n,gtmType:i}),a.isAdmin&&O.jsx(sg,{children:s.formatMessage({id:"membersList_admin"})})]},u))}),r&&O.jsx(pg,{...r,icon:{icon:"arrow-down",position:"right"},gtmContext:n})]}))},qO={showThread:!1,showForm:!1},vc=U.createContext(qO),GO=({children:e})=>{const[t,r]=U.useState({showThread:!1,showForm:!1});return O.jsx(vc.Provider,{value:{...t,updateConversation:r},children:e})};function ku(){return ku=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ku.apply(this,arguments)}function WO(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var VO=U.useLayoutEffect,zO=function(t){var r=Oe.useRef(t);return VO(function(){r.current=t}),r},Fd=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},YO=function(t,r){var n=U.useRef();return U.useCallback(function(i){t.current=i,n.current&&Fd(n.current,null),n.current=r,r&&Fd(r,i)},[r])},Dd={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},KO=function(t){Object.keys(Dd).forEach(function(r){t.style.setProperty(r,Dd[r],"important")})},Ud=KO,ot=null,$d=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function QO(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),ot||(ot=document.createElement("textarea"),ot.setAttribute("tabindex","-1"),ot.setAttribute("aria-hidden","true"),Ud(ot)),ot.parentNode===null&&document.body.appendChild(ot);var i=e.paddingSize,o=e.borderSize,s=e.sizingStyle,a=s.boxSizing;Object.keys(s).forEach(function(d){var l=d;ot.style[l]=s[l]}),Ud(ot),ot.value=t;var u=$d(ot,e);ot.value=t,u=$d(ot,e),ot.value="x";var f=ot.scrollHeight-i,c=f*r;a==="border-box"&&(c=c+i+o),u=Math.max(c,u);var h=f*n;return a==="border-box"&&(h=h+i+o),u=Math.min(h,u),[u,f]}var jd=function(){},XO=function(t,r){return t.reduce(function(n,i){return n[i]=r[i],n},{})},JO=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],ZO=!!document.documentElement.currentStyle,eA=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=XO(JO,r),i=n.boxSizing;if(i==="")return null;ZO&&i==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var o=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),s=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:o,borderSize:s}},tA=eA;function Ng(e,t,r){var n=zO(r);Oe.useLayoutEffect(function(){var i=function(s){return n.current(s)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var rA=function(t){Ng(window,"resize",t)},nA=function(t){Ng(document.fonts,"loadingdone",t)},iA=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],oA=function(t,r){var n=t.cacheMeasurements,i=t.maxRows,o=t.minRows,s=t.onChange,a=s===void 0?jd:s,u=t.onHeightChange,f=u===void 0?jd:u,c=WO(t,iA),h=c.value!==void 0,d=Oe.useRef(null),l=YO(d,r),p=Oe.useRef(0),m=Oe.useRef(),b=function(){var E=d.current,A=n&&m.current?m.current:tA(E);if(A){m.current=A;var w=QO(A,E.value||E.placeholder||"x",o,i),N=w[0],F=w[1];p.current!==N&&(p.current=N,E.style.setProperty("height",N+"px","important"),f(N,{rowHeight:F}))}},T=function(E){h||b(),a(E)};return Oe.useLayoutEffect(b),rA(b),nA(b),Oe.createElement("textarea",ku({},c,{onChange:T,ref:l}))},aA=Oe.forwardRef(oA);let Bo=null;const lt="discussion_form_",Pg=({content:e={type:"response",slugs:{}},userHasPermissions:t=!0,meta:r={isLoading:!1,isInWrapper:!1,isEditing:!1,showTitle:!1},inputRef:n,maxLength:i=5e4,minRows:o=4,forceShow:s={cancel:!1,error:!1},functions:a={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:u="DiscussionForm"})=>{var W,z;const f=Ee(),{pathname:c}=Ze.useLocation(),h=U.useContext($n),[d,l]=U.useState(r.isEditing&&r.isEditing.text||""),[p,m]=U.useState(s.error||!1),[b,T]=U.useState(!1),_=U.useRef(null);if(n||(n=_),r.isLoading)return O.jsx(br,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const E=$=>{const Y=$.target.value;l(Y);let te;!h||!h.id?te=Ft(f.formatMessage,`${lt}error_loggedOut`,e.type,"action"):t?Y.length>=i&&(te=`${lt}error_tooLong`):te=Ft(f.formatMessage,`${lt}error_noPermission`,e.type,"action"),te?m(te):p&&m(!1)};let A=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const $=e.type==="response"?((W=e.slugs)==null?void 0:W.question)||"":((z=e.slugs)==null?void 0:z.answer)||"";$&&(A=`${A}-${$.slice(-15)}`)}const w=async $=>{var Y;if($.preventDefault(),$.stopPropagation(),!(!h||!h.id||!t||F)){Bo&&clearTimeout(Bo),T("submitting");try{let te;switch(e.type){case"post":te=await a.create({content:d});break;case"question":te=await a.create({title:d,authorId:h&&h.id,...(Y=a.props)==null?void 0:Y.create});break;case"response":te=await a.create({question:e.slugs.question},{body:d,authorId:h&&h.id,contentPath:c});break;case"reply":te=await a.create({question:e.slugs.question,answer:e.slugs.answer},{body:d,authorId:h&&h.id,contentPath:c});break;default:break}await Aw(1e3),a.callback&&await a.callback(te),Bo=setTimeout(()=>{l(""),T("submitted"),N()},500)}catch(te){const K=te;let M=`${lt}error`;K.message.includes("entry already exists")&&(M=Ft(f.formatMessage,`${lt}error_alreadyExists`,e.type,"action")),K.message.includes("429")?M=Ft(f.formatMessage,`${lt}error_tooMany`,e.type,"action"):K.message.includes("400")&&(M=`${lt}error`),m(M),N()}}},N=()=>{Bo=setTimeout(()=>{m(!1),T(!1)},5e3)},F=!d||!Pw(d),B=b==="submitting",G=[];return(r.isEditing&&!B||s.cancel)&&G.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:a.handleCancel,className:"gtm-trackable","data-gtm-event-context":u,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!s.cancel&&(!h||!h.id||!d),children:f.formatMessage({id:`${lt}cancel`})}),G.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:$=>{if(r.isEditing){T("submitting"),a.handleSaveEdit&&a.handleSaveEdit(_.current&&"value"in _.current?_.current.value:"");return}w($)},className:"gtm-trackable","data-gtm-event-context":u,"data-gtm-event-type":`${r.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!h||!h.id||!t||F||B||r.isEditing&&d===r.isEditing.text,children:f.formatMessage({id:`${lt}${B?r.isEditing?"saving":"posting":r.isEditing?"save":"post"}`})}),O.jsxs("form",{id:A,className:ie("discussion-card discussion-form",{"no-styling":r.isInWrapper&&r.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[(r==null?void 0:r.showTitle)&&!r.isEditing&&["question"].includes(e.type)&&O.jsx("h2",{children:Ft(f.formatMessage,`${lt}title`,e.type,"action")}),O.jsx(da,{member:h||"community",gtmContext:u,gtmType:"profile-click"}),O.jsx(Je,{element:"label",showOnFocus:!1,htmlFor:`${A}-input`,children:Ft(f.formatMessage,`${lt}label`,e.type,"action")}),O.jsx(aA,{ref:n,id:`${A}-input`,name:e.type,placeholder:Ft(f.formatMessage,`${lt}placeholder`,e.type,"action"),onChange:E,value:d,maxLength:i,"aria-invalid":!!p,"aria-errormessage":"error-message",minRows:o,autoFocus:!!r.isEditing}),O.jsx("small",{children:Ft(f.formatMessage,`${lt}explainer`,e.type,"action",{a:$=>O.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",target:"_blank",className:"gtm-trackable","data-gtm-event-context":u,"data-gtm-event-type":"community-guidelines-link",children:$})})}),O.jsx(no,{buttons:G}),b==="submitted"&&O.jsx(Xo,{className:"success","data-testid":"success",children:Ft(f.formatMessage,`${lt}success`,e.type,"action")}),p&&O.jsx(Xo,{id:"error-message",className:"error","data-testid":"error",children:s.error?s.error:typeof p=="string"?p.includes(" ")?p:f.formatMessage({id:p},{action:f.formatMessage({id:`discussion_action_${e.type}`}),maxLength:i}):p})]})},sA=({question:e,answer:t,reply:r})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...r&&{replySlug:r}}),uA=(e,t=10)=>!e||e.length===0?[]:e.slice(0,t);let zi=!1;const eu=()=>{zi!==!1&&(clearTimeout(zi),zi=!1)},tu=10,Ig=({element:e="div",likes:t=0,peopleWhoLiked:r=!1,isShort:n=!0,userLiked:i=!1,content:o={type:"reply",slugs:{}},canLike:s=!0,functions:{createLike:a=()=>{},deleteLike:u=()=>{}}={}})=>{const f=Ee(),{pathname:c}=Ze.useLocation();U.useEffect(()=>{p(i)},[i]);const[h,d]=U.useState(t),[l,p]=U.useState(i),[m,b]=U.useState(!1),[T,_]=U.useState(!1),E=U.useMemo(()=>uA(r,tu),[r]),A=N=>{if(N.preventDefault(),N.stopPropagation(),_(!1),zi)return eu(),!1;if(eu(),m||!s)return!1;zi=setTimeout(w,350)},w=async()=>{if(eu(),m||!s)return!1;let N=l?h-1:h+1;N<0&&(N=0),b(!0),d(N),p(!l);try{if(o&&o.slugs){const F=sA(o.slugs);l?await u(F):await a(F,{contentPath:c})}}catch{d(t),p(i)}finally{b(!1)}};return U.createElement(e,{className:ie("likes-wrapper text-medium action-button",{"show-spinner":m,"is-liked":l,disabled:!s}),onClick:A,onMouseEnter:()=>{_(!0)},onMouseLeave:()=>{_(!1)},onFocus:()=>{_(!0)},onBlur:()=>{_(!1)},children:O.jsxs(O.Fragment,{children:[O.jsx(Ue,{variant:"tertiary",size:"medium",icon:{icon:l?"heart":"heart_empty",animate:"bounce"},className:ie({"do-animation":l&&!i}),screenreaderText:s?f.formatMessage({id:`discussion_likes_${l?"unlike":"like"}`},{action:f.formatMessage({id:`discussion_action_${o.type}`})}):!1,onClick:A,disabled:!s,"aria-hidden":!s,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${o.type}-click`}),O.jsx("span",{className:ie("number-of-likes",{"no-likes":h===0}),"data-testid":"number-of-likes",children:f.formatMessage({id:`discussion_likes${n?"_short":""}`},{number:h})}),r&&O.jsx(Bm,{isOpen:T,isLoading:r.length===0,children:r.length&&O.jsxs("ul",{children:[E.map(N=>typeof N=="string"||!N.name?null:O.jsx("li",{children:O.jsx(ua,{href:N.id?`/profiles/${N.id}`:void 0,gtmContext:"Likes",gtmType:"liked-name-click",children:N.name})},N.id||window.btoa(N.name))),r.length>tu&&O.jsx("li",{children:f.formatMessage({id:"discussion_likes_more"},{number:r.length-tu})})]})})]})})};var ea={exports:{}};ea.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=1,o=2,s=9007199254740991,a="[object Arguments]",u="[object Array]",f="[object AsyncFunction]",c="[object Boolean]",h="[object Date]",d="[object Error]",l="[object Function]",p="[object GeneratorFunction]",m="[object Map]",b="[object Number]",T="[object Null]",_="[object Object]",E="[object Promise]",A="[object Proxy]",w="[object RegExp]",N="[object Set]",F="[object String]",B="[object Symbol]",G="[object Undefined]",W="[object WeakMap]",z="[object ArrayBuffer]",$="[object DataView]",Y="[object Float32Array]",te="[object Float64Array]",K="[object Int8Array]",M="[object Int16Array]",V="[object Int32Array]",J="[object Uint8Array]",de="[object Uint8ClampedArray]",X="[object Uint16Array]",Z="[object Uint32Array]",re=/[\\^$.*+?()[\]{}|]/g,ue=/^\[object .+?Constructor\]$/,Fe=/^(?:0|[1-9]\d*)$/,Q={};Q[Y]=Q[te]=Q[K]=Q[M]=Q[V]=Q[J]=Q[de]=Q[X]=Q[Z]=!0,Q[a]=Q[u]=Q[z]=Q[c]=Q[$]=Q[h]=Q[d]=Q[l]=Q[m]=Q[b]=Q[_]=Q[w]=Q[N]=Q[F]=Q[W]=!1;var oe=typeof ce=="object"&&ce&&ce.Object===Object&&ce,Pe=typeof self=="object"&&self&&self.Object===Object&&self,Ae=oe||Pe||Function("return this")(),ut=t&&!t.nodeType&&t,ft=ut&&!0&&e&&!e.nodeType&&e,bt=ft&&ft.exports===ut,ne=bt&&oe.process,Ye=function(){try{return ne&&ne.binding&&ne.binding("util")}catch{}}(),je=Ye&&Ye.isTypedArray;function wt(y,x){for(var R=-1,H=y==null?0:y.length,fe=0,se=[];++R<H;){var pe=y[R];x(pe,R,y)&&(se[fe++]=pe)}return se}function Vt(y,x){for(var R=-1,H=x.length,fe=y.length;++R<H;)y[fe+R]=x[R];return y}function Nt(y,x){for(var R=-1,H=y==null?0:y.length;++R<H;)if(x(y[R],R,y))return!0;return!1}function gt(y,x){for(var R=-1,H=Array(y);++R<y;)H[R]=x(R);return H}function Tr(y){return function(x){return y(x)}}function St(y,x){return y.has(x)}function yt(y,x){return y==null?void 0:y[x]}function He(y){var x=-1,R=Array(y.size);return y.forEach(function(H,fe){R[++x]=[fe,H]}),R}function Tt(y,x){return function(R){return y(x(R))}}function it(y){var x=-1,R=Array(y.size);return y.forEach(function(H){R[++x]=H}),R}var Ke=Array.prototype,xr=Function.prototype,S=Object.prototype,g=Ae["__core-js_shared__"],v=xr.toString,C=S.hasOwnProperty,P=function(){var y=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),D=S.toString,q=RegExp("^"+v.call(C).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),le=bt?Ae.Buffer:void 0,we=Ae.Symbol,Se=Ae.Uint8Array,Te=S.propertyIsEnumerable,he=Ke.splice,dt=we?we.toStringTag:void 0,sr=Object.getOwnPropertySymbols,Or=le?le.isBuffer:void 0,zt=Tt(Object.keys,Object),Ar=Ot(Ae,"DataView"),Yt=Ot(Ae,"Map"),Cr=Ot(Ae,"Promise"),Rr=Ot(Ae,"Set"),Nr=Ot(Ae,"WeakMap"),Pt=Ot(Object,"create"),un=Qe(Ar),xt=Qe(Yt),Hn=Qe(Cr),qn=Qe(Rr),Gn=Qe(Nr),cn=we?we.prototype:void 0,Pr=cn?cn.valueOf:void 0;function De(y){var x=-1,R=y==null?0:y.length;for(this.clear();++x<R;){var H=y[x];this.set(H[0],H[1])}}function Ir(){this.__data__=Pt?Pt(null):{},this.size=0}function Lr(y){var x=this.has(y)&&delete this.__data__[y];return this.size-=x?1:0,x}function Kt(y){var x=this.__data__;if(Pt){var R=x[y];return R===n?void 0:R}return C.call(x,y)?x[y]:void 0}function ln(y){var x=this.__data__;return Pt?x[y]!==void 0:C.call(x,y)}function Wn(y,x){var R=this.__data__;return this.size+=this.has(y)?0:1,R[y]=Pt&&x===void 0?n:x,this}De.prototype.clear=Ir,De.prototype.delete=Lr,De.prototype.get=Kt,De.prototype.has=ln,De.prototype.set=Wn;function qe(y){var x=-1,R=y==null?0:y.length;for(this.clear();++x<R;){var H=y[x];this.set(H[0],H[1])}}function Vn(){this.__data__=[],this.size=0}function zn(y){var x=this.__data__,R=lr(x,y);if(R<0)return!1;var H=x.length-1;return R==H?x.pop():he.call(x,R,1),--this.size,!0}function Yn(y){var x=this.__data__,R=lr(x,y);return R<0?void 0:x[R][1]}function Kn(y){return lr(this.__data__,y)>-1}function Mr(y,x){var R=this.__data__,H=lr(R,y);return H<0?(++this.size,R.push([y,x])):R[H][1]=x,this}qe.prototype.clear=Vn,qe.prototype.delete=zn,qe.prototype.get=Yn,qe.prototype.has=Kn,qe.prototype.set=Mr;function tt(y){var x=-1,R=y==null?0:y.length;for(this.clear();++x<R;){var H=y[x];this.set(H[0],H[1])}}function Qn(){this.size=0,this.__data__={hash:new De,map:new(Yt||qe),string:new De}}function Xn(y){var x=ht(this,y).delete(y);return this.size-=x?1:0,x}function Jn(y){return ht(this,y).get(y)}function Zn(y){return ht(this,y).has(y)}function ei(y,x){var R=ht(this,y),H=R.size;return R.set(y,x),this.size+=R.size==H?0:1,this}tt.prototype.clear=Qn,tt.prototype.delete=Xn,tt.prototype.get=Jn,tt.prototype.has=Zn,tt.prototype.set=ei;function ur(y){var x=-1,R=y==null?0:y.length;for(this.__data__=new tt;++x<R;)this.add(y[x])}function fn(y){return this.__data__.set(y,n),this}function cr(y){return this.__data__.has(y)}ur.prototype.add=ur.prototype.push=fn,ur.prototype.has=cr;function ct(y){var x=this.__data__=new qe(y);this.size=x.size}function kr(){this.__data__=new qe,this.size=0}function ti(y){var x=this.__data__,R=x.delete(y);return this.size=x.size,R}function ri(y){return this.__data__.get(y)}function ni(y){return this.__data__.has(y)}function ii(y,x){var R=this.__data__;if(R instanceof qe){var H=R.__data__;if(!Yt||H.length<r-1)return H.push([y,x]),this.size=++R.size,this;R=this.__data__=new tt(H)}return R.set(y,x),this.size=R.size,this}ct.prototype.clear=kr,ct.prototype.delete=ti,ct.prototype.get=ri,ct.prototype.has=ni,ct.prototype.set=ii;function oi(y,x){var R=fr(y),H=!R&&yn(y),fe=!R&&!H&&hr(y),se=!R&&!H&&!fe&&$r(y),pe=R||H||fe||se,me=pe?gt(y.length,String):[],Me=me.length;for(var be in y)(x||C.call(y,be))&&!(pe&&(be=="length"||fe&&(be=="offset"||be=="parent")||se&&(be=="buffer"||be=="byteLength"||be=="byteOffset")||It(be,Me)))&&me.push(be);return me}function lr(y,x){for(var R=y.length;R--;)if(gn(y[R][0],x))return R;return-1}function Br(y,x,R){var H=x(y);return fr(y)?H:Vt(H,R(y))}function Qt(y){return y==null?y===void 0?G:T:dt&&dt in Object(y)?At(y):mn(y)}function dn(y){return vt(y)&&Qt(y)==a}function hn(y,x,R,H,fe){return y===x?!0:y==null||x==null||!vt(y)&&!vt(x)?y!==y&&x!==x:pn(y,x,R,H,hn,fe)}function pn(y,x,R,H,fe,se){var pe=fr(y),me=fr(x),Me=pe?u:pt(y),be=me?u:pt(x);Me=Me==a?_:Me,be=be==a?_:be;var Ge=Me==_,Xe=be==_,Be=Me==be;if(Be&&hr(y)){if(!hr(x))return!1;pe=!0,Ge=!1}if(Be&&!Ge)return se||(se=new ct),pe||$r(y)?Fr(y,x,R,H,fe,se):ci(y,x,Me,R,H,fe,se);if(!(R&i)){var We=Ge&&C.call(y,"__wrapped__"),$e=Xe&&C.call(x,"__wrapped__");if(We||$e){var Lt=We?y.value():y,Ct=$e?x.value():x;return se||(se=new ct),fe(Lt,Ct,R,H,se)}}return Be?(se||(se=new ct),Dr(y,x,R,H,fe,se)):!1}function ai(y){if(!_n(y)||di(y))return!1;var x=vn(y)?q:ue;return x.test(Qe(y))}function si(y){return vt(y)&&Ur(y.length)&&!!Q[Qt(y)]}function ui(y){if(!hi(y))return zt(y);var x=[];for(var R in Object(y))C.call(y,R)&&R!="constructor"&&x.push(R);return x}function Fr(y,x,R,H,fe,se){var pe=R&i,me=y.length,Me=x.length;if(me!=Me&&!(pe&&Me>me))return!1;var be=se.get(y);if(be&&se.get(x))return be==x;var Ge=-1,Xe=!0,Be=R&o?new ur:void 0;for(se.set(y,x),se.set(x,y);++Ge<me;){var We=y[Ge],$e=x[Ge];if(H)var Lt=pe?H($e,We,Ge,x,y,se):H(We,$e,Ge,y,x,se);if(Lt!==void 0){if(Lt)continue;Xe=!1;break}if(Be){if(!Nt(x,function(Ct,Jt){if(!St(Be,Jt)&&(We===Ct||fe(We,Ct,R,H,se)))return Be.push(Jt)})){Xe=!1;break}}else if(!(We===$e||fe(We,$e,R,H,se))){Xe=!1;break}}return se.delete(y),se.delete(x),Xe}function ci(y,x,R,H,fe,se,pe){switch(R){case $:if(y.byteLength!=x.byteLength||y.byteOffset!=x.byteOffset)return!1;y=y.buffer,x=x.buffer;case z:return!(y.byteLength!=x.byteLength||!se(new Se(y),new Se(x)));case c:case h:case b:return gn(+y,+x);case d:return y.name==x.name&&y.message==x.message;case w:case F:return y==x+"";case m:var me=He;case N:var Me=H&i;if(me||(me=it),y.size!=x.size&&!Me)return!1;var be=pe.get(y);if(be)return be==x;H|=o,pe.set(y,x);var Ge=Fr(me(y),me(x),H,fe,se,pe);return pe.delete(y),Ge;case B:if(Pr)return Pr.call(y)==Pr.call(x)}return!1}function Dr(y,x,R,H,fe,se){var pe=R&i,me=Xt(y),Me=me.length,be=Xt(x),Ge=be.length;if(Me!=Ge&&!pe)return!1;for(var Xe=Me;Xe--;){var Be=me[Xe];if(!(pe?Be in x:C.call(x,Be)))return!1}var We=se.get(y);if(We&&se.get(x))return We==x;var $e=!0;se.set(y,x),se.set(x,y);for(var Lt=pe;++Xe<Me;){Be=me[Xe];var Ct=y[Be],Jt=x[Be];if(H)var ao=pe?H(Jt,Ct,Be,x,y,se):H(Ct,Jt,Be,y,x,se);if(!(ao===void 0?Ct===Jt||fe(Ct,Jt,R,H,se):ao)){$e=!1;break}Lt||(Lt=Be=="constructor")}if($e&&!Lt){var Mt=y.constructor,pr=x.constructor;Mt!=pr&&"constructor"in y&&"constructor"in x&&!(typeof Mt=="function"&&Mt instanceof Mt&&typeof pr=="function"&&pr instanceof pr)&&($e=!1)}return se.delete(y),se.delete(x),$e}function Xt(y){return Br(y,En,li)}function ht(y,x){var R=y.__data__;return fi(x)?R[typeof x=="string"?"string":"hash"]:R.map}function Ot(y,x){var R=yt(y,x);return ai(R)?R:void 0}function At(y){var x=C.call(y,dt),R=y[dt];try{y[dt]=void 0;var H=!0}catch{}var fe=D.call(y);return H&&(x?y[dt]=R:delete y[dt]),fe}var li=sr?function(y){return y==null?[]:(y=Object(y),wt(sr(y),function(x){return Te.call(y,x)}))}:bn,pt=Qt;(Ar&&pt(new Ar(new ArrayBuffer(1)))!=$||Yt&&pt(new Yt)!=m||Cr&&pt(Cr.resolve())!=E||Rr&&pt(new Rr)!=N||Nr&&pt(new Nr)!=W)&&(pt=function(y){var x=Qt(y),R=x==_?y.constructor:void 0,H=R?Qe(R):"";if(H)switch(H){case un:return $;case xt:return m;case Hn:return E;case qn:return N;case Gn:return W}return x});function It(y,x){return x=x??s,!!x&&(typeof y=="number"||Fe.test(y))&&y>-1&&y%1==0&&y<x}function fi(y){var x=typeof y;return x=="string"||x=="number"||x=="symbol"||x=="boolean"?y!=="__proto__":y===null}function di(y){return!!P&&P in y}function hi(y){var x=y&&y.constructor,R=typeof x=="function"&&x.prototype||S;return y===R}function mn(y){return D.call(y)}function Qe(y){if(y!=null){try{return v.call(y)}catch{}try{return y+""}catch{}}return""}function gn(y,x){return y===x||y!==y&&x!==x}var yn=dn(function(){return arguments}())?dn:function(y){return vt(y)&&C.call(y,"callee")&&!Te.call(y,"callee")},fr=Array.isArray;function dr(y){return y!=null&&Ur(y.length)&&!vn(y)}var hr=Or||mi;function pi(y,x){return hn(y,x)}function vn(y){if(!_n(y))return!1;var x=Qt(y);return x==l||x==p||x==f||x==A}function Ur(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=s}function _n(y){var x=typeof y;return y!=null&&(x=="object"||x=="function")}function vt(y){return y!=null&&typeof y=="object"}var $r=je?Tr(je):si;function En(y){return dr(y)?oi(y):ui(y)}function bn(){return[]}function mi(){return!1}e.exports=pi})(ea,ea.exports);var cA=ea.exports;const lA=qt(cA);const Lg=({element:e="section",children:t,className:r,...n})=>U.createElement(e,{className:ie("modal",r),children:typeof t=="string"?O.jsx("p",{children:t}):t,...n});const Mg=({id:e="content-overlay",isOpen:t=!1,maxWidth:r,functions:{onOpen:n=()=>{},onClose:i=()=>{}}={},forceShow:{error:o=!1}={},title:s,children:a,buttons:u,className:f="",gtmContext:c="Modal"})=>{const h=Ee(),[d,l]=U.useState(t),p=b=>{l(b),b?(n(),document.body.classList.add("has-overlay")):(i(),document.body.classList.remove("has-overlay"))};U.useEffect(()=>{p(t)},[t]);const m=r?{"--max-width":`${r/16}rem`}:{};return O.jsx("div",{className:ie("overlay",{open:d}),children:O.jsx(Lg,{id:e,className:ie("overlay-modal",f,{"has-max-width":r}),hidden:!d,style:m,children:t&&O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"top",children:[O.jsx("h2",{children:s}),O.jsx(Ue,{variant:"tertiary",size:"medium",icon:{icon:"close"},onClick:()=>p(!1),className:"gtm-trackable","data-gtm-event-type":"close-modal-click","data-gtm-event-context":c,screenreaderText:h.formatMessage({id:"overlay_button"})})]}),O.jsx(Ko,{}),a,u&&O.jsxs("div",{className:"bottom",children:[O.jsx(Ko,{}),O.jsx(no,{buttons:u})]}),o&&O.jsx(Xo,{className:"error",children:o})]})})})},kg=(e,t)=>({"aria-haspopup":!0,"aria-expanded":t,"aria-controls":e}),Hd=e=>{const t={};return Object.keys(e).forEach(r=>{t[`${r}Slug`]=e[r]}),t};const nr="discussion_",fA=({element:e="div",content:t,userHasPermissions:r=!0,isLoading:n=!1,originalAuthorId:i,functions:{content:{createContent:o,deleteContent:s,updateContent:a}={createContent:()=>{},deleteContent:()=>{},updateContent:()=>{}},likes:{createLike:u,deleteLike:f}={createLike:()=>{},deleteLike:()=>{}},comments:{openComments:c}={openComments:()=>{}}},links:h={},className:d,gtmContext:l="DiscussionAnswer",children:p})=>{const m=Ee(),b=Ze.useNavigate(),T=U.useContext($n),_=U.useContext(vc),[E,A]=U.useState({body:t&&t.body||"",isEditing:!1,didEdit:t&&t.isEdited||!1}),[w,N]=U.useState(!1),[F,B]=U.useState("");if(U.useEffect(()=>{A({...E,body:t&&t.body||"",didEdit:t&&t.isEdited||!1})},[t.isEdited]),n||!t||t.type==="answer"&&(!t.slugs||!t.slugs.question))return O.jsx(br,{className:"discussion-card discussion-post"});const{author:G,canLike:W,createdAt:z,id:$,likes:Y=0,userLiked:te,comments:K=0}=t,M=T&&T.id&&typeof G!="string"&&G.id&&G.id===T.id||!1,V=typeof W=="boolean"?W:r?!M:!1,J=async re=>{re||(re=""),B("");try{if(!lA(re,E.body)){const ue=t.type==="question"?{title:re}:{body:re};await a(Hd(t.slugs),ue)}A({body:re,isEditing:!1,didEdit:!0})}catch{B(`${nr}form_error`)}},de=()=>{_&&_.updateConversation&&_.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const ue=`reply-form-${(t.type==="answer"?t.slug:t.slugs.answer||"").toLowerCase().slice(-15)}`,Fe=document.getElementById(ue),Q=document.getElementById(`${ue}-input`);Q&&Q.focus(),Fe&&Fe.scrollIntoView({behavior:"smooth"})},0)},X=()=>{try{s(Hd(t.slugs))}catch{B("delete-error")}},Z=[{text:m.formatMessage({id:`${nr}moreMenu_report`}),href:`mailto:community@apolitical.co?subject=${encodeURI(m.formatMessage({id:`${nr}report_subject`}))}&body=${encodeURI(m.formatMessage({id:`${nr}report_body`},{contentType:t.type||"",contentSlug:t.slug||"",contentUrl:`${window.origin}${typeof process<"u"&&process.env.PUBLIC_URL||""}/${t.slugs.question||""}`}))}`,icon:"flag"}];return r&&M&&Z.push({text:m.formatMessage({id:`${nr}moreMenu_edit`}),onClick:()=>A({...E,isEditing:!0}),icon:"pencil-paper",className:"gtm-trackable","data-gtm-event-context":l,"data-gtm-event-type":`edit-${t.type}-click`},{text:m.formatMessage({id:`${nr}moreMenu_delete`}),onClick:re=>{re.preventDefault(),re.stopPropagation(),N(!0)},icon:"trash",className:"gtm-trackable","data-gtm-event-context":l,"data-gtm-event-type":`delete-${t.type}-click`,...kg(`delete-${t.slug}-modal`,w)}),U.createElement(e,{className:ie("discussion-post",d),"data-testid":`discussion-${t.type}-thread`,children:O.jsxs(O.Fragment,{children:[O.jsxs("div",{id:$||t.slug,className:ie("discussion-card",t.type,{editing:E.isEditing,"has-link":h.post&&!E.isEditing}),onClick:re=>{!h.post||E.isEditing||(re.preventDefault(),re.stopPropagation(),b(h.post))},children:[!E.isEditing&&O.jsx(da,{member:G,additionalContent:{createdAt:z,didEdit:E.didEdit},className:typeof G!="string"&&G.id===i?"highlighted":"",gtmContext:l,gtmType:"profile-click"}),E.isEditing?O.jsx(Pg,{content:{type:t.type,slugs:t.slugs},userHasPermissions:r,meta:{isLoading:n,isInWrapper:!0,isEditing:{text:E.body}},maxLength:t.type==="question"?250:5e4,forceShow:{error:F!==""&&F!=="delete-error"?m.formatMessage({id:F},{action:m.formatMessage({id:`discussion_action_${t.type}`})}):!1},functions:{create:o,handleSaveEdit:J,handleCancel:()=>{B(""),A({...E,isEditing:!1})}},gtmContext:`${l}Form`}):h.post?O.jsx(Ze.Link,{to:h.post,className:"gtm-trackable","data-gtm-event-context":l,"data-gtm-event-type":"title-click",children:O.jsx(Lu,{options:{overrides:{a:ag}},children:E.body})}):O.jsx(Lu,{options:{wrapper:t.type==="question"?"h1":U.Fragment,forceWrapper:t.type==="question",forceInline:t.type==="question",forceBlock:t.type!=="question"},children:E.body}),!E.isEditing&&O.jsxs("ul",{className:ie("actions text-medium",t.type),"data-testid":`${t.type}-actions`,children:[O.jsx(Ig,{element:"li",likes:Y,isShort:!1,userLiked:te,content:{type:t.type,slugs:t.slugs},canLike:V,functions:{createLike:u,deleteLike:f}}),["question","post"].includes(t.type)||h.comments||typeof c=="function"&&O.jsxs("li",{className:"action-button",onClick:re=>{re.preventDefault(),re.stopPropagation(),h.comments&&b(h.comments),typeof c=="function"&&c()},children:[O.jsx(Ue,{variant:"tertiary",size:"medium",styling:{muted:!0},icon:{icon:"speech-bubble_square_thick"},href:h.comments?h.comments:!1,onClick:h.comments||typeof c!="function"?!1:c,className:"gtm-trackable","data-gtm-event-context":l,"data-gtm-event-type":`answer-${t.type}-click`,screenreaderText:m.formatMessage({id:`${nr}comments_screenReader`},{count:K})}),O.jsx("span",{children:m.formatMessage({id:`${nr}comments`},{count:K})})]}),(t.type==="answer"||t.type==="reply")&&O.jsx("li",{children:O.jsx(Ue,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:de,children:m.formatMessage({id:`${nr}reply`})})}),O.jsx(mg,{element:"li",id:`more-${t.slug}`,options:Z})]})]}),p,O.jsx(Mg,{id:`delete-${t.slug}-modal`,isOpen:w,functions:{onOpen:()=>{},onClose:()=>N(!1)},forceShow:{error:F==="delete-error"?m.formatMessage({id:"discussion_delete_error"},{action:m.formatMessage({id:`discussion_action_${t.type}`})}):!1},title:m.formatMessage({id:"discussion_delete_title"},{action:m.formatMessage({id:`discussion_action_${t.type}`})}),buttons:[{variant:"secondary",onClick:()=>N(!1),children:m.formatMessage({id:"discussion_delete_cancel"})},{variant:"primary",className:"destructive",onClick:X,children:m.formatMessage({id:"discussion_delete_delete"})}],gtmContext:`${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,children:O.jsx(_r,{id:"discussion_delete_text",values:{p:re=>O.jsx("p",{children:re}),action:m.formatMessage({id:`discussion_action_${t.type}`})}})})]})})};const ru="discussion_responses_",dA=({type:e="answer",responses:t=0})=>{const r=Ee();return O.jsxs("div",{className:"responses-heading",children:[O.jsx("h3",{children:r.formatMessage({id:`${ru}title`},{action:r.formatMessage({id:`${ru}${e}`}),count:t})}),t===0&&O.jsx("p",{children:Ft(r.formatMessage,`${ru}empty`,e,e)})]})};const hA=({isOpen:e=!1,count:t=0,children:r})=>{const n=Ee(),i=U.useRef(null),[o,s]=U.useState(e),[a,u]=U.useState("closed");U.useEffect(()=>{const d=i.current;if(d)return d.addEventListener("transitionend",f),()=>{d.removeEventListener("transitionend",f)}},[]),Zr(()=>{a==="closed"&&!o||u(["opening","open"].includes(a)?"ready-to-close":"opening")},[o]),U.useEffect(()=>{a==="ready-to-close"&&u("closing")},[a]);const f=({propertyName:d})=>{d==="max-height"&&u(l=>l==="opening"?"open":l==="closing"?"closed":l)},c=["opening","open"].includes(a),h=im(r,{element:"li"});return O.jsxs("div",{className:"thread-wrapper",children:[O.jsx(Ue,{variant:"secondary",size:"small",styling:{muted:!0},icon:{icon:`arrow_corner-down_${c?"left":"right"}`},onClick:()=>{s(!o)},children:n.formatMessage({id:`discussion_thread_${c?"hide":"show"}`},{count:t})}),O.jsx("ul",{ref:i,className:ie("thread",a),hidden:!o,children:h})]})},pA=({id:e,data:{jobTitle:t,name:r,organization:n,thumbnail:i}})=>({id:e,name:r,jobTitle:t,organization:n,image:{thumbnail:i}});exports.ASSETS_BUCKET=Qo;exports.BannerSection=oT;exports.Breadcrumbs=Cx;exports.Button=Ue;exports.ButtonWrapper=no;exports.CollapsibleSection=sc;exports.Columns=Px;exports.CommunityDetails=Ax;exports.Contributors=dg;exports.ConversationContext=vc;exports.CookieBanner=gg;exports.DiscussionConversation=GO;exports.DiscussionForm=Pg;exports.DiscussionLikes=Ig;exports.DiscussionPost=fA;exports.DiscussionThread=hA;exports.Divider=Ko;exports.DownloadSection=tT;exports.EmailHelperTextBox=Ix;exports.EmptyStateBox=ng;exports.Filters=Rx;exports.Footer=dc;exports.FullWidthSection=oc;exports.Header=yc;exports.HelperTextBox=og;exports.HiddenFromScreenReaders=Bu;exports.HideShowTextBox=dx;exports.HighlightedTextBox=ar;exports.IntlProvider=xx;exports.JoinButton=hg;exports.Link=ua;exports.LoadMore=pg;exports.LoadingBlock=wx;exports.LoadingPlaceholder=br;exports.LoadingState=lg;exports.Logo=fc;exports.LogoSection=rT;exports.MarkdownText=Lu;exports.MarketingBox=aT;exports.Member=da;exports.MembersList=HO;exports.Modal=Lg;exports.MoreMenu=mg;exports.NUMBER_OF_USERS=uT;exports.Overlay=Mg;exports.PageLayout=UO;exports.PasswordRules=kx;exports.Pill=sg;exports.ProfilePicture=fa;exports.ProgressBar=ug;exports.Rating=Bx;exports.ResponsesHeading=dA;exports.ResponsiveImage=om;exports.SearchForm=Eg;exports.Span=ag;exports.StatusBanner=Xo;exports.Tags=jO;exports.Tooltip=Bm;exports.UserContext=$n;exports.UserProvider=Ox;exports.VisuallyHidden=Je;exports.addAriaProps=kg;exports.getMember=lc;exports.headerData=Xi;exports.mapGetStreamData=pA;exports.useEffectAfterMount=Zr;exports.useFeatureFlag=vb;exports.useScreenWidth=ro;exports.useScrollListener=zp;exports.useScrollToHash=Eb;