@apolitical/component-library 1.12.2 → 1.13.0-beta.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.
- package/context/flags/flags.provider.d.ts +8 -0
- package/context/flags/index.d.ts +1 -0
- package/context/index.d.ts +1 -0
- package/hooks/index.d.ts +0 -1
- package/index.js +14 -51
- package/index.mjs +2414 -13299
- package/package.json +2 -2
- package/hooks/use-feature-flag.d.ts +0 -5
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react"),fs=require("lodash.clonedeep"),ps=require("lodash.set"),M=require("react-intl"),jt=require("truncate"),qe=require("markdown-to-jsx"),X=require("@tanstack/react-query"),hs=require("@tanstack/react-query-devtools"),ze=require("posthog-js"),ln=require("react-cookie"),gs=require("react-multi-email"),cn=require("lodash.get"),_s=require("react-error-boundary"),xs=require("react-textarea-autosize"),vs=require("lodash.isequal");function bs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var un={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],
|
|
5
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var l=arguments[o];if(l){var d=typeof l;if(d==="string"||d==="number")r.push(l);else if(Array.isArray(l)){if(l.length){var a=n.apply(null,l);a&&r.push(a)}}else if(d==="object"){if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]")){r.push(l.toString());continue}for(var i in l)t.call(l,i)&&l[i]&&r.push(i)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(un);var ws=un.exports;const S=bs(ws),ys=({element:e="span",showOnFocus:t=!0,children:n,...r})=>h.createElement(e,{...r,className:S("hidden",{"show-on-focus":t}),children:n}),K=h.memo(ys),ks=({element:e="span",children:t=null,...n})=>h.createElement(e,{...n,"aria-hidden":!0},t),St=h.memo(ks);var bt={exports:{}},Se={};/**
|
|
6
6
|
* @license React
|
|
7
7
|
* react-jsx-runtime.production.min.js
|
|
8
8
|
*
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* This source code is licensed under the MIT license found in the
|
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
*/var
|
|
13
|
+
*/var Zt;function js(){if(Zt)return Se;Zt=1;var e=h,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function d(a,i,c){var u,f={},p=null,g=null;c!==void 0&&(p=""+c),i.key!==void 0&&(p=""+i.key),i.ref!==void 0&&(g=i.ref);for(u in i)r.call(i,u)&&!l.hasOwnProperty(u)&&(f[u]=i[u]);if(a&&a.defaultProps)for(u in i=a.defaultProps,i)f[u]===void 0&&(f[u]=i[u]);return{$$typeof:t,type:a,key:p,ref:g,props:f,_owner:o.current}}return Se.Fragment=n,Se.jsx=d,Se.jsxs=d,Se}var Ee={};/**
|
|
14
14
|
* @license React
|
|
15
15
|
* react-jsx-runtime.development.js
|
|
16
16
|
*
|
|
@@ -18,57 +18,20 @@
|
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the MIT license found in the
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/var
|
|
22
|
-
`+
|
|
23
|
-
`),
|
|
24
|
-
`),
|
|
25
|
-
`+
|
|
21
|
+
*/var Kt;function Ss(){return Kt||(Kt=1,process.env.NODE_ENV!=="production"&&function(){var e=h,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),d=Symbol.for("react.provider"),a=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),x=Symbol.iterator,b="@@iterator";function _(m){if(m===null||typeof m!="object")return null;var w=x&&m[x]||m[b];return typeof w=="function"?w:null}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(m){{for(var w=arguments.length,j=new Array(w>1?w-1:0),T=1;T<w;T++)j[T-1]=arguments[T];$("error",m,j)}}function $(m,w,j){{var T=E.ReactDebugCurrentFrame,I=T.getStackAddendum();I!==""&&(w+="%s",j=j.concat([I]));var L=j.map(function(F){return String(F)});L.unshift("Warning: "+w),Function.prototype.apply.call(console[m],console,L)}}var C=!1,A=!1,H=!1,V=!1,y=!1,P;P=Symbol.for("react.module.reference");function q(m){return!!(typeof m=="string"||typeof m=="function"||m===r||m===l||y||m===o||m===c||m===u||V||m===g||C||A||H||typeof m=="object"&&m!==null&&(m.$$typeof===p||m.$$typeof===f||m.$$typeof===d||m.$$typeof===a||m.$$typeof===i||m.$$typeof===P||m.getModuleId!==void 0))}function k(m,w,j){var T=m.displayName;if(T)return T;var I=w.displayName||w.name||"";return I!==""?j+"("+I+")":j}function z(m){return m.displayName||"Context"}function R(m){if(m==null)return null;if(typeof m.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case r:return"Fragment";case n:return"Portal";case l:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof m=="object")switch(m.$$typeof){case a:var w=m;return z(w)+".Consumer";case d:var j=m;return z(j._context)+".Provider";case i:return k(m,m.render,"ForwardRef");case f:var T=m.displayName||null;return T!==null?T:R(m.type)||"Memo";case p:{var I=m,L=I._payload,F=I._init;try{return R(F(L))}catch{return null}}}return null}var B=Object.assign,U=0,Y,Z,re,oe,ne,D,W;function ee(){}ee.__reactDisabledLog=!0;function ae(){{if(U===0){Y=console.log,Z=console.info,re=console.warn,oe=console.error,ne=console.group,D=console.groupCollapsed,W=console.groupEnd;var m={configurable:!0,enumerable:!0,value:ee,writable:!0};Object.defineProperties(console,{info:m,log:m,warn:m,error:m,group:m,groupCollapsed:m,groupEnd:m})}U++}}function ge(){{if(U--,U===0){var m={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},m,{value:Y}),info:B({},m,{value:Z}),warn:B({},m,{value:re}),error:B({},m,{value:oe}),group:B({},m,{value:ne}),groupCollapsed:B({},m,{value:D}),groupEnd:B({},m,{value:W})})}U<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ue=E.ReactCurrentDispatcher,ke;function Pe(m,w,j){{if(ke===void 0)try{throw Error()}catch(I){var T=I.stack.trim().match(/\n( *(at )?)/);ke=T&&T[1]||""}return`
|
|
22
|
+
`+ke+m}}var et=!1,Re;{var Wn=typeof WeakMap=="function"?WeakMap:Map;Re=new Wn}function Bt(m,w){if(!m||et)return"";{var j=Re.get(m);if(j!==void 0)return j}var T;et=!0;var I=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var L;L=ue.current,ue.current=null,ae();try{if(w){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(de){T=de}Reflect.construct(m,[],F)}else{try{F.call()}catch(de){T=de}m.call(F.prototype)}}else{try{throw Error()}catch(de){T=de}m()}}catch(de){if(de&&T&&typeof de.stack=="string"){for(var N=de.stack.split(`
|
|
23
|
+
`),te=T.stack.split(`
|
|
24
|
+
`),G=N.length-1,J=te.length-1;G>=1&&J>=0&&N[G]!==te[J];)J--;for(;G>=1&&J>=0;G--,J--)if(N[G]!==te[J]){if(G!==1||J!==1)do if(G--,J--,J<0||N[G]!==te[J]){var ie=`
|
|
25
|
+
`+N[G].replace(" at new "," at ");return m.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",m.displayName)),typeof m=="function"&&Re.set(m,ie),ie}while(G>=1&&J>=0);break}}}finally{et=!1,ue.current=L,ge(),Error.prepareStackTrace=I}var ve=m?m.displayName||m.name:"",Xt=ve?Pe(ve):"";return typeof m=="function"&&Re.set(m,Xt),Xt}function zn(m,w,j){return Bt(m,!1)}function Vn(m){var w=m.prototype;return!!(w&&w.isReactComponent)}function De(m,w,j){if(m==null)return"";if(typeof m=="function")return Bt(m,Vn(m));if(typeof m=="string")return Pe(m);switch(m){case c:return Pe("Suspense");case u:return Pe("SuspenseList")}if(typeof m=="object")switch(m.$$typeof){case i:return zn(m.render);case f:return De(m.type,w,j);case p:{var T=m,I=T._payload,L=T._init;try{return De(L(I),w,j)}catch{}}}return""}var Ie=Object.prototype.hasOwnProperty,Ot={},Lt=E.ReactDebugCurrentFrame;function Be(m){if(m){var w=m._owner,j=De(m.type,m._source,w?w.type:null);Lt.setExtraStackFrame(j)}else Lt.setExtraStackFrame(null)}function Yn(m,w,j,T,I){{var L=Function.call.bind(Ie);for(var F in m)if(L(m,F)){var N=void 0;try{if(typeof m[F]!="function"){var te=Error((T||"React class")+": "+j+" type `"+F+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof m[F]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw te.name="Invariant Violation",te}N=m[F](w,F,T,j,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(G){N=G}N&&!(N instanceof Error)&&(Be(I),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",T||"React class",j,F,typeof N),Be(null)),N instanceof Error&&!(N.message in Ot)&&(Ot[N.message]=!0,Be(I),v("Failed %s type: %s",j,N.message),Be(null))}}}var Gn=Array.isArray;function tt(m){return Gn(m)}function Jn(m){{var w=typeof Symbol=="function"&&Symbol.toStringTag,j=w&&m[Symbol.toStringTag]||m.constructor.name||"Object";return j}}function qn(m){try{return Ht(m),!1}catch{return!0}}function Ht(m){return""+m}function Qt(m){if(qn(m))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Jn(m)),Ht(m)}var je=E.ReactCurrentOwner,Xn={key:!0,ref:!0,__self:!0,__source:!0},Ut,Wt,nt;nt={};function Zn(m){if(Ie.call(m,"ref")){var w=Object.getOwnPropertyDescriptor(m,"ref").get;if(w&&w.isReactWarning)return!1}return m.ref!==void 0}function Kn(m){if(Ie.call(m,"key")){var w=Object.getOwnPropertyDescriptor(m,"key").get;if(w&&w.isReactWarning)return!1}return m.key!==void 0}function es(m,w){if(typeof m.ref=="string"&&je.current&&w&&je.current.stateNode!==w){var j=R(je.current.type);nt[j]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R(je.current.type),m.ref),nt[j]=!0)}}function ts(m,w){{var j=function(){Ut||(Ut=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",w))};j.isReactWarning=!0,Object.defineProperty(m,"key",{get:j,configurable:!0})}}function ns(m,w){{var j=function(){Wt||(Wt=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",w))};j.isReactWarning=!0,Object.defineProperty(m,"ref",{get:j,configurable:!0})}}var ss=function(m,w,j,T,I,L,F){var N={$$typeof:t,type:m,key:w,ref:j,props:F,_owner:L};return N._store={},Object.defineProperty(N._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(N,"_self",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.defineProperty(N,"_source",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N};function rs(m,w,j,T,I){{var L,F={},N=null,te=null;j!==void 0&&(Qt(j),N=""+j),Kn(w)&&(Qt(w.key),N=""+w.key),Zn(w)&&(te=w.ref,es(w,I));for(L in w)Ie.call(w,L)&&!Xn.hasOwnProperty(L)&&(F[L]=w[L]);if(m&&m.defaultProps){var G=m.defaultProps;for(L in G)F[L]===void 0&&(F[L]=G[L])}if(N||te){var J=typeof m=="function"?m.displayName||m.name||"Unknown":m;N&&ts(F,J),te&&ns(F,J)}return ss(m,N,te,I,T,je.current,F)}}var st=E.ReactCurrentOwner,zt=E.ReactDebugCurrentFrame;function xe(m){if(m){var w=m._owner,j=De(m.type,m._source,w?w.type:null);zt.setExtraStackFrame(j)}else zt.setExtraStackFrame(null)}var rt;rt=!1;function ot(m){return typeof m=="object"&&m!==null&&m.$$typeof===t}function Vt(){{if(st.current){var m=R(st.current.type);if(m)return`
|
|
26
26
|
|
|
27
|
-
Check the render method of \``+
|
|
27
|
+
Check the render method of \``+m+"`."}return""}}function os(m){{if(m!==void 0){var w=m.fileName.replace(/^.*[\\\/]/,""),j=m.lineNumber;return`
|
|
28
28
|
|
|
29
|
-
Check your code at `+
|
|
29
|
+
Check your code at `+w+":"+j+"."}return""}}var Yt={};function as(m){{var w=Vt();if(!w){var j=typeof m=="string"?m:m.displayName||m.name;j&&(w=`
|
|
30
30
|
|
|
31
|
-
Check the top-level render call using <`+J+">.")}return z}}function en(A,z){{if(!A._store||A._store.validated||A.key!=null)return;A._store.validated=!0;var J=ei(z);if(Zr[J])return;Zr[J]=!0;var se="";A&&A._owner&&A._owner!==rr.current&&(se=" It was passed a child from "+$(A._owner.type)+"."),Et(A),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',J,se),Et(null)}}function tn(A,z){{if(typeof A!="object")return;if(Me(A))for(var J=0;J<A.length;J++){var se=A[J];ir(se)&&en(se,z)}else if(ir(A))A._store&&(A._store.validated=!0);else if(A){var he=_(A);if(typeof he=="function"&&he!==A.entries)for(var ye=he.call(A),de;!(de=ye.next()).done;)ir(de.value)&&en(de.value,z)}}}function ti(A){{var z=A.type;if(z==null||typeof z=="string")return;var J;if(typeof z=="function")J=z.propTypes;else if(typeof z=="object"&&(z.$$typeof===u||z.$$typeof===d))J=z.propTypes;else return;if(J){var se=$(z);Mt(J,A.props,"prop",se,A)}else if(z.PropTypes!==void 0&&!nr){nr=!0;var he=$(z);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",he||"Unknown")}typeof z.getDefaultProps=="function"&&!z.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ri(A){{for(var z=Object.keys(A.props),J=0;J<z.length;J++){var se=z[J];if(se!=="children"&&se!=="key"){Et(A),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",se),Et(null);break}}A.ref!==null&&(Et(A),v("Invalid attribute `ref` supplied to `React.Fragment`."),Et(null))}}function rn(A,z,J,se,he,ye){{var de=V(A);if(!de){var fe="";(A===void 0||typeof A=="object"&&A!==null&&Object.keys(A).length===0)&&(fe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var De=Zn(he);De?fe+=De:fe+=Xr();var Re;A===null?Re="null":Me(A)?Re="array":A!==void 0&&A.$$typeof===t?(Re="<"+($(A.type)||"Unknown")+" />",fe=" Did you accidentally export a JSX literal instead of a component?"):Re=typeof A,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Re,fe)}var Ae=me(A,z,J,he,ye);if(Ae==null)return Ae;if(de){var ze=z.children;if(ze!==void 0)if(se)if(Me(ze)){for(var wt=0;wt<ze.length;wt++)tn(ze[wt],A);Object.freeze&&Object.freeze(ze)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else tn(ze,A)}return A===r?ri(Ae):ti(Ae),Ae}}function ni(A,z,J){return rn(A,z,J,!0)}function ii(A,z,J){return rn(A,z,J,!1)}var oi=ii,nn=ni;sr.Fragment=r,sr.jsx=oi,sr.jsxs=nn}()),sr}process.env.NODE_ENV==="production"?qo.exports=Ep():qo.exports=wp();var E=qo.exports;const Ru=()=>{const[e,t]=j.useState(window.location.pathname),n=()=>{const r=window.location.pathname;t(r)};return j.useEffect(()=>(window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n)}),[]),e},jt=(e,t)=>{const n=j.useRef(!1);j.useEffect(()=>{n.current?e():n.current=!0},t)};var Cu={exports:{}},li={exports:{}},sn={},cn={exports:{}},fi,Wa;function Nu(){return Wa||(Wa=1,fi=function(t,n){return function(){for(var s=new Array(arguments.length),o=0;o<s.length;o++)s[o]=arguments[o];return t.apply(n,s)}}),fi}var di,Ga;function Be(){if(Ga)return di;Ga=1;var e=Nu(),t=Object.prototype.toString,n=function(C){return function(q){var Y=t.call(q);return C[Y]||(C[Y]=Y.slice(8,-1).toLowerCase())}}(Object.create(null));function r(C){return C=C.toLowerCase(),function(Y){return n(Y)===C}}function s(C){return Array.isArray(C)}function o(C){return typeof C>"u"}function l(C){return C!==null&&!o(C)&&C.constructor!==null&&!o(C.constructor)&&typeof C.constructor.isBuffer=="function"&&C.constructor.isBuffer(C)}var i=r("ArrayBuffer");function u(C){var q;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?q=ArrayBuffer.isView(C):q=C&&C.buffer&&i(C.buffer),q}function c(C){return typeof C=="string"}function a(C){return typeof C=="number"}function d(C){return C!==null&&typeof C=="object"}function f(C){if(n(C)!=="object")return!1;var q=Object.getPrototypeOf(C);return q===null||q===Object.prototype}var p=r("Date"),h=r("File"),y=r("Blob"),_=r("FileList");function S(C){return t.call(C)==="[object Function]"}function v(C){return d(C)&&S(C.pipe)}function w(C){var q="[object FormData]";return C&&(typeof FormData=="function"&&C instanceof FormData||t.call(C)===q||S(C.toString)&&C.toString()===q)}var x=r("URLSearchParams");function O(C){return C.trim?C.trim():C.replace(/^\s+|\s+$/g,"")}function F(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function D(C,q){if(!(C===null||typeof C>"u"))if(typeof C!="object"&&(C=[C]),s(C))for(var Y=0,oe=C.length;Y<oe;Y++)q.call(null,C[Y],Y,C);else for(var ee in C)Object.prototype.hasOwnProperty.call(C,ee)&&q.call(null,C[ee],ee,C)}function R(){var C={};function q(ee,G){f(C[G])&&f(ee)?C[G]=R(C[G],ee):f(ee)?C[G]=R({},ee):s(ee)?C[G]=ee.slice():C[G]=ee}for(var Y=0,oe=arguments.length;Y<oe;Y++)D(arguments[Y],q);return C}function W(C,q,Y){return D(q,function(ee,G){Y&&typeof ee=="function"?C[G]=e(ee,Y):C[G]=ee}),C}function V(C){return C.charCodeAt(0)===65279&&(C=C.slice(1)),C}function L(C,q,Y,oe){C.prototype=Object.create(q.prototype,oe),C.prototype.constructor=C,Y&&Object.assign(C.prototype,Y)}function U(C,q,Y){var oe,ee,G,Z={};q=q||{};do{for(oe=Object.getOwnPropertyNames(C),ee=oe.length;ee-- >0;)G=oe[ee],Z[G]||(q[G]=C[G],Z[G]=!0);C=Object.getPrototypeOf(C)}while(C&&(!Y||Y(C,q))&&C!==Object.prototype);return q}function $(C,q,Y){C=String(C),(Y===void 0||Y>C.length)&&(Y=C.length),Y-=q.length;var oe=C.indexOf(q,Y);return oe!==-1&&oe===Y}function K(C){if(!C)return null;var q=C.length;if(o(q))return null;for(var Y=new Array(q);q-- >0;)Y[q]=C[q];return Y}var Q=function(C){return function(q){return C&&q instanceof C}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));return di={isArray:s,isArrayBuffer:i,isBuffer:l,isFormData:w,isArrayBufferView:u,isString:c,isNumber:a,isObject:d,isPlainObject:f,isUndefined:o,isDate:p,isFile:h,isBlob:y,isFunction:S,isStream:v,isURLSearchParams:x,isStandardBrowserEnv:F,forEach:D,merge:R,extend:W,trim:O,stripBOM:V,inherits:L,toFlatObject:U,kindOf:n,kindOfTest:r,endsWith:$,toArray:K,isTypedArray:Q,isFileList:_},di}var pi,Va;function Pu(){if(Va)return pi;Va=1;var e=Be();function t(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}return pi=function(r,s,o){if(!s)return r;var l;if(o)l=o(s);else if(e.isURLSearchParams(s))l=s.toString();else{var i=[];e.forEach(s,function(a,d){a===null||typeof a>"u"||(e.isArray(a)?d=d+"[]":a=[a],e.forEach(a,function(p){e.isDate(p)?p=p.toISOString():e.isObject(p)&&(p=JSON.stringify(p)),i.push(t(d)+"="+t(p))}))}),l=i.join("&")}if(l){var u=r.indexOf("#");u!==-1&&(r=r.slice(0,u)),r+=(r.indexOf("?")===-1?"?":"&")+l}return r},pi}var hi,Qa;function bp(){if(Qa)return hi;Qa=1;var e=Be();function t(){this.handlers=[]}return t.prototype.use=function(r,s,o){return this.handlers.push({fulfilled:r,rejected:s,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1},t.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)},t.prototype.forEach=function(r){e.forEach(this.handlers,function(o){o!==null&&r(o)})},hi=t,hi}var mi,za;function Sp(){if(za)return mi;za=1;var e=Be();return mi=function(n,r){e.forEach(n,function(o,l){l!==r&&l.toUpperCase()===r.toUpperCase()&&(n[r]=o,delete n[l])})},mi}var gi,Ya;function Xt(){if(Ya)return gi;Ya=1;var e=Be();function t(s,o,l,i,u){Error.call(this),this.message=s,this.name="AxiosError",o&&(this.code=o),l&&(this.config=l),i&&(this.request=i),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 n=t.prototype,r={};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(s){r[s]={value:s}}),Object.defineProperties(t,r),Object.defineProperty(n,"isAxiosError",{value:!0}),t.from=function(s,o,l,i,u,c){var a=Object.create(n);return e.toFlatObject(s,a,function(f){return f!==Error.prototype}),t.call(a,s.message,o,l,i,u),a.name=s.name,c&&Object.assign(a,c),a},gi=t,gi}var yi,Ka;function Iu(){return Ka||(Ka=1,yi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}),yi}var vi,Ja;function ku(){if(Ja)return vi;Ja=1;var e=Be();function t(n,r){r=r||new FormData;var s=[];function o(i){return i===null?"":e.isDate(i)?i.toISOString():e.isArrayBuffer(i)||e.isTypedArray(i)?typeof Blob=="function"?new Blob([i]):Buffer.from(i):i}function l(i,u){if(e.isPlainObject(i)||e.isArray(i)){if(s.indexOf(i)!==-1)throw Error("Circular reference detected in "+u);s.push(i),e.forEach(i,function(a,d){if(!e.isUndefined(a)){var f=u?u+"."+d:d,p;if(a&&!u&&typeof a=="object"){if(e.endsWith(d,"{}"))a=JSON.stringify(a);else if(e.endsWith(d,"[]")&&(p=e.toArray(a))){p.forEach(function(h){!e.isUndefined(h)&&r.append(f,o(h))});return}}l(a,f)}}),s.pop()}else r.append(u,o(i))}return l(n),r}return vi=t,vi}var _i,Xa;function Op(){if(Xa)return _i;Xa=1;var e=Xt();return _i=function(n,r,s){var o=s.config.validateStatus;!s.status||!o||o(s.status)?n(s):r(new e("Request failed with status code "+s.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))},_i}var Ei,Za;function Tp(){if(Za)return Ei;Za=1;var e=Be();return Ei=e.isStandardBrowserEnv()?function(){return{write:function(r,s,o,l,i,u){var c=[];c.push(r+"="+encodeURIComponent(s)),e.isNumber(o)&&c.push("expires="+new Date(o).toGMTString()),e.isString(l)&&c.push("path="+l),e.isString(i)&&c.push("domain="+i),u===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){var s=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return s?decodeURIComponent(s[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Ei}var wi,es;function xp(){return es||(es=1,wi=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),wi}var bi,ts;function Ap(){return ts||(ts=1,bi=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t}),bi}var Si,rs;function Lu(){if(rs)return Si;rs=1;var e=xp(),t=Ap();return Si=function(r,s){return r&&!e(s)?t(r,s):s},Si}var Oi,ns;function Rp(){if(ns)return Oi;ns=1;var e=Be(),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 Oi=function(r){var s={},o,l,i;return r&&e.forEach(r.split(`
|
|
32
|
-
`),function(c){if(i=c.indexOf(":"),o=e.trim(c.substr(0,i)).toLowerCase(),l=e.trim(c.substr(i+1)),o){if(s[o]&&t.indexOf(o)>=0)return;o==="set-cookie"?s[o]=(s[o]?s[o]:[]).concat([l]):s[o]=s[o]?s[o]+", "+l:l}}),s},Oi}var Ti,is;function Cp(){if(is)return Ti;is=1;var e=Be();return Ti=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),s;function o(l){var i=l;return n&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return s=o(window.location.href),function(i){var u=e.isString(i)?o(i):i;return u.protocol===s.protocol&&u.host===s.host}}():function(){return function(){return!0}}(),Ti}var xi,os;function Gn(){if(os)return xi;os=1;var e=Xt(),t=Be();function n(r){e.call(this,r??"canceled",e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(n,e,{__CANCEL__:!0}),xi=n,xi}var Ai,as;function Np(){return as||(as=1,Ai=function(t){var n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}),Ai}var Ri,ss;function cs(){if(ss)return Ri;ss=1;var e=Be(),t=Op(),n=Tp(),r=Pu(),s=Lu(),o=Rp(),l=Cp(),i=Iu(),u=Xt(),c=Gn(),a=Np();return Ri=function(f){return new Promise(function(h,y){var _=f.data,S=f.headers,v=f.responseType,w;function x(){f.cancelToken&&f.cancelToken.unsubscribe(w),f.signal&&f.signal.removeEventListener("abort",w)}e.isFormData(_)&&e.isStandardBrowserEnv()&&delete S["Content-Type"];var O=new XMLHttpRequest;if(f.auth){var F=f.auth.username||"",D=f.auth.password?unescape(encodeURIComponent(f.auth.password)):"";S.Authorization="Basic "+btoa(F+":"+D)}var R=s(f.baseURL,f.url);O.open(f.method.toUpperCase(),r(R,f.params,f.paramsSerializer),!0),O.timeout=f.timeout;function W(){if(O){var U="getAllResponseHeaders"in O?o(O.getAllResponseHeaders()):null,$=!v||v==="text"||v==="json"?O.responseText:O.response,K={data:$,status:O.status,statusText:O.statusText,headers:U,config:f,request:O};t(function(C){h(C),x()},function(C){y(C),x()},K),O=null}}if("onloadend"in O?O.onloadend=W:O.onreadystatechange=function(){!O||O.readyState!==4||O.status===0&&!(O.responseURL&&O.responseURL.indexOf("file:")===0)||setTimeout(W)},O.onabort=function(){O&&(y(new u("Request aborted",u.ECONNABORTED,f,O)),O=null)},O.onerror=function(){y(new u("Network Error",u.ERR_NETWORK,f,O,O)),O=null},O.ontimeout=function(){var $=f.timeout?"timeout of "+f.timeout+"ms exceeded":"timeout exceeded",K=f.transitional||i;f.timeoutErrorMessage&&($=f.timeoutErrorMessage),y(new u($,K.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,f,O)),O=null},e.isStandardBrowserEnv()){var V=(f.withCredentials||l(R))&&f.xsrfCookieName?n.read(f.xsrfCookieName):void 0;V&&(S[f.xsrfHeaderName]=V)}"setRequestHeader"in O&&e.forEach(S,function($,K){typeof _>"u"&&K.toLowerCase()==="content-type"?delete S[K]:O.setRequestHeader(K,$)}),e.isUndefined(f.withCredentials)||(O.withCredentials=!!f.withCredentials),v&&v!=="json"&&(O.responseType=f.responseType),typeof f.onDownloadProgress=="function"&&O.addEventListener("progress",f.onDownloadProgress),typeof f.onUploadProgress=="function"&&O.upload&&O.upload.addEventListener("progress",f.onUploadProgress),(f.cancelToken||f.signal)&&(w=function(U){O&&(y(!U||U&&U.type?new c:U),O.abort(),O=null)},f.cancelToken&&f.cancelToken.subscribe(w),f.signal&&(f.signal.aborted?w():f.signal.addEventListener("abort",w))),_||(_=null);var L=a(R);if(L&&["http","https","file"].indexOf(L)===-1){y(new u("Unsupported protocol "+L+":",u.ERR_BAD_REQUEST,f));return}O.send(_)})},Ri}var Ci,us;function Pp(){return us||(us=1,Ci=null),Ci}var Ni,ls;function sa(){if(ls)return Ni;ls=1;var e=Be(),t=Sp(),n=Xt(),r=Iu(),s=ku(),o={"Content-Type":"application/x-www-form-urlencoded"};function l(a,d){!e.isUndefined(a)&&e.isUndefined(a["Content-Type"])&&(a["Content-Type"]=d)}function i(){var a;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(a=cs()),a}function u(a,d,f){if(e.isString(a))try{return(d||JSON.parse)(a),e.trim(a)}catch(p){if(p.name!=="SyntaxError")throw p}return(f||JSON.stringify)(a)}var c={transitional:r,adapter:i(),transformRequest:[function(d,f){if(t(f,"Accept"),t(f,"Content-Type"),e.isFormData(d)||e.isArrayBuffer(d)||e.isBuffer(d)||e.isStream(d)||e.isFile(d)||e.isBlob(d))return d;if(e.isArrayBufferView(d))return d.buffer;if(e.isURLSearchParams(d))return l(f,"application/x-www-form-urlencoded;charset=utf-8"),d.toString();var p=e.isObject(d),h=f&&f["Content-Type"],y;if((y=e.isFileList(d))||p&&h==="multipart/form-data"){var _=this.env&&this.env.FormData;return s(y?{"files[]":d}:d,_&&new _)}else if(p||h==="application/json")return l(f,"application/json"),u(d);return d}],transformResponse:[function(d){var f=this.transitional||c.transitional,p=f&&f.silentJSONParsing,h=f&&f.forcedJSONParsing,y=!p&&this.responseType==="json";if(y||h&&e.isString(d)&&d.length)try{return JSON.parse(d)}catch(_){if(y)throw _.name==="SyntaxError"?n.from(_,n.ERR_BAD_RESPONSE,this,null,this.response):_}return d}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pp()},validateStatus:function(d){return d>=200&&d<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(d){c.headers[d]={}}),e.forEach(["post","put","patch"],function(d){c.headers[d]=e.merge(o)}),Ni=c,Ni}var Pi,fs;function Ip(){if(fs)return Pi;fs=1;var e=Be(),t=sa();return Pi=function(r,s,o){var l=this||t;return e.forEach(o,function(u){r=u.call(l,r,s)}),r},Pi}var Ii,ds;function Fu(){return ds||(ds=1,Ii=function(t){return!!(t&&t.__CANCEL__)}),Ii}var ki,ps;function kp(){if(ps)return ki;ps=1;var e=Be(),t=Ip(),n=Fu(),r=sa(),s=Gn();function o(l){if(l.cancelToken&&l.cancelToken.throwIfRequested(),l.signal&&l.signal.aborted)throw new s}return ki=function(i){o(i),i.headers=i.headers||{},i.data=t.call(i,i.data,i.headers,i.transformRequest),i.headers=e.merge(i.headers.common||{},i.headers[i.method]||{},i.headers),e.forEach(["delete","get","head","post","put","patch","common"],function(a){delete i.headers[a]});var u=i.adapter||r.adapter;return u(i).then(function(a){return o(i),a.data=t.call(i,a.data,a.headers,i.transformResponse),a},function(a){return n(a)||(o(i),a&&a.response&&(a.response.data=t.call(i,a.response.data,a.response.headers,i.transformResponse))),Promise.reject(a)})},ki}var Li,hs;function ju(){if(hs)return Li;hs=1;var e=Be();return Li=function(n,r){r=r||{};var s={};function o(d,f){return e.isPlainObject(d)&&e.isPlainObject(f)?e.merge(d,f):e.isPlainObject(f)?e.merge({},f):e.isArray(f)?f.slice():f}function l(d){if(e.isUndefined(r[d])){if(!e.isUndefined(n[d]))return o(void 0,n[d])}else return o(n[d],r[d])}function i(d){if(!e.isUndefined(r[d]))return o(void 0,r[d])}function u(d){if(e.isUndefined(r[d])){if(!e.isUndefined(n[d]))return o(void 0,n[d])}else return o(void 0,r[d])}function c(d){if(d in r)return o(n[d],r[d]);if(d in n)return o(void 0,n[d])}var a={url:i,method:i,data:i,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:c};return e.forEach(Object.keys(n).concat(Object.keys(r)),function(f){var p=a[f]||l,h=p(f);e.isUndefined(h)&&p!==c||(s[f]=h)}),s},Li}var Fi,ms;function Mu(){return ms||(ms=1,Fi={version:"0.27.2"}),Fi}var ji,gs;function Lp(){if(gs)return ji;gs=1;var e=Mu().version,t=Xt(),n={};["object","boolean","number","function","string","symbol"].forEach(function(o,l){n[o]=function(u){return typeof u===o||"a"+(l<1?"n ":" ")+o}});var r={};n.transitional=function(l,i,u){function c(a,d){return"[Axios v"+e+"] Transitional option '"+a+"'"+d+(u?". "+u:"")}return function(a,d,f){if(l===!1)throw new t(c(d," has been removed"+(i?" in "+i:"")),t.ERR_DEPRECATED);return i&&!r[d]&&(r[d]=!0,console.warn(c(d," has been deprecated since v"+i+" and will be removed in the near future"))),l?l(a,d,f):!0}};function s(o,l,i){if(typeof o!="object")throw new t("options must be an object",t.ERR_BAD_OPTION_VALUE);for(var u=Object.keys(o),c=u.length;c-- >0;){var a=u[c],d=l[a];if(d){var f=o[a],p=f===void 0||d(f,a,o);if(p!==!0)throw new t("option "+a+" must be "+p,t.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new t("Unknown option "+a,t.ERR_BAD_OPTION)}}return ji={assertOptions:s,validators:n},ji}var Mi,ys;function Fp(){if(ys)return Mi;ys=1;var e=Be(),t=Pu(),n=bp(),r=kp(),s=ju(),o=Lu(),l=Lp(),i=l.validators;function u(c){this.defaults=c,this.interceptors={request:new n,response:new n}}return u.prototype.request=function(a,d){typeof a=="string"?(d=d||{},d.url=a):d=a||{},d=s(this.defaults,d),d.method?d.method=d.method.toLowerCase():this.defaults.method?d.method=this.defaults.method.toLowerCase():d.method="get";var f=d.transitional;f!==void 0&&l.assertOptions(f,{silentJSONParsing:i.transitional(i.boolean),forcedJSONParsing:i.transitional(i.boolean),clarifyTimeoutError:i.transitional(i.boolean)},!1);var p=[],h=!0;this.interceptors.request.forEach(function(F){typeof F.runWhen=="function"&&F.runWhen(d)===!1||(h=h&&F.synchronous,p.unshift(F.fulfilled,F.rejected))});var y=[];this.interceptors.response.forEach(function(F){y.push(F.fulfilled,F.rejected)});var _;if(!h){var S=[r,void 0];for(Array.prototype.unshift.apply(S,p),S=S.concat(y),_=Promise.resolve(d);S.length;)_=_.then(S.shift(),S.shift());return _}for(var v=d;p.length;){var w=p.shift(),x=p.shift();try{v=w(v)}catch(O){x(O);break}}try{_=r(v)}catch(O){return Promise.reject(O)}for(;y.length;)_=_.then(y.shift(),y.shift());return _},u.prototype.getUri=function(a){a=s(this.defaults,a);var d=o(a.baseURL,a.url);return t(d,a.params,a.paramsSerializer)},e.forEach(["delete","get","head","options"],function(a){u.prototype[a]=function(d,f){return this.request(s(f||{},{method:a,url:d,data:(f||{}).data}))}}),e.forEach(["post","put","patch"],function(a){function d(f){return function(h,y,_){return this.request(s(_||{},{method:a,headers:f?{"Content-Type":"multipart/form-data"}:{},url:h,data:y}))}}u.prototype[a]=d(),u.prototype[a+"Form"]=d(!0)}),Mi=u,Mi}var Di,vs;function jp(){if(vs)return Di;vs=1;var e=Gn();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(l){r=l});var s=this;this.promise.then(function(o){if(s._listeners){var l,i=s._listeners.length;for(l=0;l<i;l++)s._listeners[l](o);s._listeners=null}}),this.promise.then=function(o){var l,i=new Promise(function(u){s.subscribe(u),l=u}).then(o);return i.cancel=function(){s.unsubscribe(l)},i},n(function(l){s.reason||(s.reason=new e(l),r(s.reason))})}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]},t.prototype.unsubscribe=function(r){if(this._listeners){var s=this._listeners.indexOf(r);s!==-1&&this._listeners.splice(s,1)}},t.source=function(){var r,s=new t(function(l){r=l});return{token:s,cancel:r}},Di=t,Di}var Ui,_s;function Mp(){return _s||(_s=1,Ui=function(t){return function(r){return t.apply(null,r)}}),Ui}var Bi,Es;function Dp(){if(Es)return Bi;Es=1;var e=Be();return Bi=function(n){return e.isObject(n)&&n.isAxiosError===!0},Bi}var ws;function Up(){if(ws)return cn.exports;ws=1;var e=Be(),t=Nu(),n=Fp(),r=ju(),s=sa();function o(i){var u=new n(i),c=t(n.prototype.request,u);return e.extend(c,n.prototype,u),e.extend(c,u),c.create=function(d){return o(r(i,d))},c}var l=o(s);return l.Axios=n,l.CanceledError=Gn(),l.CancelToken=jp(),l.isCancel=Fu(),l.VERSION=Mu().version,l.toFormData=ku(),l.AxiosError=Xt(),l.Cancel=l.CanceledError,l.all=function(u){return Promise.all(u)},l.spread=Mp(),l.isAxiosError=Dp(),cn.exports=l,cn.exports.default=l,cn.exports}var $i,bs;function Du(){return bs||(bs=1,$i=Up()),$i}var Bp=Function.prototype.toString,qi=Object.create,$p=Object.defineProperty,qp=Object.getOwnPropertyDescriptor,Ss=Object.getOwnPropertyNames,ca=Object.getOwnPropertySymbols,Hp=Object.getPrototypeOf,Uu=Object.prototype,Wp=Uu.hasOwnProperty,Gp=Uu.propertyIsEnumerable,Bu=typeof ca=="function",Vp=typeof WeakMap=="function",Qp=function(){if(Vp)return function(){return new WeakMap};var e=function(){function t(){this._keys=[],this._values=[]}return t.prototype.has=function(n){return!!~this._keys.indexOf(n)},t.prototype.get=function(n){return this._values[this._keys.indexOf(n)]},t.prototype.set=function(n,r){this._keys.push(n),this._values.push(r)},t}();return function(){return new e}}(),$u=function(e,t){var n=e.__proto__||Hp(e);if(!n)return qi(null);var r=n.constructor;if(r===t.Object)return n===t.Object.prototype?{}:qi(n);if(~Bp.call(r).indexOf("[native code]"))try{return new r}catch{}return qi(n)},zp=function(e,t,n,r){var s=$u(e,t);r.set(e,s);for(var o in e)Wp.call(e,o)&&(s[o]=n(e[o],r));if(Bu)for(var l=ca(e),i=0,u=l.length,c=void 0;i<u;++i)c=l[i],Gp.call(e,c)&&(s[c]=n(e[c],r));return s},Os=function(e,t,n,r){var s=$u(e,t);r.set(e,s);for(var o=Bu?Ss(e).concat(ca(e)):Ss(e),l=0,i=o.length,u=void 0,c=void 0;l<i;++l)if(u=o[l],u!=="callee"&&u!=="caller")if(c=qp(e,u),c){!c.get&&!c.set&&(c.value=n(e[u],r));try{$p(s,u,c)}catch{s[u]=c.value}}else s[u]=n(e[u],r);return s},Yp=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},Kp=Array.isArray,Jp=Object.getPrototypeOf,Xp=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 Ot(e,t){var n=!!(t&&t.isStrict),r=t&&t.realm||Xp,s=n?Os:zp,o=function(l,i){if(!l||typeof l!="object")return l;if(i.has(l))return i.get(l);var u=l.__proto__||Jp(l),c=u&&u.constructor;if(!c||c===r.Object)return s(l,r,o,i);var a;if(Kp(l)){if(n)return Os(l,r,o,i);a=new c,i.set(l,a);for(var d=0,f=l.length;d<f;++d)a[d]=o(l[d],i);return a}if(l instanceof r.Date)return new c(l.getTime());if(l instanceof r.RegExp)return a=new c(l.source,l.flags||Yp(l)),a.lastIndex=l.lastIndex,a;if(r.Map&&l instanceof r.Map)return a=new c,i.set(l,a),l.forEach(function(p,h){a.set(h,o(p,i))}),a;if(r.Set&&l instanceof r.Set)return a=new c,i.set(l,a),l.forEach(function(p){a.add(o(p,i))}),a;if(r.Blob&&l instanceof r.Blob)return l.slice(0,l.size,l.type);if(r.Buffer&&r.Buffer.isBuffer(l))return a=r.Buffer.allocUnsafe?r.Buffer.allocUnsafe(l.length):new c(l.length),i.set(l,a),l.copy(a),a;if(r.ArrayBuffer){if(r.ArrayBuffer.isView(l))return a=new c(l.buffer.slice(0)),i.set(l,a),a;if(l instanceof r.ArrayBuffer)return a=l.slice(0),i.set(l,a),a}return typeof l.then=="function"||l instanceof Error||r.WeakMap&&l instanceof r.WeakMap||r.WeakSet&&l instanceof r.WeakSet?l:s(l,r,o,i)};return o(e,Qp())}Ot.default=Ot;Ot.strict=function(t,n){return Ot(t,{isStrict:!0,realm:n?n.realm:void 0})};var Zp=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var s=42;t[n]=s;for(n 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]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,n);if(l.value!==s||l.enumerable!==!0)return!1}return!0},Ts=typeof Symbol<"u"&&Symbol,eh=Zp,th=function(){return typeof Ts!="function"||typeof Symbol!="function"||typeof Ts("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:eh()},xs={foo:{}},rh=Object,nh=function(){return{__proto__:xs}.foo===xs.foo&&!({__proto__:null}instanceof rh)},ih="Function.prototype.bind called on incompatible ",Hi=Array.prototype.slice,oh=Object.prototype.toString,ah="[object Function]",sh=function(t){var n=this;if(typeof n!="function"||oh.call(n)!==ah)throw new TypeError(ih+n);for(var r=Hi.call(arguments,1),s,o=function(){if(this instanceof s){var a=n.apply(this,r.concat(Hi.call(arguments)));return Object(a)===a?a:this}else return n.apply(t,r.concat(Hi.call(arguments)))},l=Math.max(0,n.length-r.length),i=[],u=0;u<l;u++)i.push("$"+u);if(s=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")(o),n.prototype){var c=function(){};c.prototype=n.prototype,s.prototype=new c,c.prototype=null}return s},ch=sh,ua=Function.prototype.bind||ch,uh=ua,lh=uh.call(Function.call,Object.prototype.hasOwnProperty),pe,zt=SyntaxError,qu=Function,Qt=TypeError,Wi=function(e){try{return qu('"use strict"; return ('+e+").constructor;")()}catch{}},Lt=Object.getOwnPropertyDescriptor;if(Lt)try{Lt({},"")}catch{Lt=null}var Gi=function(){throw new Qt},fh=Lt?function(){try{return arguments.callee,Gi}catch{try{return Lt(arguments,"callee").get}catch{return Gi}}}():Gi,$t=th(),dh=nh(),ke=Object.getPrototypeOf||(dh?function(e){return e.__proto__}:null),Ht={},ph=typeof Uint8Array>"u"||!ke?pe:ke(Uint8Array),Ft={"%AggregateError%":typeof AggregateError>"u"?pe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?pe:ArrayBuffer,"%ArrayIteratorPrototype%":$t&&ke?ke([][Symbol.iterator]()):pe,"%AsyncFromSyncIteratorPrototype%":pe,"%AsyncFunction%":Ht,"%AsyncGenerator%":Ht,"%AsyncGeneratorFunction%":Ht,"%AsyncIteratorPrototype%":Ht,"%Atomics%":typeof Atomics>"u"?pe:Atomics,"%BigInt%":typeof BigInt>"u"?pe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?pe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?pe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?pe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?pe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?pe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?pe:FinalizationRegistry,"%Function%":qu,"%GeneratorFunction%":Ht,"%Int8Array%":typeof Int8Array>"u"?pe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?pe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?pe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$t&&ke?ke(ke([][Symbol.iterator]())):pe,"%JSON%":typeof JSON=="object"?JSON:pe,"%Map%":typeof Map>"u"?pe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!$t||!ke?pe:ke(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?pe:Promise,"%Proxy%":typeof Proxy>"u"?pe:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?pe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?pe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!$t||!ke?pe:ke(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?pe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$t&&ke?ke(""[Symbol.iterator]()):pe,"%Symbol%":$t?Symbol:pe,"%SyntaxError%":zt,"%ThrowTypeError%":fh,"%TypedArray%":ph,"%TypeError%":Qt,"%Uint8Array%":typeof Uint8Array>"u"?pe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?pe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?pe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?pe:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?pe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?pe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?pe:WeakSet};if(ke)try{null.error}catch(e){var hh=ke(ke(e));Ft["%Error.prototype%"]=hh}var mh=function e(t){var n;if(t==="%AsyncFunction%")n=Wi("async function () {}");else if(t==="%GeneratorFunction%")n=Wi("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Wi("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var s=e("%AsyncGenerator%");s&&ke&&(n=ke(s.prototype))}return Ft[t]=n,n},As={"%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"]},Hr=ua,Ln=lh,gh=Hr.call(Function.call,Array.prototype.concat),yh=Hr.call(Function.apply,Array.prototype.splice),Rs=Hr.call(Function.call,String.prototype.replace),Fn=Hr.call(Function.call,String.prototype.slice),vh=Hr.call(Function.call,RegExp.prototype.exec),_h=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Eh=/\\(\\)?/g,wh=function(t){var n=Fn(t,0,1),r=Fn(t,-1);if(n==="%"&&r!=="%")throw new zt("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new zt("invalid intrinsic syntax, expected opening `%`");var s=[];return Rs(t,_h,function(o,l,i,u){s[s.length]=i?Rs(u,Eh,"$1"):l||o}),s},bh=function(t,n){var r=t,s;if(Ln(As,r)&&(s=As[r],r="%"+s[0]+"%"),Ln(Ft,r)){var o=Ft[r];if(o===Ht&&(o=mh(r)),typeof o>"u"&&!n)throw new Qt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:s,name:r,value:o}}throw new zt("intrinsic "+t+" does not exist!")},la=function(t,n){if(typeof t!="string"||t.length===0)throw new Qt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Qt('"allowMissing" argument must be a boolean');if(vh(/^%?[^%]*%?$/,t)===null)throw new zt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=wh(t),s=r.length>0?r[0]:"",o=bh("%"+s+"%",n),l=o.name,i=o.value,u=!1,c=o.alias;c&&(s=c[0],yh(r,gh([0,1],c)));for(var a=1,d=!0;a<r.length;a+=1){var f=r[a],p=Fn(f,0,1),h=Fn(f,-1);if((p==='"'||p==="'"||p==="`"||h==='"'||h==="'"||h==="`")&&p!==h)throw new zt("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(u=!0),s+="."+f,l="%"+s+"%",Ln(Ft,l))i=Ft[l];else if(i!=null){if(!(f in i)){if(!n)throw new Qt("base intrinsic for "+t+" exists, but the property is not available.");return}if(Lt&&a+1>=r.length){var y=Lt(i,f);d=!!y,d&&"get"in y&&!("originalValue"in y.get)?i=y.get:i=i[f]}else d=Ln(i,f),i=i[f];d&&!u&&(Ft[l]=i)}}return i},Hu={exports:{}};(function(e){var t=ua,n=la,r=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(s,r),l=n("%Object.getOwnPropertyDescriptor%",!0),i=n("%Object.defineProperty%",!0),u=n("%Math.max%");if(i)try{i({},"a",{value:1})}catch{i=null}e.exports=function(d){var f=o(t,s,arguments);if(l&&i){var p=l(f,"length");p.configurable&&i(f,"length",{value:1+u(0,d.length-(arguments.length-1))})}return f};var c=function(){return o(t,r,arguments)};i?i(e.exports,"apply",{value:c}):e.exports.apply=c})(Hu);var Sh=Hu.exports,Wu=la,Gu=Sh,Oh=Gu(Wu("String.prototype.indexOf")),Th=function(t,n){var r=Wu(t,!!n);return typeof r=="function"&&Oh(t,".prototype.")>-1?Gu(r):r};const xh={},Ah=Object.freeze(Object.defineProperty({__proto__:null,default:xh},Symbol.toStringTag,{value:"Module"})),Rh=qr(Ah);var fa=typeof Map=="function"&&Map.prototype,Vi=Object.getOwnPropertyDescriptor&&fa?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,jn=fa&&Vi&&typeof Vi.get=="function"?Vi.get:null,Cs=fa&&Map.prototype.forEach,da=typeof Set=="function"&&Set.prototype,Qi=Object.getOwnPropertyDescriptor&&da?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Mn=da&&Qi&&typeof Qi.get=="function"?Qi.get:null,Ns=da&&Set.prototype.forEach,Ch=typeof WeakMap=="function"&&WeakMap.prototype,Fr=Ch?WeakMap.prototype.has:null,Nh=typeof WeakSet=="function"&&WeakSet.prototype,jr=Nh?WeakSet.prototype.has:null,Ph=typeof WeakRef=="function"&&WeakRef.prototype,Ps=Ph?WeakRef.prototype.deref:null,Ih=Boolean.prototype.valueOf,kh=Object.prototype.toString,Lh=Function.prototype.toString,Fh=String.prototype.match,pa=String.prototype.slice,St=String.prototype.replace,jh=String.prototype.toUpperCase,Is=String.prototype.toLowerCase,Vu=RegExp.prototype.test,ks=Array.prototype.concat,at=Array.prototype.join,Mh=Array.prototype.slice,Ls=Math.floor,Ho=typeof BigInt=="function"?BigInt.prototype.valueOf:null,zi=Object.getOwnPropertySymbols,Wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Yt=typeof Symbol=="function"&&typeof Symbol.iterator=="object",We=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Yt||"symbol")?Symbol.toStringTag:null,Qu=Object.prototype.propertyIsEnumerable,Fs=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function js(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Vu.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Ls(-e):Ls(e);if(r!==e){var s=String(r),o=pa.call(t,s.length+1);return St.call(s,n,"$&_")+"."+St.call(St.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return St.call(t,n,"$&_")}var Go=Rh,Ms=Go.custom,Ds=Yu(Ms)?Ms:null,Dh=function e(t,n,r,s){var o=n||{};if(bt(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(bt(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 l=bt(o,"customInspect")?o.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(bt(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(bt(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var i=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 Ju(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var u=String(t);return i?js(t,u):u}if(typeof t=="bigint"){var c=String(t)+"n";return i?js(t,c):c}var a=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=a&&a>0&&typeof t=="object")return Vo(t)?"[Array]":"[Object]";var d=rm(o,r);if(typeof s>"u")s=[];else if(Ku(s,t)>=0)return"[Circular]";function f($,K,Q){if(K&&(s=Mh.call(s),s.push(K)),Q){var C={depth:o.depth};return bt(o,"quoteStyle")&&(C.quoteStyle=o.quoteStyle),e($,C,r+1,s)}return e($,o,r+1,s)}if(typeof t=="function"&&!Us(t)){var p=Qh(t),h=un(t,f);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(h.length>0?" { "+at.call(h,", ")+" }":"")}if(Yu(t)){var y=Yt?St.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Wo.call(t);return typeof t=="object"&&!Yt?cr(y):y}if(Zh(t)){for(var _="<"+Is.call(String(t.nodeName)),S=t.attributes||[],v=0;v<S.length;v++)_+=" "+S[v].name+"="+zu(Uh(S[v].value),"double",o);return _+=">",t.childNodes&&t.childNodes.length&&(_+="..."),_+="</"+Is.call(String(t.nodeName))+">",_}if(Vo(t)){if(t.length===0)return"[]";var w=un(t,f);return d&&!tm(w)?"["+Qo(w,d)+"]":"[ "+at.call(w,", ")+" ]"}if($h(t)){var x=un(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Qu.call(t,"cause")?"{ ["+String(t)+"] "+at.call(ks.call("[cause]: "+f(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+at.call(x,", ")+" }"}if(typeof t=="object"&&l){if(Ds&&typeof t[Ds]=="function"&&Go)return Go(t,{depth:a-r});if(l!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(zh(t)){var O=[];return Cs&&Cs.call(t,function($,K){O.push(f(K,t,!0)+" => "+f($,t))}),Bs("Map",jn.call(t),O,d)}if(Jh(t)){var F=[];return Ns&&Ns.call(t,function($){F.push(f($,t))}),Bs("Set",Mn.call(t),F,d)}if(Yh(t))return Yi("WeakMap");if(Xh(t))return Yi("WeakSet");if(Kh(t))return Yi("WeakRef");if(Hh(t))return cr(f(Number(t)));if(Gh(t))return cr(f(Ho.call(t)));if(Wh(t))return cr(Ih.call(t));if(qh(t))return cr(f(String(t)));if(!Bh(t)&&!Us(t)){var D=un(t,f),R=Fs?Fs(t)===Object.prototype:t instanceof Object||t.constructor===Object,W=t instanceof Object?"":"null prototype",V=!R&&We&&Object(t)===t&&We in t?pa.call(Tt(t),8,-1):W?"Object":"",L=R||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",U=L+(V||W?"["+at.call(ks.call([],V||[],W||[]),": ")+"] ":"");return D.length===0?U+"{}":d?U+"{"+Qo(D,d)+"}":U+"{ "+at.call(D,", ")+" }"}return String(t)};function zu(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Uh(e){return St.call(String(e),/"/g,""")}function Vo(e){return Tt(e)==="[object Array]"&&(!We||!(typeof e=="object"&&We in e))}function Bh(e){return Tt(e)==="[object Date]"&&(!We||!(typeof e=="object"&&We in e))}function Us(e){return Tt(e)==="[object RegExp]"&&(!We||!(typeof e=="object"&&We in e))}function $h(e){return Tt(e)==="[object Error]"&&(!We||!(typeof e=="object"&&We in e))}function qh(e){return Tt(e)==="[object String]"&&(!We||!(typeof e=="object"&&We in e))}function Hh(e){return Tt(e)==="[object Number]"&&(!We||!(typeof e=="object"&&We in e))}function Wh(e){return Tt(e)==="[object Boolean]"&&(!We||!(typeof e=="object"&&We in e))}function Yu(e){if(Yt)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Wo)return!1;try{return Wo.call(e),!0}catch{}return!1}function Gh(e){if(!e||typeof e!="object"||!Ho)return!1;try{return Ho.call(e),!0}catch{}return!1}var Vh=Object.prototype.hasOwnProperty||function(e){return e in this};function bt(e,t){return Vh.call(e,t)}function Tt(e){return kh.call(e)}function Qh(e){if(e.name)return e.name;var t=Fh.call(Lh.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Ku(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function zh(e){if(!jn||!e||typeof e!="object")return!1;try{jn.call(e);try{Mn.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Yh(e){if(!Fr||!e||typeof e!="object")return!1;try{Fr.call(e,Fr);try{jr.call(e,jr)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Kh(e){if(!Ps||!e||typeof e!="object")return!1;try{return Ps.call(e),!0}catch{}return!1}function Jh(e){if(!Mn||!e||typeof e!="object")return!1;try{Mn.call(e);try{jn.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Xh(e){if(!jr||!e||typeof e!="object")return!1;try{jr.call(e,jr);try{Fr.call(e,Fr)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Zh(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Ju(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Ju(pa.call(e,0,t.maxStringLength),t)+r}var s=St.call(St.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,em);return zu(s,"single",t)}function em(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+jh.call(t.toString(16))}function cr(e){return"Object("+e+")"}function Yi(e){return e+" { ? }"}function Bs(e,t,n,r){var s=r?Qo(n,r):at.call(n,", ");return e+" ("+t+") {"+s+"}"}function tm(e){for(var t=0;t<e.length;t++)if(Ku(e[t],`
|
|
33
|
-
`)>=0)return!1;return!0}function rm(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=at.call(Array(e.indent+1)," ");else return null;return{base:n,prev:at.call(Array(t+1),n)}}function Qo(e,t){if(e.length===0)return"";var n=`
|
|
34
|
-
`+t.prev+t.base;return n+at.call(e,","+n)+`
|
|
35
|
-
`+t.prev}function un(e,t){var n=Vo(e),r=[];if(n){r.length=e.length;for(var s=0;s<e.length;s++)r[s]=bt(e,s)?t(e[s],e):""}var o=typeof zi=="function"?zi(e):[],l;if(Yt){l={};for(var i=0;i<o.length;i++)l["$"+o[i]]=o[i]}for(var u in e)bt(e,u)&&(n&&String(Number(u))===u&&u<e.length||Yt&&l["$"+u]instanceof Symbol||(Vu.call(/[^\w$]/,u)?r.push(t(u,e)+": "+t(e[u],e)):r.push(u+": "+t(e[u],e))));if(typeof zi=="function")for(var c=0;c<o.length;c++)Qu.call(e,o[c])&&r.push("["+t(o[c])+"]: "+t(e[o[c]],e));return r}var ha=la,Zt=Th,nm=Dh,im=ha("%TypeError%"),ln=ha("%WeakMap%",!0),fn=ha("%Map%",!0),om=Zt("WeakMap.prototype.get",!0),am=Zt("WeakMap.prototype.set",!0),sm=Zt("WeakMap.prototype.has",!0),cm=Zt("Map.prototype.get",!0),um=Zt("Map.prototype.set",!0),lm=Zt("Map.prototype.has",!0),ma=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},fm=function(e,t){var n=ma(e,t);return n&&n.value},dm=function(e,t,n){var r=ma(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},pm=function(e,t){return!!ma(e,t)},hm=function(){var t,n,r,s={assert:function(o){if(!s.has(o))throw new im("Side channel does not contain "+nm(o))},get:function(o){if(ln&&o&&(typeof o=="object"||typeof o=="function")){if(t)return om(t,o)}else if(fn){if(n)return cm(n,o)}else if(r)return fm(r,o)},has:function(o){if(ln&&o&&(typeof o=="object"||typeof o=="function")){if(t)return sm(t,o)}else if(fn){if(n)return lm(n,o)}else if(r)return pm(r,o);return!1},set:function(o,l){ln&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new ln),am(t,o,l)):fn?(n||(n=new fn),um(n,o,l)):(r||(r={key:{},next:null}),dm(r,o,l))}};return s},mm=String.prototype.replace,gm=/%20/g,Ki={RFC1738:"RFC1738",RFC3986:"RFC3986"},ga={default:Ki.RFC3986,formatters:{RFC1738:function(e){return mm.call(e,gm,"+")},RFC3986:function(e){return String(e)}},RFC1738:Ki.RFC1738,RFC3986:Ki.RFC3986},ym=ga,Ji=Object.prototype.hasOwnProperty,kt=Array.isArray,it=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),vm=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(kt(r)){for(var s=[],o=0;o<r.length;++o)typeof r[o]<"u"&&s.push(r[o]);n.obj[n.prop]=s}}},Xu=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},s=0;s<t.length;++s)typeof t[s]<"u"&&(r[s]=t[s]);return r},_m=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(kt(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Ji.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var s=t;return kt(t)&&!kt(n)&&(s=Xu(t,r)),kt(t)&&kt(n)?(n.forEach(function(o,l){if(Ji.call(t,l)){var i=t[l];i&&typeof i=="object"&&o&&typeof o=="object"?t[l]=e(i,o,r):t.push(o)}else t[l]=o}),t):Object.keys(n).reduce(function(o,l){var i=n[l];return Ji.call(o,l)?o[l]=e(o[l],i,r):o[l]=i,o},s)},Em=function(t,n){return Object.keys(n).reduce(function(r,s){return r[s]=n[s],r},t)},wm=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},bm=function(t,n,r,s,o){if(t.length===0)return t;var l=t;if(typeof t=="symbol"?l=Symbol.prototype.toString.call(t):typeof t!="string"&&(l=String(t)),r==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(a){return"%26%23"+parseInt(a.slice(2),16)+"%3B"});for(var i="",u=0;u<l.length;++u){var c=l.charCodeAt(u);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===ym.RFC1738&&(c===40||c===41)){i+=l.charAt(u);continue}if(c<128){i=i+it[c];continue}if(c<2048){i=i+(it[192|c>>6]+it[128|c&63]);continue}if(c<55296||c>=57344){i=i+(it[224|c>>12]+it[128|c>>6&63]+it[128|c&63]);continue}u+=1,c=65536+((c&1023)<<10|l.charCodeAt(u)&1023),i+=it[240|c>>18]+it[128|c>>12&63]+it[128|c>>6&63]+it[128|c&63]}return i},Sm=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],s=0;s<n.length;++s)for(var o=n[s],l=o.obj[o.prop],i=Object.keys(l),u=0;u<i.length;++u){var c=i[u],a=l[c];typeof a=="object"&&a!==null&&r.indexOf(a)===-1&&(n.push({obj:l,prop:c}),r.push(a))}return vm(n),t},Om=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Tm=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},xm=function(t,n){return[].concat(t,n)},Am=function(t,n){if(kt(t)){for(var r=[],s=0;s<t.length;s+=1)r.push(n(t[s]));return r}return n(t)},Zu={arrayToObject:Xu,assign:Em,combine:xm,compact:Sm,decode:wm,encode:bm,isBuffer:Tm,isRegExp:Om,maybeMap:Am,merge:_m},el=hm,kn=Zu,Mr=ga,Rm=Object.prototype.hasOwnProperty,$s={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},ht=Array.isArray,Cm=Array.prototype.push,tl=function(e,t){Cm.apply(e,ht(t)?t:[t])},Nm=Date.prototype.toISOString,qs=Mr.default,He={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:kn.encode,encodeValuesOnly:!1,format:qs,formatter:Mr.formatters[qs],indices:!1,serializeDate:function(t){return Nm.call(t)},skipNulls:!1,strictNullHandling:!1},Pm=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Xi={},Im=function e(t,n,r,s,o,l,i,u,c,a,d,f,p,h,y,_){for(var S=t,v=_,w=0,x=!1;(v=v.get(Xi))!==void 0&&!x;){var O=v.get(t);if(w+=1,typeof O<"u"){if(O===w)throw new RangeError("Cyclic object value");x=!0}typeof v.get(Xi)>"u"&&(w=0)}if(typeof u=="function"?S=u(n,S):S instanceof Date?S=d(S):r==="comma"&&ht(S)&&(S=kn.maybeMap(S,function(C){return C instanceof Date?d(C):C})),S===null){if(o)return i&&!h?i(n,He.encoder,y,"key",f):n;S=""}if(Pm(S)||kn.isBuffer(S)){if(i){var F=h?n:i(n,He.encoder,y,"key",f);return[p(F)+"="+p(i(S,He.encoder,y,"value",f))]}return[p(n)+"="+p(String(S))]}var D=[];if(typeof S>"u")return D;var R;if(r==="comma"&&ht(S))h&&i&&(S=kn.maybeMap(S,i)),R=[{value:S.length>0?S.join(",")||null:void 0}];else if(ht(u))R=u;else{var W=Object.keys(S);R=c?W.sort(c):W}for(var V=s&&ht(S)&&S.length===1?n+"[]":n,L=0;L<R.length;++L){var U=R[L],$=typeof U=="object"&&typeof U.value<"u"?U.value:S[U];if(!(l&&$===null)){var K=ht(S)?typeof r=="function"?r(V,U):V:V+(a?"."+U:"["+U+"]");_.set(t,w);var Q=el();Q.set(Xi,_),tl(D,e($,K,r,s,o,l,r==="comma"&&h&&ht(S)?null:i,u,c,a,d,f,p,h,y,Q))}}return D},km=function(t){if(!t)return He;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||He.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 r=Mr.default;if(typeof t.format<"u"){if(!Rm.call(Mr.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var s=Mr.formatters[r],o=He.filter;return(typeof t.filter=="function"||ht(t.filter))&&(o=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:He.addQueryPrefix,allowDots:typeof t.allowDots>"u"?He.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:He.charsetSentinel,delimiter:typeof t.delimiter>"u"?He.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:He.encode,encoder:typeof t.encoder=="function"?t.encoder:He.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:He.encodeValuesOnly,filter:o,format:r,formatter:s,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:He.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:He.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:He.strictNullHandling}},Lm=function(e,t){var n=e,r=km(t),s,o;typeof r.filter=="function"?(o=r.filter,n=o("",n)):ht(r.filter)&&(o=r.filter,s=o);var l=[];if(typeof n!="object"||n===null)return"";var i;t&&t.arrayFormat in $s?i=t.arrayFormat:t&&"indices"in t?i=t.indices?"indices":"repeat":i="indices";var u=$s[i];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=u==="comma"&&t&&t.commaRoundTrip;s||(s=Object.keys(n)),r.sort&&s.sort(r.sort);for(var a=el(),d=0;d<s.length;++d){var f=s[d];r.skipNulls&&n[f]===null||tl(l,Im(n[f],f,u,c,r.strictNullHandling,r.skipNulls,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,a))}var p=l.join(r.delimiter),h=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),p.length>0?h+p:""},Kt=Zu,zo=Object.prototype.hasOwnProperty,Fm=Array.isArray,Ie={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Kt.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},jm=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},rl=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Mm="utf8=%26%2310003%3B",Dm="utf8=%E2%9C%93",Um=function(t,n){var r={__proto__:null},s=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=n.parameterLimit===1/0?void 0:n.parameterLimit,l=s.split(n.delimiter,o),i=-1,u,c=n.charset;if(n.charsetSentinel)for(u=0;u<l.length;++u)l[u].indexOf("utf8=")===0&&(l[u]===Dm?c="utf-8":l[u]===Mm&&(c="iso-8859-1"),i=u,u=l.length);for(u=0;u<l.length;++u)if(u!==i){var a=l[u],d=a.indexOf("]="),f=d===-1?a.indexOf("="):d+1,p,h;f===-1?(p=n.decoder(a,Ie.decoder,c,"key"),h=n.strictNullHandling?null:""):(p=n.decoder(a.slice(0,f),Ie.decoder,c,"key"),h=Kt.maybeMap(rl(a.slice(f+1),n),function(y){return n.decoder(y,Ie.decoder,c,"value")})),h&&n.interpretNumericEntities&&c==="iso-8859-1"&&(h=jm(h)),a.indexOf("[]=")>-1&&(h=Fm(h)?[h]:h),zo.call(r,p)?r[p]=Kt.combine(r[p],h):r[p]=h}return r},Bm=function(e,t,n,r){for(var s=r?t:rl(t,n),o=e.length-1;o>=0;--o){var l,i=e[o];if(i==="[]"&&n.parseArrays)l=[].concat(s);else{l=n.plainObjects?Object.create(null):{};var u=i.charAt(0)==="["&&i.charAt(i.length-1)==="]"?i.slice(1,-1):i,c=parseInt(u,10);!n.parseArrays&&u===""?l={0:s}:!isNaN(c)&&i!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(l=[],l[c]=s):u!=="__proto__"&&(l[u]=s)}s=l}return s},$m=function(t,n,r,s){if(t){var o=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,l=/(\[[^[\]]*])/,i=/(\[[^[\]]*])/g,u=r.depth>0&&l.exec(o),c=u?o.slice(0,u.index):o,a=[];if(c){if(!r.plainObjects&&zo.call(Object.prototype,c)&&!r.allowPrototypes)return;a.push(c)}for(var d=0;r.depth>0&&(u=i.exec(o))!==null&&d<r.depth;){if(d+=1,!r.plainObjects&&zo.call(Object.prototype,u[1].slice(1,-1))&&!r.allowPrototypes)return;a.push(u[1])}return u&&a.push("["+o.slice(u.index)+"]"),Bm(a,n,r,s)}},qm=function(t){if(!t)return Ie;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 n=typeof t.charset>"u"?Ie.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ie.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ie.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ie.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ie.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ie.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ie.comma,decoder:typeof t.decoder=="function"?t.decoder:Ie.decoder,delimiter:typeof t.delimiter=="string"||Kt.isRegExp(t.delimiter)?t.delimiter:Ie.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ie.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ie.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ie.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ie.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ie.strictNullHandling}},Hm=function(e,t){var n=qm(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Um(e,n):e,s=n.plainObjects?Object.create(null):{},o=Object.keys(r),l=0;l<o.length;++l){var i=o[l],u=$m(i,r[i],n,typeof e=="string");s=Kt.merge(s,u,n)}return n.allowSparse===!0?s:Kt.compact(s)},Wm=Lm,Gm=Hm,Vm=ga,Qm={formats:Vm,parse:Gm,stringify:Wm};const zm=$r(Qm);var Ym="[object String]",Km=Object.prototype,Jm=Km.toString,Xm=Array.isArray;function Zm(e){return!!e&&typeof e=="object"}function eg(e){return typeof e=="string"||!Xm(e)&&Zm(e)&&Jm.call(e)==Ym}var tg=eg;const Hs=$r(tg);var ya={exports:{}};class nl extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}}const rg=({limit:e,interval:t,strict:n})=>{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 r=new Map;let s=0,o=0;function l(){const a=Date.now();return a-s>t?(o=1,s=a,0):(o<e?o++:(s+=t,o=1),s-a)}const i=[];function u(){const a=Date.now();if(i.length<e)return i.push(a),0;const d=i.shift()+t;return a>=d?(i.push(a),0):(i.push(d),d-a)}const c=n?u:l;return a=>{const d=function(...f){if(!d.isEnabled)return(async()=>a.apply(this,f))();let p;return new Promise((h,y)=>{p=setTimeout(()=>{h(a.apply(this,f)),r.delete(p)},c()),r.set(p,y)})};return d.abort=()=>{for(const f of r.keys())clearTimeout(f),r.get(f)(new nl);r.clear(),i.splice(0,i.length)},d.isEnabled=!0,d}};ya.exports=rg;ya.exports.AbortError=nl;var ng=ya.exports;const ig=$r(ng);var og="[object Object]";function ag(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function sg(e,t){return function(n){return e(t(n))}}var cg=Function.prototype,il=Object.prototype,ol=cg.toString,ug=il.hasOwnProperty,lg=ol.call(Object),fg=il.toString,dg=sg(Object.getPrototypeOf,Object);function pg(e){return!!e&&typeof e=="object"}function hg(e){if(!pg(e)||fg.call(e)!=og||ag(e))return!1;var t=dg(e);if(t===null)return!0;var n=ug.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ol.call(n)==lg}var mg=hg;const dn=$r(mg);function gg(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,o,l,i=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(a){c=!0,s=a}finally{try{if(!u&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw s}}return i}}function Ws(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ws(Object(n),!0).forEach(function(r){yg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ws(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yo(e){"@babel/helpers - typeof";return Yo=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},Yo(e)}function Ko(){Ko=function(s,o){return new n(s,void 0,o)};var e=RegExp.prototype,t=new WeakMap;function n(s,o,l){var i=new RegExp(s,o);return t.set(i,l||t.get(s)),Dn(i,n.prototype)}function r(s,o){var l=t.get(o);return Object.keys(l).reduce(function(i,u){var c=l[u];if(typeof c=="number")i[u]=s[c];else{for(var a=0;s[c[a]]===void 0&&a+1<c.length;)a++;i[u]=s[c[a]]}return i},Object.create(null))}return vg(n,RegExp),n.prototype.exec=function(s){var o=e.exec.call(this,s);if(o){o.groups=r(o,this);var l=o.indices;l&&(l.groups=r(l,this))}return o},n.prototype[Symbol.replace]=function(s,o){if(typeof o=="string"){var l=t.get(this);return e[Symbol.replace].call(this,s,o.replace(/\$<([^>]+)>/g,function(u,c){var a=l[c];return"$"+(Array.isArray(a)?a.join("$"):a)}))}if(typeof o=="function"){var i=this;return e[Symbol.replace].call(this,s,function(){var u=arguments;return typeof u[u.length-1]!="object"&&(u=[].slice.call(u)).push(r(u,i)),o.apply(this,u)})}return e[Symbol.replace].call(this,s,o)},Ko.apply(this,arguments)}function yg(e,t,n){return t=Og(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vg(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&&Dn(e,t)}function Dn(e,t){return Dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},Dn(e,t)}function _g(e,t){return Eg(e)||gg(e,t)||al(e,t)||wg()}function Eg(e){if(Array.isArray(e))return e}function al(e,t){if(e){if(typeof e=="string")return Gs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gs(e,t)}}function Gs(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wg(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
36
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bg(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=al(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,s=function(){};return{s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(u){throw u},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
37
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,l=!1,i;return{s:function(){n=n.call(e)},n:function(){var u=n.next();return o=u.done,u},e:function(u){l=!0,i=u},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(l)throw i}}}}function Sg(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Og(e){var t=Sg(e,"string");return typeof t=="symbol"?t:String(t)}function Tg(){return typeof process<"u"&&!process.browser}function xg(){return typeof window<"u"&&"navigator"in window&&"product"in window.navigator&&window.navigator.product==="ReactNative"}function Ag(){return process.versions&&process.versions.node?"v".concat(process.versions.node):process.version}function Rg(){return window}function Jo(){}var Xo=Ko(/(\d+)(%)/,{value:1});function Zi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:7,n=t;if(Xo.test(e)){var r,s=(r=e.match(Xo))===null||r===void 0?void 0:r.groups;if(s&&s.value){var o=parseInt(s.value)/100;n=Math.round(t*o)}}return Math.min(30,Math.max(1,n))}function Vs(e,t){return t("info","Throttle request to ".concat(e,"/s")),ig({limit:e,interval:1e3,strict:!1})}var Cg=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"auto",n=e.defaults.logHandler,r=n===void 0?Jo:n,s=Hs(t)?Zi(t):Zi("auto",t),o=Vs(s,r),l=!1,i=e.interceptors.request.use(function(c){return o(function(){return c})()},function(c){return Promise.reject(c)}),u=e.interceptors.response.use(function(c){if(!l&&Hs(t)&&(t==="auto"||Xo.test(t))&&c.headers&&c.headers["x-contentful-ratelimit-second-limit"]){var a=parseInt(c.headers["x-contentful-ratelimit-second-limit"]),d=Zi(t,a);d!==s&&(i&&e.interceptors.request.eject(i),s=d,o=Vs(d,r),i=e.interceptors.request.use(function(f){return o(function(){return f})()},function(f){return Promise.reject(f)})),l=!0}return c},function(c){return Promise.reject(c)});return function(){e.interceptors.request.eject(i),e.interceptors.response.eject(u)}},Ng=function(t){return new Promise(function(n){setTimeout(n,t)})},Pg=function(t){return Math.pow(Math.SQRT2,t)};function Ig(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,n=e.defaults,r=n.responseLogger,s=r===void 0?Jo:r,o=n.requestLogger,l=o===void 0?Jo:o;e.interceptors.request.use(function(i){return l(i),i},function(i){return l(i),Promise.reject(i)}),e.interceptors.response.use(function(i){return s(i),i},function(i){var u=i.response,c=i.config;if(s(i),!c||!e.defaults.retryOnError)return Promise.reject(i);var a=c.attempts||1;if(a>t)return i.attempts=c.attempts,Promise.reject(i);var d=null,f=Pg(a);return u?u.status>=500&&u.status<600?d="Server ".concat(u.status):u.status===429&&(d="Rate limit",u.headers&&i.response.headers["x-contentful-ratelimit-reset"]&&(f=u.headers["x-contentful-ratelimit-reset"])):d="Connection",d?(f=Math.floor(f*1e3+Math.random()*200+500),e.defaults.logHandler("warning","".concat(d," error occurred. Waiting for ").concat(f," ms before retrying...")),c.attempts=a+1,delete c.httpAgent,delete c.httpsAgent,Ng(f).then(function(){return e(c)})):Promise.reject(i)})}function kg(e,t){e.interceptors.request.use(function(n){return t().then(function(r){return n.headers=Wt(Wt({},n.headers),{},{Authorization:"Bearer ".concat(r)}),n})})}var Lg=/^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;function sl(e,t){var n={insecure:!1,retryOnError:!0,logHandler:function(y,_){if(y==="error"&&_){var S=[_.name,_.message].filter(function(v){return v}).join(" - ");console.error("[error] ".concat(S)),console.error(_);return}console.log("[".concat(y,"] ").concat(_))},headers:{},httpAgent:!1,httpsAgent:!1,timeout:3e4,throttle:0,proxy:!1,basePath:"",adapter:void 0,maxContentLength:1073741824,maxBodyLength:1073741824},r=Wt(Wt({},n),t);if(!r.accessToken){var s=new TypeError("Expected parameter accessToken");throw r.logHandler("error",s),s}var o=r.insecure?"http":"https",l=r.space?"".concat(r.space,"/"):"",i=r.defaultHostname,u=r.insecure?80:443;if(r.host&&Lg.test(r.host)){var c=r.host.split(":");if(c.length===2){var a=_g(c,2);i=a[0],u=a[1]}else i=c[0]}r.basePath&&(r.basePath="/".concat(r.basePath.split("/").filter(Boolean).join("/")));var d=t.baseURL||"".concat(o,"://").concat(i,":").concat(u).concat(r.basePath,"/spaces/").concat(l);!r.headers.Authorization&&typeof r.accessToken!="function"&&(r.headers.Authorization="Bearer "+r.accessToken);var f={baseURL:d,headers:r.headers,httpAgent:r.httpAgent,httpsAgent:r.httpsAgent,paramsSerializer:zm.stringify,proxy:r.proxy,timeout:r.timeout,adapter:r.adapter,maxContentLength:r.maxContentLength,maxBodyLength:r.maxBodyLength,logHandler:r.logHandler,responseLogger:r.responseLogger,requestLogger:r.requestLogger,retryOnError:r.retryOnError},p=e.create(f);return p.httpClientParams=t,p.cloneWithNewParams=function(h){return sl(e,Wt(Wt({},Ot(t)),h))},r.onBeforeRequest&&p.interceptors.request.use(r.onBeforeRequest),typeof r.accessToken=="function"&&kg(p,r.accessToken),r.throttle&&Cg(p,r.throttle),Ig(p,r.retryLimit),r.onError&&p.interceptors.response.use(function(h){return h},r.onError),p}function Fg(e){var t=e.query,n={};return delete t.resolveLinks,n.params=Ot(t),n}function jg(e,t){if(!(t in e)){var n=new Error;throw n.name="PropertyMissing",n.message="Required property ".concat(t,` missing from:
|
|
38
|
-
|
|
39
|
-
`).concat(JSON.stringify(e),`
|
|
40
|
-
|
|
41
|
-
`),n}return!0}function cl(e){var t=Object.getOwnPropertyNames(e),n=bg(t),r;try{for(n.s();!(r=n.n()).done;){var s=r.value,o=e[s];o&&Yo(o)==="object"&&cl(o)}}catch(l){n.e(l)}finally{n.f()}return Object.freeze(e)}function Mg(e){return cl(e.sys||{}),e}function Qs(){var e=Rg();if(!e)return null;var t=e.navigator.userAgent,n=e.navigator.platform,r=["Macintosh","MacIntel","MacPPC","Mac68K"],s=["Win32","Win64","Windows","WinCE"],o=["iPhone","iPad","iPod"];return r.indexOf(n)!==-1?"macOS":o.indexOf(n)!==-1?"iOS":s.indexOf(n)!==-1?"Windows":/Android/.test(t)?"Android":/Linux/.test(n)?"Linux":null}function Dg(){var e=process.platform||"linux",t=process.version||"0.0.0",n={android:"Android",aix:"Linux",darwin:"macOS",freebsd:"Linux",linux:"Linux",openbsd:"Linux",sunos:"Linux",win32:"Windows"};return e in n?"".concat(n[e]||"Linux","/").concat(t):null}function Ug(e,t,n,r){var s=[];t&&s.push("app ".concat(t)),n&&s.push("integration ".concat(n)),r&&s.push("feature "+r),s.push("sdk ".concat(e));var o=null;try{xg()?(o=Qs(),s.push("platform ReactNative")):Tg()?(o=Dg(),s.push("platform node.js/".concat(Ag()))):(o=Qs(),s.push("platform browser"))}catch{o=null}return o&&s.push("os ".concat(o)),"".concat(s.filter(function(l){return l!==""}).join("; "),";")}function Bg(e){return Object.defineProperty(e,"toPlainObject",{enumerable:!1,configurable:!1,writable:!1,value:function(){return Ot(this)}})}function $g(e){var t=e.config,n=e.response,r;if(t&&t.headers&&t.headers.Authorization){var s="...".concat(t.headers.Authorization.toString().substr(-5));t.headers.Authorization="Bearer ".concat(s)}if(!dn(n)||!dn(t))throw e;var o=n==null?void 0:n.data,l={status:n==null?void 0:n.status,statusText:n==null?void 0:n.statusText,message:"",details:{}};dn(t)&&(l.request={url:t.url,headers:t.headers,method:t.method,payloadData:t.data}),o&&dn(o)&&("requestId"in o&&(l.requestId=o.requestId||"UNKNOWN"),"message"in o&&(l.message=o.message||""),"details"in o&&(l.details=o.details||{}),"sys"in o&&"id"in o.sys&&(r=o.sys.id));var i=new Error;i.name=r&&r!=="Unknown"?r:"".concat(n==null?void 0:n.status," ").concat(n==null?void 0:n.statusText);try{i.message=JSON.stringify(l,null," ")}catch{var u;i.message=(u=l==null?void 0:l.message)!==null&&u!==void 0?u:""}throw i}const qg=Object.freeze(Object.defineProperty({__proto__:null,createHttpClient:sl,createRequestConfig:Fg,enforceObjPath:jg,errorHandler:$g,freezeSys:Mg,getUserAgentHeader:Ug,toPlainObject:Bg},Symbol.toStringTag,{value:"Module"})),ct=qr(qg);var pn={},ur={},hn={},zs;function Hg(){if(zs)return hn;zs=1,Object.defineProperty(hn,"__esModule",{value:!0}),hn.wrapSpace=t;var e=ct;function t(n){return(0,e.freezeSys)((0,e.toPlainObject)(n))}return hn}var lr={},eo={exports:{}},Ys;function er(){return Ys||(Ys=1,function(e,t){(function(n,r){e.exports=r()})(ce,function(){var n=Function.prototype.toString,r=Object.create,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,i=Object.getOwnPropertySymbols,u=Object.getPrototypeOf,c=Object.prototype,a=c.hasOwnProperty,d=c.propertyIsEnumerable,f=typeof i=="function",p=typeof WeakMap=="function",h=function(){if(p)return function(){return new WeakMap};var D=function(){function R(){this._keys=[],this._values=[]}return R.prototype.has=function(W){return!!~this._keys.indexOf(W)},R.prototype.get=function(W){return this._values[this._keys.indexOf(W)]},R.prototype.set=function(W,V){this._keys.push(W),this._values.push(V)},R}();return function(){return new D}}(),y=function(D,R){var W=D.__proto__||u(D);if(!W)return r(null);var V=W.constructor;if(V===R.Object)return W===R.Object.prototype?{}:r(W);if(~n.call(V).indexOf("[native code]"))try{return new V}catch{}return r(W)},_=function(D,R,W,V){var L=y(D,R);V.set(D,L);for(var U in D)a.call(D,U)&&(L[U]=W(D[U],V));if(f)for(var $=i(D),K=0,Q=$.length,C=void 0;K<Q;++K)C=$[K],d.call(D,C)&&(L[C]=W(D[C],V));return L},S=function(D,R,W,V){var L=y(D,R);V.set(D,L);for(var U=f?l(D).concat(i(D)):l(D),$=0,K=U.length,Q=void 0,C=void 0;$<K;++$)if(Q=U[$],Q!=="callee"&&Q!=="caller")if(C=o(D,Q),C){!C.get&&!C.set&&(C.value=W(D[Q],V));try{s(L,Q,C)}catch{L[Q]=C.value}}else L[Q]=W(D[Q],V);return L},v=function(D){var R="";return D.global&&(R+="g"),D.ignoreCase&&(R+="i"),D.multiline&&(R+="m"),D.unicode&&(R+="u"),D.sticky&&(R+="y"),R},w=Array.isArray,x=Object.getPrototypeOf,O=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 F(D,R){var W=!!(R&&R.isStrict),V=R&&R.realm||O,L=W?S:_,U=function($,K){if(!$||typeof $!="object")return $;if(K.has($))return K.get($);var Q=$.__proto__||x($),C=Q&&Q.constructor;if(!C||C===V.Object)return L($,V,U,K);var q;if(w($)){if(W)return S($,V,U,K);q=new C,K.set($,q);for(var Y=0,oe=$.length;Y<oe;++Y)q[Y]=U($[Y],K);return q}if($ instanceof V.Date)return new C($.getTime());if($ instanceof V.RegExp)return q=new C($.source,$.flags||v($)),q.lastIndex=$.lastIndex,q;if(V.Map&&$ instanceof V.Map)return q=new C,K.set($,q),$.forEach(function(ee,G){q.set(G,U(ee,K))}),q;if(V.Set&&$ instanceof V.Set)return q=new C,K.set($,q),$.forEach(function(ee){q.add(U(ee,K))}),q;if(V.Blob&&$ instanceof V.Blob)return $.slice(0,$.size,$.type);if(V.Buffer&&V.Buffer.isBuffer($))return q=V.Buffer.allocUnsafe?V.Buffer.allocUnsafe($.length):new C($.length),K.set($,q),$.copy(q),q;if(V.ArrayBuffer){if(V.ArrayBuffer.isView($))return q=new C($.buffer.slice(0)),K.set($,q),q;if($ instanceof V.ArrayBuffer)return q=$.slice(0),K.set($,q),q}return typeof $.then=="function"||$ instanceof Error||V.WeakMap&&$ instanceof V.WeakMap||V.WeakSet&&$ instanceof V.WeakSet?$:L($,V,U,K)};return U(D,h())}return F.default=F,F.strict=function(R,W){return F(R,{isStrict:!0,realm:W?W.realm:void 0})},F})}(eo)),eo.exports}var mn={},gn={exports:{}},Ks;function Wg(){return Ks||(Ks=1,function(e,t){t=e.exports=n,t.getSerialize=r;function n(s,o,l,i){return JSON.stringify(s,r(o,i),l)}function r(s,o){var l=[],i=[];return o==null&&(o=function(u,c){return l[0]===c?"[Circular ~]":"[Circular ~."+i.slice(0,l.indexOf(c)).join(".")+"]"}),function(u,c){if(l.length>0){var a=l.indexOf(this);~a?l.splice(a+1):l.push(this),~a?i.splice(a,1/0,u):i.push(u),~l.indexOf(c)&&(c=o.call(this,u,c))}else l.push(c);return s==null?c:s.call(this,u,c)}}}(gn,gn.exports)),gn.exports}var Js;function ul(){if(Js)return mn;Js=1,Object.defineProperty(mn,"__esModule",{value:!0}),mn.default=n;var e=t(Wg());function t(r){return r&&r.__esModule?r:{default:r}}function n(r){return Object.defineProperty(r,"stringifySafe",{enumerable:!1,configurable:!1,writable:!1,value:function(){let s=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,s,o,(l,i)=>({sys:{type:"Link",linkType:"Entry",id:i.sys.id,circular:!0}}))}})}return mn}var Gg=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},Vg=function(){function e(t,n){var r=[],s=!0,o=!1,l=void 0;try{for(var i=t[Symbol.iterator](),u;!(s=(u=i.next()).done)&&(r.push(u.value),!(n&&r.length===n));s=!0);}catch(c){o=!0,l=c}finally{try{!s&&i.return&&i.return()}finally{if(o)throw l}}return r}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function fr(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var Ur={},Qg=function(t){return t&&t.sys&&t.sys.type==="Link"},zg=function(t){return t&&t.sys&&t.sys.type==="ResourceLink"},Yg=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]},Xs=function(t,n){var r=n.entryId,s=n.linkType,o=n.spaceId,l=n.environmentId;return o&&l?t.get(o+"!"+l+"!"+s+"!"+r):t.get(s+"!"+r)},Kg=function(t){var n=/.*:spaces\/([^/]+)(?:\/environments\/([^/]+))?\/entries\/([^/]+)$/;if(n.test(t)){var r=t.match(n),s=Vg(r,4);s[0];var o=s[1],l=s[2],i=l===void 0?"master":l,u=s[3];return{spaceId:o,environmentId:i,entryId:u}}},Jg=function(t,n){var r=n.sys,s=r.type,o=r.linkType;if(s==="ResourceLink"){var l=n.sys.urn,i=Kg(l),u=i.spaceId,c=i.environmentId,a=i.entryId,d=o.split(":")[1];return Xs(t,{linkType:d,entryId:a,spaceId:u,environmentId:c})||Ur}var f=n.sys.id;return Xs(t,{linkType:o,entryId:f})||Ur},Xg=function(t){if(Array.isArray(t))return t.filter(function(r){return r!==Ur});for(var n in t)t[n]===Ur&&delete t[n];return t},Zg=function e(t,n,r,s){if(n(t))return r(t);if(t&&(typeof t>"u"?"undefined":Gg(t))==="object"){for(var o in t)t.hasOwnProperty(o)&&(t[o]=e(t[o],n,r,s));s&&(t=Xg(t))}return t},ey=function(t,n,r){var s=Jg(t,n);return s===Ur?r?s:n:s},ty=function(t,n){if(!Array.isArray(n))return t;var r=Object.keys(t).filter(function(s){return n.indexOf(s)!==-1});return r.reduce(function(s,o){return s[o]=t[o],s},{})},ry=function(t,n){if(n=n||{},!t.items)return[];var r=Ot(t),s=Object.keys(r.includes||{}).reduce(function(i,u){return[].concat(fr(i),fr(t.includes[u]))},[]),o=[].concat(fr(r.items),fr(s)).filter(function(i){return!!i.sys}),l=new Map(o.reduce(function(i,u){var c=Yg(u.sys).map(function(a){return[a,u]});return i.push.apply(i,fr(c)),i},[]));return o.forEach(function(i){var u=ty(i,n.itemEntryPoints);Object.assign(i,Zg(u,function(c){return Qg(c)||zg(c)},function(c){return ey(l,c,n.removeUnresolved)},n.removeUnresolved))}),r.items};const ny=Object.freeze(Object.defineProperty({__proto__:null,default:ry},Symbol.toStringTag,{value:"Module"})),ll=qr(ny);var Zs;function iy(){if(Zs)return lr;Zs=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.wrapEntry=o,lr.wrapEntryCollection=l;var e=s(er()),t=ct,n=s(ul()),r=s(ll);function s(i){return i&&i.__esModule?i:{default:i}}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function l(i,u){let{resolveLinks:c,removeUnresolved:a}=u;const d=(0,n.default)((0,t.toPlainObject)((0,e.default)(i)));return c&&(d.items=(0,r.default)(d,{removeUnresolved:a,itemEntryPoints:["fields"]})),(0,t.freezeSys)(d)}return lr}var dr={},ec;function oy(){if(ec)return dr;ec=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.wrapAsset=r,dr.wrapAssetCollection=s;var e=n(er()),t=ct;function n(o){return o&&o.__esModule?o:{default:o}}function r(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function s(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return dr}var yn={},tc;function ay(){if(tc)return yn;tc=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.wrapAssetKey=r;var e=n(er()),t=ct;function n(s){return s&&s.__esModule?s:{default:s}}function r(s){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(s)))}return yn}var pr={},rc;function sy(){if(rc)return pr;rc=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.wrapContentType=r,pr.wrapContentTypeCollection=s;var e=n(er()),t=ct;function n(o){return o&&o.__esModule?o:{default:o}}function r(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function s(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return pr}var hr={},nc;function cy(){if(nc)return hr;nc=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.wrapLocale=r,hr.wrapLocaleCollection=s;var e=n(er()),t=ct;function n(o){return o&&o.__esModule?o:{default:o}}function r(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function s(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return hr}var mr={},ic;function uy(){if(ic)return mr;ic=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.wrapTag=r,mr.wrapTagCollection=s;var e=n(er()),t=ct;function n(o){return o&&o.__esModule?o:{default:o}}function r(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}function s(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return mr}var oc;function ly(){if(oc)return ur;oc=1,Object.defineProperty(ur,"__esModule",{value:!0}),ur.default=void 0;var e=u(Hg()),t=u(iy()),n=u(oy()),r=u(ay()),s=u(sy()),o=u(cy()),l=u(uy());function i(a){if(typeof WeakMap!="function")return null;var d=new WeakMap,f=new WeakMap;return(i=function(p){return p?f:d})(a)}function u(a,d){if(!d&&a&&a.__esModule)return a;if(a===null||typeof a!="object"&&typeof a!="function")return{default:a};var f=i(d);if(f&&f.has(a))return f.get(a);var p={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var y in a)if(y!=="default"&&Object.prototype.hasOwnProperty.call(a,y)){var _=h?Object.getOwnPropertyDescriptor(a,y):null;_&&(_.get||_.set)?Object.defineProperty(p,y,_):p[y]=a[y]}return p.default=a,f&&f.set(a,p),p}var c={space:e,entry:t,asset:n,assetKey:r,contentType:s,locale:o,tag:l};return ur.default=c,ur}var vn={},ac;function fy(){if(ac)return vn;ac=1,Object.defineProperty(vn,"__esModule",{value:!0}),vn.default=i;var e=ct,t=r(ll),n=r(ul());function r(d){return d&&d.__esModule?d:{default:d}}function s(d,f){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(d);f&&(h=h.filter(function(y){return Object.getOwnPropertyDescriptor(d,y).enumerable})),p.push.apply(p,h)}return p}function o(d){for(var f=1;f<arguments.length;f++){var p=arguments[f]!=null?arguments[f]:{};f%2?s(Object(p),!0).forEach(function(h){l(d,h,p[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):s(Object(p)).forEach(function(h){Object.defineProperty(d,h,Object.getOwnPropertyDescriptor(p,h))})}return d}function l(d,f,p){return f in d?Object.defineProperty(d,f,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[f]=p,d}async function i(d,f){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!f||!f.initial&&!f.nextSyncToken&&!f.nextPageToken)throw new Error("Please provide one of `initial`, `nextSyncToken` or `nextPageToken` parameters for syncing");if(f&&f.content_type&&!f.type)f.type="Entry";else if(f&&f.content_type&&f.type&&f.type!=="Entry")throw new Error("When using the `content_type` filter your `type` parameter cannot be different from `Entry`.");const h={resolveLinks:!0,removeUnresolved:!1,paginate:!0},{resolveLinks:y,removeUnresolved:_,paginate:S}=o(o({},h),p),w=await c(d,[],f,{paginate:S});y&&(w.items=(0,t.default)(w,{removeUnresolved:_,itemEntryPoints:["fields"]}));const x=u(w.items);return w.nextSyncToken&&(x.nextSyncToken=w.nextSyncToken),w.nextPageToken&&(x.nextPageToken=w.nextPageToken),(0,e.freezeSys)((0,n.default)((0,e.toPlainObject)(x)))}function u(d){const f=p=>(h,y)=>(y.sys.type===p&&h.push((0,e.toPlainObject)(y)),h);return{entries:d.reduce(f("Entry"),[]),assets:d.reduce(f("Asset"),[]),deletedEntries:d.reduce(f("DeletedEntry"),[]),deletedAssets:d.reduce(f("DeletedAsset"),[])}}async function c(d,f,p,h){let{paginate:y}=h;p.nextSyncToken&&(p.sync_token=p.nextSyncToken,delete p.nextSyncToken),p.nextPageToken&&(p.sync_token=p.nextPageToken,delete p.nextPageToken),p.sync_token&&(delete p.initial,delete p.type,delete p.content_type,delete p.limit);const S=(await d.get("sync",(0,e.createRequestConfig)({query:p}))).data||{};return f=f.concat(S.items||[]),S.nextPageUrl?y?(delete p.initial,p.sync_token=a(S.nextPageUrl),c(d,f,p,{paginate:y})):{items:f,nextPageToken:a(S.nextPageUrl)}:S.nextSyncUrl?{items:f,nextSyncToken:a(S.nextSyncUrl)}:{items:[]}}function a(d){const f=d.split("?");return f.length>0?f[1].replace("sync_token=",""):""}return vn}var _n={},sc;function dy(){if(sc)return _n;sc=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.default=r;function e(s,o){var l=Object.keys(s);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(s);o&&(i=i.filter(function(u){return Object.getOwnPropertyDescriptor(s,u).enumerable})),l.push.apply(l,i)}return l}function t(s){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?e(Object(l),!0).forEach(function(i){n(s,i,l[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(l)):e(Object(l)).forEach(function(i){Object.defineProperty(s,i,Object.getOwnPropertyDescriptor(l,i))})}return s}function n(s,o,l){return o in s?Object.defineProperty(s,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):s[o]=l,s}function r(s){if(!s.select)return s;const o=Array.isArray(s.select)?s.select:s.select.split(","),l=new Set(o);return l.has("sys")?s:(l.add("sys.id"),l.add("sys.type"),t(t({},s),{},{select:[...l].join(",")}))}return _n}var qt={},cc;function py(){if(cc)return qt;cc=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.ValidationError=void 0,qt.default=t;class e extends Error{constructor(r,s){super(`Invalid "${r}" provided, `+s),this.name="ValidationError"}}qt.ValidationError=e;function t(n,r,s){if(s=s||{},typeof r!="number")throw new e(n,`only numeric values are allowed for timestamps, provided type was "${typeof r}"`);if(s.maximum&&r>s.maximum)throw new e(n,`value (${r}) cannot be further in the future than expected maximum (${s.maximum})`);if(s.now&&r<s.now)throw new e(n,`value (${r}) cannot be in the past, current time was ${s.now}`)}return qt}var uc;function hy(){if(uc)return pn;uc=1,Object.defineProperty(pn,"__esModule",{value:!0}),pn.default=a;var e=ct,t=o(ly()),n=o(fy()),r=o(dy()),s=o(py());function o(d){return d&&d.__esModule?d:{default:d}}function l(d,f){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(d);f&&(h=h.filter(function(y){return Object.getOwnPropertyDescriptor(d,y).enumerable})),p.push.apply(p,h)}return p}function i(d){for(var f=1;f<arguments.length;f++){var p=arguments[f]!=null?arguments[f]:{};f%2?l(Object(p),!0).forEach(function(h){u(d,h,p[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):l(Object(p)).forEach(function(h){Object.defineProperty(d,h,Object.getOwnPropertyDescriptor(p,h))})}return d}function u(d,f,p){return f in d?Object.defineProperty(d,f,{value:p,enumerable:!0,configurable:!0,writable:!0}):d[f]=p,d}const c=48*60*60;function a(d){let{http:f,getGlobalOptions:p}=d;const{wrapSpace:h}=t.default.space,{wrapContentType:y,wrapContentTypeCollection:_}=t.default.contentType,{wrapEntry:S,wrapEntryCollection:v}=t.default.entry,{wrapAsset:w,wrapAssetCollection:x}=t.default.asset,{wrapTag:O,wrapTagCollection:F}=t.default.tag,{wrapAssetKey:D}=t.default.assetKey,{wrapLocaleCollection:R}=t.default.locale,W=ie=>{const re=new Error("The resource could not be found.");return re.sys={type:"Error",id:"NotFound"},re.details={type:"Entry",id:ie,environment:p().environment,space:p().space},re};async function V(){Oe(f);try{const ie=await f.get("/");return h(ie.data)}catch(ie){(0,e.errorHandler)(ie)}}async function L(ie){ae(f);try{const re=await f.get(`content_types/${ie}`);return y(re.data)}catch(re){(0,e.errorHandler)(re)}}async function U(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ae(f);try{const re=await f.get("content_types",(0,e.createRequestConfig)({query:ie}));return _(re.data)}catch(re){(0,e.errorHandler)(re)}}async function $(ie){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ie)throw W(ie);try{const te=await this.getEntries(i({"sys.id":ie},re));if(te.items.length>0)return S(te.items[0]);throw W(ie)}catch(te){(0,e.errorHandler)(te)}}async function K(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ae(f);const{resolveLinks:re,removeUnresolved:te}=p(ie);ie=(0,r.default)(ie);try{const we=await f.get("entries",(0,e.createRequestConfig)({query:ie}));return v(we.data,{resolveLinks:re,removeUnresolved:te})}catch(we){(0,e.errorHandler)(we)}}async function Q(ie){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ae(f),re=(0,r.default)(re);try{const te=await f.get(`assets/${ie}`,(0,e.createRequestConfig)({query:re}));return w(te.data)}catch(te){(0,e.errorHandler)(te)}}async function C(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ae(f),ie=(0,r.default)(ie);try{const re=await f.get("assets",(0,e.createRequestConfig)({query:ie}));return x(re.data)}catch(re){(0,e.errorHandler)(re)}}async function q(ie){ae(f);try{const re=await f.get(`tags/${ie}`);return O(re.data)}catch(re){(0,e.errorHandler)(re)}}async function Y(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ae(f),ie=(0,r.default)(ie);try{const re=await f.get("tags",(0,e.createRequestConfig)({query:ie}));return F(re.data)}catch(re){(0,e.errorHandler)(re)}}async function oe(ie){ae(f);try{const re=Math.floor(Date.now()/1e3),te=re+c;(0,s.default)("expiresAt",ie,{maximum:te,now:re});const we={expiresAt:ie},Ne=await f.post("asset_keys",we);return D(Ne.data)}catch(re){(0,e.errorHandler)(re)}}async function ee(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ae(f);try{const re=await f.get("locales",(0,e.createRequestConfig)({query:ie}));return R(re.data)}catch(re){(0,e.errorHandler)(re)}}async function G(){let ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{paginate:!0};const{resolveLinks:te,removeUnresolved:we}=p(ie);return ae(f),(0,n.default)(f,ie,i({resolveLinks:te,removeUnresolved:we},re))}function Z(ie){const{resolveLinks:re,removeUnresolved:te}=p({});return v(ie,{resolveLinks:re,removeUnresolved:te})}function ae(ie){ie.defaults.baseURL=p().environmentBaseUrl}function Oe(ie){ie.defaults.baseURL=p().spaceBaseUrl}return{getSpace:V,getContentType:L,getContentTypes:U,getEntry:$,getEntries:K,getAsset:Q,getAssets:C,getTag:q,getTags:Y,createAssetKey:oe,getLocales:ee,parseEntries:Z,sync:G}}return pn}var En={},lc;function my(){if(lc)return En;lc=1,Object.defineProperty(En,"__esModule",{value:!0}),En.default=e;function e(t){return function(r){return Object.assign({},t,r)}}return En}var fc;function gy(){if(fc)return sn;fc=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.createClient=u;var e=s(Du()),t=ct,n=s(hy()),r=s(my());function s(c){return c&&c.__esModule?c:{default:c}}function o(c,a){var d=Object.keys(c);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(c);a&&(f=f.filter(function(p){return Object.getOwnPropertyDescriptor(c,p).enumerable})),d.push.apply(d,f)}return d}function l(c){for(var a=1;a<arguments.length;a++){var d=arguments[a]!=null?arguments[a]:{};a%2?o(Object(d),!0).forEach(function(f){i(c,f,d[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(d)):o(Object(d)).forEach(function(f){Object.defineProperty(c,f,Object.getOwnPropertyDescriptor(d,f))})}return c}function i(c,a,d){return a in c?Object.defineProperty(c,a,{value:d,enumerable:!0,configurable:!0,writable:!0}):c[a]=d,c}function u(c){if(!c.accessToken)throw new TypeError("Expected parameter accessToken");if(!c.space)throw new TypeError("Expected parameter space");const d=l(l({},{resolveLinks:!0,removeUnresolved:!1,defaultHostname:"cdn.contentful.com",environment:"master"}),c),f=(0,t.getUserAgentHeader)("contentful.js/9.1.34",d.application,d.integration);d.headers=l(l({},d.headers),{},{"Content-Type":"application/vnd.contentful.delivery.v1+json","X-Contentful-User-Agent":f});const p=(0,t.createHttpClient)(e.default,d),h=(0,r.default)({resolveLinks:d.resolveLinks,environment:d.environment,removeUnresolved:d.removeUnresolved,spaceBaseUrl:p.defaults.baseURL,environmentBaseUrl:`${p.defaults.baseURL}environments/${d.environment}`});return p.defaults.baseURL=h().environmentBaseUrl,(0,n.default)({http:p,getGlobalOptions:h})}return sn}var to={},ro,dc;function yy(){return dc||(dc=1,ro=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),ro}var no,pc;function vy(){if(pc)return no;pc=1;var e="%[a-f0-9]{2}",t=new RegExp("("+e+")|([^%]+?)","gi"),n=new RegExp("("+e+")+","gi");function r(l,i){try{return[decodeURIComponent(l.join(""))]}catch{}if(l.length===1)return l;i=i||1;var u=l.slice(0,i),c=l.slice(i);return Array.prototype.concat.call([],r(u),r(c))}function s(l){try{return decodeURIComponent(l)}catch{for(var i=l.match(t)||[],u=1;u<i.length;u++)l=r(i,u).join(""),i=l.match(t)||[];return l}}function o(l){for(var i={"%FE%FF":"��","%FF%FE":"��"},u=n.exec(l);u;){try{i[u[0]]=decodeURIComponent(u[0])}catch{var c=s(u[0]);c!==u[0]&&(i[u[0]]=c)}u=n.exec(l)}i["%C2"]="�";for(var a=Object.keys(i),d=0;d<a.length;d++){var f=a[d];l=l.replace(new RegExp(f,"g"),i[f])}return l}return no=function(l){if(typeof l!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof l+"`");try{return l=l.replace(/\+/g," "),decodeURIComponent(l)}catch{return o(l)}},no}var io,hc;function _y(){return hc||(hc=1,io=(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 n=e.indexOf(t);return n===-1?[e]:[e.slice(0,n),e.slice(n+t.length)]}),io}var oo,mc;function Ey(){return mc||(mc=1,oo=function(e,t){for(var n={},r=Object.keys(e),s=Array.isArray(t),o=0;o<r.length;o++){var l=r[o],i=e[l];(s?t.indexOf(l)!==-1:t(l,i,e))&&(n[l]=i)}return n}),oo}var gc;function wy(){return gc||(gc=1,function(e){const t=yy(),n=vy(),r=_y(),s=Ey(),o=v=>v==null,l=Symbol("encodeFragmentIdentifier");function i(v){switch(v.arrayFormat){case"index":return w=>(x,O)=>{const F=x.length;return O===void 0||v.skipNull&&O===null||v.skipEmptyString&&O===""?x:O===null?[...x,[a(w,v),"[",F,"]"].join("")]:[...x,[a(w,v),"[",a(F,v),"]=",a(O,v)].join("")]};case"bracket":return w=>(x,O)=>O===void 0||v.skipNull&&O===null||v.skipEmptyString&&O===""?x:O===null?[...x,[a(w,v),"[]"].join("")]:[...x,[a(w,v),"[]=",a(O,v)].join("")];case"colon-list-separator":return w=>(x,O)=>O===void 0||v.skipNull&&O===null||v.skipEmptyString&&O===""?x:O===null?[...x,[a(w,v),":list="].join("")]:[...x,[a(w,v),":list=",a(O,v)].join("")];case"comma":case"separator":case"bracket-separator":{const w=v.arrayFormat==="bracket-separator"?"[]=":"=";return x=>(O,F)=>F===void 0||v.skipNull&&F===null||v.skipEmptyString&&F===""?O:(F=F===null?"":F,O.length===0?[[a(x,v),w,a(F,v)].join("")]:[[O,a(F,v)].join(v.arrayFormatSeparator)])}default:return w=>(x,O)=>O===void 0||v.skipNull&&O===null||v.skipEmptyString&&O===""?x:O===null?[...x,a(w,v)]:[...x,[a(w,v),"=",a(O,v)].join("")]}}function u(v){let w;switch(v.arrayFormat){case"index":return(x,O,F)=>{if(w=/\[(\d*)\]$/.exec(x),x=x.replace(/\[\d*\]$/,""),!w){F[x]=O;return}F[x]===void 0&&(F[x]={}),F[x][w[1]]=O};case"bracket":return(x,O,F)=>{if(w=/(\[\])$/.exec(x),x=x.replace(/\[\]$/,""),!w){F[x]=O;return}if(F[x]===void 0){F[x]=[O];return}F[x]=[].concat(F[x],O)};case"colon-list-separator":return(x,O,F)=>{if(w=/(:list)$/.exec(x),x=x.replace(/:list$/,""),!w){F[x]=O;return}if(F[x]===void 0){F[x]=[O];return}F[x]=[].concat(F[x],O)};case"comma":case"separator":return(x,O,F)=>{const D=typeof O=="string"&&O.includes(v.arrayFormatSeparator),R=typeof O=="string"&&!D&&d(O,v).includes(v.arrayFormatSeparator);O=R?d(O,v):O;const W=D||R?O.split(v.arrayFormatSeparator).map(V=>d(V,v)):O===null?O:d(O,v);F[x]=W};case"bracket-separator":return(x,O,F)=>{const D=/(\[\])$/.test(x);if(x=x.replace(/\[\]$/,""),!D){F[x]=O&&d(O,v);return}const R=O===null?[]:O.split(v.arrayFormatSeparator).map(W=>d(W,v));if(F[x]===void 0){F[x]=R;return}F[x]=[].concat(F[x],R)};default:return(x,O,F)=>{if(F[x]===void 0){F[x]=O;return}F[x]=[].concat(F[x],O)}}}function c(v){if(typeof v!="string"||v.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function a(v,w){return w.encode?w.strict?t(v):encodeURIComponent(v):v}function d(v,w){return w.decode?n(v):v}function f(v){return Array.isArray(v)?v.sort():typeof v=="object"?f(Object.keys(v)).sort((w,x)=>Number(w)-Number(x)).map(w=>v[w]):v}function p(v){const w=v.indexOf("#");return w!==-1&&(v=v.slice(0,w)),v}function h(v){let w="";const x=v.indexOf("#");return x!==-1&&(w=v.slice(x)),w}function y(v){v=p(v);const w=v.indexOf("?");return w===-1?"":v.slice(w+1)}function _(v,w){return w.parseNumbers&&!Number.isNaN(Number(v))&&typeof v=="string"&&v.trim()!==""?v=Number(v):w.parseBooleans&&v!==null&&(v.toLowerCase()==="true"||v.toLowerCase()==="false")&&(v=v.toLowerCase()==="true"),v}function S(v,w){w=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},w),c(w.arrayFormatSeparator);const x=u(w),O=Object.create(null);if(typeof v!="string"||(v=v.trim().replace(/^[?#&]/,""),!v))return O;for(const F of v.split("&")){if(F==="")continue;let[D,R]=r(w.decode?F.replace(/\+/g," "):F,"=");R=R===void 0?null:["comma","separator","bracket-separator"].includes(w.arrayFormat)?R:d(R,w),x(d(D,w),R,O)}for(const F of Object.keys(O)){const D=O[F];if(typeof D=="object"&&D!==null)for(const R of Object.keys(D))D[R]=_(D[R],w);else O[F]=_(D,w)}return w.sort===!1?O:(w.sort===!0?Object.keys(O).sort():Object.keys(O).sort(w.sort)).reduce((F,D)=>{const R=O[D];return R&&typeof R=="object"&&!Array.isArray(R)?F[D]=f(R):F[D]=R,F},Object.create(null))}e.extract=y,e.parse=S,e.stringify=(v,w)=>{if(!v)return"";w=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},w),c(w.arrayFormatSeparator);const x=R=>w.skipNull&&o(v[R])||w.skipEmptyString&&v[R]==="",O=i(w),F={};for(const R of Object.keys(v))x(R)||(F[R]=v[R]);const D=Object.keys(F);return w.sort!==!1&&D.sort(w.sort),D.map(R=>{const W=v[R];return W===void 0?"":W===null?a(R,w):Array.isArray(W)?W.length===0&&w.arrayFormat==="bracket-separator"?a(R,w)+"[]":W.reduce(O(R),[]).join("&"):a(R,w)+"="+a(W,w)}).filter(R=>R.length>0).join("&")},e.parseUrl=(v,w)=>{w=Object.assign({decode:!0},w);const[x,O]=r(v,"#");return Object.assign({url:x.split("?")[0]||"",query:S(y(v),w)},w&&w.parseFragmentIdentifier&&O?{fragmentIdentifier:d(O,w)}:{})},e.stringifyUrl=(v,w)=>{w=Object.assign({encode:!0,strict:!0,[l]:!0},w);const x=p(v.url).split("?")[0]||"",O=e.extract(v.url),F=e.parse(O,{sort:!1}),D=Object.assign(F,v.query);let R=e.stringify(D,w);R&&(R=`?${R}`);let W=h(v.url);return v.fragmentIdentifier&&(W=`#${w[l]?a(v.fragmentIdentifier,w):v.fragmentIdentifier}`),`${x}${R}${W}`},e.pick=(v,w,x)=>{x=Object.assign({parseFragmentIdentifier:!0,[l]:!1},x);const{url:O,query:F,fragmentIdentifier:D}=e.parseUrl(v,x);return e.stringifyUrl({url:O,query:s(F,w),fragmentIdentifier:D},x)},e.exclude=(v,w,x)=>{const O=Array.isArray(w)?F=>!w.includes(F):(F,D)=>!w(F,D);return e.pick(v,O,x)}}(to)),to}var yc;function by(){return yc||(yc=1,function(e,t){(function(n,r){e.exports=r(gy(),wy())})(ce,function(n,r){return function(){var s={897:function(u){u.exports=n},48:function(u){u.exports=r}},o={};function l(u){var c=o[u];if(c!==void 0)return c.exports;var a=o[u]={exports:{}};return s[u](a,a.exports,l),a.exports}l.d=function(u,c){for(var a in c)l.o(c,a)&&!l.o(u,a)&&Object.defineProperty(u,a,{enumerable:!0,get:c[a]})},l.o=function(u,c){return Object.prototype.hasOwnProperty.call(u,c)},l.r=function(u){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var i={};return function(){l.r(i),l.d(i,{getEntries:function(){return K},getEntry:function(){return $},setContext:function(){return y}});var u=l(897),c=l(48),a={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:d,SPACE:f,HOSTS:p}}=a;let h={apiKey:null,previewKey:null,environment:null,isPreview:!1,host:p.CDN,space:f};const y=({apiKey:Q,environment:C,isPreview:q=!1,location:Y,previewKey:oe,space:ee=null})=>{h.apiKey=Q,h.previewKey=oe,h.environment=(G=>{if(!G)throw new Error("Cannot map environment: Environment not defined");if(!d[G])throw new Error(`Cannot map environment: No mapping found for environment ${G}`);return d[G]})(C),h.isPreview=q||(G=>{let Z=!1;if(G&&G.search){const ae=(0,c.parse)(G.search);Z=ae.isPreview&&ae.isPreview==="true"}return Z})(Y),h.space=ee||f},_=(Q=!1)=>{const{apiKey:C,environment:q,isPreview:Y,previewKey:oe,space:ee}=h;return Y===!0||Q===!0?{accessToken:oe,environment:q,host:p.PREVIEW,space:ee}:{accessToken:C,environment:q,host:p.CDN,space:ee}},S=Q=>typeof Q=="object"&&Q!==null,v=Q=>Array.isArray(Q)&&Q.length,w=Q=>{if(!S(Q))throw new Error("Cannot flatten fields");const{fields:C,sys:q}=Q;if(!C)throw new Error("Cannot flatten fields");let Y={...C};if(S(q)){const{contentType:oe,createdAt:ee,updatedAt:G}=q;oe&&Object.assign(Y,{contentType:oe.sys.id}),ee&&Object.assign(Y,{createdAt:ee}),G&&Object.assign(Y,{updatedAt:G})}return Y},{CONTENTFUL:{LOCALES:x}}=a,O=(Q,C)=>S(Q)&&((q,Y)=>Object.prototype.hasOwnProperty.call(q,Y))(Q,C),F=(Q,C)=>{const q=(Y=>x.SUPPORTED.includes(Y)?Y:x.DEFAULT)(C);return O(Q,q)?Q[q]:O(Q,x.DEFAULT)?Q[x.DEFAULT]:Q},D=Q=>S(Q)&&Q.sys&&Q.sys.type==="Asset",R=(Q,C,q)=>{const{title:Y,file:oe}=w(Q);if(!oe)throw new Error("Cannot flatten asset");const{contentType:ee,fileName:G,url:Z,details:ae}=F(oe,C);if(!Z)throw new Error("Cannot flatten asset");return q?{description:Y||G,height:ae&&ae.image&&ae.image.height,type:ee,url:Z,width:ae&&ae.image&&ae.image.width}:Z},W=Q=>S(Q)&&Q.sys&&Q.sys.type==="Entry",V=(Q,C,q)=>{const Y={},oe=((ee,G)=>{const Z={};for(const[ae,Oe]of Object.entries(ee))Z[ae]=F(Oe,G);return Z})(w(Q),C);for(const[ee,G]of Object.entries(oe))D(G)?Y[ee]=R(G,C,q):W(G)?Y[ee]=V(G,C,q):v(G)?Y[ee]=G.map(Z=>D(Z)?R(Z,C,q):W(Z)?V(Z,C,q):Z):Y[ee]=G;return Y},L=({items:Q})=>{if(!v(Q))throw new Error("Cannot read items");return Q},U=async(Q,C)=>{const q=_(C);return await(await(0,u.createClient)(q)).getEntries(Q)},$=async(Q={},C={},q=!1)=>((Y,{flatten:oe=!0,locale:ee="en",assetDetails:G=!1})=>{const Z=L(Y);return oe?V(Z[0],ee,G):Z[0]})(await U(Q,q),{...Q,...C}),K=async(Q={},C={},q=!1)=>((Y,{flatten:oe=!0,locale:ee="en",assetDetails:G=!1})=>{const Z=L(Y);return oe?((ae,Oe,ie)=>ae.map(re=>V(re,Oe,ie)))(Z,ee,G):Z})(await U(Q,q),{...Q,...C})}(),i}()})}(li)),li.exports}var ao={exports:{}},so={exports:{}},co={exports:{}},uo={exports:{}},vc;function va(){return vc||(vc=1,function(e,t){(function(n,r){e.exports=r()})(ce,function(){function n(y){return!isNaN(parseFloat(y))&&isFinite(y)}function r(y){return y.charAt(0).toUpperCase()+y.substring(1)}function s(y){return function(){return this[y]}}var o=["isConstructor","isEval","isNative","isToplevel"],l=["columnNumber","lineNumber"],i=["fileName","functionName","source"],u=["args"],c=["evalOrigin"],a=o.concat(l,i,u,c);function d(y){if(y)for(var _=0;_<a.length;_++)y[a[_]]!==void 0&&this["set"+r(a[_])](y[a[_]])}d.prototype={getArgs:function(){return this.args},setArgs:function(y){if(Object.prototype.toString.call(y)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=y},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(y){if(y instanceof d)this.evalOrigin=y;else if(y instanceof Object)this.evalOrigin=new d(y);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var y=this.getFileName()||"",_=this.getLineNumber()||"",S=this.getColumnNumber()||"",v=this.getFunctionName()||"";return this.getIsEval()?y?"[eval] ("+y+":"+_+":"+S+")":"[eval]:"+_+":"+S:v?v+" ("+y+":"+_+":"+S+")":y+":"+_+":"+S}},d.fromString=function(_){var S=_.indexOf("("),v=_.lastIndexOf(")"),w=_.substring(0,S),x=_.substring(S+1,v).split(","),O=_.substring(v+1);if(O.indexOf("@")===0)var F=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(O,""),D=F[1],R=F[2],W=F[3];return new d({functionName:w,args:x||void 0,fileName:D,lineNumber:R||void 0,columnNumber:W||void 0})};for(var f=0;f<o.length;f++)d.prototype["get"+r(o[f])]=s(o[f]),d.prototype["set"+r(o[f])]=function(y){return function(_){this[y]=!!_}}(o[f]);for(var p=0;p<l.length;p++)d.prototype["get"+r(l[p])]=s(l[p]),d.prototype["set"+r(l[p])]=function(y){return function(_){if(!n(_))throw new TypeError(y+" must be a Number");this[y]=Number(_)}}(l[p]);for(var h=0;h<i.length;h++)d.prototype["get"+r(i[h])]=s(i[h]),d.prototype["set"+r(i[h])]=function(y){return function(_){this[y]=String(_)}}(i[h]);return d})}(uo)),uo.exports}var _c;function Sy(){return _c||(_c=1,function(e,t){(function(n,r){e.exports=r(va())})(ce,function(r){var s=/(^|@)\S+:\d+/,o=/^\s*at .*(\S+:\d+|\(native\))/m,l=/^(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 c=/(.+?)(?::(\d+))?(?::(\d+))?$/,a=c.exec(u.replace(/[()]/g,""));return[a[1],a[2]||void 0,a[3]||void 0]},parseV8OrIE:function(u){var c=u.stack.split(`
|
|
42
|
-
`).filter(function(a){return!!a.match(o)},this);return c.map(function(a){a.indexOf("(eval ")>-1&&(a=a.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var d=a.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),f=d.match(/ (\(.+\)$)/);d=f?d.replace(f[0],""):d;var p=this.extractLocation(f?f[1]:d),h=f&&d||void 0,y=["eval","<anonymous>"].indexOf(p[0])>-1?void 0:p[0];return new r({functionName:h,fileName:y,lineNumber:p[1],columnNumber:p[2],source:a})},this)},parseFFOrSafari:function(u){var c=u.stack.split(`
|
|
43
|
-
`).filter(function(a){return!a.match(l)},this);return c.map(function(a){if(a.indexOf(" > eval")>-1&&(a=a.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),a.indexOf("@")===-1&&a.indexOf(":")===-1)return new r({functionName:a});var d=/((.*".+"[^@]*)?[^@]*)(?:@)/,f=a.match(d),p=f&&f[1]?f[1]:void 0,h=this.extractLocation(a.replace(d,""));return new r({functionName:p,fileName:h[0],lineNumber:h[1],columnNumber:h[2],source:a})},this)},parseOpera:function(u){return!u.stacktrace||u.message.indexOf(`
|
|
44
|
-
`)>-1&&u.message.split(`
|
|
45
|
-
`).length>u.stacktrace.split(`
|
|
46
|
-
`).length?this.parseOpera9(u):u.stack?this.parseOpera11(u):this.parseOpera10(u)},parseOpera9:function(u){for(var c=/Line (\d+).*script (?:in )?(\S+)/i,a=u.message.split(`
|
|
47
|
-
`),d=[],f=2,p=a.length;f<p;f+=2){var h=c.exec(a[f]);h&&d.push(new r({fileName:h[2],lineNumber:h[1],source:a[f]}))}return d},parseOpera10:function(u){for(var c=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,a=u.stacktrace.split(`
|
|
48
|
-
`),d=[],f=0,p=a.length;f<p;f+=2){var h=c.exec(a[f]);h&&d.push(new r({functionName:h[3]||void 0,fileName:h[2],lineNumber:h[1],source:a[f]}))}return d},parseOpera11:function(u){var c=u.stack.split(`
|
|
49
|
-
`).filter(function(a){return!!a.match(s)&&!a.match(/^Error created at/)},this);return c.map(function(a){var d=a.split("@"),f=this.extractLocation(d.pop()),p=d.shift()||"",h=p.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,y;p.match(/\(([^)]*)\)/)&&(y=p.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var _=y===void 0||y==="[arguments not available]"?void 0:y.split(",");return new r({functionName:h,args:_,fileName:f[0],lineNumber:f[1],columnNumber:f[2],source:a})},this)}}})}(co)),co.exports}var lo={exports:{}},Ec;function Oy(){return Ec||(Ec=1,function(e,t){(function(n,r){e.exports=r(va())})(ce,function(n){return{backtrace:function(s){var o=[],l=10;typeof s=="object"&&typeof s.maxStackSize=="number"&&(l=s.maxStackSize);for(var i=arguments.callee;i&&o.length<l&&i.arguments;){for(var u=new Array(i.arguments.length),c=0;c<u.length;++c)u[c]=i.arguments[c];/function(?:\s+([\w$]+))+\s*\(/.test(i.toString())?o.push(new n({functionName:RegExp.$1||void 0,args:u})):o.push(new n({args:u}));try{i=i.caller}catch{break}}return o}}})}(lo)),lo.exports}var fo={exports:{}},gr={},po={},wc;function fl(){return wc||(wc=1,function(e){function t(v,w,x){if(w in v)return v[w];if(arguments.length===3)return x;throw new Error('"'+w+'" is a required argument.')}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,r=/^data:.+\,.+$/;function s(v){var w=v.match(n);return w?{scheme:w[1],auth:w[2],host:w[3],port:w[4],path:w[5]}:null}e.urlParse=s;function o(v){var w="";return v.scheme&&(w+=v.scheme+":"),w+="//",v.auth&&(w+=v.auth+"@"),v.host&&(w+=v.host),v.port&&(w+=":"+v.port),v.path&&(w+=v.path),w}e.urlGenerate=o;function l(v){var w=v,x=s(v);if(x){if(!x.path)return v;w=x.path}for(var O=e.isAbsolute(w),F=w.split(/\/+/),D,R=0,W=F.length-1;W>=0;W--)D=F[W],D==="."?F.splice(W,1):D===".."?R++:R>0&&(D===""?(F.splice(W+1,R),R=0):(F.splice(W,2),R--));return w=F.join("/"),w===""&&(w=O?"/":"."),x?(x.path=w,o(x)):w}e.normalize=l;function i(v,w){v===""&&(v="."),w===""&&(w=".");var x=s(w),O=s(v);if(O&&(v=O.path||"/"),x&&!x.scheme)return O&&(x.scheme=O.scheme),o(x);if(x||w.match(r))return w;if(O&&!O.host&&!O.path)return O.host=w,o(O);var F=w.charAt(0)==="/"?w:l(v.replace(/\/+$/,"")+"/"+w);return O?(O.path=F,o(O)):F}e.join=i,e.isAbsolute=function(v){return v.charAt(0)==="/"||!!v.match(n)};function u(v,w){v===""&&(v="."),v=v.replace(/\/$/,"");for(var x=0;w.indexOf(v+"/")!==0;){var O=v.lastIndexOf("/");if(O<0||(v=v.slice(0,O),v.match(/^([^\/]+:\/)?\/*$/)))return w;++x}return Array(x+1).join("../")+w.substr(v.length+1)}e.relative=u;var c=function(){var v=Object.create(null);return!("__proto__"in v)}();function a(v){return v}function d(v){return p(v)?"$"+v:v}e.toSetString=c?a:d;function f(v){return p(v)?v.slice(1):v}e.fromSetString=c?a:f;function p(v){if(!v)return!1;var w=v.length;if(w<9||v.charCodeAt(w-1)!==95||v.charCodeAt(w-2)!==95||v.charCodeAt(w-3)!==111||v.charCodeAt(w-4)!==116||v.charCodeAt(w-5)!==111||v.charCodeAt(w-6)!==114||v.charCodeAt(w-7)!==112||v.charCodeAt(w-8)!==95||v.charCodeAt(w-9)!==95)return!1;for(var x=w-10;x>=0;x--)if(v.charCodeAt(x)!==36)return!1;return!0}function h(v,w,x){var O=v.source-w.source;return O!==0||(O=v.originalLine-w.originalLine,O!==0)||(O=v.originalColumn-w.originalColumn,O!==0||x)||(O=v.generatedColumn-w.generatedColumn,O!==0)||(O=v.generatedLine-w.generatedLine,O!==0)?O:v.name-w.name}e.compareByOriginalPositions=h;function y(v,w,x){var O=v.generatedLine-w.generatedLine;return O!==0||(O=v.generatedColumn-w.generatedColumn,O!==0||x)||(O=v.source-w.source,O!==0)||(O=v.originalLine-w.originalLine,O!==0)||(O=v.originalColumn-w.originalColumn,O!==0)?O:v.name-w.name}e.compareByGeneratedPositionsDeflated=y;function _(v,w){return v===w?0:v>w?1:-1}function S(v,w){var x=v.generatedLine-w.generatedLine;return x!==0||(x=v.generatedColumn-w.generatedColumn,x!==0)||(x=_(v.source,w.source),x!==0)||(x=v.originalLine-w.originalLine,x!==0)||(x=v.originalColumn-w.originalColumn,x!==0)?x:_(v.name,w.name)}e.compareByGeneratedPositionsInflated=S}(po)),po}var ho={},bc;function Ty(){return bc||(bc=1,function(e){e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(n,r,s,o,l,i){var u=Math.floor((r-n)/2)+n,c=l(s,o[u],!0);return c===0?u:c>0?r-u>1?t(u,r,s,o,l,i):i==e.LEAST_UPPER_BOUND?r<o.length?r:-1:u:u-n>1?t(n,u,s,o,l,i):i==e.LEAST_UPPER_BOUND?u:n<0?-1:n}e.search=function(r,s,o,l){if(s.length===0)return-1;var i=t(-1,s.length,r,s,o,l||e.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&o(s[i],s[i-1],!0)===0;)--i;return i}}(ho)),ho}var mo={},Sc;function xy(){if(Sc)return mo;Sc=1;var e=fl(),t=Object.prototype.hasOwnProperty;function n(){this._array=[],this._set=Object.create(null)}return n.fromArray=function(s,o){for(var l=new n,i=0,u=s.length;i<u;i++)l.add(s[i],o);return l},n.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(s,o){var l=e.toSetString(s),i=t.call(this._set,l),u=this._array.length;(!i||o)&&this._array.push(s),i||(this._set[l]=u)},n.prototype.has=function(s){var o=e.toSetString(s);return t.call(this._set,o)},n.prototype.indexOf=function(s){var o=e.toSetString(s);if(t.call(this._set,o))return this._set[o];throw new Error('"'+s+'" is not in the set.')},n.prototype.at=function(s){if(s>=0&&s<this._array.length)return this._array[s];throw new Error("No element indexed by "+s)},n.prototype.toArray=function(){return this._array.slice()},mo.ArraySet=n,mo}var wn={},bn={},Oc;function Ay(){if(Oc)return bn;Oc=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return bn.encode=function(t){if(0<=t&&t<e.length)return e[t];throw new TypeError("Must be between 0 and 63: "+t)},bn.decode=function(t){var n=65,r=90,s=97,o=122,l=48,i=57,u=43,c=47,a=26,d=52;return n<=t&&t<=r?t-n:s<=t&&t<=o?t-s+a:l<=t&&t<=i?t-l+d:t==u?62:t==c?63:-1},bn}var Tc;function Ry(){if(Tc)return wn;Tc=1;var e=Ay(),t=5,n=1<<t,r=n-1,s=n;function o(i){return i<0?(-i<<1)+1:(i<<1)+0}function l(i){var u=(i&1)===1,c=i>>1;return u?-c:c}return wn.encode=function(u){var c="",a,d=o(u);do a=d&r,d>>>=t,d>0&&(a|=s),c+=e.encode(a);while(d>0);return c},wn.decode=function(u,c,a){var d=u.length,f=0,p=0,h,y;do{if(c>=d)throw new Error("Expected more digits in base 64 VLQ value.");if(y=e.decode(u.charCodeAt(c++)),y===-1)throw new Error("Invalid base64 digit: "+u.charAt(c-1));h=!!(y&s),y&=r,f=f+(y<<p),p+=t}while(h);a.value=l(f),a.rest=c},wn}var go={},xc;function Cy(){if(xc)return go;xc=1;function e(r,s,o){var l=r[s];r[s]=r[o],r[o]=l}function t(r,s){return Math.round(r+Math.random()*(s-r))}function n(r,s,o,l){if(o<l){var i=t(o,l),u=o-1;e(r,i,l);for(var c=r[l],a=o;a<l;a++)s(r[a],c)<=0&&(u+=1,e(r,u,a));e(r,u+1,a);var d=u+1;n(r,s,o,d-1),n(r,s,d+1,l)}}return go.quickSort=function(r,s){n(r,s,0,r.length-1)},go}var Ac;function Ny(){if(Ac)return gr;Ac=1;var e=fl(),t=Ty(),n=xy().ArraySet,r=Ry(),s=Cy().quickSort;function o(c){var a=c;return typeof c=="string"&&(a=JSON.parse(c.replace(/^\)\]\}'/,""))),a.sections!=null?new u(a):new l(a)}o.fromSourceMap=function(c){return l.fromSourceMap(c)},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(a,d){var f=a.charAt(d);return f===";"||f===","},o.prototype._parseMappings=function(a,d){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(a,d,f){var p=d||null,h=f||o.GENERATED_ORDER,y;switch(h){case o.GENERATED_ORDER:y=this._generatedMappings;break;case o.ORIGINAL_ORDER:y=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var _=this.sourceRoot;y.map(function(S){var v=S.source===null?null:this._sources.at(S.source);return v!=null&&_!=null&&(v=e.join(_,v)),{source:v,generatedLine:S.generatedLine,generatedColumn:S.generatedColumn,originalLine:S.originalLine,originalColumn:S.originalColumn,name:S.name===null?null:this._names.at(S.name)}},this).forEach(a,p)},o.prototype.allGeneratedPositionsFor=function(a){var d=e.getArg(a,"line"),f={source:e.getArg(a,"source"),originalLine:d,originalColumn:e.getArg(a,"column",0)};if(this.sourceRoot!=null&&(f.source=e.relative(this.sourceRoot,f.source)),!this._sources.has(f.source))return[];f.source=this._sources.indexOf(f.source);var p=[],h=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(h>=0){var y=this._originalMappings[h];if(a.column===void 0)for(var _=y.originalLine;y&&y.originalLine===_;)p.push({line:e.getArg(y,"generatedLine",null),column:e.getArg(y,"generatedColumn",null),lastColumn:e.getArg(y,"lastGeneratedColumn",null)}),y=this._originalMappings[++h];else for(var S=y.originalColumn;y&&y.originalLine===d&&y.originalColumn==S;)p.push({line:e.getArg(y,"generatedLine",null),column:e.getArg(y,"generatedColumn",null),lastColumn:e.getArg(y,"lastGeneratedColumn",null)}),y=this._originalMappings[++h]}return p},gr.SourceMapConsumer=o;function l(c){var a=c;typeof c=="string"&&(a=JSON.parse(c.replace(/^\)\]\}'/,"")));var d=e.getArg(a,"version"),f=e.getArg(a,"sources"),p=e.getArg(a,"names",[]),h=e.getArg(a,"sourceRoot",null),y=e.getArg(a,"sourcesContent",null),_=e.getArg(a,"mappings"),S=e.getArg(a,"file",null);if(d!=this._version)throw new Error("Unsupported version: "+d);f=f.map(String).map(e.normalize).map(function(v){return h&&e.isAbsolute(h)&&e.isAbsolute(v)?e.relative(h,v):v}),this._names=n.fromArray(p.map(String),!0),this._sources=n.fromArray(f,!0),this.sourceRoot=h,this.sourcesContent=y,this._mappings=_,this.file=S}l.prototype=Object.create(o.prototype),l.prototype.consumer=o,l.fromSourceMap=function(a){var d=Object.create(l.prototype),f=d._names=n.fromArray(a._names.toArray(),!0),p=d._sources=n.fromArray(a._sources.toArray(),!0);d.sourceRoot=a._sourceRoot,d.sourcesContent=a._generateSourcesContent(d._sources.toArray(),d.sourceRoot),d.file=a._file;for(var h=a._mappings.toArray().slice(),y=d.__generatedMappings=[],_=d.__originalMappings=[],S=0,v=h.length;S<v;S++){var w=h[S],x=new i;x.generatedLine=w.generatedLine,x.generatedColumn=w.generatedColumn,w.source&&(x.source=p.indexOf(w.source),x.originalLine=w.originalLine,x.originalColumn=w.originalColumn,w.name&&(x.name=f.indexOf(w.name)),_.push(x)),y.push(x)}return s(d.__originalMappings,e.compareByOriginalPositions),d},l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){return this._sources.toArray().map(function(c){return this.sourceRoot!=null?e.join(this.sourceRoot,c):c},this)}});function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}l.prototype._parseMappings=function(a,d){for(var f=1,p=0,h=0,y=0,_=0,S=0,v=a.length,w=0,x={},O={},F=[],D=[],R,W,V,L,U;w<v;)if(a.charAt(w)===";")f++,w++,p=0;else if(a.charAt(w)===",")w++;else{for(R=new i,R.generatedLine=f,L=w;L<v&&!this._charIsMappingSeparator(a,L);L++);if(W=a.slice(w,L),V=x[W],V)w+=W.length;else{for(V=[];w<L;)r.decode(a,w,O),U=O.value,w=O.rest,V.push(U);if(V.length===2)throw new Error("Found a source, but no line and column");if(V.length===3)throw new Error("Found a source and line, but no column");x[W]=V}R.generatedColumn=p+V[0],p=R.generatedColumn,V.length>1&&(R.source=_+V[1],_+=V[1],R.originalLine=h+V[2],h=R.originalLine,R.originalLine+=1,R.originalColumn=y+V[3],y=R.originalColumn,V.length>4&&(R.name=S+V[4],S+=V[4])),D.push(R),typeof R.originalLine=="number"&&F.push(R)}s(D,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=D,s(F,e.compareByOriginalPositions),this.__originalMappings=F},l.prototype._findMapping=function(a,d,f,p,h,y){if(a[f]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+a[f]);if(a[p]<0)throw new TypeError("Column must be greater than or equal to 0, got "+a[p]);return t.search(a,d,h,y)},l.prototype.computeColumnSpans=function(){for(var a=0;a<this._generatedMappings.length;++a){var d=this._generatedMappings[a];if(a+1<this._generatedMappings.length){var f=this._generatedMappings[a+1];if(d.generatedLine===f.generatedLine){d.lastGeneratedColumn=f.generatedColumn-1;continue}}d.lastGeneratedColumn=1/0}},l.prototype.originalPositionFor=function(a){var d={generatedLine:e.getArg(a,"line"),generatedColumn:e.getArg(a,"column")},f=this._findMapping(d,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(a,"bias",o.GREATEST_LOWER_BOUND));if(f>=0){var p=this._generatedMappings[f];if(p.generatedLine===d.generatedLine){var h=e.getArg(p,"source",null);h!==null&&(h=this._sources.at(h),this.sourceRoot!=null&&(h=e.join(this.sourceRoot,h)));var y=e.getArg(p,"name",null);return y!==null&&(y=this._names.at(y)),{source:h,line:e.getArg(p,"originalLine",null),column:e.getArg(p,"originalColumn",null),name:y}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(a){return a==null}):!1},l.prototype.sourceContentFor=function(a,d){if(!this.sourcesContent)return null;if(this.sourceRoot!=null&&(a=e.relative(this.sourceRoot,a)),this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];var f;if(this.sourceRoot!=null&&(f=e.urlParse(this.sourceRoot))){var p=a.replace(/^file:\/\//,"");if(f.scheme=="file"&&this._sources.has(p))return this.sourcesContent[this._sources.indexOf(p)];if((!f.path||f.path=="/")&&this._sources.has("/"+a))return this.sourcesContent[this._sources.indexOf("/"+a)]}if(d)return null;throw new Error('"'+a+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(a){var d=e.getArg(a,"source");if(this.sourceRoot!=null&&(d=e.relative(this.sourceRoot,d)),!this._sources.has(d))return{line:null,column:null,lastColumn:null};d=this._sources.indexOf(d);var f={source:d,originalLine:e.getArg(a,"line"),originalColumn:e.getArg(a,"column")},p=this._findMapping(f,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(a,"bias",o.GREATEST_LOWER_BOUND));if(p>=0){var h=this._originalMappings[p];if(h.source===f.source)return{line:e.getArg(h,"generatedLine",null),column:e.getArg(h,"generatedColumn",null),lastColumn:e.getArg(h,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},gr.BasicSourceMapConsumer=l;function u(c){var a=c;typeof c=="string"&&(a=JSON.parse(c.replace(/^\)\]\}'/,"")));var d=e.getArg(a,"version"),f=e.getArg(a,"sections");if(d!=this._version)throw new Error("Unsupported version: "+d);this._sources=new n,this._names=new n;var p={line:-1,column:0};this._sections=f.map(function(h){if(h.url)throw new Error("Support for url field in sections not implemented.");var y=e.getArg(h,"offset"),_=e.getArg(y,"line"),S=e.getArg(y,"column");if(_<p.line||_===p.line&&S<p.column)throw new Error("Section offsets must be ordered and non-overlapping.");return p=y,{generatedOffset:{generatedLine:_+1,generatedColumn:S+1},consumer:new o(e.getArg(h,"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 c=[],a=0;a<this._sections.length;a++)for(var d=0;d<this._sections[a].consumer.sources.length;d++)c.push(this._sections[a].consumer.sources[d]);return c}}),u.prototype.originalPositionFor=function(a){var d={generatedLine:e.getArg(a,"line"),generatedColumn:e.getArg(a,"column")},f=t.search(d,this._sections,function(h,y){var _=h.generatedLine-y.generatedOffset.generatedLine;return _||h.generatedColumn-y.generatedOffset.generatedColumn}),p=this._sections[f];return p?p.consumer.originalPositionFor({line:d.generatedLine-(p.generatedOffset.generatedLine-1),column:d.generatedColumn-(p.generatedOffset.generatedLine===d.generatedLine?p.generatedOffset.generatedColumn-1:0),bias:a.bias}):{source:null,line:null,column:null,name:null}},u.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(a){return a.consumer.hasContentsOfAllSources()})},u.prototype.sourceContentFor=function(a,d){for(var f=0;f<this._sections.length;f++){var p=this._sections[f],h=p.consumer.sourceContentFor(a,!0);if(h)return h}if(d)return null;throw new Error('"'+a+'" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(a){for(var d=0;d<this._sections.length;d++){var f=this._sections[d];if(f.consumer.sources.indexOf(e.getArg(a,"source"))!==-1){var p=f.consumer.generatedPositionFor(a);if(p){var h={line:p.line+(f.generatedOffset.generatedLine-1),column:p.column+(f.generatedOffset.generatedLine===p.line?f.generatedOffset.generatedColumn-1:0)};return h}}}return{line:null,column:null}},u.prototype._parseMappings=function(a,d){this.__generatedMappings=[],this.__originalMappings=[];for(var f=0;f<this._sections.length;f++)for(var p=this._sections[f],h=p.consumer._generatedMappings,y=0;y<h.length;y++){var _=h[y],S=p.consumer._sources.at(_.source);p.consumer.sourceRoot!==null&&(S=e.join(p.consumer.sourceRoot,S)),this._sources.add(S),S=this._sources.indexOf(S);var v=p.consumer._names.at(_.name);this._names.add(v),v=this._names.indexOf(v);var w={source:S,generatedLine:_.generatedLine+(p.generatedOffset.generatedLine-1),generatedColumn:_.generatedColumn+(p.generatedOffset.generatedLine===_.generatedLine?p.generatedOffset.generatedColumn-1:0),originalLine:_.originalLine,originalColumn:_.originalColumn,name:v};this.__generatedMappings.push(w),typeof w.originalLine=="number"&&this.__originalMappings.push(w)}s(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),s(this.__originalMappings,e.compareByOriginalPositions)},gr.IndexedSourceMapConsumer=u,gr}var Rc;function Py(){return Rc||(Rc=1,function(e,t){(function(n,r){e.exports=r(Ny(),va())})(ce,function(n,r){function s(f){return new Promise(function(p,h){var y=new XMLHttpRequest;y.open("get",f),y.onerror=h,y.onreadystatechange=function(){y.readyState===4&&(y.status>=200&&y.status<300||f.substr(0,7)==="file://"&&y.responseText?p(y.responseText):h(new Error("HTTP status: "+y.status+" retrieving "+f)))},y.send()})}function o(f){if(typeof window<"u"&&window.atob)return window.atob(f);throw new Error("You must supply a polyfill for window.atob in this environment")}function l(f){if(typeof JSON<"u"&&JSON.parse)return JSON.parse(f);throw new Error("You must supply a polyfill for JSON.parse in this environment")}function i(f,p){for(var h=[/['"]?([$_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*=>/],y=f.split(`
|
|
50
|
-
`),_="",S=Math.min(p,20),v=0;v<S;++v){var w=y[p-v-1],x=w.indexOf("//");if(x>=0&&(w=w.substr(0,x)),w){_=w+_;for(var O=h.length,F=0;F<O;F++){var D=h[F].exec(_);if(D&&D[1])return D[1]}}}}function u(){if(typeof Object.defineProperty!="function"||typeof Object.create!="function")throw new Error("Unable to consume source maps in older browsers")}function c(f){if(typeof f!="object")throw new TypeError("Given StackFrame is not an object");if(typeof f.fileName!="string")throw new TypeError("Given file name is not a String");if(typeof f.lineNumber!="number"||f.lineNumber%1!==0||f.lineNumber<1)throw new TypeError("Given line number must be a positive integer");if(typeof f.columnNumber!="number"||f.columnNumber%1!==0||f.columnNumber<0)throw new TypeError("Given column number must be a non-negative integer");return!0}function a(f){for(var p=/\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/mg,h,y;y=p.exec(f);)h=y[1];if(h)return h;throw new Error("sourceMappingURL not found")}function d(f,p,h){return new Promise(function(y,_){var S=p.originalPositionFor({line:f.lineNumber,column:f.columnNumber});if(S.source){var v=p.sourceContentFor(S.source);v&&(h[S.source]=v),y(new r({functionName:S.name||f.functionName,args:f.args,fileName:S.source,lineNumber:S.line,columnNumber:S.column}))}else _(new Error("Could not get original source for given stackframe and source map"))})}return function f(p){if(!(this instanceof f))return new f(p);p=p||{},this.sourceCache=p.sourceCache||{},this.sourceMapConsumerCache=p.sourceMapConsumerCache||{},this.ajax=p.ajax||s,this._atob=p.atob||o,this._get=function(y){return new Promise((function(_,S){var v=y.substr(0,5)==="data:";if(this.sourceCache[y])_(this.sourceCache[y]);else if(p.offline&&!v)S(new Error("Cannot make network requests in offline mode"));else if(v){var w=/^data:application\/json;([\w=:"-]+;)*base64,/,x=y.match(w);if(x){var O=x[0].length,F=y.substr(O),D=this._atob(F);this.sourceCache[y]=D,_(D)}else S(new Error("The encoding of the inline sourcemap is not supported"))}else{var R=this.ajax(y,{method:"get"});this.sourceCache[y]=R,R.then(_,S)}}).bind(this))},this._getSourceMapConsumer=function(y,_){return new Promise((function(S){if(this.sourceMapConsumerCache[y])S(this.sourceMapConsumerCache[y]);else{var v=new Promise((function(w,x){return this._get(y).then(function(O){typeof O=="string"&&(O=l(O.replace(/^\)\]\}'/,""))),typeof O.sourceRoot>"u"&&(O.sourceRoot=_),w(new n.SourceMapConsumer(O))}).catch(x)}).bind(this));this.sourceMapConsumerCache[y]=v,S(v)}}).bind(this))},this.pinpoint=function(y){return new Promise((function(_,S){this.getMappedLocation(y).then((function(v){function w(){_(v)}this.findFunctionName(v).then(_,w).catch(w)}).bind(this),S)}).bind(this))},this.findFunctionName=function(y){return new Promise((function(_,S){c(y),this._get(y.fileName).then(function(w){var x=y.lineNumber,O=y.columnNumber,F=i(w,x);_(F?new r({functionName:F,args:y.args,fileName:y.fileName,lineNumber:x,columnNumber:O}):y)},S).catch(S)}).bind(this))},this.getMappedLocation=function(y){return new Promise((function(_,S){u(),c(y);var v=this.sourceCache,w=y.fileName;this._get(w).then((function(x){var O=a(x),F=O.substr(0,5)==="data:",D=w.substring(0,w.lastIndexOf("/")+1);return O[0]!=="/"&&!F&&!/^https?:\/\/|^\/\//i.test(O)&&(O=D+O),this._getSourceMapConsumer(O,D).then(function(R){return d(y,R,v).then(_).catch(function(){_(y)})})}).bind(this),S).catch(S)}).bind(this))}}})}(fo)),fo.exports}var Cc;function Iy(){return Cc||(Cc=1,function(e,t){(function(n,r){e.exports=r(Sy(),Oy(),Py())})(ce,function(r,s,o){var l={filter:function(d){return(d.functionName||"").indexOf("StackTrace$$")===-1&&(d.functionName||"").indexOf("ErrorStackParser$$")===-1&&(d.functionName||"").indexOf("StackTraceGPS$$")===-1&&(d.functionName||"").indexOf("StackGenerator$$")===-1},sourceCache:{}},i=function(){try{throw new Error}catch(f){return f}};function u(d,f){var p={};return[d,f].forEach(function(h){for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&(p[y]=h[y]);return p}),p}function c(d){return d.stack||d["opera#sourceloc"]}function a(d,f){return typeof f=="function"?d.filter(f):d}return{get:function(f){var p=i();return c(p)?this.fromError(p,f):this.generateArtificially(f)},getSync:function(f){f=u(l,f);var p=i(),h=c(p)?r.parse(p):s.backtrace(f);return a(h,f.filter)},fromError:function(f,p){p=u(l,p);var h=new o(p);return new Promise((function(y){var _=a(r.parse(f),p.filter);y(Promise.all(_.map(function(S){return new Promise(function(v){function w(){v(S)}h.pinpoint(S).then(v,w).catch(w)})})))}).bind(this))},generateArtificially:function(f){f=u(l,f);var p=s.backtrace(f);return typeof f.filter=="function"&&(p=p.filter(f.filter)),Promise.resolve(p)},instrument:function(f,p,h,y){if(typeof f!="function")throw new Error("Cannot instrument non-function object");if(typeof f.__stacktraceOriginalFn=="function")return f;var _=(function(){try{return this.get().then(p,h).catch(h),f.apply(y||this,arguments)}catch(v){throw c(v)&&this.fromError(v).then(p,h).catch(h),v}}).bind(this);return _.__stacktraceOriginalFn=f,_},deinstrument:function(f){if(typeof f!="function")throw new Error("Cannot de-instrument non-function object");return typeof f.__stacktraceOriginalFn=="function"?f.__stacktraceOriginalFn:f},report:function(f,p,h,y){return new Promise(function(_,S){var v=new XMLHttpRequest;if(v.onerror=S,v.onreadystatechange=function(){v.readyState===4&&(v.status>=200&&v.status<400?_(v.responseText):S(new Error("POST to "+p+" failed with status: "+v.status)))},v.open("post",p),v.setRequestHeader("Content-Type","application/json"),y&&typeof y.headers=="object"){var w=y.headers;for(var x in w)Object.prototype.hasOwnProperty.call(w,x)&&v.setRequestHeader(x,w[x])}var O={stack:f};h!=null&&(O.message=h),v.send(JSON.stringify(O))})}}})}(so)),so.exports}var yo,Nc;function ky(){if(Nc)return yo;Nc=1;var e=Iy(),t="https://clouderrorreporting.googleapis.com/v1beta1/projects/",n=function(){};n.prototype.start=function(l){if(!l.key&&!l.targetUrl&&!l.customReportingFunction)throw new Error("Cannot initialize: No API key, target url or custom reporting function provided.");if(!l.projectId&&!l.targetUrl&&!l.customReportingFunction)throw new Error("Cannot initialize: No project ID, target url or custom reporting function provided.");this.customReportingFunction=l.customReportingFunction,this.apiKey=l.key,this.projectId=l.projectId,this.targetUrl=l.targetUrl,this.context=l.context||{},this.serviceContext={service:l.service||"web"},l.version&&(this.serviceContext.version=l.version),this.reportUncaughtExceptions=l.reportUncaughtExceptions!==!1,this.reportUnhandledPromiseRejections=l.reportUnhandledPromiseRejections!==!1,this.disabled=!!l.disabled,r(this)};function r(l){var i=function(){};if(l.reportUncaughtExceptions){var u=window.onerror||i;window.onerror=function(a,d,f,p,h){return h&&l.report(h).catch(i),u(a,d,f,p,h),!0}}if(l.reportUnhandledPromiseRejections){var c=window.onunhandledrejection||i;window.onunhandledrejection=function(a){return a&&l.report(a.reason).catch(i),c(a.reason),!0}}}n.prototype.report=function(l,i){if(this.disabled)return Promise.resolve(null);if(!l)return Promise.reject(new Error("no error to report"));i=i||{};var u={};u.serviceContext=this.serviceContext,u.context=this.context,u.context.httpRequest={userAgent:window.navigator.userAgent,url:window.location.href};var c=0;if(typeof l=="string"||l instanceof String){try{throw new Error(l)}catch(f){l=f}c=i.skipLocalFrames||1}var a=this.targetUrl||t+this.projectId+"/events:report?key="+this.apiKey,d=this.customReportingFunction;return s(l,c).then(function(f){return u.message=f,d?d(u):o(a,u)})};function s(l,i){return e.fromError(l).then(function(u){for(var c=[l.toString()],a=i;a<u.length;a++)c.push([" at ",u[a].getFunctionName()||"<anonymous>"," (",u[a].getFileName(),":",u[a].getLineNumber(),":",u[a].getColumnNumber(),")"].join(""));return c.join(`
|
|
51
|
-
`)},function(u){return["Error extracting stack trace: ",u,`
|
|
52
|
-
`,l.toString(),`
|
|
53
|
-
`," (",l.file,":",l.line,":",l.column,")"].join("")})}function o(l,i){var u=new XMLHttpRequest;return u.open("POST",l,!0),u.setRequestHeader("Content-Type","application/json; charset=UTF-8"),new Promise(function(c,a){u.onreadystatechange=function(){if(u.readyState===4){var d=u.status;if(d>=200&&d<300)c({message:i.message});else if(d===429)a({message:"quota or rate limiting error on stackdriver report",name:"Http429FakeError"});else{var f=d?d+" http response":"network error";a(new Error(f+" on stackdriver report"))}}},u.send(JSON.stringify(i))})}return n.prototype.setUser=function(l){this.context.user=l},yo=n,yo}var Pc;function Ly(){return Pc||(Pc=1,function(e,t){(function(n,r){e.exports=r(ky())})(ce,function(n){return function(){var r={542:function(i){i.exports=n}},s={};function o(i){var u=s[i];if(u!==void 0)return u.exports;var c=s[i]={exports:{}};return r[i](c,c.exports,o),c.exports}o.n=function(i){var u=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(u,{a:u}),u},o.d=function(i,u){for(var c in u)o.o(u,c)&&!o.o(i,c)&&Object.defineProperty(i,c,{enumerable:!0,get:u[c]})},o.o=function(i,u){return Object.prototype.hasOwnProperty.call(i,u)},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var l={};return function(){o.r(l),o.d(l,{reportError:function(){return f},setContext:function(){return d}});var i=o(542),u=o.n(i);const{GCP:{PROJECT_ID:c}}={GCP:{PROJECT_ID:"hazel-tea-194609"}};let a={key:null,environment:null,projectId:c};const d=({apiKey:p,environment:h,projectId:y,serviceName:_})=>{if(!p)throw new Error("Cannot set context: REACT_APP_GCP_ERRORS_API_KEY not defined");if(a.key=p,!h)throw new Error("Cannot set context: Environment not defined");a.environment=h,a.projectId=y||c,_&&(a.service=`${_}:${a.environment}`)},f=async(p,h)=>{try{const y=new(u());y.start(a),typeof h=="string"&&y.setUser(h),await y.report(p)}catch(y){console.warn(`Cannot report error: ${y.message}`)}}}(),l}()})}(ao)),ao.exports}var vo={exports:{}},Sn={},Ic;function Fy(){if(Ic)return Sn;Ic=1,Object.defineProperty(Sn,"__esModule",{value:!0});var e=function(n){console.warn("[react-gtm]",n)};return Sn.default=e,Sn}var _o,kc;function jy(){if(kc)return _o;kc=1;var e=Fy(),t=n(e);function n(s){return s&&s.__esModule?s:{default:s}}var r={tags:function(o){var l=o.id,i=o.events,u=o.dataLayer,c=o.dataLayerName,a=o.preview,d=o.auth,f=">m_auth="+d,p=">m_preview="+a;l||(0,t.default)("GTM Id is required");var h=`
|
|
54
|
-
<iframe src="https://www.googletagmanager.com/ns.html?id=`+l+f+p+`>m_cookies_win=x"
|
|
55
|
-
height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>`,y=`
|
|
56
|
-
(function(w,d,s,l,i){w[l]=w[l]||[];
|
|
57
|
-
w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', `+JSON.stringify(i).slice(1,-1)+`});
|
|
58
|
-
var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
|
|
59
|
-
j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'`+f+p+`>m_cookies_win=x';
|
|
60
|
-
f.parentNode.insertBefore(j,f);
|
|
61
|
-
})(window,document,'script','`+c+"','"+l+"');",_=this.dataLayer(u,c);return{iframe:h,script:y,dataLayerVar:_}},dataLayer:function(o,l){return`
|
|
62
|
-
window.`+l+" = window."+l+` || [];
|
|
63
|
-
window.`+l+".push("+JSON.stringify(o)+")"}};return _o=r,_o}var Eo,Lc;function My(){if(Lc)return Eo;Lc=1;var e=jy(),t=n(e);function n(s){return s&&s.__esModule?s:{default:s}}var r={dataScript:function(o){var l=document.createElement("script");return l.innerHTML=o,l},gtm:function(o){var l=t.default.tags(o),i=function(){var d=document.createElement("noscript");return d.innerHTML=l.iframe,d},u=function(){var d=document.createElement("script");return d.innerHTML=l.script,d},c=this.dataScript(l.dataLayerVar);return{noScript:i,script:u,dataScript:c}},initialize:function(o){var l=o.gtmId,i=o.events,u=i===void 0?{}:i,c=o.dataLayer,a=o.dataLayerName,d=a===void 0?"dataLayer":a,f=o.auth,p=f===void 0?"":f,h=o.preview,y=h===void 0?"":h,_=this.gtm({id:l,events:u,dataLayer:c||void 0,dataLayerName:d,auth:p,preview:y});c&&document.head.appendChild(_.dataScript),document.head.insertBefore(_.script(),document.head.childNodes[0]),document.body.insertBefore(_.noScript(),document.body.childNodes[0])},dataLayer:function(o){var l=o.dataLayer,i=o.dataLayerName,u=i===void 0?"dataLayer":i;if(window[u])return window[u].push(l);var c=t.default.dataLayer(l,u),a=this.dataScript(c);document.head.insertBefore(a,document.head.childNodes[0])}};return Eo=r,Eo}var wo,Fc;function Dy(){if(Fc)return wo;Fc=1;var e=My(),t=n(e);function n(r){return r&&r.__esModule?r:{default:r}}return wo=t.default,wo}var jc;function Uy(){return jc||(jc=1,function(e,t){(function(n,r){e.exports=r(Dy())})(ce,function(n){return function(){var r={273:function(i){i.exports=n}},s={};function o(i){var u=s[i];if(u!==void 0)return u.exports;var c=s[i]={exports:{}};return r[i](c,c.exports,o),c.exports}o.n=function(i){var u=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(u,{a:u}),u},o.d=function(i,u){for(var c in u)o.o(u,c)&&!o.o(i,c)&&Object.defineProperty(i,c,{enumerable:!0,get:u[c]})},o.o=function(i,u){return Object.prototype.hasOwnProperty.call(i,u)},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var l={};return function(){o.r(l),o.d(l,{setContext:function(){return a},setupGTM:function(){return f}});var i=o(273),u=o.n(i);let c=null;const a=({configs:p,environment:h})=>{if(!h)throw new Error("Cannot set context: Environment not defined");if(!p)throw new Error("Cannot set context: REACT_APP_GTM_ID not defined");if(!p[h])throw new Error(`Cannot set context: REACT_APP_GTM_ID not defined for environment - ${JSON.stringify({configs:p,environment:h})}`);c=p[h]},d=()=>c,f=()=>{const p=d();u().initialize({gtmId:p.id})}}(),l}()})}(vo)),vo.exports}var dl=202,pl=502,hl=400,ml=409,gl=100,yl=201,vl=417,By=424,_l=403,El=504,wl=410,bl=505,Sl=418,Ol=419,Tl=507,xl=500,Al=411,Rl=423,Cl=420,Nl=405,Pl=301,Il=302,kl=207,Ll=300,Fl=511,jl=204,Ml=203,Dl=406,Ul=404,Bl=501,$l=304,ql=200,Hl=206,Wl=402,Gl=308,Vl=412,Ql=428,zl=102,Yl=407,Kl=431,Jl=408,Xl=413,Zl=414,ef=416,tf=205,rf=303,nf=503,of=101,af=307,sf=429,cf=401,uf=422,lf=415,ff=305;const $y={ACCEPTED:dl,BAD_GATEWAY:pl,BAD_REQUEST:hl,CONFLICT:ml,CONTINUE:gl,CREATED:yl,EXPECTATION_FAILED:vl,FORBIDDEN:_l,GATEWAY_TIMEOUT:El,GONE:wl,HTTP_VERSION_NOT_SUPPORTED:bl,IM_A_TEAPOT:Sl,INSUFFICIENT_SPACE_ON_RESOURCE:Ol,INSUFFICIENT_STORAGE:Tl,INTERNAL_SERVER_ERROR:xl,LENGTH_REQUIRED:Al,LOCKED:Rl,METHOD_FAILURE:Cl,METHOD_NOT_ALLOWED:Nl,MOVED_PERMANENTLY:Pl,MOVED_TEMPORARILY:Il,MULTI_STATUS:kl,MULTIPLE_CHOICES:Ll,NETWORK_AUTHENTICATION_REQUIRED:Fl,NO_CONTENT:jl,NON_AUTHORITATIVE_INFORMATION:Ml,NOT_ACCEPTABLE:Dl,NOT_FOUND:Ul,NOT_IMPLEMENTED:Bl,NOT_MODIFIED:$l,OK:ql,PARTIAL_CONTENT:Hl,PAYMENT_REQUIRED:Wl,PERMANENT_REDIRECT:Gl,PRECONDITION_FAILED:Vl,PRECONDITION_REQUIRED:Ql,PROCESSING:zl,PROXY_AUTHENTICATION_REQUIRED:Yl,REQUEST_HEADER_FIELDS_TOO_LARGE:Kl,REQUEST_TIMEOUT:Jl,REQUEST_TOO_LONG:Xl,REQUEST_URI_TOO_LONG:Zl,REQUESTED_RANGE_NOT_SATISFIABLE:ef,RESET_CONTENT:tf,SEE_OTHER:rf,SERVICE_UNAVAILABLE:nf,SWITCHING_PROTOCOLS:of,TEMPORARY_REDIRECT:af,TOO_MANY_REQUESTS:sf,UNAUTHORIZED:cf,UNPROCESSABLE_ENTITY:uf,UNSUPPORTED_MEDIA_TYPE:lf,USE_PROXY:ff};var qy={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"},Hy={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 df(e){var t=qy[e.toString()];if(!t)throw new Error("Status code does not exist: "+e);return t}function pf(e){var t=Hy[e];if(!t)throw new Error("Reason phrase does not exist: "+e);return t}var hf=df,Zo;(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"})(Zo||(Zo={}));var ea;(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"})(ea||(ea={}));var Un=globalThis&&globalThis.__assign||function(){return Un=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},Un.apply(this,arguments)};const Wy=Un(Un({},$y),{getStatusCode:pf,getStatusText:hf}),Gy=Object.freeze(Object.defineProperty({__proto__:null,ACCEPTED:dl,BAD_GATEWAY:pl,BAD_REQUEST:hl,CONFLICT:ml,CONTINUE:gl,CREATED:yl,EXPECTATION_FAILED:vl,FAILED_DEPENDENCY:By,FORBIDDEN:_l,GATEWAY_TIMEOUT:El,GONE:wl,HTTP_VERSION_NOT_SUPPORTED:bl,IM_A_TEAPOT:Sl,INSUFFICIENT_SPACE_ON_RESOURCE:Ol,INSUFFICIENT_STORAGE:Tl,INTERNAL_SERVER_ERROR:xl,LENGTH_REQUIRED:Al,LOCKED:Rl,METHOD_FAILURE:Cl,METHOD_NOT_ALLOWED:Nl,MOVED_PERMANENTLY:Pl,MOVED_TEMPORARILY:Il,MULTIPLE_CHOICES:Ll,MULTI_STATUS:kl,NETWORK_AUTHENTICATION_REQUIRED:Fl,NON_AUTHORITATIVE_INFORMATION:Ml,NOT_ACCEPTABLE:Dl,NOT_FOUND:Ul,NOT_IMPLEMENTED:Bl,NOT_MODIFIED:$l,NO_CONTENT:jl,OK:ql,PARTIAL_CONTENT:Hl,PAYMENT_REQUIRED:Wl,PERMANENT_REDIRECT:Gl,PRECONDITION_FAILED:Vl,PRECONDITION_REQUIRED:Ql,PROCESSING:zl,PROXY_AUTHENTICATION_REQUIRED:Yl,REQUESTED_RANGE_NOT_SATISFIABLE:ef,REQUEST_HEADER_FIELDS_TOO_LARGE:Kl,REQUEST_TIMEOUT:Jl,REQUEST_TOO_LONG:Xl,REQUEST_URI_TOO_LONG:Zl,RESET_CONTENT:tf,get ReasonPhrases(){return ea},SEE_OTHER:rf,SERVICE_UNAVAILABLE:nf,SWITCHING_PROTOCOLS:of,get StatusCodes(){return Zo},TEMPORARY_REDIRECT:af,TOO_MANY_REQUESTS:sf,UNAUTHORIZED:cf,UNPROCESSABLE_ENTITY:uf,UNSUPPORTED_MEDIA_TYPE:lf,USE_PROXY:ff,default:Wy,getReasonPhrase:df,getStatusCode:pf,getStatusText:hf},Symbol.toStringTag,{value:"Module"})),Vy=qr(Gy);var On={exports:{}},yr={},bo={},vr={},_r={},xt={},Er={},So={},At={},lt={},Mc;function _a(){if(Mc)return lt;Mc=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.ERROR_PACKET=lt.PACKET_TYPES_REVERSE=lt.PACKET_TYPES=void 0;const e=Object.create(null);lt.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);lt.PACKET_TYPES_REVERSE=t,Object.keys(e).forEach(r=>{t[e[r]]=r});const n={type:"error",data:"parser error"};return lt.ERROR_PACKET=n,lt}var Dc;function Qy(){if(Dc)return At;Dc=1,Object.defineProperty(At,"__esModule",{value:!0}),At.encodePacket=At.encodePacketToBinary=void 0;const e=_a(),t=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",n=typeof ArrayBuffer=="function",r=c=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(c):c&&c.buffer instanceof ArrayBuffer,s=({type:c,data:a},d,f)=>t&&a instanceof Blob?d?f(a):o(a,f):n&&(a instanceof ArrayBuffer||r(a))?d?f(a):o(new Blob([a]),f):f(e.PACKET_TYPES[c]+(a||""));At.encodePacket=s;const o=(c,a)=>{const d=new FileReader;return d.onload=function(){const f=d.result.split(",")[1];a("b"+(f||""))},d.readAsDataURL(c)};function l(c){return c instanceof Uint8Array?c:c instanceof ArrayBuffer?new Uint8Array(c):new Uint8Array(c.buffer,c.byteOffset,c.byteLength)}let i;function u(c,a){if(t&&c.data instanceof Blob)return c.data.arrayBuffer().then(l).then(a);if(n&&(c.data instanceof ArrayBuffer||r(c.data)))return a(l(c.data));s(c,!1,d=>{i||(i=new TextEncoder),a(i.encode(d))})}return At.encodePacketToBinary=u,At}var wr={},Rt={},Uc;function zy(){if(Uc)return Rt;Uc=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.decode=Rt.encode=void 0;const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let s=0;s<e.length;s++)t[e.charCodeAt(s)]=s;const n=s=>{let o=new Uint8Array(s),l,i=o.length,u="";for(l=0;l<i;l+=3)u+=e[o[l]>>2],u+=e[(o[l]&3)<<4|o[l+1]>>4],u+=e[(o[l+1]&15)<<2|o[l+2]>>6],u+=e[o[l+2]&63];return i%3===2?u=u.substring(0,u.length-1)+"=":i%3===1&&(u=u.substring(0,u.length-2)+"=="),u};Rt.encode=n;const r=s=>{let o=s.length*.75,l=s.length,i,u=0,c,a,d,f;s[s.length-1]==="="&&(o--,s[s.length-2]==="="&&o--);const p=new ArrayBuffer(o),h=new Uint8Array(p);for(i=0;i<l;i+=4)c=t[s.charCodeAt(i)],a=t[s.charCodeAt(i+1)],d=t[s.charCodeAt(i+2)],f=t[s.charCodeAt(i+3)],h[u++]=c<<2|a>>4,h[u++]=(a&15)<<4|d>>2,h[u++]=(d&3)<<6|f&63;return p};return Rt.decode=r,Rt}var Bc;function Yy(){if(Bc)return wr;Bc=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.decodePacket=void 0;const e=_a(),t=zy(),n=typeof ArrayBuffer=="function",r=(l,i)=>{if(typeof l!="string")return{type:"message",data:o(l,i)};const u=l.charAt(0);return u==="b"?{type:"message",data:s(l.substring(1),i)}:e.PACKET_TYPES_REVERSE[u]?l.length>1?{type:e.PACKET_TYPES_REVERSE[u],data:l.substring(1)}:{type:e.PACKET_TYPES_REVERSE[u]}:e.ERROR_PACKET};wr.decodePacket=r;const s=(l,i)=>{if(n){const u=(0,t.decode)(l);return o(u,i)}else return{base64:!0,data:l}},o=(l,i)=>{switch(i){case"blob":return l instanceof Blob?l:new Blob([l]);case"arraybuffer":default:return l instanceof ArrayBuffer?l:l.buffer}};return wr}var $c;function Wr(){return $c||($c=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=Qy();Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const n=Yy();Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return n.decodePacket}});const r=_a(),s=String.fromCharCode(30),o=(f,p)=>{const h=f.length,y=new Array(h);let _=0;f.forEach((S,v)=>{(0,t.encodePacket)(S,!1,w=>{y[v]=w,++_===h&&p(y.join(s))})})};e.encodePayload=o;const l=(f,p)=>{const h=f.split(s),y=[];for(let _=0;_<h.length;_++){const S=(0,n.decodePacket)(h[_],p);if(y.push(S),S.type==="error")break}return y};e.decodePayload=l;function i(){return new TransformStream({transform(f,p){(0,t.encodePacketToBinary)(f,h=>{const y=h.length;let _;if(y<126)_=new Uint8Array(1),new DataView(_.buffer).setUint8(0,y);else if(y<65536){_=new Uint8Array(3);const S=new DataView(_.buffer);S.setUint8(0,126),S.setUint16(1,y)}else{_=new Uint8Array(9);const S=new DataView(_.buffer);S.setUint8(0,127),S.setBigUint64(1,BigInt(y))}f.data&&typeof f.data!="string"&&(_[0]|=128),p.enqueue(_),p.enqueue(h)})}})}e.createPacketEncoderStream=i;let u;function c(f){return f.reduce((p,h)=>p+h.length,0)}function a(f,p){if(f[0].length===p)return f.shift();const h=new Uint8Array(p);let y=0;for(let _=0;_<p;_++)h[_]=f[0][y++],y===f[0].length&&(f.shift(),y=0);return f.length&&y<f[0].length&&(f[0]=f[0].slice(y)),h}function d(f,p){u||(u=new TextDecoder);const h=[];let y=0,_=-1,S=!1;return new TransformStream({transform(v,w){for(h.push(v);;){if(y===0){if(c(h)<1)break;const x=a(h,1);S=(x[0]&128)===128,_=x[0]&127,_<126?y=3:_===126?y=1:y=2}else if(y===1){if(c(h)<2)break;const x=a(h,2);_=new DataView(x.buffer,x.byteOffset,x.length).getUint16(0),y=3}else if(y===2){if(c(h)<8)break;const x=a(h,8),O=new DataView(x.buffer,x.byteOffset,x.length),F=O.getUint32(0);if(F>Math.pow(2,53-32)-1){w.enqueue(r.ERROR_PACKET);break}_=F*Math.pow(2,32)+O.getUint32(4),y=3}else{if(c(h)<_)break;const x=a(h,_);w.enqueue((0,n.decodePacket)(S?x:u.decode(x),p)),y=0}if(_===0||_>f){w.enqueue(r.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=d,e.protocol=4}(So)),So}function Qe(e){if(e)return Ky(e)}function Ky(e){for(var t in Qe.prototype)e[t]=Qe.prototype[t];return e}Qe.prototype.on=Qe.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Qe.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Qe.prototype.off=Qe.prototype.removeListener=Qe.prototype.removeAllListeners=Qe.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Qe.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this};Qe.prototype.emitReserved=Qe.prototype.emit;Qe.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Qe.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Jy=Object.freeze(Object.defineProperty({__proto__:null,Emitter:Qe},Symbol.toStringTag,{value:"Module"})),tr=qr(Jy);var ft={},br={},qc;function Vn(){return qc||(qc=1,Object.defineProperty(br,"__esModule",{value:!0}),br.globalThisShim=void 0,br.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())()),br}var Hc;function Gr(){if(Hc)return ft;Hc=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.byteLength=ft.installTimerFunctions=ft.pick=void 0;const e=Vn();function t(u,...c){return c.reduce((a,d)=>(u.hasOwnProperty(d)&&(a[d]=u[d]),a),{})}ft.pick=t;const n=e.globalThisShim.setTimeout,r=e.globalThisShim.clearTimeout;function s(u,c){c.useNativeTimers?(u.setTimeoutFn=n.bind(e.globalThisShim),u.clearTimeoutFn=r.bind(e.globalThisShim)):(u.setTimeoutFn=e.globalThisShim.setTimeout.bind(e.globalThisShim),u.clearTimeoutFn=e.globalThisShim.clearTimeout.bind(e.globalThisShim))}ft.installTimerFunctions=s;const o=1.33;function l(u){return typeof u=="string"?i(u):Math.ceil((u.byteLength||u.size)*o)}ft.byteLength=l;function i(u){let c=0,a=0;for(let d=0,f=u.length;d<f;d++)c=u.charCodeAt(d),c<128?a+=1:c<2048?a+=2:c<55296||c>=57344?a+=3:(d++,a+=4);return a}return ft}var Tn={exports:{}},Oo,Wc;function Xy(){if(Wc)return Oo;Wc=1;var e=1e3,t=e*60,n=t*60,r=n*24,s=r*7,o=r*365.25;Oo=function(a,d){d=d||{};var f=typeof a;if(f==="string"&&a.length>0)return l(a);if(f==="number"&&isFinite(a))return d.long?u(a):i(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function l(a){if(a=String(a),!(a.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(a);if(d){var f=parseFloat(d[1]),p=(d[2]||"ms").toLowerCase();switch(p){case"years":case"year":case"yrs":case"yr":case"y":return f*o;case"weeks":case"week":case"w":return f*s;case"days":case"day":case"d":return f*r;case"hours":case"hour":case"hrs":case"hr":case"h":return f*n;case"minutes":case"minute":case"mins":case"min":case"m":return f*t;case"seconds":case"second":case"secs":case"sec":case"s":return f*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function i(a){var d=Math.abs(a);return d>=r?Math.round(a/r)+"d":d>=n?Math.round(a/n)+"h":d>=t?Math.round(a/t)+"m":d>=e?Math.round(a/e)+"s":a+"ms"}function u(a){var d=Math.abs(a);return d>=r?c(a,d,r,"day"):d>=n?c(a,d,n,"hour"):d>=t?c(a,d,t,"minute"):d>=e?c(a,d,e,"second"):a+" ms"}function c(a,d,f,p){var h=d>=f*1.5;return Math.round(a/f)+" "+p+(h?"s":"")}return Oo}var To,Gc;function Zy(){if(Gc)return To;Gc=1;function e(t){r.debug=r,r.default=r,r.coerce=c,r.disable=l,r.enable=o,r.enabled=i,r.humanize=Xy(),r.destroy=a,Object.keys(t).forEach(d=>{r[d]=t[d]}),r.names=[],r.skips=[],r.formatters={};function n(d){let f=0;for(let p=0;p<d.length;p++)f=(f<<5)-f+d.charCodeAt(p),f|=0;return r.colors[Math.abs(f)%r.colors.length]}r.selectColor=n;function r(d){let f,p=null,h,y;function _(...S){if(!_.enabled)return;const v=_,w=Number(new Date),x=w-(f||w);v.diff=x,v.prev=f,v.curr=w,f=w,S[0]=r.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let O=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(D,R)=>{if(D==="%%")return"%";O++;const W=r.formatters[R];if(typeof W=="function"){const V=S[O];D=W.call(v,V),S.splice(O,1),O--}return D}),r.formatArgs.call(v,S),(v.log||r.log).apply(v,S)}return _.namespace=d,_.useColors=r.useColors(),_.color=r.selectColor(d),_.extend=s,_.destroy=r.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(h!==r.namespaces&&(h=r.namespaces,y=r.enabled(d)),y),set:S=>{p=S}}),typeof r.init=="function"&&r.init(_),_}function s(d,f){const p=r(this.namespace+(typeof f>"u"?":":f)+d);return p.log=this.log,p}function o(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let f;const p=(typeof d=="string"?d:"").split(/[\s,]+/),h=p.length;for(f=0;f<h;f++)p[f]&&(d=p[f].replace(/\*/g,".*?"),d[0]==="-"?r.skips.push(new RegExp("^"+d.slice(1)+"$")):r.names.push(new RegExp("^"+d+"$")))}function l(){const d=[...r.names.map(u),...r.skips.map(u).map(f=>"-"+f)].join(",");return r.enable(""),d}function i(d){if(d[d.length-1]==="*")return!0;let f,p;for(f=0,p=r.skips.length;f<p;f++)if(r.skips[f].test(d))return!1;for(f=0,p=r.names.length;f<p;f++)if(r.names[f].test(d))return!0;return!1}function u(d){return d.toString().substring(2,d.toString().length-2).replace(/\.\*\?$/,"*")}function c(d){return d instanceof Error?d.stack||d.message:d}function a(){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 r.enable(r.load()),r}return To=e,To}var Vc;function ut(){return Vc||(Vc=1,function(e,t){t.formatArgs=r,t.save=s,t.load=o,t.useColors=n,t.storage=l(),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 n(){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 r(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 c="color: "+this.color;u.splice(1,0,c,"color: inherit");let a=0,d=0;u[0].replace(/%[a-zA-Z%]/g,f=>{f!=="%%"&&(a++,f==="%c"&&(d=a))}),u.splice(d,0,c)}t.log=console.debug||console.log||(()=>{});function s(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 l(){try{return localStorage}catch{}}e.exports=Zy()(t);const{formatters:i}=e.exports;i.j=function(u){try{return JSON.stringify(u)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}}(Tn,Tn.exports)),Tn.exports}var Ct={},Qc;function mf(){if(Qc)return Ct;Qc=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.decode=Ct.encode=void 0;function e(n){let r="";for(let s in n)n.hasOwnProperty(s)&&(r.length&&(r+="&"),r+=encodeURIComponent(s)+"="+encodeURIComponent(n[s]));return r}Ct.encode=e;function t(n){let r={},s=n.split("&");for(let o=0,l=s.length;o<l;o++){let i=s[o].split("=");r[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return r}return Ct.decode=t,Ct}var zc;function Qn(){if(zc)return Er;zc=1;var e=ce&&ce.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Er,"__esModule",{value:!0}),Er.Transport=void 0;const t=Wr(),n=tr,r=Gr(),s=e(ut()),o=mf(),l=(0,s.default)("engine.io-client:transport");class i extends Error{constructor(a,d,f){super(a),this.description=d,this.context=f,this.type="TransportError"}}class u extends n.Emitter{constructor(a){super(),this.writable=!1,(0,r.installTimerFunctions)(this,a),this.opts=a,this.query=a.query,this.socket=a.socket}onError(a,d,f){return super.emitReserved("error",new i(a,d,f)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(a){this.readyState==="open"?this.write(a):l("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(a){const d=(0,t.decodePacket)(a,this.socket.binaryType);this.onPacket(d)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,d={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(d)}_hostname(){const a=this.opts.hostname;return a.indexOf(":")===-1?a:"["+a+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(a){const d=(0,o.encode)(a);return d.length?"?"+d:""}}return Er.Transport=u,Er}var dt={},Yc;function gf(){if(Yc)return dt;Yc=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.yeast=dt.decode=dt.encode=void 0;const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),t=64,n={};let r=0,s=0,o;function l(c){let a="";do a=e[c%t]+a,c=Math.floor(c/t);while(c>0);return a}dt.encode=l;function i(c){let a=0;for(s=0;s<c.length;s++)a=a*t+n[c.charAt(s)];return a}dt.decode=i;function u(){const c=l(+new Date);return c!==o?(r=0,o=c):c+"."+l(r++)}for(dt.yeast=u;s<t;s++)n[e[s]]=s;return dt}var Nt={},Sr={},Kc;function ev(){if(Kc)return Sr;Kc=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.hasCORS=void 0;let e=!1;try{e=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}return Sr.hasCORS=e,Sr}var Jc;function tv(){if(Jc)return Nt;Jc=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.createCookieJar=Nt.XHR=void 0;const e=ev(),t=Vn();function n(s){const o=s.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{}}Nt.XHR=n;function r(){}return Nt.createCookieJar=r,Nt}var Xc;function rv(){if(Xc)return xt;Xc=1;var e=ce&&ce.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(xt,"__esModule",{value:!0}),xt.Request=xt.Polling=void 0;const t=Qn(),n=e(ut()),r=gf(),s=Wr(),o=tv(),l=tr,i=Gr(),u=Vn(),c=(0,n.default)("engine.io-client:polling");function a(){}const d=function(){return new o.XHR({xdomain:!1}).responseType!=null}();class f extends t.Transport{constructor(_){if(super(_),this.polling=!1,typeof location<"u"){const v=location.protocol==="https:";let w=location.port;w||(w=v?"443":"80"),this.xd=typeof location<"u"&&_.hostname!==location.hostname||w!==_.port}const S=_&&_.forceBase64;this.supportsBinary=d&&!S,this.opts.withCredentials&&(this.cookieJar=(0,o.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(_){this.readyState="pausing";const S=()=>{c("paused"),this.readyState="paused",_()};if(this.polling||!this.writable){let v=0;this.polling&&(c("we are currently polling - waiting to pause"),v++,this.once("pollComplete",function(){c("pre-pause polling complete"),--v||S()})),this.writable||(c("we are currently writing - waiting to pause"),v++,this.once("drain",function(){c("pre-pause writing complete"),--v||S()}))}else S()}poll(){c("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(_){c("polling got data %s",_);const S=v=>{if(this.readyState==="opening"&&v.type==="open"&&this.onOpen(),v.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(v)};(0,s.decodePayload)(_,this.socket.binaryType).forEach(S),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():c('ignoring poll - transport state "%s"',this.readyState))}doClose(){const _=()=>{c("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(c("transport open - closing"),_()):(c("transport not open - deferring close"),this.once("open",_))}write(_){this.writable=!1,(0,s.encodePayload)(_,S=>{this.doWrite(S,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const _=this.opts.secure?"https":"http",S=this.query||{};return this.opts.timestampRequests!==!1&&(S[this.opts.timestampParam]=(0,r.yeast)()),!this.supportsBinary&&!S.sid&&(S.b64=1),this.createUri(_,S)}request(_={}){return Object.assign(_,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new p(this.uri(),_)}doWrite(_,S){const v=this.request({method:"POST",data:_});v.on("success",S),v.on("error",(w,x)=>{this.onError("xhr post error",w,x)})}doPoll(){c("xhr poll");const _=this.request();_.on("data",this.onData.bind(this)),_.on("error",(S,v)=>{this.onError("xhr poll error",S,v)}),this.pollXhr=_}}xt.Polling=f;class p extends l.Emitter{constructor(_,S){super(),(0,i.installTimerFunctions)(this,S),this.opts=S,this.method=S.method||"GET",this.uri=_,this.data=S.data!==void 0?S.data:null,this.create()}create(){var _;const S=(0,i.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");S.xdomain=!!this.opts.xd;const v=this.xhr=new o.XHR(S);try{c("xhr open %s: %s",this.method,this.uri),v.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){v.setDisableHeaderCheck&&v.setDisableHeaderCheck(!0);for(let w in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(w)&&v.setRequestHeader(w,this.opts.extraHeaders[w])}}catch{}if(this.method==="POST")try{v.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{v.setRequestHeader("Accept","*/*")}catch{}(_=this.opts.cookieJar)===null||_===void 0||_.addCookies(v),"withCredentials"in v&&(v.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(v.timeout=this.opts.requestTimeout),v.onreadystatechange=()=>{var w;v.readyState===3&&((w=this.opts.cookieJar)===null||w===void 0||w.parseCookies(v)),v.readyState===4&&(v.status===200||v.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof v.status=="number"?v.status:0)},0))},c("xhr data %s",this.data),v.send(this.data)}catch(w){this.setTimeoutFn(()=>{this.onError(w)},0);return}typeof document<"u"&&(this.index=p.requestsCount++,p.requests[this.index]=this)}onError(_){this.emitReserved("error",_,this.xhr),this.cleanup(!0)}cleanup(_){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=a,_)try{this.xhr.abort()}catch{}typeof document<"u"&&delete p.requests[this.index],this.xhr=null}}onLoad(){const _=this.xhr.responseText;_!==null&&(this.emitReserved("data",_),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(xt.Request=p,p.requestsCount=0,p.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",h);else if(typeof addEventListener=="function"){const y="onpagehide"in u.globalThisShim?"pagehide":"unload";addEventListener(y,h,!1)}}function h(){for(let y in p.requests)p.requests.hasOwnProperty(y)&&p.requests[y].abort()}return xt}var Or={},et={},Zc;function zn(){if(Zc)return et;Zc=1,Object.defineProperty(et,"__esModule",{value:!0}),et.defaultBinaryType=et.usingBrowserWebSocket=et.WebSocket=et.nextTick=void 0;const e=Vn();return et.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?n=>Promise.resolve().then(n):(n,r)=>r(n,0))(),et.WebSocket=e.globalThisShim.WebSocket||e.globalThisShim.MozWebSocket,et.usingBrowserWebSocket=!0,et.defaultBinaryType="arraybuffer",et}var eu;function nv(){if(eu)return Or;eu=1;var e=ce&&ce.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Or,"__esModule",{value:!0}),Or.WS=void 0;const t=Qn(),n=gf(),r=Gr(),s=zn(),o=e(ut()),l=Wr(),i=(0,o.default)("engine.io-client:websocket"),u=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class c extends t.Transport{constructor(d){super(d),this.supportsBinary=!d.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const d=this.uri(),f=this.opts.protocols,p=u?{}:(0,r.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(p.headers=this.opts.extraHeaders);try{this.ws=s.usingBrowserWebSocket&&!u?f?new s.WebSocket(d,f):new s.WebSocket(d):new s.WebSocket(d,f,p)}catch(h){return this.emitReserved("error",h)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=d=>this.onClose({description:"websocket connection closed",context:d}),this.ws.onmessage=d=>this.onData(d.data),this.ws.onerror=d=>this.onError("websocket error",d)}write(d){this.writable=!1;for(let f=0;f<d.length;f++){const p=d[f],h=f===d.length-1;(0,l.encodePacket)(p,this.supportsBinary,y=>{const _={};s.usingBrowserWebSocket||(p.options&&(_.compress=p.options.compress),this.opts.perMessageDeflate&&(typeof y=="string"?Buffer.byteLength(y):y.length)<this.opts.perMessageDeflate.threshold&&(_.compress=!1));try{s.usingBrowserWebSocket?this.ws.send(y):this.ws.send(y,_)}catch{i("websocket closed before onclose event")}h&&(0,s.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const d=this.opts.secure?"wss":"ws",f=this.query||{};return this.opts.timestampRequests&&(f[this.opts.timestampParam]=(0,n.yeast)()),this.supportsBinary||(f.b64=1),this.createUri(d,f)}check(){return!!s.WebSocket}}return Or.WS=c,Or}var Tr={},tu;function iv(){if(tu)return Tr;tu=1;var e=ce&&ce.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.WT=void 0;const t=Qn(),n=zn(),r=Wr(),o=(0,e(ut()).default)("engine.io-client:webtransport");class l 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 c=(0,r.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=u.readable.pipeThrough(c).getReader(),d=(0,r.createPacketEncoderStream)();d.readable.pipeTo(u.writable),this.writer=d.writable.getWriter();const f=()=>{a.read().then(({done:h,value:y})=>{if(h){o("session is closed");return}o("received chunk: %o",y),this.onPacket(y),f()}).catch(h=>{o("an error occurred while reading: %s",h)})};f();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this.writer.write(p).then(()=>this.onOpen())})}))}write(u){this.writable=!1;for(let c=0;c<u.length;c++){const a=u[c],d=c===u.length-1;this.writer.write(a).then(()=>{d&&(0,n.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var u;(u=this.transport)===null||u===void 0||u.close()}}return Tr.WT=l,Tr}var ru;function yf(){if(ru)return _r;ru=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.transports=void 0;const e=rv(),t=nv(),n=iv();return _r.transports={websocket:t.WS,webtransport:n.WT,polling:e.Polling},_r}var xr={},nu;function vf(){if(nu)return xr;nu=1,Object.defineProperty(xr,"__esModule",{value:!0}),xr.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 n(o){const l=o,i=o.indexOf("["),u=o.indexOf("]");i!=-1&&u!=-1&&(o=o.substring(0,i)+o.substring(i,u).replace(/:/g,";")+o.substring(u,o.length));let c=e.exec(o||""),a={},d=14;for(;d--;)a[t[d]]=c[d]||"";return i!=-1&&u!=-1&&(a.source=l,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=r(a,a.path),a.queryKey=s(a,a.query),a}xr.parse=n;function r(o,l){const i=/\/{2,9}/g,u=l.replace(i,"/").split("/");return(l.slice(0,1)=="/"||l.length===0)&&u.splice(0,1),l.slice(-1)=="/"&&u.splice(u.length-1,1),u}function s(o,l){const i={};return l.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(u,c,a){c&&(i[c]=a)}),i}return xr}var iu;function ov(){if(iu)return vr;iu=1;var e=ce&&ce.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(vr,"__esModule",{value:!0}),vr.Socket=void 0;const t=yf(),n=Gr(),r=mf(),s=vf(),o=e(ut()),l=tr,i=Wr(),u=zn(),c=(0,o.default)("engine.io-client:socket");class a extends l.Emitter{constructor(f,p={}){super(),this.binaryType=u.defaultBinaryType,this.writeBuffer=[],f&&typeof f=="object"&&(p=f,f=null),f?(f=(0,s.parse)(f),p.hostname=f.host,p.secure=f.protocol==="https"||f.protocol==="wss",p.port=f.port,f.query&&(p.query=f.query)):p.host&&(p.hostname=(0,s.parse)(p.host).host),(0,n.installTimerFunctions)(this,p),this.secure=p.secure!=null?p.secure:typeof location<"u"&&location.protocol==="https:",p.hostname&&!p.port&&(p.port=this.secure?"443":"80"),this.hostname=p.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=p.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=p.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},p),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,r.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(f){c('creating transport "%s"',f);const p=Object.assign({},this.opts.query);p.EIO=i.protocol,p.transport=f,this.id&&(p.sid=this.id);const h=Object.assign({},this.opts,{query:p,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[f]);return c("options: %j",h),new t.transports[f](h)}open(){let f;if(this.opts.rememberUpgrade&&a.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)f="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else f=this.transports[0];this.readyState="opening";try{f=this.createTransport(f)}catch(p){c("error while creating transport: %s",p),this.transports.shift(),this.open();return}f.open(),this.setTransport(f)}setTransport(f){c("setting transport %s",f.name),this.transport&&(c("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=f,f.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",p=>this.onClose("transport close",p))}probe(f){c('probing transport "%s"',f);let p=this.createTransport(f),h=!1;a.priorWebsocketSuccess=!1;const y=()=>{h||(c('probe transport "%s" opened',f),p.send([{type:"ping",data:"probe"}]),p.once("packet",F=>{if(!h)if(F.type==="pong"&&F.data==="probe"){if(c('probe transport "%s" pong',f),this.upgrading=!0,this.emitReserved("upgrading",p),!p)return;a.priorWebsocketSuccess=p.name==="websocket",c('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{h||this.readyState!=="closed"&&(c("changing transport and sending upgrade packet"),O(),this.setTransport(p),p.send([{type:"upgrade"}]),this.emitReserved("upgrade",p),p=null,this.upgrading=!1,this.flush())})}else{c('probe transport "%s" failed',f);const D=new Error("probe error");D.transport=p.name,this.emitReserved("upgradeError",D)}}))};function _(){h||(h=!0,O(),p.close(),p=null)}const S=F=>{const D=new Error("probe error: "+F);D.transport=p.name,_(),c('probe transport "%s" failed because of error: %s',f,F),this.emitReserved("upgradeError",D)};function v(){S("transport closed")}function w(){S("socket closed")}function x(F){p&&F.name!==p.name&&(c('"%s" works - aborting "%s"',F.name,p.name),_())}const O=()=>{p.removeListener("open",y),p.removeListener("error",S),p.removeListener("close",v),this.off("close",w),this.off("upgrading",x)};p.once("open",y),p.once("error",S),p.once("close",v),this.once("close",w),this.once("upgrading",x),this.upgrades.indexOf("webtransport")!==-1&&f!=="webtransport"?this.setTimeoutFn(()=>{h||p.open()},200):p.open()}onOpen(){if(c("socket open"),this.readyState="open",a.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){c("starting upgrade probes");let f=0;const p=this.upgrades.length;for(;f<p;f++)this.probe(this.upgrades[f])}}onPacket(f){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(c('socket receive: type "%s", data "%s"',f.type,f.data),this.emitReserved("packet",f),this.emitReserved("heartbeat"),this.resetPingTimeout(),f.type){case"open":this.onHandshake(JSON.parse(f.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const p=new Error("server error");p.code=f.data,this.onError(p);break;case"message":this.emitReserved("data",f.data),this.emitReserved("message",f.data);break}else c('packet received with socket readyState "%s"',this.readyState)}onHandshake(f){this.emitReserved("handshake",f),this.id=f.sid,this.transport.query.sid=f.sid,this.upgrades=this.filterUpgrades(f.upgrades),this.pingInterval=f.pingInterval,this.pingTimeout=f.pingTimeout,this.maxPayload=f.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 f=this.getWritablePackets();c("flushing %d packets in socket",f.length),this.transport.send(f),this.prevBufferLen=f.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let p=1;for(let h=0;h<this.writeBuffer.length;h++){const y=this.writeBuffer[h].data;if(y&&(p+=(0,n.byteLength)(y)),h>0&&p>this.maxPayload)return c("only send %d out of %d packets",h,this.writeBuffer.length),this.writeBuffer.slice(0,h);p+=2}return c("payload size is %d (max: %d)",p,this.maxPayload),this.writeBuffer}write(f,p,h){return this.sendPacket("message",f,p,h),this}send(f,p,h){return this.sendPacket("message",f,p,h),this}sendPacket(f,p,h,y){if(typeof p=="function"&&(y=p,p=void 0),typeof h=="function"&&(y=h,h=null),this.readyState==="closing"||this.readyState==="closed")return;h=h||{},h.compress=h.compress!==!1;const _={type:f,data:p,options:h};this.emitReserved("packetCreate",_),this.writeBuffer.push(_),y&&this.once("flush",y),this.flush()}close(){const f=()=>{this.onClose("forced close"),c("socket closing - telling transport to close"),this.transport.close()},p=()=>{this.off("upgrade",p),this.off("upgradeError",p),f()},h=()=>{this.once("upgrade",p),this.once("upgradeError",p)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?h():f()}):this.upgrading?h():f()),this}onError(f){c("socket error %j",f),a.priorWebsocketSuccess=!1,this.emitReserved("error",f),this.onClose("transport error",f)}onClose(f,p){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(c('socket close with reason: "%s"',f),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",f,p),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(f){const p=[];let h=0;const y=f.length;for(;h<y;h++)~this.transports.indexOf(f[h])&&p.push(f[h]);return p}}return vr.Socket=a,a.protocol=i.protocol,vr}var ou;function _f(){return ou||(ou=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=ov();Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var n=Qn();Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var r=yf();Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return r.transports}});var s=Gr();Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return s.installTimerFunctions}});var o=vf();Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return o.parse}});var l=zn();Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return l.nextTick}})}(bo)),bo}var au;function av(){if(au)return yr;au=1;var e=ce&&ce.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(yr,"__esModule",{value:!0}),yr.url=void 0;const t=_f(),r=e(ut()).default("socket.io-client:url");function s(o,l="",i){let u=o;i=i||typeof location<"u"&&location,o==null&&(o=i.protocol+"//"+i.host),typeof o=="string"&&(o.charAt(0)==="/"&&(o.charAt(1)==="/"?o=i.protocol+o:o=i.host+o),/^(https?|wss?):\/\//.test(o)||(r("protocol-less url %s",o),typeof i<"u"?o=i.protocol+"//"+o:o="https://"+o),r("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 a=u.host.indexOf(":")!==-1?"["+u.host+"]":u.host;return u.id=u.protocol+"://"+a+":"+u.port+l,u.href=u.protocol+"://"+a+(i&&i.port===u.port?"":":"+u.port),u}return yr.url=s,yr}var Ar={},Rr={},xo={},Pt={},It={},su;function Ef(){if(su)return It;su=1,Object.defineProperty(It,"__esModule",{value:!0}),It.hasBinary=It.isBinary=void 0;const e=typeof ArrayBuffer=="function",t=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,n=Object.prototype.toString,r=typeof Blob=="function"||typeof Blob<"u"&&n.call(Blob)==="[object BlobConstructor]",s=typeof File=="function"||typeof File<"u"&&n.call(File)==="[object FileConstructor]";function o(i){return e&&(i instanceof ArrayBuffer||t(i))||r&&i instanceof Blob||s&&i instanceof File}It.isBinary=o;function l(i,u){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let c=0,a=i.length;c<a;c++)if(l(i[c]))return!0;return!1}if(o(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return l(i.toJSON(),!0);for(const c in i)if(Object.prototype.hasOwnProperty.call(i,c)&&l(i[c]))return!0;return!1}return It.hasBinary=l,It}var cu;function sv(){if(cu)return Pt;cu=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.reconstructPacket=Pt.deconstructPacket=void 0;const e=Ef();function t(o){const l=[],i=o.data,u=o;return u.data=n(i,l),u.attachments=l.length,{packet:u,buffers:l}}Pt.deconstructPacket=t;function n(o,l){if(!o)return o;if((0,e.isBinary)(o)){const i={_placeholder:!0,num:l.length};return l.push(o),i}else if(Array.isArray(o)){const i=new Array(o.length);for(let u=0;u<o.length;u++)i[u]=n(o[u],l);return i}else if(typeof o=="object"&&!(o instanceof Date)){const i={};for(const u in o)Object.prototype.hasOwnProperty.call(o,u)&&(i[u]=n(o[u],l));return i}return o}function r(o,l){return o.data=s(o.data,l),delete o.attachments,o}Pt.reconstructPacket=r;function s(o,l){if(!o)return o;if(o&&o._placeholder===!0){if(typeof o.num=="number"&&o.num>=0&&o.num<l.length)return l[o.num];throw new Error("illegal attachments")}else if(Array.isArray(o))for(let i=0;i<o.length;i++)o[i]=s(o[i],l);else if(typeof o=="object")for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&(o[i]=s(o[i],l));return o}return Pt}var uu;function Ea(){return uu||(uu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=tr,n=sv(),r=Ef(),o=(0,ut().default)("socket.io-parser"),l=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var i;(function(f){f[f.CONNECT=0]="CONNECT",f[f.DISCONNECT=1]="DISCONNECT",f[f.EVENT=2]="EVENT",f[f.ACK=3]="ACK",f[f.CONNECT_ERROR=4]="CONNECT_ERROR",f[f.BINARY_EVENT=5]="BINARY_EVENT",f[f.BINARY_ACK=6]="BINARY_ACK"})(i=e.PacketType||(e.PacketType={}));class u{constructor(p){this.replacer=p}encode(p){return o("encoding packet %j",p),(p.type===i.EVENT||p.type===i.ACK)&&(0,r.hasBinary)(p)?this.encodeAsBinary({type:p.type===i.EVENT?i.BINARY_EVENT:i.BINARY_ACK,nsp:p.nsp,data:p.data,id:p.id}):[this.encodeAsString(p)]}encodeAsString(p){let h=""+p.type;return(p.type===i.BINARY_EVENT||p.type===i.BINARY_ACK)&&(h+=p.attachments+"-"),p.nsp&&p.nsp!=="/"&&(h+=p.nsp+","),p.id!=null&&(h+=p.id),p.data!=null&&(h+=JSON.stringify(p.data,this.replacer)),o("encoded %j as %s",p,h),h}encodeAsBinary(p){const h=(0,n.deconstructPacket)(p),y=this.encodeAsString(h.packet),_=h.buffers;return _.unshift(y),_}}e.Encoder=u;function c(f){return Object.prototype.toString.call(f)==="[object Object]"}class a extends t.Emitter{constructor(p){super(),this.reviver=p}add(p){let h;if(typeof p=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(p);const y=h.type===i.BINARY_EVENT;y||h.type===i.BINARY_ACK?(h.type=y?i.EVENT:i.ACK,this.reconstructor=new d(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if((0,r.isBinary)(p)||p.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(p),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+p)}decodeString(p){let h=0;const y={type:Number(p.charAt(0))};if(i[y.type]===void 0)throw new Error("unknown packet type "+y.type);if(y.type===i.BINARY_EVENT||y.type===i.BINARY_ACK){const S=h+1;for(;p.charAt(++h)!=="-"&&h!=p.length;);const v=p.substring(S,h);if(v!=Number(v)||p.charAt(h)!=="-")throw new Error("Illegal attachments");y.attachments=Number(v)}if(p.charAt(h+1)==="/"){const S=h+1;for(;++h&&!(p.charAt(h)===","||h===p.length););y.nsp=p.substring(S,h)}else y.nsp="/";const _=p.charAt(h+1);if(_!==""&&Number(_)==_){const S=h+1;for(;++h;){const v=p.charAt(h);if(v==null||Number(v)!=v){--h;break}if(h===p.length)break}y.id=Number(p.substring(S,h+1))}if(p.charAt(++h)){const S=this.tryParse(p.substr(h));if(a.isPayloadValid(y.type,S))y.data=S;else throw new Error("invalid payload")}return o("decoded %s as %j",p,y),y}tryParse(p){try{return JSON.parse(p,this.reviver)}catch{return!1}}static isPayloadValid(p,h){switch(p){case i.CONNECT:return c(h);case i.DISCONNECT:return h===void 0;case i.CONNECT_ERROR:return typeof h=="string"||c(h);case i.EVENT:case i.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&l.indexOf(h[0])===-1);case i.ACK:case i.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=a;class d{constructor(p){this.packet=p,this.buffers=[],this.reconPack=p}takeBinaryData(p){if(this.buffers.push(p),this.buffers.length===this.reconPack.attachments){const h=(0,n.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}}(xo)),xo}var Cr={},lu;function wf(){if(lu)return Cr;lu=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.on=void 0;function e(t,n,r){return t.on(n,r),function(){t.off(n,r)}}return Cr.on=e,Cr}var fu;function bf(){if(fu)return Rr;fu=1;var e=ce&&ce.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.Socket=void 0;const t=Ea(),n=wf(),r=tr,o=e(ut()).default("socket.io-client:socket"),l=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class i extends r.Emitter{constructor(c,a,d){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=c,this.nsp=a,d&&d.auth&&(this.auth=d.auth),this._opts=Object.assign({},d),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const c=this.io;this.subs=[n.on(c,"open",this.onopen.bind(this)),n.on(c,"packet",this.onpacket.bind(this)),n.on(c,"error",this.onerror.bind(this)),n.on(c,"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(...c){return c.unshift("message"),this.emit.apply(this,c),this}emit(c,...a){if(l.hasOwnProperty(c))throw new Error('"'+c.toString()+'" is a reserved event name');if(a.unshift(c),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(a),this;const d={type:t.PacketType.EVENT,data:a};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof a[a.length-1]=="function"){const h=this.ids++;o("emitting packet with ack id %d",h);const y=a.pop();this._registerAckCallback(h,y),d.id=h}const f=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!f||!this.connected)?o("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d),this.flags={},this}_registerAckCallback(c,a){var d;const f=(d=this.flags.timeout)!==null&&d!==void 0?d:this._opts.ackTimeout;if(f===void 0){this.acks[c]=a;return}const p=this.io.setTimeoutFn(()=>{delete this.acks[c];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===c&&(o("removing packet with ack id %d from the buffer",c),this.sendBuffer.splice(h,1));o("event with ack id %d has timed out after %d ms",c,f),a.call(this,new Error("operation has timed out"))},f);this.acks[c]=(...h)=>{this.io.clearTimeoutFn(p),a.apply(this,[null,...h])}}emitWithAck(c,...a){const d=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((f,p)=>{a.push((h,y)=>d?h?p(h):f(y):f(h)),this.emit(c,...a)})}_addToQueue(c){let a;typeof c[c.length-1]=="function"&&(a=c.pop());const d={id:this._queueSeq++,tryCount:0,pending:!1,args:c,flags:Object.assign({fromQueue:!0},this.flags)};c.push((f,...p)=>d!==this._queue[0]?void 0:(f!==null?d.tryCount>this._opts.retries&&(o("packet [%d] is discarded after %d tries",d.id,d.tryCount),this._queue.shift(),a&&a(f)):(o("packet [%d] was successfully sent",d.id),this._queue.shift(),a&&a(null,...p)),d.pending=!1,this._drainQueue())),this._queue.push(d),this._drainQueue()}_drainQueue(c=!1){if(o("draining queue"),!this.connected||this._queue.length===0)return;const a=this._queue[0];if(a.pending&&!c){o("packet [%d] has already been sent and is waiting for an ack",a.id);return}a.pending=!0,a.tryCount++,o("sending packet [%d] (try n°%d)",a.id,a.tryCount),this.flags=a.flags,this.emit.apply(this,a.args)}packet(c){c.nsp=this.nsp,this.io._packet(c)}onopen(){o("transport is open - connecting"),typeof this.auth=="function"?this.auth(c=>{this._sendConnectPacket(c)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(c){this.packet({type:t.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},c):c})}onerror(c){this.connected||this.emitReserved("connect_error",c)}onclose(c,a){o("close (%s)",c),this.connected=!1,delete this.id,this.emitReserved("disconnect",c,a)}onpacket(c){if(c.nsp===this.nsp)switch(c.type){case t.PacketType.CONNECT:c.data&&c.data.sid?this.onconnect(c.data.sid,c.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(c);break;case t.PacketType.ACK:case t.PacketType.BINARY_ACK:this.onack(c);break;case t.PacketType.DISCONNECT:this.ondisconnect();break;case t.PacketType.CONNECT_ERROR:this.destroy();const d=new Error(c.data.message);d.data=c.data.data,this.emitReserved("connect_error",d);break}}onevent(c){const a=c.data||[];o("emitting event %j",a),c.id!=null&&(o("attaching ack callback to event"),a.push(this.ack(c.id))),this.connected?this.emitEvent(a):this.receiveBuffer.push(Object.freeze(a))}emitEvent(c){if(this._anyListeners&&this._anyListeners.length){const a=this._anyListeners.slice();for(const d of a)d.apply(this,c)}super.emit.apply(this,c),this._pid&&c.length&&typeof c[c.length-1]=="string"&&(this._lastOffset=c[c.length-1])}ack(c){const a=this;let d=!1;return function(...f){d||(d=!0,o("sending ack %j",f),a.packet({type:t.PacketType.ACK,id:c,data:f}))}}onack(c){const a=this.acks[c.id];typeof a=="function"?(o("calling ack %s with %j",c.id,c.data),a.apply(this,c.data),delete this.acks[c.id]):o("bad ack %s",c.id)}onconnect(c,a){o("socket connected with id %s",c),this.id=c,this.recovered=a&&this._pid===a,this._pid=a,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(c=>this.emitEvent(c)),this.receiveBuffer=[],this.sendBuffer.forEach(c=>{this.notifyOutgoingListeners(c),this.packet(c)}),this.sendBuffer=[]}ondisconnect(){o("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(c=>c()),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(c){return this.flags.compress=c,this}get volatile(){return this.flags.volatile=!0,this}timeout(c){return this.flags.timeout=c,this}onAny(c){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(c),this}prependAny(c){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(c),this}offAny(c){if(!this._anyListeners)return this;if(c){const a=this._anyListeners;for(let d=0;d<a.length;d++)if(c===a[d])return a.splice(d,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(c){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(c),this}prependAnyOutgoing(c){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(c),this}offAnyOutgoing(c){if(!this._anyOutgoingListeners)return this;if(c){const a=this._anyOutgoingListeners;for(let d=0;d<a.length;d++)if(c===a[d])return a.splice(d,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(c){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const a=this._anyOutgoingListeners.slice();for(const d of a)d.apply(this,c.data)}}}return Rr.Socket=i,Rr}var Nr={},du;function cv(){if(du)return Nr;du=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.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 Nr.Backoff=e,e.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),r=Math.floor(n*this.jitter*t);t=Math.floor(n*10)&1?t+r:t-r}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},Nr}var pu;function uv(){if(pu)return Ar;pu=1;var e=ce&&ce.__createBinding||(Object.create?function(p,h,y,_){_===void 0&&(_=y),Object.defineProperty(p,_,{enumerable:!0,get:function(){return h[y]}})}:function(p,h,y,_){_===void 0&&(_=y),p[_]=h[y]}),t=ce&&ce.__setModuleDefault||(Object.create?function(p,h){Object.defineProperty(p,"default",{enumerable:!0,value:h})}:function(p,h){p.default=h}),n=ce&&ce.__importStar||function(p){if(p&&p.__esModule)return p;var h={};if(p!=null)for(var y in p)y!=="default"&&Object.prototype.hasOwnProperty.call(p,y)&&e(h,p,y);return t(h,p),h},r=ce&&ce.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.Manager=void 0;const s=_f(),o=bf(),l=n(Ea()),i=wf(),u=cv(),c=tr,d=r(ut()).default("socket.io-client:manager");class f extends c.Emitter{constructor(h,y){var _;super(),this.nsps={},this.subs=[],h&&typeof h=="object"&&(y=h,h=void 0),y=y||{},y.path=y.path||"/socket.io",this.opts=y,s.installTimerFunctions(this,y),this.reconnection(y.reconnection!==!1),this.reconnectionAttempts(y.reconnectionAttempts||1/0),this.reconnectionDelay(y.reconnectionDelay||1e3),this.reconnectionDelayMax(y.reconnectionDelayMax||5e3),this.randomizationFactor((_=y.randomizationFactor)!==null&&_!==void 0?_:.5),this.backoff=new u.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(y.timeout==null?2e4:y.timeout),this._readyState="closed",this.uri=h;const S=y.parser||l;this.encoder=new S.Encoder,this.decoder=new S.Decoder,this._autoConnect=y.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(h){return arguments.length?(this._reconnection=!!h,this):this._reconnection}reconnectionAttempts(h){return h===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=h,this)}reconnectionDelay(h){var y;return h===void 0?this._reconnectionDelay:(this._reconnectionDelay=h,(y=this.backoff)===null||y===void 0||y.setMin(h),this)}randomizationFactor(h){var y;return h===void 0?this._randomizationFactor:(this._randomizationFactor=h,(y=this.backoff)===null||y===void 0||y.setJitter(h),this)}reconnectionDelayMax(h){var y;return h===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=h,(y=this.backoff)===null||y===void 0||y.setMax(h),this)}timeout(h){return arguments.length?(this._timeout=h,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(h){if(d("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;d("opening %s",this.uri),this.engine=new s.Socket(this.uri,this.opts);const y=this.engine,_=this;this._readyState="opening",this.skipReconnect=!1;const S=i.on(y,"open",function(){_.onopen(),h&&h()}),v=x=>{d("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",x),h?h(x):this.maybeReconnectOnOpen()},w=i.on(y,"error",v);if(this._timeout!==!1){const x=this._timeout;d("connect attempt will timeout after %d",x);const O=this.setTimeoutFn(()=>{d("connect attempt timed out after %d",x),S(),v(new Error("timeout")),y.close()},x);this.opts.autoUnref&&O.unref(),this.subs.push(()=>{this.clearTimeoutFn(O)})}return this.subs.push(S),this.subs.push(w),this}connect(h){return this.open(h)}onopen(){d("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const h=this.engine;this.subs.push(i.on(h,"ping",this.onping.bind(this)),i.on(h,"data",this.ondata.bind(this)),i.on(h,"error",this.onerror.bind(this)),i.on(h,"close",this.onclose.bind(this)),i.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(h){try{this.decoder.add(h)}catch(y){this.onclose("parse error",y)}}ondecoded(h){s.nextTick(()=>{this.emitReserved("packet",h)},this.setTimeoutFn)}onerror(h){d("error",h),this.emitReserved("error",h)}socket(h,y){let _=this.nsps[h];return _?this._autoConnect&&!_.active&&_.connect():(_=new o.Socket(this,h,y),this.nsps[h]=_),_}_destroy(h){const y=Object.keys(this.nsps);for(const _ of y)if(this.nsps[_].active){d("socket %s is still active, skipping close",_);return}this._close()}_packet(h){d("writing packet %j",h);const y=this.encoder.encode(h);for(let _=0;_<y.length;_++)this.engine.write(y[_],h.options)}cleanup(){d("cleanup"),this.subs.forEach(h=>h()),this.subs.length=0,this.decoder.destroy()}_close(){d("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(h,y){d("closed due to %s",h),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",h,y),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const h=this;if(this.backoff.attempts>=this._reconnectionAttempts)d("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const y=this.backoff.duration();d("will wait %dms before reconnect attempt",y),this._reconnecting=!0;const _=this.setTimeoutFn(()=>{h.skipReconnect||(d("attempting reconnect"),this.emitReserved("reconnect_attempt",h.backoff.attempts),!h.skipReconnect&&h.open(S=>{S?(d("reconnect attempt error"),h._reconnecting=!1,h.reconnect(),this.emitReserved("reconnect_error",S)):(d("reconnect success"),h.onreconnect())}))},y);this.opts.autoUnref&&_.unref(),this.subs.push(()=>{this.clearTimeoutFn(_)})}}onreconnect(){const h=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",h)}}return Ar.Manager=f,Ar}var hu;function lv(){return hu||(hu=1,function(e,t){var n=ce&&ce.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const r=av(),s=uv();Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return s.Manager}});const o=bf();Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return o.Socket}});const i=n(ut()).default("socket.io-client"),u={};function c(d,f){typeof d=="object"&&(f=d,d=void 0),f=f||{};const p=r.url(d,f.path||"/socket.io"),h=p.source,y=p.id,_=p.path,S=u[y]&&_ in u[y].nsps,v=f.forceNew||f["force new connection"]||f.multiplex===!1||S;let w;return v?(i("ignoring socket cache for %s",h),w=new s.Manager(h,f)):(u[y]||(i("new io instance for %s",h),u[y]=new s.Manager(h,f)),w=u[y]),p.query&&!f.query&&(f.query=p.queryKey),w.socket(p.path,f)}t.io=c,t.connect=c,t.default=c,Object.assign(c,{Manager:s.Manager,Socket:o.Socket,io:c,connect:c});var a=Ea();Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return a.protocol}}),e.exports=c}(On,On.exports)),On.exports}var Ao={},Pr={},mu;function fv(){if(mu)return Pr;mu=1,Pr.byteLength=i,Pr.toByteArray=c,Pr.fromByteArray=f;for(var e=[],t=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,o=r.length;s<o;++s)e[s]=r[s],t[r.charCodeAt(s)]=s;t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;function l(p){var h=p.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=p.indexOf("=");y===-1&&(y=h);var _=y===h?0:4-y%4;return[y,_]}function i(p){var h=l(p),y=h[0],_=h[1];return(y+_)*3/4-_}function u(p,h,y){return(h+y)*3/4-y}function c(p){var h,y=l(p),_=y[0],S=y[1],v=new n(u(p,_,S)),w=0,x=S>0?_-4:_,O;for(O=0;O<x;O+=4)h=t[p.charCodeAt(O)]<<18|t[p.charCodeAt(O+1)]<<12|t[p.charCodeAt(O+2)]<<6|t[p.charCodeAt(O+3)],v[w++]=h>>16&255,v[w++]=h>>8&255,v[w++]=h&255;return S===2&&(h=t[p.charCodeAt(O)]<<2|t[p.charCodeAt(O+1)]>>4,v[w++]=h&255),S===1&&(h=t[p.charCodeAt(O)]<<10|t[p.charCodeAt(O+1)]<<4|t[p.charCodeAt(O+2)]>>2,v[w++]=h>>8&255,v[w++]=h&255),v}function a(p){return e[p>>18&63]+e[p>>12&63]+e[p>>6&63]+e[p&63]}function d(p,h,y){for(var _,S=[],v=h;v<y;v+=3)_=(p[v]<<16&16711680)+(p[v+1]<<8&65280)+(p[v+2]&255),S.push(a(_));return S.join("")}function f(p){for(var h,y=p.length,_=y%3,S=[],v=16383,w=0,x=y-_;w<x;w+=v)S.push(d(p,w,w+v>x?x:w+v));return _===1?(h=p[y-1],S.push(e[h>>2]+e[h<<4&63]+"==")):_===2&&(h=(p[y-2]<<8)+p[y-1],S.push(e[h>>10]+e[h>>4&63]+e[h<<2&63]+"=")),S.join("")}return Pr}var xn={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var gu;function dv(){return gu||(gu=1,xn.read=function(e,t,n,r,s){var o,l,i=s*8-r-1,u=(1<<i)-1,c=u>>1,a=-7,d=n?s-1:0,f=n?-1:1,p=e[t+d];for(d+=f,o=p&(1<<-a)-1,p>>=-a,a+=i;a>0;o=o*256+e[t+d],d+=f,a-=8);for(l=o&(1<<-a)-1,o>>=-a,a+=r;a>0;l=l*256+e[t+d],d+=f,a-=8);if(o===0)o=1-c;else{if(o===u)return l?NaN:(p?-1:1)*(1/0);l=l+Math.pow(2,r),o=o-c}return(p?-1:1)*l*Math.pow(2,o-r)},xn.write=function(e,t,n,r,s,o){var l,i,u,c=o*8-s-1,a=(1<<c)-1,d=a>>1,f=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,h=r?1:-1,y=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,l=a):(l=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-l))<1&&(l--,u*=2),l+d>=1?t+=f/u:t+=f*Math.pow(2,1-d),t*u>=2&&(l++,u/=2),l+d>=a?(i=0,l=a):l+d>=1?(i=(t*u-1)*Math.pow(2,s),l=l+d):(i=t*Math.pow(2,d-1)*Math.pow(2,s),l=0));s>=8;e[n+p]=i&255,p+=h,i/=256,s-=8);for(l=l<<s|i,c+=s;c>0;e[n+p]=l&255,p+=h,l/=256,c-=8);e[n+p-h]|=y*128}),xn}/*!
|
|
64
|
-
* The buffer module from node.js, for the browser.
|
|
65
|
-
*
|
|
66
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
67
|
-
* @license MIT
|
|
68
|
-
*/var yu;function pv(){return yu||(yu=1,function(e){const t=fv(),n=dv(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=i,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50;const s=2147483647;e.kMaxLength=s,i.TYPED_ARRAY_SUPPORT=o(),!i.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 b=new Uint8Array(1),m={foo:function(){return 42}};return Object.setPrototypeOf(m,Uint8Array.prototype),Object.setPrototypeOf(b,m),b.foo()===42}catch{return!1}}Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}});function l(b){if(b>s)throw new RangeError('The value "'+b+'" is invalid for option "size"');const m=new Uint8Array(b);return Object.setPrototypeOf(m,i.prototype),m}function i(b,m,g){if(typeof b=="number"){if(typeof m=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(b)}return u(b,m,g)}i.poolSize=8192;function u(b,m,g){if(typeof b=="string")return f(b,m);if(ArrayBuffer.isView(b))return h(b);if(b==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(Me(b,ArrayBuffer)||b&&Me(b.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Me(b,SharedArrayBuffer)||b&&Me(b.buffer,SharedArrayBuffer)))return y(b,m,g);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const T=b.valueOf&&b.valueOf();if(T!=null&&T!==b)return i.from(T,m,g);const N=_(b);if(N)return N;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return i.from(b[Symbol.toPrimitive]("string"),m,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}i.from=function(b,m,g){return u(b,m,g)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array);function c(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function a(b,m,g){return c(b),b<=0?l(b):m!==void 0?typeof g=="string"?l(b).fill(m,g):l(b).fill(m):l(b)}i.alloc=function(b,m,g){return a(b,m,g)};function d(b){return c(b),l(b<0?0:S(b)|0)}i.allocUnsafe=function(b){return d(b)},i.allocUnsafeSlow=function(b){return d(b)};function f(b,m){if((typeof m!="string"||m==="")&&(m="utf8"),!i.isEncoding(m))throw new TypeError("Unknown encoding: "+m);const g=w(b,m)|0;let T=l(g);const N=T.write(b,m);return N!==g&&(T=T.slice(0,N)),T}function p(b){const m=b.length<0?0:S(b.length)|0,g=l(m);for(let T=0;T<m;T+=1)g[T]=b[T]&255;return g}function h(b){if(Me(b,Uint8Array)){const m=new Uint8Array(b);return y(m.buffer,m.byteOffset,m.byteLength)}return p(b)}function y(b,m,g){if(m<0||b.byteLength<m)throw new RangeError('"offset" is outside of buffer bounds');if(b.byteLength<m+(g||0))throw new RangeError('"length" is outside of buffer bounds');let T;return m===void 0&&g===void 0?T=new Uint8Array(b):g===void 0?T=new Uint8Array(b,m):T=new Uint8Array(b,m,g),Object.setPrototypeOf(T,i.prototype),T}function _(b){if(i.isBuffer(b)){const m=S(b.length)|0,g=l(m);return g.length===0||b.copy(g,0,0,m),g}if(b.length!==void 0)return typeof b.length!="number"||_t(b.length)?l(0):p(b);if(b.type==="Buffer"&&Array.isArray(b.data))return p(b.data)}function S(b){if(b>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return b|0}function v(b){return+b!=b&&(b=0),i.alloc(+b)}i.isBuffer=function(m){return m!=null&&m._isBuffer===!0&&m!==i.prototype},i.compare=function(m,g){if(Me(m,Uint8Array)&&(m=i.from(m,m.offset,m.byteLength)),Me(g,Uint8Array)&&(g=i.from(g,g.offset,g.byteLength)),!i.isBuffer(m)||!i.isBuffer(g))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(m===g)return 0;let T=m.length,N=g.length;for(let M=0,H=Math.min(T,N);M<H;++M)if(m[M]!==g[M]){T=m[M],N=g[M];break}return T<N?-1:N<T?1:0},i.isEncoding=function(m){switch(String(m).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}},i.concat=function(m,g){if(!Array.isArray(m))throw new TypeError('"list" argument must be an Array of Buffers');if(m.length===0)return i.alloc(0);let T;if(g===void 0)for(g=0,T=0;T<m.length;++T)g+=m[T].length;const N=i.allocUnsafe(g);let M=0;for(T=0;T<m.length;++T){let H=m[T];if(Me(H,Uint8Array))M+H.length>N.length?(i.isBuffer(H)||(H=i.from(H)),H.copy(N,M)):Uint8Array.prototype.set.call(N,H,M);else if(i.isBuffer(H))H.copy(N,M);else throw new TypeError('"list" argument must be an Array of Buffers');M+=H.length}return N};function w(b,m){if(i.isBuffer(b))return b.length;if(ArrayBuffer.isView(b)||Me(b,ArrayBuffer))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);const g=b.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&g===0)return 0;let N=!1;for(;;)switch(m){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return je(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return Mt(b).length;default:if(N)return T?-1:je(b).length;m=(""+m).toLowerCase(),N=!0}}i.byteLength=w;function x(b,m,g){let T=!1;if((m===void 0||m<0)&&(m=0),m>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,m>>>=0,g<=m))return"";for(b||(b="utf8");;)switch(b){case"hex":return oe(this,m,g);case"utf8":case"utf-8":return K(this,m,g);case"ascii":return q(this,m,g);case"latin1":case"binary":return Y(this,m,g);case"base64":return $(this,m,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee(this,m,g);default:if(T)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase(),T=!0}}i.prototype._isBuffer=!0;function O(b,m,g){const T=b[m];b[m]=b[g],b[g]=T}i.prototype.swap16=function(){const m=this.length;if(m%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let g=0;g<m;g+=2)O(this,g,g+1);return this},i.prototype.swap32=function(){const m=this.length;if(m%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let g=0;g<m;g+=4)O(this,g,g+3),O(this,g+1,g+2);return this},i.prototype.swap64=function(){const m=this.length;if(m%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let g=0;g<m;g+=8)O(this,g,g+7),O(this,g+1,g+6),O(this,g+2,g+5),O(this,g+3,g+4);return this},i.prototype.toString=function(){const m=this.length;return m===0?"":arguments.length===0?K(this,0,m):x.apply(this,arguments)},i.prototype.toLocaleString=i.prototype.toString,i.prototype.equals=function(m){if(!i.isBuffer(m))throw new TypeError("Argument must be a Buffer");return this===m?!0:i.compare(this,m)===0},i.prototype.inspect=function(){let m="";const g=e.INSPECT_MAX_BYTES;return m=this.toString("hex",0,g).replace(/(.{2})/g,"$1 ").trim(),this.length>g&&(m+=" ... "),"<Buffer "+m+">"},r&&(i.prototype[r]=i.prototype.inspect),i.prototype.compare=function(m,g,T,N,M){if(Me(m,Uint8Array)&&(m=i.from(m,m.offset,m.byteLength)),!i.isBuffer(m))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof m);if(g===void 0&&(g=0),T===void 0&&(T=m?m.length:0),N===void 0&&(N=0),M===void 0&&(M=this.length),g<0||T>m.length||N<0||M>this.length)throw new RangeError("out of range index");if(N>=M&&g>=T)return 0;if(N>=M)return-1;if(g>=T)return 1;if(g>>>=0,T>>>=0,N>>>=0,M>>>=0,this===m)return 0;let H=M-N,le=T-g;const be=Math.min(H,le),_e=this.slice(N,M),Se=m.slice(g,T);for(let me=0;me<be;++me)if(_e[me]!==Se[me]){H=_e[me],le=Se[me];break}return H<le?-1:le<H?1:0};function F(b,m,g,T,N){if(b.length===0)return-1;if(typeof g=="string"?(T=g,g=0):g>2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,_t(g)&&(g=N?0:b.length-1),g<0&&(g=b.length+g),g>=b.length){if(N)return-1;g=b.length-1}else if(g<0)if(N)g=0;else return-1;if(typeof m=="string"&&(m=i.from(m,T)),i.isBuffer(m))return m.length===0?-1:D(b,m,g,T,N);if(typeof m=="number")return m=m&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(b,m,g):Uint8Array.prototype.lastIndexOf.call(b,m,g):D(b,[m],g,T,N);throw new TypeError("val must be string, number or Buffer")}function D(b,m,g,T,N){let M=1,H=b.length,le=m.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(b.length<2||m.length<2)return-1;M=2,H/=2,le/=2,g/=2}function be(Se,me){return M===1?Se[me]:Se.readUInt16BE(me*M)}let _e;if(N){let Se=-1;for(_e=g;_e<H;_e++)if(be(b,_e)===be(m,Se===-1?0:_e-Se)){if(Se===-1&&(Se=_e),_e-Se+1===le)return Se*M}else Se!==-1&&(_e-=_e-Se),Se=-1}else for(g+le>H&&(g=H-le),_e=g;_e>=0;_e--){let Se=!0;for(let me=0;me<le;me++)if(be(b,_e+me)!==be(m,me)){Se=!1;break}if(Se)return _e}return-1}i.prototype.includes=function(m,g,T){return this.indexOf(m,g,T)!==-1},i.prototype.indexOf=function(m,g,T){return F(this,m,g,T,!0)},i.prototype.lastIndexOf=function(m,g,T){return F(this,m,g,T,!1)};function R(b,m,g,T){g=Number(g)||0;const N=b.length-g;T?(T=Number(T),T>N&&(T=N)):T=N;const M=m.length;T>M/2&&(T=M/2);let H;for(H=0;H<T;++H){const le=parseInt(m.substr(H*2,2),16);if(_t(le))return H;b[g+H]=le}return H}function W(b,m,g,T){return vt(je(m,b.length-g),b,g,T)}function V(b,m,g,T){return vt(Xe(m),b,g,T)}function L(b,m,g,T){return vt(Mt(m),b,g,T)}function U(b,m,g,T){return vt(rt(m,b.length-g),b,g,T)}i.prototype.write=function(m,g,T,N){if(g===void 0)N="utf8",T=this.length,g=0;else if(T===void 0&&typeof g=="string")N=g,T=this.length,g=0;else if(isFinite(g))g=g>>>0,isFinite(T)?(T=T>>>0,N===void 0&&(N="utf8")):(N=T,T=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const M=this.length-g;if((T===void 0||T>M)&&(T=M),m.length>0&&(T<0||g<0)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");N||(N="utf8");let H=!1;for(;;)switch(N){case"hex":return R(this,m,g,T);case"utf8":case"utf-8":return W(this,m,g,T);case"ascii":case"latin1":case"binary":return V(this,m,g,T);case"base64":return L(this,m,g,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,m,g,T);default:if(H)throw new TypeError("Unknown encoding: "+N);N=(""+N).toLowerCase(),H=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function $(b,m,g){return m===0&&g===b.length?t.fromByteArray(b):t.fromByteArray(b.slice(m,g))}function K(b,m,g){g=Math.min(b.length,g);const T=[];let N=m;for(;N<g;){const M=b[N];let H=null,le=M>239?4:M>223?3:M>191?2:1;if(N+le<=g){let be,_e,Se,me;switch(le){case 1:M<128&&(H=M);break;case 2:be=b[N+1],(be&192)===128&&(me=(M&31)<<6|be&63,me>127&&(H=me));break;case 3:be=b[N+1],_e=b[N+2],(be&192)===128&&(_e&192)===128&&(me=(M&15)<<12|(be&63)<<6|_e&63,me>2047&&(me<55296||me>57343)&&(H=me));break;case 4:be=b[N+1],_e=b[N+2],Se=b[N+3],(be&192)===128&&(_e&192)===128&&(Se&192)===128&&(me=(M&15)<<18|(be&63)<<12|(_e&63)<<6|Se&63,me>65535&&me<1114112&&(H=me))}}H===null?(H=65533,le=1):H>65535&&(H-=65536,T.push(H>>>10&1023|55296),H=56320|H&1023),T.push(H),N+=le}return C(T)}const Q=4096;function C(b){const m=b.length;if(m<=Q)return String.fromCharCode.apply(String,b);let g="",T=0;for(;T<m;)g+=String.fromCharCode.apply(String,b.slice(T,T+=Q));return g}function q(b,m,g){let T="";g=Math.min(b.length,g);for(let N=m;N<g;++N)T+=String.fromCharCode(b[N]&127);return T}function Y(b,m,g){let T="";g=Math.min(b.length,g);for(let N=m;N<g;++N)T+=String.fromCharCode(b[N]);return T}function oe(b,m,g){const T=b.length;(!m||m<0)&&(m=0),(!g||g<0||g>T)&&(g=T);let N="";for(let M=m;M<g;++M)N+=Dt[b[M]];return N}function ee(b,m,g){const T=b.slice(m,g);let N="";for(let M=0;M<T.length-1;M+=2)N+=String.fromCharCode(T[M]+T[M+1]*256);return N}i.prototype.slice=function(m,g){const T=this.length;m=~~m,g=g===void 0?T:~~g,m<0?(m+=T,m<0&&(m=0)):m>T&&(m=T),g<0?(g+=T,g<0&&(g=0)):g>T&&(g=T),g<m&&(g=m);const N=this.subarray(m,g);return Object.setPrototypeOf(N,i.prototype),N};function G(b,m,g){if(b%1!==0||b<0)throw new RangeError("offset is not uint");if(b+m>g)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUintLE=i.prototype.readUIntLE=function(m,g,T){m=m>>>0,g=g>>>0,T||G(m,g,this.length);let N=this[m],M=1,H=0;for(;++H<g&&(M*=256);)N+=this[m+H]*M;return N},i.prototype.readUintBE=i.prototype.readUIntBE=function(m,g,T){m=m>>>0,g=g>>>0,T||G(m,g,this.length);let N=this[m+--g],M=1;for(;g>0&&(M*=256);)N+=this[m+--g]*M;return N},i.prototype.readUint8=i.prototype.readUInt8=function(m,g){return m=m>>>0,g||G(m,1,this.length),this[m]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(m,g){return m=m>>>0,g||G(m,2,this.length),this[m]|this[m+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(m,g){return m=m>>>0,g||G(m,2,this.length),this[m]<<8|this[m+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(m,g){return m=m>>>0,g||G(m,4,this.length),(this[m]|this[m+1]<<8|this[m+2]<<16)+this[m+3]*16777216},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(m,g){return m=m>>>0,g||G(m,4,this.length),this[m]*16777216+(this[m+1]<<16|this[m+2]<<8|this[m+3])},i.prototype.readBigUInt64LE=Ke(function(m){m=m>>>0,Ge(m,"offset");const g=this[m],T=this[m+7];(g===void 0||T===void 0)&&qe(m,this.length-8);const N=g+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24,M=this[++m]+this[++m]*2**8+this[++m]*2**16+T*2**24;return BigInt(N)+(BigInt(M)<<BigInt(32))}),i.prototype.readBigUInt64BE=Ke(function(m){m=m>>>0,Ge(m,"offset");const g=this[m],T=this[m+7];(g===void 0||T===void 0)&&qe(m,this.length-8);const N=g*2**24+this[++m]*2**16+this[++m]*2**8+this[++m],M=this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+T;return(BigInt(N)<<BigInt(32))+BigInt(M)}),i.prototype.readIntLE=function(m,g,T){m=m>>>0,g=g>>>0,T||G(m,g,this.length);let N=this[m],M=1,H=0;for(;++H<g&&(M*=256);)N+=this[m+H]*M;return M*=128,N>=M&&(N-=Math.pow(2,8*g)),N},i.prototype.readIntBE=function(m,g,T){m=m>>>0,g=g>>>0,T||G(m,g,this.length);let N=g,M=1,H=this[m+--N];for(;N>0&&(M*=256);)H+=this[m+--N]*M;return M*=128,H>=M&&(H-=Math.pow(2,8*g)),H},i.prototype.readInt8=function(m,g){return m=m>>>0,g||G(m,1,this.length),this[m]&128?(255-this[m]+1)*-1:this[m]},i.prototype.readInt16LE=function(m,g){m=m>>>0,g||G(m,2,this.length);const T=this[m]|this[m+1]<<8;return T&32768?T|4294901760:T},i.prototype.readInt16BE=function(m,g){m=m>>>0,g||G(m,2,this.length);const T=this[m+1]|this[m]<<8;return T&32768?T|4294901760:T},i.prototype.readInt32LE=function(m,g){return m=m>>>0,g||G(m,4,this.length),this[m]|this[m+1]<<8|this[m+2]<<16|this[m+3]<<24},i.prototype.readInt32BE=function(m,g){return m=m>>>0,g||G(m,4,this.length),this[m]<<24|this[m+1]<<16|this[m+2]<<8|this[m+3]},i.prototype.readBigInt64LE=Ke(function(m){m=m>>>0,Ge(m,"offset");const g=this[m],T=this[m+7];(g===void 0||T===void 0)&&qe(m,this.length-8);const N=this[m+4]+this[m+5]*2**8+this[m+6]*2**16+(T<<24);return(BigInt(N)<<BigInt(32))+BigInt(g+this[++m]*2**8+this[++m]*2**16+this[++m]*2**24)}),i.prototype.readBigInt64BE=Ke(function(m){m=m>>>0,Ge(m,"offset");const g=this[m],T=this[m+7];(g===void 0||T===void 0)&&qe(m,this.length-8);const N=(g<<24)+this[++m]*2**16+this[++m]*2**8+this[++m];return(BigInt(N)<<BigInt(32))+BigInt(this[++m]*2**24+this[++m]*2**16+this[++m]*2**8+T)}),i.prototype.readFloatLE=function(m,g){return m=m>>>0,g||G(m,4,this.length),n.read(this,m,!0,23,4)},i.prototype.readFloatBE=function(m,g){return m=m>>>0,g||G(m,4,this.length),n.read(this,m,!1,23,4)},i.prototype.readDoubleLE=function(m,g){return m=m>>>0,g||G(m,8,this.length),n.read(this,m,!0,52,8)},i.prototype.readDoubleBE=function(m,g){return m=m>>>0,g||G(m,8,this.length),n.read(this,m,!1,52,8)};function Z(b,m,g,T,N,M){if(!i.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(m>N||m<M)throw new RangeError('"value" argument is out of bounds');if(g+T>b.length)throw new RangeError("Index out of range")}i.prototype.writeUintLE=i.prototype.writeUIntLE=function(m,g,T,N){if(m=+m,g=g>>>0,T=T>>>0,!N){const le=Math.pow(2,8*T)-1;Z(this,m,g,T,le,0)}let M=1,H=0;for(this[g]=m&255;++H<T&&(M*=256);)this[g+H]=m/M&255;return g+T},i.prototype.writeUintBE=i.prototype.writeUIntBE=function(m,g,T,N){if(m=+m,g=g>>>0,T=T>>>0,!N){const le=Math.pow(2,8*T)-1;Z(this,m,g,T,le,0)}let M=T-1,H=1;for(this[g+M]=m&255;--M>=0&&(H*=256);)this[g+M]=m/H&255;return g+T},i.prototype.writeUint8=i.prototype.writeUInt8=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,1,255,0),this[g]=m&255,g+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,2,65535,0),this[g]=m&255,this[g+1]=m>>>8,g+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,2,65535,0),this[g]=m>>>8,this[g+1]=m&255,g+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,4,4294967295,0),this[g+3]=m>>>24,this[g+2]=m>>>16,this[g+1]=m>>>8,this[g]=m&255,g+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,4,4294967295,0),this[g]=m>>>24,this[g+1]=m>>>16,this[g+2]=m>>>8,this[g+3]=m&255,g+4};function ae(b,m,g,T,N){tt(m,T,N,b,g,7);let M=Number(m&BigInt(4294967295));b[g++]=M,M=M>>8,b[g++]=M,M=M>>8,b[g++]=M,M=M>>8,b[g++]=M;let H=Number(m>>BigInt(32)&BigInt(4294967295));return b[g++]=H,H=H>>8,b[g++]=H,H=H>>8,b[g++]=H,H=H>>8,b[g++]=H,g}function Oe(b,m,g,T,N){tt(m,T,N,b,g,7);let M=Number(m&BigInt(4294967295));b[g+7]=M,M=M>>8,b[g+6]=M,M=M>>8,b[g+5]=M,M=M>>8,b[g+4]=M;let H=Number(m>>BigInt(32)&BigInt(4294967295));return b[g+3]=H,H=H>>8,b[g+2]=H,H=H>>8,b[g+1]=H,H=H>>8,b[g]=H,g+8}i.prototype.writeBigUInt64LE=Ke(function(m,g=0){return ae(this,m,g,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeBigUInt64BE=Ke(function(m,g=0){return Oe(this,m,g,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeIntLE=function(m,g,T,N){if(m=+m,g=g>>>0,!N){const be=Math.pow(2,8*T-1);Z(this,m,g,T,be-1,-be)}let M=0,H=1,le=0;for(this[g]=m&255;++M<T&&(H*=256);)m<0&&le===0&&this[g+M-1]!==0&&(le=1),this[g+M]=(m/H>>0)-le&255;return g+T},i.prototype.writeIntBE=function(m,g,T,N){if(m=+m,g=g>>>0,!N){const be=Math.pow(2,8*T-1);Z(this,m,g,T,be-1,-be)}let M=T-1,H=1,le=0;for(this[g+M]=m&255;--M>=0&&(H*=256);)m<0&&le===0&&this[g+M+1]!==0&&(le=1),this[g+M]=(m/H>>0)-le&255;return g+T},i.prototype.writeInt8=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,1,127,-128),m<0&&(m=255+m+1),this[g]=m&255,g+1},i.prototype.writeInt16LE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,2,32767,-32768),this[g]=m&255,this[g+1]=m>>>8,g+2},i.prototype.writeInt16BE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,2,32767,-32768),this[g]=m>>>8,this[g+1]=m&255,g+2},i.prototype.writeInt32LE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,4,2147483647,-2147483648),this[g]=m&255,this[g+1]=m>>>8,this[g+2]=m>>>16,this[g+3]=m>>>24,g+4},i.prototype.writeInt32BE=function(m,g,T){return m=+m,g=g>>>0,T||Z(this,m,g,4,2147483647,-2147483648),m<0&&(m=4294967295+m+1),this[g]=m>>>24,this[g+1]=m>>>16,this[g+2]=m>>>8,this[g+3]=m&255,g+4},i.prototype.writeBigInt64LE=Ke(function(m,g=0){return ae(this,m,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),i.prototype.writeBigInt64BE=Ke(function(m,g=0){return Oe(this,m,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ie(b,m,g,T,N,M){if(g+T>b.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function re(b,m,g,T,N){return m=+m,g=g>>>0,N||ie(b,m,g,4),n.write(b,m,g,T,23,4),g+4}i.prototype.writeFloatLE=function(m,g,T){return re(this,m,g,!0,T)},i.prototype.writeFloatBE=function(m,g,T){return re(this,m,g,!1,T)};function te(b,m,g,T,N){return m=+m,g=g>>>0,N||ie(b,m,g,8),n.write(b,m,g,T,52,8),g+8}i.prototype.writeDoubleLE=function(m,g,T){return te(this,m,g,!0,T)},i.prototype.writeDoubleBE=function(m,g,T){return te(this,m,g,!1,T)},i.prototype.copy=function(m,g,T,N){if(!i.isBuffer(m))throw new TypeError("argument should be a Buffer");if(T||(T=0),!N&&N!==0&&(N=this.length),g>=m.length&&(g=m.length),g||(g=0),N>0&&N<T&&(N=T),N===T||m.length===0||this.length===0)return 0;if(g<0)throw new RangeError("targetStart out of bounds");if(T<0||T>=this.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("sourceEnd out of bounds");N>this.length&&(N=this.length),m.length-g<N-T&&(N=m.length-g+T);const M=N-T;return this===m&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(g,T,N):Uint8Array.prototype.set.call(m,this.subarray(T,N),g),M},i.prototype.fill=function(m,g,T,N){if(typeof m=="string"){if(typeof g=="string"?(N=g,g=0,T=this.length):typeof T=="string"&&(N=T,T=this.length),N!==void 0&&typeof N!="string")throw new TypeError("encoding must be a string");if(typeof N=="string"&&!i.isEncoding(N))throw new TypeError("Unknown encoding: "+N);if(m.length===1){const H=m.charCodeAt(0);(N==="utf8"&&H<128||N==="latin1")&&(m=H)}}else typeof m=="number"?m=m&255:typeof m=="boolean"&&(m=Number(m));if(g<0||this.length<g||this.length<T)throw new RangeError("Out of range index");if(T<=g)return this;g=g>>>0,T=T===void 0?this.length:T>>>0,m||(m=0);let M;if(typeof m=="number")for(M=g;M<T;++M)this[M]=m;else{const H=i.isBuffer(m)?m:i.from(m,N),le=H.length;if(le===0)throw new TypeError('The value "'+m+'" is invalid for argument "value"');for(M=0;M<T-g;++M)this[M+g]=H[M%le]}return this};const we={};function Ne(b,m,g){we[b]=class extends g{constructor(){super(),Object.defineProperty(this,"message",{value:m.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${b}]`,this.stack,delete this.name}get code(){return b}set code(N){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:N,writable:!0})}toString(){return`${this.name} [${b}]: ${this.message}`}}}Ne("ERR_BUFFER_OUT_OF_BOUNDS",function(b){return b?`${b} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ne("ERR_INVALID_ARG_TYPE",function(b,m){return`The "${b}" argument must be of type number. Received type ${typeof m}`},TypeError),Ne("ERR_OUT_OF_RANGE",function(b,m,g){let T=`The value of "${b}" is out of range.`,N=g;return Number.isInteger(g)&&Math.abs(g)>2**32?N=$e(String(g)):typeof g=="bigint"&&(N=String(g),(g>BigInt(2)**BigInt(32)||g<-(BigInt(2)**BigInt(32)))&&(N=$e(N)),N+="n"),T+=` It must be ${m}. Received ${N}`,T},RangeError);function $e(b){let m="",g=b.length;const T=b[0]==="-"?1:0;for(;g>=T+4;g-=3)m=`_${b.slice(g-3,g)}${m}`;return`${b.slice(0,g)}${m}`}function Fe(b,m,g){Ge(m,"offset"),(b[m]===void 0||b[m+g]===void 0)&&qe(m,b.length-(g+1))}function tt(b,m,g,T,N,M){if(b>g||b<m){const H=typeof m=="bigint"?"n":"";let le;throw M>3?m===0||m===BigInt(0)?le=`>= 0${H} and < 2${H} ** ${(M+1)*8}${H}`:le=`>= -(2${H} ** ${(M+1)*8-1}${H}) and < 2 ** ${(M+1)*8-1}${H}`:le=`>= ${m}${H} and <= ${g}${H}`,new we.ERR_OUT_OF_RANGE("value",le,b)}Fe(T,N,M)}function Ge(b,m){if(typeof b!="number")throw new we.ERR_INVALID_ARG_TYPE(m,"number",b)}function qe(b,m,g){throw Math.floor(b)!==b?(Ge(b,g),new we.ERR_OUT_OF_RANGE(g||"offset","an integer",b)):m<0?new we.ERR_BUFFER_OUT_OF_BOUNDS:new we.ERR_OUT_OF_RANGE(g||"offset",`>= ${g?1:0} and <= ${m}`,b)}const Ve=/[^+/0-9A-Za-z-_]/g;function ve(b){if(b=b.split("=")[0],b=b.trim().replace(Ve,""),b.length<2)return"";for(;b.length%4!==0;)b=b+"=";return b}function je(b,m){m=m||1/0;let g;const T=b.length;let N=null;const M=[];for(let H=0;H<T;++H){if(g=b.charCodeAt(H),g>55295&&g<57344){if(!N){if(g>56319){(m-=3)>-1&&M.push(239,191,189);continue}else if(H+1===T){(m-=3)>-1&&M.push(239,191,189);continue}N=g;continue}if(g<56320){(m-=3)>-1&&M.push(239,191,189),N=g;continue}g=(N-55296<<10|g-56320)+65536}else N&&(m-=3)>-1&&M.push(239,191,189);if(N=null,g<128){if((m-=1)<0)break;M.push(g)}else if(g<2048){if((m-=2)<0)break;M.push(g>>6|192,g&63|128)}else if(g<65536){if((m-=3)<0)break;M.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((m-=4)<0)break;M.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return M}function Xe(b){const m=[];for(let g=0;g<b.length;++g)m.push(b.charCodeAt(g)&255);return m}function rt(b,m){let g,T,N;const M=[];for(let H=0;H<b.length&&!((m-=2)<0);++H)g=b.charCodeAt(H),T=g>>8,N=g%256,M.push(N),M.push(T);return M}function Mt(b){return t.toByteArray(ve(b))}function vt(b,m,g,T){let N;for(N=0;N<T&&!(N+g>=m.length||N>=b.length);++N)m[N+g]=b[N];return N}function Me(b,m){return b instanceof m||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===m.name}function _t(b){return b!==b}const Dt=function(){const b="0123456789abcdef",m=new Array(256);for(let g=0;g<16;++g){const T=g*16;for(let N=0;N<16;++N)m[T+N]=b[g]+b[N]}return m}();function Ke(b){return typeof BigInt>"u"?Ut:b}function Ut(){throw new Error("BigInt not supported")}}(Ao)),Ao}(function(e,t){(function(n,r){e.exports=r(by(),Ly(),Uy(),Du(),Vy,lv(),pv())})(ce,function(n,r,s,o,l,i,u){return function(){var c={809:function(p){p.exports=n},30:function(p){p.exports=r},36:function(p){p.exports=s},300:function(p){p.exports=o},408:function(p){p.exports=u},25:function(p){p.exports=l},130:function(p){p.exports=i}},a={};function d(p){var h=a[p];if(h!==void 0)return h.exports;var y=a[p]={exports:{}};return c[p](y,y.exports,d),y.exports}d.n=function(p){var h=p&&p.__esModule?function(){return p.default}:function(){return p};return d.d(h,{a:h}),h},d.d=function(p,h){for(var y in h)d.o(h,y)&&!d.o(p,y)&&Object.defineProperty(p,y,{enumerable:!0,get:h[y]})},d.o=function(p,h){return Object.prototype.hasOwnProperty.call(p,h)},d.r=function(p){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})};var f={};return function(){d.r(f),d.d(f,{assets:function(){return C},auth:function(){return G},buildAnswer:function(){return ap},buildCarouselCard:function(){return op},buildQuestion:function(){return Xd},carouselCards:function(){return Ma},contentInteraction:function(){return Ke},decodeBase64:function(){return cp},default:function(){return up},editorialPages:function(){return Vd},features:function(){return g},getEntries:function(){return p.getEntries},getEntry:function(){return p.getEntry},management:function(){return ir},payments:function(){return ei},people:function(){return Bt},peopleEngagement:function(){return Fa},qaQuestions:function(){return Ba},reportError:function(){return h.reportError},search:function(){return Bd}});var p=d(809),h=d(30),y=d(36),_={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:S,LOCALHOST:v,STAGING:w,STAGING_SPLITTER:x},ENVIRONMENTS:{PRODUCTION:O,LOCAL:F}}}=_,{HUBSPOT:{ENVIRONMENTS_MAPPING:D,EMAIL_IDS:R}}=_;let W={emailIds:{}};var V=d(300),L=d.n(V);const U=async P=>{try{const{message:k,response:I,request:B}=P;let X=k;return I?X+=` - The request was made and the server responded with ${JSON.stringify({status:I.status,data:I.data})}`:B&&(X+=" - The request was made but no response was received"),console.warn(X),await(0,h.reportError)(new Error(X)),X}catch(k){return console.warn(`Cannot handle error: ${k.message}`),k.message}},{APIS:{ASSETS_API:{BASE_URL:$,ENDPOINTS:{USERS:K,CERTIFICATES:Q}}}}=_;var C={certificates:{create:async(P,k)=>{let I=[];try{const{data:B}=await L().post(`${$}${K}/${P}${Q}`,k);B&&(I=B)}catch(B){await U(B)}return I}}};const{APIS:{AUTH_API:{BASE_URL:q,ENDPOINTS:{USER_PASSWORD:Y,USERS:oe}}},USERS:{MYSELF:ee}}=_;var G={userPassword:{update:async P=>{let k=null;try{k=await L().put(`${q}${oe}/${ee}${Y}`,P)}catch(I){k={message:(((I||{}).response||{}).data||{}).message},await U(I)}return k}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:Z,ENDPOINTS:{ANSWERS:ae,QUESTIONS:Oe,LIKES:ie}}}}=_,re=`${Z}${Oe}`;var te={create:async({questionSlug:P},k)=>{try{await L().post(`${re}/${encodeURIComponent(P)}${ae}`,k)}catch(I){const B=await U(I);throw new Error(B)}},remove:async({questionSlug:P,answerSlug:k})=>{try{await L().delete(`${re}/${encodeURIComponent(P)}${ae}/${encodeURIComponent(k)}`)}catch(I){const B=await U(I);throw new Error(B)}},update:async({questionSlug:P,answerSlug:k},I)=>{try{return await L().put(`${re}/${encodeURIComponent(P)}${ae}/${encodeURIComponent(k)}`,I)}catch(B){const X=await U(B);throw new Error(X)}},like:async({questionSlug:P,answerSlug:k},I)=>{try{return await L().post(`${re}/${encodeURIComponent(P)}${ae}/${encodeURIComponent(k)}${ie}`,I)}catch(B){const X=await U(B);throw new Error(X)}},unlike:async({questionSlug:P,answerSlug:k})=>{try{return await L().delete(`${re}/${encodeURIComponent(P)}${ae}/${encodeURIComponent(k)}${ie}`)}catch(I){const B=await U(I);throw new Error(B)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:we,ENDPOINTS:{QUESTIONS:Ne}}}}=_,$e=`${we}${Ne}`;var Fe={create:async P=>{try{return await L().post($e,P)}catch(k){const I=await U(k);throw new Error(I)}},remove:async({questionSlug:P})=>{try{await L().delete(`${$e}/${encodeURIComponent(P)}`)}catch(k){const I=await U(k);throw new Error(I)}},update:async({questionSlug:P},k)=>{try{return await L().put(`${$e}/${encodeURIComponent(P)}`,k)}catch(I){const B=await U(I);throw new Error(B)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:tt,ENDPOINTS:{REPLIES:Ge,ANSWERS:qe,QUESTIONS:Ve,LIKES:ve}}}}=_,je=`${tt}${Ve}`,Xe=({questionSlug:P,answerSlug:k,replySlug:I},B=!1)=>{let X=`${je}/${encodeURIComponent(P)}${qe}/${encodeURIComponent(k)}${Ge}`;return I&&(X=`${X}/${encodeURIComponent(I)}`,B&&(X=`${X}${ve}`)),X};var rt={create:async({questionSlug:P,answerSlug:k},I)=>{try{return await L().post(Xe({questionSlug:P,answerSlug:k}),I)}catch(B){const X=await U(B);throw new Error(X)}},update:async({questionSlug:P,answerSlug:k,replySlug:I},B)=>{try{return await L().put(Xe({questionSlug:P,answerSlug:k,replySlug:I}),B)}catch(X){const ge=await U(X);throw new Error(ge)}},remove:async({questionSlug:P,answerSlug:k,replySlug:I})=>{try{await L().delete(Xe({questionSlug:P,answerSlug:k,replySlug:I}))}catch(B){const X=await U(B);throw new Error(X)}},like:async({questionSlug:P,answerSlug:k,replySlug:I},B)=>{try{await L().post(Xe({questionSlug:P,answerSlug:k,replySlug:I},!0),B)}catch(X){const ge=await U(X);throw new Error(ge)}},unlike:async({questionSlug:P,answerSlug:k,replySlug:I})=>{try{await L().delete(Xe({questionSlug:P,answerSlug:k,replySlug:I},!0))}catch(B){const X=await U(B);throw new Error(X)}},getReplyUrl:Xe};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:Mt,ENDPOINTS:{QUESTIONS:vt,ANSWERS:Me,LIKES:_t}}}}=_,Dt=`${Mt}${vt}`;var Ke={answers:te,questions:Fe,replies:rt,likes:{create:async(P,k)=>{try{return await L().post(`${Dt}/${encodeURIComponent(P)}${Me}/${encodeURIComponent(k)}${_t}`)}catch(I){const B=await U(I);throw new Error(B)}},remove:async(P,k)=>{try{return await L().delete(`${Dt}/${encodeURIComponent(P)}${Me}/${encodeURIComponent(k)}${_t}`)}catch(I){const B=await U(I);throw new Error(B)}}}};const{APIS:{FEATURES_API:{BASE_URL:Ut,ENDPOINTS:{FLAGS:b}}}}=_,m=`${Ut}${b}`;var g={flags:{read:async P=>{let k=null;try{const{data:I}=await L().get(`${m}/${encodeURIComponent(P)}`);I!=null&&I.name&&(I!=null&&I.featureState)&&(k=I)}catch(I){await U(I)}return k}}};const{APIS:{MANAGEMENT_API:{BASE_URL:T,ENDPOINTS:{ACCOUNTS:N}}}}=_;var M={create:async P=>{try{await L().post(`${T}${N}`,P)}catch(k){throw await U(k),k}},read:async P=>{let k=null;try{({data:k}=await L().get(`${T}${N}/${encodeURIComponent(P)}`))}catch(I){await U(I)}return k},update:async(P,k)=>{try{await L().put(`${T}${N}/${encodeURIComponent(P)}`,k)}catch(I){throw await U(I),I}}};const{APIS:{MANAGEMENT_API:{BASE_URL:H,ENDPOINTS:{BULK_ENROLMENTS:le}}}}=_;var be={create:async P=>{try{await L().post(`${H}${le}`,P)}catch(k){throw await U(k),k}}};const{APIS:{MANAGEMENT_API:{BASE_URL:_e,ENDPOINTS:{EVENT_REGISTRATIONS:Se}}}}=_;var me={create:async P=>{try{await L().post(`${_e}${Se}`,P)}catch(k){const I=await U(k);throw new Error(I)}}};const{APIS:{MANAGEMENT_API:{BASE_URL:rr,ENDPOINTS:{LOGINS:Jr,LOGIN_PASSWORDLESS:Et}}}}=_,nr=`${rr}${Jr}`;var ir={accounts:M,bulkEnrolments:be,eventRegistrations:me,passwordless:{update:async P=>{try{await L().put(`${nr}/${encodeURIComponent(P)}${Et}`)}catch(k){throw await U(k),k}}}};const{APIS:{PAYMENTS_API:{BASE_URL_V2:Xr,ENDPOINTS:{PRODUCTS:Zn}}}}=_,Zr=`${Xr}${Zn}`;var ei={products:{list:async P=>{let k=[],I=P?{params:P}:{params:{}};try{const{data:B}=await L().get(Zr,I);B&&B.length&&(k=B)}catch(B){await U(B)}return k}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:en,ENDPOINTS:{BULK_ENROLMENTS:tn}}}}=_;var ti={list:async P=>{let k=[];try{const{data:I}=await L().get(`${en}${tn}`,{params:P});I&&I.length&&(k=I)}catch(I){await U(I)}return k}},ri=d(25);const{OK:rn,MULTIPLE_CHOICES:ni,NOT_FOUND:ii,FORBIDDEN:oi}=ri.StatusCodes,nn=P=>P>=rn&&P<ni||P===oi||P===ii,{APIS:{PEOPLE_API:{BASE_URL_V2:A,ENDPOINTS:{USERS:z}}}}=_,J=async P=>{let k=null;try{const{data:I}=await L().get(`${A}${z}/${encodeURIComponent(P)}`,{validateStatus:nn});I&&I.id&&(k=I)}catch(I){await U(I)}return k},se=async P=>{let k=[];try{if(P&&P.length<2)throw new Error("users list method requires at least two ids");const I=P.map(X=>`ids=${encodeURIComponent(X)}`).join("&"),B=await L().get(`${A}${z}?${I}`,{validateStatus:nn});B&&B.length&&(k=B)}catch(I){await U(I)}return k};var he={read:J,update:async(P,k)=>{let I=!1;try{const{data:B}=await L().put(`${A}${z}/${encodeURIComponent(P)}`,k);I=!(!B||!B.id)}catch(B){await U(B)}return I},list:se};const{APIS:{PEOPLE_API:{BASE_URL_V2:ye,ENDPOINTS:{USERS:de,USER_LIKES:fe}}},USERS:{MYSELF:De}}=_,Re=`${ye}${de}/${De}${fe}`,Ae=async P=>{let k=[],I=P?{params:P}:{params:{}};try{const{data:B}=await L().get(Re,I);B&&B.length&&(k=B)}catch(B){await U(B)}return k};var ze={list:Ae},wt={authors:{readQuestionAuthors:async(P,k,I)=>{try{if(P.author=await J(P.authorId),P.answers&&P.answers.length&&!I.ignoreAnswersAuthors){P.answers.sort((X,ge)=>new Date(ge.updatedAt)-new Date(X.updatedAt)),P.totalAnswers=P.answers.length;let B=P.answers;if(I.limit&&I.pageNumber){const X=I.limit*(I.pageNumber-1);B=P.answers.slice(X,X+I.limit)}for(let X of B){X.author=X.authorId&&await J(X.authorId)||{};const[ge]=k?await Ae({contentType:_.CONTENTFUL.ANSWERS.TYPE,contentSlug:X.slug}):[null];X.userLiked=!!ge}P.answers=B}else P.answers||(P.answers=[]);return P}catch(B){throw await U(B),new Error(`Cannot read authors for question: ${B.message}`)}},readAuthors:async(P=[])=>{let k=[];try{if(Array.isArray(P)===!1)throw new Error("authorIds is not an array!");if(P&&P.length===1){const I=await J(P[0]);I&&k.push(I)}else if(P&&P.length>1){const I=await se(P);I&&I.length>0&&(k=I)}}catch(I){throw await U(I),new Error(`Cannot read authors: ${I.message}`)}return k}}};const{APIS:{PEOPLE_API:{BASE_URL:on,ENDPOINTS:{REGISTRATIONS:Ze}}}}=_;var rd={list:async P=>{let k=[];try{const{data:I}=await L().get(`${on}${Ze}`,{params:P});I&&I.length&&(k=I)}catch(I){await U(I)}return k}};const{APIS:{PEOPLE_API:{BASE_URL_V2:nd,ENDPOINTS:{USERS:id,USER_COURSES:od}}},USERS:{MYSELF:ad}}=_,ai=`${nd}${id}/${ad}${od}`;var sd={create:async P=>{try{await L().post(ai,P)}catch(k){await U(k)}},list:async P=>{let k=[],I=P?{params:P}:{params:{}};try{const{data:B}=await L().get(ai,I);B&&B.length&&(k=B)}catch(B){await U(B)}return k},update:async(P,k)=>{try{await L().put(`${ai}/${P}`,k)}catch(I){await U(I)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:cd,ENDPOINTS:{USERS:ud,USER_EVENTS:ld}}},USERS:{MYSELF:fd}}=_,dd=`${cd}${ud}/${fd}${ld}`;var pd={list:async P=>{let k=[],I=P?{params:P}:{params:{}};try{const{data:B}=await L().get(dd,I);B&&B.length&&(k=B)}catch(B){await U(B)}return k}};const{APIS:{PEOPLE_API:{BASE_URL_V2:hd,ENDPOINTS:{USERS:md,USER_LESSONS:gd}}},USERS:{MYSELF:yd}}=_,ka=`${hd}${md}/${yd}${gd}`;var vd={create:async P=>{let k=null;try{k=await L().post(ka,P)}catch(I){await U(I)}return k},list:async P=>{let k=[],I=P?{params:P}:{params:{}};try{const{data:B}=await L().get(ka,I);B&&B.length&&(k=B)}catch(B){await U(B)}return k}};const{APIS:{PEOPLE_API:{BASE_URL_V2:_d,ENDPOINTS:{USERS:Ed,USER_PRODUCTS:wd}}},USERS:{MYSELF:bd}}=_,si=`${_d}${Ed}/${bd}${wd}`;var Sd={create:async P=>{let k=null;try{k=await L().post(si,P)}catch(I){await U(I)}return k},list:async P=>{let k=[],I=P?{params:P}:{params:{}};try{const{data:B}=await L().get(si,I);B&&B.length&&(k=B)}catch(B){await U(B)}return k},update:async(P,k)=>{try{await L().put(`${si}/${P}`,k)}catch(I){await U(I)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Od,ENDPOINTS:{USERS:Td,USER_RATINGS:xd}}},USERS:{MYSELF:Ad}}=_,La=`${Od}${Td}/${Ad}${xd}`;var Bt={bulkEnrolments:ti,handlers:wt,registrations:rd,users:he,userCourses:sd,userEvents:pd,userLessons:vd,userLikes:ze,userProducts:Sd,userRatings:{create:async P=>{let k=null;try{const{data:I}=await L().post(La,P);I!=null&&I.id&&(k=I)}catch(I){await U(I)}return k},update:async(P,k)=>{try{await L().put(`${La}/${P}`,k)}catch(I){await U(I)}}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:Rd,ENDPOINTS:{ENQUIRY_EMAILS:Cd}}}}=_;var Nd={create:async P=>{let k=null;try{const{data:I}=await L().post(`${Rd}${Cd}`,P);I&&(k=I)}catch(I){await U(I)}return k}},Pd={forms:{sendEnquiryEmails:async P=>{let k=null;try{const{emailIds:I}=W;k=await Fa.emails.create({...I,...P})}catch(I){await U(I)}return k}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:Id,ENDPOINTS:{USERS:kd,USER_PROPERTIES:Ld}}},USERS:{MYSELF:Fd}}=_;var Fa={emails:Nd,handlers:Pd,userProperties:{update:async(P,k)=>{try{await L().put(`${Id}${kd}/${Fd}${Ld}/${P}`,k)}catch(I){await U(I)}}}},jd=d(130);const{APIS:{SEARCH_API:{BASE_URL:Md,ENDPOINTS:{SEARCH:Dd}}}}=_,Ud=`${Md}${Dd}`;var Bd={ask:async P=>{try{let k=null;const{data:I}=await L().get(Ud,{params:{question:P}});return I!=null&&I.answer&&(I!=null&&I.references)&&(I!=null&&I.version)&&(k=I),k}catch(k){const I=await U(k);throw new Error(I)}},stream:(P,k,I)=>{const B=(0,jd.io)(void 0,{path:"/api/search-api/web-sockets"});function X(){B.emit("search",{question:P})}function ge(Ce){I(Ce),Te(),B.disconnect()}function Te(){B.off("connect",X),B.off("update",k),B.off("result",ge)}return B.on("connect",X),B.on("update",k),B.on("result",ge),Te}};const{CONTENTFUL:$d}=_,{CARD_TYPES:ja}=$d.CAROUSELS;var Ma={read:async(P,k)=>{try{if(!k||!k.sys||!k.sys.id)throw new Error("Invalid link to card");if(!P||!ja[P])throw new Error("Unsupported card content type");const{INCLUDE:I,SELECT:B}=ja[P];return await(0,p.getEntry)({content_type:P,"sys.id":k.sys.id,include:I,select:B},{assetDetails:!0})}catch(I){throw await U(I),new Error(`Cannot read carousel card: ${I.message}`)}}};const{CONTENTFUL:qd}=_,{INCLUDE:Hd,SELECT:Wd,TYPE:Gd}=qd.EDITORIAL_PAGES;var Vd={read:async P=>{try{return await(0,p.getEntry)({content_type:Gd,"fields.slug":P,include:Hd,select:Wd})}catch(k){throw await U(k),new Error(`Cannot read editorial page: ${k.message}`)}}};const{CONTENTFUL:Qd}=_,{TYPE:Da,ORDER:zd,SELECT:Ua,SKIP:Yd,LIMIT:Kd,INCLUDE:Jd}=Qd.QUESTIONS;var Ba={read:async P=>{try{return await(0,p.getEntry)({content_type:Da,"fields.slug":P,include:2,select:Ua})}catch(k){throw await U(k),new Error(`Cannot read question: ${k.message}`)}},list:async(P={})=>{try{return await(0,p.getEntries)({content_type:Da,include:Jd,limit:Kd,order:zd,select:Ua,skip:Yd,...P})}catch(k){throw await U(k),new Error(`Cannot list questions: ${k.message}`)}}},Xd=async(P,k,I={ignoreAnswersAuthors:!1})=>{try{let B={};return B=await Ba.read(P),B=await Bt.handlers.authors.readQuestionAuthors(B,k,I),B}catch(B){throw await U(B),new Error(`Cannot build question: ${B.message}`)}};const{ARTICLES:{TYPE:Zd},COURSES:{TYPE:ep},EVENTS:{TYPE:tp},LISTS:{TYPE:rp},QUESTIONS:{TYPE:np},LEARNING_HUB:{TYPE:ip}}=_.CONTENTFUL,or=P=>P&&P.url?(Object.assign(P,{aspect:"responsiveCard",query:"q=90&fit=fill"}),P):null,ci={[Zd]:async P=>{const{authorIds:k,authorTag:I,image:B,publishedDate:X,readingTime:ge,slug:Te,title:Ce}=P,Je=await Bt.handlers.authors.readAuthors(k),nt=Je&&Je.length?Je:I?[I]:null;return{banner:or(B),contributors:nt,publishedDate:X,readingTime:ge,slug:Te,title:Ce}},[ep]:async(P,k)=>{const{banner:I,freeCourse:B,partnershipDetails:X,slug:ge,title:Te,registered:Ce}=P,Je={banner:or(I),slug:ge,title:Te,pill:B?"free":"premium",registered:!!Ce};if(X){const{partners:nt}=X;Je.partner=nt&&nt.length&&X.partners[0]}if(Ce===void 0&&k){const[nt]=await Bt.userProducts.list({courseSlug:ge,isEnrolled:!0,scope:"active"});Je.registered=!!nt}return Je},[tp]:async(P,k)=>{const{bannerImage:I,defaultStartDate:B,isEventOngoing:X,slug:ge,speakers:Te,title:Ce,registered:Je}=P,nt=new Date(B),lp=!!nt&&nt<new Date;if(Te&&Te.length)for(const an of Te)an.image=(ui=an.image)&&ui.url?`${ui.url}?w=100&h=100&fit=thumb&f=center`:null;var ui;const $a={banner:or(I),dateHasPassed:lp,title:Ce,slug:ge,isOngoingEvent:X,contributors:Te,startDate:nt,registered:!!Je};if(Je===void 0&&k){const[an]=await Bt.userEvents.list({eventSlug:ge});$a.registered=!!an}return $a},[rp]:async P=>{const{hero:k,slug:I,title:B}=P;return{banner:or(k),slug:I,title:B}},[np]:async P=>{const{answers:k,authorId:I,createdAt:B,slug:X,title:ge}=P;let Te=null;if(I){const Ce=await Bt.users.read(I);Ce&&(Te=Ce)}return{answers:k&&k.length?k.length:0,contributors:Te?[Te]:[],createdAt:B,slug:X,title:ge}},[ip]:P=>{const{bannerSection:k,customLabel:I,slug:B,title:X}=P;return{banner:or(k.image),slug:B,title:X,customLabel:I}},people:P=>{const{id:k,name:I,jobTitle:B,location:X,image:ge}=P;return{profile:ge,slug:k,title:I,text:B,secondaryText:X}}};var op=async({contentType:P,...k}={},I)=>{try{if(!ci[P])throw new Error("Content type not supported");if(typeof ci[P]!="function")throw new Error("No builder function for content type");return P!=="people"&&k.sys&&k.sys.type&&k.sys.type==="Link"&&(k=await Ma.read(P,k)),{contentType:P,...await ci[P](k,I)}}catch(B){throw await U(B),new Error(`Cannot build carousel card: ${B.message}`)}},ap=async(P,k,I={})=>{try{if(!P.replies||P.replies.length===0)return P.replies=[],P;P.replies.sort((X,ge)=>new Date(X.createdAt)-new Date(ge.createdAt)),P.totalReplies=P.totalReplies||P.replies.length;let B=P.replies;if(I.limit&&I.pageNumber){const X=I.limit*(I.pageNumber-1);B=P.replies.slice(X,X+I.limit)}for(const X of B){if(X.authorId===P.authorId){X.author=P.author,X.userLiked=!1;continue}X.author=X.authorId&&await J(X.authorId)||{};const[ge]=k?await Ae({contentType:_.CONTENTFUL.REPLIES.TYPE,contentSlug:X.slug}):[null];X.userLiked=!!ge}return P.replies=B,P}catch(B){throw await U(B),new Error(`Cannot build replies for answer: ${B.message}`)}},sp=d(408);const cp=P=>P&&sp.Buffer.from(P,"base64").toString("ascii");function up({contentContext:P=null,errorsContext:k=null,gtmContext:I=null,origin:B}){try{const X=(ge=>{let Te=null;ge?Te=ge:typeof window<"u"&&(Te=window.origin||window.location.origin),Te||new Error("Cannot select environment: Website not defined");let Ce=null;const Je=Te.match(w);return Je?Ce=Je[1].split(x)[0]:Te===S?Ce=O:Te.includes(v)&&(Ce=F),Ce||new Error(`Cannot select environment: No rule for website ${Te}`),Ce})(B);return P&&(0,p.setContext)(Object.assign({},P,{environment:X})),k&&(0,h.setContext)(Object.assign({},k,{environment:X})),I&&((0,y.setContext)(Object.assign({},I,{environment:X})),(0,y.setupGTM)()),(({environment:ge})=>{const Te=(Ce=>{if(!Ce)throw new Error("Cannot map environment: Environment not defined");if(!D[Ce])throw new Error(`Cannot map environment: No mapping found for environment ${Ce}`);return D[Ce]})(ge);W.emailIds=R[Te]})(Object.assign({},{environment:X})),X}catch(X){console.warn(`Cannot load SDK: ${X.message}`)}}}(),f}()})})(Cu);var hv=Cu.exports;const Ir={Off:"off",On:"on",Cookie:"cookie"},mv=e=>{const[t]=ia.useCookies(),[n,r]=j.useState(null),[s,o]=j.useState(!1),[l,i]=j.useState(Ir.Off);return j.useEffect(()=>{e&&hv.features.flags.read(e).then(u=>{i(u.featureState),r(null)}).catch(u=>{i(Ir.Off),r(u)})},[e]),j.useEffect(()=>{switch(l){case Ir.Off:o(!1);break;case Ir.On:o(!0);break;case Ir.Cookie:o(!!t[`feature-${e}`]);break;default:o(!1)}},[l,t]),{isFeatureActive:s,error:n}};function gv(e,t,n){var r=this,s=j.useRef(null),o=j.useRef(0),l=j.useRef(null),i=j.useRef([]),u=j.useRef(),c=j.useRef(),a=j.useRef(e),d=j.useRef(!0);j.useEffect(function(){a.current=e},[e]);var f=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var p=!!(n=n||{}).leading,h=!("trailing"in n)||!!n.trailing,y="maxWait"in n,_=y?Math.max(+n.maxWait||0,t):null;j.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var S=j.useMemo(function(){var v=function(R){var W=i.current,V=u.current;return i.current=u.current=null,o.current=R,c.current=a.current.apply(V,W)},w=function(R,W){f&&cancelAnimationFrame(l.current),l.current=f?requestAnimationFrame(R):setTimeout(R,W)},x=function(R){if(!d.current)return!1;var W=R-s.current;return!s.current||W>=t||W<0||y&&R-o.current>=_},O=function(R){return l.current=null,h&&i.current?v(R):(i.current=u.current=null,c.current)},F=function R(){var W=Date.now();if(x(W))return O(W);if(d.current){var V=t-(W-s.current),L=y?Math.min(V,_-(W-o.current)):V;w(R,L)}},D=function(){var R=Date.now(),W=x(R);if(i.current=[].slice.call(arguments),u.current=r,s.current=R,W){if(!l.current&&d.current)return o.current=s.current,w(F,t),p?v(s.current):c.current;if(y)return w(F,t),v(s.current)}return l.current||w(F,t),c.current};return D.cancel=function(){l.current&&(f?cancelAnimationFrame(l.current):clearTimeout(l.current)),o.current=0,i.current=s.current=u.current=l.current=null},D.isPending=function(){return!!l.current},D.flush=function(){return l.current?O(Date.now()):c.current},D},[p,y,t,_,h,f]);return S}function Sf(e,t,n){var r=n===void 0?{}:n,s=r.leading,o=r.trailing;return gv(e,t,{maxWait:t,leading:s===void 0||s,trailing:o===void 0||o})}let Ro;const Vr=(e=!0,t=!1)=>{if(!e)return;const[n,r]=j.useState(0)||[!1,()=>{}];j.useEffect(()=>(o(),window.addEventListener("resize",l),()=>{clearTimeout(Ro),l.flush(),window.removeEventListener("resize",l)}),[]);const s=()=>window.innerWidth,o=()=>{r(s())},l=Sf(()=>{s()!==n&&(t&&(clearTimeout(Ro),document.body.classList.add("is-resizing"),Ro=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),o())},500,{leading:!0});return n},Of=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:n=()=>{},scrollUp:r=()=>{}}})=>{if(!window)return;const[s,o]=j.useState({current:0,past:0})||[!1,()=>{}],[l,i]=j.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];j.useEffect(()=>(u(),window.addEventListener("scroll",c),()=>{c.flush(),window.removeEventListener("scroll",c)}),[]);const u=()=>{const a=window.scrollY,d=s.current,f=a-d,p=f>0?"down":"up";if(o({current:a,past:d}),p==="down"){a>=e+t.down&&!l.scrollDown&&(!l.scrollUp||f>t.up)&&(n(),i({scrollUp:!1,scrollDown:!0}));return}Math.abs(f)>=t.up&&!l.scrollUp&&(r(),i({scrollUp:!0,scrollDown:!1}))},c=Sf(()=>{u()},250);return s},yv=(e=[],t=!0)=>{e=Array.isArray(e)?e:[e];const n=j.useRef(!1);jt(()=>{if(window&&window.location&&window.location.hash){if(n.current)return;const r=document.getElementById(window.location.hash.replace("#",""));r&&(r.scrollIntoView(t?{behavior:"smooth"}:null),n.current=!0)}},e)},vv=(e,t)=>{Array.isArray(t)||(t=[t]);const n=fp(e);return t.forEach(({type:r,value:s})=>{dp(n,r,s)}),n},Tf=e=>{const t=[];return e.forEach(n=>{const r=parseInt(n);isNaN(r)||t.push(r)}),t.sort((n,r)=>n-r)},xf=(e,t,n)=>{let r=n.mobile;for(const s in t){const o=parseInt(String(t[s]));if(e>=o)r=n[o];else if(e<o)break}return r},_v=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),Ev=e=>{let o;try{o=new Date().getTime()-new Date(e).getTime()}catch{return""}const l=o/36e5,i=Math.floor(o/864e5);if(i<1)return l<1?{path:"now"}:{path:"hours",number:Math.floor(l)};if(i<7)return{path:"days",number:i};const u=Math.floor(i/7);return u<=52?{path:"weeks",number:u}:{path:"years",number:Math.floor(i/365)}},wv=e=>new Promise(t=>setTimeout(t,e)),wa={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",community_joinToPost:"Join community to create a post.",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}.
|
|
31
|
+
Check the top-level render call using <`+j+">.")}return w}}function Gt(m,w){{if(!m._store||m._store.validated||m.key!=null)return;m._store.validated=!0;var j=as(w);if(Yt[j])return;Yt[j]=!0;var T="";m&&m._owner&&m._owner!==st.current&&(T=" It was passed a child from "+R(m._owner.type)+"."),xe(m),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',j,T),xe(null)}}function Jt(m,w){{if(typeof m!="object")return;if(tt(m))for(var j=0;j<m.length;j++){var T=m[j];ot(T)&&Gt(T,w)}else if(ot(m))m._store&&(m._store.validated=!0);else if(m){var I=_(m);if(typeof I=="function"&&I!==m.entries)for(var L=I.call(m),F;!(F=L.next()).done;)ot(F.value)&&Gt(F.value,w)}}}function is(m){{var w=m.type;if(w==null||typeof w=="string")return;var j;if(typeof w=="function")j=w.propTypes;else if(typeof w=="object"&&(w.$$typeof===i||w.$$typeof===f))j=w.propTypes;else return;if(j){var T=R(w);Yn(j,m.props,"prop",T,m)}else if(w.PropTypes!==void 0&&!rt){rt=!0;var I=R(w);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",I||"Unknown")}typeof w.getDefaultProps=="function"&&!w.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ls(m){{for(var w=Object.keys(m.props),j=0;j<w.length;j++){var T=w[j];if(T!=="children"&&T!=="key"){xe(m),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",T),xe(null);break}}m.ref!==null&&(xe(m),v("Invalid attribute `ref` supplied to `React.Fragment`."),xe(null))}}function qt(m,w,j,T,I,L){{var F=q(m);if(!F){var N="";(m===void 0||typeof m=="object"&&m!==null&&Object.keys(m).length===0)&&(N+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var te=os(I);te?N+=te:N+=Vt();var G;m===null?G="null":tt(m)?G="array":m!==void 0&&m.$$typeof===t?(G="<"+(R(m.type)||"Unknown")+" />",N=" Did you accidentally export a JSX literal instead of a component?"):G=typeof m,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",G,N)}var J=rs(m,w,j,I,L);if(J==null)return J;if(F){var ie=w.children;if(ie!==void 0)if(T)if(tt(ie)){for(var ve=0;ve<ie.length;ve++)Jt(ie[ve],m);Object.freeze&&Object.freeze(ie)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Jt(ie,m)}return m===r?ls(J):is(J),J}}function cs(m,w,j){return qt(m,w,j,!0)}function us(m,w,j){return qt(m,w,j,!1)}var ds=us,ms=cs;Ee.Fragment=r,Ee.jsx=ds,Ee.jsxs=ms}()),Ee}process.env.NODE_ENV==="production"?bt.exports=js():bt.exports=Ss();var s=bt.exports;const dn=()=>{const[e,t]=h.useState(window.location.pathname),n=()=>{const r=window.location.pathname;t(r)};return h.useEffect(()=>(window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n)}),[]),e},_e=(e,t)=>{const n=h.useRef(!1);h.useEffect(()=>{n.current?e():n.current=!0},t)};function Es(e,t,n){var r=this,o=h.useRef(null),l=h.useRef(0),d=h.useRef(null),a=h.useRef([]),i=h.useRef(),c=h.useRef(),u=h.useRef(e),f=h.useRef(!0);h.useEffect(function(){u.current=e},[e]);var p=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,x=!("trailing"in n)||!!n.trailing,b="maxWait"in n,_=b?Math.max(+n.maxWait||0,t):null;h.useEffect(function(){return f.current=!0,function(){f.current=!1}},[]);var E=h.useMemo(function(){var v=function(y){var P=a.current,q=i.current;return a.current=i.current=null,l.current=y,c.current=u.current.apply(q,P)},$=function(y,P){p&&cancelAnimationFrame(d.current),d.current=p?requestAnimationFrame(y):setTimeout(y,P)},C=function(y){if(!f.current)return!1;var P=y-o.current;return!o.current||P>=t||P<0||b&&y-l.current>=_},A=function(y){return d.current=null,x&&a.current?v(y):(a.current=i.current=null,c.current)},H=function y(){var P=Date.now();if(C(P))return A(P);if(f.current){var q=t-(P-o.current),k=b?Math.min(q,_-(P-l.current)):q;$(y,k)}},V=function(){var y=Date.now(),P=C(y);if(a.current=[].slice.call(arguments),i.current=r,o.current=y,P){if(!d.current&&f.current)return l.current=o.current,$(H,t),g?v(o.current):c.current;if(b)return $(H,t),v(o.current)}return d.current||$(H,t),c.current};return V.cancel=function(){d.current&&(p?cancelAnimationFrame(d.current):clearTimeout(d.current)),l.current=0,a.current=o.current=i.current=d.current=null},V.isPending=function(){return!!d.current},V.flush=function(){return d.current?A(Date.now()):c.current},V},[g,b,t,_,x,p]);return E}function mn(e,t,n){var r=n===void 0?{}:n,o=r.leading,l=r.trailing;return Es(e,t,{maxWait:t,leading:o===void 0||o,trailing:l===void 0||l})}let at;const Ce=(e=!0,t=!1)=>{if(!e)return;const[n,r]=h.useState(0)||[!1,()=>{}];h.useEffect(()=>(l(),window.addEventListener("resize",d),()=>{clearTimeout(at),d.flush(),window.removeEventListener("resize",d)}),[]);const o=()=>window.innerWidth,l=()=>{r(o())},d=mn(()=>{o()!==n&&(t&&(clearTimeout(at),document.body.classList.add("is-resizing"),at=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),l())},500,{leading:!0});return n},fn=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:n=()=>{},scrollUp:r=()=>{}}})=>{if(!window)return;const[o,l]=h.useState({current:0,past:0})||[!1,()=>{}],[d,a]=h.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];h.useEffect(()=>(i(),window.addEventListener("scroll",c),()=>{c.flush(),window.removeEventListener("scroll",c)}),[]);const i=()=>{const u=window.scrollY,f=o.current,p=u-f,g=p>0?"down":"up";if(l({current:u,past:f}),g==="down"){u>=e+t.down&&!d.scrollDown&&(!d.scrollUp||p>t.up)&&(n(),a({scrollUp:!1,scrollDown:!0}));return}Math.abs(p)>=t.up&&!d.scrollUp&&(r(),a({scrollUp:!0,scrollDown:!1}))},c=mn(()=>{i()},250);return o},Ts=(e=[],t=!0)=>{e=Array.isArray(e)?e:[e];const n=h.useRef(!1);_e(()=>{if(window&&window.location&&window.location.hash){if(n.current)return;const r=document.getElementById(window.location.hash.replace("#",""));r&&(r.scrollIntoView(t?{behavior:"smooth"}:null),n.current=!0)}},e)},$s=(e,t)=>{Array.isArray(t)||(t=[t]);const n=fs(e);return t.forEach(({type:r,value:o})=>{ps(n,r,o)}),n},pn=e=>{const t=[];return e.forEach(n=>{const r=parseInt(n);isNaN(r)||t.push(r)}),t.sort((n,r)=>n-r)},hn=(e,t,n)=>{let r=n.mobile;for(const o in t){const l=parseInt(String(t[o]));if(e>=l)r=n[l];else if(e<l)break}return r},Ms=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),Cs=e=>{let l;try{l=new Date().getTime()-new Date(e).getTime()}catch{return""}const d=l/36e5,a=Math.floor(l/864e5);if(a<1)return d<1?{path:"now"}:{path:"hours",number:Math.floor(d)};if(a<7)return{path:"days",number:a};const i=Math.floor(a/7);return i<=52?{path:"weeks",number:i}:{path:"years",number:Math.floor(a/365)}},As=e=>new Promise(t=>setTimeout(t,e)),Et={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",community_joinToPost:"Join community to create a post.",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}.
|
|
69
32
|
|
|
70
33
|
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.
|
|
71
34
|
|
|
72
|
-
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",inviteModal_title:"You’re registered",inviteForm_email_placeholder:"Add email addresses...",inviteForm_title:"Know someone who might like to join this workshop?",inviteForm_label:"Invite your colleagues by typing or pasting their emails below",inviteForm_ctaMessage:"Send",inviteForm_success:"Invitation Sent!",inviteForm_error:"Something went wrong!",inviteForm_ctaTryAgain:"Try again!",inviteForm_ctaSendMoreInvites:"Send more invites",inviteForm_ctaDone:"Done",joinCommunityButton:"Join community",joinCommunityButton_short:"Join",joinCommunityButton_joining:"Joining...",joinCommunityButton_member:"Member",joinCommunityButton_member_aria:"Leave community",joinCommunityButton_leave:"Leave",joinCommunityButton_leaving:"Leaving...",languageSwitcher_label:"I would like to read this article in...",languageSwitcher_translation_original:"original language",languageSwitcher_translation_human:"translated by person",languageSwitcher_translation_machine:"translated by machine",languageSwitcher_selected:"{language} - currently selected",languageSwitcher_disclaimer:"This content is machine translated and will occasionally get gendered language or other direct translations wrong. We’re trying to resolve this but in the meantime, if you notice something very wrong, let us know at <link>{email}</link>",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..."},bv={languageSwitcher_label:"Me gustaría leer este artículo en...",languageSwitcher_translation_original:"idioma original",languageSwitcher_translation_human:"traducido por un humano",languageSwitcher_translation_machine:"traducido por máquina",languageSwitcher_disclaimer:"Este contenido fue traducido automáticamente y ocasionalmente tendrá errores de género u otras traducciones directas. Estamos intentando resolver este problema, pero mientras tanto, si notas algún error grave, escríbenos a <link>{email}</link>"},Sv={collapsibleSection_summary:"En savoir plus",languageSwitcher_label:"Je voudrais lire cet article dans...",languageSwitcher_translation_original:"langue originale",languageSwitcher_translation_human:"traduit par un humain",languageSwitcher_translation_machine:"traduit par machine",languageSwitcher_disclaimer:"Ce contenu est traduit automatiquement et contiendra d’évantuelles erreurs de genre ou d’autres traductions directes. Nous essayons de résoudre ce problème, mais en attendant, si vous remarquez une erreur importante, faites-le nous savoir à <link>{email}</link>"},Ov={languageSwitcher_label:"Eu gostaria de ler este artigo em...",languageSwitcher_translation_original:"linguagem original",languageSwitcher_translation_human:"traduzido por um humano",languageSwitcher_translation_machine:"traduzido por máquina",languageSwitcher_disclaimer:"Este conteúdo foi traduzido automaticamente e, ocasionalmente, poderão ocorrer erros de linguagem de gênero ou outras traduções diretas. Estamos tentando resolver isso, porém se perceber algo errado por favor nos avise em <link>{email}</link>"},Tv=Object.freeze(Object.defineProperty({__proto__:null,en:wa,es:bv,fr:Sv,pt:Ov},Symbol.toStringTag,{value:"Module"})),ot=(e,t,n,r,s={})=>{let o="";return`${t}_${n}`in wa?o=e({id:`${t}_${n}`},s):o=e({id:t},{[r]:n,...s}),o},xv=(e,t,n)=>{if(!e||e===0)return"0";t||(t=0),n||(n=["k","m","b","t"]);let r=e.toString();t=Math.pow(10,t);for(let s=n.length-1;s>=0;s--){const o=Math.pow(10,(s+1)*3);if(o<=e){e=Math.round(e*t/o)/t,e===1e3&&s<n.length-1&&(e=1,s++),r=`${e}${n[s]}`;break}}return r},Af=(e,t)=>j.Children.map(e,n=>j.cloneElement(n,{...t})),Av=e=>e.replace(/\s+/g,"").length>0,xe=({variant:e="primary",size:t="medium",styling:n={muted:!1,fullWidth:!1},icon:r=!1,href:s=!1,element:o="button",onClick:l=!1,className:i="",disabled:u=!1,screenreaderText:c=!1,children:a=!1,...d})=>{const p=Vr(typeof t=="object");if(typeof t=="object"&&typeof p=="number"){const _=Object.assign({},t),S=Tf(Object.keys(_));t=xf(p,S,_)}const h=[];typeof t=="string"&&h.push(t),r&&(h.push("icon"),typeof r=="object"?(h.push(r.icon),r.position?h.push(r.position):h.push("left"),r.hover&&h.push(`hover_${r.hover}`),r.animate&&(h.push("animate"),typeof r.animate=="string"&&h.push(r.animate))):(h.push(r),!r.includes("right")&&!r.includes("left")&&h.push("left"))),n.muted&&h.push("muted"),n.fullWidth&&h.push("full-width");const y={...d,className:ne(e,i,h,{"no-text":!a,disabled:u,button:s}),onClick:_=>{(!s||s[0]==="#")&&l&&(_.preventDefault(),_.stopPropagation()),l&&l(_)},disabled:typeof u=="object"&&"isClickable"in u?!u.isClickable:u};return s&&(o="a",y.href=s),j.createElement(o,y,a||(c?E.jsx(Ue,{showOnFocus:!1,children:c}):null))},Qr=({buttons:e,className:t="",...n})=>{const r=e.length>1?"ul":"p",s=e.map((o,l)=>r==="p"?E.jsx(xe,{...o},l):E.jsx("li",{children:E.jsx(xe,{...o})},l));return j.createElement(r,{className:ne("button-wrapper",t),...n,children:s})};const Jt=({maxWidth:e=!1})=>{const t=e?{"--max-width":`${e/16}rem`}:{};return E.jsx("hr",{className:ne({"has-max-width":e}),style:t})},zr=({href:e,children:t,fallbackElement:n,className:r="",onClick:s,gtmContext:o,gtmType:l,...i})=>{if(e){const u={...i};return s&&(u.onClick=s),o&&(u["data-gtm-event-context"]=o),l&&(u["data-gtm-event-type"]=l),E.jsx("a",{href:e,className:ne("gtm-trackable",r),...u,children:t})}return n?j.createElement(n,{children:t,className:r,...i}):t},vu={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"}},Rv=({aspect:e,range:t,sizes:n})=>{const{range:r,sizes:s}=e?vu[e]:vu.fallback;return{range:t&&t.length>0?t:r,sizes:n||s}},Cv=({format:e,height:t,query:n,width:r})=>{let s=`w=${r}&h=${t}`;return s=e?`${s}&fm=${e}`:s,s=n?`${s}&${n}`:s,s},Co=({format:e,range:t,url:n,query:r})=>t.map(({height:s,width:o})=>`${n}?${Cv({format:e,height:s,query:r,width:o})} ${o}w`).join(", ");const Rf=({image:e,className:t,testId:n})=>{const{description:r,height:s,type:o,query:l,url:i,width:u,loading:c,decoding:a,fetchPriority:d}=e,{range:f,sizes:p}=Rv(e),h=Co({format:"avif",query:l,range:f,url:i}),y=Co({format:"webp",query:l,range:f,url:i}),_=Co({format:"",query:l,range:f,url:i});return E.jsxs("picture",{className:t,children:[o!=="image/gif"&&E.jsx("source",{type:"image/avif",srcSet:h,sizes:p,"data-testid":"source"}),E.jsx("source",{type:"image/webp",srcSet:y,sizes:p,"data-testid":"source"}),E.jsx("img",{srcSet:_,sizes:p,src:i,alt:r,loading:c||"lazy",decoding:a||"async",fetchpriority:d||"auto",width:u,height:s,"data-testid":n||"image"})]})};let kr=!1;const Cf=({isOpen:e=!1,isLoading:t=!1,children:n})=>{const r=ue.useIntl(),s=j.useRef(null),[o,l]=j.useState("hidden");j.useEffect(()=>{const u=s.current;if(u)return u.addEventListener("transitionend",i),()=>{u.removeEventListener("transitionend",i)}},[]);const i=({propertyName:u})=>{u==="opacity"&&(kr!==!1&&clearTimeout(kr),l(c=>c==="opening"?"open":c==="closing"?"closed":c==="closed"?"hidden":c))};return jt(()=>{kr!==!1&&clearTimeout(kr);let u="open";e?l("opening"):(l("closing"),u="hidden"),kr=setTimeout(()=>{l(u)},300)},[e]),E.jsx("aside",{ref:s,className:ne("tooltip text-medium",o,{loading:t}),hidden:o==="hidden",children:t?E.jsx("p",{children:r.formatMessage({id:"tooltip_loading"})}):typeof n=="string"?E.jsx("p",{children:n}):n})};const ba=({children:e,className:t="",...n})=>E.jsx("section",{className:ne("full-width-section",t),...n,children:e});const Nv=({text:e,buttons:t,className:n=""})=>{const r=[];return t.forEach(s=>{r.push({href:s.link,variant:"secondary",size:{mobile:"medium",1024:"large"},className:"gtm-trackable","data-gtm-event-type":"download-click","data-gtm-event-context":s.eventContext||"Download",target:"_blank",children:s.text})}),E.jsx(ba,{className:ne("download-section",n),children:E.jsxs(E.Fragment,{children:[j.createElement(typeof e=="string"?"h2":e.element,{className:"text"},typeof e=="string"?e:e.text),E.jsx(Qr,{buttons:r})]})})};const Pv=({title:e=!1,logos:t=[],className:n=""})=>{const r=t.length;if(r===0)return null;const s={element:typeof e=="object"?e.element:"h2",text:typeof e=="string"?e:typeof e=="object"?e.text:""};return E.jsxs("div",{className:ne("logos",n),children:[e&&j.createElement(s.element,{className:"title"},s.text),E.jsx("ul",{className:ne({"two-col":r===2||r===4,"three-col":r===5||r<=10&&r%3===0}),children:t.map(({logo:o,nameOfBusiness:l,link:i=!1,description:u=!1},c)=>{if(!o||!o.url)return null;const a=E.jsx("img",{src:o.url,width:o.width||"auto",height:o.height||"auto",alt:l});return E.jsxs("li",{children:[E.jsx("p",{className:"img-wrapper",children:i?E.jsx("a",{href:i,target:"_blank",rel:"nofollow noreferrer noopener",children:a}):a}),u&&E.jsx("small",{children:u})]},window.btoa(`${o.url}_${c}`))})})]})};const Iv=["small","span","strong","em","p","h1","h2","h3","h4","h5","h6","blockquote","q"],kv=({content:e,image:t,variant:n="default",spacing:r="normal",cta:s,children:o})=>{const l=["eyebrow","title","text"],i={eyebrow:"small",title:"h1",text:"p"},u={};return l.forEach(c=>{if(!e[c]){u[c]=!1;return}if(typeof e[c]=="object"){u[c]=e[c];const{text:a,element:d}=e[c];if(d&&Iv.includes(d.toLowerCase()))return;u[c]={text:a,element:i[c]};return}u[c]={text:e[c],element:i[c]}}),s&&s.link&&s.link[0]==="#"&&(s.props||(s.props={}),s.props.onClick=c=>{c.preventDefault(),c.stopPropagation();const a=document.getElementById(s.link.substring(1));a&&a.scrollIntoView({behavior:"smooth"})}),E.jsx(ba,{className:ne("banner-section",n,r,{"has-image":t,"has-extra-spacing":r==="normal"&&u.eyebrow&&u.title}),children:E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"content-wrapper",children:[l.map(c=>{if(u[c]&&typeof u[c]=="object"){const{text:a,element:d=""}=u[c];return j.createElement(d.toLowerCase(),{key:c,className:c},a)}return null}),o,s&&s.text&&s.link&&E.jsx(xe,{variant:t||n==="light"?"primary":"secondary",size:{mobile:"medium",768:"large"},href:s.link,...s.props,children:s.text})]}),t&&E.jsx(Rf,{image:{...t,aspect:"banner"}})]})})},Lv=j.memo(kv);const Fv=({variant:e="primary",button:t=null,title:n,text:r,gtmContext:s})=>!n&&!r?null:E.jsxs("aside",{className:ne("marketing-block",e),children:[n&&E.jsx("p",{className:"title",children:n}),r&&E.jsx("p",{children:r}),t&&E.jsx(xe,{variant:"secondary",size:"medium",href:t.link,className:"gtm-trackable","data-gtm-event-context":s,"data-gtm-event-type":"learn-more-click",children:t.text})]}),Bn="https://storage.googleapis.com/apolitical-assets/",Gt={general:"hello@apolitical.co",support:"concierge@apolitical.co","data-protection":{default:"dpo@apolitical.co",eu:"dpo.agl@apolitical.foundation"}},jv="200,000+";const Sa=({label:e=!1,className:t="",children:n})=>{const r=ue.useIntl();return E.jsxs("details",{className:ne("collapsible-section",t),children:[E.jsx("summary",{children:e||r.formatMessage({id:"collapsibleSection_summary"})}),E.jsx("div",{className:"content",children:n})]})};const gt=({variant:e="primary",className:t="",children:n,...r})=>E.jsx("div",{className:ne("highlighted-text-box",e,t),...r,children:n});const Yr=({variant:e="empty",text:t=!1,button:n=!1,className:r=""})=>{let s=n&&!!Object.keys(n).length;const o=typeof n=="object"&&"breakpoints"in n,l=Vr(o);if(o&&typeof n=="object"&&typeof l=="number"){const d=Object.assign({},n.breakpoints),f=Tf(Object.keys(d));s=xf(l,f,d)}const{breakpoints:i,text:u="",component:c,...a}=n;return E.jsx(gt,{variant:"subtle",className:ne("empty-state-box",e,r),children:E.jsxs(E.Fragment,{children:[t&&E.jsx(Wn,{options:{forceBlock:!0},children:t}),s&&typeof n=="object"&&(c||E.jsx(xe,{...a,variant:n.variant?n.variant:"secondary",children:u}))]})})};const ta=({children:e,...t})=>E.jsx("p",{...t,children:e}),Nf={q:ta,blockquote:ta};for(let e=1;e<=6;e++)Nf[`h${e}`]={component:ta,props:{className:"title"}};const Pf=({type:e="default",className:t="",heading:n=!1,children:r})=>E.jsxs("div",{className:ne("helper-text-box text-small",e,t),children:[n&&E.jsx("p",{className:"title",children:n}),typeof r=="string"?E.jsx(Wn,{options:{wrapper:j.Fragment,forceBlock:!0,overrides:Nf},children:r}):E.jsx("p",{children:r})]});const Mv=({className:e="",show:t=!1,hide:n=!1,text:r,children:s})=>{const o=ue.useIntl(),l=j.useRef(null),[i,u]=j.useState(""),[c,a]=j.useState("closed");j.useEffect(()=>{const p=l.current;if(p)return p.addEventListener("transitionend",d),()=>{p.removeEventListener("transitionend",d)}},[]),j.useEffect(()=>{if(!r||typeof r!="string")return;const p=r.split(`
|
|
73
|
-
`);
|
|
74
|
-
`))},[r]),j.useEffect(()=>{c==="ready-to-close"&&a("closing")},[c]);const d=({propertyName:p})=>{p==="max-height"&&a(h=>h==="opening"?"open":h==="closing"?"closed":h)};if(!r)return null;const f=["opening","open"].includes(c);return E.jsxs(gt,{variant:"subtle",className:ne("hide-show-text-box",e),children:[E.jsxs("div",{ref:l,className:ne("content",c),children:[E.jsx(Wn,{options:{forceBlock:!0},children:c==="closed"?i:r}),c!=="closed"&&s]}),E.jsx("p",{className:"cta",children:E.jsx(xe,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:ne({"rotate-180":f}),onClick:()=>{a(f?"ready-to-close":"opening")},children:f?n||o.formatMessage({id:"hideShowTextBox_hide"}):t||o.formatMessage({id:"hideShowTextBox_show"})})})]})},Dv=()=>j.Fragment,Uv=({children:e})=>E.jsx(gt,{variant:"secondary",children:e}),Bv=["span","strong","h1","h2","h3","h4","h5","h6","p"],$v=({children:e})=>{const t=ue.useIntl();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const o of j.Children.toArray(e))if(!(!o||typeof o=="string"||typeof o=="number"))if(j.isValidElement(o)&&o.type==="summary"){if(o.props&&o.props.children){for(const l of j.Children.toArray(o.props.children))if(!(!l||typeof l=="string"||typeof l=="number")&&j.isValidElement(l)){const i=l.type;if(Bv.includes(i)){for(n=l.props.children;typeof n!="string"&&(Array.isArray(n)&&n[0].props&&n[0].props.children&&n[0].props.children[0]);)n=n[0].props.children[0];break}}}}else r.push(o);const s=n?n.toString():"";return E.jsx(Sa,{label:s,className:["Sources","Resources"].includes(s)?"discrete-links":"",children:r.map(o=>o)})},qv=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return E.jsx(gt,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return E.jsx(gt,{variant:"primary",children:e});case"pink-textbox":return E.jsx(gt,{variant:"tertiary",children:e});default:return E.jsx("div",{...t,children:e})}return E.jsx("div",{...t,children:e})},Hv=e=>{const t=ue.useIntl(),n=Date.now().toString();let r="default";const s=e.src;return s.includes("youtube")||s.includes("vimeo")?r="video":s.includes("riddle")||s.includes("sli.do")?r="poll":s.includes("padlet")&&(r="padlet"),E.jsxs(E.Fragment,{children:[E.jsx(Ue,{children:E.jsx("a",{href:`#content-after-iframe-${n}`,children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})})}),E.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),E.jsx("span",{id:`content-after-iframe-${n}`,tabIndex:-1})]})},_u=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},Wv=({children:e,...t})=>{let n={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(n.target="_blank");let r=e,s=!1;for(const o of j.Children.toArray(e))if(!(!o||typeof o=="string"||typeof o=="number")&&j.isValidElement(o)){const l=o.type;if(["button","center","span","strong"].includes(l)&&o.props&&o.props.children&&o.props.children[0])for((l==="button"||_u(o.props.children[0])==="button")&&(s=!0),r=o.props.children[0];r&&typeof r!="string"&&!(typeof r=="boolean"||typeof r=="number"||!j.isValidElement(r));)if(r.props&&r.props.children&&r.props.children[0])r=r.props.children[0],r&&_u(r)==="button"&&(s=!0);else break}return s?(n={...n,className:"button primary medium"},E.jsx("p",{className:"center",children:E.jsx(xe,{variant:"primary",size:"medium",...n,children:r})})):E.jsx("a",{...n,children:r})},If=({children:e})=>E.jsx("span",{children:e});const ra=({className:e="",options:t={},children:n})=>{n=n.replace(/^<br\/?>/,"");const r={wrapper:j.Fragment,forceBlock:!0,overrides:{a:Wv,CollapsibleSection:Sa,TextBox:gt,CaseStudy:Uv,style:Dv,details:$v,div:qv,iframe:Hv}};return E.jsx("div",{className:ne("markdown-text",e),children:E.jsx(Wn,{options:{...r,...t},children:n})})};const kf=({size:e="medium",variant:t="default",className:n="",children:r})=>E.jsx("span",{className:ne("pill",e,t,n),children:r});const $n=({element:e="p",children:t=null,className:n="",...r})=>j.createElement(e,{...r,className:ne("status-banner text-small",n),"aria-live":"assertive"},t);const Gv=({progress:e=0,text:t=!1,className:n=""})=>{const r=ue.useIntl(),s=e>75?100:e>50?75:e>25?50:e>5?25:0,o={"--progress":`${e}%`};return E.jsx("span",{className:ne(`progress-bar section-${s}`,n),style:o,children:E.jsx(Ue,{children:t?`${e} ${t}`:r.formatMessage({id:"progressBar"},{number:e})})})},Lf=j.memo(Gv);const No="loadingBlock_",Vv=({progress:e=0,steps:t=!1,className:n=""})=>{const r=ue.useIntl();t||(t={0:{text:r.formatMessage({id:`${No}loading`})},75:{text:r.formatMessage({id:`${No}almostDone`})},100:{text:r.formatMessage({id:`${No}complete`})}});let s=null;const o=Object.keys(t);for(let i=0;i<o.length&&!(e<parseInt(o[i]));i++)s=o[i];const l=s&&t[s].icon?{"--icon":`url(${Bn}icons/${t[s].icon}.svg)`}:{};return E.jsxs(gt,{className:ne("loading-block",n,{"has-icon":s&&t[s].icon}),variant:"subtle",style:l,children:[s&&E.jsx("span",{className:"step",children:t[s].text}),E.jsx(Lf,{progress:e})]})},Qv=j.memo(Vv);const st=({element:e="div",className:t="",...n})=>E.jsx(aa,{element:e,className:ne("loading-placeholder",t),...n});const na={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"]},Ff=(e,t)=>e in na?E.jsx("div",{className:e,children:na[e].map((n,r)=>Ff(n,r))},t):E.jsx(st,{className:e},t),jf=({layout:e="overview-page"})=>E.jsx("div",{className:ne("loading-state",e),children:na[e].map((t,n)=>Ff(t,n))}),Mf=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):""},An=["#5AB6A3","#A2D7AF","#806056","#3962B3"],zv=e=>{const t=Math.ceil(26/An.length),n=Mf(e).toLowerCase();if(n==="")return An[0];const r=n.charCodeAt(0)-96;for(let s=0;s<An.length;s++)if(r<=t*(s+1))return An[s]};const Eu=256,Yn=({className:e="",src:t="",name:n,alt:r,width:s=Eu,height:o=Eu,...l})=>{const[i,u]=j.useState(!1),c=j.useRef(null);j.useEffect(()=>{const d=c.current;if(!d)return;const f=d.getContext("2d");if(!f)return;const p=s,h=o;typeof window<"u"&&window.devicePixelRatio&&(d.width=p*window.devicePixelRatio,d.height=h*window.devicePixelRatio,f.scale(window.devicePixelRatio,window.devicePixelRatio)),f.fillStyle=zv(n),f.fillRect(0,0,p,h),f.font=`${p/3}px Arial`,f.textAlign="center",f.fillStyle="white",f.fillText(Mf(n),p/2,h/1.6)},[n]);let a=!1;return t&&t!==""&&!i&&(t.includes("http")||t.includes("//"))&&(a=!0),E.jsx("figure",{className:ne("profile-picture",e,{error:i}),...l,children:a?E.jsx("img",{src:t,alt:r||n,onError:()=>{u(!0)},width:s,height:o}):E.jsx("canvas",{ref:c})})},Oa=e=>e==="apolitical"?{image:`${Bn}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${Bn}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},Yv=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const s=e!=="",o=t!=="",l=n!=="";if(!s&&!o&&!l)return"";const i=`${e}${s&&o?` — ${t}`:t}`;let u=`${i}${(s||o)&&l?`, ${n}`:n}`;return u.length>r&&(u=i),u.length>r&&(u=oa(u,r)),u};const Kn=({element:e="div",member:t="community",additionalContent:n=!1,gtmContext:r="member",gtmType:s="member-click",className:o=""})=>{const l=ue.useIntl(),i=Oa(t);i.name||(i.name=l.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:u,url:c,image:a}=i,d=Yv(i),f=n&&n.createdAt?Ev(n.createdAt):!1,p=n&&n.createdAt?_v(n.createdAt):"";return j.createElement(e,{className:ne("member text-medium",o),children:E.jsxs(zr,{href:c,gtmType:s,gtmContext:r,onClick:h=>{h==null||h.stopPropagation()},children:[E.jsx(Yn,{name:u,src:a}),E.jsxs("p",{className:"details",children:[E.jsx("strong",{children:u}),n&&E.jsxs("span",{className:"additional-content",children:[n.createdAt&&f&&E.jsx("span",{className:"date",title:p,"aria-label":p,children:l.formatMessage({id:`dates_${f.path}`},{number:f.number})}),n.didEdit&&E.jsx("em",{children:l.formatMessage({id:"discussion_edited"})})]}),d&&E.jsx("small",{children:d})]})]})})};const wu={small:24,medium:48},Df=({element:e="div",contributors:{total:t,data:n}={total:void 0,data:[]},styling:{showText:r,size:s,showGap:o,showPlaceholders:l}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:i=2,className:u=""})=>{const c=ue.useIntl();return!n||n.length===0?null:j.createElement(e,{className:ne("contributors",u,s,{"has-gap":o}),children:E.jsxs(E.Fragment,{children:[E.jsx("ul",{children:n.map((a,d)=>{let f,p="";if(d<i){const{name:h="",image:y=""}=Oa(a);if(l)return E.jsx(st,{element:"li",className:"contributor"},d);f=E.jsx(Yn,{name:h,src:y,width:wu[s||"medium"],height:wu[s||"medium"]})}else if(d===i){const h=(t||n.length)-i;f=E.jsxs("small",{className:ne({"large-number":h>99}),children:["+",xv(h,0)]}),p="number-left"}return f?E.jsx("li",{className:ne("contributor",p),children:f},d):null})}),r&&E.jsx("span",{className:"label",children:typeof r=="string"?r:n.length===1?typeof n[0]=="string"?c.formatMessage({id:`member_${n[0]}`}):oa(n[0].name||"",20):null})]})})},Uf=({showDevTools:e=!0,children:t})=>{const n=new Le.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e4}}});return E.jsxs(Le.QueryClientProvider,{client:n,children:[t,e&&E.jsx(pp.ReactQueryDevtools,{initialIsOpen:!1})]})},Bf=({children:e,locale:t,messages:n})=>{const r=t||"en",s={...Tv[r],...n||{}};return E.jsx(ue.IntlProvider,{locale:r,messages:s,children:e})},yt=j.createContext(null),$f=({children:e,user:t})=>E.jsx(yt.Provider,{value:t,children:e}),Kv=({bootstrap:e,children:t,intl:n})=>{const[r,s]=j.useState({isLoading:!0});return j.useEffect(()=>{e().then(o=>s({...o,isLoading:!1})).catch(()=>s({isLoading:!1}))},[]),E.jsx(Bf,{locale:n==null?void 0:n.locale,messages:n==null?void 0:n.messages,children:E.jsx($f,{user:r,children:E.jsx(Uf,{children:t})})})};const Po="joinCommunityButton",Ta=({isMember:e=!1,isShort:t=!1,functions:{join:n,leave:r}={join:()=>{},leave:()=>{}}})=>{const s=ue.useIntl(),o=j.useContext(yt),l=o&&typeof o.id=="string",[i,u]=j.useState(e),[c,a]=j.useState(e?"joined":"notJoined");j.useEffect(()=>{c==="joining"?a("joined"):c==="leaving"&&a("notJoined")},[i]);const d={},f={};return i&&c!=="leaving"&&(d["data-hover-text"]=s.formatMessage({id:`${Po}_leave`}),d["aria-label"]=s.formatMessage({id:`${Po}_member_aria`}),f["aria-hidden"]="true"),E.jsx(xe,{variant:i?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:i&&c!=="leaving"?{icon:"tick",position:"left"}:!1,onClick:async p=>{l&&(p.currentTarget.blur(),i?(a("leaving"),typeof r=="function"&&await r()):(a("joining"),typeof n=="function"&&await n()),u(!i))},className:ne("join-community-button",c,{active:c==="joining"}),disabled:!l,...d,children:E.jsx("span",{className:"text",...f,children:s.formatMessage({id:`${Po}${["joining","leaving"].includes(c)?`_${c}`:i?"_member":t?"_short":""}`})})})};const Io="communityDetails_",Jv=({isMember:e=!1,slug:t,members:{number:n,data:r}={number:void 0,data:[]},className:s="",...o})=>{const l=ue.useIntl(),i=n||(r==null?void 0:r.length)||0;return E.jsxs("div",{className:ne("community-details",s),children:[E.jsx(Jt,{}),E.jsxs("div",{className:"member-details",children:[E.jsxs("div",{className:"top",children:[E.jsxs("h3",{children:[l.formatMessage({id:`${Io}members`}),E.jsx("span",{className:"count",children:i})]}),E.jsx("p",{className:"text-small",children:E.jsx("a",{href:`/communities/${t}/members`,children:l.formatMessage({id:`${Io}viewAll`})})})]}),E.jsx(Df,{contributors:{total:n,data:r!=null&&r.length?r:[{},{},{},{},{}]},styling:{size:"medium",showGap:!0,showPlaceholders:i===0},cutoff:5})]}),E.jsx(Ta,{isMember:e,...o}),e&&E.jsx(xe,{variant:"primary",icon:{icon:"plus"},styling:{fullWidth:!0},children:l.formatMessage({id:`${Io}invite`})})]})};const Xv=({breadcrumbs:e,cutoff:t=20,className:n=""})=>{const r=ue.useIntl();return E.jsxs(E.Fragment,{children:[E.jsx(Ue,{element:"p",children:r.formatMessage({id:"breadcrumbs_label"})}),E.jsx("ul",{className:ne("breadcrumbs text-small",n),children:e.map(({text:s,href:o,current:l=!1},i)=>E.jsxs("li",{children:[l&&E.jsx(Ue,{element:"span",children:r.formatMessage({id:"breadcrumbs_currentPage"})}),E.jsx(zr,{href:l?void 0:o,children:oa(s,t)})]},`${window.btoa(s)}_${i}`))})]})};const Zv=({options:e,allOption:t=!1,allowMultiple:n=!0,onChange:r=()=>{},className:s=""})=>{const o=ue.useIntl(),l=t?[{id:"all",text:typeof t!="boolean"&&t.text||o.formatMessage({id:"filters_all"})},...e]:e,[i,u]=j.useState(t?["all"]:[]),c=(a,d)=>{let f=[];i.includes(a)?f=i.filter(p=>p!==a):a==="all"?f=["all"]:n?f=[...i.filter(p=>p!=="all"),a]:f=[a],u(p=>(r&&typeof r=="function"&&r({current:f,previous:p}),f)),d&&typeof d=="function"&&d()};return E.jsx("ul",{className:ne("filters",s),children:l.map(({id:a,text:d,disabled:f=!1,callback:p=()=>{}})=>{let h={};return f&&(h={disabled:!0,"aria-label":o.formatMessage({id:"filters_disabled"},{name:d})}),E.jsx("li",{children:E.jsx("button",{className:ne(a,{selected:i.includes(a)}),onClick:y=>{y.preventDefault(),y.stopPropagation(),c(a,p)},...h,children:d})},a)})})},e_=(e,t)=>{const n=String(e);if(!t||!t.length)return`/${n}`;let r="";return t.forEach(({url:s,position:o})=>{o==="before-lang"?r+=`/${s}`:(r.includes(`/${n}/`)||(r+=`/${n}`),r+=`/${s}`)}),r.includes(`/${n}/`)||(r+=`/${n}`),r};const ko={en:"English",es:"Español",fr:"Français",pt:"Português"},Rn="languageSwitcher_",t_=({currentLanguage:e,isOriginalLanguage:t=!1,isHumanTranslation:n=!1,translations:r,onChange:s=()=>{},urlParts:o,variant:l="default",label:i,className:u=""})=>{const c=ue.useIntl(),[a,d]=j.useState(e);if(j.useEffect(()=>{e!==a&&d(e)},[e]),!r||!Object.values(r).some(y=>y&&y.post_name))return null;const p=Object.keys(r),h=a!==e;return E.jsxs("div",{className:ne("language-switcher text-small",l,u),children:[E.jsxs("nav",{children:[l!=="short"&&E.jsx("p",{children:i||c.formatMessage({id:`${Rn}label`})}),E.jsx("ul",{children:p.map(y=>{if(!ko[y])return null;let _={className:y};return a===y?_["aria-label"]=c.formatMessage({id:`${Rn}selected`},{language:ko[y]}):_={..._,href:e_(y,o),onClick:S=>{S.preventDefault(),S.stopPropagation(),d(y),s(y)}},E.jsx("li",{children:E.jsx(zr,{..._,fallbackElement:"span",children:ko[y]})},y)})}),l!=="short"&&!h&&E.jsx("p",{children:c.formatMessage({id:`${Rn}translation_${t?"original":n?"human":"machine"}`})})]}),l!=="short"&&!h&&!t&&!n&&E.jsx("small",{children:c.formatMessage({id:`${Rn}disclaimer`},{email:Gt.support,link:y=>{const _=`mailto:${y}`;return E.jsx("a",{href:_,children:y})}})})]})};const Lo=ue.createIntl({locale:"en",messages:wa}),qf=({page:e=1,length:t=0,limit:n=10,loadNextPage:r=()=>{},icon:s=!1,messages:o={button:Lo.formatMessage({id:"loadMore_button"}),endOfFeed:Lo.formatMessage({id:"loadMore_endOfFeed"}),error:Lo.formatMessage({id:"loadMore_error"})},className:l="",gtmContext:i="LoadMore"})=>{const[u,c]=j.useState(!1),[a,d]=j.useState(!1);if(t<=0||t<n*e)return null;const f=async p=>{try{await r(p)}catch(h){h instanceof Error&&h.message&&h.message.includes("Cannot read items")?d(!0):c(!0)}};return E.jsxs("footer",{className:ne("load-more",l),children:[u&&E.jsx("p",{className:"error",children:o.error}),a?E.jsx("p",{children:o.endOfFeed}):E.jsx(xe,{variant:"secondary",icon:s,onClick:f,"data-gtm-event-context":i,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:o.button})]})};let Cn=!1;const Hf=({element:e="div",id:t="more-menu",options:n,className:r=""})=>{const s=ue.useIntl(),o=j.useRef(null),[l,i]=j.useState(!1),u=c=>{o.current&&c.target instanceof HTMLElement&&!o.current.contains(c.target)&&i(!1)};return j.useEffect(()=>(document.addEventListener("click",u,!0),()=>{document.removeEventListener("click",u,!0)})),j.createElement(e,{ref:o,className:ne("more-menu text-medium",r),children:E.jsxs(E.Fragment,{children:[E.jsx(xe,{variant:"tertiary",size:"medium",icon:{icon:"ellipsis"},onClick:()=>i(!l),"aria-haspopup":"true","aria-expanded":l,"aria-controls":t,screenreaderText:s.formatMessage({id:"moreMenu"})}),E.jsx("ul",{id:t,hidden:!l,children:n.map(({href:c,onClick:a,text:d,icon:f,...p},h)=>{const y={...p,onClick:_=>{i(!1),typeof a=="function"&&a(_)},onFocus:()=>{Cn&&(clearTimeout(Cn),Cn=!1)},onBlur:()=>{Cn=setTimeout(()=>{i(!1)},100)}};return c&&(y.href=c),E.jsx("li",{children:E.jsx(xe,{variant:"tertiary",size:"medium",icon:f?{icon:f,position:"left"}:!1,...y,children:d})},`${window.btoa(d)}_${h}`)})})]})})};const xa=({variant:e="default",version:t="default",className:n="",...r})=>E.jsx("p",{className:"logo-wrapper",children:E.jsx("a",{href:"/home/",className:ne("logo",e,t,n),...r,children:E.jsx(Ue,{children:E.jsx(ue.FormattedMessage,{id:"apolitical"})})})});const r_={"2-1":901},n_=({layout:e="2-1",hideOnMobile:t=!1,className:n="",children:r})=>{const s=Vr(!0);let o=r;return j.Children.count(r)===1&&(o=j.Children.toArray(r)[0],o.props&&(o=o.props.children)),E.jsx("section",{className:ne("columns",`layout-${e}`,n),children:j.Children.map(o,(l,i)=>t!==!1&&i===t&&s&&s<r_[e]?null:l)})};const Fo="cookieBanner_",jo=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],Mo=new Date(Date.now()+12*30*24*60*60*1e3),Wf=()=>{const e=ue.useIntl(),[t,n,r]=ia.useCookies(jo),[s,o]=j.useState(!t["apol-cookie-banner"]),l=()=>{jo.forEach(a=>{n(a,!0,{path:"/",expires:Mo,domain:a==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),o(!1),window.location.reload()},i=()=>{n("apol-cookie-banner",!0,{path:"/",expires:Mo}),jo.forEach(a=>{if(a==="apol-cookie-banner"){n(a,!0,{path:"/",expires:Mo});return}r(a)}),o(!1)};if(!s)return null;const u=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:i,gtmType:"reject-all"},{id:"accept",onClick:l,gtmType:"accepted-all"}],c=[];return u.forEach(a=>{c.push({variant:a.href?"tertiary":"primary",href:a.href,onClick:a.onClick,className:"gtm-trackable","data-gtm-event-context":"cookie-banner","data-gtm-event-type":`cookie-${a.gtmType}-click`,children:e.formatMessage({id:`${Fo}buttons_${a.id}`})})}),E.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[E.jsx("h6",{children:e.formatMessage({id:`${Fo}title`})}),E.jsx("p",{children:e.formatMessage({id:`${Fo}text`})}),E.jsx(Qr,{buttons:c})]})},mt={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:Gt["data-protection"].default,gtmType:"email-dpo-link"},euDataProtection:{email:Gt["data-protection"].eu,gtmType:"email-eu-dpo-link"}}},contact:{text:{order:["correspondence","registered","berlin","support","business"],correspondence:{address:!0},registered:{address:!0},berlin:{address:!0},support:{email:Gt.support,gtmType:"concierge-email-click"},business:{email:Gt.general,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 Vt="footer_",qn="SiteFooter",bu=({group:e})=>{const t=mt[e].order||[];let n=!1;return"text"in mt[e]&&(n=mt[e].text),E.jsxs(j.Fragment,{children:[E.jsx("p",{className:"pre-title",children:E.jsx(ue.FormattedMessage,{id:`${Vt}${e}`})}),Array.isArray(t)&&t.length>0&&E.jsx("ul",{className:"text-medium",children:t.map(r=>{if(["order","child","text"].includes(r))return null;const{href:s,gtmType:o}=mt[e][r],l={};return["legal"].includes(e)&&(l.target="_blank",l.rel="noopener"),E.jsx("li",{children:E.jsx("a",{href:s,className:"gtm-trackable","data-gtm-event-context":qn,"data-gtm-event-type":o,...l,children:E.jsx(ue.FormattedMessage,{id:`${Vt}${e}_${r}`})})},`${e}_${r}`)})}),typeof n!="boolean"&&"order"in n&&Array.isArray(n.order)&&E.jsx("dl",{className:"text-medium",children:n.order.map(r=>E.jsxs(j.Fragment,{children:[E.jsx("dt",{children:E.jsx(ue.FormattedMessage,{id:`${Vt}${e}_${r}`})}),E.jsxs("dd",{children:[typeof n!="boolean"&&n[r].address&&E.jsx("address",{children:E.jsx(ue.FormattedMessage,{id:`${Vt}${e}_${r}_address`,values:{br:E.jsx("br",{})}})}),typeof n!="boolean"&&n[r].email&&E.jsx("a",{href:`mailto:${n[r].email}`,className:"gtm-trackable","data-gtm-event-context":qn,"data-gtm-event-type":n[r].gtmType,children:n[r].email})]})]},`dl-${e}-${r}`))})]},e)},Aa=()=>E.jsx("div",{id:"footer",children:E.jsxs("div",{className:"wrapper",children:[E.jsx(aa,{element:"hr"}),E.jsx(xa,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":qn,"data-gtm-event-type":"logo-homepage-link"}),E.jsx("footer",{children:["platform","community","company","contact"].map(e=>E.jsxs("div",{className:"group",children:[E.jsx(bu,{group:e}),Object.keys(mt[e]).includes("child")&&E.jsx(bu,{group:mt[e].child})]},e))}),E.jsx("hr",{}),E.jsxs("div",{className:"sub-footer",children:[E.jsx("ul",{children:Array.isArray(mt.social.order)&&mt.social.order.map(e=>{const t=mt.social[e];return E.jsx("li",{className:e,children:E.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":qn,"data-gtm-event-type":"social-click",children:E.jsx("span",{className:"hidden",children:E.jsx(ue.FormattedMessage,{id:`${Vt}social_${e}`})})})},e)})}),E.jsx("small",{children:E.jsx(ue.FormattedMessage,{id:`${Vt}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});const Nn="emailHelperTextBox_",i_=({type:e,email:t,redirectPath:n,resendVerificationCode:r})=>{const s=ue.useIntl(),[o,l]=j.useState({path:`${Nn}default`,type:"default",link:{},mail:{},error:""}),[i,u]=j.useState(!1),c=j.useCallback(p=>{p.preventDefault(),p.stopPropagation();const h=y=>{l({path:`${Nn}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:_=>c(_),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:y})};if(typeof r!="function"){h(s.formatMessage({id:`${Nn}error_noFunction`}));return}u(!0),r(t).then(()=>{localStorage.setItem("email",t),window.location.href=n||"/signup/verify-email"}).catch(y=>{h(y.message)}).finally(()=>{u(!1)})},[t,n,r]);j.useEffect(()=>{let p=Nn,h="default",y={},_={};switch(e){case"gov":p+="autoApproved",h="success";break;case"nonGov":p+="unrecognisedEmail",h="error",y={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",h="error",_={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",h="error",y={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:S=>c(S),"data-testid":"send-verify-email-click"};break;case"exists":p+="emailAlreadyExists",h="error",y={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:p+="default",y={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}l({...o,path:p,type:h,link:y,mail:_})},[e]);const a={};return["link","mail"].forEach(p=>{a[p]=Object.keys(o[p]).length?h=>E.jsx("a",{...o[p],children:h}):h=>h}),E.jsx(Pf,{type:o.type,heading:i?!1:s.formatMessage({id:`${o.path}_title`}),children:i?E.jsxs(E.Fragment,{children:[E.jsx(st,{element:"span"}),E.jsx(st,{element:"span"})]}):s.formatMessage({id:`${o.path}_text`},{...a,strong:p=>E.jsx("strong",{children:p}),em:p=>E.jsx("em",{children:p}),br:E.jsxs(E.Fragment,{children:[E.jsx("br",{}),E.jsx("br",{})]}),error:o.error})})};const Pn="passwordRules_",Gf="isMoreThanEightCharacters",Vf="includesNumberAndSymbol",Qf="includesLowerAndUppercase",o_={[Gf]:"8Characters",[Vf]:"numberSymbol",[Qf]:"lowercaseUppercase"},a_=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const n=ue.useIntl();return E.jsxs("aside",{className:ne("password-rules",t),children:[E.jsx("small",{children:n.formatMessage({id:`${Pn}intro`})}),E.jsx("ul",{children:[Gf,Vf,Qf].map(r=>E.jsxs("li",{className:ne({matches:e[r]}),children:[E.jsxs(Ue,{children:[n.formatMessage({id:`${Pn}rule_label`})," "]}),E.jsx("span",{children:n.formatMessage({id:`${Pn}rule_${o_[r]}`})}),!e[r]&&E.jsxs(Ue,{element:"strong",children:[" "," ",n.formatMessage({id:`${Pn}notMet`})]})]},`rule-${r}`))})]})},s_=j.memo(a_);const c_=({text:e={},topRating:t=5,functions:{createRating:n=()=>null,updateRating:r=()=>{},reportError:s=()=>{}},className:o="",hasLoaded:l=!1})=>{const i=ue.useIntl(),[u,c]=j.useState({setUp:!1,id:null,rating:null,disabled:!0}),a=async()=>{try{const S=await n();c(v=>({...v,setUp:!0,id:S&&S.id,disabled:!1}))}catch(S){c(v=>({...v,setUp:!0,disabled:!0})),s(S)}};if(j.useEffect(()=>{l&&!u.setUp&&a()},[l]),!l)return E.jsx(st,{className:"rating-placeholder"});const{id:d,rating:f,disabled:p}=u,h="ratings_",y={text:i.formatMessage({id:`${h}text`}),low:i.formatMessage({id:`${h}low`}),high:i.formatMessage({id:`${h}high`}),success:i.formatMessage({id:`${h}success`}),...e},_=async S=>{if(!(!d||p))try{c(v=>({...v,rating:S,disabled:!0})),await r({id:d,value:S})}catch(v){c(w=>({...w,rating:null})),s(v)}finally{c(v=>({...v,disabled:!1}))}};return E.jsxs("div",{className:ne("rating",o),children:[E.jsx("span",{className:"label",children:y[f?"success":"text"]}),E.jsx("ol",{children:Array.from(new Array(t).keys()).map(S=>{const v=S+1;return E.jsx("li",{className:ne({selected:f&&v<=f}),children:E.jsx(xe,{variant:"tertiary",size:"small",icon:{icon:`star${!f||v>f?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${i.formatMessage({id:`${h}stars`},{number:v,total:t})}${v===1||v===t?` - ${y[v===1?"low":"high"]}`:""}`,onClick:w=>{w.preventDefault(),w.stopPropagation(),_(v)},disabled:p})},`rating-${v}`)})})]})};const zf=({id:e="search",className:t="",handleToggle:n=!1,defaultValue:r="",gtmContext:s="search-bar",gtmEvent:o="form-submission"})=>{const{searchIsOpen:l=!0,isDesktopVersion:i=!1}=n||{},u=ue.useIntl(),c=j.useRef(null);jt(()=>{!n||i||!l||c.current&&c.current.focus()},[l]);const a=d=>{d.preventDefault(),d.stopPropagation(),!(!c.current||!c.current.value||c.current.value.length<1)&&(window.location.href=`/search?search=${encodeURIComponent(c.current.value)}`)};return E.jsx("form",{onSubmit:a,className:ne("search-form gtm-trackable",t),"data-gtm-event-context":s,"data-gtm-event-type":o,children:E.jsx("fieldset",{id:`${e}-form`,hidden:n?!l:!1,role:"search",children:E.jsxs("p",{children:[E.jsx(Ue,{element:"label",htmlFor:e,children:u.formatMessage({id:"search_label"})}),E.jsx("input",{ref:c,type:"search",id:e,name:e,defaultValue:r,placeholder:u.formatMessage({id:"search_placeholder"}),onKeyDown:d=>{d.key==="Enter"&&a(d)}}),E.jsx("button",{className:"clear",onClick:d=>{d.preventDefault(),d.stopPropagation(),c.current&&c.current.value&&(c.current.value="")},children:E.jsx(Ue,{children:u.formatMessage({id:"search_clear"})})}),E.jsx("button",{className:"search",onClick:a,children:E.jsx(Ue,{children:u.formatMessage({id:"search_cta"})})})]})})})};var Yf={},Kr={};Object.defineProperty(Kr,"__esModule",{value:!0});Kr.isEmail=void 0;const u_={requireTld:!0,allowUnderscores:!1,allowTrailingDot:!1},l_={allowDisplayName:!1,requireDisplayName:!1,allowUtf8LocalPart:!0,requireTld:!0},f_=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\,\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,d_=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,p_=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,h_=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,m_=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;function Su(e,t){let n=0,r;const s=encodeURI(e).split(/%..|./).length-1;return t&&(n=Number(t.min)||0,r=Number(t.max)),s>=n&&(typeof r>"u"||s<=r)}function g_(e,t){t=Object.assign(Object.assign({},u_),t),t.allowTrailingDot&&e[e.length-1]==="."&&(e=e.substring(0,e.length-1));const n=e.split(".");if(t.requireTld){const r=""+n.pop();if(!n.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(r)||/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(r))return!1}for(let r,s=0;s<n.length;s++)if(r=n[s],t.allowUnderscores&&(r=r.replace(/_/g,"")),!/^[a-z\u00a1-\uffff0-9-]+$/i.test(r)||/[\uff01-\uff5e]/.test(r)||r[0]==="-"||r[r.length-1]==="-")return!1;return!0}function y_(e,t){if(t=Object.assign(Object.assign({},l_),t),t.requireDisplayName||t.allowDisplayName){const u=e.match(f_);if(u)e=u[1];else if(t.requireDisplayName)return!1}const n=e.split("@"),r=""+n.pop(),s=r.toLowerCase();let o=n.join("@");if((s==="gmail.com"||s==="googlemail.com")&&(o=o.replace(/\./g,"").toLowerCase()),!Su(o,{max:64})||!Su(r,{max:254})||!g_(r,{requireTld:t.requireTld}))return!1;if(o[0]==='"')return o=o.slice(1,o.length-1),t.allowUtf8LocalPart?m_.test(o):p_.test(o);const l=t.allowUtf8LocalPart?h_:d_,i=o.split(".");for(let u=0;u<i.length;u++)if(!l.test(i[u]))return!1;return!0}Kr.isEmail=y_;var Jn={},v_=ce&&ce.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),__=ce&&ce.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),E_=ce&&ce.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&v_(t,e,n);return __(t,e),t},Lr=ce&&ce.__awaiter||function(e,t,n,r){function s(o){return o instanceof n?o:new n(function(l){l(o)})}return new(n||(n=Promise))(function(o,l){function i(a){try{c(r.next(a))}catch(d){l(d)}}function u(a){try{c(r.throw(a))}catch(d){l(d)}}function c(a){a.done?o(a.value):s(a.value).then(i,u)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.ReactMultiEmail=void 0;const Pe=E_(j),Kf=Kr,w_=e=>typeof e>"u"?[]:e.filter(n=>(0,Kf.isEmail)(n));function b_(e){const{id:t,style:n,className:r="",noClass:s,placeholder:o,autoFocus:l,allowDisplayName:i=!1,stripDisplayName:u=!1,allowDuplicate:c=!1,delimiter:a=`[${i?"":" "},;]`,initialInputValue:d="",inputClassName:f,autoComplete:p,getLabel:h,enable:y,onDisabled:_,validateEmail:S,onChange:v,onChangeInput:w,onFocus:x,onBlur:O,onKeyDown:F,onKeyUp:D,spinner:R,disableOnBlurValidation:W=!1}=e,V=Pe.useRef(null),[L,U]=Pe.useState(!1),[$,K]=Pe.useState([]),[Q,C]=Pe.useState(d),[q,Y]=Pe.useState(!1),oe=Pe.useCallback((te,we)=>Lr(this,void 0,void 0,function*(){var Ne;const $e=[];let Fe="";const tt=new RegExp(a,"g"),Ge=S||Kf.isEmail,qe=Ve=>{if(!c){for(let ve=0,je=$.length;ve<je;ve++)if($[ve]===Ve)return!1}return $e.push(Ve),!0};if(te!=="")if(tt.test(te)){const ve=[...new Set(te.split(tt).filter(je=>je))];do{const je=Ge(""+ve[0].trim());if(typeof je=="boolean")if(je)qe(""+ve.shift());else if(i)if(Ge(""+ve[0].trim(),{allowDisplayName:i})){const rt=u?(Ne=ve.shift())===null||Ne===void 0?void 0:Ne.split("<")[1].split(">")[0]:ve.shift();qe(""+rt)}else ve.length===1?Fe=""+ve.shift():ve.shift();else Fe=""+ve.shift();else Y(!0),(yield S==null?void 0:S(te))===!0?(qe(""+ve.shift()),Y(!1)):ve.length===1?Fe=""+ve.shift():ve.shift()}while(ve.length)}else{if(y&&!y({emailCnt:$.length})){_==null||_();return}if(we){const Ve=Ge(te);if(typeof Ve=="boolean")if(Ve)qe(te);else if(i)if(Ge(te,{allowDisplayName:i})){const je=u?te.split("<")[1].split(">")[0]:te;qe(je)}else Fe=te;else Fe=te;else Y(!0),(yield S==null?void 0:S(te))===!0?(qe(te),Y(!1)):Fe=te}else Fe=te}K([...$,...$e]),C(Fe),$e.length&&(v==null||v([...$,...$e])),Fe!==Fe&&(w==null||w(Fe))}),[i,c,a,$,y,v,w,_,u,S]),ee=Pe.useCallback(te=>Lr(this,void 0,void 0,function*(){yield oe(te),w==null||w(te)}),[oe,w]),G=Pe.useCallback((te,we)=>{if(we)return;const Ne=[...$.slice(0,te),...$.slice(te+1)];K(Ne),v==null||v(Ne)},[$,v]),Z=Pe.useCallback(te=>{switch(F==null||F(te),te.key){case"Enter":te.preventDefault();break;case"Backspace":te.currentTarget.value||G($.length-1,!1);break}},[$.length,F,G]),ae=Pe.useCallback(te=>Lr(this,void 0,void 0,function*(){switch(D==null||D(te),te.key){case"Enter":yield oe(te.currentTarget.value,!0);break}}),[oe,D]),Oe=Pe.useCallback(te=>Lr(this,void 0,void 0,function*(){return yield ee(te.currentTarget.value)}),[ee]),ie=Pe.useCallback(te=>Lr(this,void 0,void 0,function*(){U(!1),W||(yield oe(te.currentTarget.value,!0)),O==null||O()}),[W,oe,O]),re=Pe.useCallback(()=>{U(!0),x==null||x()},[x]);return Pe.useEffect(()=>{K(w_(e.emails))},[e.emails]),Pe.createElement("div",{className:`${r} ${s?"":"react-multi-email"} ${L?"focused":""} ${Q===""&&$.length===0?"empty":""}`,style:n,onClick:()=>{var te;return(te=V.current)===null||te===void 0?void 0:te.focus()}},q&&(R==null?void 0:R()),o?Pe.createElement("span",{"data-placeholder":!0},o):null,Pe.createElement("div",{className:"data-labels",style:{opacity:q?.45:1,display:"contents",flexWrap:"inherit"}},$.map((te,we)=>h(te,we,G))),Pe.createElement("input",{id:t,style:{opacity:q?.45:1},ref:V,type:"text",value:Q,onFocus:re,onBlur:ie,onChange:Oe,onKeyDown:Z,onKeyUp:ae,autoFocus:l,className:f,autoComplete:p}))}Jn.ReactMultiEmail=b_;(function(e){var t=ce&&ce.__createBinding||(Object.create?function(r,s,o,l){l===void 0&&(l=o);var i=Object.getOwnPropertyDescriptor(s,o);(!i||("get"in i?!s.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(r,l,i)}:function(r,s,o,l){l===void 0&&(l=o),r[l]=s[o]}),n=ce&&ce.__exportStar||function(r,s){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&t(s,r,o)};Object.defineProperty(e,"__esModule",{value:!0}),n(Kr,e),n(Jn,e)})(Yf);const Jf=({title:e,label:t,ctaMessage:n,titleColor:r,labelColor:s,backgroundColor:o,onClose:l,reportError:i,sendInvites:u,initialFormStatus:c="NOT_SUBMITTED"})=>{const[a,d]=j.useState([]),[f,p]=j.useState(!0),[h,y]=j.useState(c),{formatMessage:_}=ue.useIntl(),S=async x=>{x.preventDefault();try{await u(a),d([]),y("SUCCESS")}catch(O){y("ERROR"),i(O)}},v=x=>{x.preventDefault(),y("NOT_SUBMITTED"),p(!0),d([])},w=x=>{x.preventDefault(),l(),y("CLOSED")};return h==="CLOSED"?null:h==="ERROR"||h==="SUCCESS"?E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"content centred",children:h==="SUCCESS"?E.jsx("h2",{className:"success-title",children:_({id:"inviteForm_success"})}):E.jsxs("h2",{className:"error-title",children:[" ",_({id:"inviteForm_error"})]})}),E.jsx(Jt,{}),E.jsx("div",{className:"footer",children:h==="SUCCESS"?E.jsxs(E.Fragment,{children:[E.jsx(xe,{variant:"secondary",onClick:v,children:_({id:"inviteForm_ctaSendMoreInvites"})}),E.jsx(xe,{onClick:w,children:_({id:"inviteForm_ctaDone"})})]}):E.jsx(xe,{onClick:v,children:_({id:"inviteForm_ctaTryAgain"})})})]}):E.jsxs("form",{style:{backgroundColor:o},onSubmit:S,className:ne("invite-form gtm-trackable"),children:[E.jsxs("fieldset",{className:"content",children:[E.jsx("h2",{className:"title",style:{color:r},children:e}),E.jsx("label",{htmlFor:"email-input",className:"label",style:{color:s},children:t}),E.jsx(Yf.ReactMultiEmail,{id:"email-input",inputClassName:"email-input input",placeholder:_({id:"inviteForm_email_placeholder"}),emails:a,onChange:x=>{d(x),p(!x.length)},autoFocus:!1,getLabel:(x,O,F)=>E.jsxs("div",{className:"email text-medium",children:[E.jsx("div",{"data-tag-item":!0,children:x}),E.jsx(xe,{variant:"tertiary",size:"small",icon:{icon:"close"},onClick:()=>{F(O),p(!a.length)},className:"remove-email-button",screenreaderText:_({id:"overlay_close"})})]},O)})]}),E.jsx(Jt,{}),E.jsx("fieldset",{className:"footer",children:E.jsx(xe,{className:"sendEmailsButton",disabled:f,children:n})})]})},Ee={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const n={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},r=o=>{const l=`logged${e?"In":"Out"}`;return t>=n[o][l]};let s={};return["navigation","search"].forEach(o=>{s[o]=r(o)}),s},shouldChangeHeaderIsVisible:(e,t,n)=>{Object.values(t).filter(s=>s===!0).length||n([{type:"headerIsVisible",value:e}])},handleMenus:({id:e,value:t,menus:n,dispatch:r})=>{if(n[e]===t||e==="account"&&t===!1&&n.navigation===!0)return;const s=Date.now();if(!t&&Ee.handlerCalled[e]&&s-Ee.handlerCalled[e]<500)return;Ee.handlerCalled[e]=s;let o=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(n).forEach(l=>{l===e||n[l]===!1||o.push({type:`menus.${l}`,value:!1})}),r(o)},findFirstChild:(e,t,n=!1)=>{if(!e||!e[0])return!1;for(let r=0;r<=e.length;r++){if(!e[r])continue;if(e[r][t]&&(!n||e[r][t].includes(n)))return e[r];if(!t.includes("."))continue;const s=xu(e[r],t);if(!(typeof s>"u")&&(!n||s[t]&&s[t].includes(n)||s.value&&s.value.includes(n)||s.toString().includes(n)))return e[r]}return e[0].children?Ee.findFirstChild(e[0].children,t,n):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:n,focusElements:r,dispatch:s})=>{if(!t.current||!t.current.children)return;const o=n?"desktop":"default";if(r[e][o]){r[e][o].focus();return}let l,i;switch(e){case"navigation":if(n){const u=Ee.findFirstChild(t.current.children,"attributes.aria-controls","navigation");l=Ee.findFirstChild(u.children,"href")}else l=Ee.findFirstChild(t.current.children,"href");l||(l=t.current);break;case"account":if(i=Ee.findFirstChild(t.current.children,"className","account"),!i||!i.children)return;l=Ee.findFirstChild(i.children,"href");break;default:return}l&&(s([{type:`focusElements.${e}.${o}`,value:l}]),l.focus())},events:{onClick:(e,{id:t,callback:n,isOpen:r})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(Ee.timeouts[t]),n(t,!r))},onFocus:({id:e})=>{clearTimeout(Ee.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(Ee.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{Ee.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},Br={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"}}}},Hn=({id:e,isLoggedIn:t=!1,isDesktopVersion:n=!1,menus:r={},callback:s=()=>{},doTrack:o=null})=>{const l=ue.useIntl(),i=xu(Br,e);if(!i||i.onlyShow&&(i.onlyShow==="logged-in"&&!t||i.onlyShow==="logged-out"&&t))return null;const u="doTrack"in i,c=o===null?u?i.doTrack:!0:o,a=e.includes("buttons.");let d=`header_${e.replaceAll(".","_")}`;i.hasVariantText&&(d+=`_logged${t?"In":"Out"}`);let f=!1;if(i.href){let v=i.gtmType||`${e}-click`;if(v.includes(".")){const w=v.split("."),x=w[w.length-2];v=`${x==="topics"?`${x}-`:""}${w[w.length-1]}`}f={href:i.href,role:"menuitem"},c&&(f={...f,className:"gtm-trackable","data-gtm-event-type":v,"data-gtm-event-context":"HeaderButtons"}),a&&(f={...f,variant:"secondary",size:{mobile:"small",881:"large"},...i.props||{}})}const p=i.order&&i.order[0]&&i[i.order[0]],h=p&&i[i.order[0]].order,y=f&&window.location.pathname===i.href;let _={},S={};if(p){const v=i.menuId||e,w={onClick:x=>Ee.events.onClick(x,{id:v,callback:s,isOpen:r[v]}),onFocus:()=>Ee.events.onFocus({id:v}),onBlur:()=>Ee.events.onBlur({id:v,callback:s}),onMouseLeave:()=>Ee.events.onBlur({id:v,callback:s}),onMouseEnter:()=>Ee.events.onMouseEnter({id:v,callback:s})};n&&(h&&(_={...w,onKeyPress:x=>{x.key==="Enter"&&Ee.events.onClick(x,{id:v,callback:s,isOpen:r[v]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":r[v],"aria-controls":v}),S={hidden:v in r?!r[v]:!0}),h||(S={...S,...w})}return E.jsxs("li",{className:ne({[i.className]:i.className,"has-submenu":p,parent:h,active:y}),role:"none",..._,children:[f?j.createElement(a?xe:"a",f,l.formatMessage({id:d})):l.formatMessage({id:d}),i.order&&E.jsx("ul",{...S,children:i.order.map(v=>{if(!i[v])return null;const w={isLoggedIn:t,isDesktopVersion:n,menus:r,callback:s,doTrack:u?c:null};return i[v].order?E.jsxs("li",{className:ne({[i[v].className]:i[v].className}),children:[l.formatMessage({id:`${d}_${v}`}),E.jsx("ul",{children:i[v].order.map(x=>E.jsx(Hn,{id:`${e}.${v}.${x}`,...w},x))})]},v):E.jsx(Hn,{id:`${e}.${v}`,...w},v)})})]},e)};const S_={height:67,height_desktop:83},Ra=()=>{const e=ue.useIntl(),t=j.useContext(yt),n=Vr(!0,!0),r=t&&typeof t.id=="string",s=j.useMemo(()=>Ee.getIsDesktopVersion(r,n),[r,n]),[o,l]=j.useReducer(vv,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:i,menus:u,focusElements:c}=o;Of({scrollPosition:S_[`height${s.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!s&&u.navigation||Ee.shouldChangeHeaderIsVisible(!0,u,l)},scrollDown:()=>{!s&&u.navigation||Ee.shouldChangeHeaderIsVisible(!1,u,l)}}});const a=(f,p)=>{Ee.handleMenus({id:f,value:p,menus:u,dispatch:l})},d=j.useRef(null);return jt(()=>{u.navigation&&Ee.autoFocus({menu:"navigation",navigationRef:d,isDesktopVersion:s.navigation,focusElements:c,dispatch:l})},[u.navigation]),jt(()=>{u.account&&Ee.autoFocus({menu:"account",navigationRef:d,isDesktopVersion:s.navigation,focusElements:c,dispatch:l})},[u.account]),t&&t.isLoading?null:E.jsxs(E.Fragment,{children:[E.jsxs("nav",{id:"header",className:ne({"logged-in":r,"logged-out":!r,visible:i}),children:[E.jsx(Ue,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),E.jsx(xa,{}),!s.navigation&&E.jsx("button",{className:"menu-button gtm-trackable",onClick:f=>{f.preventDefault(),f.stopPropagation(),a("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:E.jsx(Ue,{children:e.formatMessage({id:`header_menu_${u.navigation?"hide":"show"}`})})}),E.jsx("ul",{ref:d,id:"navigation",hidden:s.navigation||u.account?!1:!u.navigation,role:"menu","data-showing":!s.navigation&&u.account?"account":"default",children:Br.order.map(f=>E.jsx(Hn,{id:f,isLoggedIn:r,isDesktopVersion:s.navigation,menus:{navigation:u.navigation,account:u.account},callback:a},f))}),!s.search&&E.jsx("button",{className:"search toggle-search-button",onClick:f=>{f.preventDefault(),f.stopPropagation(),a("search",!u.search)},"aria-haspopup":"true","aria-expanded":u.search,"aria-controls":"search-form",children:E.jsx(Ue,{children:e.formatMessage({id:`header_search_${u.search?"hide":"show"}`})})}),E.jsx(zf,{id:"global-search",handleToggle:{searchIsOpen:u.search,isDesktopVersion:s.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),r?E.jsxs("button",{className:"account-button",onClick:f=>Ee.events.onClick(f,{id:"account",callback:a,isOpen:u.account}),onMouseEnter:()=>Ee.events.onMouseEnter({id:"account",callback:a}),onMouseLeave:()=>Ee.events.onBlur({id:"account",callback:a}),"aria-haspopup":"true","aria-expanded":u.account,"aria-controls":"navigation",children:[E.jsx(Ue,{children:e.formatMessage({id:`header_account_${u.account?"hide":"show"}`})}),E.jsx(Yn,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):E.jsx("ul",{className:"sign-in-buttons",children:Br.buttons.order.map(f=>E.jsx(Hn,{id:`buttons.${f}`},f))})]}),E.jsx("hr",{id:"content-of-page"}),E.jsx("div",{className:ne("overlay",{open:u.navigation||u.account||!s.search&&u.search})})]})};const O_=()=>{const e=ue.useIntl();return E.jsxs(E.Fragment,{children:[E.jsx(Ra,{}),E.jsx("div",{className:"content",children:E.jsx(Yr,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),E.jsx(Aa,{})]})},T_=({children:e,reportError:t,showFooter:n=!0,background:r="default",className:s="",locale:o="en"})=>{const l=Ru();j.useEffect(()=>{window.scrollTo(0,0)},[l]);const i=Af(e,{locale:o});return E.jsx(hp.ErrorBoundary,{onError:t,fallback:E.jsx(O_,{}),children:E.jsx(j.Suspense,{fallback:E.jsx(jf,{layout:"overview-page"}),children:E.jsx("div",{id:"wrapper",className:ne(s,{[r]:r!=="default"}),children:E.jsxs(ia.CookiesProvider,{children:[E.jsx(Ra,{}),E.jsx("div",{className:"content",children:i}),n&&E.jsx(Aa,{}),E.jsx(Wf,{})]})})})})},Ou={default:"tags_",headerTopics:"header_topics_topics_"},Do={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"},x_={getTagDetails:e=>{if(e.includes("topic_")){if(e=Do.topic[e.replace("topic_","")],e){const t=Br.topics.topics[e].href;return t?{id:e,href:t,text:`${Ou.headerTopics}${e}`}:null}return null}return Do[e]?(e=Do[e],{id:e,text:`${Ou.default}${e}`}):null}};const A_=({tags:e=[],color:t="default",forceOneLine:n=!1,canHaveLinks:r=!0,className:s="",gtmType:o="tag-click",gtmContext:l="tags"})=>{const i=ue.useIntl();if(!e||e.length<1)return null;const u=[];return e.forEach(c=>{if(!c)return;const a=x_.getTagDetails(c);a&&u.push(a)}),u.length<1?null:E.jsx("ul",{className:ne("tags text-small",t,s,{"one-line":n}),children:u.map(c=>{const a=i.formatMessage({id:c.text});return E.jsx("li",{children:c.href&&r?E.jsx("a",{href:c.href,className:"gtm-trackable","data-gtm-event-type":o,"data-gtm-event-context":l,children:a}):a},c.id)})})};const R_=({members:{total:e,data:t=[]},pagination:n,gtmContext:r="member",gtmType:s="member-click",className:o=""})=>{const l=ue.useIntl();return t.length===0?null:(e||(e=t.length),E.jsxs("div",{className:ne("members-list",o),children:[E.jsxs("h1",{children:[l.formatMessage({id:"membersList"}),E.jsx("span",{className:"count",children:e})]}),E.jsx("ul",{children:t.map((i,u)=>E.jsxs("li",{children:[E.jsx(Kn,{member:i,gtmContext:r,gtmType:s}),i.isAdmin&&E.jsx(kf,{children:l.formatMessage({id:"membersList_admin"})})]},u))}),n&&E.jsx(qf,{...n,icon:{icon:"arrow-down",position:"right"},gtmContext:r})]}))};let In=null;const Ye="discussion_form_",Ca=({content:e={type:"response",slugs:{}},userHasPermissions:t=!0,meta:n={isLoading:!1,isInWrapper:!1,isEditing:!1,showTitle:!1},inputRef:r,maxLength:s=5e4,minRows:o=4,forceShow:l={cancel:!1,error:!1},functions:i={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:u="DiscussionForm"})=>{var W,V;const c=ue.useIntl(),a=j.useContext(yt),[d,f]=j.useState(n.isEditing&&n.isEditing.text||""),[p,h]=j.useState(l.error||!1),[y,_]=j.useState(!1),S=j.useRef(null);if(r||(r=S),n.isLoading)return E.jsx(st,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const v=L=>{const U=L.target.value;f(U);let $;!a||!a.id?$=ot(c.formatMessage,`${Ye}error_loggedOut`,e.type,"action"):t?U.length>=s&&($=`${Ye}error_tooLong`):$=ot(c.formatMessage,`${Ye}error_noPermission`,e.type,"action"),$?h($):p&&h(!1)};let w=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const L=e.type==="response"?((W=e.slugs)==null?void 0:W.question)||"":((V=e.slugs)==null?void 0:V.answer)||"";L&&(w=`${w}-${L.slice(-15)}`)}const x=async L=>{var $;if(L.preventDefault(),L.stopPropagation(),!a||!a.id||!t||F)return;In&&clearTimeout(In),_("submitting");const U=window.location.pathname;try{let K;switch(e.type){case"post":K=await i.create({content:d});break;case"question":K=await i.create({title:d,authorId:a&&a.id,...($=i.props)==null?void 0:$.create});break;case"response":K=await i.create({question:e.slugs.question},{body:d,authorId:a&&a.id,contentPath:U});break;case"reply":K=await i.create({question:e.slugs.question,answer:e.slugs.answer},{body:d,authorId:a&&a.id,contentPath:U});break;default:break}await wv(1e3),i.callback&&await i.callback(K),In=setTimeout(()=>{f(""),_("submitted"),O()},500)}catch(K){const Q=K;let C=`${Ye}error`;Q.message.includes("entry already exists")&&(C=ot(c.formatMessage,`${Ye}error_alreadyExists`,e.type,"action")),Q.message.includes("429")?C=ot(c.formatMessage,`${Ye}error_tooMany`,e.type,"action"):Q.message.includes("400")&&(C=`${Ye}error`),h(C),O()}},O=()=>{In=setTimeout(()=>{h(!1),_(!1)},5e3)},F=!d||!Av(d),D=y==="submitting",R=[];return(n.isEditing&&!D||l.cancel)&&R.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:i.handleCancel,className:"gtm-trackable","data-gtm-event-context":u,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!l.cancel&&(!a||!a.id||!d),children:c.formatMessage({id:`${Ye}cancel`})}),R.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:L=>{if(n.isEditing){_("submitting"),i.handleSaveEdit&&i.handleSaveEdit(S.current&&"value"in S.current?S.current.value:"");return}x(L)},className:"gtm-trackable","data-gtm-event-context":u,"data-gtm-event-type":`${n.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!a||!a.id||!t||F||D||n.isEditing&&d===n.isEditing.text,children:c.formatMessage({id:`${Ye}${D?n.isEditing?"saving":"posting":n.isEditing?"save":"post"}`})}),E.jsxs("form",{id:w,className:ne("discussion-card discussion-form",{"no-styling":n.isInWrapper&&n.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[(n==null?void 0:n.showTitle)&&!n.isEditing&&["question"].includes(e.type)&&E.jsx("h2",{children:ot(c.formatMessage,`${Ye}title`,e.type,"action")}),E.jsx(Kn,{member:a||"community",gtmContext:u,gtmType:"profile-click"}),E.jsx(Ue,{element:"label",showOnFocus:!1,htmlFor:`${w}-input`,children:ot(c.formatMessage,`${Ye}label`,e.type,"action")}),E.jsx(mp,{ref:r,id:`${w}-input`,name:e.type,placeholder:ot(c.formatMessage,`${Ye}placeholder`,e.type,"action"),onChange:v,value:d,maxLength:s,"aria-invalid":!!p,"aria-errormessage":"error-message",minRows:o,autoFocus:!!n.isEditing}),E.jsx("small",{children:ot(c.formatMessage,`${Ye}explainer`,e.type,"action",{a:L=>E.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",rel:"noreferrer",children:L})})}),E.jsx(Qr,{buttons:R}),y==="submitted"&&E.jsx($n,{className:"success","data-testid":"success",children:ot(c.formatMessage,`${Ye}success`,e.type,"action")}),p&&E.jsx($n,{id:"error-message",className:"error","data-testid":"error",children:l.error?l.error:typeof p=="string"?p.includes(" ")?p:c.formatMessage({id:p},{action:c.formatMessage({id:`discussion_action_${e.type}`}),maxLength:s}):p})]})},Na=({contentType:e,createPost:t,membershipRequiredToPost:{isMember:n,required:r,join:s,leave:o,notMemberStateText:l}})=>r&&!n?E.jsx(Yr,{text:l,button:{component:E.jsx(Ta,{functions:{join:s,leave:o}})}}):E.jsx(Ca,{content:{type:e,slugs:{}},functions:{create:t}}),C_={showThread:!1,showForm:!1},Pa=j.createContext(C_),N_=({children:e})=>{const[t,n]=j.useState({showThread:!1,showForm:!1});return E.jsx(Pa.Provider,{value:{...t,updateConversation:n},children:e})},P_=({question:e,answer:t,reply:n})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...n&&{replySlug:n}}),I_=(e,t=10)=>!e||e.length===0?[]:e.slice(0,t);let Dr=!1;const Uo=()=>{Dr!==!1&&(clearTimeout(Dr),Dr=!1)},Bo=10,Xf=({element:e="div",likes:t=0,peopleWhoLiked:n=!1,isShort:r=!0,userLiked:s=!1,content:o={type:"reply",slugs:{}},canLike:l=!0,functions:{createLike:i=()=>{},deleteLike:u=()=>{}}={}})=>{const c=ue.useIntl();j.useEffect(()=>{p(s)},[s]);const[a,d]=j.useState(t),[f,p]=j.useState(s),[h,y]=j.useState(!1),[_,S]=j.useState(!1),v=j.useMemo(()=>I_(n,Bo),[n]),w=O=>{if(O.preventDefault(),O.stopPropagation(),S(!1),Dr)return Uo(),!1;if(Uo(),h||!l)return!1;Dr=setTimeout(x,350)},x=async()=>{if(Uo(),h||!l)return!1;let O=f?a-1:a+1;O<0&&(O=0),y(!0),d(O),p(!f);try{if(o&&o.slugs){const F=P_(o.slugs);f?await u(F):await i(F,{contentPath:window.location.pathname})}}catch{d(t),p(s)}finally{y(!1)}};return j.createElement(e,{className:ne("likes-wrapper text-medium action-button",{"show-spinner":h,"is-liked":f,disabled:!l}),onClick:w,onMouseEnter:()=>{S(!0)},onMouseLeave:()=>{S(!1)},onFocus:()=>{S(!0)},onBlur:()=>{S(!1)},children:E.jsxs(E.Fragment,{children:[E.jsx(xe,{variant:"tertiary",size:"medium",icon:{icon:f?"heart":"heart_empty",animate:"bounce"},className:ne({"do-animation":f&&!s}),screenreaderText:l?c.formatMessage({id:`discussion_likes_${f?"unlike":"like"}`},{action:c.formatMessage({id:`discussion_action_${o.type}`})}):!1,onClick:w,disabled:!l,"aria-hidden":!l,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${o.type}-click`}),E.jsx("span",{className:ne("number-of-likes",{"no-likes":a===0}),"data-testid":"number-of-likes",children:c.formatMessage({id:`discussion_likes${r?"_short":""}`},{number:a})}),n&&E.jsx(Cf,{isOpen:_,isLoading:n.length===0,children:n.length&&E.jsxs("ul",{children:[v.map(O=>typeof O=="string"||!O.name?null:E.jsx("li",{children:E.jsx(zr,{href:O.id?`/profiles/${O.id}`:void 0,gtmContext:"Likes",gtmType:"liked-name-click",children:O.name})},O.id||window.btoa(O.name))),n.length>Bo&&E.jsx("li",{children:c.formatMessage({id:"discussion_likes_more"},{number:n.length-Bo})})]})})]})})};const Zf=({element:e="section",children:t,className:n,...r})=>j.createElement(e,{className:ne("modal",n),children:typeof t=="string"?E.jsx("p",{children:t}):t,...r});const Ia=({id:e="content-overlay",isOpen:t=!1,showDivider:n=!0,maxWidth:r,functions:{onOpen:s=()=>{},onClose:o=()=>{}}={},forceShow:{error:l=!1}={},title:i,children:u,buttons:c,className:a="",gtmContext:d="Modal"})=>{const f=ue.useIntl(),[p,h]=j.useState(t),y=S=>{h(S),S?(s(),document.body.classList.add("has-overlay")):(o(),document.body.classList.remove("has-overlay"))};j.useEffect(()=>{y(t)},[t]);const _=r?{"--max-width":`${r/16}rem`}:{};return E.jsx("div",{className:ne("overlay",{open:p}),children:E.jsx(Zf,{id:e,className:ne("overlay-modal",a,{"has-max-width":r}),hidden:!p,style:_,children:t&&E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"top",children:[i&&E.jsx("h2",{className:"modal-title",children:i}),E.jsx(xe,{variant:"tertiary",size:"medium",icon:{icon:"close"},onClick:()=>y(!1),className:"gtm-trackable","data-gtm-event-type":"close-modal-click","data-gtm-event-context":d,screenreaderText:f.formatMessage({id:"overlay_close"})})]}),n&&E.jsx(Jt,{}),u,c&&E.jsxs("div",{className:"bottom",children:[E.jsx(Jt,{}),E.jsx(Qr,{buttons:c})]}),l&&E.jsx($n,{className:"error",children:l})]})})})},ed=(e,t)=>({"aria-haspopup":!0,"aria-expanded":t,"aria-controls":e});const k_=({className:e,showModal:t=!0,title:n,formTitle:r="Know someone who might like to join this workshop?",formLabel:s="Send an invitation to your colleagues below",ctaMessage:o="Send invites",showIcon:l,onClose:i,reportError:u=()=>{},sendInvites:c})=>E.jsx(Ia,{title:n,isOpen:t,showDivider:!1,showIcon:l,className:ne("invite-modal",e,{success:!!n}),children:E.jsx(Jf,{title:r,label:s,ctaMessage:o,onClose:i,sendInvites:c,reportError:u})}),Tu=e=>{const t={};return Object.keys(e).forEach(n=>n.includes("Id")?t[n]=e[n]:t[`${n}Slug`]=e[n]),t};const pt="discussion_",Xn=({element:e="div",content:t,userHasPermissions:n=!0,isLoading:r=!1,originalAuthorId:s,functions:{content:{createContent:o,deleteContent:l,updateContent:i}={createContent:()=>{},deleteContent:()=>{},updateContent:()=>{}},likes:{createLike:u,deleteLike:c}={createLike:()=>{},deleteLike:()=>{}},comments:{openComments:a}={openComments:()=>{}}},links:d={},className:f,gtmContext:p="DiscussionAnswer",children:h})=>{const y=ue.useIntl(),_=j.useContext(yt),S=j.useContext(Pa),[v,w]=j.useState({body:t&&t.body||"",isEditing:!1,didEdit:t&&t.isEdited||!1}),[x,O]=j.useState(!1),[F,D]=j.useState("");if(j.useEffect(()=>{w({...v,body:t&&t.body||"",didEdit:t&&t.isEdited||!1})},[t.isEdited]),r||!t||t.type==="answer"&&(!t.slugs||!t.slugs.question))return E.jsx(st,{className:"discussion-card discussion-post"});const{author:R,canLike:W,createdAt:V,id:L,likes:U=0,userLiked:$,comments:K=0}=t,Q=_&&_.id&&typeof R!="string"&&R.id&&R.id===_.id||!1,C=typeof W=="boolean"?W:n?!Q:!1,q=async G=>{G||(G=""),D("");try{if(!gp(G,v.body)){const Z=t.type==="question"?{title:G}:{body:G};await i(Tu(t.slugs),Z)}w({body:G,isEditing:!1,didEdit:!0})}catch{D(`${pt}form_error`)}},Y=()=>{S&&S.updateConversation&&S.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const Z=`reply-form-${(t.type==="answer"?t.slug:t.slugs.answer||"").toLowerCase().slice(-15)}`,ae=document.getElementById(Z),Oe=document.getElementById(`${Z}-input`);Oe&&Oe.focus(),ae&&ae.scrollIntoView({behavior:"smooth"})},0)},oe=()=>{try{l(Tu(t.slugs))}catch{D("delete-error")}},ee=[{text:y.formatMessage({id:`${pt}moreMenu_report`}),href:`mailto:community@apolitical.co?subject=${encodeURI(y.formatMessage({id:`${pt}report_subject`}))}&body=${encodeURI(y.formatMessage({id:`${pt}report_body`},{contentType:t.type||"",contentSlug:t.slug||"",contentUrl:`${window.origin}${typeof process<"u"&&process.env.PUBLIC_URL||""}/${t.slugs.question||""}`}))}`,icon:"flag"}];return n&&Q&&ee.push({text:y.formatMessage({id:`${pt}moreMenu_edit`}),onClick:()=>w({...v,isEditing:!0}),icon:"pencil-paper",className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`edit-${t.type}-click`},{text:y.formatMessage({id:`${pt}moreMenu_delete`}),onClick:G=>{G.preventDefault(),G.stopPropagation(),O(!0)},icon:"trash",className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`delete-${t.type}-click`,...ed(`delete-${t.slug}-modal`,x)}),j.createElement(e,{className:ne("discussion-post",f),"data-testid":`discussion-${t.type}-thread`,children:E.jsxs(E.Fragment,{children:[E.jsxs("div",{id:L||t.slug,className:ne("discussion-card",t.type,{editing:v.isEditing,"has-link":d.post&&!v.isEditing}),onClick:G=>{!d.post||v.isEditing||(G.preventDefault(),G.stopPropagation(),window.location.href=d.post)},children:[!v.isEditing&&E.jsx(Kn,{member:R,additionalContent:{createdAt:V,didEdit:v.didEdit},className:typeof R!="string"&&R.id===s?"highlighted":"",gtmContext:p,gtmType:"profile-click"}),v.isEditing?E.jsx(Ca,{content:{type:t.type,slugs:t.slugs},userHasPermissions:n,meta:{isLoading:r,isInWrapper:!0,isEditing:{text:v.body}},maxLength:t.type==="question"?250:5e4,forceShow:{error:F!==""&&F!=="delete-error"?y.formatMessage({id:F},{action:y.formatMessage({id:`discussion_action_${t.type}`})}):!1},functions:{create:o,handleSaveEdit:q,handleCancel:()=>{D(""),w({...v,isEditing:!1})}},gtmContext:`${p}Form`}):d.post?E.jsx("a",{href:d.post,className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":"title-click",children:E.jsx(ra,{options:{overrides:{a:If}},children:v.body})}):E.jsx(ra,{options:{wrapper:t.type==="question"?"h1":j.Fragment,forceWrapper:t.type==="question",forceInline:t.type==="question",forceBlock:t.type!=="question"},children:v.body}),!v.isEditing&&E.jsxs("ul",{className:ne("actions text-medium",t.type),"data-testid":`${t.type}-actions`,children:[E.jsx(Xf,{element:"li",likes:U,isShort:!1,userLiked:$,content:{type:t.type,slugs:t.slugs},canLike:C,functions:{createLike:u,deleteLike:c}}),(["question","post"].includes(t.type)||d.comments||typeof a=="function")&&E.jsxs("li",{className:"action-button",onClick:G=>{G.preventDefault(),G.stopPropagation(),d.comments&&(window.location.href=d.comments),typeof a=="function"&&a()},children:[E.jsx(xe,{variant:"tertiary",size:"medium",styling:{muted:!0},icon:{icon:"speech-bubble_square_thick"},href:d.comments?d.comments:!1,onClick:d.comments||typeof a!="function"?!1:a,className:"gtm-trackable","data-gtm-event-context":p,"data-gtm-event-type":`answer-${t.type}-click`,screenreaderText:y.formatMessage({id:`${pt}comments_screenReader`},{count:K})}),E.jsx("span",{children:y.formatMessage({id:`${pt}comments`},{count:K})})]}),(t.type==="answer"||t.type==="reply")&&E.jsx("li",{children:E.jsx(xe,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:Y,children:y.formatMessage({id:`${pt}reply`})})}),E.jsx(Hf,{element:"li",id:`more-${t.slug}`,options:ee})]})]}),h,E.jsx(Ia,{id:`delete-${t.slug}-modal`,isOpen:x,functions:{onOpen:()=>{},onClose:()=>O(!1)},forceShow:{error:F==="delete-error"?y.formatMessage({id:"discussion_delete_error"},{action:y.formatMessage({id:`discussion_action_${t.type}`})}):!1},title:y.formatMessage({id:"discussion_delete_title"},{action:y.formatMessage({id:`discussion_action_${t.type}`})}),buttons:[{variant:"secondary",onClick:()=>O(!1),children:y.formatMessage({id:"discussion_delete_cancel"})},{variant:"primary",className:"destructive",onClick:oe,children:y.formatMessage({id:"discussion_delete_delete"})}],gtmContext:`${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,children:E.jsx(ue.FormattedMessage,{id:"discussion_delete_text",values:{p:G=>E.jsx("p",{children:G}),action:y.formatMessage({id:`discussion_action_${t.type}`})}})})]})})};const $o="discussion_responses_",L_=({type:e="answer",responses:t=0})=>{const n=ue.useIntl();return E.jsxs("div",{className:"responses-heading",children:[E.jsx("h3",{children:n.formatMessage({id:`${$o}title`},{action:n.formatMessage({id:`${$o}${e}`}),count:t})}),t===0&&E.jsx("p",{children:ot(n.formatMessage,`${$o}empty`,e,e)})]})};const F_=({isOpen:e=!1,count:t=0,children:n})=>{const r=ue.useIntl(),s=j.useRef(null),[o,l]=j.useState(e),[i,u]=j.useState("closed");j.useEffect(()=>{const f=s.current;if(f)return f.addEventListener("transitionend",c),()=>{f.removeEventListener("transitionend",c)}},[]),jt(()=>{i==="closed"&&!o||u(["opening","open"].includes(i)?"ready-to-close":"opening")},[o]),j.useEffect(()=>{i==="ready-to-close"&&u("closing")},[i]);const c=({propertyName:f})=>{f==="max-height"&&u(p=>p==="opening"?"open":p==="closing"?"closed":p)},a=["opening","open"].includes(i),d=Af(n,{element:"li"});return E.jsxs("div",{className:"thread-wrapper",children:[E.jsx(xe,{variant:"secondary",size:"small",styling:{muted:!0},icon:{icon:`arrow_corner-down_${a?"left":"right"}`},onClick:()=>{l(!o)},children:r.formatMessage({id:`discussion_thread_${a?"hide":"show"}`},{count:t})}),E.jsx("ul",{ref:s,className:ne("thread",i),hidden:!o,children:d})]})},j_=({user:e,content:t,verb:n="post"})=>({actor:{id:e.id,data:{name:e.name,organization:e==null?void 0:e.organization,jobTitle:e==null?void 0:e.jobTitle}},content:t,latest_reactions:{like:[]},reaction_counts:{like:0},verb:n}),M_=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({content:i})=>{if(!n)return;const u=j_({user:n,content:i,verb:"post"});await e.cancelQueries({queryKey:t});const c=e.getQueryData(t);return e.setQueryData(t,a=>[...a,u]),{previousActivities:c}},onError:(i,u,c)=>{e.setQueryData(t,c.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),D_=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityInfo:l,content:{body:i}})=>{if(i.length===0)return;await e.cancelQueries({queryKey:t});const u=e.getQueryData(t),c=u==null?void 0:u.map(a=>((a==null?void 0:a.id)===(l==null?void 0:l.activityId)&&(a.content=i),a));return e.setQueryData(t,()=>c&&[...c]),{previousActivities:c}},onError:(l,i,u)=>{e.setQueryData(t,u.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),U_=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityId:i})=>{await e.cancelQueries({queryKey:t});const u=e.getQueryData(t),c=u==null?void 0:u.map(a=>{var d;return(a==null?void 0:a.id)===i&&((d=a.reaction_counts)!=null&&d.like?a.reaction_counts.like+=1:a.reaction_counts.like=1),a});return e.setQueryData(t,()=>c&&[...c]),{previousActivities:c}},onError:(i,u,c)=>{e.setQueryData(t,c.previousActivities)},onSuccess:i=>{const u=e.getQueryData(t),c=u==null?void 0:u.map(a=>((a==null?void 0:a.id)===(i==null?void 0:i.activity_id)&&(a.latest_reactions.like?a.latest_reactions.like.push(i):a.latest_reactions.like=[i]),a));return e.setQueryData(t,()=>c&&[...c]),{previousActivities:u}},onSettled:(i,u,c)=>{e.invalidateQueries({queryKey:[...t,c.activityId]})}}),B_=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({activityId:u})=>{await e.cancelQueries({queryKey:t});const c=e.getQueryData(t),a=c==null?void 0:c.map(d=>{var f;return(d==null?void 0:d.id)===u&&(f=d.reaction_counts)!=null&&f.like&&(d.reaction_counts.like-=1),d});return e.setQueryData(t,()=>a&&[...a]),{previousActivities:a}},onError:(u,c,a)=>{e.setQueryData(t,a.previousActivities)},onSuccess:(u,{activityId:c})=>{const a=e.getQueryData(t),d=a==null?void 0:a.map(f=>{var p,h,y,_;if(f.id===c){const S=(y=(h=(p=f.latest_reactions)==null?void 0:p.like)==null?void 0:h.find(v=>v.user_id===(n==null?void 0:n.id)))==null?void 0:y.id;return f.latest_reactions.like=(_=f.latest_reactions.like)==null?void 0:_.filter(v=>v.id!==S),f}else return f});return e.setQueryData(t,()=>d&&[...d]),{previousActivities:a}},onSettled:(u,c,a)=>{e.invalidateQueries({queryKey:[...t,a.activityId]})}}),$_=({basePath:e,parentId:t,isMember:n,functions:{list:r,create:s,edit:o,like:l,unlike:i,join:u,leave:c}})=>{const a=ue.useIntl(),d=Le.useQueryClient(),f=j.useContext(yt),{data:p,error:h,isLoading:y,isFetching:_}=Le.useQuery({queryKey:[e,t],queryFn:r}),S=M_({queryClient:d,queryKey:[e,t],user:f,mutationFn:s}),{mutate:v}=Le.useMutation(S),w=D_({queryClient:d,queryKey:[e,t],mutationFn:async L=>await o(L)}),{mutate:x}=Le.useMutation(w),O=U_({queryClient:d,queryKey:[e,t],mutationFn:l}),{mutate:F}=Le.useMutation(O),D=B_({queryClient:d,queryKey:[e,t],user:f,mutationFn:async({activityId:L})=>{var K,Q,C;const U=p&&(p==null?void 0:p.find(q=>q.id===L)),$=(C=(Q=(K=U==null?void 0:U.latest_reactions)==null?void 0:K.like)==null?void 0:Q.find(q=>q.user_id===(f==null?void 0:f.id)))==null?void 0:C.id;await i({reactionId:$||"",activityId:L})}}),{mutate:R}=Le.useMutation(D),W=j.useCallback(({activityId:L})=>F({activityId:L}),[F]),V=j.useCallback(({activityId:L})=>R({activityId:L}),[R]);return h?E.jsx(Yr,{variant:"error",text:h.message}):y?E.jsx(st,{style:{height:"400px"}}):E.jsxs(E.Fragment,{children:[E.jsx(Na,{contentType:"post",createPost:v,membershipRequiredToPost:{isMember:n,required:!0,join:u,leave:c,notMemberStateText:a.formatMessage({id:"community_joinToPost"})}}),!_&&Array.isArray(p)&&(p==null?void 0:p.map(L=>{var U,$,K,Q,C,q,Y,oe,ee,G,Z;return E.jsx(Xn,{content:{type:"post",body:L==null?void 0:L.content,createdAt:(L==null?void 0:L.time)||"",slugs:{parentId:t,activityId:L==null?void 0:L.id},slug:L==null?void 0:L.id,author:{id:(U=L==null?void 0:L.actor)==null?void 0:U.id,name:(K=($=L==null?void 0:L.actor)==null?void 0:$.data)==null?void 0:K.name,organization:(C=(Q=L==null?void 0:L.actor)==null?void 0:Q.data)==null?void 0:C.organization,jobTitle:(Y=(q=L==null?void 0:L.actor)==null?void 0:q.data)==null?void 0:Y.jobTitle,image:{thumbnail:((ee=(oe=L==null?void 0:L.actor)==null?void 0:oe.data)==null?void 0:ee.thumbnail)||void 0}},userLiked:((G=L==null?void 0:L.own_reactions)==null?void 0:G.like)&&((Z=L==null?void 0:L.own_reactions)==null?void 0:Z.like.length)>0,likes:(L==null?void 0:L.reaction_counts.like)||0,comments:(L==null?void 0:L.reaction_counts.reply)||0},links:{post:`${e}/${t}/${L==null?void 0:L.id}`,comments:`${e}/${t}/${L==null?void 0:L.id}`},functions:{content:{createContent:()=>null,deleteContent:()=>null,updateContent:(ae,Oe)=>x({activityInfo:ae,content:Oe})},likes:{createLike:()=>{W({activityId:L==null?void 0:L.id})},deleteLike:()=>{V({activityId:L==null?void 0:L.id})}},comments:{openComments:()=>null}}},L==null?void 0:L.id)}))]})},q_=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{await e.cancelQueries({queryKey:t})},onError:(i,u,c)=>{e.setQueryData(t,c.previousActivity)},onSuccess:i=>{var c;const u=e.getQueryData(t);if(u)return(c=u==null?void 0:u.latest_reactions)!=null&&c.reply?(u.latest_reactions.reply.unshift(i),u&&(u.reaction_counts={reply:u.latest_reactions.reply.length})):(u.latest_reactions={reply:[i]},u.reaction_counts={reply:1}),e.setQueryData(t,()=>({...u})),{previousActivity:u}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),H_=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({replyInfo:o,content:{body:l}})=>{var c,a,d;if(l.length===0)return;await e.cancelQueries({queryKey:t});const i=e.getQueryData(t);if(!i||!((c=i==null?void 0:i.latest_reactions)!=null&&c.reply))return;const u=(d=(a=i==null?void 0:i.latest_reactions)==null?void 0:a.reply)==null?void 0:d.map(f=>(f.id===o.replySlug&&(f.data.content=l),f));return e.setQueryData(t,()=>({...i,latest_reactions:{reply:u}})),{previousActivity:i}},onError:(o,l,i)=>{e.setQueryData(t,i.previousActivity)}}),W_=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({replyId:l})=>{var c,a;await e.cancelQueries({queryKey:t});const i=e.getQueryData(t),u=(a=(c=i==null?void 0:i.latest_reactions)==null?void 0:c.reply)==null?void 0:a.map(d=>{var f;return d.id===l&&((f=d.children_counts)!=null&&f.like?d.children_counts.like+=1:d.children_counts={like:1}),d});return e.setQueryData(t,()=>({...i,latest_reactions:{reply:u}})),{previousActivity:i}},onError:(l,i,u)=>{e.setQueryData(t,u.previousActivity)},onSuccess:l=>{var c;const i=e.getQueryData(t),u=(c=i==null?void 0:i.latest_reactions.reply)==null?void 0:c.map(a=>(a.id===l.id&&(a.latest_children.like?a.latest_children.like.push(l):a.latest_children.like=[l]),a));return e.setQueryData(t,()=>({...i,latest_reactions:{reply:u}})),{previousActivity:i}}}),G_=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({replyId:i})=>{var a;await e.cancelQueries({queryKey:t});const u=e.getQueryData(t);if(!u)return;const c=(a=u.latest_reactions.reply)==null?void 0:a.map(d=>(d.id===i&&d.children_counts.like&&(d.children_counts.like-=1),d));return e.setQueryData(t,()=>({...u,latest_reactions:{reply:c}})),{previousActivity:u}},onError:(i,u,c)=>{e.setQueryData(t,c.previousActivity)},onSuccess:(i,{replyId:u})=>{var d;const c=e.getQueryData(t);if(!c)return;const a=(d=c.latest_reactions.reply)==null?void 0:d.map(f=>{var p;return f.id===u?(p=f.latest_children.reply)==null?void 0:p.filter(y=>y.user_id!==(n==null?void 0:n.id)):f});return e.setQueryData(t,()=>({...c,latest_reactions:{reply:a}})),{previousActivity:c}}}),td=({basePath:e,parentId:t,activityId:n,repliesList:r,isMember:s,functions:{createReply:o,editReply:l,like:i,unlike:u,join:c,leave:a}})=>{const d=ue.useIntl(),f=Le.useQueryClient(),p=j.useContext(yt),h=q_({queryClient:f,queryKey:[e,t,n],mutationFn:o}),{mutate:y}=Le.useMutation(h),_=H_({queryClient:f,queryKey:[e,t,n],mutationFn:async R=>l(R)}),{mutate:S}=Le.useMutation(_),v=W_({queryClient:f,queryKey:[e,t,n],mutationFn:i}),{mutate:w}=Le.useMutation(v),x=G_({queryClient:f,queryKey:[e,t,n],user:p,mutationFn:u}),{mutate:O}=Le.useMutation(x),F=j.useCallback(({replyId:R})=>w({replyId:R}),[w]),D=j.useCallback(({replyId:R})=>O({replyId:R}),[O]);return E.jsxs(E.Fragment,{children:[E.jsx(Na,{contentType:"post",createPost:y,membershipRequiredToPost:{isMember:s,required:!0,join:c,leave:a,notMemberStateText:d.formatMessage({id:"community_joinToPost"})}}),(r==null?void 0:r.length)===0||(r==null?void 0:r.map(R=>{var V,L,U,$,K,Q,C,q,Y,oe,ee,G,Z,ae,Oe,ie;const W=((V=R==null?void 0:R.latest_children)==null?void 0:V.like)&&((L=R==null?void 0:R.latest_children)==null?void 0:L.like.filter(re=>re.user_id===(p==null?void 0:p.id)));return E.jsx(Xn,{content:{type:"post",body:typeof R.data.content=="string"?(U=R==null?void 0:R.data)==null?void 0:U.content:((K=($=R==null?void 0:R.data)==null?void 0:$.content)==null?void 0:K.text)||"",createdAt:R==null?void 0:R.created_at,slugs:{question:`${e}/${t}/${n}`,parentId:t,reply:R==null?void 0:R.id},slug:`${e}/${t}/${n}#${R==null?void 0:R.id}`,author:{id:(Q=R==null?void 0:R.user)==null?void 0:Q.id,name:(q=(C=R==null?void 0:R.user)==null?void 0:C.data)==null?void 0:q.name,organization:(oe=(Y=R==null?void 0:R.user)==null?void 0:Y.data)==null?void 0:oe.organization,jobTitle:(G=(ee=R==null?void 0:R.user)==null?void 0:ee.data)==null?void 0:G.jobTitle,image:{thumbnail:((ae=(Z=R==null?void 0:R.user)==null?void 0:Z.data)==null?void 0:ae.thumbnail)||void 0}},userLiked:!!(W!=null&&W.length),likes:((Oe=R==null?void 0:R.children_counts)==null?void 0:Oe.like)||0,comments:((ie=R==null?void 0:R.children_counts)==null?void 0:ie.reply)||0},functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:(re,te)=>S({replyInfo:re,content:te})},likes:{createLike:()=>F({replyId:R==null?void 0:R.id}),deleteLike:()=>D({replyId:R==null?void 0:R.id})},comments:{openComments:()=>{}}}},R==null?void 0:R.id)}))]})},V_=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityInfo:l,content:{body:i}})=>{if(i.length===0)return;await e.cancelQueries({queryKey:t});const u=e.getQueryData(t);return u&&u.id===(l==null?void 0:l.activityId)&&(u.content=i),e.setQueryData(t,()=>({...u})),{previousActivity:u}},onError:(l,i,u)=>{e.setQueryData(t,u.previousActivity)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Q_=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{var u;await e.cancelQueries({queryKey:t});const i=e.getQueryData(t);return(u=i==null?void 0:i.reaction_counts)!=null&&u.like?i.reaction_counts.like+=1:i&&(i.reaction_counts={like:1}),e.setQueryData(t,()=>({...i})),{previousActivity:i}},onError:(i,u,c)=>{e.setQueryData(t,c.previousActivity)},onSuccess:i=>{const u=e.getQueryData(t);return u!=null&&u.latest_reactions.like?u.latest_reactions.like.push(i):u&&(u.latest_reactions={like:[i]}),e.setQueryData(t,()=>({...u})),{previousActivity:u}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),z_=({queryClient:e,queryKey:t,user:n,activity:r,mutationFn:s})=>({mutationFn:s,onMutate:async()=>{var a;await e.cancelQueries({queryKey:t});const c=e.getQueryData(t);return(a=c==null?void 0:c.reaction_counts)!=null&&a.like&&c.reaction_counts.like>0&&(c.reaction_counts.like-=1),e.setQueryData(t,()=>({...c})),{previousActivity:c}},onError:(c,a,d)=>{e.setQueryData(t,d.previousActivity)},onSuccess:()=>{var d,f,p;if(!r)return;const c=(p=(f=(d=r.latest_reactions)==null?void 0:d.like)==null?void 0:f.find(h=>h.user_id===(n==null?void 0:n.id)))==null?void 0:p.id,a=e.getQueryData(t);if(a!=null&&a.latest_reactions.like)return a.latest_reactions.like=a.latest_reactions.like.filter(h=>h.id!==c),e.setQueryData(t,()=>({...a})),{previousActivity:a}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Y_=({basePath:e,parentId:t,activityId:n,isMember:r,functions:{get:s,editActivity:o,likeActivity:l,unlikeActivity:i,createReply:u,editReply:c,likeReply:a,unlikeReply:d,join:f,leave:p}})=>{var U,$,K,Q,C,q,Y,oe,ee,G;const h=j.useContext(yt),y=Le.useQueryClient(),{data:_,error:S,isLoading:v,isFetching:w}=Le.useQuery({queryKey:[e,t,n],queryFn:s}),x=V_({queryClient:y,queryKey:[e,t,n],mutationFn:async Z=>await o(Z)}),{mutate:O}=Le.useMutation(x),F=Q_({queryClient:y,queryKey:[e,t,n],mutationFn:l}),{mutate:D}=Le.useMutation(F),R=z_({queryClient:y,queryKey:[e,t,n],user:h,mutationFn:async()=>{var ae,Oe,ie;const Z=(ie=(Oe=(ae=_==null?void 0:_.latest_reactions)==null?void 0:ae.like)==null?void 0:Oe.find(re=>re.user_id===(h==null?void 0:h.id)))==null?void 0:ie.id;await i({activityId:n,reactionId:Z})},activity:_}),{mutate:W}=Le.useMutation(R),V=j.useCallback(({activityId:Z})=>D({activityId:Z}),[D]),L=j.useCallback(async({activityId:Z})=>W({activityId:Z}),[W]);return S?E.jsx(Yr,{variant:"error",text:S.message}):v||w?E.jsx(st,{style:{height:"400px"}}):E.jsx(Xn,{content:{type:"post",body:_==null?void 0:_.content,createdAt:(_==null?void 0:_.time)||"",slugs:{question:`${t}/${n}`,parentId:t,activityId:_==null?void 0:_.id},slug:n,author:{id:(U=_==null?void 0:_.actor)==null?void 0:U.id,name:($=_==null?void 0:_.actor)==null?void 0:$.data.name,organization:(K=_==null?void 0:_.actor)==null?void 0:K.data.organization,jobTitle:(Q=_==null?void 0:_.actor)==null?void 0:Q.data.jobTitle,image:{thumbnail:((C=_==null?void 0:_.actor)==null?void 0:C.data.thumbnail)||void 0}},userLiked:((q=_==null?void 0:_.own_reactions)==null?void 0:q.like)&&((Y=_==null?void 0:_.own_reactions)==null?void 0:Y.like.length)>0,likes:_&&(_==null?void 0:_.reaction_counts.like),comments:_&&(_==null?void 0:_.reaction_counts.reply)},originalAuthorId:(oe=_==null?void 0:_.actor)==null?void 0:oe.id,functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:(Z,ae)=>O({activityInfo:Z,content:ae})},likes:{createLike:()=>V({activityId:n}),deleteLike:()=>L({activityId:n})},comments:{openComments:()=>{}}},children:E.jsxs(E.Fragment,{children:[E.jsxs("h3",{children:["Comments (",((ee=_==null?void 0:_.reaction_counts)==null?void 0:ee.reply)||0,")"]}),E.jsx(td,{basePath:e,parentId:t,activityId:n,repliesList:(G=_==null?void 0:_.latest_reactions)==null?void 0:G.reply,isMember:r,functions:{createReply:u,like:a,unlike:d,editReply:c,join:f,leave:p}})]})},n)},K_=({id:e,data:{jobTitle:t,name:n,organization:r,thumbnail:s}})=>({id:e,name:n,jobTitle:t,organization:r,image:{thumbnail:s}});exports.ASSETS_BUCKET=Bn;exports.ActivitiesFeed=$_;exports.ActivitySection=Y_;exports.AddPost=Na;exports.BannerSection=Lv;exports.Breadcrumbs=Xv;exports.Button=xe;exports.ButtonWrapper=Qr;exports.CacheProvider=Uf;exports.CollapsibleSection=Sa;exports.Columns=n_;exports.CommunityDetails=Jv;exports.Contributors=Df;exports.ConversationContext=Pa;exports.CookieBanner=Wf;exports.DiscussionConversation=N_;exports.DiscussionForm=Ca;exports.DiscussionLikes=Xf;exports.DiscussionPost=Xn;exports.DiscussionThread=F_;exports.Divider=Jt;exports.DownloadSection=Nv;exports.EMAILS=Gt;exports.EmailHelperTextBox=i_;exports.EmptyStateBox=Yr;exports.Filters=Zv;exports.Footer=Aa;exports.FullWidthSection=ba;exports.GlobalProviders=Kv;exports.Header=Ra;exports.HelperTextBox=Pf;exports.HiddenFromScreenReaders=aa;exports.HideShowTextBox=Mv;exports.HighlightedTextBox=gt;exports.IntlProvider=Bf;exports.InviteForm=Jf;exports.InviteModal=k_;exports.JoinButton=Ta;exports.LanguageSwitcher=t_;exports.Link=zr;exports.LoadMore=qf;exports.LoadingBlock=Qv;exports.LoadingPlaceholder=st;exports.LoadingState=jf;exports.Logo=xa;exports.LogoSection=Pv;exports.MarkdownText=ra;exports.MarketingBox=Fv;exports.Member=Kn;exports.MembersList=R_;exports.Modal=Zf;exports.MoreMenu=Hf;exports.NUMBER_OF_USERS=jv;exports.Overlay=Ia;exports.PageLayout=T_;exports.PasswordRules=s_;exports.Pill=kf;exports.ProfilePicture=Yn;exports.ProgressBar=Lf;exports.Rating=c_;exports.RepliesFeed=td;exports.ResponsesHeading=L_;exports.ResponsiveImage=Rf;exports.SearchForm=zf;exports.Span=If;exports.StatusBanner=$n;exports.Tags=A_;exports.Tooltip=Cf;exports.UserContext=yt;exports.UserProvider=$f;exports.VisuallyHidden=Ue;exports.addAriaProps=ed;exports.getMember=Oa;exports.headerData=Br;exports.mapGetStreamData=K_;exports.useCurrentPath=Ru;exports.useEffectAfterMount=jt;exports.useFeatureFlag=mv;exports.useScreenWidth=Vr;exports.useScrollListener=Of;exports.useScrollToHash=yv;
|
|
35
|
+
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",inviteModal_title:"You’re registered",inviteForm_email_placeholder:"Add email addresses...",inviteForm_title:"Know someone who might like to join this workshop?",inviteForm_label:"Invite your colleagues by typing or pasting their emails below",inviteForm_ctaMessage:"Send",inviteForm_success:"Invitation Sent!",inviteForm_error:"Something went wrong!",inviteForm_ctaTryAgain:"Try again!",inviteForm_ctaSendMoreInvites:"Send more invites",inviteForm_ctaDone:"Done",joinCommunityButton:"Join community",joinCommunityButton_short:"Join",joinCommunityButton_joining:"Joining...",joinCommunityButton_member:"Member",joinCommunityButton_member_aria:"Leave community",joinCommunityButton_leave:"Leave",joinCommunityButton_leaving:"Leaving...",languageSwitcher_label:"I would like to read this article in...",languageSwitcher_translation_original:"original language",languageSwitcher_translation_human:"translated by person",languageSwitcher_translation_machine:"translated by machine",languageSwitcher_selected:"{language} - currently selected",languageSwitcher_disclaimer:"This content is machine translated and will occasionally get gendered language or other direct translations wrong. We’re trying to resolve this but in the meantime, if you notice something very wrong, let us know at <link>{email}</link>",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..."},Ns={languageSwitcher_label:"Me gustaría leer este artículo en...",languageSwitcher_translation_original:"idioma original",languageSwitcher_translation_human:"traducido por un humano",languageSwitcher_translation_machine:"traducido por máquina",languageSwitcher_disclaimer:"Este contenido fue traducido automáticamente y ocasionalmente tendrá errores de género u otras traducciones directas. Estamos intentando resolver este problema, pero mientras tanto, si notas algún error grave, escríbenos a <link>{email}</link>"},Fs={collapsibleSection_summary:"En savoir plus",languageSwitcher_label:"Je voudrais lire cet article dans...",languageSwitcher_translation_original:"langue originale",languageSwitcher_translation_human:"traduit par un humain",languageSwitcher_translation_machine:"traduit par machine",languageSwitcher_disclaimer:"Ce contenu est traduit automatiquement et contiendra d’évantuelles erreurs de genre ou d’autres traductions directes. Nous essayons de résoudre ce problème, mais en attendant, si vous remarquez une erreur importante, faites-le nous savoir à <link>{email}</link>"},Ps={languageSwitcher_label:"Eu gostaria de ler este artigo em...",languageSwitcher_translation_original:"linguagem original",languageSwitcher_translation_human:"traduzido por um humano",languageSwitcher_translation_machine:"traduzido por máquina",languageSwitcher_disclaimer:"Este conteúdo foi traduzido automaticamente e, ocasionalmente, poderão ocorrer erros de linguagem de gênero ou outras traduções diretas. Estamos tentando resolver isso, porém se perceber algo errado por favor nos avise em <link>{email}</link>"},Rs=Object.freeze(Object.defineProperty({__proto__:null,en:Et,es:Ns,fr:Fs,pt:Ps},Symbol.toStringTag,{value:"Module"})),le=(e,t,n,r,o={})=>{let l="";return`${t}_${n}`in Et?l=e({id:`${t}_${n}`},o):l=e({id:t},{[r]:n,...o}),l},Ds=(e,t,n)=>{if(!e||e===0)return"0";t||(t=0),n||(n=["k","m","b","t"]);let r=e.toString();t=Math.pow(10,t);for(let o=n.length-1;o>=0;o--){const l=Math.pow(10,(o+1)*3);if(l<=e){e=Math.round(e*t/l)/t,e===1e3&&o<n.length-1&&(e=1,o++),r=`${e}${n[o]}`;break}}return r},gn=(e,t)=>h.Children.map(e,n=>h.cloneElement(n,{...t})),Is=e=>e.replace(/\s+/g,"").length>0,Q=({variant:e="primary",size:t="medium",styling:n={muted:!1,fullWidth:!1},icon:r=!1,href:o=!1,element:l="button",onClick:d=!1,className:a="",disabled:i=!1,screenreaderText:c=!1,children:u=!1,...f})=>{const g=Ce(typeof t=="object");if(typeof t=="object"&&typeof g=="number"){const _=Object.assign({},t),E=pn(Object.keys(_));t=hn(g,E,_)}const x=[];typeof t=="string"&&x.push(t),r&&(x.push("icon"),typeof r=="object"?(x.push(r.icon),r.position?x.push(r.position):x.push("left"),r.hover&&x.push(`hover_${r.hover}`),r.animate&&(x.push("animate"),typeof r.animate=="string"&&x.push(r.animate))):(x.push(r),!r.includes("right")&&!r.includes("left")&&x.push("left"))),n.muted&&x.push("muted"),n.fullWidth&&x.push("full-width");const b={...f,className:S(e,a,x,{"no-text":!u,disabled:i,button:o}),onClick:_=>{(!o||o[0]==="#")&&d&&(_.preventDefault(),_.stopPropagation()),d&&d(_)},disabled:typeof i=="object"&&"isClickable"in i?!i.isClickable:i};return o&&(l="a",b.href=o),h.createElement(l,b,u||(c?s.jsx(K,{showOnFocus:!1,children:c}):null))},Ae=({buttons:e,className:t="",...n})=>{const r=e.length>1?"ul":"p",o=e.map((l,d)=>r==="p"?s.jsx(Q,{...l},d):s.jsx("li",{children:s.jsx(Q,{...l})},d));return h.createElement(r,{className:S("button-wrapper",t),...n,children:o})};const ye=({maxWidth:e=!1})=>{const t=e?{"--max-width":`${e/16}rem`}:{};return s.jsx("hr",{className:S({"has-max-width":e}),style:t})},Ne=({href:e,children:t,fallbackElement:n,className:r="",onClick:o,gtmContext:l,gtmType:d,...a})=>{if(e){const i={...a};return o&&(i.onClick=o),l&&(i["data-gtm-event-context"]=l),d&&(i["data-gtm-event-type"]=d),s.jsx("a",{href:e,className:S("gtm-trackable",r),...i,children:t})}return n?h.createElement(n,{children:t,className:r,...a}):t},en={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"}},Bs=({aspect:e,range:t,sizes:n})=>{const{range:r,sizes:o}=e?en[e]:en.fallback;return{range:t&&t.length>0?t:r,sizes:n||o}},Os=({format:e,height:t,query:n,width:r})=>{let o=`w=${r}&h=${t}`;return o=e?`${o}&fm=${e}`:o,o=n?`${o}&${n}`:o,o},it=({format:e,range:t,url:n,query:r})=>t.map(({height:o,width:l})=>`${n}?${Os({format:e,height:o,query:r,width:l})} ${l}w`).join(", ");const _n=({image:e,className:t,testId:n})=>{const{description:r,height:o,type:l,query:d,url:a,width:i,loading:c,decoding:u,fetchPriority:f}=e,{range:p,sizes:g}=Bs(e),x=it({format:"avif",query:d,range:p,url:a}),b=it({format:"webp",query:d,range:p,url:a}),_=it({format:"",query:d,range:p,url:a});return s.jsxs("picture",{className:t,children:[l!=="image/gif"&&s.jsx("source",{type:"image/avif",srcSet:x,sizes:g,"data-testid":"source"}),s.jsx("source",{type:"image/webp",srcSet:b,sizes:g,"data-testid":"source"}),s.jsx("img",{srcSet:_,sizes:g,src:a,alt:r,loading:c||"lazy",decoding:u||"async",fetchpriority:f||"auto",width:i,height:o,"data-testid":n||"image"})]})};let Te=!1;const xn=({isOpen:e=!1,isLoading:t=!1,children:n})=>{const r=M.useIntl(),o=h.useRef(null),[l,d]=h.useState("hidden");h.useEffect(()=>{const i=o.current;if(i)return i.addEventListener("transitionend",a),()=>{i.removeEventListener("transitionend",a)}},[]);const a=({propertyName:i})=>{i==="opacity"&&(Te!==!1&&clearTimeout(Te),d(c=>c==="opening"?"open":c==="closing"?"closed":c==="closed"?"hidden":c))};return _e(()=>{Te!==!1&&clearTimeout(Te);let i="open";e?d("opening"):(d("closing"),i="hidden"),Te=setTimeout(()=>{d(i)},300)},[e]),s.jsx("aside",{ref:o,className:S("tooltip text-medium",l,{loading:t}),hidden:l==="hidden",children:t?s.jsx("p",{children:r.formatMessage({id:"tooltip_loading"})}):typeof n=="string"?s.jsx("p",{children:n}):n})};const Tt=({children:e,className:t="",...n})=>s.jsx("section",{className:S("full-width-section",t),...n,children:e});const Ls=({text:e,buttons:t,className:n=""})=>{const r=[];return t.forEach(o=>{r.push({href:o.link,variant:"secondary",size:{mobile:"medium",1024:"large"},className:"gtm-trackable","data-gtm-event-type":"download-click","data-gtm-event-context":o.eventContext||"Download",target:"_blank",children:o.text})}),s.jsx(Tt,{className:S("download-section",n),children:s.jsxs(s.Fragment,{children:[h.createElement(typeof e=="string"?"h2":e.element,{className:"text"},typeof e=="string"?e:e.text),s.jsx(Ae,{buttons:r})]})})};const Hs=({title:e=!1,logos:t=[],className:n=""})=>{const r=t.length;if(r===0)return null;const o={element:typeof e=="object"?e.element:"h2",text:typeof e=="string"?e:typeof e=="object"?e.text:""};return s.jsxs("div",{className:S("logos",n),children:[e&&h.createElement(o.element,{className:"title"},o.text),s.jsx("ul",{className:S({"two-col":r===2||r===4,"three-col":r===5||r<=10&&r%3===0}),children:t.map(({logo:l,nameOfBusiness:d,link:a=!1,description:i=!1},c)=>{if(!l||!l.url)return null;const u=s.jsx("img",{src:l.url,width:l.width||"auto",height:l.height||"auto",alt:d});return s.jsxs("li",{children:[s.jsx("p",{className:"img-wrapper",children:a?s.jsx("a",{href:a,target:"_blank",rel:"nofollow noreferrer noopener",children:u}):u}),i&&s.jsx("small",{children:i})]},window.btoa(`${l.url}_${c}`))})})]})};const Qs=["small","span","strong","em","p","h1","h2","h3","h4","h5","h6","blockquote","q"],Us=({content:e,image:t,variant:n="default",spacing:r="normal",cta:o,children:l})=>{const d=["eyebrow","title","text"],a={eyebrow:"small",title:"h1",text:"p"},i={};return d.forEach(c=>{if(!e[c]){i[c]=!1;return}if(typeof e[c]=="object"){i[c]=e[c];const{text:u,element:f}=e[c];if(f&&Qs.includes(f.toLowerCase()))return;i[c]={text:u,element:a[c]};return}i[c]={text:e[c],element:a[c]}}),o&&o.link&&o.link[0]==="#"&&(o.props||(o.props={}),o.props.onClick=c=>{c.preventDefault(),c.stopPropagation();const u=document.getElementById(o.link.substring(1));u&&u.scrollIntoView({behavior:"smooth"})}),s.jsx(Tt,{className:S("banner-section",n,r,{"has-image":t,"has-extra-spacing":r==="normal"&&i.eyebrow&&i.title}),children:s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"content-wrapper",children:[d.map(c=>{if(i[c]&&typeof i[c]=="object"){const{text:u,element:f=""}=i[c];return h.createElement(f.toLowerCase(),{key:c,className:c},u)}return null}),l,o&&o.text&&o.link&&s.jsx(Q,{variant:t||n==="light"?"primary":"secondary",size:{mobile:"medium",768:"large"},href:o.link,...o.props,children:o.text})]}),t&&s.jsx(_n,{image:{...t,aspect:"banner"}})]})})},Ws=h.memo(Us);const zs=({variant:e="primary",button:t=null,title:n,text:r,gtmContext:o})=>!n&&!r?null:s.jsxs("aside",{className:S("marketing-block",e),children:[n&&s.jsx("p",{className:"title",children:n}),r&&s.jsx("p",{children:r}),t&&s.jsx(Q,{variant:"secondary",size:"medium",href:t.link,className:"gtm-trackable","data-gtm-event-context":o,"data-gtm-event-type":"learn-more-click",children:t.text})]}),Ve="https://storage.googleapis.com/apolitical-assets/",be={general:"hello@apolitical.co",support:"concierge@apolitical.co","data-protection":{default:"dpo@apolitical.co",eu:"dpo.agl@apolitical.foundation"}},Vs="200,000+";const $t=({label:e=!1,className:t="",children:n})=>{const r=M.useIntl();return s.jsxs("details",{className:S("collapsible-section",t),children:[s.jsx("summary",{children:e||r.formatMessage({id:"collapsibleSection_summary"})}),s.jsx("div",{className:"content",children:n})]})};const pe=({variant:e="primary",className:t="",children:n,...r})=>s.jsx("div",{className:S("highlighted-text-box",e,t),...r,children:n});const Fe=({variant:e="empty",text:t=!1,button:n=!1,className:r=""})=>{let o=n&&!!Object.keys(n).length;const l=typeof n=="object"&&"breakpoints"in n,d=Ce(l);if(l&&typeof n=="object"&&typeof d=="number"){const f=Object.assign({},n.breakpoints),p=pn(Object.keys(f));o=hn(d,p,f)}const{breakpoints:a,text:i="",component:c,...u}=n;return s.jsx(pe,{variant:"subtle",className:S("empty-state-box",e,r),children:s.jsxs(s.Fragment,{children:[t&&s.jsx(qe,{options:{forceBlock:!0},children:t}),o&&typeof n=="object"&&(c||s.jsx(Q,{...u,variant:n.variant?n.variant:"secondary",children:i}))]})})};const wt=({children:e,...t})=>s.jsx("p",{...t,children:e}),vn={q:wt,blockquote:wt};for(let e=1;e<=6;e++)vn[`h${e}`]={component:wt,props:{className:"title"}};const bn=({type:e="default",className:t="",heading:n=!1,children:r})=>s.jsxs("div",{className:S("helper-text-box text-small",e,t),children:[n&&s.jsx("p",{className:"title",children:n}),typeof r=="string"?s.jsx(qe,{options:{wrapper:h.Fragment,forceBlock:!0,overrides:vn},children:r}):s.jsx("p",{children:r})]});const Ys=({className:e="",show:t=!1,hide:n=!1,text:r,children:o})=>{const l=M.useIntl(),d=h.useRef(null),[a,i]=h.useState(""),[c,u]=h.useState("closed");h.useEffect(()=>{const g=d.current;if(g)return g.addEventListener("transitionend",f),()=>{g.removeEventListener("transitionend",f)}},[]),h.useEffect(()=>{if(!r||typeof r!="string")return;const g=r.split(`
|
|
36
|
+
`);i(g.length<3?`${r.substring(0,400)}...`:g.slice(0,3).join(`
|
|
37
|
+
`))},[r]),h.useEffect(()=>{c==="ready-to-close"&&u("closing")},[c]);const f=({propertyName:g})=>{g==="max-height"&&u(x=>x==="opening"?"open":x==="closing"?"closed":x)};if(!r)return null;const p=["opening","open"].includes(c);return s.jsxs(pe,{variant:"subtle",className:S("hide-show-text-box",e),children:[s.jsxs("div",{ref:d,className:S("content",c),children:[s.jsx(qe,{options:{forceBlock:!0},children:c==="closed"?a:r}),c!=="closed"&&o]}),s.jsx("p",{className:"cta",children:s.jsx(Q,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:S({"rotate-180":p}),onClick:()=>{u(p?"ready-to-close":"opening")},children:p?n||l.formatMessage({id:"hideShowTextBox_hide"}):t||l.formatMessage({id:"hideShowTextBox_show"})})})]})},Gs=()=>h.Fragment,Js=({children:e})=>s.jsx(pe,{variant:"secondary",children:e}),qs=["span","strong","h1","h2","h3","h4","h5","h6","p"],Xs=({children:e})=>{const t=M.useIntl();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const l of h.Children.toArray(e))if(!(!l||typeof l=="string"||typeof l=="number"))if(h.isValidElement(l)&&l.type==="summary"){if(l.props&&l.props.children){for(const d of h.Children.toArray(l.props.children))if(!(!d||typeof d=="string"||typeof d=="number")&&h.isValidElement(d)){const a=d.type;if(qs.includes(a)){for(n=d.props.children;typeof n!="string"&&(Array.isArray(n)&&n[0].props&&n[0].props.children&&n[0].props.children[0]);)n=n[0].props.children[0];break}}}}else r.push(l);const o=n?n.toString():"";return s.jsx($t,{label:o,className:["Sources","Resources"].includes(o)?"discrete-links":"",children:r.map(l=>l)})},Zs=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return s.jsx(pe,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return s.jsx(pe,{variant:"primary",children:e});case"pink-textbox":return s.jsx(pe,{variant:"tertiary",children:e});default:return s.jsx("div",{...t,children:e})}return s.jsx("div",{...t,children:e})},Ks=e=>{const t=M.useIntl(),n=Date.now().toString();let r="default";const o=e.src;return o.includes("youtube")||o.includes("vimeo")?r="video":o.includes("riddle")||o.includes("sli.do")?r="poll":o.includes("padlet")&&(r="padlet"),s.jsxs(s.Fragment,{children:[s.jsx(K,{children:s.jsx("a",{href:`#content-after-iframe-${n}`,children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})})}),s.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),s.jsx("span",{id:`content-after-iframe-${n}`,tabIndex:-1})]})},tn=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},er=({children:e,...t})=>{let n={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(n.target="_blank");let r=e,o=!1;for(const l of h.Children.toArray(e))if(!(!l||typeof l=="string"||typeof l=="number")&&h.isValidElement(l)){const d=l.type;if(["button","center","span","strong"].includes(d)&&l.props&&l.props.children&&l.props.children[0])for((d==="button"||tn(l.props.children[0])==="button")&&(o=!0),r=l.props.children[0];r&&typeof r!="string"&&!(typeof r=="boolean"||typeof r=="number"||!h.isValidElement(r));)if(r.props&&r.props.children&&r.props.children[0])r=r.props.children[0],r&&tn(r)==="button"&&(o=!0);else break}return o?(n={...n,className:"button primary medium"},s.jsx("p",{className:"center",children:s.jsx(Q,{variant:"primary",size:"medium",...n,children:r})})):s.jsx("a",{...n,children:r})},wn=({children:e})=>s.jsx("span",{children:e});const yt=({className:e="",options:t={},children:n})=>{n=n.replace(/^<br\/?>/,"");const r={wrapper:h.Fragment,forceBlock:!0,overrides:{a:er,CollapsibleSection:$t,TextBox:pe,CaseStudy:Js,style:Gs,details:Xs,div:Zs,iframe:Ks}};return s.jsx("div",{className:S("markdown-text",e),children:s.jsx(qe,{options:{...r,...t},children:n})})};const yn=({size:e="medium",variant:t="default",className:n="",children:r})=>s.jsx("span",{className:S("pill",e,t,n),children:r});const Ye=({element:e="p",children:t=null,className:n="",...r})=>h.createElement(e,{...r,className:S("status-banner text-small",n),"aria-live":"assertive"},t);const tr=({progress:e=0,text:t=!1,className:n=""})=>{const r=M.useIntl(),o=e>75?100:e>50?75:e>25?50:e>5?25:0,l={"--progress":`${e}%`};return s.jsx("span",{className:S(`progress-bar section-${o}`,n),style:l,children:s.jsx(K,{children:t?`${e} ${t}`:r.formatMessage({id:"progressBar"},{number:e})})})},kn=h.memo(tr);const lt="loadingBlock_",nr=({progress:e=0,steps:t=!1,className:n=""})=>{const r=M.useIntl();t||(t={0:{text:r.formatMessage({id:`${lt}loading`})},75:{text:r.formatMessage({id:`${lt}almostDone`})},100:{text:r.formatMessage({id:`${lt}complete`})}});let o=null;const l=Object.keys(t);for(let a=0;a<l.length&&!(e<parseInt(l[a]));a++)o=l[a];const d=o&&t[o].icon?{"--icon":`url(${Ve}icons/${t[o].icon}.svg)`}:{};return s.jsxs(pe,{className:S("loading-block",n,{"has-icon":o&&t[o].icon}),variant:"subtle",style:d,children:[o&&s.jsx("span",{className:"step",children:t[o].text}),s.jsx(kn,{progress:e})]})},sr=h.memo(nr);const ce=({element:e="div",className:t="",...n})=>s.jsx(St,{element:e,className:S("loading-placeholder",t),...n});const kt={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"]},jn=(e,t)=>e in kt?s.jsx("div",{className:e,children:kt[e].map((n,r)=>jn(n,r))},t):s.jsx(ce,{className:e},t),Sn=({layout:e="overview-page"})=>s.jsx("div",{className:S("loading-state",e),children:kt[e].map((t,n)=>jn(t,n))}),En=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):""},Oe=["#5AB6A3","#A2D7AF","#806056","#3962B3"],rr=e=>{const t=Math.ceil(26/Oe.length),n=En(e).toLowerCase();if(n==="")return Oe[0];const r=n.charCodeAt(0)-96;for(let o=0;o<Oe.length;o++)if(r<=t*(o+1))return Oe[o]};const nn=256,Xe=({className:e="",src:t="",name:n,alt:r,width:o=nn,height:l=nn,...d})=>{const[a,i]=h.useState(!1),c=h.useRef(null);h.useEffect(()=>{const f=c.current;if(!f)return;const p=f.getContext("2d");if(!p)return;const g=o,x=l;typeof window<"u"&&window.devicePixelRatio&&(f.width=g*window.devicePixelRatio,f.height=x*window.devicePixelRatio,p.scale(window.devicePixelRatio,window.devicePixelRatio)),p.fillStyle=rr(n),p.fillRect(0,0,g,x),p.font=`${g/3}px Arial`,p.textAlign="center",p.fillStyle="white",p.fillText(En(n),g/2,x/1.6)},[n]);let u=!1;return t&&t!==""&&!a&&(t.includes("http")||t.includes("//"))&&(u=!0),s.jsx("figure",{className:S("profile-picture",e,{error:a}),...d,children:u?s.jsx("img",{src:t,alt:r||n,onError:()=>{i(!0)},width:o,height:l}):s.jsx("canvas",{ref:c})})},Mt=e=>e==="apolitical"?{image:`${Ve}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${Ve}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},or=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const o=e!=="",l=t!=="",d=n!=="";if(!o&&!l&&!d)return"";const a=`${e}${o&&l?` — ${t}`:t}`;let i=`${a}${(o||l)&&d?`, ${n}`:n}`;return i.length>r&&(i=a),i.length>r&&(i=jt(i,r)),i};const Ze=({element:e="div",member:t="community",additionalContent:n=!1,gtmContext:r="member",gtmType:o="member-click",className:l=""})=>{const d=M.useIntl(),a=Mt(t);a.name||(a.name=d.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:i,url:c,image:u}=a,f=or(a),p=n&&n.createdAt?Cs(n.createdAt):!1,g=n&&n.createdAt?Ms(n.createdAt):"";return h.createElement(e,{className:S("member text-medium",l),children:s.jsxs(Ne,{href:c,gtmType:o,gtmContext:r,onClick:x=>{x==null||x.stopPropagation()},children:[s.jsx(Xe,{name:i,src:u}),s.jsxs("p",{className:"details",children:[s.jsx("strong",{children:i}),n&&s.jsxs("span",{className:"additional-content",children:[n.createdAt&&p&&s.jsx("span",{className:"date",title:g,"aria-label":g,children:d.formatMessage({id:`dates_${p.path}`},{number:p.number})}),n.didEdit&&s.jsx("em",{children:d.formatMessage({id:"discussion_edited"})})]}),f&&s.jsx("small",{children:f})]})]})})};const sn={small:24,medium:48},Tn=({element:e="div",contributors:{total:t,data:n}={total:void 0,data:[]},styling:{showText:r,size:o,showGap:l,showPlaceholders:d}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:a=2,className:i=""})=>{const c=M.useIntl();return!n||n.length===0?null:h.createElement(e,{className:S("contributors",i,o,{"has-gap":l}),children:s.jsxs(s.Fragment,{children:[s.jsx("ul",{children:n.map((u,f)=>{let p,g="";if(f<a){const{name:x="",image:b=""}=Mt(u);if(d)return s.jsx(ce,{element:"li",className:"contributor"},f);p=s.jsx(Xe,{name:x,src:b,width:sn[o||"medium"],height:sn[o||"medium"]})}else if(f===a){const x=(t||n.length)-a;p=s.jsxs("small",{className:S({"large-number":x>99}),children:["+",Ds(x,0)]}),g="number-left"}return p?s.jsx("li",{className:S("contributor",g),children:p},f):null})}),r&&s.jsx("span",{className:"label",children:typeof r=="string"?r:n.length===1?typeof n[0]=="string"?c.formatMessage({id:`member_${n[0]}`}):jt(n[0].name||"",20):null})]})})},$n=({showDevTools:e=!0,children:t})=>{const n=new X.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e4}}});return s.jsxs(X.QueryClientProvider,{client:n,children:[t,e&&s.jsx(hs.ReactQueryDevtools,{initialIsOpen:!1})]})};var ar=h.createContext({client:ze});function ir(e){var t=e.children,n=e.client,r=e.apiKey,o=e.options,l=h.useMemo(function(){return n&&r&&console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."),n&&o&&console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."),n||(r&&(ze.__loaded&&console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."),ze.init(r,o)),ze)},[n,r]);return h.createElement(ar.Provider,{value:{client:l}},t)}const Mn=({children:e,user:t})=>t.isLoading?s.jsx(s.Fragment,{}):process.env.REACT_APP_PUBLIC_POSTHOG_KEY?s.jsx(ir,{apiKey:atob(process.env.REACT_APP_PUBLIC_POSTHOG_KEY),options:{api_host:"https://eu.posthog.com",autocapture:!1,secure_cookie:!0,bootstrap:{distinctID:t.id||"00000000-0000-0000-0000-000000000000",isIdentifiedID:!!t.id}},children:e}):e,Cn=({children:e,locale:t,messages:n})=>{const r=t||"en",o={...Rs[r],...n||{}};return s.jsx(M.IntlProvider,{locale:r,messages:o,children:e})},he=h.createContext(null),An=({children:e,user:t})=>s.jsx(he.Provider,{value:t,children:e}),lr=({bootstrap:e,children:t,intl:n})=>{const[r,o]=h.useState({isLoading:!0});return h.useEffect(()=>{e().then(l=>o({...l,isLoading:!1})).catch(()=>o({isLoading:!1}))},[]),s.jsx(Cn,{locale:n==null?void 0:n.locale,messages:n==null?void 0:n.messages,children:s.jsx(An,{user:r,children:s.jsx($n,{children:s.jsx(Mn,{user:r,children:t})})})})};const ct="joinCommunityButton",Ct=({isMember:e=!1,isShort:t=!1,functions:{join:n,leave:r}={join:()=>{},leave:()=>{}}})=>{const o=M.useIntl(),l=h.useContext(he),d=l&&typeof l.id=="string",[a,i]=h.useState(e),[c,u]=h.useState(e?"joined":"notJoined");h.useEffect(()=>{c==="joining"?u("joined"):c==="leaving"&&u("notJoined")},[a]);const f={},p={};return a&&c!=="leaving"&&(f["data-hover-text"]=o.formatMessage({id:`${ct}_leave`}),f["aria-label"]=o.formatMessage({id:`${ct}_member_aria`}),p["aria-hidden"]="true"),s.jsx(Q,{variant:a?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:a&&c!=="leaving"?{icon:"tick",position:"left"}:!1,onClick:async g=>{d&&(g.currentTarget.blur(),a?(u("leaving"),typeof r=="function"&&await r()):(u("joining"),typeof n=="function"&&await n()),i(!a))},className:S("join-community-button",c,{active:c==="joining"}),disabled:!d,...f,children:s.jsx("span",{className:"text",...p,children:o.formatMessage({id:`${ct}${["joining","leaving"].includes(c)?`_${c}`:a?"_member":t?"_short":""}`})})})};const ut="communityDetails_",cr=({isMember:e=!1,slug:t,members:{number:n,data:r}={number:void 0,data:[]},className:o="",...l})=>{const d=M.useIntl(),a=n||(r==null?void 0:r.length)||0;return s.jsxs("div",{className:S("community-details",o),children:[s.jsx(ye,{}),s.jsxs("div",{className:"member-details",children:[s.jsxs("div",{className:"top",children:[s.jsxs("h3",{children:[d.formatMessage({id:`${ut}members`}),s.jsx("span",{className:"count",children:a})]}),s.jsx("p",{className:"text-small",children:s.jsx("a",{href:`/communities/${t}/members`,children:d.formatMessage({id:`${ut}viewAll`})})})]}),s.jsx(Tn,{contributors:{total:n,data:r!=null&&r.length?r:[{},{},{},{},{}]},styling:{size:"medium",showGap:!0,showPlaceholders:a===0},cutoff:5})]}),s.jsx(Ct,{isMember:e,...l}),e&&s.jsx(Q,{variant:"primary",icon:{icon:"plus"},styling:{fullWidth:!0},children:d.formatMessage({id:`${ut}invite`})})]})};const ur=({breadcrumbs:e,cutoff:t=20,className:n=""})=>{const r=M.useIntl();return s.jsxs(s.Fragment,{children:[s.jsx(K,{element:"p",children:r.formatMessage({id:"breadcrumbs_label"})}),s.jsx("ul",{className:S("breadcrumbs text-small",n),children:e.map(({text:o,href:l,current:d=!1},a)=>s.jsxs("li",{children:[d&&s.jsx(K,{element:"span",children:r.formatMessage({id:"breadcrumbs_currentPage"})}),s.jsx(Ne,{href:d?void 0:l,children:jt(o,t)})]},`${window.btoa(o)}_${a}`))})]})};const dr=({options:e,allOption:t=!1,allowMultiple:n=!0,onChange:r=()=>{},className:o=""})=>{const l=M.useIntl(),d=t?[{id:"all",text:typeof t!="boolean"&&t.text||l.formatMessage({id:"filters_all"})},...e]:e,[a,i]=h.useState(t?["all"]:[]),c=(u,f)=>{let p=[];a.includes(u)?p=a.filter(g=>g!==u):u==="all"?p=["all"]:n?p=[...a.filter(g=>g!=="all"),u]:p=[u],i(g=>(r&&typeof r=="function"&&r({current:p,previous:g}),p)),f&&typeof f=="function"&&f()};return s.jsx("ul",{className:S("filters",o),children:d.map(({id:u,text:f,disabled:p=!1,callback:g=()=>{}})=>{let x={};return p&&(x={disabled:!0,"aria-label":l.formatMessage({id:"filters_disabled"},{name:f})}),s.jsx("li",{children:s.jsx("button",{className:S(u,{selected:a.includes(u)}),onClick:b=>{b.preventDefault(),b.stopPropagation(),c(u,g)},...x,children:f})},u)})})},mr=(e,t)=>{const n=String(e);if(!t||!t.length)return`/${n}`;let r="";return t.forEach(({url:o,position:l})=>{l==="before-lang"?r+=`/${o}`:(r.includes(`/${n}/`)||(r+=`/${n}`),r+=`/${o}`)}),r.includes(`/${n}/`)||(r+=`/${n}`),r};const dt={en:"English",es:"Español",fr:"Français",pt:"Português"},Le="languageSwitcher_",fr=({currentLanguage:e,isOriginalLanguage:t=!1,isHumanTranslation:n=!1,translations:r,onChange:o=()=>{},urlParts:l,variant:d="default",label:a,className:i=""})=>{const c=M.useIntl(),[u,f]=h.useState(e);if(h.useEffect(()=>{e!==u&&f(e)},[e]),!r||!Object.values(r).some(b=>b&&b.post_name))return null;const g=Object.keys(r),x=u!==e;return s.jsxs("div",{className:S("language-switcher text-small",d,i),children:[s.jsxs("nav",{children:[d!=="short"&&s.jsx("p",{children:a||c.formatMessage({id:`${Le}label`})}),s.jsx("ul",{children:g.map(b=>{if(!dt[b])return null;let _={className:b};return u===b?_["aria-label"]=c.formatMessage({id:`${Le}selected`},{language:dt[b]}):_={..._,href:mr(b,l),onClick:E=>{E.preventDefault(),E.stopPropagation(),f(b),o(b)}},s.jsx("li",{children:s.jsx(Ne,{..._,fallbackElement:"span",children:dt[b]})},b)})}),d!=="short"&&!x&&s.jsx("p",{children:c.formatMessage({id:`${Le}translation_${t?"original":n?"human":"machine"}`})})]}),d!=="short"&&!x&&!t&&!n&&s.jsx("small",{children:c.formatMessage({id:`${Le}disclaimer`},{email:be.support,link:b=>{const _=`mailto:${b}`;return s.jsx("a",{href:_,children:b})}})})]})};const mt=M.createIntl({locale:"en",messages:Et}),Nn=({page:e=1,length:t=0,limit:n=10,loadNextPage:r=()=>{},icon:o=!1,messages:l={button:mt.formatMessage({id:"loadMore_button"}),endOfFeed:mt.formatMessage({id:"loadMore_endOfFeed"}),error:mt.formatMessage({id:"loadMore_error"})},className:d="",gtmContext:a="LoadMore"})=>{const[i,c]=h.useState(!1),[u,f]=h.useState(!1);if(t<=0||t<n*e)return null;const p=async g=>{try{await r(g)}catch(x){x instanceof Error&&x.message&&x.message.includes("Cannot read items")?f(!0):c(!0)}};return s.jsxs("footer",{className:S("load-more",d),children:[i&&s.jsx("p",{className:"error",children:l.error}),u?s.jsx("p",{children:l.endOfFeed}):s.jsx(Q,{variant:"secondary",icon:o,onClick:p,"data-gtm-event-context":a,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:l.button})]})};let He=!1;const Fn=({element:e="div",id:t="more-menu",options:n,className:r=""})=>{const o=M.useIntl(),l=h.useRef(null),[d,a]=h.useState(!1),i=c=>{l.current&&c.target instanceof HTMLElement&&!l.current.contains(c.target)&&a(!1)};return h.useEffect(()=>(document.addEventListener("click",i,!0),()=>{document.removeEventListener("click",i,!0)})),h.createElement(e,{ref:l,className:S("more-menu text-medium",r),children:s.jsxs(s.Fragment,{children:[s.jsx(Q,{variant:"tertiary",size:"medium",icon:{icon:"ellipsis"},onClick:()=>a(!d),"aria-haspopup":"true","aria-expanded":d,"aria-controls":t,screenreaderText:o.formatMessage({id:"moreMenu"})}),s.jsx("ul",{id:t,hidden:!d,children:n.map(({href:c,onClick:u,text:f,icon:p,...g},x)=>{const b={...g,onClick:_=>{a(!1),typeof u=="function"&&u(_)},onFocus:()=>{He&&(clearTimeout(He),He=!1)},onBlur:()=>{He=setTimeout(()=>{a(!1)},100)}};return c&&(b.href=c),s.jsx("li",{children:s.jsx(Q,{variant:"tertiary",size:"medium",icon:p?{icon:p,position:"left"}:!1,...b,children:f})},`${window.btoa(f)}_${x}`)})})]})})};const At=({variant:e="default",version:t="default",className:n="",...r})=>s.jsx("p",{className:"logo-wrapper",children:s.jsx("a",{href:"/home/",className:S("logo",e,t,n),...r,children:s.jsx(K,{children:s.jsx(M.FormattedMessage,{id:"apolitical"})})})});const pr={"2-1":901},hr=({layout:e="2-1",hideOnMobile:t=!1,className:n="",children:r})=>{const o=Ce(!0);let l=r;return h.Children.count(r)===1&&(l=h.Children.toArray(r)[0],l.props&&(l=l.props.children)),s.jsx("section",{className:S("columns",`layout-${e}`,n),children:h.Children.map(l,(d,a)=>t!==!1&&a===t&&o&&o<pr[e]?null:d)})};const ft="cookieBanner_",pt=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],ht=new Date(Date.now()+12*30*24*60*60*1e3),Pn=()=>{const e=M.useIntl(),[t,n,r]=ln.useCookies(pt),[o,l]=h.useState(!t["apol-cookie-banner"]),d=()=>{pt.forEach(u=>{n(u,!0,{path:"/",expires:ht,domain:u==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),l(!1),window.location.reload()},a=()=>{n("apol-cookie-banner",!0,{path:"/",expires:ht}),pt.forEach(u=>{if(u==="apol-cookie-banner"){n(u,!0,{path:"/",expires:ht});return}r(u)}),l(!1)};if(!o)return null;const i=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:a,gtmType:"reject-all"},{id:"accept",onClick:d,gtmType:"accepted-all"}],c=[];return i.forEach(u=>{c.push({variant:u.href?"tertiary":"primary",href:u.href,onClick:u.onClick,className:"gtm-trackable","data-gtm-event-context":"cookie-banner","data-gtm-event-type":`cookie-${u.gtmType}-click`,children:e.formatMessage({id:`${ft}buttons_${u.id}`})})}),s.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[s.jsx("h6",{children:e.formatMessage({id:`${ft}title`})}),s.jsx("p",{children:e.formatMessage({id:`${ft}text`})}),s.jsx(Ae,{buttons:c})]})},fe={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:be["data-protection"].default,gtmType:"email-dpo-link"},euDataProtection:{email:be["data-protection"].eu,gtmType:"email-eu-dpo-link"}}},contact:{text:{order:["correspondence","registered","berlin","support","business"],correspondence:{address:!0},registered:{address:!0},berlin:{address:!0},support:{email:be.support,gtmType:"concierge-email-click"},business:{email:be.general,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 we="footer_",Ge="SiteFooter",rn=({group:e})=>{const t=fe[e].order||[];let n=!1;return"text"in fe[e]&&(n=fe[e].text),s.jsxs(h.Fragment,{children:[s.jsx("p",{className:"pre-title",children:s.jsx(M.FormattedMessage,{id:`${we}${e}`})}),Array.isArray(t)&&t.length>0&&s.jsx("ul",{className:"text-medium",children:t.map(r=>{if(["order","child","text"].includes(r))return null;const{href:o,gtmType:l}=fe[e][r],d={};return["legal"].includes(e)&&(d.target="_blank",d.rel="noopener"),s.jsx("li",{children:s.jsx("a",{href:o,className:"gtm-trackable","data-gtm-event-context":Ge,"data-gtm-event-type":l,...d,children:s.jsx(M.FormattedMessage,{id:`${we}${e}_${r}`})})},`${e}_${r}`)})}),typeof n!="boolean"&&"order"in n&&Array.isArray(n.order)&&s.jsx("dl",{className:"text-medium",children:n.order.map(r=>s.jsxs(h.Fragment,{children:[s.jsx("dt",{children:s.jsx(M.FormattedMessage,{id:`${we}${e}_${r}`})}),s.jsxs("dd",{children:[typeof n!="boolean"&&n[r].address&&s.jsx("address",{children:s.jsx(M.FormattedMessage,{id:`${we}${e}_${r}_address`,values:{br:s.jsx("br",{})}})}),typeof n!="boolean"&&n[r].email&&s.jsx("a",{href:`mailto:${n[r].email}`,className:"gtm-trackable","data-gtm-event-context":Ge,"data-gtm-event-type":n[r].gtmType,children:n[r].email})]})]},`dl-${e}-${r}`))})]},e)},Nt=()=>s.jsx("div",{id:"footer",children:s.jsxs("div",{className:"wrapper",children:[s.jsx(St,{element:"hr"}),s.jsx(At,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":Ge,"data-gtm-event-type":"logo-homepage-link"}),s.jsx("footer",{children:["platform","community","company","contact"].map(e=>s.jsxs("div",{className:"group",children:[s.jsx(rn,{group:e}),Object.keys(fe[e]).includes("child")&&s.jsx(rn,{group:fe[e].child})]},e))}),s.jsx("hr",{}),s.jsxs("div",{className:"sub-footer",children:[s.jsx("ul",{children:Array.isArray(fe.social.order)&&fe.social.order.map(e=>{const t=fe.social[e];return s.jsx("li",{className:e,children:s.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":Ge,"data-gtm-event-type":"social-click",children:s.jsx("span",{className:"hidden",children:s.jsx(M.FormattedMessage,{id:`${we}social_${e}`})})})},e)})}),s.jsx("small",{children:s.jsx(M.FormattedMessage,{id:`${we}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});const Qe="emailHelperTextBox_",gr=({type:e,email:t,redirectPath:n,resendVerificationCode:r})=>{const o=M.useIntl(),[l,d]=h.useState({path:`${Qe}default`,type:"default",link:{},mail:{},error:""}),[a,i]=h.useState(!1),c=h.useCallback(g=>{g.preventDefault(),g.stopPropagation();const x=b=>{d({path:`${Qe}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:_=>c(_),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 r!="function"){x(o.formatMessage({id:`${Qe}error_noFunction`}));return}i(!0),r(t).then(()=>{localStorage.setItem("email",t),window.location.href=n||"/signup/verify-email"}).catch(b=>{x(b.message)}).finally(()=>{i(!1)})},[t,n,r]);h.useEffect(()=>{let g=Qe,x="default",b={},_={};switch(e){case"gov":g+="autoApproved",x="success";break;case"nonGov":g+="unrecognisedEmail",x="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":g+="pendingApproval",x="error",_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":g+="emailUnverified",x="error",b={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:E=>c(E),"data-testid":"send-verify-email-click"};break;case"exists":g+="emailAlreadyExists",x="error",b={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:g+="default",b={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}d({...l,path:g,type:x,link:b,mail:_})},[e]);const u={};return["link","mail"].forEach(g=>{u[g]=Object.keys(l[g]).length?x=>s.jsx("a",{...l[g],children:x}):x=>x}),s.jsx(bn,{type:l.type,heading:a?!1:o.formatMessage({id:`${l.path}_title`}),children:a?s.jsxs(s.Fragment,{children:[s.jsx(ce,{element:"span"}),s.jsx(ce,{element:"span"})]}):o.formatMessage({id:`${l.path}_text`},{...u,strong:g=>s.jsx("strong",{children:g}),em:g=>s.jsx("em",{children:g}),br:s.jsxs(s.Fragment,{children:[s.jsx("br",{}),s.jsx("br",{})]}),error:l.error})})};const Ue="passwordRules_",Rn="isMoreThanEightCharacters",Dn="includesNumberAndSymbol",In="includesLowerAndUppercase",_r={[Rn]:"8Characters",[Dn]:"numberSymbol",[In]:"lowercaseUppercase"},xr=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const n=M.useIntl();return s.jsxs("aside",{className:S("password-rules",t),children:[s.jsx("small",{children:n.formatMessage({id:`${Ue}intro`})}),s.jsx("ul",{children:[Rn,Dn,In].map(r=>s.jsxs("li",{className:S({matches:e[r]}),children:[s.jsxs(K,{children:[n.formatMessage({id:`${Ue}rule_label`})," "]}),s.jsx("span",{children:n.formatMessage({id:`${Ue}rule_${_r[r]}`})}),!e[r]&&s.jsxs(K,{element:"strong",children:[" "," ",n.formatMessage({id:`${Ue}notMet`})]})]},`rule-${r}`))})]})},vr=h.memo(xr);const br=({text:e={},topRating:t=5,functions:{createRating:n=()=>null,updateRating:r=()=>{},reportError:o=()=>{}},className:l="",hasLoaded:d=!1})=>{const a=M.useIntl(),[i,c]=h.useState({setUp:!1,id:null,rating:null,disabled:!0}),u=async()=>{try{const E=await n();c(v=>({...v,setUp:!0,id:E&&E.id,disabled:!1}))}catch(E){c(v=>({...v,setUp:!0,disabled:!0})),o(E)}};if(h.useEffect(()=>{d&&!i.setUp&&u()},[d]),!d)return s.jsx(ce,{className:"rating-placeholder"});const{id:f,rating:p,disabled:g}=i,x="ratings_",b={text:a.formatMessage({id:`${x}text`}),low:a.formatMessage({id:`${x}low`}),high:a.formatMessage({id:`${x}high`}),success:a.formatMessage({id:`${x}success`}),...e},_=async E=>{if(!(!f||g))try{c(v=>({...v,rating:E,disabled:!0})),await r({id:f,value:E})}catch(v){c($=>({...$,rating:null})),o(v)}finally{c(v=>({...v,disabled:!1}))}};return s.jsxs("div",{className:S("rating",l),children:[s.jsx("span",{className:"label",children:b[p?"success":"text"]}),s.jsx("ol",{children:Array.from(new Array(t).keys()).map(E=>{const v=E+1;return s.jsx("li",{className:S({selected:p&&v<=p}),children:s.jsx(Q,{variant:"tertiary",size:"small",icon:{icon:`star${!p||v>p?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${a.formatMessage({id:`${x}stars`},{number:v,total:t})}${v===1||v===t?` - ${b[v===1?"low":"high"]}`:""}`,onClick:$=>{$.preventDefault(),$.stopPropagation(),_(v)},disabled:g})},`rating-${v}`)})})]})};const Bn=({id:e="search",className:t="",handleToggle:n=!1,defaultValue:r="",gtmContext:o="search-bar",gtmEvent:l="form-submission"})=>{const{searchIsOpen:d=!0,isDesktopVersion:a=!1}=n||{},i=M.useIntl(),c=h.useRef(null);_e(()=>{!n||a||!d||c.current&&c.current.focus()},[d]);const u=f=>{f.preventDefault(),f.stopPropagation(),!(!c.current||!c.current.value||c.current.value.length<1)&&(window.location.href=`/search?search=${encodeURIComponent(c.current.value)}`)};return s.jsx("form",{onSubmit:u,className:S("search-form gtm-trackable",t),"data-gtm-event-context":o,"data-gtm-event-type":l,children:s.jsx("fieldset",{id:`${e}-form`,hidden:n?!d:!1,role:"search",children:s.jsxs("p",{children:[s.jsx(K,{element:"label",htmlFor:e,children:i.formatMessage({id:"search_label"})}),s.jsx("input",{ref:c,type:"search",id:e,name:e,defaultValue:r,placeholder:i.formatMessage({id:"search_placeholder"}),onKeyDown:f=>{f.key==="Enter"&&u(f)}}),s.jsx("button",{className:"clear",onClick:f=>{f.preventDefault(),f.stopPropagation(),c.current&&c.current.value&&(c.current.value="")},children:s.jsx(K,{children:i.formatMessage({id:"search_clear"})})}),s.jsx("button",{className:"search",onClick:u,children:s.jsx(K,{children:i.formatMessage({id:"search_cta"})})})]})})})};const On=({title:e,label:t,ctaMessage:n,titleColor:r,labelColor:o,backgroundColor:l,onClose:d,reportError:a,sendInvites:i,initialFormStatus:c="NOT_SUBMITTED"})=>{const[u,f]=h.useState([]),[p,g]=h.useState(!0),[x,b]=h.useState(c),{formatMessage:_}=M.useIntl(),E=async C=>{C.preventDefault();try{await i(u),f([]),b("SUCCESS")}catch(A){b("ERROR"),a(A)}},v=C=>{C.preventDefault(),b("NOT_SUBMITTED"),g(!0),f([])},$=C=>{C.preventDefault(),d(),b("CLOSED")};return x==="CLOSED"?null:x==="ERROR"||x==="SUCCESS"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"content centred",children:x==="SUCCESS"?s.jsx("h2",{className:"success-title",children:_({id:"inviteForm_success"})}):s.jsxs("h2",{className:"error-title",children:[" ",_({id:"inviteForm_error"})]})}),s.jsx(ye,{}),s.jsx("div",{className:"footer",children:x==="SUCCESS"?s.jsxs(s.Fragment,{children:[s.jsx(Q,{variant:"secondary",onClick:v,children:_({id:"inviteForm_ctaSendMoreInvites"})}),s.jsx(Q,{onClick:$,children:_({id:"inviteForm_ctaDone"})})]}):s.jsx(Q,{onClick:v,children:_({id:"inviteForm_ctaTryAgain"})})})]}):s.jsxs("form",{style:{backgroundColor:l},onSubmit:E,className:S("invite-form gtm-trackable"),children:[s.jsxs("fieldset",{className:"content",children:[s.jsx("h2",{className:"title",style:{color:r},children:e}),s.jsx("label",{htmlFor:"email-input",className:"label",style:{color:o},children:t}),s.jsx(gs.ReactMultiEmail,{id:"email-input",inputClassName:"email-input input",placeholder:_({id:"inviteForm_email_placeholder"}),emails:u,onChange:C=>{f(C),g(!C.length)},autoFocus:!1,getLabel:(C,A,H)=>s.jsxs("div",{className:"email text-medium",children:[s.jsx("div",{"data-tag-item":!0,children:C}),s.jsx(Q,{variant:"tertiary",size:"small",icon:{icon:"close"},onClick:()=>{H(A),g(!u.length)},className:"remove-email-button",screenreaderText:_({id:"overlay_close"})})]},A)})]}),s.jsx(ye,{}),s.jsx("fieldset",{className:"footer",children:s.jsx(Q,{className:"sendEmailsButton",disabled:p,children:n})})]})},O={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const n={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},r=l=>{const d=`logged${e?"In":"Out"}`;return t>=n[l][d]};let o={};return["navigation","search"].forEach(l=>{o[l]=r(l)}),o},shouldChangeHeaderIsVisible:(e,t,n)=>{Object.values(t).filter(o=>o===!0).length||n([{type:"headerIsVisible",value:e}])},handleMenus:({id:e,value:t,menus:n,dispatch:r})=>{if(n[e]===t||e==="account"&&t===!1&&n.navigation===!0)return;const o=Date.now();if(!t&&O.handlerCalled[e]&&o-O.handlerCalled[e]<500)return;O.handlerCalled[e]=o;let l=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(n).forEach(d=>{d===e||n[d]===!1||l.push({type:`menus.${d}`,value:!1})}),r(l)},findFirstChild:(e,t,n=!1)=>{if(!e||!e[0])return!1;for(let r=0;r<=e.length;r++){if(!e[r])continue;if(e[r][t]&&(!n||e[r][t].includes(n)))return e[r];if(!t.includes("."))continue;const o=cn(e[r],t);if(!(typeof o>"u")&&(!n||o[t]&&o[t].includes(n)||o.value&&o.value.includes(n)||o.toString().includes(n)))return e[r]}return e[0].children?O.findFirstChild(e[0].children,t,n):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:n,focusElements:r,dispatch:o})=>{if(!t.current||!t.current.children)return;const l=n?"desktop":"default";if(r[e][l]){r[e][l].focus();return}let d,a;switch(e){case"navigation":if(n){const i=O.findFirstChild(t.current.children,"attributes.aria-controls","navigation");d=O.findFirstChild(i.children,"href")}else d=O.findFirstChild(t.current.children,"href");d||(d=t.current);break;case"account":if(a=O.findFirstChild(t.current.children,"className","account"),!a||!a.children)return;d=O.findFirstChild(a.children,"href");break;default:return}d&&(o([{type:`focusElements.${e}.${l}`,value:d}]),d.focus())},events:{onClick:(e,{id:t,callback:n,isOpen:r})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(O.timeouts[t]),n(t,!r))},onFocus:({id:e})=>{clearTimeout(O.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(O.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{O.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},Me={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"}}}},Je=({id:e,isLoggedIn:t=!1,isDesktopVersion:n=!1,menus:r={},callback:o=()=>{},doTrack:l=null})=>{const d=M.useIntl(),a=cn(Me,e);if(!a||a.onlyShow&&(a.onlyShow==="logged-in"&&!t||a.onlyShow==="logged-out"&&t))return null;const i="doTrack"in a,c=l===null?i?a.doTrack:!0:l,u=e.includes("buttons.");let f=`header_${e.replaceAll(".","_")}`;a.hasVariantText&&(f+=`_logged${t?"In":"Out"}`);let p=!1;if(a.href){let v=a.gtmType||`${e}-click`;if(v.includes(".")){const $=v.split("."),C=$[$.length-2];v=`${C==="topics"?`${C}-`:""}${$[$.length-1]}`}p={href:a.href,role:"menuitem"},c&&(p={...p,className:"gtm-trackable","data-gtm-event-type":v,"data-gtm-event-context":"HeaderButtons"}),u&&(p={...p,variant:"secondary",size:{mobile:"small",881:"large"},...a.props||{}})}const g=a.order&&a.order[0]&&a[a.order[0]],x=g&&a[a.order[0]].order,b=p&&window.location.pathname===a.href;let _={},E={};if(g){const v=a.menuId||e,$={onClick:C=>O.events.onClick(C,{id:v,callback:o,isOpen:r[v]}),onFocus:()=>O.events.onFocus({id:v}),onBlur:()=>O.events.onBlur({id:v,callback:o}),onMouseLeave:()=>O.events.onBlur({id:v,callback:o}),onMouseEnter:()=>O.events.onMouseEnter({id:v,callback:o})};n&&(x&&(_={...$,onKeyPress:C=>{C.key==="Enter"&&O.events.onClick(C,{id:v,callback:o,isOpen:r[v]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":r[v],"aria-controls":v}),E={hidden:v in r?!r[v]:!0}),x||(E={...E,...$})}return s.jsxs("li",{className:S({[a.className]:a.className,"has-submenu":g,parent:x,active:b}),role:"none",..._,children:[p?h.createElement(u?Q:"a",p,d.formatMessage({id:f})):d.formatMessage({id:f}),a.order&&s.jsx("ul",{...E,children:a.order.map(v=>{if(!a[v])return null;const $={isLoggedIn:t,isDesktopVersion:n,menus:r,callback:o,doTrack:i?c:null};return a[v].order?s.jsxs("li",{className:S({[a[v].className]:a[v].className}),children:[d.formatMessage({id:`${f}_${v}`}),s.jsx("ul",{children:a[v].order.map(C=>s.jsx(Je,{id:`${e}.${v}.${C}`,...$},C))})]},v):s.jsx(Je,{id:`${e}.${v}`,...$},v)})})]},e)};const wr={height:67,height_desktop:83},Ft=()=>{const e=M.useIntl(),t=h.useContext(he),n=Ce(!0,!0),r=t&&typeof t.id=="string",o=h.useMemo(()=>O.getIsDesktopVersion(r,n),[r,n]),[l,d]=h.useReducer($s,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:a,menus:i,focusElements:c}=l;fn({scrollPosition:wr[`height${o.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!o&&i.navigation||O.shouldChangeHeaderIsVisible(!0,i,d)},scrollDown:()=>{!o&&i.navigation||O.shouldChangeHeaderIsVisible(!1,i,d)}}});const u=(p,g)=>{O.handleMenus({id:p,value:g,menus:i,dispatch:d})},f=h.useRef(null);return _e(()=>{i.navigation&&O.autoFocus({menu:"navigation",navigationRef:f,isDesktopVersion:o.navigation,focusElements:c,dispatch:d})},[i.navigation]),_e(()=>{i.account&&O.autoFocus({menu:"account",navigationRef:f,isDesktopVersion:o.navigation,focusElements:c,dispatch:d})},[i.account]),t&&t.isLoading?null:s.jsxs(s.Fragment,{children:[s.jsxs("nav",{id:"header",className:S({"logged-in":r,"logged-out":!r,visible:a}),children:[s.jsx(K,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),s.jsx(At,{}),!o.navigation&&s.jsx("button",{className:"menu-button gtm-trackable",onClick:p=>{p.preventDefault(),p.stopPropagation(),u("navigation",!i.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":i.navigation,"aria-controls":"navigation",children:s.jsx(K,{children:e.formatMessage({id:`header_menu_${i.navigation?"hide":"show"}`})})}),s.jsx("ul",{ref:f,id:"navigation",hidden:o.navigation||i.account?!1:!i.navigation,role:"menu","data-showing":!o.navigation&&i.account?"account":"default",children:Me.order.map(p=>s.jsx(Je,{id:p,isLoggedIn:r,isDesktopVersion:o.navigation,menus:{navigation:i.navigation,account:i.account},callback:u},p))}),!o.search&&s.jsx("button",{className:"search toggle-search-button",onClick:p=>{p.preventDefault(),p.stopPropagation(),u("search",!i.search)},"aria-haspopup":"true","aria-expanded":i.search,"aria-controls":"search-form",children:s.jsx(K,{children:e.formatMessage({id:`header_search_${i.search?"hide":"show"}`})})}),s.jsx(Bn,{id:"global-search",handleToggle:{searchIsOpen:i.search,isDesktopVersion:o.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),r?s.jsxs("button",{className:"account-button",onClick:p=>O.events.onClick(p,{id:"account",callback:u,isOpen:i.account}),onMouseEnter:()=>O.events.onMouseEnter({id:"account",callback:u}),onMouseLeave:()=>O.events.onBlur({id:"account",callback:u}),"aria-haspopup":"true","aria-expanded":i.account,"aria-controls":"navigation",children:[s.jsx(K,{children:e.formatMessage({id:`header_account_${i.account?"hide":"show"}`})}),s.jsx(Xe,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):s.jsx("ul",{className:"sign-in-buttons",children:Me.buttons.order.map(p=>s.jsx(Je,{id:`buttons.${p}`},p))})]}),s.jsx("hr",{id:"content-of-page"}),s.jsx("div",{className:S("overlay",{open:i.navigation||i.account||!o.search&&i.search})})]})};const yr=()=>{const e=M.useIntl();return s.jsxs(s.Fragment,{children:[s.jsx(Ft,{}),s.jsx("div",{className:"content",children:s.jsx(Fe,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),s.jsx(Nt,{})]})},kr=({children:e,reportError:t,showFooter:n=!0,background:r="default",className:o="",locale:l="en"})=>{const d=dn();h.useEffect(()=>{window.scrollTo(0,0)},[d]);const a=gn(e,{locale:l});return s.jsx(_s.ErrorBoundary,{onError:t,fallback:s.jsx(yr,{}),children:s.jsx(h.Suspense,{fallback:s.jsx(Sn,{layout:"overview-page"}),children:s.jsx("div",{id:"wrapper",className:S(o,{[r]:r!=="default"}),children:s.jsxs(ln.CookiesProvider,{children:[s.jsx(Ft,{}),s.jsx("div",{className:"content",children:a}),n&&s.jsx(Nt,{}),s.jsx(Pn,{})]})})})})},on={default:"tags_",headerTopics:"header_topics_topics_"},gt={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"},jr={getTagDetails:e=>{if(e.includes("topic_")){if(e=gt.topic[e.replace("topic_","")],e){const t=Me.topics.topics[e].href;return t?{id:e,href:t,text:`${on.headerTopics}${e}`}:null}return null}return gt[e]?(e=gt[e],{id:e,text:`${on.default}${e}`}):null}};const Sr=({tags:e=[],color:t="default",forceOneLine:n=!1,canHaveLinks:r=!0,className:o="",gtmType:l="tag-click",gtmContext:d="tags"})=>{const a=M.useIntl();if(!e||e.length<1)return null;const i=[];return e.forEach(c=>{if(!c)return;const u=jr.getTagDetails(c);u&&i.push(u)}),i.length<1?null:s.jsx("ul",{className:S("tags text-small",t,o,{"one-line":n}),children:i.map(c=>{const u=a.formatMessage({id:c.text});return s.jsx("li",{children:c.href&&r?s.jsx("a",{href:c.href,className:"gtm-trackable","data-gtm-event-type":l,"data-gtm-event-context":d,children:u}):u},c.id)})})};const Er=({members:{total:e,data:t=[]},pagination:n,gtmContext:r="member",gtmType:o="member-click",className:l=""})=>{const d=M.useIntl();return t.length===0?null:(e||(e=t.length),s.jsxs("div",{className:S("members-list",l),children:[s.jsxs("h1",{children:[d.formatMessage({id:"membersList"}),s.jsx("span",{className:"count",children:e})]}),s.jsx("ul",{children:t.map((a,i)=>s.jsxs("li",{children:[s.jsx(Ze,{member:a,gtmContext:r,gtmType:o}),a.isAdmin&&s.jsx(yn,{children:d.formatMessage({id:"membersList_admin"})})]},i))}),n&&s.jsx(Nn,{...n,icon:{icon:"arrow-down",position:"right"},gtmContext:r})]}))};let We=null;const se="discussion_form_",Pt=({content:e={type:"response",slugs:{}},userHasPermissions:t=!0,meta:n={isLoading:!1,isInWrapper:!1,isEditing:!1,showTitle:!1},inputRef:r,maxLength:o=5e4,minRows:l=4,forceShow:d={cancel:!1,error:!1},functions:a={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:i="DiscussionForm"})=>{var P,q;const c=M.useIntl(),u=h.useContext(he),[f,p]=h.useState(n.isEditing&&n.isEditing.text||""),[g,x]=h.useState(d.error||!1),[b,_]=h.useState(!1),E=h.useRef(null);if(r||(r=E),n.isLoading)return s.jsx(ce,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const v=k=>{const z=k.target.value;p(z);let R;!u||!u.id?R=le(c.formatMessage,`${se}error_loggedOut`,e.type,"action"):t?z.length>=o&&(R=`${se}error_tooLong`):R=le(c.formatMessage,`${se}error_noPermission`,e.type,"action"),R?x(R):g&&x(!1)};let $=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const k=e.type==="response"?((P=e.slugs)==null?void 0:P.question)||"":((q=e.slugs)==null?void 0:q.answer)||"";k&&($=`${$}-${k.slice(-15)}`)}const C=async k=>{var R;if(k.preventDefault(),k.stopPropagation(),!u||!u.id||!t||H)return;We&&clearTimeout(We),_("submitting");const z=window.location.pathname;try{let B;switch(e.type){case"post":B=await a.create({content:f});break;case"question":B=await a.create({title:f,authorId:u&&u.id,...(R=a.props)==null?void 0:R.create});break;case"response":B=await a.create({question:e.slugs.question},{body:f,authorId:u&&u.id,contentPath:z});break;case"reply":B=await a.create({question:e.slugs.question,answer:e.slugs.answer},{body:f,authorId:u&&u.id,contentPath:z});break;default:break}await As(1e3),a.callback&&await a.callback(B),We=setTimeout(()=>{p(""),_("submitted"),A()},500)}catch(B){const U=B;let Y=`${se}error`;U.message.includes("entry already exists")&&(Y=le(c.formatMessage,`${se}error_alreadyExists`,e.type,"action")),U.message.includes("429")?Y=le(c.formatMessage,`${se}error_tooMany`,e.type,"action"):U.message.includes("400")&&(Y=`${se}error`),x(Y),A()}},A=()=>{We=setTimeout(()=>{x(!1),_(!1)},5e3)},H=!f||!Is(f),V=b==="submitting",y=[];return(n.isEditing&&!V||d.cancel)&&y.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:a.handleCancel,className:"gtm-trackable","data-gtm-event-context":i,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!d.cancel&&(!u||!u.id||!f),children:c.formatMessage({id:`${se}cancel`})}),y.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:k=>{if(n.isEditing){_("submitting"),a.handleSaveEdit&&a.handleSaveEdit(E.current&&"value"in E.current?E.current.value:"");return}C(k)},className:"gtm-trackable","data-gtm-event-context":i,"data-gtm-event-type":`${n.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!u||!u.id||!t||H||V||n.isEditing&&f===n.isEditing.text,children:c.formatMessage({id:`${se}${V?n.isEditing?"saving":"posting":n.isEditing?"save":"post"}`})}),s.jsxs("form",{id:$,className:S("discussion-card discussion-form",{"no-styling":n.isInWrapper&&n.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[(n==null?void 0:n.showTitle)&&!n.isEditing&&["question"].includes(e.type)&&s.jsx("h2",{children:le(c.formatMessage,`${se}title`,e.type,"action")}),s.jsx(Ze,{member:u||"community",gtmContext:i,gtmType:"profile-click"}),s.jsx(K,{element:"label",showOnFocus:!1,htmlFor:`${$}-input`,children:le(c.formatMessage,`${se}label`,e.type,"action")}),s.jsx(xs,{ref:r,id:`${$}-input`,name:e.type,placeholder:le(c.formatMessage,`${se}placeholder`,e.type,"action"),onChange:v,value:f,maxLength:o,"aria-invalid":!!g,"aria-errormessage":"error-message",minRows:l,autoFocus:!!n.isEditing}),s.jsx("small",{children:le(c.formatMessage,`${se}explainer`,e.type,"action",{a:k=>s.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",target:"_blank",className:"gtm-trackable","data-gtm-event-context":i,"data-gtm-event-type":"community-guidelines-link",rel:"noreferrer",children:k})})}),s.jsx(Ae,{buttons:y}),b==="submitted"&&s.jsx(Ye,{className:"success","data-testid":"success",children:le(c.formatMessage,`${se}success`,e.type,"action")}),g&&s.jsx(Ye,{id:"error-message",className:"error","data-testid":"error",children:d.error?d.error:typeof g=="string"?g.includes(" ")?g:c.formatMessage({id:g},{action:c.formatMessage({id:`discussion_action_${e.type}`}),maxLength:o}):g})]})},Rt=({contentType:e,createPost:t,membershipRequiredToPost:{isMember:n,required:r,join:o,leave:l,notMemberStateText:d}})=>r&&!n?s.jsx(Fe,{text:d,button:{component:s.jsx(Ct,{functions:{join:o,leave:l}})}}):s.jsx(Pt,{content:{type:e,slugs:{}},functions:{create:t}}),Tr={showThread:!1,showForm:!1},Dt=h.createContext(Tr),$r=({children:e})=>{const[t,n]=h.useState({showThread:!1,showForm:!1});return s.jsx(Dt.Provider,{value:{...t,updateConversation:n},children:e})},Mr=({question:e,answer:t,reply:n})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...n&&{replySlug:n}}),Cr=(e,t=10)=>!e||e.length===0?[]:e.slice(0,t);let $e=!1;const _t=()=>{$e!==!1&&(clearTimeout($e),$e=!1)},xt=10,Ln=({element:e="div",likes:t=0,peopleWhoLiked:n=!1,isShort:r=!0,userLiked:o=!1,content:l={type:"reply",slugs:{}},canLike:d=!0,functions:{createLike:a=()=>{},deleteLike:i=()=>{}}={}})=>{const c=M.useIntl();h.useEffect(()=>{g(o)},[o]);const[u,f]=h.useState(t),[p,g]=h.useState(o),[x,b]=h.useState(!1),[_,E]=h.useState(!1),v=h.useMemo(()=>Cr(n,xt),[n]),$=A=>{if(A.preventDefault(),A.stopPropagation(),E(!1),$e)return _t(),!1;if(_t(),x||!d)return!1;$e=setTimeout(C,350)},C=async()=>{if(_t(),x||!d)return!1;let A=p?u-1:u+1;A<0&&(A=0),b(!0),f(A),g(!p);try{if(l&&l.slugs){const H=Mr(l.slugs);p?await i(H):await a(H,{contentPath:window.location.pathname})}}catch{f(t),g(o)}finally{b(!1)}};return h.createElement(e,{className:S("likes-wrapper text-medium action-button",{"show-spinner":x,"is-liked":p,disabled:!d}),onClick:$,onMouseEnter:()=>{E(!0)},onMouseLeave:()=>{E(!1)},onFocus:()=>{E(!0)},onBlur:()=>{E(!1)},children:s.jsxs(s.Fragment,{children:[s.jsx(Q,{variant:"tertiary",size:"medium",icon:{icon:p?"heart":"heart_empty",animate:"bounce"},className:S({"do-animation":p&&!o}),screenreaderText:d?c.formatMessage({id:`discussion_likes_${p?"unlike":"like"}`},{action:c.formatMessage({id:`discussion_action_${l.type}`})}):!1,onClick:$,disabled:!d,"aria-hidden":!d,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${l.type}-click`}),s.jsx("span",{className:S("number-of-likes",{"no-likes":u===0}),"data-testid":"number-of-likes",children:c.formatMessage({id:`discussion_likes${r?"_short":""}`},{number:u})}),n&&s.jsx(xn,{isOpen:_,isLoading:n.length===0,children:n.length&&s.jsxs("ul",{children:[v.map(A=>typeof A=="string"||!A.name?null:s.jsx("li",{children:s.jsx(Ne,{href:A.id?`/profiles/${A.id}`:void 0,gtmContext:"Likes",gtmType:"liked-name-click",children:A.name})},A.id||window.btoa(A.name))),n.length>xt&&s.jsx("li",{children:c.formatMessage({id:"discussion_likes_more"},{number:n.length-xt})})]})})]})})};const Hn=({element:e="section",children:t,className:n,...r})=>h.createElement(e,{className:S("modal",n),children:typeof t=="string"?s.jsx("p",{children:t}):t,...r});const It=({id:e="content-overlay",isOpen:t=!1,showDivider:n=!0,maxWidth:r,functions:{onOpen:o=()=>{},onClose:l=()=>{}}={},forceShow:{error:d=!1}={},title:a,children:i,buttons:c,className:u="",gtmContext:f="Modal"})=>{const p=M.useIntl(),[g,x]=h.useState(t),b=E=>{x(E),E?(o(),document.body.classList.add("has-overlay")):(l(),document.body.classList.remove("has-overlay"))};h.useEffect(()=>{b(t)},[t]);const _=r?{"--max-width":`${r/16}rem`}:{};return s.jsx("div",{className:S("overlay",{open:g}),children:s.jsx(Hn,{id:e,className:S("overlay-modal",u,{"has-max-width":r}),hidden:!g,style:_,children:t&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"top",children:[a&&s.jsx("h2",{className:"modal-title",children:a}),s.jsx(Q,{variant:"tertiary",size:"medium",icon:{icon:"close"},onClick:()=>b(!1),className:"gtm-trackable","data-gtm-event-type":"close-modal-click","data-gtm-event-context":f,screenreaderText:p.formatMessage({id:"overlay_close"})})]}),n&&s.jsx(ye,{}),i,c&&s.jsxs("div",{className:"bottom",children:[s.jsx(ye,{}),s.jsx(Ae,{buttons:c})]}),d&&s.jsx(Ye,{className:"error",children:d})]})})})},Qn=(e,t)=>({"aria-haspopup":!0,"aria-expanded":t,"aria-controls":e});const Ar=({className:e,showModal:t=!0,title:n,formTitle:r="Know someone who might like to join this workshop?",formLabel:o="Send an invitation to your colleagues below",ctaMessage:l="Send invites",showIcon:d,onClose:a,reportError:i=()=>{},sendInvites:c})=>s.jsx(It,{title:n,isOpen:t,showDivider:!1,showIcon:d,className:S("invite-modal",e,{success:!!n}),children:s.jsx(On,{title:r,label:o,ctaMessage:l,onClose:a,sendInvites:c,reportError:i})}),an=e=>{const t={};return Object.keys(e).forEach(n=>n.includes("Id")?t[n]=e[n]:t[`${n}Slug`]=e[n]),t};const me="discussion_",Ke=({element:e="div",content:t,userHasPermissions:n=!0,isLoading:r=!1,originalAuthorId:o,functions:{content:{createContent:l,deleteContent:d,updateContent:a}={createContent:()=>{},deleteContent:()=>{},updateContent:()=>{}},likes:{createLike:i,deleteLike:c}={createLike:()=>{},deleteLike:()=>{}},comments:{openComments:u}={openComments:()=>{}}},links:f={},className:p,gtmContext:g="DiscussionAnswer",children:x})=>{const b=M.useIntl(),_=h.useContext(he),E=h.useContext(Dt),[v,$]=h.useState({body:t&&t.body||"",isEditing:!1,didEdit:t&&t.isEdited||!1}),[C,A]=h.useState(!1),[H,V]=h.useState("");if(h.useEffect(()=>{$({...v,body:t&&t.body||"",didEdit:t&&t.isEdited||!1})},[t.isEdited]),r||!t||t.type==="answer"&&(!t.slugs||!t.slugs.question))return s.jsx(ce,{className:"discussion-card discussion-post"});const{author:y,canLike:P,createdAt:q,id:k,likes:z=0,userLiked:R,comments:B=0}=t,U=_&&_.id&&typeof y!="string"&&y.id&&y.id===_.id||!1,Y=typeof P=="boolean"?P:n?!U:!1,Z=async D=>{D||(D=""),V("");try{if(!vs(D,v.body)){const W=t.type==="question"?{title:D}:{body:D};await a(an(t.slugs),W)}$({body:D,isEditing:!1,didEdit:!0})}catch{V(`${me}form_error`)}},re=()=>{E&&E.updateConversation&&E.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const W=`reply-form-${(t.type==="answer"?t.slug:t.slugs.answer||"").toLowerCase().slice(-15)}`,ee=document.getElementById(W),ae=document.getElementById(`${W}-input`);ae&&ae.focus(),ee&&ee.scrollIntoView({behavior:"smooth"})},0)},oe=()=>{try{d(an(t.slugs))}catch{V("delete-error")}},ne=[{text:b.formatMessage({id:`${me}moreMenu_report`}),href:`mailto:community@apolitical.co?subject=${encodeURI(b.formatMessage({id:`${me}report_subject`}))}&body=${encodeURI(b.formatMessage({id:`${me}report_body`},{contentType:t.type||"",contentSlug:t.slug||"",contentUrl:`${window.origin}${typeof process<"u"&&process.env.PUBLIC_URL||""}/${t.slugs.question||""}`}))}`,icon:"flag"}];return n&&U&&ne.push({text:b.formatMessage({id:`${me}moreMenu_edit`}),onClick:()=>$({...v,isEditing:!0}),icon:"pencil-paper",className:"gtm-trackable","data-gtm-event-context":g,"data-gtm-event-type":`edit-${t.type}-click`},{text:b.formatMessage({id:`${me}moreMenu_delete`}),onClick:D=>{D.preventDefault(),D.stopPropagation(),A(!0)},icon:"trash",className:"gtm-trackable","data-gtm-event-context":g,"data-gtm-event-type":`delete-${t.type}-click`,...Qn(`delete-${t.slug}-modal`,C)}),h.createElement(e,{className:S("discussion-post",p),"data-testid":`discussion-${t.type}-thread`,children:s.jsxs(s.Fragment,{children:[s.jsxs("div",{id:k||t.slug,className:S("discussion-card",t.type,{editing:v.isEditing,"has-link":f.post&&!v.isEditing}),onClick:D=>{!f.post||v.isEditing||(D.preventDefault(),D.stopPropagation(),window.location.href=f.post)},children:[!v.isEditing&&s.jsx(Ze,{member:y,additionalContent:{createdAt:q,didEdit:v.didEdit},className:typeof y!="string"&&y.id===o?"highlighted":"",gtmContext:g,gtmType:"profile-click"}),v.isEditing?s.jsx(Pt,{content:{type:t.type,slugs:t.slugs},userHasPermissions:n,meta:{isLoading:r,isInWrapper:!0,isEditing:{text:v.body}},maxLength:t.type==="question"?250:5e4,forceShow:{error:H!==""&&H!=="delete-error"?b.formatMessage({id:H},{action:b.formatMessage({id:`discussion_action_${t.type}`})}):!1},functions:{create:l,handleSaveEdit:Z,handleCancel:()=>{V(""),$({...v,isEditing:!1})}},gtmContext:`${g}Form`}):f.post?s.jsx("a",{href:f.post,className:"gtm-trackable","data-gtm-event-context":g,"data-gtm-event-type":"title-click",children:s.jsx(yt,{options:{overrides:{a:wn}},children:v.body})}):s.jsx(yt,{options:{wrapper:t.type==="question"?"h1":h.Fragment,forceWrapper:t.type==="question",forceInline:t.type==="question",forceBlock:t.type!=="question"},children:v.body}),!v.isEditing&&s.jsxs("ul",{className:S("actions text-medium",t.type),"data-testid":`${t.type}-actions`,children:[s.jsx(Ln,{element:"li",likes:z,isShort:!1,userLiked:R,content:{type:t.type,slugs:t.slugs},canLike:Y,functions:{createLike:i,deleteLike:c}}),(["question","post"].includes(t.type)||f.comments||typeof u=="function")&&s.jsxs("li",{className:"action-button",onClick:D=>{D.preventDefault(),D.stopPropagation(),f.comments&&(window.location.href=f.comments),typeof u=="function"&&u()},children:[s.jsx(Q,{variant:"tertiary",size:"medium",styling:{muted:!0},icon:{icon:"speech-bubble_square_thick"},href:f.comments?f.comments:!1,onClick:f.comments||typeof u!="function"?!1:u,className:"gtm-trackable","data-gtm-event-context":g,"data-gtm-event-type":`answer-${t.type}-click`,screenreaderText:b.formatMessage({id:`${me}comments_screenReader`},{count:B})}),s.jsx("span",{children:b.formatMessage({id:`${me}comments`},{count:B})})]}),(t.type==="answer"||t.type==="reply")&&s.jsx("li",{children:s.jsx(Q,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:re,children:b.formatMessage({id:`${me}reply`})})}),s.jsx(Fn,{element:"li",id:`more-${t.slug}`,options:ne})]})]}),x,s.jsx(It,{id:`delete-${t.slug}-modal`,isOpen:C,functions:{onOpen:()=>{},onClose:()=>A(!1)},forceShow:{error:H==="delete-error"?b.formatMessage({id:"discussion_delete_error"},{action:b.formatMessage({id:`discussion_action_${t.type}`})}):!1},title:b.formatMessage({id:"discussion_delete_title"},{action:b.formatMessage({id:`discussion_action_${t.type}`})}),buttons:[{variant:"secondary",onClick:()=>A(!1),children:b.formatMessage({id:"discussion_delete_cancel"})},{variant:"primary",className:"destructive",onClick:oe,children:b.formatMessage({id:"discussion_delete_delete"})}],gtmContext:`${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,children:s.jsx(M.FormattedMessage,{id:"discussion_delete_text",values:{p:D=>s.jsx("p",{children:D}),action:b.formatMessage({id:`discussion_action_${t.type}`})}})})]})})};const vt="discussion_responses_",Nr=({type:e="answer",responses:t=0})=>{const n=M.useIntl();return s.jsxs("div",{className:"responses-heading",children:[s.jsx("h3",{children:n.formatMessage({id:`${vt}title`},{action:n.formatMessage({id:`${vt}${e}`}),count:t})}),t===0&&s.jsx("p",{children:le(n.formatMessage,`${vt}empty`,e,e)})]})};const Fr=({isOpen:e=!1,count:t=0,children:n})=>{const r=M.useIntl(),o=h.useRef(null),[l,d]=h.useState(e),[a,i]=h.useState("closed");h.useEffect(()=>{const p=o.current;if(p)return p.addEventListener("transitionend",c),()=>{p.removeEventListener("transitionend",c)}},[]),_e(()=>{a==="closed"&&!l||i(["opening","open"].includes(a)?"ready-to-close":"opening")},[l]),h.useEffect(()=>{a==="ready-to-close"&&i("closing")},[a]);const c=({propertyName:p})=>{p==="max-height"&&i(g=>g==="opening"?"open":g==="closing"?"closed":g)},u=["opening","open"].includes(a),f=gn(n,{element:"li"});return s.jsxs("div",{className:"thread-wrapper",children:[s.jsx(Q,{variant:"secondary",size:"small",styling:{muted:!0},icon:{icon:`arrow_corner-down_${u?"left":"right"}`},onClick:()=>{d(!l)},children:r.formatMessage({id:`discussion_thread_${u?"hide":"show"}`},{count:t})}),s.jsx("ul",{ref:o,className:S("thread",a),hidden:!l,children:f})]})},Pr=({user:e,content:t,verb:n="post"})=>({actor:{id:e.id,data:{name:e.name,organization:e==null?void 0:e.organization,jobTitle:e==null?void 0:e.jobTitle}},content:t,latest_reactions:{like:[]},reaction_counts:{like:0},verb:n}),Rr=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({content:a})=>{if(!n)return;const i=Pr({user:n,content:a,verb:"post"});await e.cancelQueries({queryKey:t});const c=e.getQueryData(t);return e.setQueryData(t,u=>[...u,i]),{previousActivities:c}},onError:(a,i,c)=>{e.setQueryData(t,c.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Dr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityInfo:d,content:{body:a}})=>{if(a.length===0)return;await e.cancelQueries({queryKey:t});const i=e.getQueryData(t),c=i==null?void 0:i.map(u=>((u==null?void 0:u.id)===(d==null?void 0:d.activityId)&&(u.content=a),u));return e.setQueryData(t,()=>c&&[...c]),{previousActivities:c}},onError:(d,a,i)=>{e.setQueryData(t,i.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Ir=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityId:a})=>{await e.cancelQueries({queryKey:t});const i=e.getQueryData(t),c=i==null?void 0:i.map(u=>{var f;return(u==null?void 0:u.id)===a&&((f=u.reaction_counts)!=null&&f.like?u.reaction_counts.like+=1:u.reaction_counts.like=1),u});return e.setQueryData(t,()=>c&&[...c]),{previousActivities:c}},onError:(a,i,c)=>{e.setQueryData(t,c.previousActivities)},onSuccess:a=>{const i=e.getQueryData(t),c=i==null?void 0:i.map(u=>((u==null?void 0:u.id)===(a==null?void 0:a.activity_id)&&(u.latest_reactions.like?u.latest_reactions.like.push(a):u.latest_reactions.like=[a]),u));return e.setQueryData(t,()=>c&&[...c]),{previousActivities:i}},onSettled:(a,i,c)=>{e.invalidateQueries({queryKey:[...t,c.activityId]})}}),Br=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({activityId:i})=>{await e.cancelQueries({queryKey:t});const c=e.getQueryData(t),u=c==null?void 0:c.map(f=>{var p;return(f==null?void 0:f.id)===i&&(p=f.reaction_counts)!=null&&p.like&&(f.reaction_counts.like-=1),f});return e.setQueryData(t,()=>u&&[...u]),{previousActivities:u}},onError:(i,c,u)=>{e.setQueryData(t,u.previousActivities)},onSuccess:(i,{activityId:c})=>{const u=e.getQueryData(t),f=u==null?void 0:u.map(p=>{var g,x,b,_;if(p.id===c){const E=(b=(x=(g=p.latest_reactions)==null?void 0:g.like)==null?void 0:x.find(v=>v.user_id===(n==null?void 0:n.id)))==null?void 0:b.id;return p.latest_reactions.like=(_=p.latest_reactions.like)==null?void 0:_.filter(v=>v.id!==E),p}else return p});return e.setQueryData(t,()=>f&&[...f]),{previousActivities:u}},onSettled:(i,c,u)=>{e.invalidateQueries({queryKey:[...t,u.activityId]})}}),Or=({basePath:e,parentId:t,isMember:n,functions:{list:r,create:o,edit:l,like:d,unlike:a,join:i,leave:c}})=>{const u=M.useIntl(),f=X.useQueryClient(),p=h.useContext(he),{data:g,error:x,isLoading:b,isFetching:_}=X.useQuery({queryKey:[e,t],queryFn:r}),E=Rr({queryClient:f,queryKey:[e,t],user:p,mutationFn:o}),{mutate:v}=X.useMutation(E),$=Dr({queryClient:f,queryKey:[e,t],mutationFn:async k=>await l(k)}),{mutate:C}=X.useMutation($),A=Ir({queryClient:f,queryKey:[e,t],mutationFn:d}),{mutate:H}=X.useMutation(A),V=Br({queryClient:f,queryKey:[e,t],user:p,mutationFn:async({activityId:k})=>{var B,U,Y;const z=g&&(g==null?void 0:g.find(Z=>Z.id===k)),R=(Y=(U=(B=z==null?void 0:z.latest_reactions)==null?void 0:B.like)==null?void 0:U.find(Z=>Z.user_id===(p==null?void 0:p.id)))==null?void 0:Y.id;await a({reactionId:R||"",activityId:k})}}),{mutate:y}=X.useMutation(V),P=h.useCallback(({activityId:k})=>H({activityId:k}),[H]),q=h.useCallback(({activityId:k})=>y({activityId:k}),[y]);return x?s.jsx(Fe,{variant:"error",text:x.message}):b?s.jsx(ce,{style:{height:"400px"}}):s.jsxs(s.Fragment,{children:[s.jsx(Rt,{contentType:"post",createPost:v,membershipRequiredToPost:{isMember:n,required:!0,join:i,leave:c,notMemberStateText:u.formatMessage({id:"community_joinToPost"})}}),!_&&Array.isArray(g)&&(g==null?void 0:g.map(k=>{var z,R,B,U,Y,Z,re,oe,ne,D,W;return s.jsx(Ke,{content:{type:"post",body:k==null?void 0:k.content,createdAt:(k==null?void 0:k.time)||"",slugs:{parentId:t,activityId:k==null?void 0:k.id},slug:k==null?void 0:k.id,author:{id:(z=k==null?void 0:k.actor)==null?void 0:z.id,name:(B=(R=k==null?void 0:k.actor)==null?void 0:R.data)==null?void 0:B.name,organization:(Y=(U=k==null?void 0:k.actor)==null?void 0:U.data)==null?void 0:Y.organization,jobTitle:(re=(Z=k==null?void 0:k.actor)==null?void 0:Z.data)==null?void 0:re.jobTitle,image:{thumbnail:((ne=(oe=k==null?void 0:k.actor)==null?void 0:oe.data)==null?void 0:ne.thumbnail)||void 0}},userLiked:((D=k==null?void 0:k.own_reactions)==null?void 0:D.like)&&((W=k==null?void 0:k.own_reactions)==null?void 0:W.like.length)>0,likes:(k==null?void 0:k.reaction_counts.like)||0,comments:(k==null?void 0:k.reaction_counts.reply)||0},links:{post:`${e}/${t}/${k==null?void 0:k.id}`,comments:`${e}/${t}/${k==null?void 0:k.id}`},functions:{content:{createContent:()=>null,deleteContent:()=>null,updateContent:(ee,ae)=>C({activityInfo:ee,content:ae})},likes:{createLike:()=>{P({activityId:k==null?void 0:k.id})},deleteLike:()=>{q({activityId:k==null?void 0:k.id})}},comments:{openComments:()=>null}}},k==null?void 0:k.id)}))]})},Lr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{await e.cancelQueries({queryKey:t})},onError:(a,i,c)=>{e.setQueryData(t,c.previousActivity)},onSuccess:a=>{var c;const i=e.getQueryData(t);if(i)return(c=i==null?void 0:i.latest_reactions)!=null&&c.reply?(i.latest_reactions.reply.unshift(a),i&&(i.reaction_counts={reply:i.latest_reactions.reply.length})):(i.latest_reactions={reply:[a]},i.reaction_counts={reply:1}),e.setQueryData(t,()=>({...i})),{previousActivity:i}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Hr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({replyInfo:l,content:{body:d}})=>{var c,u,f;if(d.length===0)return;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t);if(!a||!((c=a==null?void 0:a.latest_reactions)!=null&&c.reply))return;const i=(f=(u=a==null?void 0:a.latest_reactions)==null?void 0:u.reply)==null?void 0:f.map(p=>(p.id===l.replySlug&&(p.data.content=d),p));return e.setQueryData(t,()=>({...a,latest_reactions:{reply:i}})),{previousActivity:a}},onError:(l,d,a)=>{e.setQueryData(t,a.previousActivity)}}),Qr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({replyId:d})=>{var c,u;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t),i=(u=(c=a==null?void 0:a.latest_reactions)==null?void 0:c.reply)==null?void 0:u.map(f=>{var p;return f.id===d&&((p=f.children_counts)!=null&&p.like?f.children_counts.like+=1:f.children_counts={like:1}),f});return e.setQueryData(t,()=>({...a,latest_reactions:{reply:i}})),{previousActivity:a}},onError:(d,a,i)=>{e.setQueryData(t,i.previousActivity)},onSuccess:d=>{var c;const a=e.getQueryData(t),i=(c=a==null?void 0:a.latest_reactions.reply)==null?void 0:c.map(u=>(u.id===d.id&&(u.latest_children.like?u.latest_children.like.push(d):u.latest_children.like=[d]),u));return e.setQueryData(t,()=>({...a,latest_reactions:{reply:i}})),{previousActivity:a}}}),Ur=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({replyId:a})=>{var u;await e.cancelQueries({queryKey:t});const i=e.getQueryData(t);if(!i)return;const c=(u=i.latest_reactions.reply)==null?void 0:u.map(f=>(f.id===a&&f.children_counts.like&&(f.children_counts.like-=1),f));return e.setQueryData(t,()=>({...i,latest_reactions:{reply:c}})),{previousActivity:i}},onError:(a,i,c)=>{e.setQueryData(t,c.previousActivity)},onSuccess:(a,{replyId:i})=>{var f;const c=e.getQueryData(t);if(!c)return;const u=(f=c.latest_reactions.reply)==null?void 0:f.map(p=>{var g;return p.id===i?(g=p.latest_children.reply)==null?void 0:g.filter(b=>b.user_id!==(n==null?void 0:n.id)):p});return e.setQueryData(t,()=>({...c,latest_reactions:{reply:u}})),{previousActivity:c}}}),Un=({basePath:e,parentId:t,activityId:n,repliesList:r,isMember:o,functions:{createReply:l,editReply:d,like:a,unlike:i,join:c,leave:u}})=>{const f=M.useIntl(),p=X.useQueryClient(),g=h.useContext(he),x=Lr({queryClient:p,queryKey:[e,t,n],mutationFn:l}),{mutate:b}=X.useMutation(x),_=Hr({queryClient:p,queryKey:[e,t,n],mutationFn:async y=>d(y)}),{mutate:E}=X.useMutation(_),v=Qr({queryClient:p,queryKey:[e,t,n],mutationFn:a}),{mutate:$}=X.useMutation(v),C=Ur({queryClient:p,queryKey:[e,t,n],user:g,mutationFn:i}),{mutate:A}=X.useMutation(C),H=h.useCallback(({replyId:y})=>$({replyId:y}),[$]),V=h.useCallback(({replyId:y})=>A({replyId:y}),[A]);return s.jsxs(s.Fragment,{children:[s.jsx(Rt,{contentType:"post",createPost:b,membershipRequiredToPost:{isMember:o,required:!0,join:c,leave:u,notMemberStateText:f.formatMessage({id:"community_joinToPost"})}}),(r==null?void 0:r.length)===0||(r==null?void 0:r.map(y=>{var q,k,z,R,B,U,Y,Z,re,oe,ne,D,W,ee,ae,ge;const P=((q=y==null?void 0:y.latest_children)==null?void 0:q.like)&&((k=y==null?void 0:y.latest_children)==null?void 0:k.like.filter(ue=>ue.user_id===(g==null?void 0:g.id)));return s.jsx(Ke,{content:{type:"post",body:typeof y.data.content=="string"?(z=y==null?void 0:y.data)==null?void 0:z.content:((B=(R=y==null?void 0:y.data)==null?void 0:R.content)==null?void 0:B.text)||"",createdAt:y==null?void 0:y.created_at,slugs:{question:`${e}/${t}/${n}`,parentId:t,reply:y==null?void 0:y.id},slug:`${e}/${t}/${n}#${y==null?void 0:y.id}`,author:{id:(U=y==null?void 0:y.user)==null?void 0:U.id,name:(Z=(Y=y==null?void 0:y.user)==null?void 0:Y.data)==null?void 0:Z.name,organization:(oe=(re=y==null?void 0:y.user)==null?void 0:re.data)==null?void 0:oe.organization,jobTitle:(D=(ne=y==null?void 0:y.user)==null?void 0:ne.data)==null?void 0:D.jobTitle,image:{thumbnail:((ee=(W=y==null?void 0:y.user)==null?void 0:W.data)==null?void 0:ee.thumbnail)||void 0}},userLiked:!!(P!=null&&P.length),likes:((ae=y==null?void 0:y.children_counts)==null?void 0:ae.like)||0,comments:((ge=y==null?void 0:y.children_counts)==null?void 0:ge.reply)||0},functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:(ue,ke)=>E({replyInfo:ue,content:ke})},likes:{createLike:()=>H({replyId:y==null?void 0:y.id}),deleteLike:()=>V({replyId:y==null?void 0:y.id})},comments:{openComments:()=>{}}}},y==null?void 0:y.id)}))]})},Wr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityInfo:d,content:{body:a}})=>{if(a.length===0)return;await e.cancelQueries({queryKey:t});const i=e.getQueryData(t);return i&&i.id===(d==null?void 0:d.activityId)&&(i.content=a),e.setQueryData(t,()=>({...i})),{previousActivity:i}},onError:(d,a,i)=>{e.setQueryData(t,i.previousActivity)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),zr=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{var i;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t);return(i=a==null?void 0:a.reaction_counts)!=null&&i.like?a.reaction_counts.like+=1:a&&(a.reaction_counts={like:1}),e.setQueryData(t,()=>({...a})),{previousActivity:a}},onError:(a,i,c)=>{e.setQueryData(t,c.previousActivity)},onSuccess:a=>{const i=e.getQueryData(t);return i!=null&&i.latest_reactions.like?i.latest_reactions.like.push(a):i&&(i.latest_reactions={like:[a]}),e.setQueryData(t,()=>({...i})),{previousActivity:i}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Vr=({queryClient:e,queryKey:t,user:n,activity:r,mutationFn:o})=>({mutationFn:o,onMutate:async()=>{var u;await e.cancelQueries({queryKey:t});const c=e.getQueryData(t);return(u=c==null?void 0:c.reaction_counts)!=null&&u.like&&c.reaction_counts.like>0&&(c.reaction_counts.like-=1),e.setQueryData(t,()=>({...c})),{previousActivity:c}},onError:(c,u,f)=>{e.setQueryData(t,f.previousActivity)},onSuccess:()=>{var f,p,g;if(!r)return;const c=(g=(p=(f=r.latest_reactions)==null?void 0:f.like)==null?void 0:p.find(x=>x.user_id===(n==null?void 0:n.id)))==null?void 0:g.id,u=e.getQueryData(t);if(u!=null&&u.latest_reactions.like)return u.latest_reactions.like=u.latest_reactions.like.filter(x=>x.id!==c),e.setQueryData(t,()=>({...u})),{previousActivity:u}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Yr=({basePath:e,parentId:t,activityId:n,isMember:r,functions:{get:o,editActivity:l,likeActivity:d,unlikeActivity:a,createReply:i,editReply:c,likeReply:u,unlikeReply:f,join:p,leave:g}})=>{var z,R,B,U,Y,Z,re,oe,ne,D;const x=h.useContext(he),b=X.useQueryClient(),{data:_,error:E,isLoading:v,isFetching:$}=X.useQuery({queryKey:[e,t,n],queryFn:o}),C=Wr({queryClient:b,queryKey:[e,t,n],mutationFn:async W=>await l(W)}),{mutate:A}=X.useMutation(C),H=zr({queryClient:b,queryKey:[e,t,n],mutationFn:d}),{mutate:V}=X.useMutation(H),y=Vr({queryClient:b,queryKey:[e,t,n],user:x,mutationFn:async()=>{var ee,ae,ge;const W=(ge=(ae=(ee=_==null?void 0:_.latest_reactions)==null?void 0:ee.like)==null?void 0:ae.find(ue=>ue.user_id===(x==null?void 0:x.id)))==null?void 0:ge.id;await a({activityId:n,reactionId:W})},activity:_}),{mutate:P}=X.useMutation(y),q=h.useCallback(({activityId:W})=>V({activityId:W}),[V]),k=h.useCallback(async({activityId:W})=>P({activityId:W}),[P]);return E?s.jsx(Fe,{variant:"error",text:E.message}):v||$?s.jsx(ce,{style:{height:"400px"}}):s.jsx(Ke,{content:{type:"post",body:_==null?void 0:_.content,createdAt:(_==null?void 0:_.time)||"",slugs:{question:`${t}/${n}`,parentId:t,activityId:_==null?void 0:_.id},slug:n,author:{id:(z=_==null?void 0:_.actor)==null?void 0:z.id,name:(R=_==null?void 0:_.actor)==null?void 0:R.data.name,organization:(B=_==null?void 0:_.actor)==null?void 0:B.data.organization,jobTitle:(U=_==null?void 0:_.actor)==null?void 0:U.data.jobTitle,image:{thumbnail:((Y=_==null?void 0:_.actor)==null?void 0:Y.data.thumbnail)||void 0}},userLiked:((Z=_==null?void 0:_.own_reactions)==null?void 0:Z.like)&&((re=_==null?void 0:_.own_reactions)==null?void 0:re.like.length)>0,likes:_&&(_==null?void 0:_.reaction_counts.like),comments:_&&(_==null?void 0:_.reaction_counts.reply)},originalAuthorId:(oe=_==null?void 0:_.actor)==null?void 0:oe.id,functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:(W,ee)=>A({activityInfo:W,content:ee})},likes:{createLike:()=>q({activityId:n}),deleteLike:()=>k({activityId:n})},comments:{openComments:()=>{}}},children:s.jsxs(s.Fragment,{children:[s.jsxs("h3",{children:["Comments (",((ne=_==null?void 0:_.reaction_counts)==null?void 0:ne.reply)||0,")"]}),s.jsx(Un,{basePath:e,parentId:t,activityId:n,repliesList:(D=_==null?void 0:_.latest_reactions)==null?void 0:D.reply,isMember:r,functions:{createReply:i,like:u,unlike:f,editReply:c,join:p,leave:g}})]})},n)},Gr=({id:e,data:{jobTitle:t,name:n,organization:r,thumbnail:o}})=>({id:e,name:n,jobTitle:t,organization:r,image:{thumbnail:o}});exports.ASSETS_BUCKET=Ve;exports.ActivitiesFeed=Or;exports.ActivitySection=Yr;exports.AddPost=Rt;exports.BannerSection=Ws;exports.Breadcrumbs=ur;exports.Button=Q;exports.ButtonWrapper=Ae;exports.CacheProvider=$n;exports.CollapsibleSection=$t;exports.Columns=hr;exports.CommunityDetails=cr;exports.Contributors=Tn;exports.ConversationContext=Dt;exports.CookieBanner=Pn;exports.DiscussionConversation=$r;exports.DiscussionForm=Pt;exports.DiscussionLikes=Ln;exports.DiscussionPost=Ke;exports.DiscussionThread=Fr;exports.Divider=ye;exports.DownloadSection=Ls;exports.EMAILS=be;exports.EmailHelperTextBox=gr;exports.EmptyStateBox=Fe;exports.Filters=dr;exports.FlagsProvider=Mn;exports.Footer=Nt;exports.FullWidthSection=Tt;exports.GlobalProviders=lr;exports.Header=Ft;exports.HelperTextBox=bn;exports.HiddenFromScreenReaders=St;exports.HideShowTextBox=Ys;exports.HighlightedTextBox=pe;exports.IntlProvider=Cn;exports.InviteForm=On;exports.InviteModal=Ar;exports.JoinButton=Ct;exports.LanguageSwitcher=fr;exports.Link=Ne;exports.LoadMore=Nn;exports.LoadingBlock=sr;exports.LoadingPlaceholder=ce;exports.LoadingState=Sn;exports.Logo=At;exports.LogoSection=Hs;exports.MarkdownText=yt;exports.MarketingBox=zs;exports.Member=Ze;exports.MembersList=Er;exports.Modal=Hn;exports.MoreMenu=Fn;exports.NUMBER_OF_USERS=Vs;exports.Overlay=It;exports.PageLayout=kr;exports.PasswordRules=vr;exports.Pill=yn;exports.ProfilePicture=Xe;exports.ProgressBar=kn;exports.Rating=br;exports.RepliesFeed=Un;exports.ResponsesHeading=Nr;exports.ResponsiveImage=_n;exports.SearchForm=Bn;exports.Span=wn;exports.StatusBanner=Ye;exports.Tags=Sr;exports.Tooltip=xn;exports.UserContext=he;exports.UserProvider=An;exports.VisuallyHidden=K;exports.addAriaProps=Qn;exports.getMember=Mt;exports.headerData=Me;exports.mapGetStreamData=Gr;exports.useCurrentPath=dn;exports.useEffectAfterMount=_e;exports.useScreenWidth=Ce;exports.useScrollListener=fn;exports.useScrollToHash=Ts;
|