@apolitical/component-library 1.9.5-beta.2 → 1.10.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,69 @@
1
+ "use strict";var Ba=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var b=(e,t,n)=>(Ba(e,t,"read from private field"),n?n.call(e):t.get(e)),F=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},$=(e,t,n,r)=>(Ba(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Hs=(e,t,n,r)=>({set _(i){$(e,t,i,n)},get _(){return b(e,t,r)}}),X=(e,t,n)=>(Ba(e,t,"access private method"),n);const C=require("react"),v=require("react/jsx-runtime");function Wp(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 Q=Wp(C);var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zd={exports:{}};/*!
2
+ Copyright (c) 2018 Jed Watson.
3
+ Licensed under the MIT License (MIT), see
4
+ http://jedwatson.github.io/classnames
5
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var s=arguments[i];if(s){var o=typeof s;if(o==="string"||o==="number")r.push(s);else if(Array.isArray(s)){if(s.length){var a=n.apply(null,s);a&&r.push(a)}}else if(o==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){r.push(s.toString());continue}for(var l in s)t.call(s,l)&&s[l]&&r.push(l)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Zd);var Xp=Zd.exports;const L=fi(Xp),Yp=({element:e="span",showOnFocus:t=!0,children:n,...r})=>C.createElement(e,{...r,className:L("hidden",{"show-on-focus":t}),children:n}),ze=C.memo(Yp),Jp=({element:e="span",children:t=null,...n})=>C.createElement(e,{...n,"aria-hidden":!0},t),xc=C.memo(Jp),ef=()=>{const[e,t]=C.useState(window.location.pathname),n=()=>{const r=window.location.pathname;t(r)};return C.useEffect(()=>(window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n)}),[]),e},lr=(e,t)=>{const n=C.useRef(!1);C.useEffect(()=>{n.current?e():n.current=!0},t)};function Kp(e,t,n){var r=this,i=C.useRef(null),s=C.useRef(0),o=C.useRef(null),a=C.useRef([]),l=C.useRef(),u=C.useRef(),c=C.useRef(e),h=C.useRef(!0);C.useEffect(function(){c.current=e},[e]);var m=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var f=!!(n=n||{}).leading,p=!("trailing"in n)||!!n.trailing,g="maxWait"in n,x=g?Math.max(+n.maxWait||0,t):null;C.useEffect(function(){return h.current=!0,function(){h.current=!1}},[]);var S=C.useMemo(function(){var k=function(E){var I=a.current,R=l.current;return a.current=l.current=null,s.current=E,u.current=c.current.apply(R,I)},T=function(E,I){m&&cancelAnimationFrame(o.current),o.current=m?requestAnimationFrame(E):setTimeout(E,I)},P=function(E){if(!h.current)return!1;var I=E-i.current;return!i.current||I>=t||I<0||g&&E-s.current>=x},y=function(E){return o.current=null,p&&a.current?k(E):(a.current=l.current=null,u.current)},O=function E(){var I=Date.now();if(P(I))return y(I);if(h.current){var R=t-(I-i.current),N=g?Math.min(R,x-(I-s.current)):R;T(E,N)}},M=function(){var E=Date.now(),I=P(E);if(a.current=[].slice.call(arguments),l.current=r,i.current=E,I){if(!o.current&&h.current)return s.current=i.current,T(O,t),f?k(i.current):u.current;if(g)return T(O,t),k(i.current)}return o.current||T(O,t),u.current};return M.cancel=function(){o.current&&(m?cancelAnimationFrame(o.current):clearTimeout(o.current)),s.current=0,a.current=i.current=l.current=o.current=null},M.isPending=function(){return!!o.current},M.flush=function(){return o.current?y(Date.now()):u.current},M},[f,g,t,x,p,m]);return S}function tf(e,t,n){var r=n===void 0?{}:n,i=r.leading,s=r.trailing;return Kp(e,t,{maxWait:t,leading:i===void 0||i,trailing:s===void 0||s})}let Ha;const ms=(e=!0,t=!1)=>{if(!e)return;const[n,r]=C.useState(0)||[!1,()=>{}];C.useEffect(()=>(s(),window.addEventListener("resize",o),()=>{clearTimeout(Ha),o.flush(),window.removeEventListener("resize",o)}),[]);const i=()=>window.innerWidth,s=()=>{r(i())},o=tf(()=>{i()!==n&&(t&&(clearTimeout(Ha),document.body.classList.add("is-resizing"),Ha=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),s())},500,{leading:!0});return n},nf=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:n=()=>{},scrollUp:r=()=>{}}})=>{if(!window)return;const[i,s]=C.useState({current:0,past:0})||[!1,()=>{}],[o,a]=C.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];C.useEffect(()=>(l(),window.addEventListener("scroll",u),()=>{u.flush(),window.removeEventListener("scroll",u)}),[]);const l=()=>{const c=window.scrollY,h=i.current,m=c-h,f=m>0?"down":"up";if(s({current:c,past:h}),f==="down"){c>=e+t.down&&!o.scrollDown&&(!o.scrollUp||m>t.up)&&(n(),a({scrollUp:!1,scrollDown:!0}));return}Math.abs(m)>=t.up&&!o.scrollUp&&(r(),a({scrollUp:!0,scrollDown:!1}))},u=tf(()=>{l()},250);return i},Zp=(e=[],t=!0)=>{e=Array.isArray(e)?e:[e];const n=C.useRef(!1);lr(()=>{if(window&&window.location&&window.location.hash){if(n.current)return;const r=document.getElementById(window.location.hash.replace("#",""));r&&(r.scrollIntoView(t?{behavior:"smooth"}:null),n.current=!0)}},e)};var po={exports:{}};po.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",u="[object Error]",c="[object Function]",h="[object GeneratorFunction]",m="[object Map]",f="[object Number]",p="[object Object]",g="[object Promise]",x="[object RegExp]",S="[object Set]",k="[object String]",T="[object Symbol]",P="[object WeakMap]",y="[object ArrayBuffer]",O="[object DataView]",M="[object Float32Array]",E="[object Float64Array]",I="[object Int8Array]",R="[object Int16Array]",N="[object Int32Array]",z="[object Uint8Array]",Y="[object Uint8ClampedArray]",q="[object Uint16Array]",ae="[object Uint32Array]",ge=/[\\^$.*+?()[\]{}|]/g,Se=/\w*$/,ve=/^\[object .+?Constructor\]$/,ye=/^(?:0|[1-9]\d*)$/,V={};V[s]=V[o]=V[y]=V[O]=V[a]=V[l]=V[M]=V[E]=V[I]=V[R]=V[N]=V[m]=V[f]=V[p]=V[x]=V[S]=V[k]=V[T]=V[z]=V[Y]=V[q]=V[ae]=!0,V[u]=V[c]=V[P]=!1;var Z=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,ce=typeof self=="object"&&self&&self.Object===Object&&self,ue=Z||ce||Function("return this")(),Te=t&&!t.nodeType&&t,ee=Te&&!0&&e&&!e.nodeType&&e,Ke=ee&&ee.exports===Te;function Ln(d,_){return d.set(_[0],_[1]),d}function Ze(d,_){return d.add(_),d}function hn(d,_){for(var w=-1,A=d?d.length:0;++w<A&&_(d[w],w,d)!==!1;);return d}function et(d,_){for(var w=-1,A=_.length,W=d.length;++w<A;)d[W+w]=_[w];return d}function Xt(d,_,w,A){var W=-1,G=d?d.length:0;for(A&&G&&(w=d[++W]);++W<G;)w=_(w,d[W],W,d);return w}function D(d,_){for(var w=-1,A=Array(d);++w<d;)A[w]=_(w);return A}function _t(d,_){return d==null?void 0:d[_]}function pt(d){var _=!1;if(d!=null&&typeof d.toString!="function")try{_=!!(d+"")}catch{}return _}function Ot(d){var _=-1,w=Array(d.size);return d.forEach(function(A,W){w[++_]=[W,A]}),w}function pn(d,_){return function(w){return d(_(w))}}function mn(d){var _=-1,w=Array(d.size);return d.forEach(function(A){w[++_]=A}),w}var Zo=Array.prototype,ea=Function.prototype,yr=Object.prototype,_i=ue["__core-js_shared__"],Ss=function(){var d=/[^.]+$/.exec(_i&&_i.keys&&_i.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}(),Es=ea.toString,Mt=yr.hasOwnProperty,br=yr.toString,ta=RegExp("^"+Es.call(Mt).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dn=Ke?ue.Buffer:void 0,wr=ue.Symbol,yi=ue.Uint8Array,yt=pn(Object.getPrototypeOf,Object),ks=Object.create,Ts=yr.propertyIsEnumerable,na=Zo.splice,bi=Object.getOwnPropertySymbols,xr=Dn?Dn.isBuffer:void 0,Cs=pn(Object.keys,Object),Sr=Pt(ue,"DataView"),Bn=Pt(ue,"Map"),Ct=Pt(ue,"Promise"),Er=Pt(ue,"Set"),wi=Pt(ue,"WeakMap"),Hn=Pt(Object,"create"),xi=tt(Sr),Un=tt(Bn),Si=tt(Ct),Ei=tt(Er),ki=tt(wi),gn=wr?wr.prototype:void 0,Ps=gn?gn.valueOf:void 0;function Yt(d){var _=-1,w=d?d.length:0;for(this.clear();++_<w;){var A=d[_];this.set(A[0],A[1])}}function ra(){this.__data__=Hn?Hn(null):{}}function ia(d){return this.has(d)&&delete this.__data__[d]}function sa(d){var _=this.__data__;if(Hn){var w=_[d];return w===r?void 0:w}return Mt.call(_,d)?_[d]:void 0}function As(d){var _=this.__data__;return Hn?_[d]!==void 0:Mt.call(_,d)}function Ti(d,_){var w=this.__data__;return w[d]=Hn&&_===void 0?r:_,this}Yt.prototype.clear=ra,Yt.prototype.delete=ia,Yt.prototype.get=sa,Yt.prototype.has=As,Yt.prototype.set=Ti;function Le(d){var _=-1,w=d?d.length:0;for(this.clear();++_<w;){var A=d[_];this.set(A[0],A[1])}}function oa(){this.__data__=[]}function aa(d){var _=this.__data__,w=Tr(_,d);if(w<0)return!1;var A=_.length-1;return w==A?_.pop():na.call(_,w,1),!0}function la(d){var _=this.__data__,w=Tr(_,d);return w<0?void 0:_[w][1]}function ca(d){return Tr(this.__data__,d)>-1}function ua(d,_){var w=this.__data__,A=Tr(w,d);return A<0?w.push([d,_]):w[A][1]=_,this}Le.prototype.clear=oa,Le.prototype.delete=aa,Le.prototype.get=la,Le.prototype.has=ca,Le.prototype.set=ua;function qe(d){var _=-1,w=d?d.length:0;for(this.clear();++_<w;){var A=d[_];this.set(A[0],A[1])}}function da(){this.__data__={hash:new Yt,map:new(Bn||Le),string:new Yt}}function fa(d){return zn(this,d).delete(d)}function ha(d){return zn(this,d).get(d)}function pa(d){return zn(this,d).has(d)}function ma(d,_){return zn(this,d).set(d,_),this}qe.prototype.clear=da,qe.prototype.delete=fa,qe.prototype.get=ha,qe.prototype.has=pa,qe.prototype.set=ma;function lt(d){this.__data__=new Le(d)}function ga(){this.__data__=new Le}function va(d){return this.__data__.delete(d)}function _a(d){return this.__data__.get(d)}function ya(d){return this.__data__.has(d)}function ba(d,_){var w=this.__data__;if(w instanceof Le){var A=w.__data__;if(!Bn||A.length<n-1)return A.push([d,_]),this;w=this.__data__=new qe(A)}return w.set(d,_),this}lt.prototype.clear=ga,lt.prototype.delete=va,lt.prototype.get=_a,lt.prototype.has=ya,lt.prototype.set=ba;function kr(d,_){var w=Oi(d)||Pr(d)?D(d.length,String):[],A=w.length,W=!!A;for(var G in d)(_||Mt.call(d,G))&&!(W&&(G=="length"||Fa(G,A)))&&w.push(G);return w}function Os(d,_,w){var A=d[_];(!(Mt.call(d,_)&&Rs(A,w))||w===void 0&&!(_ in d))&&(d[_]=w)}function Tr(d,_){for(var w=d.length;w--;)if(Rs(d[w][0],_))return w;return-1}function It(d,_){return d&&Ai(_,Ii(_),d)}function Ci(d,_,w,A,W,G,ne){var le;if(A&&(le=G?A(d,W,G,ne):A(d)),le!==void 0)return le;if(!Ft(d))return d;var Pe=Oi(d);if(Pe){if(le=Ia(d),!_)return Aa(d,le)}else{var fe=Kt(d),Ve=fe==c||fe==h;if(js(d))return Cr(d,_);if(fe==p||fe==s||Ve&&!G){if(pt(d))return G?d:{};if(le=$t(Ve?{}:d),!_)return Oa(d,It(le,d))}else{if(!V[fe])return G?d:{};le=$a(d,fe,Ci,_)}}ne||(ne=new lt);var ct=ne.get(d);if(ct)return ct;if(ne.set(d,le),!Pe)var $e=w?Ma(d):Ii(d);return hn($e||d,function(Qe,De){$e&&(De=Qe,Qe=d[De]),Os(le,De,Ci(Qe,_,w,A,De,d,ne))}),le}function wa(d){return Ft(d)?ks(d):{}}function xa(d,_,w){var A=_(d);return Oi(d)?A:et(A,w(d))}function Sa(d){return br.call(d)}function Ea(d){if(!Ft(d)||ja(d))return!1;var _=Mi(d)||pt(d)?ta:ve;return _.test(tt(d))}function ka(d){if(!$s(d))return Cs(d);var _=[];for(var w in Object(d))Mt.call(d,w)&&w!="constructor"&&_.push(w);return _}function Cr(d,_){if(_)return d.slice();var w=new d.constructor(d.length);return d.copy(w),w}function Pi(d){var _=new d.constructor(d.byteLength);return new yi(_).set(new yi(d)),_}function Gn(d,_){var w=_?Pi(d.buffer):d.buffer;return new d.constructor(w,d.byteOffset,d.byteLength)}function Ms(d,_,w){var A=_?w(Ot(d),!0):Ot(d);return Xt(A,Ln,new d.constructor)}function Is(d){var _=new d.constructor(d.source,Se.exec(d));return _.lastIndex=d.lastIndex,_}function Ta(d,_,w){var A=_?w(mn(d),!0):mn(d);return Xt(A,Ze,new d.constructor)}function Ca(d){return Ps?Object(Ps.call(d)):{}}function Pa(d,_){var w=_?Pi(d.buffer):d.buffer;return new d.constructor(w,d.byteOffset,d.length)}function Aa(d,_){var w=-1,A=d.length;for(_||(_=Array(A));++w<A;)_[w]=d[w];return _}function Ai(d,_,w,A){w||(w={});for(var W=-1,G=_.length;++W<G;){var ne=_[W],le=A?A(w[ne],d[ne],ne,w,d):void 0;Os(w,ne,le===void 0?d[ne]:le)}return w}function Oa(d,_){return Ai(d,Jt(d),_)}function Ma(d){return xa(d,Ii,Jt)}function zn(d,_){var w=d.__data__;return Ra(_)?w[typeof _=="string"?"string":"hash"]:w.map}function Pt(d,_){var w=_t(d,_);return Ea(w)?w:void 0}var Jt=bi?pn(bi,Object):La,Kt=Sa;(Sr&&Kt(new Sr(new ArrayBuffer(1)))!=O||Bn&&Kt(new Bn)!=m||Ct&&Kt(Ct.resolve())!=g||Er&&Kt(new Er)!=S||wi&&Kt(new wi)!=P)&&(Kt=function(d){var _=br.call(d),w=_==p?d.constructor:void 0,A=w?tt(w):void 0;if(A)switch(A){case xi:return O;case Un:return m;case Si:return g;case Ei:return S;case ki:return P}return _});function Ia(d){var _=d.length,w=d.constructor(_);return _&&typeof d[0]=="string"&&Mt.call(d,"index")&&(w.index=d.index,w.input=d.input),w}function $t(d){return typeof d.constructor=="function"&&!$s(d)?wa(yt(d)):{}}function $a(d,_,w,A){var W=d.constructor;switch(_){case y:return Pi(d);case a:case l:return new W(+d);case O:return Gn(d,A);case M:case E:case I:case R:case N:case z:case Y:case q:case ae:return Pa(d,A);case m:return Ms(d,A,w);case f:case k:return new W(d);case x:return Is(d);case S:return Ta(d,A,w);case T:return Ca(d)}}function Fa(d,_){return _=_??i,!!_&&(typeof d=="number"||ye.test(d))&&d>-1&&d%1==0&&d<_}function Ra(d){var _=typeof d;return _=="string"||_=="number"||_=="symbol"||_=="boolean"?d!=="__proto__":d===null}function ja(d){return!!Ss&&Ss in d}function $s(d){var _=d&&d.constructor,w=typeof _=="function"&&_.prototype||yr;return d===w}function tt(d){if(d!=null){try{return Es.call(d)}catch{}try{return d+""}catch{}}return""}function Fs(d){return Ci(d,!0,!0)}function Rs(d,_){return d===_||d!==d&&_!==_}function Pr(d){return Na(d)&&Mt.call(d,"callee")&&(!Ts.call(d,"callee")||br.call(d)==s)}var Oi=Array.isArray;function Ar(d){return d!=null&&Ns(d.length)&&!Mi(d)}function Na(d){return Ls(d)&&Ar(d)}var js=xr||Da;function Mi(d){var _=Ft(d)?br.call(d):"";return _==c||_==h}function Ns(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=i}function Ft(d){var _=typeof d;return!!d&&(_=="object"||_=="function")}function Ls(d){return!!d&&typeof d=="object"}function Ii(d){return Ar(d)?kr(d):ka(d)}function La(){return[]}function Da(){return!1}e.exports=Fs})(po,po.exports);var em=po.exports;const tm=fi(em);var nm="Expected a function",rf="__lodash_hash_undefined__",sf=1/0,rm=9007199254740991,im="[object Function]",sm="[object GeneratorFunction]",om="[object Symbol]",am=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lm=/^\w*$/,cm=/^\./,um=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dm=/[\\^$.*+?()[\]{}|]/g,fm=/\\(\\)?/g,hm=/^\[object .+?Constructor\]$/,pm=/^(?:0|[1-9]\d*)$/,mm=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,gm=typeof self=="object"&&self&&self.Object===Object&&self,Sc=mm||gm||Function("return this")();function vm(e,t){return e==null?void 0:e[t]}function _m(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var ym=Array.prototype,bm=Function.prototype,of=Object.prototype,Ua=Sc["__core-js_shared__"],du=function(){var e=/[^.]+$/.exec(Ua&&Ua.keys&&Ua.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),af=bm.toString,Do=of.hasOwnProperty,lf=of.toString,wm=RegExp("^"+af.call(Do).replace(dm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fu=Sc.Symbol,xm=ym.splice,Sm=cf(Sc,"Map"),zi=cf(Object,"create"),hu=fu?fu.prototype:void 0,pu=hu?hu.toString:void 0;function cr(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 Em(){this.__data__=zi?zi(null):{}}function km(e){return this.has(e)&&delete this.__data__[e]}function Tm(e){var t=this.__data__;if(zi){var n=t[e];return n===rf?void 0:n}return Do.call(t,e)?t[e]:void 0}function Cm(e){var t=this.__data__;return zi?t[e]!==void 0:Do.call(t,e)}function Pm(e,t){var n=this.__data__;return n[e]=zi&&t===void 0?rf:t,this}cr.prototype.clear=Em;cr.prototype.delete=km;cr.prototype.get=Tm;cr.prototype.has=Cm;cr.prototype.set=Pm;function hi(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 Am(){this.__data__=[]}function Om(e){var t=this.__data__,n=Bo(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():xm.call(t,n,1),!0}function Mm(e){var t=this.__data__,n=Bo(t,e);return n<0?void 0:t[n][1]}function Im(e){return Bo(this.__data__,e)>-1}function $m(e,t){var n=this.__data__,r=Bo(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}hi.prototype.clear=Am;hi.prototype.delete=Om;hi.prototype.get=Mm;hi.prototype.has=Im;hi.prototype.set=$m;function gr(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 Fm(){this.__data__={hash:new cr,map:new(Sm||hi),string:new cr}}function Rm(e){return Ho(this,e).delete(e)}function jm(e){return Ho(this,e).get(e)}function Nm(e){return Ho(this,e).has(e)}function Lm(e,t){return Ho(this,e).set(e,t),this}gr.prototype.clear=Fm;gr.prototype.delete=Rm;gr.prototype.get=jm;gr.prototype.has=Nm;gr.prototype.set=Lm;function Dm(e,t,n){var r=e[t];(!(Do.call(e,t)&&uf(r,n))||n===void 0&&!(t in e))&&(e[t]=n)}function Bo(e,t){for(var n=e.length;n--;)if(uf(e[n][0],t))return n;return-1}function Bm(e){if(!mo(e)||Qm(e))return!1;var t=Jm(e)||_m(e)?wm:hm;return t.test(Ym(e))}function Hm(e,t,n,r){if(!mo(e))return e;t=qm(t,e)?[t]:Gm(t);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var l=Xm(t[i]),u=n;if(i!=o){var c=a[l];u=r?r(c,l,a):void 0,u===void 0&&(u=mo(c)?c:zm(t[i+1])?[]:{})}Dm(a,l,u),a=a[l]}return e}function Um(e){if(typeof e=="string")return e;if(kc(e))return pu?pu.call(e):"";var t=e+"";return t=="0"&&1/e==-sf?"-0":t}function Gm(e){return df(e)?e:Wm(e)}function Ho(e,t){var n=e.__data__;return Vm(t)?n[typeof t=="string"?"string":"hash"]:n.map}function cf(e,t){var n=vm(e,t);return Bm(n)?n:void 0}function zm(e,t){return t=t??rm,!!t&&(typeof e=="number"||pm.test(e))&&e>-1&&e%1==0&&e<t}function qm(e,t){if(df(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||kc(e)?!0:lm.test(e)||!am.test(e)||t!=null&&e in Object(t)}function Vm(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Qm(e){return!!du&&du in e}var Wm=Ec(function(e){e=Zm(e);var t=[];return cm.test(e)&&t.push(""),e.replace(um,function(n,r,i,s){t.push(i?s.replace(fm,"$1"):r||n)}),t});function Xm(e){if(typeof e=="string"||kc(e))return e;var t=e+"";return t=="0"&&1/e==-sf?"-0":t}function Ym(e){if(e!=null){try{return af.call(e)}catch{}try{return e+""}catch{}}return""}function Ec(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(nm);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o),o};return n.cache=new(Ec.Cache||gr),n}Ec.Cache=gr;function uf(e,t){return e===t||e!==e&&t!==t}var df=Array.isArray;function Jm(e){var t=mo(e)?lf.call(e):"";return t==im||t==sm}function mo(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Km(e){return!!e&&typeof e=="object"}function kc(e){return typeof e=="symbol"||Km(e)&&lf.call(e)==om}function Zm(e){return e==null?"":Um(e)}function eg(e,t,n){return e==null?e:Hm(e,t,n)}var tg=eg;const ng=fi(tg),rg=(e,t)=>{Array.isArray(t)||(t=[t]);const n=tm(e);return t.forEach(({type:r,value:i})=>{ng(n,r,i)}),n},ff=e=>{const t=[];return e.forEach(n=>{const r=parseInt(n);isNaN(r)||t.push(r)}),t.sort((n,r)=>n-r)},hf=(e,t,n)=>{let r=n.mobile;for(const i in t){const s=parseInt(String(t[i]));if(e>=s)r=n[s];else if(e<s)break}return r},ig=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),sg=e=>{let s;try{s=new Date().getTime()-new Date(e).getTime()}catch{return""}const o=s/36e5,a=Math.floor(s/864e5);if(a<1)return o<1?{path:"now"}:{path:"hours",number:Math.floor(o)};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)}},og=e=>new Promise(t=>setTimeout(t,e)),Tc={apolitical:"Apolitical",breadcrumbs_label:"Go back to:",breadcrumbs_currentPage:"Current page:",card_bootcamp:"Email boot camp",card_ended:"Ended",card_registered:"Registered",card_answers:"{number, plural, =0 {0 answers} one {# answer} other {# answers}}",card_time_ago:"{time} ago",card_time_read:"{time} min read",card_watch:"Watch recording",card_cta_people:"View profile",collapsibleSection_summary:"Find out more",communityDetails_members:"Members",communityDetails_viewAll:"View all",communityDetails_invite:"Invite colleagues",community_joinToPost:"Join community to create a post.",contactFooter_title:"Contact us",contactFooter_text:"We're always open to new ideas, so please reach out to see how we can collaborate.",contactFooter_phone:"+44 203 608 2241",contactFooter_email:"hello@apolitical.co",contactForm_name:"Name",contactForm_email:"Email address",contactForm_organisation:"Government department or organisation",contactForm_interests:"I'm interested in",contactForm_interests_publishingCourse:"Publishing or creating a course",contactForm_interests_buyingCourse:"Buying courses for my team",contactForm_interests_learningExperience:"Customised learning experiences",contactForm_interests_somethingElse:"Something else",contactForm_message:"Message",cookieBanner_title:"Cookies and your privacy",cookieBanner_text:"We take your trust and privacy very seriously. Apolitical uses safe cookies (small files on your device) to run the site. You can reject non-essential cookies, but some site features may not work without them.",cookieBanner_buttons_settings:"Change my settings",cookieBanner_buttons_reject:"Reject all",cookieBanner_buttons_accept:"Accept all",dates_now:"now",dates_hours:"{number}h",dates_days:"{number}d",dates_weeks:"{number}w",dates_years:"{number}y",discussion_action_answer:"answer",discussion_action_comment:"comment",discussion_action_post:"post",discussion_action_response:"response",discussion_action_reply:"reply",discussion_action_question:"question",discussion_edited:"Edited",discussion_delete_title:"Delete {action}",discussion_delete_text:"<p>Are you sure you want to delete your {action}?</p><p>This can't be undone.</p>",discussion_delete_cancel:"Cancel",discussion_delete_delete:"Delete",discussion_delete_error:"We are unable to delete your {action} at the moment. Please try again later or contact us if problem persists.",discussion_reply:"Reply",discussion_report_subject:"Report a post on Apolitical",discussion_report_body:`I'd like to report the {contentType} <{contentSlug}> at {contentUrl}.
6
+
7
+ 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.
8
+
9
+ Thank you for helping to protect the Apolitical community from abusive content.`,discussion_form_title:"Write your {action}",discussion_form_placeholder:"Type your {action} here...",discussion_form_label:"Your {action}",discussion_form_explainer:"Try to make your {action} specific and practical. Be respectful and kind. See our <a>community guidelines</a>",discussion_form_success:"Your {action} has been submitted.",discussion_form_post:"Post",discussion_form_posting:"Posting...",discussion_form_save:"Save",discussion_form_saving:"Saving...",discussion_form_cancel:"Cancel",discussion_form_submitting:"Submitting...",discussion_form_placeholder_post:"Write something...",discussion_form_error:"We are unable to process your {action} right now. Please try again later or contact us if the problem persists",discussion_form_error_tooLong:"Please keep your content to {maxLength, plural, one {1 character} other {# characters}}.",discussion_form_error_tooMany:"You have posted too many times in a row. Please wait and try again.",discussion_form_error_loggedOut:"Please log in to submit your {action}.",discussion_form_error_noPermission:"You do not have permission to {action}.",discussion_form_error_alreadyExists:"This {action} already exists.",discussion_form_title_question:"Start a conversation",discussion_form_placeholder_question:"Ask your question here",discussion_form_explainer_question:"Unsure what you can post? See our <a>community guidelines</a>.",discussion_likes:"{number, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_likes_short:"{number}",discussion_likes_more:"and {number} more...",discussion_likes_like:"Like this {action}",discussion_likes_unlike:"Unlike {action}",discussion_moreMenu_edit:"Edit",discussion_moreMenu_delete:"Delete",discussion_moreMenu_report:"Report",discussion_comments_screenReader:"See {count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_comments:"{count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_responses_answer:"Answers",discussion_responses_comment:"Comments",discussion_responses_title:"{action} ({count})",discussion_responses_empty:"Be the first to respond",discussion_responses_empty_answer:"Be the first to answer this question",discussion_thread_show:"Show {count, plural, =0 {replies} one {# reply} other {# replies}}",discussion_thread_hide:"Hide replies",emailHelperTextBox_fallback_title:"Who can join",emailHelperTextBox_fallback_text:"Apolitical is a private community for public servants and policymakers.",emailHelperTextBox_default_title:"Who can join",emailHelperTextBox_default_text:"Apolitical is a private community for public servants and policymakers. <link>Learn more</link>.",emailHelperTextBox_autoApproved_title:"Email check",emailHelperTextBox_autoApproved_text:"Great! Looks like you are using a **government email domain we recognise.** You will be **auto-approved** once you sign up.",emailHelperTextBox_unrecognisedEmail_title:"Not a recognised government email",emailHelperTextBox_unrecognisedEmail_text:"To confirm you work in government or policy, please add more details below. <link>Learn more</link>.",emailHelperTextBox_pendingApproval_title:"Email is pending approval",emailHelperTextBox_pendingApproval_text:"Looks like this email has been used to sign up to Apolitical before, but <strong>we have not yet approved it.</strong> If you cannot wait to join, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_emailUnverified_title:"Hello again!",emailHelperTextBox_emailUnverified_text:"It looks like you're already an Apolitical member. To access your account, please verify your email address. <link>Click here to get a verification code sent to your email</link>.",emailHelperTextBox_emailAlreadyExists_title:"Email is already registered",emailHelperTextBox_emailAlreadyExists_text:"Looks like this email has been used to sign up to Apolitical before, try <link>logging in</link> instead. If you're still having issues, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_error_verificationFailedToSend_title:"Verification code failed to send",emailHelperTextBox_error_verificationFailedToSend_text:"Error details: <em>{error}</em>{br}<link>Click here to try again</link>.{br}If you continue to have problems, contact us at <mail>concierge@apolitical.co</mail>",emailHelperTextBox_error_noFunction:"Cannot resend verification code.",filters_all:"Show all",filters_disabled:"{name} - no results",footer_platform:"Platform",footer_platform_events:"Events",footer_platform_courses:"Courses",footer_platform_qanda:"Q&A",footer_platform_articles:"Articles",footer_community:"Community",footer_community_support:"Support FAQ",footer_community_post:"Post on Apolitical",footer_community_join:"Who can join",footer_community_guidelines:"Guidelines & values",footer_company:"Company",footer_company_story:"Our story",footer_company_team:"Meet our team",footer_company_careers:"Careers",footer_company_partner:"Partner with us",footer_company_contact:"Get in touch",footer_legal:"Legal",footer_legal_privacy:"Privacy policy",footer_legal_terms:"Terms & conditions",footer_legal_cookie:"Cookie policy",footer_legal_accessibility:"Accessibility statement",footer_legal_dataProtection:"Data protection officer",footer_legal_euDataProtection:"EU data protection officer",footer_contact:"Contact",footer_contact_correspondence:"Correspondence address",footer_contact_correspondence_address:"251 Southwark Bridge Road{br}London, SE1 6FL{br}United Kingdom",footer_contact_registered:"Registered address",footer_contact_registered_address:"20–22 Wenlock Road{br}London, N1 7GU{br}United Kingdom",footer_contact_berlin:"Berlin address",footer_contact_berlin_address:"Torstraße 220{br}10115 Berlin{br}Germany",footer_contact_support:"For platform support",footer_contact_business:"For business inquiries",footer_social_linkedin:"LinkedIn",footer_social_twitter:"Twitter",footer_social_facebook:"Facebook",footer_copyright:"Copyright © {currentYear} Apolitical Group Limited",form_fieldWrapper_required:"required",form_fieldWrapper_characterLimit:"Character limit:",form_error_generalError:"Sorry, something has gone. Please refresh the page and try again.",form_error_required:"Please fill in this required field",form_error_numbers:"Numbers are not allowed in this text field",form_error_email:"Please enter a valid email address",form_error_url:"Please enter a valid URL",form_submit:"Submit",form_submitting:"Submitting form...",form_submitted:"Submitted",header_skip:"Skip to main content",header_search_show:"Show search bar",header_search_hide:"Close search bar",header_menu_show:"Show navigation",header_menu_hide:"Close navigation",header_home_loggedOut:"Home",header_home_loggedIn:"My Home",header_topics:"Topics",header_topics_explore:"Explore",header_topics_explore_events:"Events",header_topics_explore_courses:"Courses","header_topics_explore_q-and-a":"Q&A",header_topics_explore_articles:"Articles",header_topics_topics:"Topics",header_topics_topics_climate:"Climate","header_topics_topics_cities-and-local-government":"Cities and local government","header_topics_topics_digital-and-data":"Digital and data",header_topics_topics_education:"Education","header_topics_topics_equity-justice-and-inclusion":"Equity, justice and inclusion","header_topics_topics_health-and-social-care":"Health and social care",header_topics_topics_innovation:"Innovation","header_topics_topics_leadership-and-skills":"Leadership and skills","header_topics_topics_life-in-government":"Life in government",header_topics_topics_policymaking:"Policymaking","header_topics_topics_transport-and-infrastructure":"Transport and infrastructure","header_topics_topics_work-and-the-economy":"Work and the economy",header_partners:"For partners",header_account:"My account",header_account_show:"Show account menu",header_account_hide:"Close account menu",header_account_profile:"My profile",header_account_settings:"Settings & privacy","header_account_log-out":"Log out",header_buttons_login:"Log in",header_buttons_signup:"Sign up",hideShowTextBox_hide:"View less",hideShowTextBox_show:"View more",joinCommunityButton:"Join community",joinCommunityButton_short:"Join",joinCommunityButton_joining:"Joining...",joinCommunityButton_member:"Member",joinCommunityButton_member_aria:"Leave community",joinCommunityButton_leave:"Leave",joinCommunityButton_leaving:"Leaving...",languageSwitcher_label:"I would like to read this article in...",languageSwitcher_translation_original:"original language",languageSwitcher_translation_human:"translated by person",languageSwitcher_translation_machine:"translated by machine",languageSwitcher_selected:"{language} - currently selected",languageSwitcher_disclaimer:"This content is machine translated and will occasionally get gendered language or other direct translations wrong. We’re trying to resolve this but in the meantime, if you notice something very wrong, let us know at <link>{email}</link>",loadMore_button:"Load more",loadMore_endOfFeed:"You're all caught up",loadMore_error:"We're having trouble loading more content. Please refresh the page or try again later.",loadingBlock_loading:"Loading...",loadingBlock_almostDone:"Almost done...",loadingBlock_complete:"Complete!",markdown_collapsibleSection_summary:"Resources",markdown_skip_video:"Skip past video",markdown_skip_padlet:"Skip past interactive board",markdown_skip_poll:"Skip past poll",markdown_skip:"Skip to next section",markdown_iframe_title:"Course information",markdown_iframe_video:"Video",markdown_iframe_padlet:"Interactive board",markdown_iframe_poll:"Poll",member_apolitical:"Apolitical",member_community:"Community post",membersList:"Members",membersList_admin:"Admin",moreMenu:"See more options",overlay_close:"Close",pageLayout_error:"An error occurred while rendering this page. Please refresh the page or try again later.",passwordRules_intro:"We advise you not to use your name or email in your password.",passwordRules_rule_label:"Password",passwordRules_rule_8Characters:"must be longer than 8 characters",passwordRules_rule_numberSymbol:"must include a number and a symbol",passwordRules_rule_lowercaseUppercase:"must include both lower and upper case characters",passwordRules_notMet:"Your password does not meet this requirement",progressBar:"{number}% loaded",ratings_text:"Rate answer",ratings_stars:"{number} out of {total}",ratings_low:"this is incorrect or confusing",ratings_high:"this is a fantastic answer",ratings_success:"Thank you!",search_label:"Search for:",search_placeholder:"Ask Apolitical",search_clear:"Clear search",search_cta:"Search",signup_title:"Sign up",signup_full_name:"Full name",signup_full_name_placeholder:"Lionel Messi",signup_email_address:"Work email",signup_email_address_placeholder:"lionel.messi@argentina.gov",signup_job_title:"Job title",signup_job_title_placeholder:"e.g. Senior Policy Advisor",signup_organization:"Organisation",signup_organization_placeholder:"e.g. Department of Justice",signup_url:"Link to official government bio / LinkedIn <small>(optional)</small>",signup_url_placeholder:"https://organisation.com/bio",signup_expectation:"What do you want to know<small>Optional, but we will use your response to build the session!</small>",signup_expectation_placeholder:"What do you want to know?",signup_terms:"I accept Apolitical's <terms>Terms of Service</terms>, <privacy>Privacy Policy</privacy> and that I'll get essential emails for my use of Apolitical",signup_error:"We're really sorry, but we've had a problem trying to sign you up. This could be an issue with our system, so we suggest you try again later.",signup_button_join:"Join for free",signup_button_login:"Log in",signup_submitting:"Submitting form...",signup_success_title:"Thank you for applying to join Apolitical!",signup_success_text:"<p>Once we've vetted your application, you'll get a secure login link to help you get started.</p><p>Please note that trust is everything to our community, so you can't login until your identity has been verified.</p>",sharedLinks_copy_text:"Copy link",tags_community:"From the community",tooltip_loading:"Loading..."},ag={languageSwitcher_label:"Me gustaría leer este artículo en...",languageSwitcher_translation_original:"idioma original",languageSwitcher_translation_human:"traducido por un humano",languageSwitcher_translation_machine:"traducido por máquina",languageSwitcher_disclaimer:"Este contenido fue traducido automáticamente y ocasionalmente tendrá errores de género u otras traducciones directas. Estamos intentando resolver este problema, pero mientras tanto, si notas algún error grave, escríbenos a <link>{email}</link>"},lg={collapsibleSection_summary:"En savoir plus",languageSwitcher_label:"Je voudrais lire cet article dans...",languageSwitcher_translation_original:"langue originale",languageSwitcher_translation_human:"traduit par un humain",languageSwitcher_translation_machine:"traduit par machine",languageSwitcher_disclaimer:"Ce contenu est traduit automatiquement et contiendra d’évantuelles erreurs de genre ou d’autres traductions directes. Nous essayons de résoudre ce problème, mais en attendant, si vous remarquez une erreur importante, faites-le nous savoir à <link>{email}</link>"},cg={languageSwitcher_label:"Eu gostaria de ler este artigo em...",languageSwitcher_translation_original:"linguagem original",languageSwitcher_translation_human:"traduzido por um humano",languageSwitcher_translation_machine:"traduzido por máquina",languageSwitcher_disclaimer:"Este conteúdo foi traduzido automaticamente e, ocasionalmente, poderão ocorrer erros de linguagem de gênero ou outras traduções diretas. Estamos tentando resolver isso, porém se perceber algo errado por favor nos avise em <link>{email}</link>"},ug=Object.freeze(Object.defineProperty({__proto__:null,en:Tc,es:ag,fr:lg,pt:cg},Symbol.toStringTag,{value:"Module"})),jt=(e,t,n,r,i={})=>{let s="";return`${t}_${n}`in Tc?s=e({id:`${t}_${n}`},i):s=e({id:t},{[r]:n,...i}),s},dg=(e,t,n)=>{if(!e||e===0)return"0";t||(t=0),n||(n=["k","m","b","t"]);let r=e.toString();t=Math.pow(10,t);for(let i=n.length-1;i>=0;i--){const s=Math.pow(10,(i+1)*3);if(s<=e){e=Math.round(e*t/s)/t,e===1e3&&i<n.length-1&&(e=1,i++),r=`${e}${n[i]}`;break}}return r},pf=(e,t)=>C.Children.map(e,n=>C.cloneElement(n,{...t})),fg=e=>e.replace(/\s+/g,"").length>0,Oe=({variant:e="primary",size:t="medium",styling:n={muted:!1,fullWidth:!1},icon:r=!1,href:i=!1,element:s="button",onClick:o=!1,className:a="",disabled:l=!1,screenreaderText:u=!1,children:c=!1,...h})=>{const f=ms(typeof t=="object");if(typeof t=="object"&&typeof f=="number"){const x=Object.assign({},t),S=ff(Object.keys(x));t=hf(f,S,x)}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 g={...h,className:L(e,a,p,{"no-text":!c,disabled:l,button:i}),onClick:x=>{(!i||i[0]==="#")&&o&&(x.preventDefault(),x.stopPropagation()),o&&o(x)},disabled:typeof l=="object"&&"isClickable"in l?!l.isClickable:l};return i&&(s="a",g.href=i),C.createElement(s,g,c||(u?v.jsx(ze,{showOnFocus:!1,children:u}):null))},gs=({buttons:e,className:t="",...n})=>{const r=e.length>1?"ul":"p",i=e.map((s,o)=>r==="p"?v.jsx(Oe,{...s},o):v.jsx("li",{children:v.jsx(Oe,{...s})},o));return C.createElement(r,{className:L("button-wrapper",t),...n,children:i})};const go=({maxWidth:e=!1})=>{const t=e?{"--max-width":`${e/16}rem`}:{};return v.jsx("hr",{className:L({"has-max-width":e}),style:t})},vs=({href:e,children:t,fallbackElement:n,className:r="",onClick:i,gtmContext:s,gtmType:o,...a})=>{if(e){const l={...a};return i&&(l.onClick=i),s&&(l["data-gtm-event-context"]=s),o&&(l["data-gtm-event-type"]=o),v.jsx("a",{href:e,className:L("gtm-trackable",r),...l,children:t})}return n?C.createElement(n,{children:t,className:r,...a}):t},mu={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"}},hg=({aspect:e,range:t,sizes:n})=>{const{range:r,sizes:i}=e?mu[e]:mu.fallback;return{range:t&&t.length>0?t:r,sizes:n||i}},pg=({format:e,height:t,query:n,width:r})=>{let i=`w=${r}&h=${t}`;return i=e?`${i}&fm=${e}`:i,i=n?`${i}&${n}`:i,i},Ga=({format:e,range:t,url:n,query:r})=>t.map(({height:i,width:s})=>`${n}?${pg({format:e,height:i,query:r,width:s})} ${s}w`).join(", ");const mf=({image:e,className:t,testId:n})=>{const{description:r,height:i,type:s,query:o,url:a,width:l,loading:u,decoding:c,fetchPriority:h}=e,{range:m,sizes:f}=hg(e),p=Ga({format:"avif",query:o,range:m,url:a}),g=Ga({format:"webp",query:o,range:m,url:a}),x=Ga({format:"",query:o,range:m,url:a});return v.jsxs("picture",{className:t,children:[s!=="image/gif"&&v.jsx("source",{type:"image/avif",srcSet:p,sizes:f,"data-testid":"source"}),v.jsx("source",{type:"image/webp",srcSet:g,sizes:f,"data-testid":"source"}),v.jsx("img",{srcSet:x,sizes:f,src:a,alt:r,loading:u||"lazy",decoding:c||"async",fetchpriority:h||"auto",width:l,height:i,"data-testid":n||"image"})]})};var xl=function(e,t){return xl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},xl(e,t)};function kt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");xl(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var B=function(){return B=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},B.apply(this,arguments)};function ai(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function zt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Sl={exports:{}},he={};/** @license React v16.13.1
10
+ * react-is.production.min.js
11
+ *
12
+ * Copyright (c) Facebook, Inc. and its affiliates.
13
+ *
14
+ * This source code is licensed under the MIT license found in the
15
+ * LICENSE file in the root directory of this source tree.
16
+ */var gu;function mg(){if(gu)return he;gu=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,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function T(y){if(typeof y=="object"&&y!==null){var O=y.$$typeof;switch(O){case t:switch(y=y.type,y){case l:case u:case r:case s:case i:case h:return y;default:switch(y=y&&y.$$typeof,y){case a:case c:case p:case f:case o:return y;default:return O}}case n:return O}}}function P(y){return T(y)===u}return he.AsyncMode=l,he.ConcurrentMode=u,he.ContextConsumer=a,he.ContextProvider=o,he.Element=t,he.ForwardRef=c,he.Fragment=r,he.Lazy=p,he.Memo=f,he.Portal=n,he.Profiler=s,he.StrictMode=i,he.Suspense=h,he.isAsyncMode=function(y){return P(y)||T(y)===l},he.isConcurrentMode=P,he.isContextConsumer=function(y){return T(y)===a},he.isContextProvider=function(y){return T(y)===o},he.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},he.isForwardRef=function(y){return T(y)===c},he.isFragment=function(y){return T(y)===r},he.isLazy=function(y){return T(y)===p},he.isMemo=function(y){return T(y)===f},he.isPortal=function(y){return T(y)===n},he.isProfiler=function(y){return T(y)===s},he.isStrictMode=function(y){return T(y)===i},he.isSuspense=function(y){return T(y)===h},he.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===u||y===s||y===i||y===h||y===m||typeof y=="object"&&y!==null&&(y.$$typeof===p||y.$$typeof===f||y.$$typeof===o||y.$$typeof===a||y.$$typeof===c||y.$$typeof===x||y.$$typeof===S||y.$$typeof===k||y.$$typeof===g)},he.typeOf=T,he}var pe={};/** @license React v16.13.1
17
+ * react-is.development.js
18
+ *
19
+ * Copyright (c) Facebook, Inc. and its affiliates.
20
+ *
21
+ * This source code is licensed under the MIT license found in the
22
+ * LICENSE file in the root directory of this source tree.
23
+ */var vu;function gg(){return vu||(vu=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,i=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,m=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,k=e?Symbol.for("react.scope"):60119;function T(D){return typeof D=="string"||typeof D=="function"||D===r||D===u||D===s||D===i||D===h||D===m||typeof D=="object"&&D!==null&&(D.$$typeof===p||D.$$typeof===f||D.$$typeof===o||D.$$typeof===a||D.$$typeof===c||D.$$typeof===x||D.$$typeof===S||D.$$typeof===k||D.$$typeof===g)}function P(D){if(typeof D=="object"&&D!==null){var _t=D.$$typeof;switch(_t){case t:var pt=D.type;switch(pt){case l:case u:case r:case s:case i:case h:return pt;default:var Ot=pt&&pt.$$typeof;switch(Ot){case a:case c:case p:case f:case o:return Ot;default:return _t}}case n:return _t}}}var y=l,O=u,M=a,E=o,I=t,R=c,N=r,z=p,Y=f,q=n,ae=s,ge=i,Se=h,ve=!1;function ye(D){return ve||(ve=!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.")),V(D)||P(D)===l}function V(D){return P(D)===u}function Z(D){return P(D)===a}function ce(D){return P(D)===o}function ue(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function Te(D){return P(D)===c}function ee(D){return P(D)===r}function Ke(D){return P(D)===p}function Ln(D){return P(D)===f}function Ze(D){return P(D)===n}function hn(D){return P(D)===s}function et(D){return P(D)===i}function Xt(D){return P(D)===h}pe.AsyncMode=y,pe.ConcurrentMode=O,pe.ContextConsumer=M,pe.ContextProvider=E,pe.Element=I,pe.ForwardRef=R,pe.Fragment=N,pe.Lazy=z,pe.Memo=Y,pe.Portal=q,pe.Profiler=ae,pe.StrictMode=ge,pe.Suspense=Se,pe.isAsyncMode=ye,pe.isConcurrentMode=V,pe.isContextConsumer=Z,pe.isContextProvider=ce,pe.isElement=ue,pe.isForwardRef=Te,pe.isFragment=ee,pe.isLazy=Ke,pe.isMemo=Ln,pe.isPortal=Ze,pe.isProfiler=hn,pe.isStrictMode=et,pe.isSuspense=Xt,pe.isValidElementType=T,pe.typeOf=P}()),pe}process.env.NODE_ENV==="production"?Sl.exports=mg():Sl.exports=gg();var vg=Sl.exports,gf=vg,_g={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},yg={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},vf={};vf[gf.ForwardRef]=_g;vf[gf.Memo]=yg;function _f(e,t,n){if(n===void 0&&(n=Error),!e)throw new n(t)}var re;(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"})(re||(re={}));var Ee;(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"})(Ee||(Ee={}));var li;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(li||(li={}));function _u(e){return e.type===Ee.literal}function bg(e){return e.type===Ee.argument}function yf(e){return e.type===Ee.number}function bf(e){return e.type===Ee.date}function wf(e){return e.type===Ee.time}function xf(e){return e.type===Ee.select}function Sf(e){return e.type===Ee.plural}function wg(e){return e.type===Ee.pound}function Ef(e){return e.type===Ee.tag}function kf(e){return!!(e&&typeof e=="object"&&e.type===li.number)}function El(e){return!!(e&&typeof e=="object"&&e.type===li.dateTime)}var Tf=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,xg=/(?:[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 Sg(e){var t={};return e.replace(xg,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 Eg=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function kg(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Eg).filter(function(m){return m.length>0}),n=[],r=0,i=t;r<i.length;r++){var s=i[r],o=s.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var a=o[0],l=o.slice(1),u=0,c=l;u<c.length;u++){var h=c[u];if(h.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:l})}return n}function Tg(e){return e.replace(/^(.*?)-/,"")}var yu=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Cf=/^(@+)?(\+|#+)?[rs]?$/g,Cg=/(\*)(0+)|(#+)(0+)|(0+)/g,Pf=/^(0+)$/;function bu(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Cf,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function Af(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 Pg(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)),!Pf.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function wu(e){var t={},n=Af(e);return n||t}function Ag(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Tg(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=B(B(B({},t),{notation:"scientific"}),i.options.reduce(function(l,u){return B(B({},l),wu(u))},{}));continue;case"engineering":t=B(B(B({},t),{notation:"engineering"}),i.options.reduce(function(l,u){return B(B({},l),wu(u))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Cg,function(l,u,c,h,m,f){if(u)t.minimumIntegerDigits=c.length;else{if(h&&m)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Pf.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(yu.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(yu,function(l,u,c,h,m,f){return c==="*"?t.minimumFractionDigits=u.length:h&&h[0]==="#"?t.maximumFractionDigits=h.length:m&&f?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+f.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var s=i.options[0];s==="w"?t=B(B({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=B(B({},t),bu(s)));continue}if(Cf.test(i.stem)){t=B(B({},t),bu(i.stem));continue}var o=Af(i.stem);o&&(t=B(B({},t),o));var a=Pg(i.stem);a&&(t=B(B({},t),a))}return t}var Us={"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 Og(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var s=0;r+1<e.length&&e.charAt(r+1)===i;)s++,r++;var o=1+(s&1),a=s<2?1:3+(s>>1),l="a",u=Mg(t);for((u=="H"||u=="k")&&(a=0);a-- >0;)n+=l;for(;o-- >0;)n=u+n}else i==="J"?n+="H":n+=i}return n}function Mg(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 i=Us[r||""]||Us[n||""]||Us["".concat(n,"-001")]||Us["001"];return i[0]}var za,Ig=new RegExp("^".concat(Tf.source,"*")),$g=new RegExp("".concat(Tf.source,"*$"));function oe(e,t){return{start:e,end:t}}var Fg=!!String.prototype.startsWith,Rg=!!String.fromCodePoint,jg=!!Object.fromEntries,Ng=!!String.prototype.codePointAt,Lg=!!String.prototype.trimStart,Dg=!!String.prototype.trimEnd,Bg=!!Number.isSafeInteger,Hg=Bg?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},kl=!0;try{var Ug=Mf("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");kl=((za=Ug.exec("a"))===null||za===void 0?void 0:za[0])==="a"}catch{kl=!1}var xu=Fg?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},Tl=Rg?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,s=0,o;i>s;){if(o=t[s++],o>1114111)throw RangeError(o+" is not a valid code point");r+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return r},Su=jg?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var s=i[r],o=s[0],a=s[1];n[o]=a}return n},Of=Ng?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),s;return i<55296||i>56319||n+1===r||(s=t.charCodeAt(n+1))<56320||s>57343?i:(i-55296<<10)+(s-56320)+65536}},Gg=Lg?function(t){return t.trimStart()}:function(t){return t.replace(Ig,"")},zg=Dg?function(t){return t.trimEnd()}:function(t){return t.replace($g,"")};function Mf(e,t){return new RegExp(e,t)}var Cl;if(kl){var Eu=Mf("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Cl=function(t,n){var r;Eu.lastIndex=n;var i=Eu.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Cl=function(t,n){for(var r=[];;){var i=Of(t,n);if(i===void 0||If(i)||Wg(i))break;r.push(i),n+=i>=65536?2:1}return Tl.apply(void 0,r)};var qg=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 i=[];!this.isEOF();){var s=this.char();if(s===123){var o=this.parseArgument(t,r);if(o.err)return o;i.push(o.val)}else{if(s===125&&t>0)break;if(s===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:Ee.pound,location:oe(a,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(re.UNMATCHED_CLOSING_TAG,oe(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&Pl(this.peek()||0)){var o=this.parseTag(t,n);if(o.err)return o;i.push(o.val)}else{var o=this.parseLiteral(t,n);if(o.err)return o;i.push(o.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Ee.literal,value:"<".concat(i,"/>"),location:oe(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(t+1,n,!0);if(s.err)return s;var o=s.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Pl(this.char()))return this.error(re.INVALID_TAG,oe(a,this.clonePosition()));var l=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(re.UNMATCHED_CLOSING_TAG,oe(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Ee.tag,value:i,children:o,location:oe(r,this.clonePosition())},err:null}:this.error(re.INVALID_TAG,oe(a,this.clonePosition())))}else return this.error(re.UNCLOSED_TAG,oe(r,this.clonePosition()))}else return this.error(re.INVALID_TAG,oe(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Qg(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var s=this.tryParseQuote(n);if(s){i+=s;continue}var o=this.tryParseUnquoted(t,n);if(o){i+=o;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var l=oe(r,this.clonePosition());return{val:{type:Ee.literal,value:i,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Vg(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 Tl.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(),Tl(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(re.EXPECT_ARGUMENT_CLOSING_BRACE,oe(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(re.EMPTY_ARGUMENT,oe(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(re.MALFORMED_ARGUMENT,oe(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(re.EXPECT_ARGUMENT_CLOSING_BRACE,oe(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Ee.argument,value:i,location:oe(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(re.EXPECT_ARGUMENT_CLOSING_BRACE,oe(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(re.MALFORMED_ARGUMENT,oe(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Cl(this.message,n),i=n+r.length;this.bumpTo(i);var s=this.clonePosition(),o=oe(t,s);return{value:r,location:o}},e.prototype.parseArgumentOptions=function(t,n,r,i){var s,o=this.clonePosition(),a=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(a){case"":return this.error(re.EXPECT_ARGUMENT_TYPE,oe(o,l));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),h=this.parseSimpleArgStyleIfPossible();if(h.err)return h;var m=zg(h.val);if(m.length===0)return this.error(re.EXPECT_ARGUMENT_STYLE,oe(this.clonePosition(),this.clonePosition()));var f=oe(c,this.clonePosition());u={style:m,styleLocation:f}}var p=this.tryParseArgumentClose(i);if(p.err)return p;var g=oe(i,this.clonePosition());if(u&&xu(u==null?void 0:u.style,"::",0)){var x=Gg(u.style.slice(2));if(a==="number"){var h=this.parseNumberSkeletonFromString(x,u.styleLocation);return h.err?h:{val:{type:Ee.number,value:r,location:g,style:h.val},err:null}}else{if(x.length===0)return this.error(re.EXPECT_DATE_TIME_SKELETON,g);var S=x;this.locale&&(S=Og(x,this.locale));var m={type:li.dateTime,pattern:S,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Sg(S):{}},k=a==="date"?Ee.date:Ee.time;return{val:{type:k,value:r,location:g,style:m},err:null}}}return{val:{type:a==="number"?Ee.number:a==="date"?Ee.date:Ee.time,value:r,location:g,style:(s=u==null?void 0:u.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var T=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(re.EXPECT_SELECT_ARGUMENT_OPTIONS,oe(T,B({},T)));this.bumpSpace();var P=this.parseIdentifierIfPossible(),y=0;if(a!=="select"&&P.value==="offset"){if(!this.bumpIf(":"))return this.error(re.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,oe(this.clonePosition(),this.clonePosition()));this.bumpSpace();var h=this.tryParseDecimalInteger(re.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,re.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(h.err)return h;this.bumpSpace(),P=this.parseIdentifierIfPossible(),y=h.val}var O=this.tryParsePluralOrSelectOptions(t,a,n,P);if(O.err)return O;var p=this.tryParseArgumentClose(i);if(p.err)return p;var M=oe(i,this.clonePosition());return a==="select"?{val:{type:Ee.select,value:r,options:Su(O.val),location:M},err:null}:{val:{type:Ee.plural,value:r,options:Su(O.val),offset:y,pluralType:a==="plural"?"cardinal":"ordinal",location:M},err:null}}default:return this.error(re.INVALID_ARGUMENT_TYPE,oe(o,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(re.EXPECT_ARGUMENT_CLOSING_BRACE,oe(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 i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(re.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,oe(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(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=kg(t)}catch{return this.error(re.INVALID_NUMBER_SKELETON,n)}return{val:{type:li.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?Ag(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var s,o=!1,a=[],l=new Set,u=i.value,c=i.location;;){if(u.length===0){var h=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var m=this.tryParseDecimalInteger(re.EXPECT_PLURAL_ARGUMENT_SELECTOR,re.INVALID_PLURAL_ARGUMENT_SELECTOR);if(m.err)return m;c=oe(h,this.clonePosition()),u=this.message.slice(h.offset,this.offset())}else break}if(l.has(u))return this.error(n==="select"?re.DUPLICATE_SELECT_ARGUMENT_SELECTOR:re.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);u==="other"&&(o=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?re.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:re.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,oe(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,n,r);if(p.err)return p;var g=this.tryParseArgumentClose(f);if(g.err)return g;a.push([u,{value:p.val,location:oe(f,this.clonePosition())}]),l.add(u),this.bumpSpace(),s=this.parseIdentifierIfPossible(),u=s.value,c=s.location}return a.length===0?this.error(n==="select"?re.EXPECT_SELECT_ARGUMENT_SELECTOR:re.EXPECT_PLURAL_ARGUMENT_SELECTOR,oe(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(re.MISSING_OTHER_CLAUSE,oe(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var s=!1,o=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)s=!0,o=o*10+(a-48),this.bump();else break}var l=oe(i,this.clonePosition());return s?(o*=r,Hg(o)?{val:o,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=Of(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(xu(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()&&If(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 Pl(e){return e>=97&&e<=122||e>=65&&e<=90}function Vg(e){return Pl(e)||e===47}function Qg(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 If(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Wg(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 Al(e){e.forEach(function(t){if(delete t.location,xf(t)||Sf(t))for(var n in t.options)delete t.options[n].location,Al(t.options[n].value);else yf(t)&&kf(t.style)||(bf(t)||wf(t))&&El(t.style)?delete t.style.location:Ef(t)&&Al(t.children)})}function Xg(e,t){t===void 0&&(t={}),t=B({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new qg(e,t).parse();if(n.err){var r=SyntaxError(re[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Al(n.val),n.val}function Lt(e,t){var n=t&&t.cache?t.cache:tv,r=t&&t.serializer?t.serializer:ev,i=t&&t.strategy?t.strategy:Jg;return i(e,{cache:n,serializer:r})}function Yg(e){return e==null||typeof e=="number"||typeof e=="boolean"}function $f(e,t,n,r){var i=Yg(r)?r:n(r),s=t.get(i);return typeof s>"u"&&(s=e.call(this,r),t.set(i,s)),s}function Ff(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),s=t.get(i);return typeof s>"u"&&(s=e.apply(this,r),t.set(i,s)),s}function Cc(e,t,n,r,i){return n.bind(t,e,r,i)}function Jg(e,t){var n=e.length===1?$f:Ff;return Cc(e,this,n,t.cache.create(),t.serializer)}function Kg(e,t){return Cc(e,this,Ff,t.cache.create(),t.serializer)}function Zg(e,t){return Cc(e,this,$f,t.cache.create(),t.serializer)}var ev=function(){return JSON.stringify(arguments)};function Pc(){this.cache=Object.create(null)}Pc.prototype.get=function(e){return this.cache[e]};Pc.prototype.set=function(e,t){this.cache[e]=t};var tv={create:function(){return new Pc}},Dt={variadic:Kg,monadic:Zg},qt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(qt||(qt={}));var Nn=function(e){kt(t,e);function t(n,r,i){var s=e.call(this,n)||this;return s.code=r,s.originalMessage=i,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),ku=function(e){kt(t,e);function t(n,r,i,s){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),qt.INVALID_VALUE,s)||this}return t}(Nn),nv=function(e){kt(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),qt.INVALID_VALUE,i)||this}return t}(Nn),rv=function(e){kt(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,'"'),qt.MISSING_VALUE,r)||this}return t}(Nn),it;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(it||(it={}));function iv(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 Rf(e){return typeof e=="function"}function ro(e,t,n,r,i,s,o){if(e.length===1&&_u(e[0]))return[{type:it.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(_u(c)){a.push({type:it.literal,value:c.value});continue}if(wg(c)){typeof s=="number"&&a.push({type:it.literal,value:n.getNumberFormat(t).format(s)});continue}var h=c.value;if(!(i&&h in i))throw new rv(h,o);var m=i[h];if(bg(c)){(!m||typeof m=="string"||typeof m=="number")&&(m=typeof m=="string"||typeof m=="number"?String(m):""),a.push({type:typeof m=="string"?it.literal:it.object,value:m});continue}if(bf(c)){var f=typeof c.style=="string"?r.date[c.style]:El(c.style)?c.style.parsedOptions:void 0;a.push({type:it.literal,value:n.getDateTimeFormat(t,f).format(m)});continue}if(wf(c)){var f=typeof c.style=="string"?r.time[c.style]:El(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:it.literal,value:n.getDateTimeFormat(t,f).format(m)});continue}if(yf(c)){var f=typeof c.style=="string"?r.number[c.style]:kf(c.style)?c.style.parsedOptions:void 0;f&&f.scale&&(m=m*(f.scale||1)),a.push({type:it.literal,value:n.getNumberFormat(t,f).format(m)});continue}if(Ef(c)){var p=c.children,g=c.value,x=i[g];if(!Rf(x))throw new nv(g,"function",o);var S=ro(p,t,n,r,i,s),k=x(S.map(function(y){return y.value}));Array.isArray(k)||(k=[k]),a.push.apply(a,k.map(function(y){return{type:typeof y=="string"?it.literal:it.object,value:y}}))}if(xf(c)){var T=c.options[m]||c.options.other;if(!T)throw new ku(c.value,m,Object.keys(c.options),o);a.push.apply(a,ro(T.value,t,n,r,i));continue}if(Sf(c)){var T=c.options["=".concat(m)];if(!T){if(!Intl.PluralRules)throw new Nn(`Intl.PluralRules is not available in this environment.
24
+ Try polyfilling it using "@formatjs/intl-pluralrules"
25
+ `,qt.MISSING_INTL_API,o);var P=n.getPluralRules(t,{type:c.pluralType}).select(m-(c.offset||0));T=c.options[P]||c.options.other}if(!T)throw new ku(c.value,m,Object.keys(c.options),o);a.push.apply(a,ro(T.value,t,n,r,i,m-(c.offset||0)));continue}}return iv(a)}function sv(e,t){return t?B(B(B({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=B(B({},e[r]),t[r]||{}),n},{})):e}function ov(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=sv(e[r],t[r]),n},B({},e)):e}function qa(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function av(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Lt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,zt([void 0],n,!1)))},{cache:qa(e.number),strategy:Dt.variadic}),getDateTimeFormat:Lt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,zt([void 0],n,!1)))},{cache:qa(e.dateTime),strategy:Dt.variadic}),getPluralRules:Lt(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,zt([void 0],n,!1)))},{cache:qa(e.pluralRules),strategy:Dt.variadic})}}var jf=function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var s=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(l){var u=s.formatToParts(l);if(u.length===1)return u[0].value;var c=u.reduce(function(h,m){return!h.length||m.type!==it.literal||typeof h[h.length-1]!="string"?h.push(m.value):h[h.length-1]+=m.value,h},[]);return c.length<=1?c[0]||"":c},this.formatToParts=function(l){return ro(s.ast,s.locales,s.formatters,s.formats,l,void 0,s.message)},this.resolvedOptions=function(){var l;return{locale:((l=s.resolvedLocale)===null||l===void 0?void 0:l.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.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 o=i||{};o.formatters;var a=ai(o,["formatters"]);this.ast=e.__parse(t,B(B({},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=ov(e.formats,r),this.formatters=i&&i.formatters||av(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=Xg,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}(),ur;(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"})(ur||(ur={}));var _s=function(e){kt(t,e);function t(n,r,i){var s=this,o=i?i instanceof Error?i:new Error(String(i)):void 0;return s=e.call(this,"[@formatjs/intl Error ".concat(n,"] ").concat(r,`
26
+ `).concat(o?`
27
+ `.concat(o.message,`
28
+ `).concat(o.stack):""))||this,s.code=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(s,t),s}return t}(Error),lv=function(e){kt(t,e);function t(n,r){return e.call(this,ur.UNSUPPORTED_FORMATTER,n,r)||this}return t}(_s),cv=function(e){kt(t,e);function t(n,r){return e.call(this,ur.INVALID_CONFIG,n,r)||this}return t}(_s),Tu=function(e){kt(t,e);function t(n,r){return e.call(this,ur.MISSING_DATA,n,r)||this}return t}(_s),Tt=function(e){kt(t,e);function t(n,r,i){var s=e.call(this,ur.FORMAT_ERROR,"".concat(n,`
29
+ Locale: `).concat(r,`
30
+ `),i)||this;return s.locale=r,s}return t}(_s),Va=function(e){kt(t,e);function t(n,r,i,s){var o=e.call(this,"".concat(n,`
31
+ MessageID: `).concat(i==null?void 0:i.id,`
32
+ Default Message: `).concat(i==null?void 0:i.defaultMessage,`
33
+ Description: `).concat(i==null?void 0:i.description,`
34
+ `),r,s)||this;return o.descriptor=i,o.locale=r,o}return t}(Tt),uv=function(e){kt(t,e);function t(n,r){var i=e.call(this,ur.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(s){var o;return(o=s.value)!==null&&o!==void 0?o:JSON.stringify(s)}).join(),")"):"id"," as fallback."))||this;return i.descriptor=n,i}return t}(_s);function vr(e,t,n){return n===void 0&&(n={}),t.reduce(function(r,i){return i in e?r[i]=e[i]:i in n&&(r[i]=n[i]),r},{})}var dv=function(e){process.env.NODE_ENV!=="production"&&console.error(e)},fv=function(e){process.env.NODE_ENV!=="production"&&console.warn(e)},Nf={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:dv,onWarn:fv};function Lf(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Vn(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function hv(e){e===void 0&&(e=Lf());var t=Intl.RelativeTimeFormat,n=Intl.ListFormat,r=Intl.DisplayNames,i=Lt(function(){for(var a,l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return new((a=Intl.DateTimeFormat).bind.apply(a,zt([void 0],l,!1)))},{cache:Vn(e.dateTime),strategy:Dt.variadic}),s=Lt(function(){for(var a,l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return new((a=Intl.NumberFormat).bind.apply(a,zt([void 0],l,!1)))},{cache:Vn(e.number),strategy:Dt.variadic}),o=Lt(function(){for(var a,l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return new((a=Intl.PluralRules).bind.apply(a,zt([void 0],l,!1)))},{cache:Vn(e.pluralRules),strategy:Dt.variadic});return{getDateTimeFormat:i,getNumberFormat:s,getMessageFormat:Lt(function(a,l,u,c){return new jf(a,l,u,B({formatters:{getNumberFormat:s,getDateTimeFormat:i,getPluralRules:o}},c||{}))},{cache:Vn(e.message),strategy:Dt.variadic}),getRelativeTimeFormat:Lt(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(t.bind.apply(t,zt([void 0],a,!1)))},{cache:Vn(e.relativeTime),strategy:Dt.variadic}),getPluralRules:o,getListFormat:Lt(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(n.bind.apply(n,zt([void 0],a,!1)))},{cache:Vn(e.list),strategy:Dt.variadic}),getDisplayNames:Lt(function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return new(r.bind.apply(r,zt([void 0],a,!1)))},{cache:Vn(e.displayNames),strategy:Dt.variadic})}}function Ac(e,t,n,r){var i=e&&e[t],s;if(i&&(s=i[n]),s)return s;r(new lv("No ".concat(t," format named: ").concat(n)))}function Gs(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=B({timeZone:t},e[r]),n},{})}function Cu(e,t){var n=Object.keys(B(B({},e),t));return n.reduce(function(r,i){return r[i]=B(B({},e[i]||{}),t[i]||{}),r},{})}function Pu(e,t){if(!t)return e;var n=jf.formats;return B(B(B({},n),e),{date:Cu(Gs(n.date,t),Gs(e.date||{},t)),time:Cu(Gs(n.time,t),Gs(e.time||{},t))})}var Ol=function(e,t,n,r,i){var s=e.locale,o=e.formats,a=e.messages,l=e.defaultLocale,u=e.defaultFormats,c=e.fallbackOnEmptyString,h=e.onError,m=e.timeZone,f=e.defaultRichTextElements;n===void 0&&(n={id:""});var p=n.id,g=n.defaultMessage;_f(!!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 x=String(p),S=a&&Object.prototype.hasOwnProperty.call(a,x)&&a[x];if(Array.isArray(S)&&S.length===1&&S[0].type===Ee.literal)return S[0].value;if(!r&&S&&typeof S=="string"&&!f)return S.replace(/'\{(.*?)\}'/gi,"{$1}");if(r=B(B({},f),r||{}),o=Pu(o,m),u=Pu(u,m),!S){if(c===!1&&S==="")return S;if((!g||s&&s.toLowerCase()!==l.toLowerCase())&&h(new uv(n,s)),g)try{var k=t.getMessageFormat(g,l,u,i);return k.format(r)}catch(T){return h(new Va('Error formatting default message for: "'.concat(x,'", rendering default message verbatim'),s,n,T)),typeof g=="string"?g:x}return x}try{var k=t.getMessageFormat(S,s,o,B({formatters:t},i||{}));return k.format(r)}catch(T){h(new Va('Error formatting message: "'.concat(x,'", using ').concat(g?"default message":"id"," as fallback."),s,n,T))}if(g)try{var k=t.getMessageFormat(g,l,u,i);return k.format(r)}catch(T){h(new Va('Error formatting the default message for: "'.concat(x,'", rendering message verbatim'),s,n,T))}return typeof S=="string"?S:typeof g=="string"?g:x},Df=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function Uo(e,t,n,r){var i=e.locale,s=e.formats,o=e.onError,a=e.timeZone;r===void 0&&(r={});var l=r.format,u=B(B({},a&&{timeZone:a}),l&&Ac(s,t,l,o)),c=vr(r,Df,u);return t==="time"&&!c.hour&&!c.minute&&!c.second&&!c.timeStyle&&!c.dateStyle&&(c=B(B({},c),{hour:"numeric",minute:"numeric"})),n(i,c)}function pv(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1],o=s===void 0?{}:s,a=typeof i=="string"?new Date(i||0):i;try{return Uo(e,"date",t,o).format(a)}catch(l){e.onError(new Tt("Error formatting date.",e.locale,l))}return String(a)}function mv(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1],o=s===void 0?{}:s,a=typeof i=="string"?new Date(i||0):i;try{return Uo(e,"time",t,o).format(a)}catch(l){e.onError(new Tt("Error formatting time.",e.locale,l))}return String(a)}function gv(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1],o=n[2],a=o===void 0?{}:o,l=e.timeZone,u=e.locale,c=e.onError,h=vr(a,Df,l?{timeZone:l}:{});try{return t(u,h).formatRange(i,s)}catch(m){c(new Tt("Error formatting date time range.",e.locale,m))}return String(i)}function vv(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1],o=s===void 0?{}:s,a=typeof i=="string"?new Date(i||0):i;try{return Uo(e,"date",t,o).formatToParts(a)}catch(l){e.onError(new Tt("Error formatting date.",e.locale,l))}return[]}function _v(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n[0],s=n[1],o=s===void 0?{}:s,a=typeof i=="string"?new Date(i||0):i;try{return Uo(e,"time",t,o).formatToParts(a)}catch(l){e.onError(new Tt("Error formatting time.",e.locale,l))}return[]}var yv=["style","type","fallback","languageDisplay"];function bv(e,t,n,r){var i=e.locale,s=e.onError,o=Intl.DisplayNames;o||s(new Nn(`Intl.DisplayNames is not available in this environment.
35
+ Try polyfilling it using "@formatjs/intl-displaynames"
36
+ `,qt.MISSING_INTL_API));var a=vr(r,yv);try{return t(i,a).of(n)}catch(l){s(new Tt("Error formatting display name.",i,l))}}var wv=["type","style"],Au=Date.now();function xv(e){return"".concat(Au,"_").concat(e,"_").concat(Au)}function Sv(e,t,n,r){r===void 0&&(r={});var i=Bf(e,t,n,r).reduce(function(s,o){var a=o.value;return typeof a!="string"?s.push(a):typeof s[s.length-1]=="string"?s[s.length-1]+=a:s.push(a),s},[]);return i.length===1?i[0]:i.length===0?"":i}function Bf(e,t,n,r){var i=e.locale,s=e.onError;r===void 0&&(r={});var o=Intl.ListFormat;o||s(new Nn(`Intl.ListFormat is not available in this environment.
37
+ Try polyfilling it using "@formatjs/intl-listformat"
38
+ `,qt.MISSING_INTL_API));var a=vr(r,wv);try{var l={},u=n.map(function(c,h){if(typeof c=="object"){var m=xv(h);return l[m]=c,m}return String(c)});return t(i,a).formatToParts(u).map(function(c){return c.type==="literal"?c:B(B({},c),{value:l[c.value]||c.value})})}catch(c){s(new Tt("Error formatting list.",i,c))}return n}var Ev=["type"];function kv(e,t,n,r){var i=e.locale,s=e.onError;r===void 0&&(r={}),Intl.PluralRules||s(new Nn(`Intl.PluralRules is not available in this environment.
39
+ Try polyfilling it using "@formatjs/intl-pluralrules"
40
+ `,qt.MISSING_INTL_API));var o=vr(r,Ev);try{return t(i,o).select(n)}catch(a){s(new Tt("Error formatting plural.",i,a))}return"other"}var Tv=["numeric","style"];function Cv(e,t,n){var r=e.locale,i=e.formats,s=e.onError;n===void 0&&(n={});var o=n.format,a=!!o&&Ac(i,"relative",o,s)||{},l=vr(n,Tv,a);return t(r,l)}function Pv(e,t,n,r,i){i===void 0&&(i={}),r||(r="second");var s=Intl.RelativeTimeFormat;s||e.onError(new Nn(`Intl.RelativeTimeFormat is not available in this environment.
41
+ Try polyfilling it using "@formatjs/intl-relativetimeformat"
42
+ `,qt.MISSING_INTL_API));try{return Cv(e,t,i).format(n,r)}catch(o){e.onError(new Tt("Error formatting relative time.",e.locale,o))}return String(n)}var Av=["style","currency","currencyDisplay","unit","unitDisplay","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","currencyDisplay","currencySign","notation","signDisplay","unit","unitDisplay","numberingSystem"];function Hf(e,t,n){var r=e.locale,i=e.formats,s=e.onError;n===void 0&&(n={});var o=n.format,a=o&&Ac(i,"number",o,s)||{},l=vr(n,Av,a);return t(r,l)}function Ov(e,t,n,r){r===void 0&&(r={});try{return Hf(e,t,r).format(n)}catch(i){e.onError(new Tt("Error formatting number.",e.locale,i))}return String(n)}function Mv(e,t,n,r){r===void 0&&(r={});try{return Hf(e,t,r).formatToParts(n)}catch(i){e.onError(new Tt("Error formatting number.",e.locale,i))}return[]}function Iv(e){var t=e?e[Object.keys(e)[0]]:void 0;return typeof t=="string"}function $v(e){e.onWarn&&e.defaultRichTextElements&&Iv(e.messages||{})&&e.onWarn(`[@formatjs/intl] "defaultRichTextElements" was specified but "message" was not pre-compiled.
43
+ Please consider using "@formatjs/cli" to pre-compile your messages for performance.
44
+ For more details see https://formatjs.io/docs/getting-started/message-distribution`)}function Fv(e,t){var n=hv(t),r=B(B({},Nf),e),i=r.locale,s=r.defaultLocale,o=r.onError;return i?!Intl.NumberFormat.supportedLocalesOf(i).length&&o?o(new Tu('Missing locale data for locale: "'.concat(i,'" in Intl.NumberFormat. Using default locale: "').concat(s,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):!Intl.DateTimeFormat.supportedLocalesOf(i).length&&o&&o(new Tu('Missing locale data for locale: "'.concat(i,'" in Intl.DateTimeFormat. Using default locale: "').concat(s,'" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details'))):(o&&o(new cv('"locale" was not configured, using "'.concat(s,'" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details'))),r.locale=r.defaultLocale||"en"),$v(r),B(B({},r),{formatters:n,formatNumber:Ov.bind(null,r,n.getNumberFormat),formatNumberToParts:Mv.bind(null,r,n.getNumberFormat),formatRelativeTime:Pv.bind(null,r,n.getRelativeTimeFormat),formatDate:pv.bind(null,r,n.getDateTimeFormat),formatDateToParts:vv.bind(null,r,n.getDateTimeFormat),formatTime:mv.bind(null,r,n.getDateTimeFormat),formatDateTimeRange:gv.bind(null,r,n.getDateTimeFormat),formatTimeToParts:_v.bind(null,r,n.getDateTimeFormat),formatPlural:kv.bind(null,r,n.getPluralRules),formatMessage:Ol.bind(null,r,n),$t:Ol.bind(null,r,n),formatList:Sv.bind(null,r,n.getListFormat),formatListToParts:Bf.bind(null,r,n.getListFormat),formatDisplayName:bv.bind(null,r,n.getDisplayNames)})}function Uf(e){_f(e,"[React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.")}var Gf=B(B({},Nf),{textComponent:Q.Fragment});function Rv(e){return function(t){return e(Q.Children.toArray(t))}}function Ml(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var s=0;s<i;s++){var o=n[s];if(e[o]!==t[o]||!Object.prototype.hasOwnProperty.call(t,o))return!1}return!0}var Oc=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=Q.createContext(null)):Q.createContext(null);Oc.Consumer;var jv=Oc.Provider,Nv=jv,Lv=Oc;function te(){var e=Q.useContext(Lv);return Uf(e),e}var Il;(function(e){e.formatDate="FormattedDate",e.formatTime="FormattedTime",e.formatNumber="FormattedNumber",e.formatList="FormattedList",e.formatDisplayName="FormattedDisplayName"})(Il||(Il={}));var $l;(function(e){e.formatDate="FormattedDateParts",e.formatTime="FormattedTimeParts",e.formatNumber="FormattedNumberParts",e.formatList="FormattedListParts"})($l||($l={}));function zf(e){var t=function(n){var r=te(),i=n.value,s=n.children,o=ai(n,["value","children"]),a=typeof i=="string"?new Date(i||0):i,l=e==="formatDate"?r.formatDateToParts(a,o):r.formatTimeToParts(a,o);return s(l)};return t.displayName=$l[e],t}function ys(e){var t=function(n){var r=te(),i=n.value,s=n.children,o=ai(n,["value","children"]),a=r[e](i,o);if(typeof s=="function")return s(a);var l=r.textComponent||Q.Fragment;return Q.createElement(l,null,a)};return t.displayName=Il[e],t}function Qa(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 qf(e){return e&&Object.keys(e).reduce(function(t,n){var r=e[n];return t[n]=Rf(r)?Rv(r):r,t},{})}var Ou=function(e,t,n,r){for(var i=[],s=4;s<arguments.length;s++)i[s-4]=arguments[s];var o=qf(r),a=Ol.apply(void 0,zt([e,t,n,o],i,!1));return Array.isArray(a)?Q.Children.toArray(a):a},Fl=function(e,t){var n=e.defaultRichTextElements,r=ai(e,["defaultRichTextElements"]),i=qf(n),s=Fv(B(B(B({},Gf),r),{defaultRichTextElements:i}),t),o={locale:s.locale,timeZone:s.timeZone,fallbackOnEmptyString:s.fallbackOnEmptyString,formats:s.formats,defaultLocale:s.defaultLocale,defaultFormats:s.defaultFormats,messages:s.messages,onError:s.onError,defaultRichTextElements:i};return B(B({},s),{formatMessage:Ou.bind(null,o,s.formatters),$t:Ou.bind(null,o,s.formatters)})},Dv=function(e){kt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cache=Lf(),n.state={cache:n.cache,intl:Fl(Qa(n.props),n.cache),prevConfig:Qa(n.props)},n}return t.getDerivedStateFromProps=function(n,r){var i=r.prevConfig,s=r.cache,o=Qa(n);return Ml(i,o)?null:{intl:Fl(o,s),prevConfig:o}},t.prototype.render=function(){return Uf(this.state.intl),Q.createElement(Nv,{value:this.state.intl},this.props.children)},t.displayName="IntlProvider",t.defaultProps=Gf,t}(Q.PureComponent);function Bv(e,t){var n=e.values,r=ai(e,["values"]),i=t.values,s=ai(t,["values"]);return Ml(i,n)&&Ml(r,s)}function Vf(e){var t=te(),n=t.formatMessage,r=t.textComponent,i=r===void 0?Q.Fragment:r,s=e.id,o=e.description,a=e.defaultMessage,l=e.values,u=e.children,c=e.tagName,h=c===void 0?i:c,m=e.ignoreTag,f={id:s,description:o,defaultMessage:a},p=n(f,l,{ignoreTag:m});return typeof u=="function"?u(Array.isArray(p)?p:[p]):h?Q.createElement(h,null,Q.Children.toArray(p)):Q.createElement(Q.Fragment,null,p)}Vf.displayName="FormattedMessage";var Qf=Q.memo(Vf,Bv);Qf.displayName="MemoizedFormattedMessage";const In=Qf;ys("formatDate");ys("formatTime");ys("formatNumber");ys("formatList");ys("formatDisplayName");zf("formatDate");zf("formatTime");let $i=!1;const Wf=({isOpen:e=!1,isLoading:t=!1,children:n})=>{const r=te(),i=C.useRef(null),[s,o]=C.useState("hidden");C.useEffect(()=>{const l=i.current;if(l)return l.addEventListener("transitionend",a),()=>{l.removeEventListener("transitionend",a)}},[]);const a=({propertyName:l})=>{l==="opacity"&&($i!==!1&&clearTimeout($i),o(u=>u==="opening"?"open":u==="closing"?"closed":u==="closed"?"hidden":u))};return lr(()=>{$i!==!1&&clearTimeout($i);let l="open";e?o("opening"):(o("closing"),l="hidden"),$i=setTimeout(()=>{o(l)},300)},[e]),v.jsx("aside",{ref:i,className:L("tooltip text-medium",s,{loading:t}),hidden:s==="hidden",children:t?v.jsx("p",{children:r.formatMessage({id:"tooltip_loading"})}):typeof n=="string"?v.jsx("p",{children:n}):n})};const Mc=({children:e,className:t="",...n})=>v.jsx("section",{className:L("full-width-section",t),...n,children:e});const Hv=({text:e,buttons:t,className:n=""})=>{const r=[];return t.forEach(i=>{r.push({href:i.link,variant:"secondary",size:{mobile:"medium",1024:"large"},className:"gtm-trackable","data-gtm-event-type":"download-click","data-gtm-event-context":i.eventContext||"Download",target:"_blank",children:i.text})}),v.jsx(Mc,{className:L("download-section",n),children:v.jsxs(v.Fragment,{children:[C.createElement(typeof e=="string"?"h2":e.element,{className:"text"},typeof e=="string"?e:e.text),v.jsx(gs,{buttons:r})]})})};const Uv=({title:e=!1,logos:t=[],className:n=""})=>{const r=t.length;if(r===0)return null;const i={element:typeof e=="object"?e.element:"h2",text:typeof e=="string"?e:typeof e=="object"?e.text:""};return v.jsxs("div",{className:L("logos",n),children:[e&&C.createElement(i.element,{className:"title"},i.text),v.jsx("ul",{className:L({"two-col":r===2||r===4,"three-col":r===5||r<=10&&r%3===0}),children:t.map(({logo:s,nameOfBusiness:o,link:a=!1,description:l=!1},u)=>{if(!s||!s.url)return null;const c=v.jsx("img",{src:s.url,width:s.width||"auto",height:s.height||"auto",alt:o});return v.jsxs("li",{children:[v.jsx("p",{className:"img-wrapper",children:a?v.jsx("a",{href:a,target:"_blank",rel:"nofollow noreferrer noopener",children:c}):c}),l&&v.jsx("small",{children:l})]},window.btoa(`${s.url}_${u}`))})})]})};const Gv=["small","span","strong","em","p","h1","h2","h3","h4","h5","h6","blockquote","q"],zv=({content:e,image:t,variant:n="default",spacing:r="normal",cta:i,children:s})=>{const o=["eyebrow","title","text"],a={eyebrow:"small",title:"h1",text:"p"},l={};return o.forEach(u=>{if(!e[u]){l[u]=!1;return}if(typeof e[u]=="object"){l[u]=e[u];const{text:c,element:h}=e[u];if(h&&Gv.includes(h.toLowerCase()))return;l[u]={text:c,element:a[u]};return}l[u]={text:e[u],element:a[u]}}),i&&i.link&&i.link[0]==="#"&&(i.props||(i.props={}),i.props.onClick=u=>{u.preventDefault(),u.stopPropagation();const c=document.getElementById(i.link.substring(1));c&&c.scrollIntoView({behavior:"smooth"})}),v.jsx(Mc,{className:L("banner-section",n,r,{"has-image":t,"has-extra-spacing":r==="normal"&&l.eyebrow&&l.title}),children:v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"content-wrapper",children:[o.map(u=>{if(l[u]&&typeof l[u]=="object"){const{text:c,element:h=""}=l[u];return C.createElement(h.toLowerCase(),{key:u,className:u},c)}return null}),s,i&&i.text&&i.link&&v.jsx(Oe,{variant:t||n==="light"?"primary":"secondary",size:{mobile:"medium",768:"large"},href:i.link,...i.props,children:i.text})]}),t&&v.jsx(mf,{image:{...t,aspect:"banner"}})]})})},qv=C.memo(zv);const Vv=({variant:e="primary",button:t=null,title:n,text:r,gtmContext:i})=>!n&&!r?null:v.jsxs("aside",{className:L("marketing-block",e),children:[n&&v.jsx("p",{className:"title",children:n}),r&&v.jsx("p",{children:r}),t&&v.jsx(Oe,{variant:"secondary",size:"medium",href:t.link,className:"gtm-trackable","data-gtm-event-context":i,"data-gtm-event-type":"learn-more-click",children:t.text})]});var Xf={exports:{}};(function(e){(function(t,n){var r="…",i=/(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w-]{1,300}@(.{1,300}\.)[a-zA-Z]{2,3})/g;function s(a,l,u){return u.length===a.length||!l.ellipsis||(u+=l.ellipsis),u}function o(a,l,u){var c="",h=!0,m=l,f,p;if(u=u||{},u.ellipsis=typeof u.ellipsis>"u"?r:u.ellipsis,!a||a.length===0)return"";for(h=!0;h;){if(i.lastIndex=c.length,h=i.exec(a),!h||h.index-c.length>=m||i.lastIndex>=l+3e3)return c+=a.substring(c.length,l),s(a,u,c);if(f=h[0],p=h.index,c+=a.substring(c.length,p+f.length),m-=p+f.length,m<=0)break}return s(a,u,c)}e.exports?e.exports=o:t.truncate=o})(String)})(Xf);var Qv=Xf.exports;const Ic=fi(Qv),vo="https://storage.googleapis.com/apolitical-assets/",Ir={general:"hello@apolitical.co",support:"concierge@apolitical.co","data-protection":{default:"dpo@apolitical.co",eu:"dpo.agl@apolitical.foundation"}},Wv="200,000+";const $c=({label:e=!1,className:t="",children:n})=>{const r=te();return v.jsxs("details",{className:L("collapsible-section",t),children:[v.jsx("summary",{children:e||r.formatMessage({id:"collapsibleSection_summary"})}),v.jsx("div",{className:"content",children:n})]})};function Xn(){return Xn=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},Xn.apply(this,arguments)}const Xv=["children","options"],Mu=["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"}),Iu={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Yv=["style","script"],Jv=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,Kv=/mailto:/i,Zv=/\n{2,}$/,Yf=/^( *>[^\n]+(\n[^\n]+)*\n*)+\n{2,}/,e_=/^ *> ?/gm,t_=/^ {2,}\n/,n_=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,Jf=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,Kf=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,r_=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,i_=/^(?:\n *)*\n/,s_=/\r\n?/g,o_=/^\[\^([^\]]+)](:.*)\n/,a_=/^\[\^([^\]]+)]/,l_=/\f/g,c_=/^\s*?\[(x|\s)\]/,Zf=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,eh=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,th=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Rl=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?([^>]*)\/{0}>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1)[\s\S])*?)<\/\1>\n*/i,u_=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,nh=/^<!--[\s\S]*?(?:-->)/,d_=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,jl=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,f_=/^\{.*\}$/,h_=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,p_=/^<([^ >]+@[^ >]+)>/,m_=/^<([^ >]+:\/[^ >]+)>/,g_=/-([a-z])?/gi,rh=/^(.*\|?.*)\n *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*)\n?/,v_=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,__=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,y_=/^\[([^\]]*)\] ?\[([^\]]*)\]/,b_=/(\[|\])/g,w_=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,x_=/\t/g,S_=/^ *\| */,E_=/(^ *\||\| *$)/g,k_=/ *$/,T_=/^ *:-+: *$/,C_=/^ *:-+ *$/,P_=/^ *-+: *$/,A_=/^([*_])\1((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1\1(?!\1)/,O_=/^([*_])((?:\[.*?\][([].*?[)\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~+.*?~+|.)*?)\1(?!\1|\w)/,M_=/^==((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)==/,I_=/^~~((?:\[.*?\]|<.*?>(?:.*?<.*?>)?|`.*?`|.)*?)~~/,$_=/^\\([^0-9A-Za-z\s])/,F_=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,R_=/^\n+/,j_=/^([ \t]*)/,N_=/\\([^\\])/g,$u=/ *\n+$/,L_=/(?:^|\n)( *)$/,Fc="(?:\\d+\\.)",Rc="(?:[*+-])";function ih(e){return"( *)("+(e===1?Fc:Rc)+") +"}const sh=ih(1),oh=ih(2);function ah(e){return new RegExp("^"+(e===1?sh:oh))}const D_=ah(1),B_=ah(2);function lh(e){return new RegExp("^"+(e===1?sh:oh)+"[^\\n]*(?:\\n(?!\\1"+(e===1?Fc:Rc)+" )[^\\n]*)*(\\n|$)","gm")}const ch=lh(1),uh=lh(2);function dh(e){const t=e===1?Fc:Rc;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const fh=dh(1),hh=dh(2);function Fu(e,t){const n=t===1,r=n?fh:hh,i=n?ch:uh,s=n?D_:B_;return{t(o,a,l){const u=L_.exec(l);return u&&(a.o||!a._&&!a.u)?r.exec(o=u[1]+o):null},i:ie.HIGH,l(o,a,l){const u=n?+o[2]:void 0,c=o[0].replace(Zv,`
45
+ `).match(i);let h=!1;return{p:c.map(function(m,f){const p=s.exec(m)[0].length,g=new RegExp("^ {1,"+p+"}","gm"),x=m.replace(g,"").replace(s,""),S=f===c.length-1,k=x.indexOf(`
46
+
47
+ `)!==-1||S&&h;h=k;const T=l._,P=l.o;let y;l.o=!0,k?(l._=!1,y=x.replace($u,`
48
+
49
+ `)):(l._=!0,y=x.replace($u,""));const O=a(y,l);return l._=T,l.o=P,O}),m:n,g:u}},h:(o,a,l)=>e(o.m?"ol":"ul",{key:l.k,start:o.g},o.p.map(function(u,c){return e("li",{key:c},a(u,l))}))}}const H_=/^\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,U_=/^!\[([^\]]*)]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,ph=[Yf,Jf,Kf,Zf,th,eh,nh,rh,ch,fh,uh,hh],G_=[...ph,/^[^\n]+(?: \n|\n{2,})/,Rl,jl];function z_(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 q_(e){return P_.test(e)?"right":T_.test(e)?"center":C_.test(e)?"left":null}function Ru(e,t,n){const r=n.$;n.$=!0;const i=t(e.trim(),n);n.$=r;let s=[[]];return i.forEach(function(o,a){o.type==="tableSeparator"?a!==0&&a!==i.length-1&&s.push([]):(o.type!=="text"||i[a+1]!=null&&i[a+1].type!=="tableSeparator"||(o.v=o.v.replace(k_,"")),s[s.length-1].push(o))}),s}function V_(e,t,n){n._=!0;const r=Ru(e[1],t,n),i=e[2].replace(E_,"").split("|").map(q_),s=function(o,a,l){return o.trim().split(`
50
+ `).map(function(u){return Ru(u,a,l)})}(e[3],t,n);return n._=!1,{S:i,A:s,L:r,type:"table"}}function ju(e,t){return e.S[t]==null?{}:{textAlign:e.S[t]}}function _n(e){return function(t,n){return n._?e.exec(t):null}}function yn(e){return function(t,n){return n._||n.u?e.exec(t):null}}function en(e){return function(t,n){return n._||n.u?null:e.exec(t)}}function Fi(e){return function(t){return e.exec(t)}}function Q_(e,t,n){if(t._||t.u||n&&!n.endsWith(`
51
+ `))return null;let r="";e.split(`
52
+ `).every(s=>!ph.some(o=>o.test(s))&&(r+=s+`
53
+ `,s.trim()));const i=r.trimEnd();return i==""?null:[r,i]}function Or(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 Nu(e){return e.replace(N_,"$1")}function io(e,t,n){const r=n._||!1,i=n.u||!1;n._=!0,n.u=!0;const s=e(t,n);return n._=r,n.u=i,s}function W_(e,t,n){const r=n._||!1,i=n.u||!1;n._=!1,n.u=!0;const s=e(t,n);return n._=r,n.u=i,s}function X_(e,t,n){return n._=!1,e(t,n)}const Wa=(e,t,n)=>({v:io(t,e[1],n)});function Xa(){return{}}function Ya(){return null}function Y_(...e){return e.filter(Boolean).join(" ")}function Ja(e,t,n){let r=e;const i=t.split(".");for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}var ie;function J_(e,t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||z_,t.namedCodesToUnicode=t.namedCodesToUnicode?Xn({},Iu,t.namedCodesToUnicode):Iu;const n=t.createElement||Q.createElement;function r(f,p,...g){const x=Ja(t.overrides,`${f}.props`,{});return n(function(S,k){const T=Ja(k,S);return T?typeof T=="function"||typeof T=="object"&&"render"in T?T:Ja(k,`${S}.component`,S):S}(f,t.overrides),Xn({},p,x,{className:Y_(p==null?void 0:p.className,x.className)||void 0}),...g)}function i(f){let p=!1;t.forceInline?p=!0:t.forceBlock||(p=w_.test(f)===!1);const g=c(u(p?f:`${f.trimEnd().replace(R_,"")}
54
+
55
+ `,{_:p}));for(;typeof g[g.length-1]=="string"&&!g[g.length-1].trim();)g.pop();if(t.wrapper===null)return g;const x=t.wrapper||(p?"span":"div");let S;if(g.length>1||t.forceWrapper)S=g;else{if(g.length===1)return S=g[0],typeof S=="string"?r("span",{key:"outer"},S):S;S=null}return Q.createElement(x,{key:"outer"},S)}function s(f){const p=f.match(Jv);return p?p.reduce(function(g,x,S){const k=x.indexOf("=");if(k!==-1){const T=function(M){return M.indexOf("-")!==-1&&M.match(d_)===null&&(M=M.replace(g_,function(E,I){return I.toUpperCase()})),M}(x.slice(0,k)).trim(),P=function(M){const E=M[0];return(E==='"'||E==="'")&&M.length>=2&&M[M.length-1]===E?M.slice(1,-1):M}(x.slice(k+1).trim()),y=Mu[T]||T,O=g[y]=function(M,E){return M==="style"?E.split(/;\s?/).reduce(function(I,R){const N=R.slice(0,R.indexOf(":"));return I[N.replace(/(-[a-z])/g,z=>z[1].toUpperCase())]=R.slice(N.length+1).trim(),I},{}):M==="href"?Or(E):(E.match(f_)&&(E=E.slice(1,E.length-1)),E==="true"||E!=="false"&&E)}(T,P);typeof O=="string"&&(Rl.test(O)||jl.test(O))&&(g[y]=Q.cloneElement(i(O.trim()),{key:S}))}else x!=="style"&&(g[Mu[x]||x]=!0);return g},{}):null}const o=[],a={},l={blockQuote:{t:en(Yf),i:ie.HIGH,l:(f,p,g)=>({v:p(f[0].replace(e_,""),g)}),h:(f,p,g)=>r("blockquote",{key:g.k},p(f.v,g))},breakLine:{t:Fi(t_),i:ie.HIGH,l:Xa,h:(f,p,g)=>r("br",{key:g.k})},breakThematic:{t:en(n_),i:ie.HIGH,l:Xa,h:(f,p,g)=>r("hr",{key:g.k})},codeBlock:{t:en(Kf),i:ie.MAX,l:f=>({v:f[0].replace(/^ {4}/gm,"").replace(/\n+$/,""),M:void 0}),h:(f,p,g)=>r("pre",{key:g.k},r("code",Xn({},f.O,{className:f.M?`lang-${f.M}`:""}),f.v))},codeFenced:{t:en(Jf),i:ie.MAX,l:f=>({O:s(f[3]||""),v:f[4],M:f[2]||void 0,type:"codeBlock"})},codeInline:{t:yn(r_),i:ie.LOW,l:f=>({v:f[2]}),h:(f,p,g)=>r("code",{key:g.k},f.v)},footnote:{t:en(o_),i:ie.MAX,l:f=>(o.push({I:f[2],j:f[1]}),{}),h:Ya},footnoteReference:{t:_n(a_),i:ie.HIGH,l:f=>({v:f[1],B:`#${t.slugify(f[1])}`}),h:(f,p,g)=>r("a",{key:g.k,href:Or(f.B)},r("sup",{key:g.k},f.v))},gfmTask:{t:_n(c_),i:ie.HIGH,l:f=>({R:f[1].toLowerCase()==="x"}),h:(f,p,g)=>r("input",{checked:f.R,key:g.k,readOnly:!0,type:"checkbox"})},heading:{t:en(t.enforceAtxHeadings?eh:Zf),i:ie.HIGH,l:(f,p,g)=>({v:io(p,f[2],g),T:t.slugify(f[2]),C:f[1].length}),h:(f,p,g)=>r(`h${f.C}`,{id:f.T,key:g.k},p(f.v,g))},headingSetext:{t:en(th),i:ie.MAX,l:(f,p,g)=>({v:io(p,f[1],g),C:f[2]==="="?1:2,type:"heading"})},htmlComment:{t:Fi(nh),i:ie.HIGH,l:()=>({}),h:Ya},image:{t:yn(U_),i:ie.HIGH,l:f=>({D:f[1],B:Nu(f[2]),F:f[3]}),h:(f,p,g)=>r("img",{key:g.k,alt:f.D||void 0,title:f.F||void 0,src:Or(f.B)})},link:{t:_n(H_),i:ie.LOW,l:(f,p,g)=>({v:W_(p,f[1],g),B:Nu(f[2]),F:f[3]}),h:(f,p,g)=>r("a",{key:g.k,href:Or(f.B),title:f.F},p(f.v,g))},linkAngleBraceStyleDetector:{t:_n(m_),i:ie.MAX,l:f=>({v:[{v:f[1],type:"text"}],B:f[1],type:"link"})},linkBareUrlDetector:{t:(f,p)=>p.N?null:_n(h_)(f,p),i:ie.MAX,l:f=>({v:[{v:f[1],type:"text"}],B:f[1],F:void 0,type:"link"})},linkMailtoDetector:{t:_n(p_),i:ie.MAX,l(f){let p=f[1],g=f[1];return Kv.test(g)||(g="mailto:"+g),{v:[{v:p.replace("mailto:",""),type:"text"}],B:g,type:"link"}}},orderedList:Fu(r,1),unorderedList:Fu(r,2),newlineCoalescer:{t:en(i_),i:ie.LOW,l:Xa,h:()=>`
56
+ `},paragraph:{t:Q_,i:ie.LOW,l:Wa,h:(f,p,g)=>r("p",{key:g.k},p(f.v,g))},ref:{t:_n(v_),i:ie.MAX,l:f=>(a[f[1]]={B:f[2],F:f[4]},{}),h:Ya},refImage:{t:yn(__),i:ie.MAX,l:f=>({D:f[1]||void 0,P:f[2]}),h:(f,p,g)=>r("img",{key:g.k,alt:f.D,src:Or(a[f.P].B),title:a[f.P].F})},refLink:{t:_n(y_),i:ie.MAX,l:(f,p,g)=>({v:p(f[1],g),Z:p(f[0].replace(b_,"\\$1"),g),P:f[2]}),h:(f,p,g)=>a[f.P]?r("a",{key:g.k,href:Or(a[f.P].B),title:a[f.P].F},p(f.v,g)):r("span",{key:g.k},p(f.Z,g))},table:{t:en(rh),i:ie.HIGH,l:V_,h:(f,p,g)=>r("table",{key:g.k},r("thead",null,r("tr",null,f.L.map(function(x,S){return r("th",{key:S,style:ju(f,S)},p(x,g))}))),r("tbody",null,f.A.map(function(x,S){return r("tr",{key:S},x.map(function(k,T){return r("td",{key:T,style:ju(f,T)},p(k,g))}))})))},tableSeparator:{t:function(f,p){return p.$?(p._=!0,S_.exec(f)):null},i:ie.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:Fi(F_),i:ie.MIN,l:f=>({v:f[0].replace(u_,(p,g)=>t.namedCodesToUnicode[g]?t.namedCodesToUnicode[g]:p)}),h:f=>f.v},textBolded:{t:yn(A_),i:ie.MED,l:(f,p,g)=>({v:p(f[2],g)}),h:(f,p,g)=>r("strong",{key:g.k},p(f.v,g))},textEmphasized:{t:yn(O_),i:ie.LOW,l:(f,p,g)=>({v:p(f[2],g)}),h:(f,p,g)=>r("em",{key:g.k},p(f.v,g))},textEscaped:{t:yn($_),i:ie.HIGH,l:f=>({v:f[1],type:"text"})},textMarked:{t:yn(M_),i:ie.LOW,l:Wa,h:(f,p,g)=>r("mark",{key:g.k},p(f.v,g))},textStrikethroughed:{t:yn(I_),i:ie.LOW,l:Wa,h:(f,p,g)=>r("del",{key:g.k},p(f.v,g))}};t.disableParsingRawHTML!==!0&&(l.htmlBlock={t:Fi(Rl),i:ie.HIGH,l(f,p,g){const[,x]=f[3].match(j_),S=new RegExp(`^${x}`,"gm"),k=f[3].replace(S,""),T=(P=k,G_.some(E=>E.test(P))?X_:io);var P;const y=f[1].toLowerCase(),O=Yv.indexOf(y)!==-1;g.N=g.N||y==="a";const M=O?f[3]:T(p,k,g);return g.N=!1,{O:s(f[2]),v:M,G:O,H:O?y:f[1]}},h:(f,p,g)=>r(f.H,Xn({key:g.k},f.O),f.G?f.v:p(f.v,g))},l.htmlSelfClosing={t:Fi(jl),i:ie.HIGH,l:f=>({O:s(f[2]||""),H:f[1]}),h:(f,p,g)=>r(f.H,Xn({},f.O,{key:g.k}))});const u=function(f){let p=Object.keys(f);function g(x,S){let k=[],T="";for(;x;){let P=0;for(;P<p.length;){const y=p[P],O=f[y],M=O.t(x,S,T);if(M){const E=M[0];x=x.substring(E.length);const I=O.l(M,g,S);I.type==null&&(I.type=y),k.push(I),T=E;break}P++}}return k}return p.sort(function(x,S){let k=f[x].i,T=f[S].i;return k!==T?k-T:x<S?-1:1}),function(x,S){return g(function(k){return k.replace(s_,`
57
+ `).replace(l_,"").replace(x_," ")}(x),S)}}(l),c=(h=function(f){return function(p,g,x){return f[p.type].h(p,g,x)}}(l),function f(p,g={}){if(Array.isArray(p)){const x=g.k,S=[];let k=!1;for(let T=0;T<p.length;T++){g.k=T;const P=f(p[T],g),y=typeof P=="string";y&&k?S[S.length-1]+=P:P!==null&&S.push(P),k=y}return g.k=x,S}return h(p,f,g)});var h;const m=i(e);return o.length?r("div",null,m,r("footer",{key:"footer"},o.map(function(f){return r("div",{id:t.slugify(f.j),key:f.j},f.j,c(u(f.I,{_:!0})))}))):m}(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"})(ie||(ie={}));const Go=e=>{let{children:t,options:n}=e,r=function(i,s){if(i==null)return{};var o,a,l={},u=Object.keys(i);for(a=0;a<u.length;a++)s.indexOf(o=u[a])>=0||(l[o]=i[o]);return l}(e,Xv);return Q.cloneElement(J_(t,n),r)};const ln=({variant:e="primary",className:t="",children:n,...r})=>v.jsx("div",{className:L("highlighted-text-box",e,t),...r,children:n});const bs=({variant:e="empty",text:t=!1,button:n=!1,className:r=""})=>{let i=n&&!!Object.keys(n).length;const s=typeof n=="object"&&"breakpoints"in n,o=ms(s);if(s&&typeof n=="object"&&typeof o=="number"){const h=Object.assign({},n.breakpoints),m=ff(Object.keys(h));i=hf(o,m,h)}const{breakpoints:a,text:l="",component:u,...c}=n;return v.jsx(ln,{variant:"subtle",className:L("empty-state-box",e,r),children:v.jsxs(v.Fragment,{children:[t&&v.jsx(Go,{options:{forceBlock:!0},children:t}),i&&typeof n=="object"&&(u||v.jsx(Oe,{...c,variant:n.variant?n.variant:"secondary",children:l}))]})})};const Nl=({children:e,...t})=>v.jsx("p",{...t,children:e}),mh={q:Nl,blockquote:Nl};for(let e=1;e<=6;e++)mh[`h${e}`]={component:Nl,props:{className:"title"}};const gh=({type:e="default",className:t="",heading:n=!1,children:r})=>v.jsxs("div",{className:L("helper-text-box text-small",e,t),children:[n&&v.jsx("p",{className:"title",children:n}),typeof r=="string"?v.jsx(Go,{options:{wrapper:C.Fragment,forceBlock:!0,overrides:mh},children:r}):v.jsx("p",{children:r})]});const K_=({className:e="",show:t=!1,hide:n=!1,text:r,children:i})=>{const s=te(),o=C.useRef(null),[a,l]=C.useState(""),[u,c]=C.useState("closed");C.useEffect(()=>{const f=o.current;if(f)return f.addEventListener("transitionend",h),()=>{f.removeEventListener("transitionend",h)}},[]),C.useEffect(()=>{if(!r||typeof r!="string")return;const f=r.split(`
58
+ `);l(f.length<3?`${r.substring(0,400)}...`:f.slice(0,3).join(`
59
+ `))},[r]),C.useEffect(()=>{u==="ready-to-close"&&c("closing")},[u]);const h=({propertyName:f})=>{f==="max-height"&&c(p=>p==="opening"?"open":p==="closing"?"closed":p)};if(!r)return null;const m=["opening","open"].includes(u);return v.jsxs(ln,{variant:"subtle",className:L("hide-show-text-box",e),children:[v.jsxs("div",{ref:o,className:L("content",u),children:[v.jsx(Go,{options:{forceBlock:!0},children:u==="closed"?a:r}),u!=="closed"&&i]}),v.jsx("p",{className:"cta",children:v.jsx(Oe,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:L({"rotate-180":m}),onClick:()=>{c(m?"ready-to-close":"opening")},children:m?n||s.formatMessage({id:"hideShowTextBox_hide"}):t||s.formatMessage({id:"hideShowTextBox_show"})})})]})},Z_=()=>C.Fragment,ey=({children:e})=>v.jsx(ln,{variant:"secondary",children:e}),ty=["span","strong","h1","h2","h3","h4","h5","h6","p"],ny=({children:e})=>{const t=te();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const s of C.Children.toArray(e))if(!(!s||typeof s=="string"||typeof s=="number"))if(C.isValidElement(s)&&s.type==="summary"){if(s.props&&s.props.children){for(const o of C.Children.toArray(s.props.children))if(!(!o||typeof o=="string"||typeof o=="number")&&C.isValidElement(o)){const a=o.type;if(ty.includes(a)){for(n=o.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(s);const i=n?n.toString():"";return v.jsx($c,{label:i,className:["Sources","Resources"].includes(i)?"discrete-links":"",children:r.map(s=>s)})},ry=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return v.jsx(ln,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return v.jsx(ln,{variant:"primary",children:e});case"pink-textbox":return v.jsx(ln,{variant:"tertiary",children:e});default:return v.jsx("div",{...t,children:e})}return v.jsx("div",{...t,children:e})},iy=e=>{const t=te(),n=Date.now().toString();let r="default";const i=e.src;return i.includes("youtube")||i.includes("vimeo")?r="video":i.includes("riddle")||i.includes("sli.do")?r="poll":i.includes("padlet")&&(r="padlet"),v.jsxs(v.Fragment,{children:[v.jsx(ze,{children:v.jsx("a",{href:`#content-after-iframe-${n}`,children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})})}),v.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),v.jsx("span",{id:`content-after-iframe-${n}`,tabIndex:-1})]})},Lu=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},sy=({children:e,...t})=>{let n={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(n.target="_blank");let r=e,i=!1;for(const s of C.Children.toArray(e))if(!(!s||typeof s=="string"||typeof s=="number")&&C.isValidElement(s)){const o=s.type;if(["button","center","span","strong"].includes(o)&&s.props&&s.props.children&&s.props.children[0])for((o==="button"||Lu(s.props.children[0])==="button")&&(i=!0),r=s.props.children[0];r&&typeof r!="string"&&!(typeof r=="boolean"||typeof r=="number"||!C.isValidElement(r));)if(r.props&&r.props.children&&r.props.children[0])r=r.props.children[0],r&&Lu(r)==="button"&&(i=!0);else break}return i?(n={...n,className:"button primary medium"},v.jsx("p",{className:"center",children:v.jsx(Oe,{variant:"primary",size:"medium",...n,children:r})})):v.jsx("a",{...n,children:r})},vh=({children:e})=>v.jsx("span",{children:e});const Ll=({className:e="",options:t={},children:n})=>{n=n.replace(/^<br\/?>/,"");const r={wrapper:C.Fragment,forceBlock:!0,overrides:{a:sy,CollapsibleSection:$c,TextBox:ln,CaseStudy:ey,style:Z_,details:ny,div:ry,iframe:iy}};return v.jsx("div",{className:L("markdown-text",e),children:v.jsx(Go,{options:{...r,...t},children:n})})};const _h=({size:e="medium",variant:t="default",className:n="",children:r})=>v.jsx("span",{className:L("pill",e,t,n),children:r});const _o=({element:e="p",children:t=null,className:n="",...r})=>C.createElement(e,{...r,className:L("status-banner text-small",n),"aria-live":"assertive"},t);const oy=({progress:e=0,text:t=!1,className:n=""})=>{const r=te(),i=e>75?100:e>50?75:e>25?50:e>5?25:0,s={"--progress":`${e}%`};return v.jsx("span",{className:L(`progress-bar section-${i}`,n),style:s,children:v.jsx(ze,{children:t?`${e} ${t}`:r.formatMessage({id:"progressBar"},{number:e})})})},yh=C.memo(oy);const Ka="loadingBlock_",ay=({progress:e=0,steps:t=!1,className:n=""})=>{const r=te();t||(t={0:{text:r.formatMessage({id:`${Ka}loading`})},75:{text:r.formatMessage({id:`${Ka}almostDone`})},100:{text:r.formatMessage({id:`${Ka}complete`})}});let i=null;const s=Object.keys(t);for(let a=0;a<s.length&&!(e<parseInt(s[a]));a++)i=s[a];const o=i&&t[i].icon?{"--icon":`url(${vo}icons/${t[i].icon}.svg)`}:{};return v.jsxs(ln,{className:L("loading-block",n,{"has-icon":i&&t[i].icon}),variant:"subtle",style:o,children:[i&&v.jsx("span",{className:"step",children:t[i].text}),v.jsx(yh,{progress:e})]})},ly=C.memo(ay);const Vt=({element:e="div",className:t="",...n})=>v.jsx(xc,{element:e,className:L("loading-placeholder",t),...n});const Dl={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"]},bh=(e,t)=>e in Dl?v.jsx("div",{className:e,children:Dl[e].map((n,r)=>bh(n,r))},t):v.jsx(Vt,{className:e},t),wh=({layout:e="overview-page"})=>v.jsx("div",{className:L("loading-state",e),children:Dl[e].map((t,n)=>bh(t,n))}),xh=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):""},zs=["#5AB6A3","#A2D7AF","#806056","#3962B3"],cy=e=>{const t=Math.ceil(26/zs.length),n=xh(e).toLowerCase();if(n==="")return zs[0];const r=n.charCodeAt(0)-96;for(let i=0;i<zs.length;i++)if(r<=t*(i+1))return zs[i]};const Du=256,zo=({className:e="",src:t="",name:n,alt:r,width:i=Du,height:s=Du,...o})=>{const[a,l]=C.useState(!1),u=C.useRef(null);C.useEffect(()=>{const h=u.current;if(!h)return;const m=h.getContext("2d");if(!m)return;const f=i,p=s;typeof window<"u"&&window.devicePixelRatio&&(h.width=f*window.devicePixelRatio,h.height=p*window.devicePixelRatio,m.scale(window.devicePixelRatio,window.devicePixelRatio)),m.fillStyle=cy(n),m.fillRect(0,0,f,p),m.font=`${f/3}px Arial`,m.textAlign="center",m.fillStyle="white",m.fillText(xh(n),f/2,p/1.6)},[n]);let c=!1;return t&&t!==""&&!a&&(t.includes("http")||t.includes("//"))&&(c=!0),v.jsx("figure",{className:L("profile-picture",e,{error:a}),...o,children:c?v.jsx("img",{src:t,alt:r||n,onError:()=>{l(!0)},width:i,height:s}):v.jsx("canvas",{ref:u})})},jc=e=>e==="apolitical"?{image:`${vo}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${vo}logos/member_community.svg`}:{name:e.name,role:e.jobTitle||"",organisation:e.organization||"",country:e.location&&e.location.country||"",url:`/profiles/${e.id}`,image:e.image&&e.image.thumbnail},uy=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const i=e!=="",s=t!=="",o=n!=="";if(!i&&!s&&!o)return"";const a=`${e}${i&&s?` — ${t}`:t}`;let l=`${a}${(i||s)&&o?`, ${n}`:n}`;return l.length>r&&(l=a),l.length>r&&(l=Ic(l,r)),l};const qo=({element:e="div",member:t="community",additionalContent:n=!1,gtmContext:r="member",gtmType:i="member-click",className:s=""})=>{const o=te(),a=jc(t);a.name||(a.name=o.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:l,url:u,image:c}=a,h=uy(a),m=n&&n.createdAt?sg(n.createdAt):!1,f=n&&n.createdAt?ig(n.createdAt):"";return C.createElement(e,{className:L("member text-medium",s),children:v.jsxs(vs,{href:u,gtmType:i,gtmContext:r,onClick:p=>{p==null||p.stopPropagation()},children:[v.jsx(zo,{name:l,src:c}),v.jsxs("p",{className:"details",children:[v.jsx("strong",{children:l}),n&&v.jsxs("span",{className:"additional-content",children:[n.createdAt&&m&&v.jsx("span",{className:"date",title:f,"aria-label":f,children:o.formatMessage({id:`dates_${m.path}`},{number:m.number})}),n.didEdit&&v.jsx("em",{children:o.formatMessage({id:"discussion_edited"})})]}),h&&v.jsx("small",{children:h})]})]})})};const Bu={small:24,medium:48},Sh=({element:e="div",contributors:{total:t,data:n}={total:void 0,data:[]},styling:{showText:r,size:i,showGap:s,showPlaceholders:o}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:a=2,className:l=""})=>{const u=te();return!n||n.length===0?null:C.createElement(e,{className:L("contributors",l,i,{"has-gap":s}),children:v.jsxs(v.Fragment,{children:[v.jsx("ul",{children:n.map((c,h)=>{let m,f="";if(h<a){const{name:p="",image:g=""}=jc(c);if(o)return v.jsx(Vt,{element:"li",className:"contributor"},h);m=v.jsx(zo,{name:p,src:g,width:Bu[i||"medium"],height:Bu[i||"medium"]})}else if(h===a){const p=(t||n.length)-a;m=v.jsxs("small",{className:L({"large-number":p>99}),children:["+",dg(p,0)]}),f="number-left"}return m?v.jsx("li",{className:L("contributor",f),children:m},h):null})}),r&&v.jsx("span",{className:"label",children:typeof r=="string"?r:n.length===1?typeof n[0]=="string"?u.formatMessage({id:`member_${n[0]}`}):Ic(n[0].name||"",20):null})]})})};function Hu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hu(Object(n),!0).forEach(function(r){H(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bl(e){return Bl=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},Bl(e)}function Me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ie(e,t,n){return t&&Uu(e.prototype,t),n&&Uu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eh(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&&Hl(e,t)}function yo(e){return yo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yo(e)}function Hl(e,t){return Hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Hl(e,t)}function dy(e,t){if(e==null)return{};var n,r,i=function(o,a){if(o==null)return{};var l,u,c={},h=Object.keys(o);for(u=0;u<h.length;u++)l=h[u],a.indexOf(l)>=0||(c[l]=o[l]);return c}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function fy(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function kh(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=yo(e);if(t){var i=yo(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return fy(this,n)}}function ws(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var s,o,a=[],l=!0,u=!1;try{for(i=i.call(n);!(l=(s=i.next()).done)&&(a.push(s.value),!r||a.length!==r);l=!0);}catch(c){u=!0,o=c}finally{try{l||i.return==null||i.return()}finally{if(u)throw o}}return a}}(e,t)||Nc(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
60
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ul(e){return function(t){if(Array.isArray(t))return Gl(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Nc(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
61
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Nc(e,t){if(e){if(typeof e=="string")return Gl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gl(e,t):void 0}}function Gl(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 dr(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Nc(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
62
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return o=l.done,l},e:function(l){a=!0,s=l},f:function(){try{o||n.return==null||n.return()}finally{if(a)throw s}}}}var fr={DEBUG:!1,LIB_VERSION:"1.87.6"},hy=Array.isArray,Th=Object.prototype,Ch=Th.hasOwnProperty,xs=Th.toString,Ge=hy||function(e){return xs.call(e)==="[object Array]"},Gu=function(e){return xs.call(e)==="[object Uint8Array]"},hr=function(e){try{return/^\s*\bfunction\b/.test(e)}catch{return!1}},$n=function(e){return e===Object(e)&&!Ge(e)},py=function(e){if($n(e)){for(var t in e)if(Ch.call(e,t))return!1;return!0}return!1},se=function(e){return e===void 0},gt=function(e){return xs.call(e)=="[object String]"},Wt=function(e){return e===null},on=function(e){return xs.call(e)=="[object Number]"},zl=function(e){return xs.call(e)==="[object Boolean]"},Ph=Array.prototype,zu=Ph.forEach,qu=Ph.indexOf,U=typeof window<"u"?window:{},my=U.navigator||{userAgent:""},Ce=U.document||{},dt=my.userAgent,Vu="[PostHog.js]",j={_log:function(e){if((fr.DEBUG||U.POSTHOG_DEBUG)&&!se(U.console)&&U.console){for(var t=("__rrweb_original__"in U.console[e])?U.console[e].__rrweb_original__:U.console[e],n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.apply(void 0,[Vu].concat(r))}},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];j._log.apply(j,["log"].concat(t))},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];j._log.apply(j,["warn"].concat(t))},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];j._log.apply(j,["error"].concat(t))},critical:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).error.apply(e,[Vu].concat(n))},uninitializedWarning:function(e){j.error("You must initialize PostHog before calling ".concat(e))}},Lc={},ql=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function Lr(e,t,n){if(Ge(e)){if(zu&&e.forEach===zu)e.forEach(t,n);else if("length"in e&&e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r)===Lc)return}}}function be(e,t,n){if(!Wt(e)&&!se(e)){if(Ge(e))return Lr(e,t,n);for(var r in e)if(Ch.call(e,r)&&t.call(n,e[r],r)===Lc)return}}var Xe=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Lr(n,function(i){for(var s in i)i[s]!==void 0&&(e[s]=i[s])}),e};function de(e,t){return e.indexOf(t)!==-1}var Ah=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},Qu=function(e){try{return e()}catch{return}},Oh=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}catch(i){j.critical("Implementation error. Please turn on debug and contact support@posthog.com."),j.critical(i)}}},Vl=function(e){var t={};return be(e,function(n,r){gt(n)&&n.length>0&&(t[r]=n)}),t},gy=["$performance_raw"];function vy(e,t){return n=e,r=function(s,o){return o&&gy.indexOf(o)>-1?s:gt(s)&&!Wt(t)?s.slice(0,t):s},i=new Set,function s(o,a){return o!==Object(o)?r?r(o,a):o:i.has(o)?void 0:(i.add(o),Ge(o)?(l=[],Lr(o,function(u){l.push(s(u))})):(l={},be(o,function(u,c){i.has(u)||(l[c]=s(u,c))})),l);var l}(n);var n,r,i}function Dc(e){var t,n,r,i,s,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,l=0,u="",c=[];if(!e)return e;e=_y(e);do t=(s=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=s>>12&63,r=s>>6&63,i=63&s,c[l++]=o.charAt(t)+o.charAt(n)+o.charAt(r)+o.charAt(i);while(a<e.length);switch(u=c.join(""),e.length%3){case 1:u=u.slice(0,-2)+"==";break;case 2:u=u.slice(0,-1)+"="}return u}var _y=function(e){var t,n,r,i,s="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,`
63
+ `).replace(/\r/g,`
64
+ `)).length,i=0;i<r;i++){var o=e.charCodeAt(i),a=null;o<128?n++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),Wt(a)||(n>t&&(s+=e.substring(t,n)),s+=a,t=n=i+1)}return n>t&&(s+=e.substring(t,e.length)),s},yy=["ahrefsbot","applebot","baiduspider","bingbot","bingpreview","bot.htm","bot.php","crawler","duckduckbot","facebookexternal","facebookcatalog","gptbot","hubspot","linkedinbot","mj12bot","petalbot","pinterest","prerender","rogerbot","screaming frog","semrushbot","sitebulb","twitterbot","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"],by=function(e,t){if(!e)return!1;var n=e.toLowerCase();return yy.concat(t||[]).some(function(r){var i=r.toLowerCase();return n.includes?n.includes(i):n.indexOf(i)!==-1})},Bi=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,n,r,i,s){if(t)if(t.addEventListener&&!i)t.addEventListener(n,r,!!s);else{var o="on"+n,a=t[o];t[o]=function(l,u,c){return function(h){if(h=h||e(window.event)){var m,f=!0;hr(c)&&(m=c(h));var p=u.call(l,h);return m!==!1&&p!==!1||(f=!1),f}}}(t,r,a)}else j.error("No valid element provided to register_event")}}();function Hi(e,t){var n=function(){var r=Ce.createElement("script");r.type="text/javascript",r.src=e,r.onload=function(o){return t(void 0,o)},r.onerror=function(o){return t(o)};var i,s=Ce.querySelectorAll("body > script");s.length>0?(i=s[0].parentNode)===null||i===void 0||i.insertBefore(r,s[0]):Ce.body.appendChild(r)};Ce.body?n():Ce.addEventListener("DOMContentLoaded",n)}function bo(e){switch(Bl(e.className)){case"string":return e.className;case"object":return("baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";default:return""}}function wo(e){var t="";return so(e)&&!Ih(e)&&e.childNodes&&e.childNodes.length&&be(e.childNodes,function(n){Mh(n)&&n.textContent&&(t+=ql(n.textContent).split(/(\s+)/).filter($r).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),ql(t)}function Wu(e){return!!e&&e.nodeType===1}function ar(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Mh(e){return!!e&&e.nodeType===3}function Xu(e){return!!e&&e.nodeType===11}var Za=["a","button","form","input","select","textarea","label"];function so(e){for(var t=e;t.parentNode&&!ar(t,"body");t=t.parentNode){var n=bo(t).split(" ");if(de(n,"ph-sensitive")||de(n,"ph-no-capture"))return!1}if(de(bo(e).split(" "),"ph-include"))return!0;var r=e.type||"";if(gt(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var i=e.name||e.id||"";return!(gt(i)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,"")))}function Ih(e){return!!(ar(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||ar(e,"select")||ar(e,"textarea")||e.getAttribute("contenteditable")==="true")}function $r(e){return!(Wt(e)||se(e)||gt(e)&&(e=ql(e),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(e)))}function Yu(e){var t=wo(e);return $r(t="".concat(t," ").concat($h(e)).trim())?t:""}function $h(e){var t="";return e&&e.childNodes&&e.childNodes.length&&be(e.childNodes,function(n){var r;if(n&&((r=n.tagName)===null||r===void 0?void 0:r.toLowerCase())==="span")try{var i=wo(n);t="".concat(t," ").concat(i).trim(),n.childNodes&&n.childNodes.length&&(t="".concat(t," ").concat($h(n)).trim())}catch(s){j.error(s)}}),t}var wy=function(){function e(t){Me(this,e),this.clicks=[],this.enabled=t}return Ie(e,[{key:"isRageClick",value:function(t,n,r){if(!this.enabled)return!1;var i=this.clicks[this.clicks.length-1];if(i&&Math.abs(t-i.x)+Math.abs(n-i.y)<30&&r-i.timestamp<1e3){if(this.clicks.push({x:t,y:n,timestamp:r}),this.clicks.length===3)return!0}else this.clicks=[{x:t,y:n,timestamp:r}];return!1}}]),e}(),Fh="$people_distinct_id",oo="__alias",Ni="__timers",Ju="$autocapture_disabled_server_side",Ql="$session_recording_enabled_server_side",Ku="$console_log_recording_enabled_server_side",Zu="$session_recording_recorder_version_server_side",xo="$sesid",ao="$session_is_sampled",Fr="$enabled_feature_flags",Wl="$early_access_features",Rr="$stored_person_properties",xn="$stored_group_properties",Xl="$surveys",So="$flag_call_reported",Yl="$user_state",Jl="$posthog_quota_limited",xy=[Fh,oo,"__cmpns",Ni,Ql,xo,Fr,Yl,Jl,Wl,xn,Rr,Xl,So];function el(e,t){return t.length>e?t.slice(0,e)+"...":t}var Sn={_initializedTokens:[],_isDisabledServerSide:null,_isAutocaptureEnabled:!1,_setIsAutocaptureEnabled:function(e){var t,n=Wt(this._isDisabledServerSide)?!((t=e.persistence)===null||t===void 0||!t.props[Ju]):this._isDisabledServerSide,r=!!e.config.autocapture;this._isAutocaptureEnabled=r&&!n},_previousElementSibling:function(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!Wu(t));return t},_getAugmentPropertiesFromElement:function(e){if(!so(e))return{};var t={};return be(e.attributes,function(n){if(n.name.indexOf("data-ph-capture-attribute")===0){var r=n.name.replace("data-ph-capture-attribute-",""),i=n.value;r&&i&&$r(i)&&(t[r]=i)}}),t},_getPropertiesFromElement:function(e,t,n){var r,i=e.tagName.toLowerCase(),s={tag_name:i};Za.indexOf(i)>-1&&!n&&(i.toLowerCase()==="a"||i.toLowerCase()==="button"?s.$el_text=el(1024,Yu(e)):s.$el_text=el(1024,wo(e)));var o=bo(e);o.length>0&&(s.classes=o.split(" ").filter(function(h){return h!==""}));var a=(r=this.config)===null||r===void 0?void 0:r.element_attribute_ignorelist;be(e.attributes,function(h){var m;Ih(e)&&["name","id","class"].indexOf(h.name)===-1||a!=null&&a.includes(h.name)||!t&&$r(h.value)&&(m=h.name,!gt(m)||m.substring(0,10)!=="_ngcontent"&&m.substring(0,7)!=="_nghost")&&(s["attr__"+h.name]=el(1024,h.value))});for(var l=1,u=1,c=e;c=this._previousElementSibling(c);)l++,c.tagName===e.tagName&&u++;return s.nth_child=l,s.nth_of_type=u,s},_getDefaultProperties:function(e){return{$event_type:e,$ce_version:1}},_extractCustomPropertyValue:function(e){var t=[];return be(document.querySelectorAll(e.css_selector),function(n){var r;["input","select"].indexOf(n.tagName.toLowerCase())>-1?r=n.value:n.textContent&&(r=n.textContent),$r(r)&&t.push(r)}),t.join(", ")},_getCustomProperties:function(e){var t=this,n={};return be(this._customProperties,function(r){be(r.event_selectors,function(i){be(document.querySelectorAll(i),function(s){de(e,s)&&so(s)&&(n[r.name]=t._extractCustomPropertyValue(r))})})}),n},_getEventTarget:function(e){return se(e.target)?e.srcElement||null:(t=e.target)!==null&&t!==void 0&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t},_captureEvent:function(e,t){var n,r=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"$autocapture",s=this._getEventTarget(e);if(Mh(s)&&(s=s.parentNode||null),i==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&(n=this.rageclicks)!==null&&n!==void 0&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._captureEvent(e,t,"$rageclick"),s&&function(g,x){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!g||ar(g,"html")||!Wu(g))return!1;if(S!=null&&S.url_allowlist){var k=window.location.href,T=S.url_allowlist;if(T&&!T.some(function(q){return k.match(q)}))return!1}if(S!=null&&S.dom_event_allowlist){var P=S.dom_event_allowlist;if(P&&!P.some(function(q){return x.type===q}))return!1}if(S!=null&&S.element_allowlist){var y=S.element_allowlist;if(y&&!y.some(function(q){return g.tagName.toLowerCase()===q}))return!1}if(S!=null&&S.css_selector_allowlist){var O=S.css_selector_allowlist;if(O&&!O.some(function(q){return g.matches(q)}))return!1}for(var M=!1,E=[g],I=!0,R=g;R.parentNode&&!ar(R,"body");)if(Xu(R.parentNode))E.push(R.parentNode.host),R=R.parentNode.host;else{if(!(I=R.parentNode||!1))break;if(Za.indexOf(I.tagName.toLowerCase())>-1)M=!0;else{var N=window.getComputedStyle(I);N&&N.getPropertyValue("cursor")==="pointer"&&(M=!0)}E.push(I),R=I}var z=window.getComputedStyle(g);if(z&&z.getPropertyValue("cursor")==="pointer"&&x.type==="click")return!0;var Y=g.tagName.toLowerCase();switch(Y){case"html":return!1;case"form":return x.type==="submit";case"input":case"select":case"textarea":return x.type==="change"||x.type==="click";default:return M?x.type==="click":x.type==="click"&&(Za.indexOf(Y)>-1||g.getAttribute("contenteditable")==="true")}}(s,e,this.config)){for(var o,a,l=[s],u=s;u.parentNode&&!ar(u,"body");)Xu(u.parentNode)?(l.push(u.parentNode.host),u=u.parentNode.host):(l.push(u.parentNode),u=u.parentNode);var c,h=[],m={},f=!1;if(be(l,function(g){var x=so(g);g.tagName.toLowerCase()==="a"&&(c=g.getAttribute("href"),c=x&&$r(c)&&c),de(bo(g).split(" "),"ph-no-capture")&&(f=!0),h.push(r._getPropertiesFromElement(g,t.config.mask_all_element_attributes,t.config.mask_all_text));var S=r._getAugmentPropertiesFromElement(g);Xe(m,S)}),t.config.mask_all_text||(s.tagName.toLowerCase()==="a"||s.tagName.toLowerCase()==="button"?h[0].$el_text=Yu(s):h[0].$el_text=wo(s)),c&&(h[0].attr__href=c),f)return!1;var p=Xe(this._getDefaultProperties(e.type),{$elements:h},(o=h[0])!==null&&o!==void 0&&o.$el_text?{$el_text:(a=h[0])===null||a===void 0?void 0:a.$el_text}:{},this._getCustomProperties(l),m);return t.capture(i,p),!0}},_navigate:function(e){window.location.href=e},_addDomEventHandlers:function(e){var t=this,n=function(r){r=r||window.event,t._captureEvent(r,e)};Bi(document,"submit",n,!1,!0),Bi(document,"change",n,!1,!0),Bi(document,"click",n,!1,!0)},_customProperties:[],rageclicks:null,config:void 0,init:function(e){var t;zl(e.__autocapture)||(this.config=e.__autocapture),(t=this.config)!==null&&t!==void 0&&t.url_allowlist&&(this.config.url_allowlist=this.config.url_allowlist.map(function(n){return new RegExp(n)})),this.rageclicks=new wy(e.config.rageclick)},afterDecideResponse:function(e,t){var n=t.config.token;this._initializedTokens.indexOf(n)>-1?j.info('autocapture already initialized for token "'+n+'"'):(t.persistence&&t.persistence.register(H({},Ju,!!e.autocapture_opt_out)),this._isDisabledServerSide=!!e.autocapture_opt_out,this._setIsAutocaptureEnabled(t),this._initializedTokens.push(n),e&&e.config&&e.config.enable_collect_everything&&this._isAutocaptureEnabled?(e.custom_properties&&(this._customProperties=e.custom_properties),this._addDomEventHandlers(t)):t.__autocapture=!1)},enabledForProject:function(e,t,n){if(!e)return!0;t=se(t)?10:t,n=se(n)?10:n;for(var r=0,i=0;i<e.length;i++)r+=e.charCodeAt(i);return r%t<n},isBrowserSupported:function(){return hr(document.querySelectorAll)}};(function(e){for(var t in e)hr(e[t])&&(e[t]=e[t].bind(e))})(Sn),function(e){for(var t in e)hr(e[t])&&(e[t]=Oh(e[t]))}(Sn);var tl="$active_feature_flags",qs="$override_feature_flags",ed="$feature_flag_payloads",td=function(e){var t,n={},r=dr(function(a){for(var l=Object.keys(a),u=l.length,c=new Array(u);u--;)c[u]=[l[u],a[l[u]]];return c}(e||{}));try{for(r.s();!(t=r.n()).done;){var i=ws(t.value,2),s=i[0],o=i[1];o&&(n[s]=o)}}catch(a){r.e(a)}finally{r.f()}return n},Sy=function(){function e(t){Me(this,e),this.instance=t,this._override_warning=!1,this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return Ie(e,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var t=this.instance.get_property(Fr),n=this.instance.get_property(qs);if(!n)return t||{};for(var r=Xe({},t),i=Object.keys(n),s=0;s<i.length;s++)n[i[s]]===!1?delete r[i[s]]:r[i[s]]=n[i[s]];return this._override_warning||(j.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:n,finalFlags:r}),this._override_warning=!0),r}},{key:"getFlagPayloads",value:function(){return this.instance.get_property(ed)||{}}},{key:"reloadFeatureFlags",value:function(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())}},{key:"setAnonymousDistinctId",value:function(t){this.$anon_distinct_id=t}},{key:"setReloadingPaused",value:function(t){this.reloadFeatureFlagsInAction=t}},{key:"resetRequestQueue",value:function(){this.reloadFeatureFlagsQueued=!1}},{key:"_startReloadTimer",value:function(){var t=this;this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout(function(){!t.reloadFeatureFlagsInAction&&t.reloadFeatureFlagsQueued&&(t.reloadFeatureFlagsQueued=!1,t._reloadFeatureFlagsRequest())},5)}},{key:"_reloadFeatureFlagsRequest",value:function(){var t=this;this.setReloadingPaused(!0);var n=this.instance.config.token,r=this.instance.get_property(Rr),i=this.instance.get_property(xn),s=Dc(JSON.stringify({token:n,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:r,group_properties:i,disable_flags:this.instance.config.advanced_disable_feature_flags||void 0}));this.instance._send_request(this.instance.config.api_host+"/decide/?v=3",{data:s},{method:"POST"},this.instance._prepare_callback(function(o){t.$anon_distinct_id=void 0,t.receivedFeatureFlags(o),t.setReloadingPaused(!1),t._startReloadTimer()}))}},{key:"getFeatureFlag",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0){var r,i=this.getFlagVariants()[t],s="".concat(i),o=this.instance.get_property(So)||{};return(n.send_event||!("send_event"in n))&&(!(t in o)||!o[t].includes(s))&&(Ge(o[t])?o[t].push(s):o[t]=[s],(r=this.instance.persistence)===null||r===void 0||r.register(H({},So,o)),this.instance.capture("$feature_flag_called",{$feature_flag:t,$feature_flag_response:i})),i}j.warn('getFeatureFlag for key "'+t+`" failed. Feature flags didn't load in time.`)}},{key:"getFeatureFlagPayload",value:function(t){return this.getFlagPayloads()[t]}},{key:"isFeatureEnabled",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.instance.decideEndpointWasHit||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(t,n);j.warn('isFeatureEnabled for key "'+t+`" failed. Feature flags didn't load in time.`)}},{key:"addFeatureFlagsHandler",value:function(t){this.featureFlagEventHandlers.push(t)}},{key:"removeFeatureFlagsHandler",value:function(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(function(n){return n!==t})}},{key:"receivedFeatureFlags",value:function(t){if(this.instance.persistence){this.instance.decideEndpointWasHit=!0;var n=this.getFlagVariants(),r=this.getFlagPayloads();(function(i,s){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=i.featureFlags,u=i.featureFlagPayloads;if(l)if(Ge(l)){var c,h={};if(l)for(var m=0;m<l.length;m++)h[l[m]]=!0;s&&s.register((H(c={},tl,l),H(c,Fr,h),c))}else{var f,p=l,g=u;i.errorsWhileComputingFlags&&(p=J(J({},o),p),g=J(J({},a),g)),s&&s.register((H(f={},tl,Object.keys(td(p))),H(f,Fr,p||{}),H(f,ed,g||{}),f))}})(t,this.instance.persistence,n,r),this._fireFeatureFlagsCallbacks()}}},{key:"override",value:function(t){if(!this.instance.__loaded||!this.instance.persistence)return j.uninitializedWarning("posthog.feature_flags.override");if(this._override_warning=!1,t===!1)this.instance.persistence.unregister(qs);else if(Ge(t)){for(var n={},r=0;r<t.length;r++)n[t[r]]=!0;this.instance.persistence.register(H({},qs,n))}else this.instance.persistence.register(H({},qs,t))}},{key:"onFeatureFlags",value:function(t){var n=this;if(this.addFeatureFlagsHandler(t),this.instance.decideEndpointWasHit){var r=this._prepareFeatureFlagsForCallbacks(),i=r.flags,s=r.flagVariants;t(i,s)}return function(){return n.removeFeatureFlagsHandler(t)}}},{key:"updateEarlyAccessFeatureEnrollment",value:function(t,n){var r,i,s=H({},"$feature_enrollment/".concat(t),n);this.instance.capture("$feature_enrollment_update",{$feature_flag:t,$feature_enrollment:n,$set:s}),this.setPersonPropertiesForFlags(s,!1);var o=J(J({},this.getFlagVariants()),{},H({},t,n));(r=this.instance.persistence)===null||r===void 0||r.register((H(i={},tl,Object.keys(td(o))),H(i,Fr,o),i)),this._fireFeatureFlagsCallbacks()}},{key:"getEarlyAccessFeatures",value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.instance.get_property(Wl);if(i&&!r)return t(i);this.instance._send_request("".concat(this.instance.config.api_host,"/api/early_access_features/?token=").concat(this.instance.config.token),{},{method:"GET"},function(s){var o,a=s.earlyAccessFeatures;return(o=n.instance.persistence)===null||o===void 0||o.register(H({},Wl,a)),t(a)})}},{key:"_prepareFeatureFlagsForCallbacks",value:function(){var t=this.getFlags(),n=this.getFlagVariants();return{flags:t.filter(function(r){return n[r]}),flagVariants:Object.keys(n).filter(function(r){return n[r]}).reduce(function(r,i){return r[i]=n[i],r},{})}}},{key:"_fireFeatureFlagsCallbacks",value:function(){var t=this._prepareFeatureFlagsForCallbacks(),n=t.flags,r=t.flagVariants;this.featureFlagEventHandlers.forEach(function(i){return i(n,r)})}},{key:"setPersonPropertiesForFlags",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],r=this.instance.get_property(Rr)||{};this.instance.register(H({},Rr,J(J({},r),t))),n&&this.instance.reloadFeatureFlags()}},{key:"resetPersonPropertiesForFlags",value:function(){this.instance.unregister(Rr)}},{key:"setGroupPropertiesForFlags",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],r=this.instance.get_property(xn)||{};Object.keys(r).length!==0&&Object.keys(r).forEach(function(i){r[i]=J(J({},r[i]),t[i]),delete t[i]}),this.instance.register(H({},xn,J(J({},r),t))),n&&this.instance.reloadFeatureFlags()}},{key:"resetGroupPropertiesForFlags",value:function(t){if(t){var n=this.instance.get_property(xn)||{};this.instance.register(H({},xn,J(J({},n),{},H({},t,{}))))}else this.instance.unregister(xn)}}]),e}(),Ey=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,cn={is_supported:function(){return!0},error:function(e){j.error("cookieStore error: "+e)},get:function(e){try{for(var t=e+"=",n=document.cookie.split(";").filter(function(s){return s.length}),r=0;r<n.length;r++){for(var i=n[r];i.charAt(0)==" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return decodeURIComponent(i.substring(t.length,i.length))}}catch{}return null},parse:function(e){var t;try{t=JSON.parse(cn.get(e))||{}}catch{}return t},set:function(e,t,n,r,i){try{var s="",o="",a="";if(r){var l=document.location.hostname.match(Ey),u=l?l[0]:"";s=u?"; domain=."+u:""}if(n){var c=new Date;c.setTime(c.getTime()+24*n*60*60*1e3),o="; expires="+c.toUTCString()}i&&(a="; secure");var h=e+"="+encodeURIComponent(JSON.stringify(t))+o+"; SameSite=Lax; path=/"+s+a;return document.cookie=h,h}catch{return}},remove:function(e,t){try{cn.set(e,"",-1,t)}catch{return}}},nl=null,Ae={is_supported:function(){if(!Wt(nl))return nl;var e=!0;if(se(window))e=!1;else try{var t="__mplssupport__";Ae.set(t,"xyz"),Ae.get(t)!=='"xyz"'&&(e=!1),Ae.remove(t)}catch{e=!1}return e||j.error("localStorage unsupported; falling back to cookie store"),nl=e,e},error:function(e){j.error("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}catch(t){Ae.error(t)}return null},parse:function(e){try{return JSON.parse(Ae.get(e))||{}}catch{}return null},set:function(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch(n){Ae.error(n)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(t){Ae.error(t)}}},ky=["distinct_id",xo,ao],Kl=J(J({},Ae),{},{parse:function(e){try{var t={};try{t=cn.parse(e)||{}}catch{}var n=Xe(t,JSON.parse(Ae.get(e)||"{}"));return Ae.set(e,n),n}catch{}return null},set:function(e,t,n,r,i){try{Ae.set(e,t);var s={};ky.forEach(function(o){t[o]&&(s[o]=t[o])}),Object.keys(s).length&&cn.set(e,s,n,r,i)}catch(o){Ae.error(o)}},remove:function(e,t){try{window.localStorage.removeItem(e),cn.remove(e,t)}catch(n){Ae.error(n)}}}),Vs={},Ty={is_supported:function(){return!0},error:function(e){j.error("memoryStorage error: "+e)},get:function(e){return Vs[e]||null},parse:function(e){return Vs[e]||null},set:function(e,t){Vs[e]=t},remove:function(e){delete Vs[e]}},Qn=null,Ue={is_supported:function(){if(!Wt(Qn))return Qn;if(Qn=!0,se(window))Qn=!1;else try{var e="__support__";Ue.set(e,"xyz"),Ue.get(e)!=='"xyz"'&&(Qn=!1),Ue.remove(e)}catch{Qn=!1}return Qn},error:function(e){j.error("sessionStorage error: ",e)},get:function(e){try{return window.sessionStorage.getItem(e)}catch(t){Ue.error(t)}return null},parse:function(e){try{return JSON.parse(Ue.get(e))||null}catch{}return null},set:function(e,t){try{window.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){Ue.error(n)}},remove:function(e){try{window.sessionStorage.removeItem(e)}catch(t){Ue.error(t)}}},Cy=["localhost","127.0.0.1"],Py=function(e,t){return!!function(n){try{new RegExp(n)}catch{return!1}return!0}(t)&&new RegExp(t).test(e)},nd=function(e,t){for(var n,r=((e.split("#")[0]||"").split("?")[1]||"").split("&"),i=0;i<r.length;i++){var s=r[i].split("=");if(s[0]===t){n=s;break}}if(!Ge(n)||n.length<2)return"";var o=n[1];try{o=decodeURIComponent(o)}catch{j.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},Eo=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},Be={campaignParams:function(e){var t=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","fbclid","msclkid"].concat(e||[]),n={};return be(t,function(r){var i=nd(Ce.URL,r);i.length&&(n[r]=i)}),n},searchEngine:function(){var e=Ce.referrer;return e?e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null:null},searchInfo:function(){var e=Be.searchEngine(),t=e!="yahoo"?"q":"p",n={};if(!Wt(e)){n.$search_engine=e;var r=nd(Ce.referrer,t);r.length&&(n.ph_keyword=r)}return n},browser:function(e,t,n){return t=t||"",n||de(e," OPR/")?de(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":de(e,"IEMobile")||de(e,"WPDesktop")?"Internet Explorer Mobile":de(e,"SamsungBrowser/")?"Samsung Internet":de(e,"Edge")||de(e,"Edg/")?"Microsoft Edge":de(e,"FBIOS")?"Facebook Mobile":de(e,"Chrome")?"Chrome":de(e,"CriOS")?"Chrome iOS":de(e,"UCWEB")||de(e,"UCBrowser")?"UC Browser":de(e,"FxiOS")?"Firefox iOS":de(t,"Apple")||function(r){return de(r,"Safari")&&!de(r,"Chrome")&&!de(r,"Android")}(e)?de(e,"Mobile")?"Mobile Safari":"Safari":de(e,"Android")?"Android Mobile":de(e,"Konqueror")||de(e,"konqueror")?"Konqueror":de(e,"Firefox")?"Firefox":de(e,"MSIE")||de(e,"Trident/")?"Internet Explorer":de(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,n){var r={"Internet Explorer Mobile":[/rv:(\d+(\.\d+)?)/],"Microsoft Edge":[/Edge?\/(\d+(\.\d+)?)/],Chrome:[/Chrome\/(\d+(\.\d+)?)/],"Chrome iOS":[/CriOS\/(\d+(\.\d+)?)/],"UC Browser":[/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/],Safari:[/Version\/(\d+(\.\d+)?)/],"Mobile Safari":[/Version\/(\d+(\.\d+)?)/],Opera:[/(Opera|OPR)\/(\d+(\.\d+)?)/],Firefox:[/Firefox\/(\d+(\.\d+)?)/],"Firefox iOS":[/FxiOS\/(\d+(\.\d+)?)/],Konqueror:[/Konqueror[:/]?(\d+(\.\d+)?)/i],BlackBerry:[/BlackBerry (\d+(\.\d+)?)/,/Version\/(\d+(\.\d+)?)/],"Android Mobile":[/android\s(\d+(\.\d+)?)/],"Samsung Internet":[/SamsungBrowser\/(\d+(\.\d+)?)/],"Internet Explorer":[/(rv:|MSIE )(\d+(\.\d+)?)/],Mozilla:[/rv:(\d+(\.\d+)?)/]}[Be.browser(e,t,n)];if(se(r))return null;for(var i=0;i<r.length;i++){var s=r[i],o=e.match(s);if(o)return parseFloat(o[o.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},os:function(e){if(/Windows/i.test(e)){if(/Phone/.test(e)||/WPDesktop/.test(e))return{os_name:"Windows Phone",os_version:""};var t=/Windows NT ([0-9.]+)/i.exec(e);return t&&t[1]?{os_name:"Windows",os_version:t[1]}:{os_name:"Windows",os_version:""}}if(/(iPhone|iPad|iPod)/.test(e)){var n=/OS (\d+)_(\d+)_?(\d+)?/i.exec(e);return n&&n[1]?{os_name:"iOS",os_version:[n[1],n[2],n[3]||"0"].join(".")}:{os_name:"iOS",os_version:""}}if(/Android/.test(e)){var r=/Android (\d+)\.(\d+)\.?(\d+)?/i.exec(e);return r&&r[1]?{os_name:"Android",os_version:[r[1],r[2],r[3]||"0"].join(".")}:{os_name:"Android",os_version:""}}if(/(BlackBerry|PlayBook|BB10)/i.test(e))return{os_name:"BlackBerry",os_version:""};if(/Mac/i.test(e)){var i=/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i.exec(e);return i&&i[1]?{os_name:"Mac OS X",os_version:[i[1],i[2],i[3]||"0"].join(".")}:{os_name:"Mac OS X",os_version:""}}return/Linux/.test(e)?{os_name:"Linux",os_version:""}:/CrOS/.test(e)?{os_name:"Chrome OS",os_version:""}:{os_name:"",os_version:""}},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)&&!/Mobile/.test(e)?"Android Tablet":/Android/.test(e)?"Android":""},deviceType:function(e){var t=this.device(e);return t==="iPad"||t==="Android Tablet"?"Tablet":t?"Mobile":"Desktop"},referrer:function(){return Ce.referrer||"$direct"},referringDomain:function(){if(!Ce.referrer)return"$direct";var e=Ce.createElement("a");return e.href=Ce.referrer,e.host},properties:function(){var e,t,n,r,i,s,o,a=Be.os(dt),l=a.os_name,u=a.os_version;return Xe(Vl({$os:l,$os_version:u,$browser:Be.browser(dt,navigator.vendor,window.opera),$device:Be.device(dt),$device_type:Be.deviceType(dt)}),{$current_url:(e=window)===null||e===void 0?void 0:e.location.href,$host:(t=window)===null||t===void 0?void 0:t.location.host,$pathname:(n=window)===null||n===void 0?void 0:n.location.pathname,$raw_user_agent:dt.length>1e3?dt.substring(0,997)+"...":dt,$browser_version:Be.browserVersion(dt,navigator.vendor,window.opera),$browser_language:Be.browserLanguage(),$screen_height:(r=window)===null||r===void 0?void 0:r.screen.height,$screen_width:(i=window)===null||i===void 0?void 0:i.screen.width,$viewport_height:(s=window)===null||s===void 0?void 0:s.innerHeight,$viewport_width:(o=window)===null||o===void 0?void 0:o.innerWidth,$lib:"web",$lib_version:fr.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Ah()/1e3})},people_properties:function(){var e=Be.os(dt),t=e.os_name,n=e.os_version;return Xe(Vl({$os:t,$os_version:n,$browser:Be.browser(dt,navigator.vendor,window.opera)}),{$browser_version:Be.browserVersion(dt,navigator.vendor,window.opera)})}},Ay=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"],rd=function(){function e(t){Me(this,e);var n="";t.token&&(n=t.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),this.props={},this.campaign_params_saved=!1,this.custom_campaign_params=t.custom_campaign_params||[],t.persistence_name?this.name="ph_"+t.persistence_name:this.name="ph_"+n+"_posthog",Ay.indexOf(t.persistence.toLowerCase())===-1&&(j.critical("Unknown persistence type "+t.persistence+"; falling back to cookie"),t.persistence="cookie");var r=t.persistence.toLowerCase();r==="localstorage"&&Ae.is_supported()?this.storage=Ae:r==="localstorage+cookie"&&Kl.is_supported()?this.storage=Kl:r==="sessionstorage"&&Ue.is_supported()?this.storage=Ue:this.storage=r==="memory"?Ty:cn,this.user_state="anonymous",this.load(),this.update_config(t),this.save()}return Ie(e,[{key:"properties",value:function(){var t={};return be(this.props,function(n,r){if(r===Fr&&$n(n))for(var i=Object.keys(n),s=0;s<i.length;s++)t["$feature/".concat(i[s])]=n[i[s]];else a=r,l=!1,(Wt(o=xy)?l:qu&&o.indexOf===qu?o.indexOf(a)!=-1:(be(o,function(u){if(l||(l=u===a))return Lc}),l))||(t[r]=n);var o,a,l}),t}},{key:"load",value:function(){if(!this.disabled){var t=this.storage.parse(this.name);t&&(this.props=Xe({},t))}}},{key:"save",value:function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure)}},{key:"remove",value:function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)}},{key:"clear",value:function(){this.remove(),this.props={}}},{key:"register_once",value:function(t,n,r){var i=this;if($n(t)){se(n)&&(n="None"),this.expire_days=se(r)?this.default_expiry:r;var s=!1;if(be(t,function(o,a){i.props.hasOwnProperty(a)&&i.props[a]!==n||(i.props[a]=o,s=!0)}),s)return this.save(),!0}return!1}},{key:"register",value:function(t,n){var r=this;if($n(t)){this.expire_days=se(n)?this.default_expiry:n;var i=!1;if(be(t,function(s,o){t.hasOwnProperty(o)&&r.props[o]!==s&&(r.props[o]=s,i=!0)}),i)return this.save(),!0}return!1}},{key:"unregister",value:function(t){t in this.props&&(delete this.props[t],this.save())}},{key:"update_campaign_params",value:function(){this.campaign_params_saved||(this.register(Be.campaignParams(this.custom_campaign_params)),this.campaign_params_saved=!0)}},{key:"update_search_keyword",value:function(){this.register(Be.searchInfo())}},{key:"update_referrer_info",value:function(){this.register({$referrer:this.props.$referrer||Be.referrer(),$referring_domain:this.props.$referring_domain||Be.referringDomain()})}},{key:"get_referrer_info",value:function(){return Vl({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}},{key:"safe_merge",value:function(t){return be(this.props,function(n,r){r in t||(t[r]=n)}),t}},{key:"update_config",value:function(t){this.default_expiry=this.expire_days=t.cookie_expiration,this.set_disabled(t.disable_persistence),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie)}},{key:"set_disabled",value:function(t){this.disabled=t,this.disabled?this.remove():this.save()}},{key:"set_cross_subdomain",value:function(t){t!==this.cross_subdomain&&(this.cross_subdomain=t,this.remove(),this.save())}},{key:"get_cross_subdomain",value:function(){return!!this.cross_subdomain}},{key:"set_secure",value:function(t){t!==this.secure&&(this.secure=t,this.remove(),this.save())}},{key:"set_event_timer",value:function(t,n){var r=this.props[Ni]||{};r[t]=n,this.props[Ni]=r,this.save()}},{key:"remove_event_timer",value:function(t){var n=(this.props[Ni]||{})[t];return se(n)||(delete this.props[Ni][t],this.save()),n}},{key:"get_user_state",value:function(){return this.props[Yl]||"anonymous"}},{key:"set_user_state",value:function(t){this.props[Yl]=t,this.save()}},{key:"get_quota_limits",value:function(){return this.props[Jl]||{}}},{key:"set_quota_limits",value:function(t){this.props[Jl]=t,this.save()}}]),e}(),id=2,Oy=4,Rh=3,My=6,Iy=0,$y="rrweb/console@1",Nt,Fy=Ie(function e(t){var n,r,i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Me(this,e),H(this,"bucketSize",100),H(this,"refillRate",10),H(this,"mutationBuckets",{}),H(this,"loggedTracker",{}),H(this,"refillBuckets",function(){Object.keys(i.mutationBuckets).forEach(function(o){i.mutationBuckets[o]=i.mutationBuckets[o]+i.refillRate,i.mutationBuckets[o]>=i.bucketSize&&delete i.mutationBuckets[o]})}),H(this,"getNodeOrRelevantParent",function(o){var a=i.rrweb.mirror.getNode(o);if((a==null?void 0:a.nodeName)!=="svg"&&a instanceof Element){var l=a.closest("svg");if(l)return[i.rrweb.mirror.getId(l),l]}return[o,a]}),H(this,"numberOfChanges",function(o){var a,l,u,c,h,m,f,p;return((a=(l=o.removes)===null||l===void 0?void 0:l.length)!==null&&a!==void 0?a:0)+((u=(c=o.attributes)===null||c===void 0?void 0:c.length)!==null&&u!==void 0?u:0)+((h=(m=o.texts)===null||m===void 0?void 0:m.length)!==null&&h!==void 0?h:0)+((f=(p=o.adds)===null||p===void 0?void 0:p.length)!==null&&f!==void 0?f:0)}),H(this,"throttleMutations",function(o){if(o.type!==Rh||o.data.source!==Iy)return o;var a=o.data,l=i.numberOfChanges(a);a.attributes&&(a.attributes=a.attributes.filter(function(c){var h,m,f,p=ws(i.getNodeOrRelevantParent(c.id),2),g=p[0],x=p[1];return i.mutationBuckets[g]===0?!1:(i.mutationBuckets[g]=(h=i.mutationBuckets[g])!==null&&h!==void 0?h:i.bucketSize,i.mutationBuckets[g]=Math.max(i.mutationBuckets[g]-1,0),i.mutationBuckets[g]===0&&(i.loggedTracker[g]||(i.loggedTracker[g]=!0,(m=(f=i.options).onBlockedNode)===null||m===void 0||m.call(f,g,x))),c)}));var u=i.numberOfChanges(a);return u!==0||l===u?o:void 0}),this.rrweb=t,this.options=s,this.refillRate=(n=this.options.refillRate)!==null&&n!==void 0?n:this.refillRate,this.bucketSize=(r=this.options.bucketSize)!==null&&r!==void 0?r:this.bucketSize,setInterval(function(){i.refillBuckets()},1e3)}),jh=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(jh||{}),Ry="/s/";(function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet"})(Nt||(Nt={}));var jy=[Nt.MouseMove,Nt.MouseInteraction,Nt.Scroll,Nt.ViewportResize,Nt.Input,Nt.TouchMove,Nt.MediaInteraction,Nt.Drag],Ny=function(){function e(t){var n=this;if(Me(this,e),H(this,"_linkedFlagSeen",!1),H(this,"_lastActivityTimestamp",Date.now()),H(this,"isIdle",!1),H(this,"_linkedFlag",null),H(this,"_sampleRate",null),H(this,"_minimumDuration",null),this.instance=t,this._captureStarted=!1,this._endpoint=Ry,this.stopRrweb=void 0,this.receivedDecide=!1,window.addEventListener("beforeunload",function(){n._flushBuffer()}),!this.instance.sessionManager)throw j.error("Session recording started without valid sessionManager"),new Error("Session recording started without valid sessionManager. This is a bug.");var r=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=r.sessionId,s=r.windowId;this.windowId=s,this.sessionId=i,this.buffer=this.clearBuffer()}return Ie(e,[{key:"started",get:function(){return this._captureStarted}},{key:"sessionManager",get:function(){if(!this.instance.sessionManager)throw j.error("Session recording started without valid sessionManager"),new Error("Session recording started without valid sessionManager. This is a bug.");return this.instance.sessionManager}},{key:"isSampled",get:function(){return on(this._sampleRate)?this.instance.get_property(ao):null}},{key:"sessionDuration",get:function(){var t,n,r=(t=this.buffer)===null||t===void 0?void 0:t.data[((n=this.buffer)===null||n===void 0?void 0:n.data.length)-1],i=this.sessionManager.checkAndGetSessionAndWindowId(!0).sessionStartTimestamp;return r?r.timestamp-i:null}},{key:"isRecordingEnabled",get:function(){var t=!!this.instance.get_property(Ql),n=!this.instance.config.disable_session_recording;return t&&n}},{key:"isConsoleLogCaptureEnabled",get:function(){var t=!!this.instance.get_property(Ku),n=this.instance.config.enable_recording_console_log;return n??t}},{key:"recordingVersion",get:function(){var t,n=this.instance.get_property(Zu);return((t=this.instance.config.session_recording)===null||t===void 0?void 0:t.recorderVersion)||n||"v1"}},{key:"status",get:function(){return this.receivedDecide?this.isRecordingEnabled?gt(this._linkedFlag)&&!this._linkedFlagSeen?"buffering":zl(this.isSampled)?this.isSampled?"sampled":"disabled":"active":"disabled":"buffering"}},{key:"startRecordingIfEnabled",value:function(){this.isRecordingEnabled?this.startCaptureAndTrySendingQueuedSnapshots():(this.stopRecording(),this.clearBuffer())}},{key:"stopRecording",value:function(){this._captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this._captureStarted=!1)}},{key:"makeSamplingDecision",value:function(t){var n,r=this.sessionId!==t;if(on(this._sampleRate)){var i,s=this.isSampled;r||!zl(s)?i=Math.random()<this._sampleRate:i=s,i||j.warn("[SessionSampling] Sample rate (".concat(this._sampleRate,") has determined that this sessionId (").concat(t,") will not be sent to the server.")),(n=this.instance.persistence)===null||n===void 0||n.register(H({},ao,i))}else{var o;(o=this.instance.persistence)===null||o===void 0||o.register(H({},ao,null))}}},{key:"afterDecideResponse",value:function(t){var n,r,i,s,o,a,l,u=this;this.instance.persistence&&this.instance.persistence.register((H(l={},Ql,!!t.sessionRecording),H(l,Ku,(o=t.sessionRecording)===null||o===void 0?void 0:o.consoleLogRecordingEnabled),H(l,Zu,(a=t.sessionRecording)===null||a===void 0?void 0:a.recorderVersion),l));var c=(n=t.sessionRecording)===null||n===void 0?void 0:n.sampleRate;this._sampleRate=se(c)||Wt(c)?null:parseFloat(c);var h,m=(r=t.sessionRecording)===null||r===void 0?void 0:r.minimumDurationMilliseconds;if(this._minimumDuration=se(m)?null:m,this._linkedFlag=((i=t.sessionRecording)===null||i===void 0?void 0:i.linkedFlag)||null,(s=t.sessionRecording)!==null&&s!==void 0&&s.endpoint&&(this._endpoint=(h=t.sessionRecording)===null||h===void 0?void 0:h.endpoint),on(this._sampleRate)&&this.sessionManager.onSessionId(function(p){u.makeSamplingDecision(p)}),gt(this._linkedFlag)){var f=this._linkedFlag;this.instance.onFeatureFlags(function(p){u._linkedFlagSeen=p.includes(f)})}this.receivedDecide=!0,this.startRecordingIfEnabled()}},{key:"log",value:function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"log";(n=this.instance.sessionRecording)===null||n===void 0||n.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:r,trace:[],payload:[JSON.stringify(t)]}},timestamp:Ah()})}},{key:"startCaptureAndTrySendingQueuedSnapshots",value:function(){this._startCapture()}},{key:"_startCapture",value:function(){var t=this;if(!se(Object.assign)&&!this._captureStarted&&!this.instance.config.disable_session_recording){this._captureStarted=!0,this.sessionManager.checkAndGetSessionAndWindowId();var n=this.recordingVersion==="v2"?"recorder-v2.js":"recorder.js";this.instance.__loaded_recorder_version!==this.recordingVersion?Hi(this.instance.config.api_host+"/static/".concat(n,"?v=").concat(fr.LIB_VERSION),function(r){if(r)return j.error("Could not load ".concat(n),r);t._onScriptLoaded()}):this._onScriptLoaded()}}},{key:"_isInteractiveEvent",value:function(t){var n;return t.type===Rh&&jy.indexOf((n=t.data)===null||n===void 0?void 0:n.source)!==-1}},{key:"_updateWindowAndSessionIds",value:function(t){var n=this._isInteractiveEvent(t);if(n||this.isIdle||t.timestamp-this._lastActivityTimestamp>3e5&&(this.isIdle=!0),n&&(this._lastActivityTimestamp=t.timestamp,this.isIdle&&(this.isIdle=!1,this._tryTakeFullSnapshot())),!this.isIdle){var r=this.sessionManager.checkAndGetSessionAndWindowId(!n,t.timestamp),i=r.windowId,s=r.sessionId,o=this.sessionId!==s,a=this.windowId!==i;this.windowId=i,this.sessionId=s,[id,Oy].indexOf(t.type)===-1&&(a||o)&&this._tryTakeFullSnapshot()}}},{key:"_tryTakeFullSnapshot",value:function(){if(!this._captureStarted)return!1;try{var t;return(t=this.rrwebRecord)===null||t===void 0||t.takeFullSnapshot(),!0}catch(n){return j.error("Error taking full snapshot.",n),!1}}},{key:"_onScriptLoaded",value:function(){var t,n=this,r={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;for(var i=this.instance.config.session_recording,s=0,o=Object.entries(i||{});s<o.length;s++){var a=ws(o[s],2),l=a[0],u=a[1];l in r&&(r[l]=u)}this.rrwebRecord?(this.mutationRateLimiter=(t=this.mutationRateLimiter)!==null&&t!==void 0?t:new Fy(this.rrwebRecord,{onBlockedNode:function(c,h){var m="Too many mutations on node '".concat(c,"'. Rate limiting. This could be due to SVG animations or something similar");j.info(m,{node:h}),n.log("[PostHog Recorder] "+m,"warn")}}),this.stopRrweb=this.rrwebRecord(J({emit:function(c){n.onRRwebEmit(c)},plugins:window.rrwebConsoleRecord&&this.isConsoleLogCaptureEnabled?[window.rrwebConsoleRecord.getRecordConsolePlugin()]:[]},r)),this.instance._addCaptureHook(function(c){try{if(c==="$pageview"){var h,m=n._maskUrl(window.location.href);if(!m)return;(h=n.rrwebRecord)===null||h===void 0||h.addCustomEvent("$pageview",{href:m})}}catch(f){j.error("Could not add $pageview to rrweb session",f)}}),this._lastActivityTimestamp=Date.now(),this.isIdle=!1):j.error("onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.")}},{key:"onRRwebEmit",value:function(t){if(t&&$n(t)){if(t.type===jh.Meta){var n=this._maskUrl(t.data.href);if(!n)return;t.data.href=n}var r=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(t):t;if(r){var i=function(o){var a=o;if(a&&$n(a)&&a.type===My&&$n(a.data)&&a.data.plugin===$y){a.data.payload.payload.length>10&&(a.data.payload.payload=a.data.payload.payload.slice(0,10),a.data.payload.payload.push("...[truncated]"));for(var l=[],u=0;u<a.data.payload.payload.length;u++)a.data.payload.payload[u]&&a.data.payload.payload[u].length>2e3?l.push(a.data.payload.payload[u].slice(0,2e3)+"...[truncated]"):l.push(a.data.payload.payload[u]);return a.data.payload.payload=l,o}return o}(r),s={$snapshot_bytes:JSON.stringify(i).length,$snapshot_data:i,$session_id:this.sessionId,$window_id:this.windowId};this._updateWindowAndSessionIds(i),this.isIdle||(this.status!=="disabled"?this._captureSnapshotBuffered(s):this.clearBuffer())}}}},{key:"_maskUrl",value:function(t){var n=this.instance.config.session_recording;if(n.maskNetworkRequestFn){var r,i={url:t};return(r=i=n.maskNetworkRequestFn(i))===null||r===void 0?void 0:r.url}return t}},{key:"clearBuffer",value:function(){return this.buffer=void 0,{size:0,data:[],sessionId:this.sessionId,windowId:this.windowId}}},{key:"_flushBuffer",value:function(){var t=this;this.flushBufferTimer&&(clearTimeout(this.flushBufferTimer),this.flushBufferTimer=void 0);var n=this._minimumDuration,r=this.sessionDuration,i=on(n)&&on(r)&&r<n;return this.status==="buffering"||i?(this.flushBufferTimer=setTimeout(function(){t._flushBuffer()},2e3),this.buffer||this.clearBuffer()):this.buffer&&this.buffer.data.length!==0?(this._captureSnapshot({$snapshot_bytes:this.buffer.size,$snapshot_data:this.buffer.data,$session_id:this.buffer.sessionId,$window_id:this.buffer.windowId}),this.clearBuffer()):this.buffer||this.clearBuffer()}},{key:"_captureSnapshotBuffered",value:function(t){var n,r=this,i=2+(((n=this.buffer)===null||n===void 0?void 0:n.data.length)||0);(!this.buffer||this.buffer.size+t.$snapshot_bytes+i>943718.4||this.buffer.sessionId!==this.sessionId)&&(this.buffer=this._flushBuffer()),this.buffer.size+=t.$snapshot_bytes,this.buffer.data.push(t.$snapshot_data),this.flushBufferTimer||(this.flushBufferTimer=setTimeout(function(){r._flushBuffer()},2e3))}},{key:"_captureSnapshot",value:function(t){this.instance.capture("$snapshot",t,{transport:"XHR",method:"POST",endpoint:this._endpoint,_noTruncate:!0,_batchKey:"recordings",_metrics:{rrweb_full_snapshot:t.$snapshot_data.type===id}})}}]),e}(),Rt={entryType:0,timeOrigin:1,name:2,startTime:3,redirectStart:4,redirectEnd:5,workerStart:6,fetchStart:7,domainLookupStart:8,domainLookupEnd:9,connectStart:10,secureConnectionStart:11,connectEnd:12,requestStart:13,responseStart:14,responseEnd:15,decodedBodySize:16,encodedBodySize:17,initiatorType:18,nextHopProtocol:19,renderBlockingStatus:20,responseStatus:21,transferSize:22,element:23,renderTime:24,loadTime:25,size:26,id:27,url:28,domComplete:29,domContentLoadedEvent:30,domInteractive:31,loadEventEnd:32,loadEventStart:33,redirectCount:34,navigationType:35,unloadEventEnd:36,unloadEventStart:37,duration:39,timestamp:40},Ly=["first-input","navigation","paint","resource"],Dy=["/s/","/e/"],By=function(){function e(t){Me(this,e),H(this,"_forceAllowLocalhost",!1),this.instance=t}return Ie(e,[{key:"startObservingIfEnabled",value:function(){this.isEnabled()?this.startObserving():this.stopObserving()}},{key:"startObserving",value:function(){var t,n,r=this;if(!this.observer)if(se((t=window)===null||t===void 0||(n=t.PerformanceObserver)===null||n===void 0?void 0:n.supportedEntryTypes))j.info("[PerformanceObserver] not started because PerformanceObserver is not supported by this browser.");else if(!Cy.includes(location.hostname)||this._forceAllowLocalhost)try{this.observer=new PerformanceObserver(function(s){s.getEntries().forEach(function(o){r._capturePerformanceEvent(o)})});var i=PerformanceObserver.supportedEntryTypes.filter(function(s){return Ly.includes(s)});i.forEach(function(s){var o;(o=r.observer)===null||o===void 0||o.observe({type:s,buffered:!0})})}catch(s){j.error("PostHog failed to start performance observer",s),this.stopObserving()}else j.info("[PerformanceObserver] not started because we are on localhost.")}},{key:"stopObserving",value:function(){this.observer&&(this.observer.disconnect(),this.observer=void 0)}},{key:"isObserving",value:function(){return!!this.observer}},{key:"isEnabled",value:function(){var t,n;return(t=(n=this.instance.config.capture_performance)!==null&&n!==void 0?n:this.remoteEnabled)!==null&&t!==void 0&&t}},{key:"afterDecideResponse",value:function(t){this.remoteEnabled=t.capturePerformance||!1,this.isEnabled()&&this.startObserving()}},{key:"_capturePerformanceEvent",value:function(t){if(t.name.indexOf(this.instance.config.api_host)===0){var n=t.name.replace(this.instance.config.api_host,"");if(Dy.find(function(f){return n.indexOf(f)===0}))return}var r={url:t.name},i=this.instance.config.session_recording;if(i.maskNetworkRequestFn&&(r=i.maskNetworkRequestFn(r)),r){var s=t.toJSON();s.name=r.url;var o={},a=Math.floor(Date.now()-performance.now());for(var l in o[Rt.timeOrigin]=a,o[Rt.timestamp]=Math.floor(a+t.startTime),Rt)se(s[l])||(o[Rt[l]]=s[l]);if(this.capturePerformanceEvent(o),Hy(t)){var u,c=dr(t.serverTiming||[]);try{for(c.s();!(u=c.n()).done;){var h,m=u.value;this.capturePerformanceEvent((H(h={},Rt.timeOrigin,a),H(h,Rt.timestamp,Math.floor(a+t.startTime)),H(h,Rt.name,m.name),H(h,Rt.duration,m.duration),H(h,Rt.entryType,"serverTiming"),h))}}catch(f){c.e(f)}finally{c.f()}}}}},{key:"capturePerformanceEvent",value:function(t){var n,r=t[Rt.timestamp];(n=this.instance.sessionRecording)===null||n===void 0||n.onRRwebEmit({type:6,data:{plugin:"posthog/network@1",payload:t},timestamp:r})}}]),e}(),Hy=function(e){return e.entryType==="navigation"||e.entryType==="resource"},Uy=function(){function e(t){Me(this,e),this.instance=t,this.instance.decideEndpointWasHit=this.instance._hasBootstrappedFeatureFlags()}return Ie(e,[{key:"call",value:function(){var t=this,n=Dc(JSON.stringify({token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),person_properties:this.instance.get_property(Rr),group_properties:this.instance.get_property(xn),disable_flags:this.instance.config.advanced_disable_feature_flags||this.instance.config.advanced_disable_feature_flags_on_first_load||void 0}));this.instance._send_request("".concat(this.instance.config.api_host,"/decide/?v=3"),{data:n,verbose:!0},{method:"POST"},function(r){return t.parseDecideResponse(r)})}},{key:"parseDecideResponse",value:function(t){var n,r,i,s,o=this;if(this.instance.featureFlags.setReloadingPaused(!1),this.instance.featureFlags._startReloadTimer(),(t==null?void 0:t.status)!==0){if(!document||!document.body)return j.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){o.parseDecideResponse(t)},500);this.instance.toolbar.afterDecideResponse(t),(n=this.instance.sessionRecording)===null||n===void 0||n.afterDecideResponse(t),Sn.afterDecideResponse(t,this.instance),(r=this.instance.webPerformance)===null||r===void 0||r.afterDecideResponse(t),this.instance._afterDecideResponse(t),this.instance.config.advanced_disable_feature_flags_on_first_load||this.instance.featureFlags.receivedFeatureFlags(t);var a=(i=window)===null||i===void 0?void 0:i.extendPostHogWithSurveys;t.surveys&&!a&&Hi(this.instance.config.api_host+"/static/surveys.js",function(f){if(f)return j.error("Could not load surveys script",f);window.extendPostHogWithSurveys(o.instance)});var l=(s=window)===null||s===void 0?void 0:s.extendPostHogWithExceptionAutoCapture;if(t.autocaptureExceptions&&t.autocaptureExceptions&&se(l)&&Hi(this.instance.config.api_host+"/static/exception-autocapture.js",function(f){if(f)return j.error("Could not load exception autocapture script",f);window.extendPostHogWithExceptionAutocapture(o.instance,t)}),t.siteApps)if(this.instance.config.opt_in_site_apps){var u,c=this.instance.config.api_host,h=dr(t.siteApps);try{var m=function(){var f=u.value,p=f.id,g=f.url,x=[c,c[c.length-1]==="/"&&g[0]==="/"?g.substring(1):g].join("");window["__$$ph_site_app_".concat(p)]=o.instance,Hi(x,function(S){S&&j.error("Error while initializing PostHog app with config id ".concat(p),S)})};for(h.s();!(u=h.n()).done;)m()}catch(f){h.e(f)}finally{h.f()}}else t.siteApps.length>0&&j.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}else j.error("Failed to fetch feature flags from PostHog.")}}]),e}(),Gy=["https://app.posthog.com","https://eu.posthog.com"],zy=["source"],qy=U.location?Eo(U.location.hash,"__posthog")||Eo(location.hash,"state"):null,Vy=function(){function e(t){Me(this,e),this.instance=t}return Ie(e,[{key:"afterDecideResponse",value:function(t){var n=t.toolbarParams||t.editorParams||(t.toolbarVersion?{toolbarVersion:t.toolbarVersion}:{});t.isAuthenticated&&n.toolbarVersion&&n.toolbarVersion.indexOf("toolbar")===0&&this.loadToolbar(J({},n))}},{key:"maybeLoadToolbar",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:U.location,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:U.history;try{if(!n){try{U.localStorage.setItem("test","test"),U.localStorage.removeItem("test")}catch{return!1}n=U.localStorage}var i,s=qy||Eo(t.hash,"__posthog")||Eo(t.hash,"state"),o=s?Qu(function(){return JSON.parse(atob(decodeURIComponent(s)))})||Qu(function(){return JSON.parse(decodeURIComponent(s))}):null;return o&&o.action==="ph_authorize"?((i=o).source="url",i&&Object.keys(i).length>0&&(o.desiredHash?t.hash=o.desiredHash:r?r.replaceState("",document.title,t.pathname+t.search):t.hash="")):((i=JSON.parse(n.getItem("_postHogToolbarParams")||"{}")).source="localstorage",delete i.userIntent),!(!i.token||this.instance.config.token!==i.token)&&(this.loadToolbar(i),!0)}catch{return!1}}},{key:"loadToolbar",value:function(t){var n=this;if(U._postHogToolbarLoaded)return!1;U._postHogToolbarLoaded=!0;var r=this.instance.config.api_host,i=3e5,s=Math.floor(Date.now()/i)*i,o="".concat(r).concat(r.endsWith("/")?"":"/","static/toolbar.js?t=").concat(s),a=!Gy.includes(this.instance.config.api_host)&&this.instance.config.advanced_disable_toolbar_metrics,l=J(J({token:this.instance.config.token},t),{},{apiURL:r},a?{instrument:!1}:{});l.source;var u=dy(l,zy);return U.localStorage.setItem("_postHogToolbarParams",JSON.stringify(u)),Hi(o,function(c){c?j.error("Failed to load toolbar",c):(U.ph_load_toolbar||U.ph_load_editor)(l,n.instance)}),Bi(U,"turbolinks:load",function(){U._postHogToolbarLoaded=!1,n.loadToolbar(l)}),!0}},{key:"_loadEditor",value:function(t){return this.loadToolbar(t)}},{key:"maybeLoadEditor",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:U.location,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:U.history;return this.maybeLoadToolbar(t,n,r)}}]),e}(),Qy="__ph_opt_in_out_";function Wy(e,t){Lh(!0,e,t)}function Xy(e,t){Lh(!1,e,t)}function Yy(e,t){return Nh(e,t)==="1"}function sd(e,t){return!!function(n){if(n&&n.respectDnt){var r=n&&n.window||U,i=r.navigator||{},s=!1;return be([i.doNotTrack,i.msDoNotTrack,r.doNotTrack],function(o){de([!0,1,"1","yes"],o)&&(s=!0)}),s}return!1}(t)||Nh(e,t)==="0"}function Jy(e,t){Bc(t=t||{}).remove(Hc(e,t),!!t.crossSubdomainCookie)}function Bc(e){return(e=e||{}).persistenceType==="localStorage"?Ae:e.persistenceType==="localStorage+cookie"?Kl:cn}function Hc(e,t){return((t=t||{}).persistencePrefix||Qy)+e}function Nh(e,t){return Bc(t).get(Hc(e,t))}function Lh(e,t,n){gt(t)&&t.length?(Bc(n=n||{}).set(Hc(t,n),e?1:0,on(n.cookieExpiration)?n.cookieExpiration:null,n.crossSubdomainCookie,n.secureCookie),n.capture&&e&&n.capture(n.captureEventName||"$opt_in",n.captureProperties||{},{send_instantly:!0})):j.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}var Dh=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:3e3;Me(this,e),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=t}return Ie(e,[{key:"setPollInterval",value:function(t){this._pollInterval=t,this.isPolling&&this.poll()}},{key:"poll",value:function(){}},{key:"unload",value:function(){}},{key:"getTime",value:function(){return new Date().getTime()}}]),e}(),Ky=function(e){Eh(n,Dh);var t=kh(n);function n(r){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e3;return Me(this,n),(i=t.call(this,s)).handlePollRequest=r,i}return Ie(n,[{key:"enqueue",value:function(r,i,s){this._event_queue.push({url:r,data:i,options:s}),this.isPolling||(this.isPolling=!0,this.poll())}},{key:"poll",value:function(){var r=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(r._event_queue.length>0){var i=r.formatQueue(),s=function(a){var l=i[a],u=l.url,c=l.data,h=l.options;be(c,function(m,f){c[f].offset=Math.abs(c[f].timestamp-r.getTime()),delete c[f].timestamp}),r.handlePollRequest(u,c,h)};for(var o in i)s(o);r._event_queue.length=0,r._empty_queue_count=0}else r._empty_queue_count++;r._empty_queue_count>4&&(r.isPolling=!1,r._empty_queue_count=0),r.isPolling&&r.poll()},this._pollInterval)}},{key:"unload",value:function(){var r=this;clearTimeout(this._poller);var i=this._event_queue.length>0?this.formatQueue():{};this._event_queue.length=0;var s=Object.values(i);[].concat(Ul(s.filter(function(o){return o.url.indexOf("/e")===0})),Ul(s.filter(function(o){return o.url.indexOf("/e")!==0}))).map(function(o){var a=o.url,l=o.data,u=o.options;r.handlePollRequest(a,l,J(J({},u),{},{transport:"sendBeacon"}))})}},{key:"formatQueue",value:function(){var r={};return be(this._event_queue,function(i){var s=i.url,o=i.data,a=i.options,l=(a?a._batchKey:null)||s;se(r[l])&&(r[l]={data:[],url:s,options:a}),a&&r[l].options&&r[l].options._metrics&&!r[l].options._metrics.rrweb_full_snapshot&&(r[l].options._metrics.rrweb_full_snapshot=a._metrics.rrweb_full_snapshot),r[l].data.push(o)}),r}}]),n}(),vt=Uint8Array,ot=Uint16Array,ci=Uint32Array,Uc=new vt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Gc=new vt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),od=new vt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Bh=function(e,t){for(var n=new ot(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new ci(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return[n,i]},Hh=Bh(Uc,2),Zy=Hh[0],Zl=Hh[1];Zy[28]=258,Zl[258]=28;for(var ad=Bh(Gc,0)[1],ec=new ot(32768),ke=0;ke<32768;++ke){var Wn=(43690&ke)>>>1|(21845&ke)<<1;Wn=(61680&(Wn=(52428&Wn)>>>2|(13107&Wn)<<2))>>>4|(3855&Wn)<<4,ec[ke]=((65280&Wn)>>>8|(255&Wn)<<8)>>>1}var Ui=function(e,t,n){for(var r=e.length,i=0,s=new ot(t);i<r;++i)++s[e[i]-1];var o,a=new ot(t);for(i=0;i<t;++i)a[i]=a[i-1]+s[i-1]<<1;if(n){o=new ot(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],c=t-e[i],h=a[e[i]-1]++<<c,m=h|(1<<c)-1;h<=m;++h)o[ec[h]>>>l]=u}else for(o=new ot(r),i=0;i<r;++i)o[i]=ec[a[e[i]-1]++]>>>15-e[i];return o},pr=new vt(288);for(ke=0;ke<144;++ke)pr[ke]=8;for(ke=144;ke<256;++ke)pr[ke]=9;for(ke=256;ke<280;++ke)pr[ke]=7;for(ke=280;ke<288;++ke)pr[ke]=8;var ko=new vt(32);for(ke=0;ke<32;++ke)ko[ke]=5;var Yn,e0=Ui(pr,9,0),t0=Ui(ko,5,0),Uh=function(e){return(e/8>>0)+(7&e&&1)},Gh=function(e,t,n){(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof ot?ot:e instanceof ci?ci:vt)(n-t);return r.set(e.subarray(t,n)),r},tn=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},Ri=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},rl=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,s=n.slice();if(!i)return[new vt(0),0];if(i==1){var o=new vt(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort(function(y,O){return y.f-O.f}),n.push({s:-1,f:25001});var a=n[0],l=n[1],u=0,c=1,h=2;for(n[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=n[n[u].f<n[h].f?u++:h++],l=n[u!=c&&n[u].f<n[h].f?u++:h++],n[c++]={s:-1,f:a.f+l.f,l:a,r:l};var m=s[0].s;for(r=1;r<i;++r)s[r].s>m&&(m=s[r].s);var f=new ot(m+1),p=n0(n[c-1],f,0);if(p>t){r=0;var g=0,x=p-t,S=1<<x;for(s.sort(function(y,O){return f[O.s]-f[y.s]||y.f-O.f});r<i;++r){var k=s[r].s;if(!(f[k]>t))break;g+=S-(1<<p-f[k]),f[k]=t}for(g>>>=x;g>0;){var T=s[r].s;f[T]<t?g-=1<<t-f[T]++-1:++r}for(;r>=0&&g;--r){var P=s[r].s;f[P]==t&&(--f[P],++g)}p=t}return[new vt(f),p]},n0=function e(t,n,r){return t.s==-1?Math.max(e(t.l,n,r+1),e(t.r,n,r+1)):n[t.s]=r},ld=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new ot(++t),r=0,i=e[0],s=1,o=function(l){n[r++]=l},a=1;a<=t;++a)if(e[a]==i&&a!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=e[a]}return[n.subarray(0,r),t]},ji=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},lo=function(e,t,n){var r=n.length,i=Uh(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var s=0;s<r;++s)e[i+s+4]=n[s];return 8*(i+4+r)},cd=function(e,t,n,r,i,s,o,a,l,u,c){tn(t,c++,n),++i[256];for(var h=rl(i,15),m=h[0],f=h[1],p=rl(s,15),g=p[0],x=p[1],S=ld(m),k=S[0],T=S[1],P=ld(g),y=P[0],O=P[1],M=new ot(19),E=0;E<k.length;++E)M[31&k[E]]++;for(E=0;E<y.length;++E)M[31&y[E]]++;for(var I=rl(M,7),R=I[0],N=I[1],z=19;z>4&&!R[od[z-1]];--z);var Y,q,ae,ge,Se=u+5<<3,ve=ji(i,pr)+ji(s,ko)+o,ye=ji(i,m)+ji(s,g)+o+14+3*z+ji(M,R)+(2*M[16]+3*M[17]+7*M[18]);if(Se<=ve&&Se<=ye)return lo(t,c,e.subarray(l,l+u));if(tn(t,c,1+(ye<ve)),c+=2,ye<ve){Y=Ui(m,f,0),q=m,ae=Ui(g,x,0),ge=g;var V=Ui(R,N,0);for(tn(t,c,T-257),tn(t,c+5,O-1),tn(t,c+10,z-4),c+=14,E=0;E<z;++E)tn(t,c+3*E,R[od[E]]);c+=3*z;for(var Z=[k,y],ce=0;ce<2;++ce){var ue=Z[ce];for(E=0;E<ue.length;++E){var Te=31&ue[E];tn(t,c,V[Te]),c+=R[Te],Te>15&&(tn(t,c,ue[E]>>>5&127),c+=ue[E]>>>12)}}}else Y=e0,q=pr,ae=t0,ge=ko;for(E=0;E<a;++E)if(r[E]>255){Te=r[E]>>>18&31,Ri(t,c,Y[Te+257]),c+=q[Te+257],Te>7&&(tn(t,c,r[E]>>>23&31),c+=Uc[Te]);var ee=31&r[E];Ri(t,c,ae[ee]),c+=ge[ee],ee>3&&(Ri(t,c,r[E]>>>5&8191),c+=Gc[ee])}else Ri(t,c,Y[r[E]]),c+=q[r[E]];return Ri(t,c,Y[256]),c+q[256]},r0=new ci([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),i0=new vt(0),s0=function(){for(var e=new ci(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),o0=function(){var e=4294967295;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=s0[255&n^t[r]]^n>>>8;e=n},d:function(){return 4294967295^e}}},a0=function(e,t,n,r,i){return function(s,o,a,l,u,c){var h=s.length,m=new vt(l+h+5*(1+Math.floor(h/7e3))+u),f=m.subarray(l,m.length-u),p=0;if(!o||h<8)for(var g=0;g<=h;g+=65535){var x=g+65535;x<h?p=lo(f,p,s.subarray(g,x)):(f[g]=c,p=lo(f,p,s.subarray(g,h)))}else{for(var S=r0[o-1],k=S>>>13,T=8191&S,P=(1<<a)-1,y=new ot(32768),O=new ot(P+1),M=Math.ceil(a/3),E=2*M,I=function(mn){return(s[mn]^s[mn+1]<<M^s[mn+2]<<E)&P},R=new ci(25e3),N=new ot(288),z=new ot(32),Y=0,q=0,ae=(g=0,0),ge=0,Se=0;g<h;++g){var ve=I(g),ye=32767&g,V=O[ve];if(y[ye]=V,O[ve]=ye,ge<=g){var Z=h-g;if((Y>7e3||ae>24576)&&Z>423){p=cd(s,f,0,R,N,z,q,ae,Se,g-Se,p),ae=Y=q=0,Se=g;for(var ce=0;ce<286;++ce)N[ce]=0;for(ce=0;ce<30;++ce)z[ce]=0}var ue=2,Te=0,ee=T,Ke=ye-V&32767;if(Z>2&&ve==I(g-Ke))for(var Ln=Math.min(k,Z)-1,Ze=Math.min(32767,g),hn=Math.min(258,Z);Ke<=Ze&&--ee&&ye!=V;){if(s[g+ue]==s[g+ue-Ke]){for(var et=0;et<hn&&s[g+et]==s[g+et-Ke];++et);if(et>ue){if(ue=et,Te=Ke,et>Ln)break;var Xt=Math.min(Ke,et-2),D=0;for(ce=0;ce<Xt;++ce){var _t=g-Ke+ce+32768&32767,pt=_t-y[_t]+32768&32767;pt>D&&(D=pt,V=_t)}}}Ke+=(ye=V)-(V=y[ye])+32768&32767}if(Te){R[ae++]=268435456|Zl[ue]<<18|ad[Te];var Ot=31&Zl[ue],pn=31&ad[Te];q+=Uc[Ot]+Gc[pn],++N[257+Ot],++z[pn],ge=g+ue,++Y}else R[ae++]=s[g],++N[s[g]]}}p=cd(s,f,c,R,N,z,q,ae,Se,g-Se,p),c||(p=lo(f,p,i0))}return Gh(m,0,l+Uh(p)+u)}(e,t.level==null?6:t.level,t.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)},tc=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},l0=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&tc(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},c0=function(e){return 10+(e.filename&&e.filename.length+1||0)};function u0(e,t){t===void 0&&(t={});var n=o0(),r=e.length;n.p(e);var i=a0(e,t,c0(t),8),s=i.length;return l0(i,t),tc(i,s-8,n.d()),tc(i,s-4,r),i}function d0(e,t){var n=e.length;if(!t&&typeof TextEncoder<"u")return new TextEncoder().encode(e);for(var r=new vt(e.length+(e.length>>>1)),i=0,s=function(u){r[i++]=u},o=0;o<n;++o){if(i+5>r.length){var a=new vt(i+8+(n-o<<1));a.set(r),r=a}var l=e.charCodeAt(o);l<128||t?s(l):l<2048?(s(192|l>>>6),s(128|63&l)):l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++o))>>>18),s(128|l>>>12&63),s(128|l>>>6&63),s(128|63&l)):(s(224|l>>>12),s(128|l>>>6&63),s(128|63&l))}return Gh(r,0,i)}(function(e){e.GZipJS="gzip-js",e.Base64="base64"})(Yn||(Yn={}));var zh=function(e,t,n){var r=t||{};r.ip=n.ip?1:0,r._=new Date().getTime().toString(),r.ver=fr.LIB_VERSION;var i=e.split("?");if(i.length>1){var s,o=dr(i[1].split("&"));try{for(o.s();!(s=o.n()).done;){var a=s.value.split("=")[0];se(r[a])||delete r[a]}}catch(u){o.e(u)}finally{o.f()}}var l=e.indexOf("?")>-1?"&":"?";return e+l+function(u){var c,h,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"&",f=[];return be(u,function(p,g){se(p)||se(g)||g==="undefined"||(c=encodeURIComponent(p.toString()),h=encodeURIComponent(g),f[f.length]=h+"="+c)}),f.join(m)}(r)},zc=function e(t,n){if(n.blob&&t.buffer)return new Blob([Gu(t)?t:t.buffer],{type:"text/plain"});if(n.sendBeacon||n.blob){var r=e(t,{method:"POST"});return new Blob([r],{type:"application/x-www-form-urlencoded"})}return n.method!=="POST"?null:(i=Ge(t)||Gu(t)?"data="+encodeURIComponent(t):"data="+encodeURIComponent(t.data),"compression"in t&&t.compression&&(i+="&compression="+t.compression),i);var i},qh=function(e){var t=e.url,n=e.data,r=e.headers,i=e.options,s=e.callback,o=e.retriesPerformedSoFar,a=e.retryQueue,l=e.onXHRError,u=e.timeout,c=u===void 0?6e4:u,h=e.onResponse;on(o)&&o>0&&(t=zh(t,{retry_count:o},{}));var m=new XMLHttpRequest;m.open(i.method||"GET",t,!0);var f=zc(n,i);be(r,function(p,g){m.setRequestHeader(g,p)}),i.method!=="POST"||i.blob||m.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),m.timeout=c,m.withCredentials=!0,m.onreadystatechange=function(){if(m.readyState===4)if(h==null||h(m),m.status===200){if(s){var p;try{p=JSON.parse(m.responseText)}catch(g){return void j.error(g)}s(p)}}else hr(l)&&l(m),(m.status<400||m.status>500)&&a.enqueue({url:t,data:n,options:i,headers:r,retriesPerformedSoFar:(o||0)+1,callback:s}),s==null||s({status:0})},m.send(f)},f0=18e5,h0=function(e){Eh(n,Dh);var t=kh(n);function n(r,i){var s;return Me(this,n),(s=t.call(this)).isPolling=!1,s.queue=[],s.areWeOnline=!0,s.onXHRError=r,s.rateLimiter=i,!se(window)&&"onLine"in window.navigator&&(s.areWeOnline=window.navigator.onLine,window.addEventListener("online",function(){s._handleWeAreNowOnline()}),window.addEventListener("offline",function(){s.areWeOnline=!1})),s}return Ie(n,[{key:"enqueue",value:function(r){var i=r.retriesPerformedSoFar||0;if(!(i>=10)){var s=function(l){var u=3e3*Math.pow(2,l),c=u/2,h=Math.min(f0,u),m=(Math.random()-.5)*(h-c);return Math.ceil(h+m)}(i),o=new Date(Date.now()+s);this.queue.push({retryAt:o,requestData:r});var a="Enqueued failed request for retry in ".concat(s);navigator.onLine||(a+=" (Browser is offline)"),j.warn(a),this.isPolling||(this.isPolling=!0,this.poll())}}},{key:"poll",value:function(){var r=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){r.areWeOnline&&r.queue.length>0&&r.flush(),r.poll()},this._pollInterval)}},{key:"flush",value:function(){var r=new Date(Date.now()),i=this.queue.filter(function(l){return l.retryAt<r});if(i.length>0){this.queue=this.queue.filter(function(l){return l.retryAt>=r});var s,o=dr(i);try{for(o.s();!(s=o.n()).done;){var a=s.value.requestData;this._executeXhrRequest(a)}}catch(l){o.e(l)}finally{o.f()}}}},{key:"unload",value:function(){this._poller&&(clearTimeout(this._poller),this._poller=void 0);var r,i=dr(this.queue);try{for(i.s();!(r=i.n()).done;){var s=r.value.requestData,o=s.url,a=s.data,l=s.options;if(this.rateLimiter.isRateLimited(l._batchKey))j.warn("[RetryQueue] is quota limited. Dropping request.");else try{window.navigator.sendBeacon(o,zc(a,J(J({},l),{},{sendBeacon:!0})))}catch(u){j.error(u)}}}catch(u){i.e(u)}finally{i.f()}this.queue=[]}},{key:"_executeXhrRequest",value:function(r){var i=r.url,s=r.data,o=r.options,a=r.headers,l=r.callback,u=r.retriesPerformedSoFar;this.rateLimiter.isRateLimited(o._batchKey)||qh({url:i,data:s||{},options:o||{},headers:a||{},retriesPerformedSoFar:u||0,callback:l,retryQueue:this,onXHRError:this.onXHRError,onResponse:this.rateLimiter.checkForLimiting})}},{key:"_handleWeAreNowOnline",value:function(){this.areWeOnline=!0,this.flush()}}]),n}();Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return on(e)&&isFinite(e)&&Math.floor(e)===e});var ud="0123456789abcdef",p0=function(){function e(t){if(Me(this,e),this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}return Ie(e,[{key:"toString",value:function(){for(var t="",n=0;n<this.bytes.length;n++)t=t+ud.charAt(this.bytes[n]>>>4)+ud.charAt(15&this.bytes[n]),n!==3&&n!==5&&n!==7&&n!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}},{key:"clone",value:function(){return new e(this.bytes.slice(0))}},{key:"equals",value:function(t){return this.compareTo(t)===0}},{key:"compareTo",value:function(t){for(var n=0;n<16;n++){var r=this.bytes[n]-t.bytes[n];if(r!==0)return Math.sign(r)}return 0}}],[{key:"fromFieldsV7",value:function(t,n,r,i){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||t<0||n<0||r<0||i<0||t>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=t/Math.pow(2,40),s[1]=t/Math.pow(2,32),s[2]=t/Math.pow(2,24),s[3]=t/Math.pow(2,16),s[4]=t/Math.pow(2,8),s[5]=t,s[6]=112|n>>>8,s[7]=n,s[8]=128|r>>>24,s[9]=r>>>16,s[10]=r>>>8,s[11]=r,s[12]=i>>>24,s[13]=i>>>16,s[14]=i>>>8,s[15]=i,new e(s)}}]),e}(),m0=function(){function e(){Me(this,e),H(this,"timestamp",0),H(this,"counter",0),H(this,"random",new g0)}return Ie(e,[{key:"generate",value:function(){var t=this.generateOrAbort();if(se(t)){this.timestamp=0;var n=this.generateOrAbort();if(se(n))throw new Error("Could not generate UUID after timestamp reset");return n}return t}},{key:"generateOrAbort",value:function(){var t=Date.now();if(t>this.timestamp)this.timestamp=t,this.resetCounter();else{if(!(t+1e4>this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return p0.fromFieldsV7(this.timestamp,Math.trunc(this.counter/Math.pow(2,30)),this.counter&Math.pow(2,30)-1,this.random.nextUint32())}},{key:"resetCounter",value:function(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}}]),e}(),Vh=function(e){if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};!se(U.crypto)&&crypto.getRandomValues&&(Vh=function(e){return crypto.getRandomValues(e)});var dd,g0=function(){function e(){Me(this,e),H(this,"buffer",new Uint32Array(8)),H(this,"cursor",1/0)}return Ie(e,[{key:"nextUint32",value:function(){return this.cursor>=this.buffer.length&&(Vh(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}]),e}(),jr=function(){return v0().toString()},v0=function(){return(dd||(dd=new m0)).generate()},Qs=1800,fd=60,_0=864e5,y0=function(){function e(t,n,r,i){Me(this,e),H(this,"_sessionIdChangedHandlers",[]),this.config=t,this.persistence=n,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=r||jr,this._windowIdGenerator=i||jr;var s=t.persistence_name||t.token,o=t.session_idle_timeout_seconds||Qs;if(on(o)?o>Qs?j.warn("session_idle_timeout_seconds cannot be greater than 30 minutes. Using 30 minutes instead."):o<fd&&j.warn("session_idle_timeout_seconds cannot be less than 60 seconds. Using 60 seconds instead."):(j.warn("session_idle_timeout_seconds must be a number. Defaulting to 30 minutes."),o=Qs),this._sessionTimeoutMs=1e3*Math.min(Math.max(o,fd),Qs),this._window_id_storage_key="ph_"+s+"_window_id",this._primary_window_exists_storage_key="ph_"+s+"_primary_window_exists",this._canUseSessionStorage()){var a=Ue.parse(this._window_id_storage_key),l=Ue.parse(this._primary_window_exists_storage_key);a&&!l?this._windowId=a:Ue.remove(this._window_id_storage_key),Ue.set(this._primary_window_exists_storage_key,!0)}this._listenToReloadWindow()}return Ie(e,[{key:"onSessionId",value:function(t){var n=this;return se(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(t),this._sessionId&&t(this._sessionId,this._windowId),function(){n._sessionIdChangedHandlers=n._sessionIdChangedHandlers.filter(function(r){return r!==t})}}},{key:"_canUseSessionStorage",value:function(){return this.config.persistence!=="memory"&&!this.persistence.disabled&&Ue.is_supported()}},{key:"_setWindowId",value:function(t){t!==this._windowId&&(this._windowId=t,this._canUseSessionStorage()&&Ue.set(this._window_id_storage_key,t))}},{key:"_getWindowId",value:function(){return this._windowId?this._windowId:this._canUseSessionStorage()?Ue.parse(this._window_id_storage_key):null}},{key:"_setSessionId",value:function(t,n,r){t===this._sessionId&&n===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this._sessionId=t,this.persistence.register(H({},xo,[n,t,r])))}},{key:"_getSessionId",value:function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var t=this.persistence.props[xo];return Ge(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}},{key:"resetSessionId",value:function(){this._setSessionId(null,null,null)}},{key:"_listenToReloadWindow",value:function(){var t=this;U.addEventListener("beforeunload",function(){t._canUseSessionStorage()&&Ue.remove(t._primary_window_exists_storage_key)})}},{key:"checkAndGetSessionAndWindowId",value:function(){var t=arguments.length>0&&arguments[0]!==void 0&&arguments[0],n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:null)||new Date().getTime(),r=ws(this._getSessionId(),3),i=r[0],s=r[1],o=r[2],a=this._getWindowId(),l=o&&o>0&&Math.abs(n-o)>_0,u=!1,c=!s,h=!t&&Math.abs(n-i)>this._sessionTimeoutMs;c||h||l?(s=this._sessionIdGenerator(),a=this._windowIdGenerator(),o=n,u=!0):a||(a=this._windowIdGenerator(),u=!0);var m=i===0||!t||l?n:i,f=o===0?new Date().getTime():o;return this._setWindowId(a),this._setSessionId(s,m,f),u&&this._sessionIdChangedHandlers.forEach(function(p){return p(s,a)}),{sessionId:s,windowId:a,sessionStartTimestamp:f}}}]),e}(),b0=Ie(function e(t,n,r,i){Me(this,e),this.name="posthog-js",this.setupOnce=function(s){s(function(o){var a,l,u,c,h;if(o.level!=="error"||!t.__loaded)return o;o.tags||(o.tags={});var m=t.config.ui_host||t.config.api_host;o.tags["PostHog Person URL"]=m+"/person/"+t.get_distinct_id(),t.sessionRecordingStarted()&&(o.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var f=((a=o.exception)===null||a===void 0?void 0:a.values)||[],p={$exception_message:(l=f[0])===null||l===void 0?void 0:l.value,$exception_type:(u=f[0])===null||u===void 0?void 0:u.type,$exception_personURL:m+"/person/"+t.get_distinct_id(),$sentry_event_id:o.event_id,$sentry_exception:o.exception,$sentry_exception_message:(c=f[0])===null||c===void 0?void 0:c.value,$sentry_exception_type:(h=f[0])===null||h===void 0?void 0:h.type,$sentry_tags:o.tags};return n&&r&&(p.$sentry_url=(i||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+o.event_id),t.capture("$exception",p),o})}}),w0=function(e){Promise&&Promise.resolve||j.warn("This browser does not have Promise support, and can not use the segment integration");var t=function(n,r){n.event.userId||n.event.anonymousId===e.get_distinct_id()||e.reset(),n.event.userId&&n.event.userId!==e.get_distinct_id()&&(e.register({distinct_id:n.event.userId}),e.reloadFeatureFlags());var i=e._calculate_event_properties(r,n.event.properties);return n.event.properties=Object.assign({},i,n.event.properties),n};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:function(n){return t(n,n.event.event)},page:function(n){return t(n,"$pageview")},identify:function(n){return t(n,"$identify")},screen:function(n){return t(n,"$screen")}}},x0=function(){function e(){var t=this;Me(this,e),H(this,"_hasSeenPageView",!1),H(this,"_updateScrollData",function(){var n,r,i,s;t._pageViewData||(t._pageViewData=t._createPageViewData());var o=t._pageViewData,a=t._scrollY(),l=t._scrollHeight(),u=t._contentY(),c=t._contentHeight();o.lastScrollY=a,o.maxScrollY=Math.max(a,(n=o.maxScrollY)!==null&&n!==void 0?n:0),o.maxScrollHeight=Math.max(l,(r=o.maxScrollHeight)!==null&&r!==void 0?r:0),o.lastContentY=u,o.maxContentY=Math.max(u,(i=o.maxContentY)!==null&&i!==void 0?i:0),o.maxContentHeight=Math.max(c,(s=o.maxContentHeight)!==null&&s!==void 0?s:0)})}return Ie(e,[{key:"_createPageViewData",value:function(){return{pathname:U.location.pathname}}},{key:"doPageView",value:function(){var t,n;return this._hasSeenPageView?(n=this._pageViewData,this._pageViewData=this._createPageViewData()):(this._hasSeenPageView=!0,n=void 0,this._pageViewData||(this._pageViewData=this._createPageViewData())),setTimeout(this._updateScrollData,0),J({$prev_pageview_pathname:(t=n)===null||t===void 0?void 0:t.pathname},this._calculatePrevPageScrollProperties(n))}},{key:"doPageLeave",value:function(){var t=this._pageViewData;return J({$prev_pageview_pathname:t==null?void 0:t.pathname},this._calculatePrevPageScrollProperties(t))}},{key:"_calculatePrevPageScrollProperties",value:function(t){if(!t||t.maxScrollHeight==null||t.lastScrollY==null||t.maxScrollY==null||t.maxContentHeight==null||t.lastContentY==null||t.maxContentY==null)return{};var n=t.maxScrollHeight,r=t.lastScrollY,i=t.maxScrollY,s=t.maxContentHeight,o=t.lastContentY,a=t.maxContentY;return n=Math.ceil(n),r=Math.ceil(r),i=Math.ceil(i),s=Math.ceil(s),o=Math.ceil(o),a=Math.ceil(a),{$prev_pageview_last_scroll:r,$prev_pageview_last_scroll_percentage:n<=1?1:Ws(r/n,0,1),$prev_pageview_max_scroll:i,$prev_pageview_max_scroll_percentage:n<=1?1:Ws(i/n,0,1),$prev_pageview_last_content:o,$prev_pageview_last_content_percentage:s<=1?1:Ws(o/s,0,1),$prev_pageview_max_content:a,$prev_pageview_max_content_percentage:s<=1?1:Ws(a/s,0,1)}}},{key:"startMeasuringScrollPosition",value:function(){U.addEventListener("scroll",this._updateScrollData),U.addEventListener("scrollend",this._updateScrollData),U.addEventListener("resize",this._updateScrollData)}},{key:"stopMeasuringScrollPosition",value:function(){U.removeEventListener("scroll",this._updateScrollData),U.removeEventListener("scrollend",this._updateScrollData),U.removeEventListener("resize",this._updateScrollData)}},{key:"_scrollHeight",value:function(){return Math.max(0,U.document.documentElement.scrollHeight-U.document.documentElement.clientHeight)}},{key:"_scrollY",value:function(){return U.scrollY||U.pageYOffset||U.document.documentElement.scrollTop||0}},{key:"_contentHeight",value:function(){return U.document.documentElement.scrollHeight||0}},{key:"_contentY",value:function(){var t=U.document.documentElement.clientHeight||0;return this._scrollY()+t}}]),e}();function Ws(e,t,n){return Math.max(t,Math.min(e,n))}var qi,qc,He,S0={icontains:function(e){return window.location.href.toLowerCase().indexOf(e.toLowerCase())>-1},regex:function(e){return Py(window.location.href,e)},exact:function(e){return window.location.href===e}},E0=function(){function e(t){Me(this,e),this.instance=t}return Ie(e,[{key:"getSurveys",value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=this.instance.get_property(Xl);if(i&&!r)return t(i);this.instance._send_request("".concat(this.instance.config.api_host,"/api/surveys/?token=").concat(this.instance.config.token),{},{method:"GET"},function(s){var o,a=s.surveys||[];return(o=n.instance.persistence)===null||o===void 0||o.register(H({},Xl,a)),t(a)})}},{key:"getActiveMatchingSurveys",value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.getSurveys(function(i){var s=i.filter(function(o){return!(!o.start_date||o.end_date)}).filter(function(o){var a,l,u,c;if(!o.conditions)return!0;var h=(a=o.conditions)===null||a===void 0||!a.url||S0[(l=(u=o.conditions)===null||u===void 0?void 0:u.urlMatchType)!==null&&l!==void 0?l:"icontains"](o.conditions.url),m=(c=o.conditions)===null||c===void 0||!c.selector||document.querySelector(o.conditions.selector);return h&&m}).filter(function(o){if(!o.linked_flag_key&&!o.targeting_flag_key)return!0;var a=!o.linked_flag_key||n.instance.featureFlags.isFeatureEnabled(o.linked_flag_key),l=!o.targeting_flag_key||n.instance.featureFlags.isFeatureEnabled(o.targeting_flag_key);return a&&l});return t(s)},r)}}]),e}(),k0=6e4,T0=function(){function e(){var t=this;Me(this,e),H(this,"limits",{}),H(this,"checkForLimiting",function(n){try{var r=n.responseText;if(!r||!r.length)return;(JSON.parse(r).quota_limited||[]).forEach(function(i){j.info("[RateLimiter] ".concat(i||"events"," is quota limited.")),t.limits[i]=new Date().getTime()+k0})}catch(i){return void j.error(i)}})}return Ie(e,[{key:"isRateLimited",value:function(t){var n=this.limits[t||"events"]||!1;return n!==!1&&new Date().getTime()<n}}]),e}();(function(e){e[e.INIT_MODULE=0]="INIT_MODULE",e[e.INIT_SNIPPET=1]="INIT_SNIPPET"})(qi||(qi={}));var nc=function(){},Xs={},ht="posthog",co=U.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Qh=!co&&dt.indexOf("MSIE")===-1&&dt.indexOf("Mozilla")===-1,hd=function(){var e,t,n;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",ui_host:null,token:"",autocapture:!0,rageclick:!0,cross_subdomain_cookie:(t=Ce==null?void 0:Ce.location,n=t==null?void 0:t.hostname,!!gt(n)&&n.split(".").slice(-2).join(".")!=="herokuapp.com"),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:nc,store_google:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:!0,debug:!1,verbose:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:void 0,secure_cookie:(U==null||(e=U.location)===null||e===void 0?void 0:e.protocol)==="https:",ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(r){var i="Bad HTTP status: "+r.status+" "+r.statusText;j.error(i)},get_device_id:function(r){return r},_onCapture:nc,capture_performance:void 0,name:"posthog",callback_fn:"posthog._jsc",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800}},rc=function(e,t,n,r){var i,s=n!==ht&&He?n?He[n]:void 0:He,o={initComplete:!1,syncCode:!1},a=function(l){return function(u){o[l]||(o[l]=!0,o.initComplete&&o.syncCode&&(r==null||r(u)))}};if(s&&qc===qi.INIT_MODULE)i=s;else{if(s&&!Ge(s))return void j.error("You have already initialized "+n);i=new Vc}return i._init(e,t,n,a("initComplete")),i.toolbar.maybeLoadToolbar(),i.sessionRecording=new Ny(i),i.sessionRecording.startRecordingIfEnabled(),i.webPerformance=new By(i),i.webPerformance.startObservingIfEnabled(),i.config.__preview_measure_pageview_stats&&i.pageViewManager.startMeasuringScrollPosition(),i.__autocapture=i.config.autocapture,Sn._setIsAutocaptureEnabled(i),Sn._isAutocaptureEnabled&&(i.__autocapture=i.config.autocapture,Sn.enabledForProject(i.config.token,100,100)?Sn.isBrowserSupported()?Sn.init(i):(i.__autocapture=!1,j.info("Disabling Automatic Event Collection because this browser is not supported")):(i.__autocapture=!1,j.info("Not in active bucket: disabling Automatic Event Collection."))),fr.DEBUG=fr.DEBUG||i.config.debug,!se(s)&&Ge(s)&&(i._execute_array.call(i.people,s.people),i._execute_array(s)),a("syncCode")(i),i},Vc=function(){function e(){var t=this;Me(this,e),this.config=hd(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=b0,this.segmentIntegration=function(){return w0(t)},this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__loaded_recorder_version=void 0,this.__autocapture=void 0,this._jsc=function(){},this.analyticsDefaultEndpoint="/e/",this.featureFlags=new Sy(this),this.toolbar=new Vy(this),this.pageViewManager=new x0,this.surveys=new E0(this),this.rateLimiter=new T0,this.people={set:function(n,r,i){var s=gt(n)?H({},n,r):n;t.setPersonProperties(s),i==null||i({})},set_once:function(n,r,i){var s=gt(n)?H({},n,r):n;t.setPersonProperties(void 0,s),i==null||i({})}}}return Ie(e,[{key:"init",value:function(t,n,r){if(se(r))j.critical("You must name your new library: init(token, config, name)");else{if(r!==ht){var i=rc(t,n,r,function(s){He[r]=s,s._loaded()});return He[r]=i,i}j.critical("You must initialize the main posthog object right after you include the PostHog js snippet")}}},{key:"_init",value:function(t){var n,r,i=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;this.__loaded=!0,this.config={},this._triggered_notifs=[];var l,u={segmentRegister:!1,syncCode:!1},c=function(P){return function(){u[P]||(u[P]=!0,u.segmentRegister&&u.syncCode&&(a==null||a(i)))}};if(this.set_config(Xe({},hd(),s,{name:o,token:t,callback_fn:(o===ht?o:ht+"."+o)+"._jsc"})),this._jsc=function(){},(U!=null&&(n=U.rrweb)!==null&&n!==void 0&&n.record||U!=null&&U.rrwebRecord)&&(this.__loaded_recorder_version=U==null||(l=U.rrweb)===null||l===void 0?void 0:l.version),this.persistence=new rd(this.config),this._requestQueue=new Ky(this._handle_queued_event.bind(this)),this._retryQueue=new h0(this.config.on_xhr_error,this.rateLimiter),this.__captureHooks=[],this.__request_queue=[],this.sessionManager=new y0(this.config,this.persistence),this.sessionPersistence=this.config.persistence==="sessionStorage"?this.persistence:new rd(J(J({},this.config),{},{persistence:"sessionStorage"})),this._gdpr_init(),s.segment?(this.config.get_device_id=function(){return s.segment.user().anonymousId()},s.segment.user().id()&&(this.register({distinct_id:s.segment.user().id()}),this.persistence.set_user_state("identified")),s.segment.register(this.segmentIntegration()).then(c("segmentRegister"))):c("segmentRegister")(),((r=s.bootstrap)===null||r===void 0?void 0:r.distinctID)!==void 0){var h,m,f=this.config.get_device_id(jr()),p=(h=s.bootstrap)!==null&&h!==void 0&&h.isIdentifiedID?f:s.bootstrap.distinctID;this.persistence.set_user_state((m=s.bootstrap)!==null&&m!==void 0&&m.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:s.bootstrap.distinctID,$device_id:p})}if(this._hasBootstrappedFeatureFlags()){var g,x,S=Object.keys(((g=s.bootstrap)===null||g===void 0?void 0:g.featureFlags)||{}).filter(function(P){var y,O;return!((y=s.bootstrap)===null||y===void 0||(O=y.featureFlags)===null||O===void 0||!O[P])}).reduce(function(P,y){var O,M;return P[y]=((O=s.bootstrap)===null||O===void 0||(M=O.featureFlags)===null||M===void 0?void 0:M[y])||!1,P},{}),k=Object.keys(((x=s.bootstrap)===null||x===void 0?void 0:x.featureFlagPayloads)||{}).filter(function(P){return S[P]}).reduce(function(P,y){var O,M,E,I;return(O=s.bootstrap)!==null&&O!==void 0&&(M=O.featureFlagPayloads)!==null&&M!==void 0&&M[y]&&(P[y]=(E=s.bootstrap)===null||E===void 0||(I=E.featureFlagPayloads)===null||I===void 0?void 0:I[y]),P},{});this.featureFlags.receivedFeatureFlags({featureFlags:S,featureFlagPayloads:k})}if(!this.get_distinct_id()){var T=this.config.get_device_id(jr());this.register_once({distinct_id:T,$device_id:T},""),this.persistence.set_user_state("anonymous")}U.addEventListener&&U.addEventListener("onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this)),c("syncCode")()}},{key:"_afterDecideResponse",value:function(t){var n;if(this.compression={},t.supportedCompression&&!this.config.disable_compression){var r,i={},s=dr(t.supportedCompression);try{for(s.s();!(r=s.n()).done;)i[r.value]=!0}catch(o){s.e(o)}finally{s.f()}this.compression=i}(n=t.analytics)!==null&&n!==void 0&&n.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint)}},{key:"_loaded",value:function(){var t=this.config.advanced_disable_decide;t||this.featureFlags.setReloadingPaused(!0);try{this.config.loaded(this)}catch(n){j.critical("`loaded` function failed",n)}this._start_queue_if_opted_in(),this.config.capture_pageview&&this.capture("$pageview",{title:Ce.title},{send_instantly:!0}),t||(new Uy(this).call(),this.featureFlags.resetRequestQueue())}},{key:"_start_queue_if_opted_in",value:function(){var t;this.has_opted_out_capturing()||this.config.request_batching&&((t=this._requestQueue)===null||t===void 0||t.poll())}},{key:"_dom_loaded",value:function(){var t=this;this.has_opted_out_capturing()||Lr(this.__request_queue,function(n){t._send_request.apply(t,Ul(n))}),this.__request_queue=[],this._start_queue_if_opted_in()}},{key:"_prepare_callback",value:function(t,n){if(se(t))return null;if(co)return function(o){t(o,n)};var r=this._jsc,i=""+Math.floor(1e8*Math.random()),s=this.config.callback_fn+"["+i+"]";return r[i]=function(o){delete r[i],t(o,n)},s}},{key:"_handle_unload",value:function(){var t,n;this.config.request_batching?(this.config.capture_pageview&&this.config.capture_pageleave&&this.capture("$pageleave"),(t=this._requestQueue)===null||t===void 0||t.unload(),(n=this._retryQueue)===null||n===void 0||n.unload()):this.config.capture_pageview&&this.config.capture_pageleave&&this.capture("$pageleave",null,{transport:"sendBeacon"})}},{key:"_handle_queued_event",value:function(t,n,r){var i=JSON.stringify(n);this.__compress_and_send_json_request(t,i,r||Xs,nc)}},{key:"__compress_and_send_json_request",value:function(t,n,r,i){var s=function(u,c,h){return u===Yn.GZipJS?[u0(d0(c),{mtime:0}),J(J({},h),{},{blob:!0,urlQueryArgs:{compression:Yn.GZipJS}})]:[{data:Dc(c)},h]}(this.compression[Yn.GZipJS]?Yn.GZipJS:Yn.Base64,n,r),o=ws(s,2),a=o[0],l=o[1];this._send_request(t,a,l,i)}},{key:"_send_request",value:function(t,n,r,i){if(this.__loaded&&this._retryQueue&&!this.rateLimiter.isRateLimited(r._batchKey))if(Qh)this.__request_queue.push([t,n,r,i]);else{var s={method:this.config.api_method,transport:this.config.api_transport,verbose:this.config.verbose};r=Xe(s,r||{}),co||(r.method="GET");var o="sendBeacon"in U.navigator&&r.transport==="sendBeacon";if(t=zh(t,r.urlQueryArgs||{},{ip:this.config.ip}),o)try{U.navigator.sendBeacon(t,zc(n,J(J({},r),{},{sendBeacon:!0})))}catch{}else if(co)try{qh({url:t,data:n,headers:this.config.xhr_headers,options:r,callback:i,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.config.on_xhr_error,onResponse:this.rateLimiter.checkForLimiting})}catch(c){j.error(c)}else{var a,l=Ce.createElement("script");l.type="text/javascript",l.async=!0,l.defer=!0,l.src=t;var u=Ce.getElementsByTagName("script")[0];(a=u.parentNode)===null||a===void 0||a.insertBefore(l,u)}}}},{key:"_execute_array",value:function(t){var n,r=this,i=[],s=[],o=[];Lr(t,function(l){l&&(n=l[0],Ge(n)?o.push(l):hr(l)?l.call(r):Ge(l)&&n==="alias"?i.push(l):Ge(l)&&n.indexOf("capture")!==-1&&hr(r[n])?o.push(l):s.push(l))});var a=function(l,u){Lr(l,function(c){if(Ge(c[0])){var h=u;be(c,function(m){h=h[m[0]].apply(h,m.slice(1))})}else this[c[0]].apply(this,c.slice(1))},u)};a(i,this),a(s,this),a(o,this)}},{key:"_hasBootstrappedFeatureFlags",value:function(){var t,n;return((t=this.config.bootstrap)===null||t===void 0?void 0:t.featureFlags)&&Object.keys((n=this.config.bootstrap)===null||n===void 0?void 0:n.featureFlags).length>0||!1}},{key:"push",value:function(t){this._execute_array([t])}},{key:"capture",value:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xs;if(!this.__loaded||!this.sessionPersistence||!this._requestQueue)return j.uninitializedWarning("posthog.capture");if(!function(c){var h=!1;try{var m=c.config.token,f=c.config.respect_dnt,p=c.config.opt_out_capturing_persistence_type,g=c.config.opt_out_capturing_cookie_prefix||void 0,x=c.config.window;m&&(h=sd(m,{respectDnt:f,persistenceType:p,persistencePrefix:g,window:x}))}catch(S){j.error("Unexpected error when checking capturing opt-out status: "+S)}return h}(this)){var i=(r=r||Xs).transport;if(i&&(r.transport=i),!se(t)&&gt(t)){if(!by(dt,this.config.custom_blocked_useragents)){this.sessionPersistence.update_search_keyword(),this.config.store_google&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info();var s={uuid:jr(),event:t,properties:this._calculate_event_properties(t,n||{})};t==="$identify"&&(s.$set=r.$set,s.$set_once=r.$set_once),(s=vy(s,r._noTruncate?null:this.config.properties_string_max_length)).timestamp=r.timestamp||new Date;var o=J(J({},s.properties.$set),s.$set);py(o)||this.setPersonPropertiesForFlags(o),j.info("send",s);var a=JSON.stringify(s),l=this.config.api_host+(r.endpoint||this.analyticsDefaultEndpoint),u=r!==Xs;return!this.config.request_batching||u&&!r._batchKey||r.send_instantly?this.__compress_and_send_json_request(l,a,r):this._requestQueue.enqueue(l,s,r),this._invokeCaptureHooks(t,s),s}}else j.error("No event name provided to posthog.capture")}}},{key:"_addCaptureHook",value:function(t){this.__captureHooks.push(t)}},{key:"_invokeCaptureHooks",value:function(t,n){this.config._onCapture(t,n),be(this.__captureHooks,function(r){return r(t)})}},{key:"_calculate_event_properties",value:function(t,n){if(!this.persistence||!this.sessionPersistence)return n;var r=this.persistence.remove_event_timer(t),i=J({},n);if(i.token=this.config.token,t==="$snapshot"){var s=J(J({},this.persistence.properties()),this.sessionPersistence.properties());return i.distinct_id=s.distinct_id,i}var o=Be.properties();if(this.sessionManager){var a=this.sessionManager.checkAndGetSessionAndWindowId(),l=a.sessionId,u=a.windowId;i.$session_id=l,i.$window_id=u}if(this.config.__preview_measure_pageview_stats){var c={};t==="$pageview"?c=this.pageViewManager.doPageView():t==="$pageleave"&&(c=this.pageViewManager.doPageLeave()),i=Xe(i,c)}if(t==="$pageview"&&(i.title=Ce.title),t==="$performance_event"){var h=this.persistence.properties();return i.distinct_id=h.distinct_id,i.$current_url=o.$current_url,i}if(!se(r)){var m=new Date().getTime()-r;i.$duration=parseFloat((m/1e3).toFixed(3))}i=Xe({},Be.properties(),this.persistence.properties(),this.sessionPersistence.properties(),i);var f=this.config.property_blacklist;Ge(f)?be(f,function(g){delete i[g]}):j.error("Invalid value for property_blacklist config: "+f);var p=this.config.sanitize_properties;return p&&(i=p(i,t)),i}},{key:"register",value:function(t,n){var r;(r=this.persistence)===null||r===void 0||r.register(t,n)}},{key:"register_once",value:function(t,n,r){var i;(i=this.persistence)===null||i===void 0||i.register_once(t,n,r)}},{key:"register_for_session",value:function(t){var n;(n=this.sessionPersistence)===null||n===void 0||n.register(t)}},{key:"unregister",value:function(t){var n;(n=this.persistence)===null||n===void 0||n.unregister(t)}},{key:"unregister_for_session",value:function(t){var n;(n=this.sessionPersistence)===null||n===void 0||n.unregister(t)}},{key:"_register_single",value:function(t,n){this.register(H({},t,n))}},{key:"getFeatureFlag",value:function(t,n){return this.featureFlags.getFeatureFlag(t,n)}},{key:"getFeatureFlagPayload",value:function(t){var n=this.featureFlags.getFeatureFlagPayload(t);try{return JSON.parse(n)}catch{return n}}},{key:"isFeatureEnabled",value:function(t,n){return this.featureFlags.isFeatureEnabled(t,n)}},{key:"reloadFeatureFlags",value:function(){this.featureFlags.reloadFeatureFlags()}},{key:"updateEarlyAccessFeatureEnrollment",value:function(t,n){this.featureFlags.updateEarlyAccessFeatureEnrollment(t,n)}},{key:"getEarlyAccessFeatures",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(t,n)}},{key:"onFeatureFlags",value:function(t){return this.featureFlags.onFeatureFlags(t)}},{key:"onSessionId",value:function(t){var n,r;return(n=(r=this.sessionManager)===null||r===void 0?void 0:r.onSessionId(t))!==null&&n!==void 0?n:function(){}}},{key:"getSurveys",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getSurveys(t,n)}},{key:"getActiveMatchingSurveys",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getActiveMatchingSurveys(t,n)}},{key:"identify",value:function(t,n,r){if(!this.__loaded||!this.persistence)return j.uninitializedWarning("posthog.identify");if(t){var i=this.get_distinct_id();if(this.register({$user_id:t}),!this.get_property("$device_id")){var s=i;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}t!==i&&t!==this.get_property(oo)&&(this.unregister(oo),this.register({distinct_id:t}));var o=this.persistence.get_user_state()==="anonymous";t!==i&&o?(this.persistence.set_user_state("identified"),this.setPersonPropertiesForFlags(n||{},!1),this.capture("$identify",{distinct_id:t,$anon_distinct_id:i},{$set:n||{},$set_once:r||{}}),this.featureFlags.setAnonymousDistinctId(i)):(n||r)&&this.setPersonProperties(n,r),t!==i&&(this.reloadFeatureFlags(),this.unregister(So))}else j.error("Unique user id has not been set in posthog.identify")}},{key:"setPersonProperties",value:function(t,n){(t||n)&&(this.setPersonPropertiesForFlags(t||{}),this.capture("$set",{$set:t||{},$set_once:n||{}}))}},{key:"group",value:function(t,n,r){if(t&&n){var i=this.getGroups();i[t]!==n&&this.resetGroupPropertiesForFlags(t),this.register({$groups:J(J({},i),{},H({},t,n))}),r&&(this.capture("$groupidentify",{$group_type:t,$group_key:n,$group_set:r}),this.setGroupPropertiesForFlags(H({},t,r))),i[t]===n||r||this.reloadFeatureFlags()}else j.error("posthog.group requires a group type and group key")}},{key:"resetGroups",value:function(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}},{key:"setPersonPropertiesForFlags",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(t,n)}},{key:"resetPersonPropertiesForFlags",value:function(){this.featureFlags.resetPersonPropertiesForFlags()}},{key:"setGroupPropertiesForFlags",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setGroupPropertiesForFlags(t,n)}},{key:"resetGroupPropertiesForFlags",value:function(t){this.featureFlags.resetGroupPropertiesForFlags(t)}},{key:"reset",value:function(t){var n,r,i,s;if(!this.__loaded)return j.uninitializedWarning("posthog.reset");var o=this.get_property("$device_id");(n=this.persistence)===null||n===void 0||n.clear(),(r=this.sessionPersistence)===null||r===void 0||r.clear(),(i=this.persistence)===null||i===void 0||i.set_user_state("anonymous"),(s=this.sessionManager)===null||s===void 0||s.resetSessionId();var a=this.config.get_device_id(jr());this.register_once({distinct_id:a,$device_id:t?a:o},"")}},{key:"get_distinct_id",value:function(){return this.get_property("distinct_id")}},{key:"getGroups",value:function(){return this.get_property("$groups")||{}}},{key:"get_session_id",value:function(){var t,n;return(t=(n=this.sessionManager)===null||n===void 0?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}},{key:"get_session_replay_url",value:function(t){if(!this.sessionManager)return"";var n=this.config.ui_host||this.config.api_host,r=this.sessionManager.checkAndGetSessionAndWindowId(!0),i=r.sessionId,s=r.sessionStartTimestamp,o=n+"/replay/"+i;if(t!=null&&t.withTimestamp&&s){var a,l=(a=t.timestampLookBack)!==null&&a!==void 0?a:10;if(!s)return o;var u=Math.max(Math.floor((new Date().getTime()-s)/1e3)-l,0);o+="?t=".concat(u)}return o}},{key:"alias",value:function(t,n){return t===this.get_property(Fh)?(j.critical("Attempting to create alias for existing People user - aborting."),-2):(se(n)&&(n=this.get_distinct_id()),t!==n?(this._register_single(oo,t),this.capture("$create_alias",{alias:t,distinct_id:n})):(j.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1))}},{key:"set_config",value:function(t){var n,r,i=J({},this.config);$n(t)&&(Xe(this.config,t),this.config.persistence_name||(this.config.persistence_name=this.config.cookie_name),this.config.disable_persistence||(this.config.disable_persistence=this.config.disable_cookie),(n=this.persistence)===null||n===void 0||n.update_config(this.config),(r=this.sessionPersistence)===null||r===void 0||r.update_config(this.config),Ae.is_supported()&&Ae.get("ph_debug")==="true"&&(this.config.debug=!0),this.config.debug&&(fr.DEBUG=!0),this.sessionRecording&&!se(t.disable_session_recording)&&i.disable_session_recording!==t.disable_session_recording&&(t.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))}},{key:"startSessionRecording",value:function(){this.set_config({disable_session_recording:!1})}},{key:"stopSessionRecording",value:function(){this.set_config({disable_session_recording:!0})}},{key:"sessionRecordingStarted",value:function(){var t;return!((t=this.sessionRecording)===null||t===void 0||!t.started)}},{key:"loadToolbar",value:function(t){return this.toolbar.loadToolbar(t)}},{key:"get_property",value:function(t){var n;return(n=this.persistence)===null||n===void 0?void 0:n.props[t]}},{key:"getSessionProperty",value:function(t){var n;return(n=this.sessionPersistence)===null||n===void 0?void 0:n.props[t]}},{key:"toString",value:function(){var t,n=(t=this.config.name)!==null&&t!==void 0?t:ht;return n!==ht&&(n=ht+"."+n),n}},{key:"_gdpr_init",value:function(){this.config.opt_out_capturing_persistence_type==="localStorage"&&Ae.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.config.opt_out_capturing_by_default&&!cn.get("ph_optout")||(cn.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.config.opt_out_persistence_by_default}))}},{key:"_gdpr_update_persistence",value:function(t){var n,r,i,s,o;if(t&&t.clear_persistence)i=!0;else{if(!t||!t.enable_persistence)return;i=!1}this.config.disable_persistence||((n=this.persistence)===null||n===void 0?void 0:n.disabled)===i||(s=this.persistence)===null||s===void 0||s.set_disabled(i),this.config.disable_persistence||((r=this.sessionPersistence)===null||r===void 0?void 0:r.disabled)===i||(o=this.sessionPersistence)===null||o===void 0||o.set_disabled(i)}},{key:"_gdpr_call_func",value:function(t,n){return n=Xe({capture:this.capture.bind(this),persistence_type:this.config.opt_out_capturing_persistence_type,cookie_prefix:this.config.opt_out_capturing_cookie_prefix,cookie_expiration:this.config.cookie_expiration,cross_subdomain_cookie:this.config.cross_subdomain_cookie,secure_cookie:this.config.secure_cookie},n||{}),Ae.is_supported()||n.persistence_type!=="localStorage"||(n.persistence_type="cookie"),t(this.config.token,{capture:n.capture,captureEventName:n.capture_event_name,captureProperties:n.capture_properties,persistenceType:n.persistence_type,persistencePrefix:n.cookie_prefix,cookieExpiration:n.cookie_expiration,crossSubdomainCookie:n.cross_subdomain_cookie,secureCookie:n.secure_cookie})}},{key:"opt_in_capturing",value:function(t){t=Xe({enable_persistence:!0},t||{}),this._gdpr_call_func(Wy,t),this._gdpr_update_persistence(t)}},{key:"opt_out_capturing",value:function(t){var n=Xe({clear_persistence:!0},t||{});this._gdpr_call_func(Xy,n),this._gdpr_update_persistence(n)}},{key:"has_opted_in_capturing",value:function(t){return this._gdpr_call_func(Yy,t)}},{key:"has_opted_out_capturing",value:function(t){return this._gdpr_call_func(sd,t)}},{key:"clear_opt_in_out_capturing",value:function(t){var n=Xe({enable_persistence:!0},t??{});this._gdpr_call_func(Jy,n),this._gdpr_update_persistence(n)}},{key:"debug",value:function(t){t===!1?(U.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1})):(U.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))}}]),e}();(function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=Oh(e.prototype[t[n]])})(Vc,["identify"]);var pd,md,bn={},C0=function(){He.init=function(e,t,n){if(n)return He[n]||(He[n]=bn[n]=rc(e||"",t||{},n,function(i){He[n]=bn[n]=i,i._loaded()})),He[n];var r=He;return bn[ht]?r=bn[ht]:e&&(r=rc(e,t||{},ht,function(i){bn[ht]=i,i._loaded()}),bn[ht]=r),He=r,qc===qi.INIT_SNIPPET&&(U[ht]=He),be(bn,function(i,s){s!==ht&&(He[s]=i)}),r}},P0=function(){function e(){e.done||(e.done=!0,Qh=!1,be(bn,function(t){t._dom_loaded()}))}Ce.addEventListener&&(Ce.readyState==="complete"?e():Ce.addEventListener("DOMContentLoaded",e,!1)),Bi(U,"load",e,!0)};(function(e){e.Popover="popover",e.API="api"})(pd||(pd={})),function(e){e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link"}(md||(md={}));var uo=(qc=qi.INIT_MODULE,He=new Vc,C0(),He.init(),P0(),He),A0=C.createContext({client:uo});function O0(e){var t=e.children,n=e.client,r=e.apiKey,i=e.options,s=C.useMemo(function(){return n&&r&&console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."),n&&i&&console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."),n||(r&&(uo.__loaded&&console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."),uo.init(r,i)),uo)},[n,r]);return C.createElement(A0.Provider,{value:{client:s}},t)}const M0=({children:e,user:t})=>{const n={api_host:process.env.REACT_APP_PUBLIC_POSTHOG_HOST,autocapture:!1,secure_cookie:!0,bootstrap:{distinctId:(t==null?void 0:t.id)||"anonymous",isIdentifiedID:!!(t!=null&&t.id)}};return v.jsx(O0,{apiKey:process.env.REACT_APP_PUBLIC_POSTHOG_KEY,options:n,children:e})},I0=({children:e,locale:t,messages:n})=>{const r=t||"en",i={...ug[r],...n||{}};return v.jsx(Dv,{locale:r,messages:i,children:e})},dn=C.createContext(null),$0=({children:e,user:t})=>v.jsx(dn.Provider,{value:t,children:e});var pi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ui=typeof window>"u"||"Deno"in window;function Et(){}function F0(e,t){return typeof e=="function"?e(t):e}function ic(e){return typeof e=="number"&&e>=0&&e!==1/0}function Wh(e,t){return Math.max(e+(t||0)-Date.now(),0)}function gd(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Qc(o,t.options))return!1}else if(!Qi(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof i<"u"&&i!==t.state.fetchStatus||s&&!s(t))}function vd(e,t){const{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Vi(t.options.mutationKey)!==Vi(s))return!1}else if(!Qi(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Qc(e,t){return((t==null?void 0:t.queryKeyHashFn)||Vi)(e)}function Vi(e){return JSON.stringify(e,(t,n)=>sc(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Qi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Qi(e[n],t[n])):!1}function Xh(e,t){if(e===t)return e;const n=_d(e)&&_d(t);if(n||sc(e)&&sc(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),s=i.length,o=n?[]:{};let a=0;for(let l=0;l<s;l++){const u=n?l:i[l];o[u]=Xh(e[u],t[u]),o[u]===e[u]&&a++}return r===s&&a===r?e:o}return t}function To(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function _d(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function sc(e){if(!yd(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!yd(n)||!n.hasOwnProperty("isPrototypeOf"))}function yd(e){return Object.prototype.toString.call(e)==="[object Object]"}function Yh(e){return new Promise(t=>{setTimeout(t,e)})}function bd(e){Yh(0).then(e)}function oc(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Xh(e,t):t}function R0(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function j0(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Jn,En,Dr,Ud,N0=(Ud=class extends pi{constructor(){super();F(this,Jn,void 0);F(this,En,void 0);F(this,Dr,void 0);$(this,Dr,t=>{if(!ui&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){b(this,En)||this.setEventListener(b(this,Dr))}onUnsubscribe(){var t;this.hasListeners()||((t=b(this,En))==null||t.call(this),$(this,En,void 0))}setEventListener(t){var n;$(this,Dr,t),(n=b(this,En))==null||n.call(this),$(this,En,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){b(this,Jn)!==t&&($(this,Jn,t),this.onFocus())}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){var t;return typeof b(this,Jn)=="boolean"?b(this,Jn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Jn=new WeakMap,En=new WeakMap,Dr=new WeakMap,Ud),Co=new N0,Br,kn,Hr,Gd,L0=(Gd=class extends pi{constructor(){super();F(this,Br,!0);F(this,kn,void 0);F(this,Hr,void 0);$(this,Hr,t=>{if(!ui&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){b(this,kn)||this.setEventListener(b(this,Hr))}onUnsubscribe(){var t;this.hasListeners()||((t=b(this,kn))==null||t.call(this),$(this,kn,void 0))}setEventListener(t){var n;$(this,Hr,t),(n=b(this,kn))==null||n.call(this),$(this,kn,t(this.setOnline.bind(this)))}setOnline(t){b(this,Br)!==t&&($(this,Br,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return b(this,Br)}},Br=new WeakMap,kn=new WeakMap,Hr=new WeakMap,Gd),Wi=new L0;function D0(e){return Math.min(1e3*2**e,3e4)}function Vo(e){return(e??"online")==="online"?Wi.isOnline():!0}var Jh=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function il(e){return e instanceof Jh}function Kh(e){let t=!1,n=0,r=!1,i,s,o;const a=new Promise((x,S)=>{s=x,o=S}),l=x=>{var S;r||(f(new Jh(x)),(S=e.abort)==null||S.call(e))},u=()=>{t=!0},c=()=>{t=!1},h=()=>!Co.isFocused()||e.networkMode!=="always"&&!Wi.isOnline(),m=x=>{var S;r||(r=!0,(S=e.onSuccess)==null||S.call(e,x),i==null||i(),s(x))},f=x=>{var S;r||(r=!0,(S=e.onError)==null||S.call(e,x),i==null||i(),o(x))},p=()=>new Promise(x=>{var S;i=k=>{const T=r||!h();return T&&x(k),T},(S=e.onPause)==null||S.call(e)}).then(()=>{var x;i=void 0,r||(x=e.onContinue)==null||x.call(e)}),g=()=>{if(r)return;let x;try{x=e.fn()}catch(S){x=Promise.reject(S)}Promise.resolve(x).then(m).catch(S=>{var O;if(r)return;const k=e.retry??(ui?0:3),T=e.retryDelay??D0,P=typeof T=="function"?T(n,S):T,y=k===!0||typeof k=="number"&&n<k||typeof k=="function"&&k(n,S);if(t||!y){f(S);return}n++,(O=e.onFail)==null||O.call(e,n,S),Yh(P).then(()=>{if(h())return p()}).then(()=>{t?f(S):g()})})};return Vo(e.networkMode)?g():p().then(g),{promise:a,cancel:l,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:u,continueRetry:c}}function B0(){let e=[],t=0,n=c=>{c()},r=c=>{c()};const i=c=>{let h;t++;try{h=c()}finally{t--,t||a()}return h},s=c=>{t?e.push(c):bd(()=>{n(c)})},o=c=>(...h)=>{s(()=>{c(...h)})},a=()=>{const c=e;e=[],c.length&&bd(()=>{r(()=>{c.forEach(h=>{n(h)})})})};return{batch:i,batchCalls:o,schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c}}}var Re=B0(),Kn,zd,Zh=(zd=class{constructor(){F(this,Kn,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ic(this.gcTime)&&$(this,Kn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ui?1/0:5*60*1e3))}clearGcTimeout(){b(this,Kn)&&(clearTimeout(b(this,Kn)),$(this,Kn,void 0))}},Kn=new WeakMap,zd),Ur,Gr,bt,Tn,wt,Ne,Zi,Zn,zr,fo,At,rn,qd,H0=(qd=class extends Zh{constructor(t){super();F(this,zr);F(this,At);F(this,Ur,void 0);F(this,Gr,void 0);F(this,bt,void 0);F(this,Tn,void 0);F(this,wt,void 0);F(this,Ne,void 0);F(this,Zi,void 0);F(this,Zn,void 0);$(this,Zn,!1),$(this,Zi,t.defaultOptions),X(this,zr,fo).call(this,t.options),$(this,Ne,[]),$(this,bt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$(this,Ur,t.state||U0(this.options)),this.state=b(this,Ur),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!b(this,Ne).length&&this.state.fetchStatus==="idle"&&b(this,bt).remove(this)}setData(t,n){const r=oc(this.state.data,t,this.options);return X(this,At,rn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){X(this,At,rn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r;const n=b(this,Tn);return(r=b(this,wt))==null||r.cancel(t),n?n.then(Et).catch(Et):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(b(this,Ur))}isActive(){return b(this,Ne).some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||b(this,Ne).some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!Wh(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=b(this,Ne).find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=b(this,wt))==null||n.continue()}onOnline(){var n;const t=b(this,Ne).find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=b(this,wt))==null||n.continue()}addObserver(t){b(this,Ne).includes(t)||(b(this,Ne).push(t),this.clearGcTimeout(),b(this,bt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){b(this,Ne).includes(t)&&($(this,Ne,b(this,Ne).filter(n=>n!==t)),b(this,Ne).length||(b(this,wt)&&(b(this,Zn)?b(this,wt).cancel({revert:!0}):b(this,wt).cancelRetry()),this.scheduleGc()),b(this,bt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return b(this,Ne).length}invalidate(){this.state.isInvalidated||X(this,At,rn).call(this,{type:"invalidate"})}fetch(t,n){var u,c,h,m;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(b(this,Tn))return(u=b(this,wt))==null||u.continueRetry(),b(this,Tn)}if(t&&X(this,zr,fo).call(this,t),!this.options.queryFn){const f=b(this,Ne).find(p=>p.options.queryFn);f&&X(this,zr,fo).call(this,f.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,i={queryKey:this.queryKey,meta:this.meta},s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>($(this,Zn,!0),r.signal)})};s(i);const o=()=>this.options.queryFn?($(this,Zn,!1),this.options.persister?this.options.persister(this.options.queryFn,i,this):this.options.queryFn(i)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)),a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};s(a),(c=this.options.behavior)==null||c.onFetch(a,this),$(this,Gr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=a.fetchOptions)==null?void 0:h.meta))&&X(this,At,rn).call(this,{type:"fetch",meta:(m=a.fetchOptions)==null?void 0:m.meta});const l=f=>{var p,g,x,S;il(f)&&f.silent||X(this,At,rn).call(this,{type:"error",error:f}),il(f)||((g=(p=b(this,bt).config).onError)==null||g.call(p,f,this),(S=(x=b(this,bt).config).onSettled)==null||S.call(x,this.state.data,f,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return $(this,wt,Kh({fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,g,x,S;if(typeof f>"u"){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),l(new Error(`${this.queryHash} data is undefined`));return}this.setData(f),(g=(p=b(this,bt).config).onSuccess)==null||g.call(p,f,this),(S=(x=b(this,bt).config).onSettled)==null||S.call(x,f,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:l,onFail:(f,p)=>{X(this,At,rn).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{X(this,At,rn).call(this,{type:"pause"})},onContinue:()=>{X(this,At,rn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode})),$(this,Tn,b(this,wt).promise),b(this,Tn)}},Ur=new WeakMap,Gr=new WeakMap,bt=new WeakMap,Tn=new WeakMap,wt=new WeakMap,Ne=new WeakMap,Zi=new WeakMap,Zn=new WeakMap,zr=new WeakSet,fo=function(t){this.options={...b(this,Zi),...t},this.updateGcTime(this.options.gcTime)},At=new WeakSet,rn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:t.meta??null,fetchStatus:Vo(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return il(i)&&i.revert&&b(this,Gr)?{...b(this,Gr),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Re.batch(()=>{b(this,Ne).forEach(r=>{r.onQueryUpdate()}),b(this,bt).notify({query:this,type:"updated",action:t})})},qd);function U0(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Bt,Vd,G0=(Vd=class extends pi{constructor(t={}){super();F(this,Bt,void 0);this.config=t,$(this,Bt,new Map)}build(t,n,r){const i=n.queryKey,s=n.queryHash??Qc(i,n);let o=this.get(s);return o||(o=new H0({cache:this,queryKey:i,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){b(this,Bt).has(t.queryHash)||(b(this,Bt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=b(this,Bt).get(t.queryHash);n&&(t.destroy(),n===t&&b(this,Bt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Re.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return b(this,Bt).get(t)}getAll(){return[...b(this,Bt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>gd(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>gd(t,r)):n}notify(t){Re.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Re.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Re.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Bt=new WeakMap,Vd),Ht,es,mt,qr,Ut,wn,Qd,z0=(Qd=class extends Zh{constructor(t){super();F(this,Ut);F(this,Ht,void 0);F(this,es,void 0);F(this,mt,void 0);F(this,qr,void 0);this.mutationId=t.mutationId,$(this,es,t.defaultOptions),$(this,mt,t.mutationCache),$(this,Ht,[]),this.state=t.state||ep(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...b(this,es),...t},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){b(this,Ht).includes(t)||(b(this,Ht).push(t),this.clearGcTimeout(),b(this,mt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$(this,Ht,b(this,Ht).filter(n=>n!==t)),this.scheduleGc(),b(this,mt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){b(this,Ht).length||(this.state.status==="pending"?this.scheduleGc():b(this,mt).remove(this))}continue(){var t;return((t=b(this,qr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,s,o,a,l,u,c,h,m,f,p,g,x,S,k,T,P,y,O,M;const n=()=>($(this,qr,Kh({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(E,I)=>{X(this,Ut,wn).call(this,{type:"failed",failureCount:E,error:I})},onPause:()=>{X(this,Ut,wn).call(this,{type:"pause"})},onContinue:()=>{X(this,Ut,wn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),b(this,qr).promise),r=this.state.status==="pending";try{if(!r){X(this,Ut,wn).call(this,{type:"pending",variables:t}),await((s=(i=b(this,mt).config).onMutate)==null?void 0:s.call(i,t,this));const I=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));I!==this.state.context&&X(this,Ut,wn).call(this,{type:"pending",context:I,variables:t})}const E=await n();return await((u=(l=b(this,mt).config).onSuccess)==null?void 0:u.call(l,E,t,this.state.context,this)),await((h=(c=this.options).onSuccess)==null?void 0:h.call(c,E,t,this.state.context)),await((f=(m=b(this,mt).config).onSettled)==null?void 0:f.call(m,E,null,this.state.variables,this.state.context,this)),await((g=(p=this.options).onSettled)==null?void 0:g.call(p,E,null,t,this.state.context)),X(this,Ut,wn).call(this,{type:"success",data:E}),E}catch(E){try{throw await((S=(x=b(this,mt).config).onError)==null?void 0:S.call(x,E,t,this.state.context,this)),await((T=(k=this.options).onError)==null?void 0:T.call(k,E,t,this.state.context)),await((y=(P=b(this,mt).config).onSettled)==null?void 0:y.call(P,void 0,E,this.state.variables,this.state.context,this)),await((M=(O=this.options).onSettled)==null?void 0:M.call(O,void 0,E,t,this.state.context)),E}finally{X(this,Ut,wn).call(this,{type:"error",error:E})}}}},Ht=new WeakMap,es=new WeakMap,mt=new WeakMap,qr=new WeakMap,Ut=new WeakSet,wn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Vo(this.options.networkMode),status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Re.batch(()=>{b(this,Ht).forEach(r=>{r.onMutationUpdate(t)}),b(this,mt).notify({mutation:this,type:"updated",action:t})})},Qd);function ep(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xt,ts,er,Wd,q0=(Wd=class extends pi{constructor(t={}){super();F(this,xt,void 0);F(this,ts,void 0);F(this,er,void 0);this.config=t,$(this,xt,[]),$(this,ts,0)}build(t,n,r){const i=new z0({mutationCache:this,mutationId:++Hs(this,ts)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){b(this,xt).push(t),this.notify({type:"added",mutation:t})}remove(t){$(this,xt,b(this,xt).filter(n=>n!==t)),this.notify({type:"removed",mutation:t})}clear(){Re.batch(()=>{b(this,xt).forEach(t=>{this.remove(t)})})}getAll(){return b(this,xt)}find(t){const n={exact:!0,...t};return b(this,xt).find(r=>vd(n,r))}findAll(t={}){return b(this,xt).filter(n=>vd(t,n))}notify(t){Re.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){return $(this,er,(b(this,er)??Promise.resolve()).then(()=>{const t=b(this,xt).filter(n=>n.state.isPaused);return Re.batch(()=>t.reduce((n,r)=>n.then(()=>r.continue().catch(Et)),Promise.resolve()))}).then(()=>{$(this,er,void 0)})),b(this,er)}},xt=new WeakMap,ts=new WeakMap,er=new WeakMap,Wd);function V0(e){return{onFetch:(t,n)=>{const r=async()=>{var p,g,x,S,k;const i=t.options,s=(x=(g=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,o=((S=t.state.data)==null?void 0:S.pages)||[],a=((k=t.state.data)==null?void 0:k.pageParams)||[],l={pages:[],pageParams:[]};let u=!1;const c=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",()=>{u=!0}),t.signal)})},h=t.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${t.options.queryHash}'`))),m=async(T,P,y)=>{if(u)return Promise.reject();if(P==null&&T.pages.length)return Promise.resolve(T);const O={queryKey:t.queryKey,pageParam:P,direction:y?"backward":"forward",meta:t.options.meta};c(O);const M=await h(O),{maxPages:E}=t.options,I=y?j0:R0;return{pages:I(T.pages,M,E),pageParams:I(T.pageParams,P,E)}};let f;if(s&&o.length){const T=s==="backward",P=T?Q0:wd,y={pages:o,pageParams:a},O=P(i,y);f=await m(y,O,T)}else{f=await m(l,a[0]??i.initialPageParam);const T=e??o.length;for(let P=1;P<T;P++){const y=wd(i,f);f=await m(f,y)}}return f};t.options.persister?t.fetchFn=()=>{var i,s;return(s=(i=t.options).persister)==null?void 0:s.call(i,r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=r}}}function wd(e,{pages:t,pageParams:n}){const r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n)}function Q0(e,{pages:t,pageParams:n}){var r;return(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n)}var Fe,Cn,Pn,Vr,Qr,An,Wr,Xr,Xd,W0=(Xd=class{constructor(e={}){F(this,Fe,void 0);F(this,Cn,void 0);F(this,Pn,void 0);F(this,Vr,void 0);F(this,Qr,void 0);F(this,An,void 0);F(this,Wr,void 0);F(this,Xr,void 0);$(this,Fe,e.queryCache||new G0),$(this,Cn,e.mutationCache||new q0),$(this,Pn,e.defaultOptions||{}),$(this,Vr,new Map),$(this,Qr,new Map),$(this,An,0)}mount(){Hs(this,An)._++,b(this,An)===1&&($(this,Wr,Co.subscribe(()=>{Co.isFocused()&&(this.resumePausedMutations(),b(this,Fe).onFocus())})),$(this,Xr,Wi.subscribe(()=>{Wi.isOnline()&&(this.resumePausedMutations(),b(this,Fe).onOnline())})))}unmount(){var e,t;Hs(this,An)._--,b(this,An)===0&&((e=b(this,Wr))==null||e.call(this),$(this,Wr,void 0),(t=b(this,Xr))==null||t.call(this),$(this,Xr,void 0))}isFetching(e){return b(this,Fe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return b(this,Cn).findAll({...e,status:"pending"}).length}getQueryData(e){var t;return(t=b(this,Fe).find({queryKey:e}))==null?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);return t?Promise.resolve(t):this.fetchQuery(e)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=b(this,Fe).find({queryKey:e}),i=r==null?void 0:r.state.data,s=F0(t,i);if(typeof s>"u")return;const o=this.defaultQueryOptions({queryKey:e});return b(this,Fe).build(this,o).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Re.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var t;return(t=b(this,Fe).find({queryKey:e}))==null?void 0:t.state}removeQueries(e){const t=b(this,Fe);Re.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=b(this,Fe),r={type:"active",...e};return Re.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Re.batch(()=>b(this,Fe).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Et).catch(Et)}invalidateQueries(e={},t={}){return Re.batch(()=>{if(b(this,Fe).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Re.batch(()=>b(this,Fe).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(Et)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Et)}fetchQuery(e){const t=this.defaultQueryOptions(e);typeof t.retry>"u"&&(t.retry=!1);const n=b(this,Fe).build(this,t);return n.isStaleByTime(t.staleTime)?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Et).catch(Et)}fetchInfiniteQuery(e){return e.behavior=V0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Et).catch(Et)}resumePausedMutations(){return b(this,Cn).resumePausedMutations()}getQueryCache(){return b(this,Fe)}getMutationCache(){return b(this,Cn)}getDefaultOptions(){return b(this,Pn)}setDefaultOptions(e){$(this,Pn,e)}setQueryDefaults(e,t){b(this,Vr).set(Vi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...b(this,Vr).values()];let n={};return t.forEach(r=>{Qi(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){b(this,Qr).set(Vi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...b(this,Qr).values()];let n={};return t.forEach(r=>{Qi(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const t={...b(this,Pn).queries,...(e==null?void 0:e.queryKey)&&this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Qc(t.queryKey,t)),typeof t.refetchOnReconnect>"u"&&(t.refetchOnReconnect=t.networkMode!=="always"),typeof t.throwOnError>"u"&&(t.throwOnError=!!t.suspense),typeof t.networkMode>"u"&&t.persister&&(t.networkMode="offlineFirst"),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...b(this,Pn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){b(this,Fe).clear(),b(this,Cn).clear()}},Fe=new WeakMap,Cn=new WeakMap,Pn=new WeakMap,Vr=new WeakMap,Qr=new WeakMap,An=new WeakMap,Wr=new WeakMap,Xr=new WeakMap,Xd),ft,we,Yr,We,tr,Jr,Gt,ns,Kr,Zr,nr,rr,On,ir,sr,Li,rs,ac,is,lc,ss,cc,os,uc,as,dc,ls,fc,cs,hc,Lo,tp,Yd,X0=(Yd=class extends pi{constructor(t,n){super();F(this,sr);F(this,rs);F(this,is);F(this,ss);F(this,os);F(this,as);F(this,ls);F(this,cs);F(this,Lo);F(this,ft,void 0);F(this,we,void 0);F(this,Yr,void 0);F(this,We,void 0);F(this,tr,void 0);F(this,Jr,void 0);F(this,Gt,void 0);F(this,ns,void 0);F(this,Kr,void 0);F(this,Zr,void 0);F(this,nr,void 0);F(this,rr,void 0);F(this,On,void 0);F(this,ir,void 0);$(this,we,void 0),$(this,Yr,void 0),$(this,We,void 0),$(this,ir,new Set),$(this,ft,t),this.options=n,$(this,Gt,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(b(this,we).addObserver(this),xd(b(this,we),this.options)&&X(this,sr,Li).call(this),X(this,os,uc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return pc(b(this,we),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return pc(b(this,we),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X(this,as,dc).call(this),X(this,ls,fc).call(this),b(this,we).removeObserver(this)}setOptions(t,n){const r=this.options,i=b(this,we);if(this.options=b(this,ft).defaultQueryOptions(t),To(r,this.options)||b(this,ft).getQueryCache().notify({type:"observerOptionsUpdated",query:b(this,we),observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),X(this,cs,hc).call(this);const s=this.hasListeners();s&&Sd(b(this,we),i,this.options,r)&&X(this,sr,Li).call(this),this.updateResult(n),s&&(b(this,we)!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&X(this,rs,ac).call(this);const o=X(this,is,lc).call(this);s&&(b(this,we)!==i||this.options.enabled!==r.enabled||o!==b(this,On))&&X(this,ss,cc).call(this,o)}getOptimisticResult(t){const n=b(this,ft).getQueryCache().build(b(this,ft),t),r=this.createResult(n,t);return J0(this,r)&&($(this,We,r),$(this,Jr,this.options),$(this,tr,b(this,we).state)),r}getCurrentResult(){return b(this,We)}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(b(this,ir).add(r),t[r])})}),n}getCurrentQuery(){return b(this,we)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=b(this,ft).defaultQueryOptions(t),r=b(this,ft).getQueryCache().build(b(this,ft),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return X(this,sr,Li).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),b(this,We)))}createResult(t,n){var O;const r=b(this,we),i=this.options,s=b(this,We),o=b(this,tr),a=b(this,Jr),u=t!==r?t.state:b(this,Yr),{state:c}=t;let{error:h,errorUpdatedAt:m,fetchStatus:f,status:p}=c,g=!1,x;if(n._optimisticResults){const M=this.hasListeners(),E=!M&&xd(t,n),I=M&&Sd(t,r,n,i);(E||I)&&(f=Vo(t.options.networkMode)?"fetching":"paused",c.dataUpdatedAt||(p="pending")),n._optimisticResults==="isRestoring"&&(f="idle")}if(n.select&&typeof c.data<"u")if(s&&c.data===(o==null?void 0:o.data)&&n.select===b(this,ns))x=b(this,Kr);else try{$(this,ns,n.select),x=n.select(c.data),x=oc(s==null?void 0:s.data,x,n),$(this,Kr,x),$(this,Gt,null)}catch(M){$(this,Gt,M)}else x=c.data;if(typeof n.placeholderData<"u"&&typeof x>"u"&&p==="pending"){let M;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))M=s.data;else if(M=typeof n.placeholderData=="function"?n.placeholderData((O=b(this,Zr))==null?void 0:O.state.data,b(this,Zr)):n.placeholderData,n.select&&typeof M<"u")try{M=n.select(M),$(this,Gt,null)}catch(E){$(this,Gt,E)}typeof M<"u"&&(p="success",x=oc(s==null?void 0:s.data,M,n),g=!0)}b(this,Gt)&&(h=b(this,Gt),x=b(this,Kr),m=Date.now(),p="error");const S=f==="fetching",k=p==="pending",T=p==="error",P=k&&S;return{status:p,fetchStatus:f,isPending:k,isSuccess:p==="success",isError:T,isInitialLoading:P,isLoading:P,data:x,dataUpdatedAt:c.dataUpdatedAt,error:h,errorUpdatedAt:m,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:S,isRefetching:S&&!k,isLoadingError:T&&c.dataUpdatedAt===0,isPaused:f==="paused",isPlaceholderData:g,isRefetchError:T&&c.dataUpdatedAt!==0,isStale:Wc(t,n),refetch:this.refetch}}updateResult(t){const n=b(this,We),r=this.createResult(b(this,we),this.options);if($(this,tr,b(this,we).state),$(this,Jr,this.options),To(r,n))return;b(this,tr).data!==void 0&&$(this,Zr,b(this,we)),$(this,We,r);const i={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!b(this,ir).size)return!0;const l=new Set(a??b(this,ir));return this.options.throwOnError&&l.add("error"),Object.keys(b(this,We)).some(u=>{const c=u;return b(this,We)[c]!==n[c]&&l.has(c)})};(t==null?void 0:t.listeners)!==!1&&s()&&(i.listeners=!0),X(this,Lo,tp).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,os,uc).call(this)}},ft=new WeakMap,we=new WeakMap,Yr=new WeakMap,We=new WeakMap,tr=new WeakMap,Jr=new WeakMap,Gt=new WeakMap,ns=new WeakMap,Kr=new WeakMap,Zr=new WeakMap,nr=new WeakMap,rr=new WeakMap,On=new WeakMap,ir=new WeakMap,sr=new WeakSet,Li=function(t){X(this,cs,hc).call(this);let n=b(this,we).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Et)),n},rs=new WeakSet,ac=function(){if(X(this,as,dc).call(this),ui||b(this,We).isStale||!ic(this.options.staleTime))return;const n=Wh(b(this,We).dataUpdatedAt,this.options.staleTime)+1;$(this,nr,setTimeout(()=>{b(this,We).isStale||this.updateResult()},n))},is=new WeakSet,lc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(b(this,we)):this.options.refetchInterval)??!1},ss=new WeakSet,cc=function(t){X(this,ls,fc).call(this),$(this,On,t),!(ui||this.options.enabled===!1||!ic(b(this,On))||b(this,On)===0)&&$(this,rr,setInterval(()=>{(this.options.refetchIntervalInBackground||Co.isFocused())&&X(this,sr,Li).call(this)},b(this,On)))},os=new WeakSet,uc=function(){X(this,rs,ac).call(this),X(this,ss,cc).call(this,X(this,is,lc).call(this))},as=new WeakSet,dc=function(){b(this,nr)&&(clearTimeout(b(this,nr)),$(this,nr,void 0))},ls=new WeakSet,fc=function(){b(this,rr)&&(clearInterval(b(this,rr)),$(this,rr,void 0))},cs=new WeakSet,hc=function(){const t=b(this,ft).getQueryCache().build(b(this,ft),this.options);if(t===b(this,we))return;const n=b(this,we);$(this,we,t),$(this,Yr,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Lo=new WeakSet,tp=function(t){Re.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(b(this,We))}),b(this,ft).getQueryCache().notify({query:b(this,we),type:"observerResultsUpdated"})})},Yd);function Y0(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function xd(e,t){return Y0(e,t)||e.state.dataUpdatedAt>0&&pc(e,t,t.refetchOnMount)}function pc(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Wc(e,t)}return!1}function Sd(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&Wc(e,n)}function Wc(e,t){return e.isStaleByTime(t.staleTime)}function J0(e,t){return!To(e.getCurrentResult(),t)}var Mn,rt,St,sn,ei,ho,us,mc,Jd,K0=(Jd=class extends pi{constructor(t,n){super();F(this,ei);F(this,us);F(this,Mn,void 0);F(this,rt,void 0);F(this,St,void 0);F(this,sn,void 0);$(this,rt,void 0),$(this,Mn,t),this.setOptions(n),this.bindMethods(),X(this,ei,ho).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const n=this.options;this.options=b(this,Mn).defaultMutationOptions(t),To(n,this.options)||b(this,Mn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:b(this,St),observer:this}),(r=b(this,St))==null||r.setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=b(this,St))==null||t.removeObserver(this)}onMutationUpdate(t){X(this,ei,ho).call(this),X(this,us,mc).call(this,t)}getCurrentResult(){return b(this,rt)}reset(){$(this,St,void 0),X(this,ei,ho).call(this),X(this,us,mc).call(this)}mutate(t,n){var r;return $(this,sn,n),(r=b(this,St))==null||r.removeObserver(this),$(this,St,b(this,Mn).getMutationCache().build(b(this,Mn),this.options)),b(this,St).addObserver(this),b(this,St).execute(t)}},Mn=new WeakMap,rt=new WeakMap,St=new WeakMap,sn=new WeakMap,ei=new WeakSet,ho=function(){var n;const t=((n=b(this,St))==null?void 0:n.state)??ep();$(this,rt,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},us=new WeakSet,mc=function(t){Re.batch(()=>{var n,r,i,s,o,a,l,u;b(this,sn)&&this.hasListeners()&&((t==null?void 0:t.type)==="success"?((r=(n=b(this,sn)).onSuccess)==null||r.call(n,t.data,b(this,rt).variables,b(this,rt).context),(s=(i=b(this,sn)).onSettled)==null||s.call(i,t.data,null,b(this,rt).variables,b(this,rt).context)):(t==null?void 0:t.type)==="error"&&((a=(o=b(this,sn)).onError)==null||a.call(o,t.error,b(this,rt).variables,b(this,rt).context),(u=(l=b(this,sn)).onSettled)==null||u.call(l,void 0,t.error,b(this,rt).variables,b(this,rt).context))),this.listeners.forEach(c=>{c(b(this,rt))})})},Jd),np=Q.createContext(void 0),mi=e=>{const t=Q.useContext(np);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Z0=({client:e,children:t})=>(Q.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Q.createElement(np.Provider,{value:e},t)),rp=Q.createContext(!1),eb=()=>Q.useContext(rp);rp.Provider;function tb(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var nb=Q.createContext(tb()),rb=()=>Q.useContext(nb);function ip(e,t){return typeof e=="function"?e(...t):!!e}var ib=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},sb=e=>{Q.useEffect(()=>{e.clearReset()},[e])},ob=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&ip(n,[e.error,r]),ab=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},lb=(e,t)=>e.isLoading&&e.isFetching&&!t,cb=(e,t,n)=>(e==null?void 0:e.suspense)&&lb(t,n),ub=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function db(e,t,n){const r=mi(n),i=eb(),s=rb(),o=r.defaultQueryOptions(e);o._optimisticResults=i?"isRestoring":"optimistic",ab(o),ib(o,s),sb(s);const[a]=Q.useState(()=>new t(r,o)),l=a.getOptimisticResult(o);if(Q.useSyncExternalStore(Q.useCallback(u=>{const c=i?()=>{}:a.subscribe(Re.batchCalls(u));return a.updateResult(),c},[a,i]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),Q.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),cb(o,l,i))throw ub(o,a,s);if(ob({result:l,errorResetBoundary:s,throwOnError:o.throwOnError,query:a.getCurrentQuery()}))throw l.error;return o.notifyOnChangeProps?l:a.trackResult(l)}function sp(e,t){return db(e,X0,t)}function Fn(e,t){const n=mi(t),[r]=Q.useState(()=>new K0(n,e));Q.useEffect(()=>{r.setOptions(e)},[r,e]);const i=Q.useSyncExternalStore(Q.useCallback(o=>r.subscribe(Re.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=Q.useCallback((o,a)=>{r.mutate(o,a).catch(fb)},[r]);if(i.error&&ip(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:s,mutateAsync:i.mutate}}function fb(){}var K={context:void 0,registry:void 0};function Di(e){K.context=e}var hb=(e,t)=>e===t,Xi=Symbol("solid-proxy"),Xc=Symbol("solid-track"),pb=Symbol("solid-dev-component"),Po={equals:hb},op=up,fn=1,Ao=2,ap={owned:null,cleanups:null,context:null,owner:null},sl={},xe=null,ol=null,me=null,Je=null,un=null,Qo=0,[mb,$1]=st(!1);function Rn(e,t){const n=me,r=xe,i=e.length===0,s=i?ap:{owned:null,cleanups:null,context:null,owner:t===void 0?r:t},o=i?e:()=>e(()=>je(()=>Xo(s)));xe=s,me=null;try{return Qt(o,!0)}finally{me=n,xe=r}}function st(e,t){t=t?Object.assign({},Po,t):Po;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=i=>(typeof i=="function"&&(i=i(n.value)),cp(n,i));return[lp.bind(n),r]}function gc(e,t,n){const r=Wo(e,t,!0,fn);gi(r)}function jn(e,t,n){const r=Wo(e,t,!1,fn);gi(r)}function Yc(e,t,n){op=Ab;const r=Wo(e,t,!1,fn);(!n||!n.render)&&(r.user=!0),un?un.push(r):gi(r)}function at(e,t,n){n=n?Object.assign({},Po,n):Po;const r=Wo(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,gi(r),lp.bind(r)}function gb(e,t,n){let r,i,s;arguments.length===2&&typeof t=="object"||arguments.length===1?(r=!0,i=e,s=t||{}):(r=e,i=t,s=n||{});let o=null,a=sl,l=null,u=!1,c="initialValue"in s,h=typeof r=="function"&&at(r);const m=new Set,[f,p]=(s.storage||st)(s.initialValue),[g,x]=st(void 0),[S,k]=st(void 0,{equals:!1}),[T,P]=st(c?"ready":"unresolved");if(K.context){l=`${K.context.id}${K.context.count++}`;let I;s.ssrLoadFrom==="initial"?a=s.initialValue:K.load&&(I=K.load(l))&&(a=I[0])}function y(I,R,N,z){return o===I&&(o=null,z!==void 0&&(c=!0),(I===a||R===a)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(z,{value:R})),a=sl,O(R,N)),R}function O(I,R){Qt(()=>{R===void 0&&p(()=>I),P(R!==void 0?"errored":c?"ready":"unresolved"),x(R);for(const N of m.keys())N.decrement();m.clear()},!1)}function M(){const I=Tb,R=f(),N=g();if(N!==void 0&&!o)throw N;return me&&!me.user&&I&&gc(()=>{S(),o&&(I.resolved||m.has(I)||(I.increment(),m.add(I)))}),R}function E(I=!0){if(I!==!1&&u)return;u=!1;const R=h?h():r;if(R==null||R===!1){y(o,je(f));return}const N=a!==sl?a:je(()=>i(R,{value:f(),refetching:I}));return typeof N!="object"||!(N&&"then"in N)?(y(o,N,void 0,R),N):(o=N,u=!0,queueMicrotask(()=>u=!1),Qt(()=>{P(c?"refreshing":"pending"),k()},!1),N.then(z=>y(N,z,void 0,R),z=>y(N,void 0,fp(z),R)))}return Object.defineProperties(M,{state:{get:()=>T()},error:{get:()=>g()},loading:{get(){const I=T();return I==="pending"||I==="refreshing"}},latest:{get(){if(!c)return M();const I=g();if(I&&!o)throw I;return f()}}}),h?gc(()=>E(!1)):E(!1),[M,{refetch:E,mutate:p}]}function vb(e){return Qt(e,!1)}function je(e){if(me===null)return e();const t=me;me=null;try{return e()}finally{me=t}}function _b(e,t,n){const r=Array.isArray(e);let i,s=n&&n.defer;return o=>{let a;if(r){a=Array(e.length);for(let u=0;u<e.length;u++)a[u]=e[u]()}else a=e();if(s){s=!1;return}const l=je(()=>t(a,i,o));return i=a,l}}function yb(e){Yc(()=>je(e))}function Yi(e){return xe===null||(xe.cleanups===null?xe.cleanups=[e]:xe.cleanups.push(e)),e}function bb(){return me}function Ed(){return xe}function wb(e,t){const n=xe,r=me;xe=e,me=null;try{return Qt(t,!0)}catch(i){Kc(i)}finally{xe=n,me=r}}function xb(e){const t=me,n=xe;return Promise.resolve().then(()=>{me=t,xe=n;let r;return Qt(e,!1),me=xe=null,r?r.done:void 0})}function Sb(){return[mb,xb]}function Eb(e,t){const n=Symbol("context");return{id:n,Provider:Ob(n),defaultValue:e}}function kb(e){let t;return(t=hp(xe,e.id))!==void 0?t:e.defaultValue}function Jc(e){const t=at(e),n=at(()=>vc(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}var Tb;function lp(){if(this.sources&&this.state)if(this.state===fn)gi(this);else{const e=Je;Je=null,Qt(()=>Mo(this),!1),Je=e}if(me){const e=this.observers?this.observers.length:0;me.sources?(me.sources.push(this),me.sourceSlots.push(e)):(me.sources=[this],me.sourceSlots=[e]),this.observers?(this.observers.push(me),this.observerSlots.push(me.sources.length-1)):(this.observers=[me],this.observerSlots=[me.sources.length-1])}return this.value}function cp(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&Qt(()=>{for(let i=0;i<e.observers.length;i+=1){const s=e.observers[i],o=ol&&ol.running;o&&ol.disposed.has(s),(o?!s.tState:!s.state)&&(s.pure?Je.push(s):un.push(s),s.observers&&dp(s)),o||(s.state=fn)}if(Je.length>1e6)throw Je=[],new Error},!1)),t}function gi(e){if(!e.fn)return;Xo(e);const t=xe,n=me,r=Qo;me=xe=e,Cb(e,e.value,r),me=n,xe=t}function Cb(e,t,n){let r;try{r=e.fn(t)}catch(i){return e.pure&&(e.state=fn,e.owned&&e.owned.forEach(Xo),e.owned=null),e.updatedAt=n+1,Kc(i)}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?cp(e,r):e.value=r,e.updatedAt=n)}function Wo(e,t,n,r=fn,i){const s={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:xe,context:null,pure:n};return xe===null||xe!==ap&&(xe.owned?xe.owned.push(s):xe.owned=[s]),s}function Oo(e){if(e.state===0)return;if(e.state===Ao)return Mo(e);if(e.suspense&&je(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Qo);)e.state&&t.push(e);for(let n=t.length-1;n>=0;n--)if(e=t[n],e.state===fn)gi(e);else if(e.state===Ao){const r=Je;Je=null,Qt(()=>Mo(e,t[0]),!1),Je=r}}function Qt(e,t){if(Je)return e();let n=!1;t||(Je=[]),un?n=!0:un=[],Qo++;try{const r=e();return Pb(n),r}catch(r){n||(un=null),Je=null,Kc(r)}}function Pb(e){if(Je&&(up(Je),Je=null),e)return;const t=un;un=null,t.length&&Qt(()=>op(t),!1)}function up(e){for(let t=0;t<e.length;t++)Oo(e[t])}function Ab(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:Oo(r)}if(K.context){if(K.count){K.effects||(K.effects=[]),K.effects.push(...e.slice(0,n));return}else K.effects&&(e=[...K.effects,...e],n+=K.effects.length,delete K.effects);Di()}for(t=0;t<n;t++)Oo(e[t])}function Mo(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const r=e.sources[n];if(r.sources){const i=r.state;i===fn?r!==t&&(!r.updatedAt||r.updatedAt<Qo)&&Oo(r):i===Ao&&Mo(r,t)}}}function dp(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t];n.state||(n.state=Ao,n.pure?Je.push(n):un.push(n),n.observers&&dp(n))}}function Xo(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),i=n.observers;if(i&&i.length){const s=i.pop(),o=n.observerSlots.pop();r<i.length&&(s.sourceSlots[o]=r,i[r]=s,n.observerSlots[r]=o)}}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Xo(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function fp(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Kc(e,t=xe){throw fp(e)}function hp(e,t){return e?e.context&&e.context[t]!==void 0?e.context[t]:hp(e.owner,t):void 0}function vc(e){if(typeof e=="function"&&!e.length)return vc(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=vc(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function Ob(e,t){return function(r){let i;return jn(()=>i=je(()=>(xe.context={[e]:r.value},Jc(()=>r.children))),void 0),i}}var _c=Symbol("fallback");function Io(e){for(let t=0;t<e.length;t++)e[t]()}function Mb(e,t,n={}){let r=[],i=[],s=[],o=0,a=t.length>1?[]:null;return Yi(()=>Io(s)),()=>{let l=e()||[],u,c;return l[Xc],je(()=>{let m=l.length,f,p,g,x,S,k,T,P,y;if(m===0)o!==0&&(Io(s),s=[],r=[],i=[],o=0,a&&(a=[])),n.fallback&&(r=[_c],i[0]=Rn(O=>(s[0]=O,n.fallback())),o=1);else if(o===0){for(i=new Array(m),c=0;c<m;c++)r[c]=l[c],i[c]=Rn(h);o=m}else{for(g=new Array(m),x=new Array(m),a&&(S=new Array(m)),k=0,T=Math.min(o,m);k<T&&r[k]===l[k];k++);for(T=o-1,P=m-1;T>=k&&P>=k&&r[T]===l[P];T--,P--)g[P]=i[T],x[P]=s[T],a&&(S[P]=a[T]);for(f=new Map,p=new Array(P+1),c=P;c>=k;c--)y=l[c],u=f.get(y),p[c]=u===void 0?-1:u,f.set(y,c);for(u=k;u<=T;u++)y=r[u],c=f.get(y),c!==void 0&&c!==-1?(g[c]=i[u],x[c]=s[u],a&&(S[c]=a[u]),c=p[c],f.set(y,c)):s[u]();for(c=k;c<m;c++)c in g?(i[c]=g[c],s[c]=x[c],a&&(a[c]=S[c],a[c](c))):i[c]=Rn(h);i=i.slice(0,o=m),r=l.slice(0)}return i});function h(m){if(s[c]=m,a){const[f,p]=st(c);return a[c]=p,t(l[c],f)}return t(l[c])}}}function Ib(e,t,n={}){let r=[],i=[],s=[],o=[],a=0,l;return Yi(()=>Io(s)),()=>{const u=e()||[];return u[Xc],je(()=>{if(u.length===0)return a!==0&&(Io(s),s=[],r=[],i=[],a=0,o=[]),n.fallback&&(r=[_c],i[0]=Rn(h=>(s[0]=h,n.fallback())),a=1),i;for(r[0]===_c&&(s[0](),s=[],r=[],i=[],a=0),l=0;l<u.length;l++)l<r.length&&r[l]!==u[l]?o[l](()=>u[l]):l>=r.length&&(i[l]=Rn(c));for(;l<r.length;l++)s[l]();return a=o.length=s.length=u.length,r=u.slice(0),i=i.slice(0,a)});function c(h){s[l]=h;const[m,f]=st(u[l]);return o[l]=f,t(m,l)}}}function pp(e,t){return je(()=>e(t||{}))}function Ys(){return!0}var yc={get(e,t,n){return t===Xi?n:e.get(t)},has(e,t){return t===Xi?!0:e.has(t)},set:Ys,deleteProperty:Ys,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Ys,deleteProperty:Ys}},ownKeys(e){return e.keys()}};function al(e){return(e=typeof e=="function"?e():e)?e:{}}function $b(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function mp(...e){let t=!1;for(let s=0;s<e.length;s++){const o=e[s];t=t||!!o&&Xi in o,e[s]=typeof o=="function"?(t=!0,at(o)):o}if(t)return new Proxy({get(s){for(let o=e.length-1;o>=0;o--){const a=al(e[o])[s];if(a!==void 0)return a}},has(s){for(let o=e.length-1;o>=0;o--)if(s in al(e[o]))return!0;return!1},keys(){const s=[];for(let o=0;o<e.length;o++)s.push(...Object.keys(al(e[o])));return[...new Set(s)]}},yc);const n={},r={},i=new Set;for(let s=e.length-1;s>=0;s--){const o=e[s];if(!o)continue;const a=Object.getOwnPropertyNames(o);for(let l=0,u=a.length;l<u;l++){const c=a[l];if(c==="__proto__"||c==="constructor")continue;const h=Object.getOwnPropertyDescriptor(o,c);if(!i.has(c))h.get?(i.add(c),Object.defineProperty(n,c,{enumerable:!0,configurable:!0,get:$b.bind(r[c]=[h.get.bind(o)])})):(h.value!==void 0&&i.add(c),n[c]=h.value);else{const m=r[c];m?h.get?m.push(h.get.bind(o)):h.value!==void 0&&m.push(()=>h.value):n[c]===void 0&&(n[c]=h.value)}}}return n}function gp(e,...t){if(Xi in e){const i=new Set(t.length>1?t.flat():t[0]),s=t.map(o=>new Proxy({get(a){return o.includes(a)?e[a]:void 0},has(a){return o.includes(a)&&a in e},keys(){return o.filter(a=>a in e)}},yc));return s.push(new Proxy({get(o){return i.has(o)?void 0:e[o]},has(o){return i.has(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!i.has(o))}},yc)),s}const n={},r=t.map(()=>({}));for(const i of Object.getOwnPropertyNames(e)){const s=Object.getOwnPropertyDescriptor(e,i),o=!s.get&&!s.set&&s.enumerable&&s.writable&&s.configurable;let a=!1,l=0;for(const u of t)u.includes(i)&&(a=!0,o?r[l][i]=s.value:Object.defineProperty(r[l],i,s)),++l;a||(o?n[i]=s.value:Object.defineProperty(n,i,s))}return[...r,n]}function Fb(e){let t,n;const r=i=>{const s=K.context;if(s){const[a,l]=st();K.count||(K.count=0),K.count++,(n||(n=e())).then(u=>{Di(s),K.count--,l(()=>u.default),Di()}),t=a}else if(!t){const[a]=gb(()=>(n||(n=e())).then(l=>l.default));t=a}let o;return at(()=>(o=t())&&je(()=>{if(!s)return o(i);const a=K.context;Di(s);const l=o(i);return Di(a),l}))};return r.preload=()=>n||((n=e()).then(i=>t=()=>i.default),n),r}var Rb=0;function jb(){const e=K.context;return e?`${e.id}${e.count++}`:`cl-${Rb++}`}var vp=e=>`Stale read from <${e}>.`;function Nb(e){const t="fallback"in e&&{fallback:()=>e.fallback};return at(Mb(()=>e.each,e.children,t||void 0))}function Lb(e){const t="fallback"in e&&{fallback:()=>e.fallback};return at(Ib(()=>e.each,e.children,t||void 0))}function Db(e){const t=e.keyed,n=at(()=>e.when,void 0,{equals:(r,i)=>t?r===i:!r==!i});return at(()=>{const r=n();if(r){const i=e.children;return typeof i=="function"&&i.length>0?je(()=>i(t?r:()=>{if(!je(n))throw vp("Show");return e.when})):i}return e.fallback},void 0,void 0)}function Bb(e){let t=!1;const n=(s,o)=>s[0]===o[0]&&(t?s[1]===o[1]:!s[1]==!o[1])&&s[2]===o[2],r=Jc(()=>e.children),i=at(()=>{let s=r();Array.isArray(s)||(s=[s]);for(let o=0;o<s.length;o++){const a=s[o].when;if(a)return t=!!s[o].keyed,[o,a,s[o]]}return[-1]},void 0,{equals:n});return at(()=>{const[s,o,a]=i();if(s<0)return e.fallback;const l=a.children;return typeof l=="function"&&l.length>0?je(()=>l(t?o:()=>{if(je(i)[0]!==s)throw vp("Match");return a.when})):l},void 0,void 0)}function Hb(e){return e}var Ub=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],Gb=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Ub]),zb=new Set(["innerHTML","textContent","innerText","children"]),qb=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Vb=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function Qb(e,t){const n=Vb[e];return typeof n=="object"?n[t]?n.$:void 0:n}var Wb=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Xb=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),Yb={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Jb(e,t,n){let r=n.length,i=t.length,s=r,o=0,a=0,l=t[i-1].nextSibling,u=null;for(;o<i||a<s;){if(t[o]===n[a]){o++,a++;continue}for(;t[i-1]===n[s-1];)i--,s--;if(i===o){const c=s<r?a?n[a-1].nextSibling:n[s-a]:l;for(;a<s;)e.insertBefore(n[a++],c)}else if(s===a)for(;o<i;)(!u||!u.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[s-1]&&n[a]===t[i-1]){const c=t[--i].nextSibling;e.insertBefore(n[a++],t[o++].nextSibling),e.insertBefore(n[--s],c),t[i]=n[s]}else{if(!u){u=new Map;let h=a;for(;h<s;)u.set(n[h],h++)}const c=u.get(t[o]);if(c!=null)if(a<c&&c<s){let h=o,m=1,f;for(;++h<i&&h<s&&!((f=u.get(t[h]))==null||f!==c+m);)m++;if(m>c-a){const p=t[o];for(;a<c;)e.insertBefore(n[a++],p)}else e.replaceChild(n[a++],t[o++])}else o++;else t[o++].remove()}}}var kd="_$DX_DELEGATE";function Kb(e,t,n,r={}){let i;return Rn(s=>{i=s,t===document?e():Fo(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=""}}function Zb(e,t,n){let r;const i=()=>{const o=document.createElement("template");return o.innerHTML=e,n?o.content.firstChild.firstChild:o.content.firstChild},s=t?()=>je(()=>document.importNode(r||(r=i()),!0)):()=>(r||(r=i())).cloneNode(!0);return s.cloneNode=s,s}function _p(e,t=window.document){const n=t[kd]||(t[kd]=new Set);for(let r=0,i=e.length;r<i;r++){const s=e[r];n.has(s)||(n.add(s),t.addEventListener(s,aw))}}function $o(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function ew(e,t,n,r){r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r)}function yp(e,t){t==null?e.removeAttribute("class"):e.className=t}function bp(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const i=n[0];e.addEventListener(t,n[0]=s=>i.call(e,n[1],s))}else e.addEventListener(t,n)}function tw(e,t,n={}){const r=Object.keys(t||{}),i=Object.keys(n);let s,o;for(s=0,o=i.length;s<o;s++){const a=i[s];!a||a==="undefined"||t[a]||(Td(e,a,!1),delete n[a])}for(s=0,o=r.length;s<o;s++){const a=r[s],l=!!t[a];!a||a==="undefined"||n[a]===l||!l||(Td(e,a,!0),n[a]=l)}return n}function nw(e,t,n){if(!t)return n?$o(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let i,s;for(s in n)t[s]==null&&r.removeProperty(s),delete n[s];for(s in t)i=t[s],i!==n[s]&&(r.setProperty(s,i),n[s]=i);return n}function wp(e,t={},n,r){const i={};return r||jn(()=>i.children=di(e,t.children,i.children)),jn(()=>t.ref&&t.ref(e)),jn(()=>iw(e,t,n,!0,i,!0)),i}function rw(e,t,n){return je(()=>e(t,n))}function Fo(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return di(e,t,r,n);jn(i=>di(e,t(),i,n),r)}function iw(e,t,n,r,i={},s=!1){t||(t={});for(const o in i)if(!(o in t)){if(o==="children")continue;i[o]=Cd(e,o,null,i[o],n,s)}for(const o in t){if(o==="children"){r||di(e,t.children);continue}const a=t[o];i[o]=Cd(e,o,a,i[o],n,s)}}function sw(e){let t,n;if(!K.context||!(t=K.registry.get(n=lw()))){if(K.context,!e)throw new Error("Unrecoverable Hydration Mismatch. No template for key: "+n);return e()}return K.completed&&K.completed.add(t),K.registry.delete(n),t}function ow(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Td(e,t,n){const r=t.trim().split(/\s+/);for(let i=0,s=r.length;i<s;i++)e.classList.toggle(r[i],n)}function Cd(e,t,n,r,i,s){let o,a,l,u,c;if(t==="style")return nw(e,n,r);if(t==="classList")return tw(e,n,r);if(n===r)return r;if(t==="ref")s||n(e);else if(t.slice(0,3)==="on:"){const h=t.slice(3);r&&e.removeEventListener(h,r),n&&e.addEventListener(h,n)}else if(t.slice(0,10)==="oncapture:"){const h=t.slice(10);r&&e.removeEventListener(h,r,!0),n&&e.addEventListener(h,n,!0)}else if(t.slice(0,2)==="on"){const h=t.slice(2).toLowerCase(),m=Wb.has(h);if(!m&&r){const f=Array.isArray(r)?r[0]:r;e.removeEventListener(h,f)}(m||n)&&(bp(e,h,n,m),m&&_p([h]))}else if(t.slice(0,5)==="attr:")$o(e,t.slice(5),n);else if((c=t.slice(0,5)==="prop:")||(l=zb.has(t))||!i&&((u=Qb(t,e.tagName))||(a=Gb.has(t)))||(o=e.nodeName.includes("-")))c&&(t=t.slice(5),a=!0),t==="class"||t==="className"?yp(e,n):o&&!a&&!l?e[ow(t)]=n:e[u||t]=n;else{const h=i&&t.indexOf(":")>-1&&Yb[t.split(":")[0]];h?ew(e,h,t,n):$o(e,qb[t]||t,n)}return n}function aw(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}}),K.registry&&!K.done&&(K.done=_$HY.done=!0);n;){const r=n[t];if(r&&!n.disabled){const i=n[`${t}Data`];if(i!==void 0?r.call(n,i,e):r.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function di(e,t,n,r,i){if(K.context){!n&&(n=[...e.childNodes]);let a=[];for(let l=0;l<n.length;l++){const u=n[l];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():a.push(u)}n=a}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,o=r!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(K.context)return n;if(s==="number"&&(t=t.toString()),o){let a=n[0];a&&a.nodeType===3?a.data=t:a=document.createTextNode(t),n=Mr(e,n,r,a)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(K.context)return n;n=Mr(e,n,r)}else{if(s==="function")return jn(()=>{let a=t();for(;typeof a=="function";)a=a();n=di(e,a,n,r)}),()=>n;if(Array.isArray(t)){const a=[],l=n&&Array.isArray(n);if(bc(a,t,n,i))return jn(()=>n=di(e,a,n,r,!0)),()=>n;if(K.context){if(!a.length)return n;for(let u=0;u<a.length;u++)if(a[u].parentNode)return n=a}if(a.length===0){if(n=Mr(e,n,r),o)return n}else l?n.length===0?Pd(e,a,r):Jb(e,n,a):(n&&Mr(e),Pd(e,a));n=a}else if(t.nodeType){if(K.context&&t.parentNode)return n=o?[t]:t;if(Array.isArray(n)){if(o)return n=Mr(e,n,r,t);Mr(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function bc(e,t,n,r){let i=!1;for(let s=0,o=t.length;s<o;s++){let a=t[s],l=n&&n[s],u;if(!(a==null||a===!0||a===!1))if((u=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))i=bc(e,a,l)||i;else if(u==="function")if(r){for(;typeof a=="function";)a=a();i=bc(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||i}else e.push(a),i=!0;else{const c=String(a);l&&l.nodeType===3&&l.data===c?e.push(l):e.push(document.createTextNode(c))}}return i}function Pd(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Mr(e,t,n,r){if(n===void 0)return e.textContent="";const i=r||document.createTextNode("");if(t.length){let s=!1;for(let o=t.length-1;o>=0;o--){const a=t[o];if(i!==a){const l=a.parentNode===e;!s&&!o?l?e.replaceChild(i,a):e.insertBefore(i,n):l&&a.remove()}else s=!0}}else e.insertBefore(i,n);return[i]}function lw(){const e=K.context;return`${e.id}${e.count++}`}var cw="http://www.w3.org/2000/svg";function xp(e,t=!1){return t?document.createElementNS(cw,e):document.createElement(e)}function uw(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,i=Ed();let s,o=!!K.context;return Yc(()=>{o&&(Ed().user=o=!1),s||(s=wb(i,()=>at(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,u]=st(!1),c=()=>u(!0);Rn(h=>Fo(a,()=>l()?h():s(),null)),Yi(c)}else{const l=xp(e.isSVG?"g":"div",e.isSVG),u=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),Fo(u,s),a.appendChild(l),e.ref&&e.ref(l),Yi(()=>a.removeChild(l))}},void 0,{render:!o}),n}function dw(e){const[t,n]=gp(e,["component"]),r=at(()=>t.component);return at(()=>{const i=r();switch(typeof i){case"function":return Object.assign(i,{[pb]:!0}),je(()=>i(n));case"string":const s=Xb.has(i),o=K.context?sw():xp(i,s);return wp(o,n,s),o}})}var ti,ds,fs,hs,or,ni,ri,ii,si,oi,ps,Kd,fw=(Kd=class{constructor(e){F(this,ti,void 0);F(this,ds,void 0);F(this,fs,void 0);F(this,hs,void 0);F(this,or,!1);F(this,ni,void 0);F(this,ri,void 0);F(this,ii,void 0);F(this,si,void 0);F(this,oi,void 0);F(this,ps,void 0);const{client:t,queryFlavor:n,version:r,onlineManager:i,buttonPosition:s,position:o,initialIsOpen:a,errorTypes:l}=e;$(this,ti,st(t)),$(this,fs,n),$(this,hs,r),$(this,ds,i),$(this,ni,st(s)),$(this,ri,st(o)),$(this,ii,st(a)),$(this,si,st(l))}setButtonPosition(e){b(this,ni)[1](e)}setPosition(e){b(this,ri)[1](e)}setInitialIsOpen(e){b(this,ii)[1](e)}setErrorTypes(e){b(this,si)[1](e)}setClient(e){b(this,ti)[1](e)}mount(e){if(b(this,or))throw new Error("Devtools is already mounted");const t=Kb(()=>{const[n]=b(this,ni),[r]=b(this,ri),[i]=b(this,ii),[s]=b(this,si),[o]=b(this,ti);let a;b(this,oi)?a=b(this,oi):(a=Fb(()=>Promise.resolve().then(()=>require("./4TNE5QTO-7e524b6e.js"))),$(this,oi,a));const l=this;return pp(a,mp({get queryFlavor(){return b(l,fs)},get version(){return b(l,hs)},get onlineManager(){return b(l,ds)}},{get client(){return o()},get buttonPosition(){return n()},get position(){return r()},get initialIsOpen(){return i()},get errorTypes(){return s()}}))},e);$(this,or,!0),$(this,ps,t)}unmount(){var e;if(!b(this,or))throw new Error("Devtools is not mounted");(e=b(this,ps))==null||e.call(this),$(this,or,!1)}},ti=new WeakMap,ds=new WeakMap,fs=new WeakMap,hs=new WeakMap,or=new WeakMap,ni=new WeakMap,ri=new WeakMap,ii=new WeakMap,si=new WeakMap,oi=new WeakMap,ps=new WeakMap,Kd);function hw(e){const t=mi(),n=e.client||t,r=C.useRef(null),{buttonPosition:i,position:s,initialIsOpen:o,errorTypes:a}=e,[l]=C.useState(new fw({client:n,queryFlavor:"React Query",version:"5",onlineManager:Wi,buttonPosition:i,position:s,initialIsOpen:o,errorTypes:a}));return C.useEffect(()=>{l.setClient(n)},[n,l]),C.useEffect(()=>{i&&l.setButtonPosition(i)},[i,l]),C.useEffect(()=>{s&&l.setPosition(s)},[s,l]),C.useEffect(()=>{l.setInitialIsOpen(o||!1)},[o,l]),C.useEffect(()=>{l.setErrorTypes(a||[])},[a,l]),C.useEffect(()=>(r.current&&l.mount(r.current),()=>{l.unmount()}),[l]),C.createElement("div",{className:"tsqd-parent-container",ref:r})}var pw=process.env.NODE_ENV!=="development"?function(){return null}:hw;const mw=({showDevTools:e=!0,children:t})=>{const n=new W0({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e4}}});return v.jsxs(Z0,{client:n,children:[t,e&&v.jsx(pw,{initialIsOpen:!1})]})};const ll="joinCommunityButton",Zc=({isMember:e=!1,isShort:t=!1,functions:{join:n,leave:r}={join:()=>{},leave:()=>{}}})=>{const i=te(),s=C.useContext(dn),o=s&&typeof s.id=="string",[a,l]=C.useState(e),[u,c]=C.useState(e?"joined":"notJoined");C.useEffect(()=>{u==="joining"?c("joined"):u==="leaving"&&c("notJoined")},[a]);const h={},m={};return a&&u!=="leaving"&&(h["data-hover-text"]=i.formatMessage({id:`${ll}_leave`}),h["aria-label"]=i.formatMessage({id:`${ll}_member_aria`}),m["aria-hidden"]="true"),v.jsx(Oe,{variant:a?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:a&&u!=="leaving"?{icon:"tick",position:"left"}:!1,onClick:async f=>{o&&(f.currentTarget.blur(),a?(c("leaving"),typeof r=="function"&&await r()):(c("joining"),typeof n=="function"&&await n()),l(!a))},className:L("join-community-button",u,{active:u==="joining"}),disabled:!o,...h,children:v.jsx("span",{className:"text",...m,children:i.formatMessage({id:`${ll}${["joining","leaving"].includes(u)?`_${u}`:a?"_member":t?"_short":""}`})})})};const cl="communityDetails_",gw=({isMember:e=!1,slug:t,members:{number:n,data:r}={number:void 0,data:[]},className:i="",...s})=>{const o=te(),a=n||(r==null?void 0:r.length)||0;return v.jsxs("div",{className:L("community-details",i),children:[v.jsx(go,{}),v.jsxs("div",{className:"member-details",children:[v.jsxs("div",{className:"top",children:[v.jsxs("h3",{children:[o.formatMessage({id:`${cl}members`}),v.jsx("span",{className:"count",children:a})]}),v.jsx("p",{className:"text-small",children:v.jsx("a",{href:`/communities/${t}/members`,children:o.formatMessage({id:`${cl}viewAll`})})})]}),v.jsx(Sh,{contributors:{total:n,data:r!=null&&r.length?r:[{},{},{},{},{}]},styling:{size:"medium",showGap:!0,showPlaceholders:a===0},cutoff:5})]}),v.jsx(Zc,{isMember:e,...s}),e&&v.jsx(Oe,{variant:"primary",icon:{icon:"plus"},styling:{fullWidth:!0},children:o.formatMessage({id:`${cl}invite`})})]})};const vw=({breadcrumbs:e,cutoff:t=20,className:n=""})=>{const r=te();return v.jsxs(v.Fragment,{children:[v.jsx(ze,{element:"p",children:r.formatMessage({id:"breadcrumbs_label"})}),v.jsx("ul",{className:L("breadcrumbs text-small",n),children:e.map(({text:i,href:s,current:o=!1},a)=>v.jsxs("li",{children:[o&&v.jsx(ze,{element:"span",children:r.formatMessage({id:"breadcrumbs_currentPage"})}),v.jsx(vs,{href:o?void 0:s,children:Ic(i,t)})]},`${window.btoa(i)}_${a}`))})]})};const _w=({options:e,allOption:t=!1,allowMultiple:n=!0,onChange:r=()=>{},className:i=""})=>{const s=te(),o=t?[{id:"all",text:typeof t!="boolean"&&t.text||s.formatMessage({id:"filters_all"})},...e]:e,[a,l]=C.useState(t?["all"]:[]),u=(c,h)=>{let m=[];a.includes(c)?m=a.filter(f=>f!==c):c==="all"?m=["all"]:n?m=[...a.filter(f=>f!=="all"),c]:m=[c],l(f=>(r&&typeof r=="function"&&r({current:m,previous:f}),m)),h&&typeof h=="function"&&h()};return v.jsx("ul",{className:L("filters",i),children:o.map(({id:c,text:h,disabled:m=!1,callback:f=()=>{}})=>{let p={};return m&&(p={disabled:!0,"aria-label":s.formatMessage({id:"filters_disabled"},{name:h})}),v.jsx("li",{children:v.jsx("button",{className:L(c,{selected:a.includes(c)}),onClick:g=>{g.preventDefault(),g.stopPropagation(),u(c,f)},...p,children:h})},c)})})},yw=(e,t)=>{const n=String(e);if(!t||!t.length)return`/${n}`;let r="";return t.forEach(({url:i,position:s})=>{s==="before-lang"?r+=`/${i}`:(r.includes(`/${n}/`)||(r+=`/${n}`),r+=`/${i}`)}),r.includes(`/${n}/`)||(r+=`/${n}`),r};const ul={en:"English",es:"Español",fr:"Français",pt:"Português"},Js="languageSwitcher_",bw=({currentLanguage:e,isOriginalLanguage:t=!1,isHumanTranslation:n=!1,translations:r,onChange:i=()=>{},urlParts:s,variant:o="default",label:a,className:l=""})=>{const u=te(),[c,h]=C.useState(e);if(C.useEffect(()=>{e!==c&&h(e)},[e]),!r||!Object.values(r).some(g=>g&&g.post_name))return null;const f=Object.keys(r),p=c!==e;return v.jsxs("div",{className:L("language-switcher text-small",o,l),children:[v.jsxs("nav",{children:[o!=="short"&&v.jsx("p",{children:a||u.formatMessage({id:`${Js}label`})}),v.jsx("ul",{children:f.map(g=>{if(!ul[g])return null;let x={className:g};return c===g?x["aria-label"]=u.formatMessage({id:`${Js}selected`},{language:ul[g]}):x={...x,href:yw(g,s),onClick:S=>{S.preventDefault(),S.stopPropagation(),h(g),i(g)}},v.jsx("li",{children:v.jsx(vs,{...x,fallbackElement:"span",children:ul[g]})},g)})}),o!=="short"&&!p&&v.jsx("p",{children:u.formatMessage({id:`${Js}translation_${t?"original":n?"human":"machine"}`})})]}),o!=="short"&&!p&&!t&&!n&&v.jsx("small",{children:u.formatMessage({id:`${Js}disclaimer`},{email:Ir.support,link:g=>{const x=`mailto:${g}`;return v.jsx("a",{href:x,children:g})}})})]})};const dl=Fl({locale:"en",messages:Tc}),Sp=({page:e=1,length:t=0,limit:n=10,loadNextPage:r=()=>{},icon:i=!1,messages:s={button:dl.formatMessage({id:"loadMore_button"}),endOfFeed:dl.formatMessage({id:"loadMore_endOfFeed"}),error:dl.formatMessage({id:"loadMore_error"})},className:o="",gtmContext:a="LoadMore"})=>{const[l,u]=C.useState(!1),[c,h]=C.useState(!1);if(t<=0||t<n*e)return null;const m=async f=>{try{await r(f)}catch(p){p instanceof Error&&p.message&&p.message.includes("Cannot read items")?h(!0):u(!0)}};return v.jsxs("footer",{className:L("load-more",o),children:[l&&v.jsx("p",{className:"error",children:s.error}),c?v.jsx("p",{children:s.endOfFeed}):v.jsx(Oe,{variant:"secondary",icon:i,onClick:m,"data-gtm-event-context":a,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:s.button})]})};let Ks=!1;const Ep=({element:e="div",id:t="more-menu",options:n,className:r=""})=>{const i=te(),s=C.useRef(null),[o,a]=C.useState(!1),l=u=>{s.current&&u.target instanceof HTMLElement&&!s.current.contains(u.target)&&a(!1)};return C.useEffect(()=>(document.addEventListener("click",l,!0),()=>{document.removeEventListener("click",l,!0)})),C.createElement(e,{ref:s,className:L("more-menu text-medium",r),children:v.jsxs(v.Fragment,{children:[v.jsx(Oe,{variant:"tertiary",size:"medium",icon:{icon:"ellipsis"},onClick:()=>a(!o),"aria-haspopup":"true","aria-expanded":o,"aria-controls":t,screenreaderText:i.formatMessage({id:"moreMenu"})}),v.jsx("ul",{id:t,hidden:!o,children:n.map(({href:u,onClick:c,text:h,icon:m,...f},p)=>{const g={...f,onClick:x=>{a(!1),typeof c=="function"&&c(x)},onFocus:()=>{Ks&&(clearTimeout(Ks),Ks=!1)},onBlur:()=>{Ks=setTimeout(()=>{a(!1)},100)}};return u&&(g.href=u),v.jsx("li",{children:v.jsx(Oe,{variant:"tertiary",size:"medium",icon:m?{icon:m,position:"left"}:!1,...g,children:h})},`${window.btoa(h)}_${p}`)})})]})})};const eu=({variant:e="default",version:t="default",className:n="",...r})=>v.jsx("p",{className:"logo-wrapper",children:v.jsx("a",{href:"/home/",className:L("logo",e,t,n),...r,children:v.jsx(ze,{children:v.jsx(In,{id:"apolitical"})})})});const ww={"2-1":901},xw=({layout:e="2-1",hideOnMobile:t=!1,className:n="",children:r})=>{const i=ms(!0);let s=r;return C.Children.count(r)===1&&(s=C.Children.toArray(r)[0],s.props&&(s=s.props.children)),v.jsx("section",{className:L("columns",`layout-${e}`,n),children:C.Children.map(s,(o,a)=>t!==!1&&a===t&&i&&i<ww[e]?null:o)})};/*!
65
+ * cookie
66
+ * Copyright(c) 2012-2014 Roman Shtylman
67
+ * Copyright(c) 2015 Douglas Christopher Wilson
68
+ * MIT Licensed
69
+ */var kp=Ew,Ad=kw,Sw=Object.prototype.toString,Zs=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function Ew(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var n={},r=t||{},i=r.decode||Tw,s=0;s<e.length;){var o=e.indexOf("=",s);if(o===-1)break;var a=e.indexOf(";",s);if(a===-1)a=e.length;else if(a<o){s=e.lastIndexOf(";",o-1)+1;continue}var l=e.slice(s,o).trim();if(n[l]===void 0){var u=e.slice(o+1,a).trim();u.charCodeAt(0)===34&&(u=u.slice(1,-1)),n[l]=Aw(u,i)}s=a+1}return n}function kw(e,t,n){var r=n||{},i=r.encode||Cw;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!Zs.test(e))throw new TypeError("argument name is invalid");var s=i(t);if(s&&!Zs.test(s))throw new TypeError("argument val is invalid");var o=e+"="+s;if(r.maxAge!=null){var a=r.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+Math.floor(a)}if(r.domain){if(!Zs.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain="+r.domain}if(r.path){if(!Zs.test(r.path))throw new TypeError("option path is invalid");o+="; Path="+r.path}if(r.expires){var l=r.expires;if(!Pw(l)||isNaN(l.valueOf()))throw new TypeError("option expires is invalid");o+="; Expires="+l.toUTCString()}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.priority){var u=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(u){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; 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:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o}function Tw(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function Cw(e){return encodeURIComponent(e)}function Pw(e){return Sw.call(e)==="[object Date]"||e instanceof Date}function Aw(e,t){try{return t(e)}catch{return e}}function Ow(){return typeof document=="object"&&typeof document.cookie=="string"}function Mw(e){return typeof e=="string"?kp(e):typeof e=="object"&&e!==null?e:{}}function fl(e,t={}){const n=Iw(e);if(!t.doNotParse)try{return JSON.parse(n)}catch{}return e}function Iw(e){return e&&e[0]==="j"&&e[1]===":"?e.substr(2):e}class Tp{constructor(t,n={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const i=this.cookies;this.cookies=kp(document.cookie),this._checkChanges(i)};const r=typeof document>"u"?"":document.cookie;this.cookies=Mw(t||r),this.defaultSetOptions=n,this.HAS_DOCUMENT_COOKIE=Ow()}_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:fl(t[r])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,n={}){return n.doNotUpdate||this.update(),fl(this.cookies[t],n)}getAll(t={}){t.doNotUpdate||this.update();const n={};for(let r in this.cookies)n[r]=fl(this.cookies[r],t);return n}set(t,n,r){r?r=Object.assign(Object.assign({},this.defaultSetOptions),r):r=this.defaultSetOptions;const i=typeof n=="string"?n:JSON.stringify(n);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:i}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=Ad(t,i,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=Ad(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 Cp=Q.createContext(new Tp),{Provider:$w,Consumer:F1}=Cp,Fw=Cp;class Rw extends Q.Component{constructor(t){super(t),t.cookies?this.cookies=t.cookies:this.cookies=new Tp(void 0,t.defaultSetOptions)}render(){return Q.createElement($w,{value:this.cookies},this.props.children)}}function jw(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function Nw(e){const t=C.useContext(Fw);if(!t)throw new Error("Missing <CookiesProvider>");const[n,r]=C.useState(()=>t.getAll());jw()&&C.useLayoutEffect(()=>{function a(){const l=t.getAll({doNotUpdate:!0});Lw(e||null,l,n)&&r(l)}return t.addChangeListener(a),()=>{t.removeChangeListener(a)}},[t,n]);const i=C.useMemo(()=>t.set.bind(t),[t]),s=C.useMemo(()=>t.remove.bind(t),[t]),o=C.useMemo(()=>t.update.bind(t),[t]);return[n,i,s,o]}function Lw(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}const hl="cookieBanner_",pl=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],ml=new Date(Date.now()+12*30*24*60*60*1e3),Pp=()=>{const e=te(),[t,n,r]=Nw(pl),[i,s]=C.useState(!t["apol-cookie-banner"]),o=()=>{pl.forEach(c=>{n(c,!0,{path:"/",expires:ml,domain:c==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),s(!1),window.location.reload()},a=()=>{n("apol-cookie-banner",!0,{path:"/",expires:ml}),pl.forEach(c=>{if(c==="apol-cookie-banner"){n(c,!0,{path:"/",expires:ml});return}r(c)}),s(!1)};if(!i)return null;const l=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:a,gtmType:"reject-all"},{id:"accept",onClick:o,gtmType:"accepted-all"}],u=[];return l.forEach(c=>{u.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:`${hl}buttons_${c.id}`})})}),v.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[v.jsx("h6",{children:e.formatMessage({id:`${hl}title`})}),v.jsx("p",{children:e.formatMessage({id:`${hl}text`})}),v.jsx(gs,{buttons:u})]})},an={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:Ir["data-protection"].default,gtmType:"email-dpo-link"},euDataProtection:{email:Ir["data-protection"].eu,gtmType:"email-eu-dpo-link"}}},contact:{text:{order:["correspondence","registered","berlin","support","business"],correspondence:{address:!0},registered:{address:!0},berlin:{address:!0},support:{email:Ir.support,gtmType:"concierge-email-click"},business:{email:Ir.general,gtmType:"hello-email-click"}}},social:{order:["linkedin","twitter","facebook"],linkedin:{href:"https://www.linkedin.com/company/apolitical"},twitter:{href:"https://twitter.com/apoliticalco"},facebook:{href:"https://www.facebook.com/apoliticalco"}}};const Nr="footer_",Ro="SiteFooter",Od=({group:e})=>{const t=an[e].order||[];let n=!1;return"text"in an[e]&&(n=an[e].text),v.jsxs(C.Fragment,{children:[v.jsx("p",{className:"pre-title",children:v.jsx(In,{id:`${Nr}${e}`})}),Array.isArray(t)&&t.length>0&&v.jsx("ul",{className:"text-medium",children:t.map(r=>{if(["order","child","text"].includes(r))return null;const{href:i,gtmType:s}=an[e][r],o={};return["legal"].includes(e)&&(o.target="_blank",o.rel="noopener"),v.jsx("li",{children:v.jsx("a",{href:i,className:"gtm-trackable","data-gtm-event-context":Ro,"data-gtm-event-type":s,...o,children:v.jsx(In,{id:`${Nr}${e}_${r}`})})},`${e}_${r}`)})}),typeof n!="boolean"&&"order"in n&&Array.isArray(n.order)&&v.jsx("dl",{className:"text-medium",children:n.order.map(r=>v.jsxs(C.Fragment,{children:[v.jsx("dt",{children:v.jsx(In,{id:`${Nr}${e}_${r}`})}),v.jsxs("dd",{children:[typeof n!="boolean"&&n[r].address&&v.jsx("address",{children:v.jsx(In,{id:`${Nr}${e}_${r}_address`,values:{br:v.jsx("br",{})}})}),typeof n!="boolean"&&n[r].email&&v.jsx("a",{href:`mailto:${n[r].email}`,className:"gtm-trackable","data-gtm-event-context":Ro,"data-gtm-event-type":n[r].gtmType,children:n[r].email})]})]},`dl-${e}-${r}`))})]},e)},tu=()=>v.jsx("div",{id:"footer",children:v.jsxs("div",{className:"wrapper",children:[v.jsx(xc,{element:"hr"}),v.jsx(eu,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":Ro,"data-gtm-event-type":"logo-homepage-link"}),v.jsx("footer",{children:["platform","community","company","contact"].map(e=>v.jsxs("div",{className:"group",children:[v.jsx(Od,{group:e}),Object.keys(an[e]).includes("child")&&v.jsx(Od,{group:an[e].child})]},e))}),v.jsx("hr",{}),v.jsxs("div",{className:"sub-footer",children:[v.jsx("ul",{children:Array.isArray(an.social.order)&&an.social.order.map(e=>{const t=an.social[e];return v.jsx("li",{className:e,children:v.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":Ro,"data-gtm-event-type":"social-click",children:v.jsx("span",{className:"hidden",children:v.jsx(In,{id:`${Nr}social_${e}`})})})},e)})}),v.jsx("small",{children:v.jsx(In,{id:`${Nr}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});const eo="emailHelperTextBox_",Dw=({type:e,email:t,redirectPath:n,resendVerificationCode:r})=>{const i=te(),[s,o]=C.useState({path:`${eo}default`,type:"default",link:{},mail:{},error:""}),[a,l]=C.useState(!1),u=C.useCallback(f=>{f.preventDefault(),f.stopPropagation();const p=g=>{o({path:`${eo}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:x=>u(x),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:g})};if(typeof r!="function"){p(i.formatMessage({id:`${eo}error_noFunction`}));return}l(!0),r(t).then(()=>{localStorage.setItem("email",t),window.location.href=n||"/signup/verify-email"}).catch(g=>{p(g.message)}).finally(()=>{l(!1)})},[t,n,r]);C.useEffect(()=>{let f=eo,p="default",g={},x={};switch(e){case"gov":f+="autoApproved",p="success";break;case"nonGov":f+="unrecognisedEmail",p="error",g={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":f+="pendingApproval",p="error",x={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":f+="emailUnverified",p="error",g={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:S=>u(S),"data-testid":"send-verify-email-click"};break;case"exists":f+="emailAlreadyExists",p="error",g={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},x={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:f+="default",g={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}o({...s,path:f,type:p,link:g,mail:x})},[e]);const c={};return["link","mail"].forEach(f=>{c[f]=Object.keys(s[f]).length?p=>v.jsx("a",{...s[f],children:p}):p=>p}),v.jsx(gh,{type:s.type,heading:a?!1:i.formatMessage({id:`${s.path}_title`}),children:a?v.jsxs(v.Fragment,{children:[v.jsx(Vt,{element:"span"}),v.jsx(Vt,{element:"span"})]}):i.formatMessage({id:`${s.path}_text`},{...c,strong:f=>v.jsx("strong",{children:f}),em:f=>v.jsx("em",{children:f}),br:v.jsxs(v.Fragment,{children:[v.jsx("br",{}),v.jsx("br",{})]}),error:s.error})})};const to="passwordRules_",Ap="isMoreThanEightCharacters",Op="includesNumberAndSymbol",Mp="includesLowerAndUppercase",Bw={[Ap]:"8Characters",[Op]:"numberSymbol",[Mp]:"lowercaseUppercase"},Hw=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const n=te();return v.jsxs("aside",{className:L("password-rules",t),children:[v.jsx("small",{children:n.formatMessage({id:`${to}intro`})}),v.jsx("ul",{children:[Ap,Op,Mp].map(r=>v.jsxs("li",{className:L({matches:e[r]}),children:[v.jsxs(ze,{children:[n.formatMessage({id:`${to}rule_label`})," "]}),v.jsx("span",{children:n.formatMessage({id:`${to}rule_${Bw[r]}`})}),!e[r]&&v.jsxs(ze,{element:"strong",children:[" "," ",n.formatMessage({id:`${to}notMet`})]})]},`rule-${r}`))})]})},Uw=C.memo(Hw);const Gw=({text:e={},topRating:t=5,functions:{createRating:n=()=>null,updateRating:r=()=>{},reportError:i=()=>{}},className:s="",hasLoaded:o=!1})=>{const a=te(),[l,u]=C.useState({setUp:!1,id:null,rating:null,disabled:!0}),c=async()=>{try{const S=await n();u(k=>({...k,setUp:!0,id:S&&S.id,disabled:!1}))}catch(S){u(k=>({...k,setUp:!0,disabled:!0})),i(S)}};if(C.useEffect(()=>{o&&!l.setUp&&c()},[o]),!o)return v.jsx(Vt,{className:"rating-placeholder"});const{id:h,rating:m,disabled:f}=l,p="ratings_",g={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},x=async S=>{if(!(!h||f))try{u(k=>({...k,rating:S,disabled:!0})),await r({id:h,value:S})}catch(k){u(T=>({...T,rating:null})),i(k)}finally{u(k=>({...k,disabled:!1}))}};return v.jsxs("div",{className:L("rating",s),children:[v.jsx("span",{className:"label",children:g[m?"success":"text"]}),v.jsx("ol",{children:Array.from(new Array(t).keys()).map(S=>{const k=S+1;return v.jsx("li",{className:L({selected:m&&k<=m}),children:v.jsx(Oe,{variant:"tertiary",size:"small",icon:{icon:`star${!m||k>m?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${a.formatMessage({id:`${p}stars`},{number:k,total:t})}${k===1||k===t?` - ${g[k===1?"low":"high"]}`:""}`,onClick:T=>{T.preventDefault(),T.stopPropagation(),x(k)},disabled:f})},`rating-${k}`)})})]})};const Ip=({id:e="search",className:t="",handleToggle:n=!1,defaultValue:r="",gtmContext:i="search-bar",gtmEvent:s="form-submission"})=>{const{searchIsOpen:o=!0,isDesktopVersion:a=!1}=n||{},l=te(),u=C.useRef(null);lr(()=>{!n||a||!o||u.current&&u.current.focus()},[o]);const c=h=>{h.preventDefault(),h.stopPropagation(),!(!u.current||!u.current.value||u.current.value.length<1)&&(window.location.href=`/search?search=${encodeURIComponent(u.current.value)}`)};return v.jsx("form",{onSubmit:c,className:L("search-form gtm-trackable",t),"data-gtm-event-context":i,"data-gtm-event-type":s,children:v.jsx("fieldset",{id:`${e}-form`,hidden:n?!o:!1,role:"search",children:v.jsxs("p",{children:[v.jsx(ze,{element:"label",htmlFor:e,children:l.formatMessage({id:"search_label"})}),v.jsx("input",{ref:u,type:"search",id:e,name:e,defaultValue:r,placeholder:l.formatMessage({id:"search_placeholder"}),onKeyDown:h=>{h.key==="Enter"&&c(h)}}),v.jsx("button",{className:"clear",onClick:h=>{h.preventDefault(),h.stopPropagation(),u.current&&u.current.value&&(u.current.value="")},children:v.jsx(ze,{children:l.formatMessage({id:"search_clear"})})}),v.jsx("button",{className:"search",onClick:c,children:v.jsx(ze,{children:l.formatMessage({id:"search_cta"})})})]})})})};var zw="Expected a function",$p="__lodash_hash_undefined__",Fp=1/0,qw="[object Function]",Vw="[object GeneratorFunction]",Qw="[object Symbol]",Ww=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xw=/^\w*$/,Yw=/^\./,Jw=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kw=/[\\^$.*+?()[\]{}|]/g,Zw=/\\(\\)?/g,ex=/^\[object .+?Constructor\]$/,tx=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,nx=typeof self=="object"&&self&&self.Object===Object&&self,nu=tx||nx||Function("return this")();function rx(e,t){return e==null?void 0:e[t]}function ix(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var sx=Array.prototype,ox=Function.prototype,Rp=Object.prototype,gl=nu["__core-js_shared__"],Md=function(){var e=/[^.]+$/.exec(gl&&gl.keys&&gl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),jp=ox.toString,ru=Rp.hasOwnProperty,Np=Rp.toString,ax=RegExp("^"+jp.call(ru).replace(Kw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Id=nu.Symbol,lx=sx.splice,cx=Lp(nu,"Map"),Ji=Lp(Object,"create"),$d=Id?Id.prototype:void 0,Fd=$d?$d.toString:void 0;function mr(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 ux(){this.__data__=Ji?Ji(null):{}}function dx(e){return this.has(e)&&delete this.__data__[e]}function fx(e){var t=this.__data__;if(Ji){var n=t[e];return n===$p?void 0:n}return ru.call(t,e)?t[e]:void 0}function hx(e){var t=this.__data__;return Ji?t[e]!==void 0:ru.call(t,e)}function px(e,t){var n=this.__data__;return n[e]=Ji&&t===void 0?$p:t,this}mr.prototype.clear=ux;mr.prototype.delete=dx;mr.prototype.get=fx;mr.prototype.has=hx;mr.prototype.set=px;function vi(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 mx(){this.__data__=[]}function gx(e){var t=this.__data__,n=Yo(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():lx.call(t,n,1),!0}function vx(e){var t=this.__data__,n=Yo(t,e);return n<0?void 0:t[n][1]}function _x(e){return Yo(this.__data__,e)>-1}function yx(e,t){var n=this.__data__,r=Yo(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}vi.prototype.clear=mx;vi.prototype.delete=gx;vi.prototype.get=vx;vi.prototype.has=_x;vi.prototype.set=yx;function _r(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 bx(){this.__data__={hash:new mr,map:new(cx||vi),string:new mr}}function wx(e){return Jo(this,e).delete(e)}function xx(e){return Jo(this,e).get(e)}function Sx(e){return Jo(this,e).has(e)}function Ex(e,t){return Jo(this,e).set(e,t),this}_r.prototype.clear=bx;_r.prototype.delete=wx;_r.prototype.get=xx;_r.prototype.has=Sx;_r.prototype.set=Ex;function Yo(e,t){for(var n=e.length;n--;)if(Rx(e[n][0],t))return n;return-1}function kx(e,t){t=Ax(t,e)?[t]:Px(t);for(var n=0,r=t.length;e!=null&&n<r;)e=e[$x(t[n++])];return n&&n==r?e:void 0}function Tx(e){if(!Bp(e)||Mx(e))return!1;var t=jx(e)||ix(e)?ax:ex;return t.test(Fx(e))}function Cx(e){if(typeof e=="string")return e;if(su(e))return Fd?Fd.call(e):"";var t=e+"";return t=="0"&&1/e==-Fp?"-0":t}function Px(e){return Dp(e)?e:Ix(e)}function Jo(e,t){var n=e.__data__;return Ox(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Lp(e,t){var n=rx(e,t);return Tx(n)?n:void 0}function Ax(e,t){if(Dp(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||su(e)?!0:Xw.test(e)||!Ww.test(e)||t!=null&&e in Object(t)}function Ox(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Mx(e){return!!Md&&Md in e}var Ix=iu(function(e){e=Lx(e);var t=[];return Yw.test(e)&&t.push(""),e.replace(Jw,function(n,r,i,s){t.push(i?s.replace(Zw,"$1"):r||n)}),t});function $x(e){if(typeof e=="string"||su(e))return e;var t=e+"";return t=="0"&&1/e==-Fp?"-0":t}function Fx(e){if(e!=null){try{return jp.call(e)}catch{}try{return e+""}catch{}}return""}function iu(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(zw);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=e.apply(this,r);return n.cache=s.set(i,o),o};return n.cache=new(iu.Cache||_r),n}iu.Cache=_r;function Rx(e,t){return e===t||e!==e&&t!==t}var Dp=Array.isArray;function jx(e){var t=Bp(e)?Np.call(e):"";return t==qw||t==Vw}function Bp(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Nx(e){return!!e&&typeof e=="object"}function su(e){return typeof e=="symbol"||Nx(e)&&Np.call(e)==Qw}function Lx(e){return e==null?"":Cx(e)}function Dx(e,t,n){var r=e==null?void 0:kx(e,t);return r===void 0?n:r}var Bx=Dx;const Hp=fi(Bx),_e={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const n={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},r=s=>{const o=`logged${e?"In":"Out"}`;return t>=n[s][o]};let i={};return["navigation","search"].forEach(s=>{i[s]=r(s)}),i},shouldChangeHeaderIsVisible:(e,t,n)=>{Object.values(t).filter(i=>i===!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 i=Date.now();if(!t&&_e.handlerCalled[e]&&i-_e.handlerCalled[e]<500)return;_e.handlerCalled[e]=i;let s=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(n).forEach(o=>{o===e||n[o]===!1||s.push({type:`menus.${o}`,value:!1})}),r(s)},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 i=Hp(e[r],t);if(!(typeof i>"u")&&(!n||i[t]&&i[t].includes(n)||i.value&&i.value.includes(n)||i.toString().includes(n)))return e[r]}return e[0].children?_e.findFirstChild(e[0].children,t,n):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:n,focusElements:r,dispatch:i})=>{if(!t.current||!t.current.children)return;const s=n?"desktop":"default";if(r[e][s]){r[e][s].focus();return}let o,a;switch(e){case"navigation":if(n){const l=_e.findFirstChild(t.current.children,"attributes.aria-controls","navigation");o=_e.findFirstChild(l.children,"href")}else o=_e.findFirstChild(t.current.children,"href");o||(o=t.current);break;case"account":if(a=_e.findFirstChild(t.current.children,"className","account"),!a||!a.children)return;o=_e.findFirstChild(a.children,"href");break;default:return}o&&(i([{type:`focusElements.${e}.${s}`,value:o}]),o.focus())},events:{onClick:(e,{id:t,callback:n,isOpen:r})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(_e.timeouts[t]),n(t,!r))},onFocus:({id:e})=>{clearTimeout(_e.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(_e.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{_e.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},Ki={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"}}}},jo=({id:e,isLoggedIn:t=!1,isDesktopVersion:n=!1,menus:r={},callback:i=()=>{},doTrack:s=null})=>{const o=te(),a=Hp(Ki,e);if(!a||a.onlyShow&&(a.onlyShow==="logged-in"&&!t||a.onlyShow==="logged-out"&&t))return null;const l="doTrack"in a,u=s===null?l?a.doTrack:!0:s,c=e.includes("buttons.");let h=`header_${e.replaceAll(".","_")}`;a.hasVariantText&&(h+=`_logged${t?"In":"Out"}`);let m=!1;if(a.href){let k=a.gtmType||`${e}-click`;if(k.includes(".")){const T=k.split("."),P=T[T.length-2];k=`${P==="topics"?`${P}-`:""}${T[T.length-1]}`}m={href:a.href,role:"menuitem"},u&&(m={...m,className:"gtm-trackable","data-gtm-event-type":k,"data-gtm-event-context":"HeaderButtons"}),c&&(m={...m,variant:"secondary",size:{mobile:"small",881:"large"},...a.props||{}})}const f=a.order&&a.order[0]&&a[a.order[0]],p=f&&a[a.order[0]].order,g=m&&window.location.pathname===a.href;let x={},S={};if(f){const k=a.menuId||e,T={onClick:P=>_e.events.onClick(P,{id:k,callback:i,isOpen:r[k]}),onFocus:()=>_e.events.onFocus({id:k}),onBlur:()=>_e.events.onBlur({id:k,callback:i}),onMouseLeave:()=>_e.events.onBlur({id:k,callback:i}),onMouseEnter:()=>_e.events.onMouseEnter({id:k,callback:i})};n&&(p&&(x={...T,onKeyPress:P=>{P.key==="Enter"&&_e.events.onClick(P,{id:k,callback:i,isOpen:r[k]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":r[k],"aria-controls":k}),S={hidden:k in r?!r[k]:!0}),p||(S={...S,...T})}return v.jsxs("li",{className:L({[a.className]:a.className,"has-submenu":f,parent:p,active:g}),role:"none",...x,children:[m?C.createElement(c?Oe:"a",m,o.formatMessage({id:h})):o.formatMessage({id:h}),a.order&&v.jsx("ul",{...S,children:a.order.map(k=>{if(!a[k])return null;const T={isLoggedIn:t,isDesktopVersion:n,menus:r,callback:i,doTrack:l?u:null};return a[k].order?v.jsxs("li",{className:L({[a[k].className]:a[k].className}),children:[o.formatMessage({id:`${h}_${k}`}),v.jsx("ul",{children:a[k].order.map(P=>v.jsx(jo,{id:`${e}.${k}.${P}`,...T},P))})]},k):v.jsx(jo,{id:`${e}.${k}`,...T},k)})})]},e)};const Hx={height:67,height_desktop:83},ou=()=>{const e=te(),t=C.useContext(dn),n=ms(!0,!0),r=t&&typeof t.id=="string",i=C.useMemo(()=>_e.getIsDesktopVersion(r,n),[r,n]),[s,o]=C.useReducer(rg,{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:u}=s;nf({scrollPosition:Hx[`height${i.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!i&&l.navigation||_e.shouldChangeHeaderIsVisible(!0,l,o)},scrollDown:()=>{!i&&l.navigation||_e.shouldChangeHeaderIsVisible(!1,l,o)}}});const c=(m,f)=>{_e.handleMenus({id:m,value:f,menus:l,dispatch:o})},h=C.useRef(null);return lr(()=>{l.navigation&&_e.autoFocus({menu:"navigation",navigationRef:h,isDesktopVersion:i.navigation,focusElements:u,dispatch:o})},[l.navigation]),lr(()=>{l.account&&_e.autoFocus({menu:"account",navigationRef:h,isDesktopVersion:i.navigation,focusElements:u,dispatch:o})},[l.account]),t&&t.isLoading?null:v.jsxs(v.Fragment,{children:[v.jsxs("nav",{id:"header",className:L({"logged-in":r,"logged-out":!r,visible:a}),children:[v.jsx(ze,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),v.jsx(eu,{}),!i.navigation&&v.jsx("button",{className:"menu-button gtm-trackable",onClick:m=>{m.preventDefault(),m.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:v.jsx(ze,{children:e.formatMessage({id:`header_menu_${l.navigation?"hide":"show"}`})})}),v.jsx("ul",{ref:h,id:"navigation",hidden:i.navigation||l.account?!1:!l.navigation,role:"menu","data-showing":!i.navigation&&l.account?"account":"default",children:Ki.order.map(m=>v.jsx(jo,{id:m,isLoggedIn:r,isDesktopVersion:i.navigation,menus:{navigation:l.navigation,account:l.account},callback:c},m))}),!i.search&&v.jsx("button",{className:"search toggle-search-button",onClick:m=>{m.preventDefault(),m.stopPropagation(),c("search",!l.search)},"aria-haspopup":"true","aria-expanded":l.search,"aria-controls":"search-form",children:v.jsx(ze,{children:e.formatMessage({id:`header_search_${l.search?"hide":"show"}`})})}),v.jsx(Ip,{id:"global-search",handleToggle:{searchIsOpen:l.search,isDesktopVersion:i.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),r?v.jsxs("button",{className:"account-button",onClick:m=>_e.events.onClick(m,{id:"account",callback:c,isOpen:l.account}),onMouseEnter:()=>_e.events.onMouseEnter({id:"account",callback:c}),onMouseLeave:()=>_e.events.onBlur({id:"account",callback:c}),"aria-haspopup":"true","aria-expanded":l.account,"aria-controls":"navigation",children:[v.jsx(ze,{children:e.formatMessage({id:`header_account_${l.account?"hide":"show"}`})}),v.jsx(zo,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):v.jsx("ul",{className:"sign-in-buttons",children:Ki.buttons.order.map(m=>v.jsx(jo,{id:`buttons.${m}`},m))})]}),v.jsx("hr",{id:"content-of-page"}),v.jsx("div",{className:L("overlay",{open:l.navigation||l.account||!i.search&&l.search})})]})},Ux=C.createContext(null),vl={didCatch:!1,error:null};class Gx extends C.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=vl}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:s,reason:"imperative-api"}),this.setState(vl)}}componentDidCatch(t,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;if(r&&n.error!==null&&zx(t.resetKeys,i)){var s,o;(s=(o=this.props).onReset)===null||s===void 0||s.call(o,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(vl)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:s,error:o}=this.state;let a=t;if(s){const l={error:o,resetErrorBoundary:this.resetErrorBoundary};if(C.isValidElement(i))a=i;else if(typeof n=="function")a=n(l);else if(r)a=C.createElement(r,l);else throw o}return C.createElement(Ux.Provider,{value:{didCatch:s,error:o,resetErrorBoundary:this.resetErrorBoundary}},a)}}function zx(){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 qx=()=>{const e=te();return v.jsxs(v.Fragment,{children:[v.jsx(ou,{}),v.jsx("div",{className:"content",children:v.jsx(bs,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),v.jsx(tu,{})]})},Vx=({children:e,reportError:t,showFooter:n=!0,background:r="default",className:i="",locale:s="en"})=>{const o=ef();C.useEffect(()=>{window.scrollTo(0,0)},[o]);const a=pf(e,{locale:s});return v.jsx(Gx,{onError:t,fallback:v.jsx(qx,{}),children:v.jsx(C.Suspense,{fallback:v.jsx(wh,{layout:"overview-page"}),children:v.jsx("div",{id:"wrapper",className:L(i,{[r]:r!=="default"}),children:v.jsxs(Rw,{children:[v.jsx(ou,{}),v.jsx("div",{className:"content",children:a}),n&&v.jsx(tu,{}),v.jsx(Pp,{})]})})})})},Rd={default:"tags_",headerTopics:"header_topics_topics_"},_l={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"},Qx={getTagDetails:e=>{if(e.includes("topic_")){if(e=_l.topic[e.replace("topic_","")],e){const t=Ki.topics.topics[e].href;return t?{id:e,href:t,text:`${Rd.headerTopics}${e}`}:null}return null}return _l[e]?(e=_l[e],{id:e,text:`${Rd.default}${e}`}):null}};const Wx=({tags:e=[],color:t="default",forceOneLine:n=!1,canHaveLinks:r=!0,className:i="",gtmType:s="tag-click",gtmContext:o="tags"})=>{const a=te();if(!e||e.length<1)return null;const l=[];return e.forEach(u=>{if(!u)return;const c=Qx.getTagDetails(u);c&&l.push(c)}),l.length<1?null:v.jsx("ul",{className:L("tags text-small",t,i,{"one-line":n}),children:l.map(u=>{const c=a.formatMessage({id:u.text});return v.jsx("li",{children:u.href&&r?v.jsx("a",{href:u.href,className:"gtm-trackable","data-gtm-event-type":s,"data-gtm-event-context":o,children:c}):c},u.id)})})};const Xx=({members:{total:e,data:t=[]},pagination:n,gtmContext:r="member",gtmType:i="member-click",className:s=""})=>{const o=te();return t.length===0?null:(e||(e=t.length),v.jsxs("div",{className:L("members-list",s),children:[v.jsxs("h1",{children:[o.formatMessage({id:"membersList"}),v.jsx("span",{className:"count",children:e})]}),v.jsx("ul",{children:t.map((a,l)=>v.jsxs("li",{children:[v.jsx(qo,{member:a,gtmContext:r,gtmType:i}),a.isAdmin&&v.jsx(_h,{children:o.formatMessage({id:"membersList_admin"})})]},l))}),n&&v.jsx(Sp,{...n,icon:{icon:"arrow-down",position:"right"},gtmContext:r})]}))};function wc(){return wc=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},wc.apply(this,arguments)}function Yx(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Jx=C.useLayoutEffect,Kx=function(t){var n=Q.useRef(t);return Jx(function(){n.current=t}),n},jd=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},Zx=function(t,n){var r=C.useRef();return C.useCallback(function(i){t.current=i,r.current&&jd(r.current,null),r.current=n,n&&jd(n,i)},[n])},Nd={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},e1=function(t){Object.keys(Nd).forEach(function(n){t.style.setProperty(n,Nd[n],"important")})},Ld=e1,nt=null,Dd=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function t1(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"),Ld(nt)),nt.parentNode===null&&document.body.appendChild(nt);var i=e.paddingSize,s=e.borderSize,o=e.sizingStyle,a=o.boxSizing;Object.keys(o).forEach(function(m){var f=m;nt.style[f]=o[f]}),Ld(nt),nt.value=t;var l=Dd(nt,e);nt.value=t,l=Dd(nt,e),nt.value="x";var u=nt.scrollHeight-i,c=u*n;a==="border-box"&&(c=c+i+s),l=Math.max(c,l);var h=u*r;return a==="border-box"&&(h=h+i+s),l=Math.min(h,l),[l,u]}var Bd=function(){},n1=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},r1=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],i1=!!document.documentElement.currentStyle,s1=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=n1(r1,n),i=r.boxSizing;if(i==="")return null;i1&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var s=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:s,borderSize:o}},o1=s1;function Up(e,t,n){var r=Kx(n);Q.useLayoutEffect(function(){var i=function(o){return r.current(o)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var a1=function(t){Up(window,"resize",t)},l1=function(t){Up(document.fonts,"loadingdone",t)},c1=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],u1=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,s=t.minRows,o=t.onChange,a=o===void 0?Bd:o,l=t.onHeightChange,u=l===void 0?Bd:l,c=Yx(t,c1),h=c.value!==void 0,m=Q.useRef(null),f=Zx(m,n),p=Q.useRef(0),g=Q.useRef(),x=function(){var T=m.current,P=r&&g.current?g.current:o1(T);if(P){g.current=P;var y=t1(P,T.value||T.placeholder||"x",s,i),O=y[0],M=y[1];p.current!==O&&(p.current=O,T.style.setProperty("height",O+"px","important"),u(O,{rowHeight:M}))}},S=function(T){h||x(),a(T)};return Q.useLayoutEffect(x),a1(x),l1(x),Q.createElement("textarea",wc({},c,{onChange:S,ref:f}))},d1=Q.forwardRef(u1);let no=null;const ut="discussion_form_",au=({content:e={type:"response",slugs:{}},userHasPermissions:t=!0,meta:n={isLoading:!1,isInWrapper:!1,isEditing:!1,showTitle:!1},inputRef:r,maxLength:i=5e4,minRows:s=4,forceShow:o={cancel:!1,error:!1},functions:a={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:l="DiscussionForm"})=>{var I,R;const u=te(),c=C.useContext(dn),[h,m]=C.useState(n.isEditing&&n.isEditing.text||""),[f,p]=C.useState(o.error||!1),[g,x]=C.useState(!1),S=C.useRef(null);if(r||(r=S),n.isLoading)return v.jsx(Vt,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const k=N=>{const z=N.target.value;m(z);let Y;!c||!c.id?Y=jt(u.formatMessage,`${ut}error_loggedOut`,e.type,"action"):t?z.length>=i&&(Y=`${ut}error_tooLong`):Y=jt(u.formatMessage,`${ut}error_noPermission`,e.type,"action"),Y?p(Y):f&&p(!1)};let T=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const N=e.type==="response"?((I=e.slugs)==null?void 0:I.question)||"":((R=e.slugs)==null?void 0:R.answer)||"";N&&(T=`${T}-${N.slice(-15)}`)}const P=async N=>{var Y;if(N.preventDefault(),N.stopPropagation(),!c||!c.id||!t||O)return;no&&clearTimeout(no),x("submitting");const z=window.location.pathname;try{let q;switch(e.type){case"post":q=await a.create({content:h});break;case"question":q=await a.create({title:h,authorId:c&&c.id,...(Y=a.props)==null?void 0:Y.create});break;case"response":q=await a.create({question:e.slugs.question},{body:h,authorId:c&&c.id,contentPath:z});break;case"reply":q=await a.create({question:e.slugs.question,answer:e.slugs.answer},{body:h,authorId:c&&c.id,contentPath:z});break;default:break}await og(1e3),a.callback&&await a.callback(q),no=setTimeout(()=>{m(""),x("submitted"),y()},500)}catch(q){const ae=q;let ge=`${ut}error`;ae.message.includes("entry already exists")&&(ge=jt(u.formatMessage,`${ut}error_alreadyExists`,e.type,"action")),ae.message.includes("429")?ge=jt(u.formatMessage,`${ut}error_tooMany`,e.type,"action"):ae.message.includes("400")&&(ge=`${ut}error`),p(ge),y()}},y=()=>{no=setTimeout(()=>{p(!1),x(!1)},5e3)},O=!h||!fg(h),M=g==="submitting",E=[];return(n.isEditing&&!M||o.cancel)&&E.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:a.handleCancel,className:"gtm-trackable","data-gtm-event-context":l,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!o.cancel&&(!c||!c.id||!h),children:u.formatMessage({id:`${ut}cancel`})}),E.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:N=>{if(n.isEditing){x("submitting"),a.handleSaveEdit&&a.handleSaveEdit(S.current&&"value"in S.current?S.current.value:"");return}P(N)},className:"gtm-trackable","data-gtm-event-context":l,"data-gtm-event-type":`${n.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!c||!c.id||!t||O||M||n.isEditing&&h===n.isEditing.text,children:u.formatMessage({id:`${ut}${M?n.isEditing?"saving":"posting":n.isEditing?"save":"post"}`})}),v.jsxs("form",{id:T,className:L("discussion-card discussion-form",{"no-styling":n.isInWrapper&&n.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[(n==null?void 0:n.showTitle)&&!n.isEditing&&["question"].includes(e.type)&&v.jsx("h2",{children:jt(u.formatMessage,`${ut}title`,e.type,"action")}),v.jsx(qo,{member:c||"community",gtmContext:l,gtmType:"profile-click"}),v.jsx(ze,{element:"label",showOnFocus:!1,htmlFor:`${T}-input`,children:jt(u.formatMessage,`${ut}label`,e.type,"action")}),v.jsx(d1,{ref:r,id:`${T}-input`,name:e.type,placeholder:jt(u.formatMessage,`${ut}placeholder`,e.type,"action"),onChange:k,value:h,maxLength:i,"aria-invalid":!!f,"aria-errormessage":"error-message",minRows:s,autoFocus:!!n.isEditing}),v.jsx("small",{children:jt(u.formatMessage,`${ut}explainer`,e.type,"action",{a:N=>v.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",target:"_blank",className:"gtm-trackable","data-gtm-event-context":l,"data-gtm-event-type":"community-guidelines-link",children:N})})}),v.jsx(gs,{buttons:E}),g==="submitted"&&v.jsx(_o,{className:"success","data-testid":"success",children:jt(u.formatMessage,`${ut}success`,e.type,"action")}),f&&v.jsx(_o,{id:"error-message",className:"error","data-testid":"error",children:o.error?o.error:typeof f=="string"?f.includes(" ")?f:u.formatMessage({id:f},{action:u.formatMessage({id:`discussion_action_${e.type}`}),maxLength:i}):f})]})},lu=({contentType:e,createPost:t,membershipRequiredToPost:{isMember:n,required:r,join:i,leave:s,notMemberStateText:o}})=>r&&!n?v.jsx(bs,{text:o,button:{component:v.jsx(Zc,{functions:{join:i,leave:s}})}}):v.jsx(au,{content:{type:e,slugs:{}},functions:{create:t}}),f1={showThread:!1,showForm:!1},cu=C.createContext(f1),h1=({children:e})=>{const[t,n]=C.useState({showThread:!1,showForm:!1});return v.jsx(cu.Provider,{value:{...t,updateConversation:n},children:e})},p1=({question:e,answer:t,reply:n})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...n&&{replySlug:n}}),m1=(e,t=10)=>!e||e.length===0?[]:e.slice(0,t);let Gi=!1;const yl=()=>{Gi!==!1&&(clearTimeout(Gi),Gi=!1)},bl=10,Gp=({element:e="div",likes:t=0,peopleWhoLiked:n=!1,isShort:r=!0,userLiked:i=!1,content:s={type:"reply",slugs:{}},canLike:o=!0,functions:{createLike:a=()=>{},deleteLike:l=()=>{}}={}})=>{const u=te();C.useEffect(()=>{f(i)},[i]);const[c,h]=C.useState(t),[m,f]=C.useState(i),[p,g]=C.useState(!1),[x,S]=C.useState(!1),k=C.useMemo(()=>m1(n,bl),[n]),T=y=>{if(y.preventDefault(),y.stopPropagation(),S(!1),Gi)return yl(),!1;if(yl(),p||!o)return!1;Gi=setTimeout(P,350)},P=async()=>{if(yl(),p||!o)return!1;let y=m?c-1:c+1;y<0&&(y=0),g(!0),h(y),f(!m);try{if(s&&s.slugs){const O=p1(s.slugs);m?await l(O):await a(O,{contentPath:window.location.pathname})}}catch{h(t),f(i)}finally{g(!1)}};return C.createElement(e,{className:L("likes-wrapper text-medium action-button",{"show-spinner":p,"is-liked":m,disabled:!o}),onClick:T,onMouseEnter:()=>{S(!0)},onMouseLeave:()=>{S(!1)},onFocus:()=>{S(!0)},onBlur:()=>{S(!1)},children:v.jsxs(v.Fragment,{children:[v.jsx(Oe,{variant:"tertiary",size:"medium",icon:{icon:m?"heart":"heart_empty",animate:"bounce"},className:L({"do-animation":m&&!i}),screenreaderText:o?u.formatMessage({id:`discussion_likes_${m?"unlike":"like"}`},{action:u.formatMessage({id:`discussion_action_${s.type}`})}):!1,onClick:T,disabled:!o,"aria-hidden":!o,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${s.type}-click`}),v.jsx("span",{className:L("number-of-likes",{"no-likes":c===0}),"data-testid":"number-of-likes",children:u.formatMessage({id:`discussion_likes${r?"_short":""}`},{number:c})}),n&&v.jsx(Wf,{isOpen:x,isLoading:n.length===0,children:n.length&&v.jsxs("ul",{children:[k.map(y=>typeof y=="string"||!y.name?null:v.jsx("li",{children:v.jsx(vs,{href:y.id?`/profiles/${y.id}`:void 0,gtmContext:"Likes",gtmType:"liked-name-click",children:y.name})},y.id||window.btoa(y.name))),n.length>bl&&v.jsx("li",{children:u.formatMessage({id:"discussion_likes_more"},{number:n.length-bl})})]})})]})})};var No={exports:{}};No.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,s=2,o=9007199254740991,a="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",h="[object Date]",m="[object Error]",f="[object Function]",p="[object GeneratorFunction]",g="[object Map]",x="[object Number]",S="[object Null]",k="[object Object]",T="[object Promise]",P="[object Proxy]",y="[object RegExp]",O="[object Set]",M="[object String]",E="[object Symbol]",I="[object Undefined]",R="[object WeakMap]",N="[object ArrayBuffer]",z="[object DataView]",Y="[object Float32Array]",q="[object Float64Array]",ae="[object Int8Array]",ge="[object Int16Array]",Se="[object Int32Array]",ve="[object Uint8Array]",ye="[object Uint8ClampedArray]",V="[object Uint16Array]",Z="[object Uint32Array]",ce=/[\\^$.*+?()[\]{}|]/g,ue=/^\[object .+?Constructor\]$/,Te=/^(?:0|[1-9]\d*)$/,ee={};ee[Y]=ee[q]=ee[ae]=ee[ge]=ee[Se]=ee[ve]=ee[ye]=ee[V]=ee[Z]=!0,ee[a]=ee[l]=ee[N]=ee[c]=ee[z]=ee[h]=ee[m]=ee[f]=ee[g]=ee[x]=ee[k]=ee[y]=ee[O]=ee[M]=ee[R]=!1;var Ke=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,Ln=typeof self=="object"&&self&&self.Object===Object&&self,Ze=Ke||Ln||Function("return this")(),hn=t&&!t.nodeType&&t,et=hn&&!0&&e&&!e.nodeType&&e,Xt=et&&et.exports===hn,D=Xt&&Ke.process,_t=function(){try{return D&&D.binding&&D.binding("util")}catch{}}(),pt=_t&&_t.isTypedArray;function Ot(d,_){for(var w=-1,A=d==null?0:d.length,W=0,G=[];++w<A;){var ne=d[w];_(ne,w,d)&&(G[W++]=ne)}return G}function pn(d,_){for(var w=-1,A=_.length,W=d.length;++w<A;)d[W+w]=_[w];return d}function mn(d,_){for(var w=-1,A=d==null?0:d.length;++w<A;)if(_(d[w],w,d))return!0;return!1}function Zo(d,_){for(var w=-1,A=Array(d);++w<d;)A[w]=_(w);return A}function ea(d){return function(_){return d(_)}}function yr(d,_){return d.has(_)}function _i(d,_){return d==null?void 0:d[_]}function Ss(d){var _=-1,w=Array(d.size);return d.forEach(function(A,W){w[++_]=[W,A]}),w}function Es(d,_){return function(w){return d(_(w))}}function Mt(d){var _=-1,w=Array(d.size);return d.forEach(function(A){w[++_]=A}),w}var br=Array.prototype,ta=Function.prototype,Dn=Object.prototype,wr=Ze["__core-js_shared__"],yi=ta.toString,yt=Dn.hasOwnProperty,ks=function(){var d=/[^.]+$/.exec(wr&&wr.keys&&wr.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}(),Ts=Dn.toString,na=RegExp("^"+yi.call(yt).replace(ce,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),bi=Xt?Ze.Buffer:void 0,xr=Ze.Symbol,Cs=Ze.Uint8Array,Sr=Dn.propertyIsEnumerable,Bn=br.splice,Ct=xr?xr.toStringTag:void 0,Er=Object.getOwnPropertySymbols,wi=bi?bi.isBuffer:void 0,Hn=Es(Object.keys,Object),xi=Jt(Ze,"DataView"),Un=Jt(Ze,"Map"),Si=Jt(Ze,"Promise"),Ei=Jt(Ze,"Set"),ki=Jt(Ze,"WeakMap"),gn=Jt(Object,"create"),Ps=tt(xi),Yt=tt(Un),ra=tt(Si),ia=tt(Ei),sa=tt(ki),As=xr?xr.prototype:void 0,Ti=As?As.valueOf:void 0;function Le(d){var _=-1,w=d==null?0:d.length;for(this.clear();++_<w;){var A=d[_];this.set(A[0],A[1])}}function oa(){this.__data__=gn?gn(null):{},this.size=0}function aa(d){var _=this.has(d)&&delete this.__data__[d];return this.size-=_?1:0,_}function la(d){var _=this.__data__;if(gn){var w=_[d];return w===r?void 0:w}return yt.call(_,d)?_[d]:void 0}function ca(d){var _=this.__data__;return gn?_[d]!==void 0:yt.call(_,d)}function ua(d,_){var w=this.__data__;return this.size+=this.has(d)?0:1,w[d]=gn&&_===void 0?r:_,this}Le.prototype.clear=oa,Le.prototype.delete=aa,Le.prototype.get=la,Le.prototype.has=ca,Le.prototype.set=ua;function qe(d){var _=-1,w=d==null?0:d.length;for(this.clear();++_<w;){var A=d[_];this.set(A[0],A[1])}}function da(){this.__data__=[],this.size=0}function fa(d){var _=this.__data__,w=Cr(_,d);if(w<0)return!1;var A=_.length-1;return w==A?_.pop():Bn.call(_,w,1),--this.size,!0}function ha(d){var _=this.__data__,w=Cr(_,d);return w<0?void 0:_[w][1]}function pa(d){return Cr(this.__data__,d)>-1}function ma(d,_){var w=this.__data__,A=Cr(w,d);return A<0?(++this.size,w.push([d,_])):w[A][1]=_,this}qe.prototype.clear=da,qe.prototype.delete=fa,qe.prototype.get=ha,qe.prototype.has=pa,qe.prototype.set=ma;function lt(d){var _=-1,w=d==null?0:d.length;for(this.clear();++_<w;){var A=d[_];this.set(A[0],A[1])}}function ga(){this.size=0,this.__data__={hash:new Le,map:new(Un||qe),string:new Le}}function va(d){var _=Pt(this,d).delete(d);return this.size-=_?1:0,_}function _a(d){return Pt(this,d).get(d)}function ya(d){return Pt(this,d).has(d)}function ba(d,_){var w=Pt(this,d),A=w.size;return w.set(d,_),this.size+=w.size==A?0:1,this}lt.prototype.clear=ga,lt.prototype.delete=va,lt.prototype.get=_a,lt.prototype.has=ya,lt.prototype.set=ba;function kr(d){var _=-1,w=d==null?0:d.length;for(this.__data__=new lt;++_<w;)this.add(d[_])}function Os(d){return this.__data__.set(d,r),this}function Tr(d){return this.__data__.has(d)}kr.prototype.add=kr.prototype.push=Os,kr.prototype.has=Tr;function It(d){var _=this.__data__=new qe(d);this.size=_.size}function Ci(){this.__data__=new qe,this.size=0}function wa(d){var _=this.__data__,w=_.delete(d);return this.size=_.size,w}function xa(d){return this.__data__.get(d)}function Sa(d){return this.__data__.has(d)}function Ea(d,_){var w=this.__data__;if(w instanceof qe){var A=w.__data__;if(!Un||A.length<n-1)return A.push([d,_]),this.size=++w.size,this;w=this.__data__=new lt(A)}return w.set(d,_),this.size=w.size,this}It.prototype.clear=Ci,It.prototype.delete=wa,It.prototype.get=xa,It.prototype.has=Sa,It.prototype.set=Ea;function ka(d,_){var w=Pr(d),A=!w&&Rs(d),W=!w&&!A&&Ar(d),G=!w&&!A&&!W&&Ls(d),ne=w||A||W||G,le=ne?Zo(d.length,String):[],Pe=le.length;for(var fe in d)(_||yt.call(d,fe))&&!(ne&&(fe=="length"||W&&(fe=="offset"||fe=="parent")||G&&(fe=="buffer"||fe=="byteLength"||fe=="byteOffset")||$a(fe,Pe)))&&le.push(fe);return le}function Cr(d,_){for(var w=d.length;w--;)if(Fs(d[w][0],_))return w;return-1}function Pi(d,_,w){var A=_(d);return Pr(d)?A:pn(A,w(d))}function Gn(d){return d==null?d===void 0?I:S:Ct&&Ct in Object(d)?Kt(d):$s(d)}function Ms(d){return Ft(d)&&Gn(d)==a}function Is(d,_,w,A,W){return d===_?!0:d==null||_==null||!Ft(d)&&!Ft(_)?d!==d&&_!==_:Ta(d,_,w,A,Is,W)}function Ta(d,_,w,A,W,G){var ne=Pr(d),le=Pr(_),Pe=ne?l:$t(d),fe=le?l:$t(_);Pe=Pe==a?k:Pe,fe=fe==a?k:fe;var Ve=Pe==k,ct=fe==k,$e=Pe==fe;if($e&&Ar(d)){if(!Ar(_))return!1;ne=!0,Ve=!1}if($e&&!Ve)return G||(G=new It),ne||Ls(d)?Ai(d,_,w,A,W,G):Oa(d,_,Pe,w,A,W,G);if(!(w&i)){var Qe=Ve&&yt.call(d,"__wrapped__"),De=ct&&yt.call(_,"__wrapped__");if(Qe||De){var vn=Qe?d.value():d,Zt=De?_.value():_;return G||(G=new It),W(vn,Zt,w,A,G)}}return $e?(G||(G=new It),Ma(d,_,w,A,W,G)):!1}function Ca(d){if(!Ns(d)||Ra(d))return!1;var _=js(d)?na:ue;return _.test(tt(d))}function Pa(d){return Ft(d)&&Mi(d.length)&&!!ee[Gn(d)]}function Aa(d){if(!ja(d))return Hn(d);var _=[];for(var w in Object(d))yt.call(d,w)&&w!="constructor"&&_.push(w);return _}function Ai(d,_,w,A,W,G){var ne=w&i,le=d.length,Pe=_.length;if(le!=Pe&&!(ne&&Pe>le))return!1;var fe=G.get(d);if(fe&&G.get(_))return fe==_;var Ve=-1,ct=!0,$e=w&s?new kr:void 0;for(G.set(d,_),G.set(_,d);++Ve<le;){var Qe=d[Ve],De=_[Ve];if(A)var vn=ne?A(De,Qe,Ve,_,d,G):A(Qe,De,Ve,d,_,G);if(vn!==void 0){if(vn)continue;ct=!1;break}if($e){if(!mn(_,function(Zt,qn){if(!yr($e,qn)&&(Qe===Zt||W(Qe,Zt,w,A,G)))return $e.push(qn)})){ct=!1;break}}else if(!(Qe===De||W(Qe,De,w,A,G))){ct=!1;break}}return G.delete(d),G.delete(_),ct}function Oa(d,_,w,A,W,G,ne){switch(w){case z:if(d.byteLength!=_.byteLength||d.byteOffset!=_.byteOffset)return!1;d=d.buffer,_=_.buffer;case N:return!(d.byteLength!=_.byteLength||!G(new Cs(d),new Cs(_)));case c:case h:case x:return Fs(+d,+_);case m:return d.name==_.name&&d.message==_.message;case y:case M:return d==_+"";case g:var le=Ss;case O:var Pe=A&i;if(le||(le=Mt),d.size!=_.size&&!Pe)return!1;var fe=ne.get(d);if(fe)return fe==_;A|=s,ne.set(d,_);var Ve=Ai(le(d),le(_),A,W,G,ne);return ne.delete(d),Ve;case E:if(Ti)return Ti.call(d)==Ti.call(_)}return!1}function Ma(d,_,w,A,W,G){var ne=w&i,le=zn(d),Pe=le.length,fe=zn(_),Ve=fe.length;if(Pe!=Ve&&!ne)return!1;for(var ct=Pe;ct--;){var $e=le[ct];if(!(ne?$e in _:yt.call(_,$e)))return!1}var Qe=G.get(d);if(Qe&&G.get(_))return Qe==_;var De=!0;G.set(d,_),G.set(_,d);for(var vn=ne;++ct<Pe;){$e=le[ct];var Zt=d[$e],qn=_[$e];if(A)var uu=ne?A(qn,Zt,$e,_,d,G):A(Zt,qn,$e,d,_,G);if(!(uu===void 0?Zt===qn||W(Zt,qn,w,A,G):uu)){De=!1;break}vn||(vn=$e=="constructor")}if(De&&!vn){var Ds=d.constructor,Bs=_.constructor;Ds!=Bs&&"constructor"in d&&"constructor"in _&&!(typeof Ds=="function"&&Ds instanceof Ds&&typeof Bs=="function"&&Bs instanceof Bs)&&(De=!1)}return G.delete(d),G.delete(_),De}function zn(d){return Pi(d,Ii,Ia)}function Pt(d,_){var w=d.__data__;return Fa(_)?w[typeof _=="string"?"string":"hash"]:w.map}function Jt(d,_){var w=_i(d,_);return Ca(w)?w:void 0}function Kt(d){var _=yt.call(d,Ct),w=d[Ct];try{d[Ct]=void 0;var A=!0}catch{}var W=Ts.call(d);return A&&(_?d[Ct]=w:delete d[Ct]),W}var Ia=Er?function(d){return d==null?[]:(d=Object(d),Ot(Er(d),function(_){return Sr.call(d,_)}))}:La,$t=Gn;(xi&&$t(new xi(new ArrayBuffer(1)))!=z||Un&&$t(new Un)!=g||Si&&$t(Si.resolve())!=T||Ei&&$t(new Ei)!=O||ki&&$t(new ki)!=R)&&($t=function(d){var _=Gn(d),w=_==k?d.constructor:void 0,A=w?tt(w):"";if(A)switch(A){case Ps:return z;case Yt:return g;case ra:return T;case ia:return O;case sa:return R}return _});function $a(d,_){return _=_??o,!!_&&(typeof d=="number"||Te.test(d))&&d>-1&&d%1==0&&d<_}function Fa(d){var _=typeof d;return _=="string"||_=="number"||_=="symbol"||_=="boolean"?d!=="__proto__":d===null}function Ra(d){return!!ks&&ks in d}function ja(d){var _=d&&d.constructor,w=typeof _=="function"&&_.prototype||Dn;return d===w}function $s(d){return Ts.call(d)}function tt(d){if(d!=null){try{return yi.call(d)}catch{}try{return d+""}catch{}}return""}function Fs(d,_){return d===_||d!==d&&_!==_}var Rs=Ms(function(){return arguments}())?Ms:function(d){return Ft(d)&&yt.call(d,"callee")&&!Sr.call(d,"callee")},Pr=Array.isArray;function Oi(d){return d!=null&&Mi(d.length)&&!js(d)}var Ar=wi||Da;function Na(d,_){return Is(d,_)}function js(d){if(!Ns(d))return!1;var _=Gn(d);return _==f||_==p||_==u||_==P}function Mi(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=o}function Ns(d){var _=typeof d;return d!=null&&(_=="object"||_=="function")}function Ft(d){return d!=null&&typeof d=="object"}var Ls=pt?ea(pt):Pa;function Ii(d){return Oi(d)?ka(d):Aa(d)}function La(){return[]}function Da(){return!1}e.exports=Na})(No,No.exports);var g1=No.exports;const v1=fi(g1);const zp=({element:e="section",children:t,className:n,...r})=>C.createElement(e,{className:L("modal",n),children:typeof t=="string"?v.jsx("p",{children:t}):t,...r});const qp=({id:e="content-overlay",isOpen:t=!1,maxWidth:n,functions:{onOpen:r=()=>{},onClose:i=()=>{}}={},forceShow:{error:s=!1}={},title:o,children:a,buttons:l,className:u="",gtmContext:c="Modal"})=>{const h=te(),[m,f]=C.useState(t),p=x=>{f(x),x?(r(),document.body.classList.add("has-overlay")):(i(),document.body.classList.remove("has-overlay"))};C.useEffect(()=>{p(t)},[t]);const g=n?{"--max-width":`${n/16}rem`}:{};return v.jsx("div",{className:L("overlay",{open:m}),children:v.jsx(zp,{id:e,className:L("overlay-modal",u,{"has-max-width":n}),hidden:!m,style:g,children:t&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"top",children:[v.jsx("h2",{children:o}),v.jsx(Oe,{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"})})]}),v.jsx(go,{}),a,l&&v.jsxs("div",{className:"bottom",children:[v.jsx(go,{}),v.jsx(gs,{buttons:l})]}),s&&v.jsx(_o,{className:"error",children:s})]})})})},Vp=(e,t)=>({"aria-haspopup":!0,"aria-expanded":t,"aria-controls":e}),Hd=e=>{const t={};return Object.keys(e).forEach(n=>{t[`${n}Slug`]=e[n]}),t};const nn="discussion_",Ko=({element:e="div",content:t,userHasPermissions:n=!0,isLoading:r=!1,originalAuthorId:i,functions:{content:{createContent:s,deleteContent:o,updateContent:a}={createContent:()=>{},deleteContent:()=>{},updateContent:()=>{}},likes:{createLike:l,deleteLike:u}={createLike:()=>{},deleteLike:()=>{}},comments:{openComments:c}={openComments:()=>{}}},links:h={},className:m,gtmContext:f="DiscussionAnswer",children:p})=>{const g=te(),x=C.useContext(dn),S=C.useContext(cu),[k,T]=C.useState({body:t&&t.body||"",isEditing:!1,didEdit:t&&t.isEdited||!1}),[P,y]=C.useState(!1),[O,M]=C.useState("");if(C.useEffect(()=>{T({...k,body:t&&t.body||"",didEdit:t&&t.isEdited||!1})},[t.isEdited]),r||!t||t.type==="answer"&&(!t.slugs||!t.slugs.question))return v.jsx(Vt,{className:"discussion-card discussion-post"});const{author:E,canLike:I,createdAt:R,id:N,likes:z=0,userLiked:Y,comments:q=0}=t,ae=x&&x.id&&typeof E!="string"&&E.id&&E.id===x.id||!1,ge=typeof I=="boolean"?I:n?!ae:!1,Se=async Z=>{Z||(Z=""),M("");try{if(!v1(Z,k.body)){const ce=t.type==="question"?{title:Z}:{body:Z};await a(Hd(t.slugs),ce)}T({body:Z,isEditing:!1,didEdit:!0})}catch{M(`${nn}form_error`)}},ve=()=>{S&&S.updateConversation&&S.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const ce=`reply-form-${(t.type==="answer"?t.slug:t.slugs.answer||"").toLowerCase().slice(-15)}`,ue=document.getElementById(ce),Te=document.getElementById(`${ce}-input`);Te&&Te.focus(),ue&&ue.scrollIntoView({behavior:"smooth"})},0)},ye=()=>{try{o(Hd(t.slugs))}catch{M("delete-error")}},V=[{text:g.formatMessage({id:`${nn}moreMenu_report`}),href:`mailto:community@apolitical.co?subject=${encodeURI(g.formatMessage({id:`${nn}report_subject`}))}&body=${encodeURI(g.formatMessage({id:`${nn}report_body`},{contentType:t.type||"",contentSlug:t.slug||"",contentUrl:`${window.origin}${typeof process<"u"&&process.env.PUBLIC_URL||""}/${t.slugs.question||""}`}))}`,icon:"flag"}];return n&&ae&&V.push({text:g.formatMessage({id:`${nn}moreMenu_edit`}),onClick:()=>T({...k,isEditing:!0}),icon:"pencil-paper",className:"gtm-trackable","data-gtm-event-context":f,"data-gtm-event-type":`edit-${t.type}-click`},{text:g.formatMessage({id:`${nn}moreMenu_delete`}),onClick:Z=>{Z.preventDefault(),Z.stopPropagation(),y(!0)},icon:"trash",className:"gtm-trackable","data-gtm-event-context":f,"data-gtm-event-type":`delete-${t.type}-click`,...Vp(`delete-${t.slug}-modal`,P)}),C.createElement(e,{className:L("discussion-post",m),"data-testid":`discussion-${t.type}-thread`,children:v.jsxs(v.Fragment,{children:[v.jsxs("div",{id:N||t.slug,className:L("discussion-card",t.type,{editing:k.isEditing,"has-link":h.post&&!k.isEditing}),onClick:Z=>{!h.post||k.isEditing||(Z.preventDefault(),Z.stopPropagation(),window.location.href=h.post)},children:[!k.isEditing&&v.jsx(qo,{member:E,additionalContent:{createdAt:R,didEdit:k.didEdit},className:typeof E!="string"&&E.id===i?"highlighted":"",gtmContext:f,gtmType:"profile-click"}),k.isEditing?v.jsx(au,{content:{type:t.type,slugs:t.slugs},userHasPermissions:n,meta:{isLoading:r,isInWrapper:!0,isEditing:{text:k.body}},maxLength:t.type==="question"?250:5e4,forceShow:{error:O!==""&&O!=="delete-error"?g.formatMessage({id:O},{action:g.formatMessage({id:`discussion_action_${t.type}`})}):!1},functions:{create:s,handleSaveEdit:Se,handleCancel:()=>{M(""),T({...k,isEditing:!1})}},gtmContext:`${f}Form`}):h.post?v.jsx("a",{href:h.post,className:"gtm-trackable","data-gtm-event-context":f,"data-gtm-event-type":"title-click",children:v.jsx(Ll,{options:{overrides:{a:vh}},children:k.body})}):v.jsx(Ll,{options:{wrapper:t.type==="question"?"h1":C.Fragment,forceWrapper:t.type==="question",forceInline:t.type==="question",forceBlock:t.type!=="question"},children:k.body}),!k.isEditing&&v.jsxs("ul",{className:L("actions text-medium",t.type),"data-testid":`${t.type}-actions`,children:[v.jsx(Gp,{element:"li",likes:z,isShort:!1,userLiked:Y,content:{type:t.type,slugs:t.slugs},canLike:ge,functions:{createLike:l,deleteLike:u}}),(["question","post"].includes(t.type)||h.comments||typeof c=="function")&&v.jsxs("li",{className:"action-button",onClick:Z=>{Z.preventDefault(),Z.stopPropagation(),h.comments&&(window.location.href=h.comments),typeof c=="function"&&c()},children:[v.jsx(Oe,{variant:"tertiary",size:"medium",styling:{muted:!0},icon:{icon:"speech-bubble_square_thick"},href:h.comments?h.comments:!1,onClick:h.comments||typeof c!="function"?!1:c,className:"gtm-trackable","data-gtm-event-context":f,"data-gtm-event-type":`answer-${t.type}-click`,screenreaderText:g.formatMessage({id:`${nn}comments_screenReader`},{count:q})}),v.jsx("span",{children:g.formatMessage({id:`${nn}comments`},{count:q})})]}),(t.type==="answer"||t.type==="reply")&&v.jsx("li",{children:v.jsx(Oe,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:ve,children:g.formatMessage({id:`${nn}reply`})})}),v.jsx(Ep,{element:"li",id:`more-${t.slug}`,options:V})]})]}),p,v.jsx(qp,{id:`delete-${t.slug}-modal`,isOpen:P,functions:{onOpen:()=>{},onClose:()=>y(!1)},forceShow:{error:O==="delete-error"?g.formatMessage({id:"discussion_delete_error"},{action:g.formatMessage({id:`discussion_action_${t.type}`})}):!1},title:g.formatMessage({id:"discussion_delete_title"},{action:g.formatMessage({id:`discussion_action_${t.type}`})}),buttons:[{variant:"secondary",onClick:()=>y(!1),children:g.formatMessage({id:"discussion_delete_cancel"})},{variant:"primary",className:"destructive",onClick:ye,children:g.formatMessage({id:"discussion_delete_delete"})}],gtmContext:`${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,children:v.jsx(In,{id:"discussion_delete_text",values:{p:Z=>v.jsx("p",{children:Z}),action:g.formatMessage({id:`discussion_action_${t.type}`})}})})]})})};const wl="discussion_responses_",_1=({type:e="answer",responses:t=0})=>{const n=te();return v.jsxs("div",{className:"responses-heading",children:[v.jsx("h3",{children:n.formatMessage({id:`${wl}title`},{action:n.formatMessage({id:`${wl}${e}`}),count:t})}),t===0&&v.jsx("p",{children:jt(n.formatMessage,`${wl}empty`,e,e)})]})};const y1=({isOpen:e=!1,count:t=0,children:n})=>{const r=te(),i=C.useRef(null),[s,o]=C.useState(e),[a,l]=C.useState("closed");C.useEffect(()=>{const m=i.current;if(m)return m.addEventListener("transitionend",u),()=>{m.removeEventListener("transitionend",u)}},[]),lr(()=>{a==="closed"&&!s||l(["opening","open"].includes(a)?"ready-to-close":"opening")},[s]),C.useEffect(()=>{a==="ready-to-close"&&l("closing")},[a]);const u=({propertyName:m})=>{m==="max-height"&&l(f=>f==="opening"?"open":f==="closing"?"closed":f)},c=["opening","open"].includes(a),h=pf(n,{element:"li"});return v.jsxs("div",{className:"thread-wrapper",children:[v.jsx(Oe,{variant:"secondary",size:"small",styling:{muted:!0},icon:{icon:`arrow_corner-down_${c?"left":"right"}`},onClick:()=>{o(!s)},children:r.formatMessage({id:`discussion_thread_${c?"hide":"show"}`},{count:t})}),v.jsx("ul",{ref:i,className:L("thread",a),hidden:!s,children:h})]})},b1=({user:e,content:t,verb:n="post"})=>({actor:{id:e.id,data:{name:e.name,organization:e==null?void 0:e.organization,jobTitle:e==null?void 0:e.jobTitle}},content:t,latest_reactions:{like:[]},reaction_counts:{like:0},verb:n}),w1=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({content:a})=>{if(!n)return;const l=b1({user:n,content:a,verb:"post"});await e.cancelQueries({queryKey:t});const u=e.getQueryData(t);return e.setQueryData(t,c=>[...c,l]),{previousActivities:u}},onError:(a,l,u)=>{e.setQueryData(t,u.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),x1=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityId:a})=>{await e.cancelQueries({queryKey:t});const l=e.getQueryData(t),u=l==null?void 0:l.map(c=>{var h;return(c==null?void 0:c.id)===a&&((h=c.reaction_counts)!=null&&h.like?c.reaction_counts.like+=1:c.reaction_counts.like=1),c});return e.setQueryData(t,()=>u&&[...u]),{previousActivities:u}},onError:(a,l,u)=>{e.setQueryData(t,u.previousActivities)},onSuccess:a=>{const l=e.getQueryData(t),u=l==null?void 0:l.map(c=>((c==null?void 0:c.id)===(a==null?void 0:a.activity_id)&&(c.latest_reactions.like?c.latest_reactions.like.push(a):c.latest_reactions.like=[a]),c));return e.setQueryData(t,()=>u&&[...u]),{previousActivities:l}},onSettled:(a,l,u)=>{e.invalidateQueries({queryKey:[...t,u.activityId]})}}),S1=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({activityId:l})=>{await e.cancelQueries({queryKey:t});const u=e.getQueryData(t),c=u==null?void 0:u.map(h=>{var m;return(h==null?void 0:h.id)===l&&(m=h.reaction_counts)!=null&&m.like&&(h.reaction_counts.like-=1),h});return e.setQueryData(t,()=>c&&[...c]),{previousActivities:c}},onError:(l,u,c)=>{e.setQueryData(t,c.previousActivities)},onSuccess:(l,{activityId:u})=>{const c=e.getQueryData(t),h=c==null?void 0:c.map(m=>{var f,p,g,x;if(m.id===u){const S=(g=(p=(f=m.latest_reactions)==null?void 0:f.like)==null?void 0:p.find(k=>k.user_id===(n==null?void 0:n.id)))==null?void 0:g.id;return m.latest_reactions.like=(x=m.latest_reactions.like)==null?void 0:x.filter(k=>k.id!==S),m}else return m});return e.setQueryData(t,()=>h&&[...h]),{previousActivities:c}},onSettled:(l,u,c)=>{e.invalidateQueries({queryKey:[...t,c.activityId]})}}),E1=({basePath:e,parentId:t,isMember:n,functions:{list:r,create:i,like:s,unlike:o,join:a,leave:l}})=>{const u=te(),c=mi(),h=C.useContext(dn),{data:m,error:f,isLoading:p,isFetching:g}=sp({queryKey:[e,t],queryFn:r}),x=w1({queryClient:c,queryKey:[e,t],user:h,mutationFn:i}),{mutate:S}=Fn(x),k=x1({queryClient:c,queryKey:[e,t],mutationFn:s}),{mutate:T}=Fn(k),P=S1({queryClient:c,queryKey:[e,t],user:h,mutationFn:async({activityId:E})=>{var N,z,Y;const I=m&&(m==null?void 0:m.find(q=>q.id===E)),R=(Y=(z=(N=I==null?void 0:I.latest_reactions)==null?void 0:N.like)==null?void 0:z.find(q=>q.user_id===(h==null?void 0:h.id)))==null?void 0:Y.id;await o({reactionId:R||"",activityId:E})}}),{mutate:y}=Fn(P),O=C.useCallback(({activityId:E})=>T({activityId:E}),[T]),M=C.useCallback(({activityId:E})=>y({activityId:E}),[y]);return f?v.jsx(bs,{variant:"error",text:f.message}):p?v.jsx(Vt,{style:{height:"400px"}}):v.jsxs(v.Fragment,{children:[v.jsx(lu,{contentType:"post",createPost:S,membershipRequiredToPost:{isMember:n,required:!0,join:a,leave:l,notMemberStateText:u.formatMessage({id:"community_joinToPost"})}}),!g&&Array.isArray(m)&&(m==null?void 0:m.map(E=>{var I,R,N,z,Y,q,ae,ge,Se,ve,ye;return v.jsx(Ko,{content:{type:"post",body:E==null?void 0:E.content,createdAt:(E==null?void 0:E.time)||"",slugs:{question:t},slug:E==null?void 0:E.id,author:{id:(I=E==null?void 0:E.actor)==null?void 0:I.id,name:(N=(R=E==null?void 0:E.actor)==null?void 0:R.data)==null?void 0:N.name,organization:(Y=(z=E==null?void 0:E.actor)==null?void 0:z.data)==null?void 0:Y.organization,jobTitle:(ae=(q=E==null?void 0:E.actor)==null?void 0:q.data)==null?void 0:ae.jobTitle,image:{thumbnail:((Se=(ge=E==null?void 0:E.actor)==null?void 0:ge.data)==null?void 0:Se.thumbnail)||void 0}},userLiked:((ve=E==null?void 0:E.own_reactions)==null?void 0:ve.like)&&((ye=E==null?void 0:E.own_reactions)==null?void 0:ye.like.length)>0,likes:(E==null?void 0:E.reaction_counts.like)||0,comments:(E==null?void 0:E.reaction_counts.reply)||0},links:{post:`${e}/${t}/${E==null?void 0:E.id}`,comments:`${e}/${t}/${E==null?void 0:E.id}`},functions:{content:{createContent:()=>null,deleteContent:()=>null,updateContent:()=>null},likes:{createLike:()=>{O({activityId:E==null?void 0:E.id})},deleteLike:()=>{M({activityId:E==null?void 0:E.id})}},comments:{openComments:()=>null}}},E==null?void 0:E.id)}))]})},k1=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{await e.cancelQueries({queryKey:t})},onError:(a,l,u)=>{e.setQueryData(t,u.previousActivity)},onSuccess:a=>{var u;const l=e.getQueryData(t);if(l)return(u=l==null?void 0:l.latest_reactions)!=null&&u.reply?(l.latest_reactions.reply.unshift(a),l&&(l.reaction_counts={reply:l.latest_reactions.reply.length})):(l.latest_reactions={reply:[a]},l.reaction_counts={reply:1}),e.setQueryData(t,()=>({...l})),{previousActivity:l}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),T1=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({replyId:o})=>{var u,c;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t),l=(c=(u=a==null?void 0:a.latest_reactions)==null?void 0:u.reply)==null?void 0:c.map(h=>{var m;return h.id===o&&((m=h.children_counts)!=null&&m.like?h.children_counts.like+=1:h.children_counts={like:1}),h});return e.setQueryData(t,()=>({...a,latest_reactions:{reply:l}})),{previousActivity:a}},onError:(o,a,l)=>{e.setQueryData(t,l.previousActivity)},onSuccess:o=>{var u;const a=e.getQueryData(t),l=(u=a==null?void 0:a.latest_reactions.reply)==null?void 0:u.map(c=>(c.id===o.id&&(c.latest_children.like?c.latest_children.like.push(o):c.latest_children.like=[o]),c));return e.setQueryData(t,()=>({...a,latest_reactions:{reply:l}})),{previousActivity:a}}}),C1=({queryClient:e,queryKey:t,user:n,mutationFn:r})=>({mutationFn:r,onMutate:async({replyId:a})=>{var c;await e.cancelQueries({queryKey:t});const l=e.getQueryData(t);if(!l)return;const u=(c=l.latest_reactions.reply)==null?void 0:c.map(h=>(h.id===a&&h.children_counts.like&&(h.children_counts.like-=1),h));return e.setQueryData(t,()=>({...l,latest_reactions:{reply:u}})),{previousActivity:l}},onError:(a,l,u)=>{e.setQueryData(t,u.previousActivity)},onSuccess:(a,{replyId:l})=>{var h;const u=e.getQueryData(t);if(!u)return;const c=(h=u.latest_reactions.reply)==null?void 0:h.map(m=>{var f;return m.id===l?(f=m.latest_children.reply)==null?void 0:f.filter(g=>g.user_id!==(n==null?void 0:n.id)):m});return e.setQueryData(t,()=>({...u,latest_reactions:{reply:c}})),{previousActivity:u}}}),Qp=({basePath:e,parentId:t,activityId:n,repliesList:r,isMember:i,functions:{createReply:s,like:o,unlike:a,join:l,leave:u}})=>{const c=te(),h=mi(),m=C.useContext(dn),f=k1({queryClient:h,queryKey:[e,t,n],mutationFn:s}),{mutate:p}=Fn(f),g=T1({queryClient:h,queryKey:[e,t,n],mutationFn:o}),{mutate:x}=Fn(g),S=C1({queryClient:h,queryKey:[e,t,n],user:m,mutationFn:a}),{mutate:k}=Fn(S),T=C.useCallback(({replyId:y})=>x({replyId:y}),[x]),P=C.useCallback(({replyId:y})=>k({replyId:y}),[k]);return v.jsxs(v.Fragment,{children:[v.jsx(lu,{contentType:"post",createPost:p,membershipRequiredToPost:{isMember:i,required:!0,join:l,leave:u,notMemberStateText:c.formatMessage({id:"community_joinToPost"})}}),(r==null?void 0:r.length)===0||(r==null?void 0:r.map(y=>{var M,E,I,R,N,z,Y,q,ae,ge,Se,ve,ye,V,Z,ce;const O=((M=y==null?void 0:y.latest_children)==null?void 0:M.like)&&((E=y==null?void 0:y.latest_children)==null?void 0:E.like.filter(ue=>ue.user_id===(m==null?void 0:m.id)));return v.jsx(Ko,{content:{type:"post",body:typeof y.data.content=="string"?(I=y==null?void 0:y.data)==null?void 0:I.content:((N=(R=y==null?void 0:y.data)==null?void 0:R.content)==null?void 0:N.text)||"",createdAt:y==null?void 0:y.created_at,slugs:{question:`${e}/${t}/${n}`,reply:y==null?void 0:y.id},slug:`${e}/${t}/${n}#${y==null?void 0:y.id}`,author:{id:(z=y==null?void 0:y.user)==null?void 0:z.id,name:(q=(Y=y==null?void 0:y.user)==null?void 0:Y.data)==null?void 0:q.name,organization:(ge=(ae=y==null?void 0:y.user)==null?void 0:ae.data)==null?void 0:ge.organization,jobTitle:(ve=(Se=y==null?void 0:y.user)==null?void 0:Se.data)==null?void 0:ve.jobTitle,image:{thumbnail:((V=(ye=y==null?void 0:y.user)==null?void 0:ye.data)==null?void 0:V.thumbnail)||void 0}},userLiked:!!(O!=null&&O.length),likes:((Z=y==null?void 0:y.children_counts)==null?void 0:Z.like)||0,comments:((ce=y==null?void 0:y.children_counts)==null?void 0:ce.reply)||0},functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:()=>console.log("update")},likes:{createLike:()=>T({replyId:y==null?void 0:y.id}),deleteLike:()=>P({replyId:y==null?void 0:y.id})},comments:{openComments:()=>{}}}},y==null?void 0:y.id)}))]})},P1=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{var l;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t);return(l=a==null?void 0:a.reaction_counts)!=null&&l.like?a.reaction_counts.like+=1:a&&(a.reaction_counts={like:1}),e.setQueryData(t,()=>({...a})),{previousActivity:a}},onError:(a,l,u)=>{e.setQueryData(t,u.previousActivity)},onSuccess:a=>{const l=e.getQueryData(t);return l!=null&&l.latest_reactions.like?l.latest_reactions.like.push(a):l&&(l.latest_reactions={like:[a]}),e.setQueryData(t,()=>({...l})),{previousActivity:l}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),A1=({queryClient:e,queryKey:t,user:n,activity:r,mutationFn:i})=>({mutationFn:i,onMutate:async()=>{var c;await e.cancelQueries({queryKey:t});const u=e.getQueryData(t);return(c=u==null?void 0:u.reaction_counts)!=null&&c.like&&u.reaction_counts.like>0&&(u.reaction_counts.like-=1),e.setQueryData(t,()=>({...u})),{previousActivity:u}},onError:(u,c,h)=>{e.setQueryData(t,h.previousActivity)},onSuccess:()=>{var h,m,f;if(!r)return;const u=(f=(m=(h=r.latest_reactions)==null?void 0:h.like)==null?void 0:m.find(p=>p.user_id===(n==null?void 0:n.id)))==null?void 0:f.id,c=e.getQueryData(t);if(c!=null&&c.latest_reactions.like)return c.latest_reactions.like=c.latest_reactions.like.filter(p=>p.id!==u),e.setQueryData(t,()=>({...c})),{previousActivity:c}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),O1=({basePath:e,parentId:t,activityId:n,isMember:r,functions:{get:i,likeActivity:s,unlikeActivity:o,createReply:a,likeReply:l,unlikeReply:u,join:c,leave:h}})=>{var E,I,R,N,z,Y,q,ae,ge,Se;const m=C.useContext(dn),f=mi(),{data:p,error:g,isLoading:x,isFetching:S}=sp({queryKey:[e,t,n],queryFn:i}),k=P1({queryClient:f,queryKey:[e,t,n],mutationFn:s}),{mutate:T}=Fn(k),P=A1({queryClient:f,queryKey:[e,t,n],user:m,mutationFn:async()=>{var ye,V,Z;const ve=(Z=(V=(ye=p==null?void 0:p.latest_reactions)==null?void 0:ye.like)==null?void 0:V.find(ce=>ce.user_id===(m==null?void 0:m.id)))==null?void 0:Z.id;await o({activityId:n,reactionId:ve})},activity:p}),{mutate:y}=Fn(P),O=C.useCallback(({activityId:ve})=>T({activityId:ve}),[T]),M=C.useCallback(async({activityId:ve})=>y({activityId:ve}),[y]);return g?v.jsx(bs,{variant:"error",text:g.message}):x||S?v.jsx(Vt,{style:{height:"400px"}}):v.jsx(Ko,{content:{type:"post",body:p==null?void 0:p.content,createdAt:(p==null?void 0:p.time)||"",slugs:{question:`${t}/${n}`},slug:n,author:{id:(E=p==null?void 0:p.actor)==null?void 0:E.id,name:(I=p==null?void 0:p.actor)==null?void 0:I.data.name,organization:(R=p==null?void 0:p.actor)==null?void 0:R.data.organization,jobTitle:(N=p==null?void 0:p.actor)==null?void 0:N.data.jobTitle,image:{thumbnail:((z=p==null?void 0:p.actor)==null?void 0:z.data.thumbnail)||void 0}},userLiked:((Y=p==null?void 0:p.own_reactions)==null?void 0:Y.like)&&((q=p==null?void 0:p.own_reactions)==null?void 0:q.like.length)>0,likes:p&&(p==null?void 0:p.reaction_counts.like),comments:p&&(p==null?void 0:p.reaction_counts.reply)},originalAuthorId:(ae=p==null?void 0:p.actor)==null?void 0:ae.id,functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:()=>console.log("update")},likes:{createLike:()=>O({activityId:n}),deleteLike:()=>M({activityId:n})},comments:{openComments:()=>{}}},children:v.jsxs(v.Fragment,{children:[v.jsxs("h3",{children:["Comments (",((ge=p==null?void 0:p.reaction_counts)==null?void 0:ge.reply)||0,")"]}),v.jsx(Qp,{basePath:e,parentId:t,activityId:n,repliesList:(Se=p==null?void 0:p.latest_reactions)==null?void 0:Se.reply,isMember:r,functions:{createReply:a,like:l,unlike:u,join:c,leave:h}})]})},n)},M1=({id:e,data:{jobTitle:t,name:n,organization:r,thumbnail:i}})=>({id:e,name:n,jobTitle:t,organization:r,image:{thumbnail:i}});exports.$PROXY=Xi;exports.$TRACK=Xc;exports.ASSETS_BUCKET=vo;exports.ActivitiesFeed=E1;exports.ActivitySection=O1;exports.AddPost=lu;exports.Breadcrumbs=vw;exports.Button=Oe;exports.ButtonWrapper=gs;exports.CollapsibleSection=$c;exports.Columns=xw;exports.CommunityDetails=gw;exports.Contributors=Sh;exports.Conversation=h1;exports.ConversationContext=cu;exports.CookieBanner=Pp;exports.Divider=go;exports.DownloadSection=Hv;exports.Dynamic=dw;exports.EMAILS=Ir;exports.EmailHelperTextBox=Dw;exports.EmptyStateBox=bs;exports.Filters=_w;exports.FlagsProvider=M0;exports.Footer=tu;exports.For=Nb;exports.Form=au;exports.FullWidthSection=Mc;exports.Header=ou;exports.HelperTextBox=gh;exports.HiddenFromScreenReaders=xc;exports.HideShowTextBox=K_;exports.HighlightedTextBoxWrapper=ln;exports.Index=Lb;exports.IntlProvider=I0;exports.JoinButton=Zc;exports.LanguageSwitcher=bw;exports.Likes=Gp;exports.Link=vs;exports.LoadMore=Sp;exports.LoadingPlaceholder=Vt;exports.LoadingState=wh;exports.Logo=eu;exports.LogoSection=Uv;exports.MarkdownText=Ll;exports.MarketingBlock=Vv;exports.Match=Hb;exports.Member=qo;exports.MembersList=Xx;exports.Modal=zp;exports.MoreMenu=Ep;exports.NUMBER_OF_USERS=Wv;exports.Overlay=qp;exports.PageLayout=Vx;exports.Pill=_h;exports.Portal=uw;exports.Post=Ko;exports.ProfilePicture=zo;exports.ProgressBar=yh;exports.Rating=Gw;exports.ReactQueryProvider=mw;exports.RepliesFeed=Qp;exports.ResponsesHeading=_1;exports.ResponsiveImage=mf;exports.SearchForm=Ip;exports.Show=Db;exports.Span=vh;exports.StatusBanner=_o;exports.Switch=Bb;exports.Tags=Wx;exports.Thread=y1;exports.Tooltip=Wf;exports.UserContext=dn;exports.UserProvider=$0;exports.VisuallyHidden=ze;exports.addAriaProps=Vp;exports.addEventListener=bp;exports.bannerSection=qv;exports.batch=vb;exports.children=Jc;exports.className=yp;exports.createComponent=pp;exports.createComputed=gc;exports.createContext=Eb;exports.createEffect=Yc;exports.createMemo=at;exports.createRenderEffect=jn;exports.createRoot=Rn;exports.createSignal=st;exports.createUniqueId=jb;exports.delegateEvents=_p;exports.getListener=bb;exports.getMember=jc;exports.headerData=Ki;exports.insert=Fo;exports.loadingBlock=ly;exports.mapGetSteamData=M1;exports.mergeProps=mp;exports.on=_b;exports.onCleanup=Yi;exports.onMount=yb;exports.passwordRules=Uw;exports.setAttribute=$o;exports.splitProps=gp;exports.spread=wp;exports.template=Zb;exports.untrack=je;exports.use=rw;exports.useContext=kb;exports.useCurrentPath=ef;exports.useEffectAfterMount=lr;exports.useScreenWidth=ms;exports.useScrollListener=nf;exports.useScrollToHash=Zp;exports.useTransition=Sb;