@apolitical/component-library 1.4.1-beta.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/accessibility/visually-hidden/visually-hidden.d.ts +2 -1
  2. package/discussion/discussion.mock.d.ts +6 -33
  3. package/discussion/index.d.ts +2 -0
  4. package/discussion/post/post.d.ts +9 -1
  5. package/discussion/post/post.mock.d.ts +18 -0
  6. package/discussion/responses-heading/index.d.ts +1 -0
  7. package/discussion/responses-heading/responses-heading.d.ts +10 -0
  8. package/discussion/thread/index.d.ts +1 -0
  9. package/discussion/thread/thread.d.ts +11 -0
  10. package/general/buttons/button-wrapper/button-wrapper.d.ts +1 -0
  11. package/general/divider/divider.d.ts +6 -0
  12. package/general/divider/index.d.ts +1 -0
  13. package/general/index.d.ts +1 -0
  14. package/general/link/link.d.ts +1 -1
  15. package/index.js +45 -49
  16. package/index.mjs +6277 -5989
  17. package/layout/page-layout/page-layout.d.ts +1 -1
  18. package/modals/index.d.ts +1 -0
  19. package/modals/modal/modal.d.ts +19 -2
  20. package/modals/overlay/index.d.ts +2 -0
  21. package/modals/overlay/overlay.d.ts +36 -0
  22. package/modals/overlay/overlay.helpers.d.ts +5 -0
  23. package/navigation/index.d.ts +1 -0
  24. package/navigation/more-menu/index.d.ts +2 -0
  25. package/navigation/more-menu/more-menu.d.ts +37 -0
  26. package/package.json +1 -1
  27. package/style.css +1 -1
  28. package/styles/base/_overlays.scss +41 -7
  29. package/styles/base/buttons/_buttons.scss +6 -4
  30. package/styles/base/buttons/_icons.scss +7 -1
  31. package/styles/variables/colors/_theme.scss +27 -8
  32. package/text/helper-text-box/helper-text-box.d.ts +1 -1
  33. package/text/index.d.ts +1 -1
  34. package/text/status-banner/index.d.ts +1 -0
  35. package/text/{alert/alert.d.ts → status-banner/status-banner.d.ts} +2 -2
  36. package/text/alert/index.d.ts +0 -1
package/index.js CHANGED
@@ -1,105 +1,101 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),C=require("react/jsx-runtime");function dg(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Oe=dg(G);var ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Wi(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var wd={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),O=require("react/jsx-runtime");function bg(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const xe=bg($);var ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function zi(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Ad={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=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var a=n.apply(null,i);a&&r.push(a)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var l in i)t.call(i,l)&&i[l]&&r.push(l)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(wd);var hg=wd.exports;const se=jt(hg),pg=({element:e="span",showOnFocus:t=!0,children:n,...r})=>G.createElement(e,{...r,className:se("hidden",{"show-on-focus":t})},n),it=G.memo(pg),mg=({element:e="span",children:t=null,...n})=>G.createElement(e,{...n,"aria-hidden":!0},t),Eu=G.memo(mg),Io=(e,t)=>{const n=G.useRef(!1);G.useEffect(()=>{n.current?e():n.current=!0},t)};/*!
5
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var a=n.apply(null,i);a&&r.push(a)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var l in i)t.call(i,l)&&i[l]&&r.push(l)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ad);var wg=Ad.exports;const se=jt(wg),Sg=({element:e="span",showOnFocus:t=!0,children:n,...r})=>$.createElement(e,{...r,className:se("hidden",{"show-on-focus":t}),children:n}),ot=$.memo(Sg),Tg=({element:e="span",children:t=null,...n})=>$.createElement(e,{...n,"aria-hidden":!0},t),Tc=$.memo(Tg),Hi=(e,t)=>{const n=$.useRef(!1);$.useEffect(()=>{n.current?e():n.current=!0},t)};/*!
6
6
  * cookie
7
7
  * Copyright(c) 2012-2014 Roman Shtylman
8
8
  * Copyright(c) 2015 Douglas Christopher Wilson
9
9
  * MIT Licensed
10
- */var Sd=yg,nc=vg,gg=Object.prototype.toString,eo=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function yg(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var n={},r=t||{},o=r.decode||Eg,i=0;i<e.length;){var s=e.indexOf("=",i);if(s===-1)break;var a=e.indexOf(";",i);if(a===-1)a=e.length;else if(a<s){i=e.lastIndexOf(";",s-1)+1;continue}var l=e.slice(i,s).trim();if(n[l]===void 0){var f=e.slice(s+1,a).trim();f.charCodeAt(0)===34&&(f=f.slice(1,-1)),n[l]=wg(f,o)}i=a+1}return n}function vg(e,t,n){var r=n||{},o=r.encode||_g;if(typeof o!="function")throw new TypeError("option encode is invalid");if(!eo.test(e))throw new TypeError("argument name is invalid");var i=o(t);if(i&&!eo.test(i))throw new TypeError("argument val is invalid");var s=e+"="+i;if(r.maxAge!=null){var a=r.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(r.domain){if(!eo.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!eo.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){var l=r.expires;if(!bg(l)||isNaN(l.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+l.toUTCString()}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.priority){var f=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(f){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var u=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(u){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s}function Eg(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function _g(e){return encodeURIComponent(e)}function bg(e){return gg.call(e)==="[object Date]"||e instanceof Date}function wg(e,t){try{return t(e)}catch{return e}}function Sg(){return typeof document=="object"&&typeof document.cookie=="string"}function Tg(e){return typeof e=="string"?Sd(e):typeof e=="object"&&e!==null?e:{}}function ia(e,t={}){const n=Og(e);if(!t.doNotParse)try{return JSON.parse(n)}catch{}return e}function Og(e){return e&&e[0]==="j"&&e[1]===":"?e.substr(2):e}class Td{constructor(t,n={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const o=this.cookies;this.cookies=Sd(document.cookie),this._checkChanges(o)};const r=typeof document>"u"?"":document.cookie;this.cookies=Tg(t||r),this.defaultSetOptions=n,this.HAS_DOCUMENT_COOKIE=Sg()}_emitChange(t){for(let n=0;n<this.changeListeners.length;++n)this.changeListeners[n](t)}_checkChanges(t){new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach(r=>{t[r]!==this.cookies[r]&&this._emitChange({name:r,value:ia(t[r])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,n={}){return n.doNotUpdate||this.update(),ia(this.cookies[t],n)}getAll(t={}){t.doNotUpdate||this.update();const n={};for(let r in this.cookies)n[r]=ia(this.cookies[r],t);return n}set(t,n,r){r?r=Object.assign(Object.assign({},this.defaultSetOptions),r):r=this.defaultSetOptions;const o=typeof n=="string"?n:JSON.stringify(n);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:o}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=nc(t,o,r)),this._emitChange({name:t,value:n,options:r})}remove(t,n){const r=n=Object.assign(Object.assign({},n),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[t],this.HAS_DOCUMENT_COOKIE&&(document.cookie=nc(t,"",r)),this._emitChange({name:t,value:void 0,options:n})}addChangeListener(t){this.changeListeners.push(t),this.changeListeners.length===1&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(t){const n=this.changeListeners.indexOf(t);n>=0&&this.changeListeners.splice(n,1),this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}const Od=Oe.createContext(new Td),{Provider:xg,Consumer:wx}=Od,Ag=Od;class Cg extends Oe.Component{constructor(t){super(t),t.cookies?this.cookies=t.cookies:this.cookies=new Td(void 0,t.defaultSetOptions)}render(){return Oe.createElement(xg,{value:this.cookies},this.props.children)}}var Hs={exports:{}},Ae={};/** @license React v16.13.1
10
+ */var Cd=Og,cu=Ag,xg=Object.prototype.toString,no=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function Og(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var n={},r=t||{},o=r.decode||Cg,i=0;i<e.length;){var s=e.indexOf("=",i);if(s===-1)break;var a=e.indexOf(";",i);if(a===-1)a=e.length;else if(a<s){i=e.lastIndexOf(";",s-1)+1;continue}var l=e.slice(i,s).trim();if(n[l]===void 0){var f=e.slice(s+1,a).trim();f.charCodeAt(0)===34&&(f=f.slice(1,-1)),n[l]=Pg(f,o)}i=a+1}return n}function Ag(e,t,n){var r=n||{},o=r.encode||Rg;if(typeof o!="function")throw new TypeError("option encode is invalid");if(!no.test(e))throw new TypeError("argument name is invalid");var i=o(t);if(i&&!no.test(i))throw new TypeError("argument val is invalid");var s=e+"="+i;if(r.maxAge!=null){var a=r.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(r.domain){if(!no.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!no.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){var l=r.expires;if(!Ng(l)||isNaN(l.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+l.toUTCString()}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.priority){var f=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(f){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var c=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s}function Cg(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function Rg(e){return encodeURIComponent(e)}function Ng(e){return xg.call(e)==="[object Date]"||e instanceof Date}function Pg(e,t){try{return t(e)}catch{return e}}function Ig(){return typeof document=="object"&&typeof document.cookie=="string"}function Lg(e){return typeof e=="string"?Cd(e):typeof e=="object"&&e!==null?e:{}}function ca(e,t={}){const n=kg(e);if(!t.doNotParse)try{return JSON.parse(n)}catch{}return e}function kg(e){return e&&e[0]==="j"&&e[1]===":"?e.substr(2):e}class Rd{constructor(t,n={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const o=this.cookies;this.cookies=Cd(document.cookie),this._checkChanges(o)};const r=typeof document>"u"?"":document.cookie;this.cookies=Lg(t||r),this.defaultSetOptions=n,this.HAS_DOCUMENT_COOKIE=Ig()}_emitChange(t){for(let n=0;n<this.changeListeners.length;++n)this.changeListeners[n](t)}_checkChanges(t){new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach(r=>{t[r]!==this.cookies[r]&&this._emitChange({name:r,value:ca(t[r])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,n={}){return n.doNotUpdate||this.update(),ca(this.cookies[t],n)}getAll(t={}){t.doNotUpdate||this.update();const n={};for(let r in this.cookies)n[r]=ca(this.cookies[r],t);return n}set(t,n,r){r?r=Object.assign(Object.assign({},this.defaultSetOptions),r):r=this.defaultSetOptions;const o=typeof n=="string"?n:JSON.stringify(n);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:o}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=cu(t,o,r)),this._emitChange({name:t,value:n,options:r})}remove(t,n){const r=n=Object.assign(Object.assign({},n),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[t],this.HAS_DOCUMENT_COOKIE&&(document.cookie=cu(t,"",r)),this._emitChange({name:t,value:void 0,options:n})}addChangeListener(t){this.changeListeners.push(t),this.changeListeners.length===1&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(t){const n=this.changeListeners.indexOf(t);n>=0&&this.changeListeners.splice(n,1),this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}const Nd=xe.createContext(new Rd),{Provider:Mg,Consumer:NO}=Nd,Bg=Nd;class Fg extends xe.Component{constructor(t){super(t),t.cookies?this.cookies=t.cookies:this.cookies=new Rd(void 0,t.defaultSetOptions)}render(){return xe.createElement(Mg,{value:this.cookies},this.props.children)}}var zs={exports:{}},Ae={};/** @license React v16.13.1
11
11
  * react-is.production.min.js
12
12
  *
13
13
  * Copyright (c) Facebook, Inc. and its affiliates.
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var ic;function Rg(){if(ic)return Ae;ic=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,c=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function b(w){if(typeof w=="object"&&w!==null){var N=w.$$typeof;switch(N){case t:switch(w=w.type,w){case l:case f:case r:case i:case o:case h:return w;default:switch(w=w&&w.$$typeof,w){case a:case u:case p:case c:case s:return w;default:return N}}case n:return N}}}function A(w){return b(w)===f}return Ae.AsyncMode=l,Ae.ConcurrentMode=f,Ae.ContextConsumer=a,Ae.ContextProvider=s,Ae.Element=t,Ae.ForwardRef=u,Ae.Fragment=r,Ae.Lazy=p,Ae.Memo=c,Ae.Portal=n,Ae.Profiler=i,Ae.StrictMode=o,Ae.Suspense=h,Ae.isAsyncMode=function(w){return A(w)||b(w)===l},Ae.isConcurrentMode=A,Ae.isContextConsumer=function(w){return b(w)===a},Ae.isContextProvider=function(w){return b(w)===s},Ae.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ae.isForwardRef=function(w){return b(w)===u},Ae.isFragment=function(w){return b(w)===r},Ae.isLazy=function(w){return b(w)===p},Ae.isMemo=function(w){return b(w)===c},Ae.isPortal=function(w){return b(w)===n},Ae.isProfiler=function(w){return b(w)===i},Ae.isStrictMode=function(w){return b(w)===o},Ae.isSuspense=function(w){return b(w)===h},Ae.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===f||w===i||w===o||w===h||w===d||typeof w=="object"&&w!==null&&(w.$$typeof===p||w.$$typeof===c||w.$$typeof===s||w.$$typeof===a||w.$$typeof===u||w.$$typeof===_||w.$$typeof===T||w.$$typeof===E||w.$$typeof===m)},Ae.typeOf=b,Ae}var Ce={};/** @license React v16.13.1
17
+ */var uu;function Ug(){if(uu)return Ae;uu=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function b(w){if(typeof w=="object"&&w!==null){var P=w.$$typeof;switch(P){case t:switch(w=w.type,w){case l:case f:case r:case i:case o:case h:return w;default:switch(w=w&&w.$$typeof,w){case a:case c:case p:case u:case s:return w;default:return P}}case n:return P}}}function A(w){return b(w)===f}return Ae.AsyncMode=l,Ae.ConcurrentMode=f,Ae.ContextConsumer=a,Ae.ContextProvider=s,Ae.Element=t,Ae.ForwardRef=c,Ae.Fragment=r,Ae.Lazy=p,Ae.Memo=u,Ae.Portal=n,Ae.Profiler=i,Ae.StrictMode=o,Ae.Suspense=h,Ae.isAsyncMode=function(w){return A(w)||b(w)===l},Ae.isConcurrentMode=A,Ae.isContextConsumer=function(w){return b(w)===a},Ae.isContextProvider=function(w){return b(w)===s},Ae.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Ae.isForwardRef=function(w){return b(w)===c},Ae.isFragment=function(w){return b(w)===r},Ae.isLazy=function(w){return b(w)===p},Ae.isMemo=function(w){return b(w)===u},Ae.isPortal=function(w){return b(w)===n},Ae.isProfiler=function(w){return b(w)===i},Ae.isStrictMode=function(w){return b(w)===o},Ae.isSuspense=function(w){return b(w)===h},Ae.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===f||w===i||w===o||w===h||w===d||typeof w=="object"&&w!==null&&(w.$$typeof===p||w.$$typeof===u||w.$$typeof===s||w.$$typeof===a||w.$$typeof===c||w.$$typeof===E||w.$$typeof===T||w.$$typeof===_||w.$$typeof===m)},Ae.typeOf=b,Ae}var Ce={};/** @license React v16.13.1
18
18
  * react-is.development.js
19
19
  *
20
20
  * Copyright (c) Facebook, Inc. and its affiliates.
21
21
  *
22
22
  * This source code is licensed under the MIT license found in the
23
23
  * LICENSE file in the root directory of this source tree.
24
- */var oc;function Pg(){return oc||(oc=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,c=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function b(te){return typeof te=="string"||typeof te=="function"||te===r||te===f||te===i||te===o||te===h||te===d||typeof te=="object"&&te!==null&&(te.$$typeof===p||te.$$typeof===c||te.$$typeof===s||te.$$typeof===a||te.$$typeof===u||te.$$typeof===_||te.$$typeof===T||te.$$typeof===E||te.$$typeof===m)}function A(te){if(typeof te=="object"&&te!==null){var ze=te.$$typeof;switch(ze){case t:var De=te.type;switch(De){case l:case f:case r:case i:case o:case h:return De;default:var bt=De&&De.$$typeof;switch(bt){case a:case u:case p:case c:case s:return bt;default:return ze}}case n:return ze}}}var w=l,N=f,F=a,M=s,q=t,W=u,V=r,j=p,Y=c,oe=n,K=i,k=o,z=h,J=!1;function de(te){return J||(J=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),X(te)||A(te)===l}function X(te){return A(te)===f}function ee(te){return A(te)===a}function ue(te){return A(te)===s}function ce(te){return typeof te=="object"&&te!==null&&te.$$typeof===t}function Ve(te){return A(te)===u}function Q(te){return A(te)===r}function re(te){return A(te)===p}function Pe(te){return A(te)===c}function xe(te){return A(te)===n}function at(te){return A(te)===i}function ct(te){return A(te)===o}function _t(te){return A(te)===h}Ce.AsyncMode=w,Ce.ConcurrentMode=N,Ce.ContextConsumer=F,Ce.ContextProvider=M,Ce.Element=q,Ce.ForwardRef=W,Ce.Fragment=V,Ce.Lazy=j,Ce.Memo=Y,Ce.Portal=oe,Ce.Profiler=K,Ce.StrictMode=k,Ce.Suspense=z,Ce.isAsyncMode=de,Ce.isConcurrentMode=X,Ce.isContextConsumer=ee,Ce.isContextProvider=ue,Ce.isElement=ce,Ce.isForwardRef=Ve,Ce.isFragment=Q,Ce.isLazy=re,Ce.isMemo=Pe,Ce.isPortal=xe,Ce.isProfiler=at,Ce.isStrictMode=ct,Ce.isSuspense=_t,Ce.isValidElementType=b,Ce.typeOf=A}()),Ce}process.env.NODE_ENV==="production"?Hs.exports=Rg():Hs.exports=Pg();var Ig=Hs.exports,xd=Ig,Ng={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Lg={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ad={};Ad[xd.ForwardRef]=Ng;Ad[xd.Memo]=Lg;function kg(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function Cd(e){const t=G.useContext(Ag);if(!t)throw new Error("Missing <CookiesProvider>");const[n,r]=G.useState(()=>t.getAll());kg()&&G.useLayoutEffect(()=>{function a(){const l=t.getAll({doNotUpdate:!0});Bg(e||null,l,n)&&r(l)}return t.addChangeListener(a),()=>{t.removeChangeListener(a)}},[t,n]);const o=G.useMemo(()=>t.set.bind(t),[t]),i=G.useMemo(()=>t.remove.bind(t),[t]),s=G.useMemo(()=>t.update.bind(t),[t]);return[n,o,i,s]}function Bg(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}var Rd={exports:{}},oa={exports:{}},to={},ro={exports:{}},aa,ac;function Pd(){return ac||(ac=1,aa=function(t,n){return function(){for(var o=new Array(arguments.length),i=0;i<o.length;i++)o[i]=arguments[i];return t.apply(n,o)}}),aa}var sa,sc;function Xe(){if(sc)return sa;sc=1;var e=Pd(),t=Object.prototype.toString,n=function(k){return function(z){var J=t.call(z);return k[J]||(k[J]=J.slice(8,-1).toLowerCase())}}(Object.create(null));function r(k){return k=k.toLowerCase(),function(J){return n(J)===k}}function o(k){return Array.isArray(k)}function i(k){return typeof k>"u"}function s(k){return k!==null&&!i(k)&&k.constructor!==null&&!i(k.constructor)&&typeof k.constructor.isBuffer=="function"&&k.constructor.isBuffer(k)}var a=r("ArrayBuffer");function l(k){var z;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?z=ArrayBuffer.isView(k):z=k&&k.buffer&&a(k.buffer),z}function f(k){return typeof k=="string"}function u(k){return typeof k=="number"}function h(k){return k!==null&&typeof k=="object"}function d(k){if(n(k)!=="object")return!1;var z=Object.getPrototypeOf(k);return z===null||z===Object.prototype}var c=r("Date"),p=r("File"),m=r("Blob"),_=r("FileList");function T(k){return t.call(k)==="[object Function]"}function E(k){return h(k)&&T(k.pipe)}function b(k){var z="[object FormData]";return k&&(typeof FormData=="function"&&k instanceof FormData||t.call(k)===z||T(k.toString)&&k.toString()===z)}var A=r("URLSearchParams");function w(k){return k.trim?k.trim():k.replace(/^\s+|\s+$/g,"")}function N(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function F(k,z){if(!(k===null||typeof k>"u"))if(typeof k!="object"&&(k=[k]),o(k))for(var J=0,de=k.length;J<de;J++)z.call(null,k[J],J,k);else for(var X in k)Object.prototype.hasOwnProperty.call(k,X)&&z.call(null,k[X],X,k)}function M(){var k={};function z(X,ee){d(k[ee])&&d(X)?k[ee]=M(k[ee],X):d(X)?k[ee]=M({},X):o(X)?k[ee]=X.slice():k[ee]=X}for(var J=0,de=arguments.length;J<de;J++)F(arguments[J],z);return k}function q(k,z,J){return F(z,function(X,ee){J&&typeof X=="function"?k[ee]=e(X,J):k[ee]=X}),k}function W(k){return k.charCodeAt(0)===65279&&(k=k.slice(1)),k}function V(k,z,J,de){k.prototype=Object.create(z.prototype,de),k.prototype.constructor=k,J&&Object.assign(k.prototype,J)}function j(k,z,J){var de,X,ee,ue={};z=z||{};do{for(de=Object.getOwnPropertyNames(k),X=de.length;X-- >0;)ee=de[X],ue[ee]||(z[ee]=k[ee],ue[ee]=!0);k=Object.getPrototypeOf(k)}while(k&&(!J||J(k,z))&&k!==Object.prototype);return z}function Y(k,z,J){k=String(k),(J===void 0||J>k.length)&&(J=k.length),J-=z.length;var de=k.indexOf(z,J);return de!==-1&&de===J}function oe(k){if(!k)return null;var z=k.length;if(i(z))return null;for(var J=new Array(z);z-- >0;)J[z]=k[z];return J}var K=function(k){return function(z){return k&&z instanceof k}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));return sa={isArray:o,isArrayBuffer:a,isBuffer:s,isFormData:b,isArrayBufferView:l,isString:f,isNumber:u,isObject:h,isPlainObject:d,isUndefined:i,isDate:c,isFile:p,isBlob:m,isFunction:T,isStream:E,isURLSearchParams:A,isStandardBrowserEnv:N,forEach:F,merge:M,extend:q,trim:w,stripBOM:W,inherits:V,toFlatObject:j,kindOf:n,kindOfTest:r,endsWith:Y,toArray:oe,isTypedArray:K,isFileList:_},sa}var ua,uc;function Id(){if(uc)return ua;uc=1;var e=Xe();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 ua=function(r,o,i){if(!o)return r;var s;if(i)s=i(o);else if(e.isURLSearchParams(o))s=o.toString();else{var a=[];e.forEach(o,function(u,h){u===null||typeof u>"u"||(e.isArray(u)?h=h+"[]":u=[u],e.forEach(u,function(c){e.isDate(c)?c=c.toISOString():e.isObject(c)&&(c=JSON.stringify(c)),a.push(t(h)+"="+t(c))}))}),s=a.join("&")}if(s){var l=r.indexOf("#");l!==-1&&(r=r.slice(0,l)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r},ua}var ca,cc;function Mg(){if(cc)return ca;cc=1;var e=Xe();function t(){this.handlers=[]}return t.prototype.use=function(r,o,i){return this.handlers.push({fulfilled:r,rejected:o,synchronous:i?i.synchronous:!1,runWhen:i?i.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(i){i!==null&&r(i)})},ca=t,ca}var la,lc;function Fg(){if(lc)return la;lc=1;var e=Xe();return la=function(n,r){e.forEach(n,function(i,s){s!==r&&s.toUpperCase()===r.toUpperCase()&&(n[r]=i,delete n[s])})},la}var fa,fc;function Pn(){if(fc)return fa;fc=1;var e=Xe();function t(o,i,s,a,l){Error.call(this),this.message=o,this.name="AxiosError",i&&(this.code=i),s&&(this.config=s),a&&(this.request=a),l&&(this.response=l)}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(o){r[o]={value:o}}),Object.defineProperties(t,r),Object.defineProperty(n,"isAxiosError",{value:!0}),t.from=function(o,i,s,a,l,f){var u=Object.create(n);return e.toFlatObject(o,u,function(d){return d!==Error.prototype}),t.call(u,o.message,i,s,a,l),u.name=o.name,f&&Object.assign(u,f),u},fa=t,fa}var da,dc;function Nd(){return dc||(dc=1,da={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}),da}var ha,hc;function Ld(){if(hc)return ha;hc=1;var e=Xe();function t(n,r){r=r||new FormData;var o=[];function i(a){return a===null?"":e.isDate(a)?a.toISOString():e.isArrayBuffer(a)||e.isTypedArray(a)?typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function s(a,l){if(e.isPlainObject(a)||e.isArray(a)){if(o.indexOf(a)!==-1)throw Error("Circular reference detected in "+l);o.push(a),e.forEach(a,function(u,h){if(!e.isUndefined(u)){var d=l?l+"."+h:h,c;if(u&&!l&&typeof u=="object"){if(e.endsWith(h,"{}"))u=JSON.stringify(u);else if(e.endsWith(h,"[]")&&(c=e.toArray(u))){c.forEach(function(p){!e.isUndefined(p)&&r.append(d,i(p))});return}}s(u,d)}}),o.pop()}else r.append(l,i(a))}return s(n),r}return ha=t,ha}var pa,pc;function Ug(){if(pc)return pa;pc=1;var e=Pn();return pa=function(n,r,o){var i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):r(new e("Request failed with status code "+o.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))},pa}var ma,mc;function Dg(){if(mc)return ma;mc=1;var e=Xe();return ma=e.isStandardBrowserEnv()?function(){return{write:function(r,o,i,s,a,l){var f=[];f.push(r+"="+encodeURIComponent(o)),e.isNumber(i)&&f.push("expires="+new Date(i).toGMTString()),e.isString(s)&&f.push("path="+s),e.isString(a)&&f.push("domain="+a),l===!0&&f.push("secure"),document.cookie=f.join("; ")},read:function(r){var o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),ma}var ga,gc;function $g(){return gc||(gc=1,ga=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),ga}var ya,yc;function jg(){return yc||(yc=1,ya=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t}),ya}var va,vc;function kd(){if(vc)return va;vc=1;var e=$g(),t=jg();return va=function(r,o){return r&&!e(o)?t(r,o):o},va}var Ea,Ec;function Hg(){if(Ec)return Ea;Ec=1;var e=Xe(),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 Ea=function(r){var o={},i,s,a;return r&&e.forEach(r.split(`
25
- `),function(f){if(a=f.indexOf(":"),i=e.trim(f.substr(0,a)).toLowerCase(),s=e.trim(f.substr(a+1)),i){if(o[i]&&t.indexOf(i)>=0)return;i==="set-cookie"?o[i]=(o[i]?o[i]:[]).concat([s]):o[i]=o[i]?o[i]+", "+s:s}}),o},Ea}var _a,_c;function qg(){if(_c)return _a;_c=1;var e=Xe();return _a=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),o;function i(s){var a=s;return n&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{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 o=i(window.location.href),function(a){var l=e.isString(a)?i(a):a;return l.protocol===o.protocol&&l.host===o.host}}():function(){return function(){return!0}}(),_a}var ba,bc;function Go(){if(bc)return ba;bc=1;var e=Pn(),t=Xe();function n(r){e.call(this,r??"canceled",e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(n,e,{__CANCEL__:!0}),ba=n,ba}var wa,wc;function Gg(){return wc||(wc=1,wa=function(t){var n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}),wa}var Sa,Sc;function Tc(){if(Sc)return Sa;Sc=1;var e=Xe(),t=Ug(),n=Dg(),r=Id(),o=kd(),i=Hg(),s=qg(),a=Nd(),l=Pn(),f=Go(),u=Gg();return Sa=function(d){return new Promise(function(p,m){var _=d.data,T=d.headers,E=d.responseType,b;function A(){d.cancelToken&&d.cancelToken.unsubscribe(b),d.signal&&d.signal.removeEventListener("abort",b)}e.isFormData(_)&&e.isStandardBrowserEnv()&&delete T["Content-Type"];var w=new XMLHttpRequest;if(d.auth){var N=d.auth.username||"",F=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";T.Authorization="Basic "+btoa(N+":"+F)}var M=o(d.baseURL,d.url);w.open(d.method.toUpperCase(),r(M,d.params,d.paramsSerializer),!0),w.timeout=d.timeout;function q(){if(w){var j="getAllResponseHeaders"in w?i(w.getAllResponseHeaders()):null,Y=!E||E==="text"||E==="json"?w.responseText:w.response,oe={data:Y,status:w.status,statusText:w.statusText,headers:j,config:d,request:w};t(function(k){p(k),A()},function(k){m(k),A()},oe),w=null}}if("onloadend"in w?w.onloadend=q:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(q)},w.onabort=function(){w&&(m(new l("Request aborted",l.ECONNABORTED,d,w)),w=null)},w.onerror=function(){m(new l("Network Error",l.ERR_NETWORK,d,w,w)),w=null},w.ontimeout=function(){var Y=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",oe=d.transitional||a;d.timeoutErrorMessage&&(Y=d.timeoutErrorMessage),m(new l(Y,oe.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,d,w)),w=null},e.isStandardBrowserEnv()){var W=(d.withCredentials||s(M))&&d.xsrfCookieName?n.read(d.xsrfCookieName):void 0;W&&(T[d.xsrfHeaderName]=W)}"setRequestHeader"in w&&e.forEach(T,function(Y,oe){typeof _>"u"&&oe.toLowerCase()==="content-type"?delete T[oe]:w.setRequestHeader(oe,Y)}),e.isUndefined(d.withCredentials)||(w.withCredentials=!!d.withCredentials),E&&E!=="json"&&(w.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&w.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(b=function(j){w&&(m(!j||j&&j.type?new f:j),w.abort(),w=null)},d.cancelToken&&d.cancelToken.subscribe(b),d.signal&&(d.signal.aborted?b():d.signal.addEventListener("abort",b))),_||(_=null);var V=u(M);if(V&&["http","https","file"].indexOf(V)===-1){m(new l("Unsupported protocol "+V+":",l.ERR_BAD_REQUEST,d));return}w.send(_)})},Sa}var Ta,Oc;function Wg(){return Oc||(Oc=1,Ta=null),Ta}var Oa,xc;function _u(){if(xc)return Oa;xc=1;var e=Xe(),t=Fg(),n=Pn(),r=Nd(),o=Ld(),i={"Content-Type":"application/x-www-form-urlencoded"};function s(u,h){!e.isUndefined(u)&&e.isUndefined(u["Content-Type"])&&(u["Content-Type"]=h)}function a(){var u;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(u=Tc()),u}function l(u,h,d){if(e.isString(u))try{return(h||JSON.parse)(u),e.trim(u)}catch(c){if(c.name!=="SyntaxError")throw c}return(d||JSON.stringify)(u)}var f={transitional:r,adapter:a(),transformRequest:[function(h,d){if(t(d,"Accept"),t(d,"Content-Type"),e.isFormData(h)||e.isArrayBuffer(h)||e.isBuffer(h)||e.isStream(h)||e.isFile(h)||e.isBlob(h))return h;if(e.isArrayBufferView(h))return h.buffer;if(e.isURLSearchParams(h))return s(d,"application/x-www-form-urlencoded;charset=utf-8"),h.toString();var c=e.isObject(h),p=d&&d["Content-Type"],m;if((m=e.isFileList(h))||c&&p==="multipart/form-data"){var _=this.env&&this.env.FormData;return o(m?{"files[]":h}:h,_&&new _)}else if(c||p==="application/json")return s(d,"application/json"),l(h);return h}],transformResponse:[function(h){var d=this.transitional||f.transitional,c=d&&d.silentJSONParsing,p=d&&d.forcedJSONParsing,m=!c&&this.responseType==="json";if(m||p&&e.isString(h)&&h.length)try{return JSON.parse(h)}catch(_){if(m)throw _.name==="SyntaxError"?n.from(_,n.ERR_BAD_RESPONSE,this,null,this.response):_}return h}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wg()},validateStatus:function(h){return h>=200&&h<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(h){f.headers[h]={}}),e.forEach(["post","put","patch"],function(h){f.headers[h]=e.merge(i)}),Oa=f,Oa}var xa,Ac;function Vg(){if(Ac)return xa;Ac=1;var e=Xe(),t=_u();return xa=function(r,o,i){var s=this||t;return e.forEach(i,function(l){r=l.call(s,r,o)}),r},xa}var Aa,Cc;function Bd(){return Cc||(Cc=1,Aa=function(t){return!!(t&&t.__CANCEL__)}),Aa}var Ca,Rc;function zg(){if(Rc)return Ca;Rc=1;var e=Xe(),t=Vg(),n=Bd(),r=_u(),o=Go();function i(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new o}return Ca=function(a){i(a),a.headers=a.headers||{},a.data=t.call(a,a.data,a.headers,a.transformRequest),a.headers=e.merge(a.headers.common||{},a.headers[a.method]||{},a.headers),e.forEach(["delete","get","head","post","put","patch","common"],function(u){delete a.headers[u]});var l=a.adapter||r.adapter;return l(a).then(function(u){return i(a),u.data=t.call(a,u.data,u.headers,a.transformResponse),u},function(u){return n(u)||(i(a),u&&u.response&&(u.response.data=t.call(a,u.response.data,u.response.headers,a.transformResponse))),Promise.reject(u)})},Ca}var Ra,Pc;function Md(){if(Pc)return Ra;Pc=1;var e=Xe();return Ra=function(n,r){r=r||{};var o={};function i(h,d){return e.isPlainObject(h)&&e.isPlainObject(d)?e.merge(h,d):e.isPlainObject(d)?e.merge({},d):e.isArray(d)?d.slice():d}function s(h){if(e.isUndefined(r[h])){if(!e.isUndefined(n[h]))return i(void 0,n[h])}else return i(n[h],r[h])}function a(h){if(!e.isUndefined(r[h]))return i(void 0,r[h])}function l(h){if(e.isUndefined(r[h])){if(!e.isUndefined(n[h]))return i(void 0,n[h])}else return i(void 0,r[h])}function f(h){if(h in r)return i(n[h],r[h]);if(h in n)return i(void 0,n[h])}var u={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:f};return e.forEach(Object.keys(n).concat(Object.keys(r)),function(d){var c=u[d]||s,p=c(d);e.isUndefined(p)&&c!==f||(o[d]=p)}),o},Ra}var Pa,Ic;function Fd(){return Ic||(Ic=1,Pa={version:"0.27.2"}),Pa}var Ia,Nc;function Yg(){if(Nc)return Ia;Nc=1;var e=Fd().version,t=Pn(),n={};["object","boolean","number","function","string","symbol"].forEach(function(i,s){n[i]=function(l){return typeof l===i||"a"+(s<1?"n ":" ")+i}});var r={};n.transitional=function(s,a,l){function f(u,h){return"[Axios v"+e+"] Transitional option '"+u+"'"+h+(l?". "+l:"")}return function(u,h,d){if(s===!1)throw new t(f(h," has been removed"+(a?" in "+a:"")),t.ERR_DEPRECATED);return a&&!r[h]&&(r[h]=!0,console.warn(f(h," has been deprecated since v"+a+" and will be removed in the near future"))),s?s(u,h,d):!0}};function o(i,s,a){if(typeof i!="object")throw new t("options must be an object",t.ERR_BAD_OPTION_VALUE);for(var l=Object.keys(i),f=l.length;f-- >0;){var u=l[f],h=s[u];if(h){var d=i[u],c=d===void 0||h(d,u,i);if(c!==!0)throw new t("option "+u+" must be "+c,t.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new t("Unknown option "+u,t.ERR_BAD_OPTION)}}return Ia={assertOptions:o,validators:n},Ia}var Na,Lc;function Kg(){if(Lc)return Na;Lc=1;var e=Xe(),t=Id(),n=Mg(),r=zg(),o=Md(),i=kd(),s=Yg(),a=s.validators;function l(f){this.defaults=f,this.interceptors={request:new n,response:new n}}return l.prototype.request=function(u,h){typeof u=="string"?(h=h||{},h.url=u):h=u||{},h=o(this.defaults,h),h.method?h.method=h.method.toLowerCase():this.defaults.method?h.method=this.defaults.method.toLowerCase():h.method="get";var d=h.transitional;d!==void 0&&s.assertOptions(d,{silentJSONParsing:a.transitional(a.boolean),forcedJSONParsing:a.transitional(a.boolean),clarifyTimeoutError:a.transitional(a.boolean)},!1);var c=[],p=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(h)===!1||(p=p&&N.synchronous,c.unshift(N.fulfilled,N.rejected))});var m=[];this.interceptors.response.forEach(function(N){m.push(N.fulfilled,N.rejected)});var _;if(!p){var T=[r,void 0];for(Array.prototype.unshift.apply(T,c),T=T.concat(m),_=Promise.resolve(h);T.length;)_=_.then(T.shift(),T.shift());return _}for(var E=h;c.length;){var b=c.shift(),A=c.shift();try{E=b(E)}catch(w){A(w);break}}try{_=r(E)}catch(w){return Promise.reject(w)}for(;m.length;)_=_.then(m.shift(),m.shift());return _},l.prototype.getUri=function(u){u=o(this.defaults,u);var h=i(u.baseURL,u.url);return t(h,u.params,u.paramsSerializer)},e.forEach(["delete","get","head","options"],function(u){l.prototype[u]=function(h,d){return this.request(o(d||{},{method:u,url:h,data:(d||{}).data}))}}),e.forEach(["post","put","patch"],function(u){function h(d){return function(p,m,_){return this.request(o(_||{},{method:u,headers:d?{"Content-Type":"multipart/form-data"}:{},url:p,data:m}))}}l.prototype[u]=h(),l.prototype[u+"Form"]=h(!0)}),Na=l,Na}var La,kc;function Qg(){if(kc)return La;kc=1;var e=Go();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(s){r=s});var o=this;this.promise.then(function(i){if(o._listeners){var s,a=o._listeners.length;for(s=0;s<a;s++)o._listeners[s](i);o._listeners=null}}),this.promise.then=function(i){var s,a=new Promise(function(l){o.subscribe(l),s=l}).then(i);return a.cancel=function(){o.unsubscribe(s)},a},n(function(s){o.reason||(o.reason=new e(s),r(o.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 o=this._listeners.indexOf(r);o!==-1&&this._listeners.splice(o,1)}},t.source=function(){var r,o=new t(function(s){r=s});return{token:o,cancel:r}},La=t,La}var ka,Bc;function Xg(){return Bc||(Bc=1,ka=function(t){return function(r){return t.apply(null,r)}}),ka}var Ba,Mc;function Jg(){if(Mc)return Ba;Mc=1;var e=Xe();return Ba=function(n){return e.isObject(n)&&n.isAxiosError===!0},Ba}var Fc;function Zg(){if(Fc)return ro.exports;Fc=1;var e=Xe(),t=Pd(),n=Kg(),r=Md(),o=_u();function i(a){var l=new n(a),f=t(n.prototype.request,l);return e.extend(f,n.prototype,l),e.extend(f,l),f.create=function(h){return i(r(a,h))},f}var s=i(o);return s.Axios=n,s.CanceledError=Go(),s.CancelToken=Qg(),s.isCancel=Bd(),s.VERSION=Fd().version,s.toFormData=Ld(),s.AxiosError=Pn(),s.Cancel=s.CanceledError,s.all=function(l){return Promise.all(l)},s.spread=Xg(),s.isAxiosError=Jg(),ro.exports=s,ro.exports.default=s,ro.exports}var Ma,Uc;function Ud(){return Uc||(Uc=1,Ma=Zg()),Ma}var ey=Function.prototype.toString,Fa=Object.create,ty=Object.defineProperty,ry=Object.getOwnPropertyDescriptor,Dc=Object.getOwnPropertyNames,bu=Object.getOwnPropertySymbols,ny=Object.getPrototypeOf,Dd=Object.prototype,iy=Dd.hasOwnProperty,oy=Dd.propertyIsEnumerable,$d=typeof bu=="function",ay=typeof WeakMap=="function",sy=function(){if(ay)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}}(),jd=function(e,t){var n=e.__proto__||ny(e);if(!n)return Fa(null);var r=n.constructor;if(r===t.Object)return n===t.Object.prototype?{}:Fa(n);if(~ey.call(r).indexOf("[native code]"))try{return new r}catch{}return Fa(n)},uy=function(e,t,n,r){var o=jd(e,t);r.set(e,o);for(var i in e)iy.call(e,i)&&(o[i]=n(e[i],r));if($d)for(var s=bu(e),a=0,l=s.length,f=void 0;a<l;++a)f=s[a],oy.call(e,f)&&(o[f]=n(e[f],r));return o},$c=function(e,t,n,r){var o=jd(e,t);r.set(e,o);for(var i=$d?Dc(e).concat(bu(e)):Dc(e),s=0,a=i.length,l=void 0,f=void 0;s<a;++s)if(l=i[s],l!=="callee"&&l!=="caller")if(f=ry(e,l),f){!f.get&&!f.set&&(f.value=n(e[l],r));try{ty(o,l,f)}catch{o[l]=f.value}}else o[l]=n(e[l],r);return o},cy=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},ly=Array.isArray,fy=Object.getPrototypeOf,dy=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 yr(e,t){var n=!!(t&&t.isStrict),r=t&&t.realm||dy,o=n?$c:uy,i=function(s,a){if(!s||typeof s!="object")return s;if(a.has(s))return a.get(s);var l=s.__proto__||fy(s),f=l&&l.constructor;if(!f||f===r.Object)return o(s,r,i,a);var u;if(ly(s)){if(n)return $c(s,r,i,a);u=new f,a.set(s,u);for(var h=0,d=s.length;h<d;++h)u[h]=i(s[h],a);return u}if(s instanceof r.Date)return new f(s.getTime());if(s instanceof r.RegExp)return u=new f(s.source,s.flags||cy(s)),u.lastIndex=s.lastIndex,u;if(r.Map&&s instanceof r.Map)return u=new f,a.set(s,u),s.forEach(function(c,p){u.set(p,i(c,a))}),u;if(r.Set&&s instanceof r.Set)return u=new f,a.set(s,u),s.forEach(function(c){u.add(i(c,a))}),u;if(r.Blob&&s instanceof r.Blob)return s.slice(0,s.size,s.type);if(r.Buffer&&r.Buffer.isBuffer(s))return u=r.Buffer.allocUnsafe?r.Buffer.allocUnsafe(s.length):new f(s.length),a.set(s,u),s.copy(u),u;if(r.ArrayBuffer){if(r.ArrayBuffer.isView(s))return u=new f(s.buffer.slice(0)),a.set(s,u),u;if(s instanceof r.ArrayBuffer)return u=s.slice(0),a.set(s,u),u}return typeof s.then=="function"||s instanceof Error||r.WeakMap&&s instanceof r.WeakMap||r.WeakSet&&s instanceof r.WeakSet?s:o(s,r,i,a)};return i(e,sy())}yr.default=yr;yr.strict=function(t,n){return yr(t,{isStrict:!0,realm:n?n.realm:void 0})};var hy=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 o=42;t[n]=o;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 i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},jc=typeof Symbol<"u"&&Symbol,py=hy,my=function(){return typeof jc!="function"||typeof Symbol!="function"||typeof jc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:py()},Hc={foo:{}},gy=Object,yy=function(){return{__proto__:Hc}.foo===Hc.foo&&!({__proto__:null}instanceof gy)},vy="Function.prototype.bind called on incompatible ",Ua=Array.prototype.slice,Ey=Object.prototype.toString,_y="[object Function]",by=function(t){var n=this;if(typeof n!="function"||Ey.call(n)!==_y)throw new TypeError(vy+n);for(var r=Ua.call(arguments,1),o,i=function(){if(this instanceof o){var u=n.apply(this,r.concat(Ua.call(arguments)));return Object(u)===u?u:this}else return n.apply(t,r.concat(Ua.call(arguments)))},s=Math.max(0,n.length-r.length),a=[],l=0;l<s;l++)a.push("$"+l);if(o=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var f=function(){};f.prototype=n.prototype,o.prototype=new f,f.prototype=null}return o},wy=by,wu=Function.prototype.bind||wy,Sy=wu,Ty=Sy.call(Function.call,Object.prototype.hasOwnProperty),ge,On=SyntaxError,Hd=Function,Tn=TypeError,Da=function(e){try{return Hd('"use strict"; return ('+e+").constructor;")()}catch{}},Kr=Object.getOwnPropertyDescriptor;if(Kr)try{Kr({},"")}catch{Kr=null}var $a=function(){throw new Tn},Oy=Kr?function(){try{return arguments.callee,$a}catch{try{return Kr(arguments,"callee").get}catch{return $a}}}():$a,vn=my(),xy=yy(),We=Object.getPrototypeOf||(xy?function(e){return e.__proto__}:null),bn={},Ay=typeof Uint8Array>"u"||!We?ge:We(Uint8Array),Qr={"%AggregateError%":typeof AggregateError>"u"?ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ge:ArrayBuffer,"%ArrayIteratorPrototype%":vn&&We?We([][Symbol.iterator]()):ge,"%AsyncFromSyncIteratorPrototype%":ge,"%AsyncFunction%":bn,"%AsyncGenerator%":bn,"%AsyncGeneratorFunction%":bn,"%AsyncIteratorPrototype%":bn,"%Atomics%":typeof Atomics>"u"?ge:Atomics,"%BigInt%":typeof BigInt>"u"?ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ge:FinalizationRegistry,"%Function%":Hd,"%GeneratorFunction%":bn,"%Int8Array%":typeof Int8Array>"u"?ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":vn&&We?We(We([][Symbol.iterator]())):ge,"%JSON%":typeof JSON=="object"?JSON:ge,"%Map%":typeof Map>"u"?ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!vn||!We?ge:We(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ge:Promise,"%Proxy%":typeof Proxy>"u"?ge:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!vn||!We?ge:We(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":vn&&We?We(""[Symbol.iterator]()):ge,"%Symbol%":vn?Symbol:ge,"%SyntaxError%":On,"%ThrowTypeError%":Oy,"%TypedArray%":Ay,"%TypeError%":Tn,"%Uint8Array%":typeof Uint8Array>"u"?ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ge:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ge:WeakSet};if(We)try{null.error}catch(e){var Cy=We(We(e));Qr["%Error.prototype%"]=Cy}var Ry=function e(t){var n;if(t==="%AsyncFunction%")n=Da("async function () {}");else if(t==="%GeneratorFunction%")n=Da("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=Da("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&We&&(n=We(o.prototype))}return Qr[t]=n,n},qc={"%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"]},Vi=wu,No=Ty,Py=Vi.call(Function.call,Array.prototype.concat),Iy=Vi.call(Function.apply,Array.prototype.splice),Gc=Vi.call(Function.call,String.prototype.replace),Lo=Vi.call(Function.call,String.prototype.slice),Ny=Vi.call(Function.call,RegExp.prototype.exec),Ly=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ky=/\\(\\)?/g,By=function(t){var n=Lo(t,0,1),r=Lo(t,-1);if(n==="%"&&r!=="%")throw new On("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new On("invalid intrinsic syntax, expected opening `%`");var o=[];return Gc(t,Ly,function(i,s,a,l){o[o.length]=a?Gc(l,ky,"$1"):s||i}),o},My=function(t,n){var r=t,o;if(No(qc,r)&&(o=qc[r],r="%"+o[0]+"%"),No(Qr,r)){var i=Qr[r];if(i===bn&&(i=Ry(r)),typeof i>"u"&&!n)throw new Tn("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new On("intrinsic "+t+" does not exist!")},Su=function(t,n){if(typeof t!="string"||t.length===0)throw new Tn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Tn('"allowMissing" argument must be a boolean');if(Ny(/^%?[^%]*%?$/,t)===null)throw new On("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=By(t),o=r.length>0?r[0]:"",i=My("%"+o+"%",n),s=i.name,a=i.value,l=!1,f=i.alias;f&&(o=f[0],Iy(r,Py([0,1],f)));for(var u=1,h=!0;u<r.length;u+=1){var d=r[u],c=Lo(d,0,1),p=Lo(d,-1);if((c==='"'||c==="'"||c==="`"||p==='"'||p==="'"||p==="`")&&c!==p)throw new On("property names with quotes must have matching quotes");if((d==="constructor"||!h)&&(l=!0),o+="."+d,s="%"+o+"%",No(Qr,s))a=Qr[s];else if(a!=null){if(!(d in a)){if(!n)throw new Tn("base intrinsic for "+t+" exists, but the property is not available.");return}if(Kr&&u+1>=r.length){var m=Kr(a,d);h=!!m,h&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else h=No(a,d),a=a[d];h&&!l&&(Qr[s]=a)}}return a},qd={exports:{}};(function(e){var t=wu,n=Su,r=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||t.call(o,r),s=n("%Object.getOwnPropertyDescriptor%",!0),a=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}e.exports=function(h){var d=i(t,o,arguments);if(s&&a){var c=s(d,"length");c.configurable&&a(d,"length",{value:1+l(0,h.length-(arguments.length-1))})}return d};var f=function(){return i(t,r,arguments)};a?a(e.exports,"apply",{value:f}):e.exports.apply=f})(qd);var Fy=qd.exports,Gd=Su,Wd=Fy,Uy=Wd(Gd("String.prototype.indexOf")),Dy=function(t,n){var r=Gd(t,!!n);return typeof r=="function"&&Uy(t,".prototype.")>-1?Wd(r):r};const $y={},jy=Object.freeze(Object.defineProperty({__proto__:null,default:$y},Symbol.toStringTag,{value:"Module"})),Hy=Wi(jy);var Tu=typeof Map=="function"&&Map.prototype,ja=Object.getOwnPropertyDescriptor&&Tu?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ko=Tu&&ja&&typeof ja.get=="function"?ja.get:null,Wc=Tu&&Map.prototype.forEach,Ou=typeof Set=="function"&&Set.prototype,Ha=Object.getOwnPropertyDescriptor&&Ou?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Bo=Ou&&Ha&&typeof Ha.get=="function"?Ha.get:null,Vc=Ou&&Set.prototype.forEach,qy=typeof WeakMap=="function"&&WeakMap.prototype,Fi=qy?WeakMap.prototype.has:null,Gy=typeof WeakSet=="function"&&WeakSet.prototype,Ui=Gy?WeakSet.prototype.has:null,Wy=typeof WeakRef=="function"&&WeakRef.prototype,zc=Wy?WeakRef.prototype.deref:null,Vy=Boolean.prototype.valueOf,zy=Object.prototype.toString,Yy=Function.prototype.toString,Ky=String.prototype.match,xu=String.prototype.slice,gr=String.prototype.replace,Qy=String.prototype.toUpperCase,Yc=String.prototype.toLowerCase,Vd=RegExp.prototype.test,Kc=Array.prototype.concat,Ut=Array.prototype.join,Xy=Array.prototype.slice,Qc=Math.floor,qs=typeof BigInt=="function"?BigInt.prototype.valueOf:null,qa=Object.getOwnPropertySymbols,Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,xn=typeof Symbol=="function"&&typeof Symbol.iterator=="object",et=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===xn||"symbol")?Symbol.toStringTag:null,zd=Object.prototype.propertyIsEnumerable,Xc=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Jc(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Vd.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-Qc(-e):Qc(e);if(r!==e){var o=String(r),i=xu.call(t,o.length+1);return gr.call(o,n,"$&_")+"."+gr.call(gr.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return gr.call(t,n,"$&_")}var Ws=Hy,Zc=Ws.custom,el=Kd(Zc)?Zc:null,Jy=function e(t,n,r,o){var i=n||{};if(mr(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(mr(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=mr(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(mr(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(mr(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.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 Xd(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?Jc(t,l):l}if(typeof t=="bigint"){var f=String(t)+"n";return a?Jc(t,f):f}var u=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return Vs(t)?"[Array]":"[Object]";var h=gv(i,r);if(typeof o>"u")o=[];else if(Qd(o,t)>=0)return"[Circular]";function d(Y,oe,K){if(oe&&(o=Xy.call(o),o.push(oe)),K){var k={depth:i.depth};return mr(i,"quoteStyle")&&(k.quoteStyle=i.quoteStyle),e(Y,k,r+1,o)}return e(Y,i,r+1,o)}if(typeof t=="function"&&!tl(t)){var c=sv(t),p=no(t,d);return"[Function"+(c?": "+c:" (anonymous)")+"]"+(p.length>0?" { "+Ut.call(p,", ")+" }":"")}if(Kd(t)){var m=xn?gr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Gs.call(t);return typeof t=="object"&&!xn?fi(m):m}if(hv(t)){for(var _="<"+Yc.call(String(t.nodeName)),T=t.attributes||[],E=0;E<T.length;E++)_+=" "+T[E].name+"="+Yd(Zy(T[E].value),"double",i);return _+=">",t.childNodes&&t.childNodes.length&&(_+="..."),_+="</"+Yc.call(String(t.nodeName))+">",_}if(Vs(t)){if(t.length===0)return"[]";var b=no(t,d);return h&&!mv(b)?"["+zs(b,h)+"]":"[ "+Ut.call(b,", ")+" ]"}if(tv(t)){var A=no(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!zd.call(t,"cause")?"{ ["+String(t)+"] "+Ut.call(Kc.call("[cause]: "+d(t.cause),A),", ")+" }":A.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Ut.call(A,", ")+" }"}if(typeof t=="object"&&s){if(el&&typeof t[el]=="function"&&Ws)return Ws(t,{depth:u-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(uv(t)){var w=[];return Wc&&Wc.call(t,function(Y,oe){w.push(d(oe,t,!0)+" => "+d(Y,t))}),rl("Map",ko.call(t),w,h)}if(fv(t)){var N=[];return Vc&&Vc.call(t,function(Y){N.push(d(Y,t))}),rl("Set",Bo.call(t),N,h)}if(cv(t))return Ga("WeakMap");if(dv(t))return Ga("WeakSet");if(lv(t))return Ga("WeakRef");if(nv(t))return fi(d(Number(t)));if(ov(t))return fi(d(qs.call(t)));if(iv(t))return fi(Vy.call(t));if(rv(t))return fi(d(String(t)));if(!ev(t)&&!tl(t)){var F=no(t,d),M=Xc?Xc(t)===Object.prototype:t instanceof Object||t.constructor===Object,q=t instanceof Object?"":"null prototype",W=!M&&et&&Object(t)===t&&et in t?xu.call(Er(t),8,-1):q?"Object":"",V=M||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",j=V+(W||q?"["+Ut.call(Kc.call([],W||[],q||[]),": ")+"] ":"");return F.length===0?j+"{}":h?j+"{"+zs(F,h)+"}":j+"{ "+Ut.call(F,", ")+" }"}return String(t)};function Yd(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function Zy(e){return gr.call(String(e),/"/g,"&quot;")}function Vs(e){return Er(e)==="[object Array]"&&(!et||!(typeof e=="object"&&et in e))}function ev(e){return Er(e)==="[object Date]"&&(!et||!(typeof e=="object"&&et in e))}function tl(e){return Er(e)==="[object RegExp]"&&(!et||!(typeof e=="object"&&et in e))}function tv(e){return Er(e)==="[object Error]"&&(!et||!(typeof e=="object"&&et in e))}function rv(e){return Er(e)==="[object String]"&&(!et||!(typeof e=="object"&&et in e))}function nv(e){return Er(e)==="[object Number]"&&(!et||!(typeof e=="object"&&et in e))}function iv(e){return Er(e)==="[object Boolean]"&&(!et||!(typeof e=="object"&&et in e))}function Kd(e){if(xn)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Gs)return!1;try{return Gs.call(e),!0}catch{}return!1}function ov(e){if(!e||typeof e!="object"||!qs)return!1;try{return qs.call(e),!0}catch{}return!1}var av=Object.prototype.hasOwnProperty||function(e){return e in this};function mr(e,t){return av.call(e,t)}function Er(e){return zy.call(e)}function sv(e){if(e.name)return e.name;var t=Ky.call(Yy.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Qd(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 uv(e){if(!ko||!e||typeof e!="object")return!1;try{ko.call(e);try{Bo.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function cv(e){if(!Fi||!e||typeof e!="object")return!1;try{Fi.call(e,Fi);try{Ui.call(e,Ui)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function lv(e){if(!zc||!e||typeof e!="object")return!1;try{return zc.call(e),!0}catch{}return!1}function fv(e){if(!Bo||!e||typeof e!="object")return!1;try{Bo.call(e);try{ko.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function dv(e){if(!Ui||!e||typeof e!="object")return!1;try{Ui.call(e,Ui);try{Fi.call(e,Fi)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function hv(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Xd(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Xd(xu.call(e,0,t.maxStringLength),t)+r}var o=gr.call(gr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,pv);return Yd(o,"single",t)}function pv(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":"")+Qy.call(t.toString(16))}function fi(e){return"Object("+e+")"}function Ga(e){return e+" { ? }"}function rl(e,t,n,r){var o=r?zs(n,r):Ut.call(n,", ");return e+" ("+t+") {"+o+"}"}function mv(e){for(var t=0;t<e.length;t++)if(Qd(e[t],`
26
- `)>=0)return!1;return!0}function gv(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Ut.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Ut.call(Array(t+1),n)}}function zs(e,t){if(e.length===0)return"";var n=`
24
+ */var lu;function Dg(){return lu||(lu=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,E=e?Symbol.for("react.fundamental"):60117,T=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function b(te){return typeof te=="string"||typeof te=="function"||te===r||te===f||te===i||te===o||te===h||te===d||typeof te=="object"&&te!==null&&(te.$$typeof===p||te.$$typeof===u||te.$$typeof===s||te.$$typeof===a||te.$$typeof===c||te.$$typeof===E||te.$$typeof===T||te.$$typeof===_||te.$$typeof===m)}function A(te){if(typeof te=="object"&&te!==null){var Ye=te.$$typeof;switch(Ye){case t:var $e=te.type;switch($e){case l:case f:case r:case i:case o:case h:return $e;default:var bt=$e&&$e.$$typeof;switch(bt){case a:case c:case p:case u:case s:return bt;default:return Ye}}case n:return Ye}}}var w=l,P=f,F=a,B=s,W=t,G=c,V=r,H=p,Y=u,oe=n,K=i,k=o,z=h,J=!1;function ae(te){return J||(J=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Q(te)||A(te)===l}function Q(te){return A(te)===f}function Z(te){return A(te)===a}function ce(te){return A(te)===s}function le(te){return typeof te=="object"&&te!==null&&te.$$typeof===t}function ze(te){return A(te)===c}function X(te){return A(te)===r}function re(te){return A(te)===p}function Pe(te){return A(te)===u}function Oe(te){return A(te)===n}function st(te){return A(te)===i}function ut(te){return A(te)===o}function Et(te){return A(te)===h}Ce.AsyncMode=w,Ce.ConcurrentMode=P,Ce.ContextConsumer=F,Ce.ContextProvider=B,Ce.Element=W,Ce.ForwardRef=G,Ce.Fragment=V,Ce.Lazy=H,Ce.Memo=Y,Ce.Portal=oe,Ce.Profiler=K,Ce.StrictMode=k,Ce.Suspense=z,Ce.isAsyncMode=ae,Ce.isConcurrentMode=Q,Ce.isContextConsumer=Z,Ce.isContextProvider=ce,Ce.isElement=le,Ce.isForwardRef=ze,Ce.isFragment=X,Ce.isLazy=re,Ce.isMemo=Pe,Ce.isPortal=Oe,Ce.isProfiler=st,Ce.isStrictMode=ut,Ce.isSuspense=Et,Ce.isValidElementType=b,Ce.typeOf=A}()),Ce}process.env.NODE_ENV==="production"?zs.exports=Ug():zs.exports=Dg();var $g=zs.exports,Pd=$g,jg={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Hg={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Id={};Id[Pd.ForwardRef]=jg;Id[Pd.Memo]=Hg;function qg(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function Ld(e){const t=$.useContext(Bg);if(!t)throw new Error("Missing <CookiesProvider>");const[n,r]=$.useState(()=>t.getAll());qg()&&$.useLayoutEffect(()=>{function a(){const l=t.getAll({doNotUpdate:!0});Gg(e||null,l,n)&&r(l)}return t.addChangeListener(a),()=>{t.removeChangeListener(a)}},[t,n]);const o=$.useMemo(()=>t.set.bind(t),[t]),i=$.useMemo(()=>t.remove.bind(t),[t]),s=$.useMemo(()=>t.update.bind(t),[t]);return[n,o,i,s]}function Gg(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}var kd={exports:{}},ua={exports:{}},io={},oo={exports:{}},la,fu;function Md(){return fu||(fu=1,la=function(t,n){return function(){for(var o=new Array(arguments.length),i=0;i<o.length;i++)o[i]=arguments[i];return t.apply(n,o)}}),la}var fa,du;function Je(){if(du)return fa;du=1;var e=Md(),t=Object.prototype.toString,n=function(k){return function(z){var J=t.call(z);return k[J]||(k[J]=J.slice(8,-1).toLowerCase())}}(Object.create(null));function r(k){return k=k.toLowerCase(),function(J){return n(J)===k}}function o(k){return Array.isArray(k)}function i(k){return typeof k>"u"}function s(k){return k!==null&&!i(k)&&k.constructor!==null&&!i(k.constructor)&&typeof k.constructor.isBuffer=="function"&&k.constructor.isBuffer(k)}var a=r("ArrayBuffer");function l(k){var z;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?z=ArrayBuffer.isView(k):z=k&&k.buffer&&a(k.buffer),z}function f(k){return typeof k=="string"}function c(k){return typeof k=="number"}function h(k){return k!==null&&typeof k=="object"}function d(k){if(n(k)!=="object")return!1;var z=Object.getPrototypeOf(k);return z===null||z===Object.prototype}var u=r("Date"),p=r("File"),m=r("Blob"),E=r("FileList");function T(k){return t.call(k)==="[object Function]"}function _(k){return h(k)&&T(k.pipe)}function b(k){var z="[object FormData]";return k&&(typeof FormData=="function"&&k instanceof FormData||t.call(k)===z||T(k.toString)&&k.toString()===z)}var A=r("URLSearchParams");function w(k){return k.trim?k.trim():k.replace(/^\s+|\s+$/g,"")}function P(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function F(k,z){if(!(k===null||typeof k>"u"))if(typeof k!="object"&&(k=[k]),o(k))for(var J=0,ae=k.length;J<ae;J++)z.call(null,k[J],J,k);else for(var Q in k)Object.prototype.hasOwnProperty.call(k,Q)&&z.call(null,k[Q],Q,k)}function B(){var k={};function z(Q,Z){d(k[Z])&&d(Q)?k[Z]=B(k[Z],Q):d(Q)?k[Z]=B({},Q):o(Q)?k[Z]=Q.slice():k[Z]=Q}for(var J=0,ae=arguments.length;J<ae;J++)F(arguments[J],z);return k}function W(k,z,J){return F(z,function(Q,Z){J&&typeof Q=="function"?k[Z]=e(Q,J):k[Z]=Q}),k}function G(k){return k.charCodeAt(0)===65279&&(k=k.slice(1)),k}function V(k,z,J,ae){k.prototype=Object.create(z.prototype,ae),k.prototype.constructor=k,J&&Object.assign(k.prototype,J)}function H(k,z,J){var ae,Q,Z,ce={};z=z||{};do{for(ae=Object.getOwnPropertyNames(k),Q=ae.length;Q-- >0;)Z=ae[Q],ce[Z]||(z[Z]=k[Z],ce[Z]=!0);k=Object.getPrototypeOf(k)}while(k&&(!J||J(k,z))&&k!==Object.prototype);return z}function Y(k,z,J){k=String(k),(J===void 0||J>k.length)&&(J=k.length),J-=z.length;var ae=k.indexOf(z,J);return ae!==-1&&ae===J}function oe(k){if(!k)return null;var z=k.length;if(i(z))return null;for(var J=new Array(z);z-- >0;)J[z]=k[z];return J}var K=function(k){return function(z){return k&&z instanceof k}}(typeof Uint8Array<"u"&&Object.getPrototypeOf(Uint8Array));return fa={isArray:o,isArrayBuffer:a,isBuffer:s,isFormData:b,isArrayBufferView:l,isString:f,isNumber:c,isObject:h,isPlainObject:d,isUndefined:i,isDate:u,isFile:p,isBlob:m,isFunction:T,isStream:_,isURLSearchParams:A,isStandardBrowserEnv:P,forEach:F,merge:B,extend:W,trim:w,stripBOM:G,inherits:V,toFlatObject:H,kindOf:n,kindOfTest:r,endsWith:Y,toArray:oe,isTypedArray:K,isFileList:E},fa}var da,hu;function Bd(){if(hu)return da;hu=1;var e=Je();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 da=function(r,o,i){if(!o)return r;var s;if(i)s=i(o);else if(e.isURLSearchParams(o))s=o.toString();else{var a=[];e.forEach(o,function(c,h){c===null||typeof c>"u"||(e.isArray(c)?h=h+"[]":c=[c],e.forEach(c,function(u){e.isDate(u)?u=u.toISOString():e.isObject(u)&&(u=JSON.stringify(u)),a.push(t(h)+"="+t(u))}))}),s=a.join("&")}if(s){var l=r.indexOf("#");l!==-1&&(r=r.slice(0,l)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r},da}var ha,pu;function Wg(){if(pu)return ha;pu=1;var e=Je();function t(){this.handlers=[]}return t.prototype.use=function(r,o,i){return this.handlers.push({fulfilled:r,rejected:o,synchronous:i?i.synchronous:!1,runWhen:i?i.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(i){i!==null&&r(i)})},ha=t,ha}var pa,mu;function Vg(){if(mu)return pa;mu=1;var e=Je();return pa=function(n,r){e.forEach(n,function(i,s){s!==r&&s.toUpperCase()===r.toUpperCase()&&(n[r]=i,delete n[s])})},pa}var ma,gu;function Pn(){if(gu)return ma;gu=1;var e=Je();function t(o,i,s,a,l){Error.call(this),this.message=o,this.name="AxiosError",i&&(this.code=i),s&&(this.config=s),a&&(this.request=a),l&&(this.response=l)}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(o){r[o]={value:o}}),Object.defineProperties(t,r),Object.defineProperty(n,"isAxiosError",{value:!0}),t.from=function(o,i,s,a,l,f){var c=Object.create(n);return e.toFlatObject(o,c,function(d){return d!==Error.prototype}),t.call(c,o.message,i,s,a,l),c.name=o.name,f&&Object.assign(c,f),c},ma=t,ma}var ga,yu;function Fd(){return yu||(yu=1,ga={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}),ga}var ya,vu;function Ud(){if(vu)return ya;vu=1;var e=Je();function t(n,r){r=r||new FormData;var o=[];function i(a){return a===null?"":e.isDate(a)?a.toISOString():e.isArrayBuffer(a)||e.isTypedArray(a)?typeof Blob=="function"?new Blob([a]):Buffer.from(a):a}function s(a,l){if(e.isPlainObject(a)||e.isArray(a)){if(o.indexOf(a)!==-1)throw Error("Circular reference detected in "+l);o.push(a),e.forEach(a,function(c,h){if(!e.isUndefined(c)){var d=l?l+"."+h:h,u;if(c&&!l&&typeof c=="object"){if(e.endsWith(h,"{}"))c=JSON.stringify(c);else if(e.endsWith(h,"[]")&&(u=e.toArray(c))){u.forEach(function(p){!e.isUndefined(p)&&r.append(d,i(p))});return}}s(c,d)}}),o.pop()}else r.append(l,i(a))}return s(n),r}return ya=t,ya}var va,_u;function zg(){if(_u)return va;_u=1;var e=Pn();return va=function(n,r,o){var i=o.config.validateStatus;!o.status||!i||i(o.status)?n(o):r(new e("Request failed with status code "+o.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))},va}var _a,Eu;function Yg(){if(Eu)return _a;Eu=1;var e=Je();return _a=e.isStandardBrowserEnv()?function(){return{write:function(r,o,i,s,a,l){var f=[];f.push(r+"="+encodeURIComponent(o)),e.isNumber(i)&&f.push("expires="+new Date(i).toGMTString()),e.isString(s)&&f.push("path="+s),e.isString(a)&&f.push("domain="+a),l===!0&&f.push("secure"),document.cookie=f.join("; ")},read:function(r){var o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),_a}var Ea,bu;function Kg(){return bu||(bu=1,Ea=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}),Ea}var ba,wu;function Qg(){return wu||(wu=1,ba=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t}),ba}var wa,Su;function Dd(){if(Su)return wa;Su=1;var e=Kg(),t=Qg();return wa=function(r,o){return r&&!e(o)?t(r,o):o},wa}var Sa,Tu;function Xg(){if(Tu)return Sa;Tu=1;var e=Je(),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 Sa=function(r){var o={},i,s,a;return r&&e.forEach(r.split(`
25
+ `),function(f){if(a=f.indexOf(":"),i=e.trim(f.substr(0,a)).toLowerCase(),s=e.trim(f.substr(a+1)),i){if(o[i]&&t.indexOf(i)>=0)return;i==="set-cookie"?o[i]=(o[i]?o[i]:[]).concat([s]):o[i]=o[i]?o[i]+", "+s:s}}),o},Sa}var Ta,xu;function Jg(){if(xu)return Ta;xu=1;var e=Je();return Ta=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),o;function i(s){var a=s;return n&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{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 o=i(window.location.href),function(a){var l=e.isString(a)?i(a):a;return l.protocol===o.protocol&&l.host===o.host}}():function(){return function(){return!0}}(),Ta}var xa,Ou;function Ko(){if(Ou)return xa;Ou=1;var e=Pn(),t=Je();function n(r){e.call(this,r??"canceled",e.ERR_CANCELED),this.name="CanceledError"}return t.inherits(n,e,{__CANCEL__:!0}),xa=n,xa}var Oa,Au;function Zg(){return Au||(Au=1,Oa=function(t){var n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return n&&n[1]||""}),Oa}var Aa,Cu;function Ru(){if(Cu)return Aa;Cu=1;var e=Je(),t=zg(),n=Yg(),r=Bd(),o=Dd(),i=Xg(),s=Jg(),a=Fd(),l=Pn(),f=Ko(),c=Zg();return Aa=function(d){return new Promise(function(p,m){var E=d.data,T=d.headers,_=d.responseType,b;function A(){d.cancelToken&&d.cancelToken.unsubscribe(b),d.signal&&d.signal.removeEventListener("abort",b)}e.isFormData(E)&&e.isStandardBrowserEnv()&&delete T["Content-Type"];var w=new XMLHttpRequest;if(d.auth){var P=d.auth.username||"",F=d.auth.password?unescape(encodeURIComponent(d.auth.password)):"";T.Authorization="Basic "+btoa(P+":"+F)}var B=o(d.baseURL,d.url);w.open(d.method.toUpperCase(),r(B,d.params,d.paramsSerializer),!0),w.timeout=d.timeout;function W(){if(w){var H="getAllResponseHeaders"in w?i(w.getAllResponseHeaders()):null,Y=!_||_==="text"||_==="json"?w.responseText:w.response,oe={data:Y,status:w.status,statusText:w.statusText,headers:H,config:d,request:w};t(function(k){p(k),A()},function(k){m(k),A()},oe),w=null}}if("onloadend"in w?w.onloadend=W:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(W)},w.onabort=function(){w&&(m(new l("Request aborted",l.ECONNABORTED,d,w)),w=null)},w.onerror=function(){m(new l("Network Error",l.ERR_NETWORK,d,w,w)),w=null},w.ontimeout=function(){var Y=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded",oe=d.transitional||a;d.timeoutErrorMessage&&(Y=d.timeoutErrorMessage),m(new l(Y,oe.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,d,w)),w=null},e.isStandardBrowserEnv()){var G=(d.withCredentials||s(B))&&d.xsrfCookieName?n.read(d.xsrfCookieName):void 0;G&&(T[d.xsrfHeaderName]=G)}"setRequestHeader"in w&&e.forEach(T,function(Y,oe){typeof E>"u"&&oe.toLowerCase()==="content-type"?delete T[oe]:w.setRequestHeader(oe,Y)}),e.isUndefined(d.withCredentials)||(w.withCredentials=!!d.withCredentials),_&&_!=="json"&&(w.responseType=d.responseType),typeof d.onDownloadProgress=="function"&&w.addEventListener("progress",d.onDownloadProgress),typeof d.onUploadProgress=="function"&&w.upload&&w.upload.addEventListener("progress",d.onUploadProgress),(d.cancelToken||d.signal)&&(b=function(H){w&&(m(!H||H&&H.type?new f:H),w.abort(),w=null)},d.cancelToken&&d.cancelToken.subscribe(b),d.signal&&(d.signal.aborted?b():d.signal.addEventListener("abort",b))),E||(E=null);var V=c(B);if(V&&["http","https","file"].indexOf(V)===-1){m(new l("Unsupported protocol "+V+":",l.ERR_BAD_REQUEST,d));return}w.send(E)})},Aa}var Ca,Nu;function ey(){return Nu||(Nu=1,Ca=null),Ca}var Ra,Pu;function xc(){if(Pu)return Ra;Pu=1;var e=Je(),t=Vg(),n=Pn(),r=Fd(),o=Ud(),i={"Content-Type":"application/x-www-form-urlencoded"};function s(c,h){!e.isUndefined(c)&&e.isUndefined(c["Content-Type"])&&(c["Content-Type"]=h)}function a(){var c;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(c=Ru()),c}function l(c,h,d){if(e.isString(c))try{return(h||JSON.parse)(c),e.trim(c)}catch(u){if(u.name!=="SyntaxError")throw u}return(d||JSON.stringify)(c)}var f={transitional:r,adapter:a(),transformRequest:[function(h,d){if(t(d,"Accept"),t(d,"Content-Type"),e.isFormData(h)||e.isArrayBuffer(h)||e.isBuffer(h)||e.isStream(h)||e.isFile(h)||e.isBlob(h))return h;if(e.isArrayBufferView(h))return h.buffer;if(e.isURLSearchParams(h))return s(d,"application/x-www-form-urlencoded;charset=utf-8"),h.toString();var u=e.isObject(h),p=d&&d["Content-Type"],m;if((m=e.isFileList(h))||u&&p==="multipart/form-data"){var E=this.env&&this.env.FormData;return o(m?{"files[]":h}:h,E&&new E)}else if(u||p==="application/json")return s(d,"application/json"),l(h);return h}],transformResponse:[function(h){var d=this.transitional||f.transitional,u=d&&d.silentJSONParsing,p=d&&d.forcedJSONParsing,m=!u&&this.responseType==="json";if(m||p&&e.isString(h)&&h.length)try{return JSON.parse(h)}catch(E){if(m)throw E.name==="SyntaxError"?n.from(E,n.ERR_BAD_RESPONSE,this,null,this.response):E}return h}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ey()},validateStatus:function(h){return h>=200&&h<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};return e.forEach(["delete","get","head"],function(h){f.headers[h]={}}),e.forEach(["post","put","patch"],function(h){f.headers[h]=e.merge(i)}),Ra=f,Ra}var Na,Iu;function ty(){if(Iu)return Na;Iu=1;var e=Je(),t=xc();return Na=function(r,o,i){var s=this||t;return e.forEach(i,function(l){r=l.call(s,r,o)}),r},Na}var Pa,Lu;function $d(){return Lu||(Lu=1,Pa=function(t){return!!(t&&t.__CANCEL__)}),Pa}var Ia,ku;function ry(){if(ku)return Ia;ku=1;var e=Je(),t=ty(),n=$d(),r=xc(),o=Ko();function i(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new o}return Ia=function(a){i(a),a.headers=a.headers||{},a.data=t.call(a,a.data,a.headers,a.transformRequest),a.headers=e.merge(a.headers.common||{},a.headers[a.method]||{},a.headers),e.forEach(["delete","get","head","post","put","patch","common"],function(c){delete a.headers[c]});var l=a.adapter||r.adapter;return l(a).then(function(c){return i(a),c.data=t.call(a,c.data,c.headers,a.transformResponse),c},function(c){return n(c)||(i(a),c&&c.response&&(c.response.data=t.call(a,c.response.data,c.response.headers,a.transformResponse))),Promise.reject(c)})},Ia}var La,Mu;function jd(){if(Mu)return La;Mu=1;var e=Je();return La=function(n,r){r=r||{};var o={};function i(h,d){return e.isPlainObject(h)&&e.isPlainObject(d)?e.merge(h,d):e.isPlainObject(d)?e.merge({},d):e.isArray(d)?d.slice():d}function s(h){if(e.isUndefined(r[h])){if(!e.isUndefined(n[h]))return i(void 0,n[h])}else return i(n[h],r[h])}function a(h){if(!e.isUndefined(r[h]))return i(void 0,r[h])}function l(h){if(e.isUndefined(r[h])){if(!e.isUndefined(n[h]))return i(void 0,n[h])}else return i(void 0,r[h])}function f(h){if(h in r)return i(n[h],r[h]);if(h in n)return i(void 0,n[h])}var c={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:f};return e.forEach(Object.keys(n).concat(Object.keys(r)),function(d){var u=c[d]||s,p=u(d);e.isUndefined(p)&&u!==f||(o[d]=p)}),o},La}var ka,Bu;function Hd(){return Bu||(Bu=1,ka={version:"0.27.2"}),ka}var Ma,Fu;function ny(){if(Fu)return Ma;Fu=1;var e=Hd().version,t=Pn(),n={};["object","boolean","number","function","string","symbol"].forEach(function(i,s){n[i]=function(l){return typeof l===i||"a"+(s<1?"n ":" ")+i}});var r={};n.transitional=function(s,a,l){function f(c,h){return"[Axios v"+e+"] Transitional option '"+c+"'"+h+(l?". "+l:"")}return function(c,h,d){if(s===!1)throw new t(f(h," has been removed"+(a?" in "+a:"")),t.ERR_DEPRECATED);return a&&!r[h]&&(r[h]=!0,console.warn(f(h," has been deprecated since v"+a+" and will be removed in the near future"))),s?s(c,h,d):!0}};function o(i,s,a){if(typeof i!="object")throw new t("options must be an object",t.ERR_BAD_OPTION_VALUE);for(var l=Object.keys(i),f=l.length;f-- >0;){var c=l[f],h=s[c];if(h){var d=i[c],u=d===void 0||h(d,c,i);if(u!==!0)throw new t("option "+c+" must be "+u,t.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new t("Unknown option "+c,t.ERR_BAD_OPTION)}}return Ma={assertOptions:o,validators:n},Ma}var Ba,Uu;function iy(){if(Uu)return Ba;Uu=1;var e=Je(),t=Bd(),n=Wg(),r=ry(),o=jd(),i=Dd(),s=ny(),a=s.validators;function l(f){this.defaults=f,this.interceptors={request:new n,response:new n}}return l.prototype.request=function(c,h){typeof c=="string"?(h=h||{},h.url=c):h=c||{},h=o(this.defaults,h),h.method?h.method=h.method.toLowerCase():this.defaults.method?h.method=this.defaults.method.toLowerCase():h.method="get";var d=h.transitional;d!==void 0&&s.assertOptions(d,{silentJSONParsing:a.transitional(a.boolean),forcedJSONParsing:a.transitional(a.boolean),clarifyTimeoutError:a.transitional(a.boolean)},!1);var u=[],p=!0;this.interceptors.request.forEach(function(P){typeof P.runWhen=="function"&&P.runWhen(h)===!1||(p=p&&P.synchronous,u.unshift(P.fulfilled,P.rejected))});var m=[];this.interceptors.response.forEach(function(P){m.push(P.fulfilled,P.rejected)});var E;if(!p){var T=[r,void 0];for(Array.prototype.unshift.apply(T,u),T=T.concat(m),E=Promise.resolve(h);T.length;)E=E.then(T.shift(),T.shift());return E}for(var _=h;u.length;){var b=u.shift(),A=u.shift();try{_=b(_)}catch(w){A(w);break}}try{E=r(_)}catch(w){return Promise.reject(w)}for(;m.length;)E=E.then(m.shift(),m.shift());return E},l.prototype.getUri=function(c){c=o(this.defaults,c);var h=i(c.baseURL,c.url);return t(h,c.params,c.paramsSerializer)},e.forEach(["delete","get","head","options"],function(c){l.prototype[c]=function(h,d){return this.request(o(d||{},{method:c,url:h,data:(d||{}).data}))}}),e.forEach(["post","put","patch"],function(c){function h(d){return function(p,m,E){return this.request(o(E||{},{method:c,headers:d?{"Content-Type":"multipart/form-data"}:{},url:p,data:m}))}}l.prototype[c]=h(),l.prototype[c+"Form"]=h(!0)}),Ba=l,Ba}var Fa,Du;function oy(){if(Du)return Fa;Du=1;var e=Ko();function t(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(s){r=s});var o=this;this.promise.then(function(i){if(o._listeners){var s,a=o._listeners.length;for(s=0;s<a;s++)o._listeners[s](i);o._listeners=null}}),this.promise.then=function(i){var s,a=new Promise(function(l){o.subscribe(l),s=l}).then(i);return a.cancel=function(){o.unsubscribe(s)},a},n(function(s){o.reason||(o.reason=new e(s),r(o.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 o=this._listeners.indexOf(r);o!==-1&&this._listeners.splice(o,1)}},t.source=function(){var r,o=new t(function(s){r=s});return{token:o,cancel:r}},Fa=t,Fa}var Ua,$u;function ay(){return $u||($u=1,Ua=function(t){return function(r){return t.apply(null,r)}}),Ua}var Da,ju;function sy(){if(ju)return Da;ju=1;var e=Je();return Da=function(n){return e.isObject(n)&&n.isAxiosError===!0},Da}var Hu;function cy(){if(Hu)return oo.exports;Hu=1;var e=Je(),t=Md(),n=iy(),r=jd(),o=xc();function i(a){var l=new n(a),f=t(n.prototype.request,l);return e.extend(f,n.prototype,l),e.extend(f,l),f.create=function(h){return i(r(a,h))},f}var s=i(o);return s.Axios=n,s.CanceledError=Ko(),s.CancelToken=oy(),s.isCancel=$d(),s.VERSION=Hd().version,s.toFormData=Ud(),s.AxiosError=Pn(),s.Cancel=s.CanceledError,s.all=function(l){return Promise.all(l)},s.spread=ay(),s.isAxiosError=sy(),oo.exports=s,oo.exports.default=s,oo.exports}var $a,qu;function qd(){return qu||(qu=1,$a=cy()),$a}var uy=Function.prototype.toString,ja=Object.create,ly=Object.defineProperty,fy=Object.getOwnPropertyDescriptor,Gu=Object.getOwnPropertyNames,Oc=Object.getOwnPropertySymbols,dy=Object.getPrototypeOf,Gd=Object.prototype,hy=Gd.hasOwnProperty,py=Gd.propertyIsEnumerable,Wd=typeof Oc=="function",my=typeof WeakMap=="function",gy=function(){if(my)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}}(),Vd=function(e,t){var n=e.__proto__||dy(e);if(!n)return ja(null);var r=n.constructor;if(r===t.Object)return n===t.Object.prototype?{}:ja(n);if(~uy.call(r).indexOf("[native code]"))try{return new r}catch{}return ja(n)},yy=function(e,t,n,r){var o=Vd(e,t);r.set(e,o);for(var i in e)hy.call(e,i)&&(o[i]=n(e[i],r));if(Wd)for(var s=Oc(e),a=0,l=s.length,f=void 0;a<l;++a)f=s[a],py.call(e,f)&&(o[f]=n(e[f],r));return o},Wu=function(e,t,n,r){var o=Vd(e,t);r.set(e,o);for(var i=Wd?Gu(e).concat(Oc(e)):Gu(e),s=0,a=i.length,l=void 0,f=void 0;s<a;++s)if(l=i[s],l!=="callee"&&l!=="caller")if(f=fy(e,l),f){!f.get&&!f.set&&(f.value=n(e[l],r));try{ly(o,l,f)}catch{o[l]=f.value}}else o[l]=n(e[l],r);return o},vy=function(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},_y=Array.isArray,Ey=Object.getPrototypeOf,by=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 _r(e,t){var n=!!(t&&t.isStrict),r=t&&t.realm||by,o=n?Wu:yy,i=function(s,a){if(!s||typeof s!="object")return s;if(a.has(s))return a.get(s);var l=s.__proto__||Ey(s),f=l&&l.constructor;if(!f||f===r.Object)return o(s,r,i,a);var c;if(_y(s)){if(n)return Wu(s,r,i,a);c=new f,a.set(s,c);for(var h=0,d=s.length;h<d;++h)c[h]=i(s[h],a);return c}if(s instanceof r.Date)return new f(s.getTime());if(s instanceof r.RegExp)return c=new f(s.source,s.flags||vy(s)),c.lastIndex=s.lastIndex,c;if(r.Map&&s instanceof r.Map)return c=new f,a.set(s,c),s.forEach(function(u,p){c.set(p,i(u,a))}),c;if(r.Set&&s instanceof r.Set)return c=new f,a.set(s,c),s.forEach(function(u){c.add(i(u,a))}),c;if(r.Blob&&s instanceof r.Blob)return s.slice(0,s.size,s.type);if(r.Buffer&&r.Buffer.isBuffer(s))return c=r.Buffer.allocUnsafe?r.Buffer.allocUnsafe(s.length):new f(s.length),a.set(s,c),s.copy(c),c;if(r.ArrayBuffer){if(r.ArrayBuffer.isView(s))return c=new f(s.buffer.slice(0)),a.set(s,c),c;if(s instanceof r.ArrayBuffer)return c=s.slice(0),a.set(s,c),c}return typeof s.then=="function"||s instanceof Error||r.WeakMap&&s instanceof r.WeakMap||r.WeakSet&&s instanceof r.WeakSet?s:o(s,r,i,a)};return i(e,gy())}_r.default=_r;_r.strict=function(t,n){return _r(t,{isStrict:!0,realm:n?n.realm:void 0})};var wy=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 o=42;t[n]=o;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 i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0},Vu=typeof Symbol<"u"&&Symbol,Sy=wy,Ty=function(){return typeof Vu!="function"||typeof Symbol!="function"||typeof Vu("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Sy()},zu={foo:{}},xy=Object,Oy=function(){return{__proto__:zu}.foo===zu.foo&&!({__proto__:null}instanceof xy)},Ay="Function.prototype.bind called on incompatible ",Ha=Array.prototype.slice,Cy=Object.prototype.toString,Ry="[object Function]",Ny=function(t){var n=this;if(typeof n!="function"||Cy.call(n)!==Ry)throw new TypeError(Ay+n);for(var r=Ha.call(arguments,1),o,i=function(){if(this instanceof o){var c=n.apply(this,r.concat(Ha.call(arguments)));return Object(c)===c?c:this}else return n.apply(t,r.concat(Ha.call(arguments)))},s=Math.max(0,n.length-r.length),a=[],l=0;l<s;l++)a.push("$"+l);if(o=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var f=function(){};f.prototype=n.prototype,o.prototype=new f,f.prototype=null}return o},Py=Ny,Ac=Function.prototype.bind||Py,Iy=Ac,Ly=Iy.call(Function.call,Object.prototype.hasOwnProperty),ge,On=SyntaxError,zd=Function,xn=TypeError,qa=function(e){try{return zd('"use strict"; return ('+e+").constructor;")()}catch{}},Qr=Object.getOwnPropertyDescriptor;if(Qr)try{Qr({},"")}catch{Qr=null}var Ga=function(){throw new xn},ky=Qr?function(){try{return arguments.callee,Ga}catch{try{return Qr(arguments,"callee").get}catch{return Ga}}}():Ga,_n=Ty(),My=Oy(),Ve=Object.getPrototypeOf||(My?function(e){return e.__proto__}:null),wn={},By=typeof Uint8Array>"u"||!Ve?ge:Ve(Uint8Array),Xr={"%AggregateError%":typeof AggregateError>"u"?ge:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ge:ArrayBuffer,"%ArrayIteratorPrototype%":_n&&Ve?Ve([][Symbol.iterator]()):ge,"%AsyncFromSyncIteratorPrototype%":ge,"%AsyncFunction%":wn,"%AsyncGenerator%":wn,"%AsyncGeneratorFunction%":wn,"%AsyncIteratorPrototype%":wn,"%Atomics%":typeof Atomics>"u"?ge:Atomics,"%BigInt%":typeof BigInt>"u"?ge:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ge:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ge:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ge:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?ge:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ge:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ge:FinalizationRegistry,"%Function%":zd,"%GeneratorFunction%":wn,"%Int8Array%":typeof Int8Array>"u"?ge:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ge:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ge:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_n&&Ve?Ve(Ve([][Symbol.iterator]())):ge,"%JSON%":typeof JSON=="object"?JSON:ge,"%Map%":typeof Map>"u"?ge:Map,"%MapIteratorPrototype%":typeof Map>"u"||!_n||!Ve?ge:Ve(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ge:Promise,"%Proxy%":typeof Proxy>"u"?ge:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?ge:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ge:Set,"%SetIteratorPrototype%":typeof Set>"u"||!_n||!Ve?ge:Ve(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ge:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_n&&Ve?Ve(""[Symbol.iterator]()):ge,"%Symbol%":_n?Symbol:ge,"%SyntaxError%":On,"%ThrowTypeError%":ky,"%TypedArray%":By,"%TypeError%":xn,"%Uint8Array%":typeof Uint8Array>"u"?ge:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ge:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ge:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ge:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?ge:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ge:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ge:WeakSet};if(Ve)try{null.error}catch(e){var Fy=Ve(Ve(e));Xr["%Error.prototype%"]=Fy}var Uy=function e(t){var n;if(t==="%AsyncFunction%")n=qa("async function () {}");else if(t==="%GeneratorFunction%")n=qa("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=qa("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Ve&&(n=Ve(o.prototype))}return Xr[t]=n,n},Yu={"%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"]},Yi=Ac,Mo=Ly,Dy=Yi.call(Function.call,Array.prototype.concat),$y=Yi.call(Function.apply,Array.prototype.splice),Ku=Yi.call(Function.call,String.prototype.replace),Bo=Yi.call(Function.call,String.prototype.slice),jy=Yi.call(Function.call,RegExp.prototype.exec),Hy=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,qy=/\\(\\)?/g,Gy=function(t){var n=Bo(t,0,1),r=Bo(t,-1);if(n==="%"&&r!=="%")throw new On("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new On("invalid intrinsic syntax, expected opening `%`");var o=[];return Ku(t,Hy,function(i,s,a,l){o[o.length]=a?Ku(l,qy,"$1"):s||i}),o},Wy=function(t,n){var r=t,o;if(Mo(Yu,r)&&(o=Yu[r],r="%"+o[0]+"%"),Mo(Xr,r)){var i=Xr[r];if(i===wn&&(i=Uy(r)),typeof i>"u"&&!n)throw new xn("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new On("intrinsic "+t+" does not exist!")},Cc=function(t,n){if(typeof t!="string"||t.length===0)throw new xn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new xn('"allowMissing" argument must be a boolean');if(jy(/^%?[^%]*%?$/,t)===null)throw new On("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Gy(t),o=r.length>0?r[0]:"",i=Wy("%"+o+"%",n),s=i.name,a=i.value,l=!1,f=i.alias;f&&(o=f[0],$y(r,Dy([0,1],f)));for(var c=1,h=!0;c<r.length;c+=1){var d=r[c],u=Bo(d,0,1),p=Bo(d,-1);if((u==='"'||u==="'"||u==="`"||p==='"'||p==="'"||p==="`")&&u!==p)throw new On("property names with quotes must have matching quotes");if((d==="constructor"||!h)&&(l=!0),o+="."+d,s="%"+o+"%",Mo(Xr,s))a=Xr[s];else if(a!=null){if(!(d in a)){if(!n)throw new xn("base intrinsic for "+t+" exists, but the property is not available.");return}if(Qr&&c+1>=r.length){var m=Qr(a,d);h=!!m,h&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[d]}else h=Mo(a,d),a=a[d];h&&!l&&(Xr[s]=a)}}return a},Yd={exports:{}};(function(e){var t=Ac,n=Cc,r=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),i=n("%Reflect.apply%",!0)||t.call(o,r),s=n("%Object.getOwnPropertyDescriptor%",!0),a=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}e.exports=function(h){var d=i(t,o,arguments);if(s&&a){var u=s(d,"length");u.configurable&&a(d,"length",{value:1+l(0,h.length-(arguments.length-1))})}return d};var f=function(){return i(t,r,arguments)};a?a(e.exports,"apply",{value:f}):e.exports.apply=f})(Yd);var Vy=Yd.exports,Kd=Cc,Qd=Vy,zy=Qd(Kd("String.prototype.indexOf")),Yy=function(t,n){var r=Kd(t,!!n);return typeof r=="function"&&zy(t,".prototype.")>-1?Qd(r):r};const Ky={},Qy=Object.freeze(Object.defineProperty({__proto__:null,default:Ky},Symbol.toStringTag,{value:"Module"})),Xy=zi(Qy);var Rc=typeof Map=="function"&&Map.prototype,Wa=Object.getOwnPropertyDescriptor&&Rc?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Fo=Rc&&Wa&&typeof Wa.get=="function"?Wa.get:null,Qu=Rc&&Map.prototype.forEach,Nc=typeof Set=="function"&&Set.prototype,Va=Object.getOwnPropertyDescriptor&&Nc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Uo=Nc&&Va&&typeof Va.get=="function"?Va.get:null,Xu=Nc&&Set.prototype.forEach,Jy=typeof WeakMap=="function"&&WeakMap.prototype,Ui=Jy?WeakMap.prototype.has:null,Zy=typeof WeakSet=="function"&&WeakSet.prototype,Di=Zy?WeakSet.prototype.has:null,ev=typeof WeakRef=="function"&&WeakRef.prototype,Ju=ev?WeakRef.prototype.deref:null,tv=Boolean.prototype.valueOf,rv=Object.prototype.toString,nv=Function.prototype.toString,iv=String.prototype.match,Pc=String.prototype.slice,yr=String.prototype.replace,ov=String.prototype.toUpperCase,Zu=String.prototype.toLowerCase,Xd=RegExp.prototype.test,el=Array.prototype.concat,Ut=Array.prototype.join,av=Array.prototype.slice,tl=Math.floor,Ys=typeof BigInt=="function"?BigInt.prototype.valueOf:null,za=Object.getOwnPropertySymbols,Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,An=typeof Symbol=="function"&&typeof Symbol.iterator=="object",tt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===An||"symbol")?Symbol.toStringTag:null,Jd=Object.prototype.propertyIsEnumerable,rl=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function nl(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Xd.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-tl(-e):tl(e);if(r!==e){var o=String(r),i=Pc.call(t,o.length+1);return yr.call(o,n,"$&_")+"."+yr.call(yr.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return yr.call(t,n,"$&_")}var Qs=Xy,il=Qs.custom,ol=eh(il)?il:null,sv=function e(t,n,r,o){var i=n||{};if(gr(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(gr(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=gr(i,"customInspect")?i.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(gr(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(gr(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=i.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 rh(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?nl(t,l):l}if(typeof t=="bigint"){var f=String(t)+"n";return a?nl(t,f):f}var c=typeof i.depth>"u"?5:i.depth;if(typeof r>"u"&&(r=0),r>=c&&c>0&&typeof t=="object")return Xs(t)?"[Array]":"[Object]";var h=xv(i,r);if(typeof o>"u")o=[];else if(th(o,t)>=0)return"[Circular]";function d(Y,oe,K){if(oe&&(o=av.call(o),o.push(oe)),K){var k={depth:i.depth};return gr(i,"quoteStyle")&&(k.quoteStyle=i.quoteStyle),e(Y,k,r+1,o)}return e(Y,i,r+1,o)}if(typeof t=="function"&&!al(t)){var u=gv(t),p=ao(t,d);return"[Function"+(u?": "+u:" (anonymous)")+"]"+(p.length>0?" { "+Ut.call(p,", ")+" }":"")}if(eh(t)){var m=An?yr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ks.call(t);return typeof t=="object"&&!An?di(m):m}if(wv(t)){for(var E="<"+Zu.call(String(t.nodeName)),T=t.attributes||[],_=0;_<T.length;_++)E+=" "+T[_].name+"="+Zd(cv(T[_].value),"double",i);return E+=">",t.childNodes&&t.childNodes.length&&(E+="..."),E+="</"+Zu.call(String(t.nodeName))+">",E}if(Xs(t)){if(t.length===0)return"[]";var b=ao(t,d);return h&&!Tv(b)?"["+Js(b,h)+"]":"[ "+Ut.call(b,", ")+" ]"}if(lv(t)){var A=ao(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!Jd.call(t,"cause")?"{ ["+String(t)+"] "+Ut.call(el.call("[cause]: "+d(t.cause),A),", ")+" }":A.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Ut.call(A,", ")+" }"}if(typeof t=="object"&&s){if(ol&&typeof t[ol]=="function"&&Qs)return Qs(t,{depth:c-r});if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(yv(t)){var w=[];return Qu&&Qu.call(t,function(Y,oe){w.push(d(oe,t,!0)+" => "+d(Y,t))}),sl("Map",Fo.call(t),w,h)}if(Ev(t)){var P=[];return Xu&&Xu.call(t,function(Y){P.push(d(Y,t))}),sl("Set",Uo.call(t),P,h)}if(vv(t))return Ya("WeakMap");if(bv(t))return Ya("WeakSet");if(_v(t))return Ya("WeakRef");if(dv(t))return di(d(Number(t)));if(pv(t))return di(d(Ys.call(t)));if(hv(t))return di(tv.call(t));if(fv(t))return di(d(String(t)));if(!uv(t)&&!al(t)){var F=ao(t,d),B=rl?rl(t)===Object.prototype:t instanceof Object||t.constructor===Object,W=t instanceof Object?"":"null prototype",G=!B&&tt&&Object(t)===t&&tt in t?Pc.call(br(t),8,-1):W?"Object":"",V=B||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",H=V+(G||W?"["+Ut.call(el.call([],G||[],W||[]),": ")+"] ":"");return F.length===0?H+"{}":h?H+"{"+Js(F,h)+"}":H+"{ "+Ut.call(F,", ")+" }"}return String(t)};function Zd(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function cv(e){return yr.call(String(e),/"/g,"&quot;")}function Xs(e){return br(e)==="[object Array]"&&(!tt||!(typeof e=="object"&&tt in e))}function uv(e){return br(e)==="[object Date]"&&(!tt||!(typeof e=="object"&&tt in e))}function al(e){return br(e)==="[object RegExp]"&&(!tt||!(typeof e=="object"&&tt in e))}function lv(e){return br(e)==="[object Error]"&&(!tt||!(typeof e=="object"&&tt in e))}function fv(e){return br(e)==="[object String]"&&(!tt||!(typeof e=="object"&&tt in e))}function dv(e){return br(e)==="[object Number]"&&(!tt||!(typeof e=="object"&&tt in e))}function hv(e){return br(e)==="[object Boolean]"&&(!tt||!(typeof e=="object"&&tt in e))}function eh(e){if(An)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Ks)return!1;try{return Ks.call(e),!0}catch{}return!1}function pv(e){if(!e||typeof e!="object"||!Ys)return!1;try{return Ys.call(e),!0}catch{}return!1}var mv=Object.prototype.hasOwnProperty||function(e){return e in this};function gr(e,t){return mv.call(e,t)}function br(e){return rv.call(e)}function gv(e){if(e.name)return e.name;var t=iv.call(nv.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function th(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 yv(e){if(!Fo||!e||typeof e!="object")return!1;try{Fo.call(e);try{Uo.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function vv(e){if(!Ui||!e||typeof e!="object")return!1;try{Ui.call(e,Ui);try{Di.call(e,Di)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function _v(e){if(!Ju||!e||typeof e!="object")return!1;try{return Ju.call(e),!0}catch{}return!1}function Ev(e){if(!Uo||!e||typeof e!="object")return!1;try{Uo.call(e);try{Fo.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function bv(e){if(!Di||!e||typeof e!="object")return!1;try{Di.call(e,Di);try{Ui.call(e,Ui)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function wv(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function rh(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return rh(Pc.call(e,0,t.maxStringLength),t)+r}var o=yr.call(yr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Sv);return Zd(o,"single",t)}function Sv(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":"")+ov.call(t.toString(16))}function di(e){return"Object("+e+")"}function Ya(e){return e+" { ? }"}function sl(e,t,n,r){var o=r?Js(n,r):Ut.call(n,", ");return e+" ("+t+") {"+o+"}"}function Tv(e){for(var t=0;t<e.length;t++)if(th(e[t],`
26
+ `)>=0)return!1;return!0}function xv(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Ut.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Ut.call(Array(t+1),n)}}function Js(e,t){if(e.length===0)return"";var n=`
27
27
  `+t.prev+t.base;return n+Ut.call(e,","+n)+`
28
- `+t.prev}function no(e,t){var n=Vs(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=mr(e,o)?t(e[o],e):""}var i=typeof qa=="function"?qa(e):[],s;if(xn){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in e)mr(e,l)&&(n&&String(Number(l))===l&&l<e.length||xn&&s["$"+l]instanceof Symbol||(Vd.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof qa=="function")for(var f=0;f<i.length;f++)zd.call(e,i[f])&&r.push("["+t(i[f])+"]: "+t(e[i[f]],e));return r}var Au=Su,In=Dy,yv=Jy,vv=Au("%TypeError%"),io=Au("%WeakMap%",!0),oo=Au("%Map%",!0),Ev=In("WeakMap.prototype.get",!0),_v=In("WeakMap.prototype.set",!0),bv=In("WeakMap.prototype.has",!0),wv=In("Map.prototype.get",!0),Sv=In("Map.prototype.set",!0),Tv=In("Map.prototype.has",!0),Cu=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},Ov=function(e,t){var n=Cu(e,t);return n&&n.value},xv=function(e,t,n){var r=Cu(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Av=function(e,t){return!!Cu(e,t)},Cv=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new vv("Side channel does not contain "+yv(i))},get:function(i){if(io&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Ev(t,i)}else if(oo){if(n)return wv(n,i)}else if(r)return Ov(r,i)},has:function(i){if(io&&i&&(typeof i=="object"||typeof i=="function")){if(t)return bv(t,i)}else if(oo){if(n)return Tv(n,i)}else if(r)return Av(r,i);return!1},set:function(i,s){io&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new io),_v(t,i,s)):oo?(n||(n=new oo),Sv(n,i,s)):(r||(r={key:{},next:null}),xv(r,i,s))}};return o},Rv=String.prototype.replace,Pv=/%20/g,Wa={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ru={default:Wa.RFC3986,formatters:{RFC1738:function(e){return Rv.call(e,Pv,"+")},RFC3986:function(e){return String(e)}},RFC1738:Wa.RFC1738,RFC3986:Wa.RFC3986},Iv=Ru,Va=Object.prototype.hasOwnProperty,Vr=Array.isArray,Bt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Nv=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Vr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},Jd=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},Lv=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Vr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Va.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Vr(t)&&!Vr(n)&&(o=Jd(t,r)),Vr(t)&&Vr(n)?(n.forEach(function(i,s){if(Va.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return Va.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},kv=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},Bv=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}},Mv=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var f=s.charCodeAt(l);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===Iv.RFC1738&&(f===40||f===41)){a+=s.charAt(l);continue}if(f<128){a=a+Bt[f];continue}if(f<2048){a=a+(Bt[192|f>>6]+Bt[128|f&63]);continue}if(f<55296||f>=57344){a=a+(Bt[224|f>>12]+Bt[128|f>>6&63]+Bt[128|f&63]);continue}l+=1,f=65536+((f&1023)<<10|s.charCodeAt(l)&1023),a+=Bt[240|f>>18]+Bt[128|f>>12&63]+Bt[128|f>>6&63]+Bt[128|f&63]}return a},Fv=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var f=a[l],u=s[f];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:s,prop:f}),r.push(u))}return Nv(n),t},Uv=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Dv=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},$v=function(t,n){return[].concat(t,n)},jv=function(t,n){if(Vr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},Zd={arrayToObject:Jd,assign:kv,combine:$v,compact:Fv,decode:Bv,encode:Mv,isBuffer:Dv,isRegExp:Uv,maybeMap:jv,merge:Lv},eh=Cv,Co=Zd,Di=Ru,Hv=Object.prototype.hasOwnProperty,nl={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},tr=Array.isArray,qv=Array.prototype.push,th=function(e,t){qv.apply(e,tr(t)?t:[t])},Gv=Date.prototype.toISOString,il=Di.default,Ze={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Co.encode,encodeValuesOnly:!1,format:il,formatter:Di.formatters[il],indices:!1,serializeDate:function(t){return Gv.call(t)},skipNulls:!1,strictNullHandling:!1},Wv=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},za={},Vv=function e(t,n,r,o,i,s,a,l,f,u,h,d,c,p,m,_){for(var T=t,E=_,b=0,A=!1;(E=E.get(za))!==void 0&&!A;){var w=E.get(t);if(b+=1,typeof w<"u"){if(w===b)throw new RangeError("Cyclic object value");A=!0}typeof E.get(za)>"u"&&(b=0)}if(typeof l=="function"?T=l(n,T):T instanceof Date?T=h(T):r==="comma"&&tr(T)&&(T=Co.maybeMap(T,function(k){return k instanceof Date?h(k):k})),T===null){if(i)return a&&!p?a(n,Ze.encoder,m,"key",d):n;T=""}if(Wv(T)||Co.isBuffer(T)){if(a){var N=p?n:a(n,Ze.encoder,m,"key",d);return[c(N)+"="+c(a(T,Ze.encoder,m,"value",d))]}return[c(n)+"="+c(String(T))]}var F=[];if(typeof T>"u")return F;var M;if(r==="comma"&&tr(T))p&&a&&(T=Co.maybeMap(T,a)),M=[{value:T.length>0?T.join(",")||null:void 0}];else if(tr(l))M=l;else{var q=Object.keys(T);M=f?q.sort(f):q}for(var W=o&&tr(T)&&T.length===1?n+"[]":n,V=0;V<M.length;++V){var j=M[V],Y=typeof j=="object"&&typeof j.value<"u"?j.value:T[j];if(!(s&&Y===null)){var oe=tr(T)?typeof r=="function"?r(W,j):W:W+(u?"."+j:"["+j+"]");_.set(t,b);var K=eh();K.set(za,_),th(F,e(Y,oe,r,o,i,s,r==="comma"&&p&&tr(T)?null:a,l,f,u,h,d,c,p,m,K))}}return F},zv=function(t){if(!t)return Ze;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||Ze.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=Di.default;if(typeof t.format<"u"){if(!Hv.call(Di.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=Di.formatters[r],i=Ze.filter;return(typeof t.filter=="function"||tr(t.filter))&&(i=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Ze.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Ze.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ze.charsetSentinel,delimiter:typeof t.delimiter>"u"?Ze.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Ze.encode,encoder:typeof t.encoder=="function"?t.encoder:Ze.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Ze.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Ze.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Ze.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ze.strictNullHandling}},Yv=function(e,t){var n=e,r=zv(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):tr(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a;t&&t.arrayFormat in nl?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var l=nl[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=l==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var u=eh(),h=0;h<o.length;++h){var d=o[h];r.skipNulls&&n[d]===null||th(s,Vv(n[d],d,l,f,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,u))}var c=s.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),c.length>0?p+c:""},An=Zd,Ys=Object.prototype.hasOwnProperty,Kv=Array.isArray,Ge={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:An.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Qv=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},rh=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Xv="utf8=%26%2310003%3B",Jv="utf8=%E2%9C%93",Zv=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,f=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===Jv?f="utf-8":s[l]===Xv&&(f="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var u=s[l],h=u.indexOf("]="),d=h===-1?u.indexOf("="):h+1,c,p;d===-1?(c=n.decoder(u,Ge.decoder,f,"key"),p=n.strictNullHandling?null:""):(c=n.decoder(u.slice(0,d),Ge.decoder,f,"key"),p=An.maybeMap(rh(u.slice(d+1),n),function(m){return n.decoder(m,Ge.decoder,f,"value")})),p&&n.interpretNumericEntities&&f==="iso-8859-1"&&(p=Qv(p)),u.indexOf("[]=")>-1&&(p=Kv(p)?[p]:p),Ys.call(r,c)?r[c]=An.combine(r[c],p):r[c]=p}return r},e0=function(e,t,n,r){for(var o=r?t:rh(t,n),i=e.length-1;i>=0;--i){var s,a=e[i];if(a==="[]"&&n.parseArrays)s=[].concat(o);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,f=parseInt(l,10);!n.parseArrays&&l===""?s={0:o}:!isNaN(f)&&a!==l&&String(f)===l&&f>=0&&n.parseArrays&&f<=n.arrayLimit?(s=[],s[f]=o):l!=="__proto__"&&(s[l]=o)}o=s}return o},t0=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),f=l?i.slice(0,l.index):i,u=[];if(f){if(!r.plainObjects&&Ys.call(Object.prototype,f)&&!r.allowPrototypes)return;u.push(f)}for(var h=0;r.depth>0&&(l=a.exec(i))!==null&&h<r.depth;){if(h+=1,!r.plainObjects&&Ys.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}return l&&u.push("["+i.slice(l.index)+"]"),e0(u,n,r,o)}},r0=function(t){if(!t)return Ge;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"?Ge.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ge.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ge.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ge.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ge.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ge.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ge.comma,decoder:typeof t.decoder=="function"?t.decoder:Ge.decoder,delimiter:typeof t.delimiter=="string"||An.isRegExp(t.delimiter)?t.delimiter:Ge.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ge.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ge.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ge.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ge.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ge.strictNullHandling}},n0=function(e,t){var n=r0(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?Zv(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=t0(a,r[a],n,typeof e=="string");o=An.merge(o,l,n)}return n.allowSparse===!0?o:An.compact(o)},i0=Yv,o0=n0,a0=Ru,s0={formats:a0,parse:o0,stringify:i0};const u0=jt(s0);var c0="[object String]",l0=Object.prototype,f0=l0.toString,d0=Array.isArray;function h0(e){return!!e&&typeof e=="object"}function p0(e){return typeof e=="string"||!d0(e)&&h0(e)&&f0.call(e)==c0}var m0=p0;const ol=jt(m0);var Pu={exports:{}};class nh extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}}const g0=({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 o=0,i=0;function s(){const u=Date.now();return u-o>t?(i=1,o=u,0):(i<e?i++:(o+=t,i=1),o-u)}const a=[];function l(){const u=Date.now();if(a.length<e)return a.push(u),0;const h=a.shift()+t;return u>=h?(a.push(u),0):(a.push(h),h-u)}const f=n?l:s;return u=>{const h=function(...d){if(!h.isEnabled)return(async()=>u.apply(this,d))();let c;return new Promise((p,m)=>{c=setTimeout(()=>{p(u.apply(this,d)),r.delete(c)},f()),r.set(c,m)})};return h.abort=()=>{for(const d of r.keys())clearTimeout(d),r.get(d)(new nh);r.clear(),a.splice(0,a.length)},h.isEnabled=!0,h}};Pu.exports=g0;Pu.exports.AbortError=nh;var y0=Pu.exports;const v0=jt(y0);var E0="[object Object]";function _0(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function b0(e,t){return function(n){return e(t(n))}}var w0=Function.prototype,ih=Object.prototype,oh=w0.toString,S0=ih.hasOwnProperty,T0=oh.call(Object),O0=ih.toString,x0=b0(Object.getPrototypeOf,Object);function A0(e){return!!e&&typeof e=="object"}function C0(e){if(!A0(e)||O0.call(e)!=E0||_0(e))return!1;var t=x0(e);if(t===null)return!0;var n=S0.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&oh.call(n)==T0}var R0=C0;const ao=jt(R0);function P0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,s,a=[],l=!0,f=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){f=!0,o=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(f)throw o}}return a}}function al(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function wn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?al(Object(n),!0).forEach(function(r){I0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):al(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ks(e){"@babel/helpers - typeof";return Ks=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},Ks(e)}function Qs(){Qs=function(o,i){return new n(o,void 0,i)};var e=RegExp.prototype,t=new WeakMap;function n(o,i,s){var a=new RegExp(o,i);return t.set(a,s||t.get(o)),Mo(a,n.prototype)}function r(o,i){var s=t.get(i);return Object.keys(s).reduce(function(a,l){var f=s[l];if(typeof f=="number")a[l]=o[f];else{for(var u=0;o[f[u]]===void 0&&u+1<f.length;)u++;a[l]=o[f[u]]}return a},Object.create(null))}return N0(n,RegExp),n.prototype.exec=function(o){var i=e.exec.call(this,o);if(i){i.groups=r(i,this);var s=i.indices;s&&(s.groups=r(s,this))}return i},n.prototype[Symbol.replace]=function(o,i){if(typeof i=="string"){var s=t.get(this);return e[Symbol.replace].call(this,o,i.replace(/\$<([^>]+)>/g,function(l,f){var u=s[f];return"$"+(Array.isArray(u)?u.join("$"):u)}))}if(typeof i=="function"){var a=this;return e[Symbol.replace].call(this,o,function(){var l=arguments;return typeof l[l.length-1]!="object"&&(l=[].slice.call(l)).push(r(l,a)),i.apply(this,l)})}return e[Symbol.replace].call(this,o,i)},Qs.apply(this,arguments)}function I0(e,t,n){return t=U0(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N0(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&&Mo(e,t)}function Mo(e,t){return Mo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Mo(e,t)}function L0(e,t){return k0(e)||P0(e,t)||ah(e,t)||B0()}function k0(e){if(Array.isArray(e))return e}function ah(e,t){if(e){if(typeof e=="string")return sl(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 sl(e,t)}}function sl(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 B0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M0(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ah(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,s=!1,a;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function F0(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 U0(e){var t=F0(e,"string");return typeof t=="symbol"?t:String(t)}function D0(){return typeof process<"u"&&!process.browser}function $0(){return typeof window<"u"&&"navigator"in window&&"product"in window.navigator&&window.navigator.product==="ReactNative"}function j0(){return process.versions&&process.versions.node?"v".concat(process.versions.node):process.version}function H0(){return window}function Xs(){}var Js=Qs(/(\d+)(%)/,{value:1});function Ya(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:7,n=t;if(Js.test(e)){var r,o=(r=e.match(Js))===null||r===void 0?void 0:r.groups;if(o&&o.value){var i=parseInt(o.value)/100;n=Math.round(t*i)}}return Math.min(30,Math.max(1,n))}function ul(e,t){return t("info","Throttle request to ".concat(e,"/s")),v0({limit:e,interval:1e3,strict:!1})}var q0=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"auto",n=e.defaults.logHandler,r=n===void 0?Xs:n,o=ol(t)?Ya(t):Ya("auto",t),i=ul(o,r),s=!1,a=e.interceptors.request.use(function(f){return i(function(){return f})()},function(f){return Promise.reject(f)}),l=e.interceptors.response.use(function(f){if(!s&&ol(t)&&(t==="auto"||Js.test(t))&&f.headers&&f.headers["x-contentful-ratelimit-second-limit"]){var u=parseInt(f.headers["x-contentful-ratelimit-second-limit"]),h=Ya(t,u);h!==o&&(a&&e.interceptors.request.eject(a),o=h,i=ul(h,r),a=e.interceptors.request.use(function(d){return i(function(){return d})()},function(d){return Promise.reject(d)})),s=!0}return f},function(f){return Promise.reject(f)});return function(){e.interceptors.request.eject(a),e.interceptors.response.eject(l)}},G0=function(t){return new Promise(function(n){setTimeout(n,t)})},W0=function(t){return Math.pow(Math.SQRT2,t)};function V0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,n=e.defaults,r=n.responseLogger,o=r===void 0?Xs:r,i=n.requestLogger,s=i===void 0?Xs:i;e.interceptors.request.use(function(a){return s(a),a},function(a){return s(a),Promise.reject(a)}),e.interceptors.response.use(function(a){return o(a),a},function(a){var l=a.response,f=a.config;if(o(a),!f||!e.defaults.retryOnError)return Promise.reject(a);var u=f.attempts||1;if(u>t)return a.attempts=f.attempts,Promise.reject(a);var h=null,d=W0(u);return l?l.status>=500&&l.status<600?h="Server ".concat(l.status):l.status===429&&(h="Rate limit",l.headers&&a.response.headers["x-contentful-ratelimit-reset"]&&(d=l.headers["x-contentful-ratelimit-reset"])):h="Connection",h?(d=Math.floor(d*1e3+Math.random()*200+500),e.defaults.logHandler("warning","".concat(h," error occurred. Waiting for ").concat(d," ms before retrying...")),f.attempts=u+1,delete f.httpAgent,delete f.httpsAgent,G0(d).then(function(){return e(f)})):Promise.reject(a)})}function z0(e,t){e.interceptors.request.use(function(n){return t().then(function(r){return n.headers=wn(wn({},n.headers),{},{Authorization:"Bearer ".concat(r)}),n})})}var Y0=/^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;function sh(e,t){var n={insecure:!1,retryOnError:!0,logHandler:function(m,_){if(m==="error"&&_){var T=[_.name,_.message].filter(function(E){return E}).join(" - ");console.error("[error] ".concat(T)),console.error(_);return}console.log("[".concat(m,"] ").concat(_))},headers:{},httpAgent:!1,httpsAgent:!1,timeout:3e4,throttle:0,proxy:!1,basePath:"",adapter:void 0,maxContentLength:1073741824,maxBodyLength:1073741824},r=wn(wn({},n),t);if(!r.accessToken){var o=new TypeError("Expected parameter accessToken");throw r.logHandler("error",o),o}var i=r.insecure?"http":"https",s=r.space?"".concat(r.space,"/"):"",a=r.defaultHostname,l=r.insecure?80:443;if(r.host&&Y0.test(r.host)){var f=r.host.split(":");if(f.length===2){var u=L0(f,2);a=u[0],l=u[1]}else a=f[0]}r.basePath&&(r.basePath="/".concat(r.basePath.split("/").filter(Boolean).join("/")));var h=t.baseURL||"".concat(i,"://").concat(a,":").concat(l).concat(r.basePath,"/spaces/").concat(s);!r.headers.Authorization&&typeof r.accessToken!="function"&&(r.headers.Authorization="Bearer "+r.accessToken);var d={baseURL:h,headers:r.headers,httpAgent:r.httpAgent,httpsAgent:r.httpsAgent,paramsSerializer:u0.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},c=e.create(d);return c.httpClientParams=t,c.cloneWithNewParams=function(p){return sh(e,wn(wn({},yr(t)),p))},r.onBeforeRequest&&c.interceptors.request.use(r.onBeforeRequest),typeof r.accessToken=="function"&&z0(c,r.accessToken),r.throttle&&q0(c,r.throttle),V0(c,r.retryLimit),r.onError&&c.interceptors.response.use(function(p){return p},r.onError),c}function K0(e){var t=e.query,n={};return delete t.resolveLinks,n.params=yr(t),n}function Q0(e,t){if(!(t in e)){var n=new Error;throw n.name="PropertyMissing",n.message="Required property ".concat(t,` missing from:
28
+ `+t.prev}function ao(e,t){var n=Xs(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=gr(e,o)?t(e[o],e):""}var i=typeof za=="function"?za(e):[],s;if(An){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var l in e)gr(e,l)&&(n&&String(Number(l))===l&&l<e.length||An&&s["$"+l]instanceof Symbol||(Xd.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof za=="function")for(var f=0;f<i.length;f++)Jd.call(e,i[f])&&r.push("["+t(i[f])+"]: "+t(e[i[f]],e));return r}var Ic=Cc,In=Yy,Ov=sv,Av=Ic("%TypeError%"),so=Ic("%WeakMap%",!0),co=Ic("%Map%",!0),Cv=In("WeakMap.prototype.get",!0),Rv=In("WeakMap.prototype.set",!0),Nv=In("WeakMap.prototype.has",!0),Pv=In("Map.prototype.get",!0),Iv=In("Map.prototype.set",!0),Lv=In("Map.prototype.has",!0),Lc=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},kv=function(e,t){var n=Lc(e,t);return n&&n.value},Mv=function(e,t,n){var r=Lc(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Bv=function(e,t){return!!Lc(e,t)},Fv=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new Av("Side channel does not contain "+Ov(i))},get:function(i){if(so&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Cv(t,i)}else if(co){if(n)return Pv(n,i)}else if(r)return kv(r,i)},has:function(i){if(so&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Nv(t,i)}else if(co){if(n)return Lv(n,i)}else if(r)return Bv(r,i);return!1},set:function(i,s){so&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new so),Rv(t,i,s)):co?(n||(n=new co),Iv(n,i,s)):(r||(r={key:{},next:null}),Mv(r,i,s))}};return o},Uv=String.prototype.replace,Dv=/%20/g,Ka={RFC1738:"RFC1738",RFC3986:"RFC3986"},kc={default:Ka.RFC3986,formatters:{RFC1738:function(e){return Uv.call(e,Dv,"+")},RFC3986:function(e){return String(e)}},RFC1738:Ka.RFC1738,RFC3986:Ka.RFC3986},$v=kc,Qa=Object.prototype.hasOwnProperty,Yr=Array.isArray,Mt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),jv=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Yr(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},nh=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},Hv=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Yr(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Qa.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Yr(t)&&!Yr(n)&&(o=nh(t,r)),Yr(t)&&Yr(n)?(n.forEach(function(i,s){if(Qa.call(t,s)){var a=t[s];a&&typeof a=="object"&&i&&typeof i=="object"?t[s]=e(a,i,r):t.push(i)}else t[s]=i}),t):Object.keys(n).reduce(function(i,s){var a=n[s];return Qa.call(i,s)?i[s]=e(i[s],a,r):i[s]=a,i},o)},qv=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},Gv=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}},Wv=function(t,n,r,o,i){if(t.length===0)return t;var s=t;if(typeof t=="symbol"?s=Symbol.prototype.toString.call(t):typeof t!="string"&&(s=String(t)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(c){return"%26%23"+parseInt(c.slice(2),16)+"%3B"});for(var a="",l=0;l<s.length;++l){var f=s.charCodeAt(l);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||i===$v.RFC1738&&(f===40||f===41)){a+=s.charAt(l);continue}if(f<128){a=a+Mt[f];continue}if(f<2048){a=a+(Mt[192|f>>6]+Mt[128|f&63]);continue}if(f<55296||f>=57344){a=a+(Mt[224|f>>12]+Mt[128|f>>6&63]+Mt[128|f&63]);continue}l+=1,f=65536+((f&1023)<<10|s.charCodeAt(l)&1023),a+=Mt[240|f>>18]+Mt[128|f>>12&63]+Mt[128|f>>6&63]+Mt[128|f&63]}return a},Vv=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var f=a[l],c=s[f];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:s,prop:f}),r.push(c))}return jv(n),t},zv=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Yv=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Kv=function(t,n){return[].concat(t,n)},Qv=function(t,n){if(Yr(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},ih={arrayToObject:nh,assign:qv,combine:Kv,compact:Vv,decode:Gv,encode:Wv,isBuffer:Yv,isRegExp:zv,maybeMap:Qv,merge:Hv},oh=Fv,Io=ih,$i=kc,Xv=Object.prototype.hasOwnProperty,cl={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},nr=Array.isArray,Jv=Array.prototype.push,ah=function(e,t){Jv.apply(e,nr(t)?t:[t])},Zv=Date.prototype.toISOString,ul=$i.default,et={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Io.encode,encodeValuesOnly:!1,format:ul,formatter:$i.formatters[ul],indices:!1,serializeDate:function(t){return Zv.call(t)},skipNulls:!1,strictNullHandling:!1},e0=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Xa={},t0=function e(t,n,r,o,i,s,a,l,f,c,h,d,u,p,m,E){for(var T=t,_=E,b=0,A=!1;(_=_.get(Xa))!==void 0&&!A;){var w=_.get(t);if(b+=1,typeof w<"u"){if(w===b)throw new RangeError("Cyclic object value");A=!0}typeof _.get(Xa)>"u"&&(b=0)}if(typeof l=="function"?T=l(n,T):T instanceof Date?T=h(T):r==="comma"&&nr(T)&&(T=Io.maybeMap(T,function(k){return k instanceof Date?h(k):k})),T===null){if(i)return a&&!p?a(n,et.encoder,m,"key",d):n;T=""}if(e0(T)||Io.isBuffer(T)){if(a){var P=p?n:a(n,et.encoder,m,"key",d);return[u(P)+"="+u(a(T,et.encoder,m,"value",d))]}return[u(n)+"="+u(String(T))]}var F=[];if(typeof T>"u")return F;var B;if(r==="comma"&&nr(T))p&&a&&(T=Io.maybeMap(T,a)),B=[{value:T.length>0?T.join(",")||null:void 0}];else if(nr(l))B=l;else{var W=Object.keys(T);B=f?W.sort(f):W}for(var G=o&&nr(T)&&T.length===1?n+"[]":n,V=0;V<B.length;++V){var H=B[V],Y=typeof H=="object"&&typeof H.value<"u"?H.value:T[H];if(!(s&&Y===null)){var oe=nr(T)?typeof r=="function"?r(G,H):G:G+(c?"."+H:"["+H+"]");E.set(t,b);var K=oh();K.set(Xa,E),ah(F,e(Y,oe,r,o,i,s,r==="comma"&&p&&nr(T)?null:a,l,f,c,h,d,u,p,m,K))}}return F},r0=function(t){if(!t)return et;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||et.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=$i.default;if(typeof t.format<"u"){if(!Xv.call($i.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=$i.formatters[r],i=et.filter;return(typeof t.filter=="function"||nr(t.filter))&&(i=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:et.addQueryPrefix,allowDots:typeof t.allowDots>"u"?et.allowDots:!!t.allowDots,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:et.charsetSentinel,delimiter:typeof t.delimiter>"u"?et.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:et.encode,encoder:typeof t.encoder=="function"?t.encoder:et.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:et.encodeValuesOnly,filter:i,format:r,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:et.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:et.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:et.strictNullHandling}},n0=function(e,t){var n=e,r=r0(t),o,i;typeof r.filter=="function"?(i=r.filter,n=i("",n)):nr(r.filter)&&(i=r.filter,o=i);var s=[];if(typeof n!="object"||n===null)return"";var a;t&&t.arrayFormat in cl?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var l=cl[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=l==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(n)),r.sort&&o.sort(r.sort);for(var c=oh(),h=0;h<o.length;++h){var d=o[h];r.skipNulls&&n[d]===null||ah(s,t0(n[d],d,l,f,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,c))}var u=s.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),u.length>0?p+u:""},Cn=ih,Zs=Object.prototype.hasOwnProperty,i0=Array.isArray,We={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Cn.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},o0=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},sh=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},a0="utf8=%26%2310003%3B",s0="utf8=%E2%9C%93",c0=function(t,n){var r={__proto__:null},o=n.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=n.parameterLimit===1/0?void 0:n.parameterLimit,s=o.split(n.delimiter,i),a=-1,l,f=n.charset;if(n.charsetSentinel)for(l=0;l<s.length;++l)s[l].indexOf("utf8=")===0&&(s[l]===s0?f="utf-8":s[l]===a0&&(f="iso-8859-1"),a=l,l=s.length);for(l=0;l<s.length;++l)if(l!==a){var c=s[l],h=c.indexOf("]="),d=h===-1?c.indexOf("="):h+1,u,p;d===-1?(u=n.decoder(c,We.decoder,f,"key"),p=n.strictNullHandling?null:""):(u=n.decoder(c.slice(0,d),We.decoder,f,"key"),p=Cn.maybeMap(sh(c.slice(d+1),n),function(m){return n.decoder(m,We.decoder,f,"value")})),p&&n.interpretNumericEntities&&f==="iso-8859-1"&&(p=o0(p)),c.indexOf("[]=")>-1&&(p=i0(p)?[p]:p),Zs.call(r,u)?r[u]=Cn.combine(r[u],p):r[u]=p}return r},u0=function(e,t,n,r){for(var o=r?t:sh(t,n),i=e.length-1;i>=0;--i){var s,a=e[i];if(a==="[]"&&n.parseArrays)s=[].concat(o);else{s=n.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,f=parseInt(l,10);!n.parseArrays&&l===""?s={0:o}:!isNaN(f)&&a!==l&&String(f)===l&&f>=0&&n.parseArrays&&f<=n.arrayLimit?(s=[],s[f]=o):l!=="__proto__"&&(s[l]=o)}o=s}return o},l0=function(t,n,r,o){if(t){var i=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=r.depth>0&&s.exec(i),f=l?i.slice(0,l.index):i,c=[];if(f){if(!r.plainObjects&&Zs.call(Object.prototype,f)&&!r.allowPrototypes)return;c.push(f)}for(var h=0;r.depth>0&&(l=a.exec(i))!==null&&h<r.depth;){if(h+=1,!r.plainObjects&&Zs.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(l[1])}return l&&c.push("["+i.slice(l.index)+"]"),u0(c,n,r,o)}},f0=function(t){if(!t)return We;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"?We.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?We.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:We.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:We.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:We.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:We.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:We.comma,decoder:typeof t.decoder=="function"?t.decoder:We.decoder,delimiter:typeof t.delimiter=="string"||Cn.isRegExp(t.delimiter)?t.delimiter:We.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:We.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:We.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:We.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:We.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:We.strictNullHandling}},d0=function(e,t){var n=f0(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?c0(e,n):e,o=n.plainObjects?Object.create(null):{},i=Object.keys(r),s=0;s<i.length;++s){var a=i[s],l=l0(a,r[a],n,typeof e=="string");o=Cn.merge(o,l,n)}return n.allowSparse===!0?o:Cn.compact(o)},h0=n0,p0=d0,m0=kc,g0={formats:m0,parse:p0,stringify:h0};const y0=jt(g0);var v0="[object String]",_0=Object.prototype,E0=_0.toString,b0=Array.isArray;function w0(e){return!!e&&typeof e=="object"}function S0(e){return typeof e=="string"||!b0(e)&&w0(e)&&E0.call(e)==v0}var T0=S0;const ll=jt(T0);var Mc={exports:{}};class ch extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}}const x0=({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 o=0,i=0;function s(){const c=Date.now();return c-o>t?(i=1,o=c,0):(i<e?i++:(o+=t,i=1),o-c)}const a=[];function l(){const c=Date.now();if(a.length<e)return a.push(c),0;const h=a.shift()+t;return c>=h?(a.push(c),0):(a.push(h),h-c)}const f=n?l:s;return c=>{const h=function(...d){if(!h.isEnabled)return(async()=>c.apply(this,d))();let u;return new Promise((p,m)=>{u=setTimeout(()=>{p(c.apply(this,d)),r.delete(u)},f()),r.set(u,m)})};return h.abort=()=>{for(const d of r.keys())clearTimeout(d),r.get(d)(new ch);r.clear(),a.splice(0,a.length)},h.isEnabled=!0,h}};Mc.exports=x0;Mc.exports.AbortError=ch;var O0=Mc.exports;const A0=jt(O0);var C0="[object Object]";function R0(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function N0(e,t){return function(n){return e(t(n))}}var P0=Function.prototype,uh=Object.prototype,lh=P0.toString,I0=uh.hasOwnProperty,L0=lh.call(Object),k0=uh.toString,M0=N0(Object.getPrototypeOf,Object);function B0(e){return!!e&&typeof e=="object"}function F0(e){if(!B0(e)||k0.call(e)!=C0||R0(e))return!1;var t=M0(e);if(t===null)return!0;var n=I0.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&lh.call(n)==L0}var U0=F0;const uo=jt(U0);function D0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,s,a=[],l=!0,f=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(c){f=!0,o=c}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(f)throw o}}return a}}function fl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fl(Object(n),!0).forEach(function(r){$0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fl(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ec(e){"@babel/helpers - typeof";return ec=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},ec(e)}function tc(){tc=function(o,i){return new n(o,void 0,i)};var e=RegExp.prototype,t=new WeakMap;function n(o,i,s){var a=new RegExp(o,i);return t.set(a,s||t.get(o)),Do(a,n.prototype)}function r(o,i){var s=t.get(i);return Object.keys(s).reduce(function(a,l){var f=s[l];if(typeof f=="number")a[l]=o[f];else{for(var c=0;o[f[c]]===void 0&&c+1<f.length;)c++;a[l]=o[f[c]]}return a},Object.create(null))}return j0(n,RegExp),n.prototype.exec=function(o){var i=e.exec.call(this,o);if(i){i.groups=r(i,this);var s=i.indices;s&&(s.groups=r(s,this))}return i},n.prototype[Symbol.replace]=function(o,i){if(typeof i=="string"){var s=t.get(this);return e[Symbol.replace].call(this,o,i.replace(/\$<([^>]+)>/g,function(l,f){var c=s[f];return"$"+(Array.isArray(c)?c.join("$"):c)}))}if(typeof i=="function"){var a=this;return e[Symbol.replace].call(this,o,function(){var l=arguments;return typeof l[l.length-1]!="object"&&(l=[].slice.call(l)).push(r(l,a)),i.apply(this,l)})}return e[Symbol.replace].call(this,o,i)},tc.apply(this,arguments)}function $0(e,t,n){return t=z0(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j0(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&&Do(e,t)}function Do(e,t){return Do=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Do(e,t)}function H0(e,t){return q0(e)||D0(e,t)||fh(e,t)||G0()}function q0(e){if(Array.isArray(e))return e}function fh(e,t){if(e){if(typeof e=="string")return dl(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 dl(e,t)}}function dl(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 G0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W0(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=fh(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,s=!1,a;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function V0(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 z0(e){var t=V0(e,"string");return typeof t=="symbol"?t:String(t)}function Y0(){return typeof process<"u"&&!process.browser}function K0(){return typeof window<"u"&&"navigator"in window&&"product"in window.navigator&&window.navigator.product==="ReactNative"}function Q0(){return process.versions&&process.versions.node?"v".concat(process.versions.node):process.version}function X0(){return window}function rc(){}var nc=tc(/(\d+)(%)/,{value:1});function Ja(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:7,n=t;if(nc.test(e)){var r,o=(r=e.match(nc))===null||r===void 0?void 0:r.groups;if(o&&o.value){var i=parseInt(o.value)/100;n=Math.round(t*i)}}return Math.min(30,Math.max(1,n))}function hl(e,t){return t("info","Throttle request to ".concat(e,"/s")),A0({limit:e,interval:1e3,strict:!1})}var J0=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"auto",n=e.defaults.logHandler,r=n===void 0?rc:n,o=ll(t)?Ja(t):Ja("auto",t),i=hl(o,r),s=!1,a=e.interceptors.request.use(function(f){return i(function(){return f})()},function(f){return Promise.reject(f)}),l=e.interceptors.response.use(function(f){if(!s&&ll(t)&&(t==="auto"||nc.test(t))&&f.headers&&f.headers["x-contentful-ratelimit-second-limit"]){var c=parseInt(f.headers["x-contentful-ratelimit-second-limit"]),h=Ja(t,c);h!==o&&(a&&e.interceptors.request.eject(a),o=h,i=hl(h,r),a=e.interceptors.request.use(function(d){return i(function(){return d})()},function(d){return Promise.reject(d)})),s=!0}return f},function(f){return Promise.reject(f)});return function(){e.interceptors.request.eject(a),e.interceptors.response.eject(l)}},Z0=function(t){return new Promise(function(n){setTimeout(n,t)})},e_=function(t){return Math.pow(Math.SQRT2,t)};function t_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5,n=e.defaults,r=n.responseLogger,o=r===void 0?rc:r,i=n.requestLogger,s=i===void 0?rc:i;e.interceptors.request.use(function(a){return s(a),a},function(a){return s(a),Promise.reject(a)}),e.interceptors.response.use(function(a){return o(a),a},function(a){var l=a.response,f=a.config;if(o(a),!f||!e.defaults.retryOnError)return Promise.reject(a);var c=f.attempts||1;if(c>t)return a.attempts=f.attempts,Promise.reject(a);var h=null,d=e_(c);return l?l.status>=500&&l.status<600?h="Server ".concat(l.status):l.status===429&&(h="Rate limit",l.headers&&a.response.headers["x-contentful-ratelimit-reset"]&&(d=l.headers["x-contentful-ratelimit-reset"])):h="Connection",h?(d=Math.floor(d*1e3+Math.random()*200+500),e.defaults.logHandler("warning","".concat(h," error occurred. Waiting for ").concat(d," ms before retrying...")),f.attempts=c+1,delete f.httpAgent,delete f.httpsAgent,Z0(d).then(function(){return e(f)})):Promise.reject(a)})}function r_(e,t){e.interceptors.request.use(function(n){return t().then(function(r){return n.headers=Sn(Sn({},n.headers),{},{Authorization:"Bearer ".concat(r)}),n})})}var n_=/^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;function dh(e,t){var n={insecure:!1,retryOnError:!0,logHandler:function(m,E){if(m==="error"&&E){var T=[E.name,E.message].filter(function(_){return _}).join(" - ");console.error("[error] ".concat(T)),console.error(E);return}console.log("[".concat(m,"] ").concat(E))},headers:{},httpAgent:!1,httpsAgent:!1,timeout:3e4,throttle:0,proxy:!1,basePath:"",adapter:void 0,maxContentLength:1073741824,maxBodyLength:1073741824},r=Sn(Sn({},n),t);if(!r.accessToken){var o=new TypeError("Expected parameter accessToken");throw r.logHandler("error",o),o}var i=r.insecure?"http":"https",s=r.space?"".concat(r.space,"/"):"",a=r.defaultHostname,l=r.insecure?80:443;if(r.host&&n_.test(r.host)){var f=r.host.split(":");if(f.length===2){var c=H0(f,2);a=c[0],l=c[1]}else a=f[0]}r.basePath&&(r.basePath="/".concat(r.basePath.split("/").filter(Boolean).join("/")));var h=t.baseURL||"".concat(i,"://").concat(a,":").concat(l).concat(r.basePath,"/spaces/").concat(s);!r.headers.Authorization&&typeof r.accessToken!="function"&&(r.headers.Authorization="Bearer "+r.accessToken);var d={baseURL:h,headers:r.headers,httpAgent:r.httpAgent,httpsAgent:r.httpsAgent,paramsSerializer:y0.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},u=e.create(d);return u.httpClientParams=t,u.cloneWithNewParams=function(p){return dh(e,Sn(Sn({},_r(t)),p))},r.onBeforeRequest&&u.interceptors.request.use(r.onBeforeRequest),typeof r.accessToken=="function"&&r_(u,r.accessToken),r.throttle&&J0(u,r.throttle),t_(u,r.retryLimit),r.onError&&u.interceptors.response.use(function(p){return p},r.onError),u}function i_(e){var t=e.query,n={};return delete t.resolveLinks,n.params=_r(t),n}function o_(e,t){if(!(t in e)){var n=new Error;throw n.name="PropertyMissing",n.message="Required property ".concat(t,` missing from:
31
31
 
32
32
  `).concat(JSON.stringify(e),`
33
33
 
34
- `),n}return!0}function uh(e){var t=Object.getOwnPropertyNames(e),n=M0(t),r;try{for(n.s();!(r=n.n()).done;){var o=r.value,i=e[o];i&&Ks(i)==="object"&&uh(i)}}catch(s){n.e(s)}finally{n.f()}return Object.freeze(e)}function X0(e){return uh(e.sys||{}),e}function cl(){var e=H0();if(!e)return null;var t=e.navigator.userAgent,n=e.navigator.platform,r=["Macintosh","MacIntel","MacPPC","Mac68K"],o=["Win32","Win64","Windows","WinCE"],i=["iPhone","iPad","iPod"];return r.indexOf(n)!==-1?"macOS":i.indexOf(n)!==-1?"iOS":o.indexOf(n)!==-1?"Windows":/Android/.test(t)?"Android":/Linux/.test(n)?"Linux":null}function J0(){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 Z0(e,t,n,r){var o=[];t&&o.push("app ".concat(t)),n&&o.push("integration ".concat(n)),r&&o.push("feature "+r),o.push("sdk ".concat(e));var i=null;try{$0()?(i=cl(),o.push("platform ReactNative")):D0()?(i=J0(),o.push("platform node.js/".concat(j0()))):(i=cl(),o.push("platform browser"))}catch{i=null}return i&&o.push("os ".concat(i)),"".concat(o.filter(function(s){return s!==""}).join("; "),";")}function eE(e){return Object.defineProperty(e,"toPlainObject",{enumerable:!1,configurable:!1,writable:!1,value:function(){return yr(this)}})}function tE(e){var t=e.config,n=e.response,r;if(t&&t.headers&&t.headers.Authorization){var o="...".concat(t.headers.Authorization.toString().substr(-5));t.headers.Authorization="Bearer ".concat(o)}if(!ao(n)||!ao(t))throw e;var i=n==null?void 0:n.data,s={status:n==null?void 0:n.status,statusText:n==null?void 0:n.statusText,message:"",details:{}};ao(t)&&(s.request={url:t.url,headers:t.headers,method:t.method,payloadData:t.data}),i&&ao(i)&&("requestId"in i&&(s.requestId=i.requestId||"UNKNOWN"),"message"in i&&(s.message=i.message||""),"details"in i&&(s.details=i.details||{}),"sys"in i&&"id"in i.sys&&(r=i.sys.id));var a=new Error;a.name=r&&r!=="Unknown"?r:"".concat(n==null?void 0:n.status," ").concat(n==null?void 0:n.statusText);try{a.message=JSON.stringify(s,null," ")}catch{var l;a.message=(l=s==null?void 0:s.message)!==null&&l!==void 0?l:""}throw a}const rE=Object.freeze(Object.defineProperty({__proto__:null,createHttpClient:sh,createRequestConfig:K0,enforceObjPath:Q0,errorHandler:tE,freezeSys:X0,getUserAgentHeader:Z0,toPlainObject:eE},Symbol.toStringTag,{value:"Module"})),Ht=Wi(rE);var so={},di={},uo={},ll;function nE(){if(ll)return uo;ll=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.wrapSpace=t;var e=Ht;function t(n){return(0,e.freezeSys)((0,e.toPlainObject)(n))}return uo}var hi={},Ka={exports:{}},fl;function Nn(){return fl||(fl=1,function(e,t){(function(n,r){e.exports=r()})(ae,function(){var n=Function.prototype.toString,r=Object.create,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,l=Object.getPrototypeOf,f=Object.prototype,u=f.hasOwnProperty,h=f.propertyIsEnumerable,d=typeof a=="function",c=typeof WeakMap=="function",p=function(){if(c)return function(){return new WeakMap};var F=function(){function M(){this._keys=[],this._values=[]}return M.prototype.has=function(q){return!!~this._keys.indexOf(q)},M.prototype.get=function(q){return this._values[this._keys.indexOf(q)]},M.prototype.set=function(q,W){this._keys.push(q),this._values.push(W)},M}();return function(){return new F}}(),m=function(F,M){var q=F.__proto__||l(F);if(!q)return r(null);var W=q.constructor;if(W===M.Object)return q===M.Object.prototype?{}:r(q);if(~n.call(W).indexOf("[native code]"))try{return new W}catch{}return r(q)},_=function(F,M,q,W){var V=m(F,M);W.set(F,V);for(var j in F)u.call(F,j)&&(V[j]=q(F[j],W));if(d)for(var Y=a(F),oe=0,K=Y.length,k=void 0;oe<K;++oe)k=Y[oe],h.call(F,k)&&(V[k]=q(F[k],W));return V},T=function(F,M,q,W){var V=m(F,M);W.set(F,V);for(var j=d?s(F).concat(a(F)):s(F),Y=0,oe=j.length,K=void 0,k=void 0;Y<oe;++Y)if(K=j[Y],K!=="callee"&&K!=="caller")if(k=i(F,K),k){!k.get&&!k.set&&(k.value=q(F[K],W));try{o(V,K,k)}catch{V[K]=k.value}}else V[K]=q(F[K],W);return V},E=function(F){var M="";return F.global&&(M+="g"),F.ignoreCase&&(M+="i"),F.multiline&&(M+="m"),F.unicode&&(M+="u"),F.sticky&&(M+="y"),M},b=Array.isArray,A=Object.getPrototypeOf,w=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function N(F,M){var q=!!(M&&M.isStrict),W=M&&M.realm||w,V=q?T:_,j=function(Y,oe){if(!Y||typeof Y!="object")return Y;if(oe.has(Y))return oe.get(Y);var K=Y.__proto__||A(Y),k=K&&K.constructor;if(!k||k===W.Object)return V(Y,W,j,oe);var z;if(b(Y)){if(q)return T(Y,W,j,oe);z=new k,oe.set(Y,z);for(var J=0,de=Y.length;J<de;++J)z[J]=j(Y[J],oe);return z}if(Y instanceof W.Date)return new k(Y.getTime());if(Y instanceof W.RegExp)return z=new k(Y.source,Y.flags||E(Y)),z.lastIndex=Y.lastIndex,z;if(W.Map&&Y instanceof W.Map)return z=new k,oe.set(Y,z),Y.forEach(function(X,ee){z.set(ee,j(X,oe))}),z;if(W.Set&&Y instanceof W.Set)return z=new k,oe.set(Y,z),Y.forEach(function(X){z.add(j(X,oe))}),z;if(W.Blob&&Y instanceof W.Blob)return Y.slice(0,Y.size,Y.type);if(W.Buffer&&W.Buffer.isBuffer(Y))return z=W.Buffer.allocUnsafe?W.Buffer.allocUnsafe(Y.length):new k(Y.length),oe.set(Y,z),Y.copy(z),z;if(W.ArrayBuffer){if(W.ArrayBuffer.isView(Y))return z=new k(Y.buffer.slice(0)),oe.set(Y,z),z;if(Y instanceof W.ArrayBuffer)return z=Y.slice(0),oe.set(Y,z),z}return typeof Y.then=="function"||Y instanceof Error||W.WeakMap&&Y instanceof W.WeakMap||W.WeakSet&&Y instanceof W.WeakSet?Y:V(Y,W,j,oe)};return j(F,p())}return N.default=N,N.strict=function(M,q){return N(M,{isStrict:!0,realm:q?q.realm:void 0})},N})}(Ka)),Ka.exports}var co={},lo={exports:{}},dl;function iE(){return dl||(dl=1,function(e,t){t=e.exports=n,t.getSerialize=r;function n(o,i,s,a){return JSON.stringify(o,r(i,a),s)}function r(o,i){var s=[],a=[];return i==null&&(i=function(l,f){return s[0]===f?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(f)).join(".")+"]"}),function(l,f){if(s.length>0){var u=s.indexOf(this);~u?s.splice(u+1):s.push(this),~u?a.splice(u,1/0,l):a.push(l),~s.indexOf(f)&&(f=i.call(this,l,f))}else s.push(f);return o==null?f:o.call(this,l,f)}}}(lo,lo.exports)),lo.exports}var hl;function ch(){if(hl)return co;hl=1,Object.defineProperty(co,"__esModule",{value:!0}),co.default=n;var e=t(iE());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 o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,e.default)(this,o,i,(s,a)=>({sys:{type:"Link",linkType:"Entry",id:a.sys.id,circular:!0}}))}})}return co}var oE=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},aE=function(){function e(t,n){var r=[],o=!0,i=!1,s=void 0;try{for(var a=t[Symbol.iterator](),l;!(o=(l=a.next()).done)&&(r.push(l.value),!(n&&r.length===n));o=!0);}catch(f){i=!0,s=f}finally{try{!o&&a.return&&a.return()}finally{if(i)throw s}}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 pi(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 ji={},sE=function(t){return t&&t.sys&&t.sys.type==="Link"},uE=function(t){return t&&t.sys&&t.sys.type==="ResourceLink"},cE=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]},pl=function(t,n){var r=n.entryId,o=n.linkType,i=n.spaceId,s=n.environmentId;return i&&s?t.get(i+"!"+s+"!"+o+"!"+r):t.get(o+"!"+r)},lE=function(t){var n=/.*:spaces\/([^/]+)(?:\/environments\/([^/]+))?\/entries\/([^/]+)$/;if(n.test(t)){var r=t.match(n),o=aE(r,4);o[0];var i=o[1],s=o[2],a=s===void 0?"master":s,l=o[3];return{spaceId:i,environmentId:a,entryId:l}}},fE=function(t,n){var r=n.sys,o=r.type,i=r.linkType;if(o==="ResourceLink"){var s=n.sys.urn,a=lE(s),l=a.spaceId,f=a.environmentId,u=a.entryId,h=i.split(":")[1];return pl(t,{linkType:h,entryId:u,spaceId:l,environmentId:f})||ji}var d=n.sys.id;return pl(t,{linkType:i,entryId:d})||ji},dE=function(t){if(Array.isArray(t))return t.filter(function(r){return r!==ji});for(var n in t)t[n]===ji&&delete t[n];return t},hE=function e(t,n,r,o){if(n(t))return r(t);if(t&&(typeof t>"u"?"undefined":oE(t))==="object"){for(var i in t)t.hasOwnProperty(i)&&(t[i]=e(t[i],n,r,o));o&&(t=dE(t))}return t},pE=function(t,n,r){var o=fE(t,n);return o===ji?r?o:n:o},mE=function(t,n){if(!Array.isArray(n))return t;var r=Object.keys(t).filter(function(o){return n.indexOf(o)!==-1});return r.reduce(function(o,i){return o[i]=t[i],o},{})},gE=function(t,n){if(n=n||{},!t.items)return[];var r=yr(t),o=Object.keys(r.includes||{}).reduce(function(a,l){return[].concat(pi(a),pi(t.includes[l]))},[]),i=[].concat(pi(r.items),pi(o)).filter(function(a){return!!a.sys}),s=new Map(i.reduce(function(a,l){var f=cE(l.sys).map(function(u){return[u,l]});return a.push.apply(a,pi(f)),a},[]));return i.forEach(function(a){var l=mE(a,n.itemEntryPoints);Object.assign(a,hE(l,function(f){return sE(f)||uE(f)},function(f){return pE(s,f,n.removeUnresolved)},n.removeUnresolved))}),r.items};const yE=Object.freeze(Object.defineProperty({__proto__:null,default:gE},Symbol.toStringTag,{value:"Module"})),lh=Wi(yE);var ml;function vE(){if(ml)return hi;ml=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.wrapEntry=i,hi.wrapEntryCollection=s;var e=o(Nn()),t=Ht,n=o(ch()),r=o(lh);function o(a){return a&&a.__esModule?a:{default:a}}function i(a){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(a)))}function s(a,l){let{resolveLinks:f,removeUnresolved:u}=l;const h=(0,n.default)((0,t.toPlainObject)((0,e.default)(a)));return f&&(h.items=(0,r.default)(h,{removeUnresolved:u,itemEntryPoints:["fields"]})),(0,t.freezeSys)(h)}return hi}var mi={},gl;function EE(){if(gl)return mi;gl=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.wrapAsset=r,mi.wrapAssetCollection=o;var e=n(Nn()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return mi}var fo={},yl;function _E(){if(yl)return fo;yl=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.wrapAssetKey=r;var e=n(Nn()),t=Ht;function n(o){return o&&o.__esModule?o:{default:o}}function r(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return fo}var gi={},vl;function bE(){if(vl)return gi;vl=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.wrapContentType=r,gi.wrapContentTypeCollection=o;var e=n(Nn()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return gi}var yi={},El;function wE(){if(El)return yi;El=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.wrapLocale=r,yi.wrapLocaleCollection=o;var e=n(Nn()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return yi}var vi={},_l;function SE(){if(_l)return vi;_l=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.wrapTag=r,vi.wrapTagCollection=o;var e=n(Nn()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return vi}var bl;function TE(){if(bl)return di;bl=1,Object.defineProperty(di,"__esModule",{value:!0}),di.default=void 0;var e=l(nE()),t=l(vE()),n=l(EE()),r=l(_E()),o=l(bE()),i=l(wE()),s=l(SE());function a(u){if(typeof WeakMap!="function")return null;var h=new WeakMap,d=new WeakMap;return(a=function(c){return c?d:h})(u)}function l(u,h){if(!h&&u&&u.__esModule)return u;if(u===null||typeof u!="object"&&typeof u!="function")return{default:u};var d=a(h);if(d&&d.has(u))return d.get(u);var c={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in u)if(m!=="default"&&Object.prototype.hasOwnProperty.call(u,m)){var _=p?Object.getOwnPropertyDescriptor(u,m):null;_&&(_.get||_.set)?Object.defineProperty(c,m,_):c[m]=u[m]}return c.default=u,d&&d.set(u,c),c}var f={space:e,entry:t,asset:n,assetKey:r,contentType:o,locale:i,tag:s};return di.default=f,di}var ho={},wl;function OE(){if(wl)return ho;wl=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.default=a;var e=Ht,t=r(lh),n=r(ch());function r(h){return h&&h.__esModule?h:{default:h}}function o(h,d){var c=Object.keys(h);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(h);d&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(h,m).enumerable})),c.push.apply(c,p)}return c}function i(h){for(var d=1;d<arguments.length;d++){var c=arguments[d]!=null?arguments[d]:{};d%2?o(Object(c),!0).forEach(function(p){s(h,p,c[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(c)):o(Object(c)).forEach(function(p){Object.defineProperty(h,p,Object.getOwnPropertyDescriptor(c,p))})}return h}function s(h,d,c){return d in h?Object.defineProperty(h,d,{value:c,enumerable:!0,configurable:!0,writable:!0}):h[d]=c,h}async function a(h,d){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!d||!d.initial&&!d.nextSyncToken&&!d.nextPageToken)throw new Error("Please provide one of `initial`, `nextSyncToken` or `nextPageToken` parameters for syncing");if(d&&d.content_type&&!d.type)d.type="Entry";else if(d&&d.content_type&&d.type&&d.type!=="Entry")throw new Error("When using the `content_type` filter your `type` parameter cannot be different from `Entry`.");const p={resolveLinks:!0,removeUnresolved:!1,paginate:!0},{resolveLinks:m,removeUnresolved:_,paginate:T}=i(i({},p),c),b=await f(h,[],d,{paginate:T});m&&(b.items=(0,t.default)(b,{removeUnresolved:_,itemEntryPoints:["fields"]}));const A=l(b.items);return b.nextSyncToken&&(A.nextSyncToken=b.nextSyncToken),b.nextPageToken&&(A.nextPageToken=b.nextPageToken),(0,e.freezeSys)((0,n.default)((0,e.toPlainObject)(A)))}function l(h){const d=c=>(p,m)=>(m.sys.type===c&&p.push((0,e.toPlainObject)(m)),p);return{entries:h.reduce(d("Entry"),[]),assets:h.reduce(d("Asset"),[]),deletedEntries:h.reduce(d("DeletedEntry"),[]),deletedAssets:h.reduce(d("DeletedAsset"),[])}}async function f(h,d,c,p){let{paginate:m}=p;c.nextSyncToken&&(c.sync_token=c.nextSyncToken,delete c.nextSyncToken),c.nextPageToken&&(c.sync_token=c.nextPageToken,delete c.nextPageToken),c.sync_token&&(delete c.initial,delete c.type,delete c.content_type,delete c.limit);const T=(await h.get("sync",(0,e.createRequestConfig)({query:c}))).data||{};return d=d.concat(T.items||[]),T.nextPageUrl?m?(delete c.initial,c.sync_token=u(T.nextPageUrl),f(h,d,c,{paginate:m})):{items:d,nextPageToken:u(T.nextPageUrl)}:T.nextSyncUrl?{items:d,nextSyncToken:u(T.nextSyncUrl)}:{items:[]}}function u(h){const d=h.split("?");return d.length>0?d[1].replace("sync_token=",""):""}return ho}var po={},Sl;function xE(){if(Sl)return po;Sl=1,Object.defineProperty(po,"__esModule",{value:!0}),po.default=r;function e(o,i){var s=Object.keys(o);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(o);i&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(o,l).enumerable})),s.push.apply(s,a)}return s}function t(o){for(var i=1;i<arguments.length;i++){var s=arguments[i]!=null?arguments[i]:{};i%2?e(Object(s),!0).forEach(function(a){n(o,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(s)):e(Object(s)).forEach(function(a){Object.defineProperty(o,a,Object.getOwnPropertyDescriptor(s,a))})}return o}function n(o,i,s){return i in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s,o}function r(o){if(!o.select)return o;const i=Array.isArray(o.select)?o.select:o.select.split(","),s=new Set(i);return s.has("sys")?o:(s.add("sys.id"),s.add("sys.type"),t(t({},o),{},{select:[...s].join(",")}))}return po}var En={},Tl;function AE(){if(Tl)return En;Tl=1,Object.defineProperty(En,"__esModule",{value:!0}),En.ValidationError=void 0,En.default=t;class e extends Error{constructor(r,o){super(`Invalid "${r}" provided, `+o),this.name="ValidationError"}}En.ValidationError=e;function t(n,r,o){if(o=o||{},typeof r!="number")throw new e(n,`only numeric values are allowed for timestamps, provided type was "${typeof r}"`);if(o.maximum&&r>o.maximum)throw new e(n,`value (${r}) cannot be further in the future than expected maximum (${o.maximum})`);if(o.now&&r<o.now)throw new e(n,`value (${r}) cannot be in the past, current time was ${o.now}`)}return En}var Ol;function CE(){if(Ol)return so;Ol=1,Object.defineProperty(so,"__esModule",{value:!0}),so.default=u;var e=Ht,t=i(TE()),n=i(OE()),r=i(xE()),o=i(AE());function i(h){return h&&h.__esModule?h:{default:h}}function s(h,d){var c=Object.keys(h);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(h);d&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(h,m).enumerable})),c.push.apply(c,p)}return c}function a(h){for(var d=1;d<arguments.length;d++){var c=arguments[d]!=null?arguments[d]:{};d%2?s(Object(c),!0).forEach(function(p){l(h,p,c[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(c)):s(Object(c)).forEach(function(p){Object.defineProperty(h,p,Object.getOwnPropertyDescriptor(c,p))})}return h}function l(h,d,c){return d in h?Object.defineProperty(h,d,{value:c,enumerable:!0,configurable:!0,writable:!0}):h[d]=c,h}const f=48*60*60;function u(h){let{http:d,getGlobalOptions:c}=h;const{wrapSpace:p}=t.default.space,{wrapContentType:m,wrapContentTypeCollection:_}=t.default.contentType,{wrapEntry:T,wrapEntryCollection:E}=t.default.entry,{wrapAsset:b,wrapAssetCollection:A}=t.default.asset,{wrapTag:w,wrapTagCollection:N}=t.default.tag,{wrapAssetKey:F}=t.default.assetKey,{wrapLocaleCollection:M}=t.default.locale,q=Q=>{const re=new Error("The resource could not be found.");return re.sys={type:"Error",id:"NotFound"},re.details={type:"Entry",id:Q,environment:c().environment,space:c().space},re};async function W(){Ve(d);try{const Q=await d.get("/");return p(Q.data)}catch(Q){(0,e.errorHandler)(Q)}}async function V(Q){ce(d);try{const re=await d.get(`content_types/${Q}`);return m(re.data)}catch(re){(0,e.errorHandler)(re)}}async function j(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d);try{const re=await d.get("content_types",(0,e.createRequestConfig)({query:Q}));return _(re.data)}catch(re){(0,e.errorHandler)(re)}}async function Y(Q){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Q)throw q(Q);try{const Pe=await this.getEntries(a({"sys.id":Q},re));if(Pe.items.length>0)return T(Pe.items[0]);throw q(Q)}catch(Pe){(0,e.errorHandler)(Pe)}}async function oe(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d);const{resolveLinks:re,removeUnresolved:Pe}=c(Q);Q=(0,r.default)(Q);try{const xe=await d.get("entries",(0,e.createRequestConfig)({query:Q}));return E(xe.data,{resolveLinks:re,removeUnresolved:Pe})}catch(xe){(0,e.errorHandler)(xe)}}async function K(Q){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ce(d),re=(0,r.default)(re);try{const Pe=await d.get(`assets/${Q}`,(0,e.createRequestConfig)({query:re}));return b(Pe.data)}catch(Pe){(0,e.errorHandler)(Pe)}}async function k(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d),Q=(0,r.default)(Q);try{const re=await d.get("assets",(0,e.createRequestConfig)({query:Q}));return A(re.data)}catch(re){(0,e.errorHandler)(re)}}async function z(Q){ce(d);try{const re=await d.get(`tags/${Q}`);return w(re.data)}catch(re){(0,e.errorHandler)(re)}}async function J(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d),Q=(0,r.default)(Q);try{const re=await d.get("tags",(0,e.createRequestConfig)({query:Q}));return N(re.data)}catch(re){(0,e.errorHandler)(re)}}async function de(Q){ce(d);try{const re=Math.floor(Date.now()/1e3),Pe=re+f;(0,o.default)("expiresAt",Q,{maximum:Pe,now:re});const xe={expiresAt:Q},at=await d.post("asset_keys",xe);return F(at.data)}catch(re){(0,e.errorHandler)(re)}}async function X(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(d);try{const re=await d.get("locales",(0,e.createRequestConfig)({query:Q}));return M(re.data)}catch(re){(0,e.errorHandler)(re)}}async function ee(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{paginate:!0};const{resolveLinks:Pe,removeUnresolved:xe}=c(Q);return ce(d),(0,n.default)(d,Q,a({resolveLinks:Pe,removeUnresolved:xe},re))}function ue(Q){const{resolveLinks:re,removeUnresolved:Pe}=c({});return E(Q,{resolveLinks:re,removeUnresolved:Pe})}function ce(Q){Q.defaults.baseURL=c().environmentBaseUrl}function Ve(Q){Q.defaults.baseURL=c().spaceBaseUrl}return{getSpace:W,getContentType:V,getContentTypes:j,getEntry:Y,getEntries:oe,getAsset:K,getAssets:k,getTag:z,getTags:J,createAssetKey:de,getLocales:X,parseEntries:ue,sync:ee}}return so}var mo={},xl;function RE(){if(xl)return mo;xl=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo.default=e;function e(t){return function(r){return Object.assign({},t,r)}}return mo}var Al;function PE(){if(Al)return to;Al=1,Object.defineProperty(to,"__esModule",{value:!0}),to.createClient=l;var e=o(Ud()),t=Ht,n=o(CE()),r=o(RE());function o(f){return f&&f.__esModule?f:{default:f}}function i(f,u){var h=Object.keys(f);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(f);u&&(d=d.filter(function(c){return Object.getOwnPropertyDescriptor(f,c).enumerable})),h.push.apply(h,d)}return h}function s(f){for(var u=1;u<arguments.length;u++){var h=arguments[u]!=null?arguments[u]:{};u%2?i(Object(h),!0).forEach(function(d){a(f,d,h[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(h)):i(Object(h)).forEach(function(d){Object.defineProperty(f,d,Object.getOwnPropertyDescriptor(h,d))})}return f}function a(f,u,h){return u in f?Object.defineProperty(f,u,{value:h,enumerable:!0,configurable:!0,writable:!0}):f[u]=h,f}function l(f){if(!f.accessToken)throw new TypeError("Expected parameter accessToken");if(!f.space)throw new TypeError("Expected parameter space");const h=s(s({},{resolveLinks:!0,removeUnresolved:!1,defaultHostname:"cdn.contentful.com",environment:"master"}),f),d=(0,t.getUserAgentHeader)("contentful.js/9.1.34",h.application,h.integration);h.headers=s(s({},h.headers),{},{"Content-Type":"application/vnd.contentful.delivery.v1+json","X-Contentful-User-Agent":d});const c=(0,t.createHttpClient)(e.default,h),p=(0,r.default)({resolveLinks:h.resolveLinks,environment:h.environment,removeUnresolved:h.removeUnresolved,spaceBaseUrl:c.defaults.baseURL,environmentBaseUrl:`${c.defaults.baseURL}environments/${h.environment}`});return c.defaults.baseURL=p().environmentBaseUrl,(0,n.default)({http:c,getGlobalOptions:p})}return to}var Qa={},Xa,Cl;function IE(){return Cl||(Cl=1,Xa=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),Xa}var Ja,Rl;function NE(){if(Rl)return Ja;Rl=1;var e="%[a-f0-9]{2}",t=new RegExp("("+e+")|([^%]+?)","gi"),n=new RegExp("("+e+")+","gi");function r(s,a){try{return[decodeURIComponent(s.join(""))]}catch{}if(s.length===1)return s;a=a||1;var l=s.slice(0,a),f=s.slice(a);return Array.prototype.concat.call([],r(l),r(f))}function o(s){try{return decodeURIComponent(s)}catch{for(var a=s.match(t)||[],l=1;l<a.length;l++)s=r(a,l).join(""),a=s.match(t)||[];return s}}function i(s){for(var a={"%FE%FF":"��","%FF%FE":"��"},l=n.exec(s);l;){try{a[l[0]]=decodeURIComponent(l[0])}catch{var f=o(l[0]);f!==l[0]&&(a[l[0]]=f)}l=n.exec(s)}a["%C2"]="�";for(var u=Object.keys(a),h=0;h<u.length;h++){var d=u[h];s=s.replace(new RegExp(d,"g"),a[d])}return s}return Ja=function(s){if(typeof s!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof s+"`");try{return s=s.replace(/\+/g," "),decodeURIComponent(s)}catch{return i(s)}},Ja}var Za,Pl;function LE(){return Pl||(Pl=1,Za=(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)]}),Za}var es,Il;function kE(){return Il||(Il=1,es=function(e,t){for(var n={},r=Object.keys(e),o=Array.isArray(t),i=0;i<r.length;i++){var s=r[i],a=e[s];(o?t.indexOf(s)!==-1:t(s,a,e))&&(n[s]=a)}return n}),es}var Nl;function BE(){return Nl||(Nl=1,function(e){const t=IE(),n=NE(),r=LE(),o=kE(),i=E=>E==null,s=Symbol("encodeFragmentIdentifier");function a(E){switch(E.arrayFormat){case"index":return b=>(A,w)=>{const N=A.length;return w===void 0||E.skipNull&&w===null||E.skipEmptyString&&w===""?A:w===null?[...A,[u(b,E),"[",N,"]"].join("")]:[...A,[u(b,E),"[",u(N,E),"]=",u(w,E)].join("")]};case"bracket":return b=>(A,w)=>w===void 0||E.skipNull&&w===null||E.skipEmptyString&&w===""?A:w===null?[...A,[u(b,E),"[]"].join("")]:[...A,[u(b,E),"[]=",u(w,E)].join("")];case"colon-list-separator":return b=>(A,w)=>w===void 0||E.skipNull&&w===null||E.skipEmptyString&&w===""?A:w===null?[...A,[u(b,E),":list="].join("")]:[...A,[u(b,E),":list=",u(w,E)].join("")];case"comma":case"separator":case"bracket-separator":{const b=E.arrayFormat==="bracket-separator"?"[]=":"=";return A=>(w,N)=>N===void 0||E.skipNull&&N===null||E.skipEmptyString&&N===""?w:(N=N===null?"":N,w.length===0?[[u(A,E),b,u(N,E)].join("")]:[[w,u(N,E)].join(E.arrayFormatSeparator)])}default:return b=>(A,w)=>w===void 0||E.skipNull&&w===null||E.skipEmptyString&&w===""?A:w===null?[...A,u(b,E)]:[...A,[u(b,E),"=",u(w,E)].join("")]}}function l(E){let b;switch(E.arrayFormat){case"index":return(A,w,N)=>{if(b=/\[(\d*)\]$/.exec(A),A=A.replace(/\[\d*\]$/,""),!b){N[A]=w;return}N[A]===void 0&&(N[A]={}),N[A][b[1]]=w};case"bracket":return(A,w,N)=>{if(b=/(\[\])$/.exec(A),A=A.replace(/\[\]$/,""),!b){N[A]=w;return}if(N[A]===void 0){N[A]=[w];return}N[A]=[].concat(N[A],w)};case"colon-list-separator":return(A,w,N)=>{if(b=/(:list)$/.exec(A),A=A.replace(/:list$/,""),!b){N[A]=w;return}if(N[A]===void 0){N[A]=[w];return}N[A]=[].concat(N[A],w)};case"comma":case"separator":return(A,w,N)=>{const F=typeof w=="string"&&w.includes(E.arrayFormatSeparator),M=typeof w=="string"&&!F&&h(w,E).includes(E.arrayFormatSeparator);w=M?h(w,E):w;const q=F||M?w.split(E.arrayFormatSeparator).map(W=>h(W,E)):w===null?w:h(w,E);N[A]=q};case"bracket-separator":return(A,w,N)=>{const F=/(\[\])$/.test(A);if(A=A.replace(/\[\]$/,""),!F){N[A]=w&&h(w,E);return}const M=w===null?[]:w.split(E.arrayFormatSeparator).map(q=>h(q,E));if(N[A]===void 0){N[A]=M;return}N[A]=[].concat(N[A],M)};default:return(A,w,N)=>{if(N[A]===void 0){N[A]=w;return}N[A]=[].concat(N[A],w)}}}function f(E){if(typeof E!="string"||E.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function u(E,b){return b.encode?b.strict?t(E):encodeURIComponent(E):E}function h(E,b){return b.decode?n(E):E}function d(E){return Array.isArray(E)?E.sort():typeof E=="object"?d(Object.keys(E)).sort((b,A)=>Number(b)-Number(A)).map(b=>E[b]):E}function c(E){const b=E.indexOf("#");return b!==-1&&(E=E.slice(0,b)),E}function p(E){let b="";const A=E.indexOf("#");return A!==-1&&(b=E.slice(A)),b}function m(E){E=c(E);const b=E.indexOf("?");return b===-1?"":E.slice(b+1)}function _(E,b){return b.parseNumbers&&!Number.isNaN(Number(E))&&typeof E=="string"&&E.trim()!==""?E=Number(E):b.parseBooleans&&E!==null&&(E.toLowerCase()==="true"||E.toLowerCase()==="false")&&(E=E.toLowerCase()==="true"),E}function T(E,b){b=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},b),f(b.arrayFormatSeparator);const A=l(b),w=Object.create(null);if(typeof E!="string"||(E=E.trim().replace(/^[?#&]/,""),!E))return w;for(const N of E.split("&")){if(N==="")continue;let[F,M]=r(b.decode?N.replace(/\+/g," "):N,"=");M=M===void 0?null:["comma","separator","bracket-separator"].includes(b.arrayFormat)?M:h(M,b),A(h(F,b),M,w)}for(const N of Object.keys(w)){const F=w[N];if(typeof F=="object"&&F!==null)for(const M of Object.keys(F))F[M]=_(F[M],b);else w[N]=_(F,b)}return b.sort===!1?w:(b.sort===!0?Object.keys(w).sort():Object.keys(w).sort(b.sort)).reduce((N,F)=>{const M=w[F];return M&&typeof M=="object"&&!Array.isArray(M)?N[F]=d(M):N[F]=M,N},Object.create(null))}e.extract=m,e.parse=T,e.stringify=(E,b)=>{if(!E)return"";b=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},b),f(b.arrayFormatSeparator);const A=M=>b.skipNull&&i(E[M])||b.skipEmptyString&&E[M]==="",w=a(b),N={};for(const M of Object.keys(E))A(M)||(N[M]=E[M]);const F=Object.keys(N);return b.sort!==!1&&F.sort(b.sort),F.map(M=>{const q=E[M];return q===void 0?"":q===null?u(M,b):Array.isArray(q)?q.length===0&&b.arrayFormat==="bracket-separator"?u(M,b)+"[]":q.reduce(w(M),[]).join("&"):u(M,b)+"="+u(q,b)}).filter(M=>M.length>0).join("&")},e.parseUrl=(E,b)=>{b=Object.assign({decode:!0},b);const[A,w]=r(E,"#");return Object.assign({url:A.split("?")[0]||"",query:T(m(E),b)},b&&b.parseFragmentIdentifier&&w?{fragmentIdentifier:h(w,b)}:{})},e.stringifyUrl=(E,b)=>{b=Object.assign({encode:!0,strict:!0,[s]:!0},b);const A=c(E.url).split("?")[0]||"",w=e.extract(E.url),N=e.parse(w,{sort:!1}),F=Object.assign(N,E.query);let M=e.stringify(F,b);M&&(M=`?${M}`);let q=p(E.url);return E.fragmentIdentifier&&(q=`#${b[s]?u(E.fragmentIdentifier,b):E.fragmentIdentifier}`),`${A}${M}${q}`},e.pick=(E,b,A)=>{A=Object.assign({parseFragmentIdentifier:!0,[s]:!1},A);const{url:w,query:N,fragmentIdentifier:F}=e.parseUrl(E,A);return e.stringifyUrl({url:w,query:o(N,b),fragmentIdentifier:F},A)},e.exclude=(E,b,A)=>{const w=Array.isArray(b)?N=>!b.includes(N):(N,F)=>!b(N,F);return e.pick(E,w,A)}}(Qa)),Qa}var Ll;function ME(){return Ll||(Ll=1,function(e,t){(function(n,r){e.exports=r(PE(),BE())})(ae,function(n,r){return function(){var o={897:function(l){l.exports=n},48:function(l){l.exports=r}},i={};function s(l){var f=i[l];if(f!==void 0)return f.exports;var u=i[l]={exports:{}};return o[l](u,u.exports,s),u.exports}s.d=function(l,f){for(var u in f)s.o(f,u)&&!s.o(l,u)&&Object.defineProperty(l,u,{enumerable:!0,get:f[u]})},s.o=function(l,f){return Object.prototype.hasOwnProperty.call(l,f)},s.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var a={};return function(){s.r(a),s.d(a,{getEntries:function(){return oe},getEntry:function(){return Y},setContext:function(){return m}});var l=s(897),f=s(48),u={CONTENTFUL:{ENVIRONMENTS_MAPING:{beta:"beta",rc:"rc",live:"master",local:"beta"},LOCALES:{DEFAULT:"en",SUPPORTED:["en","es","fr","pt"]},SPACE:"txbhe1wabmyx",HOSTS:{CDN:"cdn.contentful.com",PREVIEW:"preview.contentful.com"}}};const{CONTENTFUL:{ENVIRONMENTS_MAPING:h,SPACE:d,HOSTS:c}}=u;let p={apiKey:null,previewKey:null,environment:null,isPreview:!1,host:c.CDN,space:d};const m=({apiKey:K,environment:k,isPreview:z=!1,location:J,previewKey:de,space:X=null})=>{p.apiKey=K,p.previewKey=de,p.environment=(ee=>{if(!ee)throw new Error("Cannot map environment: Environment not defined");if(!h[ee])throw new Error(`Cannot map environment: No mapping found for environment ${ee}`);return h[ee]})(k),p.isPreview=z||(ee=>{let ue=!1;if(ee&&ee.search){const ce=(0,f.parse)(ee.search);ue=ce.isPreview&&ce.isPreview==="true"}return ue})(J),p.space=X||d},_=(K=!1)=>{const{apiKey:k,environment:z,isPreview:J,previewKey:de,space:X}=p;return J===!0||K===!0?{accessToken:de,environment:z,host:c.PREVIEW,space:X}:{accessToken:k,environment:z,host:c.CDN,space:X}},T=K=>typeof K=="object"&&K!==null,E=K=>Array.isArray(K)&&K.length,b=K=>{if(!T(K))throw new Error("Cannot flatten fields");const{fields:k,sys:z}=K;if(!k)throw new Error("Cannot flatten fields");let J={...k};if(T(z)){const{contentType:de,createdAt:X,updatedAt:ee}=z;de&&Object.assign(J,{contentType:de.sys.id}),X&&Object.assign(J,{createdAt:X}),ee&&Object.assign(J,{updatedAt:ee})}return J},{CONTENTFUL:{LOCALES:A}}=u,w=(K,k)=>T(K)&&((z,J)=>Object.prototype.hasOwnProperty.call(z,J))(K,k),N=(K,k)=>{const z=(J=>A.SUPPORTED.includes(J)?J:A.DEFAULT)(k);return w(K,z)?K[z]:w(K,A.DEFAULT)?K[A.DEFAULT]:K},F=K=>T(K)&&K.sys&&K.sys.type==="Asset",M=(K,k,z)=>{const{title:J,file:de}=b(K);if(!de)throw new Error("Cannot flatten asset");const{contentType:X,fileName:ee,url:ue,details:ce}=N(de,k);if(!ue)throw new Error("Cannot flatten asset");return z?{description:J||ee,height:ce&&ce.image&&ce.image.height,type:X,url:ue,width:ce&&ce.image&&ce.image.width}:ue},q=K=>T(K)&&K.sys&&K.sys.type==="Entry",W=(K,k,z)=>{const J={},de=((X,ee)=>{const ue={};for(const[ce,Ve]of Object.entries(X))ue[ce]=N(Ve,ee);return ue})(b(K),k);for(const[X,ee]of Object.entries(de))F(ee)?J[X]=M(ee,k,z):q(ee)?J[X]=W(ee,k,z):E(ee)?J[X]=ee.map(ue=>F(ue)?M(ue,k,z):q(ue)?W(ue,k,z):ue):J[X]=ee;return J},V=({items:K})=>{if(!E(K))throw new Error("Cannot read items");return K},j=async(K,k)=>{const z=_(k);return await(await(0,l.createClient)(z)).getEntries(K)},Y=async(K={},k={},z=!1)=>((J,{flatten:de=!0,locale:X="en",assetDetails:ee=!1})=>{const ue=V(J);return de?W(ue[0],X,ee):ue[0]})(await j(K,z),{...K,...k}),oe=async(K={},k={},z=!1)=>((J,{flatten:de=!0,locale:X="en",assetDetails:ee=!1})=>{const ue=V(J);return de?((ce,Ve,Q)=>ce.map(re=>W(re,Ve,Q)))(ue,X,ee):ue})(await j(K,z),{...K,...k})}(),a}()})}(oa)),oa.exports}var ts={exports:{}},rs={exports:{}},ns={exports:{}},is={exports:{}},kl;function Iu(){return kl||(kl=1,function(e,t){(function(n,r){e.exports=r()})(ae,function(){function n(m){return!isNaN(parseFloat(m))&&isFinite(m)}function r(m){return m.charAt(0).toUpperCase()+m.substring(1)}function o(m){return function(){return this[m]}}var i=["isConstructor","isEval","isNative","isToplevel"],s=["columnNumber","lineNumber"],a=["fileName","functionName","source"],l=["args"],f=["evalOrigin"],u=i.concat(s,a,l,f);function h(m){if(m)for(var _=0;_<u.length;_++)m[u[_]]!==void 0&&this["set"+r(u[_])](m[u[_]])}h.prototype={getArgs:function(){return this.args},setArgs:function(m){if(Object.prototype.toString.call(m)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=m},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(m){if(m instanceof h)this.evalOrigin=m;else if(m instanceof Object)this.evalOrigin=new h(m);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var m=this.getFileName()||"",_=this.getLineNumber()||"",T=this.getColumnNumber()||"",E=this.getFunctionName()||"";return this.getIsEval()?m?"[eval] ("+m+":"+_+":"+T+")":"[eval]:"+_+":"+T:E?E+" ("+m+":"+_+":"+T+")":m+":"+_+":"+T}},h.fromString=function(_){var T=_.indexOf("("),E=_.lastIndexOf(")"),b=_.substring(0,T),A=_.substring(T+1,E).split(","),w=_.substring(E+1);if(w.indexOf("@")===0)var N=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(w,""),F=N[1],M=N[2],q=N[3];return new h({functionName:b,args:A||void 0,fileName:F,lineNumber:M||void 0,columnNumber:q||void 0})};for(var d=0;d<i.length;d++)h.prototype["get"+r(i[d])]=o(i[d]),h.prototype["set"+r(i[d])]=function(m){return function(_){this[m]=!!_}}(i[d]);for(var c=0;c<s.length;c++)h.prototype["get"+r(s[c])]=o(s[c]),h.prototype["set"+r(s[c])]=function(m){return function(_){if(!n(_))throw new TypeError(m+" must be a Number");this[m]=Number(_)}}(s[c]);for(var p=0;p<a.length;p++)h.prototype["get"+r(a[p])]=o(a[p]),h.prototype["set"+r(a[p])]=function(m){return function(_){this[m]=String(_)}}(a[p]);return h})}(is)),is.exports}var Bl;function FE(){return Bl||(Bl=1,function(e,t){(function(n,r){e.exports=r(Iu())})(ae,function(r){var o=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,s=/^(eval@)?(\[native code])?$/;return{parse:function(l){if(typeof l.stacktrace<"u"||typeof l["opera#sourceloc"]<"u")return this.parseOpera(l);if(l.stack&&l.stack.match(i))return this.parseV8OrIE(l);if(l.stack)return this.parseFFOrSafari(l);throw new Error("Cannot parse given Error object")},extractLocation:function(l){if(l.indexOf(":")===-1)return[l];var f=/(.+?)(?::(\d+))?(?::(\d+))?$/,u=f.exec(l.replace(/[()]/g,""));return[u[1],u[2]||void 0,u[3]||void 0]},parseV8OrIE:function(l){var f=l.stack.split(`
35
- `).filter(function(u){return!!u.match(i)},this);return f.map(function(u){u.indexOf("(eval ")>-1&&(u=u.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var h=u.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),d=h.match(/ (\(.+\)$)/);h=d?h.replace(d[0],""):h;var c=this.extractLocation(d?d[1]:h),p=d&&h||void 0,m=["eval","<anonymous>"].indexOf(c[0])>-1?void 0:c[0];return new r({functionName:p,fileName:m,lineNumber:c[1],columnNumber:c[2],source:u})},this)},parseFFOrSafari:function(l){var f=l.stack.split(`
36
- `).filter(function(u){return!u.match(s)},this);return f.map(function(u){if(u.indexOf(" > eval")>-1&&(u=u.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),u.indexOf("@")===-1&&u.indexOf(":")===-1)return new r({functionName:u});var h=/((.*".+"[^@]*)?[^@]*)(?:@)/,d=u.match(h),c=d&&d[1]?d[1]:void 0,p=this.extractLocation(u.replace(h,""));return new r({functionName:c,fileName:p[0],lineNumber:p[1],columnNumber:p[2],source:u})},this)},parseOpera:function(l){return!l.stacktrace||l.message.indexOf(`
34
+ `),n}return!0}function hh(e){var t=Object.getOwnPropertyNames(e),n=W0(t),r;try{for(n.s();!(r=n.n()).done;){var o=r.value,i=e[o];i&&ec(i)==="object"&&hh(i)}}catch(s){n.e(s)}finally{n.f()}return Object.freeze(e)}function a_(e){return hh(e.sys||{}),e}function pl(){var e=X0();if(!e)return null;var t=e.navigator.userAgent,n=e.navigator.platform,r=["Macintosh","MacIntel","MacPPC","Mac68K"],o=["Win32","Win64","Windows","WinCE"],i=["iPhone","iPad","iPod"];return r.indexOf(n)!==-1?"macOS":i.indexOf(n)!==-1?"iOS":o.indexOf(n)!==-1?"Windows":/Android/.test(t)?"Android":/Linux/.test(n)?"Linux":null}function s_(){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 c_(e,t,n,r){var o=[];t&&o.push("app ".concat(t)),n&&o.push("integration ".concat(n)),r&&o.push("feature "+r),o.push("sdk ".concat(e));var i=null;try{K0()?(i=pl(),o.push("platform ReactNative")):Y0()?(i=s_(),o.push("platform node.js/".concat(Q0()))):(i=pl(),o.push("platform browser"))}catch{i=null}return i&&o.push("os ".concat(i)),"".concat(o.filter(function(s){return s!==""}).join("; "),";")}function u_(e){return Object.defineProperty(e,"toPlainObject",{enumerable:!1,configurable:!1,writable:!1,value:function(){return _r(this)}})}function l_(e){var t=e.config,n=e.response,r;if(t&&t.headers&&t.headers.Authorization){var o="...".concat(t.headers.Authorization.toString().substr(-5));t.headers.Authorization="Bearer ".concat(o)}if(!uo(n)||!uo(t))throw e;var i=n==null?void 0:n.data,s={status:n==null?void 0:n.status,statusText:n==null?void 0:n.statusText,message:"",details:{}};uo(t)&&(s.request={url:t.url,headers:t.headers,method:t.method,payloadData:t.data}),i&&uo(i)&&("requestId"in i&&(s.requestId=i.requestId||"UNKNOWN"),"message"in i&&(s.message=i.message||""),"details"in i&&(s.details=i.details||{}),"sys"in i&&"id"in i.sys&&(r=i.sys.id));var a=new Error;a.name=r&&r!=="Unknown"?r:"".concat(n==null?void 0:n.status," ").concat(n==null?void 0:n.statusText);try{a.message=JSON.stringify(s,null," ")}catch{var l;a.message=(l=s==null?void 0:s.message)!==null&&l!==void 0?l:""}throw a}const f_=Object.freeze(Object.defineProperty({__proto__:null,createHttpClient:dh,createRequestConfig:i_,enforceObjPath:o_,errorHandler:l_,freezeSys:a_,getUserAgentHeader:c_,toPlainObject:u_},Symbol.toStringTag,{value:"Module"})),Ht=zi(f_);var lo={},hi={},fo={},ml;function d_(){if(ml)return fo;ml=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.wrapSpace=t;var e=Ht;function t(n){return(0,e.freezeSys)((0,e.toPlainObject)(n))}return fo}var pi={},Za={exports:{}},gl;function Ln(){return gl||(gl=1,function(e,t){(function(n,r){e.exports=r()})(ue,function(){var n=Function.prototype.toString,r=Object.create,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,l=Object.getPrototypeOf,f=Object.prototype,c=f.hasOwnProperty,h=f.propertyIsEnumerable,d=typeof a=="function",u=typeof WeakMap=="function",p=function(){if(u)return function(){return new WeakMap};var F=function(){function B(){this._keys=[],this._values=[]}return B.prototype.has=function(W){return!!~this._keys.indexOf(W)},B.prototype.get=function(W){return this._values[this._keys.indexOf(W)]},B.prototype.set=function(W,G){this._keys.push(W),this._values.push(G)},B}();return function(){return new F}}(),m=function(F,B){var W=F.__proto__||l(F);if(!W)return r(null);var G=W.constructor;if(G===B.Object)return W===B.Object.prototype?{}:r(W);if(~n.call(G).indexOf("[native code]"))try{return new G}catch{}return r(W)},E=function(F,B,W,G){var V=m(F,B);G.set(F,V);for(var H in F)c.call(F,H)&&(V[H]=W(F[H],G));if(d)for(var Y=a(F),oe=0,K=Y.length,k=void 0;oe<K;++oe)k=Y[oe],h.call(F,k)&&(V[k]=W(F[k],G));return V},T=function(F,B,W,G){var V=m(F,B);G.set(F,V);for(var H=d?s(F).concat(a(F)):s(F),Y=0,oe=H.length,K=void 0,k=void 0;Y<oe;++Y)if(K=H[Y],K!=="callee"&&K!=="caller")if(k=i(F,K),k){!k.get&&!k.set&&(k.value=W(F[K],G));try{o(V,K,k)}catch{V[K]=k.value}}else V[K]=W(F[K],G);return V},_=function(F){var B="";return F.global&&(B+="g"),F.ignoreCase&&(B+="i"),F.multiline&&(B+="m"),F.unicode&&(B+="u"),F.sticky&&(B+="y"),B},b=Array.isArray,A=Object.getPrototypeOf,w=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ue<"u"?ue:(console&&console.error&&console.error('Unable to locate global object, returning "this".'),this)}();function P(F,B){var W=!!(B&&B.isStrict),G=B&&B.realm||w,V=W?T:E,H=function(Y,oe){if(!Y||typeof Y!="object")return Y;if(oe.has(Y))return oe.get(Y);var K=Y.__proto__||A(Y),k=K&&K.constructor;if(!k||k===G.Object)return V(Y,G,H,oe);var z;if(b(Y)){if(W)return T(Y,G,H,oe);z=new k,oe.set(Y,z);for(var J=0,ae=Y.length;J<ae;++J)z[J]=H(Y[J],oe);return z}if(Y instanceof G.Date)return new k(Y.getTime());if(Y instanceof G.RegExp)return z=new k(Y.source,Y.flags||_(Y)),z.lastIndex=Y.lastIndex,z;if(G.Map&&Y instanceof G.Map)return z=new k,oe.set(Y,z),Y.forEach(function(Q,Z){z.set(Z,H(Q,oe))}),z;if(G.Set&&Y instanceof G.Set)return z=new k,oe.set(Y,z),Y.forEach(function(Q){z.add(H(Q,oe))}),z;if(G.Blob&&Y instanceof G.Blob)return Y.slice(0,Y.size,Y.type);if(G.Buffer&&G.Buffer.isBuffer(Y))return z=G.Buffer.allocUnsafe?G.Buffer.allocUnsafe(Y.length):new k(Y.length),oe.set(Y,z),Y.copy(z),z;if(G.ArrayBuffer){if(G.ArrayBuffer.isView(Y))return z=new k(Y.buffer.slice(0)),oe.set(Y,z),z;if(Y instanceof G.ArrayBuffer)return z=Y.slice(0),oe.set(Y,z),z}return typeof Y.then=="function"||Y instanceof Error||G.WeakMap&&Y instanceof G.WeakMap||G.WeakSet&&Y instanceof G.WeakSet?Y:V(Y,G,H,oe)};return H(F,p())}return P.default=P,P.strict=function(B,W){return P(B,{isStrict:!0,realm:W?W.realm:void 0})},P})}(Za)),Za.exports}var ho={},po={exports:{}},yl;function h_(){return yl||(yl=1,function(e,t){t=e.exports=n,t.getSerialize=r;function n(o,i,s,a){return JSON.stringify(o,r(i,a),s)}function r(o,i){var s=[],a=[];return i==null&&(i=function(l,f){return s[0]===f?"[Circular ~]":"[Circular ~."+a.slice(0,s.indexOf(f)).join(".")+"]"}),function(l,f){if(s.length>0){var c=s.indexOf(this);~c?s.splice(c+1):s.push(this),~c?a.splice(c,1/0,l):a.push(l),~s.indexOf(f)&&(f=i.call(this,l,f))}else s.push(f);return o==null?f:o.call(this,l,f)}}}(po,po.exports)),po.exports}var vl;function ph(){if(vl)return ho;vl=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.default=n;var e=t(h_());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 o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(0,e.default)(this,o,i,(s,a)=>({sys:{type:"Link",linkType:"Entry",id:a.sys.id,circular:!0}}))}})}return ho}var p_=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},m_=function(){function e(t,n){var r=[],o=!0,i=!1,s=void 0;try{for(var a=t[Symbol.iterator](),l;!(o=(l=a.next()).done)&&(r.push(l.value),!(n&&r.length===n));o=!0);}catch(f){i=!0,s=f}finally{try{!o&&a.return&&a.return()}finally{if(i)throw s}}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 mi(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 qi={},g_=function(t){return t&&t.sys&&t.sys.type==="Link"},y_=function(t){return t&&t.sys&&t.sys.type==="ResourceLink"},v_=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]},_l=function(t,n){var r=n.entryId,o=n.linkType,i=n.spaceId,s=n.environmentId;return i&&s?t.get(i+"!"+s+"!"+o+"!"+r):t.get(o+"!"+r)},__=function(t){var n=/.*:spaces\/([^/]+)(?:\/environments\/([^/]+))?\/entries\/([^/]+)$/;if(n.test(t)){var r=t.match(n),o=m_(r,4);o[0];var i=o[1],s=o[2],a=s===void 0?"master":s,l=o[3];return{spaceId:i,environmentId:a,entryId:l}}},E_=function(t,n){var r=n.sys,o=r.type,i=r.linkType;if(o==="ResourceLink"){var s=n.sys.urn,a=__(s),l=a.spaceId,f=a.environmentId,c=a.entryId,h=i.split(":")[1];return _l(t,{linkType:h,entryId:c,spaceId:l,environmentId:f})||qi}var d=n.sys.id;return _l(t,{linkType:i,entryId:d})||qi},b_=function(t){if(Array.isArray(t))return t.filter(function(r){return r!==qi});for(var n in t)t[n]===qi&&delete t[n];return t},w_=function e(t,n,r,o){if(n(t))return r(t);if(t&&(typeof t>"u"?"undefined":p_(t))==="object"){for(var i in t)t.hasOwnProperty(i)&&(t[i]=e(t[i],n,r,o));o&&(t=b_(t))}return t},S_=function(t,n,r){var o=E_(t,n);return o===qi?r?o:n:o},T_=function(t,n){if(!Array.isArray(n))return t;var r=Object.keys(t).filter(function(o){return n.indexOf(o)!==-1});return r.reduce(function(o,i){return o[i]=t[i],o},{})},x_=function(t,n){if(n=n||{},!t.items)return[];var r=_r(t),o=Object.keys(r.includes||{}).reduce(function(a,l){return[].concat(mi(a),mi(t.includes[l]))},[]),i=[].concat(mi(r.items),mi(o)).filter(function(a){return!!a.sys}),s=new Map(i.reduce(function(a,l){var f=v_(l.sys).map(function(c){return[c,l]});return a.push.apply(a,mi(f)),a},[]));return i.forEach(function(a){var l=T_(a,n.itemEntryPoints);Object.assign(a,w_(l,function(f){return g_(f)||y_(f)},function(f){return S_(s,f,n.removeUnresolved)},n.removeUnresolved))}),r.items};const O_=Object.freeze(Object.defineProperty({__proto__:null,default:x_},Symbol.toStringTag,{value:"Module"})),mh=zi(O_);var El;function A_(){if(El)return pi;El=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.wrapEntry=i,pi.wrapEntryCollection=s;var e=o(Ln()),t=Ht,n=o(ph()),r=o(mh);function o(a){return a&&a.__esModule?a:{default:a}}function i(a){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(a)))}function s(a,l){let{resolveLinks:f,removeUnresolved:c}=l;const h=(0,n.default)((0,t.toPlainObject)((0,e.default)(a)));return f&&(h.items=(0,r.default)(h,{removeUnresolved:c,itemEntryPoints:["fields"]})),(0,t.freezeSys)(h)}return pi}var gi={},bl;function C_(){if(bl)return gi;bl=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.wrapAsset=r,gi.wrapAssetCollection=o;var e=n(Ln()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return gi}var mo={},wl;function R_(){if(wl)return mo;wl=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo.wrapAssetKey=r;var e=n(Ln()),t=Ht;function n(o){return o&&o.__esModule?o:{default:o}}function r(o){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(o)))}return mo}var yi={},Sl;function N_(){if(Sl)return yi;Sl=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.wrapContentType=r,yi.wrapContentTypeCollection=o;var e=n(Ln()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return yi}var vi={},Tl;function P_(){if(Tl)return vi;Tl=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.wrapLocale=r,vi.wrapLocaleCollection=o;var e=n(Ln()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return vi}var _i={},xl;function I_(){if(xl)return _i;xl=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.wrapTag=r,_i.wrapTagCollection=o;var e=n(Ln()),t=Ht;function n(i){return i&&i.__esModule?i:{default:i}}function r(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}function o(i){return(0,t.freezeSys)((0,t.toPlainObject)((0,e.default)(i)))}return _i}var Ol;function L_(){if(Ol)return hi;Ol=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.default=void 0;var e=l(d_()),t=l(A_()),n=l(C_()),r=l(R_()),o=l(N_()),i=l(P_()),s=l(I_());function a(c){if(typeof WeakMap!="function")return null;var h=new WeakMap,d=new WeakMap;return(a=function(u){return u?d:h})(c)}function l(c,h){if(!h&&c&&c.__esModule)return c;if(c===null||typeof c!="object"&&typeof c!="function")return{default:c};var d=a(h);if(d&&d.has(c))return d.get(c);var u={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in c)if(m!=="default"&&Object.prototype.hasOwnProperty.call(c,m)){var E=p?Object.getOwnPropertyDescriptor(c,m):null;E&&(E.get||E.set)?Object.defineProperty(u,m,E):u[m]=c[m]}return u.default=c,d&&d.set(c,u),u}var f={space:e,entry:t,asset:n,assetKey:r,contentType:o,locale:i,tag:s};return hi.default=f,hi}var go={},Al;function k_(){if(Al)return go;Al=1,Object.defineProperty(go,"__esModule",{value:!0}),go.default=a;var e=Ht,t=r(mh),n=r(ph());function r(h){return h&&h.__esModule?h:{default:h}}function o(h,d){var u=Object.keys(h);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(h);d&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(h,m).enumerable})),u.push.apply(u,p)}return u}function i(h){for(var d=1;d<arguments.length;d++){var u=arguments[d]!=null?arguments[d]:{};d%2?o(Object(u),!0).forEach(function(p){s(h,p,u[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(u)):o(Object(u)).forEach(function(p){Object.defineProperty(h,p,Object.getOwnPropertyDescriptor(u,p))})}return h}function s(h,d,u){return d in h?Object.defineProperty(h,d,{value:u,enumerable:!0,configurable:!0,writable:!0}):h[d]=u,h}async function a(h,d){let u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!d||!d.initial&&!d.nextSyncToken&&!d.nextPageToken)throw new Error("Please provide one of `initial`, `nextSyncToken` or `nextPageToken` parameters for syncing");if(d&&d.content_type&&!d.type)d.type="Entry";else if(d&&d.content_type&&d.type&&d.type!=="Entry")throw new Error("When using the `content_type` filter your `type` parameter cannot be different from `Entry`.");const p={resolveLinks:!0,removeUnresolved:!1,paginate:!0},{resolveLinks:m,removeUnresolved:E,paginate:T}=i(i({},p),u),b=await f(h,[],d,{paginate:T});m&&(b.items=(0,t.default)(b,{removeUnresolved:E,itemEntryPoints:["fields"]}));const A=l(b.items);return b.nextSyncToken&&(A.nextSyncToken=b.nextSyncToken),b.nextPageToken&&(A.nextPageToken=b.nextPageToken),(0,e.freezeSys)((0,n.default)((0,e.toPlainObject)(A)))}function l(h){const d=u=>(p,m)=>(m.sys.type===u&&p.push((0,e.toPlainObject)(m)),p);return{entries:h.reduce(d("Entry"),[]),assets:h.reduce(d("Asset"),[]),deletedEntries:h.reduce(d("DeletedEntry"),[]),deletedAssets:h.reduce(d("DeletedAsset"),[])}}async function f(h,d,u,p){let{paginate:m}=p;u.nextSyncToken&&(u.sync_token=u.nextSyncToken,delete u.nextSyncToken),u.nextPageToken&&(u.sync_token=u.nextPageToken,delete u.nextPageToken),u.sync_token&&(delete u.initial,delete u.type,delete u.content_type,delete u.limit);const T=(await h.get("sync",(0,e.createRequestConfig)({query:u}))).data||{};return d=d.concat(T.items||[]),T.nextPageUrl?m?(delete u.initial,u.sync_token=c(T.nextPageUrl),f(h,d,u,{paginate:m})):{items:d,nextPageToken:c(T.nextPageUrl)}:T.nextSyncUrl?{items:d,nextSyncToken:c(T.nextSyncUrl)}:{items:[]}}function c(h){const d=h.split("?");return d.length>0?d[1].replace("sync_token=",""):""}return go}var yo={},Cl;function M_(){if(Cl)return yo;Cl=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.default=r;function e(o,i){var s=Object.keys(o);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(o);i&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(o,l).enumerable})),s.push.apply(s,a)}return s}function t(o){for(var i=1;i<arguments.length;i++){var s=arguments[i]!=null?arguments[i]:{};i%2?e(Object(s),!0).forEach(function(a){n(o,a,s[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(s)):e(Object(s)).forEach(function(a){Object.defineProperty(o,a,Object.getOwnPropertyDescriptor(s,a))})}return o}function n(o,i,s){return i in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s,o}function r(o){if(!o.select)return o;const i=Array.isArray(o.select)?o.select:o.select.split(","),s=new Set(i);return s.has("sys")?o:(s.add("sys.id"),s.add("sys.type"),t(t({},o),{},{select:[...s].join(",")}))}return yo}var En={},Rl;function B_(){if(Rl)return En;Rl=1,Object.defineProperty(En,"__esModule",{value:!0}),En.ValidationError=void 0,En.default=t;class e extends Error{constructor(r,o){super(`Invalid "${r}" provided, `+o),this.name="ValidationError"}}En.ValidationError=e;function t(n,r,o){if(o=o||{},typeof r!="number")throw new e(n,`only numeric values are allowed for timestamps, provided type was "${typeof r}"`);if(o.maximum&&r>o.maximum)throw new e(n,`value (${r}) cannot be further in the future than expected maximum (${o.maximum})`);if(o.now&&r<o.now)throw new e(n,`value (${r}) cannot be in the past, current time was ${o.now}`)}return En}var Nl;function F_(){if(Nl)return lo;Nl=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.default=c;var e=Ht,t=i(L_()),n=i(k_()),r=i(M_()),o=i(B_());function i(h){return h&&h.__esModule?h:{default:h}}function s(h,d){var u=Object.keys(h);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(h);d&&(p=p.filter(function(m){return Object.getOwnPropertyDescriptor(h,m).enumerable})),u.push.apply(u,p)}return u}function a(h){for(var d=1;d<arguments.length;d++){var u=arguments[d]!=null?arguments[d]:{};d%2?s(Object(u),!0).forEach(function(p){l(h,p,u[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(u)):s(Object(u)).forEach(function(p){Object.defineProperty(h,p,Object.getOwnPropertyDescriptor(u,p))})}return h}function l(h,d,u){return d in h?Object.defineProperty(h,d,{value:u,enumerable:!0,configurable:!0,writable:!0}):h[d]=u,h}const f=48*60*60;function c(h){let{http:d,getGlobalOptions:u}=h;const{wrapSpace:p}=t.default.space,{wrapContentType:m,wrapContentTypeCollection:E}=t.default.contentType,{wrapEntry:T,wrapEntryCollection:_}=t.default.entry,{wrapAsset:b,wrapAssetCollection:A}=t.default.asset,{wrapTag:w,wrapTagCollection:P}=t.default.tag,{wrapAssetKey:F}=t.default.assetKey,{wrapLocaleCollection:B}=t.default.locale,W=X=>{const re=new Error("The resource could not be found.");return re.sys={type:"Error",id:"NotFound"},re.details={type:"Entry",id:X,environment:u().environment,space:u().space},re};async function G(){ze(d);try{const X=await d.get("/");return p(X.data)}catch(X){(0,e.errorHandler)(X)}}async function V(X){le(d);try{const re=await d.get(`content_types/${X}`);return m(re.data)}catch(re){(0,e.errorHandler)(re)}}async function H(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};le(d);try{const re=await d.get("content_types",(0,e.createRequestConfig)({query:X}));return E(re.data)}catch(re){(0,e.errorHandler)(re)}}async function Y(X){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!X)throw W(X);try{const Pe=await this.getEntries(a({"sys.id":X},re));if(Pe.items.length>0)return T(Pe.items[0]);throw W(X)}catch(Pe){(0,e.errorHandler)(Pe)}}async function oe(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};le(d);const{resolveLinks:re,removeUnresolved:Pe}=u(X);X=(0,r.default)(X);try{const Oe=await d.get("entries",(0,e.createRequestConfig)({query:X}));return _(Oe.data,{resolveLinks:re,removeUnresolved:Pe})}catch(Oe){(0,e.errorHandler)(Oe)}}async function K(X){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};le(d),re=(0,r.default)(re);try{const Pe=await d.get(`assets/${X}`,(0,e.createRequestConfig)({query:re}));return b(Pe.data)}catch(Pe){(0,e.errorHandler)(Pe)}}async function k(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};le(d),X=(0,r.default)(X);try{const re=await d.get("assets",(0,e.createRequestConfig)({query:X}));return A(re.data)}catch(re){(0,e.errorHandler)(re)}}async function z(X){le(d);try{const re=await d.get(`tags/${X}`);return w(re.data)}catch(re){(0,e.errorHandler)(re)}}async function J(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};le(d),X=(0,r.default)(X);try{const re=await d.get("tags",(0,e.createRequestConfig)({query:X}));return P(re.data)}catch(re){(0,e.errorHandler)(re)}}async function ae(X){le(d);try{const re=Math.floor(Date.now()/1e3),Pe=re+f;(0,o.default)("expiresAt",X,{maximum:Pe,now:re});const Oe={expiresAt:X},st=await d.post("asset_keys",Oe);return F(st.data)}catch(re){(0,e.errorHandler)(re)}}async function Q(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};le(d);try{const re=await d.get("locales",(0,e.createRequestConfig)({query:X}));return B(re.data)}catch(re){(0,e.errorHandler)(re)}}async function Z(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{paginate:!0};const{resolveLinks:Pe,removeUnresolved:Oe}=u(X);return le(d),(0,n.default)(d,X,a({resolveLinks:Pe,removeUnresolved:Oe},re))}function ce(X){const{resolveLinks:re,removeUnresolved:Pe}=u({});return _(X,{resolveLinks:re,removeUnresolved:Pe})}function le(X){X.defaults.baseURL=u().environmentBaseUrl}function ze(X){X.defaults.baseURL=u().spaceBaseUrl}return{getSpace:G,getContentType:V,getContentTypes:H,getEntry:Y,getEntries:oe,getAsset:K,getAssets:k,getTag:z,getTags:J,createAssetKey:ae,getLocales:Q,parseEntries:ce,sync:Z}}return lo}var vo={},Pl;function U_(){if(Pl)return vo;Pl=1,Object.defineProperty(vo,"__esModule",{value:!0}),vo.default=e;function e(t){return function(r){return Object.assign({},t,r)}}return vo}var Il;function D_(){if(Il)return io;Il=1,Object.defineProperty(io,"__esModule",{value:!0}),io.createClient=l;var e=o(qd()),t=Ht,n=o(F_()),r=o(U_());function o(f){return f&&f.__esModule?f:{default:f}}function i(f,c){var h=Object.keys(f);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(f);c&&(d=d.filter(function(u){return Object.getOwnPropertyDescriptor(f,u).enumerable})),h.push.apply(h,d)}return h}function s(f){for(var c=1;c<arguments.length;c++){var h=arguments[c]!=null?arguments[c]:{};c%2?i(Object(h),!0).forEach(function(d){a(f,d,h[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(h)):i(Object(h)).forEach(function(d){Object.defineProperty(f,d,Object.getOwnPropertyDescriptor(h,d))})}return f}function a(f,c,h){return c in f?Object.defineProperty(f,c,{value:h,enumerable:!0,configurable:!0,writable:!0}):f[c]=h,f}function l(f){if(!f.accessToken)throw new TypeError("Expected parameter accessToken");if(!f.space)throw new TypeError("Expected parameter space");const h=s(s({},{resolveLinks:!0,removeUnresolved:!1,defaultHostname:"cdn.contentful.com",environment:"master"}),f),d=(0,t.getUserAgentHeader)("contentful.js/9.1.34",h.application,h.integration);h.headers=s(s({},h.headers),{},{"Content-Type":"application/vnd.contentful.delivery.v1+json","X-Contentful-User-Agent":d});const u=(0,t.createHttpClient)(e.default,h),p=(0,r.default)({resolveLinks:h.resolveLinks,environment:h.environment,removeUnresolved:h.removeUnresolved,spaceBaseUrl:u.defaults.baseURL,environmentBaseUrl:`${u.defaults.baseURL}environments/${h.environment}`});return u.defaults.baseURL=p().environmentBaseUrl,(0,n.default)({http:u,getGlobalOptions:p})}return io}var es={},ts,Ll;function $_(){return Ll||(Ll=1,ts=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)),ts}var rs,kl;function j_(){if(kl)return rs;kl=1;var e="%[a-f0-9]{2}",t=new RegExp("("+e+")|([^%]+?)","gi"),n=new RegExp("("+e+")+","gi");function r(s,a){try{return[decodeURIComponent(s.join(""))]}catch{}if(s.length===1)return s;a=a||1;var l=s.slice(0,a),f=s.slice(a);return Array.prototype.concat.call([],r(l),r(f))}function o(s){try{return decodeURIComponent(s)}catch{for(var a=s.match(t)||[],l=1;l<a.length;l++)s=r(a,l).join(""),a=s.match(t)||[];return s}}function i(s){for(var a={"%FE%FF":"��","%FF%FE":"��"},l=n.exec(s);l;){try{a[l[0]]=decodeURIComponent(l[0])}catch{var f=o(l[0]);f!==l[0]&&(a[l[0]]=f)}l=n.exec(s)}a["%C2"]="�";for(var c=Object.keys(a),h=0;h<c.length;h++){var d=c[h];s=s.replace(new RegExp(d,"g"),a[d])}return s}return rs=function(s){if(typeof s!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof s+"`");try{return s=s.replace(/\+/g," "),decodeURIComponent(s)}catch{return i(s)}},rs}var ns,Ml;function H_(){return Ml||(Ml=1,ns=(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)]}),ns}var is,Bl;function q_(){return Bl||(Bl=1,is=function(e,t){for(var n={},r=Object.keys(e),o=Array.isArray(t),i=0;i<r.length;i++){var s=r[i],a=e[s];(o?t.indexOf(s)!==-1:t(s,a,e))&&(n[s]=a)}return n}),is}var Fl;function G_(){return Fl||(Fl=1,function(e){const t=$_(),n=j_(),r=H_(),o=q_(),i=_=>_==null,s=Symbol("encodeFragmentIdentifier");function a(_){switch(_.arrayFormat){case"index":return b=>(A,w)=>{const P=A.length;return w===void 0||_.skipNull&&w===null||_.skipEmptyString&&w===""?A:w===null?[...A,[c(b,_),"[",P,"]"].join("")]:[...A,[c(b,_),"[",c(P,_),"]=",c(w,_)].join("")]};case"bracket":return b=>(A,w)=>w===void 0||_.skipNull&&w===null||_.skipEmptyString&&w===""?A:w===null?[...A,[c(b,_),"[]"].join("")]:[...A,[c(b,_),"[]=",c(w,_)].join("")];case"colon-list-separator":return b=>(A,w)=>w===void 0||_.skipNull&&w===null||_.skipEmptyString&&w===""?A:w===null?[...A,[c(b,_),":list="].join("")]:[...A,[c(b,_),":list=",c(w,_)].join("")];case"comma":case"separator":case"bracket-separator":{const b=_.arrayFormat==="bracket-separator"?"[]=":"=";return A=>(w,P)=>P===void 0||_.skipNull&&P===null||_.skipEmptyString&&P===""?w:(P=P===null?"":P,w.length===0?[[c(A,_),b,c(P,_)].join("")]:[[w,c(P,_)].join(_.arrayFormatSeparator)])}default:return b=>(A,w)=>w===void 0||_.skipNull&&w===null||_.skipEmptyString&&w===""?A:w===null?[...A,c(b,_)]:[...A,[c(b,_),"=",c(w,_)].join("")]}}function l(_){let b;switch(_.arrayFormat){case"index":return(A,w,P)=>{if(b=/\[(\d*)\]$/.exec(A),A=A.replace(/\[\d*\]$/,""),!b){P[A]=w;return}P[A]===void 0&&(P[A]={}),P[A][b[1]]=w};case"bracket":return(A,w,P)=>{if(b=/(\[\])$/.exec(A),A=A.replace(/\[\]$/,""),!b){P[A]=w;return}if(P[A]===void 0){P[A]=[w];return}P[A]=[].concat(P[A],w)};case"colon-list-separator":return(A,w,P)=>{if(b=/(:list)$/.exec(A),A=A.replace(/:list$/,""),!b){P[A]=w;return}if(P[A]===void 0){P[A]=[w];return}P[A]=[].concat(P[A],w)};case"comma":case"separator":return(A,w,P)=>{const F=typeof w=="string"&&w.includes(_.arrayFormatSeparator),B=typeof w=="string"&&!F&&h(w,_).includes(_.arrayFormatSeparator);w=B?h(w,_):w;const W=F||B?w.split(_.arrayFormatSeparator).map(G=>h(G,_)):w===null?w:h(w,_);P[A]=W};case"bracket-separator":return(A,w,P)=>{const F=/(\[\])$/.test(A);if(A=A.replace(/\[\]$/,""),!F){P[A]=w&&h(w,_);return}const B=w===null?[]:w.split(_.arrayFormatSeparator).map(W=>h(W,_));if(P[A]===void 0){P[A]=B;return}P[A]=[].concat(P[A],B)};default:return(A,w,P)=>{if(P[A]===void 0){P[A]=w;return}P[A]=[].concat(P[A],w)}}}function f(_){if(typeof _!="string"||_.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function c(_,b){return b.encode?b.strict?t(_):encodeURIComponent(_):_}function h(_,b){return b.decode?n(_):_}function d(_){return Array.isArray(_)?_.sort():typeof _=="object"?d(Object.keys(_)).sort((b,A)=>Number(b)-Number(A)).map(b=>_[b]):_}function u(_){const b=_.indexOf("#");return b!==-1&&(_=_.slice(0,b)),_}function p(_){let b="";const A=_.indexOf("#");return A!==-1&&(b=_.slice(A)),b}function m(_){_=u(_);const b=_.indexOf("?");return b===-1?"":_.slice(b+1)}function E(_,b){return b.parseNumbers&&!Number.isNaN(Number(_))&&typeof _=="string"&&_.trim()!==""?_=Number(_):b.parseBooleans&&_!==null&&(_.toLowerCase()==="true"||_.toLowerCase()==="false")&&(_=_.toLowerCase()==="true"),_}function T(_,b){b=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},b),f(b.arrayFormatSeparator);const A=l(b),w=Object.create(null);if(typeof _!="string"||(_=_.trim().replace(/^[?#&]/,""),!_))return w;for(const P of _.split("&")){if(P==="")continue;let[F,B]=r(b.decode?P.replace(/\+/g," "):P,"=");B=B===void 0?null:["comma","separator","bracket-separator"].includes(b.arrayFormat)?B:h(B,b),A(h(F,b),B,w)}for(const P of Object.keys(w)){const F=w[P];if(typeof F=="object"&&F!==null)for(const B of Object.keys(F))F[B]=E(F[B],b);else w[P]=E(F,b)}return b.sort===!1?w:(b.sort===!0?Object.keys(w).sort():Object.keys(w).sort(b.sort)).reduce((P,F)=>{const B=w[F];return B&&typeof B=="object"&&!Array.isArray(B)?P[F]=d(B):P[F]=B,P},Object.create(null))}e.extract=m,e.parse=T,e.stringify=(_,b)=>{if(!_)return"";b=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},b),f(b.arrayFormatSeparator);const A=B=>b.skipNull&&i(_[B])||b.skipEmptyString&&_[B]==="",w=a(b),P={};for(const B of Object.keys(_))A(B)||(P[B]=_[B]);const F=Object.keys(P);return b.sort!==!1&&F.sort(b.sort),F.map(B=>{const W=_[B];return W===void 0?"":W===null?c(B,b):Array.isArray(W)?W.length===0&&b.arrayFormat==="bracket-separator"?c(B,b)+"[]":W.reduce(w(B),[]).join("&"):c(B,b)+"="+c(W,b)}).filter(B=>B.length>0).join("&")},e.parseUrl=(_,b)=>{b=Object.assign({decode:!0},b);const[A,w]=r(_,"#");return Object.assign({url:A.split("?")[0]||"",query:T(m(_),b)},b&&b.parseFragmentIdentifier&&w?{fragmentIdentifier:h(w,b)}:{})},e.stringifyUrl=(_,b)=>{b=Object.assign({encode:!0,strict:!0,[s]:!0},b);const A=u(_.url).split("?")[0]||"",w=e.extract(_.url),P=e.parse(w,{sort:!1}),F=Object.assign(P,_.query);let B=e.stringify(F,b);B&&(B=`?${B}`);let W=p(_.url);return _.fragmentIdentifier&&(W=`#${b[s]?c(_.fragmentIdentifier,b):_.fragmentIdentifier}`),`${A}${B}${W}`},e.pick=(_,b,A)=>{A=Object.assign({parseFragmentIdentifier:!0,[s]:!1},A);const{url:w,query:P,fragmentIdentifier:F}=e.parseUrl(_,A);return e.stringifyUrl({url:w,query:o(P,b),fragmentIdentifier:F},A)},e.exclude=(_,b,A)=>{const w=Array.isArray(b)?P=>!b.includes(P):(P,F)=>!b(P,F);return e.pick(_,w,A)}}(es)),es}var Ul;function W_(){return Ul||(Ul=1,function(e,t){(function(n,r){e.exports=r(D_(),G_())})(ue,function(n,r){return function(){var o={897:function(l){l.exports=n},48:function(l){l.exports=r}},i={};function s(l){var f=i[l];if(f!==void 0)return f.exports;var c=i[l]={exports:{}};return o[l](c,c.exports,s),c.exports}s.d=function(l,f){for(var c in f)s.o(f,c)&&!s.o(l,c)&&Object.defineProperty(l,c,{enumerable:!0,get:f[c]})},s.o=function(l,f){return Object.prototype.hasOwnProperty.call(l,f)},s.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var a={};return function(){s.r(a),s.d(a,{getEntries:function(){return oe},getEntry:function(){return Y},setContext:function(){return m}});var l=s(897),f=s(48),c={CONTENTFUL:{ENVIRONMENTS_MAPING:{beta:"beta",rc:"rc",live:"master",local:"beta"},LOCALES:{DEFAULT:"en",SUPPORTED:["en","es","fr","pt"]},SPACE:"txbhe1wabmyx",HOSTS:{CDN:"cdn.contentful.com",PREVIEW:"preview.contentful.com"}}};const{CONTENTFUL:{ENVIRONMENTS_MAPING:h,SPACE:d,HOSTS:u}}=c;let p={apiKey:null,previewKey:null,environment:null,isPreview:!1,host:u.CDN,space:d};const m=({apiKey:K,environment:k,isPreview:z=!1,location:J,previewKey:ae,space:Q=null})=>{p.apiKey=K,p.previewKey=ae,p.environment=(Z=>{if(!Z)throw new Error("Cannot map environment: Environment not defined");if(!h[Z])throw new Error(`Cannot map environment: No mapping found for environment ${Z}`);return h[Z]})(k),p.isPreview=z||(Z=>{let ce=!1;if(Z&&Z.search){const le=(0,f.parse)(Z.search);ce=le.isPreview&&le.isPreview==="true"}return ce})(J),p.space=Q||d},E=(K=!1)=>{const{apiKey:k,environment:z,isPreview:J,previewKey:ae,space:Q}=p;return J===!0||K===!0?{accessToken:ae,environment:z,host:u.PREVIEW,space:Q}:{accessToken:k,environment:z,host:u.CDN,space:Q}},T=K=>typeof K=="object"&&K!==null,_=K=>Array.isArray(K)&&K.length,b=K=>{if(!T(K))throw new Error("Cannot flatten fields");const{fields:k,sys:z}=K;if(!k)throw new Error("Cannot flatten fields");let J={...k};if(T(z)){const{contentType:ae,createdAt:Q,updatedAt:Z}=z;ae&&Object.assign(J,{contentType:ae.sys.id}),Q&&Object.assign(J,{createdAt:Q}),Z&&Object.assign(J,{updatedAt:Z})}return J},{CONTENTFUL:{LOCALES:A}}=c,w=(K,k)=>T(K)&&((z,J)=>Object.prototype.hasOwnProperty.call(z,J))(K,k),P=(K,k)=>{const z=(J=>A.SUPPORTED.includes(J)?J:A.DEFAULT)(k);return w(K,z)?K[z]:w(K,A.DEFAULT)?K[A.DEFAULT]:K},F=K=>T(K)&&K.sys&&K.sys.type==="Asset",B=(K,k,z)=>{const{title:J,file:ae}=b(K);if(!ae)throw new Error("Cannot flatten asset");const{contentType:Q,fileName:Z,url:ce,details:le}=P(ae,k);if(!ce)throw new Error("Cannot flatten asset");return z?{description:J||Z,height:le&&le.image&&le.image.height,type:Q,url:ce,width:le&&le.image&&le.image.width}:ce},W=K=>T(K)&&K.sys&&K.sys.type==="Entry",G=(K,k,z)=>{const J={},ae=((Q,Z)=>{const ce={};for(const[le,ze]of Object.entries(Q))ce[le]=P(ze,Z);return ce})(b(K),k);for(const[Q,Z]of Object.entries(ae))F(Z)?J[Q]=B(Z,k,z):W(Z)?J[Q]=G(Z,k,z):_(Z)?J[Q]=Z.map(ce=>F(ce)?B(ce,k,z):W(ce)?G(ce,k,z):ce):J[Q]=Z;return J},V=({items:K})=>{if(!_(K))throw new Error("Cannot read items");return K},H=async(K,k)=>{const z=E(k);return await(await(0,l.createClient)(z)).getEntries(K)},Y=async(K={},k={},z=!1)=>((J,{flatten:ae=!0,locale:Q="en",assetDetails:Z=!1})=>{const ce=V(J);return ae?G(ce[0],Q,Z):ce[0]})(await H(K,z),{...K,...k}),oe=async(K={},k={},z=!1)=>((J,{flatten:ae=!0,locale:Q="en",assetDetails:Z=!1})=>{const ce=V(J);return ae?((le,ze,X)=>le.map(re=>G(re,ze,X)))(ce,Q,Z):ce})(await H(K,z),{...K,...k})}(),a}()})}(ua)),ua.exports}var os={exports:{}},as={exports:{}},ss={exports:{}},cs={exports:{}},Dl;function Bc(){return Dl||(Dl=1,function(e,t){(function(n,r){e.exports=r()})(ue,function(){function n(m){return!isNaN(parseFloat(m))&&isFinite(m)}function r(m){return m.charAt(0).toUpperCase()+m.substring(1)}function o(m){return function(){return this[m]}}var i=["isConstructor","isEval","isNative","isToplevel"],s=["columnNumber","lineNumber"],a=["fileName","functionName","source"],l=["args"],f=["evalOrigin"],c=i.concat(s,a,l,f);function h(m){if(m)for(var E=0;E<c.length;E++)m[c[E]]!==void 0&&this["set"+r(c[E])](m[c[E]])}h.prototype={getArgs:function(){return this.args},setArgs:function(m){if(Object.prototype.toString.call(m)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=m},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(m){if(m instanceof h)this.evalOrigin=m;else if(m instanceof Object)this.evalOrigin=new h(m);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var m=this.getFileName()||"",E=this.getLineNumber()||"",T=this.getColumnNumber()||"",_=this.getFunctionName()||"";return this.getIsEval()?m?"[eval] ("+m+":"+E+":"+T+")":"[eval]:"+E+":"+T:_?_+" ("+m+":"+E+":"+T+")":m+":"+E+":"+T}},h.fromString=function(E){var T=E.indexOf("("),_=E.lastIndexOf(")"),b=E.substring(0,T),A=E.substring(T+1,_).split(","),w=E.substring(_+1);if(w.indexOf("@")===0)var P=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(w,""),F=P[1],B=P[2],W=P[3];return new h({functionName:b,args:A||void 0,fileName:F,lineNumber:B||void 0,columnNumber:W||void 0})};for(var d=0;d<i.length;d++)h.prototype["get"+r(i[d])]=o(i[d]),h.prototype["set"+r(i[d])]=function(m){return function(E){this[m]=!!E}}(i[d]);for(var u=0;u<s.length;u++)h.prototype["get"+r(s[u])]=o(s[u]),h.prototype["set"+r(s[u])]=function(m){return function(E){if(!n(E))throw new TypeError(m+" must be a Number");this[m]=Number(E)}}(s[u]);for(var p=0;p<a.length;p++)h.prototype["get"+r(a[p])]=o(a[p]),h.prototype["set"+r(a[p])]=function(m){return function(E){this[m]=String(E)}}(a[p]);return h})}(cs)),cs.exports}var $l;function V_(){return $l||($l=1,function(e,t){(function(n,r){e.exports=r(Bc())})(ue,function(r){var o=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,s=/^(eval@)?(\[native code])?$/;return{parse:function(l){if(typeof l.stacktrace<"u"||typeof l["opera#sourceloc"]<"u")return this.parseOpera(l);if(l.stack&&l.stack.match(i))return this.parseV8OrIE(l);if(l.stack)return this.parseFFOrSafari(l);throw new Error("Cannot parse given Error object")},extractLocation:function(l){if(l.indexOf(":")===-1)return[l];var f=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=f.exec(l.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(l){var f=l.stack.split(`
35
+ `).filter(function(c){return!!c.match(i)},this);return f.map(function(c){c.indexOf("(eval ")>-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var h=c.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),d=h.match(/ (\(.+\)$)/);h=d?h.replace(d[0],""):h;var u=this.extractLocation(d?d[1]:h),p=d&&h||void 0,m=["eval","<anonymous>"].indexOf(u[0])>-1?void 0:u[0];return new r({functionName:p,fileName:m,lineNumber:u[1],columnNumber:u[2],source:c})},this)},parseFFOrSafari:function(l){var f=l.stack.split(`
36
+ `).filter(function(c){return!c.match(s)},this);return f.map(function(c){if(c.indexOf(" > eval")>-1&&(c=c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),c.indexOf("@")===-1&&c.indexOf(":")===-1)return new r({functionName:c});var h=/((.*".+"[^@]*)?[^@]*)(?:@)/,d=c.match(h),u=d&&d[1]?d[1]:void 0,p=this.extractLocation(c.replace(h,""));return new r({functionName:u,fileName:p[0],lineNumber:p[1],columnNumber:p[2],source:c})},this)},parseOpera:function(l){return!l.stacktrace||l.message.indexOf(`
37
37
  `)>-1&&l.message.split(`
38
38
  `).length>l.stacktrace.split(`
39
- `).length?this.parseOpera9(l):l.stack?this.parseOpera11(l):this.parseOpera10(l)},parseOpera9:function(l){for(var f=/Line (\d+).*script (?:in )?(\S+)/i,u=l.message.split(`
40
- `),h=[],d=2,c=u.length;d<c;d+=2){var p=f.exec(u[d]);p&&h.push(new r({fileName:p[2],lineNumber:p[1],source:u[d]}))}return h},parseOpera10:function(l){for(var f=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,u=l.stacktrace.split(`
41
- `),h=[],d=0,c=u.length;d<c;d+=2){var p=f.exec(u[d]);p&&h.push(new r({functionName:p[3]||void 0,fileName:p[2],lineNumber:p[1],source:u[d]}))}return h},parseOpera11:function(l){var f=l.stack.split(`
42
- `).filter(function(u){return!!u.match(o)&&!u.match(/^Error created at/)},this);return f.map(function(u){var h=u.split("@"),d=this.extractLocation(h.pop()),c=h.shift()||"",p=c.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,m;c.match(/\(([^)]*)\)/)&&(m=c.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var _=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new r({functionName:p,args:_,fileName:d[0],lineNumber:d[1],columnNumber:d[2],source:u})},this)}}})}(ns)),ns.exports}var os={exports:{}},Ml;function UE(){return Ml||(Ml=1,function(e,t){(function(n,r){e.exports=r(Iu())})(ae,function(n){return{backtrace:function(o){var i=[],s=10;typeof o=="object"&&typeof o.maxStackSize=="number"&&(s=o.maxStackSize);for(var a=arguments.callee;a&&i.length<s&&a.arguments;){for(var l=new Array(a.arguments.length),f=0;f<l.length;++f)l[f]=a.arguments[f];/function(?:\s+([\w$]+))+\s*\(/.test(a.toString())?i.push(new n({functionName:RegExp.$1||void 0,args:l})):i.push(new n({args:l}));try{a=a.caller}catch{break}}return i}}})}(os)),os.exports}var as={exports:{}},Ei={},ss={},Fl;function fh(){return Fl||(Fl=1,function(e){function t(E,b,A){if(b in E)return E[b];if(arguments.length===3)return A;throw new Error('"'+b+'" is a required argument.')}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,r=/^data:.+\,.+$/;function o(E){var b=E.match(n);return b?{scheme:b[1],auth:b[2],host:b[3],port:b[4],path:b[5]}:null}e.urlParse=o;function i(E){var b="";return E.scheme&&(b+=E.scheme+":"),b+="//",E.auth&&(b+=E.auth+"@"),E.host&&(b+=E.host),E.port&&(b+=":"+E.port),E.path&&(b+=E.path),b}e.urlGenerate=i;function s(E){var b=E,A=o(E);if(A){if(!A.path)return E;b=A.path}for(var w=e.isAbsolute(b),N=b.split(/\/+/),F,M=0,q=N.length-1;q>=0;q--)F=N[q],F==="."?N.splice(q,1):F===".."?M++:M>0&&(F===""?(N.splice(q+1,M),M=0):(N.splice(q,2),M--));return b=N.join("/"),b===""&&(b=w?"/":"."),A?(A.path=b,i(A)):b}e.normalize=s;function a(E,b){E===""&&(E="."),b===""&&(b=".");var A=o(b),w=o(E);if(w&&(E=w.path||"/"),A&&!A.scheme)return w&&(A.scheme=w.scheme),i(A);if(A||b.match(r))return b;if(w&&!w.host&&!w.path)return w.host=b,i(w);var N=b.charAt(0)==="/"?b:s(E.replace(/\/+$/,"")+"/"+b);return w?(w.path=N,i(w)):N}e.join=a,e.isAbsolute=function(E){return E.charAt(0)==="/"||!!E.match(n)};function l(E,b){E===""&&(E="."),E=E.replace(/\/$/,"");for(var A=0;b.indexOf(E+"/")!==0;){var w=E.lastIndexOf("/");if(w<0||(E=E.slice(0,w),E.match(/^([^\/]+:\/)?\/*$/)))return b;++A}return Array(A+1).join("../")+b.substr(E.length+1)}e.relative=l;var f=function(){var E=Object.create(null);return!("__proto__"in E)}();function u(E){return E}function h(E){return c(E)?"$"+E:E}e.toSetString=f?u:h;function d(E){return c(E)?E.slice(1):E}e.fromSetString=f?u:d;function c(E){if(!E)return!1;var b=E.length;if(b<9||E.charCodeAt(b-1)!==95||E.charCodeAt(b-2)!==95||E.charCodeAt(b-3)!==111||E.charCodeAt(b-4)!==116||E.charCodeAt(b-5)!==111||E.charCodeAt(b-6)!==114||E.charCodeAt(b-7)!==112||E.charCodeAt(b-8)!==95||E.charCodeAt(b-9)!==95)return!1;for(var A=b-10;A>=0;A--)if(E.charCodeAt(A)!==36)return!1;return!0}function p(E,b,A){var w=E.source-b.source;return w!==0||(w=E.originalLine-b.originalLine,w!==0)||(w=E.originalColumn-b.originalColumn,w!==0||A)||(w=E.generatedColumn-b.generatedColumn,w!==0)||(w=E.generatedLine-b.generatedLine,w!==0)?w:E.name-b.name}e.compareByOriginalPositions=p;function m(E,b,A){var w=E.generatedLine-b.generatedLine;return w!==0||(w=E.generatedColumn-b.generatedColumn,w!==0||A)||(w=E.source-b.source,w!==0)||(w=E.originalLine-b.originalLine,w!==0)||(w=E.originalColumn-b.originalColumn,w!==0)?w:E.name-b.name}e.compareByGeneratedPositionsDeflated=m;function _(E,b){return E===b?0:E>b?1:-1}function T(E,b){var A=E.generatedLine-b.generatedLine;return A!==0||(A=E.generatedColumn-b.generatedColumn,A!==0)||(A=_(E.source,b.source),A!==0)||(A=E.originalLine-b.originalLine,A!==0)||(A=E.originalColumn-b.originalColumn,A!==0)?A:_(E.name,b.name)}e.compareByGeneratedPositionsInflated=T}(ss)),ss}var us={},Ul;function DE(){return Ul||(Ul=1,function(e){e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(n,r,o,i,s,a){var l=Math.floor((r-n)/2)+n,f=s(o,i[l],!0);return f===0?l:f>0?r-l>1?t(l,r,o,i,s,a):a==e.LEAST_UPPER_BOUND?r<i.length?r:-1:l:l-n>1?t(n,l,o,i,s,a):a==e.LEAST_UPPER_BOUND?l:n<0?-1:n}e.search=function(r,o,i,s){if(o.length===0)return-1;var a=t(-1,o.length,r,o,i,s||e.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&i(o[a],o[a-1],!0)===0;)--a;return a}}(us)),us}var cs={},Dl;function $E(){if(Dl)return cs;Dl=1;var e=fh(),t=Object.prototype.hasOwnProperty;function n(){this._array=[],this._set=Object.create(null)}return n.fromArray=function(o,i){for(var s=new n,a=0,l=o.length;a<l;a++)s.add(o[a],i);return s},n.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(o,i){var s=e.toSetString(o),a=t.call(this._set,s),l=this._array.length;(!a||i)&&this._array.push(o),a||(this._set[s]=l)},n.prototype.has=function(o){var i=e.toSetString(o);return t.call(this._set,i)},n.prototype.indexOf=function(o){var i=e.toSetString(o);if(t.call(this._set,i))return this._set[i];throw new Error('"'+o+'" is not in the set.')},n.prototype.at=function(o){if(o>=0&&o<this._array.length)return this._array[o];throw new Error("No element indexed by "+o)},n.prototype.toArray=function(){return this._array.slice()},cs.ArraySet=n,cs}var go={},yo={},$l;function jE(){if($l)return yo;$l=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return yo.encode=function(t){if(0<=t&&t<e.length)return e[t];throw new TypeError("Must be between 0 and 63: "+t)},yo.decode=function(t){var n=65,r=90,o=97,i=122,s=48,a=57,l=43,f=47,u=26,h=52;return n<=t&&t<=r?t-n:o<=t&&t<=i?t-o+u:s<=t&&t<=a?t-s+h:t==l?62:t==f?63:-1},yo}var jl;function HE(){if(jl)return go;jl=1;var e=jE(),t=5,n=1<<t,r=n-1,o=n;function i(a){return a<0?(-a<<1)+1:(a<<1)+0}function s(a){var l=(a&1)===1,f=a>>1;return l?-f:f}return go.encode=function(l){var f="",u,h=i(l);do u=h&r,h>>>=t,h>0&&(u|=o),f+=e.encode(u);while(h>0);return f},go.decode=function(l,f,u){var h=l.length,d=0,c=0,p,m;do{if(f>=h)throw new Error("Expected more digits in base 64 VLQ value.");if(m=e.decode(l.charCodeAt(f++)),m===-1)throw new Error("Invalid base64 digit: "+l.charAt(f-1));p=!!(m&o),m&=r,d=d+(m<<c),c+=t}while(p);u.value=s(d),u.rest=f},go}var ls={},Hl;function qE(){if(Hl)return ls;Hl=1;function e(r,o,i){var s=r[o];r[o]=r[i],r[i]=s}function t(r,o){return Math.round(r+Math.random()*(o-r))}function n(r,o,i,s){if(i<s){var a=t(i,s),l=i-1;e(r,a,s);for(var f=r[s],u=i;u<s;u++)o(r[u],f)<=0&&(l+=1,e(r,l,u));e(r,l+1,u);var h=l+1;n(r,o,i,h-1),n(r,o,h+1,s)}}return ls.quickSort=function(r,o){n(r,o,0,r.length-1)},ls}var ql;function GE(){if(ql)return Ei;ql=1;var e=fh(),t=DE(),n=$E().ArraySet,r=HE(),o=qE().quickSort;function i(f){var u=f;return typeof f=="string"&&(u=JSON.parse(f.replace(/^\)\]\}'/,""))),u.sections!=null?new l(u):new s(u)}i.fromSourceMap=function(f){return s.fromSourceMap(f)},i.prototype._version=3,i.prototype.__generatedMappings=null,Object.defineProperty(i.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),i.prototype.__originalMappings=null,Object.defineProperty(i.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),i.prototype._charIsMappingSeparator=function(u,h){var d=u.charAt(h);return d===";"||d===","},i.prototype._parseMappings=function(u,h){throw new Error("Subclasses must implement _parseMappings")},i.GENERATED_ORDER=1,i.ORIGINAL_ORDER=2,i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2,i.prototype.eachMapping=function(u,h,d){var c=h||null,p=d||i.GENERATED_ORDER,m;switch(p){case i.GENERATED_ORDER:m=this._generatedMappings;break;case i.ORIGINAL_ORDER:m=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var _=this.sourceRoot;m.map(function(T){var E=T.source===null?null:this._sources.at(T.source);return E!=null&&_!=null&&(E=e.join(_,E)),{source:E,generatedLine:T.generatedLine,generatedColumn:T.generatedColumn,originalLine:T.originalLine,originalColumn:T.originalColumn,name:T.name===null?null:this._names.at(T.name)}},this).forEach(u,c)},i.prototype.allGeneratedPositionsFor=function(u){var h=e.getArg(u,"line"),d={source:e.getArg(u,"source"),originalLine:h,originalColumn:e.getArg(u,"column",0)};if(this.sourceRoot!=null&&(d.source=e.relative(this.sourceRoot,d.source)),!this._sources.has(d.source))return[];d.source=this._sources.indexOf(d.source);var c=[],p=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(p>=0){var m=this._originalMappings[p];if(u.column===void 0)for(var _=m.originalLine;m&&m.originalLine===_;)c.push({line:e.getArg(m,"generatedLine",null),column:e.getArg(m,"generatedColumn",null),lastColumn:e.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++p];else for(var T=m.originalColumn;m&&m.originalLine===h&&m.originalColumn==T;)c.push({line:e.getArg(m,"generatedLine",null),column:e.getArg(m,"generatedColumn",null),lastColumn:e.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++p]}return c},Ei.SourceMapConsumer=i;function s(f){var u=f;typeof f=="string"&&(u=JSON.parse(f.replace(/^\)\]\}'/,"")));var h=e.getArg(u,"version"),d=e.getArg(u,"sources"),c=e.getArg(u,"names",[]),p=e.getArg(u,"sourceRoot",null),m=e.getArg(u,"sourcesContent",null),_=e.getArg(u,"mappings"),T=e.getArg(u,"file",null);if(h!=this._version)throw new Error("Unsupported version: "+h);d=d.map(String).map(e.normalize).map(function(E){return p&&e.isAbsolute(p)&&e.isAbsolute(E)?e.relative(p,E):E}),this._names=n.fromArray(c.map(String),!0),this._sources=n.fromArray(d,!0),this.sourceRoot=p,this.sourcesContent=m,this._mappings=_,this.file=T}s.prototype=Object.create(i.prototype),s.prototype.consumer=i,s.fromSourceMap=function(u){var h=Object.create(s.prototype),d=h._names=n.fromArray(u._names.toArray(),!0),c=h._sources=n.fromArray(u._sources.toArray(),!0);h.sourceRoot=u._sourceRoot,h.sourcesContent=u._generateSourcesContent(h._sources.toArray(),h.sourceRoot),h.file=u._file;for(var p=u._mappings.toArray().slice(),m=h.__generatedMappings=[],_=h.__originalMappings=[],T=0,E=p.length;T<E;T++){var b=p[T],A=new a;A.generatedLine=b.generatedLine,A.generatedColumn=b.generatedColumn,b.source&&(A.source=c.indexOf(b.source),A.originalLine=b.originalLine,A.originalColumn=b.originalColumn,b.name&&(A.name=d.indexOf(b.name)),_.push(A)),m.push(A)}return o(h.__originalMappings,e.compareByOriginalPositions),h},s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){return this._sources.toArray().map(function(f){return this.sourceRoot!=null?e.join(this.sourceRoot,f):f},this)}});function a(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s.prototype._parseMappings=function(u,h){for(var d=1,c=0,p=0,m=0,_=0,T=0,E=u.length,b=0,A={},w={},N=[],F=[],M,q,W,V,j;b<E;)if(u.charAt(b)===";")d++,b++,c=0;else if(u.charAt(b)===",")b++;else{for(M=new a,M.generatedLine=d,V=b;V<E&&!this._charIsMappingSeparator(u,V);V++);if(q=u.slice(b,V),W=A[q],W)b+=q.length;else{for(W=[];b<V;)r.decode(u,b,w),j=w.value,b=w.rest,W.push(j);if(W.length===2)throw new Error("Found a source, but no line and column");if(W.length===3)throw new Error("Found a source and line, but no column");A[q]=W}M.generatedColumn=c+W[0],c=M.generatedColumn,W.length>1&&(M.source=_+W[1],_+=W[1],M.originalLine=p+W[2],p=M.originalLine,M.originalLine+=1,M.originalColumn=m+W[3],m=M.originalColumn,W.length>4&&(M.name=T+W[4],T+=W[4])),F.push(M),typeof M.originalLine=="number"&&N.push(M)}o(F,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=F,o(N,e.compareByOriginalPositions),this.__originalMappings=N},s.prototype._findMapping=function(u,h,d,c,p,m){if(u[d]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+u[d]);if(u[c]<0)throw new TypeError("Column must be greater than or equal to 0, got "+u[c]);return t.search(u,h,p,m)},s.prototype.computeColumnSpans=function(){for(var u=0;u<this._generatedMappings.length;++u){var h=this._generatedMappings[u];if(u+1<this._generatedMappings.length){var d=this._generatedMappings[u+1];if(h.generatedLine===d.generatedLine){h.lastGeneratedColumn=d.generatedColumn-1;continue}}h.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(u){var h={generatedLine:e.getArg(u,"line"),generatedColumn:e.getArg(u,"column")},d=this._findMapping(h,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(u,"bias",i.GREATEST_LOWER_BOUND));if(d>=0){var c=this._generatedMappings[d];if(c.generatedLine===h.generatedLine){var p=e.getArg(c,"source",null);p!==null&&(p=this._sources.at(p),this.sourceRoot!=null&&(p=e.join(this.sourceRoot,p)));var m=e.getArg(c,"name",null);return m!==null&&(m=this._names.at(m)),{source:p,line:e.getArg(c,"originalLine",null),column:e.getArg(c,"originalColumn",null),name:m}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(u){return u==null}):!1},s.prototype.sourceContentFor=function(u,h){if(!this.sourcesContent)return null;if(this.sourceRoot!=null&&(u=e.relative(this.sourceRoot,u)),this._sources.has(u))return this.sourcesContent[this._sources.indexOf(u)];var d;if(this.sourceRoot!=null&&(d=e.urlParse(this.sourceRoot))){var c=u.replace(/^file:\/\//,"");if(d.scheme=="file"&&this._sources.has(c))return this.sourcesContent[this._sources.indexOf(c)];if((!d.path||d.path=="/")&&this._sources.has("/"+u))return this.sourcesContent[this._sources.indexOf("/"+u)]}if(h)return null;throw new Error('"'+u+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(u){var h=e.getArg(u,"source");if(this.sourceRoot!=null&&(h=e.relative(this.sourceRoot,h)),!this._sources.has(h))return{line:null,column:null,lastColumn:null};h=this._sources.indexOf(h);var d={source:h,originalLine:e.getArg(u,"line"),originalColumn:e.getArg(u,"column")},c=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(u,"bias",i.GREATEST_LOWER_BOUND));if(c>=0){var p=this._originalMappings[c];if(p.source===d.source)return{line:e.getArg(p,"generatedLine",null),column:e.getArg(p,"generatedColumn",null),lastColumn:e.getArg(p,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Ei.BasicSourceMapConsumer=s;function l(f){var u=f;typeof f=="string"&&(u=JSON.parse(f.replace(/^\)\]\}'/,"")));var h=e.getArg(u,"version"),d=e.getArg(u,"sections");if(h!=this._version)throw new Error("Unsupported version: "+h);this._sources=new n,this._names=new n;var c={line:-1,column:0};this._sections=d.map(function(p){if(p.url)throw new Error("Support for url field in sections not implemented.");var m=e.getArg(p,"offset"),_=e.getArg(m,"line"),T=e.getArg(m,"column");if(_<c.line||_===c.line&&T<c.column)throw new Error("Section offsets must be ordered and non-overlapping.");return c=m,{generatedOffset:{generatedLine:_+1,generatedColumn:T+1},consumer:new i(e.getArg(p,"map"))}})}return l.prototype=Object.create(i.prototype),l.prototype.constructor=i,l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){for(var f=[],u=0;u<this._sections.length;u++)for(var h=0;h<this._sections[u].consumer.sources.length;h++)f.push(this._sections[u].consumer.sources[h]);return f}}),l.prototype.originalPositionFor=function(u){var h={generatedLine:e.getArg(u,"line"),generatedColumn:e.getArg(u,"column")},d=t.search(h,this._sections,function(p,m){var _=p.generatedLine-m.generatedOffset.generatedLine;return _||p.generatedColumn-m.generatedOffset.generatedColumn}),c=this._sections[d];return c?c.consumer.originalPositionFor({line:h.generatedLine-(c.generatedOffset.generatedLine-1),column:h.generatedColumn-(c.generatedOffset.generatedLine===h.generatedLine?c.generatedOffset.generatedColumn-1:0),bias:u.bias}):{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(u){return u.consumer.hasContentsOfAllSources()})},l.prototype.sourceContentFor=function(u,h){for(var d=0;d<this._sections.length;d++){var c=this._sections[d],p=c.consumer.sourceContentFor(u,!0);if(p)return p}if(h)return null;throw new Error('"'+u+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(u){for(var h=0;h<this._sections.length;h++){var d=this._sections[h];if(d.consumer.sources.indexOf(e.getArg(u,"source"))!==-1){var c=d.consumer.generatedPositionFor(u);if(c){var p={line:c.line+(d.generatedOffset.generatedLine-1),column:c.column+(d.generatedOffset.generatedLine===c.line?d.generatedOffset.generatedColumn-1:0)};return p}}}return{line:null,column:null}},l.prototype._parseMappings=function(u,h){this.__generatedMappings=[],this.__originalMappings=[];for(var d=0;d<this._sections.length;d++)for(var c=this._sections[d],p=c.consumer._generatedMappings,m=0;m<p.length;m++){var _=p[m],T=c.consumer._sources.at(_.source);c.consumer.sourceRoot!==null&&(T=e.join(c.consumer.sourceRoot,T)),this._sources.add(T),T=this._sources.indexOf(T);var E=c.consumer._names.at(_.name);this._names.add(E),E=this._names.indexOf(E);var b={source:T,generatedLine:_.generatedLine+(c.generatedOffset.generatedLine-1),generatedColumn:_.generatedColumn+(c.generatedOffset.generatedLine===_.generatedLine?c.generatedOffset.generatedColumn-1:0),originalLine:_.originalLine,originalColumn:_.originalColumn,name:E};this.__generatedMappings.push(b),typeof b.originalLine=="number"&&this.__originalMappings.push(b)}o(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),o(this.__originalMappings,e.compareByOriginalPositions)},Ei.IndexedSourceMapConsumer=l,Ei}var Gl;function WE(){return Gl||(Gl=1,function(e,t){(function(n,r){e.exports=r(GE(),Iu())})(ae,function(n,r){function o(d){return new Promise(function(c,p){var m=new XMLHttpRequest;m.open("get",d),m.onerror=p,m.onreadystatechange=function(){m.readyState===4&&(m.status>=200&&m.status<300||d.substr(0,7)==="file://"&&m.responseText?c(m.responseText):p(new Error("HTTP status: "+m.status+" retrieving "+d)))},m.send()})}function i(d){if(typeof window<"u"&&window.atob)return window.atob(d);throw new Error("You must supply a polyfill for window.atob in this environment")}function s(d){if(typeof JSON<"u"&&JSON.parse)return JSON.parse(d);throw new Error("You must supply a polyfill for JSON.parse in this environment")}function a(d,c){for(var p=[/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,/function\s+([^('"`]*?)\s*\(([^)]*)\)/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,/\b(?!(?:if|for|switch|while|with|catch)\b)(?:(?:static)\s+)?(\S+)\s*\(.*?\)\s*\{/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*\(.*?\)\s*=>/],m=d.split(`
43
- `),_="",T=Math.min(c,20),E=0;E<T;++E){var b=m[c-E-1],A=b.indexOf("//");if(A>=0&&(b=b.substr(0,A)),b){_=b+_;for(var w=p.length,N=0;N<w;N++){var F=p[N].exec(_);if(F&&F[1])return F[1]}}}}function l(){if(typeof Object.defineProperty!="function"||typeof Object.create!="function")throw new Error("Unable to consume source maps in older browsers")}function f(d){if(typeof d!="object")throw new TypeError("Given StackFrame is not an object");if(typeof d.fileName!="string")throw new TypeError("Given file name is not a String");if(typeof d.lineNumber!="number"||d.lineNumber%1!==0||d.lineNumber<1)throw new TypeError("Given line number must be a positive integer");if(typeof d.columnNumber!="number"||d.columnNumber%1!==0||d.columnNumber<0)throw new TypeError("Given column number must be a non-negative integer");return!0}function u(d){for(var c=/\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/mg,p,m;m=c.exec(d);)p=m[1];if(p)return p;throw new Error("sourceMappingURL not found")}function h(d,c,p){return new Promise(function(m,_){var T=c.originalPositionFor({line:d.lineNumber,column:d.columnNumber});if(T.source){var E=c.sourceContentFor(T.source);E&&(p[T.source]=E),m(new r({functionName:T.name||d.functionName,args:d.args,fileName:T.source,lineNumber:T.line,columnNumber:T.column}))}else _(new Error("Could not get original source for given stackframe and source map"))})}return function d(c){if(!(this instanceof d))return new d(c);c=c||{},this.sourceCache=c.sourceCache||{},this.sourceMapConsumerCache=c.sourceMapConsumerCache||{},this.ajax=c.ajax||o,this._atob=c.atob||i,this._get=function(m){return new Promise((function(_,T){var E=m.substr(0,5)==="data:";if(this.sourceCache[m])_(this.sourceCache[m]);else if(c.offline&&!E)T(new Error("Cannot make network requests in offline mode"));else if(E){var b=/^data:application\/json;([\w=:"-]+;)*base64,/,A=m.match(b);if(A){var w=A[0].length,N=m.substr(w),F=this._atob(N);this.sourceCache[m]=F,_(F)}else T(new Error("The encoding of the inline sourcemap is not supported"))}else{var M=this.ajax(m,{method:"get"});this.sourceCache[m]=M,M.then(_,T)}}).bind(this))},this._getSourceMapConsumer=function(m,_){return new Promise((function(T){if(this.sourceMapConsumerCache[m])T(this.sourceMapConsumerCache[m]);else{var E=new Promise((function(b,A){return this._get(m).then(function(w){typeof w=="string"&&(w=s(w.replace(/^\)\]\}'/,""))),typeof w.sourceRoot>"u"&&(w.sourceRoot=_),b(new n.SourceMapConsumer(w))}).catch(A)}).bind(this));this.sourceMapConsumerCache[m]=E,T(E)}}).bind(this))},this.pinpoint=function(m){return new Promise((function(_,T){this.getMappedLocation(m).then((function(E){function b(){_(E)}this.findFunctionName(E).then(_,b).catch(b)}).bind(this),T)}).bind(this))},this.findFunctionName=function(m){return new Promise((function(_,T){f(m),this._get(m.fileName).then(function(b){var A=m.lineNumber,w=m.columnNumber,N=a(b,A);_(N?new r({functionName:N,args:m.args,fileName:m.fileName,lineNumber:A,columnNumber:w}):m)},T).catch(T)}).bind(this))},this.getMappedLocation=function(m){return new Promise((function(_,T){l(),f(m);var E=this.sourceCache,b=m.fileName;this._get(b).then((function(A){var w=u(A),N=w.substr(0,5)==="data:",F=b.substring(0,b.lastIndexOf("/")+1);return w[0]!=="/"&&!N&&!/^https?:\/\/|^\/\//i.test(w)&&(w=F+w),this._getSourceMapConsumer(w,F).then(function(M){return h(m,M,E).then(_).catch(function(){_(m)})})}).bind(this),T).catch(T)}).bind(this))}}})}(as)),as.exports}var Wl;function VE(){return Wl||(Wl=1,function(e,t){(function(n,r){e.exports=r(FE(),UE(),WE())})(ae,function(r,o,i){var s={filter:function(h){return(h.functionName||"").indexOf("StackTrace$$")===-1&&(h.functionName||"").indexOf("ErrorStackParser$$")===-1&&(h.functionName||"").indexOf("StackTraceGPS$$")===-1&&(h.functionName||"").indexOf("StackGenerator$$")===-1},sourceCache:{}},a=function(){try{throw new Error}catch(d){return d}};function l(h,d){var c={};return[h,d].forEach(function(p){for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(c[m]=p[m]);return c}),c}function f(h){return h.stack||h["opera#sourceloc"]}function u(h,d){return typeof d=="function"?h.filter(d):h}return{get:function(d){var c=a();return f(c)?this.fromError(c,d):this.generateArtificially(d)},getSync:function(d){d=l(s,d);var c=a(),p=f(c)?r.parse(c):o.backtrace(d);return u(p,d.filter)},fromError:function(d,c){c=l(s,c);var p=new i(c);return new Promise((function(m){var _=u(r.parse(d),c.filter);m(Promise.all(_.map(function(T){return new Promise(function(E){function b(){E(T)}p.pinpoint(T).then(E,b).catch(b)})})))}).bind(this))},generateArtificially:function(d){d=l(s,d);var c=o.backtrace(d);return typeof d.filter=="function"&&(c=c.filter(d.filter)),Promise.resolve(c)},instrument:function(d,c,p,m){if(typeof d!="function")throw new Error("Cannot instrument non-function object");if(typeof d.__stacktraceOriginalFn=="function")return d;var _=(function(){try{return this.get().then(c,p).catch(p),d.apply(m||this,arguments)}catch(E){throw f(E)&&this.fromError(E).then(c,p).catch(p),E}}).bind(this);return _.__stacktraceOriginalFn=d,_},deinstrument:function(d){if(typeof d!="function")throw new Error("Cannot de-instrument non-function object");return typeof d.__stacktraceOriginalFn=="function"?d.__stacktraceOriginalFn:d},report:function(d,c,p,m){return new Promise(function(_,T){var E=new XMLHttpRequest;if(E.onerror=T,E.onreadystatechange=function(){E.readyState===4&&(E.status>=200&&E.status<400?_(E.responseText):T(new Error("POST to "+c+" failed with status: "+E.status)))},E.open("post",c),E.setRequestHeader("Content-Type","application/json"),m&&typeof m.headers=="object"){var b=m.headers;for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&E.setRequestHeader(A,b[A])}var w={stack:d};p!=null&&(w.message=p),E.send(JSON.stringify(w))})}}})}(rs)),rs.exports}var fs,Vl;function zE(){if(Vl)return fs;Vl=1;var e=VE(),t="https://clouderrorreporting.googleapis.com/v1beta1/projects/",n=function(){};n.prototype.start=function(s){if(!s.key&&!s.targetUrl&&!s.customReportingFunction)throw new Error("Cannot initialize: No API key, target url or custom reporting function provided.");if(!s.projectId&&!s.targetUrl&&!s.customReportingFunction)throw new Error("Cannot initialize: No project ID, target url or custom reporting function provided.");this.customReportingFunction=s.customReportingFunction,this.apiKey=s.key,this.projectId=s.projectId,this.targetUrl=s.targetUrl,this.context=s.context||{},this.serviceContext={service:s.service||"web"},s.version&&(this.serviceContext.version=s.version),this.reportUncaughtExceptions=s.reportUncaughtExceptions!==!1,this.reportUnhandledPromiseRejections=s.reportUnhandledPromiseRejections!==!1,this.disabled=!!s.disabled,r(this)};function r(s){var a=function(){};if(s.reportUncaughtExceptions){var l=window.onerror||a;window.onerror=function(u,h,d,c,p){return p&&s.report(p).catch(a),l(u,h,d,c,p),!0}}if(s.reportUnhandledPromiseRejections){var f=window.onunhandledrejection||a;window.onunhandledrejection=function(u){return u&&s.report(u.reason).catch(a),f(u.reason),!0}}}n.prototype.report=function(s,a){if(this.disabled)return Promise.resolve(null);if(!s)return Promise.reject(new Error("no error to report"));a=a||{};var l={};l.serviceContext=this.serviceContext,l.context=this.context,l.context.httpRequest={userAgent:window.navigator.userAgent,url:window.location.href};var f=0;if(typeof s=="string"||s instanceof String){try{throw new Error(s)}catch(d){s=d}f=a.skipLocalFrames||1}var u=this.targetUrl||t+this.projectId+"/events:report?key="+this.apiKey,h=this.customReportingFunction;return o(s,f).then(function(d){return l.message=d,h?h(l):i(u,l)})};function o(s,a){return e.fromError(s).then(function(l){for(var f=[s.toString()],u=a;u<l.length;u++)f.push([" at ",l[u].getFunctionName()||"<anonymous>"," (",l[u].getFileName(),":",l[u].getLineNumber(),":",l[u].getColumnNumber(),")"].join(""));return f.join(`
39
+ `).length?this.parseOpera9(l):l.stack?this.parseOpera11(l):this.parseOpera10(l)},parseOpera9:function(l){for(var f=/Line (\d+).*script (?:in )?(\S+)/i,c=l.message.split(`
40
+ `),h=[],d=2,u=c.length;d<u;d+=2){var p=f.exec(c[d]);p&&h.push(new r({fileName:p[2],lineNumber:p[1],source:c[d]}))}return h},parseOpera10:function(l){for(var f=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,c=l.stacktrace.split(`
41
+ `),h=[],d=0,u=c.length;d<u;d+=2){var p=f.exec(c[d]);p&&h.push(new r({functionName:p[3]||void 0,fileName:p[2],lineNumber:p[1],source:c[d]}))}return h},parseOpera11:function(l){var f=l.stack.split(`
42
+ `).filter(function(c){return!!c.match(o)&&!c.match(/^Error created at/)},this);return f.map(function(c){var h=c.split("@"),d=this.extractLocation(h.pop()),u=h.shift()||"",p=u.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,m;u.match(/\(([^)]*)\)/)&&(m=u.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var E=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new r({functionName:p,args:E,fileName:d[0],lineNumber:d[1],columnNumber:d[2],source:c})},this)}}})}(ss)),ss.exports}var us={exports:{}},jl;function z_(){return jl||(jl=1,function(e,t){(function(n,r){e.exports=r(Bc())})(ue,function(n){return{backtrace:function(o){var i=[],s=10;typeof o=="object"&&typeof o.maxStackSize=="number"&&(s=o.maxStackSize);for(var a=arguments.callee;a&&i.length<s&&a.arguments;){for(var l=new Array(a.arguments.length),f=0;f<l.length;++f)l[f]=a.arguments[f];/function(?:\s+([\w$]+))+\s*\(/.test(a.toString())?i.push(new n({functionName:RegExp.$1||void 0,args:l})):i.push(new n({args:l}));try{a=a.caller}catch{break}}return i}}})}(us)),us.exports}var ls={exports:{}},Ei={},fs={},Hl;function gh(){return Hl||(Hl=1,function(e){function t(_,b,A){if(b in _)return _[b];if(arguments.length===3)return A;throw new Error('"'+b+'" is a required argument.')}e.getArg=t;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,r=/^data:.+\,.+$/;function o(_){var b=_.match(n);return b?{scheme:b[1],auth:b[2],host:b[3],port:b[4],path:b[5]}:null}e.urlParse=o;function i(_){var b="";return _.scheme&&(b+=_.scheme+":"),b+="//",_.auth&&(b+=_.auth+"@"),_.host&&(b+=_.host),_.port&&(b+=":"+_.port),_.path&&(b+=_.path),b}e.urlGenerate=i;function s(_){var b=_,A=o(_);if(A){if(!A.path)return _;b=A.path}for(var w=e.isAbsolute(b),P=b.split(/\/+/),F,B=0,W=P.length-1;W>=0;W--)F=P[W],F==="."?P.splice(W,1):F===".."?B++:B>0&&(F===""?(P.splice(W+1,B),B=0):(P.splice(W,2),B--));return b=P.join("/"),b===""&&(b=w?"/":"."),A?(A.path=b,i(A)):b}e.normalize=s;function a(_,b){_===""&&(_="."),b===""&&(b=".");var A=o(b),w=o(_);if(w&&(_=w.path||"/"),A&&!A.scheme)return w&&(A.scheme=w.scheme),i(A);if(A||b.match(r))return b;if(w&&!w.host&&!w.path)return w.host=b,i(w);var P=b.charAt(0)==="/"?b:s(_.replace(/\/+$/,"")+"/"+b);return w?(w.path=P,i(w)):P}e.join=a,e.isAbsolute=function(_){return _.charAt(0)==="/"||!!_.match(n)};function l(_,b){_===""&&(_="."),_=_.replace(/\/$/,"");for(var A=0;b.indexOf(_+"/")!==0;){var w=_.lastIndexOf("/");if(w<0||(_=_.slice(0,w),_.match(/^([^\/]+:\/)?\/*$/)))return b;++A}return Array(A+1).join("../")+b.substr(_.length+1)}e.relative=l;var f=function(){var _=Object.create(null);return!("__proto__"in _)}();function c(_){return _}function h(_){return u(_)?"$"+_:_}e.toSetString=f?c:h;function d(_){return u(_)?_.slice(1):_}e.fromSetString=f?c:d;function u(_){if(!_)return!1;var b=_.length;if(b<9||_.charCodeAt(b-1)!==95||_.charCodeAt(b-2)!==95||_.charCodeAt(b-3)!==111||_.charCodeAt(b-4)!==116||_.charCodeAt(b-5)!==111||_.charCodeAt(b-6)!==114||_.charCodeAt(b-7)!==112||_.charCodeAt(b-8)!==95||_.charCodeAt(b-9)!==95)return!1;for(var A=b-10;A>=0;A--)if(_.charCodeAt(A)!==36)return!1;return!0}function p(_,b,A){var w=_.source-b.source;return w!==0||(w=_.originalLine-b.originalLine,w!==0)||(w=_.originalColumn-b.originalColumn,w!==0||A)||(w=_.generatedColumn-b.generatedColumn,w!==0)||(w=_.generatedLine-b.generatedLine,w!==0)?w:_.name-b.name}e.compareByOriginalPositions=p;function m(_,b,A){var w=_.generatedLine-b.generatedLine;return w!==0||(w=_.generatedColumn-b.generatedColumn,w!==0||A)||(w=_.source-b.source,w!==0)||(w=_.originalLine-b.originalLine,w!==0)||(w=_.originalColumn-b.originalColumn,w!==0)?w:_.name-b.name}e.compareByGeneratedPositionsDeflated=m;function E(_,b){return _===b?0:_>b?1:-1}function T(_,b){var A=_.generatedLine-b.generatedLine;return A!==0||(A=_.generatedColumn-b.generatedColumn,A!==0)||(A=E(_.source,b.source),A!==0)||(A=_.originalLine-b.originalLine,A!==0)||(A=_.originalColumn-b.originalColumn,A!==0)?A:E(_.name,b.name)}e.compareByGeneratedPositionsInflated=T}(fs)),fs}var ds={},ql;function Y_(){return ql||(ql=1,function(e){e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=2;function t(n,r,o,i,s,a){var l=Math.floor((r-n)/2)+n,f=s(o,i[l],!0);return f===0?l:f>0?r-l>1?t(l,r,o,i,s,a):a==e.LEAST_UPPER_BOUND?r<i.length?r:-1:l:l-n>1?t(n,l,o,i,s,a):a==e.LEAST_UPPER_BOUND?l:n<0?-1:n}e.search=function(r,o,i,s){if(o.length===0)return-1;var a=t(-1,o.length,r,o,i,s||e.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&i(o[a],o[a-1],!0)===0;)--a;return a}}(ds)),ds}var hs={},Gl;function K_(){if(Gl)return hs;Gl=1;var e=gh(),t=Object.prototype.hasOwnProperty;function n(){this._array=[],this._set=Object.create(null)}return n.fromArray=function(o,i){for(var s=new n,a=0,l=o.length;a<l;a++)s.add(o[a],i);return s},n.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},n.prototype.add=function(o,i){var s=e.toSetString(o),a=t.call(this._set,s),l=this._array.length;(!a||i)&&this._array.push(o),a||(this._set[s]=l)},n.prototype.has=function(o){var i=e.toSetString(o);return t.call(this._set,i)},n.prototype.indexOf=function(o){var i=e.toSetString(o);if(t.call(this._set,i))return this._set[i];throw new Error('"'+o+'" is not in the set.')},n.prototype.at=function(o){if(o>=0&&o<this._array.length)return this._array[o];throw new Error("No element indexed by "+o)},n.prototype.toArray=function(){return this._array.slice()},hs.ArraySet=n,hs}var _o={},Eo={},Wl;function Q_(){if(Wl)return Eo;Wl=1;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return Eo.encode=function(t){if(0<=t&&t<e.length)return e[t];throw new TypeError("Must be between 0 and 63: "+t)},Eo.decode=function(t){var n=65,r=90,o=97,i=122,s=48,a=57,l=43,f=47,c=26,h=52;return n<=t&&t<=r?t-n:o<=t&&t<=i?t-o+c:s<=t&&t<=a?t-s+h:t==l?62:t==f?63:-1},Eo}var Vl;function X_(){if(Vl)return _o;Vl=1;var e=Q_(),t=5,n=1<<t,r=n-1,o=n;function i(a){return a<0?(-a<<1)+1:(a<<1)+0}function s(a){var l=(a&1)===1,f=a>>1;return l?-f:f}return _o.encode=function(l){var f="",c,h=i(l);do c=h&r,h>>>=t,h>0&&(c|=o),f+=e.encode(c);while(h>0);return f},_o.decode=function(l,f,c){var h=l.length,d=0,u=0,p,m;do{if(f>=h)throw new Error("Expected more digits in base 64 VLQ value.");if(m=e.decode(l.charCodeAt(f++)),m===-1)throw new Error("Invalid base64 digit: "+l.charAt(f-1));p=!!(m&o),m&=r,d=d+(m<<u),u+=t}while(p);c.value=s(d),c.rest=f},_o}var ps={},zl;function J_(){if(zl)return ps;zl=1;function e(r,o,i){var s=r[o];r[o]=r[i],r[i]=s}function t(r,o){return Math.round(r+Math.random()*(o-r))}function n(r,o,i,s){if(i<s){var a=t(i,s),l=i-1;e(r,a,s);for(var f=r[s],c=i;c<s;c++)o(r[c],f)<=0&&(l+=1,e(r,l,c));e(r,l+1,c);var h=l+1;n(r,o,i,h-1),n(r,o,h+1,s)}}return ps.quickSort=function(r,o){n(r,o,0,r.length-1)},ps}var Yl;function Z_(){if(Yl)return Ei;Yl=1;var e=gh(),t=Y_(),n=K_().ArraySet,r=X_(),o=J_().quickSort;function i(f){var c=f;return typeof f=="string"&&(c=JSON.parse(f.replace(/^\)\]\}'/,""))),c.sections!=null?new l(c):new s(c)}i.fromSourceMap=function(f){return s.fromSourceMap(f)},i.prototype._version=3,i.prototype.__generatedMappings=null,Object.defineProperty(i.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),i.prototype.__originalMappings=null,Object.defineProperty(i.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),i.prototype._charIsMappingSeparator=function(c,h){var d=c.charAt(h);return d===";"||d===","},i.prototype._parseMappings=function(c,h){throw new Error("Subclasses must implement _parseMappings")},i.GENERATED_ORDER=1,i.ORIGINAL_ORDER=2,i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2,i.prototype.eachMapping=function(c,h,d){var u=h||null,p=d||i.GENERATED_ORDER,m;switch(p){case i.GENERATED_ORDER:m=this._generatedMappings;break;case i.ORIGINAL_ORDER:m=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var E=this.sourceRoot;m.map(function(T){var _=T.source===null?null:this._sources.at(T.source);return _!=null&&E!=null&&(_=e.join(E,_)),{source:_,generatedLine:T.generatedLine,generatedColumn:T.generatedColumn,originalLine:T.originalLine,originalColumn:T.originalColumn,name:T.name===null?null:this._names.at(T.name)}},this).forEach(c,u)},i.prototype.allGeneratedPositionsFor=function(c){var h=e.getArg(c,"line"),d={source:e.getArg(c,"source"),originalLine:h,originalColumn:e.getArg(c,"column",0)};if(this.sourceRoot!=null&&(d.source=e.relative(this.sourceRoot,d.source)),!this._sources.has(d.source))return[];d.source=this._sources.indexOf(d.source);var u=[],p=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,t.LEAST_UPPER_BOUND);if(p>=0){var m=this._originalMappings[p];if(c.column===void 0)for(var E=m.originalLine;m&&m.originalLine===E;)u.push({line:e.getArg(m,"generatedLine",null),column:e.getArg(m,"generatedColumn",null),lastColumn:e.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++p];else for(var T=m.originalColumn;m&&m.originalLine===h&&m.originalColumn==T;)u.push({line:e.getArg(m,"generatedLine",null),column:e.getArg(m,"generatedColumn",null),lastColumn:e.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++p]}return u},Ei.SourceMapConsumer=i;function s(f){var c=f;typeof f=="string"&&(c=JSON.parse(f.replace(/^\)\]\}'/,"")));var h=e.getArg(c,"version"),d=e.getArg(c,"sources"),u=e.getArg(c,"names",[]),p=e.getArg(c,"sourceRoot",null),m=e.getArg(c,"sourcesContent",null),E=e.getArg(c,"mappings"),T=e.getArg(c,"file",null);if(h!=this._version)throw new Error("Unsupported version: "+h);d=d.map(String).map(e.normalize).map(function(_){return p&&e.isAbsolute(p)&&e.isAbsolute(_)?e.relative(p,_):_}),this._names=n.fromArray(u.map(String),!0),this._sources=n.fromArray(d,!0),this.sourceRoot=p,this.sourcesContent=m,this._mappings=E,this.file=T}s.prototype=Object.create(i.prototype),s.prototype.consumer=i,s.fromSourceMap=function(c){var h=Object.create(s.prototype),d=h._names=n.fromArray(c._names.toArray(),!0),u=h._sources=n.fromArray(c._sources.toArray(),!0);h.sourceRoot=c._sourceRoot,h.sourcesContent=c._generateSourcesContent(h._sources.toArray(),h.sourceRoot),h.file=c._file;for(var p=c._mappings.toArray().slice(),m=h.__generatedMappings=[],E=h.__originalMappings=[],T=0,_=p.length;T<_;T++){var b=p[T],A=new a;A.generatedLine=b.generatedLine,A.generatedColumn=b.generatedColumn,b.source&&(A.source=u.indexOf(b.source),A.originalLine=b.originalLine,A.originalColumn=b.originalColumn,b.name&&(A.name=d.indexOf(b.name)),E.push(A)),m.push(A)}return o(h.__originalMappings,e.compareByOriginalPositions),h},s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){return this._sources.toArray().map(function(f){return this.sourceRoot!=null?e.join(this.sourceRoot,f):f},this)}});function a(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}s.prototype._parseMappings=function(c,h){for(var d=1,u=0,p=0,m=0,E=0,T=0,_=c.length,b=0,A={},w={},P=[],F=[],B,W,G,V,H;b<_;)if(c.charAt(b)===";")d++,b++,u=0;else if(c.charAt(b)===",")b++;else{for(B=new a,B.generatedLine=d,V=b;V<_&&!this._charIsMappingSeparator(c,V);V++);if(W=c.slice(b,V),G=A[W],G)b+=W.length;else{for(G=[];b<V;)r.decode(c,b,w),H=w.value,b=w.rest,G.push(H);if(G.length===2)throw new Error("Found a source, but no line and column");if(G.length===3)throw new Error("Found a source and line, but no column");A[W]=G}B.generatedColumn=u+G[0],u=B.generatedColumn,G.length>1&&(B.source=E+G[1],E+=G[1],B.originalLine=p+G[2],p=B.originalLine,B.originalLine+=1,B.originalColumn=m+G[3],m=B.originalColumn,G.length>4&&(B.name=T+G[4],T+=G[4])),F.push(B),typeof B.originalLine=="number"&&P.push(B)}o(F,e.compareByGeneratedPositionsDeflated),this.__generatedMappings=F,o(P,e.compareByOriginalPositions),this.__originalMappings=P},s.prototype._findMapping=function(c,h,d,u,p,m){if(c[d]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+c[d]);if(c[u]<0)throw new TypeError("Column must be greater than or equal to 0, got "+c[u]);return t.search(c,h,p,m)},s.prototype.computeColumnSpans=function(){for(var c=0;c<this._generatedMappings.length;++c){var h=this._generatedMappings[c];if(c+1<this._generatedMappings.length){var d=this._generatedMappings[c+1];if(h.generatedLine===d.generatedLine){h.lastGeneratedColumn=d.generatedColumn-1;continue}}h.lastGeneratedColumn=1/0}},s.prototype.originalPositionFor=function(c){var h={generatedLine:e.getArg(c,"line"),generatedColumn:e.getArg(c,"column")},d=this._findMapping(h,this._generatedMappings,"generatedLine","generatedColumn",e.compareByGeneratedPositionsDeflated,e.getArg(c,"bias",i.GREATEST_LOWER_BOUND));if(d>=0){var u=this._generatedMappings[d];if(u.generatedLine===h.generatedLine){var p=e.getArg(u,"source",null);p!==null&&(p=this._sources.at(p),this.sourceRoot!=null&&(p=e.join(this.sourceRoot,p)));var m=e.getArg(u,"name",null);return m!==null&&(m=this._names.at(m)),{source:p,line:e.getArg(u,"originalLine",null),column:e.getArg(u,"originalColumn",null),name:m}}}return{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(c){return c==null}):!1},s.prototype.sourceContentFor=function(c,h){if(!this.sourcesContent)return null;if(this.sourceRoot!=null&&(c=e.relative(this.sourceRoot,c)),this._sources.has(c))return this.sourcesContent[this._sources.indexOf(c)];var d;if(this.sourceRoot!=null&&(d=e.urlParse(this.sourceRoot))){var u=c.replace(/^file:\/\//,"");if(d.scheme=="file"&&this._sources.has(u))return this.sourcesContent[this._sources.indexOf(u)];if((!d.path||d.path=="/")&&this._sources.has("/"+c))return this.sourcesContent[this._sources.indexOf("/"+c)]}if(h)return null;throw new Error('"'+c+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(c){var h=e.getArg(c,"source");if(this.sourceRoot!=null&&(h=e.relative(this.sourceRoot,h)),!this._sources.has(h))return{line:null,column:null,lastColumn:null};h=this._sources.indexOf(h);var d={source:h,originalLine:e.getArg(c,"line"),originalColumn:e.getArg(c,"column")},u=this._findMapping(d,this._originalMappings,"originalLine","originalColumn",e.compareByOriginalPositions,e.getArg(c,"bias",i.GREATEST_LOWER_BOUND));if(u>=0){var p=this._originalMappings[u];if(p.source===d.source)return{line:e.getArg(p,"generatedLine",null),column:e.getArg(p,"generatedColumn",null),lastColumn:e.getArg(p,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Ei.BasicSourceMapConsumer=s;function l(f){var c=f;typeof f=="string"&&(c=JSON.parse(f.replace(/^\)\]\}'/,"")));var h=e.getArg(c,"version"),d=e.getArg(c,"sections");if(h!=this._version)throw new Error("Unsupported version: "+h);this._sources=new n,this._names=new n;var u={line:-1,column:0};this._sections=d.map(function(p){if(p.url)throw new Error("Support for url field in sections not implemented.");var m=e.getArg(p,"offset"),E=e.getArg(m,"line"),T=e.getArg(m,"column");if(E<u.line||E===u.line&&T<u.column)throw new Error("Section offsets must be ordered and non-overlapping.");return u=m,{generatedOffset:{generatedLine:E+1,generatedColumn:T+1},consumer:new i(e.getArg(p,"map"))}})}return l.prototype=Object.create(i.prototype),l.prototype.constructor=i,l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){for(var f=[],c=0;c<this._sections.length;c++)for(var h=0;h<this._sections[c].consumer.sources.length;h++)f.push(this._sections[c].consumer.sources[h]);return f}}),l.prototype.originalPositionFor=function(c){var h={generatedLine:e.getArg(c,"line"),generatedColumn:e.getArg(c,"column")},d=t.search(h,this._sections,function(p,m){var E=p.generatedLine-m.generatedOffset.generatedLine;return E||p.generatedColumn-m.generatedOffset.generatedColumn}),u=this._sections[d];return u?u.consumer.originalPositionFor({line:h.generatedLine-(u.generatedOffset.generatedLine-1),column:h.generatedColumn-(u.generatedOffset.generatedLine===h.generatedLine?u.generatedOffset.generatedColumn-1:0),bias:c.bias}):{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(c){return c.consumer.hasContentsOfAllSources()})},l.prototype.sourceContentFor=function(c,h){for(var d=0;d<this._sections.length;d++){var u=this._sections[d],p=u.consumer.sourceContentFor(c,!0);if(p)return p}if(h)return null;throw new Error('"'+c+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(c){for(var h=0;h<this._sections.length;h++){var d=this._sections[h];if(d.consumer.sources.indexOf(e.getArg(c,"source"))!==-1){var u=d.consumer.generatedPositionFor(c);if(u){var p={line:u.line+(d.generatedOffset.generatedLine-1),column:u.column+(d.generatedOffset.generatedLine===u.line?d.generatedOffset.generatedColumn-1:0)};return p}}}return{line:null,column:null}},l.prototype._parseMappings=function(c,h){this.__generatedMappings=[],this.__originalMappings=[];for(var d=0;d<this._sections.length;d++)for(var u=this._sections[d],p=u.consumer._generatedMappings,m=0;m<p.length;m++){var E=p[m],T=u.consumer._sources.at(E.source);u.consumer.sourceRoot!==null&&(T=e.join(u.consumer.sourceRoot,T)),this._sources.add(T),T=this._sources.indexOf(T);var _=u.consumer._names.at(E.name);this._names.add(_),_=this._names.indexOf(_);var b={source:T,generatedLine:E.generatedLine+(u.generatedOffset.generatedLine-1),generatedColumn:E.generatedColumn+(u.generatedOffset.generatedLine===E.generatedLine?u.generatedOffset.generatedColumn-1:0),originalLine:E.originalLine,originalColumn:E.originalColumn,name:_};this.__generatedMappings.push(b),typeof b.originalLine=="number"&&this.__originalMappings.push(b)}o(this.__generatedMappings,e.compareByGeneratedPositionsDeflated),o(this.__originalMappings,e.compareByOriginalPositions)},Ei.IndexedSourceMapConsumer=l,Ei}var Kl;function eE(){return Kl||(Kl=1,function(e,t){(function(n,r){e.exports=r(Z_(),Bc())})(ue,function(n,r){function o(d){return new Promise(function(u,p){var m=new XMLHttpRequest;m.open("get",d),m.onerror=p,m.onreadystatechange=function(){m.readyState===4&&(m.status>=200&&m.status<300||d.substr(0,7)==="file://"&&m.responseText?u(m.responseText):p(new Error("HTTP status: "+m.status+" retrieving "+d)))},m.send()})}function i(d){if(typeof window<"u"&&window.atob)return window.atob(d);throw new Error("You must supply a polyfill for window.atob in this environment")}function s(d){if(typeof JSON<"u"&&JSON.parse)return JSON.parse(d);throw new Error("You must supply a polyfill for JSON.parse in this environment")}function a(d,u){for(var p=[/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*function\b/,/function\s+([^('"`]*?)\s*\(([^)]*)\)/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*(?:eval|new Function)\b/,/\b(?!(?:if|for|switch|while|with|catch)\b)(?:(?:static)\s+)?(\S+)\s*\(.*?\)\s*\{/,/['"]?([$_A-Za-z][$_A-Za-z0-9]*)['"]?\s*[:=]\s*\(.*?\)\s*=>/],m=d.split(`
43
+ `),E="",T=Math.min(u,20),_=0;_<T;++_){var b=m[u-_-1],A=b.indexOf("//");if(A>=0&&(b=b.substr(0,A)),b){E=b+E;for(var w=p.length,P=0;P<w;P++){var F=p[P].exec(E);if(F&&F[1])return F[1]}}}}function l(){if(typeof Object.defineProperty!="function"||typeof Object.create!="function")throw new Error("Unable to consume source maps in older browsers")}function f(d){if(typeof d!="object")throw new TypeError("Given StackFrame is not an object");if(typeof d.fileName!="string")throw new TypeError("Given file name is not a String");if(typeof d.lineNumber!="number"||d.lineNumber%1!==0||d.lineNumber<1)throw new TypeError("Given line number must be a positive integer");if(typeof d.columnNumber!="number"||d.columnNumber%1!==0||d.columnNumber<0)throw new TypeError("Given column number must be a non-negative integer");return!0}function c(d){for(var u=/\/\/[#@] ?sourceMappingURL=([^\s'"]+)\s*$/mg,p,m;m=u.exec(d);)p=m[1];if(p)return p;throw new Error("sourceMappingURL not found")}function h(d,u,p){return new Promise(function(m,E){var T=u.originalPositionFor({line:d.lineNumber,column:d.columnNumber});if(T.source){var _=u.sourceContentFor(T.source);_&&(p[T.source]=_),m(new r({functionName:T.name||d.functionName,args:d.args,fileName:T.source,lineNumber:T.line,columnNumber:T.column}))}else E(new Error("Could not get original source for given stackframe and source map"))})}return function d(u){if(!(this instanceof d))return new d(u);u=u||{},this.sourceCache=u.sourceCache||{},this.sourceMapConsumerCache=u.sourceMapConsumerCache||{},this.ajax=u.ajax||o,this._atob=u.atob||i,this._get=function(m){return new Promise((function(E,T){var _=m.substr(0,5)==="data:";if(this.sourceCache[m])E(this.sourceCache[m]);else if(u.offline&&!_)T(new Error("Cannot make network requests in offline mode"));else if(_){var b=/^data:application\/json;([\w=:"-]+;)*base64,/,A=m.match(b);if(A){var w=A[0].length,P=m.substr(w),F=this._atob(P);this.sourceCache[m]=F,E(F)}else T(new Error("The encoding of the inline sourcemap is not supported"))}else{var B=this.ajax(m,{method:"get"});this.sourceCache[m]=B,B.then(E,T)}}).bind(this))},this._getSourceMapConsumer=function(m,E){return new Promise((function(T){if(this.sourceMapConsumerCache[m])T(this.sourceMapConsumerCache[m]);else{var _=new Promise((function(b,A){return this._get(m).then(function(w){typeof w=="string"&&(w=s(w.replace(/^\)\]\}'/,""))),typeof w.sourceRoot>"u"&&(w.sourceRoot=E),b(new n.SourceMapConsumer(w))}).catch(A)}).bind(this));this.sourceMapConsumerCache[m]=_,T(_)}}).bind(this))},this.pinpoint=function(m){return new Promise((function(E,T){this.getMappedLocation(m).then((function(_){function b(){E(_)}this.findFunctionName(_).then(E,b).catch(b)}).bind(this),T)}).bind(this))},this.findFunctionName=function(m){return new Promise((function(E,T){f(m),this._get(m.fileName).then(function(b){var A=m.lineNumber,w=m.columnNumber,P=a(b,A);E(P?new r({functionName:P,args:m.args,fileName:m.fileName,lineNumber:A,columnNumber:w}):m)},T).catch(T)}).bind(this))},this.getMappedLocation=function(m){return new Promise((function(E,T){l(),f(m);var _=this.sourceCache,b=m.fileName;this._get(b).then((function(A){var w=c(A),P=w.substr(0,5)==="data:",F=b.substring(0,b.lastIndexOf("/")+1);return w[0]!=="/"&&!P&&!/^https?:\/\/|^\/\//i.test(w)&&(w=F+w),this._getSourceMapConsumer(w,F).then(function(B){return h(m,B,_).then(E).catch(function(){E(m)})})}).bind(this),T).catch(T)}).bind(this))}}})}(ls)),ls.exports}var Ql;function tE(){return Ql||(Ql=1,function(e,t){(function(n,r){e.exports=r(V_(),z_(),eE())})(ue,function(r,o,i){var s={filter:function(h){return(h.functionName||"").indexOf("StackTrace$$")===-1&&(h.functionName||"").indexOf("ErrorStackParser$$")===-1&&(h.functionName||"").indexOf("StackTraceGPS$$")===-1&&(h.functionName||"").indexOf("StackGenerator$$")===-1},sourceCache:{}},a=function(){try{throw new Error}catch(d){return d}};function l(h,d){var u={};return[h,d].forEach(function(p){for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(u[m]=p[m]);return u}),u}function f(h){return h.stack||h["opera#sourceloc"]}function c(h,d){return typeof d=="function"?h.filter(d):h}return{get:function(d){var u=a();return f(u)?this.fromError(u,d):this.generateArtificially(d)},getSync:function(d){d=l(s,d);var u=a(),p=f(u)?r.parse(u):o.backtrace(d);return c(p,d.filter)},fromError:function(d,u){u=l(s,u);var p=new i(u);return new Promise((function(m){var E=c(r.parse(d),u.filter);m(Promise.all(E.map(function(T){return new Promise(function(_){function b(){_(T)}p.pinpoint(T).then(_,b).catch(b)})})))}).bind(this))},generateArtificially:function(d){d=l(s,d);var u=o.backtrace(d);return typeof d.filter=="function"&&(u=u.filter(d.filter)),Promise.resolve(u)},instrument:function(d,u,p,m){if(typeof d!="function")throw new Error("Cannot instrument non-function object");if(typeof d.__stacktraceOriginalFn=="function")return d;var E=(function(){try{return this.get().then(u,p).catch(p),d.apply(m||this,arguments)}catch(_){throw f(_)&&this.fromError(_).then(u,p).catch(p),_}}).bind(this);return E.__stacktraceOriginalFn=d,E},deinstrument:function(d){if(typeof d!="function")throw new Error("Cannot de-instrument non-function object");return typeof d.__stacktraceOriginalFn=="function"?d.__stacktraceOriginalFn:d},report:function(d,u,p,m){return new Promise(function(E,T){var _=new XMLHttpRequest;if(_.onerror=T,_.onreadystatechange=function(){_.readyState===4&&(_.status>=200&&_.status<400?E(_.responseText):T(new Error("POST to "+u+" failed with status: "+_.status)))},_.open("post",u),_.setRequestHeader("Content-Type","application/json"),m&&typeof m.headers=="object"){var b=m.headers;for(var A in b)Object.prototype.hasOwnProperty.call(b,A)&&_.setRequestHeader(A,b[A])}var w={stack:d};p!=null&&(w.message=p),_.send(JSON.stringify(w))})}}})}(as)),as.exports}var ms,Xl;function rE(){if(Xl)return ms;Xl=1;var e=tE(),t="https://clouderrorreporting.googleapis.com/v1beta1/projects/",n=function(){};n.prototype.start=function(s){if(!s.key&&!s.targetUrl&&!s.customReportingFunction)throw new Error("Cannot initialize: No API key, target url or custom reporting function provided.");if(!s.projectId&&!s.targetUrl&&!s.customReportingFunction)throw new Error("Cannot initialize: No project ID, target url or custom reporting function provided.");this.customReportingFunction=s.customReportingFunction,this.apiKey=s.key,this.projectId=s.projectId,this.targetUrl=s.targetUrl,this.context=s.context||{},this.serviceContext={service:s.service||"web"},s.version&&(this.serviceContext.version=s.version),this.reportUncaughtExceptions=s.reportUncaughtExceptions!==!1,this.reportUnhandledPromiseRejections=s.reportUnhandledPromiseRejections!==!1,this.disabled=!!s.disabled,r(this)};function r(s){var a=function(){};if(s.reportUncaughtExceptions){var l=window.onerror||a;window.onerror=function(c,h,d,u,p){return p&&s.report(p).catch(a),l(c,h,d,u,p),!0}}if(s.reportUnhandledPromiseRejections){var f=window.onunhandledrejection||a;window.onunhandledrejection=function(c){return c&&s.report(c.reason).catch(a),f(c.reason),!0}}}n.prototype.report=function(s,a){if(this.disabled)return Promise.resolve(null);if(!s)return Promise.reject(new Error("no error to report"));a=a||{};var l={};l.serviceContext=this.serviceContext,l.context=this.context,l.context.httpRequest={userAgent:window.navigator.userAgent,url:window.location.href};var f=0;if(typeof s=="string"||s instanceof String){try{throw new Error(s)}catch(d){s=d}f=a.skipLocalFrames||1}var c=this.targetUrl||t+this.projectId+"/events:report?key="+this.apiKey,h=this.customReportingFunction;return o(s,f).then(function(d){return l.message=d,h?h(l):i(c,l)})};function o(s,a){return e.fromError(s).then(function(l){for(var f=[s.toString()],c=a;c<l.length;c++)f.push([" at ",l[c].getFunctionName()||"<anonymous>"," (",l[c].getFileName(),":",l[c].getLineNumber(),":",l[c].getColumnNumber(),")"].join(""));return f.join(`
44
44
  `)},function(l){return["Error extracting stack trace: ",l,`
45
45
  `,s.toString(),`
46
- `," (",s.file,":",s.line,":",s.column,")"].join("")})}function i(s,a){var l=new XMLHttpRequest;return l.open("POST",s,!0),l.setRequestHeader("Content-Type","application/json; charset=UTF-8"),new Promise(function(f,u){l.onreadystatechange=function(){if(l.readyState===4){var h=l.status;if(h>=200&&h<300)f({message:a.message});else if(h===429)u({message:"quota or rate limiting error on stackdriver report",name:"Http429FakeError"});else{var d=h?h+" http response":"network error";u(new Error(d+" on stackdriver report"))}}},l.send(JSON.stringify(a))})}return n.prototype.setUser=function(s){this.context.user=s},fs=n,fs}var zl;function YE(){return zl||(zl=1,function(e,t){(function(n,r){e.exports=r(zE())})(ae,function(n){return function(){var r={542:function(a){a.exports=n}},o={};function i(a){var l=o[a];if(l!==void 0)return l.exports;var f=o[a]={exports:{}};return r[a](f,f.exports,i),f.exports}i.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(l,{a:l}),l},i.d=function(a,l){for(var f in l)i.o(l,f)&&!i.o(a,f)&&Object.defineProperty(a,f,{enumerable:!0,get:l[f]})},i.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var s={};return function(){i.r(s),i.d(s,{reportError:function(){return d},setContext:function(){return h}});var a=i(542),l=i.n(a);const{GCP:{PROJECT_ID:f}}={GCP:{PROJECT_ID:"hazel-tea-194609"}};let u={key:null,environment:null,projectId:f};const h=({apiKey:c,environment:p,projectId:m,serviceName:_})=>{if(!c)throw new Error("Cannot set context: REACT_APP_GCP_ERRORS_API_KEY not defined");if(u.key=c,!p)throw new Error("Cannot set context: Environment not defined");u.environment=p,u.projectId=m||f,_&&(u.service=`${_}:${u.environment}`)},d=async(c,p)=>{try{const m=new(l());m.start(u),typeof p=="string"&&m.setUser(p),await m.report(c)}catch(m){console.warn(`Cannot report error: ${m.message}`)}}}(),s}()})}(ts)),ts.exports}var ds={exports:{}},vo={},Yl;function KE(){if(Yl)return vo;Yl=1,Object.defineProperty(vo,"__esModule",{value:!0});var e=function(n){console.warn("[react-gtm]",n)};return vo.default=e,vo}var hs,Kl;function QE(){if(Kl)return hs;Kl=1;var e=KE(),t=n(e);function n(o){return o&&o.__esModule?o:{default:o}}var r={tags:function(i){var s=i.id,a=i.events,l=i.dataLayer,f=i.dataLayerName,u=i.preview,h=i.auth,d="&gtm_auth="+h,c="&gtm_preview="+u;s||(0,t.default)("GTM Id is required");var p=`
47
- <iframe src="https://www.googletagmanager.com/ns.html?id=`+s+d+c+`&gtm_cookies_win=x"
46
+ `," (",s.file,":",s.line,":",s.column,")"].join("")})}function i(s,a){var l=new XMLHttpRequest;return l.open("POST",s,!0),l.setRequestHeader("Content-Type","application/json; charset=UTF-8"),new Promise(function(f,c){l.onreadystatechange=function(){if(l.readyState===4){var h=l.status;if(h>=200&&h<300)f({message:a.message});else if(h===429)c({message:"quota or rate limiting error on stackdriver report",name:"Http429FakeError"});else{var d=h?h+" http response":"network error";c(new Error(d+" on stackdriver report"))}}},l.send(JSON.stringify(a))})}return n.prototype.setUser=function(s){this.context.user=s},ms=n,ms}var Jl;function nE(){return Jl||(Jl=1,function(e,t){(function(n,r){e.exports=r(rE())})(ue,function(n){return function(){var r={542:function(a){a.exports=n}},o={};function i(a){var l=o[a];if(l!==void 0)return l.exports;var f=o[a]={exports:{}};return r[a](f,f.exports,i),f.exports}i.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(l,{a:l}),l},i.d=function(a,l){for(var f in l)i.o(l,f)&&!i.o(a,f)&&Object.defineProperty(a,f,{enumerable:!0,get:l[f]})},i.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var s={};return function(){i.r(s),i.d(s,{reportError:function(){return d},setContext:function(){return h}});var a=i(542),l=i.n(a);const{GCP:{PROJECT_ID:f}}={GCP:{PROJECT_ID:"hazel-tea-194609"}};let c={key:null,environment:null,projectId:f};const h=({apiKey:u,environment:p,projectId:m,serviceName:E})=>{if(!u)throw new Error("Cannot set context: REACT_APP_GCP_ERRORS_API_KEY not defined");if(c.key=u,!p)throw new Error("Cannot set context: Environment not defined");c.environment=p,c.projectId=m||f,E&&(c.service=`${E}:${c.environment}`)},d=async(u,p)=>{try{const m=new(l());m.start(c),typeof p=="string"&&m.setUser(p),await m.report(u)}catch(m){console.warn(`Cannot report error: ${m.message}`)}}}(),s}()})}(os)),os.exports}var gs={exports:{}},bo={},Zl;function iE(){if(Zl)return bo;Zl=1,Object.defineProperty(bo,"__esModule",{value:!0});var e=function(n){console.warn("[react-gtm]",n)};return bo.default=e,bo}var ys,ef;function oE(){if(ef)return ys;ef=1;var e=iE(),t=n(e);function n(o){return o&&o.__esModule?o:{default:o}}var r={tags:function(i){var s=i.id,a=i.events,l=i.dataLayer,f=i.dataLayerName,c=i.preview,h=i.auth,d="&gtm_auth="+h,u="&gtm_preview="+c;s||(0,t.default)("GTM Id is required");var p=`
47
+ <iframe src="https://www.googletagmanager.com/ns.html?id=`+s+d+u+`&gtm_cookies_win=x"
48
48
  height="0" width="0" style="display:none;visibility:hidden" id="tag-manager"></iframe>`,m=`
49
49
  (function(w,d,s,l,i){w[l]=w[l]||[];
50
50
  w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js', `+JSON.stringify(a).slice(1,-1)+`});
51
51
  var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';
52
- j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'`+d+c+`&gtm_cookies_win=x';
52
+ j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+'`+d+u+`&gtm_cookies_win=x';
53
53
  f.parentNode.insertBefore(j,f);
54
- })(window,document,'script','`+f+"','"+s+"');",_=this.dataLayer(l,f);return{iframe:p,script:m,dataLayerVar:_}},dataLayer:function(i,s){return`
54
+ })(window,document,'script','`+f+"','"+s+"');",E=this.dataLayer(l,f);return{iframe:p,script:m,dataLayerVar:E}},dataLayer:function(i,s){return`
55
55
  window.`+s+" = window."+s+` || [];
56
- window.`+s+".push("+JSON.stringify(i)+")"}};return hs=r,hs}var ps,Ql;function XE(){if(Ql)return ps;Ql=1;var e=QE(),t=n(e);function n(o){return o&&o.__esModule?o:{default:o}}var r={dataScript:function(i){var s=document.createElement("script");return s.innerHTML=i,s},gtm:function(i){var s=t.default.tags(i),a=function(){var h=document.createElement("noscript");return h.innerHTML=s.iframe,h},l=function(){var h=document.createElement("script");return h.innerHTML=s.script,h},f=this.dataScript(s.dataLayerVar);return{noScript:a,script:l,dataScript:f}},initialize:function(i){var s=i.gtmId,a=i.events,l=a===void 0?{}:a,f=i.dataLayer,u=i.dataLayerName,h=u===void 0?"dataLayer":u,d=i.auth,c=d===void 0?"":d,p=i.preview,m=p===void 0?"":p,_=this.gtm({id:s,events:l,dataLayer:f||void 0,dataLayerName:h,auth:c,preview:m});f&&document.head.appendChild(_.dataScript),document.head.insertBefore(_.script(),document.head.childNodes[0]),document.body.insertBefore(_.noScript(),document.body.childNodes[0])},dataLayer:function(i){var s=i.dataLayer,a=i.dataLayerName,l=a===void 0?"dataLayer":a;if(window[l])return window[l].push(s);var f=t.default.dataLayer(s,l),u=this.dataScript(f);document.head.insertBefore(u,document.head.childNodes[0])}};return ps=r,ps}var ms,Xl;function JE(){if(Xl)return ms;Xl=1;var e=XE(),t=n(e);function n(r){return r&&r.__esModule?r:{default:r}}return ms=t.default,ms}var Jl;function ZE(){return Jl||(Jl=1,function(e,t){(function(n,r){e.exports=r(JE())})(ae,function(n){return function(){var r={273:function(a){a.exports=n}},o={};function i(a){var l=o[a];if(l!==void 0)return l.exports;var f=o[a]={exports:{}};return r[a](f,f.exports,i),f.exports}i.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(l,{a:l}),l},i.d=function(a,l){for(var f in l)i.o(l,f)&&!i.o(a,f)&&Object.defineProperty(a,f,{enumerable:!0,get:l[f]})},i.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var s={};return function(){i.r(s),i.d(s,{setContext:function(){return u},setupGTM:function(){return d}});var a=i(273),l=i.n(a);let f=null;const u=({configs:c,environment:p})=>{if(!p)throw new Error("Cannot set context: Environment not defined");if(!c)throw new Error("Cannot set context: REACT_APP_GTM_ID not defined");if(!c[p])throw new Error(`Cannot set context: REACT_APP_GTM_ID not defined for environment - ${JSON.stringify({configs:c,environment:p})}`);f=c[p]},h=()=>f,d=()=>{const c=h();l().initialize({gtmId:c.id})}}(),s}()})}(ds)),ds.exports}var dh=202,hh=502,ph=400,mh=409,gh=100,yh=201,vh=417,e_=424,Eh=403,_h=504,bh=410,wh=505,Sh=418,Th=419,Oh=507,xh=500,Ah=411,Ch=423,Rh=420,Ph=405,Ih=301,Nh=302,Lh=207,kh=300,Bh=511,Mh=204,Fh=203,Uh=406,Dh=404,$h=501,jh=304,Hh=200,qh=206,Gh=402,Wh=308,Vh=412,zh=428,Yh=102,Kh=407,Qh=431,Xh=408,Jh=413,Zh=414,ep=416,tp=205,rp=303,np=503,ip=101,op=307,ap=429,sp=401,up=422,cp=415,lp=305;const t_={ACCEPTED:dh,BAD_GATEWAY:hh,BAD_REQUEST:ph,CONFLICT:mh,CONTINUE:gh,CREATED:yh,EXPECTATION_FAILED:vh,FORBIDDEN:Eh,GATEWAY_TIMEOUT:_h,GONE:bh,HTTP_VERSION_NOT_SUPPORTED:wh,IM_A_TEAPOT:Sh,INSUFFICIENT_SPACE_ON_RESOURCE:Th,INSUFFICIENT_STORAGE:Oh,INTERNAL_SERVER_ERROR:xh,LENGTH_REQUIRED:Ah,LOCKED:Ch,METHOD_FAILURE:Rh,METHOD_NOT_ALLOWED:Ph,MOVED_PERMANENTLY:Ih,MOVED_TEMPORARILY:Nh,MULTI_STATUS:Lh,MULTIPLE_CHOICES:kh,NETWORK_AUTHENTICATION_REQUIRED:Bh,NO_CONTENT:Mh,NON_AUTHORITATIVE_INFORMATION:Fh,NOT_ACCEPTABLE:Uh,NOT_FOUND:Dh,NOT_IMPLEMENTED:$h,NOT_MODIFIED:jh,OK:Hh,PARTIAL_CONTENT:qh,PAYMENT_REQUIRED:Gh,PERMANENT_REDIRECT:Wh,PRECONDITION_FAILED:Vh,PRECONDITION_REQUIRED:zh,PROCESSING:Yh,PROXY_AUTHENTICATION_REQUIRED:Kh,REQUEST_HEADER_FIELDS_TOO_LARGE:Qh,REQUEST_TIMEOUT:Xh,REQUEST_TOO_LONG:Jh,REQUEST_URI_TOO_LONG:Zh,REQUESTED_RANGE_NOT_SATISFIABLE:ep,RESET_CONTENT:tp,SEE_OTHER:rp,SERVICE_UNAVAILABLE:np,SWITCHING_PROTOCOLS:ip,TEMPORARY_REDIRECT:op,TOO_MANY_REQUESTS:ap,UNAUTHORIZED:sp,UNPROCESSABLE_ENTITY:up,UNSUPPORTED_MEDIA_TYPE:cp,USE_PROXY:lp};var r_={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"},n_={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 fp(e){var t=r_[e.toString()];if(!t)throw new Error("Status code does not exist: "+e);return t}function dp(e){var t=n_[e];if(!t)throw new Error("Reason phrase does not exist: "+e);return t}var hp=fp,Zs;(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"})(Zs||(Zs={}));var eu;(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"})(eu||(eu={}));var Fo=globalThis&&globalThis.__assign||function(){return Fo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Fo.apply(this,arguments)};const i_=Fo(Fo({},t_),{getStatusCode:dp,getStatusText:hp}),o_=Object.freeze(Object.defineProperty({__proto__:null,ACCEPTED:dh,BAD_GATEWAY:hh,BAD_REQUEST:ph,CONFLICT:mh,CONTINUE:gh,CREATED:yh,EXPECTATION_FAILED:vh,FAILED_DEPENDENCY:e_,FORBIDDEN:Eh,GATEWAY_TIMEOUT:_h,GONE:bh,HTTP_VERSION_NOT_SUPPORTED:wh,IM_A_TEAPOT:Sh,INSUFFICIENT_SPACE_ON_RESOURCE:Th,INSUFFICIENT_STORAGE:Oh,INTERNAL_SERVER_ERROR:xh,LENGTH_REQUIRED:Ah,LOCKED:Ch,METHOD_FAILURE:Rh,METHOD_NOT_ALLOWED:Ph,MOVED_PERMANENTLY:Ih,MOVED_TEMPORARILY:Nh,MULTIPLE_CHOICES:kh,MULTI_STATUS:Lh,NETWORK_AUTHENTICATION_REQUIRED:Bh,NON_AUTHORITATIVE_INFORMATION:Fh,NOT_ACCEPTABLE:Uh,NOT_FOUND:Dh,NOT_IMPLEMENTED:$h,NOT_MODIFIED:jh,NO_CONTENT:Mh,OK:Hh,PARTIAL_CONTENT:qh,PAYMENT_REQUIRED:Gh,PERMANENT_REDIRECT:Wh,PRECONDITION_FAILED:Vh,PRECONDITION_REQUIRED:zh,PROCESSING:Yh,PROXY_AUTHENTICATION_REQUIRED:Kh,REQUESTED_RANGE_NOT_SATISFIABLE:ep,REQUEST_HEADER_FIELDS_TOO_LARGE:Qh,REQUEST_TIMEOUT:Xh,REQUEST_TOO_LONG:Jh,REQUEST_URI_TOO_LONG:Zh,RESET_CONTENT:tp,get ReasonPhrases(){return eu},SEE_OTHER:rp,SERVICE_UNAVAILABLE:np,SWITCHING_PROTOCOLS:ip,get StatusCodes(){return Zs},TEMPORARY_REDIRECT:op,TOO_MANY_REQUESTS:ap,UNAUTHORIZED:sp,UNPROCESSABLE_ENTITY:up,UNSUPPORTED_MEDIA_TYPE:cp,USE_PROXY:lp,default:i_,getReasonPhrase:fp,getStatusCode:dp,getStatusText:hp},Symbol.toStringTag,{value:"Module"})),a_=Wi(o_);var Eo={exports:{}},_i={},gs={},bi={},wi={},Ur={},Si={},ys={},Dr={},Xt={},Zl;function Nu(){if(Zl)return Xt;Zl=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.ERROR_PACKET=Xt.PACKET_TYPES_REVERSE=Xt.PACKET_TYPES=void 0;const e=Object.create(null);Xt.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);Xt.PACKET_TYPES_REVERSE=t,Object.keys(e).forEach(r=>{t[e[r]]=r});const n={type:"error",data:"parser error"};return Xt.ERROR_PACKET=n,Xt}var ef;function s_(){if(ef)return Dr;ef=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.encodePacket=Dr.encodePacketToBinary=void 0;const e=Nu(),t=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",n=typeof ArrayBuffer=="function",r=f=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(f):f&&f.buffer instanceof ArrayBuffer,o=({type:f,data:u},h,d)=>t&&u instanceof Blob?h?d(u):i(u,d):n&&(u instanceof ArrayBuffer||r(u))?h?d(u):i(new Blob([u]),d):d(e.PACKET_TYPES[f]+(u||""));Dr.encodePacket=o;const i=(f,u)=>{const h=new FileReader;return h.onload=function(){const d=h.result.split(",")[1];u("b"+(d||""))},h.readAsDataURL(f)};function s(f){return f instanceof Uint8Array?f:f instanceof ArrayBuffer?new Uint8Array(f):new Uint8Array(f.buffer,f.byteOffset,f.byteLength)}let a;function l(f,u){if(t&&f.data instanceof Blob)return f.data.arrayBuffer().then(s).then(u);if(n&&(f.data instanceof ArrayBuffer||r(f.data)))return u(s(f.data));o(f,!1,h=>{a||(a=new TextEncoder),u(a.encode(h))})}return Dr.encodePacketToBinary=l,Dr}var Ti={},$r={},tf;function u_(){if(tf)return $r;tf=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.decode=$r.encode=void 0;const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let o=0;o<e.length;o++)t[e.charCodeAt(o)]=o;const n=o=>{let i=new Uint8Array(o),s,a=i.length,l="";for(s=0;s<a;s+=3)l+=e[i[s]>>2],l+=e[(i[s]&3)<<4|i[s+1]>>4],l+=e[(i[s+1]&15)<<2|i[s+2]>>6],l+=e[i[s+2]&63];return a%3===2?l=l.substring(0,l.length-1)+"=":a%3===1&&(l=l.substring(0,l.length-2)+"=="),l};$r.encode=n;const r=o=>{let i=o.length*.75,s=o.length,a,l=0,f,u,h,d;o[o.length-1]==="="&&(i--,o[o.length-2]==="="&&i--);const c=new ArrayBuffer(i),p=new Uint8Array(c);for(a=0;a<s;a+=4)f=t[o.charCodeAt(a)],u=t[o.charCodeAt(a+1)],h=t[o.charCodeAt(a+2)],d=t[o.charCodeAt(a+3)],p[l++]=f<<2|u>>4,p[l++]=(u&15)<<4|h>>2,p[l++]=(h&3)<<6|d&63;return c};return $r.decode=r,$r}var rf;function c_(){if(rf)return Ti;rf=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.decodePacket=void 0;const e=Nu(),t=u_(),n=typeof ArrayBuffer=="function",r=(s,a)=>{if(typeof s!="string")return{type:"message",data:i(s,a)};const l=s.charAt(0);return l==="b"?{type:"message",data:o(s.substring(1),a)}:e.PACKET_TYPES_REVERSE[l]?s.length>1?{type:e.PACKET_TYPES_REVERSE[l],data:s.substring(1)}:{type:e.PACKET_TYPES_REVERSE[l]}:e.ERROR_PACKET};Ti.decodePacket=r;const o=(s,a)=>{if(n){const l=(0,t.decode)(s);return i(l,a)}else return{base64:!0,data:s}},i=(s,a)=>{switch(a){case"blob":return s instanceof Blob?s:new Blob([s]);case"arraybuffer":default:return s instanceof ArrayBuffer?s:s.buffer}};return Ti}var nf;function zi(){return nf||(nf=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=s_();Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const n=c_();Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return n.decodePacket}});const r=Nu(),o=String.fromCharCode(30),i=(d,c)=>{const p=d.length,m=new Array(p);let _=0;d.forEach((T,E)=>{(0,t.encodePacket)(T,!1,b=>{m[E]=b,++_===p&&c(m.join(o))})})};e.encodePayload=i;const s=(d,c)=>{const p=d.split(o),m=[];for(let _=0;_<p.length;_++){const T=(0,n.decodePacket)(p[_],c);if(m.push(T),T.type==="error")break}return m};e.decodePayload=s;function a(){return new TransformStream({transform(d,c){(0,t.encodePacketToBinary)(d,p=>{const m=p.length;let _;if(m<126)_=new Uint8Array(1),new DataView(_.buffer).setUint8(0,m);else if(m<65536){_=new Uint8Array(3);const T=new DataView(_.buffer);T.setUint8(0,126),T.setUint16(1,m)}else{_=new Uint8Array(9);const T=new DataView(_.buffer);T.setUint8(0,127),T.setBigUint64(1,BigInt(m))}d.data&&typeof d.data!="string"&&(_[0]|=128),c.enqueue(_),c.enqueue(p)})}})}e.createPacketEncoderStream=a;let l;function f(d){return d.reduce((c,p)=>c+p.length,0)}function u(d,c){if(d[0].length===c)return d.shift();const p=new Uint8Array(c);let m=0;for(let _=0;_<c;_++)p[_]=d[0][m++],m===d[0].length&&(d.shift(),m=0);return d.length&&m<d[0].length&&(d[0]=d[0].slice(m)),p}function h(d,c){l||(l=new TextDecoder);const p=[];let m=0,_=-1,T=!1;return new TransformStream({transform(E,b){for(p.push(E);;){if(m===0){if(f(p)<1)break;const A=u(p,1);T=(A[0]&128)===128,_=A[0]&127,_<126?m=3:_===126?m=1:m=2}else if(m===1){if(f(p)<2)break;const A=u(p,2);_=new DataView(A.buffer,A.byteOffset,A.length).getUint16(0),m=3}else if(m===2){if(f(p)<8)break;const A=u(p,8),w=new DataView(A.buffer,A.byteOffset,A.length),N=w.getUint32(0);if(N>Math.pow(2,53-32)-1){b.enqueue(r.ERROR_PACKET);break}_=N*Math.pow(2,32)+w.getUint32(4),m=3}else{if(f(p)<_)break;const A=u(p,_);b.enqueue((0,n.decodePacket)(T?A:l.decode(A),c)),m=0}if(_===0||_>d){b.enqueue(r.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=h,e.protocol=4}(ys)),ys}function ot(e){if(e)return l_(e)}function l_(e){for(var t in ot.prototype)e[t]=ot.prototype[t];return e}ot.prototype.on=ot.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ot.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ot.prototype.off=ot.prototype.removeListener=ot.prototype.removeAllListeners=ot.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,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this};ot.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,o=n.length;r<o;++r)n[r].apply(this,t)}return this};ot.prototype.emitReserved=ot.prototype.emit;ot.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};ot.prototype.hasListeners=function(e){return!!this.listeners(e).length};const f_=Object.freeze(Object.defineProperty({__proto__:null,Emitter:ot},Symbol.toStringTag,{value:"Module"})),Ln=Wi(f_);var Jt={},Oi={},of;function Wo(){return of||(of=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.globalThisShim=void 0,Oi.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())()),Oi}var af;function Yi(){if(af)return Jt;af=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.byteLength=Jt.installTimerFunctions=Jt.pick=void 0;const e=Wo();function t(l,...f){return f.reduce((u,h)=>(l.hasOwnProperty(h)&&(u[h]=l[h]),u),{})}Jt.pick=t;const n=e.globalThisShim.setTimeout,r=e.globalThisShim.clearTimeout;function o(l,f){f.useNativeTimers?(l.setTimeoutFn=n.bind(e.globalThisShim),l.clearTimeoutFn=r.bind(e.globalThisShim)):(l.setTimeoutFn=e.globalThisShim.setTimeout.bind(e.globalThisShim),l.clearTimeoutFn=e.globalThisShim.clearTimeout.bind(e.globalThisShim))}Jt.installTimerFunctions=o;const i=1.33;function s(l){return typeof l=="string"?a(l):Math.ceil((l.byteLength||l.size)*i)}Jt.byteLength=s;function a(l){let f=0,u=0;for(let h=0,d=l.length;h<d;h++)f=l.charCodeAt(h),f<128?u+=1:f<2048?u+=2:f<55296||f>=57344?u+=3:(h++,u+=4);return u}return Jt}var _o={exports:{}},vs,sf;function d_(){if(sf)return vs;sf=1;var e=1e3,t=e*60,n=t*60,r=n*24,o=r*7,i=r*365.25;vs=function(u,h){h=h||{};var d=typeof u;if(d==="string"&&u.length>0)return s(u);if(d==="number"&&isFinite(u))return h.long?l(u):a(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function s(u){if(u=String(u),!(u.length>100)){var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(h){var d=parseFloat(h[1]),c=(h[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return d*i;case"weeks":case"week":case"w":return d*o;case"days":case"day":case"d":return d*r;case"hours":case"hour":case"hrs":case"hr":case"h":return d*n;case"minutes":case"minute":case"mins":case"min":case"m":return d*t;case"seconds":case"second":case"secs":case"sec":case"s":return d*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function a(u){var h=Math.abs(u);return h>=r?Math.round(u/r)+"d":h>=n?Math.round(u/n)+"h":h>=t?Math.round(u/t)+"m":h>=e?Math.round(u/e)+"s":u+"ms"}function l(u){var h=Math.abs(u);return h>=r?f(u,h,r,"day"):h>=n?f(u,h,n,"hour"):h>=t?f(u,h,t,"minute"):h>=e?f(u,h,e,"second"):u+" ms"}function f(u,h,d,c){var p=h>=d*1.5;return Math.round(u/d)+" "+c+(p?"s":"")}return vs}var Es,uf;function h_(){if(uf)return Es;uf=1;function e(t){r.debug=r,r.default=r,r.coerce=f,r.disable=s,r.enable=i,r.enabled=a,r.humanize=d_(),r.destroy=u,Object.keys(t).forEach(h=>{r[h]=t[h]}),r.names=[],r.skips=[],r.formatters={};function n(h){let d=0;for(let c=0;c<h.length;c++)d=(d<<5)-d+h.charCodeAt(c),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=n;function r(h){let d,c=null,p,m;function _(...T){if(!_.enabled)return;const E=_,b=Number(new Date),A=b-(d||b);E.diff=A,E.prev=d,E.curr=b,d=b,T[0]=r.coerce(T[0]),typeof T[0]!="string"&&T.unshift("%O");let w=0;T[0]=T[0].replace(/%([a-zA-Z%])/g,(F,M)=>{if(F==="%%")return"%";w++;const q=r.formatters[M];if(typeof q=="function"){const W=T[w];F=q.call(E,W),T.splice(w,1),w--}return F}),r.formatArgs.call(E,T),(E.log||r.log).apply(E,T)}return _.namespace=h,_.useColors=r.useColors(),_.color=r.selectColor(h),_.extend=o,_.destroy=r.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>c!==null?c:(p!==r.namespaces&&(p=r.namespaces,m=r.enabled(h)),m),set:T=>{c=T}}),typeof r.init=="function"&&r.init(_),_}function o(h,d){const c=r(this.namespace+(typeof d>"u"?":":d)+h);return c.log=this.log,c}function i(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];let d;const c=(typeof h=="string"?h:"").split(/[\s,]+/),p=c.length;for(d=0;d<p;d++)c[d]&&(h=c[d].replace(/\*/g,".*?"),h[0]==="-"?r.skips.push(new RegExp("^"+h.slice(1)+"$")):r.names.push(new RegExp("^"+h+"$")))}function s(){const h=[...r.names.map(l),...r.skips.map(l).map(d=>"-"+d)].join(",");return r.enable(""),h}function a(h){if(h[h.length-1]==="*")return!0;let d,c;for(d=0,c=r.skips.length;d<c;d++)if(r.skips[d].test(h))return!1;for(d=0,c=r.names.length;d<c;d++)if(r.names[d].test(h))return!0;return!1}function l(h){return h.toString().substring(2,h.toString().length-2).replace(/\.\*\?$/,"*")}function f(h){return h instanceof Error?h.stack||h.message:h}function u(){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 Es=e,Es}var cf;function qt(){return cf||(cf=1,function(e,t){t.formatArgs=r,t.save=o,t.load=i,t.useColors=n,t.storage=s(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!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(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const f="color: "+this.color;l.splice(1,0,f,"color: inherit");let u=0,h=0;l[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(u++,d==="%c"&&(h=u))}),l.splice(h,0,f)}t.log=console.debug||console.log||(()=>{});function o(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function i(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof process<"u"&&"env"in process&&(l=process.env.DEBUG),l}function s(){try{return localStorage}catch{}}e.exports=h_()(t);const{formatters:a}=e.exports;a.j=function(l){try{return JSON.stringify(l)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}(_o,_o.exports)),_o.exports}var jr={},lf;function pp(){if(lf)return jr;lf=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.decode=jr.encode=void 0;function e(n){let r="";for(let o in n)n.hasOwnProperty(o)&&(r.length&&(r+="&"),r+=encodeURIComponent(o)+"="+encodeURIComponent(n[o]));return r}jr.encode=e;function t(n){let r={},o=n.split("&");for(let i=0,s=o.length;i<s;i++){let a=o[i].split("=");r[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return r}return jr.decode=t,jr}var ff;function Vo(){if(ff)return Si;ff=1;var e=ae&&ae.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Si,"__esModule",{value:!0}),Si.Transport=void 0;const t=zi(),n=Ln,r=Yi(),o=e(qt()),i=pp(),s=(0,o.default)("engine.io-client:transport");class a extends Error{constructor(u,h,d){super(u),this.description=h,this.context=d,this.type="TransportError"}}class l extends n.Emitter{constructor(u){super(),this.writable=!1,(0,r.installTimerFunctions)(this,u),this.opts=u,this.query=u.query,this.socket=u.socket}onError(u,h,d){return super.emitReserved("error",new a(u,h,d)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(u){this.readyState==="open"?this.write(u):s("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(u){const h=(0,t.decodePacket)(u,this.socket.binaryType);this.onPacket(h)}onPacket(u){super.emitReserved("packet",u)}onClose(u){this.readyState="closed",super.emitReserved("close",u)}pause(u){}createUri(u,h={}){return u+"://"+this._hostname()+this._port()+this.opts.path+this._query(h)}_hostname(){const u=this.opts.hostname;return u.indexOf(":")===-1?u:"["+u+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(u){const h=(0,i.encode)(u);return h.length?"?"+h:""}}return Si.Transport=l,Si}var Zt={},df;function mp(){if(df)return Zt;df=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.yeast=Zt.decode=Zt.encode=void 0;const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),t=64,n={};let r=0,o=0,i;function s(f){let u="";do u=e[f%t]+u,f=Math.floor(f/t);while(f>0);return u}Zt.encode=s;function a(f){let u=0;for(o=0;o<f.length;o++)u=u*t+n[f.charAt(o)];return u}Zt.decode=a;function l(){const f=s(+new Date);return f!==i?(r=0,i=f):f+"."+s(r++)}for(Zt.yeast=l;o<t;o++)n[e[o]]=o;return Zt}var Hr={},xi={},hf;function p_(){if(hf)return xi;hf=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.hasCORS=void 0;let e=!1;try{e=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}return xi.hasCORS=e,xi}var pf;function m_(){if(pf)return Hr;pf=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.createCookieJar=Hr.XHR=void 0;const e=p_(),t=Wo();function n(o){const i=o.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||e.hasCORS))return new XMLHttpRequest}catch{}if(!i)try{return new t.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}Hr.XHR=n;function r(){}return Hr.createCookieJar=r,Hr}var mf;function g_(){if(mf)return Ur;mf=1;var e=ae&&ae.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.Request=Ur.Polling=void 0;const t=Vo(),n=e(qt()),r=mp(),o=zi(),i=m_(),s=Ln,a=Yi(),l=Wo(),f=(0,n.default)("engine.io-client:polling");function u(){}const h=function(){return new i.XHR({xdomain:!1}).responseType!=null}();class d extends t.Transport{constructor(_){if(super(_),this.polling=!1,typeof location<"u"){const E=location.protocol==="https:";let b=location.port;b||(b=E?"443":"80"),this.xd=typeof location<"u"&&_.hostname!==location.hostname||b!==_.port}const T=_&&_.forceBase64;this.supportsBinary=h&&!T,this.opts.withCredentials&&(this.cookieJar=(0,i.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(_){this.readyState="pausing";const T=()=>{f("paused"),this.readyState="paused",_()};if(this.polling||!this.writable){let E=0;this.polling&&(f("we are currently polling - waiting to pause"),E++,this.once("pollComplete",function(){f("pre-pause polling complete"),--E||T()})),this.writable||(f("we are currently writing - waiting to pause"),E++,this.once("drain",function(){f("pre-pause writing complete"),--E||T()}))}else T()}poll(){f("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(_){f("polling got data %s",_);const T=E=>{if(this.readyState==="opening"&&E.type==="open"&&this.onOpen(),E.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(E)};(0,o.decodePayload)(_,this.socket.binaryType).forEach(T),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():f('ignoring poll - transport state "%s"',this.readyState))}doClose(){const _=()=>{f("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(f("transport open - closing"),_()):(f("transport not open - deferring close"),this.once("open",_))}write(_){this.writable=!1,(0,o.encodePayload)(_,T=>{this.doWrite(T,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const _=this.opts.secure?"https":"http",T=this.query||{};return this.opts.timestampRequests!==!1&&(T[this.opts.timestampParam]=(0,r.yeast)()),!this.supportsBinary&&!T.sid&&(T.b64=1),this.createUri(_,T)}request(_={}){return Object.assign(_,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new c(this.uri(),_)}doWrite(_,T){const E=this.request({method:"POST",data:_});E.on("success",T),E.on("error",(b,A)=>{this.onError("xhr post error",b,A)})}doPoll(){f("xhr poll");const _=this.request();_.on("data",this.onData.bind(this)),_.on("error",(T,E)=>{this.onError("xhr poll error",T,E)}),this.pollXhr=_}}Ur.Polling=d;class c extends s.Emitter{constructor(_,T){super(),(0,a.installTimerFunctions)(this,T),this.opts=T,this.method=T.method||"GET",this.uri=_,this.data=T.data!==void 0?T.data:null,this.create()}create(){var _;const T=(0,a.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");T.xdomain=!!this.opts.xd;const E=this.xhr=new i.XHR(T);try{f("xhr open %s: %s",this.method,this.uri),E.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){E.setDisableHeaderCheck&&E.setDisableHeaderCheck(!0);for(let b in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(b)&&E.setRequestHeader(b,this.opts.extraHeaders[b])}}catch{}if(this.method==="POST")try{E.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{E.setRequestHeader("Accept","*/*")}catch{}(_=this.opts.cookieJar)===null||_===void 0||_.addCookies(E),"withCredentials"in E&&(E.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(E.timeout=this.opts.requestTimeout),E.onreadystatechange=()=>{var b;E.readyState===3&&((b=this.opts.cookieJar)===null||b===void 0||b.parseCookies(E)),E.readyState===4&&(E.status===200||E.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof E.status=="number"?E.status:0)},0))},f("xhr data %s",this.data),E.send(this.data)}catch(b){this.setTimeoutFn(()=>{this.onError(b)},0);return}typeof document<"u"&&(this.index=c.requestsCount++,c.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=u,_)try{this.xhr.abort()}catch{}typeof document<"u"&&delete c.requests[this.index],this.xhr=null}}onLoad(){const _=this.xhr.responseText;_!==null&&(this.emitReserved("data",_),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(Ur.Request=c,c.requestsCount=0,c.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",p);else if(typeof addEventListener=="function"){const m="onpagehide"in l.globalThisShim?"pagehide":"unload";addEventListener(m,p,!1)}}function p(){for(let m in c.requests)c.requests.hasOwnProperty(m)&&c.requests[m].abort()}return Ur}var Ai={},Ct={},gf;function zo(){if(gf)return Ct;gf=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.defaultBinaryType=Ct.usingBrowserWebSocket=Ct.WebSocket=Ct.nextTick=void 0;const e=Wo();return Ct.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?n=>Promise.resolve().then(n):(n,r)=>r(n,0))(),Ct.WebSocket=e.globalThisShim.WebSocket||e.globalThisShim.MozWebSocket,Ct.usingBrowserWebSocket=!0,Ct.defaultBinaryType="arraybuffer",Ct}var yf;function y_(){if(yf)return Ai;yf=1;var e=ae&&ae.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.WS=void 0;const t=Vo(),n=mp(),r=Yi(),o=zo(),i=e(qt()),s=zi(),a=(0,i.default)("engine.io-client:websocket"),l=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class f extends t.Transport{constructor(h){super(h),this.supportsBinary=!h.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const h=this.uri(),d=this.opts.protocols,c=l?{}:(0,r.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(c.headers=this.opts.extraHeaders);try{this.ws=o.usingBrowserWebSocket&&!l?d?new o.WebSocket(h,d):new o.WebSocket(h):new o.WebSocket(h,d,c)}catch(p){return this.emitReserved("error",p)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=h=>this.onClose({description:"websocket connection closed",context:h}),this.ws.onmessage=h=>this.onData(h.data),this.ws.onerror=h=>this.onError("websocket error",h)}write(h){this.writable=!1;for(let d=0;d<h.length;d++){const c=h[d],p=d===h.length-1;(0,s.encodePacket)(c,this.supportsBinary,m=>{const _={};o.usingBrowserWebSocket||(c.options&&(_.compress=c.options.compress),this.opts.perMessageDeflate&&(typeof m=="string"?Buffer.byteLength(m):m.length)<this.opts.perMessageDeflate.threshold&&(_.compress=!1));try{o.usingBrowserWebSocket?this.ws.send(m):this.ws.send(m,_)}catch{a("websocket closed before onclose event")}p&&(0,o.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const h=this.opts.secure?"wss":"ws",d=this.query||{};return this.opts.timestampRequests&&(d[this.opts.timestampParam]=(0,n.yeast)()),this.supportsBinary||(d.b64=1),this.createUri(h,d)}check(){return!!o.WebSocket}}return Ai.WS=f,Ai}var Ci={},vf;function v_(){if(vf)return Ci;vf=1;var e=ae&&ae.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.WT=void 0;const t=Vo(),n=zo(),r=zi(),i=(0,e(qt()).default)("engine.io-client:webtransport");class s extends t.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{i("transport closed gracefully"),this.onClose()}).catch(l=>{i("transport closed due to %s",l),this.onError("webtransport error",l)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(l=>{const f=(0,r.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),u=l.readable.pipeThrough(f).getReader(),h=(0,r.createPacketEncoderStream)();h.readable.pipeTo(l.writable),this.writer=h.writable.getWriter();const d=()=>{u.read().then(({done:p,value:m})=>{if(p){i("session is closed");return}i("received chunk: %o",m),this.onPacket(m),d()}).catch(p=>{i("an error occurred while reading: %s",p)})};d();const c={type:"open"};this.query.sid&&(c.data=`{"sid":"${this.query.sid}"}`),this.writer.write(c).then(()=>this.onOpen())})}))}write(l){this.writable=!1;for(let f=0;f<l.length;f++){const u=l[f],h=f===l.length-1;this.writer.write(u).then(()=>{h&&(0,n.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var l;(l=this.transport)===null||l===void 0||l.close()}}return Ci.WT=s,Ci}var Ef;function gp(){if(Ef)return wi;Ef=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.transports=void 0;const e=g_(),t=y_(),n=v_();return wi.transports={websocket:t.WS,webtransport:n.WT,polling:e.Polling},wi}var Ri={},_f;function yp(){if(_f)return Ri;_f=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.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(i){const s=i,a=i.indexOf("["),l=i.indexOf("]");a!=-1&&l!=-1&&(i=i.substring(0,a)+i.substring(a,l).replace(/:/g,";")+i.substring(l,i.length));let f=e.exec(i||""),u={},h=14;for(;h--;)u[t[h]]=f[h]||"";return a!=-1&&l!=-1&&(u.source=s,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=r(u,u.path),u.queryKey=o(u,u.query),u}Ri.parse=n;function r(i,s){const a=/\/{2,9}/g,l=s.replace(a,"/").split("/");return(s.slice(0,1)=="/"||s.length===0)&&l.splice(0,1),s.slice(-1)=="/"&&l.splice(l.length-1,1),l}function o(i,s){const a={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(l,f,u){f&&(a[f]=u)}),a}return Ri}var bf;function E_(){if(bf)return bi;bf=1;var e=ae&&ae.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(bi,"__esModule",{value:!0}),bi.Socket=void 0;const t=gp(),n=Yi(),r=pp(),o=yp(),i=e(qt()),s=Ln,a=zi(),l=zo(),f=(0,i.default)("engine.io-client:socket");class u extends s.Emitter{constructor(d,c={}){super(),this.binaryType=l.defaultBinaryType,this.writeBuffer=[],d&&typeof d=="object"&&(c=d,d=null),d?(d=(0,o.parse)(d),c.hostname=d.host,c.secure=d.protocol==="https"||d.protocol==="wss",c.port=d.port,d.query&&(c.query=d.query)):c.host&&(c.hostname=(0,o.parse)(c.host).host),(0,n.installTimerFunctions)(this,c),this.secure=c.secure!=null?c.secure:typeof location<"u"&&location.protocol==="https:",c.hostname&&!c.port&&(c.port=this.secure?"443":"80"),this.hostname=c.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=c.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=c.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},c),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(d){f('creating transport "%s"',d);const c=Object.assign({},this.opts.query);c.EIO=a.protocol,c.transport=d,this.id&&(c.sid=this.id);const p=Object.assign({},this.opts,{query:c,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[d]);return f("options: %j",p),new t.transports[d](p)}open(){let d;if(this.opts.rememberUpgrade&&u.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)d="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else d=this.transports[0];this.readyState="opening";try{d=this.createTransport(d)}catch(c){f("error while creating transport: %s",c),this.transports.shift(),this.open();return}d.open(),this.setTransport(d)}setTransport(d){f("setting transport %s",d.name),this.transport&&(f("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=d,d.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",c=>this.onClose("transport close",c))}probe(d){f('probing transport "%s"',d);let c=this.createTransport(d),p=!1;u.priorWebsocketSuccess=!1;const m=()=>{p||(f('probe transport "%s" opened',d),c.send([{type:"ping",data:"probe"}]),c.once("packet",N=>{if(!p)if(N.type==="pong"&&N.data==="probe"){if(f('probe transport "%s" pong',d),this.upgrading=!0,this.emitReserved("upgrading",c),!c)return;u.priorWebsocketSuccess=c.name==="websocket",f('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{p||this.readyState!=="closed"&&(f("changing transport and sending upgrade packet"),w(),this.setTransport(c),c.send([{type:"upgrade"}]),this.emitReserved("upgrade",c),c=null,this.upgrading=!1,this.flush())})}else{f('probe transport "%s" failed',d);const F=new Error("probe error");F.transport=c.name,this.emitReserved("upgradeError",F)}}))};function _(){p||(p=!0,w(),c.close(),c=null)}const T=N=>{const F=new Error("probe error: "+N);F.transport=c.name,_(),f('probe transport "%s" failed because of error: %s',d,N),this.emitReserved("upgradeError",F)};function E(){T("transport closed")}function b(){T("socket closed")}function A(N){c&&N.name!==c.name&&(f('"%s" works - aborting "%s"',N.name,c.name),_())}const w=()=>{c.removeListener("open",m),c.removeListener("error",T),c.removeListener("close",E),this.off("close",b),this.off("upgrading",A)};c.once("open",m),c.once("error",T),c.once("close",E),this.once("close",b),this.once("upgrading",A),this.upgrades.indexOf("webtransport")!==-1&&d!=="webtransport"?this.setTimeoutFn(()=>{p||c.open()},200):c.open()}onOpen(){if(f("socket open"),this.readyState="open",u.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){f("starting upgrade probes");let d=0;const c=this.upgrades.length;for(;d<c;d++)this.probe(this.upgrades[d])}}onPacket(d){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(f('socket receive: type "%s", data "%s"',d.type,d.data),this.emitReserved("packet",d),this.emitReserved("heartbeat"),this.resetPingTimeout(),d.type){case"open":this.onHandshake(JSON.parse(d.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const c=new Error("server error");c.code=d.data,this.onError(c);break;case"message":this.emitReserved("data",d.data),this.emitReserved("message",d.data);break}else f('packet received with socket readyState "%s"',this.readyState)}onHandshake(d){this.emitReserved("handshake",d),this.id=d.sid,this.transport.query.sid=d.sid,this.upgrades=this.filterUpgrades(d.upgrades),this.pingInterval=d.pingInterval,this.pingTimeout=d.pingTimeout,this.maxPayload=d.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const d=this.getWritablePackets();f("flushing %d packets in socket",d.length),this.transport.send(d),this.prevBufferLen=d.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let c=1;for(let p=0;p<this.writeBuffer.length;p++){const m=this.writeBuffer[p].data;if(m&&(c+=(0,n.byteLength)(m)),p>0&&c>this.maxPayload)return f("only send %d out of %d packets",p,this.writeBuffer.length),this.writeBuffer.slice(0,p);c+=2}return f("payload size is %d (max: %d)",c,this.maxPayload),this.writeBuffer}write(d,c,p){return this.sendPacket("message",d,c,p),this}send(d,c,p){return this.sendPacket("message",d,c,p),this}sendPacket(d,c,p,m){if(typeof c=="function"&&(m=c,c=void 0),typeof p=="function"&&(m=p,p=null),this.readyState==="closing"||this.readyState==="closed")return;p=p||{},p.compress=p.compress!==!1;const _={type:d,data:c,options:p};this.emitReserved("packetCreate",_),this.writeBuffer.push(_),m&&this.once("flush",m),this.flush()}close(){const d=()=>{this.onClose("forced close"),f("socket closing - telling transport to close"),this.transport.close()},c=()=>{this.off("upgrade",c),this.off("upgradeError",c),d()},p=()=>{this.once("upgrade",c),this.once("upgradeError",c)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?p():d()}):this.upgrading?p():d()),this}onError(d){f("socket error %j",d),u.priorWebsocketSuccess=!1,this.emitReserved("error",d),this.onClose("transport error",d)}onClose(d,c){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(f('socket close with reason: "%s"',d),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",d,c),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(d){const c=[];let p=0;const m=d.length;for(;p<m;p++)~this.transports.indexOf(d[p])&&c.push(d[p]);return c}}return bi.Socket=u,u.protocol=a.protocol,bi}var wf;function vp(){return wf||(wf=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=E_();Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var n=Vo();Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var r=gp();Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return r.transports}});var o=Yi();Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var i=yp();Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.parse}});var s=zo();Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return s.nextTick}})}(gs)),gs}var Sf;function __(){if(Sf)return _i;Sf=1;var e=ae&&ae.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(_i,"__esModule",{value:!0}),_i.url=void 0;const t=vp(),r=e(qt()).default("socket.io-client:url");function o(i,s="",a){let l=i;a=a||typeof location<"u"&&location,i==null&&(i=a.protocol+"//"+a.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=a.protocol+i:i=a.host+i),/^(https?|wss?):\/\//.test(i)||(r("protocol-less url %s",i),typeof a<"u"?i=a.protocol+"//"+i:i="https://"+i),r("parse %s",i),l=t.parse(i)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";const u=l.host.indexOf(":")!==-1?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+u+":"+l.port+s,l.href=l.protocol+"://"+u+(a&&a.port===l.port?"":":"+l.port),l}return _i.url=o,_i}var Pi={},Ii={},_s={},qr={},Gr={},Tf;function Ep(){if(Tf)return Gr;Tf=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.hasBinary=Gr.isBinary=void 0;const e=typeof ArrayBuffer=="function",t=a=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(a):a.buffer instanceof ArrayBuffer,n=Object.prototype.toString,r=typeof Blob=="function"||typeof Blob<"u"&&n.call(Blob)==="[object BlobConstructor]",o=typeof File=="function"||typeof File<"u"&&n.call(File)==="[object FileConstructor]";function i(a){return e&&(a instanceof ArrayBuffer||t(a))||r&&a instanceof Blob||o&&a instanceof File}Gr.isBinary=i;function s(a,l){if(!a||typeof a!="object")return!1;if(Array.isArray(a)){for(let f=0,u=a.length;f<u;f++)if(s(a[f]))return!0;return!1}if(i(a))return!0;if(a.toJSON&&typeof a.toJSON=="function"&&arguments.length===1)return s(a.toJSON(),!0);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)&&s(a[f]))return!0;return!1}return Gr.hasBinary=s,Gr}var Of;function b_(){if(Of)return qr;Of=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.reconstructPacket=qr.deconstructPacket=void 0;const e=Ep();function t(i){const s=[],a=i.data,l=i;return l.data=n(a,s),l.attachments=s.length,{packet:l,buffers:s}}qr.deconstructPacket=t;function n(i,s){if(!i)return i;if((0,e.isBinary)(i)){const a={_placeholder:!0,num:s.length};return s.push(i),a}else if(Array.isArray(i)){const a=new Array(i.length);for(let l=0;l<i.length;l++)a[l]=n(i[l],s);return a}else if(typeof i=="object"&&!(i instanceof Date)){const a={};for(const l in i)Object.prototype.hasOwnProperty.call(i,l)&&(a[l]=n(i[l],s));return a}return i}function r(i,s){return i.data=o(i.data,s),delete i.attachments,i}qr.reconstructPacket=r;function o(i,s){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<s.length)return s[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let a=0;a<i.length;a++)i[a]=o(i[a],s);else if(typeof i=="object")for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&(i[a]=o(i[a],s));return i}return qr}var xf;function Lu(){return xf||(xf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=Ln,n=b_(),r=Ep(),i=(0,qt().default)("socket.io-parser"),s=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var a;(function(d){d[d.CONNECT=0]="CONNECT",d[d.DISCONNECT=1]="DISCONNECT",d[d.EVENT=2]="EVENT",d[d.ACK=3]="ACK",d[d.CONNECT_ERROR=4]="CONNECT_ERROR",d[d.BINARY_EVENT=5]="BINARY_EVENT",d[d.BINARY_ACK=6]="BINARY_ACK"})(a=e.PacketType||(e.PacketType={}));class l{constructor(c){this.replacer=c}encode(c){return i("encoding packet %j",c),(c.type===a.EVENT||c.type===a.ACK)&&(0,r.hasBinary)(c)?this.encodeAsBinary({type:c.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,nsp:c.nsp,data:c.data,id:c.id}):[this.encodeAsString(c)]}encodeAsString(c){let p=""+c.type;return(c.type===a.BINARY_EVENT||c.type===a.BINARY_ACK)&&(p+=c.attachments+"-"),c.nsp&&c.nsp!=="/"&&(p+=c.nsp+","),c.id!=null&&(p+=c.id),c.data!=null&&(p+=JSON.stringify(c.data,this.replacer)),i("encoded %j as %s",c,p),p}encodeAsBinary(c){const p=(0,n.deconstructPacket)(c),m=this.encodeAsString(p.packet),_=p.buffers;return _.unshift(m),_}}e.Encoder=l;function f(d){return Object.prototype.toString.call(d)==="[object Object]"}class u extends t.Emitter{constructor(c){super(),this.reviver=c}add(c){let p;if(typeof c=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");p=this.decodeString(c);const m=p.type===a.BINARY_EVENT;m||p.type===a.BINARY_ACK?(p.type=m?a.EVENT:a.ACK,this.reconstructor=new h(p),p.attachments===0&&super.emitReserved("decoded",p)):super.emitReserved("decoded",p)}else if((0,r.isBinary)(c)||c.base64)if(this.reconstructor)p=this.reconstructor.takeBinaryData(c),p&&(this.reconstructor=null,super.emitReserved("decoded",p));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+c)}decodeString(c){let p=0;const m={type:Number(c.charAt(0))};if(a[m.type]===void 0)throw new Error("unknown packet type "+m.type);if(m.type===a.BINARY_EVENT||m.type===a.BINARY_ACK){const T=p+1;for(;c.charAt(++p)!=="-"&&p!=c.length;);const E=c.substring(T,p);if(E!=Number(E)||c.charAt(p)!=="-")throw new Error("Illegal attachments");m.attachments=Number(E)}if(c.charAt(p+1)==="/"){const T=p+1;for(;++p&&!(c.charAt(p)===","||p===c.length););m.nsp=c.substring(T,p)}else m.nsp="/";const _=c.charAt(p+1);if(_!==""&&Number(_)==_){const T=p+1;for(;++p;){const E=c.charAt(p);if(E==null||Number(E)!=E){--p;break}if(p===c.length)break}m.id=Number(c.substring(T,p+1))}if(c.charAt(++p)){const T=this.tryParse(c.substr(p));if(u.isPayloadValid(m.type,T))m.data=T;else throw new Error("invalid payload")}return i("decoded %s as %j",c,m),m}tryParse(c){try{return JSON.parse(c,this.reviver)}catch{return!1}}static isPayloadValid(c,p){switch(c){case a.CONNECT:return f(p);case a.DISCONNECT:return p===void 0;case a.CONNECT_ERROR:return typeof p=="string"||f(p);case a.EVENT:case a.BINARY_EVENT:return Array.isArray(p)&&(typeof p[0]=="number"||typeof p[0]=="string"&&s.indexOf(p[0])===-1);case a.ACK:case a.BINARY_ACK:return Array.isArray(p)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=u;class h{constructor(c){this.packet=c,this.buffers=[],this.reconPack=c}takeBinaryData(c){if(this.buffers.push(c),this.buffers.length===this.reconPack.attachments){const p=(0,n.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),p}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}}(_s)),_s}var Ni={},Af;function _p(){if(Af)return Ni;Af=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.on=void 0;function e(t,n,r){return t.on(n,r),function(){t.off(n,r)}}return Ni.on=e,Ni}var Cf;function bp(){if(Cf)return Ii;Cf=1;var e=ae&&ae.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.Socket=void 0;const t=Lu(),n=_p(),r=Ln,i=e(qt()).default("socket.io-client:socket"),s=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class a extends r.Emitter{constructor(f,u,h){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=f,this.nsp=u,h&&h.auth&&(this.auth=h.auth),this._opts=Object.assign({},h),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const f=this.io;this.subs=[n.on(f,"open",this.onopen.bind(this)),n.on(f,"packet",this.onpacket.bind(this)),n.on(f,"error",this.onerror.bind(this)),n.on(f,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...f){return f.unshift("message"),this.emit.apply(this,f),this}emit(f,...u){if(s.hasOwnProperty(f))throw new Error('"'+f.toString()+'" is a reserved event name');if(u.unshift(f),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(u),this;const h={type:t.PacketType.EVENT,data:u};if(h.options={},h.options.compress=this.flags.compress!==!1,typeof u[u.length-1]=="function"){const p=this.ids++;i("emitting packet with ack id %d",p);const m=u.pop();this._registerAckCallback(p,m),h.id=p}const d=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!d||!this.connected)?i("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(h),this.packet(h)):this.sendBuffer.push(h),this.flags={},this}_registerAckCallback(f,u){var h;const d=(h=this.flags.timeout)!==null&&h!==void 0?h:this._opts.ackTimeout;if(d===void 0){this.acks[f]=u;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[f];for(let p=0;p<this.sendBuffer.length;p++)this.sendBuffer[p].id===f&&(i("removing packet with ack id %d from the buffer",f),this.sendBuffer.splice(p,1));i("event with ack id %d has timed out after %d ms",f,d),u.call(this,new Error("operation has timed out"))},d);this.acks[f]=(...p)=>{this.io.clearTimeoutFn(c),u.apply(this,[null,...p])}}emitWithAck(f,...u){const h=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((d,c)=>{u.push((p,m)=>h?p?c(p):d(m):d(p)),this.emit(f,...u)})}_addToQueue(f){let u;typeof f[f.length-1]=="function"&&(u=f.pop());const h={id:this._queueSeq++,tryCount:0,pending:!1,args:f,flags:Object.assign({fromQueue:!0},this.flags)};f.push((d,...c)=>h!==this._queue[0]?void 0:(d!==null?h.tryCount>this._opts.retries&&(i("packet [%d] is discarded after %d tries",h.id,h.tryCount),this._queue.shift(),u&&u(d)):(i("packet [%d] was successfully sent",h.id),this._queue.shift(),u&&u(null,...c)),h.pending=!1,this._drainQueue())),this._queue.push(h),this._drainQueue()}_drainQueue(f=!1){if(i("draining queue"),!this.connected||this._queue.length===0)return;const u=this._queue[0];if(u.pending&&!f){i("packet [%d] has already been sent and is waiting for an ack",u.id);return}u.pending=!0,u.tryCount++,i("sending packet [%d] (try n°%d)",u.id,u.tryCount),this.flags=u.flags,this.emit.apply(this,u.args)}packet(f){f.nsp=this.nsp,this.io._packet(f)}onopen(){i("transport is open - connecting"),typeof this.auth=="function"?this.auth(f=>{this._sendConnectPacket(f)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(f){this.packet({type:t.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},f):f})}onerror(f){this.connected||this.emitReserved("connect_error",f)}onclose(f,u){i("close (%s)",f),this.connected=!1,delete this.id,this.emitReserved("disconnect",f,u)}onpacket(f){if(f.nsp===this.nsp)switch(f.type){case t.PacketType.CONNECT:f.data&&f.data.sid?this.onconnect(f.data.sid,f.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case t.PacketType.EVENT:case t.PacketType.BINARY_EVENT:this.onevent(f);break;case t.PacketType.ACK:case t.PacketType.BINARY_ACK:this.onack(f);break;case t.PacketType.DISCONNECT:this.ondisconnect();break;case t.PacketType.CONNECT_ERROR:this.destroy();const h=new Error(f.data.message);h.data=f.data.data,this.emitReserved("connect_error",h);break}}onevent(f){const u=f.data||[];i("emitting event %j",u),f.id!=null&&(i("attaching ack callback to event"),u.push(this.ack(f.id))),this.connected?this.emitEvent(u):this.receiveBuffer.push(Object.freeze(u))}emitEvent(f){if(this._anyListeners&&this._anyListeners.length){const u=this._anyListeners.slice();for(const h of u)h.apply(this,f)}super.emit.apply(this,f),this._pid&&f.length&&typeof f[f.length-1]=="string"&&(this._lastOffset=f[f.length-1])}ack(f){const u=this;let h=!1;return function(...d){h||(h=!0,i("sending ack %j",d),u.packet({type:t.PacketType.ACK,id:f,data:d}))}}onack(f){const u=this.acks[f.id];typeof u=="function"?(i("calling ack %s with %j",f.id,f.data),u.apply(this,f.data),delete this.acks[f.id]):i("bad ack %s",f.id)}onconnect(f,u){i("socket connected with id %s",f),this.id=f,this.recovered=u&&this._pid===u,this._pid=u,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(f=>this.emitEvent(f)),this.receiveBuffer=[],this.sendBuffer.forEach(f=>{this.notifyOutgoingListeners(f),this.packet(f)}),this.sendBuffer=[]}ondisconnect(){i("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(f=>f()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(i("performing disconnect (%s)",this.nsp),this.packet({type:t.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(f){return this.flags.compress=f,this}get volatile(){return this.flags.volatile=!0,this}timeout(f){return this.flags.timeout=f,this}onAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(f),this}prependAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(f),this}offAny(f){if(!this._anyListeners)return this;if(f){const u=this._anyListeners;for(let h=0;h<u.length;h++)if(f===u[h])return u.splice(h,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(f),this}prependAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(f),this}offAnyOutgoing(f){if(!this._anyOutgoingListeners)return this;if(f){const u=this._anyOutgoingListeners;for(let h=0;h<u.length;h++)if(f===u[h])return u.splice(h,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(f){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const u=this._anyOutgoingListeners.slice();for(const h of u)h.apply(this,f.data)}}}return Ii.Socket=a,Ii}var Li={},Rf;function w_(){if(Rf)return Li;Rf=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.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 Li.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},Li}var Pf;function S_(){if(Pf)return Pi;Pf=1;var e=ae&&ae.__createBinding||(Object.create?function(c,p,m,_){_===void 0&&(_=m),Object.defineProperty(c,_,{enumerable:!0,get:function(){return p[m]}})}:function(c,p,m,_){_===void 0&&(_=m),c[_]=p[m]}),t=ae&&ae.__setModuleDefault||(Object.create?function(c,p){Object.defineProperty(c,"default",{enumerable:!0,value:p})}:function(c,p){c.default=p}),n=ae&&ae.__importStar||function(c){if(c&&c.__esModule)return c;var p={};if(c!=null)for(var m in c)m!=="default"&&Object.prototype.hasOwnProperty.call(c,m)&&e(p,c,m);return t(p,c),p},r=ae&&ae.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.Manager=void 0;const o=vp(),i=bp(),s=n(Lu()),a=_p(),l=w_(),f=Ln,h=r(qt()).default("socket.io-client:manager");class d extends f.Emitter{constructor(p,m){var _;super(),this.nsps={},this.subs=[],p&&typeof p=="object"&&(m=p,p=void 0),m=m||{},m.path=m.path||"/socket.io",this.opts=m,o.installTimerFunctions(this,m),this.reconnection(m.reconnection!==!1),this.reconnectionAttempts(m.reconnectionAttempts||1/0),this.reconnectionDelay(m.reconnectionDelay||1e3),this.reconnectionDelayMax(m.reconnectionDelayMax||5e3),this.randomizationFactor((_=m.randomizationFactor)!==null&&_!==void 0?_:.5),this.backoff=new l.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(m.timeout==null?2e4:m.timeout),this._readyState="closed",this.uri=p;const T=m.parser||s;this.encoder=new T.Encoder,this.decoder=new T.Decoder,this._autoConnect=m.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(p){return arguments.length?(this._reconnection=!!p,this):this._reconnection}reconnectionAttempts(p){return p===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=p,this)}reconnectionDelay(p){var m;return p===void 0?this._reconnectionDelay:(this._reconnectionDelay=p,(m=this.backoff)===null||m===void 0||m.setMin(p),this)}randomizationFactor(p){var m;return p===void 0?this._randomizationFactor:(this._randomizationFactor=p,(m=this.backoff)===null||m===void 0||m.setJitter(p),this)}reconnectionDelayMax(p){var m;return p===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=p,(m=this.backoff)===null||m===void 0||m.setMax(p),this)}timeout(p){return arguments.length?(this._timeout=p,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(p){if(h("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;h("opening %s",this.uri),this.engine=new o.Socket(this.uri,this.opts);const m=this.engine,_=this;this._readyState="opening",this.skipReconnect=!1;const T=a.on(m,"open",function(){_.onopen(),p&&p()}),E=A=>{h("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",A),p?p(A):this.maybeReconnectOnOpen()},b=a.on(m,"error",E);if(this._timeout!==!1){const A=this._timeout;h("connect attempt will timeout after %d",A);const w=this.setTimeoutFn(()=>{h("connect attempt timed out after %d",A),T(),E(new Error("timeout")),m.close()},A);this.opts.autoUnref&&w.unref(),this.subs.push(()=>{this.clearTimeoutFn(w)})}return this.subs.push(T),this.subs.push(b),this}connect(p){return this.open(p)}onopen(){h("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const p=this.engine;this.subs.push(a.on(p,"ping",this.onping.bind(this)),a.on(p,"data",this.ondata.bind(this)),a.on(p,"error",this.onerror.bind(this)),a.on(p,"close",this.onclose.bind(this)),a.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(p){try{this.decoder.add(p)}catch(m){this.onclose("parse error",m)}}ondecoded(p){o.nextTick(()=>{this.emitReserved("packet",p)},this.setTimeoutFn)}onerror(p){h("error",p),this.emitReserved("error",p)}socket(p,m){let _=this.nsps[p];return _?this._autoConnect&&!_.active&&_.connect():(_=new i.Socket(this,p,m),this.nsps[p]=_),_}_destroy(p){const m=Object.keys(this.nsps);for(const _ of m)if(this.nsps[_].active){h("socket %s is still active, skipping close",_);return}this._close()}_packet(p){h("writing packet %j",p);const m=this.encoder.encode(p);for(let _=0;_<m.length;_++)this.engine.write(m[_],p.options)}cleanup(){h("cleanup"),this.subs.forEach(p=>p()),this.subs.length=0,this.decoder.destroy()}_close(){h("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(p,m){h("closed due to %s",p),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",p,m),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const p=this;if(this.backoff.attempts>=this._reconnectionAttempts)h("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const m=this.backoff.duration();h("will wait %dms before reconnect attempt",m),this._reconnecting=!0;const _=this.setTimeoutFn(()=>{p.skipReconnect||(h("attempting reconnect"),this.emitReserved("reconnect_attempt",p.backoff.attempts),!p.skipReconnect&&p.open(T=>{T?(h("reconnect attempt error"),p._reconnecting=!1,p.reconnect(),this.emitReserved("reconnect_error",T)):(h("reconnect success"),p.onreconnect())}))},m);this.opts.autoUnref&&_.unref(),this.subs.push(()=>{this.clearTimeoutFn(_)})}}onreconnect(){const p=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",p)}}return Pi.Manager=d,Pi}var If;function T_(){return If||(If=1,function(e,t){var n=ae&&ae.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const r=__(),o=S_();Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=bp();Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const a=n(qt()).default("socket.io-client"),l={};function f(h,d){typeof h=="object"&&(d=h,h=void 0),d=d||{};const c=r.url(h,d.path||"/socket.io"),p=c.source,m=c.id,_=c.path,T=l[m]&&_ in l[m].nsps,E=d.forceNew||d["force new connection"]||d.multiplex===!1||T;let b;return E?(a("ignoring socket cache for %s",p),b=new o.Manager(p,d)):(l[m]||(a("new io instance for %s",p),l[m]=new o.Manager(p,d)),b=l[m]),c.query&&!d.query&&(d.query=c.queryKey),b.socket(c.path,d)}t.io=f,t.connect=f,t.default=f,Object.assign(f,{Manager:o.Manager,Socket:i.Socket,io:f,connect:f});var u=Lu();Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return u.protocol}}),e.exports=f}(Eo,Eo.exports)),Eo.exports}var bs={},ki={},Nf;function O_(){if(Nf)return ki;Nf=1,ki.byteLength=a,ki.toByteArray=f,ki.fromByteArray=d;for(var e=[],t=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=r.length;o<i;++o)e[o]=r[o],t[r.charCodeAt(o)]=o;t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;function s(c){var p=c.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var m=c.indexOf("=");m===-1&&(m=p);var _=m===p?0:4-m%4;return[m,_]}function a(c){var p=s(c),m=p[0],_=p[1];return(m+_)*3/4-_}function l(c,p,m){return(p+m)*3/4-m}function f(c){var p,m=s(c),_=m[0],T=m[1],E=new n(l(c,_,T)),b=0,A=T>0?_-4:_,w;for(w=0;w<A;w+=4)p=t[c.charCodeAt(w)]<<18|t[c.charCodeAt(w+1)]<<12|t[c.charCodeAt(w+2)]<<6|t[c.charCodeAt(w+3)],E[b++]=p>>16&255,E[b++]=p>>8&255,E[b++]=p&255;return T===2&&(p=t[c.charCodeAt(w)]<<2|t[c.charCodeAt(w+1)]>>4,E[b++]=p&255),T===1&&(p=t[c.charCodeAt(w)]<<10|t[c.charCodeAt(w+1)]<<4|t[c.charCodeAt(w+2)]>>2,E[b++]=p>>8&255,E[b++]=p&255),E}function u(c){return e[c>>18&63]+e[c>>12&63]+e[c>>6&63]+e[c&63]}function h(c,p,m){for(var _,T=[],E=p;E<m;E+=3)_=(c[E]<<16&16711680)+(c[E+1]<<8&65280)+(c[E+2]&255),T.push(u(_));return T.join("")}function d(c){for(var p,m=c.length,_=m%3,T=[],E=16383,b=0,A=m-_;b<A;b+=E)T.push(h(c,b,b+E>A?A:b+E));return _===1?(p=c[m-1],T.push(e[p>>2]+e[p<<4&63]+"==")):_===2&&(p=(c[m-2]<<8)+c[m-1],T.push(e[p>>10]+e[p>>4&63]+e[p<<2&63]+"=")),T.join("")}return ki}var bo={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var Lf;function x_(){return Lf||(Lf=1,bo.read=function(e,t,n,r,o){var i,s,a=o*8-r-1,l=(1<<a)-1,f=l>>1,u=-7,h=n?o-1:0,d=n?-1:1,c=e[t+h];for(h+=d,i=c&(1<<-u)-1,c>>=-u,u+=a;u>0;i=i*256+e[t+h],h+=d,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=r;u>0;s=s*256+e[t+h],h+=d,u-=8);if(i===0)i=1-f;else{if(i===l)return s?NaN:(c?-1:1)*(1/0);s=s+Math.pow(2,r),i=i-f}return(c?-1:1)*s*Math.pow(2,i-r)},bo.write=function(e,t,n,r,o,i){var s,a,l,f=i*8-o-1,u=(1<<f)-1,h=u>>1,d=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=r?0:i-1,p=r?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(t*l-1)*Math.pow(2,o),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;e[n+c]=a&255,c+=p,a/=256,o-=8);for(s=s<<o|a,f+=o;f>0;e[n+c]=s&255,c+=p,s/=256,f-=8);e[n+c-p]|=m*128}),bo}/*!
56
+ window.`+s+".push("+JSON.stringify(i)+")"}};return ys=r,ys}var vs,tf;function aE(){if(tf)return vs;tf=1;var e=oE(),t=n(e);function n(o){return o&&o.__esModule?o:{default:o}}var r={dataScript:function(i){var s=document.createElement("script");return s.innerHTML=i,s},gtm:function(i){var s=t.default.tags(i),a=function(){var h=document.createElement("noscript");return h.innerHTML=s.iframe,h},l=function(){var h=document.createElement("script");return h.innerHTML=s.script,h},f=this.dataScript(s.dataLayerVar);return{noScript:a,script:l,dataScript:f}},initialize:function(i){var s=i.gtmId,a=i.events,l=a===void 0?{}:a,f=i.dataLayer,c=i.dataLayerName,h=c===void 0?"dataLayer":c,d=i.auth,u=d===void 0?"":d,p=i.preview,m=p===void 0?"":p,E=this.gtm({id:s,events:l,dataLayer:f||void 0,dataLayerName:h,auth:u,preview:m});f&&document.head.appendChild(E.dataScript),document.head.insertBefore(E.script(),document.head.childNodes[0]),document.body.insertBefore(E.noScript(),document.body.childNodes[0])},dataLayer:function(i){var s=i.dataLayer,a=i.dataLayerName,l=a===void 0?"dataLayer":a;if(window[l])return window[l].push(s);var f=t.default.dataLayer(s,l),c=this.dataScript(f);document.head.insertBefore(c,document.head.childNodes[0])}};return vs=r,vs}var _s,rf;function sE(){if(rf)return _s;rf=1;var e=aE(),t=n(e);function n(r){return r&&r.__esModule?r:{default:r}}return _s=t.default,_s}var nf;function cE(){return nf||(nf=1,function(e,t){(function(n,r){e.exports=r(sE())})(ue,function(n){return function(){var r={273:function(a){a.exports=n}},o={};function i(a){var l=o[a];if(l!==void 0)return l.exports;var f=o[a]={exports:{}};return r[a](f,f.exports,i),f.exports}i.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(l,{a:l}),l},i.d=function(a,l){for(var f in l)i.o(l,f)&&!i.o(a,f)&&Object.defineProperty(a,f,{enumerable:!0,get:l[f]})},i.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var s={};return function(){i.r(s),i.d(s,{setContext:function(){return c},setupGTM:function(){return d}});var a=i(273),l=i.n(a);let f=null;const c=({configs:u,environment:p})=>{if(!p)throw new Error("Cannot set context: Environment not defined");if(!u)throw new Error("Cannot set context: REACT_APP_GTM_ID not defined");if(!u[p])throw new Error(`Cannot set context: REACT_APP_GTM_ID not defined for environment - ${JSON.stringify({configs:u,environment:p})}`);f=u[p]},h=()=>f,d=()=>{const u=h();l().initialize({gtmId:u.id})}}(),s}()})}(gs)),gs.exports}var yh=202,vh=502,_h=400,Eh=409,bh=100,wh=201,Sh=417,uE=424,Th=403,xh=504,Oh=410,Ah=505,Ch=418,Rh=419,Nh=507,Ph=500,Ih=411,Lh=423,kh=420,Mh=405,Bh=301,Fh=302,Uh=207,Dh=300,$h=511,jh=204,Hh=203,qh=406,Gh=404,Wh=501,Vh=304,zh=200,Yh=206,Kh=402,Qh=308,Xh=412,Jh=428,Zh=102,ep=407,tp=431,rp=408,np=413,ip=414,op=416,ap=205,sp=303,cp=503,up=101,lp=307,fp=429,dp=401,hp=422,pp=415,mp=305;const lE={ACCEPTED:yh,BAD_GATEWAY:vh,BAD_REQUEST:_h,CONFLICT:Eh,CONTINUE:bh,CREATED:wh,EXPECTATION_FAILED:Sh,FORBIDDEN:Th,GATEWAY_TIMEOUT:xh,GONE:Oh,HTTP_VERSION_NOT_SUPPORTED:Ah,IM_A_TEAPOT:Ch,INSUFFICIENT_SPACE_ON_RESOURCE:Rh,INSUFFICIENT_STORAGE:Nh,INTERNAL_SERVER_ERROR:Ph,LENGTH_REQUIRED:Ih,LOCKED:Lh,METHOD_FAILURE:kh,METHOD_NOT_ALLOWED:Mh,MOVED_PERMANENTLY:Bh,MOVED_TEMPORARILY:Fh,MULTI_STATUS:Uh,MULTIPLE_CHOICES:Dh,NETWORK_AUTHENTICATION_REQUIRED:$h,NO_CONTENT:jh,NON_AUTHORITATIVE_INFORMATION:Hh,NOT_ACCEPTABLE:qh,NOT_FOUND:Gh,NOT_IMPLEMENTED:Wh,NOT_MODIFIED:Vh,OK:zh,PARTIAL_CONTENT:Yh,PAYMENT_REQUIRED:Kh,PERMANENT_REDIRECT:Qh,PRECONDITION_FAILED:Xh,PRECONDITION_REQUIRED:Jh,PROCESSING:Zh,PROXY_AUTHENTICATION_REQUIRED:ep,REQUEST_HEADER_FIELDS_TOO_LARGE:tp,REQUEST_TIMEOUT:rp,REQUEST_TOO_LONG:np,REQUEST_URI_TOO_LONG:ip,REQUESTED_RANGE_NOT_SATISFIABLE:op,RESET_CONTENT:ap,SEE_OTHER:sp,SERVICE_UNAVAILABLE:cp,SWITCHING_PROTOCOLS:up,TEMPORARY_REDIRECT:lp,TOO_MANY_REQUESTS:fp,UNAUTHORIZED:dp,UNPROCESSABLE_ENTITY:hp,UNSUPPORTED_MEDIA_TYPE:pp,USE_PROXY:mp};var fE={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"},dE={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 gp(e){var t=fE[e.toString()];if(!t)throw new Error("Status code does not exist: "+e);return t}function yp(e){var t=dE[e];if(!t)throw new Error("Reason phrase does not exist: "+e);return t}var vp=gp,ic;(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"})(ic||(ic={}));var oc;(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"})(oc||(oc={}));var $o=globalThis&&globalThis.__assign||function(){return $o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},$o.apply(this,arguments)};const hE=$o($o({},lE),{getStatusCode:yp,getStatusText:vp}),pE=Object.freeze(Object.defineProperty({__proto__:null,ACCEPTED:yh,BAD_GATEWAY:vh,BAD_REQUEST:_h,CONFLICT:Eh,CONTINUE:bh,CREATED:wh,EXPECTATION_FAILED:Sh,FAILED_DEPENDENCY:uE,FORBIDDEN:Th,GATEWAY_TIMEOUT:xh,GONE:Oh,HTTP_VERSION_NOT_SUPPORTED:Ah,IM_A_TEAPOT:Ch,INSUFFICIENT_SPACE_ON_RESOURCE:Rh,INSUFFICIENT_STORAGE:Nh,INTERNAL_SERVER_ERROR:Ph,LENGTH_REQUIRED:Ih,LOCKED:Lh,METHOD_FAILURE:kh,METHOD_NOT_ALLOWED:Mh,MOVED_PERMANENTLY:Bh,MOVED_TEMPORARILY:Fh,MULTIPLE_CHOICES:Dh,MULTI_STATUS:Uh,NETWORK_AUTHENTICATION_REQUIRED:$h,NON_AUTHORITATIVE_INFORMATION:Hh,NOT_ACCEPTABLE:qh,NOT_FOUND:Gh,NOT_IMPLEMENTED:Wh,NOT_MODIFIED:Vh,NO_CONTENT:jh,OK:zh,PARTIAL_CONTENT:Yh,PAYMENT_REQUIRED:Kh,PERMANENT_REDIRECT:Qh,PRECONDITION_FAILED:Xh,PRECONDITION_REQUIRED:Jh,PROCESSING:Zh,PROXY_AUTHENTICATION_REQUIRED:ep,REQUESTED_RANGE_NOT_SATISFIABLE:op,REQUEST_HEADER_FIELDS_TOO_LARGE:tp,REQUEST_TIMEOUT:rp,REQUEST_TOO_LONG:np,REQUEST_URI_TOO_LONG:ip,RESET_CONTENT:ap,get ReasonPhrases(){return oc},SEE_OTHER:sp,SERVICE_UNAVAILABLE:cp,SWITCHING_PROTOCOLS:up,get StatusCodes(){return ic},TEMPORARY_REDIRECT:lp,TOO_MANY_REQUESTS:fp,UNAUTHORIZED:dp,UNPROCESSABLE_ENTITY:hp,UNSUPPORTED_MEDIA_TYPE:pp,USE_PROXY:mp,default:hE,getReasonPhrase:gp,getStatusCode:yp,getStatusText:vp},Symbol.toStringTag,{value:"Module"})),mE=zi(pE);var wo={exports:{}},bi={},Es={},wi={},Si={},$r={},Ti={},bs={},jr={},Xt={},of;function Fc(){if(of)return Xt;of=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.ERROR_PACKET=Xt.PACKET_TYPES_REVERSE=Xt.PACKET_TYPES=void 0;const e=Object.create(null);Xt.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);Xt.PACKET_TYPES_REVERSE=t,Object.keys(e).forEach(r=>{t[e[r]]=r});const n={type:"error",data:"parser error"};return Xt.ERROR_PACKET=n,Xt}var af;function gE(){if(af)return jr;af=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.encodePacket=jr.encodePacketToBinary=void 0;const e=Fc(),t=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",n=typeof ArrayBuffer=="function",r=f=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(f):f&&f.buffer instanceof ArrayBuffer,o=({type:f,data:c},h,d)=>t&&c instanceof Blob?h?d(c):i(c,d):n&&(c instanceof ArrayBuffer||r(c))?h?d(c):i(new Blob([c]),d):d(e.PACKET_TYPES[f]+(c||""));jr.encodePacket=o;const i=(f,c)=>{const h=new FileReader;return h.onload=function(){const d=h.result.split(",")[1];c("b"+(d||""))},h.readAsDataURL(f)};function s(f){return f instanceof Uint8Array?f:f instanceof ArrayBuffer?new Uint8Array(f):new Uint8Array(f.buffer,f.byteOffset,f.byteLength)}let a;function l(f,c){if(t&&f.data instanceof Blob)return f.data.arrayBuffer().then(s).then(c);if(n&&(f.data instanceof ArrayBuffer||r(f.data)))return c(s(f.data));o(f,!1,h=>{a||(a=new TextEncoder),c(a.encode(h))})}return jr.encodePacketToBinary=l,jr}var xi={},Hr={},sf;function yE(){if(sf)return Hr;sf=1,Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.decode=Hr.encode=void 0;const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let o=0;o<e.length;o++)t[e.charCodeAt(o)]=o;const n=o=>{let i=new Uint8Array(o),s,a=i.length,l="";for(s=0;s<a;s+=3)l+=e[i[s]>>2],l+=e[(i[s]&3)<<4|i[s+1]>>4],l+=e[(i[s+1]&15)<<2|i[s+2]>>6],l+=e[i[s+2]&63];return a%3===2?l=l.substring(0,l.length-1)+"=":a%3===1&&(l=l.substring(0,l.length-2)+"=="),l};Hr.encode=n;const r=o=>{let i=o.length*.75,s=o.length,a,l=0,f,c,h,d;o[o.length-1]==="="&&(i--,o[o.length-2]==="="&&i--);const u=new ArrayBuffer(i),p=new Uint8Array(u);for(a=0;a<s;a+=4)f=t[o.charCodeAt(a)],c=t[o.charCodeAt(a+1)],h=t[o.charCodeAt(a+2)],d=t[o.charCodeAt(a+3)],p[l++]=f<<2|c>>4,p[l++]=(c&15)<<4|h>>2,p[l++]=(h&3)<<6|d&63;return u};return Hr.decode=r,Hr}var cf;function vE(){if(cf)return xi;cf=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.decodePacket=void 0;const e=Fc(),t=yE(),n=typeof ArrayBuffer=="function",r=(s,a)=>{if(typeof s!="string")return{type:"message",data:i(s,a)};const l=s.charAt(0);return l==="b"?{type:"message",data:o(s.substring(1),a)}:e.PACKET_TYPES_REVERSE[l]?s.length>1?{type:e.PACKET_TYPES_REVERSE[l],data:s.substring(1)}:{type:e.PACKET_TYPES_REVERSE[l]}:e.ERROR_PACKET};xi.decodePacket=r;const o=(s,a)=>{if(n){const l=(0,t.decode)(s);return i(l,a)}else return{base64:!0,data:s}},i=(s,a)=>{switch(a){case"blob":return s instanceof Blob?s:new Blob([s]);case"arraybuffer":default:return s instanceof ArrayBuffer?s:s.buffer}};return xi}var uf;function Ki(){return uf||(uf=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=gE();Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const n=vE();Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return n.decodePacket}});const r=Fc(),o=String.fromCharCode(30),i=(d,u)=>{const p=d.length,m=new Array(p);let E=0;d.forEach((T,_)=>{(0,t.encodePacket)(T,!1,b=>{m[_]=b,++E===p&&u(m.join(o))})})};e.encodePayload=i;const s=(d,u)=>{const p=d.split(o),m=[];for(let E=0;E<p.length;E++){const T=(0,n.decodePacket)(p[E],u);if(m.push(T),T.type==="error")break}return m};e.decodePayload=s;function a(){return new TransformStream({transform(d,u){(0,t.encodePacketToBinary)(d,p=>{const m=p.length;let E;if(m<126)E=new Uint8Array(1),new DataView(E.buffer).setUint8(0,m);else if(m<65536){E=new Uint8Array(3);const T=new DataView(E.buffer);T.setUint8(0,126),T.setUint16(1,m)}else{E=new Uint8Array(9);const T=new DataView(E.buffer);T.setUint8(0,127),T.setBigUint64(1,BigInt(m))}d.data&&typeof d.data!="string"&&(E[0]|=128),u.enqueue(E),u.enqueue(p)})}})}e.createPacketEncoderStream=a;let l;function f(d){return d.reduce((u,p)=>u+p.length,0)}function c(d,u){if(d[0].length===u)return d.shift();const p=new Uint8Array(u);let m=0;for(let E=0;E<u;E++)p[E]=d[0][m++],m===d[0].length&&(d.shift(),m=0);return d.length&&m<d[0].length&&(d[0]=d[0].slice(m)),p}function h(d,u){l||(l=new TextDecoder);const p=[];let m=0,E=-1,T=!1;return new TransformStream({transform(_,b){for(p.push(_);;){if(m===0){if(f(p)<1)break;const A=c(p,1);T=(A[0]&128)===128,E=A[0]&127,E<126?m=3:E===126?m=1:m=2}else if(m===1){if(f(p)<2)break;const A=c(p,2);E=new DataView(A.buffer,A.byteOffset,A.length).getUint16(0),m=3}else if(m===2){if(f(p)<8)break;const A=c(p,8),w=new DataView(A.buffer,A.byteOffset,A.length),P=w.getUint32(0);if(P>Math.pow(2,53-32)-1){b.enqueue(r.ERROR_PACKET);break}E=P*Math.pow(2,32)+w.getUint32(4),m=3}else{if(f(p)<E)break;const A=c(p,E);b.enqueue((0,n.decodePacket)(T?A:l.decode(A),u)),m=0}if(E===0||E>d){b.enqueue(r.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=h,e.protocol=4}(bs)),bs}function at(e){if(e)return _E(e)}function _E(e){for(var t in at.prototype)e[t]=at.prototype[t];return e}at.prototype.on=at.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};at.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};at.prototype.off=at.prototype.removeListener=at.prototype.removeAllListeners=at.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,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this};at.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,o=n.length;r<o;++r)n[r].apply(this,t)}return this};at.prototype.emitReserved=at.prototype.emit;at.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};at.prototype.hasListeners=function(e){return!!this.listeners(e).length};const EE=Object.freeze(Object.defineProperty({__proto__:null,Emitter:at},Symbol.toStringTag,{value:"Module"})),kn=zi(EE);var Jt={},Oi={},lf;function Qo(){return lf||(lf=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.globalThisShim=void 0,Oi.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())()),Oi}var ff;function Qi(){if(ff)return Jt;ff=1,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.byteLength=Jt.installTimerFunctions=Jt.pick=void 0;const e=Qo();function t(l,...f){return f.reduce((c,h)=>(l.hasOwnProperty(h)&&(c[h]=l[h]),c),{})}Jt.pick=t;const n=e.globalThisShim.setTimeout,r=e.globalThisShim.clearTimeout;function o(l,f){f.useNativeTimers?(l.setTimeoutFn=n.bind(e.globalThisShim),l.clearTimeoutFn=r.bind(e.globalThisShim)):(l.setTimeoutFn=e.globalThisShim.setTimeout.bind(e.globalThisShim),l.clearTimeoutFn=e.globalThisShim.clearTimeout.bind(e.globalThisShim))}Jt.installTimerFunctions=o;const i=1.33;function s(l){return typeof l=="string"?a(l):Math.ceil((l.byteLength||l.size)*i)}Jt.byteLength=s;function a(l){let f=0,c=0;for(let h=0,d=l.length;h<d;h++)f=l.charCodeAt(h),f<128?c+=1:f<2048?c+=2:f<55296||f>=57344?c+=3:(h++,c+=4);return c}return Jt}var So={exports:{}},ws,df;function bE(){if(df)return ws;df=1;var e=1e3,t=e*60,n=t*60,r=n*24,o=r*7,i=r*365.25;ws=function(c,h){h=h||{};var d=typeof c;if(d==="string"&&c.length>0)return s(c);if(d==="number"&&isFinite(c))return h.long?l(c):a(c);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))};function s(c){if(c=String(c),!(c.length>100)){var h=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(h){var d=parseFloat(h[1]),u=(h[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return d*i;case"weeks":case"week":case"w":return d*o;case"days":case"day":case"d":return d*r;case"hours":case"hour":case"hrs":case"hr":case"h":return d*n;case"minutes":case"minute":case"mins":case"min":case"m":return d*t;case"seconds":case"second":case"secs":case"sec":case"s":return d*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function a(c){var h=Math.abs(c);return h>=r?Math.round(c/r)+"d":h>=n?Math.round(c/n)+"h":h>=t?Math.round(c/t)+"m":h>=e?Math.round(c/e)+"s":c+"ms"}function l(c){var h=Math.abs(c);return h>=r?f(c,h,r,"day"):h>=n?f(c,h,n,"hour"):h>=t?f(c,h,t,"minute"):h>=e?f(c,h,e,"second"):c+" ms"}function f(c,h,d,u){var p=h>=d*1.5;return Math.round(c/d)+" "+u+(p?"s":"")}return ws}var Ss,hf;function wE(){if(hf)return Ss;hf=1;function e(t){r.debug=r,r.default=r,r.coerce=f,r.disable=s,r.enable=i,r.enabled=a,r.humanize=bE(),r.destroy=c,Object.keys(t).forEach(h=>{r[h]=t[h]}),r.names=[],r.skips=[],r.formatters={};function n(h){let d=0;for(let u=0;u<h.length;u++)d=(d<<5)-d+h.charCodeAt(u),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=n;function r(h){let d,u=null,p,m;function E(...T){if(!E.enabled)return;const _=E,b=Number(new Date),A=b-(d||b);_.diff=A,_.prev=d,_.curr=b,d=b,T[0]=r.coerce(T[0]),typeof T[0]!="string"&&T.unshift("%O");let w=0;T[0]=T[0].replace(/%([a-zA-Z%])/g,(F,B)=>{if(F==="%%")return"%";w++;const W=r.formatters[B];if(typeof W=="function"){const G=T[w];F=W.call(_,G),T.splice(w,1),w--}return F}),r.formatArgs.call(_,T),(_.log||r.log).apply(_,T)}return E.namespace=h,E.useColors=r.useColors(),E.color=r.selectColor(h),E.extend=o,E.destroy=r.destroy,Object.defineProperty(E,"enabled",{enumerable:!0,configurable:!1,get:()=>u!==null?u:(p!==r.namespaces&&(p=r.namespaces,m=r.enabled(h)),m),set:T=>{u=T}}),typeof r.init=="function"&&r.init(E),E}function o(h,d){const u=r(this.namespace+(typeof d>"u"?":":d)+h);return u.log=this.log,u}function i(h){r.save(h),r.namespaces=h,r.names=[],r.skips=[];let d;const u=(typeof h=="string"?h:"").split(/[\s,]+/),p=u.length;for(d=0;d<p;d++)u[d]&&(h=u[d].replace(/\*/g,".*?"),h[0]==="-"?r.skips.push(new RegExp("^"+h.slice(1)+"$")):r.names.push(new RegExp("^"+h+"$")))}function s(){const h=[...r.names.map(l),...r.skips.map(l).map(d=>"-"+d)].join(",");return r.enable(""),h}function a(h){if(h[h.length-1]==="*")return!0;let d,u;for(d=0,u=r.skips.length;d<u;d++)if(r.skips[d].test(h))return!1;for(d=0,u=r.names.length;d<u;d++)if(r.names[d].test(h))return!0;return!1}function l(h){return h.toString().substring(2,h.toString().length-2).replace(/\.\*\?$/,"*")}function f(h){return h instanceof Error?h.stack||h.message:h}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}return Ss=e,Ss}var pf;function qt(){return pf||(pf=1,function(e,t){t.formatArgs=r,t.save=o,t.load=i,t.useColors=n,t.storage=s(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!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(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const f="color: "+this.color;l.splice(1,0,f,"color: inherit");let c=0,h=0;l[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(c++,d==="%c"&&(h=c))}),l.splice(h,0,f)}t.log=console.debug||console.log||(()=>{});function o(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function i(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof process<"u"&&"env"in process&&(l=process.env.DEBUG),l}function s(){try{return localStorage}catch{}}e.exports=wE()(t);const{formatters:a}=e.exports;a.j=function(l){try{return JSON.stringify(l)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}}}(So,So.exports)),So.exports}var qr={},mf;function _p(){if(mf)return qr;mf=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.decode=qr.encode=void 0;function e(n){let r="";for(let o in n)n.hasOwnProperty(o)&&(r.length&&(r+="&"),r+=encodeURIComponent(o)+"="+encodeURIComponent(n[o]));return r}qr.encode=e;function t(n){let r={},o=n.split("&");for(let i=0,s=o.length;i<s;i++){let a=o[i].split("=");r[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return r}return qr.decode=t,qr}var gf;function Xo(){if(gf)return Ti;gf=1;var e=ue&&ue.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.Transport=void 0;const t=Ki(),n=kn,r=Qi(),o=e(qt()),i=_p(),s=(0,o.default)("engine.io-client:transport");class a extends Error{constructor(c,h,d){super(c),this.description=h,this.context=d,this.type="TransportError"}}class l extends n.Emitter{constructor(c){super(),this.writable=!1,(0,r.installTimerFunctions)(this,c),this.opts=c,this.query=c.query,this.socket=c.socket}onError(c,h,d){return super.emitReserved("error",new a(c,h,d)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(c){this.readyState==="open"?this.write(c):s("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(c){const h=(0,t.decodePacket)(c,this.socket.binaryType);this.onPacket(h)}onPacket(c){super.emitReserved("packet",c)}onClose(c){this.readyState="closed",super.emitReserved("close",c)}pause(c){}createUri(c,h={}){return c+"://"+this._hostname()+this._port()+this.opts.path+this._query(h)}_hostname(){const c=this.opts.hostname;return c.indexOf(":")===-1?c:"["+c+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(c){const h=(0,i.encode)(c);return h.length?"?"+h:""}}return Ti.Transport=l,Ti}var Zt={},yf;function Ep(){if(yf)return Zt;yf=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.yeast=Zt.decode=Zt.encode=void 0;const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),t=64,n={};let r=0,o=0,i;function s(f){let c="";do c=e[f%t]+c,f=Math.floor(f/t);while(f>0);return c}Zt.encode=s;function a(f){let c=0;for(o=0;o<f.length;o++)c=c*t+n[f.charAt(o)];return c}Zt.decode=a;function l(){const f=s(+new Date);return f!==i?(r=0,i=f):f+"."+s(r++)}for(Zt.yeast=l;o<t;o++)n[e[o]]=o;return Zt}var Gr={},Ai={},vf;function SE(){if(vf)return Ai;vf=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.hasCORS=void 0;let e=!1;try{e=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}return Ai.hasCORS=e,Ai}var _f;function TE(){if(_f)return Gr;_f=1,Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.createCookieJar=Gr.XHR=void 0;const e=SE(),t=Qo();function n(o){const i=o.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||e.hasCORS))return new XMLHttpRequest}catch{}if(!i)try{return new t.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}Gr.XHR=n;function r(){}return Gr.createCookieJar=r,Gr}var Ef;function xE(){if(Ef)return $r;Ef=1;var e=ue&&ue.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty($r,"__esModule",{value:!0}),$r.Request=$r.Polling=void 0;const t=Xo(),n=e(qt()),r=Ep(),o=Ki(),i=TE(),s=kn,a=Qi(),l=Qo(),f=(0,n.default)("engine.io-client:polling");function c(){}const h=function(){return new i.XHR({xdomain:!1}).responseType!=null}();class d extends t.Transport{constructor(E){if(super(E),this.polling=!1,typeof location<"u"){const _=location.protocol==="https:";let b=location.port;b||(b=_?"443":"80"),this.xd=typeof location<"u"&&E.hostname!==location.hostname||b!==E.port}const T=E&&E.forceBase64;this.supportsBinary=h&&!T,this.opts.withCredentials&&(this.cookieJar=(0,i.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(E){this.readyState="pausing";const T=()=>{f("paused"),this.readyState="paused",E()};if(this.polling||!this.writable){let _=0;this.polling&&(f("we are currently polling - waiting to pause"),_++,this.once("pollComplete",function(){f("pre-pause polling complete"),--_||T()})),this.writable||(f("we are currently writing - waiting to pause"),_++,this.once("drain",function(){f("pre-pause writing complete"),--_||T()}))}else T()}poll(){f("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(E){f("polling got data %s",E);const T=_=>{if(this.readyState==="opening"&&_.type==="open"&&this.onOpen(),_.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(_)};(0,o.decodePayload)(E,this.socket.binaryType).forEach(T),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():f('ignoring poll - transport state "%s"',this.readyState))}doClose(){const E=()=>{f("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(f("transport open - closing"),E()):(f("transport not open - deferring close"),this.once("open",E))}write(E){this.writable=!1,(0,o.encodePayload)(E,T=>{this.doWrite(T,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const E=this.opts.secure?"https":"http",T=this.query||{};return this.opts.timestampRequests!==!1&&(T[this.opts.timestampParam]=(0,r.yeast)()),!this.supportsBinary&&!T.sid&&(T.b64=1),this.createUri(E,T)}request(E={}){return Object.assign(E,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new u(this.uri(),E)}doWrite(E,T){const _=this.request({method:"POST",data:E});_.on("success",T),_.on("error",(b,A)=>{this.onError("xhr post error",b,A)})}doPoll(){f("xhr poll");const E=this.request();E.on("data",this.onData.bind(this)),E.on("error",(T,_)=>{this.onError("xhr poll error",T,_)}),this.pollXhr=E}}$r.Polling=d;class u extends s.Emitter{constructor(E,T){super(),(0,a.installTimerFunctions)(this,T),this.opts=T,this.method=T.method||"GET",this.uri=E,this.data=T.data!==void 0?T.data:null,this.create()}create(){var E;const T=(0,a.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");T.xdomain=!!this.opts.xd;const _=this.xhr=new i.XHR(T);try{f("xhr open %s: %s",this.method,this.uri),_.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){_.setDisableHeaderCheck&&_.setDisableHeaderCheck(!0);for(let b in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(b)&&_.setRequestHeader(b,this.opts.extraHeaders[b])}}catch{}if(this.method==="POST")try{_.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{_.setRequestHeader("Accept","*/*")}catch{}(E=this.opts.cookieJar)===null||E===void 0||E.addCookies(_),"withCredentials"in _&&(_.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(_.timeout=this.opts.requestTimeout),_.onreadystatechange=()=>{var b;_.readyState===3&&((b=this.opts.cookieJar)===null||b===void 0||b.parseCookies(_)),_.readyState===4&&(_.status===200||_.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof _.status=="number"?_.status:0)},0))},f("xhr data %s",this.data),_.send(this.data)}catch(b){this.setTimeoutFn(()=>{this.onError(b)},0);return}typeof document<"u"&&(this.index=u.requestsCount++,u.requests[this.index]=this)}onError(E){this.emitReserved("error",E,this.xhr),this.cleanup(!0)}cleanup(E){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=c,E)try{this.xhr.abort()}catch{}typeof document<"u"&&delete u.requests[this.index],this.xhr=null}}onLoad(){const E=this.xhr.responseText;E!==null&&(this.emitReserved("data",E),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if($r.Request=u,u.requestsCount=0,u.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",p);else if(typeof addEventListener=="function"){const m="onpagehide"in l.globalThisShim?"pagehide":"unload";addEventListener(m,p,!1)}}function p(){for(let m in u.requests)u.requests.hasOwnProperty(m)&&u.requests[m].abort()}return $r}var Ci={},Ct={},bf;function Jo(){if(bf)return Ct;bf=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.defaultBinaryType=Ct.usingBrowserWebSocket=Ct.WebSocket=Ct.nextTick=void 0;const e=Qo();return Ct.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?n=>Promise.resolve().then(n):(n,r)=>r(n,0))(),Ct.WebSocket=e.globalThisShim.WebSocket||e.globalThisShim.MozWebSocket,Ct.usingBrowserWebSocket=!0,Ct.defaultBinaryType="arraybuffer",Ct}var wf;function OE(){if(wf)return Ci;wf=1;var e=ue&&ue.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.WS=void 0;const t=Xo(),n=Ep(),r=Qi(),o=Jo(),i=e(qt()),s=Ki(),a=(0,i.default)("engine.io-client:websocket"),l=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class f extends t.Transport{constructor(h){super(h),this.supportsBinary=!h.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const h=this.uri(),d=this.opts.protocols,u=l?{}:(0,r.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(u.headers=this.opts.extraHeaders);try{this.ws=o.usingBrowserWebSocket&&!l?d?new o.WebSocket(h,d):new o.WebSocket(h):new o.WebSocket(h,d,u)}catch(p){return this.emitReserved("error",p)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=h=>this.onClose({description:"websocket connection closed",context:h}),this.ws.onmessage=h=>this.onData(h.data),this.ws.onerror=h=>this.onError("websocket error",h)}write(h){this.writable=!1;for(let d=0;d<h.length;d++){const u=h[d],p=d===h.length-1;(0,s.encodePacket)(u,this.supportsBinary,m=>{const E={};o.usingBrowserWebSocket||(u.options&&(E.compress=u.options.compress),this.opts.perMessageDeflate&&(typeof m=="string"?Buffer.byteLength(m):m.length)<this.opts.perMessageDeflate.threshold&&(E.compress=!1));try{o.usingBrowserWebSocket?this.ws.send(m):this.ws.send(m,E)}catch{a("websocket closed before onclose event")}p&&(0,o.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const h=this.opts.secure?"wss":"ws",d=this.query||{};return this.opts.timestampRequests&&(d[this.opts.timestampParam]=(0,n.yeast)()),this.supportsBinary||(d.b64=1),this.createUri(h,d)}check(){return!!o.WebSocket}}return Ci.WS=f,Ci}var Ri={},Sf;function AE(){if(Sf)return Ri;Sf=1;var e=ue&&ue.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.WT=void 0;const t=Xo(),n=Jo(),r=Ki(),i=(0,e(qt()).default)("engine.io-client:webtransport");class s extends t.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{i("transport closed gracefully"),this.onClose()}).catch(l=>{i("transport closed due to %s",l),this.onError("webtransport error",l)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(l=>{const f=(0,r.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),c=l.readable.pipeThrough(f).getReader(),h=(0,r.createPacketEncoderStream)();h.readable.pipeTo(l.writable),this.writer=h.writable.getWriter();const d=()=>{c.read().then(({done:p,value:m})=>{if(p){i("session is closed");return}i("received chunk: %o",m),this.onPacket(m),d()}).catch(p=>{i("an error occurred while reading: %s",p)})};d();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this.writer.write(u).then(()=>this.onOpen())})}))}write(l){this.writable=!1;for(let f=0;f<l.length;f++){const c=l[f],h=f===l.length-1;this.writer.write(c).then(()=>{h&&(0,n.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var l;(l=this.transport)===null||l===void 0||l.close()}}return Ri.WT=s,Ri}var Tf;function bp(){if(Tf)return Si;Tf=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.transports=void 0;const e=xE(),t=OE(),n=AE();return Si.transports={websocket:t.WS,webtransport:n.WT,polling:e.Polling},Si}var Ni={},xf;function wp(){if(xf)return Ni;xf=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.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(i){const s=i,a=i.indexOf("["),l=i.indexOf("]");a!=-1&&l!=-1&&(i=i.substring(0,a)+i.substring(a,l).replace(/:/g,";")+i.substring(l,i.length));let f=e.exec(i||""),c={},h=14;for(;h--;)c[t[h]]=f[h]||"";return a!=-1&&l!=-1&&(c.source=s,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=r(c,c.path),c.queryKey=o(c,c.query),c}Ni.parse=n;function r(i,s){const a=/\/{2,9}/g,l=s.replace(a,"/").split("/");return(s.slice(0,1)=="/"||s.length===0)&&l.splice(0,1),s.slice(-1)=="/"&&l.splice(l.length-1,1),l}function o(i,s){const a={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(l,f,c){f&&(a[f]=c)}),a}return Ni}var Of;function CE(){if(Of)return wi;Of=1;var e=ue&&ue.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(wi,"__esModule",{value:!0}),wi.Socket=void 0;const t=bp(),n=Qi(),r=_p(),o=wp(),i=e(qt()),s=kn,a=Ki(),l=Jo(),f=(0,i.default)("engine.io-client:socket");class c extends s.Emitter{constructor(d,u={}){super(),this.binaryType=l.defaultBinaryType,this.writeBuffer=[],d&&typeof d=="object"&&(u=d,d=null),d?(d=(0,o.parse)(d),u.hostname=d.host,u.secure=d.protocol==="https"||d.protocol==="wss",u.port=d.port,d.query&&(u.query=d.query)):u.host&&(u.hostname=(0,o.parse)(u.host).host),(0,n.installTimerFunctions)(this,u),this.secure=u.secure!=null?u.secure:typeof location<"u"&&location.protocol==="https:",u.hostname&&!u.port&&(u.port=this.secure?"443":"80"),this.hostname=u.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=u.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=u.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},u),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(d){f('creating transport "%s"',d);const u=Object.assign({},this.opts.query);u.EIO=a.protocol,u.transport=d,this.id&&(u.sid=this.id);const p=Object.assign({},this.opts,{query:u,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[d]);return f("options: %j",p),new t.transports[d](p)}open(){let d;if(this.opts.rememberUpgrade&&c.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)d="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else d=this.transports[0];this.readyState="opening";try{d=this.createTransport(d)}catch(u){f("error while creating transport: %s",u),this.transports.shift(),this.open();return}d.open(),this.setTransport(d)}setTransport(d){f("setting transport %s",d.name),this.transport&&(f("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=d,d.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",u=>this.onClose("transport close",u))}probe(d){f('probing transport "%s"',d);let u=this.createTransport(d),p=!1;c.priorWebsocketSuccess=!1;const m=()=>{p||(f('probe transport "%s" opened',d),u.send([{type:"ping",data:"probe"}]),u.once("packet",P=>{if(!p)if(P.type==="pong"&&P.data==="probe"){if(f('probe transport "%s" pong',d),this.upgrading=!0,this.emitReserved("upgrading",u),!u)return;c.priorWebsocketSuccess=u.name==="websocket",f('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{p||this.readyState!=="closed"&&(f("changing transport and sending upgrade packet"),w(),this.setTransport(u),u.send([{type:"upgrade"}]),this.emitReserved("upgrade",u),u=null,this.upgrading=!1,this.flush())})}else{f('probe transport "%s" failed',d);const F=new Error("probe error");F.transport=u.name,this.emitReserved("upgradeError",F)}}))};function E(){p||(p=!0,w(),u.close(),u=null)}const T=P=>{const F=new Error("probe error: "+P);F.transport=u.name,E(),f('probe transport "%s" failed because of error: %s',d,P),this.emitReserved("upgradeError",F)};function _(){T("transport closed")}function b(){T("socket closed")}function A(P){u&&P.name!==u.name&&(f('"%s" works - aborting "%s"',P.name,u.name),E())}const w=()=>{u.removeListener("open",m),u.removeListener("error",T),u.removeListener("close",_),this.off("close",b),this.off("upgrading",A)};u.once("open",m),u.once("error",T),u.once("close",_),this.once("close",b),this.once("upgrading",A),this.upgrades.indexOf("webtransport")!==-1&&d!=="webtransport"?this.setTimeoutFn(()=>{p||u.open()},200):u.open()}onOpen(){if(f("socket open"),this.readyState="open",c.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){f("starting upgrade probes");let d=0;const u=this.upgrades.length;for(;d<u;d++)this.probe(this.upgrades[d])}}onPacket(d){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(f('socket receive: type "%s", data "%s"',d.type,d.data),this.emitReserved("packet",d),this.emitReserved("heartbeat"),this.resetPingTimeout(),d.type){case"open":this.onHandshake(JSON.parse(d.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const u=new Error("server error");u.code=d.data,this.onError(u);break;case"message":this.emitReserved("data",d.data),this.emitReserved("message",d.data);break}else f('packet received with socket readyState "%s"',this.readyState)}onHandshake(d){this.emitReserved("handshake",d),this.id=d.sid,this.transport.query.sid=d.sid,this.upgrades=this.filterUpgrades(d.upgrades),this.pingInterval=d.pingInterval,this.pingTimeout=d.pingTimeout,this.maxPayload=d.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const d=this.getWritablePackets();f("flushing %d packets in socket",d.length),this.transport.send(d),this.prevBufferLen=d.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let u=1;for(let p=0;p<this.writeBuffer.length;p++){const m=this.writeBuffer[p].data;if(m&&(u+=(0,n.byteLength)(m)),p>0&&u>this.maxPayload)return f("only send %d out of %d packets",p,this.writeBuffer.length),this.writeBuffer.slice(0,p);u+=2}return f("payload size is %d (max: %d)",u,this.maxPayload),this.writeBuffer}write(d,u,p){return this.sendPacket("message",d,u,p),this}send(d,u,p){return this.sendPacket("message",d,u,p),this}sendPacket(d,u,p,m){if(typeof u=="function"&&(m=u,u=void 0),typeof p=="function"&&(m=p,p=null),this.readyState==="closing"||this.readyState==="closed")return;p=p||{},p.compress=p.compress!==!1;const E={type:d,data:u,options:p};this.emitReserved("packetCreate",E),this.writeBuffer.push(E),m&&this.once("flush",m),this.flush()}close(){const d=()=>{this.onClose("forced close"),f("socket closing - telling transport to close"),this.transport.close()},u=()=>{this.off("upgrade",u),this.off("upgradeError",u),d()},p=()=>{this.once("upgrade",u),this.once("upgradeError",u)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?p():d()}):this.upgrading?p():d()),this}onError(d){f("socket error %j",d),c.priorWebsocketSuccess=!1,this.emitReserved("error",d),this.onClose("transport error",d)}onClose(d,u){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(f('socket close with reason: "%s"',d),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",d,u),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(d){const u=[];let p=0;const m=d.length;for(;p<m;p++)~this.transports.indexOf(d[p])&&u.push(d[p]);return u}}return wi.Socket=c,c.protocol=a.protocol,wi}var Af;function Sp(){return Af||(Af=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=CE();Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var n=Xo();Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return n.Transport}});var r=bp();Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return r.transports}});var o=Qi();Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var i=wp();Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.parse}});var s=Jo();Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return s.nextTick}})}(Es)),Es}var Cf;function RE(){if(Cf)return bi;Cf=1;var e=ue&&ue.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(bi,"__esModule",{value:!0}),bi.url=void 0;const t=Sp(),r=e(qt()).default("socket.io-client:url");function o(i,s="",a){let l=i;a=a||typeof location<"u"&&location,i==null&&(i=a.protocol+"//"+a.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=a.protocol+i:i=a.host+i),/^(https?|wss?):\/\//.test(i)||(r("protocol-less url %s",i),typeof a<"u"?i=a.protocol+"//"+i:i="https://"+i),r("parse %s",i),l=t.parse(i)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";const c=l.host.indexOf(":")!==-1?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+c+":"+l.port+s,l.href=l.protocol+"://"+c+(a&&a.port===l.port?"":":"+l.port),l}return bi.url=o,bi}var Pi={},Ii={},Ts={},Wr={},Vr={},Rf;function Tp(){if(Rf)return Vr;Rf=1,Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.hasBinary=Vr.isBinary=void 0;const e=typeof ArrayBuffer=="function",t=a=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(a):a.buffer instanceof ArrayBuffer,n=Object.prototype.toString,r=typeof Blob=="function"||typeof Blob<"u"&&n.call(Blob)==="[object BlobConstructor]",o=typeof File=="function"||typeof File<"u"&&n.call(File)==="[object FileConstructor]";function i(a){return e&&(a instanceof ArrayBuffer||t(a))||r&&a instanceof Blob||o&&a instanceof File}Vr.isBinary=i;function s(a,l){if(!a||typeof a!="object")return!1;if(Array.isArray(a)){for(let f=0,c=a.length;f<c;f++)if(s(a[f]))return!0;return!1}if(i(a))return!0;if(a.toJSON&&typeof a.toJSON=="function"&&arguments.length===1)return s(a.toJSON(),!0);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)&&s(a[f]))return!0;return!1}return Vr.hasBinary=s,Vr}var Nf;function NE(){if(Nf)return Wr;Nf=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.reconstructPacket=Wr.deconstructPacket=void 0;const e=Tp();function t(i){const s=[],a=i.data,l=i;return l.data=n(a,s),l.attachments=s.length,{packet:l,buffers:s}}Wr.deconstructPacket=t;function n(i,s){if(!i)return i;if((0,e.isBinary)(i)){const a={_placeholder:!0,num:s.length};return s.push(i),a}else if(Array.isArray(i)){const a=new Array(i.length);for(let l=0;l<i.length;l++)a[l]=n(i[l],s);return a}else if(typeof i=="object"&&!(i instanceof Date)){const a={};for(const l in i)Object.prototype.hasOwnProperty.call(i,l)&&(a[l]=n(i[l],s));return a}return i}function r(i,s){return i.data=o(i.data,s),delete i.attachments,i}Wr.reconstructPacket=r;function o(i,s){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<s.length)return s[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let a=0;a<i.length;a++)i[a]=o(i[a],s);else if(typeof i=="object")for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&(i[a]=o(i[a],s));return i}return Wr}var Pf;function Uc(){return Pf||(Pf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=kn,n=NE(),r=Tp(),i=(0,qt().default)("socket.io-parser"),s=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var a;(function(d){d[d.CONNECT=0]="CONNECT",d[d.DISCONNECT=1]="DISCONNECT",d[d.EVENT=2]="EVENT",d[d.ACK=3]="ACK",d[d.CONNECT_ERROR=4]="CONNECT_ERROR",d[d.BINARY_EVENT=5]="BINARY_EVENT",d[d.BINARY_ACK=6]="BINARY_ACK"})(a=e.PacketType||(e.PacketType={}));class l{constructor(u){this.replacer=u}encode(u){return i("encoding packet %j",u),(u.type===a.EVENT||u.type===a.ACK)&&(0,r.hasBinary)(u)?this.encodeAsBinary({type:u.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,nsp:u.nsp,data:u.data,id:u.id}):[this.encodeAsString(u)]}encodeAsString(u){let p=""+u.type;return(u.type===a.BINARY_EVENT||u.type===a.BINARY_ACK)&&(p+=u.attachments+"-"),u.nsp&&u.nsp!=="/"&&(p+=u.nsp+","),u.id!=null&&(p+=u.id),u.data!=null&&(p+=JSON.stringify(u.data,this.replacer)),i("encoded %j as %s",u,p),p}encodeAsBinary(u){const p=(0,n.deconstructPacket)(u),m=this.encodeAsString(p.packet),E=p.buffers;return E.unshift(m),E}}e.Encoder=l;function f(d){return Object.prototype.toString.call(d)==="[object Object]"}class c extends t.Emitter{constructor(u){super(),this.reviver=u}add(u){let p;if(typeof u=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");p=this.decodeString(u);const m=p.type===a.BINARY_EVENT;m||p.type===a.BINARY_ACK?(p.type=m?a.EVENT:a.ACK,this.reconstructor=new h(p),p.attachments===0&&super.emitReserved("decoded",p)):super.emitReserved("decoded",p)}else if((0,r.isBinary)(u)||u.base64)if(this.reconstructor)p=this.reconstructor.takeBinaryData(u),p&&(this.reconstructor=null,super.emitReserved("decoded",p));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+u)}decodeString(u){let p=0;const m={type:Number(u.charAt(0))};if(a[m.type]===void 0)throw new Error("unknown packet type "+m.type);if(m.type===a.BINARY_EVENT||m.type===a.BINARY_ACK){const T=p+1;for(;u.charAt(++p)!=="-"&&p!=u.length;);const _=u.substring(T,p);if(_!=Number(_)||u.charAt(p)!=="-")throw new Error("Illegal attachments");m.attachments=Number(_)}if(u.charAt(p+1)==="/"){const T=p+1;for(;++p&&!(u.charAt(p)===","||p===u.length););m.nsp=u.substring(T,p)}else m.nsp="/";const E=u.charAt(p+1);if(E!==""&&Number(E)==E){const T=p+1;for(;++p;){const _=u.charAt(p);if(_==null||Number(_)!=_){--p;break}if(p===u.length)break}m.id=Number(u.substring(T,p+1))}if(u.charAt(++p)){const T=this.tryParse(u.substr(p));if(c.isPayloadValid(m.type,T))m.data=T;else throw new Error("invalid payload")}return i("decoded %s as %j",u,m),m}tryParse(u){try{return JSON.parse(u,this.reviver)}catch{return!1}}static isPayloadValid(u,p){switch(u){case a.CONNECT:return f(p);case a.DISCONNECT:return p===void 0;case a.CONNECT_ERROR:return typeof p=="string"||f(p);case a.EVENT:case a.BINARY_EVENT:return Array.isArray(p)&&(typeof p[0]=="number"||typeof p[0]=="string"&&s.indexOf(p[0])===-1);case a.ACK:case a.BINARY_ACK:return Array.isArray(p)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=c;class h{constructor(u){this.packet=u,this.buffers=[],this.reconPack=u}takeBinaryData(u){if(this.buffers.push(u),this.buffers.length===this.reconPack.attachments){const p=(0,n.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),p}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}}(Ts)),Ts}var Li={},If;function xp(){if(If)return Li;If=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.on=void 0;function e(t,n,r){return t.on(n,r),function(){t.off(n,r)}}return Li.on=e,Li}var Lf;function Op(){if(Lf)return Ii;Lf=1;var e=ue&&ue.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.Socket=void 0;const t=Uc(),n=xp(),r=kn,i=e(qt()).default("socket.io-client:socket"),s=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class a extends r.Emitter{constructor(f,c,h){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=f,this.nsp=c,h&&h.auth&&(this.auth=h.auth),this._opts=Object.assign({},h),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const f=this.io;this.subs=[n.on(f,"open",this.onopen.bind(this)),n.on(f,"packet",this.onpacket.bind(this)),n.on(f,"error",this.onerror.bind(this)),n.on(f,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...f){return f.unshift("message"),this.emit.apply(this,f),this}emit(f,...c){if(s.hasOwnProperty(f))throw new Error('"'+f.toString()+'" is a reserved event name');if(c.unshift(f),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(c),this;const h={type:t.PacketType.EVENT,data:c};if(h.options={},h.options.compress=this.flags.compress!==!1,typeof c[c.length-1]=="function"){const p=this.ids++;i("emitting packet with ack id %d",p);const m=c.pop();this._registerAckCallback(p,m),h.id=p}const d=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!d||!this.connected)?i("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(h),this.packet(h)):this.sendBuffer.push(h),this.flags={},this}_registerAckCallback(f,c){var h;const d=(h=this.flags.timeout)!==null&&h!==void 0?h:this._opts.ackTimeout;if(d===void 0){this.acks[f]=c;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[f];for(let p=0;p<this.sendBuffer.length;p++)this.sendBuffer[p].id===f&&(i("removing packet with ack id %d from the buffer",f),this.sendBuffer.splice(p,1));i("event with ack id %d has timed out after %d ms",f,d),c.call(this,new Error("operation has timed out"))},d);this.acks[f]=(...p)=>{this.io.clearTimeoutFn(u),c.apply(this,[null,...p])}}emitWithAck(f,...c){const h=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((d,u)=>{c.push((p,m)=>h?p?u(p):d(m):d(p)),this.emit(f,...c)})}_addToQueue(f){let c;typeof f[f.length-1]=="function"&&(c=f.pop());const h={id:this._queueSeq++,tryCount:0,pending:!1,args:f,flags:Object.assign({fromQueue:!0},this.flags)};f.push((d,...u)=>h!==this._queue[0]?void 0:(d!==null?h.tryCount>this._opts.retries&&(i("packet [%d] is discarded after %d tries",h.id,h.tryCount),this._queue.shift(),c&&c(d)):(i("packet [%d] was successfully sent",h.id),this._queue.shift(),c&&c(null,...u)),h.pending=!1,this._drainQueue())),this._queue.push(h),this._drainQueue()}_drainQueue(f=!1){if(i("draining queue"),!this.connected||this._queue.length===0)return;const c=this._queue[0];if(c.pending&&!f){i("packet [%d] has already been sent and is waiting for an ack",c.id);return}c.pending=!0,c.tryCount++,i("sending packet [%d] (try n°%d)",c.id,c.tryCount),this.flags=c.flags,this.emit.apply(this,c.args)}packet(f){f.nsp=this.nsp,this.io._packet(f)}onopen(){i("transport is open - connecting"),typeof this.auth=="function"?this.auth(f=>{this._sendConnectPacket(f)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(f){this.packet({type:t.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},f):f})}onerror(f){this.connected||this.emitReserved("connect_error",f)}onclose(f,c){i("close (%s)",f),this.connected=!1,delete this.id,this.emitReserved("disconnect",f,c)}onpacket(f){if(f.nsp===this.nsp)switch(f.type){case t.PacketType.CONNECT:f.data&&f.data.sid?this.onconnect(f.data.sid,f.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case t.PacketType.EVENT:case t.PacketType.BINARY_EVENT:this.onevent(f);break;case t.PacketType.ACK:case t.PacketType.BINARY_ACK:this.onack(f);break;case t.PacketType.DISCONNECT:this.ondisconnect();break;case t.PacketType.CONNECT_ERROR:this.destroy();const h=new Error(f.data.message);h.data=f.data.data,this.emitReserved("connect_error",h);break}}onevent(f){const c=f.data||[];i("emitting event %j",c),f.id!=null&&(i("attaching ack callback to event"),c.push(this.ack(f.id))),this.connected?this.emitEvent(c):this.receiveBuffer.push(Object.freeze(c))}emitEvent(f){if(this._anyListeners&&this._anyListeners.length){const c=this._anyListeners.slice();for(const h of c)h.apply(this,f)}super.emit.apply(this,f),this._pid&&f.length&&typeof f[f.length-1]=="string"&&(this._lastOffset=f[f.length-1])}ack(f){const c=this;let h=!1;return function(...d){h||(h=!0,i("sending ack %j",d),c.packet({type:t.PacketType.ACK,id:f,data:d}))}}onack(f){const c=this.acks[f.id];typeof c=="function"?(i("calling ack %s with %j",f.id,f.data),c.apply(this,f.data),delete this.acks[f.id]):i("bad ack %s",f.id)}onconnect(f,c){i("socket connected with id %s",f),this.id=f,this.recovered=c&&this._pid===c,this._pid=c,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(f=>this.emitEvent(f)),this.receiveBuffer=[],this.sendBuffer.forEach(f=>{this.notifyOutgoingListeners(f),this.packet(f)}),this.sendBuffer=[]}ondisconnect(){i("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(f=>f()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(i("performing disconnect (%s)",this.nsp),this.packet({type:t.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(f){return this.flags.compress=f,this}get volatile(){return this.flags.volatile=!0,this}timeout(f){return this.flags.timeout=f,this}onAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(f),this}prependAny(f){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(f),this}offAny(f){if(!this._anyListeners)return this;if(f){const c=this._anyListeners;for(let h=0;h<c.length;h++)if(f===c[h])return c.splice(h,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(f),this}prependAnyOutgoing(f){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(f),this}offAnyOutgoing(f){if(!this._anyOutgoingListeners)return this;if(f){const c=this._anyOutgoingListeners;for(let h=0;h<c.length;h++)if(f===c[h])return c.splice(h,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(f){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const c=this._anyOutgoingListeners.slice();for(const h of c)h.apply(this,f.data)}}}return Ii.Socket=a,Ii}var ki={},kf;function PE(){if(kf)return ki;kf=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.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 ki.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},ki}var Mf;function IE(){if(Mf)return Pi;Mf=1;var e=ue&&ue.__createBinding||(Object.create?function(u,p,m,E){E===void 0&&(E=m),Object.defineProperty(u,E,{enumerable:!0,get:function(){return p[m]}})}:function(u,p,m,E){E===void 0&&(E=m),u[E]=p[m]}),t=ue&&ue.__setModuleDefault||(Object.create?function(u,p){Object.defineProperty(u,"default",{enumerable:!0,value:p})}:function(u,p){u.default=p}),n=ue&&ue.__importStar||function(u){if(u&&u.__esModule)return u;var p={};if(u!=null)for(var m in u)m!=="default"&&Object.prototype.hasOwnProperty.call(u,m)&&e(p,u,m);return t(p,u),p},r=ue&&ue.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.Manager=void 0;const o=Sp(),i=Op(),s=n(Uc()),a=xp(),l=PE(),f=kn,h=r(qt()).default("socket.io-client:manager");class d extends f.Emitter{constructor(p,m){var E;super(),this.nsps={},this.subs=[],p&&typeof p=="object"&&(m=p,p=void 0),m=m||{},m.path=m.path||"/socket.io",this.opts=m,o.installTimerFunctions(this,m),this.reconnection(m.reconnection!==!1),this.reconnectionAttempts(m.reconnectionAttempts||1/0),this.reconnectionDelay(m.reconnectionDelay||1e3),this.reconnectionDelayMax(m.reconnectionDelayMax||5e3),this.randomizationFactor((E=m.randomizationFactor)!==null&&E!==void 0?E:.5),this.backoff=new l.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(m.timeout==null?2e4:m.timeout),this._readyState="closed",this.uri=p;const T=m.parser||s;this.encoder=new T.Encoder,this.decoder=new T.Decoder,this._autoConnect=m.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(p){return arguments.length?(this._reconnection=!!p,this):this._reconnection}reconnectionAttempts(p){return p===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=p,this)}reconnectionDelay(p){var m;return p===void 0?this._reconnectionDelay:(this._reconnectionDelay=p,(m=this.backoff)===null||m===void 0||m.setMin(p),this)}randomizationFactor(p){var m;return p===void 0?this._randomizationFactor:(this._randomizationFactor=p,(m=this.backoff)===null||m===void 0||m.setJitter(p),this)}reconnectionDelayMax(p){var m;return p===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=p,(m=this.backoff)===null||m===void 0||m.setMax(p),this)}timeout(p){return arguments.length?(this._timeout=p,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(p){if(h("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;h("opening %s",this.uri),this.engine=new o.Socket(this.uri,this.opts);const m=this.engine,E=this;this._readyState="opening",this.skipReconnect=!1;const T=a.on(m,"open",function(){E.onopen(),p&&p()}),_=A=>{h("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",A),p?p(A):this.maybeReconnectOnOpen()},b=a.on(m,"error",_);if(this._timeout!==!1){const A=this._timeout;h("connect attempt will timeout after %d",A);const w=this.setTimeoutFn(()=>{h("connect attempt timed out after %d",A),T(),_(new Error("timeout")),m.close()},A);this.opts.autoUnref&&w.unref(),this.subs.push(()=>{this.clearTimeoutFn(w)})}return this.subs.push(T),this.subs.push(b),this}connect(p){return this.open(p)}onopen(){h("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const p=this.engine;this.subs.push(a.on(p,"ping",this.onping.bind(this)),a.on(p,"data",this.ondata.bind(this)),a.on(p,"error",this.onerror.bind(this)),a.on(p,"close",this.onclose.bind(this)),a.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(p){try{this.decoder.add(p)}catch(m){this.onclose("parse error",m)}}ondecoded(p){o.nextTick(()=>{this.emitReserved("packet",p)},this.setTimeoutFn)}onerror(p){h("error",p),this.emitReserved("error",p)}socket(p,m){let E=this.nsps[p];return E?this._autoConnect&&!E.active&&E.connect():(E=new i.Socket(this,p,m),this.nsps[p]=E),E}_destroy(p){const m=Object.keys(this.nsps);for(const E of m)if(this.nsps[E].active){h("socket %s is still active, skipping close",E);return}this._close()}_packet(p){h("writing packet %j",p);const m=this.encoder.encode(p);for(let E=0;E<m.length;E++)this.engine.write(m[E],p.options)}cleanup(){h("cleanup"),this.subs.forEach(p=>p()),this.subs.length=0,this.decoder.destroy()}_close(){h("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(p,m){h("closed due to %s",p),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",p,m),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const p=this;if(this.backoff.attempts>=this._reconnectionAttempts)h("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const m=this.backoff.duration();h("will wait %dms before reconnect attempt",m),this._reconnecting=!0;const E=this.setTimeoutFn(()=>{p.skipReconnect||(h("attempting reconnect"),this.emitReserved("reconnect_attempt",p.backoff.attempts),!p.skipReconnect&&p.open(T=>{T?(h("reconnect attempt error"),p._reconnecting=!1,p.reconnect(),this.emitReserved("reconnect_error",T)):(h("reconnect success"),p.onreconnect())}))},m);this.opts.autoUnref&&E.unref(),this.subs.push(()=>{this.clearTimeoutFn(E)})}}onreconnect(){const p=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",p)}}return Pi.Manager=d,Pi}var Bf;function LE(){return Bf||(Bf=1,function(e,t){var n=ue&&ue.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const r=RE(),o=IE();Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=Op();Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const a=n(qt()).default("socket.io-client"),l={};function f(h,d){typeof h=="object"&&(d=h,h=void 0),d=d||{};const u=r.url(h,d.path||"/socket.io"),p=u.source,m=u.id,E=u.path,T=l[m]&&E in l[m].nsps,_=d.forceNew||d["force new connection"]||d.multiplex===!1||T;let b;return _?(a("ignoring socket cache for %s",p),b=new o.Manager(p,d)):(l[m]||(a("new io instance for %s",p),l[m]=new o.Manager(p,d)),b=l[m]),u.query&&!d.query&&(d.query=u.queryKey),b.socket(u.path,d)}t.io=f,t.connect=f,t.default=f,Object.assign(f,{Manager:o.Manager,Socket:i.Socket,io:f,connect:f});var c=Uc();Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return c.protocol}}),e.exports=f}(wo,wo.exports)),wo.exports}var xs={},Mi={},Ff;function kE(){if(Ff)return Mi;Ff=1,Mi.byteLength=a,Mi.toByteArray=f,Mi.fromByteArray=d;for(var e=[],t=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=r.length;o<i;++o)e[o]=r[o],t[r.charCodeAt(o)]=o;t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;function s(u){var p=u.length;if(p%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var m=u.indexOf("=");m===-1&&(m=p);var E=m===p?0:4-m%4;return[m,E]}function a(u){var p=s(u),m=p[0],E=p[1];return(m+E)*3/4-E}function l(u,p,m){return(p+m)*3/4-m}function f(u){var p,m=s(u),E=m[0],T=m[1],_=new n(l(u,E,T)),b=0,A=T>0?E-4:E,w;for(w=0;w<A;w+=4)p=t[u.charCodeAt(w)]<<18|t[u.charCodeAt(w+1)]<<12|t[u.charCodeAt(w+2)]<<6|t[u.charCodeAt(w+3)],_[b++]=p>>16&255,_[b++]=p>>8&255,_[b++]=p&255;return T===2&&(p=t[u.charCodeAt(w)]<<2|t[u.charCodeAt(w+1)]>>4,_[b++]=p&255),T===1&&(p=t[u.charCodeAt(w)]<<10|t[u.charCodeAt(w+1)]<<4|t[u.charCodeAt(w+2)]>>2,_[b++]=p>>8&255,_[b++]=p&255),_}function c(u){return e[u>>18&63]+e[u>>12&63]+e[u>>6&63]+e[u&63]}function h(u,p,m){for(var E,T=[],_=p;_<m;_+=3)E=(u[_]<<16&16711680)+(u[_+1]<<8&65280)+(u[_+2]&255),T.push(c(E));return T.join("")}function d(u){for(var p,m=u.length,E=m%3,T=[],_=16383,b=0,A=m-E;b<A;b+=_)T.push(h(u,b,b+_>A?A:b+_));return E===1?(p=u[m-1],T.push(e[p>>2]+e[p<<4&63]+"==")):E===2&&(p=(u[m-2]<<8)+u[m-1],T.push(e[p>>10]+e[p>>4&63]+e[p<<2&63]+"=")),T.join("")}return Mi}var To={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var Uf;function ME(){return Uf||(Uf=1,To.read=function(e,t,n,r,o){var i,s,a=o*8-r-1,l=(1<<a)-1,f=l>>1,c=-7,h=n?o-1:0,d=n?-1:1,u=e[t+h];for(h+=d,i=u&(1<<-c)-1,u>>=-c,c+=a;c>0;i=i*256+e[t+h],h+=d,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=r;c>0;s=s*256+e[t+h],h+=d,c-=8);if(i===0)i=1-f;else{if(i===l)return s?NaN:(u?-1:1)*(1/0);s=s+Math.pow(2,r),i=i-f}return(u?-1:1)*s*Math.pow(2,i-r)},To.write=function(e,t,n,r,o,i){var s,a,l,f=i*8-o-1,c=(1<<f)-1,h=c>>1,d=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=r?0:i-1,p=r?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(s++,l/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(t*l-1)*Math.pow(2,o),s=s+h):(a=t*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;e[n+u]=a&255,u+=p,a/=256,o-=8);for(s=s<<o|a,f+=o;f>0;e[n+u]=s&255,u+=p,s/=256,f-=8);e[n+u-p]|=m*128}),To}/*!
57
57
  * The buffer module from node.js, for the browser.
58
58
  *
59
59
  * @author Feross Aboukhadijeh <https://feross.org>
60
60
  * @license MIT
61
- */var kf;function A_(){return kf||(kf=1,function(e){const t=O_(),n=x_(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=E,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=i(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const S=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(S,g),S.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(S){if(S>o)throw new RangeError('The value "'+S+'" is invalid for option "size"');const g=new Uint8Array(S);return Object.setPrototypeOf(g,a.prototype),g}function a(S,g,v){if(typeof S=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(S)}return l(S,g,v)}a.poolSize=8192;function l(S,g,v){if(typeof S=="string")return d(S,g);if(ArrayBuffer.isView(S))return p(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if($e(S,ArrayBuffer)||S&&$e(S.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($e(S,SharedArrayBuffer)||S&&$e(S.buffer,SharedArrayBuffer)))return m(S,g,v);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const x=S.valueOf&&S.valueOf();if(x!=null&&x!==S)return a.from(x,g,v);const P=_(S);if(P)return P;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return a.from(S[Symbol.toPrimitive]("string"),g,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S)}a.from=function(S,g,v){return l(S,g,v)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function f(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function u(S,g,v){return f(S),S<=0?s(S):g!==void 0?typeof v=="string"?s(S).fill(g,v):s(S).fill(g):s(S)}a.alloc=function(S,g,v){return u(S,g,v)};function h(S){return f(S),s(S<0?0:T(S)|0)}a.allocUnsafe=function(S){return h(S)},a.allocUnsafeSlow=function(S){return h(S)};function d(S,g){if((typeof g!="string"||g==="")&&(g="utf8"),!a.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const v=b(S,g)|0;let x=s(v);const P=x.write(S,g);return P!==v&&(x=x.slice(0,P)),x}function c(S){const g=S.length<0?0:T(S.length)|0,v=s(g);for(let x=0;x<g;x+=1)v[x]=S[x]&255;return v}function p(S){if($e(S,Uint8Array)){const g=new Uint8Array(S);return m(g.buffer,g.byteOffset,g.byteLength)}return c(S)}function m(S,g,v){if(g<0||S.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(S.byteLength<g+(v||0))throw new RangeError('"length" is outside of buffer bounds');let x;return g===void 0&&v===void 0?x=new Uint8Array(S):v===void 0?x=new Uint8Array(S,g):x=new Uint8Array(S,g,v),Object.setPrototypeOf(x,a.prototype),x}function _(S){if(a.isBuffer(S)){const g=T(S.length)|0,v=s(g);return v.length===0||S.copy(v,0,0,g),v}if(S.length!==void 0)return typeof S.length!="number"||St(S.length)?s(0):c(S);if(S.type==="Buffer"&&Array.isArray(S.data))return c(S.data)}function T(S){if(S>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return S|0}function E(S){return+S!=S&&(S=0),a.alloc(+S)}a.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==a.prototype},a.compare=function(g,v){if($e(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),$e(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),!a.isBuffer(g)||!a.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===v)return 0;let x=g.length,P=v.length;for(let U=0,H=Math.min(x,P);U<H;++U)if(g[U]!==v[U]){x=g[U],P=v[U];break}return x<P?-1:P<x?1:0},a.isEncoding=function(g){switch(String(g).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(g,v){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return a.alloc(0);let x;if(v===void 0)for(v=0,x=0;x<g.length;++x)v+=g[x].length;const P=a.allocUnsafe(v);let U=0;for(x=0;x<g.length;++x){let H=g[x];if($e(H,Uint8Array))U+H.length>P.length?(a.isBuffer(H)||(H=a.from(H)),H.copy(P,U)):Uint8Array.prototype.set.call(P,H,U);else if(a.isBuffer(H))H.copy(P,U);else throw new TypeError('"list" argument must be an Array of Buffers');U+=H.length}return P};function b(S,g){if(a.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||$e(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);const v=S.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&v===0)return 0;let P=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return Rt(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return wt(S).length;default:if(P)return x?-1:Rt(S).length;g=(""+g).toLowerCase(),P=!0}}a.byteLength=b;function A(S,g,v){let x=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,g>>>=0,v<=g))return"";for(S||(S="utf8");;)switch(S){case"hex":return de(this,g,v);case"utf8":case"utf-8":return oe(this,g,v);case"ascii":return z(this,g,v);case"latin1":case"binary":return J(this,g,v);case"base64":return Y(this,g,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,g,v);default:if(x)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),x=!0}}a.prototype._isBuffer=!0;function w(S,g,v){const x=S[g];S[g]=S[v],S[v]=x}a.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let v=0;v<g;v+=2)w(this,v,v+1);return this},a.prototype.swap32=function(){const g=this.length;if(g%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let v=0;v<g;v+=4)w(this,v,v+3),w(this,v+1,v+2);return this},a.prototype.swap64=function(){const g=this.length;if(g%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let v=0;v<g;v+=8)w(this,v,v+7),w(this,v+1,v+6),w(this,v+2,v+5),w(this,v+3,v+4);return this},a.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?oe(this,0,g):A.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(g){if(!a.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:a.compare(this,g)===0},a.prototype.inspect=function(){let g="";const v=e.INSPECT_MAX_BYTES;return g=this.toString("hex",0,v).replace(/(.{2})/g,"$1 ").trim(),this.length>v&&(g+=" ... "),"<Buffer "+g+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(g,v,x,P,U){if($e(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),!a.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(v===void 0&&(v=0),x===void 0&&(x=g?g.length:0),P===void 0&&(P=0),U===void 0&&(U=this.length),v<0||x>g.length||P<0||U>this.length)throw new RangeError("out of range index");if(P>=U&&v>=x)return 0;if(P>=U)return-1;if(v>=x)return 1;if(v>>>=0,x>>>=0,P>>>=0,U>>>=0,this===g)return 0;let H=U-P,le=x-v;const be=Math.min(H,le),we=this.slice(P,U),Se=g.slice(v,x);for(let he=0;he<be;++he)if(we[he]!==Se[he]){H=we[he],le=Se[he];break}return H<le?-1:le<H?1:0};function N(S,g,v,x,P){if(S.length===0)return-1;if(typeof v=="string"?(x=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,St(v)&&(v=P?0:S.length-1),v<0&&(v=S.length+v),v>=S.length){if(P)return-1;v=S.length-1}else if(v<0)if(P)v=0;else return-1;if(typeof g=="string"&&(g=a.from(g,x)),a.isBuffer(g))return g.length===0?-1:F(S,g,v,x,P);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(S,g,v):Uint8Array.prototype.lastIndexOf.call(S,g,v):F(S,[g],v,x,P);throw new TypeError("val must be string, number or Buffer")}function F(S,g,v,x,P){let U=1,H=S.length,le=g.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(S.length<2||g.length<2)return-1;U=2,H/=2,le/=2,v/=2}function be(Se,he){return U===1?Se[he]:Se.readUInt16BE(he*U)}let we;if(P){let Se=-1;for(we=v;we<H;we++)if(be(S,we)===be(g,Se===-1?0:we-Se)){if(Se===-1&&(Se=we),we-Se+1===le)return Se*U}else Se!==-1&&(we-=we-Se),Se=-1}else for(v+le>H&&(v=H-le),we=v;we>=0;we--){let Se=!0;for(let he=0;he<le;he++)if(be(S,we+he)!==be(g,he)){Se=!1;break}if(Se)return we}return-1}a.prototype.includes=function(g,v,x){return this.indexOf(g,v,x)!==-1},a.prototype.indexOf=function(g,v,x){return N(this,g,v,x,!0)},a.prototype.lastIndexOf=function(g,v,x){return N(this,g,v,x,!1)};function M(S,g,v,x){v=Number(v)||0;const P=S.length-v;x?(x=Number(x),x>P&&(x=P)):x=P;const U=g.length;x>U/2&&(x=U/2);let H;for(H=0;H<x;++H){const le=parseInt(g.substr(H*2,2),16);if(St(le))return H;S[v+H]=le}return H}function q(S,g,v,x){return gt(Rt(g,S.length-v),S,v,x)}function W(S,g,v,x){return gt(mt(g),S,v,x)}function V(S,g,v,x){return gt(wt(g),S,v,x)}function j(S,g,v,x){return gt(br(g,S.length-v),S,v,x)}a.prototype.write=function(g,v,x,P){if(v===void 0)P="utf8",x=this.length,v=0;else if(x===void 0&&typeof v=="string")P=v,x=this.length,v=0;else if(isFinite(v))v=v>>>0,isFinite(x)?(x=x>>>0,P===void 0&&(P="utf8")):(P=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const U=this.length-v;if((x===void 0||x>U)&&(x=U),g.length>0&&(x<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");let H=!1;for(;;)switch(P){case"hex":return M(this,g,v,x);case"utf8":case"utf-8":return q(this,g,v,x);case"ascii":case"latin1":case"binary":return W(this,g,v,x);case"base64":return V(this,g,v,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,g,v,x);default:if(H)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),H=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Y(S,g,v){return g===0&&v===S.length?t.fromByteArray(S):t.fromByteArray(S.slice(g,v))}function oe(S,g,v){v=Math.min(S.length,v);const x=[];let P=g;for(;P<v;){const U=S[P];let H=null,le=U>239?4:U>223?3:U>191?2:1;if(P+le<=v){let be,we,Se,he;switch(le){case 1:U<128&&(H=U);break;case 2:be=S[P+1],(be&192)===128&&(he=(U&31)<<6|be&63,he>127&&(H=he));break;case 3:be=S[P+1],we=S[P+2],(be&192)===128&&(we&192)===128&&(he=(U&15)<<12|(be&63)<<6|we&63,he>2047&&(he<55296||he>57343)&&(H=he));break;case 4:be=S[P+1],we=S[P+2],Se=S[P+3],(be&192)===128&&(we&192)===128&&(Se&192)===128&&(he=(U&15)<<18|(be&63)<<12|(we&63)<<6|Se&63,he>65535&&he<1114112&&(H=he))}}H===null?(H=65533,le=1):H>65535&&(H-=65536,x.push(H>>>10&1023|55296),H=56320|H&1023),x.push(H),P+=le}return k(x)}const K=4096;function k(S){const g=S.length;if(g<=K)return String.fromCharCode.apply(String,S);let v="",x=0;for(;x<g;)v+=String.fromCharCode.apply(String,S.slice(x,x+=K));return v}function z(S,g,v){let x="";v=Math.min(S.length,v);for(let P=g;P<v;++P)x+=String.fromCharCode(S[P]&127);return x}function J(S,g,v){let x="";v=Math.min(S.length,v);for(let P=g;P<v;++P)x+=String.fromCharCode(S[P]);return x}function de(S,g,v){const x=S.length;(!g||g<0)&&(g=0),(!v||v<0||v>x)&&(v=x);let P="";for(let U=g;U<v;++U)P+=tt[S[U]];return P}function X(S,g,v){const x=S.slice(g,v);let P="";for(let U=0;U<x.length-1;U+=2)P+=String.fromCharCode(x[U]+x[U+1]*256);return P}a.prototype.slice=function(g,v){const x=this.length;g=~~g,v=v===void 0?x:~~v,g<0?(g+=x,g<0&&(g=0)):g>x&&(g=x),v<0?(v+=x,v<0&&(v=0)):v>x&&(v=x),v<g&&(v=g);const P=this.subarray(g,v);return Object.setPrototypeOf(P,a.prototype),P};function ee(S,g,v){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+g>v)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(g,v,x){g=g>>>0,v=v>>>0,x||ee(g,v,this.length);let P=this[g],U=1,H=0;for(;++H<v&&(U*=256);)P+=this[g+H]*U;return P},a.prototype.readUintBE=a.prototype.readUIntBE=function(g,v,x){g=g>>>0,v=v>>>0,x||ee(g,v,this.length);let P=this[g+--v],U=1;for(;v>0&&(U*=256);)P+=this[g+--v]*U;return P},a.prototype.readUint8=a.prototype.readUInt8=function(g,v){return g=g>>>0,v||ee(g,1,this.length),this[g]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(g,v){return g=g>>>0,v||ee(g,2,this.length),this[g]|this[g+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(g,v){return g=g>>>0,v||ee(g,2,this.length),this[g]<<8|this[g+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},a.prototype.readBigUInt64LE=Ye(function(g){g=g>>>0,ze(g,"offset");const v=this[g],x=this[g+7];(v===void 0||x===void 0)&&De(g,this.length-8);const P=v+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,U=this[++g]+this[++g]*2**8+this[++g]*2**16+x*2**24;return BigInt(P)+(BigInt(U)<<BigInt(32))}),a.prototype.readBigUInt64BE=Ye(function(g){g=g>>>0,ze(g,"offset");const v=this[g],x=this[g+7];(v===void 0||x===void 0)&&De(g,this.length-8);const P=v*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],U=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+x;return(BigInt(P)<<BigInt(32))+BigInt(U)}),a.prototype.readIntLE=function(g,v,x){g=g>>>0,v=v>>>0,x||ee(g,v,this.length);let P=this[g],U=1,H=0;for(;++H<v&&(U*=256);)P+=this[g+H]*U;return U*=128,P>=U&&(P-=Math.pow(2,8*v)),P},a.prototype.readIntBE=function(g,v,x){g=g>>>0,v=v>>>0,x||ee(g,v,this.length);let P=v,U=1,H=this[g+--P];for(;P>0&&(U*=256);)H+=this[g+--P]*U;return U*=128,H>=U&&(H-=Math.pow(2,8*v)),H},a.prototype.readInt8=function(g,v){return g=g>>>0,v||ee(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},a.prototype.readInt16LE=function(g,v){g=g>>>0,v||ee(g,2,this.length);const x=this[g]|this[g+1]<<8;return x&32768?x|4294901760:x},a.prototype.readInt16BE=function(g,v){g=g>>>0,v||ee(g,2,this.length);const x=this[g+1]|this[g]<<8;return x&32768?x|4294901760:x},a.prototype.readInt32LE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},a.prototype.readInt32BE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},a.prototype.readBigInt64LE=Ye(function(g){g=g>>>0,ze(g,"offset");const v=this[g],x=this[g+7];(v===void 0||x===void 0)&&De(g,this.length-8);const P=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(x<<24);return(BigInt(P)<<BigInt(32))+BigInt(v+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),a.prototype.readBigInt64BE=Ye(function(g){g=g>>>0,ze(g,"offset");const v=this[g],x=this[g+7];(v===void 0||x===void 0)&&De(g,this.length-8);const P=(v<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(P)<<BigInt(32))+BigInt(this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+x)}),a.prototype.readFloatLE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),n.read(this,g,!0,23,4)},a.prototype.readFloatBE=function(g,v){return g=g>>>0,v||ee(g,4,this.length),n.read(this,g,!1,23,4)},a.prototype.readDoubleLE=function(g,v){return g=g>>>0,v||ee(g,8,this.length),n.read(this,g,!0,52,8)},a.prototype.readDoubleBE=function(g,v){return g=g>>>0,v||ee(g,8,this.length),n.read(this,g,!1,52,8)};function ue(S,g,v,x,P,U){if(!a.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>P||g<U)throw new RangeError('"value" argument is out of bounds');if(v+x>S.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(g,v,x,P){if(g=+g,v=v>>>0,x=x>>>0,!P){const le=Math.pow(2,8*x)-1;ue(this,g,v,x,le,0)}let U=1,H=0;for(this[v]=g&255;++H<x&&(U*=256);)this[v+H]=g/U&255;return v+x},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(g,v,x,P){if(g=+g,v=v>>>0,x=x>>>0,!P){const le=Math.pow(2,8*x)-1;ue(this,g,v,x,le,0)}let U=x-1,H=1;for(this[v+U]=g&255;--U>=0&&(H*=256);)this[v+U]=g/H&255;return v+x},a.prototype.writeUint8=a.prototype.writeUInt8=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,1,255,0),this[v]=g&255,v+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,2,65535,0),this[v]=g&255,this[v+1]=g>>>8,v+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,2,65535,0),this[v]=g>>>8,this[v+1]=g&255,v+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,4,4294967295,0),this[v+3]=g>>>24,this[v+2]=g>>>16,this[v+1]=g>>>8,this[v]=g&255,v+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,4,4294967295,0),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4};function ce(S,g,v,x,P){te(g,x,P,S,v,7);let U=Number(g&BigInt(4294967295));S[v++]=U,U=U>>8,S[v++]=U,U=U>>8,S[v++]=U,U=U>>8,S[v++]=U;let H=Number(g>>BigInt(32)&BigInt(4294967295));return S[v++]=H,H=H>>8,S[v++]=H,H=H>>8,S[v++]=H,H=H>>8,S[v++]=H,v}function Ve(S,g,v,x,P){te(g,x,P,S,v,7);let U=Number(g&BigInt(4294967295));S[v+7]=U,U=U>>8,S[v+6]=U,U=U>>8,S[v+5]=U,U=U>>8,S[v+4]=U;let H=Number(g>>BigInt(32)&BigInt(4294967295));return S[v+3]=H,H=H>>8,S[v+2]=H,H=H>>8,S[v+1]=H,H=H>>8,S[v]=H,v+8}a.prototype.writeBigUInt64LE=Ye(function(g,v=0){return ce(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Ye(function(g,v=0){return Ve(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(g,v,x,P){if(g=+g,v=v>>>0,!P){const be=Math.pow(2,8*x-1);ue(this,g,v,x,be-1,-be)}let U=0,H=1,le=0;for(this[v]=g&255;++U<x&&(H*=256);)g<0&&le===0&&this[v+U-1]!==0&&(le=1),this[v+U]=(g/H>>0)-le&255;return v+x},a.prototype.writeIntBE=function(g,v,x,P){if(g=+g,v=v>>>0,!P){const be=Math.pow(2,8*x-1);ue(this,g,v,x,be-1,-be)}let U=x-1,H=1,le=0;for(this[v+U]=g&255;--U>=0&&(H*=256);)g<0&&le===0&&this[v+U+1]!==0&&(le=1),this[v+U]=(g/H>>0)-le&255;return v+x},a.prototype.writeInt8=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,1,127,-128),g<0&&(g=255+g+1),this[v]=g&255,v+1},a.prototype.writeInt16LE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,2,32767,-32768),this[v]=g&255,this[v+1]=g>>>8,v+2},a.prototype.writeInt16BE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,2,32767,-32768),this[v]=g>>>8,this[v+1]=g&255,v+2},a.prototype.writeInt32LE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,4,2147483647,-2147483648),this[v]=g&255,this[v+1]=g>>>8,this[v+2]=g>>>16,this[v+3]=g>>>24,v+4},a.prototype.writeInt32BE=function(g,v,x){return g=+g,v=v>>>0,x||ue(this,g,v,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4},a.prototype.writeBigInt64LE=Ye(function(g,v=0){return ce(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Ye(function(g,v=0){return Ve(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Q(S,g,v,x,P,U){if(v+x>S.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function re(S,g,v,x,P){return g=+g,v=v>>>0,P||Q(S,g,v,4),n.write(S,g,v,x,23,4),v+4}a.prototype.writeFloatLE=function(g,v,x){return re(this,g,v,!0,x)},a.prototype.writeFloatBE=function(g,v,x){return re(this,g,v,!1,x)};function Pe(S,g,v,x,P){return g=+g,v=v>>>0,P||Q(S,g,v,8),n.write(S,g,v,x,52,8),v+8}a.prototype.writeDoubleLE=function(g,v,x){return Pe(this,g,v,!0,x)},a.prototype.writeDoubleBE=function(g,v,x){return Pe(this,g,v,!1,x)},a.prototype.copy=function(g,v,x,P){if(!a.isBuffer(g))throw new TypeError("argument should be a Buffer");if(x||(x=0),!P&&P!==0&&(P=this.length),v>=g.length&&(v=g.length),v||(v=0),P>0&&P<x&&(P=x),P===x||g.length===0||this.length===0)return 0;if(v<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("Index out of range");if(P<0)throw new RangeError("sourceEnd out of bounds");P>this.length&&(P=this.length),g.length-v<P-x&&(P=g.length-v+x);const U=P-x;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(v,x,P):Uint8Array.prototype.set.call(g,this.subarray(x,P),v),U},a.prototype.fill=function(g,v,x,P){if(typeof g=="string"){if(typeof v=="string"?(P=v,v=0,x=this.length):typeof x=="string"&&(P=x,x=this.length),P!==void 0&&typeof P!="string")throw new TypeError("encoding must be a string");if(typeof P=="string"&&!a.isEncoding(P))throw new TypeError("Unknown encoding: "+P);if(g.length===1){const H=g.charCodeAt(0);(P==="utf8"&&H<128||P==="latin1")&&(g=H)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(v<0||this.length<v||this.length<x)throw new RangeError("Out of range index");if(x<=v)return this;v=v>>>0,x=x===void 0?this.length:x>>>0,g||(g=0);let U;if(typeof g=="number")for(U=v;U<x;++U)this[U]=g;else{const H=a.isBuffer(g)?g:a.from(g,P),le=H.length;if(le===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(U=0;U<x-v;++U)this[U+v]=H[U%le]}return this};const xe={};function at(S,g,v){xe[S]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:g.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${S}]`,this.stack,delete this.name}get code(){return S}set code(P){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:P,writable:!0})}toString(){return`${this.name} [${S}]: ${this.message}`}}}at("ERR_BUFFER_OUT_OF_BOUNDS",function(S){return S?`${S} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),at("ERR_INVALID_ARG_TYPE",function(S,g){return`The "${S}" argument must be of type number. Received type ${typeof g}`},TypeError),at("ERR_OUT_OF_RANGE",function(S,g,v){let x=`The value of "${S}" is out of range.`,P=v;return Number.isInteger(v)&&Math.abs(v)>2**32?P=ct(String(v)):typeof v=="bigint"&&(P=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(P=ct(P)),P+="n"),x+=` It must be ${g}. Received ${P}`,x},RangeError);function ct(S){let g="",v=S.length;const x=S[0]==="-"?1:0;for(;v>=x+4;v-=3)g=`_${S.slice(v-3,v)}${g}`;return`${S.slice(0,v)}${g}`}function _t(S,g,v){ze(g,"offset"),(S[g]===void 0||S[g+v]===void 0)&&De(g,S.length-(v+1))}function te(S,g,v,x,P,U){if(S>v||S<g){const H=typeof g=="bigint"?"n":"";let le;throw U>3?g===0||g===BigInt(0)?le=`>= 0${H} and < 2${H} ** ${(U+1)*8}${H}`:le=`>= -(2${H} ** ${(U+1)*8-1}${H}) and < 2 ** ${(U+1)*8-1}${H}`:le=`>= ${g}${H} and <= ${v}${H}`,new xe.ERR_OUT_OF_RANGE("value",le,S)}_t(x,P,U)}function ze(S,g){if(typeof S!="number")throw new xe.ERR_INVALID_ARG_TYPE(g,"number",S)}function De(S,g,v){throw Math.floor(S)!==S?(ze(S,v),new xe.ERR_OUT_OF_RANGE(v||"offset","an integer",S)):g<0?new xe.ERR_BUFFER_OUT_OF_BOUNDS:new xe.ERR_OUT_OF_RANGE(v||"offset",`>= ${v?1:0} and <= ${g}`,S)}const bt=/[^+/0-9A-Za-z-_]/g;function Gt(S){if(S=S.split("=")[0],S=S.trim().replace(bt,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function Rt(S,g){g=g||1/0;let v;const x=S.length;let P=null;const U=[];for(let H=0;H<x;++H){if(v=S.charCodeAt(H),v>55295&&v<57344){if(!P){if(v>56319){(g-=3)>-1&&U.push(239,191,189);continue}else if(H+1===x){(g-=3)>-1&&U.push(239,191,189);continue}P=v;continue}if(v<56320){(g-=3)>-1&&U.push(239,191,189),P=v;continue}v=(P-55296<<10|v-56320)+65536}else P&&(g-=3)>-1&&U.push(239,191,189);if(P=null,v<128){if((g-=1)<0)break;U.push(v)}else if(v<2048){if((g-=2)<0)break;U.push(v>>6|192,v&63|128)}else if(v<65536){if((g-=3)<0)break;U.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((g-=4)<0)break;U.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return U}function mt(S){const g=[];for(let v=0;v<S.length;++v)g.push(S.charCodeAt(v)&255);return g}function br(S,g){let v,x,P;const U=[];for(let H=0;H<S.length&&!((g-=2)<0);++H)v=S.charCodeAt(H),x=v>>8,P=v%256,U.push(P),U.push(x);return U}function wt(S){return t.toByteArray(Gt(S))}function gt(S,g,v,x){let P;for(P=0;P<x&&!(P+v>=g.length||P>=S.length);++P)g[P+v]=S[P];return P}function $e(S,g){return S instanceof g||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===g.name}function St(S){return S!==S}const tt=function(){const S="0123456789abcdef",g=new Array(256);for(let v=0;v<16;++v){const x=v*16;for(let P=0;P<16;++P)g[x+P]=S[v]+S[P]}return g}();function Ye(S){return typeof BigInt>"u"?wr:S}function wr(){throw new Error("BigInt not supported")}}(bs)),bs}(function(e,t){(function(n,r){e.exports=r(ME(),YE(),ZE(),Ud(),a_,T_(),A_())})(ae,function(n,r,o,i,s,a,l){return function(){var f={809:function(c){c.exports=n},30:function(c){c.exports=r},36:function(c){c.exports=o},300:function(c){c.exports=i},408:function(c){c.exports=l},25:function(c){c.exports=s},130:function(c){c.exports=a}},u={};function h(c){var p=u[c];if(p!==void 0)return p.exports;var m=u[c]={exports:{}};return f[c](m,m.exports,h),m.exports}h.n=function(c){var p=c&&c.__esModule?function(){return c.default}:function(){return c};return h.d(p,{a:p}),p},h.d=function(c,p){for(var m in p)h.o(p,m)&&!h.o(c,m)&&Object.defineProperty(c,m,{enumerable:!0,get:p[m]})},h.o=function(c,p){return Object.prototype.hasOwnProperty.call(c,p)},h.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})};var d={};return function(){h.r(d),h.d(d,{assets:function(){return k},auth:function(){return ee},buildAnswer:function(){return sg},buildCarouselCard:function(){return ag},buildQuestion:function(){return Me},carouselCards:function(){return yn},contentInteraction:function(){return Ye},decodeBase64:function(){return cg},default:function(){return lg},editorialPages:function(){return $},features:function(){return v},getEntries:function(){return c.getEntries},getEntry:function(){return c.getEntry},management:function(){return Tr},payments:function(){return Ar},people:function(){return It},peopleEngagement:function(){return cr},qaQuestions:function(){return Qe},reportError:function(){return p.reportError},search:function(){return mn}});var c=h(809),p=h(30),m=h(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:T,LOCALHOST:E,STAGING:b,STAGING_SPLITTER:A},ENVIRONMENTS:{PRODUCTION:w,LOCAL:N}}}=_,{HUBSPOT:{ENVIRONMENTS_MAPPING:F,EMAIL_IDS:M}}=_;let q={emailIds:{}};var W=h(300),V=h.n(W);const j=async I=>{try{const{message:B,response:L,request:D}=I;let Z=B;return L?Z+=` - The request was made and the server responded with ${JSON.stringify({status:L.status,data:L.data})}`:D&&(Z+=" - The request was made but no response was received"),console.warn(Z),await(0,p.reportError)(new Error(Z)),Z}catch(B){return console.warn(`Cannot handle error: ${B.message}`),B.message}},{APIS:{ASSETS_API:{BASE_URL:Y,ENDPOINTS:{USERS:oe,CERTIFICATES:K}}}}=_;var k={certificates:{create:async(I,B)=>{let L=[];try{const{data:D}=await V().post(`${Y}${oe}/${I}${K}`,B);D&&(L=D)}catch(D){await j(D)}return L}}};const{APIS:{AUTH_API:{BASE_URL:z,ENDPOINTS:{USER_PASSWORD:J,USERS:de}}},USERS:{MYSELF:X}}=_;var ee={userPassword:{update:async I=>{let B=null;try{B=await V().put(`${z}${de}/${X}${J}`,I)}catch(L){B={message:(((L||{}).response||{}).data||{}).message},await j(L)}return B}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:ue,ENDPOINTS:{ANSWERS:ce,QUESTIONS:Ve,LIKES:Q}}}}=_,re=`${ue}${Ve}`;var Pe={create:async({questionSlug:I},B)=>{try{await V().post(`${re}/${encodeURIComponent(I)}${ce}`,B)}catch(L){const D=await j(L);throw new Error(D)}},remove:async({questionSlug:I,answerSlug:B})=>{try{await V().delete(`${re}/${encodeURIComponent(I)}${ce}/${encodeURIComponent(B)}`)}catch(L){const D=await j(L);throw new Error(D)}},update:async({questionSlug:I,answerSlug:B},L)=>{try{return await V().put(`${re}/${encodeURIComponent(I)}${ce}/${encodeURIComponent(B)}`,L)}catch(D){const Z=await j(D);throw new Error(Z)}},like:async({questionSlug:I,answerSlug:B},L)=>{try{return await V().post(`${re}/${encodeURIComponent(I)}${ce}/${encodeURIComponent(B)}${Q}`,L)}catch(D){const Z=await j(D);throw new Error(Z)}},unlike:async({questionSlug:I,answerSlug:B})=>{try{return await V().delete(`${re}/${encodeURIComponent(I)}${ce}/${encodeURIComponent(B)}${Q}`)}catch(L){const D=await j(L);throw new Error(D)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:xe,ENDPOINTS:{QUESTIONS:at}}}}=_,ct=`${xe}${at}`;var _t={create:async I=>{try{return await V().post(ct,I)}catch(B){const L=await j(B);throw new Error(L)}},remove:async({questionSlug:I})=>{try{await V().delete(`${ct}/${encodeURIComponent(I)}`)}catch(B){const L=await j(B);throw new Error(L)}},update:async({questionSlug:I},B)=>{try{return await V().put(`${ct}/${encodeURIComponent(I)}`,B)}catch(L){const D=await j(L);throw new Error(D)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:te,ENDPOINTS:{REPLIES:ze,ANSWERS:De,QUESTIONS:bt,LIKES:Gt}}}}=_,Rt=`${te}${bt}`,mt=({questionSlug:I,answerSlug:B,replySlug:L},D=!1)=>{let Z=`${Rt}/${encodeURIComponent(I)}${De}/${encodeURIComponent(B)}${ze}`;return L&&(Z=`${Z}/${encodeURIComponent(L)}`,D&&(Z=`${Z}${Gt}`)),Z};var br={create:async({questionSlug:I,answerSlug:B},L)=>{try{return await V().post(mt({questionSlug:I,answerSlug:B}),L)}catch(D){const Z=await j(D);throw new Error(Z)}},update:async({questionSlug:I,answerSlug:B,replySlug:L},D)=>{try{return await V().put(mt({questionSlug:I,answerSlug:B,replySlug:L}),D)}catch(Z){const Te=await j(Z);throw new Error(Te)}},remove:async({questionSlug:I,answerSlug:B,replySlug:L})=>{try{await V().delete(mt({questionSlug:I,answerSlug:B,replySlug:L}))}catch(D){const Z=await j(D);throw new Error(Z)}},like:async({questionSlug:I,answerSlug:B,replySlug:L},D)=>{try{await V().post(mt({questionSlug:I,answerSlug:B,replySlug:L},!0),D)}catch(Z){const Te=await j(Z);throw new Error(Te)}},unlike:async({questionSlug:I,answerSlug:B,replySlug:L})=>{try{await V().delete(mt({questionSlug:I,answerSlug:B,replySlug:L},!0))}catch(D){const Z=await j(D);throw new Error(Z)}},getReplyUrl:mt};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:wt,ENDPOINTS:{QUESTIONS:gt,ANSWERS:$e,LIKES:St}}}}=_,tt=`${wt}${gt}`;var Ye={answers:Pe,questions:_t,replies:br,likes:{create:async(I,B)=>{try{return await V().post(`${tt}/${encodeURIComponent(I)}${$e}/${encodeURIComponent(B)}${St}`)}catch(L){const D=await j(L);throw new Error(D)}},remove:async(I,B)=>{try{return await V().delete(`${tt}/${encodeURIComponent(I)}${$e}/${encodeURIComponent(B)}${St}`)}catch(L){const D=await j(L);throw new Error(D)}}}};const{APIS:{FEATURES_API:{BASE_URL:wr,ENDPOINTS:{FLAGS:S}}}}=_,g=`${wr}${S}`;var v={flags:{read:async I=>{let B=null;try{const{data:L}=await V().get(`${g}/${encodeURIComponent(I)}`);L!=null&&L.name&&(L!=null&&L.featureState)&&(B=L)}catch(L){await j(L)}return B}}};const{APIS:{MANAGEMENT_API:{BASE_URL:x,ENDPOINTS:{ACCOUNTS:P}}}}=_;var U={create:async I=>{try{await V().post(`${x}${P}`,I)}catch(B){throw await j(B),B}},read:async I=>{let B=null;try{({data:B}=await V().get(`${x}${P}/${encodeURIComponent(I)}`))}catch(L){await j(L)}return B},update:async(I,B)=>{try{await V().put(`${x}${P}/${encodeURIComponent(I)}`,B)}catch(L){throw await j(L),L}}};const{APIS:{MANAGEMENT_API:{BASE_URL:H,ENDPOINTS:{BULK_ENROLMENTS:le}}}}=_;var be={create:async I=>{try{await V().post(`${H}${le}`,I)}catch(B){throw await j(B),B}}};const{APIS:{MANAGEMENT_API:{BASE_URL:we,ENDPOINTS:{EVENT_REGISTRATIONS:Se}}}}=_;var he={create:async I=>{try{await V().post(`${we}${Se}`,I)}catch(B){const L=await j(B);throw new Error(L)}}};const{APIS:{MANAGEMENT_API:{BASE_URL:lt,ENDPOINTS:{LOGINS:ir,LOGIN_PASSWORDLESS:Sr}}}}=_,Wt=`${lt}${ir}`;var Tr={accounts:U,bulkEnrolments:be,eventRegistrations:he,passwordless:{update:async I=>{try{await V().put(`${Wt}/${encodeURIComponent(I)}${Sr}`)}catch(B){throw await j(B),B}}}};const{APIS:{PAYMENTS_API:{BASE_URL_V2:Vt,ENDPOINTS:{PRODUCTS:Or}}}}=_,xr=`${Vt}${Or}`;var Ar={products:{list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(xr,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Pt,ENDPOINTS:{BULK_ENROLMENTS:nn}}}}=_;var Tt={list:async I=>{let B=[];try{const{data:L}=await V().get(`${Pt}${nn}`,{params:I});L&&L.length&&(B=L)}catch(L){await j(L)}return B}},Fn=h(25);const{OK:Un,MULTIPLE_CHOICES:Dn,NOT_FOUND:on,FORBIDDEN:Cr}=Fn.StatusCodes,Fe=I=>I>=Un&&I<Dn||I===Cr||I===on,{APIS:{PEOPLE_API:{BASE_URL_V2:Rr,ENDPOINTS:{USERS:Pr}}}}=_,zt=async I=>{let B=null;try{const{data:L}=await V().get(`${Rr}${Pr}/${encodeURIComponent(I)}`,{validateStatus:Fe});L&&L.id&&(B=L)}catch(L){await j(L)}return B},an=async I=>{let B=[];try{if(I&&I.length<2)throw new Error("users list method requires at least two ids");const L=I.map(Z=>`ids=${encodeURIComponent(Z)}`).join("&"),D=await V().get(`${Rr}${Pr}?${L}`,{validateStatus:Fe});D&&D.length&&(B=D)}catch(L){await j(L)}return B};var $n={read:zt,update:async(I,B)=>{let L=!1;try{const{data:D}=await V().put(`${Rr}${Pr}/${encodeURIComponent(I)}`,B);L=!(!D||!D.id)}catch(D){await j(D)}return L},list:an};const{APIS:{PEOPLE_API:{BASE_URL_V2:je,ENDPOINTS:{USERS:jn,USER_LIKES:Hn}}},USERS:{MYSELF:qn}}=_,Gn=`${je}${jn}/${qn}${Hn}`,Ir=async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(Gn,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B};var Je={list:Ir},Wn={authors:{readQuestionAuthors:async(I,B,L)=>{try{if(I.author=await zt(I.authorId),I.answers&&I.answers.length&&!L.ignoreAnswersAuthors){I.answers.sort((Z,Te)=>new Date(Te.updatedAt)-new Date(Z.updatedAt)),I.totalAnswers=I.answers.length;let D=I.answers;if(L.limit&&L.pageNumber){const Z=L.limit*(L.pageNumber-1);D=I.answers.slice(Z,Z+L.limit)}for(let Z of D){Z.author=Z.authorId&&await zt(Z.authorId)||{};const[Te]=B?await Ir({contentType:_.CONTENTFUL.ANSWERS.TYPE,contentSlug:Z.slug}):[null];Z.userLiked=!!Te}I.answers=D}else I.answers||(I.answers=[]);return I}catch(D){throw await j(D),new Error(`Cannot read authors for question: ${D.message}`)}},readAuthors:async(I=[])=>{let B=[];try{if(Array.isArray(I)===!1)throw new Error("authorIds is not an array!");if(I&&I.length===1){const L=await zt(I[0]);L&&B.push(L)}else if(I&&I.length>1){const L=await an(I);L&&L.length>0&&(B=L)}}catch(L){throw await j(L),new Error(`Cannot read authors: ${L.message}`)}return B}}};const{APIS:{PEOPLE_API:{BASE_URL:Vn,ENDPOINTS:{REGISTRATIONS:zn}}}}=_;var Yn={list:async I=>{let B=[];try{const{data:L}=await V().get(`${Vn}${zn}`,{params:I});L&&L.length&&(B=L)}catch(L){await j(L)}return B}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Kn,ENDPOINTS:{USERS:or,USER_COURSES:sn}}},USERS:{MYSELF:ar}}=_,st=`${Kn}${or}/${ar}${sn}`;var Nr={create:async I=>{try{await V().post(st,I)}catch(B){await j(B)}},list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(st,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B},update:async(I,B)=>{try{await V().put(`${st}/${I}`,B)}catch(L){await j(L)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Qn,ENDPOINTS:{USERS:Xn,USER_EVENTS:Jn}}},USERS:{MYSELF:Zn}}=_,ei=`${Qn}${Xn}/${Zn}${Jn}`;var sr={list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(ei,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Lr,ENDPOINTS:{USERS:Yt,USER_LESSONS:un}}},USERS:{MYSELF:cn}}=_,ln=`${Lr}${Yt}/${cn}${un}`;var ti={create:async I=>{let B=null;try{B=await V().post(ln,I)}catch(L){await j(L)}return B},list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(ln,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B}};const{APIS:{PEOPLE_API:{BASE_URL_V2:ri,ENDPOINTS:{USERS:ni,USER_PRODUCTS:kr}}},USERS:{MYSELF:ii}}=_,Br=`${ri}${ni}/${ii}${kr}`;var Kt={create:async I=>{let B=null;try{B=await V().post(Br,I)}catch(L){await j(L)}return B},list:async I=>{let B=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(Br,L);D&&D.length&&(B=D)}catch(D){await j(D)}return B},update:async(I,B)=>{try{await V().put(`${Br}/${I}`,B)}catch(L){await j(L)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:ft,ENDPOINTS:{USERS:Ot,USER_RATINGS:xt}}},USERS:{MYSELF:oi}}=_,dt=`${ft}${Ot}/${oi}${xt}`;var It={bulkEnrolments:Tt,handlers:Wn,registrations:Yn,users:$n,userCourses:Nr,userEvents:sr,userLessons:ti,userLikes:Je,userProducts:Kt,userRatings:{create:async I=>{let B=null;try{const{data:L}=await V().post(dt,I);L!=null&&L.id&&(B=L)}catch(L){await j(L)}return B},update:async(I,B)=>{try{await V().put(`${dt}/${I}`,B)}catch(L){await j(L)}}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:ai,ENDPOINTS:{ENQUIRY_EMAILS:si}}}}=_;var ui={create:async I=>{let B=null;try{const{data:L}=await V().post(`${ai}${si}`,I);L&&(B=L)}catch(L){await j(L)}return B}},fn={forms:{sendEnquiryEmails:async I=>{let B=null;try{const{emailIds:L}=q;B=await cr.emails.create({...L,...I})}catch(L){await j(L)}return B}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:Ke,ENDPOINTS:{USERS:dn,USER_PROPERTIES:hn}}},USERS:{MYSELF:ur}}=_;var cr={emails:ui,handlers:fn,userProperties:{update:async(I,B)=>{try{await V().put(`${Ke}${dn}/${ur}${hn}/${I}`,B)}catch(L){await j(L)}}}},lr=h(130);const{APIS:{SEARCH_API:{BASE_URL:ci,ENDPOINTS:{SEARCH:pn}}}}=_,Mr=`${ci}${pn}`;var mn={ask:async I=>{try{let B=null;const{data:L}=await V().get(Mr,{params:{question:I}});return L!=null&&L.answer&&(L!=null&&L.references)&&(L!=null&&L.version)&&(B=L),B}catch(B){const L=await j(B);throw new Error(L)}},stream:(I,B,L)=>{const D=(0,lr.io)(void 0,{path:"/api/search-api/web-sockets"});function Z(){D.emit("search",{question:I})}function Te(Be){L(Be),Ne(),D.disconnect()}function Ne(){D.off("connect",Z),D.off("update",B),D.off("result",Te)}return D.on("connect",Z),D.on("update",B),D.on("result",Te),Ne}};const{CONTENTFUL:yt}=_,{CARD_TYPES:Fr}=yt.CAROUSELS;var yn={read:async(I,B)=>{try{if(!B||!B.sys||!B.sys.id)throw new Error("Invalid link to card");if(!I||!Fr[I])throw new Error("Unsupported card content type");const{INCLUDE:L,SELECT:D}=Fr[I];return await(0,c.getEntry)({content_type:I,"sys.id":B.sys.id,include:L,select:D},{assetDetails:!0})}catch(L){throw await j(L),new Error(`Cannot read carousel card: ${L.message}`)}}};const{CONTENTFUL:li}=_,{INCLUDE:y,SELECT:O,TYPE:R}=li.EDITORIAL_PAGES;var $={read:async I=>{try{return await(0,c.getEntry)({content_type:R,"fields.slug":I,include:y,select:O})}catch(B){throw await j(B),new Error(`Cannot read editorial page: ${B.message}`)}}};const{CONTENTFUL:fe}=_,{TYPE:ie,ORDER:pe,SELECT:me,SKIP:ke,LIMIT:_e,INCLUDE:He}=fe.QUESTIONS;var Qe={read:async I=>{try{return await(0,c.getEntry)({content_type:ie,"fields.slug":I,include:2,select:me})}catch(B){throw await j(B),new Error(`Cannot read question: ${B.message}`)}},list:async(I={})=>{try{return await(0,c.getEntries)({content_type:ie,include:He,limit:_e,order:pe,select:me,skip:ke,...I})}catch(B){throw await j(B),new Error(`Cannot list questions: ${B.message}`)}}},Me=async(I,B,L={ignoreAnswersAuthors:!1})=>{try{let D={};return D=await Qe.read(I),D=await It.handlers.authors.readQuestionAuthors(D,B,L),D}catch(D){throw await j(D),new Error(`Cannot build question: ${D.message}`)}};const{ARTICLES:{TYPE:qe},COURSES:{TYPE:Ue},EVENTS:{TYPE:Nt},LISTS:{TYPE:At},QUESTIONS:{TYPE:Qt},LEARNING_HUB:{TYPE:Ji}}=_.CONTENTFUL,Lt=I=>I&&I.url?(Object.assign(I,{aspect:"responsiveCard",query:"q=90&fit=fill"}),I):null,fr={[qe]:async I=>{const{authorIds:B,authorTag:L,image:D,publishedDate:Z,readingTime:Te,slug:Ne,title:Be}=I,ht=await It.handlers.authors.readAuthors(B),kt=ht&&ht.length?ht:L?[L]:null;return{banner:Lt(D),contributors:kt,publishedDate:Z,readingTime:Te,slug:Ne,title:Be}},[Ue]:async(I,B)=>{const{banner:L,freeCourse:D,partnershipDetails:Z,slug:Te,title:Ne,registered:Be}=I,ht={banner:Lt(L),slug:Te,title:Ne,pill:D?"free":"premium",registered:!!Be};if(Z){const{partners:kt}=Z;ht.partner=kt&&kt.length&&Z.partners[0]}if(Be===void 0&&B){const[kt]=await It.userProducts.list({courseSlug:Te,isEnrolled:!0,scope:"active"});ht.registered=!!kt}return ht},[Nt]:async(I,B)=>{const{bannerImage:L,defaultStartDate:D,isEventOngoing:Z,slug:Te,speakers:Ne,title:Be,registered:ht}=I,kt=new Date(D),fg=!!kt&&kt<new Date;if(Ne&&Ne.length)for(const Zi of Ne)Zi.image=(na=Zi.image)&&na.url?`${na.url}?w=100&h=100&fit=thumb&f=center`:null;var na;const rc={banner:Lt(L),dateHasPassed:fg,title:Be,slug:Te,isOngoingEvent:Z,contributors:Ne,startDate:kt,registered:!!ht};if(ht===void 0&&B){const[Zi]=await It.userEvents.list({eventSlug:Te});rc.registered=!!Zi}return rc},[At]:async I=>{const{hero:B,slug:L,title:D}=I;return{banner:Lt(B),slug:L,title:D}},[Qt]:async I=>{const{answers:B,authorId:L,createdAt:D,slug:Z,title:Te}=I;let Ne=null;if(L){const Be=await It.users.read(L);Be&&(Ne=Be)}return{answers:B&&B.length?B.length:0,contributors:Ne?[Ne]:[],createdAt:D,slug:Z,title:Te}},[Ji]:I=>{const{bannerSection:B,customLabel:L,slug:D,title:Z}=I;return{banner:Lt(B.image),slug:D,title:Z,customLabel:L}},people:I=>{const{id:B,name:L,jobTitle:D,location:Z,image:Te}=I;return{profile:Te,slug:B,title:L,text:D,secondaryText:Z}}};var ag=async({contentType:I,...B}={},L)=>{try{if(!fr[I])throw new Error("Content type not supported");if(typeof fr[I]!="function")throw new Error("No builder function for content type");return I!=="people"&&B.sys&&B.sys.type&&B.sys.type==="Link"&&(B=await yn.read(I,B)),{contentType:I,...await fr[I](B,L)}}catch(D){throw await j(D),new Error(`Cannot build carousel card: ${D.message}`)}},sg=async(I,B,L={})=>{try{if(!I.replies||I.replies.length===0)return I.replies=[],I;I.replies.sort((Z,Te)=>new Date(Z.createdAt)-new Date(Te.createdAt)),I.totalReplies=I.totalReplies||I.replies.length;let D=I.replies;if(L.limit&&L.pageNumber){const Z=L.limit*(L.pageNumber-1);D=I.replies.slice(Z,Z+L.limit)}for(const Z of D){if(Z.authorId===I.authorId){Z.author=I.author,Z.userLiked=!1;continue}Z.author=Z.authorId&&await zt(Z.authorId)||{};const[Te]=B?await Ir({contentType:_.CONTENTFUL.REPLIES.TYPE,contentSlug:Z.slug}):[null];Z.userLiked=!!Te}return I.replies=D,I}catch(D){throw await j(D),new Error(`Cannot build replies for answer: ${D.message}`)}},ug=h(408);const cg=I=>I&&ug.Buffer.from(I,"base64").toString("ascii");function lg({contentContext:I=null,errorsContext:B=null,gtmContext:L=null,origin:D}){try{const Z=(Te=>{let Ne=null;Te?Ne=Te:typeof window<"u"&&(Ne=window.origin||window.location.origin),Ne||new Error("Cannot select environment: Website not defined");let Be=null;const ht=Ne.match(b);return ht?Be=ht[1].split(A)[0]:Ne===T?Be=w:Ne.includes(E)&&(Be=N),Be||new Error(`Cannot select environment: No rule for website ${Ne}`),Be})(D);return I&&(0,c.setContext)(Object.assign({},I,{environment:Z})),B&&(0,p.setContext)(Object.assign({},B,{environment:Z})),L&&((0,m.setContext)(Object.assign({},L,{environment:Z})),(0,m.setupGTM)()),(({environment:Te})=>{const Ne=(Be=>{if(!Be)throw new Error("Cannot map environment: Environment not defined");if(!F[Be])throw new Error(`Cannot map environment: No mapping found for environment ${Be}`);return F[Be]})(Te);q.emailIds=M[Ne]})(Object.assign({},{environment:Z})),Z}catch(Z){console.warn(`Cannot load SDK: ${Z.message}`)}}}(),d}()})})(Rd);var C_=Rd.exports;const Bi={Off:"off",On:"on",Cookie:"cookie"},R_=e=>{const[t]=Cd(),[n,r]=G.useState(null),[o,i]=G.useState(!1),[s,a]=G.useState(Bi.Off);return G.useEffect(()=>{e&&C_.features.flags.read(e).then(l=>{a(l.featureState),r(null)}).catch(l=>{a(Bi.Off),r(l)})},[e]),G.useEffect(()=>{switch(s){case Bi.Off:i(!1);break;case Bi.On:i(!0);break;case Bi.Cookie:i(!!t[`feature-${e}`]);break;default:i(!1)}},[s,t]),{isFeatureActive:o,error:n}};function P_(e,t,n){var r=this,o=G.useRef(null),i=G.useRef(0),s=G.useRef(null),a=G.useRef([]),l=G.useRef(),f=G.useRef(),u=G.useRef(e),h=G.useRef(!0);G.useEffect(function(){u.current=e},[e]);var d=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var c=!!(n=n||{}).leading,p=!("trailing"in n)||!!n.trailing,m="maxWait"in n,_=m?Math.max(+n.maxWait||0,t):null;G.useEffect(function(){return h.current=!0,function(){h.current=!1}},[]);var T=G.useMemo(function(){var E=function(M){var q=a.current,W=l.current;return a.current=l.current=null,i.current=M,f.current=u.current.apply(W,q)},b=function(M,q){d&&cancelAnimationFrame(s.current),s.current=d?requestAnimationFrame(M):setTimeout(M,q)},A=function(M){if(!h.current)return!1;var q=M-o.current;return!o.current||q>=t||q<0||m&&M-i.current>=_},w=function(M){return s.current=null,p&&a.current?E(M):(a.current=l.current=null,f.current)},N=function M(){var q=Date.now();if(A(q))return w(q);if(h.current){var W=t-(q-o.current),V=m?Math.min(W,_-(q-i.current)):W;b(M,V)}},F=function(){var M=Date.now(),q=A(M);if(a.current=[].slice.call(arguments),l.current=r,o.current=M,q){if(!s.current&&h.current)return i.current=o.current,b(N,t),c?E(o.current):f.current;if(m)return b(N,t),E(o.current)}return s.current||b(N,t),f.current};return F.cancel=function(){s.current&&(d?cancelAnimationFrame(s.current):clearTimeout(s.current)),i.current=0,a.current=o.current=l.current=s.current=null},F.isPending=function(){return!!s.current},F.flush=function(){return s.current?w(Date.now()):f.current},F},[c,m,t,_,p,d]);return T}function wp(e,t,n){var r=n===void 0?{}:n,o=r.leading,i=r.trailing;return P_(e,t,{maxWait:t,leading:o===void 0||o,trailing:i===void 0||i})}let ws;const Ki=(e=!0,t=!1)=>{if(!e)return;const[n,r]=G.useState(0)||[!1,()=>{}];G.useEffect(()=>(i(),window.addEventListener("resize",s),()=>{clearTimeout(ws),s.flush(),window.removeEventListener("resize",s)}),[]);const o=()=>window.innerWidth,i=()=>{r(o())},s=wp(()=>{o()!==n&&(t&&(clearTimeout(ws),document.body.classList.add("is-resizing"),ws=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),i())},500,{leading:!0});return n},Sp=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:n=()=>{},scrollUp:r=()=>{}}})=>{if(!window)return;const[o,i]=G.useState({current:0,past:0})||[!1,()=>{}],[s,a]=G.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];G.useEffect(()=>(l(),window.addEventListener("scroll",f),()=>{f.flush(),window.removeEventListener("scroll",f)}),[]);const l=()=>{const u=window.scrollY,h=o.current,d=u-h,c=d>0?"down":"up";if(i({current:u,past:h}),c==="down"){u>=e+t.down&&!s.scrollDown&&(!s.scrollUp||d>t.up)&&(n(),a({scrollUp:!1,scrollDown:!0}));return}Math.abs(d)>=t.up&&!s.scrollUp&&(r(),a({scrollUp:!0,scrollDown:!1}))},f=wp(()=>{l()},250);return o};var Uo={exports:{}};Uo.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",f="[object Error]",u="[object Function]",h="[object GeneratorFunction]",d="[object Map]",c="[object Number]",p="[object Object]",m="[object Promise]",_="[object RegExp]",T="[object Set]",E="[object String]",b="[object Symbol]",A="[object WeakMap]",w="[object ArrayBuffer]",N="[object DataView]",F="[object Float32Array]",M="[object Float64Array]",q="[object Int8Array]",W="[object Int16Array]",V="[object Int32Array]",j="[object Uint8Array]",Y="[object Uint8ClampedArray]",oe="[object Uint16Array]",K="[object Uint32Array]",k=/[\\^$.*+?()[\]{}|]/g,z=/\w*$/,J=/^\[object .+?Constructor\]$/,de=/^(?:0|[1-9]\d*)$/,X={};X[i]=X[s]=X[w]=X[N]=X[a]=X[l]=X[F]=X[M]=X[q]=X[W]=X[V]=X[d]=X[c]=X[p]=X[_]=X[T]=X[E]=X[b]=X[j]=X[Y]=X[oe]=X[K]=!0,X[f]=X[u]=X[A]=!1;var ee=typeof ae=="object"&&ae&&ae.Object===Object&&ae,ue=typeof self=="object"&&self&&self.Object===Object&&self,ce=ee||ue||Function("return this")(),Ve=t&&!t.nodeType&&t,Q=Ve&&!0&&e&&!e.nodeType&&e,re=Q&&Q.exports===Ve;function Pe(y,O){return y.set(O[0],O[1]),y}function xe(y,O){return y.add(O),y}function at(y,O){for(var R=-1,$=y?y.length:0;++R<$&&O(y[R],R,y)!==!1;);return y}function ct(y,O){for(var R=-1,$=O.length,fe=y.length;++R<$;)y[fe+R]=O[R];return y}function _t(y,O,R,$){var fe=-1,ie=y?y.length:0;for($&&ie&&(R=y[++fe]);++fe<ie;)R=O(R,y[fe],fe,y);return R}function te(y,O){for(var R=-1,$=Array(y);++R<y;)$[R]=O(R);return $}function ze(y,O){return y==null?void 0:y[O]}function De(y){var O=!1;if(y!=null&&typeof y.toString!="function")try{O=!!(y+"")}catch{}return O}function bt(y){var O=-1,R=Array(y.size);return y.forEach(function($,fe){R[++O]=[fe,$]}),R}function Gt(y,O){return function(R){return y(O(R))}}function Rt(y){var O=-1,R=Array(y.size);return y.forEach(function($){R[++O]=$}),R}var mt=Array.prototype,br=Function.prototype,wt=Object.prototype,gt=ce["__core-js_shared__"],$e=function(){var y=/[^.]+$/.exec(gt&&gt.keys&&gt.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),St=br.toString,tt=wt.hasOwnProperty,Ye=wt.toString,wr=RegExp("^"+St.call(tt).replace(k,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=re?ce.Buffer:void 0,g=ce.Symbol,v=ce.Uint8Array,x=Gt(Object.getPrototypeOf,Object),P=Object.create,U=wt.propertyIsEnumerable,H=mt.splice,le=Object.getOwnPropertySymbols,be=S?S.isBuffer:void 0,we=Gt(Object.keys,Object),Se=ft(ce,"DataView"),he=ft(ce,"Map"),lt=ft(ce,"Promise"),ir=ft(ce,"Set"),Sr=ft(ce,"WeakMap"),Wt=ft(Object,"create"),Tr=Ke(Se),Vt=Ke(he),Or=Ke(lt),xr=Ke(ir),Ar=Ke(Sr),Pt=g?g.prototype:void 0,nn=Pt?Pt.valueOf:void 0;function Tt(y){var O=-1,R=y?y.length:0;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function Fn(){this.__data__=Wt?Wt(null):{}}function Un(y){return this.has(y)&&delete this.__data__[y]}function Dn(y){var O=this.__data__;if(Wt){var R=O[y];return R===r?void 0:R}return tt.call(O,y)?O[y]:void 0}function on(y){var O=this.__data__;return Wt?O[y]!==void 0:tt.call(O,y)}function Cr(y,O){var R=this.__data__;return R[y]=Wt&&O===void 0?r:O,this}Tt.prototype.clear=Fn,Tt.prototype.delete=Un,Tt.prototype.get=Dn,Tt.prototype.has=on,Tt.prototype.set=Cr;function Fe(y){var O=-1,R=y?y.length:0;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function Rr(){this.__data__=[]}function Pr(y){var O=this.__data__,R=ar(O,y);if(R<0)return!1;var $=O.length-1;return R==$?O.pop():H.call(O,R,1),!0}function zt(y){var O=this.__data__,R=ar(O,y);return R<0?void 0:O[R][1]}function an(y){return ar(this.__data__,y)>-1}function $n(y,O){var R=this.__data__,$=ar(R,y);return $<0?R.push([y,O]):R[$][1]=O,this}Fe.prototype.clear=Rr,Fe.prototype.delete=Pr,Fe.prototype.get=zt,Fe.prototype.has=an,Fe.prototype.set=$n;function je(y){var O=-1,R=y?y.length:0;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function jn(){this.__data__={hash:new Tt,map:new(he||Fe),string:new Tt}}function Hn(y){return Kt(this,y).delete(y)}function qn(y){return Kt(this,y).get(y)}function Gn(y){return Kt(this,y).has(y)}function Ir(y,O){return Kt(this,y).set(y,O),this}je.prototype.clear=jn,je.prototype.delete=Hn,je.prototype.get=qn,je.prototype.has=Gn,je.prototype.set=Ir;function Je(y){this.__data__=new Fe(y)}function Wn(){this.__data__=new Fe}function Vn(y){return this.__data__.delete(y)}function zn(y){return this.__data__.get(y)}function Yn(y){return this.__data__.has(y)}function Kn(y,O){var R=this.__data__;if(R instanceof Fe){var $=R.__data__;if(!he||$.length<n-1)return $.push([y,O]),this;R=this.__data__=new je($)}return R.set(y,O),this}Je.prototype.clear=Wn,Je.prototype.delete=Vn,Je.prototype.get=zn,Je.prototype.has=Yn,Je.prototype.set=Kn;function or(y,O){var R=cr(y)||ur(y)?te(y.length,String):[],$=R.length,fe=!!$;for(var ie in y)(O||tt.call(y,ie))&&!(fe&&(ie=="length"||ai(ie,$)))&&R.push(ie);return R}function sn(y,O,R){var $=y[O];(!(tt.call(y,O)&&hn($,R))||R===void 0&&!(O in y))&&(y[O]=R)}function ar(y,O){for(var R=y.length;R--;)if(hn(y[R][0],O))return R;return-1}function st(y,O){return y&&kr(O,gn(O),y)}function Nr(y,O,R,$,fe,ie,pe){var me;if($&&(me=ie?$(y,fe,ie,pe):$(y)),me!==void 0)return me;if(!yt(y))return y;var ke=cr(y);if(ke){if(me=oi(y),!O)return ni(y,me)}else{var _e=xt(y),He=_e==u||_e==h;if(pn(y))return sr(y,O);if(_e==p||_e==i||He&&!ie){if(De(y))return ie?y:{};if(me=dt(He?{}:y),!O)return ii(y,st(me,y))}else{if(!X[_e])return ie?y:{};me=It(y,_e,Nr,O)}}pe||(pe=new Je);var Qe=pe.get(y);if(Qe)return Qe;if(pe.set(y,me),!ke)var Me=R?Br(y):gn(y);return at(Me||y,function(qe,Ue){Me&&(Ue=qe,qe=y[Ue]),sn(me,Ue,Nr(qe,O,R,$,Ue,y,pe))}),me}function Qn(y){return yt(y)?P(y):{}}function Xn(y,O,R){var $=O(y);return cr(y)?$:ct($,R(y))}function Jn(y){return Ye.call(y)}function Zn(y){if(!yt(y)||ui(y))return!1;var O=Mr(y)||De(y)?wr:J;return O.test(Ke(y))}function ei(y){if(!fn(y))return we(y);var O=[];for(var R in Object(y))tt.call(y,R)&&R!="constructor"&&O.push(R);return O}function sr(y,O){if(O)return y.slice();var R=new y.constructor(y.length);return y.copy(R),R}function Lr(y){var O=new y.constructor(y.byteLength);return new v(O).set(new v(y)),O}function Yt(y,O){var R=O?Lr(y.buffer):y.buffer;return new y.constructor(R,y.byteOffset,y.byteLength)}function un(y,O,R){var $=O?R(bt(y),!0):bt(y);return _t($,Pe,new y.constructor)}function cn(y){var O=new y.constructor(y.source,z.exec(y));return O.lastIndex=y.lastIndex,O}function ln(y,O,R){var $=O?R(Rt(y),!0):Rt(y);return _t($,xe,new y.constructor)}function ti(y){return nn?Object(nn.call(y)):{}}function ri(y,O){var R=O?Lr(y.buffer):y.buffer;return new y.constructor(R,y.byteOffset,y.length)}function ni(y,O){var R=-1,$=y.length;for(O||(O=Array($));++R<$;)O[R]=y[R];return O}function kr(y,O,R,$){R||(R={});for(var fe=-1,ie=O.length;++fe<ie;){var pe=O[fe],me=$?$(R[pe],y[pe],pe,R,y):void 0;sn(R,pe,me===void 0?y[pe]:me)}return R}function ii(y,O){return kr(y,Ot(y),O)}function Br(y){return Xn(y,gn,Ot)}function Kt(y,O){var R=y.__data__;return si(O)?R[typeof O=="string"?"string":"hash"]:R.map}function ft(y,O){var R=ze(y,O);return Zn(R)?R:void 0}var Ot=le?Gt(le,Object):yn,xt=Jn;(Se&&xt(new Se(new ArrayBuffer(1)))!=N||he&&xt(new he)!=d||lt&&xt(lt.resolve())!=m||ir&&xt(new ir)!=T||Sr&&xt(new Sr)!=A)&&(xt=function(y){var O=Ye.call(y),R=O==p?y.constructor:void 0,$=R?Ke(R):void 0;if($)switch($){case Tr:return N;case Vt:return d;case Or:return m;case xr:return T;case Ar:return A}return O});function oi(y){var O=y.length,R=y.constructor(O);return O&&typeof y[0]=="string"&&tt.call(y,"index")&&(R.index=y.index,R.input=y.input),R}function dt(y){return typeof y.constructor=="function"&&!fn(y)?Qn(x(y)):{}}function It(y,O,R,$){var fe=y.constructor;switch(O){case w:return Lr(y);case a:case l:return new fe(+y);case N:return Yt(y,$);case F:case M:case q:case W:case V:case j:case Y:case oe:case K:return ri(y,$);case d:return un(y,$,R);case c:case E:return new fe(y);case _:return cn(y);case T:return ln(y,$,R);case b:return ti(y)}}function ai(y,O){return O=O??o,!!O&&(typeof y=="number"||de.test(y))&&y>-1&&y%1==0&&y<O}function si(y){var O=typeof y;return O=="string"||O=="number"||O=="symbol"||O=="boolean"?y!=="__proto__":y===null}function ui(y){return!!$e&&$e in y}function fn(y){var O=y&&y.constructor,R=typeof O=="function"&&O.prototype||wt;return y===R}function Ke(y){if(y!=null){try{return St.call(y)}catch{}try{return y+""}catch{}}return""}function dn(y){return Nr(y,!0,!0)}function hn(y,O){return y===O||y!==y&&O!==O}function ur(y){return ci(y)&&tt.call(y,"callee")&&(!U.call(y,"callee")||Ye.call(y)==i)}var cr=Array.isArray;function lr(y){return y!=null&&mn(y.length)&&!Mr(y)}function ci(y){return Fr(y)&&lr(y)}var pn=be||li;function Mr(y){var O=yt(y)?Ye.call(y):"";return O==u||O==h}function mn(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=o}function yt(y){var O=typeof y;return!!y&&(O=="object"||O=="function")}function Fr(y){return!!y&&typeof y=="object"}function gn(y){return lr(y)?or(y):ei(y)}function yn(){return[]}function li(){return!1}e.exports=dn})(Uo,Uo.exports);var I_=Uo.exports;const N_=jt(I_);var L_="Expected a function",Tp="__lodash_hash_undefined__",Op=1/0,k_=9007199254740991,B_="[object Function]",M_="[object GeneratorFunction]",F_="[object Symbol]",U_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,D_=/^\w*$/,$_=/^\./,j_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H_=/[\\^$.*+?()[\]{}|]/g,q_=/\\(\\)?/g,G_=/^\[object .+?Constructor\]$/,W_=/^(?:0|[1-9]\d*)$/,V_=typeof ae=="object"&&ae&&ae.Object===Object&&ae,z_=typeof self=="object"&&self&&self.Object===Object&&self,ku=V_||z_||Function("return this")();function Y_(e,t){return e==null?void 0:e[t]}function K_(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Q_=Array.prototype,X_=Function.prototype,xp=Object.prototype,Ss=ku["__core-js_shared__"],Bf=function(){var e=/[^.]+$/.exec(Ss&&Ss.keys&&Ss.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ap=X_.toString,Yo=xp.hasOwnProperty,Cp=xp.toString,J_=RegExp("^"+Ap.call(Yo).replace(H_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mf=ku.Symbol,Z_=Q_.splice,eb=Rp(ku,"Map"),Hi=Rp(Object,"create"),Ff=Mf?Mf.prototype:void 0,Uf=Ff?Ff.toString:void 0;function Xr(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function tb(){this.__data__=Hi?Hi(null):{}}function rb(e){return this.has(e)&&delete this.__data__[e]}function nb(e){var t=this.__data__;if(Hi){var n=t[e];return n===Tp?void 0:n}return Yo.call(t,e)?t[e]:void 0}function ib(e){var t=this.__data__;return Hi?t[e]!==void 0:Yo.call(t,e)}function ob(e,t){var n=this.__data__;return n[e]=Hi&&t===void 0?Tp:t,this}Xr.prototype.clear=tb;Xr.prototype.delete=rb;Xr.prototype.get=nb;Xr.prototype.has=ib;Xr.prototype.set=ob;function kn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ab(){this.__data__=[]}function sb(e){var t=this.__data__,n=Ko(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Z_.call(t,n,1),!0}function ub(e){var t=this.__data__,n=Ko(t,e);return n<0?void 0:t[n][1]}function cb(e){return Ko(this.__data__,e)>-1}function lb(e,t){var n=this.__data__,r=Ko(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}kn.prototype.clear=ab;kn.prototype.delete=sb;kn.prototype.get=ub;kn.prototype.has=cb;kn.prototype.set=lb;function en(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function fb(){this.__data__={hash:new Xr,map:new(eb||kn),string:new Xr}}function db(e){return Qo(this,e).delete(e)}function hb(e){return Qo(this,e).get(e)}function pb(e){return Qo(this,e).has(e)}function mb(e,t){return Qo(this,e).set(e,t),this}en.prototype.clear=fb;en.prototype.delete=db;en.prototype.get=hb;en.prototype.has=pb;en.prototype.set=mb;function gb(e,t,n){var r=e[t];(!(Yo.call(e,t)&&Pp(r,n))||n===void 0&&!(t in e))&&(e[t]=n)}function Ko(e,t){for(var n=e.length;n--;)if(Pp(e[n][0],t))return n;return-1}function yb(e){if(!Do(e)||Tb(e))return!1;var t=Cb(e)||K_(e)?J_:G_;return t.test(Ab(e))}function vb(e,t,n,r){if(!Do(e))return e;t=wb(t,e)?[t]:_b(t);for(var o=-1,i=t.length,s=i-1,a=e;a!=null&&++o<i;){var l=xb(t[o]),f=n;if(o!=s){var u=a[l];f=r?r(u,l,a):void 0,f===void 0&&(f=Do(u)?u:bb(t[o+1])?[]:{})}gb(a,l,f),a=a[l]}return e}function Eb(e){if(typeof e=="string")return e;if(Mu(e))return Uf?Uf.call(e):"";var t=e+"";return t=="0"&&1/e==-Op?"-0":t}function _b(e){return Ip(e)?e:Ob(e)}function Qo(e,t){var n=e.__data__;return Sb(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Rp(e,t){var n=Y_(e,t);return yb(n)?n:void 0}function bb(e,t){return t=t??k_,!!t&&(typeof e=="number"||W_.test(e))&&e>-1&&e%1==0&&e<t}function wb(e,t){if(Ip(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Mu(e)?!0:D_.test(e)||!U_.test(e)||t!=null&&e in Object(t)}function Sb(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Tb(e){return!!Bf&&Bf in e}var Ob=Bu(function(e){e=Pb(e);var t=[];return $_.test(e)&&t.push(""),e.replace(j_,function(n,r,o,i){t.push(o?i.replace(q_,"$1"):r||n)}),t});function xb(e){if(typeof e=="string"||Mu(e))return e;var t=e+"";return t=="0"&&1/e==-Op?"-0":t}function Ab(e){if(e!=null){try{return Ap.call(e)}catch{}try{return e+""}catch{}}return""}function Bu(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(L_);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s),s};return n.cache=new(Bu.Cache||en),n}Bu.Cache=en;function Pp(e,t){return e===t||e!==e&&t!==t}var Ip=Array.isArray;function Cb(e){var t=Do(e)?Cp.call(e):"";return t==B_||t==M_}function Do(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Rb(e){return!!e&&typeof e=="object"}function Mu(e){return typeof e=="symbol"||Rb(e)&&Cp.call(e)==F_}function Pb(e){return e==null?"":Eb(e)}function Ib(e,t,n){return e==null?e:vb(e,t,n)}var Nb=Ib;const Lb=jt(Nb),kb=(e,t)=>{Array.isArray(t)||(t=[t]);const n=N_(e);return t.forEach(({type:r,value:o})=>{Lb(n,r,o)}),n},Np=e=>{const t=[];return e.forEach(n=>{const r=parseInt(n);isNaN(r)||t.push(r)}),t.sort((n,r)=>n-r)},Lp=(e,t,n)=>{let r=n.mobile;for(const o in t){const i=parseInt(String(t[o]));if(e>=i)r=n[i];else if(e<i)break}return r},Df=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),Bb=e=>{let i;try{i=new Date().getTime()-new Date(e).getTime()}catch{return""}const s=i/36e5,a=Math.floor(i/864e5);if(a<1)return s<1?{path:"now"}:{path:"hours",number:Math.floor(s)};if(a<7)return{path:"days",number:a};const l=Math.floor(a/7);return l<=52?{path:"weeks",number:l}:{path:"years",number:Math.floor(a/365)}},Mb=e=>new Promise(t=>setTimeout(t,e)),Fu={apolitical:"Apolitical",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 (coming soon)",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_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_delete:"Delete",discussion_delete_deleting:"Deleting...",discussion_delete_error:"We are unable to delete your {action} at the moment. Please try again later or contact us if problem persists.",discussion_action_answer:"answer",discussion_action_post:"post",discussion_action_response:"response",discussion_action_reply:"reply",discussion_action_question:"question",discussion_answer_likes:"{count, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_answer_likes_like:"Like this answer",discussion_answer_likes_unlike:"Unlike answer",discussion_reply_likes:"{count, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_reply_likes_like:"Like this reply",discussion_reply_likes_unlike:"Unlike reply",discussion_thread_reply_button:"Reply",discussion_thread_report_subject:"Report a post on Apolitical",discussion_thread_report_body:`I'd like to report the {contentType} <{contentSlug}> at {contentUrl}.
61
+ */var Df;function BE(){return Df||(Df=1,function(e){const t=kE(),n=ME(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=i(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const S=new Uint8Array(1),g={foo:function(){return 42}};return Object.setPrototypeOf(g,Uint8Array.prototype),Object.setPrototypeOf(S,g),S.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function s(S){if(S>o)throw new RangeError('The value "'+S+'" is invalid for option "size"');const g=new Uint8Array(S);return Object.setPrototypeOf(g,a.prototype),g}function a(S,g,v){if(typeof S=="number"){if(typeof g=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return h(S)}return l(S,g,v)}a.poolSize=8192;function l(S,g,v){if(typeof S=="string")return d(S,g);if(ArrayBuffer.isView(S))return p(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if(je(S,ArrayBuffer)||S&&je(S.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(je(S,SharedArrayBuffer)||S&&je(S.buffer,SharedArrayBuffer)))return m(S,g,v);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const C=S.valueOf&&S.valueOf();if(C!=null&&C!==S)return a.from(C,g,v);const N=E(S);if(N)return N;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return a.from(S[Symbol.toPrimitive]("string"),g,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S)}a.from=function(S,g,v){return l(S,g,v)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function f(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function c(S,g,v){return f(S),S<=0?s(S):g!==void 0?typeof v=="string"?s(S).fill(g,v):s(S).fill(g):s(S)}a.alloc=function(S,g,v){return c(S,g,v)};function h(S){return f(S),s(S<0?0:T(S)|0)}a.allocUnsafe=function(S){return h(S)},a.allocUnsafeSlow=function(S){return h(S)};function d(S,g){if((typeof g!="string"||g==="")&&(g="utf8"),!a.isEncoding(g))throw new TypeError("Unknown encoding: "+g);const v=b(S,g)|0;let C=s(v);const N=C.write(S,g);return N!==v&&(C=C.slice(0,N)),C}function u(S){const g=S.length<0?0:T(S.length)|0,v=s(g);for(let C=0;C<g;C+=1)v[C]=S[C]&255;return v}function p(S){if(je(S,Uint8Array)){const g=new Uint8Array(S);return m(g.buffer,g.byteOffset,g.byteLength)}return u(S)}function m(S,g,v){if(g<0||S.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(S.byteLength<g+(v||0))throw new RangeError('"length" is outside of buffer bounds');let C;return g===void 0&&v===void 0?C=new Uint8Array(S):v===void 0?C=new Uint8Array(S,g):C=new Uint8Array(S,g,v),Object.setPrototypeOf(C,a.prototype),C}function E(S){if(a.isBuffer(S)){const g=T(S.length)|0,v=s(g);return v.length===0||S.copy(v,0,0,g),v}if(S.length!==void 0)return typeof S.length!="number"||St(S.length)?s(0):u(S);if(S.type==="Buffer"&&Array.isArray(S.data))return u(S.data)}function T(S){if(S>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return S|0}function _(S){return+S!=S&&(S=0),a.alloc(+S)}a.isBuffer=function(g){return g!=null&&g._isBuffer===!0&&g!==a.prototype},a.compare=function(g,v){if(je(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),je(v,Uint8Array)&&(v=a.from(v,v.offset,v.byteLength)),!a.isBuffer(g)||!a.isBuffer(v))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(g===v)return 0;let C=g.length,N=v.length;for(let U=0,q=Math.min(C,N);U<q;++U)if(g[U]!==v[U]){C=g[U],N=v[U];break}return C<N?-1:N<C?1:0},a.isEncoding=function(g){switch(String(g).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(g,v){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(g.length===0)return a.alloc(0);let C;if(v===void 0)for(v=0,C=0;C<g.length;++C)v+=g[C].length;const N=a.allocUnsafe(v);let U=0;for(C=0;C<g.length;++C){let q=g[C];if(je(q,Uint8Array))U+q.length>N.length?(a.isBuffer(q)||(q=a.from(q)),q.copy(N,U)):Uint8Array.prototype.set.call(N,q,U);else if(a.isBuffer(q))q.copy(N,U);else throw new TypeError('"list" argument must be an Array of Buffers');U+=q.length}return N};function b(S,g){if(a.isBuffer(S))return S.length;if(ArrayBuffer.isView(S)||je(S,ArrayBuffer))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);const v=S.length,C=arguments.length>2&&arguments[2]===!0;if(!C&&v===0)return 0;let N=!1;for(;;)switch(g){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return Rt(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v*2;case"hex":return v>>>1;case"base64":return wt(S).length;default:if(N)return C?-1:Rt(S).length;g=(""+g).toLowerCase(),N=!0}}a.byteLength=b;function A(S,g,v){let C=!1;if((g===void 0||g<0)&&(g=0),g>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0,g>>>=0,v<=g))return"";for(S||(S="utf8");;)switch(S){case"hex":return ae(this,g,v);case"utf8":case"utf-8":return oe(this,g,v);case"ascii":return z(this,g,v);case"latin1":case"binary":return J(this,g,v);case"base64":return Y(this,g,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,g,v);default:if(C)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),C=!0}}a.prototype._isBuffer=!0;function w(S,g,v){const C=S[g];S[g]=S[v],S[v]=C}a.prototype.swap16=function(){const g=this.length;if(g%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let v=0;v<g;v+=2)w(this,v,v+1);return this},a.prototype.swap32=function(){const g=this.length;if(g%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let v=0;v<g;v+=4)w(this,v,v+3),w(this,v+1,v+2);return this},a.prototype.swap64=function(){const g=this.length;if(g%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let v=0;v<g;v+=8)w(this,v,v+7),w(this,v+1,v+6),w(this,v+2,v+5),w(this,v+3,v+4);return this},a.prototype.toString=function(){const g=this.length;return g===0?"":arguments.length===0?oe(this,0,g):A.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(g){if(!a.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:a.compare(this,g)===0},a.prototype.inspect=function(){let g="";const v=e.INSPECT_MAX_BYTES;return g=this.toString("hex",0,v).replace(/(.{2})/g,"$1 ").trim(),this.length>v&&(g+=" ... "),"<Buffer "+g+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(g,v,C,N,U){if(je(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength)),!a.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof g);if(v===void 0&&(v=0),C===void 0&&(C=g?g.length:0),N===void 0&&(N=0),U===void 0&&(U=this.length),v<0||C>g.length||N<0||U>this.length)throw new RangeError("out of range index");if(N>=U&&v>=C)return 0;if(N>=U)return-1;if(v>=C)return 1;if(v>>>=0,C>>>=0,N>>>=0,U>>>=0,this===g)return 0;let q=U-N,fe=C-v;const be=Math.min(q,fe),we=this.slice(N,U),Se=g.slice(v,C);for(let he=0;he<be;++he)if(we[he]!==Se[he]){q=we[he],fe=Se[he];break}return q<fe?-1:fe<q?1:0};function P(S,g,v,C,N){if(S.length===0)return-1;if(typeof v=="string"?(C=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),v=+v,St(v)&&(v=N?0:S.length-1),v<0&&(v=S.length+v),v>=S.length){if(N)return-1;v=S.length-1}else if(v<0)if(N)v=0;else return-1;if(typeof g=="string"&&(g=a.from(g,C)),a.isBuffer(g))return g.length===0?-1:F(S,g,v,C,N);if(typeof g=="number")return g=g&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(S,g,v):Uint8Array.prototype.lastIndexOf.call(S,g,v):F(S,[g],v,C,N);throw new TypeError("val must be string, number or Buffer")}function F(S,g,v,C,N){let U=1,q=S.length,fe=g.length;if(C!==void 0&&(C=String(C).toLowerCase(),C==="ucs2"||C==="ucs-2"||C==="utf16le"||C==="utf-16le")){if(S.length<2||g.length<2)return-1;U=2,q/=2,fe/=2,v/=2}function be(Se,he){return U===1?Se[he]:Se.readUInt16BE(he*U)}let we;if(N){let Se=-1;for(we=v;we<q;we++)if(be(S,we)===be(g,Se===-1?0:we-Se)){if(Se===-1&&(Se=we),we-Se+1===fe)return Se*U}else Se!==-1&&(we-=we-Se),Se=-1}else for(v+fe>q&&(v=q-fe),we=v;we>=0;we--){let Se=!0;for(let he=0;he<fe;he++)if(be(S,we+he)!==be(g,he)){Se=!1;break}if(Se)return we}return-1}a.prototype.includes=function(g,v,C){return this.indexOf(g,v,C)!==-1},a.prototype.indexOf=function(g,v,C){return P(this,g,v,C,!0)},a.prototype.lastIndexOf=function(g,v,C){return P(this,g,v,C,!1)};function B(S,g,v,C){v=Number(v)||0;const N=S.length-v;C?(C=Number(C),C>N&&(C=N)):C=N;const U=g.length;C>U/2&&(C=U/2);let q;for(q=0;q<C;++q){const fe=parseInt(g.substr(q*2,2),16);if(St(fe))return q;S[v+q]=fe}return q}function W(S,g,v,C){return gt(Rt(g,S.length-v),S,v,C)}function G(S,g,v,C){return gt(mt(g),S,v,C)}function V(S,g,v,C){return gt(wt(g),S,v,C)}function H(S,g,v,C){return gt(Sr(g,S.length-v),S,v,C)}a.prototype.write=function(g,v,C,N){if(v===void 0)N="utf8",C=this.length,v=0;else if(C===void 0&&typeof v=="string")N=v,C=this.length,v=0;else if(isFinite(v))v=v>>>0,isFinite(C)?(C=C>>>0,N===void 0&&(N="utf8")):(N=C,C=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const U=this.length-v;if((C===void 0||C>U)&&(C=U),g.length>0&&(C<0||v<0)||v>this.length)throw new RangeError("Attempt to write outside buffer bounds");N||(N="utf8");let q=!1;for(;;)switch(N){case"hex":return B(this,g,v,C);case"utf8":case"utf-8":return W(this,g,v,C);case"ascii":case"latin1":case"binary":return G(this,g,v,C);case"base64":return V(this,g,v,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,g,v,C);default:if(q)throw new TypeError("Unknown encoding: "+N);N=(""+N).toLowerCase(),q=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Y(S,g,v){return g===0&&v===S.length?t.fromByteArray(S):t.fromByteArray(S.slice(g,v))}function oe(S,g,v){v=Math.min(S.length,v);const C=[];let N=g;for(;N<v;){const U=S[N];let q=null,fe=U>239?4:U>223?3:U>191?2:1;if(N+fe<=v){let be,we,Se,he;switch(fe){case 1:U<128&&(q=U);break;case 2:be=S[N+1],(be&192)===128&&(he=(U&31)<<6|be&63,he>127&&(q=he));break;case 3:be=S[N+1],we=S[N+2],(be&192)===128&&(we&192)===128&&(he=(U&15)<<12|(be&63)<<6|we&63,he>2047&&(he<55296||he>57343)&&(q=he));break;case 4:be=S[N+1],we=S[N+2],Se=S[N+3],(be&192)===128&&(we&192)===128&&(Se&192)===128&&(he=(U&15)<<18|(be&63)<<12|(we&63)<<6|Se&63,he>65535&&he<1114112&&(q=he))}}q===null?(q=65533,fe=1):q>65535&&(q-=65536,C.push(q>>>10&1023|55296),q=56320|q&1023),C.push(q),N+=fe}return k(C)}const K=4096;function k(S){const g=S.length;if(g<=K)return String.fromCharCode.apply(String,S);let v="",C=0;for(;C<g;)v+=String.fromCharCode.apply(String,S.slice(C,C+=K));return v}function z(S,g,v){let C="";v=Math.min(S.length,v);for(let N=g;N<v;++N)C+=String.fromCharCode(S[N]&127);return C}function J(S,g,v){let C="";v=Math.min(S.length,v);for(let N=g;N<v;++N)C+=String.fromCharCode(S[N]);return C}function ae(S,g,v){const C=S.length;(!g||g<0)&&(g=0),(!v||v<0||v>C)&&(v=C);let N="";for(let U=g;U<v;++U)N+=rt[S[U]];return N}function Q(S,g,v){const C=S.slice(g,v);let N="";for(let U=0;U<C.length-1;U+=2)N+=String.fromCharCode(C[U]+C[U+1]*256);return N}a.prototype.slice=function(g,v){const C=this.length;g=~~g,v=v===void 0?C:~~v,g<0?(g+=C,g<0&&(g=0)):g>C&&(g=C),v<0?(v+=C,v<0&&(v=0)):v>C&&(v=C),v<g&&(v=g);const N=this.subarray(g,v);return Object.setPrototypeOf(N,a.prototype),N};function Z(S,g,v){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+g>v)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(g,v,C){g=g>>>0,v=v>>>0,C||Z(g,v,this.length);let N=this[g],U=1,q=0;for(;++q<v&&(U*=256);)N+=this[g+q]*U;return N},a.prototype.readUintBE=a.prototype.readUIntBE=function(g,v,C){g=g>>>0,v=v>>>0,C||Z(g,v,this.length);let N=this[g+--v],U=1;for(;v>0&&(U*=256);)N+=this[g+--v]*U;return N},a.prototype.readUint8=a.prototype.readUInt8=function(g,v){return g=g>>>0,v||Z(g,1,this.length),this[g]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(g,v){return g=g>>>0,v||Z(g,2,this.length),this[g]|this[g+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(g,v){return g=g>>>0,v||Z(g,2,this.length),this[g]<<8|this[g+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),(this[g]|this[g+1]<<8|this[g+2]<<16)+this[g+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),this[g]*16777216+(this[g+1]<<16|this[g+2]<<8|this[g+3])},a.prototype.readBigUInt64LE=Ke(function(g){g=g>>>0,Ye(g,"offset");const v=this[g],C=this[g+7];(v===void 0||C===void 0)&&$e(g,this.length-8);const N=v+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24,U=this[++g]+this[++g]*2**8+this[++g]*2**16+C*2**24;return BigInt(N)+(BigInt(U)<<BigInt(32))}),a.prototype.readBigUInt64BE=Ke(function(g){g=g>>>0,Ye(g,"offset");const v=this[g],C=this[g+7];(v===void 0||C===void 0)&&$e(g,this.length-8);const N=v*2**24+this[++g]*2**16+this[++g]*2**8+this[++g],U=this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+C;return(BigInt(N)<<BigInt(32))+BigInt(U)}),a.prototype.readIntLE=function(g,v,C){g=g>>>0,v=v>>>0,C||Z(g,v,this.length);let N=this[g],U=1,q=0;for(;++q<v&&(U*=256);)N+=this[g+q]*U;return U*=128,N>=U&&(N-=Math.pow(2,8*v)),N},a.prototype.readIntBE=function(g,v,C){g=g>>>0,v=v>>>0,C||Z(g,v,this.length);let N=v,U=1,q=this[g+--N];for(;N>0&&(U*=256);)q+=this[g+--N]*U;return U*=128,q>=U&&(q-=Math.pow(2,8*v)),q},a.prototype.readInt8=function(g,v){return g=g>>>0,v||Z(g,1,this.length),this[g]&128?(255-this[g]+1)*-1:this[g]},a.prototype.readInt16LE=function(g,v){g=g>>>0,v||Z(g,2,this.length);const C=this[g]|this[g+1]<<8;return C&32768?C|4294901760:C},a.prototype.readInt16BE=function(g,v){g=g>>>0,v||Z(g,2,this.length);const C=this[g+1]|this[g]<<8;return C&32768?C|4294901760:C},a.prototype.readInt32LE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24},a.prototype.readInt32BE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]},a.prototype.readBigInt64LE=Ke(function(g){g=g>>>0,Ye(g,"offset");const v=this[g],C=this[g+7];(v===void 0||C===void 0)&&$e(g,this.length-8);const N=this[g+4]+this[g+5]*2**8+this[g+6]*2**16+(C<<24);return(BigInt(N)<<BigInt(32))+BigInt(v+this[++g]*2**8+this[++g]*2**16+this[++g]*2**24)}),a.prototype.readBigInt64BE=Ke(function(g){g=g>>>0,Ye(g,"offset");const v=this[g],C=this[g+7];(v===void 0||C===void 0)&&$e(g,this.length-8);const N=(v<<24)+this[++g]*2**16+this[++g]*2**8+this[++g];return(BigInt(N)<<BigInt(32))+BigInt(this[++g]*2**24+this[++g]*2**16+this[++g]*2**8+C)}),a.prototype.readFloatLE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),n.read(this,g,!0,23,4)},a.prototype.readFloatBE=function(g,v){return g=g>>>0,v||Z(g,4,this.length),n.read(this,g,!1,23,4)},a.prototype.readDoubleLE=function(g,v){return g=g>>>0,v||Z(g,8,this.length),n.read(this,g,!0,52,8)},a.prototype.readDoubleBE=function(g,v){return g=g>>>0,v||Z(g,8,this.length),n.read(this,g,!1,52,8)};function ce(S,g,v,C,N,U){if(!a.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>N||g<U)throw new RangeError('"value" argument is out of bounds');if(v+C>S.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(g,v,C,N){if(g=+g,v=v>>>0,C=C>>>0,!N){const fe=Math.pow(2,8*C)-1;ce(this,g,v,C,fe,0)}let U=1,q=0;for(this[v]=g&255;++q<C&&(U*=256);)this[v+q]=g/U&255;return v+C},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(g,v,C,N){if(g=+g,v=v>>>0,C=C>>>0,!N){const fe=Math.pow(2,8*C)-1;ce(this,g,v,C,fe,0)}let U=C-1,q=1;for(this[v+U]=g&255;--U>=0&&(q*=256);)this[v+U]=g/q&255;return v+C},a.prototype.writeUint8=a.prototype.writeUInt8=function(g,v,C){return g=+g,v=v>>>0,C||ce(this,g,v,1,255,0),this[v]=g&255,v+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(g,v,C){return g=+g,v=v>>>0,C||ce(this,g,v,2,65535,0),this[v]=g&255,this[v+1]=g>>>8,v+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(g,v,C){return g=+g,v=v>>>0,C||ce(this,g,v,2,65535,0),this[v]=g>>>8,this[v+1]=g&255,v+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(g,v,C){return g=+g,v=v>>>0,C||ce(this,g,v,4,4294967295,0),this[v+3]=g>>>24,this[v+2]=g>>>16,this[v+1]=g>>>8,this[v]=g&255,v+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(g,v,C){return g=+g,v=v>>>0,C||ce(this,g,v,4,4294967295,0),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4};function le(S,g,v,C,N){te(g,C,N,S,v,7);let U=Number(g&BigInt(4294967295));S[v++]=U,U=U>>8,S[v++]=U,U=U>>8,S[v++]=U,U=U>>8,S[v++]=U;let q=Number(g>>BigInt(32)&BigInt(4294967295));return S[v++]=q,q=q>>8,S[v++]=q,q=q>>8,S[v++]=q,q=q>>8,S[v++]=q,v}function ze(S,g,v,C,N){te(g,C,N,S,v,7);let U=Number(g&BigInt(4294967295));S[v+7]=U,U=U>>8,S[v+6]=U,U=U>>8,S[v+5]=U,U=U>>8,S[v+4]=U;let q=Number(g>>BigInt(32)&BigInt(4294967295));return S[v+3]=q,q=q>>8,S[v+2]=q,q=q>>8,S[v+1]=q,q=q>>8,S[v]=q,v+8}a.prototype.writeBigUInt64LE=Ke(function(g,v=0){return le(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Ke(function(g,v=0){return ze(this,g,v,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(g,v,C,N){if(g=+g,v=v>>>0,!N){const be=Math.pow(2,8*C-1);ce(this,g,v,C,be-1,-be)}let U=0,q=1,fe=0;for(this[v]=g&255;++U<C&&(q*=256);)g<0&&fe===0&&this[v+U-1]!==0&&(fe=1),this[v+U]=(g/q>>0)-fe&255;return v+C},a.prototype.writeIntBE=function(g,v,C,N){if(g=+g,v=v>>>0,!N){const be=Math.pow(2,8*C-1);ce(this,g,v,C,be-1,-be)}let U=C-1,q=1,fe=0;for(this[v+U]=g&255;--U>=0&&(q*=256);)g<0&&fe===0&&this[v+U+1]!==0&&(fe=1),this[v+U]=(g/q>>0)-fe&255;return v+C},a.prototype.writeInt8=function(g,v,C){return g=+g,v=v>>>0,C||ce(this,g,v,1,127,-128),g<0&&(g=255+g+1),this[v]=g&255,v+1},a.prototype.writeInt16LE=function(g,v,C){return g=+g,v=v>>>0,C||ce(this,g,v,2,32767,-32768),this[v]=g&255,this[v+1]=g>>>8,v+2},a.prototype.writeInt16BE=function(g,v,C){return g=+g,v=v>>>0,C||ce(this,g,v,2,32767,-32768),this[v]=g>>>8,this[v+1]=g&255,v+2},a.prototype.writeInt32LE=function(g,v,C){return g=+g,v=v>>>0,C||ce(this,g,v,4,2147483647,-2147483648),this[v]=g&255,this[v+1]=g>>>8,this[v+2]=g>>>16,this[v+3]=g>>>24,v+4},a.prototype.writeInt32BE=function(g,v,C){return g=+g,v=v>>>0,C||ce(this,g,v,4,2147483647,-2147483648),g<0&&(g=4294967295+g+1),this[v]=g>>>24,this[v+1]=g>>>16,this[v+2]=g>>>8,this[v+3]=g&255,v+4},a.prototype.writeBigInt64LE=Ke(function(g,v=0){return le(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Ke(function(g,v=0){return ze(this,g,v,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function X(S,g,v,C,N,U){if(v+C>S.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function re(S,g,v,C,N){return g=+g,v=v>>>0,N||X(S,g,v,4),n.write(S,g,v,C,23,4),v+4}a.prototype.writeFloatLE=function(g,v,C){return re(this,g,v,!0,C)},a.prototype.writeFloatBE=function(g,v,C){return re(this,g,v,!1,C)};function Pe(S,g,v,C,N){return g=+g,v=v>>>0,N||X(S,g,v,8),n.write(S,g,v,C,52,8),v+8}a.prototype.writeDoubleLE=function(g,v,C){return Pe(this,g,v,!0,C)},a.prototype.writeDoubleBE=function(g,v,C){return Pe(this,g,v,!1,C)},a.prototype.copy=function(g,v,C,N){if(!a.isBuffer(g))throw new TypeError("argument should be a Buffer");if(C||(C=0),!N&&N!==0&&(N=this.length),v>=g.length&&(v=g.length),v||(v=0),N>0&&N<C&&(N=C),N===C||g.length===0||this.length===0)return 0;if(v<0)throw new RangeError("targetStart out of bounds");if(C<0||C>=this.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("sourceEnd out of bounds");N>this.length&&(N=this.length),g.length-v<N-C&&(N=g.length-v+C);const U=N-C;return this===g&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(v,C,N):Uint8Array.prototype.set.call(g,this.subarray(C,N),v),U},a.prototype.fill=function(g,v,C,N){if(typeof g=="string"){if(typeof v=="string"?(N=v,v=0,C=this.length):typeof C=="string"&&(N=C,C=this.length),N!==void 0&&typeof N!="string")throw new TypeError("encoding must be a string");if(typeof N=="string"&&!a.isEncoding(N))throw new TypeError("Unknown encoding: "+N);if(g.length===1){const q=g.charCodeAt(0);(N==="utf8"&&q<128||N==="latin1")&&(g=q)}}else typeof g=="number"?g=g&255:typeof g=="boolean"&&(g=Number(g));if(v<0||this.length<v||this.length<C)throw new RangeError("Out of range index");if(C<=v)return this;v=v>>>0,C=C===void 0?this.length:C>>>0,g||(g=0);let U;if(typeof g=="number")for(U=v;U<C;++U)this[U]=g;else{const q=a.isBuffer(g)?g:a.from(g,N),fe=q.length;if(fe===0)throw new TypeError('The value "'+g+'" is invalid for argument "value"');for(U=0;U<C-v;++U)this[U+v]=q[U%fe]}return this};const Oe={};function st(S,g,v){Oe[S]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:g.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${S}]`,this.stack,delete this.name}get code(){return S}set code(N){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:N,writable:!0})}toString(){return`${this.name} [${S}]: ${this.message}`}}}st("ERR_BUFFER_OUT_OF_BOUNDS",function(S){return S?`${S} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),st("ERR_INVALID_ARG_TYPE",function(S,g){return`The "${S}" argument must be of type number. Received type ${typeof g}`},TypeError),st("ERR_OUT_OF_RANGE",function(S,g,v){let C=`The value of "${S}" is out of range.`,N=v;return Number.isInteger(v)&&Math.abs(v)>2**32?N=ut(String(v)):typeof v=="bigint"&&(N=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(N=ut(N)),N+="n"),C+=` It must be ${g}. Received ${N}`,C},RangeError);function ut(S){let g="",v=S.length;const C=S[0]==="-"?1:0;for(;v>=C+4;v-=3)g=`_${S.slice(v-3,v)}${g}`;return`${S.slice(0,v)}${g}`}function Et(S,g,v){Ye(g,"offset"),(S[g]===void 0||S[g+v]===void 0)&&$e(g,S.length-(v+1))}function te(S,g,v,C,N,U){if(S>v||S<g){const q=typeof g=="bigint"?"n":"";let fe;throw U>3?g===0||g===BigInt(0)?fe=`>= 0${q} and < 2${q} ** ${(U+1)*8}${q}`:fe=`>= -(2${q} ** ${(U+1)*8-1}${q}) and < 2 ** ${(U+1)*8-1}${q}`:fe=`>= ${g}${q} and <= ${v}${q}`,new Oe.ERR_OUT_OF_RANGE("value",fe,S)}Et(C,N,U)}function Ye(S,g){if(typeof S!="number")throw new Oe.ERR_INVALID_ARG_TYPE(g,"number",S)}function $e(S,g,v){throw Math.floor(S)!==S?(Ye(S,v),new Oe.ERR_OUT_OF_RANGE(v||"offset","an integer",S)):g<0?new Oe.ERR_BUFFER_OUT_OF_BOUNDS:new Oe.ERR_OUT_OF_RANGE(v||"offset",`>= ${v?1:0} and <= ${g}`,S)}const bt=/[^+/0-9A-Za-z-_]/g;function Gt(S){if(S=S.split("=")[0],S=S.trim().replace(bt,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function Rt(S,g){g=g||1/0;let v;const C=S.length;let N=null;const U=[];for(let q=0;q<C;++q){if(v=S.charCodeAt(q),v>55295&&v<57344){if(!N){if(v>56319){(g-=3)>-1&&U.push(239,191,189);continue}else if(q+1===C){(g-=3)>-1&&U.push(239,191,189);continue}N=v;continue}if(v<56320){(g-=3)>-1&&U.push(239,191,189),N=v;continue}v=(N-55296<<10|v-56320)+65536}else N&&(g-=3)>-1&&U.push(239,191,189);if(N=null,v<128){if((g-=1)<0)break;U.push(v)}else if(v<2048){if((g-=2)<0)break;U.push(v>>6|192,v&63|128)}else if(v<65536){if((g-=3)<0)break;U.push(v>>12|224,v>>6&63|128,v&63|128)}else if(v<1114112){if((g-=4)<0)break;U.push(v>>18|240,v>>12&63|128,v>>6&63|128,v&63|128)}else throw new Error("Invalid code point")}return U}function mt(S){const g=[];for(let v=0;v<S.length;++v)g.push(S.charCodeAt(v)&255);return g}function Sr(S,g){let v,C,N;const U=[];for(let q=0;q<S.length&&!((g-=2)<0);++q)v=S.charCodeAt(q),C=v>>8,N=v%256,U.push(N),U.push(C);return U}function wt(S){return t.toByteArray(Gt(S))}function gt(S,g,v,C){let N;for(N=0;N<C&&!(N+v>=g.length||N>=S.length);++N)g[N+v]=S[N];return N}function je(S,g){return S instanceof g||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===g.name}function St(S){return S!==S}const rt=function(){const S="0123456789abcdef",g=new Array(256);for(let v=0;v<16;++v){const C=v*16;for(let N=0;N<16;++N)g[C+N]=S[v]+S[N]}return g}();function Ke(S){return typeof BigInt>"u"?Tr:S}function Tr(){throw new Error("BigInt not supported")}}(xs)),xs}(function(e,t){(function(n,r){e.exports=r(W_(),nE(),cE(),qd(),mE,LE(),BE())})(ue,function(n,r,o,i,s,a,l){return function(){var f={809:function(u){u.exports=n},30:function(u){u.exports=r},36:function(u){u.exports=o},300:function(u){u.exports=i},408:function(u){u.exports=l},25:function(u){u.exports=s},130:function(u){u.exports=a}},c={};function h(u){var p=c[u];if(p!==void 0)return p.exports;var m=c[u]={exports:{}};return f[u](m,m.exports,h),m.exports}h.n=function(u){var p=u&&u.__esModule?function(){return u.default}:function(){return u};return h.d(p,{a:p}),p},h.d=function(u,p){for(var m in p)h.o(p,m)&&!h.o(u,m)&&Object.defineProperty(u,m,{enumerable:!0,get:p[m]})},h.o=function(u,p){return Object.prototype.hasOwnProperty.call(u,p)},h.r=function(u){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var d={};return function(){h.r(d),h.d(d,{assets:function(){return k},auth:function(){return Z},buildAnswer:function(){return gg},buildCarouselCard:function(){return mg},buildQuestion:function(){return Be},carouselCards:function(){return vn},contentInteraction:function(){return Ke},decodeBase64:function(){return vg},default:function(){return _g},editorialPages:function(){return j},features:function(){return v},getEntries:function(){return u.getEntries},getEntry:function(){return u.getEntry},management:function(){return Or},payments:function(){return Rr},people:function(){return Pt},peopleEngagement:function(){return fr},qaQuestions:function(){return Xe},reportError:function(){return p.reportError},search:function(){return gn}});var u=h(809),p=h(30),m=h(36),E={APOLITICAL:{WEBSITES:{LIVE:"https://apolitical.co",LOCALHOST:"localhost",STAGING:/https:\/\/([\w|\d|-]+)\.apolitical\.co/i,STAGING_SPLITTER:"-"},ENVIRONMENTS:{PRODUCTION:"live",LOCAL:"local"}},APIS:{ASSETS_API:{BASE_URL:"/api/assets-api",ENDPOINTS:{USERS:"/users",CERTIFICATES:"/certificates"}},AUTH_API:{BASE_URL:"/api/auth-api",ENDPOINTS:{USER_PASSWORD:"/password",USERS:"/users"}},CONTENT_INTERACTION_API:{BASE_URL:"/api/content-interaction-api",ENDPOINTS:{QUESTIONS:"/questions",ANSWERS:"/answers",REPLIES:"/replies",LIKES:"/likes"}},FEATURES_API:{BASE_URL:"/api/features-api",ENDPOINTS:{FLAGS:"/features"}},MANAGEMENT_API:{BASE_URL:"/api/management-api",ENDPOINTS:{ACCOUNTS:"/accounts",EVENT_REGISTRATIONS:"/event-registrations",LOGINS:"/logins",LOGIN_PASSWORDLESS:"/passwordless",BULK_ENROLMENTS:"/bulk-enrolments"}},PAYMENTS_API:{BASE_URL:"/api/payments-api",BASE_URL_V2:"/api/payments-api/v2",ENDPOINTS:{PRODUCTS:"/products"}},PEOPLE_API:{BASE_URL:"/api/people-api",BASE_URL_V2:"/api/people-api/v2",ENDPOINTS:{BULK_ENROLMENTS:"/bulk-enrolments",REGISTRATIONS:"/registrations",USERS:"/users",USER_ANSWERS:"/answers",USER_COURSES:"/courses",USER_EVENTS:"/events",USER_LIKES:"/likes",USER_LESSONS:"/lessons",USER_PRODUCTS:"/products",USER_RATINGS:"/ratings",USER_SUBSCRIPTIONS:"/subscriptions"}},PEOPLE_ENGAGEMENT_API:{BASE_URL:"/api/people-engagement-api",ENDPOINTS:{ENQUIRY_EMAILS:"/enquiry-emails",USERS:"/users",USER_PROPERTIES:"/properties"}},SEARCH_API:{BASE_URL:"/api/search-api",ENDPOINTS:{SEARCH:"/search"}}},CONTENTFUL:{ARTICLES:{TYPE:"solutionArticle"},CAROUSELS:{CARD_TYPES:{solutionArticle:{INCLUDE:1,SELECT:"fields.authorIds,fields.authorTag,fields.image,fields.publishedDate,fields.readingTime,fields.slug,fields.title"},microcourse:{INCLUDE:2,SELECT:"fields.banner,fields.freeCourse,fields.partnershipDetails,fields.slug,fields.title"},event:{INCLUDE:1,SELECT:"fields.bannerImage,fields.defaultStartDate,fields.slug,fields.speakers,fields.title,fields.isEventOngoing"},listPage:{INCLUDE:1,SELECT:"fields.hero,fields.slug,fields.title"},qaQuestion:{INCLUDE:0,SELECT:"fields.answers,fields.authorId,fields.slug,fields.title,sys.createdAt,fields.projectNames"},learningHub:{INCLUDE:1,SELECT:"fields.bannerSection,fields.customLabel,fields.slug,fields.title"}}},COURSES:{TYPE:"microcourse"},EDITORIAL_PAGES:{INCLUDE:1,SELECT:"fields.carousels,fields.slug",TYPE:"editorialPage"},EVENTS:{TYPE:"event"},LISTS:{TYPE:"listPage"},QUESTIONS:{TYPE:"qaQuestion",INCLUDE:1,LIMIT:10,ORDER:"-sys.createdAt",SELECT:"sys.createdAt,sys.updatedAt,fields.title,fields.slug,fields.authorId,fields.answers,fields.isEdited,fields.projectNames",SKIP:0},ANSWERS:{TYPE:"qaAnswer"},REPLIES:{TYPE:"reply"},LEARNING_HUB:{TYPE:"learningHub"}},HUBSPOT:{ENVIRONMENTS_MAPPING:{local:"SANDBOX",beta:"SANDBOX",rc:"SANDBOX",live:"LIVE"},EMAIL_IDS:{SANDBOX:{internalEmailId:49099078634,externalEmailId:55196526554},LIVE:{internalEmailId:55233583049,externalEmailId:55231159239}}},USERS:{MYSELF:"me"}};const{APOLITICAL:{WEBSITES:{LIVE:T,LOCALHOST:_,STAGING:b,STAGING_SPLITTER:A},ENVIRONMENTS:{PRODUCTION:w,LOCAL:P}}}=E,{HUBSPOT:{ENVIRONMENTS_MAPPING:F,EMAIL_IDS:B}}=E;let W={emailIds:{}};var G=h(300),V=h.n(G);const H=async I=>{try{const{message:M,response:L,request:D}=I;let ee=M;return L?ee+=` - The request was made and the server responded with ${JSON.stringify({status:L.status,data:L.data})}`:D&&(ee+=" - The request was made but no response was received"),console.warn(ee),await(0,p.reportError)(new Error(ee)),ee}catch(M){return console.warn(`Cannot handle error: ${M.message}`),M.message}},{APIS:{ASSETS_API:{BASE_URL:Y,ENDPOINTS:{USERS:oe,CERTIFICATES:K}}}}=E;var k={certificates:{create:async(I,M)=>{let L=[];try{const{data:D}=await V().post(`${Y}${oe}/${I}${K}`,M);D&&(L=D)}catch(D){await H(D)}return L}}};const{APIS:{AUTH_API:{BASE_URL:z,ENDPOINTS:{USER_PASSWORD:J,USERS:ae}}},USERS:{MYSELF:Q}}=E;var Z={userPassword:{update:async I=>{let M=null;try{M=await V().put(`${z}${ae}/${Q}${J}`,I)}catch(L){M={message:(((L||{}).response||{}).data||{}).message},await H(L)}return M}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:ce,ENDPOINTS:{ANSWERS:le,QUESTIONS:ze,LIKES:X}}}}=E,re=`${ce}${ze}`;var Pe={create:async({questionSlug:I},M)=>{try{await V().post(`${re}/${encodeURIComponent(I)}${le}`,M)}catch(L){const D=await H(L);throw new Error(D)}},remove:async({questionSlug:I,answerSlug:M})=>{try{await V().delete(`${re}/${encodeURIComponent(I)}${le}/${encodeURIComponent(M)}`)}catch(L){const D=await H(L);throw new Error(D)}},update:async({questionSlug:I,answerSlug:M},L)=>{try{return await V().put(`${re}/${encodeURIComponent(I)}${le}/${encodeURIComponent(M)}`,L)}catch(D){const ee=await H(D);throw new Error(ee)}},like:async({questionSlug:I,answerSlug:M},L)=>{try{return await V().post(`${re}/${encodeURIComponent(I)}${le}/${encodeURIComponent(M)}${X}`,L)}catch(D){const ee=await H(D);throw new Error(ee)}},unlike:async({questionSlug:I,answerSlug:M})=>{try{return await V().delete(`${re}/${encodeURIComponent(I)}${le}/${encodeURIComponent(M)}${X}`)}catch(L){const D=await H(L);throw new Error(D)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:Oe,ENDPOINTS:{QUESTIONS:st}}}}=E,ut=`${Oe}${st}`;var Et={create:async I=>{try{return await V().post(ut,I)}catch(M){const L=await H(M);throw new Error(L)}},remove:async({questionSlug:I})=>{try{await V().delete(`${ut}/${encodeURIComponent(I)}`)}catch(M){const L=await H(M);throw new Error(L)}},update:async({questionSlug:I},M)=>{try{return await V().put(`${ut}/${encodeURIComponent(I)}`,M)}catch(L){const D=await H(L);throw new Error(D)}}};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:te,ENDPOINTS:{REPLIES:Ye,ANSWERS:$e,QUESTIONS:bt,LIKES:Gt}}}}=E,Rt=`${te}${bt}`,mt=({questionSlug:I,answerSlug:M,replySlug:L},D=!1)=>{let ee=`${Rt}/${encodeURIComponent(I)}${$e}/${encodeURIComponent(M)}${Ye}`;return L&&(ee=`${ee}/${encodeURIComponent(L)}`,D&&(ee=`${ee}${Gt}`)),ee};var Sr={create:async({questionSlug:I,answerSlug:M},L)=>{try{return await V().post(mt({questionSlug:I,answerSlug:M}),L)}catch(D){const ee=await H(D);throw new Error(ee)}},update:async({questionSlug:I,answerSlug:M,replySlug:L},D)=>{try{return await V().put(mt({questionSlug:I,answerSlug:M,replySlug:L}),D)}catch(ee){const Te=await H(ee);throw new Error(Te)}},remove:async({questionSlug:I,answerSlug:M,replySlug:L})=>{try{await V().delete(mt({questionSlug:I,answerSlug:M,replySlug:L}))}catch(D){const ee=await H(D);throw new Error(ee)}},like:async({questionSlug:I,answerSlug:M,replySlug:L},D)=>{try{await V().post(mt({questionSlug:I,answerSlug:M,replySlug:L},!0),D)}catch(ee){const Te=await H(ee);throw new Error(Te)}},unlike:async({questionSlug:I,answerSlug:M,replySlug:L})=>{try{await V().delete(mt({questionSlug:I,answerSlug:M,replySlug:L},!0))}catch(D){const ee=await H(D);throw new Error(ee)}},getReplyUrl:mt};const{APIS:{CONTENT_INTERACTION_API:{BASE_URL:wt,ENDPOINTS:{QUESTIONS:gt,ANSWERS:je,LIKES:St}}}}=E,rt=`${wt}${gt}`;var Ke={answers:Pe,questions:Et,replies:Sr,likes:{create:async(I,M)=>{try{return await V().post(`${rt}/${encodeURIComponent(I)}${je}/${encodeURIComponent(M)}${St}`)}catch(L){const D=await H(L);throw new Error(D)}},remove:async(I,M)=>{try{return await V().delete(`${rt}/${encodeURIComponent(I)}${je}/${encodeURIComponent(M)}${St}`)}catch(L){const D=await H(L);throw new Error(D)}}}};const{APIS:{FEATURES_API:{BASE_URL:Tr,ENDPOINTS:{FLAGS:S}}}}=E,g=`${Tr}${S}`;var v={flags:{read:async I=>{let M=null;try{const{data:L}=await V().get(`${g}/${encodeURIComponent(I)}`);L!=null&&L.name&&(L!=null&&L.featureState)&&(M=L)}catch(L){await H(L)}return M}}};const{APIS:{MANAGEMENT_API:{BASE_URL:C,ENDPOINTS:{ACCOUNTS:N}}}}=E;var U={create:async I=>{try{await V().post(`${C}${N}`,I)}catch(M){throw await H(M),M}},read:async I=>{let M=null;try{({data:M}=await V().get(`${C}${N}/${encodeURIComponent(I)}`))}catch(L){await H(L)}return M},update:async(I,M)=>{try{await V().put(`${C}${N}/${encodeURIComponent(I)}`,M)}catch(L){throw await H(L),L}}};const{APIS:{MANAGEMENT_API:{BASE_URL:q,ENDPOINTS:{BULK_ENROLMENTS:fe}}}}=E;var be={create:async I=>{try{await V().post(`${q}${fe}`,I)}catch(M){throw await H(M),M}}};const{APIS:{MANAGEMENT_API:{BASE_URL:we,ENDPOINTS:{EVENT_REGISTRATIONS:Se}}}}=E;var he={create:async I=>{try{await V().post(`${we}${Se}`,I)}catch(M){const L=await H(M);throw new Error(L)}}};const{APIS:{MANAGEMENT_API:{BASE_URL:lt,ENDPOINTS:{LOGINS:ar,LOGIN_PASSWORDLESS:xr}}}}=E,Wt=`${lt}${ar}`;var Or={accounts:U,bulkEnrolments:be,eventRegistrations:he,passwordless:{update:async I=>{try{await V().put(`${Wt}/${encodeURIComponent(I)}${xr}`)}catch(M){throw await H(M),M}}}};const{APIS:{PAYMENTS_API:{BASE_URL_V2:Vt,ENDPOINTS:{PRODUCTS:Ar}}}}=E,Cr=`${Vt}${Ar}`;var Rr={products:{list:async I=>{let M=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(Cr,L);D&&D.length&&(M=D)}catch(D){await H(D)}return M}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Nt,ENDPOINTS:{BULK_ENROLMENTS:on}}}}=E;var Tt={list:async I=>{let M=[];try{const{data:L}=await V().get(`${Nt}${on}`,{params:I});L&&L.length&&(M=L)}catch(L){await H(L)}return M}},Un=h(25);const{OK:Dn,MULTIPLE_CHOICES:$n,NOT_FOUND:an,FORBIDDEN:Nr}=Un.StatusCodes,Fe=I=>I>=Dn&&I<$n||I===Nr||I===an,{APIS:{PEOPLE_API:{BASE_URL_V2:Pr,ENDPOINTS:{USERS:Ir}}}}=E,zt=async I=>{let M=null;try{const{data:L}=await V().get(`${Pr}${Ir}/${encodeURIComponent(I)}`,{validateStatus:Fe});L&&L.id&&(M=L)}catch(L){await H(L)}return M},sn=async I=>{let M=[];try{if(I&&I.length<2)throw new Error("users list method requires at least two ids");const L=I.map(ee=>`ids=${encodeURIComponent(ee)}`).join("&"),D=await V().get(`${Pr}${Ir}?${L}`,{validateStatus:Fe});D&&D.length&&(M=D)}catch(L){await H(L)}return M};var jn={read:zt,update:async(I,M)=>{let L=!1;try{const{data:D}=await V().put(`${Pr}${Ir}/${encodeURIComponent(I)}`,M);L=!(!D||!D.id)}catch(D){await H(D)}return L},list:sn};const{APIS:{PEOPLE_API:{BASE_URL_V2:He,ENDPOINTS:{USERS:Hn,USER_LIKES:qn}}},USERS:{MYSELF:Gn}}=E,Wn=`${He}${Hn}/${Gn}${qn}`,Lr=async I=>{let M=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(Wn,L);D&&D.length&&(M=D)}catch(D){await H(D)}return M};var Ze={list:Lr},Vn={authors:{readQuestionAuthors:async(I,M,L)=>{try{if(I.author=await zt(I.authorId),I.answers&&I.answers.length&&!L.ignoreAnswersAuthors){I.answers.sort((ee,Te)=>new Date(Te.updatedAt)-new Date(ee.updatedAt)),I.totalAnswers=I.answers.length;let D=I.answers;if(L.limit&&L.pageNumber){const ee=L.limit*(L.pageNumber-1);D=I.answers.slice(ee,ee+L.limit)}for(let ee of D){ee.author=ee.authorId&&await zt(ee.authorId)||{};const[Te]=M?await Lr({contentType:E.CONTENTFUL.ANSWERS.TYPE,contentSlug:ee.slug}):[null];ee.userLiked=!!Te}I.answers=D}else I.answers||(I.answers=[]);return I}catch(D){throw await H(D),new Error(`Cannot read authors for question: ${D.message}`)}},readAuthors:async(I=[])=>{let M=[];try{if(Array.isArray(I)===!1)throw new Error("authorIds is not an array!");if(I&&I.length===1){const L=await zt(I[0]);L&&M.push(L)}else if(I&&I.length>1){const L=await sn(I);L&&L.length>0&&(M=L)}}catch(L){throw await H(L),new Error(`Cannot read authors: ${L.message}`)}return M}}};const{APIS:{PEOPLE_API:{BASE_URL:zn,ENDPOINTS:{REGISTRATIONS:Yn}}}}=E;var Kn={list:async I=>{let M=[];try{const{data:L}=await V().get(`${zn}${Yn}`,{params:I});L&&L.length&&(M=L)}catch(L){await H(L)}return M}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Qn,ENDPOINTS:{USERS:sr,USER_COURSES:cn}}},USERS:{MYSELF:cr}}=E,ct=`${Qn}${sr}/${cr}${cn}`;var kr={create:async I=>{try{await V().post(ct,I)}catch(M){await H(M)}},list:async I=>{let M=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(ct,L);D&&D.length&&(M=D)}catch(D){await H(D)}return M},update:async(I,M)=>{try{await V().put(`${ct}/${I}`,M)}catch(L){await H(L)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Xn,ENDPOINTS:{USERS:Jn,USER_EVENTS:Zn}}},USERS:{MYSELF:ei}}=E,ti=`${Xn}${Jn}/${ei}${Zn}`;var ur={list:async I=>{let M=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(ti,L);D&&D.length&&(M=D)}catch(D){await H(D)}return M}};const{APIS:{PEOPLE_API:{BASE_URL_V2:Mr,ENDPOINTS:{USERS:Yt,USER_LESSONS:un}}},USERS:{MYSELF:ln}}=E,fn=`${Mr}${Yt}/${ln}${un}`;var ri={create:async I=>{let M=null;try{M=await V().post(fn,I)}catch(L){await H(L)}return M},list:async I=>{let M=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(fn,L);D&&D.length&&(M=D)}catch(D){await H(D)}return M}};const{APIS:{PEOPLE_API:{BASE_URL_V2:ni,ENDPOINTS:{USERS:ii,USER_PRODUCTS:Br}}},USERS:{MYSELF:oi}}=E,Fr=`${ni}${ii}/${oi}${Br}`;var Kt={create:async I=>{let M=null;try{M=await V().post(Fr,I)}catch(L){await H(L)}return M},list:async I=>{let M=[],L=I?{params:I}:{params:{}};try{const{data:D}=await V().get(Fr,L);D&&D.length&&(M=D)}catch(D){await H(D)}return M},update:async(I,M)=>{try{await V().put(`${Fr}/${I}`,M)}catch(L){await H(L)}}};const{APIS:{PEOPLE_API:{BASE_URL_V2:ft,ENDPOINTS:{USERS:xt,USER_RATINGS:Ot}}},USERS:{MYSELF:ai}}=E,dt=`${ft}${xt}/${ai}${Ot}`;var Pt={bulkEnrolments:Tt,handlers:Vn,registrations:Kn,users:jn,userCourses:kr,userEvents:ur,userLessons:ri,userLikes:Ze,userProducts:Kt,userRatings:{create:async I=>{let M=null;try{const{data:L}=await V().post(dt,I);L!=null&&L.id&&(M=L)}catch(L){await H(L)}return M},update:async(I,M)=>{try{await V().put(`${dt}/${I}`,M)}catch(L){await H(L)}}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:si,ENDPOINTS:{ENQUIRY_EMAILS:ci}}}}=E;var ui={create:async I=>{let M=null;try{const{data:L}=await V().post(`${si}${ci}`,I);L&&(M=L)}catch(L){await H(L)}return M}},dn={forms:{sendEnquiryEmails:async I=>{let M=null;try{const{emailIds:L}=W;M=await fr.emails.create({...L,...I})}catch(L){await H(L)}return M}}};const{APIS:{PEOPLE_ENGAGEMENT_API:{BASE_URL:Qe,ENDPOINTS:{USERS:hn,USER_PROPERTIES:pn}}},USERS:{MYSELF:lr}}=E;var fr={emails:ui,handlers:dn,userProperties:{update:async(I,M)=>{try{await V().put(`${Qe}${hn}/${lr}${pn}/${I}`,M)}catch(L){await H(L)}}}},dr=h(130);const{APIS:{SEARCH_API:{BASE_URL:li,ENDPOINTS:{SEARCH:mn}}}}=E,Ur=`${li}${mn}`;var gn={ask:async I=>{try{let M=null;const{data:L}=await V().get(Ur,{params:{question:I}});return L!=null&&L.answer&&(L!=null&&L.references)&&(L!=null&&L.version)&&(M=L),M}catch(M){const L=await H(M);throw new Error(L)}},stream:(I,M,L)=>{const D=(0,dr.io)(void 0,{path:"/api/search-api/web-sockets"});function ee(){D.emit("search",{question:I})}function Te(Me){L(Me),Ie(),D.disconnect()}function Ie(){D.off("connect",ee),D.off("update",M),D.off("result",Te)}return D.on("connect",ee),D.on("update",M),D.on("result",Te),Ie}};const{CONTENTFUL:yt}=E,{CARD_TYPES:Dr}=yt.CAROUSELS;var vn={read:async(I,M)=>{try{if(!M||!M.sys||!M.sys.id)throw new Error("Invalid link to card");if(!I||!Dr[I])throw new Error("Unsupported card content type");const{INCLUDE:L,SELECT:D}=Dr[I];return await(0,u.getEntry)({content_type:I,"sys.id":M.sys.id,include:L,select:D},{assetDetails:!0})}catch(L){throw await H(L),new Error(`Cannot read carousel card: ${L.message}`)}}};const{CONTENTFUL:fi}=E,{INCLUDE:y,SELECT:x,TYPE:R}=fi.EDITORIAL_PAGES;var j={read:async I=>{try{return await(0,u.getEntry)({content_type:R,"fields.slug":I,include:y,select:x})}catch(M){throw await H(M),new Error(`Cannot read editorial page: ${M.message}`)}}};const{CONTENTFUL:de}=E,{TYPE:ie,ORDER:pe,SELECT:me,SKIP:ke,LIMIT:Ee,INCLUDE:qe}=de.QUESTIONS;var Xe={read:async I=>{try{return await(0,u.getEntry)({content_type:ie,"fields.slug":I,include:2,select:me})}catch(M){throw await H(M),new Error(`Cannot read question: ${M.message}`)}},list:async(I={})=>{try{return await(0,u.getEntries)({content_type:ie,include:qe,limit:Ee,order:pe,select:me,skip:ke,...I})}catch(M){throw await H(M),new Error(`Cannot list questions: ${M.message}`)}}},Be=async(I,M,L={ignoreAnswersAuthors:!1})=>{try{let D={};return D=await Xe.read(I),D=await Pt.handlers.authors.readQuestionAuthors(D,M,L),D}catch(D){throw await H(D),new Error(`Cannot build question: ${D.message}`)}};const{ARTICLES:{TYPE:Ge},COURSES:{TYPE:Ue},EVENTS:{TYPE:It},LISTS:{TYPE:At},QUESTIONS:{TYPE:Qt},LEARNING_HUB:{TYPE:to}}=E.CONTENTFUL,Lt=I=>I&&I.url?(Object.assign(I,{aspect:"responsiveCard",query:"q=90&fit=fill"}),I):null,hr={[Ge]:async I=>{const{authorIds:M,authorTag:L,image:D,publishedDate:ee,readingTime:Te,slug:Ie,title:Me}=I,ht=await Pt.handlers.authors.readAuthors(M),kt=ht&&ht.length?ht:L?[L]:null;return{banner:Lt(D),contributors:kt,publishedDate:ee,readingTime:Te,slug:Ie,title:Me}},[Ue]:async(I,M)=>{const{banner:L,freeCourse:D,partnershipDetails:ee,slug:Te,title:Ie,registered:Me}=I,ht={banner:Lt(L),slug:Te,title:Ie,pill:D?"free":"premium",registered:!!Me};if(ee){const{partners:kt}=ee;ht.partner=kt&&kt.length&&ee.partners[0]}if(Me===void 0&&M){const[kt]=await Pt.userProducts.list({courseSlug:Te,isEnrolled:!0,scope:"active"});ht.registered=!!kt}return ht},[It]:async(I,M)=>{const{bannerImage:L,defaultStartDate:D,isEventOngoing:ee,slug:Te,speakers:Ie,title:Me,registered:ht}=I,kt=new Date(D),Eg=!!kt&&kt<new Date;if(Ie&&Ie.length)for(const ro of Ie)ro.image=(sa=ro.image)&&sa.url?`${sa.url}?w=100&h=100&fit=thumb&f=center`:null;var sa;const su={banner:Lt(L),dateHasPassed:Eg,title:Me,slug:Te,isOngoingEvent:ee,contributors:Ie,startDate:kt,registered:!!ht};if(ht===void 0&&M){const[ro]=await Pt.userEvents.list({eventSlug:Te});su.registered=!!ro}return su},[At]:async I=>{const{hero:M,slug:L,title:D}=I;return{banner:Lt(M),slug:L,title:D}},[Qt]:async I=>{const{answers:M,authorId:L,createdAt:D,slug:ee,title:Te}=I;let Ie=null;if(L){const Me=await Pt.users.read(L);Me&&(Ie=Me)}return{answers:M&&M.length?M.length:0,contributors:Ie?[Ie]:[],createdAt:D,slug:ee,title:Te}},[to]:I=>{const{bannerSection:M,customLabel:L,slug:D,title:ee}=I;return{banner:Lt(M.image),slug:D,title:ee,customLabel:L}},people:I=>{const{id:M,name:L,jobTitle:D,location:ee,image:Te}=I;return{profile:Te,slug:M,title:L,text:D,secondaryText:ee}}};var mg=async({contentType:I,...M}={},L)=>{try{if(!hr[I])throw new Error("Content type not supported");if(typeof hr[I]!="function")throw new Error("No builder function for content type");return I!=="people"&&M.sys&&M.sys.type&&M.sys.type==="Link"&&(M=await vn.read(I,M)),{contentType:I,...await hr[I](M,L)}}catch(D){throw await H(D),new Error(`Cannot build carousel card: ${D.message}`)}},gg=async(I,M,L={})=>{try{if(!I.replies||I.replies.length===0)return I.replies=[],I;I.replies.sort((ee,Te)=>new Date(ee.createdAt)-new Date(Te.createdAt)),I.totalReplies=I.totalReplies||I.replies.length;let D=I.replies;if(L.limit&&L.pageNumber){const ee=L.limit*(L.pageNumber-1);D=I.replies.slice(ee,ee+L.limit)}for(const ee of D){if(ee.authorId===I.authorId){ee.author=I.author,ee.userLiked=!1;continue}ee.author=ee.authorId&&await zt(ee.authorId)||{};const[Te]=M?await Lr({contentType:E.CONTENTFUL.REPLIES.TYPE,contentSlug:ee.slug}):[null];ee.userLiked=!!Te}return I.replies=D,I}catch(D){throw await H(D),new Error(`Cannot build replies for answer: ${D.message}`)}},yg=h(408);const vg=I=>I&&yg.Buffer.from(I,"base64").toString("ascii");function _g({contentContext:I=null,errorsContext:M=null,gtmContext:L=null,origin:D}){try{const ee=(Te=>{let Ie=null;Te?Ie=Te:typeof window<"u"&&(Ie=window.origin||window.location.origin),Ie||new Error("Cannot select environment: Website not defined");let Me=null;const ht=Ie.match(b);return ht?Me=ht[1].split(A)[0]:Ie===T?Me=w:Ie.includes(_)&&(Me=P),Me||new Error(`Cannot select environment: No rule for website ${Ie}`),Me})(D);return I&&(0,u.setContext)(Object.assign({},I,{environment:ee})),M&&(0,p.setContext)(Object.assign({},M,{environment:ee})),L&&((0,m.setContext)(Object.assign({},L,{environment:ee})),(0,m.setupGTM)()),(({environment:Te})=>{const Ie=(Me=>{if(!Me)throw new Error("Cannot map environment: Environment not defined");if(!F[Me])throw new Error(`Cannot map environment: No mapping found for environment ${Me}`);return F[Me]})(Te);W.emailIds=B[Ie]})(Object.assign({},{environment:ee})),ee}catch(ee){console.warn(`Cannot load SDK: ${ee.message}`)}}}(),d}()})})(kd);var FE=kd.exports;const Bi={Off:"off",On:"on",Cookie:"cookie"},UE=e=>{const[t]=Ld(),[n,r]=$.useState(null),[o,i]=$.useState(!1),[s,a]=$.useState(Bi.Off);return $.useEffect(()=>{e&&FE.features.flags.read(e).then(l=>{a(l.featureState),r(null)}).catch(l=>{a(Bi.Off),r(l)})},[e]),$.useEffect(()=>{switch(s){case Bi.Off:i(!1);break;case Bi.On:i(!0);break;case Bi.Cookie:i(!!t[`feature-${e}`]);break;default:i(!1)}},[s,t]),{isFeatureActive:o,error:n}};function DE(e,t,n){var r=this,o=$.useRef(null),i=$.useRef(0),s=$.useRef(null),a=$.useRef([]),l=$.useRef(),f=$.useRef(),c=$.useRef(e),h=$.useRef(!0);$.useEffect(function(){c.current=e},[e]);var d=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var u=!!(n=n||{}).leading,p=!("trailing"in n)||!!n.trailing,m="maxWait"in n,E=m?Math.max(+n.maxWait||0,t):null;$.useEffect(function(){return h.current=!0,function(){h.current=!1}},[]);var T=$.useMemo(function(){var _=function(B){var W=a.current,G=l.current;return a.current=l.current=null,i.current=B,f.current=c.current.apply(G,W)},b=function(B,W){d&&cancelAnimationFrame(s.current),s.current=d?requestAnimationFrame(B):setTimeout(B,W)},A=function(B){if(!h.current)return!1;var W=B-o.current;return!o.current||W>=t||W<0||m&&B-i.current>=E},w=function(B){return s.current=null,p&&a.current?_(B):(a.current=l.current=null,f.current)},P=function B(){var W=Date.now();if(A(W))return w(W);if(h.current){var G=t-(W-o.current),V=m?Math.min(G,E-(W-i.current)):G;b(B,V)}},F=function(){var B=Date.now(),W=A(B);if(a.current=[].slice.call(arguments),l.current=r,o.current=B,W){if(!s.current&&h.current)return i.current=o.current,b(P,t),u?_(o.current):f.current;if(m)return b(P,t),_(o.current)}return s.current||b(P,t),f.current};return F.cancel=function(){s.current&&(d?cancelAnimationFrame(s.current):clearTimeout(s.current)),i.current=0,a.current=o.current=l.current=s.current=null},F.isPending=function(){return!!s.current},F.flush=function(){return s.current?w(Date.now()):f.current},F},[u,m,t,E,p,d]);return T}function Ap(e,t,n){var r=n===void 0?{}:n,o=r.leading,i=r.trailing;return DE(e,t,{maxWait:t,leading:o===void 0||o,trailing:i===void 0||i})}let Os;const Xi=(e=!0,t=!1)=>{if(!e)return;const[n,r]=$.useState(0)||[!1,()=>{}];$.useEffect(()=>(i(),window.addEventListener("resize",s),()=>{clearTimeout(Os),s.flush(),window.removeEventListener("resize",s)}),[]);const o=()=>window.innerWidth,i=()=>{r(o())},s=Ap(()=>{o()!==n&&(t&&(clearTimeout(Os),document.body.classList.add("is-resizing"),Os=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),i())},500,{leading:!0});return n},Cp=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:n=()=>{},scrollUp:r=()=>{}}})=>{if(!window)return;const[o,i]=$.useState({current:0,past:0})||[!1,()=>{}],[s,a]=$.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];$.useEffect(()=>(l(),window.addEventListener("scroll",f),()=>{f.flush(),window.removeEventListener("scroll",f)}),[]);const l=()=>{const c=window.scrollY,h=o.current,d=c-h,u=d>0?"down":"up";if(i({current:c,past:h}),u==="down"){c>=e+t.down&&!s.scrollDown&&(!s.scrollUp||d>t.up)&&(n(),a({scrollUp:!1,scrollDown:!0}));return}Math.abs(d)>=t.up&&!s.scrollUp&&(r(),a({scrollUp:!0,scrollDown:!1}))},f=Ap(()=>{l()},250);return o};var jo={exports:{}};jo.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",s="[object Array]",a="[object Boolean]",l="[object Date]",f="[object Error]",c="[object Function]",h="[object GeneratorFunction]",d="[object Map]",u="[object Number]",p="[object Object]",m="[object Promise]",E="[object RegExp]",T="[object Set]",_="[object String]",b="[object Symbol]",A="[object WeakMap]",w="[object ArrayBuffer]",P="[object DataView]",F="[object Float32Array]",B="[object Float64Array]",W="[object Int8Array]",G="[object Int16Array]",V="[object Int32Array]",H="[object Uint8Array]",Y="[object Uint8ClampedArray]",oe="[object Uint16Array]",K="[object Uint32Array]",k=/[\\^$.*+?()[\]{}|]/g,z=/\w*$/,J=/^\[object .+?Constructor\]$/,ae=/^(?:0|[1-9]\d*)$/,Q={};Q[i]=Q[s]=Q[w]=Q[P]=Q[a]=Q[l]=Q[F]=Q[B]=Q[W]=Q[G]=Q[V]=Q[d]=Q[u]=Q[p]=Q[E]=Q[T]=Q[_]=Q[b]=Q[H]=Q[Y]=Q[oe]=Q[K]=!0,Q[f]=Q[c]=Q[A]=!1;var Z=typeof ue=="object"&&ue&&ue.Object===Object&&ue,ce=typeof self=="object"&&self&&self.Object===Object&&self,le=Z||ce||Function("return this")(),ze=t&&!t.nodeType&&t,X=ze&&!0&&e&&!e.nodeType&&e,re=X&&X.exports===ze;function Pe(y,x){return y.set(x[0],x[1]),y}function Oe(y,x){return y.add(x),y}function st(y,x){for(var R=-1,j=y?y.length:0;++R<j&&x(y[R],R,y)!==!1;);return y}function ut(y,x){for(var R=-1,j=x.length,de=y.length;++R<j;)y[de+R]=x[R];return y}function Et(y,x,R,j){var de=-1,ie=y?y.length:0;for(j&&ie&&(R=y[++de]);++de<ie;)R=x(R,y[de],de,y);return R}function te(y,x){for(var R=-1,j=Array(y);++R<y;)j[R]=x(R);return j}function Ye(y,x){return y==null?void 0:y[x]}function $e(y){var x=!1;if(y!=null&&typeof y.toString!="function")try{x=!!(y+"")}catch{}return x}function bt(y){var x=-1,R=Array(y.size);return y.forEach(function(j,de){R[++x]=[de,j]}),R}function Gt(y,x){return function(R){return y(x(R))}}function Rt(y){var x=-1,R=Array(y.size);return y.forEach(function(j){R[++x]=j}),R}var mt=Array.prototype,Sr=Function.prototype,wt=Object.prototype,gt=le["__core-js_shared__"],je=function(){var y=/[^.]+$/.exec(gt&&gt.keys&&gt.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),St=Sr.toString,rt=wt.hasOwnProperty,Ke=wt.toString,Tr=RegExp("^"+St.call(rt).replace(k,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=re?le.Buffer:void 0,g=le.Symbol,v=le.Uint8Array,C=Gt(Object.getPrototypeOf,Object),N=Object.create,U=wt.propertyIsEnumerable,q=mt.splice,fe=Object.getOwnPropertySymbols,be=S?S.isBuffer:void 0,we=Gt(Object.keys,Object),Se=ft(le,"DataView"),he=ft(le,"Map"),lt=ft(le,"Promise"),ar=ft(le,"Set"),xr=ft(le,"WeakMap"),Wt=ft(Object,"create"),Or=Qe(Se),Vt=Qe(he),Ar=Qe(lt),Cr=Qe(ar),Rr=Qe(xr),Nt=g?g.prototype:void 0,on=Nt?Nt.valueOf:void 0;function Tt(y){var x=-1,R=y?y.length:0;for(this.clear();++x<R;){var j=y[x];this.set(j[0],j[1])}}function Un(){this.__data__=Wt?Wt(null):{}}function Dn(y){return this.has(y)&&delete this.__data__[y]}function $n(y){var x=this.__data__;if(Wt){var R=x[y];return R===r?void 0:R}return rt.call(x,y)?x[y]:void 0}function an(y){var x=this.__data__;return Wt?x[y]!==void 0:rt.call(x,y)}function Nr(y,x){var R=this.__data__;return R[y]=Wt&&x===void 0?r:x,this}Tt.prototype.clear=Un,Tt.prototype.delete=Dn,Tt.prototype.get=$n,Tt.prototype.has=an,Tt.prototype.set=Nr;function Fe(y){var x=-1,R=y?y.length:0;for(this.clear();++x<R;){var j=y[x];this.set(j[0],j[1])}}function Pr(){this.__data__=[]}function Ir(y){var x=this.__data__,R=cr(x,y);if(R<0)return!1;var j=x.length-1;return R==j?x.pop():q.call(x,R,1),!0}function zt(y){var x=this.__data__,R=cr(x,y);return R<0?void 0:x[R][1]}function sn(y){return cr(this.__data__,y)>-1}function jn(y,x){var R=this.__data__,j=cr(R,y);return j<0?R.push([y,x]):R[j][1]=x,this}Fe.prototype.clear=Pr,Fe.prototype.delete=Ir,Fe.prototype.get=zt,Fe.prototype.has=sn,Fe.prototype.set=jn;function He(y){var x=-1,R=y?y.length:0;for(this.clear();++x<R;){var j=y[x];this.set(j[0],j[1])}}function Hn(){this.__data__={hash:new Tt,map:new(he||Fe),string:new Tt}}function qn(y){return Kt(this,y).delete(y)}function Gn(y){return Kt(this,y).get(y)}function Wn(y){return Kt(this,y).has(y)}function Lr(y,x){return Kt(this,y).set(y,x),this}He.prototype.clear=Hn,He.prototype.delete=qn,He.prototype.get=Gn,He.prototype.has=Wn,He.prototype.set=Lr;function Ze(y){this.__data__=new Fe(y)}function Vn(){this.__data__=new Fe}function zn(y){return this.__data__.delete(y)}function Yn(y){return this.__data__.get(y)}function Kn(y){return this.__data__.has(y)}function Qn(y,x){var R=this.__data__;if(R instanceof Fe){var j=R.__data__;if(!he||j.length<n-1)return j.push([y,x]),this;R=this.__data__=new He(j)}return R.set(y,x),this}Ze.prototype.clear=Vn,Ze.prototype.delete=zn,Ze.prototype.get=Yn,Ze.prototype.has=Kn,Ze.prototype.set=Qn;function sr(y,x){var R=fr(y)||lr(y)?te(y.length,String):[],j=R.length,de=!!j;for(var ie in y)(x||rt.call(y,ie))&&!(de&&(ie=="length"||si(ie,j)))&&R.push(ie);return R}function cn(y,x,R){var j=y[x];(!(rt.call(y,x)&&pn(j,R))||R===void 0&&!(x in y))&&(y[x]=R)}function cr(y,x){for(var R=y.length;R--;)if(pn(y[R][0],x))return R;return-1}function ct(y,x){return y&&Br(x,yn(x),y)}function kr(y,x,R,j,de,ie,pe){var me;if(j&&(me=ie?j(y,de,ie,pe):j(y)),me!==void 0)return me;if(!yt(y))return y;var ke=fr(y);if(ke){if(me=ai(y),!x)return ii(y,me)}else{var Ee=Ot(y),qe=Ee==c||Ee==h;if(mn(y))return ur(y,x);if(Ee==p||Ee==i||qe&&!ie){if($e(y))return ie?y:{};if(me=dt(qe?{}:y),!x)return oi(y,ct(me,y))}else{if(!Q[Ee])return ie?y:{};me=Pt(y,Ee,kr,x)}}pe||(pe=new Ze);var Xe=pe.get(y);if(Xe)return Xe;if(pe.set(y,me),!ke)var Be=R?Fr(y):yn(y);return st(Be||y,function(Ge,Ue){Be&&(Ue=Ge,Ge=y[Ue]),cn(me,Ue,kr(Ge,x,R,j,Ue,y,pe))}),me}function Xn(y){return yt(y)?N(y):{}}function Jn(y,x,R){var j=x(y);return fr(y)?j:ut(j,R(y))}function Zn(y){return Ke.call(y)}function ei(y){if(!yt(y)||ui(y))return!1;var x=Ur(y)||$e(y)?Tr:J;return x.test(Qe(y))}function ti(y){if(!dn(y))return we(y);var x=[];for(var R in Object(y))rt.call(y,R)&&R!="constructor"&&x.push(R);return x}function ur(y,x){if(x)return y.slice();var R=new y.constructor(y.length);return y.copy(R),R}function Mr(y){var x=new y.constructor(y.byteLength);return new v(x).set(new v(y)),x}function Yt(y,x){var R=x?Mr(y.buffer):y.buffer;return new y.constructor(R,y.byteOffset,y.byteLength)}function un(y,x,R){var j=x?R(bt(y),!0):bt(y);return Et(j,Pe,new y.constructor)}function ln(y){var x=new y.constructor(y.source,z.exec(y));return x.lastIndex=y.lastIndex,x}function fn(y,x,R){var j=x?R(Rt(y),!0):Rt(y);return Et(j,Oe,new y.constructor)}function ri(y){return on?Object(on.call(y)):{}}function ni(y,x){var R=x?Mr(y.buffer):y.buffer;return new y.constructor(R,y.byteOffset,y.length)}function ii(y,x){var R=-1,j=y.length;for(x||(x=Array(j));++R<j;)x[R]=y[R];return x}function Br(y,x,R,j){R||(R={});for(var de=-1,ie=x.length;++de<ie;){var pe=x[de],me=j?j(R[pe],y[pe],pe,R,y):void 0;cn(R,pe,me===void 0?y[pe]:me)}return R}function oi(y,x){return Br(y,xt(y),x)}function Fr(y){return Jn(y,yn,xt)}function Kt(y,x){var R=y.__data__;return ci(x)?R[typeof x=="string"?"string":"hash"]:R.map}function ft(y,x){var R=Ye(y,x);return ei(R)?R:void 0}var xt=fe?Gt(fe,Object):vn,Ot=Zn;(Se&&Ot(new Se(new ArrayBuffer(1)))!=P||he&&Ot(new he)!=d||lt&&Ot(lt.resolve())!=m||ar&&Ot(new ar)!=T||xr&&Ot(new xr)!=A)&&(Ot=function(y){var x=Ke.call(y),R=x==p?y.constructor:void 0,j=R?Qe(R):void 0;if(j)switch(j){case Or:return P;case Vt:return d;case Ar:return m;case Cr:return T;case Rr:return A}return x});function ai(y){var x=y.length,R=y.constructor(x);return x&&typeof y[0]=="string"&&rt.call(y,"index")&&(R.index=y.index,R.input=y.input),R}function dt(y){return typeof y.constructor=="function"&&!dn(y)?Xn(C(y)):{}}function Pt(y,x,R,j){var de=y.constructor;switch(x){case w:return Mr(y);case a:case l:return new de(+y);case P:return Yt(y,j);case F:case B:case W:case G:case V:case H:case Y:case oe:case K:return ni(y,j);case d:return un(y,j,R);case u:case _:return new de(y);case E:return ln(y);case T:return fn(y,j,R);case b:return ri(y)}}function si(y,x){return x=x??o,!!x&&(typeof y=="number"||ae.test(y))&&y>-1&&y%1==0&&y<x}function ci(y){var x=typeof y;return x=="string"||x=="number"||x=="symbol"||x=="boolean"?y!=="__proto__":y===null}function ui(y){return!!je&&je in y}function dn(y){var x=y&&y.constructor,R=typeof x=="function"&&x.prototype||wt;return y===R}function Qe(y){if(y!=null){try{return St.call(y)}catch{}try{return y+""}catch{}}return""}function hn(y){return kr(y,!0,!0)}function pn(y,x){return y===x||y!==y&&x!==x}function lr(y){return li(y)&&rt.call(y,"callee")&&(!U.call(y,"callee")||Ke.call(y)==i)}var fr=Array.isArray;function dr(y){return y!=null&&gn(y.length)&&!Ur(y)}function li(y){return Dr(y)&&dr(y)}var mn=be||fi;function Ur(y){var x=yt(y)?Ke.call(y):"";return x==c||x==h}function gn(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=o}function yt(y){var x=typeof y;return!!y&&(x=="object"||x=="function")}function Dr(y){return!!y&&typeof y=="object"}function yn(y){return dr(y)?sr(y):ti(y)}function vn(){return[]}function fi(){return!1}e.exports=hn})(jo,jo.exports);var $E=jo.exports;const jE=jt($E);var HE="Expected a function",Rp="__lodash_hash_undefined__",Np=1/0,qE=9007199254740991,GE="[object Function]",WE="[object GeneratorFunction]",VE="[object Symbol]",zE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,YE=/^\w*$/,KE=/^\./,QE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,XE=/[\\^$.*+?()[\]{}|]/g,JE=/\\(\\)?/g,ZE=/^\[object .+?Constructor\]$/,eb=/^(?:0|[1-9]\d*)$/,tb=typeof ue=="object"&&ue&&ue.Object===Object&&ue,rb=typeof self=="object"&&self&&self.Object===Object&&self,Dc=tb||rb||Function("return this")();function nb(e,t){return e==null?void 0:e[t]}function ib(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var ob=Array.prototype,ab=Function.prototype,Pp=Object.prototype,As=Dc["__core-js_shared__"],$f=function(){var e=/[^.]+$/.exec(As&&As.keys&&As.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ip=ab.toString,Zo=Pp.hasOwnProperty,Lp=Pp.toString,sb=RegExp("^"+Ip.call(Zo).replace(XE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),jf=Dc.Symbol,cb=ob.splice,ub=kp(Dc,"Map"),Gi=kp(Object,"create"),Hf=jf?jf.prototype:void 0,qf=Hf?Hf.toString:void 0;function Jr(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function lb(){this.__data__=Gi?Gi(null):{}}function fb(e){return this.has(e)&&delete this.__data__[e]}function db(e){var t=this.__data__;if(Gi){var n=t[e];return n===Rp?void 0:n}return Zo.call(t,e)?t[e]:void 0}function hb(e){var t=this.__data__;return Gi?t[e]!==void 0:Zo.call(t,e)}function pb(e,t){var n=this.__data__;return n[e]=Gi&&t===void 0?Rp:t,this}Jr.prototype.clear=lb;Jr.prototype.delete=fb;Jr.prototype.get=db;Jr.prototype.has=hb;Jr.prototype.set=pb;function Mn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function mb(){this.__data__=[]}function gb(e){var t=this.__data__,n=ea(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():cb.call(t,n,1),!0}function yb(e){var t=this.__data__,n=ea(t,e);return n<0?void 0:t[n][1]}function vb(e){return ea(this.__data__,e)>-1}function _b(e,t){var n=this.__data__,r=ea(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Mn.prototype.clear=mb;Mn.prototype.delete=gb;Mn.prototype.get=yb;Mn.prototype.has=vb;Mn.prototype.set=_b;function tn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Eb(){this.__data__={hash:new Jr,map:new(ub||Mn),string:new Jr}}function bb(e){return ta(this,e).delete(e)}function wb(e){return ta(this,e).get(e)}function Sb(e){return ta(this,e).has(e)}function Tb(e,t){return ta(this,e).set(e,t),this}tn.prototype.clear=Eb;tn.prototype.delete=bb;tn.prototype.get=wb;tn.prototype.has=Sb;tn.prototype.set=Tb;function xb(e,t,n){var r=e[t];(!(Zo.call(e,t)&&Mp(r,n))||n===void 0&&!(t in e))&&(e[t]=n)}function ea(e,t){for(var n=e.length;n--;)if(Mp(e[n][0],t))return n;return-1}function Ob(e){if(!Ho(e)||Lb(e))return!1;var t=Fb(e)||ib(e)?sb:ZE;return t.test(Bb(e))}function Ab(e,t,n,r){if(!Ho(e))return e;t=Pb(t,e)?[t]:Rb(t);for(var o=-1,i=t.length,s=i-1,a=e;a!=null&&++o<i;){var l=Mb(t[o]),f=n;if(o!=s){var c=a[l];f=r?r(c,l,a):void 0,f===void 0&&(f=Ho(c)?c:Nb(t[o+1])?[]:{})}xb(a,l,f),a=a[l]}return e}function Cb(e){if(typeof e=="string")return e;if(jc(e))return qf?qf.call(e):"";var t=e+"";return t=="0"&&1/e==-Np?"-0":t}function Rb(e){return Bp(e)?e:kb(e)}function ta(e,t){var n=e.__data__;return Ib(t)?n[typeof t=="string"?"string":"hash"]:n.map}function kp(e,t){var n=nb(e,t);return Ob(n)?n:void 0}function Nb(e,t){return t=t??qE,!!t&&(typeof e=="number"||eb.test(e))&&e>-1&&e%1==0&&e<t}function Pb(e,t){if(Bp(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||jc(e)?!0:YE.test(e)||!zE.test(e)||t!=null&&e in Object(t)}function Ib(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Lb(e){return!!$f&&$f in e}var kb=$c(function(e){e=Db(e);var t=[];return KE.test(e)&&t.push(""),e.replace(QE,function(n,r,o,i){t.push(o?i.replace(JE,"$1"):r||n)}),t});function Mb(e){if(typeof e=="string"||jc(e))return e;var t=e+"";return t=="0"&&1/e==-Np?"-0":t}function Bb(e){if(e!=null){try{return Ip.call(e)}catch{}try{return e+""}catch{}}return""}function $c(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(HE);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s),s};return n.cache=new($c.Cache||tn),n}$c.Cache=tn;function Mp(e,t){return e===t||e!==e&&t!==t}var Bp=Array.isArray;function Fb(e){var t=Ho(e)?Lp.call(e):"";return t==GE||t==WE}function Ho(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ub(e){return!!e&&typeof e=="object"}function jc(e){return typeof e=="symbol"||Ub(e)&&Lp.call(e)==VE}function Db(e){return e==null?"":Cb(e)}function $b(e,t,n){return e==null?e:Ab(e,t,n)}var jb=$b;const Hb=jt(jb),qb=(e,t)=>{Array.isArray(t)||(t=[t]);const n=jE(e);return t.forEach(({type:r,value:o})=>{Hb(n,r,o)}),n},Fp=e=>{const t=[];return e.forEach(n=>{const r=parseInt(n);isNaN(r)||t.push(r)}),t.sort((n,r)=>n-r)},Up=(e,t,n)=>{let r=n.mobile;for(const o in t){const i=parseInt(String(t[o]));if(e>=i)r=n[i];else if(e<i)break}return r},Gf=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),Gb=e=>{let i;try{i=new Date().getTime()-new Date(e).getTime()}catch{return""}const s=i/36e5,a=Math.floor(i/864e5);if(a<1)return s<1?{path:"now"}:{path:"hours",number:Math.floor(s)};if(a<7)return{path:"days",number:a};const l=Math.floor(a/7);return l<=52?{path:"weeks",number:l}:{path:"years",number:Math.floor(a/365)}},Wb=e=>new Promise(t=>setTimeout(t,e)),Hc={apolitical:"Apolitical",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 (coming soon)",contactFooter_title:"Contact us",contactFooter_text:"We're always open to new ideas, so please reach out to see how we can collaborate.",contactFooter_phone:"+44 203 608 2241",contactFooter_email:"hello@apolitical.co",contactForm_name:"Name",contactForm_email:"Email address",contactForm_organisation:"Government department or organisation",contactForm_interests:"I'm interested in",contactForm_interests_publishingCourse:"Publishing or creating a course",contactForm_interests_buyingCourse:"Buying courses for my team",contactForm_interests_learningExperience:"Customised learning experiences",contactForm_interests_somethingElse:"Something else",contactForm_message:"Message",cookieBanner_title:"Cookies and your privacy",cookieBanner_text:"We take your trust and privacy very seriously. Apolitical uses safe cookies (small files on your device) to run the site. You can reject non-essential cookies, but some site features may not work without them.",cookieBanner_buttons_settings:"Change my settings",cookieBanner_buttons_reject:"Reject all",cookieBanner_buttons_accept:"Accept all",dates_now:"now",dates_hours:"{number}h",dates_days:"{number}d",dates_weeks:"{number}w",dates_years:"{number}y",discussion_action_answer:"answer",discussion_action_comment:"comment",discussion_action_post:"post",discussion_action_response:"response",discussion_action_reply:"reply",discussion_action_question:"question",discussion_answer_likes:"{count, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_answer_likes_like:"Like this answer",discussion_answer_likes_unlike:"Unlike answer",discussion_edited:"Edited",discussion_delete_title:"Delete {action}",discussion_delete_text:"<p>Are you sure you want to delete your {action}?</p><p>This can't be undone.</p>",discussion_delete_cancel:"Cancel",discussion_delete_delete:"Delete",discussion_delete_error:"We are unable to delete your {action} at the moment. Please try again later or contact us if problem persists.",discussion_reply:"Reply",discussion_reply_likes:"{count, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_reply_likes_like:"Like this reply",discussion_reply_likes_unlike:"Unlike reply",discussion_report_subject:"Report a post on Apolitical",discussion_report_body:`I'd like to report the {contentType} <{contentSlug}> at {contentUrl}.
62
62
 
63
63
  Please explain why you're reporting this post. Reasons could include: inappropriate language, harassment, spam, hate speech, false information, among others. Include as much detail as you feel comfortable.
64
64
 
65
- Thank you for helping to protect the Apolitical community from abusive content.`,discussion_form_title:"Write your {action}",discussion_form_placeholder:"Type your {action} here...",discussion_form_label:"Your {action}",discussion_form_explainer:"Try to make your {action} specific and practical. Be respectful and kind. See our <a>community guidelines</a>",discussion_form_success:"Your {action} has been submitted.",discussion_form_post:"Post",discussion_form_posting:"Posting...",discussion_form_save:"Save",discussion_form_saving:"Saving...",discussion_form_cancel:"Cancel",discussion_form_submitting:"Submitting...",discussion_form_placeholder_post:"Write something...",discussion_form_error:"We are unable to process your {action} right now. Please try again later or contact us if the problem persists",discussion_form_error_tooLong:"Please keep your content to {maxLength, plural, one {1 character} other {# characters}}.",discussion_form_error_tooMany:"You have posted too many times in a row. Please wait and try again.",discussion_form_error_loggedOut:"Please log in to submit your {action}.",discussion_form_error_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_question_answers_screenReader:"See {count, plural, =0 {0 answers} one {# answer} other {# answers}}",discussion_question_answers:"{count, plural, =0 {0 answers} one {# answer} other {# answers}}",discussion_question_answers_title:"Answers ({count})",discussion_question_noAnswers:"Be the first to answer this question",discussion_question_report_subject:"Report a post on Apolitical",discussion_question_report_body:`I'd like to report the question at {questionUrl}.
66
-
67
- 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.
68
-
69
- Thank you for helping to protect the Apolitical community from abusive content.`,emailHelperTextBox_fallback_title:"Who can join",emailHelperTextBox_fallback_text:"Apolitical is a private community for public servants and policymakers.",emailHelperTextBox_default_title:"Who can join",emailHelperTextBox_default_text:"Apolitical is a private community for public servants and policymakers. <link>Learn more</link>.",emailHelperTextBox_autoApproved_title:"Email check",emailHelperTextBox_autoApproved_text:"Great! Looks like you are using a **government email domain we recognise.** You will be **auto-approved** once you sign up.",emailHelperTextBox_unrecognisedEmail_title:"Not a recognised government email",emailHelperTextBox_unrecognisedEmail_text:"To confirm you work in government or policy, please add more details below. <link>Learn more</link>.",emailHelperTextBox_pendingApproval_title:"Email is pending approval",emailHelperTextBox_pendingApproval_text:"Looks like this email has been used to sign up to Apolitical before, but <strong>we have not yet approved it.</strong> If you cannot wait to join, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_emailUnverified_title:"Hello again!",emailHelperTextBox_emailUnverified_text:"It looks like you're already an Apolitical member. To access your account, please verify your email address. <link>Click here to get a verification code sent to your email</link>.",emailHelperTextBox_emailAlreadyExists_title:"Email is already registered",emailHelperTextBox_emailAlreadyExists_text:"Looks like this email has been used to sign up to Apolitical before, try <link>logging in</link> instead. If you're still having issues, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_error_verificationFailedToSend_title:"Verification code failed to send",emailHelperTextBox_error_verificationFailedToSend_text:"Error details: <em>{error}</em>{br}<link>Click here to try again</link>.{br}If you continue to have problems, contact us at <mail>concierge@apolitical.co</mail>",emailHelperTextBox_error_noFunction:"Cannot resend verification code.",filters_all:"Show all",filters_disabled:"{name} - no results",footer_platform:"Platform",footer_platform_events:"Events",footer_platform_courses:"Courses",footer_platform_qanda:"Q&A",footer_platform_articles:"Articles",footer_community:"Community",footer_community_support:"Support FAQ",footer_community_post:"Post on Apolitical",footer_community_join:"Who can join",footer_community_guidelines:"Guidelines & values",footer_company:"Company",footer_company_story:"Our story",footer_company_team:"Meet our team",footer_company_careers:"Careers",footer_company_partner:"Partner with us",footer_company_contact:"Get in touch",footer_legal:"Legal",footer_legal_privacy:"Privacy policy",footer_legal_terms:"Terms & conditions",footer_legal_cookie:"Cookie policy",footer_legal_accessibility:"Accessibility statement",footer_legal_dataProtection:"Data protection officer",footer_legal_euDataProtection:"EU data protection officer",footer_contact:"Contact",footer_contact_correspondence:"Correspondence address",footer_contact_correspondence_address:"251 Southwark Bridge Road{br}London, SE1 6FL{br}United Kingdom",footer_contact_registered:"Registered address",footer_contact_registered_address:"20–22 Wenlock Road{br}London, N1 7GU{br}United Kingdom",footer_contact_berlin:"Berlin address",footer_contact_berlin_address:"Torstraße 220{br}10115 Berlin{br}Germany",footer_contact_support:"For platform support",footer_contact_business:"For business inquiries",footer_social_linkedin:"LinkedIn",footer_social_twitter:"Twitter",footer_social_facebook:"Facebook",footer_copyright:"Copyright © {currentYear} Apolitical Group Limited",form_fieldWrapper_required:"required",form_fieldWrapper_characterLimit:"Character limit:",form_error_generalError:"Sorry, something has gone. Please refresh the page and try again.",form_error_required:"Please fill in this required field",form_error_numbers:"Numbers are not allowed in this text field",form_error_email:"Please enter a valid email address",form_error_url:"Please enter a valid URL",form_submit:"Submit",form_submitting:"Submitting form...",form_submitted:"Submitted",header_skip:"Skip to main content",header_search_show:"Show search bar",header_search_hide:"Close search bar",header_menu_show:"Show navigation",header_menu_hide:"Close navigation",header_home_loggedOut:"Home",header_home_loggedIn:"My Home",header_topics:"Topics",header_topics_explore:"Explore",header_topics_explore_events:"Events",header_topics_explore_courses:"Courses","header_topics_explore_q-and-a":"Q&A",header_topics_explore_articles:"Articles",header_topics_topics:"Topics",header_topics_topics_climate:"Climate","header_topics_topics_cities-and-local-government":"Cities and local government","header_topics_topics_digital-and-data":"Digital and data",header_topics_topics_education:"Education","header_topics_topics_equity-justice-and-inclusion":"Equity, justice and inclusion","header_topics_topics_health-and-social-care":"Health and social care",header_topics_topics_innovation:"Innovation","header_topics_topics_leadership-and-skills":"Leadership and skills","header_topics_topics_life-in-government":"Life in government",header_topics_topics_policymaking:"Policymaking","header_topics_topics_transport-and-infrastructure":"Transport and infrastructure","header_topics_topics_work-and-the-economy":"Work and the economy",header_partners:"For partners",header_account:"My account",header_account_show:"Show account menu",header_account_hide:"Close account menu",header_account_profile:"My profile",header_account_settings:"Settings & privacy","header_account_log-out":"Log out",header_buttons_login:"Log in",header_buttons_signup:"Sign up",hideShowTextBox_hide:"View less",hideShowTextBox_show:"View more",joinCommunityButton:"Join community",joinCommunityButton_member:"Member",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",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"},Fb={collapsibleSection_summary:"En savoir plus"},Ub=Object.freeze(Object.defineProperty({__proto__:null,en:Fu,fr:Fb},Symbol.toStringTag,{value:"Module"})),dr=(e,t,n,r,o={})=>{let i="";return`${t}_${n}`in Fu?i=e({id:`${t}_${n}`},o):i=e({id:t},{[r]:n,...o}),i},Db=(e,t)=>G.Children.map(e,n=>G.cloneElement(n,{...t})),$b=e=>e.replace(/\s+/g,"").length>0,ut=({variant:e="primary",size:t="medium",styling:n={muted:!1,fullWidth:!1},icon:r=!1,href:o=!1,element:i="button",onClick:s=!1,className:a="",disabled:l=!1,screenreaderText:f=!1,children:u=!1,...h})=>{const c=Ki(typeof t=="object");if(typeof t=="object"&&typeof c=="number"){const _=Object.assign({},t),T=Np(Object.keys(_));t=Lp(c,T,_)}const p=[];typeof t=="string"&&p.push(t),r&&(p.push("icon"),typeof r=="object"?(p.push(r.icon),r.position?p.push(r.position):p.push("left"),r.hover&&p.push(`hover_${r.hover}`),r.animate&&(p.push("animate"),typeof r.animate=="string"&&p.push(r.animate))):(p.push(r),!r.includes("right")&&!r.includes("left")&&p.push("left"))),n.muted&&p.push("muted"),n.fullWidth&&p.push("full-width");const m={...h,className:se(e,a,p,{"no-text":!u,disabled:l,button:o}),onClick:_=>{(!o||o[0]==="#")&&s&&(_.preventDefault(),_.stopPropagation()),s&&s(_)},disabled:typeof l=="object"&&"isClickable"in l?!l.isClickable:l};return o&&(i="a",m.href=o),G.createElement(i,m,u||(f?C.jsx(it,{showOnFocus:!1,children:f}):null))},Xo=({buttons:e,className:t="",...n})=>{const r=e.length>1?"ul":"p",o=e.map((i,s)=>r==="p"?C.jsx(ut,{...i},s):C.jsx("li",{children:C.jsx(ut,{...i})},s));return G.createElement(r,{className:se("button-wrapper",t),...n},o)},kp=({href:e,children:t,className:n="",onClick:r=()=>{},gtmContext:o,gtmType:i,...s})=>e?C.jsx("a",{href:e,className:se("gtm-trackable",n),onClick:r,"data-gtm-event-context":o,"data-gtm-event-type":i,...s,children:t}):t,$f={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"}},jb=({aspect:e,range:t,sizes:n})=>{const{range:r,sizes:o}=e?$f[e]:$f.fallback;return{range:t&&t.length>0?t:r,sizes:n||o}},Hb=({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},Ts=({format:e,range:t,url:n,query:r})=>t.map(({height:o,width:i})=>`${n}?${Hb({format:e,height:o,query:r,width:i})} ${i}w`).join(", ");const Bp=({image:e,className:t,testId:n})=>{const{description:r,height:o,type:i,query:s,url:a,width:l,loading:f,decoding:u,fetchPriority:h}=e,{range:d,sizes:c}=jb(e),p=Ts({format:"avif",query:s,range:d,url:a}),m=Ts({format:"webp",query:s,range:d,url:a}),_=Ts({format:"",query:s,range:d,url:a});return C.jsxs("picture",{className:t,children:[i!=="image/gif"&&C.jsx("source",{type:"image/avif",srcSet:p,sizes:c,"data-testid":"source"}),C.jsx("source",{type:"image/webp",srcSet:m,sizes:c,"data-testid":"source"}),C.jsx("img",{srcSet:_,sizes:c,src:a,alt:r,loading:f||"lazy",decoding:u||"async",fetchpriority:h||"auto",width:l,height:o,"data-testid":n||"image"})]})};const Uu=({children:e,className:t="",...n})=>C.jsx("section",{className:se("full-width-section",t),...n,children:e});const qb=({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})}),C.jsx(Uu,{className:se("download-section",n),children:C.jsxs(C.Fragment,{children:[G.createElement(typeof e=="string"?"h2":e.element,{className:"text"},typeof e=="string"?e:e.text),C.jsx(Xo,{buttons:r})]})})};const Gb=({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 C.jsxs("div",{className:se("logos",n),children:[e&&G.createElement(o.element,{className:"title"},o.text),C.jsx("ul",{className:se({"two-col":r===2||r===4,"three-col":r===5||r<=10&&r%3===0}),children:t.map(({logo:i,nameOfBusiness:s,link:a=!1,description:l=!1},f)=>{if(!i||!i.url)return null;const u=C.jsx("img",{src:i.url,width:i.width||"auto",height:i.height||"auto",alt:s});return C.jsxs("li",{children:[C.jsx("p",{className:"img-wrapper",children:a?C.jsx("a",{href:a,target:"_blank",rel:"nofollow noreferrer noopener",children:u}):u}),l&&C.jsx("small",{children:l})]},window.btoa(`${i.url}_${f}`))})})]})};const Wb=["small","span","strong","em","p","h1","h2","h3","h4","h5","h6","blockquote","q"],Vb=({content:e,image:t,variant:n="default",spacing:r="normal",cta:o,children:i})=>{const s=["eyebrow","title","text"],a={eyebrow:"small",title:"h1",text:"p"},l={};return s.forEach(f=>{if(!e[f]){l[f]=!1;return}if(typeof e[f]=="object"){l[f]=e[f];const{text:u,element:h}=e[f];if(h&&Wb.includes(h.toLowerCase()))return;l[f]={text:u,element:a[f]};return}l[f]={text:e[f],element:a[f]}}),o&&o.link&&o.link[0]==="#"&&(o.props||(o.props={}),o.props.onClick=f=>{f.preventDefault(),f.stopPropagation();const u=document.getElementById(o.link.substring(1));u&&u.scrollIntoView({behavior:"smooth"})}),C.jsx(Uu,{className:se("banner-section",n,r,{"has-image":t,"has-extra-spacing":r==="normal"&&l.eyebrow&&l.title}),children:C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"content-wrapper",children:[s.map(f=>{if(l[f]&&typeof l[f]=="object"){const{text:u,element:h=""}=l[f];return G.createElement(h.toLowerCase(),{key:f,className:f},u)}return null}),i,o&&o.text&&o.link&&C.jsx(ut,{variant:t||n==="light"?"primary":"secondary",size:{mobile:"medium",768:"large"},href:o.link,...o.props,children:o.text})]}),t&&C.jsx(Bp,{image:{...t,aspect:"banner"}})]})})},zb=G.memo(Vb);const Yb=({variant:e="primary",button:t=null,title:n,text:r,gtmContext:o})=>!n&&!r?null:C.jsxs("aside",{className:se("marketing-block",e),children:[n&&C.jsx("p",{className:"title",children:n}),r&&C.jsx("p",{children:r}),t&&C.jsx(ut,{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})]});var tu=function(e,t){return tu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},tu(e,t)};function vt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");tu(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ne=function(){return ne=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ne.apply(this,arguments)};function Cn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Dt(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function Mp(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}var ye;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(ye||(ye={}));var Le;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(Le||(Le={}));var Rn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Rn||(Rn={}));function jf(e){return e.type===Le.literal}function Kb(e){return e.type===Le.argument}function Fp(e){return e.type===Le.number}function Up(e){return e.type===Le.date}function Dp(e){return e.type===Le.time}function $p(e){return e.type===Le.select}function jp(e){return e.type===Le.plural}function Qb(e){return e.type===Le.pound}function Hp(e){return e.type===Le.tag}function qp(e){return!!(e&&typeof e=="object"&&e.type===Rn.number)}function ru(e){return!!(e&&typeof e=="object"&&e.type===Rn.dateTime)}var Gp=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Xb=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Jb(e){var t={};return e.replace(Xb,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"short":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var Zb=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function ew(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Zb).filter(function(d){return d.length>0}),n=[],r=0,o=t;r<o.length;r++){var i=o[r],s=i.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var a=s[0],l=s.slice(1),f=0,u=l;f<u.length;f++){var h=u[f];if(h.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:l})}return n}function tw(e){return e.replace(/^(.*?)-/,"")}var Hf=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Wp=/^(@+)?(\+|#+)?[rs]?$/g,rw=/(\*)(0+)|(#+)(0+)|(0+)/g,Vp=/^(0+)$/;function qf(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Wp,function(n,r,o){return typeof o!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):o==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof o=="string"?o.length:0)),""}),t}function zp(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function nw(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Vp.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Gf(e){var t={},n=zp(e);return n||t}function iw(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];switch(o.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=o.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=tw(o.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=ne(ne(ne({},t),{notation:"scientific"}),o.options.reduce(function(l,f){return ne(ne({},l),Gf(f))},{}));continue;case"engineering":t=ne(ne(ne({},t),{notation:"engineering"}),o.options.reduce(function(l,f){return ne(ne({},l),Gf(f))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(o.options[0]);continue;case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(rw,function(l,f,u,h,d,c){if(f)t.minimumIntegerDigits=u.length;else{if(h&&d)throw new Error("We currently do not support maximum integer digits");if(c)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Vp.test(o.stem)){t.minimumIntegerDigits=o.stem.length;continue}if(Hf.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(Hf,function(l,f,u,h,d,c){return u==="*"?t.minimumFractionDigits=f.length:h&&h[0]==="#"?t.maximumFractionDigits=h.length:d&&c?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.length+c.length):(t.minimumFractionDigits=f.length,t.maximumFractionDigits=f.length),""});var i=o.options[0];i==="w"?t=ne(ne({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=ne(ne({},t),qf(i)));continue}if(Wp.test(o.stem)){t=ne(ne({},t),qf(o.stem));continue}var s=zp(o.stem);s&&(t=ne(ne({},t),s));var a=nw(o.stem);a&&(t=ne(ne({},t),a))}return t}var wo={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function ow(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);if(o==="j"){for(var i=0;r+1<e.length&&e.charAt(r+1)===o;)i++,r++;var s=1+(i&1),a=i<2?1:3+(i>>1),l="a",f=aw(t);for((f=="H"||f=="k")&&(a=0);a-- >0;)n+=l;for(;s-- >0;)n=f+n}else o==="J"?n+="H":n+=o}return n}function aw(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var o=wo[r||""]||wo[n||""]||wo["".concat(n,"-001")]||wo["001"];return o[0]}var Os,sw=new RegExp("^".concat(Gp.source,"*")),uw=new RegExp("".concat(Gp.source,"*$"));function Ee(e,t){return{start:e,end:t}}var cw=!!String.prototype.startsWith,lw=!!String.fromCodePoint,fw=!!Object.fromEntries,dw=!!String.prototype.codePointAt,hw=!!String.prototype.trimStart,pw=!!String.prototype.trimEnd,mw=!!Number.isSafeInteger,gw=mw?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},nu=!0;try{var yw=Kp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");nu=((Os=yw.exec("a"))===null||Os===void 0?void 0:Os[0])==="a"}catch{nu=!1}var Wf=cw?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},iu=lw?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",o=t.length,i=0,s;o>i;){if(s=t[i++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},Vf=fw?Object.fromEntries:function(t){for(var n={},r=0,o=t;r<o.length;r++){var i=o[r],s=i[0],a=i[1];n[s]=a}return n},Yp=dw?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var o=t.charCodeAt(n),i;return o<55296||o>56319||n+1===r||(i=t.charCodeAt(n+1))<56320||i>57343?o:(o-55296<<10)+(i-56320)+65536}},vw=hw?function(t){return t.trimStart()}:function(t){return t.replace(sw,"")},Ew=pw?function(t){return t.trimEnd()}:function(t){return t.replace(uw,"")};function Kp(e,t){return new RegExp(e,t)}var ou;if(nu){var zf=Kp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");ou=function(t,n){var r;zf.lastIndex=n;var o=zf.exec(t);return(r=o[1])!==null&&r!==void 0?r:""}}else ou=function(t,n){for(var r=[];;){var o=Yp(t,n);if(o===void 0||Qp(o)||Sw(o))break;r.push(o),n+=o>=65536?2:1}return iu.apply(void 0,r)};var _w=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var o=[];!this.isEOF();){var i=this.char();if(i===123){var s=this.parseArgument(t,r);if(s.err)return s;o.push(s.val)}else{if(i===125&&t>0)break;if(i===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),o.push({type:Le.pound,location:Ee(a,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(ye.UNMATCHED_CLOSING_TAG,Ee(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&au(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;o.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;o.push(s.val)}}}return{val:o,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Le.literal,value:"<".concat(o,"/>"),location:Ee(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,n,!0);if(i.err)return i;var s=i.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!au(this.char()))return this.error(ye.INVALID_TAG,Ee(a,this.clonePosition()));var l=this.clonePosition(),f=this.parseTagName();return o!==f?this.error(ye.UNMATCHED_CLOSING_TAG,Ee(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Le.tag,value:o,children:s,location:Ee(r,this.clonePosition())},err:null}:this.error(ye.INVALID_TAG,Ee(a,this.clonePosition())))}else return this.error(ye.UNCLOSED_TAG,Ee(r,this.clonePosition()))}else return this.error(ye.INVALID_TAG,Ee(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&ww(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),o="";;){var i=this.tryParseQuote(n);if(i){o+=i;continue}var s=this.tryParseUnquoted(t,n);if(s){o+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){o+=a;continue}break}var l=Ee(r,this.clonePosition());return{val:{type:Le.literal,value:o,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!bw(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return iu.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),iu(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,Ee(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ye.EMPTY_ARGUMENT,Ee(r,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(ye.MALFORMED_ARGUMENT,Ee(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,Ee(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Le.argument,value:o,location:Ee(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,Ee(r,this.clonePosition())):this.parseArgumentOptions(t,n,o,r);default:return this.error(ye.MALFORMED_ARGUMENT,Ee(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=ou(this.message,n),o=n+r.length;this.bumpTo(o);var i=this.clonePosition(),s=Ee(t,i);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,o){var i,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(a){case"":return this.error(ye.EXPECT_ARGUMENT_TYPE,Ee(s,l));case"number":case"date":case"time":{this.bumpSpace();var f=null;if(this.bumpIf(",")){this.bumpSpace();var u=this.clonePosition(),h=this.parseSimpleArgStyleIfPossible();if(h.err)return h;var d=Ew(h.val);if(d.length===0)return this.error(ye.EXPECT_ARGUMENT_STYLE,Ee(this.clonePosition(),this.clonePosition()));var c=Ee(u,this.clonePosition());f={style:d,styleLocation:c}}var p=this.tryParseArgumentClose(o);if(p.err)return p;var m=Ee(o,this.clonePosition());if(f&&Wf(f==null?void 0:f.style,"::",0)){var _=vw(f.style.slice(2));if(a==="number"){var h=this.parseNumberSkeletonFromString(_,f.styleLocation);return h.err?h:{val:{type:Le.number,value:r,location:m,style:h.val},err:null}}else{if(_.length===0)return this.error(ye.EXPECT_DATE_TIME_SKELETON,m);var T=_;this.locale&&(T=ow(_,this.locale));var d={type:Rn.dateTime,pattern:T,location:f.styleLocation,parsedOptions:this.shouldParseSkeletons?Jb(T):{}},E=a==="date"?Le.date:Le.time;return{val:{type:E,value:r,location:m,style:d},err:null}}}return{val:{type:a==="number"?Le.number:a==="date"?Le.date:Le.time,value:r,location:m,style:(i=f==null?void 0:f.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var b=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ye.EXPECT_SELECT_ARGUMENT_OPTIONS,Ee(b,ne({},b)));this.bumpSpace();var A=this.parseIdentifierIfPossible(),w=0;if(a!=="select"&&A.value==="offset"){if(!this.bumpIf(":"))return this.error(ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Ee(this.clonePosition(),this.clonePosition()));this.bumpSpace();var h=this.tryParseDecimalInteger(ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ye.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(h.err)return h;this.bumpSpace(),A=this.parseIdentifierIfPossible(),w=h.val}var N=this.tryParsePluralOrSelectOptions(t,a,n,A);if(N.err)return N;var p=this.tryParseArgumentClose(o);if(p.err)return p;var F=Ee(o,this.clonePosition());return a==="select"?{val:{type:Le.select,value:r,options:Vf(N.val),location:F},err:null}:{val:{type:Le.plural,value:r,options:Vf(N.val),offset:w,pluralType:a==="plural"?"cardinal":"ordinal",location:F},err:null}}default:return this.error(ye.INVALID_ARGUMENT_TYPE,Ee(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,Ee(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ye.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Ee(o,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=ew(t)}catch{return this.error(ye.INVALID_NUMBER_SKELETON,n)}return{val:{type:Rn.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?iw(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,o){for(var i,s=!1,a=[],l=new Set,f=o.value,u=o.location;;){if(f.length===0){var h=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,ye.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;u=Ee(h,this.clonePosition()),f=this.message.slice(h.offset,this.offset())}else break}if(l.has(f))return this.error(n==="select"?ye.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ye.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);f==="other"&&(s=!0),this.bumpSpace();var c=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?ye.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ye.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Ee(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,n,r);if(p.err)return p;var m=this.tryParseArgumentClose(c);if(m.err)return m;a.push([f,{value:p.val,location:Ee(c,this.clonePosition())}]),l.add(f),this.bumpSpace(),i=this.parseIdentifierIfPossible(),f=i.value,u=i.location}return a.length===0?this.error(n==="select"?ye.EXPECT_SELECT_ARGUMENT_SELECTOR:ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,Ee(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(ye.MISSING_OTHER_CLAUSE,Ee(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)i=!0,s=s*10+(a-48),this.bump();else break}var l=Ee(o,this.clonePosition());return i?(s*=r,gw(s)?{val:s,err:null}:this.error(n,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=Yp(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Wf(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Qp(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e}();function au(e){return e>=97&&e<=122||e>=65&&e<=90}function bw(e){return au(e)||e===47}function ww(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Qp(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Sw(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function su(e){e.forEach(function(t){if(delete t.location,$p(t)||jp(t))for(var n in t.options)delete t.options[n].location,su(t.options[n].value);else Fp(t)&&qp(t.style)||(Up(t)||Dp(t))&&ru(t.style)?delete t.style.location:Hp(t)&&su(t.children)})}function Tw(e,t){t===void 0&&(t={}),t=ne({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new _w(e,t).parse();if(n.err){var r=SyntaxError(ye[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||su(n.val),n.val}function Mt(e,t){var n=t&&t.cache?t.cache:Pw,r=t&&t.serializer?t.serializer:Rw,o=t&&t.strategy?t.strategy:xw;return o(e,{cache:n,serializer:r})}function Ow(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Xp(e,t,n,r){var o=Ow(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function Jp(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i>"u"&&(i=e.apply(this,r),t.set(o,i)),i}function Du(e,t,n,r,o){return n.bind(t,e,r,o)}function xw(e,t){var n=e.length===1?Xp:Jp;return Du(e,this,n,t.cache.create(),t.serializer)}function Aw(e,t){return Du(e,this,Jp,t.cache.create(),t.serializer)}function Cw(e,t){return Du(e,this,Xp,t.cache.create(),t.serializer)}var Rw=function(){return JSON.stringify(arguments)};function $u(){this.cache=Object.create(null)}$u.prototype.get=function(e){return this.cache[e]};$u.prototype.set=function(e,t){this.cache[e]=t};var Pw={create:function(){return new $u}},Ft={variadic:Aw,monadic:Cw},$t;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})($t||($t={}));var _r=function(e){vt(t,e);function t(n,r,o){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Yf=function(e){vt(t,e);function t(n,r,o,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),$t.INVALID_VALUE,i)||this}return t}(_r),Iw=function(e){vt(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),$t.INVALID_VALUE,o)||this}return t}(_r),Nw=function(e){vt(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),$t.MISSING_VALUE,r)||this}return t}(_r),nt;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(nt||(nt={}));function Lw(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==nt.literal||n.type!==nt.literal?t.push(n):r.value+=n.value,t},[])}function Zp(e){return typeof e=="function"}function Ro(e,t,n,r,o,i,s){if(e.length===1&&jf(e[0]))return[{type:nt.literal,value:e[0].value}];for(var a=[],l=0,f=e;l<f.length;l++){var u=f[l];if(jf(u)){a.push({type:nt.literal,value:u.value});continue}if(Qb(u)){typeof i=="number"&&a.push({type:nt.literal,value:n.getNumberFormat(t).format(i)});continue}var h=u.value;if(!(o&&h in o))throw new Nw(h,s);var d=o[h];if(Kb(u)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?nt.literal:nt.object,value:d});continue}if(Up(u)){var c=typeof u.style=="string"?r.date[u.style]:ru(u.style)?u.style.parsedOptions:void 0;a.push({type:nt.literal,value:n.getDateTimeFormat(t,c).format(d)});continue}if(Dp(u)){var c=typeof u.style=="string"?r.time[u.style]:ru(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:nt.literal,value:n.getDateTimeFormat(t,c).format(d)});continue}if(Fp(u)){var c=typeof u.style=="string"?r.number[u.style]:qp(u.style)?u.style.parsedOptions:void 0;c&&c.scale&&(d=d*(c.scale||1)),a.push({type:nt.literal,value:n.getNumberFormat(t,c).format(d)});continue}if(Hp(u)){var p=u.children,m=u.value,_=o[m];if(!Zp(_))throw new Iw(m,"function",s);var T=Ro(p,t,n,r,o,i),E=_(T.map(function(w){return w.value}));Array.isArray(E)||(E=[E]),a.push.apply(a,E.map(function(w){return{type:typeof w=="string"?nt.literal:nt.object,value:w}}))}if($p(u)){var b=u.options[d]||u.options.other;if(!b)throw new Yf(u.value,d,Object.keys(u.options),s);a.push.apply(a,Ro(b.value,t,n,r,o));continue}if(jp(u)){var b=u.options["=".concat(d)];if(!b){if(!Intl.PluralRules)throw new _r(`Intl.PluralRules is not available in this environment.
65
+ Thank you for helping to protect the Apolitical community from abusive content.`,discussion_form_title:"Write your {action}",discussion_form_placeholder:"Type your {action} here...",discussion_form_label:"Your {action}",discussion_form_explainer:"Try to make your {action} specific and practical. Be respectful and kind. See our <a>community guidelines</a>",discussion_form_success:"Your {action} has been submitted.",discussion_form_post:"Post",discussion_form_posting:"Posting...",discussion_form_save:"Save",discussion_form_saving:"Saving...",discussion_form_cancel:"Cancel",discussion_form_submitting:"Submitting...",discussion_form_placeholder_post:"Write something...",discussion_form_error:"We are unable to process your {action} right now. Please try again later or contact us if the problem persists",discussion_form_error_tooLong:"Please keep your content to {maxLength, plural, one {1 character} other {# characters}}.",discussion_form_error_tooMany:"You have posted too many times in a row. Please wait and try again.",discussion_form_error_loggedOut:"Please log in to submit your {action}.",discussion_form_error_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_moreMenu_edit:"Edit",discussion_moreMenu_delete:"Delete",discussion_moreMenu_report:"Report",discussion_comments_screenReader:"See {count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_comments:"{count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_responses_answer:"Answers",discussion_responses_comment:"Comments",discussion_responses_title:"{action} ({count})",discussion_responses_empty:"Be the first to respond",discussion_responses_empty_answer:"Be the first to answer this question",discussion_thread_show:"Show {count, plural, =0 {replies} one {# reply} other {# replies}}",discussion_thread_hide:"Hide replies",emailHelperTextBox_fallback_title:"Who can join",emailHelperTextBox_fallback_text:"Apolitical is a private community for public servants and policymakers.",emailHelperTextBox_default_title:"Who can join",emailHelperTextBox_default_text:"Apolitical is a private community for public servants and policymakers. <link>Learn more</link>.",emailHelperTextBox_autoApproved_title:"Email check",emailHelperTextBox_autoApproved_text:"Great! Looks like you are using a **government email domain we recognise.** You will be **auto-approved** once you sign up.",emailHelperTextBox_unrecognisedEmail_title:"Not a recognised government email",emailHelperTextBox_unrecognisedEmail_text:"To confirm you work in government or policy, please add more details below. <link>Learn more</link>.",emailHelperTextBox_pendingApproval_title:"Email is pending approval",emailHelperTextBox_pendingApproval_text:"Looks like this email has been used to sign up to Apolitical before, but <strong>we have not yet approved it.</strong> If you cannot wait to join, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_emailUnverified_title:"Hello again!",emailHelperTextBox_emailUnverified_text:"It looks like you're already an Apolitical member. To access your account, please verify your email address. <link>Click here to get a verification code sent to your email</link>.",emailHelperTextBox_emailAlreadyExists_title:"Email is already registered",emailHelperTextBox_emailAlreadyExists_text:"Looks like this email has been used to sign up to Apolitical before, try <link>logging in</link> instead. If you're still having issues, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_error_verificationFailedToSend_title:"Verification code failed to send",emailHelperTextBox_error_verificationFailedToSend_text:"Error details: <em>{error}</em>{br}<link>Click here to try again</link>.{br}If you continue to have problems, contact us at <mail>concierge@apolitical.co</mail>",emailHelperTextBox_error_noFunction:"Cannot resend verification code.",filters_all:"Show all",filters_disabled:"{name} - no results",footer_platform:"Platform",footer_platform_events:"Events",footer_platform_courses:"Courses",footer_platform_qanda:"Q&A",footer_platform_articles:"Articles",footer_community:"Community",footer_community_support:"Support FAQ",footer_community_post:"Post on Apolitical",footer_community_join:"Who can join",footer_community_guidelines:"Guidelines & values",footer_company:"Company",footer_company_story:"Our story",footer_company_team:"Meet our team",footer_company_careers:"Careers",footer_company_partner:"Partner with us",footer_company_contact:"Get in touch",footer_legal:"Legal",footer_legal_privacy:"Privacy policy",footer_legal_terms:"Terms & conditions",footer_legal_cookie:"Cookie policy",footer_legal_accessibility:"Accessibility statement",footer_legal_dataProtection:"Data protection officer",footer_legal_euDataProtection:"EU data protection officer",footer_contact:"Contact",footer_contact_correspondence:"Correspondence address",footer_contact_correspondence_address:"251 Southwark Bridge Road{br}London, SE1 6FL{br}United Kingdom",footer_contact_registered:"Registered address",footer_contact_registered_address:"20–22 Wenlock Road{br}London, N1 7GU{br}United Kingdom",footer_contact_berlin:"Berlin address",footer_contact_berlin_address:"Torstraße 220{br}10115 Berlin{br}Germany",footer_contact_support:"For platform support",footer_contact_business:"For business inquiries",footer_social_linkedin:"LinkedIn",footer_social_twitter:"Twitter",footer_social_facebook:"Facebook",footer_copyright:"Copyright © {currentYear} Apolitical Group Limited",form_fieldWrapper_required:"required",form_fieldWrapper_characterLimit:"Character limit:",form_error_generalError:"Sorry, something has gone. Please refresh the page and try again.",form_error_required:"Please fill in this required field",form_error_numbers:"Numbers are not allowed in this text field",form_error_email:"Please enter a valid email address",form_error_url:"Please enter a valid URL",form_submit:"Submit",form_submitting:"Submitting form...",form_submitted:"Submitted",header_skip:"Skip to main content",header_search_show:"Show search bar",header_search_hide:"Close search bar",header_menu_show:"Show navigation",header_menu_hide:"Close navigation",header_home_loggedOut:"Home",header_home_loggedIn:"My Home",header_topics:"Topics",header_topics_explore:"Explore",header_topics_explore_events:"Events",header_topics_explore_courses:"Courses","header_topics_explore_q-and-a":"Q&A",header_topics_explore_articles:"Articles",header_topics_topics:"Topics",header_topics_topics_climate:"Climate","header_topics_topics_cities-and-local-government":"Cities and local government","header_topics_topics_digital-and-data":"Digital and data",header_topics_topics_education:"Education","header_topics_topics_equity-justice-and-inclusion":"Equity, justice and inclusion","header_topics_topics_health-and-social-care":"Health and social care",header_topics_topics_innovation:"Innovation","header_topics_topics_leadership-and-skills":"Leadership and skills","header_topics_topics_life-in-government":"Life in government",header_topics_topics_policymaking:"Policymaking","header_topics_topics_transport-and-infrastructure":"Transport and infrastructure","header_topics_topics_work-and-the-economy":"Work and the economy",header_partners:"For partners",header_account:"My account",header_account_show:"Show account menu",header_account_hide:"Close account menu",header_account_profile:"My profile",header_account_settings:"Settings & privacy","header_account_log-out":"Log out",header_buttons_login:"Log in",header_buttons_signup:"Sign up",hideShowTextBox_hide:"View less",hideShowTextBox_show:"View more",joinCommunityButton:"Join community",joinCommunityButton_member:"Member",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",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"},Vb={collapsibleSection_summary:"En savoir plus"},zb=Object.freeze(Object.defineProperty({__proto__:null,en:Hc,fr:Vb},Symbol.toStringTag,{value:"Module"})),rr=(e,t,n,r,o={})=>{let i="";return`${t}_${n}`in Hc?i=e({id:`${t}_${n}`},o):i=e({id:t},{[r]:n,...o}),i},Dp=(e,t)=>$.Children.map(e,n=>$.cloneElement(n,{...t})),Yb=e=>e.replace(/\s+/g,"").length>0,De=({variant:e="primary",size:t="medium",styling:n={muted:!1,fullWidth:!1},icon:r=!1,href:o=!1,element:i="button",onClick:s=!1,className:a="",disabled:l=!1,screenreaderText:f=!1,children:c=!1,...h})=>{const u=Xi(typeof t=="object");if(typeof t=="object"&&typeof u=="number"){const E=Object.assign({},t),T=Fp(Object.keys(E));t=Up(u,T,E)}const p=[];typeof t=="string"&&p.push(t),r&&(p.push("icon"),typeof r=="object"?(p.push(r.icon),r.position?p.push(r.position):p.push("left"),r.hover&&p.push(`hover_${r.hover}`),r.animate&&(p.push("animate"),typeof r.animate=="string"&&p.push(r.animate))):(p.push(r),!r.includes("right")&&!r.includes("left")&&p.push("left"))),n.muted&&p.push("muted"),n.fullWidth&&p.push("full-width");const m={...h,className:se(e,a,p,{"no-text":!c,disabled:l,button:o}),onClick:E=>{(!o||o[0]==="#")&&s&&(E.preventDefault(),E.stopPropagation()),s&&s(E)},disabled:typeof l=="object"&&"isClickable"in l?!l.isClickable:l};return o&&(i="a",m.href=o),$.createElement(i,m,c||(f?O.jsx(ot,{showOnFocus:!1,children:f}):null))},Ji=({buttons:e,className:t="",...n})=>{const r=e.length>1?"ul":"p",o=e.map((i,s)=>r==="p"?O.jsx(De,{...i},s):O.jsx("li",{children:O.jsx(De,{...i})},s));return $.createElement(r,{className:se("button-wrapper",t),...n,children:o})};const qo=({maxWidth:e=!1})=>{const t=e?{"--max-width":`${e/16}rem`}:{};return O.jsx("hr",{className:se({"has-max-width":e}),style:t})},$p=({href:e,children:t,className:n="",onClick:r=()=>{},gtmContext:o,gtmType:i,...s})=>e?O.jsx("a",{href:e,className:se("gtm-trackable",n),onClick:r,"data-gtm-event-context":o,"data-gtm-event-type":i,...s,children:t}):t,Wf={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"}},Kb=({aspect:e,range:t,sizes:n})=>{const{range:r,sizes:o}=e?Wf[e]:Wf.fallback;return{range:t&&t.length>0?t:r,sizes:n||o}},Qb=({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},Cs=({format:e,range:t,url:n,query:r})=>t.map(({height:o,width:i})=>`${n}?${Qb({format:e,height:o,query:r,width:i})} ${i}w`).join(", ");const jp=({image:e,className:t,testId:n})=>{const{description:r,height:o,type:i,query:s,url:a,width:l,loading:f,decoding:c,fetchPriority:h}=e,{range:d,sizes:u}=Kb(e),p=Cs({format:"avif",query:s,range:d,url:a}),m=Cs({format:"webp",query:s,range:d,url:a}),E=Cs({format:"",query:s,range:d,url:a});return O.jsxs("picture",{className:t,children:[i!=="image/gif"&&O.jsx("source",{type:"image/avif",srcSet:p,sizes:u,"data-testid":"source"}),O.jsx("source",{type:"image/webp",srcSet:m,sizes:u,"data-testid":"source"}),O.jsx("img",{srcSet:E,sizes:u,src:a,alt:r,loading:f||"lazy",decoding:c||"async",fetchpriority:h||"auto",width:l,height:o,"data-testid":n||"image"})]})};const qc=({children:e,className:t="",...n})=>O.jsx("section",{className:se("full-width-section",t),...n,children:e});const Xb=({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})}),O.jsx(qc,{className:se("download-section",n),children:O.jsxs(O.Fragment,{children:[$.createElement(typeof e=="string"?"h2":e.element,{className:"text"},typeof e=="string"?e:e.text),O.jsx(Ji,{buttons:r})]})})};const Jb=({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 O.jsxs("div",{className:se("logos",n),children:[e&&$.createElement(o.element,{className:"title"},o.text),O.jsx("ul",{className:se({"two-col":r===2||r===4,"three-col":r===5||r<=10&&r%3===0}),children:t.map(({logo:i,nameOfBusiness:s,link:a=!1,description:l=!1},f)=>{if(!i||!i.url)return null;const c=O.jsx("img",{src:i.url,width:i.width||"auto",height:i.height||"auto",alt:s});return O.jsxs("li",{children:[O.jsx("p",{className:"img-wrapper",children:a?O.jsx("a",{href:a,target:"_blank",rel:"nofollow noreferrer noopener",children:c}):c}),l&&O.jsx("small",{children:l})]},window.btoa(`${i.url}_${f}`))})})]})};const Zb=["small","span","strong","em","p","h1","h2","h3","h4","h5","h6","blockquote","q"],ew=({content:e,image:t,variant:n="default",spacing:r="normal",cta:o,children:i})=>{const s=["eyebrow","title","text"],a={eyebrow:"small",title:"h1",text:"p"},l={};return s.forEach(f=>{if(!e[f]){l[f]=!1;return}if(typeof e[f]=="object"){l[f]=e[f];const{text:c,element:h}=e[f];if(h&&Zb.includes(h.toLowerCase()))return;l[f]={text:c,element:a[f]};return}l[f]={text:e[f],element:a[f]}}),o&&o.link&&o.link[0]==="#"&&(o.props||(o.props={}),o.props.onClick=f=>{f.preventDefault(),f.stopPropagation();const c=document.getElementById(o.link.substring(1));c&&c.scrollIntoView({behavior:"smooth"})}),O.jsx(qc,{className:se("banner-section",n,r,{"has-image":t,"has-extra-spacing":r==="normal"&&l.eyebrow&&l.title}),children:O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"content-wrapper",children:[s.map(f=>{if(l[f]&&typeof l[f]=="object"){const{text:c,element:h=""}=l[f];return $.createElement(h.toLowerCase(),{key:f,className:f},c)}return null}),i,o&&o.text&&o.link&&O.jsx(De,{variant:t||n==="light"?"primary":"secondary",size:{mobile:"medium",768:"large"},href:o.link,...o.props,children:o.text})]}),t&&O.jsx(jp,{image:{...t,aspect:"banner"}})]})})},tw=$.memo(ew);const rw=({variant:e="primary",button:t=null,title:n,text:r,gtmContext:o})=>!n&&!r?null:O.jsxs("aside",{className:se("marketing-block",e),children:[n&&O.jsx("p",{className:"title",children:n}),r&&O.jsx("p",{children:r}),t&&O.jsx(De,{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})]});var ac=function(e,t){return ac=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},ac(e,t)};function vt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ac(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ne=function(){return ne=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ne.apply(this,arguments)};function Rn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Dt(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function Hp(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}var ye;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(ye||(ye={}));var Le;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(Le||(Le={}));var Nn;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Nn||(Nn={}));function Vf(e){return e.type===Le.literal}function nw(e){return e.type===Le.argument}function qp(e){return e.type===Le.number}function Gp(e){return e.type===Le.date}function Wp(e){return e.type===Le.time}function Vp(e){return e.type===Le.select}function zp(e){return e.type===Le.plural}function iw(e){return e.type===Le.pound}function Yp(e){return e.type===Le.tag}function Kp(e){return!!(e&&typeof e=="object"&&e.type===Nn.number)}function sc(e){return!!(e&&typeof e=="object"&&e.type===Nn.dateTime)}var Qp=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,ow=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function aw(e){var t={};return e.replace(ow,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"short":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var sw=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function cw(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(sw).filter(function(d){return d.length>0}),n=[],r=0,o=t;r<o.length;r++){var i=o[r],s=i.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var a=s[0],l=s.slice(1),f=0,c=l;f<c.length;f++){var h=c[f];if(h.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:l})}return n}function uw(e){return e.replace(/^(.*?)-/,"")}var zf=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Xp=/^(@+)?(\+|#+)?[rs]?$/g,lw=/(\*)(0+)|(#+)(0+)|(0+)/g,Jp=/^(0+)$/;function Yf(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Xp,function(n,r,o){return typeof o!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):o==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof o=="string"?o.length:0)),""}),t}function Zp(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function fw(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Jp.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Kf(e){var t={},n=Zp(e);return n||t}function dw(e){for(var t={},n=0,r=e;n<r.length;n++){var o=r[n];switch(o.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=o.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=uw(o.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=ne(ne(ne({},t),{notation:"scientific"}),o.options.reduce(function(l,f){return ne(ne({},l),Kf(f))},{}));continue;case"engineering":t=ne(ne(ne({},t),{notation:"engineering"}),o.options.reduce(function(l,f){return ne(ne({},l),Kf(f))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(o.options[0]);continue;case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(lw,function(l,f,c,h,d,u){if(f)t.minimumIntegerDigits=c.length;else{if(h&&d)throw new Error("We currently do not support maximum integer digits");if(u)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Jp.test(o.stem)){t.minimumIntegerDigits=o.stem.length;continue}if(zf.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(zf,function(l,f,c,h,d,u){return c==="*"?t.minimumFractionDigits=f.length:h&&h[0]==="#"?t.maximumFractionDigits=h.length:d&&u?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.length+u.length):(t.minimumFractionDigits=f.length,t.maximumFractionDigits=f.length),""});var i=o.options[0];i==="w"?t=ne(ne({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=ne(ne({},t),Yf(i)));continue}if(Xp.test(o.stem)){t=ne(ne({},t),Yf(o.stem));continue}var s=Zp(o.stem);s&&(t=ne(ne({},t),s));var a=fw(o.stem);a&&(t=ne(ne({},t),a))}return t}var xo={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function hw(e,t){for(var n="",r=0;r<e.length;r++){var o=e.charAt(r);if(o==="j"){for(var i=0;r+1<e.length&&e.charAt(r+1)===o;)i++,r++;var s=1+(i&1),a=i<2?1:3+(i>>1),l="a",f=pw(t);for((f=="H"||f=="k")&&(a=0);a-- >0;)n+=l;for(;s-- >0;)n=f+n}else o==="J"?n+="H":n+=o}return n}function pw(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var o=xo[r||""]||xo[n||""]||xo["".concat(n,"-001")]||xo["001"];return o[0]}var Rs,mw=new RegExp("^".concat(Qp.source,"*")),gw=new RegExp("".concat(Qp.source,"*$"));function _e(e,t){return{start:e,end:t}}var yw=!!String.prototype.startsWith,vw=!!String.fromCodePoint,_w=!!Object.fromEntries,Ew=!!String.prototype.codePointAt,bw=!!String.prototype.trimStart,ww=!!String.prototype.trimEnd,Sw=!!Number.isSafeInteger,Tw=Sw?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},cc=!0;try{var xw=tm("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");cc=((Rs=xw.exec("a"))===null||Rs===void 0?void 0:Rs[0])==="a"}catch{cc=!1}var Qf=yw?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},uc=vw?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",o=t.length,i=0,s;o>i;){if(s=t[i++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},Xf=_w?Object.fromEntries:function(t){for(var n={},r=0,o=t;r<o.length;r++){var i=o[r],s=i[0],a=i[1];n[s]=a}return n},em=Ew?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var o=t.charCodeAt(n),i;return o<55296||o>56319||n+1===r||(i=t.charCodeAt(n+1))<56320||i>57343?o:(o-55296<<10)+(i-56320)+65536}},Ow=bw?function(t){return t.trimStart()}:function(t){return t.replace(mw,"")},Aw=ww?function(t){return t.trimEnd()}:function(t){return t.replace(gw,"")};function tm(e,t){return new RegExp(e,t)}var lc;if(cc){var Jf=tm("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");lc=function(t,n){var r;Jf.lastIndex=n;var o=Jf.exec(t);return(r=o[1])!==null&&r!==void 0?r:""}}else lc=function(t,n){for(var r=[];;){var o=em(t,n);if(o===void 0||rm(o)||Pw(o))break;r.push(o),n+=o>=65536?2:1}return uc.apply(void 0,r)};var Cw=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var o=[];!this.isEOF();){var i=this.char();if(i===123){var s=this.parseArgument(t,r);if(s.err)return s;o.push(s.val)}else{if(i===125&&t>0)break;if(i===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),o.push({type:Le.pound,location:_e(a,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(ye.UNMATCHED_CLOSING_TAG,_e(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&fc(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;o.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;o.push(s.val)}}}return{val:o,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Le.literal,value:"<".concat(o,"/>"),location:_e(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,n,!0);if(i.err)return i;var s=i.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!fc(this.char()))return this.error(ye.INVALID_TAG,_e(a,this.clonePosition()));var l=this.clonePosition(),f=this.parseTagName();return o!==f?this.error(ye.UNMATCHED_CLOSING_TAG,_e(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Le.tag,value:o,children:s,location:_e(r,this.clonePosition())},err:null}:this.error(ye.INVALID_TAG,_e(a,this.clonePosition())))}else return this.error(ye.UNCLOSED_TAG,_e(r,this.clonePosition()))}else return this.error(ye.INVALID_TAG,_e(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Nw(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),o="";;){var i=this.tryParseQuote(n);if(i){o+=i;continue}var s=this.tryParseUnquoted(t,n);if(s){o+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){o+=a;continue}break}var l=_e(r,this.clonePosition());return{val:{type:Le.literal,value:o,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Rw(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return uc.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),uc(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,_e(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ye.EMPTY_ARGUMENT,_e(r,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(ye.MALFORMED_ARGUMENT,_e(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,_e(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Le.argument,value:o,location:_e(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,_e(r,this.clonePosition())):this.parseArgumentOptions(t,n,o,r);default:return this.error(ye.MALFORMED_ARGUMENT,_e(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=lc(this.message,n),o=n+r.length;this.bumpTo(o);var i=this.clonePosition(),s=_e(t,i);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,o){var i,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(a){case"":return this.error(ye.EXPECT_ARGUMENT_TYPE,_e(s,l));case"number":case"date":case"time":{this.bumpSpace();var f=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),h=this.parseSimpleArgStyleIfPossible();if(h.err)return h;var d=Aw(h.val);if(d.length===0)return this.error(ye.EXPECT_ARGUMENT_STYLE,_e(this.clonePosition(),this.clonePosition()));var u=_e(c,this.clonePosition());f={style:d,styleLocation:u}}var p=this.tryParseArgumentClose(o);if(p.err)return p;var m=_e(o,this.clonePosition());if(f&&Qf(f==null?void 0:f.style,"::",0)){var E=Ow(f.style.slice(2));if(a==="number"){var h=this.parseNumberSkeletonFromString(E,f.styleLocation);return h.err?h:{val:{type:Le.number,value:r,location:m,style:h.val},err:null}}else{if(E.length===0)return this.error(ye.EXPECT_DATE_TIME_SKELETON,m);var T=E;this.locale&&(T=hw(E,this.locale));var d={type:Nn.dateTime,pattern:T,location:f.styleLocation,parsedOptions:this.shouldParseSkeletons?aw(T):{}},_=a==="date"?Le.date:Le.time;return{val:{type:_,value:r,location:m,style:d},err:null}}}return{val:{type:a==="number"?Le.number:a==="date"?Le.date:Le.time,value:r,location:m,style:(i=f==null?void 0:f.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var b=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ye.EXPECT_SELECT_ARGUMENT_OPTIONS,_e(b,ne({},b)));this.bumpSpace();var A=this.parseIdentifierIfPossible(),w=0;if(a!=="select"&&A.value==="offset"){if(!this.bumpIf(":"))return this.error(ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,_e(this.clonePosition(),this.clonePosition()));this.bumpSpace();var h=this.tryParseDecimalInteger(ye.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ye.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(h.err)return h;this.bumpSpace(),A=this.parseIdentifierIfPossible(),w=h.val}var P=this.tryParsePluralOrSelectOptions(t,a,n,A);if(P.err)return P;var p=this.tryParseArgumentClose(o);if(p.err)return p;var F=_e(o,this.clonePosition());return a==="select"?{val:{type:Le.select,value:r,options:Xf(P.val),location:F},err:null}:{val:{type:Le.plural,value:r,options:Xf(P.val),offset:w,pluralType:a==="plural"?"cardinal":"ordinal",location:F},err:null}}default:return this.error(ye.INVALID_ARGUMENT_TYPE,_e(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(ye.EXPECT_ARGUMENT_CLOSING_BRACE,_e(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ye.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,_e(o,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=cw(t)}catch{return this.error(ye.INVALID_NUMBER_SKELETON,n)}return{val:{type:Nn.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?dw(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,o){for(var i,s=!1,a=[],l=new Set,f=o.value,c=o.location;;){if(f.length===0){var h=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,ye.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;c=_e(h,this.clonePosition()),f=this.message.slice(h.offset,this.offset())}else break}if(l.has(f))return this.error(n==="select"?ye.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ye.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);f==="other"&&(s=!0),this.bumpSpace();var u=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?ye.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ye.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,_e(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,n,r);if(p.err)return p;var m=this.tryParseArgumentClose(u);if(m.err)return m;a.push([f,{value:p.val,location:_e(u,this.clonePosition())}]),l.add(f),this.bumpSpace(),i=this.parseIdentifierIfPossible(),f=i.value,c=i.location}return a.length===0?this.error(n==="select"?ye.EXPECT_SELECT_ARGUMENT_SELECTOR:ye.EXPECT_PLURAL_ARGUMENT_SELECTOR,_e(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(ye.MISSING_OTHER_CLAUSE,_e(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var i=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)i=!0,s=s*10+(a-48),this.bump();else break}var l=_e(o,this.clonePosition());return i?(s*=r,Tw(s)?{val:s,err:null}:this.error(n,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=em(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Qf(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&rm(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e}();function fc(e){return e>=97&&e<=122||e>=65&&e<=90}function Rw(e){return fc(e)||e===47}function Nw(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function rm(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Pw(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function dc(e){e.forEach(function(t){if(delete t.location,Vp(t)||zp(t))for(var n in t.options)delete t.options[n].location,dc(t.options[n].value);else qp(t)&&Kp(t.style)||(Gp(t)||Wp(t))&&sc(t.style)?delete t.style.location:Yp(t)&&dc(t.children)})}function Iw(e,t){t===void 0&&(t={}),t=ne({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Cw(e,t).parse();if(n.err){var r=SyntaxError(ye[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||dc(n.val),n.val}function Bt(e,t){var n=t&&t.cache?t.cache:Uw,r=t&&t.serializer?t.serializer:Fw,o=t&&t.strategy?t.strategy:kw;return o(e,{cache:n,serializer:r})}function Lw(e){return e==null||typeof e=="number"||typeof e=="boolean"}function nm(e,t,n,r){var o=Lw(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function im(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i>"u"&&(i=e.apply(this,r),t.set(o,i)),i}function Gc(e,t,n,r,o){return n.bind(t,e,r,o)}function kw(e,t){var n=e.length===1?nm:im;return Gc(e,this,n,t.cache.create(),t.serializer)}function Mw(e,t){return Gc(e,this,im,t.cache.create(),t.serializer)}function Bw(e,t){return Gc(e,this,nm,t.cache.create(),t.serializer)}var Fw=function(){return JSON.stringify(arguments)};function Wc(){this.cache=Object.create(null)}Wc.prototype.get=function(e){return this.cache[e]};Wc.prototype.set=function(e,t){this.cache[e]=t};var Uw={create:function(){return new Wc}},Ft={variadic:Mw,monadic:Bw},$t;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})($t||($t={}));var wr=function(e){vt(t,e);function t(n,r,o){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Zf=function(e){vt(t,e);function t(n,r,o,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),$t.INVALID_VALUE,i)||this}return t}(wr),Dw=function(e){vt(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),$t.INVALID_VALUE,o)||this}return t}(wr),$w=function(e){vt(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),$t.MISSING_VALUE,r)||this}return t}(wr),it;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(it||(it={}));function jw(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==it.literal||n.type!==it.literal?t.push(n):r.value+=n.value,t},[])}function om(e){return typeof e=="function"}function Lo(e,t,n,r,o,i,s){if(e.length===1&&Vf(e[0]))return[{type:it.literal,value:e[0].value}];for(var a=[],l=0,f=e;l<f.length;l++){var c=f[l];if(Vf(c)){a.push({type:it.literal,value:c.value});continue}if(iw(c)){typeof i=="number"&&a.push({type:it.literal,value:n.getNumberFormat(t).format(i)});continue}var h=c.value;if(!(o&&h in o))throw new $w(h,s);var d=o[h];if(nw(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?it.literal:it.object,value:d});continue}if(Gp(c)){var u=typeof c.style=="string"?r.date[c.style]:sc(c.style)?c.style.parsedOptions:void 0;a.push({type:it.literal,value:n.getDateTimeFormat(t,u).format(d)});continue}if(Wp(c)){var u=typeof c.style=="string"?r.time[c.style]:sc(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:it.literal,value:n.getDateTimeFormat(t,u).format(d)});continue}if(qp(c)){var u=typeof c.style=="string"?r.number[c.style]:Kp(c.style)?c.style.parsedOptions:void 0;u&&u.scale&&(d=d*(u.scale||1)),a.push({type:it.literal,value:n.getNumberFormat(t,u).format(d)});continue}if(Yp(c)){var p=c.children,m=c.value,E=o[m];if(!om(E))throw new Dw(m,"function",s);var T=Lo(p,t,n,r,o,i),_=E(T.map(function(w){return w.value}));Array.isArray(_)||(_=[_]),a.push.apply(a,_.map(function(w){return{type:typeof w=="string"?it.literal:it.object,value:w}}))}if(Vp(c)){var b=c.options[d]||c.options.other;if(!b)throw new Zf(c.value,d,Object.keys(c.options),s);a.push.apply(a,Lo(b.value,t,n,r,o));continue}if(zp(c)){var b=c.options["=".concat(d)];if(!b){if(!Intl.PluralRules)throw new wr(`Intl.PluralRules is not available in this environment.
70
66
  Try polyfilling it using "@formatjs/intl-pluralrules"
71
- `,$t.MISSING_INTL_API,s);var A=n.getPluralRules(t,{type:u.pluralType}).select(d-(u.offset||0));b=u.options[A]||u.options.other}if(!b)throw new Yf(u.value,d,Object.keys(u.options),s);a.push.apply(a,Ro(b.value,t,n,r,o,d-(u.offset||0)));continue}}return Lw(a)}function kw(e,t){return t?ne(ne(ne({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=ne(ne({},e[r]),t[r]||{}),n},{})):e}function Bw(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=kw(e[r],t[r]),n},ne({},e)):e}function xs(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Mw(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Mt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Dt([void 0],n,!1)))},{cache:xs(e.number),strategy:Ft.variadic}),getDateTimeFormat:Mt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Dt([void 0],n,!1)))},{cache:xs(e.dateTime),strategy:Ft.variadic}),getPluralRules:Mt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Dt([void 0],n,!1)))},{cache:xs(e.pluralRules),strategy:Ft.variadic})}}var em=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(l){var f=i.formatToParts(l);if(f.length===1)return f[0].value;var u=f.reduce(function(h,d){return!h.length||d.type!==nt.literal||typeof h[h.length-1]!="string"?h.push(d.value):h[h.length-1]+=d.value,h},[]);return u.length<=1?u[0]||"":u},this.formatToParts=function(l){return Ro(i.ast,i.locales,i.formatters,i.formats,l,void 0,i.message)},this.resolvedOptions=function(){var l;return{locale:((l=i.resolvedLocale)===null||l===void 0?void 0:l.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=o||{};s.formatters;var a=Cn(s,["formatters"]);this.ast=e.__parse(t,ne(ne({},a),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Bw(e.formats,r),this.formatters=o&&o.formatters||Mw(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Tw,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Jr;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(Jr||(Jr={}));var Qi=function(e){vt(t,e);function t(n,r,o){var i=this,s=o?o instanceof Error?o:new Error(String(o)):void 0;return i=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,`
67
+ `,$t.MISSING_INTL_API,s);var A=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));b=c.options[A]||c.options.other}if(!b)throw new Zf(c.value,d,Object.keys(c.options),s);a.push.apply(a,Lo(b.value,t,n,r,o,d-(c.offset||0)));continue}}return jw(a)}function Hw(e,t){return t?ne(ne(ne({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=ne(ne({},e[r]),t[r]||{}),n},{})):e}function qw(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Hw(e[r],t[r]),n},ne({},e)):e}function Ns(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Gw(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Bt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Dt([void 0],n,!1)))},{cache:Ns(e.number),strategy:Ft.variadic}),getDateTimeFormat:Bt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Dt([void 0],n,!1)))},{cache:Ns(e.dateTime),strategy:Ft.variadic}),getPluralRules:Bt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Dt([void 0],n,!1)))},{cache:Ns(e.pluralRules),strategy:Ft.variadic})}}var am=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(l){var f=i.formatToParts(l);if(f.length===1)return f[0].value;var c=f.reduce(function(h,d){return!h.length||d.type!==it.literal||typeof h[h.length-1]!="string"?h.push(d.value):h[h.length-1]+=d.value,h},[]);return c.length<=1?c[0]||"":c},this.formatToParts=function(l){return Lo(i.ast,i.locales,i.formatters,i.formats,l,void 0,i.message)},this.resolvedOptions=function(){var l;return{locale:((l=i.resolvedLocale)===null||l===void 0?void 0:l.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=o||{};s.formatters;var a=Rn(s,["formatters"]);this.ast=e.__parse(t,ne(ne({},a),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=qw(e.formats,r),this.formatters=o&&o.formatters||Gw(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Iw,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}(),Zr;(function(e){e.FORMAT_ERROR="FORMAT_ERROR",e.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",e.INVALID_CONFIG="INVALID_CONFIG",e.MISSING_DATA="MISSING_DATA",e.MISSING_TRANSLATION="MISSING_TRANSLATION"})(Zr||(Zr={}));var Zi=function(e){vt(t,e);function t(n,r,o){var i=this,s=o?o instanceof Error?o:new Error(String(o)):void 0;return i=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,`
72
68
  `).concat(s?`
73
69
  `.concat(s.message,`
74
- `).concat(s.stack):""))||this,i.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(i,t),i}return t}(Error),Fw=function(e){vt(t,e);function t(n,r){return e.call(this,Jr.UNSUPPORTED_FORMATTER,n,r)||this}return t}(Qi),Uw=function(e){vt(t,e);function t(n,r){return e.call(this,Jr.INVALID_CONFIG,n,r)||this}return t}(Qi),Kf=function(e){vt(t,e);function t(n,r){return e.call(this,Jr.MISSING_DATA,n,r)||this}return t}(Qi),Et=function(e){vt(t,e);function t(n,r,o){var i=e.call(this,Jr.FORMAT_ERROR,"".concat(n,`
70
+ `).concat(s.stack):""))||this,i.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(i,t),i}return t}(Error),Ww=function(e){vt(t,e);function t(n,r){return e.call(this,Zr.UNSUPPORTED_FORMATTER,n,r)||this}return t}(Zi),Vw=function(e){vt(t,e);function t(n,r){return e.call(this,Zr.INVALID_CONFIG,n,r)||this}return t}(Zi),ed=function(e){vt(t,e);function t(n,r){return e.call(this,Zr.MISSING_DATA,n,r)||this}return t}(Zi),_t=function(e){vt(t,e);function t(n,r,o){var i=e.call(this,Zr.FORMAT_ERROR,"".concat(n,`
75
71
  Locale: `).concat(r,`
76
- `),o)||this;return i.locale=r,i}return t}(Qi),As=function(e){vt(t,e);function t(n,r,o,i){var s=e.call(this,"".concat(n,`
72
+ `),o)||this;return i.locale=r,i}return t}(Zi),Ps=function(e){vt(t,e);function t(n,r,o,i){var s=e.call(this,"".concat(n,`
77
73
  MessageID: `).concat(o==null?void 0:o.id,`
78
74
  Default Message: `).concat(o==null?void 0:o.defaultMessage,`
79
75
  Description: `).concat(o==null?void 0:o.description,`
80
- `),r,i)||this;return s.descriptor=o,s.locale=r,s}return t}(Et),Dw=function(e){vt(t,e);function t(n,r){var o=e.call(this,Jr.MISSING_TRANSLATION,'Missing message: "'.concat(n.id,'" for locale "').concat(r,'", using ').concat(n.defaultMessage?"default message (".concat(typeof n.defaultMessage=="string"?n.defaultMessage:n.defaultMessage.map(function(i){var s;return(s=i.value)!==null&&s!==void 0?s:JSON.stringify(i)}).join(),")"):"id"," as fallback."))||this;return o.descriptor=n,o}return t}(Qi);function tn(e,t,n){return n===void 0&&(n={}),t.reduce(function(r,o){return o in e?r[o]=e[o]:o in n&&(r[o]=n[o]),r},{})}var $w=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},jw=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},tm={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:$w,onWarn:jw};function rm(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Wr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Hw(e){e===void 0&&(e=rm());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,o=Mt(function(){for(var a,l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];return new((a=Intl.DateTimeFormat).bind.apply(a,Dt([void 0],l,!1)))},{cache:Wr(e.dateTime),strategy:Ft.variadic}),i=Mt(function(){for(var a,l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];return new((a=Intl.NumberFormat).bind.apply(a,Dt([void 0],l,!1)))},{cache:Wr(e.number),strategy:Ft.variadic}),s=Mt(function(){for(var a,l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];return new((a=Intl.PluralRules).bind.apply(a,Dt([void 0],l,!1)))},{cache:Wr(e.pluralRules),strategy:Ft.variadic});return{getDateTimeFormat:o,getNumberFormat:i,getMessageFormat:Mt(function(a,l,f,u){return new em(a,l,f,ne({formatters:{getNumberFormat:i,getDateTimeFormat:o,getPluralRules:s}},u||{}))},{cache:Wr(e.message),strategy:Ft.variadic}),getRelativeTimeFormat:Mt(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(t.bind.apply(t,Dt([void 0],a,!1)))},{cache:Wr(e.relativeTime),strategy:Ft.variadic}),getPluralRules:s,getListFormat:Mt(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(n.bind.apply(n,Dt([void 0],a,!1)))},{cache:Wr(e.list),strategy:Ft.variadic}),getDisplayNames:Mt(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(r.bind.apply(r,Dt([void 0],a,!1)))},{cache:Wr(e.displayNames),strategy:Ft.variadic})}}function ju(e,t,n,r){var o=e&&e[t],i;if(o&&(i=o[n]),i)return i;r(new Fw("No ".concat(t," format named: ").concat(n)))}function So(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=ne({timeZone:t},e[r]),n},{})}function Qf(e,t){var n=Object.keys(ne(ne({},e),t));return n.reduce(function(r,o){return r[o]=ne(ne({},e[o]||{}),t[o]||{}),r},{})}function Xf(e,t){if(!t)return e;var n=em.formats;return ne(ne(ne({},n),e),{date:Qf(So(n.date,t),So(e.date||{},t)),time:Qf(So(n.time,t),So(e.time||{},t))})}var uu=function(e,t,n,r,o){var i=e.locale,s=e.formats,a=e.messages,l=e.defaultLocale,f=e.defaultFormats,u=e.fallbackOnEmptyString,h=e.onError,d=e.timeZone,c=e.defaultRichTextElements;n===void 0&&(n={id:""});var p=n.id,m=n.defaultMessage;Mp(!!p,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var _=String(p),T=a&&Object.prototype.hasOwnProperty.call(a,_)&&a[_];if(Array.isArray(T)&&T.length===1&&T[0].type===Le.literal)return T[0].value;if(!r&&T&&typeof T=="string"&&!c)return T.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=ne(ne({},c),r||{}),s=Xf(s,d),f=Xf(f,d),!T){if(u===!1&&T==="")return T;if((!m||i&&i.toLowerCase()!==l.toLowerCase())&&h(new Dw(n,i)),m)try{var E=t.getMessageFormat(m,l,f,o);return E.format(r)}catch(b){return h(new As('Error formatting default message for: "'.concat(_,'", rendering default message verbatim'),i,n,b)),typeof m=="string"?m:_}return _}try{var E=t.getMessageFormat(T,i,s,ne({formatters:t},o||{}));return E.format(r)}catch(b){h(new As('Error formatting message: "'.concat(_,'", using ').concat(m?"default message":"id"," as fallback."),i,n,b))}if(m)try{var E=t.getMessageFormat(m,l,f,o);return E.format(r)}catch(b){h(new As('Error formatting the default message for: "'.concat(_,'", rendering message verbatim'),i,n,b))}return typeof T=="string"?T:typeof m=="string"?m:_},nm=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function Jo(e,t,n,r){var o=e.locale,i=e.formats,s=e.onError,a=e.timeZone;r===void 0&&(r={});var l=r.format,f=ne(ne({},a&&{timeZone:a}),l&&ju(i,t,l,s)),u=tn(r,nm,f);return t==="time"&&!u.hour&&!u.minute&&!u.second&&!u.timeStyle&&!u.dateStyle&&(u=ne(ne({},u),{hour:"numeric",minute:"numeric"})),n(o,u)}function qw(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=n[0],i=n[1],s=i===void 0?{}:i,a=typeof o=="string"?new Date(o||0):o;try{return Jo(e,"date",t,s).format(a)}catch(l){e.onError(new Et("Error formatting date.",e.locale,l))}return String(a)}function Gw(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=n[0],i=n[1],s=i===void 0?{}:i,a=typeof o=="string"?new Date(o||0):o;try{return Jo(e,"time",t,s).format(a)}catch(l){e.onError(new Et("Error formatting time.",e.locale,l))}return String(a)}function Ww(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=n[0],i=n[1],s=n[2],a=s===void 0?{}:s,l=e.timeZone,f=e.locale,u=e.onError,h=tn(a,nm,l?{timeZone:l}:{});try{return t(f,h).formatRange(o,i)}catch(d){u(new Et("Error formatting date time range.",e.locale,d))}return String(o)}function Vw(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=n[0],i=n[1],s=i===void 0?{}:i,a=typeof o=="string"?new Date(o||0):o;try{return Jo(e,"date",t,s).formatToParts(a)}catch(l){e.onError(new Et("Error formatting date.",e.locale,l))}return[]}function zw(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=n[0],i=n[1],s=i===void 0?{}:i,a=typeof o=="string"?new Date(o||0):o;try{return Jo(e,"time",t,s).formatToParts(a)}catch(l){e.onError(new Et("Error formatting time.",e.locale,l))}return[]}var Yw=["style","type","fallback","languageDisplay"];function Kw(e,t,n,r){var o=e.locale,i=e.onError,s=Intl.DisplayNames;s||i(new _r(`Intl.DisplayNames is not available in this environment.
76
+ `),r,i)||this;return s.descriptor=o,s.locale=r,s}return t}(_t),zw=function(e){vt(t,e);function t(n,r){var o=e.call(this,Zr.MISSING_TRANSLATION,'Missing message: "'.concat(n.id,'" for locale "').concat(r,'", using ').concat(n.defaultMessage?"default message (".concat(typeof n.defaultMessage=="string"?n.defaultMessage:n.defaultMessage.map(function(i){var s;return(s=i.value)!==null&&s!==void 0?s:JSON.stringify(i)}).join(),")"):"id"," as fallback."))||this;return o.descriptor=n,o}return t}(Zi);function rn(e,t,n){return n===void 0&&(n={}),t.reduce(function(r,o){return o in e?r[o]=e[o]:o in n&&(r[o]=n[o]),r},{})}var Yw=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},Kw=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},sm={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:Yw,onWarn:Kw};function cm(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function zr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Qw(e){e===void 0&&(e=cm());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,o=Bt(function(){for(var a,l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];return new((a=Intl.DateTimeFormat).bind.apply(a,Dt([void 0],l,!1)))},{cache:zr(e.dateTime),strategy:Ft.variadic}),i=Bt(function(){for(var a,l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];return new((a=Intl.NumberFormat).bind.apply(a,Dt([void 0],l,!1)))},{cache:zr(e.number),strategy:Ft.variadic}),s=Bt(function(){for(var a,l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];return new((a=Intl.PluralRules).bind.apply(a,Dt([void 0],l,!1)))},{cache:zr(e.pluralRules),strategy:Ft.variadic});return{getDateTimeFormat:o,getNumberFormat:i,getMessageFormat:Bt(function(a,l,f,c){return new am(a,l,f,ne({formatters:{getNumberFormat:i,getDateTimeFormat:o,getPluralRules:s}},c||{}))},{cache:zr(e.message),strategy:Ft.variadic}),getRelativeTimeFormat:Bt(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(t.bind.apply(t,Dt([void 0],a,!1)))},{cache:zr(e.relativeTime),strategy:Ft.variadic}),getPluralRules:s,getListFormat:Bt(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(n.bind.apply(n,Dt([void 0],a,!1)))},{cache:zr(e.list),strategy:Ft.variadic}),getDisplayNames:Bt(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(r.bind.apply(r,Dt([void 0],a,!1)))},{cache:zr(e.displayNames),strategy:Ft.variadic})}}function Vc(e,t,n,r){var o=e&&e[t],i;if(o&&(i=o[n]),i)return i;r(new Ww("No ".concat(t," format named: ").concat(n)))}function Oo(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=ne({timeZone:t},e[r]),n},{})}function td(e,t){var n=Object.keys(ne(ne({},e),t));return n.reduce(function(r,o){return r[o]=ne(ne({},e[o]||{}),t[o]||{}),r},{})}function rd(e,t){if(!t)return e;var n=am.formats;return ne(ne(ne({},n),e),{date:td(Oo(n.date,t),Oo(e.date||{},t)),time:td(Oo(n.time,t),Oo(e.time||{},t))})}var hc=function(e,t,n,r,o){var i=e.locale,s=e.formats,a=e.messages,l=e.defaultLocale,f=e.defaultFormats,c=e.fallbackOnEmptyString,h=e.onError,d=e.timeZone,u=e.defaultRichTextElements;n===void 0&&(n={id:""});var p=n.id,m=n.defaultMessage;Hp(!!p,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var E=String(p),T=a&&Object.prototype.hasOwnProperty.call(a,E)&&a[E];if(Array.isArray(T)&&T.length===1&&T[0].type===Le.literal)return T[0].value;if(!r&&T&&typeof T=="string"&&!u)return T.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=ne(ne({},u),r||{}),s=rd(s,d),f=rd(f,d),!T){if(c===!1&&T==="")return T;if((!m||i&&i.toLowerCase()!==l.toLowerCase())&&h(new zw(n,i)),m)try{var _=t.getMessageFormat(m,l,f,o);return _.format(r)}catch(b){return h(new Ps('Error formatting default message for: "'.concat(E,'", rendering default message verbatim'),i,n,b)),typeof m=="string"?m:E}return E}try{var _=t.getMessageFormat(T,i,s,ne({formatters:t},o||{}));return _.format(r)}catch(b){h(new Ps('Error formatting message: "'.concat(E,'", using ').concat(m?"default message":"id"," as fallback."),i,n,b))}if(m)try{var _=t.getMessageFormat(m,l,f,o);return _.format(r)}catch(b){h(new Ps('Error formatting the default message for: "'.concat(E,'", rendering message verbatim'),i,n,b))}return typeof T=="string"?T:typeof m=="string"?m:E},um=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function ra(e,t,n,r){var o=e.locale,i=e.formats,s=e.onError,a=e.timeZone;r===void 0&&(r={});var l=r.format,f=ne(ne({},a&&{timeZone:a}),l&&Vc(i,t,l,s)),c=rn(r,um,f);return t==="time"&&!c.hour&&!c.minute&&!c.second&&!c.timeStyle&&!c.dateStyle&&(c=ne(ne({},c),{hour:"numeric",minute:"numeric"})),n(o,c)}function Xw(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=n[0],i=n[1],s=i===void 0?{}:i,a=typeof o=="string"?new Date(o||0):o;try{return ra(e,"date",t,s).format(a)}catch(l){e.onError(new _t("Error formatting date.",e.locale,l))}return String(a)}function Jw(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=n[0],i=n[1],s=i===void 0?{}:i,a=typeof o=="string"?new Date(o||0):o;try{return ra(e,"time",t,s).format(a)}catch(l){e.onError(new _t("Error formatting time.",e.locale,l))}return String(a)}function Zw(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=n[0],i=n[1],s=n[2],a=s===void 0?{}:s,l=e.timeZone,f=e.locale,c=e.onError,h=rn(a,um,l?{timeZone:l}:{});try{return t(f,h).formatRange(o,i)}catch(d){c(new _t("Error formatting date time range.",e.locale,d))}return String(o)}function eS(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=n[0],i=n[1],s=i===void 0?{}:i,a=typeof o=="string"?new Date(o||0):o;try{return ra(e,"date",t,s).formatToParts(a)}catch(l){e.onError(new _t("Error formatting date.",e.locale,l))}return[]}function tS(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=n[0],i=n[1],s=i===void 0?{}:i,a=typeof o=="string"?new Date(o||0):o;try{return ra(e,"time",t,s).formatToParts(a)}catch(l){e.onError(new _t("Error formatting time.",e.locale,l))}return[]}var rS=["style","type","fallback","languageDisplay"];function nS(e,t,n,r){var o=e.locale,i=e.onError,s=Intl.DisplayNames;s||i(new wr(`Intl.DisplayNames is not available in this environment.
81
77
  Try polyfilling it using "@formatjs/intl-displaynames"
82
- `,$t.MISSING_INTL_API));var a=tn(r,Yw);try{return t(o,a).of(n)}catch(l){i(new Et("Error formatting display name.",o,l))}}var Qw=["type","style"],Jf=Date.now();function Xw(e){return"".concat(Jf,"_").concat(e,"_").concat(Jf)}function Jw(e,t,n,r){r===void 0&&(r={});var o=im(e,t,n,r).reduce(function(i,s){var a=s.value;return typeof a!="string"?i.push(a):typeof i[i.length-1]=="string"?i[i.length-1]+=a:i.push(a),i},[]);return o.length===1?o[0]:o.length===0?"":o}function im(e,t,n,r){var o=e.locale,i=e.onError;r===void 0&&(r={});var s=Intl.ListFormat;s||i(new _r(`Intl.ListFormat is not available in this environment.
78
+ `,$t.MISSING_INTL_API));var a=rn(r,rS);try{return t(o,a).of(n)}catch(l){i(new _t("Error formatting display name.",o,l))}}var iS=["type","style"],nd=Date.now();function oS(e){return"".concat(nd,"_").concat(e,"_").concat(nd)}function aS(e,t,n,r){r===void 0&&(r={});var o=lm(e,t,n,r).reduce(function(i,s){var a=s.value;return typeof a!="string"?i.push(a):typeof i[i.length-1]=="string"?i[i.length-1]+=a:i.push(a),i},[]);return o.length===1?o[0]:o.length===0?"":o}function lm(e,t,n,r){var o=e.locale,i=e.onError;r===void 0&&(r={});var s=Intl.ListFormat;s||i(new wr(`Intl.ListFormat is not available in this environment.
83
79
  Try polyfilling it using "@formatjs/intl-listformat"
84
- `,$t.MISSING_INTL_API));var a=tn(r,Qw);try{var l={},f=n.map(function(u,h){if(typeof u=="object"){var d=Xw(h);return l[d]=u,d}return String(u)});return t(o,a).formatToParts(f).map(function(u){return u.type==="literal"?u:ne(ne({},u),{value:l[u.value]||u.value})})}catch(u){i(new Et("Error formatting list.",o,u))}return n}var Zw=["type"];function eS(e,t,n,r){var o=e.locale,i=e.onError;r===void 0&&(r={}),Intl.PluralRules||i(new _r(`Intl.PluralRules is not available in this environment.
80
+ `,$t.MISSING_INTL_API));var a=rn(r,iS);try{var l={},f=n.map(function(c,h){if(typeof c=="object"){var d=oS(h);return l[d]=c,d}return String(c)});return t(o,a).formatToParts(f).map(function(c){return c.type==="literal"?c:ne(ne({},c),{value:l[c.value]||c.value})})}catch(c){i(new _t("Error formatting list.",o,c))}return n}var sS=["type"];function cS(e,t,n,r){var o=e.locale,i=e.onError;r===void 0&&(r={}),Intl.PluralRules||i(new wr(`Intl.PluralRules is not available in this environment.
85
81
  Try polyfilling it using "@formatjs/intl-pluralrules"
86
- `,$t.MISSING_INTL_API));var s=tn(r,Zw);try{return t(o,s).select(n)}catch(a){i(new Et("Error formatting plural.",o,a))}return"other"}var tS=["numeric","style"];function rS(e,t,n){var r=e.locale,o=e.formats,i=e.onError;n===void 0&&(n={});var s=n.format,a=!!s&&ju(o,"relative",s,i)||{},l=tn(n,tS,a);return t(r,l)}function nS(e,t,n,r,o){o===void 0&&(o={}),r||(r="second");var i=Intl.RelativeTimeFormat;i||e.onError(new _r(`Intl.RelativeTimeFormat is not available in this environment.
82
+ `,$t.MISSING_INTL_API));var s=rn(r,sS);try{return t(o,s).select(n)}catch(a){i(new _t("Error formatting plural.",o,a))}return"other"}var uS=["numeric","style"];function lS(e,t,n){var r=e.locale,o=e.formats,i=e.onError;n===void 0&&(n={});var s=n.format,a=!!s&&Vc(o,"relative",s,i)||{},l=rn(n,uS,a);return t(r,l)}function fS(e,t,n,r,o){o===void 0&&(o={}),r||(r="second");var i=Intl.RelativeTimeFormat;i||e.onError(new wr(`Intl.RelativeTimeFormat is not available in this environment.
87
83
  Try polyfilling it using "@formatjs/intl-relativetimeformat"
88
- `,$t.MISSING_INTL_API));try{return rS(e,t,o).format(n,r)}catch(s){e.onError(new Et("Error formatting relative time.",e.locale,s))}return String(n)}var iS=["style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem"];function om(e,t,n){var r=e.locale,o=e.formats,i=e.onError;n===void 0&&(n={});var s=n.format,a=s&&ju(o,"number",s,i)||{},l=tn(n,iS,a);return t(r,l)}function oS(e,t,n,r){r===void 0&&(r={});try{return om(e,t,r).format(n)}catch(o){e.onError(new Et("Error formatting number.",e.locale,o))}return String(n)}function aS(e,t,n,r){r===void 0&&(r={});try{return om(e,t,r).formatToParts(n)}catch(o){e.onError(new Et("Error formatting number.",e.locale,o))}return[]}function sS(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function uS(e){e.onWarn&&e.defaultRichTextElements&&sS(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
84
+ `,$t.MISSING_INTL_API));try{return lS(e,t,o).format(n,r)}catch(s){e.onError(new _t("Error formatting relative time.",e.locale,s))}return String(n)}var dS=["style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem"];function fm(e,t,n){var r=e.locale,o=e.formats,i=e.onError;n===void 0&&(n={});var s=n.format,a=s&&Vc(o,"number",s,i)||{},l=rn(n,dS,a);return t(r,l)}function hS(e,t,n,r){r===void 0&&(r={});try{return fm(e,t,r).format(n)}catch(o){e.onError(new _t("Error formatting number.",e.locale,o))}return String(n)}function pS(e,t,n,r){r===void 0&&(r={});try{return fm(e,t,r).formatToParts(n)}catch(o){e.onError(new _t("Error formatting number.",e.locale,o))}return[]}function mS(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function gS(e){e.onWarn&&e.defaultRichTextElements&&mS(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
89
85
  Please consider using "@formatjs/cli" to pre-compile your messages for performance.
90
- For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function cS(e,t){var n=Hw(t),r=ne(ne({},tm),e),o=r.locale,i=r.defaultLocale,s=r.onError;return o?!Intl.NumberFormat.supportedLocalesOf(o).length&&s?s(new Kf('Missing locale data for locale: "'.concat(o,'" in Intl.NumberFormat. Using default locale: "').concat(i,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(o).length&&s&&s(new Kf('Missing locale data for locale: "'.concat(o,'" in Intl.DateTimeFormat. Using default locale: "').concat(i,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new Uw('"locale" was not configured, using "'.concat(i,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),uS(r),ne(ne({},r),{formatters:n,formatNumber:oS.bind(null,r,n.getNumberFormat),formatNumberToParts:aS.bind(null,r,n.getNumberFormat),formatRelativeTime:nS.bind(null,r,n.getRelativeTimeFormat),formatDate:qw.bind(null,r,n.getDateTimeFormat),formatDateToParts:Vw.bind(null,r,n.getDateTimeFormat),formatTime:Gw.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:Ww.bind(null,r,n.getDateTimeFormat),formatTimeToParts:zw.bind(null,r,n.getDateTimeFormat),formatPlural:eS.bind(null,r,n.getPluralRules),formatMessage:uu.bind(null,r,n),$t:uu.bind(null,r,n),formatList:Jw.bind(null,r,n.getListFormat),formatListToParts:im.bind(null,r,n.getListFormat),formatDisplayName:Kw.bind(null,r,n.getDisplayNames)})}function am(e){Mp(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var sm=ne(ne({},tm),{textComponent:Oe.Fragment});function lS(e){return function(t){return e(Oe.Children.toArray(t))}}function cu(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var i=0;i<o;i++){var s=n[i];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var Hu=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Oe.createContext(null)):Oe.createContext(null);Hu.Consumer;var fS=Hu.Provider,dS=fS,hS=Hu;function Ie(){var e=Oe.useContext(hS);return am(e),e}var lu;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(lu||(lu={}));var fu;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(fu||(fu={}));function um(e){var t=function(n){var r=Ie(),o=n.value,i=n.children,s=Cn(n,["value","children"]),a=typeof o=="string"?new Date(o||0):o,l=e==="formatDate"?r.formatDateToParts(a,s):r.formatTimeToParts(a,s);return i(l)};return t.displayName=fu[e],t}function Xi(e){var t=function(n){var r=Ie(),o=n.value,i=n.children,s=Cn(n,["value","children"]),a=r[e](o,s);if(typeof i=="function")return i(a);var l=r.textComponent||Oe.Fragment;return Oe.createElement(l,null,a)};return t.displayName=lu[e],t}function Cs(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}function cm(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=Zp(r)?lS(r):r,t},{})}var Zf=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];var s=cm(r),a=uu.apply(void 0,Dt([e,t,n,s],o,!1));return Array.isArray(a)?Oe.Children.toArray(a):a},du=function(e,t){var n=e.defaultRichTextElements,r=Cn(e,["defaultRichTextElements"]),o=cm(n),i=cS(ne(ne(ne({},sm),r),{defaultRichTextElements:o}),t),s={locale:i.locale,timeZone:i.timeZone,fallbackOnEmptyString:i.fallbackOnEmptyString,formats:i.formats,defaultLocale:i.defaultLocale,defaultFormats:i.defaultFormats,messages:i.messages,onError:i.onError,defaultRichTextElements:o};return ne(ne({},i),{formatMessage:Zf.bind(null,s,i.formatters),$t:Zf.bind(null,s,i.formatters)})},pS=function(e){vt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=rm(),n.state={cache:n.cache,intl:du(Cs(n.props),n.cache),prevConfig:Cs(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var o=r.prevConfig,i=r.cache,s=Cs(n);return cu(o,s)?null:{intl:du(s,i),prevConfig:s}},t.prototype.render=function(){return am(this.state.intl),Oe.createElement(dS,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=sm,t}(Oe.PureComponent);function mS(e,t){var n=e.values,r=Cn(e,["values"]),o=t.values,i=Cn(t,["values"]);return cu(o,n)&&cu(r,i)}function lm(e){var t=Ie(),n=t.formatMessage,r=t.textComponent,o=r===void 0?Oe.Fragment:r,i=e.id,s=e.description,a=e.defaultMessage,l=e.values,f=e.children,u=e.tagName,h=u===void 0?o:u,d=e.ignoreTag,c={id:i,description:s,defaultMessage:a},p=n(c,l,{ignoreTag:d});return typeof f=="function"?f(Array.isArray(p)?p:[p]):h?Oe.createElement(h,null,Oe.Children.toArray(p)):Oe.createElement(Oe.Fragment,null,p)}lm.displayName="FormattedMessage";var fm=Oe.memo(lm,mS);fm.displayName="MemoizedFormattedMessage";const Yr=fm;Xi("formatDate");Xi("formatTime");Xi("formatNumber");Xi("formatList");Xi("formatDisplayName");um("formatDate");um("formatTime");var dm={exports:{}};(function(e){(function(t,n){var r="…",o=/(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w-]{1,300}@(.{1,300}\.)[a-zA-Z]{2,3})/g;function i(a,l,f){return f.length===a.length||!l.ellipsis||(f+=l.ellipsis),f}function s(a,l,f){var u="",h=!0,d=l,c,p;if(f=f||{},f.ellipsis=typeof f.ellipsis>"u"?r:f.ellipsis,!a||a.length===0)return"";for(h=!0;h;){if(o.lastIndex=u.length,h=o.exec(a),!h||h.index-u.length>=d||o.lastIndex>=l+3e3)return u+=a.substring(u.length,l),i(a,f,u);if(c=h[0],p=h.index,u+=a.substring(u.length,p+c.length),d-=p+c.length,d<=0)break}return i(a,f,u)}e.exports?e.exports=s:t.truncate=s})(String)})(dm);var gS=dm.exports;const hm=jt(gS),$o="https://storage.googleapis.com/apolitical-assets/",yS="200,000+";const hu=({element:e="p",children:t=null,className:n="",...r})=>G.createElement(e,{...r,className:se("alert",n),"aria-live":"assertive"},t);const qu=({label:e=!1,className:t="",children:n})=>{const r=Ie();return C.jsxs("details",{className:se("collapsible-section",t),children:[C.jsx("summary",{children:e||r.formatMessage({id:"collapsibleSection_summary"})}),C.jsx("div",{className:"content",children:n})]})};function zr(){return zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zr.apply(this,arguments)}const vS=["children","options"],ed=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","className","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),td={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},ES=["style","script"],_S=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,bS=/mailto:/i,wS=/\n{2,}$/,pm=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,SS=/^ *> ?/gm,TS=/^ {2,}\n/,OS=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,mm=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,gm=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,xS=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,AS=/^(?:\n *)*\n/,CS=/\r\n?/g,RS=/^\[\^([^\]]+)](:.*)\n/,PS=/^\[\^([^\]]+)]/,IS=/\f/g,NS=/^\s*?\[(x|\s)\]/,ym=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,vm=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Em=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,pu=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,LS=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,_m=/^<!--[\s\S]*?(?:-->)/,kS=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,mu=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,BS=/^\{.*\}$/,MS=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,FS=/^<([^ >]+@[^ >]+)>/,US=/^<([^ >]+:\/[^ >]+)>/,DS=/-([a-z])?/gi,bm=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,$S=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,jS=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,HS=/^\[([^\]]*)\] ?\[([^\]]*)\]/,qS=/(\[|\])/g,GS=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,WS=/\t/g,VS=/^ *\| */,zS=/(^ *\||\| *$)/g,YS=/ *$/,KS=/^ *:-+: *$/,QS=/^ *:-+ *$/,XS=/^ *-+: *$/,JS=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,ZS=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,eT=/^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,tT=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,rT=/^\\([^0-9A-Za-z\s])/,nT=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,iT=/^\n+/,oT=/^([ \t]*)/,aT=/\\([^\\])/g,rd=/ *\n+$/,sT=/(?:^|\n)( *)$/,Gu="(?:\\d+\\.)",Wu="(?:[*+-])";function wm(e){return"( *)("+(e===1?Gu:Wu)+") +"}const Sm=wm(1),Tm=wm(2);function Om(e){return new RegExp("^"+(e===1?Sm:Tm))}const uT=Om(1),cT=Om(2);function xm(e){return new RegExp("^"+(e===1?Sm:Tm)+"[^\\n]*(?:\\n(?!\\1"+(e===1?Gu:Wu)+" )[^\\n]*)*(\\n|$)","gm")}const Am=xm(1),Cm=xm(2);function Rm(e){const t=e===1?Gu:Wu;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const Pm=Rm(1),Im=Rm(2);function nd(e,t){const n=t===1,r=n?Pm:Im,o=n?Am:Cm,i=n?uT:cT;return{t(s,a,l){const f=sT.exec(l);return f&&(a.o||!a._&&!a.u)?r.exec(s=f[1]+s):null},i:ve.HIGH,l(s,a,l){const f=n?+s[2]:void 0,u=s[0].replace(wS,`
91
- `).match(o);let h=!1;return{p:u.map(function(d,c){const p=i.exec(d)[0].length,m=new RegExp("^ {1,"+p+"}","gm"),_=d.replace(m,"").replace(i,""),T=c===u.length-1,E=_.indexOf(`
86
+ For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function yS(e,t){var n=Qw(t),r=ne(ne({},sm),e),o=r.locale,i=r.defaultLocale,s=r.onError;return o?!Intl.NumberFormat.supportedLocalesOf(o).length&&s?s(new ed('Missing locale data for locale: "'.concat(o,'" in Intl.NumberFormat. Using default locale: "').concat(i,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(o).length&&s&&s(new ed('Missing locale data for locale: "'.concat(o,'" in Intl.DateTimeFormat. Using default locale: "').concat(i,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(s&&s(new Vw('"locale" was not configured, using "'.concat(i,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),gS(r),ne(ne({},r),{formatters:n,formatNumber:hS.bind(null,r,n.getNumberFormat),formatNumberToParts:pS.bind(null,r,n.getNumberFormat),formatRelativeTime:fS.bind(null,r,n.getRelativeTimeFormat),formatDate:Xw.bind(null,r,n.getDateTimeFormat),formatDateToParts:eS.bind(null,r,n.getDateTimeFormat),formatTime:Jw.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:Zw.bind(null,r,n.getDateTimeFormat),formatTimeToParts:tS.bind(null,r,n.getDateTimeFormat),formatPlural:cS.bind(null,r,n.getPluralRules),formatMessage:hc.bind(null,r,n),$t:hc.bind(null,r,n),formatList:aS.bind(null,r,n.getListFormat),formatListToParts:lm.bind(null,r,n.getListFormat),formatDisplayName:nS.bind(null,r,n.getDisplayNames)})}function dm(e){Hp(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var hm=ne(ne({},sm),{textComponent:xe.Fragment});function vS(e){return function(t){return e(xe.Children.toArray(t))}}function pc(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),o=n.length;if(r.length!==o)return!1;for(var i=0;i<o;i++){var s=n[i];if(e[s]!==t[s]||!Object.prototype.hasOwnProperty.call(t,s))return!1}return!0}var zc=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=xe.createContext(null)):xe.createContext(null);zc.Consumer;var _S=zc.Provider,ES=_S,bS=zc;function Re(){var e=xe.useContext(bS);return dm(e),e}var mc;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(mc||(mc={}));var gc;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})(gc||(gc={}));function pm(e){var t=function(n){var r=Re(),o=n.value,i=n.children,s=Rn(n,["value","children"]),a=typeof o=="string"?new Date(o||0):o,l=e==="formatDate"?r.formatDateToParts(a,s):r.formatTimeToParts(a,s);return i(l)};return t.displayName=gc[e],t}function eo(e){var t=function(n){var r=Re(),o=n.value,i=n.children,s=Rn(n,["value","children"]),a=r[e](o,s);if(typeof i=="function")return i(a);var l=r.textComponent||xe.Fragment;return xe.createElement(l,null,a)};return t.displayName=mc[e],t}function Is(e){return{locale:e.locale,timeZone:e.timeZone,fallbackOnEmptyString:e.fallbackOnEmptyString,formats:e.formats,textComponent:e.textComponent,messages:e.messages,defaultLocale:e.defaultLocale,defaultFormats:e.defaultFormats,onError:e.onError,onWarn:e.onWarn,wrapRichTextChunksInFragment:e.wrapRichTextChunksInFragment,defaultRichTextElements:e.defaultRichTextElements}}function mm(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=om(r)?vS(r):r,t},{})}var id=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];var s=mm(r),a=hc.apply(void 0,Dt([e,t,n,s],o,!1));return Array.isArray(a)?xe.Children.toArray(a):a},yc=function(e,t){var n=e.defaultRichTextElements,r=Rn(e,["defaultRichTextElements"]),o=mm(n),i=yS(ne(ne(ne({},hm),r),{defaultRichTextElements:o}),t),s={locale:i.locale,timeZone:i.timeZone,fallbackOnEmptyString:i.fallbackOnEmptyString,formats:i.formats,defaultLocale:i.defaultLocale,defaultFormats:i.defaultFormats,messages:i.messages,onError:i.onError,defaultRichTextElements:o};return ne(ne({},i),{formatMessage:id.bind(null,s,i.formatters),$t:id.bind(null,s,i.formatters)})},wS=function(e){vt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=cm(),n.state={cache:n.cache,intl:yc(Is(n.props),n.cache),prevConfig:Is(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var o=r.prevConfig,i=r.cache,s=Is(n);return pc(o,s)?null:{intl:yc(s,i),prevConfig:s}},t.prototype.render=function(){return dm(this.state.intl),xe.createElement(ES,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=hm,t}(xe.PureComponent);function SS(e,t){var n=e.values,r=Rn(e,["values"]),o=t.values,i=Rn(t,["values"]);return pc(o,n)&&pc(r,i)}function gm(e){var t=Re(),n=t.formatMessage,r=t.textComponent,o=r===void 0?xe.Fragment:r,i=e.id,s=e.description,a=e.defaultMessage,l=e.values,f=e.children,c=e.tagName,h=c===void 0?o:c,d=e.ignoreTag,u={id:i,description:s,defaultMessage:a},p=n(u,l,{ignoreTag:d});return typeof f=="function"?f(Array.isArray(p)?p:[p]):h?xe.createElement(h,null,xe.Children.toArray(p)):xe.createElement(xe.Fragment,null,p)}gm.displayName="FormattedMessage";var ym=xe.memo(gm,SS);ym.displayName="MemoizedFormattedMessage";const vr=ym;eo("formatDate");eo("formatTime");eo("formatNumber");eo("formatList");eo("formatDisplayName");pm("formatDate");pm("formatTime");var vm={exports:{}};(function(e){(function(t,n){var r="…",o=/(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w-]{1,300}@(.{1,300}\.)[a-zA-Z]{2,3})/g;function i(a,l,f){return f.length===a.length||!l.ellipsis||(f+=l.ellipsis),f}function s(a,l,f){var c="",h=!0,d=l,u,p;if(f=f||{},f.ellipsis=typeof f.ellipsis>"u"?r:f.ellipsis,!a||a.length===0)return"";for(h=!0;h;){if(o.lastIndex=c.length,h=o.exec(a),!h||h.index-c.length>=d||o.lastIndex>=l+3e3)return c+=a.substring(c.length,l),i(a,f,c);if(u=h[0],p=h.index,c+=a.substring(c.length,p+u.length),d-=p+u.length,d<=0)break}return i(a,f,c)}e.exports?e.exports=s:t.truncate=s})(String)})(vm);var TS=vm.exports;const _m=jt(TS),Go="https://storage.googleapis.com/apolitical-assets/",xS="200,000+";const Yc=({label:e=!1,className:t="",children:n})=>{const r=Re();return O.jsxs("details",{className:se("collapsible-section",t),children:[O.jsx("summary",{children:e||r.formatMessage({id:"collapsibleSection_summary"})}),O.jsx("div",{className:"content",children:n})]})};function Kr(){return Kr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kr.apply(this,arguments)}const OS=["children","options"],od=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","className","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{for:"htmlFor"}),ad={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},AS=["style","script"],CS=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,RS=/mailto:/i,NS=/\n{2,}$/,Em=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,PS=/^ *> ?/gm,IS=/^ {2,}\n/,LS=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,bm=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,wm=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,kS=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,MS=/^(?:\n *)*\n/,BS=/\r\n?/g,FS=/^\[\^([^\]]+)](:.*)\n/,US=/^\[\^([^\]]+)]/,DS=/\f/g,$S=/^\s*?\[(x|\s)\]/,Sm=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Tm=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,xm=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,vc=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,jS=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Om=/^<!--[\s\S]*?(?:-->)/,HS=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,_c=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,qS=/^\{.*\}$/,GS=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,WS=/^<([^ >]+@[^ >]+)>/,VS=/^<([^ >]+:\/[^ >]+)>/,zS=/-([a-z])?/gi,Am=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,YS=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,KS=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,QS=/^\[([^\]]*)\] ?\[([^\]]*)\]/,XS=/(\[|\])/g,JS=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,ZS=/\t/g,eT=/^ *\| */,tT=/(^ *\||\| *$)/g,rT=/ *$/,nT=/^ *:-+: *$/,iT=/^ *:-+ *$/,oT=/^ *-+: *$/,aT=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,sT=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,cT=/^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,uT=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,lT=/^\\([^0-9A-Za-z\s])/,fT=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,dT=/^\n+/,hT=/^([ \t]*)/,pT=/\\([^\\])/g,sd=/ *\n+$/,mT=/(?:^|\n)( *)$/,Kc="(?:\\d+\\.)",Qc="(?:[*+-])";function Cm(e){return"( *)("+(e===1?Kc:Qc)+") +"}const Rm=Cm(1),Nm=Cm(2);function Pm(e){return new RegExp("^"+(e===1?Rm:Nm))}const gT=Pm(1),yT=Pm(2);function Im(e){return new RegExp("^"+(e===1?Rm:Nm)+"[^\\n]*(?:\\n(?!\\1"+(e===1?Kc:Qc)+" )[^\\n]*)*(\\n|$)","gm")}const Lm=Im(1),km=Im(2);function Mm(e){const t=e===1?Kc:Qc;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const Bm=Mm(1),Fm=Mm(2);function cd(e,t){const n=t===1,r=n?Bm:Fm,o=n?Lm:km,i=n?gT:yT;return{t(s,a,l){const f=mT.exec(l);return f&&(a.o||!a._&&!a.u)?r.exec(s=f[1]+s):null},i:ve.HIGH,l(s,a,l){const f=n?+s[2]:void 0,c=s[0].replace(NS,`
87
+ `).match(o);let h=!1;return{p:c.map(function(d,u){const p=i.exec(d)[0].length,m=new RegExp("^ {1,"+p+"}","gm"),E=d.replace(m,"").replace(i,""),T=u===c.length-1,_=E.indexOf(`
92
88
 
93
- `)!==-1||T&&h;h=E;const b=l._,A=l.o;let w;l.o=!0,E?(l._=!1,w=_.replace(rd,`
89
+ `)!==-1||T&&h;h=_;const b=l._,A=l.o;let w;l.o=!0,_?(l._=!1,w=E.replace(sd,`
94
90
 
95
- `)):(l._=!0,w=_.replace(rd,""));const N=a(w,l);return l._=b,l.o=A,N}),m:n,g:f}},h:(s,a,l)=>e(s.m?"ol":"ul",{key:l.k,start:s.g},s.p.map(function(f,u){return e("li",{key:u},a(f,l))}))}}const lT=/^\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,fT=/^!\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Nm=[pm,mm,gm,ym,Em,vm,_m,bm,Am,Pm,Cm,Im],dT=[...Nm,/^[^\n]+(?: \n|\n{2,})/,pu,mu];function hT(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function pT(e){return XS.test(e)?"right":KS.test(e)?"center":QS.test(e)?"left":null}function id(e,t,n){const r=n.$;n.$=!0;const o=t(e.trim(),n);n.$=r;let i=[[]];return o.forEach(function(s,a){s.type==="tableSeparator"?a!==0&&a!==o.length-1&&i.push([]):(s.type!=="text"||o[a+1]!=null&&o[a+1].type!=="tableSeparator"||(s.v=s.v.replace(YS,"")),i[i.length-1].push(s))}),i}function mT(e,t,n){n._=!0;const r=id(e[1],t,n),o=e[2].replace(zS,"").split("|").map(pT),i=function(s,a,l){return s.trim().split(`
96
- `).map(function(f){return id(f,a,l)})}(e[3],t,n);return n._=!1,{S:o,A:i,L:r,type:"table"}}function od(e,t){return e.S[t]==null?{}:{textAlign:e.S[t]}}function hr(e){return function(t,n){return n._?e.exec(t):null}}function pr(e){return function(t,n){return n._||n.u?e.exec(t):null}}function er(e){return function(t,n){return n._||n.u?null:e.exec(t)}}function Mi(e){return function(t){return e.exec(t)}}function gT(e,t,n){if(t._||t.u||n&&!n.endsWith(`
91
+ `)):(l._=!0,w=E.replace(sd,""));const P=a(w,l);return l._=b,l.o=A,P}),m:n,g:f}},h:(s,a,l)=>e(s.m?"ol":"ul",{key:l.k,start:s.g},s.p.map(function(f,c){return e("li",{key:c},a(f,l))}))}}const vT=/^\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,_T=/^!\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Um=[Em,bm,wm,Sm,xm,Tm,Om,Am,Lm,Bm,km,Fm],ET=[...Um,/^[^\n]+(?: \n|\n{2,})/,vc,_c];function bT(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function wT(e){return oT.test(e)?"right":nT.test(e)?"center":iT.test(e)?"left":null}function ud(e,t,n){const r=n.$;n.$=!0;const o=t(e.trim(),n);n.$=r;let i=[[]];return o.forEach(function(s,a){s.type==="tableSeparator"?a!==0&&a!==o.length-1&&i.push([]):(s.type!=="text"||o[a+1]!=null&&o[a+1].type!=="tableSeparator"||(s.v=s.v.replace(rT,"")),i[i.length-1].push(s))}),i}function ST(e,t,n){n._=!0;const r=ud(e[1],t,n),o=e[2].replace(tT,"").split("|").map(wT),i=function(s,a,l){return s.trim().split(`
92
+ `).map(function(f){return ud(f,a,l)})}(e[3],t,n);return n._=!1,{S:o,A:i,L:r,type:"table"}}function ld(e,t){return e.S[t]==null?{}:{textAlign:e.S[t]}}function pr(e){return function(t,n){return n._?e.exec(t):null}}function mr(e){return function(t,n){return n._||n.u?e.exec(t):null}}function er(e){return function(t,n){return n._||n.u?null:e.exec(t)}}function Fi(e){return function(t){return e.exec(t)}}function TT(e,t,n){if(t._||t.u||n&&!n.endsWith(`
97
93
  `))return null;let r="";e.split(`
98
- `).every(i=>!Nm.some(s=>s.test(i))&&(r+=i+`
99
- `,i.trim()));const o=r.trimEnd();return o==""?null:[r,o]}function _n(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch{return null}return e}function ad(e){return e.replace(aT,"$1")}function Po(e,t,n){const r=n._||!1,o=n.u||!1;n._=!0,n.u=!0;const i=e(t,n);return n._=r,n.u=o,i}function yT(e,t,n){const r=n._||!1,o=n.u||!1;n._=!1,n.u=!0;const i=e(t,n);return n._=r,n.u=o,i}function vT(e,t,n){return n._=!1,e(t,n)}const Rs=(e,t,n)=>({v:Po(t,e[1],n)});function Ps(){return{}}function Is(){return null}function ET(...e){return e.filter(Boolean).join(" ")}function Ns(e,t,n){let r=e;const o=t.split(".");for(;o.length&&(r=r[o[0]],r!==void 0);)o.shift();return r||n}var ve;function _T(e,t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||hT,t.namedCodesToUnicode=t.namedCodesToUnicode?zr({},td,t.namedCodesToUnicode):td;const n=t.createElement||Oe.createElement;function r(c,p,...m){const _=Ns(t.overrides,`${c}.props`,{});return n(function(T,E){const b=Ns(E,T);return b?typeof b=="function"||typeof b=="object"&&"render"in b?b:Ns(E,`${T}.component`,T):T}(c,t.overrides),zr({},p,_,{className:ET(p==null?void 0:p.className,_.className)||void 0}),...m)}function o(c){let p=!1;t.forceInline?p=!0:t.forceBlock||(p=GS.test(c)===!1);const m=u(f(p?c:`${c.trimEnd().replace(iT,"")}
94
+ `).every(i=>!Um.some(s=>s.test(i))&&(r+=i+`
95
+ `,i.trim()));const o=r.trimEnd();return o==""?null:[r,o]}function bn(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch{return null}return e}function fd(e){return e.replace(pT,"$1")}function ko(e,t,n){const r=n._||!1,o=n.u||!1;n._=!0,n.u=!0;const i=e(t,n);return n._=r,n.u=o,i}function xT(e,t,n){const r=n._||!1,o=n.u||!1;n._=!1,n.u=!0;const i=e(t,n);return n._=r,n.u=o,i}function OT(e,t,n){return n._=!1,e(t,n)}const Ls=(e,t,n)=>({v:ko(t,e[1],n)});function ks(){return{}}function Ms(){return null}function AT(...e){return e.filter(Boolean).join(" ")}function Bs(e,t,n){let r=e;const o=t.split(".");for(;o.length&&(r=r[o[0]],r!==void 0);)o.shift();return r||n}var ve;function CT(e,t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||bT,t.namedCodesToUnicode=t.namedCodesToUnicode?Kr({},ad,t.namedCodesToUnicode):ad;const n=t.createElement||xe.createElement;function r(u,p,...m){const E=Bs(t.overrides,`${u}.props`,{});return n(function(T,_){const b=Bs(_,T);return b?typeof b=="function"||typeof b=="object"&&"render"in b?b:Bs(_,`${T}.component`,T):T}(u,t.overrides),Kr({},p,E,{className:AT(p==null?void 0:p.className,E.className)||void 0}),...m)}function o(u){let p=!1;t.forceInline?p=!0:t.forceBlock||(p=JS.test(u)===!1);const m=c(f(p?u:`${u.trimEnd().replace(dT,"")}
100
96
 
101
- `,{_:p}));for(;typeof m[m.length-1]=="string"&&!m[m.length-1].trim();)m.pop();if(t.wrapper===null)return m;const _=t.wrapper||(p?"span":"div");let T;if(m.length>1||t.forceWrapper)T=m;else{if(m.length===1)return T=m[0],typeof T=="string"?r("span",{key:"outer"},T):T;T=null}return Oe.createElement(_,{key:"outer"},T)}function i(c){const p=c.match(_S);return p?p.reduce(function(m,_,T){const E=_.indexOf("=");if(E!==-1){const b=function(F){return F.indexOf("-")!==-1&&F.match(kS)===null&&(F=F.replace(DS,function(M,q){return q.toUpperCase()})),F}(_.slice(0,E)).trim(),A=function(F){const M=F[0];return(M==='"'||M==="'")&&F.length>=2&&F[F.length-1]===M?F.slice(1,-1):F}(_.slice(E+1).trim()),w=ed[b]||b,N=m[w]=function(F,M){return F==="style"?M.split(/;\s?/).reduce(function(q,W){const V=W.slice(0,W.indexOf(":"));return q[V.replace(/(-[a-z])/g,j=>j[1].toUpperCase())]=W.slice(V.length+1).trim(),q},{}):F==="href"?_n(M):(M.match(BS)&&(M=M.slice(1,M.length-1)),M==="true"||M!=="false"&&M)}(b,A);typeof N=="string"&&(pu.test(N)||mu.test(N))&&(m[w]=Oe.cloneElement(o(N.trim()),{key:T}))}else _!=="style"&&(m[ed[_]||_]=!0);return m},{}):null}const s=[],a={},l={blockQuote:{t:er(pm),i:ve.HIGH,l:(c,p,m)=>({v:p(c[0].replace(SS,""),m)}),h:(c,p,m)=>r("blockquote",{key:m.k},p(c.v,m))},breakLine:{t:Mi(TS),i:ve.HIGH,l:Ps,h:(c,p,m)=>r("br",{key:m.k})},breakThematic:{t:er(OS),i:ve.HIGH,l:Ps,h:(c,p,m)=>r("hr",{key:m.k})},codeBlock:{t:er(gm),i:ve.MAX,l:c=>({v:c[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(c,p,m)=>r("pre",{key:m.k},r("code",zr({},c.O,{className:c.M?`lang-${c.M}`:""}),c.v))},codeFenced:{t:er(mm),i:ve.MAX,l:c=>({O:i(c[3]||""),v:c[4],M:c[2]||void 0,type:"codeBlock"})},codeInline:{t:pr(xS),i:ve.LOW,l:c=>({v:c[2]}),h:(c,p,m)=>r("code",{key:m.k},c.v)},footnote:{t:er(RS),i:ve.MAX,l:c=>(s.push({I:c[2],j:c[1]}),{}),h:Is},footnoteReference:{t:hr(PS),i:ve.HIGH,l:c=>({v:c[1],B:`#${t.slugify(c[1])}`}),h:(c,p,m)=>r("a",{key:m.k,href:_n(c.B)},r("sup",{key:m.k},c.v))},gfmTask:{t:hr(NS),i:ve.HIGH,l:c=>({R:c[1].toLowerCase()==="x"}),h:(c,p,m)=>r("input",{checked:c.R,key:m.k,readOnly:!0,type:"checkbox"})},heading:{t:er(t.enforceAtxHeadings?vm:ym),i:ve.HIGH,l:(c,p,m)=>({v:Po(p,c[2],m),T:t.slugify(c[2]),C:c[1].length}),h:(c,p,m)=>r(`h${c.C}`,{id:c.T,key:m.k},p(c.v,m))},headingSetext:{t:er(Em),i:ve.MAX,l:(c,p,m)=>({v:Po(p,c[1],m),C:c[2]==="="?1:2,type:"heading"})},htmlComment:{t:Mi(_m),i:ve.HIGH,l:()=>({}),h:Is},image:{t:pr(fT),i:ve.HIGH,l:c=>({D:c[1],B:ad(c[2]),F:c[3]}),h:(c,p,m)=>r("img",{key:m.k,alt:c.D||void 0,title:c.F||void 0,src:_n(c.B)})},link:{t:hr(lT),i:ve.LOW,l:(c,p,m)=>({v:yT(p,c[1],m),B:ad(c[2]),F:c[3]}),h:(c,p,m)=>r("a",{key:m.k,href:_n(c.B),title:c.F},p(c.v,m))},linkAngleBraceStyleDetector:{t:hr(US),i:ve.MAX,l:c=>({v:[{v:c[1],type:"text"}],B:c[1],type:"link"})},linkBareUrlDetector:{t:(c,p)=>p.N?null:hr(MS)(c,p),i:ve.MAX,l:c=>({v:[{v:c[1],type:"text"}],B:c[1],F:void 0,type:"link"})},linkMailtoDetector:{t:hr(FS),i:ve.MAX,l(c){let p=c[1],m=c[1];return bS.test(m)||(m="mailto:"+m),{v:[{v:p.replace("mailto:",""),type:"text"}],B:m,type:"link"}}},orderedList:nd(r,1),unorderedList:nd(r,2),newlineCoalescer:{t:er(AS),i:ve.LOW,l:Ps,h:()=>`
102
- `},paragraph:{t:gT,i:ve.LOW,l:Rs,h:(c,p,m)=>r("p",{key:m.k},p(c.v,m))},ref:{t:hr($S),i:ve.MAX,l:c=>(a[c[1]]={B:c[2],F:c[4]},{}),h:Is},refImage:{t:pr(jS),i:ve.MAX,l:c=>({D:c[1]||void 0,P:c[2]}),h:(c,p,m)=>r("img",{key:m.k,alt:c.D,src:_n(a[c.P].B),title:a[c.P].F})},refLink:{t:hr(HS),i:ve.MAX,l:(c,p,m)=>({v:p(c[1],m),Z:p(c[0].replace(qS,"\\$1"),m),P:c[2]}),h:(c,p,m)=>a[c.P]?r("a",{key:m.k,href:_n(a[c.P].B),title:a[c.P].F},p(c.v,m)):r("span",{key:m.k},p(c.Z,m))},table:{t:er(bm),i:ve.HIGH,l:mT,h:(c,p,m)=>r("table",{key:m.k},r("thead",null,r("tr",null,c.L.map(function(_,T){return r("th",{key:T,style:od(c,T)},p(_,m))}))),r("tbody",null,c.A.map(function(_,T){return r("tr",{key:T},_.map(function(E,b){return r("td",{key:b,style:od(c,b)},p(E,m))}))})))},tableSeparator:{t:function(c,p){return p.$?(p._=!0,VS.exec(c)):null},i:ve.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:Mi(nT),i:ve.MIN,l:c=>({v:c[0].replace(LS,(p,m)=>t.namedCodesToUnicode[m]?t.namedCodesToUnicode[m]:p)}),h:c=>c.v},textBolded:{t:pr(JS),i:ve.MED,l:(c,p,m)=>({v:p(c[2],m)}),h:(c,p,m)=>r("strong",{key:m.k},p(c.v,m))},textEmphasized:{t:pr(ZS),i:ve.LOW,l:(c,p,m)=>({v:p(c[2],m)}),h:(c,p,m)=>r("em",{key:m.k},p(c.v,m))},textEscaped:{t:pr(rT),i:ve.HIGH,l:c=>({v:c[1],type:"text"})},textMarked:{t:pr(eT),i:ve.LOW,l:Rs,h:(c,p,m)=>r("mark",{key:m.k},p(c.v,m))},textStrikethroughed:{t:pr(tT),i:ve.LOW,l:Rs,h:(c,p,m)=>r("del",{key:m.k},p(c.v,m))}};t.disableParsingRawHTML!==!0&&(l.htmlBlock={t:Mi(pu),i:ve.HIGH,l(c,p,m){const[,_]=c[3].match(oT),T=new RegExp(`^${_}`,"gm"),E=c[3].replace(T,""),b=(A=E,dT.some(M=>M.test(A))?vT:Po);var A;const w=c[1].toLowerCase(),N=ES.indexOf(w)!==-1;m.N=m.N||w==="a";const F=N?c[3]:b(p,E,m);return m.N=!1,{O:i(c[2]),v:F,G:N,H:N?w:c[1]}},h:(c,p,m)=>r(c.H,zr({key:m.k},c.O),c.G?c.v:p(c.v,m))},l.htmlSelfClosing={t:Mi(mu),i:ve.HIGH,l:c=>({O:i(c[2]||""),H:c[1]}),h:(c,p,m)=>r(c.H,zr({},c.O,{key:m.k}))});const f=function(c){let p=Object.keys(c);function m(_,T){let E=[],b="";for(;_;){let A=0;for(;A<p.length;){const w=p[A],N=c[w],F=N.t(_,T,b);if(F){const M=F[0];_=_.substring(M.length);const q=N.l(F,m,T);q.type==null&&(q.type=w),E.push(q),b=M;break}A++}}return E}return p.sort(function(_,T){let E=c[_].i,b=c[T].i;return E!==b?E-b:_<T?-1:1}),function(_,T){return m(function(E){return E.replace(CS,`
103
- `).replace(IS,"").replace(WS," ")}(_),T)}}(l),u=(h=function(c){return function(p,m,_){return c[p.type].h(p,m,_)}}(l),function c(p,m={}){if(Array.isArray(p)){const _=m.k,T=[];let E=!1;for(let b=0;b<p.length;b++){m.k=b;const A=c(p[b],m),w=typeof A=="string";w&&E?T[T.length-1]+=A:A!==null&&T.push(A),E=w}return m.k=_,T}return h(p,c,m)});var h;const d=o(e);return s.length?r("div",null,d,r("footer",{key:"footer"},s.map(function(c){return r("div",{id:t.slugify(c.j),key:c.j},c.j,u(f(c.I,{_:!0})))}))):d}(function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"})(ve||(ve={}));const Zo=e=>{let{children:t,options:n}=e,r=function(o,i){if(o==null)return{};var s,a,l={},f=Object.keys(o);for(a=0;a<f.length;a++)i.indexOf(s=f[a])>=0||(l[s]=o[s]);return l}(e,vS);return Oe.cloneElement(_T(t,n),r)};const nr=({variant:e="primary",className:t="",children:n,...r})=>C.jsx("div",{className:se("highlighted-text-box",e,t),...r,children:n});const Lm=({variant:e="empty",text:t=!1,button:n=!1,className:r=""})=>{let o=n&&!!Object.keys(n).length;const i=typeof n=="object"&&"breakpoints"in n,s=Ki(i);if(i&&typeof n=="object"&&typeof s=="number"){const u=Object.assign({},n.breakpoints),h=Np(Object.keys(u));o=Lp(s,h,u)}const{breakpoints:a,text:l,...f}=n;return C.jsx(nr,{variant:"subtle",className:se("empty-state-box",e,r),children:C.jsxs(C.Fragment,{children:[t&&C.jsx(Zo,{options:{forceBlock:!0},children:t}),o&&typeof n=="object"&&C.jsx(ut,{...f,variant:n.variant?n.variant:"secondary",children:l})]})})};const gu=({children:e,...t})=>C.jsx("p",{...t,children:e}),km={q:gu,blockquote:gu};for(let e=1;e<=6;e++)km[`h${e}`]={component:gu,props:{className:"title"}};const Bm=({type:e="default",className:t="",heading:n=!1,children:r})=>C.jsxs("div",{className:se("helper-text-box text-small",e,t),children:[n&&C.jsx("p",{className:"title",children:n}),typeof r=="string"?C.jsx(Zo,{options:{wrapper:G.Fragment,forceBlock:!0,overrides:km},children:r}):C.jsx("p",{children:r})]});const bT=({className:e="",show:t=!1,hide:n=!1,text:r,children:o})=>{const i=Ie(),s=G.useRef(null),[a,l]=G.useState(""),[f,u]=G.useState("closed");G.useEffect(()=>{const c=s.current;if(c)return c.addEventListener("transitionend",h),()=>{c.removeEventListener("transitionend",h)}},[]),G.useEffect(()=>{if(!r||typeof r!="string")return;const c=r.split(`
104
- `);l(c.length<3?`${r.substring(0,400)}...`:c.slice(0,3).join(`
105
- `))},[r]),G.useEffect(()=>{f==="ready-to-close"&&u("closing")},[f]);const h=({propertyName:c})=>{c==="max-height"&&u(p=>p==="opening"?"open":p==="closing"?"closed":p)};if(!r)return null;const d=["opening","open"].includes(f);return C.jsxs(nr,{variant:"subtle",className:se("hide-show-text-box",e),children:[C.jsxs("div",{ref:s,className:se("content",f),children:[C.jsx(Zo,{options:{forceBlock:!0},children:f==="closed"?a:r}),f!=="closed"&&o]}),C.jsx("p",{className:"cta",children:C.jsx(ut,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:se({"rotate-180":d}),onClick:()=>{u(d?"ready-to-close":"opening")},children:d?n||i.formatMessage({id:"hideShowTextBox_hide"}):t||i.formatMessage({id:"hideShowTextBox_show"})})})]})},wT=()=>G.Fragment,ST=({children:e})=>C.jsx(nr,{variant:"secondary",children:e}),TT=["span","strong","h1","h2","h3","h4","h5","h6","p"],OT=({children:e})=>{const t=Ie();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const i of G.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number"))if(G.isValidElement(i)&&i.type==="summary"){if(i.props&&i.props.children){for(const s of G.Children.toArray(i.props.children))if(!(!s||typeof s=="string"||typeof s=="number")&&G.isValidElement(s)){const a=s.type;if(TT.includes(a)){for(n=s.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(i);const o=n?n.toString():"";return C.jsx(qu,{label:o,className:["Sources","Resources"].includes(o)?"discrete-links":"",children:r.map(i=>i)})},xT=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return C.jsx(nr,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return C.jsx(nr,{variant:"primary",children:e});case"pink-textbox":return C.jsx(nr,{variant:"tertiary",children:e});default:return C.jsx("div",{...t,children:e})}return C.jsx("div",{...t,children:e})},AT=e=>{const t=Ie(),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"),C.jsxs(C.Fragment,{children:[C.jsx(it,{children:C.jsx("a",{href:`#content-after-iframe-${n}`,children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})})}),C.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),C.jsx("span",{id:`content-after-iframe-${n}`,tabIndex:-1})]})},sd=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},CT=({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 i of G.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number")&&G.isValidElement(i)){const s=i.type;if(["button","center","span","strong"].includes(s)&&i.props&&i.props.children&&i.props.children[0])for((s==="button"||sd(i.props.children[0])==="button")&&(o=!0),r=i.props.children[0];r&&typeof r!="string"&&!(typeof r=="boolean"||typeof r=="number"||!G.isValidElement(r));)if(r.props&&r.props.children&&r.props.children[0])r=r.props.children[0],r&&sd(r)==="button"&&(o=!0);else break}return o?(n={...n,className:"button primary medium"},C.jsx("p",{className:"center",children:C.jsx(ut,{variant:"primary",size:"medium",...n,children:r})})):C.jsx("a",{...n,children:r})};const Mm=({className:e="",options:t={},children:n})=>{n=n.replace(/^<br\/?>/,"");const r={wrapper:G.Fragment,forceBlock:!0,overrides:{a:CT,CollapsibleSection:qu,TextBox:nr,CaseStudy:ST,style:wT,details:OT,div:xT,iframe:AT}};return C.jsx("div",{className:se("markdown-text",e),children:C.jsx(Zo,{options:{...r,...t},children:n})})};const RT=({className:e="",children:t})=>C.jsx("span",{className:se("pill",e),children:t});const PT=({progress:e=0,text:t=!1,className:n=""})=>{const r=Ie(),o=e>75?100:e>50?75:e>25?50:e>5?25:0,i={"--progress":`${e}%`};return C.jsx("span",{className:se(`progress-bar section-${o}`,n),style:i,children:C.jsx(it,{children:t?`${e} ${t}`:r.formatMessage({id:"progressBar"},{number:e})})})},Fm=G.memo(PT);const Ls="loadingBlock_",IT=({progress:e=0,steps:t=!1,className:n=""})=>{const r=Ie();t||(t={0:{text:r.formatMessage({id:`${Ls}loading`})},75:{text:r.formatMessage({id:`${Ls}almostDone`})},100:{text:r.formatMessage({id:`${Ls}complete`})}});let o=null;const i=Object.keys(t);for(let a=0;a<i.length&&!(e<parseInt(i[a]));a++)o=i[a];const s=o&&t[o].icon?{"--icon":`url(${$o}icons/${t[o].icon}.svg)`}:{};return C.jsxs(nr,{className:se("loading-block",n,{"has-icon":o&&t[o].icon}),variant:"subtle",style:s,children:[o&&C.jsx("span",{className:"step",children:t[o].text}),C.jsx(Fm,{progress:e})]})},NT=G.memo(IT);const vr=({element:e="div",className:t="",...n})=>C.jsx(Eu,{element:e,className:se("loading-placeholder",t),...n});const yu={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"]},Um=(e,t)=>e in yu?C.jsx("div",{className:e,children:yu[e].map((n,r)=>Um(n,r))},t):C.jsx(vr,{className:e},t),Dm=({layout:e="overview-page"})=>C.jsx("div",{className:se("loading-state",e),children:yu[e].map((t,n)=>Um(t,n))}),$m=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):""},To=["#5AB6A3","#A2D7AF","#806056","#3962B3"],LT=e=>{const t=Math.ceil(26/To.length),n=$m(e).toLowerCase();if(n==="")return To[0];const r=n.charCodeAt(0)-96;for(let o=0;o<To.length;o++)if(r<=t*(o+1))return To[o]};const ud=256,ea=({className:e="",src:t="",name:n,alt:r,width:o=ud,height:i=ud,...s})=>{const[a,l]=G.useState(!1),f=G.useRef(null);return G.useEffect(()=>{const u=f.current;if(!u)return;const h=u.getContext("2d");if(!h)return;const d=o,c=i;typeof window<"u"&&window.devicePixelRatio&&(u.width=d*window.devicePixelRatio,u.height=c*window.devicePixelRatio,h.scale(window.devicePixelRatio,window.devicePixelRatio)),h.fillStyle=LT(n),h.fillRect(0,0,d,c),h.font=`${d/3}px Arial`,h.textAlign="center",h.fillStyle="white",h.fillText($m(n),d/2,c/1.6)},[n]),C.jsxs("figure",{className:se("profile-picture",e,{error:a}),...s,children:[t!==""&&!a&&C.jsx("img",{src:t,alt:r||n,onError:()=>{l(!0)},width:o,height:i}),(t===""||a)&&C.jsx("canvas",{ref:f})]})},Vu=e=>e==="apolitical"?{image:`${$o}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${$o}logos/member_community.svg`}:{name:e.name,role:e.jobTitle||"",organisation:e.organization||"",country:e.location&&e.location.country||"",url:`/profiles/${e.id||e.slug}`,image:e.image&&e.image.thumbnail},kT=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const o=e!=="",i=t!=="",s=n!=="";if(!o&&!i&&!s)return"";const a=`${e}${o&&i?` — ${t}`:t}`;let l=`${a}${(o||i)&&s?`, ${n}`:n}`;return l.length>r&&(l=a),l.length>r&&(l=hm(l,r)),l};const zu=({member:e="community",additionalContent:t=!1,gtmContext:n="member",gtmType:r="member-click",className:o=""})=>{const i=Ie(),s=Vu(e);s.name||(s.name=i.formatMessage({id:`member_${typeof e=="string"?e:"community"}`}));const{name:a,url:l,image:f}=s,u=kT(s),h=t&&t.createdAt?Bb(t.createdAt):!1;return C.jsx("div",{className:se("member text-medium",o),children:C.jsxs(kp,{href:l,gtmType:r,gtmContext:n,children:[C.jsx(ea,{name:a,src:f}),C.jsxs("p",{className:"details",children:[C.jsx("strong",{children:a}),t&&C.jsxs("span",{className:"additional-content",children:[t.createdAt&&h&&C.jsx("span",{className:"date",title:Df(t&&t.createdAt),"aria-label":Df(t&&t.createdAt),children:i.formatMessage({id:`dates_${h.path}`},{number:h.number})}),t.didEdit&&C.jsx("em",{children:i.formatMessage({id:"discussion_edited"})})]}),u&&C.jsx("small",{children:u})]})]})})};const cd={small:24,medium:48},jm=({element:e="div",contributors:t=[],styling:{showText:n,size:r,showGap:o,showPlaceholders:i}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:s=2,className:a=""})=>{const l=Ie();return t.length===0?null:G.createElement(e,{className:se("contributors",a,r,{"has-gap":o}),children:C.jsxs(C.Fragment,{children:[C.jsx("ul",{children:t.map((f,u)=>{let h,d="";if(u<s){const{name:c="",image:p=""}=Vu(f);if(i)return C.jsx(vr,{element:"li",className:"contributor"},u);h=C.jsx(ea,{name:c,src:p,width:cd[r||"medium"],height:cd[r||"medium"]})}else u===s&&(h=C.jsxs("small",{children:["+",t.length-s]}),d="number-left");return h?C.jsx("li",{className:se("contributor",d),children:h},u):null})}),n&&C.jsx("span",{className:"label",children:typeof n=="string"?n:t.length===1?typeof t[0]=="string"?l.formatMessage({id:`member_${t[0]}`}):hm(t[0].name||"",20):null})]})})},BT=({children:e,locale:t,messages:n})=>{const r=t||"en",o={...Ub[r],...n||{}};return C.jsx(pS,{locale:r,messages:o,children:e})},Bn=G.createContext(null),MT=({children:e,user:t})=>C.jsx(Bn.Provider,{value:t,children:e});const Hm=({isMember:e=!1,functions:{join:t,leave:n}={join:()=>{},leave:()=>{}}})=>{const r=Ie(),o=G.useContext(Bn),i=o&&typeof o.id=="string",[s,a]=G.useState(e);return C.jsx(ut,{variant:s?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:s?{icon:"tick",position:"left"}:!1,onClick:async()=>{s?typeof n=="function"&&await n():typeof t=="function"&&await t(),a(!s)},className:"join-community-button",disabled:!i,children:r.formatMessage({id:`joinCommunityButton${s?"_member":""}`})})};const FT=({className:e="",...t})=>{const n=Ie();return C.jsxs("div",{className:se("community-details",e),children:[C.jsx(Hm,{...t}),C.jsxs("div",{className:"additional-details",children:[C.jsx("hr",{}),C.jsx("h3",{children:n.formatMessage({id:"communityDetails_members"})}),C.jsx(jm,{contributors:[{},{},{},{},{}],styling:{size:"medium",showGap:!0,showPlaceholders:!0},cutoff:5})]})]})},UT={showThread:!1,showForm:!1},Yu=G.createContext(UT),DT=({children:e})=>{const[t,n]=G.useState({showThread:!1,showForm:!1});return C.jsx(Yu.Provider,{value:{...t,updateConversation:n},children:e})};function vu(){return vu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vu.apply(this,arguments)}function $T(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var jT=G.useLayoutEffect,HT=function(t){var n=Oe.useRef(t);return jT(function(){n.current=t}),n},ld=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},qT=function(t,n){var r=G.useRef();return G.useCallback(function(o){t.current=o,r.current&&ld(r.current,null),r.current=n,n&&ld(n,o)},[n])},fd={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},GT=function(t){Object.keys(fd).forEach(function(n){t.style.setProperty(n,fd[n],"important")})},dd=GT,rt=null,hd=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function WT(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),rt||(rt=document.createElement("textarea"),rt.setAttribute("tabindex","-1"),rt.setAttribute("aria-hidden","true"),dd(rt)),rt.parentNode===null&&document.body.appendChild(rt);var o=e.paddingSize,i=e.borderSize,s=e.sizingStyle,a=s.boxSizing;Object.keys(s).forEach(function(d){var c=d;rt.style[c]=s[c]}),dd(rt),rt.value=t;var l=hd(rt,e);rt.value=t,l=hd(rt,e),rt.value="x";var f=rt.scrollHeight-o,u=f*n;a==="border-box"&&(u=u+o+i),l=Math.max(u,l);var h=f*r;return a==="border-box"&&(h=h+o+i),l=Math.min(h,l),[l,f]}var pd=function(){},VT=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},zT=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],YT=!!document.documentElement.currentStyle,KT=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=VT(zT,n),o=r.boxSizing;if(o==="")return null;YT&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),s=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:s}},QT=KT;function qm(e,t,n){var r=HT(n);Oe.useLayoutEffect(function(){var o=function(s){return r.current(s)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var XT=function(t){qm(window,"resize",t)},JT=function(t){qm(document.fonts,"loadingdone",t)},ZT=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],eO=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,s=t.onChange,a=s===void 0?pd:s,l=t.onHeightChange,f=l===void 0?pd:l,u=$T(t,ZT),h=u.value!==void 0,d=Oe.useRef(null),c=qT(d,n),p=Oe.useRef(0),m=Oe.useRef(),_=function(){var b=d.current,A=r&&m.current?m.current:QT(b);if(A){m.current=A;var w=WT(A,b.value||b.placeholder||"x",i,o),N=w[0],F=w[1];p.current!==N&&(p.current=N,b.style.setProperty("height",N+"px","important"),f(N,{rowHeight:F}))}},T=function(b){h||_(),a(b)};return Oe.useLayoutEffect(_),XT(_),JT(_),Oe.createElement("textarea",vu({},u,{onChange:T,ref:c}))},tO=Oe.forwardRef(eO);let Oo=null;const pt="discussion_form_",Gm=({content:e={type:"response",slugs:{}},meta:t={isLoading:!1,isInWrapper:!1,isEditing:!1},inputRef:n,maxLength:r=5e4,minRows:o=4,forceShow:i={cancel:!1,error:!1},functions:s={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:a="DiscussionForm"})=>{var M,q;const l=Ie(),f=G.useContext(Bn),[u,h]=G.useState(t.isEditing&&t.isEditing.text||""),[d,c]=G.useState(i.error||!1),[p,m]=G.useState(!1),_=G.useRef(null);if(n||(n=_),t.isLoading)return C.jsx(vr,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const T=W=>{const V=W.target.value;h(V);let j;!f||!f.id?j=dr(l.formatMessage,`${pt}error_loggedOut`,e.type,"action"):V.length>=r&&(j=`${pt}error_tooLong`),j?c(j):d&&c(!1)};let E=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const W=e.type==="response"?((M=e.slugs)==null?void 0:M.question)||"":((q=e.slugs)==null?void 0:q.answer)||"";W&&(E=`${E}-${W.slice(-15)}`)}const b=async W=>{var j;if(W.preventDefault(),W.stopPropagation(),w)return;Oo&&clearTimeout(Oo),m("submitting");const V=window.location.pathname;try{let Y;switch(e.type){case"post":Y=await s.create({content:u});break;case"question":Y=await s.create({title:u,authorId:f&&f.id,...(j=s.props)==null?void 0:j.create});break;case"response":Y=await s.create({question:e.slugs.question},{body:u,authorId:f&&f.id,contentPath:V});break;case"reply":Y=await s.create({question:e.slugs.question,answer:e.slugs.answer},{body:u,authorId:f&&f.id,contentPath:V});break;default:break}await Mb(1e3),s.callback&&await s.callback(Y),Oo=setTimeout(()=>{h(""),m("submitted"),A()},500)}catch(Y){const oe=Y;let K=`${pt}error`;oe.message.includes("entry already exists")&&(K=dr(l.formatMessage,`${pt}error_alreadyExists`,e.type,"action")),oe.message.includes("429")?K=dr(l.formatMessage,`${pt}error_tooMany`,e.type,"action"):oe.message.includes("400")&&(K=`${pt}error`),c(K),A()}},A=()=>{Oo=setTimeout(()=>{c(!1),m(!1)},5e3)},w=!u||!$b(u),N=p==="submitting",F=[];return(t.isEditing&&!N||i.cancel)&&F.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:s.handleCancel,className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!i.cancel&&(!f||!f.id||!u),children:l.formatMessage({id:`${pt}cancel`})}),F.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:W=>{if(t.isEditing){m("submitting"),s.handleSaveEdit&&s.handleSaveEdit(_.current&&"value"in _.current?_.current.value:"");return}b(W)},className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":`${t.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!f||!f.id||w||N||t.isEditing&&u===t.isEditing.text,children:l.formatMessage({id:`${pt}${N?t.isEditing?"saving":"posting":t.isEditing?"save":"post"}`})}),C.jsxs("form",{id:E,className:se("discussion-card discussion-form",{"no-styling":t.isInWrapper&&t.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[!t.isEditing&&["question"].includes(e.type)&&C.jsx("h2",{children:dr(l.formatMessage,`${pt}title`,e.type,"action")}),C.jsx(zu,{member:f||"community",gtmContext:a,gtmType:"profile-click"}),C.jsx(it,{element:"label",showOnFocus:!1,htmlFor:`${E}-input`,children:dr(l.formatMessage,`${pt}label`,e.type,"action")}),C.jsx(tO,{ref:n,id:`${E}-input`,name:e.type,placeholder:dr(l.formatMessage,`${pt}placeholder`,e.type,"action"),onChange:T,value:u,maxLength:r,"aria-invalid":!!d,"aria-errormessage":"error-message",minRows:o,autoFocus:!!t.isEditing}),C.jsx("small",{children:dr(l.formatMessage,`${pt}explainer`,e.type,"action",{a:W=>C.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":"community-guidelines-link",children:W})})}),p==="submitted"&&C.jsx(hu,{className:"success","data-testid":"success",children:dr(l.formatMessage,`${pt}success`,e.type,"action")}),d&&C.jsx(hu,{id:"error-message",className:"error","data-testid":"error",children:i.error?i.error:typeof d=="string"?d.includes(" ")?d:l.formatMessage({id:d},{action:l.formatMessage({id:`discussion_action_${e.type}`}),maxLength:r}):d}),C.jsx(Xo,{buttons:F})]})},rO=({question:e,answer:t,reply:n})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...n&&{replySlug:n}});let $i=!1;const ks=()=>{$i!==!1&&(clearTimeout($i),$i=!1)},Wm=({element:e="p",likes:t=0,isShort:n=!0,userLiked:r=!1,content:o={type:"reply",slugs:{}},canLike:i=!0,createLike:s=()=>{},deleteLike:a=()=>{}})=>{const l=Ie();console.log("from like",{likes:t,userLiked:r,slug:o.slugs}),G.useEffect(()=>{d(r)},[r]);const[f,u]=G.useState(t),[h,d]=G.useState(r),[c,p]=G.useState(!1),m=window.location.pathname,_=E=>{if(E.preventDefault(),E.stopPropagation(),$i)return ks(),!1;if(ks(),c||!i)return!1;$i=setTimeout(T,350)},T=async()=>{if(ks(),c||!i)return!1;let E=h?f-1:f+1;E<0&&(E=0),p(!0),u(E),d(!h);try{if(o&&o.slugs){const b=rO(o.slugs);h?await a(b):await s(b,{contentPath:m})}}catch{u(t),d(r)}finally{p(!1)}};return G.createElement(e,{className:se("likes-wrapper text-medium",{"show-spinner":c,"is-liked":h,disabled:!i}),onClick:_,children:C.jsxs(C.Fragment,{children:[C.jsx(ut,{variant:"tertiary",size:"medium",icon:{icon:h?"heart":"heart_empty",animate:"bounce"},className:se({"do-animation":h&&!r}),screenreaderText:i?l.formatMessage({id:`discussion_${o.type}_likes_${h?"unlike":"like"}`}):!1,onClick:_,disabled:!i,"aria-hidden":!i,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${o.type}-click`}),C.jsx("span",{className:"number-of-likes","data-testid":"number-of-likes",children:l.formatMessage({id:`discussion_likes${n?"_short":""}`},{number:f})})]})})};var jo={exports:{}};jo.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",o=1,i=2,s=9007199254740991,a="[object Arguments]",l="[object Array]",f="[object AsyncFunction]",u="[object Boolean]",h="[object Date]",d="[object Error]",c="[object Function]",p="[object GeneratorFunction]",m="[object Map]",_="[object Number]",T="[object Null]",E="[object Object]",b="[object Promise]",A="[object Proxy]",w="[object RegExp]",N="[object Set]",F="[object String]",M="[object Symbol]",q="[object Undefined]",W="[object WeakMap]",V="[object ArrayBuffer]",j="[object DataView]",Y="[object Float32Array]",oe="[object Float64Array]",K="[object Int8Array]",k="[object Int16Array]",z="[object Int32Array]",J="[object Uint8Array]",de="[object Uint8ClampedArray]",X="[object Uint16Array]",ee="[object Uint32Array]",ue=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,Ve=/^(?:0|[1-9]\d*)$/,Q={};Q[Y]=Q[oe]=Q[K]=Q[k]=Q[z]=Q[J]=Q[de]=Q[X]=Q[ee]=!0,Q[a]=Q[l]=Q[V]=Q[u]=Q[j]=Q[h]=Q[d]=Q[c]=Q[m]=Q[_]=Q[E]=Q[w]=Q[N]=Q[F]=Q[W]=!1;var re=typeof ae=="object"&&ae&&ae.Object===Object&&ae,Pe=typeof self=="object"&&self&&self.Object===Object&&self,xe=re||Pe||Function("return this")(),at=t&&!t.nodeType&&t,ct=at&&!0&&e&&!e.nodeType&&e,_t=ct&&ct.exports===at,te=_t&&re.process,ze=function(){try{return te&&te.binding&&te.binding("util")}catch{}}(),De=ze&&ze.isTypedArray;function bt(y,O){for(var R=-1,$=y==null?0:y.length,fe=0,ie=[];++R<$;){var pe=y[R];O(pe,R,y)&&(ie[fe++]=pe)}return ie}function Gt(y,O){for(var R=-1,$=O.length,fe=y.length;++R<$;)y[fe+R]=O[R];return y}function Rt(y,O){for(var R=-1,$=y==null?0:y.length;++R<$;)if(O(y[R],R,y))return!0;return!1}function mt(y,O){for(var R=-1,$=Array(y);++R<y;)$[R]=O(R);return $}function br(y){return function(O){return y(O)}}function wt(y,O){return y.has(O)}function gt(y,O){return y==null?void 0:y[O]}function $e(y){var O=-1,R=Array(y.size);return y.forEach(function($,fe){R[++O]=[fe,$]}),R}function St(y,O){return function(R){return y(O(R))}}function tt(y){var O=-1,R=Array(y.size);return y.forEach(function($){R[++O]=$}),R}var Ye=Array.prototype,wr=Function.prototype,S=Object.prototype,g=xe["__core-js_shared__"],v=wr.toString,x=S.hasOwnProperty,P=function(){var y=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),U=S.toString,H=RegExp("^"+v.call(x).replace(ue,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),le=_t?xe.Buffer:void 0,be=xe.Symbol,we=xe.Uint8Array,Se=S.propertyIsEnumerable,he=Ye.splice,lt=be?be.toStringTag:void 0,ir=Object.getOwnPropertySymbols,Sr=le?le.isBuffer:void 0,Wt=St(Object.keys,Object),Tr=Ot(xe,"DataView"),Vt=Ot(xe,"Map"),Or=Ot(xe,"Promise"),xr=Ot(xe,"Set"),Ar=Ot(xe,"WeakMap"),Pt=Ot(Object,"create"),nn=Ke(Tr),Tt=Ke(Vt),Fn=Ke(Or),Un=Ke(xr),Dn=Ke(Ar),on=be?be.prototype:void 0,Cr=on?on.valueOf:void 0;function Fe(y){var O=-1,R=y==null?0:y.length;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function Rr(){this.__data__=Pt?Pt(null):{},this.size=0}function Pr(y){var O=this.has(y)&&delete this.__data__[y];return this.size-=O?1:0,O}function zt(y){var O=this.__data__;if(Pt){var R=O[y];return R===r?void 0:R}return x.call(O,y)?O[y]:void 0}function an(y){var O=this.__data__;return Pt?O[y]!==void 0:x.call(O,y)}function $n(y,O){var R=this.__data__;return this.size+=this.has(y)?0:1,R[y]=Pt&&O===void 0?r:O,this}Fe.prototype.clear=Rr,Fe.prototype.delete=Pr,Fe.prototype.get=zt,Fe.prototype.has=an,Fe.prototype.set=$n;function je(y){var O=-1,R=y==null?0:y.length;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function jn(){this.__data__=[],this.size=0}function Hn(y){var O=this.__data__,R=sr(O,y);if(R<0)return!1;var $=O.length-1;return R==$?O.pop():he.call(O,R,1),--this.size,!0}function qn(y){var O=this.__data__,R=sr(O,y);return R<0?void 0:O[R][1]}function Gn(y){return sr(this.__data__,y)>-1}function Ir(y,O){var R=this.__data__,$=sr(R,y);return $<0?(++this.size,R.push([y,O])):R[$][1]=O,this}je.prototype.clear=jn,je.prototype.delete=Hn,je.prototype.get=qn,je.prototype.has=Gn,je.prototype.set=Ir;function Je(y){var O=-1,R=y==null?0:y.length;for(this.clear();++O<R;){var $=y[O];this.set($[0],$[1])}}function Wn(){this.size=0,this.__data__={hash:new Fe,map:new(Vt||je),string:new Fe}}function Vn(y){var O=ft(this,y).delete(y);return this.size-=O?1:0,O}function zn(y){return ft(this,y).get(y)}function Yn(y){return ft(this,y).has(y)}function Kn(y,O){var R=ft(this,y),$=R.size;return R.set(y,O),this.size+=R.size==$?0:1,this}Je.prototype.clear=Wn,Je.prototype.delete=Vn,Je.prototype.get=zn,Je.prototype.has=Yn,Je.prototype.set=Kn;function or(y){var O=-1,R=y==null?0:y.length;for(this.__data__=new Je;++O<R;)this.add(y[O])}function sn(y){return this.__data__.set(y,r),this}function ar(y){return this.__data__.has(y)}or.prototype.add=or.prototype.push=sn,or.prototype.has=ar;function st(y){var O=this.__data__=new je(y);this.size=O.size}function Nr(){this.__data__=new je,this.size=0}function Qn(y){var O=this.__data__,R=O.delete(y);return this.size=O.size,R}function Xn(y){return this.__data__.get(y)}function Jn(y){return this.__data__.has(y)}function Zn(y,O){var R=this.__data__;if(R instanceof je){var $=R.__data__;if(!Vt||$.length<n-1)return $.push([y,O]),this.size=++R.size,this;R=this.__data__=new Je($)}return R.set(y,O),this.size=R.size,this}st.prototype.clear=Nr,st.prototype.delete=Qn,st.prototype.get=Xn,st.prototype.has=Jn,st.prototype.set=Zn;function ei(y,O){var R=ur(y),$=!R&&hn(y),fe=!R&&!$&&lr(y),ie=!R&&!$&&!fe&&Fr(y),pe=R||$||fe||ie,me=pe?mt(y.length,String):[],ke=me.length;for(var _e in y)(O||x.call(y,_e))&&!(pe&&(_e=="length"||fe&&(_e=="offset"||_e=="parent")||ie&&(_e=="buffer"||_e=="byteLength"||_e=="byteOffset")||It(_e,ke)))&&me.push(_e);return me}function sr(y,O){for(var R=y.length;R--;)if(dn(y[R][0],O))return R;return-1}function Lr(y,O,R){var $=O(y);return ur(y)?$:Gt($,R(y))}function Yt(y){return y==null?y===void 0?q:T:lt&&lt in Object(y)?xt(y):fn(y)}function un(y){return yt(y)&&Yt(y)==a}function cn(y,O,R,$,fe){return y===O?!0:y==null||O==null||!yt(y)&&!yt(O)?y!==y&&O!==O:ln(y,O,R,$,cn,fe)}function ln(y,O,R,$,fe,ie){var pe=ur(y),me=ur(O),ke=pe?l:dt(y),_e=me?l:dt(O);ke=ke==a?E:ke,_e=_e==a?E:_e;var He=ke==E,Qe=_e==E,Me=ke==_e;if(Me&&lr(y)){if(!lr(O))return!1;pe=!0,He=!1}if(Me&&!He)return ie||(ie=new st),pe||Fr(y)?kr(y,O,R,$,fe,ie):ii(y,O,ke,R,$,fe,ie);if(!(R&o)){var qe=He&&x.call(y,"__wrapped__"),Ue=Qe&&x.call(O,"__wrapped__");if(qe||Ue){var Nt=qe?y.value():y,At=Ue?O.value():O;return ie||(ie=new st),fe(Nt,At,R,$,ie)}}return Me?(ie||(ie=new st),Br(y,O,R,$,fe,ie)):!1}function ti(y){if(!mn(y)||si(y))return!1;var O=pn(y)?H:ce;return O.test(Ke(y))}function ri(y){return yt(y)&&Mr(y.length)&&!!Q[Yt(y)]}function ni(y){if(!ui(y))return Wt(y);var O=[];for(var R in Object(y))x.call(y,R)&&R!="constructor"&&O.push(R);return O}function kr(y,O,R,$,fe,ie){var pe=R&o,me=y.length,ke=O.length;if(me!=ke&&!(pe&&ke>me))return!1;var _e=ie.get(y);if(_e&&ie.get(O))return _e==O;var He=-1,Qe=!0,Me=R&i?new or:void 0;for(ie.set(y,O),ie.set(O,y);++He<me;){var qe=y[He],Ue=O[He];if($)var Nt=pe?$(Ue,qe,He,O,y,ie):$(qe,Ue,He,y,O,ie);if(Nt!==void 0){if(Nt)continue;Qe=!1;break}if(Me){if(!Rt(O,function(At,Qt){if(!wt(Me,Qt)&&(qe===At||fe(qe,At,R,$,ie)))return Me.push(Qt)})){Qe=!1;break}}else if(!(qe===Ue||fe(qe,Ue,R,$,ie))){Qe=!1;break}}return ie.delete(y),ie.delete(O),Qe}function ii(y,O,R,$,fe,ie,pe){switch(R){case j:if(y.byteLength!=O.byteLength||y.byteOffset!=O.byteOffset)return!1;y=y.buffer,O=O.buffer;case V:return!(y.byteLength!=O.byteLength||!ie(new we(y),new we(O)));case u:case h:case _:return dn(+y,+O);case d:return y.name==O.name&&y.message==O.message;case w:case F:return y==O+"";case m:var me=$e;case N:var ke=$&o;if(me||(me=tt),y.size!=O.size&&!ke)return!1;var _e=pe.get(y);if(_e)return _e==O;$|=i,pe.set(y,O);var He=kr(me(y),me(O),$,fe,ie,pe);return pe.delete(y),He;case M:if(Cr)return Cr.call(y)==Cr.call(O)}return!1}function Br(y,O,R,$,fe,ie){var pe=R&o,me=Kt(y),ke=me.length,_e=Kt(O),He=_e.length;if(ke!=He&&!pe)return!1;for(var Qe=ke;Qe--;){var Me=me[Qe];if(!(pe?Me in O:x.call(O,Me)))return!1}var qe=ie.get(y);if(qe&&ie.get(O))return qe==O;var Ue=!0;ie.set(y,O),ie.set(O,y);for(var Nt=pe;++Qe<ke;){Me=me[Qe];var At=y[Me],Qt=O[Me];if($)var Ji=pe?$(Qt,At,Me,O,y,ie):$(At,Qt,Me,y,O,ie);if(!(Ji===void 0?At===Qt||fe(At,Qt,R,$,ie):Ji)){Ue=!1;break}Nt||(Nt=Me=="constructor")}if(Ue&&!Nt){var Lt=y.constructor,fr=O.constructor;Lt!=fr&&"constructor"in y&&"constructor"in O&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof fr=="function"&&fr instanceof fr)&&(Ue=!1)}return ie.delete(y),ie.delete(O),Ue}function Kt(y){return Lr(y,gn,oi)}function ft(y,O){var R=y.__data__;return ai(O)?R[typeof O=="string"?"string":"hash"]:R.map}function Ot(y,O){var R=gt(y,O);return ti(R)?R:void 0}function xt(y){var O=x.call(y,lt),R=y[lt];try{y[lt]=void 0;var $=!0}catch{}var fe=U.call(y);return $&&(O?y[lt]=R:delete y[lt]),fe}var oi=ir?function(y){return y==null?[]:(y=Object(y),bt(ir(y),function(O){return Se.call(y,O)}))}:yn,dt=Yt;(Tr&&dt(new Tr(new ArrayBuffer(1)))!=j||Vt&&dt(new Vt)!=m||Or&&dt(Or.resolve())!=b||xr&&dt(new xr)!=N||Ar&&dt(new Ar)!=W)&&(dt=function(y){var O=Yt(y),R=O==E?y.constructor:void 0,$=R?Ke(R):"";if($)switch($){case nn:return j;case Tt:return m;case Fn:return b;case Un:return N;case Dn:return W}return O});function It(y,O){return O=O??s,!!O&&(typeof y=="number"||Ve.test(y))&&y>-1&&y%1==0&&y<O}function ai(y){var O=typeof y;return O=="string"||O=="number"||O=="symbol"||O=="boolean"?y!=="__proto__":y===null}function si(y){return!!P&&P in y}function ui(y){var O=y&&y.constructor,R=typeof O=="function"&&O.prototype||S;return y===R}function fn(y){return U.call(y)}function Ke(y){if(y!=null){try{return v.call(y)}catch{}try{return y+""}catch{}}return""}function dn(y,O){return y===O||y!==y&&O!==O}var hn=un(function(){return arguments}())?un:function(y){return yt(y)&&x.call(y,"callee")&&!Se.call(y,"callee")},ur=Array.isArray;function cr(y){return y!=null&&Mr(y.length)&&!pn(y)}var lr=Sr||li;function ci(y,O){return cn(y,O)}function pn(y){if(!mn(y))return!1;var O=Yt(y);return O==c||O==p||O==f||O==A}function Mr(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=s}function mn(y){var O=typeof y;return y!=null&&(O=="object"||O=="function")}function yt(y){return y!=null&&typeof y=="object"}var Fr=De?br(De):ri;function gn(y){return cr(y)?ei(y):ni(y)}function yn(){return[]}function li(){return!1}e.exports=ci})(jo,jo.exports);var nO=jo.exports;const iO=jt(nO),oO=e=>{const t={};return Object.keys(e).forEach(n=>{t[`${n}Slug`]=e[n]}),t},md="discussion_",aO=({content:e,isLoading:t=!1,originalAuthorId:n,functions:{content:{createContent:r,deleteContent:o,updateContent:i},likes:{createLike:s,deleteLike:a}},className:l,gtmContext:f="DiscussionAnswer",locale:u="en",children:h})=>{const d=Ie();G.useContext(Bn);const c=G.useContext(Yu),[p,m]=G.useState({body:e&&e.body||"",isEditing:!1,didEdit:e&&e.isEdited||!1}),[_,T]=G.useState("");if(G.useEffect(()=>{m({...p,body:e&&e.body||"",didEdit:e&&e.isEdited||!1})},[e.isEdited]),t||!e||e.type==="answer"&&(!e.slugs||!e.slugs.question))return C.jsx(vr,{className:"discussion-card discussion-post"});const{author:E,createdAt:b,likes:A=0,userLiked:w}=e,N=!0;console.log({likes:e.likes,userLiked:e.userLiked,slug:e.slug});const F=async q=>{q||(q=""),T("");try{iO(q,p.body)||await i(oO(e.slugs),{body:q}),m({body:q,isEditing:!1,didEdit:!0})}catch{T(`${md}form_error`)}},M=()=>{c&&c.updateConversation&&c.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const W=`reply-form-${(e.type==="answer"?e.slug:e.slugs.answer||"").toLowerCase().slice(-15)}`,V=document.getElementById(W),j=document.getElementById(`${W}-input`);j&&j.focus(),V&&V.scrollIntoView({behavior:"smooth"})},0)};return C.jsxs("div",{className:se("discussion-post",l),"data-testid":`discussion-${e.type}-thread`,children:[C.jsxs("div",{className:se("discussion-card",e.type,{editing:p.isEditing}),children:[!p.isEditing&&C.jsx(zu,{member:E,additionalContent:{createdAt:b,didEdit:p.didEdit},className:typeof E!="string"&&E.id===n?"highlighted":"",gtmContext:f,gtmType:"profile-click"}),p.isEditing?C.jsx(Gm,{content:{type:e.type,slugs:e.slugs},meta:{isLoading:t,isInWrapper:!0,isEditing:{text:p.body}},forceShow:{error:_!==""&&_!=="delete-error"?d.formatMessage({id:_},{action:d.formatMessage({id:`discussion_action_${e.type}`})}):!1},functions:{create:r,handleSaveEdit:F,handleCancel:()=>{T(""),m({...p,isEditing:!1})}},gtmContext:`${f}Form`}):C.jsx(Mm,{children:p.body}),!p.isEditing&&C.jsxs("ul",{className:se("actions",e.type),"data-testid":`${e.type}-actions`,children:[C.jsx(Wm,{element:"li",likes:A,isShort:!1,userLiked:w,content:{type:e.type,slugs:e.slugs},canLike:N,createLike:s,deleteLike:a,locale:u}),(e.type==="answer"||e.type==="reply")&&C.jsx("li",{children:C.jsx(ut,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:M,children:d.formatMessage({id:`${md}thread_reply_button`})})})]})]}),h]})};const xo="emailHelperTextBox_",sO=({type:e,email:t,redirectPath:n,resendVerificationCode:r})=>{const o=Ie(),[i,s]=G.useState({path:`${xo}default`,type:"default",link:{},mail:{},error:""}),[a,l]=G.useState(!1),f=G.useCallback(c=>{c.preventDefault(),c.stopPropagation();const p=m=>{s({path:`${xo}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:_=>f(_),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:m})};if(typeof r!="function"){p(o.formatMessage({id:`${xo}error_noFunction`}));return}l(!0),r(t).then(()=>{localStorage.setItem("email",t),window.location.href=n||"/signup/verify-email"}).catch(m=>{p(m.message)}).finally(()=>{l(!1)})},[t,n,r]);G.useEffect(()=>{let c=xo,p="default",m={},_={};switch(e){case"gov":c+="autoApproved",p="success";break;case"nonGov":c+="unrecognisedEmail",p="error",m={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":c+="pendingApproval",p="error",_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":c+="emailUnverified",p="error",m={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:T=>f(T),"data-testid":"send-verify-email-click"};break;case"exists":c+="emailAlreadyExists",p="error",m={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:c+="default",m={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}s({...i,path:c,type:p,link:m,mail:_})},[e]);const u={};return["link","mail"].forEach(c=>{u[c]=Object.keys(i[c]).length?p=>C.jsx("a",{...i[c],children:p}):p=>p}),C.jsx(Bm,{type:i.type,heading:a?!1:o.formatMessage({id:`${i.path}_title`}),children:a?C.jsxs(C.Fragment,{children:[C.jsx(vr,{element:"span"}),C.jsx(vr,{element:"span"})]}):o.formatMessage({id:`${i.path}_text`},{...u,strong:c=>C.jsx("strong",{children:c}),em:c=>C.jsx("em",{children:c}),br:C.jsxs(C.Fragment,{children:[C.jsx("br",{}),C.jsx("br",{})]}),error:i.error})})};const Ao="passwordRules_",Vm="isMoreThanEightCharacters",zm="includesNumberAndSymbol",Ym="includesLowerAndUppercase",uO={[Vm]:"8Characters",[zm]:"numberSymbol",[Ym]:"lowercaseUppercase"},cO=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const n=Ie();return C.jsxs("aside",{className:se("password-rules",t),children:[C.jsx("small",{children:n.formatMessage({id:`${Ao}intro`})}),C.jsx("ul",{children:[Vm,zm,Ym].map(r=>C.jsxs("li",{className:se({matches:e[r]}),children:[C.jsxs(it,{children:[n.formatMessage({id:`${Ao}rule_label`})," "]}),C.jsx("span",{children:n.formatMessage({id:`${Ao}rule_${uO[r]}`})}),!e[r]&&C.jsxs(it,{element:"strong",children:[" "," ",n.formatMessage({id:`${Ao}notMet`})]})]},`rule-${r}`))})]})},lO=G.memo(cO);const fO=({text:e={},topRating:t=5,functions:{createRating:n=()=>null,updateRating:r=()=>{},reportError:o=()=>{}},className:i="",hasLoaded:s=!1})=>{const a=Ie(),[l,f]=G.useState({setUp:!1,id:null,rating:null,disabled:!0}),u=async()=>{try{const T=await n();f(E=>({...E,setUp:!0,id:T&&T.id,disabled:!1}))}catch(T){f(E=>({...E,setUp:!0,disabled:!0})),o(T)}};if(G.useEffect(()=>{s&&!l.setUp&&u()},[s]),!s)return C.jsx(vr,{className:"rating-placeholder"});const{id:h,rating:d,disabled:c}=l,p="ratings_",m={text:a.formatMessage({id:`${p}text`}),low:a.formatMessage({id:`${p}low`}),high:a.formatMessage({id:`${p}high`}),success:a.formatMessage({id:`${p}success`}),...e},_=async T=>{if(!(!h||c))try{f(E=>({...E,rating:T,disabled:!0})),await r({id:h,value:T})}catch(E){f(b=>({...b,rating:null})),o(E)}finally{f(E=>({...E,disabled:!1}))}};return C.jsxs("div",{className:se("rating",i),children:[C.jsx("span",{className:"label",children:m[d?"success":"text"]}),C.jsx("ol",{children:Array.from(new Array(t).keys()).map(T=>{const E=T+1;return C.jsx("li",{className:se({selected:d&&E<=d}),children:C.jsx(ut,{variant:"tertiary",size:"small",icon:{icon:`star${!d||E>d?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${a.formatMessage({id:`${p}stars`},{number:E,total:t})}${E===1||E===t?` - ${m[E===1?"low":"high"]}`:""}`,onClick:b=>{b.preventDefault(),b.stopPropagation(),_(E)},disabled:c})},`rating-${E}`)})})]})};const Km=({id:e="search",className:t="",handleToggle:n=!1,defaultValue:r="",gtmContext:o="search-bar",gtmEvent:i="form-submission"})=>{const{searchIsOpen:s=!0,isDesktopVersion:a=!1}=n||{},l=Ie(),f=G.useRef(null);Io(()=>{!n||a||!s||f.current&&f.current.focus()},[s]);const u=h=>{if(h.preventDefault(),h.stopPropagation(),!(!f.current||!f.current.value||f.current.value.length<1))return window&&window.location&&window.location.replace(`/search?search=${encodeURIComponent(f.current.value)}`)};return C.jsx("form",{onSubmit:u,className:se("search-form gtm-trackable",t),"data-gtm-event-context":o,"data-gtm-event-type":i,children:C.jsx("fieldset",{id:`${e}-form`,hidden:n?!s:!1,role:"search",children:C.jsxs("p",{children:[C.jsx(it,{element:"label",htmlFor:e,children:l.formatMessage({id:"search_label"})}),C.jsx("input",{ref:f,type:"search",id:e,name:e,defaultValue:r,placeholder:l.formatMessage({id:"search_placeholder"}),onKeyDown:h=>{h.key==="Enter"&&u(h)}}),C.jsx("button",{className:"clear",onClick:h=>{h.preventDefault(),h.stopPropagation(),f.current&&f.current.value&&(f.current.value="")},children:C.jsx(it,{children:l.formatMessage({id:"search_clear"})})}),C.jsx("button",{className:"search",onClick:u,children:C.jsx(it,{children:l.formatMessage({id:"search_cta"})})})]})})})};const dO={"2-1":901},hO=({layout:e="2-1",hideOnMobile:t=!1,className:n="",children:r})=>{const o=Ki(!0);let i=r;return G.Children.count(r)===1&&(i=G.Children.toArray(r)[0],i.props&&(i=i.props.children)),C.jsx("section",{className:se("columns",`layout-${e}`,n),children:G.Children.map(i,(s,a)=>t!==!1&&a===t&&o&&o<dO[e]?null:s)})};const Bs="cookieBanner_",Ms=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],Fs=new Date(Date.now()+12*30*24*60*60*1e3),Qm=()=>{const e=Ie(),[t,n,r]=Cd(Ms),[o,i]=G.useState(!t["apol-cookie-banner"]),s=()=>{Ms.forEach(u=>{n(u,!0,{path:"/",expires:Fs,domain:u==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),i(!1),window.location.reload()},a=()=>{n("apol-cookie-banner",!0,{path:"/",expires:Fs}),Ms.forEach(u=>{if(u==="apol-cookie-banner"){n(u,!0,{path:"/",expires:Fs});return}r(u)}),i(!1)};if(!o)return null;const l=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:a,gtmType:"reject-all"},{id:"accept",onClick:s,gtmType:"accepted-all"}],f=[];return l.forEach(u=>{f.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:`${Bs}buttons_${u.id}`})})}),C.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[C.jsx("h6",{children:e.formatMessage({id:`${Bs}title`})}),C.jsx("p",{children:e.formatMessage({id:`${Bs}text`})}),C.jsx(Xo,{buttons:f})]})};const pO=({options:e,allOption:t=!1,allowMultiple:n=!0,onChange:r=()=>{},className:o=""})=>{const i=Ie(),s=t?[{id:"all",text:typeof t!="boolean"&&t.text||i.formatMessage({id:"filters_all"})},...e]:e,[a,l]=G.useState(t?["all"]:[]),f=(u,h)=>{let d=[];a.includes(u)?d=a.filter(c=>c!==u):u==="all"?d=["all"]:n?d=[...a.filter(c=>c!=="all"),u]:d=[u],l(c=>(r&&typeof r=="function"&&r({current:d,previous:c}),d)),h&&typeof h=="function"&&h()};return C.jsx("ul",{className:se("filters",o),children:s.map(({id:u,text:h,disabled:d=!1,callback:c=()=>{}})=>{let p={};return d&&(p={disabled:!0,"aria-label":i.formatMessage({id:"filters_disabled"},{name:h})}),C.jsx("li",{children:C.jsx("button",{className:se(u,{selected:a.includes(u)}),onClick:m=>{m.preventDefault(),m.stopPropagation(),f(u,c)},...p,children:h})},u)})})};const Us=du({locale:"en",messages:Fu}),mO=({page:e=1,length:t=0,limit:n=10,loadNextPage:r=()=>{},icon:o=!1,messages:i={button:Us.formatMessage({id:"loadMore_button"}),endOfFeed:Us.formatMessage({id:"loadMore_endOfFeed"}),error:Us.formatMessage({id:"loadMore_error"})},className:s="",gtmContext:a="LoadMore"})=>{const[l,f]=G.useState(!1),[u,h]=G.useState(!1);if(t<=0||t<n*e)return null;const d=async c=>{try{await r(c)}catch(p){p instanceof Error&&p.message&&p.message.includes("Cannot read items")?h(!0):f(!0)}};return C.jsxs("footer",{className:se("load-more",s),children:[l&&C.jsx("p",{className:"error",children:i.error}),u?C.jsx("p",{children:i.endOfFeed}):C.jsx(ut,{variant:"secondary",icon:o,onClick:d,"data-gtm-event-context":a,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:i.button})]})};const Ku=({variant:e="default",version:t="default",className:n="",...r})=>C.jsx("p",{className:"logo-wrapper",children:C.jsx("a",{className:se("logo",e,t,n),href:"/home/",...r,children:C.jsx(it,{children:C.jsx(Yr,{id:"apolitical"})})})}),gd={default:"tags_",headerTopics:"header_topics_topics_"},Ds={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"},gO={getTagDetails:e=>{if(e.includes("topic_")){if(e=Ds.topic[e.replace("topic_","")],e){const t=Gi.topics.topics[e].href;return t?{id:e,href:t,text:`${gd.headerTopics}${e}`}:null}return null}return Ds[e]?(e=Ds[e],{id:e,text:`${gd.default}${e}`}):null}};const yO=({tags:e=[],color:t="default",forceOneLine:n=!1,canHaveLinks:r=!0,className:o="",gtmType:i="tag-click",gtmContext:s="tags"})=>{const a=Ie();if(!e||e.length<1)return null;const l=[];return e.forEach(f=>{if(!f)return;const u=gO.getTagDetails(f);u&&l.push(u)}),l.length<1?null:C.jsx("ul",{className:se("tags text-small",t,o,{"one-line":n}),children:l.map(f=>{const u=a.formatMessage({id:f.text});return C.jsx("li",{children:f.href&&r?C.jsx("a",{href:f.href,className:"gtm-trackable","data-gtm-event-type":i,"data-gtm-event-context":s,children:u}):u},f.id)})})},rr={platform:{order:["events","courses","qanda","articles"],events:{href:"/events/",gtmType:"events-click"},courses:{href:"/microcourses/",gtmType:"microcourses-click"},qanda:{href:"/questions-answers/",gtmType:"q-and-a-click"},articles:{href:"/solution-articles/",gtmType:"articles-click"}},community:{order:["support","post","join","guidelines"],support:{name:"Support FAQ",href:"/pages/support-faq",gtmType:"support-faq-click"},post:{href:"/pages/post-an-article",gtmType:"post-an-article-click"},join:{href:"/pages/who-can-join-the-community",gtmType:"who-can-join-click"},guidelines:{href:"/pages/values-and-guidelines",gtmType:"guidelines-and-values-click"}},company:{order:["story","team","careers","partner","contact"],story:{href:"/pages/our-story",gtmType:"our-story-click"},team:{href:"/pages/meet-our-team",gtmType:"team-click"},careers:{href:"/pages/careers",gtmType:"careers-click"},partner:{href:"/partnerships/",gtmType:"partner-with-us-click"},contact:{href:"/pages/get-in-touch",gtmType:"contact-click"},child:"legal"},legal:{order:["privacy","terms","cookie","accessibility"],privacy:{href:"https://about.apolitical.co/privacy-policy",gtmType:"privacy-policy-link"},terms:{href:"https://about.apolitical.co/terms-and-conditions",gtmType:"terms-conditions-link"},cookie:{href:"/pages/cookie-policy",gtmType:"cookie-policy-link"},accessibility:{href:"/pages/accessibility-statement",gtmType:"accessibility-link"},text:{order:["dataProtection","euDataProtection"],dataProtection:{email:"dpo@apolitical.co",gtmType:"email-dpo-link"},euDataProtection:{email:"dpo.agl@apolitical.foundation",gtmType:"email-eu-dpo-link"}}},contact:{text:{order:["correspondence","registered","berlin","support","business"],correspondence:{address:!0},registered:{address:!0},berlin:{address:!0},support:{email:"concierge@apolitical.co",gtmType:"concierge-email-click"},business:{email:"hello@apolitical.co",gtmType:"hello-email-click"}}},social:{order:["linkedin","twitter","facebook"],linkedin:{href:"https://www.linkedin.com/company/apolitical"},twitter:{href:"https://twitter.com/apoliticalco"},facebook:{href:"https://www.facebook.com/apoliticalco"}}};const Sn="footer_",Ho="SiteFooter",yd=({group:e})=>{const t=rr[e].order||[];let n=!1;return"text"in rr[e]&&(n=rr[e].text),C.jsxs(G.Fragment,{children:[C.jsx("p",{className:"pre-title",children:C.jsx(Yr,{id:`${Sn}${e}`})}),Array.isArray(t)&&t.length>0&&C.jsx("ul",{className:"text-medium",children:t.map(r=>{if(["order","child","text"].includes(r))return null;const{href:o,gtmType:i}=rr[e][r],s={};return["legal"].includes(e)&&(s.target="_blank",s.rel="noopener"),C.jsx("li",{children:C.jsx("a",{href:o,className:"gtm-trackable","data-gtm-event-context":Ho,"data-gtm-event-type":i,...s,children:C.jsx(Yr,{id:`${Sn}${e}_${r}`})})},`${e}_${r}`)})}),typeof n!="boolean"&&"order"in n&&Array.isArray(n.order)&&C.jsx("dl",{className:"text-medium",children:n.order.map(r=>C.jsxs(G.Fragment,{children:[C.jsx("dt",{children:C.jsx(Yr,{id:`${Sn}${e}_${r}`})}),C.jsxs("dd",{children:[typeof n!="boolean"&&n[r].address&&C.jsx("address",{children:C.jsx(Yr,{id:`${Sn}${e}_${r}_address`,values:{br:C.jsx("br",{})}})}),typeof n!="boolean"&&n[r].email&&C.jsx("a",{href:`mailto:${n[r].email}`,className:"gtm-trackable","data-gtm-event-context":Ho,"data-gtm-event-type":n[r].gtmType,children:n[r].email})]})]},`dl-${e}-${r}`))})]},e)},Qu=()=>C.jsx("div",{id:"footer",children:C.jsxs("div",{className:"wrapper",children:[C.jsx(Eu,{element:"hr"}),C.jsx(Ku,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":Ho,"data-gtm-event-type":"logo-homepage-link"}),C.jsx("footer",{children:["platform","community","company","contact"].map(e=>C.jsxs("div",{className:"group",children:[C.jsx(yd,{group:e}),Object.keys(rr[e]).includes("child")&&C.jsx(yd,{group:rr[e].child})]},e))}),C.jsx("hr",{}),C.jsxs("div",{className:"sub-footer",children:[C.jsx("ul",{children:Array.isArray(rr.social.order)&&rr.social.order.map(e=>{const t=rr.social[e];return C.jsx("li",{className:e,children:C.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":Ho,"data-gtm-event-type":"social-click",children:C.jsx("span",{className:"hidden",children:C.jsx(Yr,{id:`${Sn}social_${e}`})})})},e)})}),C.jsx("small",{children:C.jsx(Yr,{id:`${Sn}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});var vO="Expected a function",Xm="__lodash_hash_undefined__",Jm=1/0,EO="[object Function]",_O="[object GeneratorFunction]",bO="[object Symbol]",wO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,SO=/^\w*$/,TO=/^\./,OO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xO=/[\\^$.*+?()[\]{}|]/g,AO=/\\(\\)?/g,CO=/^\[object .+?Constructor\]$/,RO=typeof ae=="object"&&ae&&ae.Object===Object&&ae,PO=typeof self=="object"&&self&&self.Object===Object&&self,Xu=RO||PO||Function("return this")();function IO(e,t){return e==null?void 0:e[t]}function NO(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var LO=Array.prototype,kO=Function.prototype,Zm=Object.prototype,$s=Xu["__core-js_shared__"],vd=function(){var e=/[^.]+$/.exec($s&&$s.keys&&$s.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),eg=kO.toString,Ju=Zm.hasOwnProperty,tg=Zm.toString,BO=RegExp("^"+eg.call(Ju).replace(xO,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ed=Xu.Symbol,MO=LO.splice,FO=rg(Xu,"Map"),qi=rg(Object,"create"),_d=Ed?Ed.prototype:void 0,bd=_d?_d.toString:void 0;function Zr(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function UO(){this.__data__=qi?qi(null):{}}function DO(e){return this.has(e)&&delete this.__data__[e]}function $O(e){var t=this.__data__;if(qi){var n=t[e];return n===Xm?void 0:n}return Ju.call(t,e)?t[e]:void 0}function jO(e){var t=this.__data__;return qi?t[e]!==void 0:Ju.call(t,e)}function HO(e,t){var n=this.__data__;return n[e]=qi&&t===void 0?Xm:t,this}Zr.prototype.clear=UO;Zr.prototype.delete=DO;Zr.prototype.get=$O;Zr.prototype.has=jO;Zr.prototype.set=HO;function Mn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qO(){this.__data__=[]}function GO(e){var t=this.__data__,n=ta(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():MO.call(t,n,1),!0}function WO(e){var t=this.__data__,n=ta(t,e);return n<0?void 0:t[n][1]}function VO(e){return ta(this.__data__,e)>-1}function zO(e,t){var n=this.__data__,r=ta(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Mn.prototype.clear=qO;Mn.prototype.delete=GO;Mn.prototype.get=WO;Mn.prototype.has=VO;Mn.prototype.set=zO;function rn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function YO(){this.__data__={hash:new Zr,map:new(FO||Mn),string:new Zr}}function KO(e){return ra(this,e).delete(e)}function QO(e){return ra(this,e).get(e)}function XO(e){return ra(this,e).has(e)}function JO(e,t){return ra(this,e).set(e,t),this}rn.prototype.clear=YO;rn.prototype.delete=KO;rn.prototype.get=QO;rn.prototype.has=XO;rn.prototype.set=JO;function ta(e,t){for(var n=e.length;n--;)if(cx(e[n][0],t))return n;return-1}function ZO(e,t){t=nx(t,e)?[t]:rx(t);for(var n=0,r=t.length;e!=null&&n<r;)e=e[sx(t[n++])];return n&&n==r?e:void 0}function ex(e){if(!ig(e)||ox(e))return!1;var t=lx(e)||NO(e)?BO:CO;return t.test(ux(e))}function tx(e){if(typeof e=="string")return e;if(ec(e))return bd?bd.call(e):"";var t=e+"";return t=="0"&&1/e==-Jm?"-0":t}function rx(e){return ng(e)?e:ax(e)}function ra(e,t){var n=e.__data__;return ix(t)?n[typeof t=="string"?"string":"hash"]:n.map}function rg(e,t){var n=IO(e,t);return ex(n)?n:void 0}function nx(e,t){if(ng(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ec(e)?!0:SO.test(e)||!wO.test(e)||t!=null&&e in Object(t)}function ix(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ox(e){return!!vd&&vd in e}var ax=Zu(function(e){e=dx(e);var t=[];return TO.test(e)&&t.push(""),e.replace(OO,function(n,r,o,i){t.push(o?i.replace(AO,"$1"):r||n)}),t});function sx(e){if(typeof e=="string"||ec(e))return e;var t=e+"";return t=="0"&&1/e==-Jm?"-0":t}function ux(e){if(e!=null){try{return eg.call(e)}catch{}try{return e+""}catch{}}return""}function Zu(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(vO);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s),s};return n.cache=new(Zu.Cache||rn),n}Zu.Cache=rn;function cx(e,t){return e===t||e!==e&&t!==t}var ng=Array.isArray;function lx(e){var t=ig(e)?tg.call(e):"";return t==EO||t==_O}function ig(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function fx(e){return!!e&&typeof e=="object"}function ec(e){return typeof e=="symbol"||fx(e)&&tg.call(e)==bO}function dx(e){return e==null?"":tx(e)}function hx(e,t,n){var r=e==null?void 0:ZO(e,t);return r===void 0?n:r}var px=hx;const og=jt(px),Re={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const n={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},r=i=>{const s=`logged${e?"In":"Out"}`;return t>=n[i][s]};let o={};return["navigation","search"].forEach(i=>{o[i]=r(i)}),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&&Re.handlerCalled[e]&&o-Re.handlerCalled[e]<500)return;Re.handlerCalled[e]=o;let i=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(n).forEach(s=>{s===e||n[s]===!1||i.push({type:`menus.${s}`,value:!1})}),r(i)},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=og(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?Re.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 i=n?"desktop":"default";if(r[e][i]){r[e][i].focus();return}let s,a;switch(e){case"navigation":if(n){const l=Re.findFirstChild(t.current.children,"attributes.aria-controls","navigation");s=Re.findFirstChild(l.children,"href")}else s=Re.findFirstChild(t.current.children,"href");s||(s=t.current);break;case"account":if(a=Re.findFirstChild(t.current.children,"className","account"),!a||!a.children)return;s=Re.findFirstChild(a.children,"href");break;default:return}s&&(o([{type:`focusElements.${e}.${i}`,value:s}]),s.focus())},events:{onClick:(e,{id:t,callback:n,isOpen:r})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(Re.timeouts[t]),n(t,!r))},onFocus:({id:e})=>{clearTimeout(Re.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(Re.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{Re.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},Gi={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"}}}},qo=({id:e,isLoggedIn:t=!1,isDesktopVersion:n=!1,menus:r={},callback:o=()=>{},doTrack:i=null})=>{const s=Ie(),a=og(Gi,e);if(!a||a.onlyShow&&(a.onlyShow==="logged-in"&&!t||a.onlyShow==="logged-out"&&t))return null;const l="doTrack"in a,f=i===null?l?a.doTrack:!0:i,u=e.includes("buttons.");let h=`header_${e.replaceAll(".","_")}`;a.hasVariantText&&(h+=`_logged${t?"In":"Out"}`);let d=!1;if(a.href){let E=a.gtmType||`${e}-click`;if(E.includes(".")){const b=E.split("."),A=b[b.length-2];E=`${A==="topics"?`${A}-`:""}${b[b.length-1]}`}d={href:a.href,role:"menuitem"},f&&(d={...d,className:"gtm-trackable","data-gtm-event-type":E,"data-gtm-event-context":"HeaderButtons"}),u&&(d={...d,variant:"secondary",size:{mobile:"small",881:"large"},...a.props||{}})}const c=a.order&&a.order[0]&&a[a.order[0]],p=c&&a[a.order[0]].order,m=d&&typeof window<"u"&&window.location&&window.location.pathname===a.href;let _={},T={};if(c){const E=a.menuId||e,b={onClick:A=>Re.events.onClick(A,{id:E,callback:o,isOpen:r[E]}),onFocus:()=>Re.events.onFocus({id:E}),onBlur:()=>Re.events.onBlur({id:E,callback:o}),onMouseLeave:()=>Re.events.onBlur({id:E,callback:o}),onMouseEnter:()=>Re.events.onMouseEnter({id:E,callback:o})};n&&(p&&(_={...b,onKeyPress:A=>{A.key==="Enter"&&Re.events.onClick(A,{id:E,callback:o,isOpen:r[E]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":r[E],"aria-controls":E}),T={hidden:E in r?!r[E]:!0}),p||(T={...T,...b})}return C.jsxs("li",{className:se({[a.className]:a.className,"has-submenu":c,parent:p,active:m}),role:"none",..._,children:[d?G.createElement(u?ut:"a",d,s.formatMessage({id:h})):s.formatMessage({id:h}),a.order&&C.jsx("ul",{...T,children:a.order.map(E=>{if(!a[E])return null;const b={isLoggedIn:t,isDesktopVersion:n,menus:r,callback:o,doTrack:l?f:null};return a[E].order?C.jsxs("li",{className:se({[a[E].className]:a[E].className}),children:[s.formatMessage({id:`${h}_${E}`}),C.jsx("ul",{children:a[E].order.map(A=>C.jsx(qo,{id:`${e}.${E}.${A}`,...b},A))})]},E):C.jsx(qo,{id:`${e}.${E}`,...b},E)})})]},e)};const mx={height:67,height_desktop:83},tc=()=>{const e=Ie(),t=G.useContext(Bn),n=Ki(!0,!0),r=t&&typeof t.id=="string",o=G.useMemo(()=>Re.getIsDesktopVersion(r,n),[r,n]),[i,s]=G.useReducer(kb,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:a,menus:l,focusElements:f}=i;Sp({scrollPosition:mx[`height${o.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!o&&l.navigation||Re.shouldChangeHeaderIsVisible(!0,l,s)},scrollDown:()=>{!o&&l.navigation||Re.shouldChangeHeaderIsVisible(!1,l,s)}}});const u=(d,c)=>{Re.handleMenus({id:d,value:c,menus:l,dispatch:s})},h=G.useRef(null);return Io(()=>{l.navigation&&Re.autoFocus({menu:"navigation",navigationRef:h,isDesktopVersion:o.navigation,focusElements:f,dispatch:s})},[l.navigation]),Io(()=>{l.account&&Re.autoFocus({menu:"account",navigationRef:h,isDesktopVersion:o.navigation,focusElements:f,dispatch:s})},[l.account]),t&&t.isLoading?null:C.jsxs(C.Fragment,{children:[C.jsxs("nav",{id:"header",className:se({"logged-in":r,"logged-out":!r,visible:a}),children:[C.jsx(it,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),C.jsx(Ku,{}),!o.navigation&&C.jsx("button",{className:"menu-button gtm-trackable",onClick:d=>{d.preventDefault(),d.stopPropagation(),u("navigation",!l.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":l.navigation,"aria-controls":"navigation",children:C.jsx(it,{children:e.formatMessage({id:`header_menu_${l.navigation?"hide":"show"}`})})}),C.jsx("ul",{ref:h,id:"navigation",hidden:o.navigation||l.account?!1:!l.navigation,role:"menu","data-showing":!o.navigation&&l.account?"account":"default",children:Gi.order.map(d=>C.jsx(qo,{id:d,isLoggedIn:r,isDesktopVersion:o.navigation,menus:{navigation:l.navigation,account:l.account},callback:u},d))}),!o.search&&C.jsx("button",{className:"search toggle-search-button",onClick:d=>{d.preventDefault(),d.stopPropagation(),u("search",!l.search)},"aria-haspopup":"true","aria-expanded":l.search,"aria-controls":"search-form",children:C.jsx(it,{children:e.formatMessage({id:`header_search_${l.search?"hide":"show"}`})})}),C.jsx(Km,{id:"global-search",handleToggle:{searchIsOpen:l.search,isDesktopVersion:o.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),r?C.jsxs("button",{className:"account-button",onClick:d=>Re.events.onClick(d,{id:"account",callback:u,isOpen:l.account}),onMouseEnter:()=>Re.events.onMouseEnter({id:"account",callback:u}),onMouseLeave:()=>Re.events.onBlur({id:"account",callback:u}),"aria-haspopup":"true","aria-expanded":l.account,"aria-controls":"navigation",children:[C.jsx(it,{children:e.formatMessage({id:`header_account_${l.account?"hide":"show"}`})}),C.jsx(ea,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):C.jsx("ul",{className:"sign-in-buttons",children:Gi.buttons.order.map(d=>C.jsx(qo,{id:`buttons.${d}`},d))})]}),C.jsx("hr",{id:"content-of-page"}),C.jsx("div",{className:se("overlay",{open:l.navigation||l.account||!o.search&&l.search})})]})},gx=G.createContext(null),js={didCatch:!1,error:null};class yx extends G.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=js}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(js)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&vx(t.resetKeys,o)){var i,s;(i=(s=this.props).onReset)===null||i===void 0||i.call(s,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(js)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:s}=this.state;let a=t;if(i){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(G.isValidElement(o))a=o;else if(typeof n=="function")a=n(l);else if(r)a=G.createElement(r,l);else throw s}return G.createElement(gx.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function vx(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}const Ex=()=>{const e=Ie();return C.jsxs(C.Fragment,{children:[C.jsx(tc,{}),C.jsx("div",{className:"content",children:C.jsx(Lm,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),C.jsx(Qu,{})]})},_x=({children:e,reportError:t,showFooter:n=!0,background:r="default",className:o="",locale:i="en"})=>{const s=Db(e,{locale:i});return C.jsx(yx,{onError:t,fallback:C.jsx(Ex,{}),children:C.jsx(G.Suspense,{fallback:C.jsx(Dm,{layout:"overview-page"}),children:C.jsx("div",{id:"wrapper",className:se(o,{[r]:r!=="default"}),children:C.jsxs(Cg,{children:[C.jsx(tc,{}),C.jsx("div",{className:"content",children:s}),n&&C.jsx(Qu,{}),C.jsx(Qm,{})]})})})})};const bx=({children:e,className:t})=>C.jsx("section",{className:se("modal",t),children:typeof e=="string"?C.jsx("p",{children:e}):e});exports.ASSETS_BUCKET=$o;exports.Alert=hu;exports.BannerSection=zb;exports.Button=ut;exports.ButtonWrapper=Xo;exports.CollapsibleSection=qu;exports.Columns=hO;exports.CommunityDetails=FT;exports.Contributors=jm;exports.ConversationContext=Yu;exports.CookieBanner=Qm;exports.DiscussionConversation=DT;exports.DiscussionForm=Gm;exports.DiscussionLikes=Wm;exports.DiscussionPost=aO;exports.DownloadSection=qb;exports.EmailHelperTextBox=sO;exports.EmptyStateBox=Lm;exports.Filters=pO;exports.Footer=Qu;exports.FullWidthSection=Uu;exports.Header=tc;exports.HelperTextBox=Bm;exports.HiddenFromScreenReaders=Eu;exports.HideShowTextBox=bT;exports.HighlightedTextBox=nr;exports.IntlProvider=BT;exports.JoinButton=Hm;exports.Link=kp;exports.LoadMore=mO;exports.LoadingBlock=NT;exports.LoadingPlaceholder=vr;exports.LoadingState=Dm;exports.Logo=Ku;exports.LogoSection=Gb;exports.MarkdownText=Mm;exports.MarketingBox=Yb;exports.Member=zu;exports.Modal=bx;exports.NUMBER_OF_USERS=yS;exports.PageLayout=_x;exports.PasswordRules=lO;exports.Pill=RT;exports.ProfilePicture=ea;exports.ProgressBar=Fm;exports.Rating=fO;exports.ResponsiveImage=Bp;exports.SearchForm=Km;exports.Tags=yO;exports.UserContext=Bn;exports.UserProvider=MT;exports.VisuallyHidden=it;exports.getMember=Vu;exports.headerData=Gi;exports.useEffectAfterMount=Io;exports.useFeatureFlag=R_;exports.useScreenWidth=Ki;exports.useScrollListener=Sp;
97
+ `,{_:p}));for(;typeof m[m.length-1]=="string"&&!m[m.length-1].trim();)m.pop();if(t.wrapper===null)return m;const E=t.wrapper||(p?"span":"div");let T;if(m.length>1||t.forceWrapper)T=m;else{if(m.length===1)return T=m[0],typeof T=="string"?r("span",{key:"outer"},T):T;T=null}return xe.createElement(E,{key:"outer"},T)}function i(u){const p=u.match(CS);return p?p.reduce(function(m,E,T){const _=E.indexOf("=");if(_!==-1){const b=function(F){return F.indexOf("-")!==-1&&F.match(HS)===null&&(F=F.replace(zS,function(B,W){return W.toUpperCase()})),F}(E.slice(0,_)).trim(),A=function(F){const B=F[0];return(B==='"'||B==="'")&&F.length>=2&&F[F.length-1]===B?F.slice(1,-1):F}(E.slice(_+1).trim()),w=od[b]||b,P=m[w]=function(F,B){return F==="style"?B.split(/;\s?/).reduce(function(W,G){const V=G.slice(0,G.indexOf(":"));return W[V.replace(/(-[a-z])/g,H=>H[1].toUpperCase())]=G.slice(V.length+1).trim(),W},{}):F==="href"?bn(B):(B.match(qS)&&(B=B.slice(1,B.length-1)),B==="true"||B!=="false"&&B)}(b,A);typeof P=="string"&&(vc.test(P)||_c.test(P))&&(m[w]=xe.cloneElement(o(P.trim()),{key:T}))}else E!=="style"&&(m[od[E]||E]=!0);return m},{}):null}const s=[],a={},l={blockQuote:{t:er(Em),i:ve.HIGH,l:(u,p,m)=>({v:p(u[0].replace(PS,""),m)}),h:(u,p,m)=>r("blockquote",{key:m.k},p(u.v,m))},breakLine:{t:Fi(IS),i:ve.HIGH,l:ks,h:(u,p,m)=>r("br",{key:m.k})},breakThematic:{t:er(LS),i:ve.HIGH,l:ks,h:(u,p,m)=>r("hr",{key:m.k})},codeBlock:{t:er(wm),i:ve.MAX,l:u=>({v:u[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(u,p,m)=>r("pre",{key:m.k},r("code",Kr({},u.O,{className:u.M?`lang-${u.M}`:""}),u.v))},codeFenced:{t:er(bm),i:ve.MAX,l:u=>({O:i(u[3]||""),v:u[4],M:u[2]||void 0,type:"codeBlock"})},codeInline:{t:mr(kS),i:ve.LOW,l:u=>({v:u[2]}),h:(u,p,m)=>r("code",{key:m.k},u.v)},footnote:{t:er(FS),i:ve.MAX,l:u=>(s.push({I:u[2],j:u[1]}),{}),h:Ms},footnoteReference:{t:pr(US),i:ve.HIGH,l:u=>({v:u[1],B:`#${t.slugify(u[1])}`}),h:(u,p,m)=>r("a",{key:m.k,href:bn(u.B)},r("sup",{key:m.k},u.v))},gfmTask:{t:pr($S),i:ve.HIGH,l:u=>({R:u[1].toLowerCase()==="x"}),h:(u,p,m)=>r("input",{checked:u.R,key:m.k,readOnly:!0,type:"checkbox"})},heading:{t:er(t.enforceAtxHeadings?Tm:Sm),i:ve.HIGH,l:(u,p,m)=>({v:ko(p,u[2],m),T:t.slugify(u[2]),C:u[1].length}),h:(u,p,m)=>r(`h${u.C}`,{id:u.T,key:m.k},p(u.v,m))},headingSetext:{t:er(xm),i:ve.MAX,l:(u,p,m)=>({v:ko(p,u[1],m),C:u[2]==="="?1:2,type:"heading"})},htmlComment:{t:Fi(Om),i:ve.HIGH,l:()=>({}),h:Ms},image:{t:mr(_T),i:ve.HIGH,l:u=>({D:u[1],B:fd(u[2]),F:u[3]}),h:(u,p,m)=>r("img",{key:m.k,alt:u.D||void 0,title:u.F||void 0,src:bn(u.B)})},link:{t:pr(vT),i:ve.LOW,l:(u,p,m)=>({v:xT(p,u[1],m),B:fd(u[2]),F:u[3]}),h:(u,p,m)=>r("a",{key:m.k,href:bn(u.B),title:u.F},p(u.v,m))},linkAngleBraceStyleDetector:{t:pr(VS),i:ve.MAX,l:u=>({v:[{v:u[1],type:"text"}],B:u[1],type:"link"})},linkBareUrlDetector:{t:(u,p)=>p.N?null:pr(GS)(u,p),i:ve.MAX,l:u=>({v:[{v:u[1],type:"text"}],B:u[1],F:void 0,type:"link"})},linkMailtoDetector:{t:pr(WS),i:ve.MAX,l(u){let p=u[1],m=u[1];return RS.test(m)||(m="mailto:"+m),{v:[{v:p.replace("mailto:",""),type:"text"}],B:m,type:"link"}}},orderedList:cd(r,1),unorderedList:cd(r,2),newlineCoalescer:{t:er(MS),i:ve.LOW,l:ks,h:()=>`
98
+ `},paragraph:{t:TT,i:ve.LOW,l:Ls,h:(u,p,m)=>r("p",{key:m.k},p(u.v,m))},ref:{t:pr(YS),i:ve.MAX,l:u=>(a[u[1]]={B:u[2],F:u[4]},{}),h:Ms},refImage:{t:mr(KS),i:ve.MAX,l:u=>({D:u[1]||void 0,P:u[2]}),h:(u,p,m)=>r("img",{key:m.k,alt:u.D,src:bn(a[u.P].B),title:a[u.P].F})},refLink:{t:pr(QS),i:ve.MAX,l:(u,p,m)=>({v:p(u[1],m),Z:p(u[0].replace(XS,"\\$1"),m),P:u[2]}),h:(u,p,m)=>a[u.P]?r("a",{key:m.k,href:bn(a[u.P].B),title:a[u.P].F},p(u.v,m)):r("span",{key:m.k},p(u.Z,m))},table:{t:er(Am),i:ve.HIGH,l:ST,h:(u,p,m)=>r("table",{key:m.k},r("thead",null,r("tr",null,u.L.map(function(E,T){return r("th",{key:T,style:ld(u,T)},p(E,m))}))),r("tbody",null,u.A.map(function(E,T){return r("tr",{key:T},E.map(function(_,b){return r("td",{key:b,style:ld(u,b)},p(_,m))}))})))},tableSeparator:{t:function(u,p){return p.$?(p._=!0,eT.exec(u)):null},i:ve.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:Fi(fT),i:ve.MIN,l:u=>({v:u[0].replace(jS,(p,m)=>t.namedCodesToUnicode[m]?t.namedCodesToUnicode[m]:p)}),h:u=>u.v},textBolded:{t:mr(aT),i:ve.MED,l:(u,p,m)=>({v:p(u[2],m)}),h:(u,p,m)=>r("strong",{key:m.k},p(u.v,m))},textEmphasized:{t:mr(sT),i:ve.LOW,l:(u,p,m)=>({v:p(u[2],m)}),h:(u,p,m)=>r("em",{key:m.k},p(u.v,m))},textEscaped:{t:mr(lT),i:ve.HIGH,l:u=>({v:u[1],type:"text"})},textMarked:{t:mr(cT),i:ve.LOW,l:Ls,h:(u,p,m)=>r("mark",{key:m.k},p(u.v,m))},textStrikethroughed:{t:mr(uT),i:ve.LOW,l:Ls,h:(u,p,m)=>r("del",{key:m.k},p(u.v,m))}};t.disableParsingRawHTML!==!0&&(l.htmlBlock={t:Fi(vc),i:ve.HIGH,l(u,p,m){const[,E]=u[3].match(hT),T=new RegExp(`^${E}`,"gm"),_=u[3].replace(T,""),b=(A=_,ET.some(B=>B.test(A))?OT:ko);var A;const w=u[1].toLowerCase(),P=AS.indexOf(w)!==-1;m.N=m.N||w==="a";const F=P?u[3]:b(p,_,m);return m.N=!1,{O:i(u[2]),v:F,G:P,H:P?w:u[1]}},h:(u,p,m)=>r(u.H,Kr({key:m.k},u.O),u.G?u.v:p(u.v,m))},l.htmlSelfClosing={t:Fi(_c),i:ve.HIGH,l:u=>({O:i(u[2]||""),H:u[1]}),h:(u,p,m)=>r(u.H,Kr({},u.O,{key:m.k}))});const f=function(u){let p=Object.keys(u);function m(E,T){let _=[],b="";for(;E;){let A=0;for(;A<p.length;){const w=p[A],P=u[w],F=P.t(E,T,b);if(F){const B=F[0];E=E.substring(B.length);const W=P.l(F,m,T);W.type==null&&(W.type=w),_.push(W),b=B;break}A++}}return _}return p.sort(function(E,T){let _=u[E].i,b=u[T].i;return _!==b?_-b:E<T?-1:1}),function(E,T){return m(function(_){return _.replace(BS,`
99
+ `).replace(DS,"").replace(ZS," ")}(E),T)}}(l),c=(h=function(u){return function(p,m,E){return u[p.type].h(p,m,E)}}(l),function u(p,m={}){if(Array.isArray(p)){const E=m.k,T=[];let _=!1;for(let b=0;b<p.length;b++){m.k=b;const A=u(p[b],m),w=typeof A=="string";w&&_?T[T.length-1]+=A:A!==null&&T.push(A),_=w}return m.k=E,T}return h(p,u,m)});var h;const d=o(e);return s.length?r("div",null,d,r("footer",{key:"footer"},s.map(function(u){return r("div",{id:t.slugify(u.j),key:u.j},u.j,c(f(u.I,{_:!0})))}))):d}(function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"})(ve||(ve={}));const na=e=>{let{children:t,options:n}=e,r=function(o,i){if(o==null)return{};var s,a,l={},f=Object.keys(o);for(a=0;a<f.length;a++)i.indexOf(s=f[a])>=0||(l[s]=o[s]);return l}(e,OS);return xe.cloneElement(CT(t,n),r)};const or=({variant:e="primary",className:t="",children:n,...r})=>O.jsx("div",{className:se("highlighted-text-box",e,t),...r,children:n});const Dm=({variant:e="empty",text:t=!1,button:n=!1,className:r=""})=>{let o=n&&!!Object.keys(n).length;const i=typeof n=="object"&&"breakpoints"in n,s=Xi(i);if(i&&typeof n=="object"&&typeof s=="number"){const c=Object.assign({},n.breakpoints),h=Fp(Object.keys(c));o=Up(s,h,c)}const{breakpoints:a,text:l,...f}=n;return O.jsx(or,{variant:"subtle",className:se("empty-state-box",e,r),children:O.jsxs(O.Fragment,{children:[t&&O.jsx(na,{options:{forceBlock:!0},children:t}),o&&typeof n=="object"&&O.jsx(De,{...f,variant:n.variant?n.variant:"secondary",children:l})]})})};const Ec=({children:e,...t})=>O.jsx("p",{...t,children:e}),$m={q:Ec,blockquote:Ec};for(let e=1;e<=6;e++)$m[`h${e}`]={component:Ec,props:{className:"title"}};const jm=({type:e="default",className:t="",heading:n=!1,children:r})=>O.jsxs("div",{className:se("helper-text-box text-small",e,t),children:[n&&O.jsx("p",{className:"title",children:n}),typeof r=="string"?O.jsx(na,{options:{wrapper:$.Fragment,forceBlock:!0,overrides:$m},children:r}):O.jsx("p",{children:r})]});const RT=({className:e="",show:t=!1,hide:n=!1,text:r,children:o})=>{const i=Re(),s=$.useRef(null),[a,l]=$.useState(""),[f,c]=$.useState("closed");$.useEffect(()=>{const u=s.current;if(u)return u.addEventListener("transitionend",h),()=>{u.removeEventListener("transitionend",h)}},[]),$.useEffect(()=>{if(!r||typeof r!="string")return;const u=r.split(`
100
+ `);l(u.length<3?`${r.substring(0,400)}...`:u.slice(0,3).join(`
101
+ `))},[r]),$.useEffect(()=>{f==="ready-to-close"&&c("closing")},[f]);const h=({propertyName:u})=>{u==="max-height"&&c(p=>p==="opening"?"open":p==="closing"?"closed":p)};if(!r)return null;const d=["opening","open"].includes(f);return O.jsxs(or,{variant:"subtle",className:se("hide-show-text-box",e),children:[O.jsxs("div",{ref:s,className:se("content",f),children:[O.jsx(na,{options:{forceBlock:!0},children:f==="closed"?a:r}),f!=="closed"&&o]}),O.jsx("p",{className:"cta",children:O.jsx(De,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:se({"rotate-180":d}),onClick:()=>{c(d?"ready-to-close":"opening")},children:d?n||i.formatMessage({id:"hideShowTextBox_hide"}):t||i.formatMessage({id:"hideShowTextBox_show"})})})]})},NT=()=>$.Fragment,PT=({children:e})=>O.jsx(or,{variant:"secondary",children:e}),IT=["span","strong","h1","h2","h3","h4","h5","h6","p"],LT=({children:e})=>{const t=Re();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const i of $.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number"))if($.isValidElement(i)&&i.type==="summary"){if(i.props&&i.props.children){for(const s of $.Children.toArray(i.props.children))if(!(!s||typeof s=="string"||typeof s=="number")&&$.isValidElement(s)){const a=s.type;if(IT.includes(a)){for(n=s.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(i);const o=n?n.toString():"";return O.jsx(Yc,{label:o,className:["Sources","Resources"].includes(o)?"discrete-links":"",children:r.map(i=>i)})},kT=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return O.jsx(or,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return O.jsx(or,{variant:"primary",children:e});case"pink-textbox":return O.jsx(or,{variant:"tertiary",children:e});default:return O.jsx("div",{...t,children:e})}return O.jsx("div",{...t,children:e})},MT=e=>{const t=Re(),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"),O.jsxs(O.Fragment,{children:[O.jsx(ot,{children:O.jsx("a",{href:`#content-after-iframe-${n}`,children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})})}),O.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),O.jsx("span",{id:`content-after-iframe-${n}`,tabIndex:-1})]})},dd=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},BT=({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 i of $.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number")&&$.isValidElement(i)){const s=i.type;if(["button","center","span","strong"].includes(s)&&i.props&&i.props.children&&i.props.children[0])for((s==="button"||dd(i.props.children[0])==="button")&&(o=!0),r=i.props.children[0];r&&typeof r!="string"&&!(typeof r=="boolean"||typeof r=="number"||!$.isValidElement(r));)if(r.props&&r.props.children&&r.props.children[0])r=r.props.children[0],r&&dd(r)==="button"&&(o=!0);else break}return o?(n={...n,className:"button primary medium"},O.jsx("p",{className:"center",children:O.jsx(De,{variant:"primary",size:"medium",...n,children:r})})):O.jsx("a",{...n,children:r})};const bc=({className:e="",options:t={},children:n})=>{n=n.replace(/^<br\/?>/,"");const r={wrapper:$.Fragment,forceBlock:!0,overrides:{a:BT,CollapsibleSection:Yc,TextBox:or,CaseStudy:PT,style:NT,details:LT,div:kT,iframe:MT}};return O.jsx("div",{className:se("markdown-text",e),children:O.jsx(na,{options:{...r,...t},children:n})})};const FT=({className:e="",children:t})=>O.jsx("span",{className:se("pill",e),children:t});const Wo=({element:e="p",children:t=null,className:n="",...r})=>$.createElement(e,{...r,className:se("status-banner text-small",n),"aria-live":"assertive"},t);const UT=({progress:e=0,text:t=!1,className:n=""})=>{const r=Re(),o=e>75?100:e>50?75:e>25?50:e>5?25:0,i={"--progress":`${e}%`};return O.jsx("span",{className:se(`progress-bar section-${o}`,n),style:i,children:O.jsx(ot,{children:t?`${e} ${t}`:r.formatMessage({id:"progressBar"},{number:e})})})},Hm=$.memo(UT);const Fs="loadingBlock_",DT=({progress:e=0,steps:t=!1,className:n=""})=>{const r=Re();t||(t={0:{text:r.formatMessage({id:`${Fs}loading`})},75:{text:r.formatMessage({id:`${Fs}almostDone`})},100:{text:r.formatMessage({id:`${Fs}complete`})}});let o=null;const i=Object.keys(t);for(let a=0;a<i.length&&!(e<parseInt(i[a]));a++)o=i[a];const s=o&&t[o].icon?{"--icon":`url(${Go}icons/${t[o].icon}.svg)`}:{};return O.jsxs(or,{className:se("loading-block",n,{"has-icon":o&&t[o].icon}),variant:"subtle",style:s,children:[o&&O.jsx("span",{className:"step",children:t[o].text}),O.jsx(Hm,{progress:e})]})},$T=$.memo(DT);const Er=({element:e="div",className:t="",...n})=>O.jsx(Tc,{element:e,className:se("loading-placeholder",t),...n});const wc={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"]},qm=(e,t)=>e in wc?O.jsx("div",{className:e,children:wc[e].map((n,r)=>qm(n,r))},t):O.jsx(Er,{className:e},t),Gm=({layout:e="overview-page"})=>O.jsx("div",{className:se("loading-state",e),children:wc[e].map((t,n)=>qm(t,n))}),Wm=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):""},Ao=["#5AB6A3","#A2D7AF","#806056","#3962B3"],jT=e=>{const t=Math.ceil(26/Ao.length),n=Wm(e).toLowerCase();if(n==="")return Ao[0];const r=n.charCodeAt(0)-96;for(let o=0;o<Ao.length;o++)if(r<=t*(o+1))return Ao[o]};const hd=256,ia=({className:e="",src:t="",name:n,alt:r,width:o=hd,height:i=hd,...s})=>{const[a,l]=$.useState(!1),f=$.useRef(null);return $.useEffect(()=>{const c=f.current;if(!c)return;const h=c.getContext("2d");if(!h)return;const d=o,u=i;typeof window<"u"&&window.devicePixelRatio&&(c.width=d*window.devicePixelRatio,c.height=u*window.devicePixelRatio,h.scale(window.devicePixelRatio,window.devicePixelRatio)),h.fillStyle=jT(n),h.fillRect(0,0,d,u),h.font=`${d/3}px Arial`,h.textAlign="center",h.fillStyle="white",h.fillText(Wm(n),d/2,u/1.6)},[n]),O.jsxs("figure",{className:se("profile-picture",e,{error:a}),...s,children:[t!==""&&!a&&O.jsx("img",{src:t,alt:r||n,onError:()=>{l(!0)},width:o,height:i}),(t===""||a)&&O.jsx("canvas",{ref:f})]})},Xc=e=>e==="apolitical"?{image:`${Go}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${Go}logos/member_community.svg`}:{name:e.name,role:e.jobTitle||"",organisation:e.organization||"",country:e.location&&e.location.country||"",url:`/profiles/${e.id||e.slug}`,image:e.image&&e.image.thumbnail},HT=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const o=e!=="",i=t!=="",s=n!=="";if(!o&&!i&&!s)return"";const a=`${e}${o&&i?` — ${t}`:t}`;let l=`${a}${(o||i)&&s?`, ${n}`:n}`;return l.length>r&&(l=a),l.length>r&&(l=_m(l,r)),l};const Jc=({member:e="community",additionalContent:t=!1,gtmContext:n="member",gtmType:r="member-click",className:o=""})=>{const i=Re(),s=Xc(e);s.name||(s.name=i.formatMessage({id:`member_${typeof e=="string"?e:"community"}`}));const{name:a,url:l,image:f}=s,c=HT(s),h=t&&t.createdAt?Gb(t.createdAt):!1;return O.jsx("div",{className:se("member text-medium",o),children:O.jsxs($p,{href:l,gtmType:r,gtmContext:n,children:[O.jsx(ia,{name:a,src:f}),O.jsxs("p",{className:"details",children:[O.jsx("strong",{children:a}),t&&O.jsxs("span",{className:"additional-content",children:[t.createdAt&&h&&O.jsx("span",{className:"date",title:Gf(t&&t.createdAt),"aria-label":Gf(t&&t.createdAt),children:i.formatMessage({id:`dates_${h.path}`},{number:h.number})}),t.didEdit&&O.jsx("em",{children:i.formatMessage({id:"discussion_edited"})})]}),c&&O.jsx("small",{children:c})]})]})})};const pd={small:24,medium:48},Vm=({element:e="div",contributors:t=[],styling:{showText:n,size:r,showGap:o,showPlaceholders:i}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:s=2,className:a=""})=>{const l=Re();return t.length===0?null:$.createElement(e,{className:se("contributors",a,r,{"has-gap":o}),children:O.jsxs(O.Fragment,{children:[O.jsx("ul",{children:t.map((f,c)=>{let h,d="";if(c<s){const{name:u="",image:p=""}=Xc(f);if(i)return O.jsx(Er,{element:"li",className:"contributor"},c);h=O.jsx(ia,{name:u,src:p,width:pd[r||"medium"],height:pd[r||"medium"]})}else c===s&&(h=O.jsxs("small",{children:["+",t.length-s]}),d="number-left");return h?O.jsx("li",{className:se("contributor",d),children:h},c):null})}),n&&O.jsx("span",{className:"label",children:typeof n=="string"?n:t.length===1?typeof t[0]=="string"?l.formatMessage({id:`member_${t[0]}`}):_m(t[0].name||"",20):null})]})})},qT=({children:e,locale:t,messages:n})=>{const r=t||"en",o={...zb[r],...n||{}};return O.jsx(wS,{locale:r,messages:o,children:e})},Bn=$.createContext(null),GT=({children:e,user:t})=>O.jsx(Bn.Provider,{value:t,children:e});const zm=({isMember:e=!1,functions:{join:t,leave:n}={join:()=>{},leave:()=>{}}})=>{const r=Re(),o=$.useContext(Bn),i=o&&typeof o.id=="string",[s,a]=$.useState(e);return O.jsx(De,{variant:s?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:s?{icon:"tick",position:"left"}:!1,onClick:async()=>{s?typeof n=="function"&&await n():typeof t=="function"&&await t(),a(!s)},className:"join-community-button",disabled:!i,children:r.formatMessage({id:`joinCommunityButton${s?"_member":""}`})})};const WT=({className:e="",...t})=>{const n=Re();return O.jsxs("div",{className:se("community-details",e),children:[O.jsx(zm,{...t}),O.jsxs("div",{className:"additional-details",children:[O.jsx(qo,{}),O.jsx("h3",{children:n.formatMessage({id:"communityDetails_members"})}),O.jsx(Vm,{contributors:[{},{},{},{},{}],styling:{size:"medium",showGap:!0,showPlaceholders:!0},cutoff:5})]})]})},VT={showThread:!1,showForm:!1},Zc=$.createContext(VT),zT=({children:e})=>{const[t,n]=$.useState({showThread:!1,showForm:!1});return O.jsx(Zc.Provider,{value:{...t,updateConversation:n},children:e})};function Sc(){return Sc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sc.apply(this,arguments)}function YT(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var KT=$.useLayoutEffect,QT=function(t){var n=xe.useRef(t);return KT(function(){n.current=t}),n},md=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},XT=function(t,n){var r=$.useRef();return $.useCallback(function(o){t.current=o,r.current&&md(r.current,null),r.current=n,n&&md(n,o)},[n])},gd={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},JT=function(t){Object.keys(gd).forEach(function(n){t.style.setProperty(n,gd[n],"important")})},yd=JT,nt=null,vd=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function ZT(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),nt||(nt=document.createElement("textarea"),nt.setAttribute("tabindex","-1"),nt.setAttribute("aria-hidden","true"),yd(nt)),nt.parentNode===null&&document.body.appendChild(nt);var o=e.paddingSize,i=e.borderSize,s=e.sizingStyle,a=s.boxSizing;Object.keys(s).forEach(function(d){var u=d;nt.style[u]=s[u]}),yd(nt),nt.value=t;var l=vd(nt,e);nt.value=t,l=vd(nt,e),nt.value="x";var f=nt.scrollHeight-o,c=f*n;a==="border-box"&&(c=c+o+i),l=Math.max(c,l);var h=f*r;return a==="border-box"&&(h=h+o+i),l=Math.min(h,l),[l,f]}var _d=function(){},ex=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},tx=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],rx=!!document.documentElement.currentStyle,nx=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=ex(tx,n),o=r.boxSizing;if(o==="")return null;rx&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),s=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:s}},ix=nx;function Ym(e,t,n){var r=QT(n);xe.useLayoutEffect(function(){var o=function(s){return r.current(s)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var ox=function(t){Ym(window,"resize",t)},ax=function(t){Ym(document.fonts,"loadingdone",t)},sx=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],cx=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,s=t.onChange,a=s===void 0?_d:s,l=t.onHeightChange,f=l===void 0?_d:l,c=YT(t,sx),h=c.value!==void 0,d=xe.useRef(null),u=XT(d,n),p=xe.useRef(0),m=xe.useRef(),E=function(){var b=d.current,A=r&&m.current?m.current:ix(b);if(A){m.current=A;var w=ZT(A,b.value||b.placeholder||"x",i,o),P=w[0],F=w[1];p.current!==P&&(p.current=P,b.style.setProperty("height",P+"px","important"),f(P,{rowHeight:F}))}},T=function(b){h||E(),a(b)};return xe.useLayoutEffect(E),ox(E),ax(E),xe.createElement("textarea",Sc({},c,{onChange:T,ref:u}))},ux=xe.forwardRef(cx);let Co=null;const pt="discussion_form_",Km=({content:e={type:"response",slugs:{}},meta:t={isLoading:!1,isInWrapper:!1,isEditing:!1},inputRef:n,maxLength:r=5e4,minRows:o=4,forceShow:i={cancel:!1,error:!1},functions:s={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:a="DiscussionForm"})=>{var B,W;const l=Re(),f=$.useContext(Bn),[c,h]=$.useState(t.isEditing&&t.isEditing.text||""),[d,u]=$.useState(i.error||!1),[p,m]=$.useState(!1),E=$.useRef(null);if(n||(n=E),t.isLoading)return O.jsx(Er,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const T=G=>{const V=G.target.value;h(V);let H;!f||!f.id?H=rr(l.formatMessage,`${pt}error_loggedOut`,e.type,"action"):V.length>=r&&(H=`${pt}error_tooLong`),H?u(H):d&&u(!1)};let _=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const G=e.type==="response"?((B=e.slugs)==null?void 0:B.question)||"":((W=e.slugs)==null?void 0:W.answer)||"";G&&(_=`${_}-${G.slice(-15)}`)}const b=async G=>{var H;if(G.preventDefault(),G.stopPropagation(),w)return;Co&&clearTimeout(Co),m("submitting");const V=window.location.pathname;try{let Y;switch(e.type){case"post":Y=await s.create({content:c});break;case"question":Y=await s.create({title:c,authorId:f&&f.id,...(H=s.props)==null?void 0:H.create});break;case"response":Y=await s.create({question:e.slugs.question},{body:c,authorId:f&&f.id,contentPath:V});break;case"reply":Y=await s.create({question:e.slugs.question,answer:e.slugs.answer},{body:c,authorId:f&&f.id,contentPath:V});break;default:break}await Wb(1e3),s.callback&&await s.callback(Y),Co=setTimeout(()=>{h(""),m("submitted"),A()},500)}catch(Y){const oe=Y;let K=`${pt}error`;oe.message.includes("entry already exists")&&(K=rr(l.formatMessage,`${pt}error_alreadyExists`,e.type,"action")),oe.message.includes("429")?K=rr(l.formatMessage,`${pt}error_tooMany`,e.type,"action"):oe.message.includes("400")&&(K=`${pt}error`),u(K),A()}},A=()=>{Co=setTimeout(()=>{u(!1),m(!1)},5e3)},w=!c||!Yb(c),P=p==="submitting",F=[];return(t.isEditing&&!P||i.cancel)&&F.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:s.handleCancel,className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!i.cancel&&(!f||!f.id||!c),children:l.formatMessage({id:`${pt}cancel`})}),F.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:G=>{if(t.isEditing){m("submitting"),s.handleSaveEdit&&s.handleSaveEdit(E.current&&"value"in E.current?E.current.value:"");return}b(G)},className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":`${t.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!f||!f.id||w||P||t.isEditing&&c===t.isEditing.text,children:l.formatMessage({id:`${pt}${P?t.isEditing?"saving":"posting":t.isEditing?"save":"post"}`})}),O.jsxs("form",{id:_,className:se("discussion-card discussion-form",{"no-styling":t.isInWrapper&&t.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[!t.isEditing&&["question"].includes(e.type)&&O.jsx("h2",{children:rr(l.formatMessage,`${pt}title`,e.type,"action")}),O.jsx(Jc,{member:f||"community",gtmContext:a,gtmType:"profile-click"}),O.jsx(ot,{element:"label",showOnFocus:!1,htmlFor:`${_}-input`,children:rr(l.formatMessage,`${pt}label`,e.type,"action")}),O.jsx(ux,{ref:n,id:`${_}-input`,name:e.type,placeholder:rr(l.formatMessage,`${pt}placeholder`,e.type,"action"),onChange:T,value:c,maxLength:r,"aria-invalid":!!d,"aria-errormessage":"error-message",minRows:o,autoFocus:!!t.isEditing}),O.jsx("small",{children:rr(l.formatMessage,`${pt}explainer`,e.type,"action",{a:G=>O.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",className:"gtm-trackable","data-gtm-event-context":a,"data-gtm-event-type":"community-guidelines-link",children:G})})}),O.jsx(Ji,{buttons:F}),p==="submitted"&&O.jsx(Wo,{className:"success","data-testid":"success",children:rr(l.formatMessage,`${pt}success`,e.type,"action")}),d&&O.jsx(Wo,{id:"error-message",className:"error","data-testid":"error",children:i.error?i.error:typeof d=="string"?d.includes(" ")?d:l.formatMessage({id:d},{action:l.formatMessage({id:`discussion_action_${e.type}`}),maxLength:r}):d})]})},lx=({question:e,answer:t,reply:n})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...n&&{replySlug:n}});let ji=!1;const Us=()=>{ji!==!1&&(clearTimeout(ji),ji=!1)},Qm=({element:e="p",likes:t=0,isShort:n=!0,userLiked:r=!1,content:o={type:"reply",slugs:{}},canLike:i=!0,createLike:s=()=>{},deleteLike:a=()=>{}})=>{const l=Re();$.useEffect(()=>{d(r)},[r]);const[f,c]=$.useState(t),[h,d]=$.useState(r),[u,p]=$.useState(!1),m=window.location.pathname,E=_=>{if(_.preventDefault(),_.stopPropagation(),ji)return Us(),!1;if(Us(),u||!i)return!1;ji=setTimeout(T,350)},T=async()=>{if(Us(),u||!i)return!1;let _=h?f-1:f+1;_<0&&(_=0),p(!0),c(_),d(!h);try{if(o&&o.slugs){const b=lx(o.slugs);h?await a(b):await s(b,{contentPath:m})}}catch{c(t),d(r)}finally{p(!1)}};return $.createElement(e,{className:se("likes-wrapper text-medium action-button",{"show-spinner":u,"is-liked":h,disabled:!i}),onClick:E,children:O.jsxs(O.Fragment,{children:[O.jsx(De,{variant:"tertiary",size:"medium",icon:{icon:h?"heart":"heart_empty",animate:"bounce"},className:se({"do-animation":h&&!r}),screenreaderText:i?l.formatMessage({id:`discussion_${o.type}_likes_${h?"unlike":"like"}`}):!1,onClick:E,disabled:!i,"aria-hidden":!i,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${o.type}-click`}),O.jsx("span",{className:"number-of-likes","data-testid":"number-of-likes",children:l.formatMessage({id:`discussion_likes${n?"_short":""}`},{number:f})})]})})};var Vo={exports:{}};Vo.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",o=1,i=2,s=9007199254740991,a="[object Arguments]",l="[object Array]",f="[object AsyncFunction]",c="[object Boolean]",h="[object Date]",d="[object Error]",u="[object Function]",p="[object GeneratorFunction]",m="[object Map]",E="[object Number]",T="[object Null]",_="[object Object]",b="[object Promise]",A="[object Proxy]",w="[object RegExp]",P="[object Set]",F="[object String]",B="[object Symbol]",W="[object Undefined]",G="[object WeakMap]",V="[object ArrayBuffer]",H="[object DataView]",Y="[object Float32Array]",oe="[object Float64Array]",K="[object Int8Array]",k="[object Int16Array]",z="[object Int32Array]",J="[object Uint8Array]",ae="[object Uint8ClampedArray]",Q="[object Uint16Array]",Z="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,le=/^\[object .+?Constructor\]$/,ze=/^(?:0|[1-9]\d*)$/,X={};X[Y]=X[oe]=X[K]=X[k]=X[z]=X[J]=X[ae]=X[Q]=X[Z]=!0,X[a]=X[l]=X[V]=X[c]=X[H]=X[h]=X[d]=X[u]=X[m]=X[E]=X[_]=X[w]=X[P]=X[F]=X[G]=!1;var re=typeof ue=="object"&&ue&&ue.Object===Object&&ue,Pe=typeof self=="object"&&self&&self.Object===Object&&self,Oe=re||Pe||Function("return this")(),st=t&&!t.nodeType&&t,ut=st&&!0&&e&&!e.nodeType&&e,Et=ut&&ut.exports===st,te=Et&&re.process,Ye=function(){try{return te&&te.binding&&te.binding("util")}catch{}}(),$e=Ye&&Ye.isTypedArray;function bt(y,x){for(var R=-1,j=y==null?0:y.length,de=0,ie=[];++R<j;){var pe=y[R];x(pe,R,y)&&(ie[de++]=pe)}return ie}function Gt(y,x){for(var R=-1,j=x.length,de=y.length;++R<j;)y[de+R]=x[R];return y}function Rt(y,x){for(var R=-1,j=y==null?0:y.length;++R<j;)if(x(y[R],R,y))return!0;return!1}function mt(y,x){for(var R=-1,j=Array(y);++R<y;)j[R]=x(R);return j}function Sr(y){return function(x){return y(x)}}function wt(y,x){return y.has(x)}function gt(y,x){return y==null?void 0:y[x]}function je(y){var x=-1,R=Array(y.size);return y.forEach(function(j,de){R[++x]=[de,j]}),R}function St(y,x){return function(R){return y(x(R))}}function rt(y){var x=-1,R=Array(y.size);return y.forEach(function(j){R[++x]=j}),R}var Ke=Array.prototype,Tr=Function.prototype,S=Object.prototype,g=Oe["__core-js_shared__"],v=Tr.toString,C=S.hasOwnProperty,N=function(){var y=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),U=S.toString,q=RegExp("^"+v.call(C).replace(ce,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fe=Et?Oe.Buffer:void 0,be=Oe.Symbol,we=Oe.Uint8Array,Se=S.propertyIsEnumerable,he=Ke.splice,lt=be?be.toStringTag:void 0,ar=Object.getOwnPropertySymbols,xr=fe?fe.isBuffer:void 0,Wt=St(Object.keys,Object),Or=xt(Oe,"DataView"),Vt=xt(Oe,"Map"),Ar=xt(Oe,"Promise"),Cr=xt(Oe,"Set"),Rr=xt(Oe,"WeakMap"),Nt=xt(Object,"create"),on=Qe(Or),Tt=Qe(Vt),Un=Qe(Ar),Dn=Qe(Cr),$n=Qe(Rr),an=be?be.prototype:void 0,Nr=an?an.valueOf:void 0;function Fe(y){var x=-1,R=y==null?0:y.length;for(this.clear();++x<R;){var j=y[x];this.set(j[0],j[1])}}function Pr(){this.__data__=Nt?Nt(null):{},this.size=0}function Ir(y){var x=this.has(y)&&delete this.__data__[y];return this.size-=x?1:0,x}function zt(y){var x=this.__data__;if(Nt){var R=x[y];return R===r?void 0:R}return C.call(x,y)?x[y]:void 0}function sn(y){var x=this.__data__;return Nt?x[y]!==void 0:C.call(x,y)}function jn(y,x){var R=this.__data__;return this.size+=this.has(y)?0:1,R[y]=Nt&&x===void 0?r:x,this}Fe.prototype.clear=Pr,Fe.prototype.delete=Ir,Fe.prototype.get=zt,Fe.prototype.has=sn,Fe.prototype.set=jn;function He(y){var x=-1,R=y==null?0:y.length;for(this.clear();++x<R;){var j=y[x];this.set(j[0],j[1])}}function Hn(){this.__data__=[],this.size=0}function qn(y){var x=this.__data__,R=ur(x,y);if(R<0)return!1;var j=x.length-1;return R==j?x.pop():he.call(x,R,1),--this.size,!0}function Gn(y){var x=this.__data__,R=ur(x,y);return R<0?void 0:x[R][1]}function Wn(y){return ur(this.__data__,y)>-1}function Lr(y,x){var R=this.__data__,j=ur(R,y);return j<0?(++this.size,R.push([y,x])):R[j][1]=x,this}He.prototype.clear=Hn,He.prototype.delete=qn,He.prototype.get=Gn,He.prototype.has=Wn,He.prototype.set=Lr;function Ze(y){var x=-1,R=y==null?0:y.length;for(this.clear();++x<R;){var j=y[x];this.set(j[0],j[1])}}function Vn(){this.size=0,this.__data__={hash:new Fe,map:new(Vt||He),string:new Fe}}function zn(y){var x=ft(this,y).delete(y);return this.size-=x?1:0,x}function Yn(y){return ft(this,y).get(y)}function Kn(y){return ft(this,y).has(y)}function Qn(y,x){var R=ft(this,y),j=R.size;return R.set(y,x),this.size+=R.size==j?0:1,this}Ze.prototype.clear=Vn,Ze.prototype.delete=zn,Ze.prototype.get=Yn,Ze.prototype.has=Kn,Ze.prototype.set=Qn;function sr(y){var x=-1,R=y==null?0:y.length;for(this.__data__=new Ze;++x<R;)this.add(y[x])}function cn(y){return this.__data__.set(y,r),this}function cr(y){return this.__data__.has(y)}sr.prototype.add=sr.prototype.push=cn,sr.prototype.has=cr;function ct(y){var x=this.__data__=new He(y);this.size=x.size}function kr(){this.__data__=new He,this.size=0}function Xn(y){var x=this.__data__,R=x.delete(y);return this.size=x.size,R}function Jn(y){return this.__data__.get(y)}function Zn(y){return this.__data__.has(y)}function ei(y,x){var R=this.__data__;if(R instanceof He){var j=R.__data__;if(!Vt||j.length<n-1)return j.push([y,x]),this.size=++R.size,this;R=this.__data__=new Ze(j)}return R.set(y,x),this.size=R.size,this}ct.prototype.clear=kr,ct.prototype.delete=Xn,ct.prototype.get=Jn,ct.prototype.has=Zn,ct.prototype.set=ei;function ti(y,x){var R=lr(y),j=!R&&pn(y),de=!R&&!j&&dr(y),ie=!R&&!j&&!de&&Dr(y),pe=R||j||de||ie,me=pe?mt(y.length,String):[],ke=me.length;for(var Ee in y)(x||C.call(y,Ee))&&!(pe&&(Ee=="length"||de&&(Ee=="offset"||Ee=="parent")||ie&&(Ee=="buffer"||Ee=="byteLength"||Ee=="byteOffset")||Pt(Ee,ke)))&&me.push(Ee);return me}function ur(y,x){for(var R=y.length;R--;)if(hn(y[R][0],x))return R;return-1}function Mr(y,x,R){var j=x(y);return lr(y)?j:Gt(j,R(y))}function Yt(y){return y==null?y===void 0?W:T:lt&&lt in Object(y)?Ot(y):dn(y)}function un(y){return yt(y)&&Yt(y)==a}function ln(y,x,R,j,de){return y===x?!0:y==null||x==null||!yt(y)&&!yt(x)?y!==y&&x!==x:fn(y,x,R,j,ln,de)}function fn(y,x,R,j,de,ie){var pe=lr(y),me=lr(x),ke=pe?l:dt(y),Ee=me?l:dt(x);ke=ke==a?_:ke,Ee=Ee==a?_:Ee;var qe=ke==_,Xe=Ee==_,Be=ke==Ee;if(Be&&dr(y)){if(!dr(x))return!1;pe=!0,qe=!1}if(Be&&!qe)return ie||(ie=new ct),pe||Dr(y)?Br(y,x,R,j,de,ie):oi(y,x,ke,R,j,de,ie);if(!(R&o)){var Ge=qe&&C.call(y,"__wrapped__"),Ue=Xe&&C.call(x,"__wrapped__");if(Ge||Ue){var It=Ge?y.value():y,At=Ue?x.value():x;return ie||(ie=new ct),de(It,At,R,j,ie)}}return Be?(ie||(ie=new ct),Fr(y,x,R,j,de,ie)):!1}function ri(y){if(!gn(y)||ci(y))return!1;var x=mn(y)?q:le;return x.test(Qe(y))}function ni(y){return yt(y)&&Ur(y.length)&&!!X[Yt(y)]}function ii(y){if(!ui(y))return Wt(y);var x=[];for(var R in Object(y))C.call(y,R)&&R!="constructor"&&x.push(R);return x}function Br(y,x,R,j,de,ie){var pe=R&o,me=y.length,ke=x.length;if(me!=ke&&!(pe&&ke>me))return!1;var Ee=ie.get(y);if(Ee&&ie.get(x))return Ee==x;var qe=-1,Xe=!0,Be=R&i?new sr:void 0;for(ie.set(y,x),ie.set(x,y);++qe<me;){var Ge=y[qe],Ue=x[qe];if(j)var It=pe?j(Ue,Ge,qe,x,y,ie):j(Ge,Ue,qe,y,x,ie);if(It!==void 0){if(It)continue;Xe=!1;break}if(Be){if(!Rt(x,function(At,Qt){if(!wt(Be,Qt)&&(Ge===At||de(Ge,At,R,j,ie)))return Be.push(Qt)})){Xe=!1;break}}else if(!(Ge===Ue||de(Ge,Ue,R,j,ie))){Xe=!1;break}}return ie.delete(y),ie.delete(x),Xe}function oi(y,x,R,j,de,ie,pe){switch(R){case H:if(y.byteLength!=x.byteLength||y.byteOffset!=x.byteOffset)return!1;y=y.buffer,x=x.buffer;case V:return!(y.byteLength!=x.byteLength||!ie(new we(y),new we(x)));case c:case h:case E:return hn(+y,+x);case d:return y.name==x.name&&y.message==x.message;case w:case F:return y==x+"";case m:var me=je;case P:var ke=j&o;if(me||(me=rt),y.size!=x.size&&!ke)return!1;var Ee=pe.get(y);if(Ee)return Ee==x;j|=i,pe.set(y,x);var qe=Br(me(y),me(x),j,de,ie,pe);return pe.delete(y),qe;case B:if(Nr)return Nr.call(y)==Nr.call(x)}return!1}function Fr(y,x,R,j,de,ie){var pe=R&o,me=Kt(y),ke=me.length,Ee=Kt(x),qe=Ee.length;if(ke!=qe&&!pe)return!1;for(var Xe=ke;Xe--;){var Be=me[Xe];if(!(pe?Be in x:C.call(x,Be)))return!1}var Ge=ie.get(y);if(Ge&&ie.get(x))return Ge==x;var Ue=!0;ie.set(y,x),ie.set(x,y);for(var It=pe;++Xe<ke;){Be=me[Xe];var At=y[Be],Qt=x[Be];if(j)var to=pe?j(Qt,At,Be,x,y,ie):j(At,Qt,Be,y,x,ie);if(!(to===void 0?At===Qt||de(At,Qt,R,j,ie):to)){Ue=!1;break}It||(It=Be=="constructor")}if(Ue&&!It){var Lt=y.constructor,hr=x.constructor;Lt!=hr&&"constructor"in y&&"constructor"in x&&!(typeof Lt=="function"&&Lt instanceof Lt&&typeof hr=="function"&&hr instanceof hr)&&(Ue=!1)}return ie.delete(y),ie.delete(x),Ue}function Kt(y){return Mr(y,yn,ai)}function ft(y,x){var R=y.__data__;return si(x)?R[typeof x=="string"?"string":"hash"]:R.map}function xt(y,x){var R=gt(y,x);return ri(R)?R:void 0}function Ot(y){var x=C.call(y,lt),R=y[lt];try{y[lt]=void 0;var j=!0}catch{}var de=U.call(y);return j&&(x?y[lt]=R:delete y[lt]),de}var ai=ar?function(y){return y==null?[]:(y=Object(y),bt(ar(y),function(x){return Se.call(y,x)}))}:vn,dt=Yt;(Or&&dt(new Or(new ArrayBuffer(1)))!=H||Vt&&dt(new Vt)!=m||Ar&&dt(Ar.resolve())!=b||Cr&&dt(new Cr)!=P||Rr&&dt(new Rr)!=G)&&(dt=function(y){var x=Yt(y),R=x==_?y.constructor:void 0,j=R?Qe(R):"";if(j)switch(j){case on:return H;case Tt:return m;case Un:return b;case Dn:return P;case $n:return G}return x});function Pt(y,x){return x=x??s,!!x&&(typeof y=="number"||ze.test(y))&&y>-1&&y%1==0&&y<x}function si(y){var x=typeof y;return x=="string"||x=="number"||x=="symbol"||x=="boolean"?y!=="__proto__":y===null}function ci(y){return!!N&&N in y}function ui(y){var x=y&&y.constructor,R=typeof x=="function"&&x.prototype||S;return y===R}function dn(y){return U.call(y)}function Qe(y){if(y!=null){try{return v.call(y)}catch{}try{return y+""}catch{}}return""}function hn(y,x){return y===x||y!==y&&x!==x}var pn=un(function(){return arguments}())?un:function(y){return yt(y)&&C.call(y,"callee")&&!Se.call(y,"callee")},lr=Array.isArray;function fr(y){return y!=null&&Ur(y.length)&&!mn(y)}var dr=xr||fi;function li(y,x){return ln(y,x)}function mn(y){if(!gn(y))return!1;var x=Yt(y);return x==u||x==p||x==f||x==A}function Ur(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=s}function gn(y){var x=typeof y;return y!=null&&(x=="object"||x=="function")}function yt(y){return y!=null&&typeof y=="object"}var Dr=$e?Sr($e):ni;function yn(y){return fr(y)?ti(y):ii(y)}function vn(){return[]}function fi(){return!1}e.exports=li})(Vo,Vo.exports);var fx=Vo.exports;const dx=jt(fx);const Xm=({element:e="section",children:t,className:n,...r})=>$.createElement(e,{className:se("modal",n),children:typeof t=="string"?O.jsx("p",{children:t}):t,...r});const Jm=({id:e="content-overlay",isOpen:t=!1,maxWidth:n,functions:{onOpen:r=()=>{},onClose:o=()=>{}}={},forceShow:{error:i=!1}={},title:s,children:a,buttons:l,className:f="",gtmContext:c="Modal"})=>{const h=Re(),[d,u]=$.useState(t),p=E=>{u(E),document.body.classList.toggle("has-overlay"),E?r():o()};$.useEffect(()=>{p(t)},[t]);const m=n?{"--max-width":`${n/16}rem`}:{};return O.jsx("div",{className:se("overlay",{open:d}),children:O.jsx(Xm,{id:e,className:se("overlay-modal",f,{"has-max-width":n}),hidden:!d,style:m,children:t&&O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:"top",children:[O.jsx("h2",{children:s}),O.jsx(De,{variant:"tertiary",size:"medium",icon:{icon:"close"},onClick:()=>p(!1),className:"gtm-trackable","data-gtm-event-type":"close-modal-click","data-gtm-event-context":c,screenreaderText:h.formatMessage({id:"overlay_button"})})]}),O.jsx(qo,{}),a,l&&O.jsxs("div",{className:"bottom",children:[O.jsx(qo,{}),O.jsx(Ji,{buttons:l})]}),i&&O.jsx(Wo,{className:"error",children:i})]})})})},Zm=(e,t)=>({"aria-haspopup":!0,"aria-expanded":t,"aria-controls":e});const hx=({options:e,allOption:t=!1,allowMultiple:n=!0,onChange:r=()=>{},className:o=""})=>{const i=Re(),s=t?[{id:"all",text:typeof t!="boolean"&&t.text||i.formatMessage({id:"filters_all"})},...e]:e,[a,l]=$.useState(t?["all"]:[]),f=(c,h)=>{let d=[];a.includes(c)?d=a.filter(u=>u!==c):c==="all"?d=["all"]:n?d=[...a.filter(u=>u!=="all"),c]:d=[c],l(u=>(r&&typeof r=="function"&&r({current:d,previous:u}),d)),h&&typeof h=="function"&&h()};return O.jsx("ul",{className:se("filters",o),children:s.map(({id:c,text:h,disabled:d=!1,callback:u=()=>{}})=>{let p={};return d&&(p={disabled:!0,"aria-label":i.formatMessage({id:"filters_disabled"},{name:h})}),O.jsx("li",{children:O.jsx("button",{className:se(c,{selected:a.includes(c)}),onClick:m=>{m.preventDefault(),m.stopPropagation(),f(c,u)},...p,children:h})},c)})})};const Ds=yc({locale:"en",messages:Hc}),px=({page:e=1,length:t=0,limit:n=10,loadNextPage:r=()=>{},icon:o=!1,messages:i={button:Ds.formatMessage({id:"loadMore_button"}),endOfFeed:Ds.formatMessage({id:"loadMore_endOfFeed"}),error:Ds.formatMessage({id:"loadMore_error"})},className:s="",gtmContext:a="LoadMore"})=>{const[l,f]=$.useState(!1),[c,h]=$.useState(!1);if(t<=0||t<n*e)return null;const d=async u=>{try{await r(u)}catch(p){p instanceof Error&&p.message&&p.message.includes("Cannot read items")?h(!0):f(!0)}};return O.jsxs("footer",{className:se("load-more",s),children:[l&&O.jsx("p",{className:"error",children:i.error}),c?O.jsx("p",{children:i.endOfFeed}):O.jsx(De,{variant:"secondary",icon:o,onClick:d,"data-gtm-event-context":a,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:i.button})]})};let Ro=!1;const eg=({element:e="div",id:t="more-menu",options:n,className:r=""})=>{const o=Re(),i=$.useRef(null),[s,a]=$.useState(!1),l=f=>{i.current&&f.target instanceof HTMLElement&&!i.current.contains(f.target)&&a(!1)};return $.useEffect(()=>(document.addEventListener("click",l,!0),()=>{document.removeEventListener("click",l,!0)})),$.createElement(e,{ref:i,className:se("more-menu text-medium",r),children:O.jsxs(O.Fragment,{children:[O.jsx(De,{variant:"tertiary",size:"medium",icon:{icon:"ellipsis"},onClick:()=>a(!s),"aria-haspopup":"true","aria-expanded":s,"aria-controls":t,screenreaderText:o.formatMessage({id:"moreMenu"})}),O.jsx("ul",{id:t,hidden:!s,children:n.map(({href:f,onClick:c,text:h,icon:d,...u},p)=>{const m={...u,onClick:E=>{a(!1),typeof c=="function"&&c(E)},onFocus:()=>{Ro&&(clearTimeout(Ro),Ro=!1)},onBlur:()=>{Ro=setTimeout(()=>{a(!1)},100)}};return f&&(m.href=f),O.jsx("li",{children:O.jsx(De,{variant:"tertiary",size:"medium",icon:d?{icon:d,position:"left"}:!1,...m,children:h})},`${window.btoa(h)}_${p}`)})})]})})};const eu=({variant:e="default",version:t="default",className:n="",...r})=>O.jsx("p",{className:"logo-wrapper",children:O.jsx("a",{className:se("logo",e,t,n),href:"/home/",...r,children:O.jsx(ot,{children:O.jsx(vr,{id:"apolitical"})})})});const mx={"2-1":901},gx=({layout:e="2-1",hideOnMobile:t=!1,className:n="",children:r})=>{const o=Xi(!0);let i=r;return $.Children.count(r)===1&&(i=$.Children.toArray(r)[0],i.props&&(i=i.props.children)),O.jsx("section",{className:se("columns",`layout-${e}`,n),children:$.Children.map(i,(s,a)=>t!==!1&&a===t&&o&&o<mx[e]?null:s)})};const $s="cookieBanner_",js=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],Hs=new Date(Date.now()+12*30*24*60*60*1e3),tg=()=>{const e=Re(),[t,n,r]=Ld(js),[o,i]=$.useState(!t["apol-cookie-banner"]),s=()=>{js.forEach(c=>{n(c,!0,{path:"/",expires:Hs,domain:c==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),i(!1),window.location.reload()},a=()=>{n("apol-cookie-banner",!0,{path:"/",expires:Hs}),js.forEach(c=>{if(c==="apol-cookie-banner"){n(c,!0,{path:"/",expires:Hs});return}r(c)}),i(!1)};if(!o)return null;const l=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:a,gtmType:"reject-all"},{id:"accept",onClick:s,gtmType:"accepted-all"}],f=[];return l.forEach(c=>{f.push({variant:c.href?"tertiary":"primary",href:c.href,onClick:c.onClick,className:"gtm-trackable","data-gtm-event-context":"cookie-banner","data-gtm-event-type":`cookie-${c.gtmType}-click`,children:e.formatMessage({id:`${$s}buttons_${c.id}`})})}),O.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[O.jsx("h6",{children:e.formatMessage({id:`${$s}title`})}),O.jsx("p",{children:e.formatMessage({id:`${$s}text`})}),O.jsx(Ji,{buttons:f})]})},ir={platform:{order:["events","courses","qanda","articles"],events:{href:"/events/",gtmType:"events-click"},courses:{href:"/microcourses/",gtmType:"microcourses-click"},qanda:{href:"/questions-answers/",gtmType:"q-and-a-click"},articles:{href:"/solution-articles/",gtmType:"articles-click"}},community:{order:["support","post","join","guidelines"],support:{name:"Support FAQ",href:"/pages/support-faq",gtmType:"support-faq-click"},post:{href:"/pages/post-an-article",gtmType:"post-an-article-click"},join:{href:"/pages/who-can-join-the-community",gtmType:"who-can-join-click"},guidelines:{href:"/pages/values-and-guidelines",gtmType:"guidelines-and-values-click"}},company:{order:["story","team","careers","partner","contact"],story:{href:"/pages/our-story",gtmType:"our-story-click"},team:{href:"/pages/meet-our-team",gtmType:"team-click"},careers:{href:"/pages/careers",gtmType:"careers-click"},partner:{href:"/partnerships/",gtmType:"partner-with-us-click"},contact:{href:"/pages/get-in-touch",gtmType:"contact-click"},child:"legal"},legal:{order:["privacy","terms","cookie","accessibility"],privacy:{href:"https://about.apolitical.co/privacy-policy",gtmType:"privacy-policy-link"},terms:{href:"https://about.apolitical.co/terms-and-conditions",gtmType:"terms-conditions-link"},cookie:{href:"/pages/cookie-policy",gtmType:"cookie-policy-link"},accessibility:{href:"/pages/accessibility-statement",gtmType:"accessibility-link"},text:{order:["dataProtection","euDataProtection"],dataProtection:{email:"dpo@apolitical.co",gtmType:"email-dpo-link"},euDataProtection:{email:"dpo.agl@apolitical.foundation",gtmType:"email-eu-dpo-link"}}},contact:{text:{order:["correspondence","registered","berlin","support","business"],correspondence:{address:!0},registered:{address:!0},berlin:{address:!0},support:{email:"concierge@apolitical.co",gtmType:"concierge-email-click"},business:{email:"hello@apolitical.co",gtmType:"hello-email-click"}}},social:{order:["linkedin","twitter","facebook"],linkedin:{href:"https://www.linkedin.com/company/apolitical"},twitter:{href:"https://twitter.com/apoliticalco"},facebook:{href:"https://www.facebook.com/apoliticalco"}}};const Tn="footer_",zo="SiteFooter",Ed=({group:e})=>{const t=ir[e].order||[];let n=!1;return"text"in ir[e]&&(n=ir[e].text),O.jsxs($.Fragment,{children:[O.jsx("p",{className:"pre-title",children:O.jsx(vr,{id:`${Tn}${e}`})}),Array.isArray(t)&&t.length>0&&O.jsx("ul",{className:"text-medium",children:t.map(r=>{if(["order","child","text"].includes(r))return null;const{href:o,gtmType:i}=ir[e][r],s={};return["legal"].includes(e)&&(s.target="_blank",s.rel="noopener"),O.jsx("li",{children:O.jsx("a",{href:o,className:"gtm-trackable","data-gtm-event-context":zo,"data-gtm-event-type":i,...s,children:O.jsx(vr,{id:`${Tn}${e}_${r}`})})},`${e}_${r}`)})}),typeof n!="boolean"&&"order"in n&&Array.isArray(n.order)&&O.jsx("dl",{className:"text-medium",children:n.order.map(r=>O.jsxs($.Fragment,{children:[O.jsx("dt",{children:O.jsx(vr,{id:`${Tn}${e}_${r}`})}),O.jsxs("dd",{children:[typeof n!="boolean"&&n[r].address&&O.jsx("address",{children:O.jsx(vr,{id:`${Tn}${e}_${r}_address`,values:{br:O.jsx("br",{})}})}),typeof n!="boolean"&&n[r].email&&O.jsx("a",{href:`mailto:${n[r].email}`,className:"gtm-trackable","data-gtm-event-context":zo,"data-gtm-event-type":n[r].gtmType,children:n[r].email})]})]},`dl-${e}-${r}`))})]},e)},tu=()=>O.jsx("div",{id:"footer",children:O.jsxs("div",{className:"wrapper",children:[O.jsx(Tc,{element:"hr"}),O.jsx(eu,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":zo,"data-gtm-event-type":"logo-homepage-link"}),O.jsx("footer",{children:["platform","community","company","contact"].map(e=>O.jsxs("div",{className:"group",children:[O.jsx(Ed,{group:e}),Object.keys(ir[e]).includes("child")&&O.jsx(Ed,{group:ir[e].child})]},e))}),O.jsx("hr",{}),O.jsxs("div",{className:"sub-footer",children:[O.jsx("ul",{children:Array.isArray(ir.social.order)&&ir.social.order.map(e=>{const t=ir.social[e];return O.jsx("li",{className:e,children:O.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":zo,"data-gtm-event-type":"social-click",children:O.jsx("span",{className:"hidden",children:O.jsx(vr,{id:`${Tn}social_${e}`})})})},e)})}),O.jsx("small",{children:O.jsx(vr,{id:`${Tn}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});const No="emailHelperTextBox_",yx=({type:e,email:t,redirectPath:n,resendVerificationCode:r})=>{const o=Re(),[i,s]=$.useState({path:`${No}default`,type:"default",link:{},mail:{},error:""}),[a,l]=$.useState(!1),f=$.useCallback(u=>{u.preventDefault(),u.stopPropagation();const p=m=>{s({path:`${No}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:E=>f(E),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:m})};if(typeof r!="function"){p(o.formatMessage({id:`${No}error_noFunction`}));return}l(!0),r(t).then(()=>{localStorage.setItem("email",t),window.location.href=n||"/signup/verify-email"}).catch(m=>{p(m.message)}).finally(()=>{l(!1)})},[t,n,r]);$.useEffect(()=>{let u=No,p="default",m={},E={};switch(e){case"gov":u+="autoApproved",p="success";break;case"nonGov":u+="unrecognisedEmail",p="error",m={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":u+="pendingApproval",p="error",E={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":u+="emailUnverified",p="error",m={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:T=>f(T),"data-testid":"send-verify-email-click"};break;case"exists":u+="emailAlreadyExists",p="error",m={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},E={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:u+="default",m={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}s({...i,path:u,type:p,link:m,mail:E})},[e]);const c={};return["link","mail"].forEach(u=>{c[u]=Object.keys(i[u]).length?p=>O.jsx("a",{...i[u],children:p}):p=>p}),O.jsx(jm,{type:i.type,heading:a?!1:o.formatMessage({id:`${i.path}_title`}),children:a?O.jsxs(O.Fragment,{children:[O.jsx(Er,{element:"span"}),O.jsx(Er,{element:"span"})]}):o.formatMessage({id:`${i.path}_text`},{...c,strong:u=>O.jsx("strong",{children:u}),em:u=>O.jsx("em",{children:u}),br:O.jsxs(O.Fragment,{children:[O.jsx("br",{}),O.jsx("br",{})]}),error:i.error})})};const Po="passwordRules_",rg="isMoreThanEightCharacters",ng="includesNumberAndSymbol",ig="includesLowerAndUppercase",vx={[rg]:"8Characters",[ng]:"numberSymbol",[ig]:"lowercaseUppercase"},_x=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const n=Re();return O.jsxs("aside",{className:se("password-rules",t),children:[O.jsx("small",{children:n.formatMessage({id:`${Po}intro`})}),O.jsx("ul",{children:[rg,ng,ig].map(r=>O.jsxs("li",{className:se({matches:e[r]}),children:[O.jsxs(ot,{children:[n.formatMessage({id:`${Po}rule_label`})," "]}),O.jsx("span",{children:n.formatMessage({id:`${Po}rule_${vx[r]}`})}),!e[r]&&O.jsxs(ot,{element:"strong",children:[" "," ",n.formatMessage({id:`${Po}notMet`})]})]},`rule-${r}`))})]})},Ex=$.memo(_x);const bx=({text:e={},topRating:t=5,functions:{createRating:n=()=>null,updateRating:r=()=>{},reportError:o=()=>{}},className:i="",hasLoaded:s=!1})=>{const a=Re(),[l,f]=$.useState({setUp:!1,id:null,rating:null,disabled:!0}),c=async()=>{try{const T=await n();f(_=>({..._,setUp:!0,id:T&&T.id,disabled:!1}))}catch(T){f(_=>({..._,setUp:!0,disabled:!0})),o(T)}};if($.useEffect(()=>{s&&!l.setUp&&c()},[s]),!s)return O.jsx(Er,{className:"rating-placeholder"});const{id:h,rating:d,disabled:u}=l,p="ratings_",m={text:a.formatMessage({id:`${p}text`}),low:a.formatMessage({id:`${p}low`}),high:a.formatMessage({id:`${p}high`}),success:a.formatMessage({id:`${p}success`}),...e},E=async T=>{if(!(!h||u))try{f(_=>({..._,rating:T,disabled:!0})),await r({id:h,value:T})}catch(_){f(b=>({...b,rating:null})),o(_)}finally{f(_=>({..._,disabled:!1}))}};return O.jsxs("div",{className:se("rating",i),children:[O.jsx("span",{className:"label",children:m[d?"success":"text"]}),O.jsx("ol",{children:Array.from(new Array(t).keys()).map(T=>{const _=T+1;return O.jsx("li",{className:se({selected:d&&_<=d}),children:O.jsx(De,{variant:"tertiary",size:"small",icon:{icon:`star${!d||_>d?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${a.formatMessage({id:`${p}stars`},{number:_,total:t})}${_===1||_===t?` - ${m[_===1?"low":"high"]}`:""}`,onClick:b=>{b.preventDefault(),b.stopPropagation(),E(_)},disabled:u})},`rating-${_}`)})})]})};const og=({id:e="search",className:t="",handleToggle:n=!1,defaultValue:r="",gtmContext:o="search-bar",gtmEvent:i="form-submission"})=>{const{searchIsOpen:s=!0,isDesktopVersion:a=!1}=n||{},l=Re(),f=$.useRef(null);Hi(()=>{!n||a||!s||f.current&&f.current.focus()},[s]);const c=h=>{if(h.preventDefault(),h.stopPropagation(),!(!f.current||!f.current.value||f.current.value.length<1))return window&&window.location&&window.location.replace(`/search?search=${encodeURIComponent(f.current.value)}`)};return O.jsx("form",{onSubmit:c,className:se("search-form gtm-trackable",t),"data-gtm-event-context":o,"data-gtm-event-type":i,children:O.jsx("fieldset",{id:`${e}-form`,hidden:n?!s:!1,role:"search",children:O.jsxs("p",{children:[O.jsx(ot,{element:"label",htmlFor:e,children:l.formatMessage({id:"search_label"})}),O.jsx("input",{ref:f,type:"search",id:e,name:e,defaultValue:r,placeholder:l.formatMessage({id:"search_placeholder"}),onKeyDown:h=>{h.key==="Enter"&&c(h)}}),O.jsx("button",{className:"clear",onClick:h=>{h.preventDefault(),h.stopPropagation(),f.current&&f.current.value&&(f.current.value="")},children:O.jsx(ot,{children:l.formatMessage({id:"search_clear"})})}),O.jsx("button",{className:"search",onClick:c,children:O.jsx(ot,{children:l.formatMessage({id:"search_cta"})})})]})})})};var wx="Expected a function",ag="__lodash_hash_undefined__",sg=1/0,Sx="[object Function]",Tx="[object GeneratorFunction]",xx="[object Symbol]",Ox=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ax=/^\w*$/,Cx=/^\./,Rx=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nx=/[\\^$.*+?()[\]{}|]/g,Px=/\\(\\)?/g,Ix=/^\[object .+?Constructor\]$/,Lx=typeof ue=="object"&&ue&&ue.Object===Object&&ue,kx=typeof self=="object"&&self&&self.Object===Object&&self,ru=Lx||kx||Function("return this")();function Mx(e,t){return e==null?void 0:e[t]}function Bx(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Fx=Array.prototype,Ux=Function.prototype,cg=Object.prototype,qs=ru["__core-js_shared__"],bd=function(){var e=/[^.]+$/.exec(qs&&qs.keys&&qs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ug=Ux.toString,nu=cg.hasOwnProperty,lg=cg.toString,Dx=RegExp("^"+ug.call(nu).replace(Nx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wd=ru.Symbol,$x=Fx.splice,jx=fg(ru,"Map"),Wi=fg(Object,"create"),Sd=wd?wd.prototype:void 0,Td=Sd?Sd.toString:void 0;function en(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hx(){this.__data__=Wi?Wi(null):{}}function qx(e){return this.has(e)&&delete this.__data__[e]}function Gx(e){var t=this.__data__;if(Wi){var n=t[e];return n===ag?void 0:n}return nu.call(t,e)?t[e]:void 0}function Wx(e){var t=this.__data__;return Wi?t[e]!==void 0:nu.call(t,e)}function Vx(e,t){var n=this.__data__;return n[e]=Wi&&t===void 0?ag:t,this}en.prototype.clear=Hx;en.prototype.delete=qx;en.prototype.get=Gx;en.prototype.has=Wx;en.prototype.set=Vx;function Fn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function zx(){this.__data__=[]}function Yx(e){var t=this.__data__,n=oa(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():$x.call(t,n,1),!0}function Kx(e){var t=this.__data__,n=oa(t,e);return n<0?void 0:t[n][1]}function Qx(e){return oa(this.__data__,e)>-1}function Xx(e,t){var n=this.__data__,r=oa(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Fn.prototype.clear=zx;Fn.prototype.delete=Yx;Fn.prototype.get=Kx;Fn.prototype.has=Qx;Fn.prototype.set=Xx;function nn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Jx(){this.__data__={hash:new en,map:new(jx||Fn),string:new en}}function Zx(e){return aa(this,e).delete(e)}function eO(e){return aa(this,e).get(e)}function tO(e){return aa(this,e).has(e)}function rO(e,t){return aa(this,e).set(e,t),this}nn.prototype.clear=Jx;nn.prototype.delete=Zx;nn.prototype.get=eO;nn.prototype.has=tO;nn.prototype.set=rO;function oa(e,t){for(var n=e.length;n--;)if(hO(e[n][0],t))return n;return-1}function nO(e,t){t=sO(t,e)?[t]:aO(t);for(var n=0,r=t.length;e!=null&&n<r;)e=e[fO(t[n++])];return n&&n==r?e:void 0}function iO(e){if(!hg(e)||uO(e))return!1;var t=pO(e)||Bx(e)?Dx:Ix;return t.test(dO(e))}function oO(e){if(typeof e=="string")return e;if(ou(e))return Td?Td.call(e):"";var t=e+"";return t=="0"&&1/e==-sg?"-0":t}function aO(e){return dg(e)?e:lO(e)}function aa(e,t){var n=e.__data__;return cO(t)?n[typeof t=="string"?"string":"hash"]:n.map}function fg(e,t){var n=Mx(e,t);return iO(n)?n:void 0}function sO(e,t){if(dg(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ou(e)?!0:Ax.test(e)||!Ox.test(e)||t!=null&&e in Object(t)}function cO(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function uO(e){return!!bd&&bd in e}var lO=iu(function(e){e=gO(e);var t=[];return Cx.test(e)&&t.push(""),e.replace(Rx,function(n,r,o,i){t.push(o?i.replace(Px,"$1"):r||n)}),t});function fO(e){if(typeof e=="string"||ou(e))return e;var t=e+"";return t=="0"&&1/e==-sg?"-0":t}function dO(e){if(e!=null){try{return ug.call(e)}catch{}try{return e+""}catch{}}return""}function iu(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(wx);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s),s};return n.cache=new(iu.Cache||nn),n}iu.Cache=nn;function hO(e,t){return e===t||e!==e&&t!==t}var dg=Array.isArray;function pO(e){var t=hg(e)?lg.call(e):"";return t==Sx||t==Tx}function hg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function mO(e){return!!e&&typeof e=="object"}function ou(e){return typeof e=="symbol"||mO(e)&&lg.call(e)==xx}function gO(e){return e==null?"":oO(e)}function yO(e,t,n){var r=e==null?void 0:nO(e,t);return r===void 0?n:r}var vO=yO;const pg=jt(vO),Ne={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const n={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},r=i=>{const s=`logged${e?"In":"Out"}`;return t>=n[i][s]};let o={};return["navigation","search"].forEach(i=>{o[i]=r(i)}),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&&Ne.handlerCalled[e]&&o-Ne.handlerCalled[e]<500)return;Ne.handlerCalled[e]=o;let i=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(n).forEach(s=>{s===e||n[s]===!1||i.push({type:`menus.${s}`,value:!1})}),r(i)},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=pg(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?Ne.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 i=n?"desktop":"default";if(r[e][i]){r[e][i].focus();return}let s,a;switch(e){case"navigation":if(n){const l=Ne.findFirstChild(t.current.children,"attributes.aria-controls","navigation");s=Ne.findFirstChild(l.children,"href")}else s=Ne.findFirstChild(t.current.children,"href");s||(s=t.current);break;case"account":if(a=Ne.findFirstChild(t.current.children,"className","account"),!a||!a.children)return;s=Ne.findFirstChild(a.children,"href");break;default:return}s&&(o([{type:`focusElements.${e}.${i}`,value:s}]),s.focus())},events:{onClick:(e,{id:t,callback:n,isOpen:r})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(Ne.timeouts[t]),n(t,!r))},onFocus:({id:e})=>{clearTimeout(Ne.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(Ne.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{Ne.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},Vi={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"}}}},Yo=({id:e,isLoggedIn:t=!1,isDesktopVersion:n=!1,menus:r={},callback:o=()=>{},doTrack:i=null})=>{const s=Re(),a=pg(Vi,e);if(!a||a.onlyShow&&(a.onlyShow==="logged-in"&&!t||a.onlyShow==="logged-out"&&t))return null;const l="doTrack"in a,f=i===null?l?a.doTrack:!0:i,c=e.includes("buttons.");let h=`header_${e.replaceAll(".","_")}`;a.hasVariantText&&(h+=`_logged${t?"In":"Out"}`);let d=!1;if(a.href){let _=a.gtmType||`${e}-click`;if(_.includes(".")){const b=_.split("."),A=b[b.length-2];_=`${A==="topics"?`${A}-`:""}${b[b.length-1]}`}d={href:a.href,role:"menuitem"},f&&(d={...d,className:"gtm-trackable","data-gtm-event-type":_,"data-gtm-event-context":"HeaderButtons"}),c&&(d={...d,variant:"secondary",size:{mobile:"small",881:"large"},...a.props||{}})}const u=a.order&&a.order[0]&&a[a.order[0]],p=u&&a[a.order[0]].order,m=d&&typeof window<"u"&&window.location&&window.location.pathname===a.href;let E={},T={};if(u){const _=a.menuId||e,b={onClick:A=>Ne.events.onClick(A,{id:_,callback:o,isOpen:r[_]}),onFocus:()=>Ne.events.onFocus({id:_}),onBlur:()=>Ne.events.onBlur({id:_,callback:o}),onMouseLeave:()=>Ne.events.onBlur({id:_,callback:o}),onMouseEnter:()=>Ne.events.onMouseEnter({id:_,callback:o})};n&&(p&&(E={...b,onKeyPress:A=>{A.key==="Enter"&&Ne.events.onClick(A,{id:_,callback:o,isOpen:r[_]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":r[_],"aria-controls":_}),T={hidden:_ in r?!r[_]:!0}),p||(T={...T,...b})}return O.jsxs("li",{className:se({[a.className]:a.className,"has-submenu":u,parent:p,active:m}),role:"none",...E,children:[d?$.createElement(c?De:"a",d,s.formatMessage({id:h})):s.formatMessage({id:h}),a.order&&O.jsx("ul",{...T,children:a.order.map(_=>{if(!a[_])return null;const b={isLoggedIn:t,isDesktopVersion:n,menus:r,callback:o,doTrack:l?f:null};return a[_].order?O.jsxs("li",{className:se({[a[_].className]:a[_].className}),children:[s.formatMessage({id:`${h}_${_}`}),O.jsx("ul",{children:a[_].order.map(A=>O.jsx(Yo,{id:`${e}.${_}.${A}`,...b},A))})]},_):O.jsx(Yo,{id:`${e}.${_}`,...b},_)})})]},e)};const _O={height:67,height_desktop:83},au=()=>{const e=Re(),t=$.useContext(Bn),n=Xi(!0,!0),r=t&&typeof t.id=="string",o=$.useMemo(()=>Ne.getIsDesktopVersion(r,n),[r,n]),[i,s]=$.useReducer(qb,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:a,menus:l,focusElements:f}=i;Cp({scrollPosition:_O[`height${o.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!o&&l.navigation||Ne.shouldChangeHeaderIsVisible(!0,l,s)},scrollDown:()=>{!o&&l.navigation||Ne.shouldChangeHeaderIsVisible(!1,l,s)}}});const c=(d,u)=>{Ne.handleMenus({id:d,value:u,menus:l,dispatch:s})},h=$.useRef(null);return Hi(()=>{l.navigation&&Ne.autoFocus({menu:"navigation",navigationRef:h,isDesktopVersion:o.navigation,focusElements:f,dispatch:s})},[l.navigation]),Hi(()=>{l.account&&Ne.autoFocus({menu:"account",navigationRef:h,isDesktopVersion:o.navigation,focusElements:f,dispatch:s})},[l.account]),t&&t.isLoading?null:O.jsxs(O.Fragment,{children:[O.jsxs("nav",{id:"header",className:se({"logged-in":r,"logged-out":!r,visible:a}),children:[O.jsx(ot,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),O.jsx(eu,{}),!o.navigation&&O.jsx("button",{className:"menu-button gtm-trackable",onClick:d=>{d.preventDefault(),d.stopPropagation(),c("navigation",!l.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":l.navigation,"aria-controls":"navigation",children:O.jsx(ot,{children:e.formatMessage({id:`header_menu_${l.navigation?"hide":"show"}`})})}),O.jsx("ul",{ref:h,id:"navigation",hidden:o.navigation||l.account?!1:!l.navigation,role:"menu","data-showing":!o.navigation&&l.account?"account":"default",children:Vi.order.map(d=>O.jsx(Yo,{id:d,isLoggedIn:r,isDesktopVersion:o.navigation,menus:{navigation:l.navigation,account:l.account},callback:c},d))}),!o.search&&O.jsx("button",{className:"search toggle-search-button",onClick:d=>{d.preventDefault(),d.stopPropagation(),c("search",!l.search)},"aria-haspopup":"true","aria-expanded":l.search,"aria-controls":"search-form",children:O.jsx(ot,{children:e.formatMessage({id:`header_search_${l.search?"hide":"show"}`})})}),O.jsx(og,{id:"global-search",handleToggle:{searchIsOpen:l.search,isDesktopVersion:o.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),r?O.jsxs("button",{className:"account-button",onClick:d=>Ne.events.onClick(d,{id:"account",callback:c,isOpen:l.account}),onMouseEnter:()=>Ne.events.onMouseEnter({id:"account",callback:c}),onMouseLeave:()=>Ne.events.onBlur({id:"account",callback:c}),"aria-haspopup":"true","aria-expanded":l.account,"aria-controls":"navigation",children:[O.jsx(ot,{children:e.formatMessage({id:`header_account_${l.account?"hide":"show"}`})}),O.jsx(ia,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):O.jsx("ul",{className:"sign-in-buttons",children:Vi.buttons.order.map(d=>O.jsx(Yo,{id:`buttons.${d}`},d))})]}),O.jsx("hr",{id:"content-of-page"}),O.jsx("div",{className:se("overlay",{open:l.navigation||l.account||!o.search&&l.search})})]})},EO=$.createContext(null),Gs={didCatch:!1,error:null};class bO extends $.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Gs}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(Gs)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&wO(t.resetKeys,o)){var i,s;(i=(s=this.props).onReset)===null||i===void 0||i.call(s,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(Gs)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:s}=this.state;let a=t;if(i){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if($.isValidElement(o))a=o;else if(typeof n=="function")a=n(l);else if(r)a=$.createElement(r,l);else throw s}return $.createElement(EO.Provider,{value:{didCatch:i,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}function wO(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}const SO=()=>{const e=Re();return O.jsxs(O.Fragment,{children:[O.jsx(au,{}),O.jsx("div",{className:"content",children:O.jsx(Dm,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),O.jsx(tu,{})]})},TO=({children:e,reportError:t,showFooter:n=!0,background:r="default",className:o="",locale:i="en"})=>{const s=Dp(e,{locale:i});return O.jsx(bO,{onError:t,fallback:O.jsx(SO,{}),children:O.jsx($.Suspense,{fallback:O.jsx(Gm,{layout:"overview-page"}),children:O.jsx("div",{id:"wrapper",className:se(o,{[r]:r!=="default"}),children:O.jsxs(Fg,{children:[O.jsx(au,{}),O.jsx("div",{className:"content",children:s}),n&&O.jsx(tu,{}),O.jsx(tg,{})]})})})})},xd={default:"tags_",headerTopics:"header_topics_topics_"},Ws={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"},xO={getTagDetails:e=>{if(e.includes("topic_")){if(e=Ws.topic[e.replace("topic_","")],e){const t=Vi.topics.topics[e].href;return t?{id:e,href:t,text:`${xd.headerTopics}${e}`}:null}return null}return Ws[e]?(e=Ws[e],{id:e,text:`${xd.default}${e}`}):null}};const OO=({tags:e=[],color:t="default",forceOneLine:n=!1,canHaveLinks:r=!0,className:o="",gtmType:i="tag-click",gtmContext:s="tags"})=>{const a=Re();if(!e||e.length<1)return null;const l=[];return e.forEach(f=>{if(!f)return;const c=xO.getTagDetails(f);c&&l.push(c)}),l.length<1?null:O.jsx("ul",{className:se("tags text-small",t,o,{"one-line":n}),children:l.map(f=>{const c=a.formatMessage({id:f.text});return O.jsx("li",{children:f.href&&r?O.jsx("a",{href:f.href,className:"gtm-trackable","data-gtm-event-type":i,"data-gtm-event-context":s,children:c}):c},f.id)})})},Od=e=>{const t={};return Object.keys(e).forEach(n=>{t[`${n}Slug`]=e[n]}),t};const tr="discussion_",AO=({element:e="div",content:t,isLoading:n=!1,originalAuthorId:r,functions:{content:{createContent:o,deleteContent:i,updateContent:s}={createContent:()=>{},deleteContent:()=>{},updateContent:()=>{}},likes:{createLike:a,deleteLike:l}={createLike:()=>{},deleteLike:()=>{}},comments:{openComments:f}={openComments:()=>{}}},link:c,className:h,gtmContext:d="DiscussionAnswer",locale:u="en",children:p})=>{const m=Re(),E=$.useContext(Bn),T=$.useContext(Zc),[_,b]=$.useState({body:t&&t.body||"",isEditing:!1,didEdit:t&&t.isEdited||!1}),[A,w]=$.useState(!1),[P,F]=$.useState("");if($.useEffect(()=>{b({..._,body:t&&t.body||"",didEdit:t&&t.isEdited||!1})},[t.isEdited]),n||!t||t.type==="answer"&&(!t.slugs||!t.slugs.question))return O.jsx(Er,{className:"discussion-card discussion-post"});const{author:B,createdAt:W,likes:G=0,userLiked:V,comments:H=0}=t,Y=E&&E.id&&typeof B!="string"&&B.id&&B.id===E.id||!1,oe=!Y,K=async ae=>{ae||(ae=""),F("");try{if(!dx(ae,_.body)){const Q=t.type==="question"?{title:ae}:{body:ae};await s(Od(t.slugs),Q)}b({body:ae,isEditing:!1,didEdit:!0})}catch{F(`${tr}form_error`)}},k=()=>{T&&T.updateConversation&&T.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const Q=`reply-form-${(t.type==="answer"?t.slug:t.slugs.answer||"").toLowerCase().slice(-15)}`,Z=document.getElementById(Q),ce=document.getElementById(`${Q}-input`);ce&&ce.focus(),Z&&Z.scrollIntoView({behavior:"smooth"})},0)},z=()=>{try{i(Od(t.slugs))}catch{F("delete-error")}},J=[{text:m.formatMessage({id:`${tr}moreMenu_report`}),href:`mailto:community@apolitical.co?subject=${encodeURI(m.formatMessage({id:`${tr}report_subject`}))}&body=${encodeURI(m.formatMessage({id:`${tr}report_body`},{contentType:t.type||"",contentSlug:t.slug||"",contentUrl:`${window.origin}${typeof process<"u"&&process.env.PUBLIC_URL||""}/${t.slugs.question||""}`}))}`,icon:"flag"}];return Y&&J.push({text:m.formatMessage({id:`${tr}moreMenu_edit`}),onClick:()=>b({..._,isEditing:!0}),icon:"pencil-paper",className:"gtm-trackable","data-gtm-event-context":d,"data-gtm-event-type":`edit-${t.type}-click`},{text:m.formatMessage({id:`${tr}moreMenu_delete`}),onClick:ae=>{ae.preventDefault(),ae.stopPropagation(),w(!0)},icon:"trash",className:"gtm-trackable","data-gtm-event-context":d,"data-gtm-event-type":`delete-${t.type}-click`,...Zm(`delete-${t.slug}-modal`,A)}),$.createElement(e,{className:se("discussion-post",h),"data-testid":`discussion-${t.type}-thread`,children:O.jsxs(O.Fragment,{children:[O.jsxs("div",{className:se("discussion-card",t.type,{editing:_.isEditing}),children:[!_.isEditing&&O.jsx(Jc,{member:B,additionalContent:{createdAt:W,didEdit:_.didEdit},className:typeof B!="string"&&B.id===r?"highlighted":"",gtmContext:d,gtmType:"profile-click"}),_.isEditing?O.jsx(Km,{content:{type:t.type,slugs:t.slugs},meta:{isLoading:n,isInWrapper:!0,isEditing:{text:_.body}},maxLength:t.type==="question"?250:5e4,forceShow:{error:P!==""&&P!=="delete-error"?m.formatMessage({id:P},{action:m.formatMessage({id:`discussion_action_${t.type}`})}):!1},functions:{create:o,handleSaveEdit:K,handleCancel:()=>{F(""),b({..._,isEditing:!1})}},gtmContext:`${d}Form`}):c?O.jsx("a",{href:c,className:"gtm-trackable","data-gtm-event-context":d,"data-gtm-event-type":"title-click",children:O.jsx(bc,{options:{overrides:{a:null}},children:_.body})}):O.jsx(bc,{options:{wrapper:t.type==="question"?"h1":$.Fragment,forceWrapper:t.type==="question",forceInline:t.type==="question",forceBlock:t.type!=="question"},children:_.body}),!_.isEditing&&O.jsxs("ul",{className:se("actions text-medium",t.type),"data-testid":`${t.type}-actions`,children:[O.jsx(Qm,{element:"li",likes:G,isShort:!1,userLiked:V,content:{type:t.type,slugs:t.slugs},canLike:oe,createLike:a,deleteLike:l,locale:u}),t.type==="question"&&O.jsxs("li",{className:"action-button",children:[O.jsx(De,{variant:"tertiary",size:"medium",styling:{muted:!0},icon:{icon:"speech-bubble_square_thick"},href:c||!1,onClick:c||typeof f!="function"?!1:f,className:"gtm-trackable","data-gtm-event-context":d,"data-gtm-event-type":`answer-${t.type}-click`,screenreaderText:m.formatMessage({id:`${tr}comments_screenReader`},{count:H})}),O.jsx("span",{children:m.formatMessage({id:`${tr}comments`},{count:H})})]}),(t.type==="answer"||t.type==="reply")&&O.jsx("li",{children:O.jsx(De,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:k,children:m.formatMessage({id:`${tr}reply`})})}),O.jsx(eg,{element:"li",id:`more-${t.slug}`,options:J})]})]}),p,O.jsx(Jm,{id:`delete-${t.slug}-modal`,isOpen:A,functions:{onOpen:()=>{},onClose:()=>w(!1)},forceShow:{error:P==="delete-error"?m.formatMessage({id:"discussion_delete_error"},{action:m.formatMessage({id:`discussion_action_${t.type}`})}):!1},title:m.formatMessage({id:"discussion_delete_title"},{action:m.formatMessage({id:`discussion_action_${t.type}`})}),buttons:[{variant:"secondary",onClick:()=>w(!1),children:m.formatMessage({id:"discussion_delete_cancel"})},{variant:"primary",className:"destructive",onClick:z,children:m.formatMessage({id:"discussion_delete_delete"})}],gtmContext:`${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,children:O.jsx(vr,{id:"discussion_delete_text",values:{p:ae=>O.jsx("p",{children:ae}),action:m.formatMessage({id:`discussion_action_${t.type}`})}})})]})})};const Vs="discussion_responses_",CO=({type:e="answer",responses:t=0})=>{const n=Re();return O.jsxs("div",{className:"responses-heading",children:[O.jsx("h3",{children:n.formatMessage({id:`${Vs}title`},{action:n.formatMessage({id:`${Vs}${e}`}),count:t})}),t===0&&O.jsx("p",{children:rr(n.formatMessage,`${Vs}empty`,e,e)})]})};const RO=({isOpen:e=!1,count:t=0,children:n})=>{const r=Re(),o=$.useRef(null),[i,s]=$.useState(e),[a,l]=$.useState("closed");$.useEffect(()=>{const d=o.current;if(d)return d.addEventListener("transitionend",f),()=>{d.removeEventListener("transitionend",f)}},[]),Hi(()=>{a==="closed"&&!i||l(["opening","open"].includes(a)?"ready-to-close":"opening")},[i]),$.useEffect(()=>{a==="ready-to-close"&&l("closing")},[a]);const f=({propertyName:d})=>{d==="max-height"&&l(u=>u==="opening"?"open":u==="closing"?"closed":u)},c=["opening","open"].includes(a),h=Dp(n,{element:"li"});return O.jsxs("div",{className:"thread-wrapper",children:[O.jsx(De,{variant:"secondary",size:"small",styling:{muted:!0},icon:{icon:`arrow_corner-down_${c?"left":"right"}`},onClick:()=>{s(!i)},children:r.formatMessage({id:`discussion_thread_${c?"hide":"show"}`},{count:t})}),O.jsx("ul",{ref:o,className:se("thread",a),hidden:!i,children:h})]})};exports.ASSETS_BUCKET=Go;exports.BannerSection=tw;exports.Button=De;exports.ButtonWrapper=Ji;exports.CollapsibleSection=Yc;exports.Columns=gx;exports.CommunityDetails=WT;exports.Contributors=Vm;exports.ConversationContext=Zc;exports.CookieBanner=tg;exports.DiscussionConversation=zT;exports.DiscussionForm=Km;exports.DiscussionLikes=Qm;exports.DiscussionPost=AO;exports.DiscussionThread=RO;exports.Divider=qo;exports.DownloadSection=Xb;exports.EmailHelperTextBox=yx;exports.EmptyStateBox=Dm;exports.Filters=hx;exports.Footer=tu;exports.FullWidthSection=qc;exports.Header=au;exports.HelperTextBox=jm;exports.HiddenFromScreenReaders=Tc;exports.HideShowTextBox=RT;exports.HighlightedTextBox=or;exports.IntlProvider=qT;exports.JoinButton=zm;exports.Link=$p;exports.LoadMore=px;exports.LoadingBlock=$T;exports.LoadingPlaceholder=Er;exports.LoadingState=Gm;exports.Logo=eu;exports.LogoSection=Jb;exports.MarkdownText=bc;exports.MarketingBox=rw;exports.Member=Jc;exports.Modal=Xm;exports.MoreMenu=eg;exports.NUMBER_OF_USERS=xS;exports.Overlay=Jm;exports.PageLayout=TO;exports.PasswordRules=Ex;exports.Pill=FT;exports.ProfilePicture=ia;exports.ProgressBar=Hm;exports.Rating=bx;exports.ResponsesHeading=CO;exports.ResponsiveImage=jp;exports.SearchForm=og;exports.StatusBanner=Wo;exports.Tags=OO;exports.UserContext=Bn;exports.UserProvider=GT;exports.VisuallyHidden=ot;exports.addAriaProps=Zm;exports.getMember=Xc;exports.headerData=Vi;exports.useEffectAfterMount=Hi;exports.useFeatureFlag=UE;exports.useScreenWidth=Xi;exports.useScrollListener=Cp;