@apolitical/component-library 1.6.3-beta.1 → 1.6.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{4TNE5QTO-10618179.mjs → 4TNE5QTO-29f4faa2.mjs} +1 -1
- package/{4TNE5QTO-988be988.js → 4TNE5QTO-59ee46fe.js} +1 -1
- package/discussion/feeds/activities-feed/activities-feed.d.ts +1 -1
- package/discussion/feeds/replies-feed/replies-feed.d.ts +1 -1
- package/discussion/sections/activity-section/activity-section.d.ts +1 -1
- package/{index-618fb391.js → index-413092b1.js} +2 -2
- package/{index-958eb26c.mjs → index-513c58d1.mjs} +444 -446
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Copyright(c) 2012-2014 Roman Shtylman
|
|
8
8
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
9
9
|
* MIT Licensed
|
|
10
|
-
*/var Xm=TE,ch=xE,SE=Object.prototype.toString,sa=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function TE(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var r={},n=t||{},o=n.decode||OE,i=0;i<e.length;){var a=e.indexOf("=",i);if(a===-1)break;var s=e.indexOf(";",i);if(s===-1)s=e.length;else if(s<a){i=e.lastIndexOf(";",a-1)+1;continue}var c=e.slice(i,a).trim();if(r[c]===void 0){var l=e.slice(a+1,s).trim();l.charCodeAt(0)===34&&(l=l.slice(1,-1)),r[c]=RE(l,o)}i=s+1}return r}function xE(e,t,r){var n=r||{},o=n.encode||AE;if(typeof o!="function")throw new TypeError("option encode is invalid");if(!sa.test(e))throw new TypeError("argument name is invalid");var i=o(t);if(i&&!sa.test(i))throw new TypeError("argument val is invalid");var a=e+"="+i;if(n.maxAge!=null){var s=n.maxAge-0;if(isNaN(s)||!isFinite(s))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(s)}if(n.domain){if(!sa.test(n.domain))throw new TypeError("option domain is invalid");a+="; Domain="+n.domain}if(n.path){if(!sa.test(n.path))throw new TypeError("option path is invalid");a+="; Path="+n.path}if(n.expires){var c=n.expires;if(!CE(c)||isNaN(c.valueOf()))throw new TypeError("option expires is invalid");a+="; Expires="+c.toUTCString()}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.priority){var l=typeof n.priority=="string"?n.priority.toLowerCase():n.priority;switch(l){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(n.sameSite){var u=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(u){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a}function OE(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function AE(e){return encodeURIComponent(e)}function CE(e){return SE.call(e)==="[object Date]"||e instanceof Date}function RE(e,t){try{return t(e)}catch{return e}}function PE(){return typeof document=="object"&&typeof document.cookie=="string"}function NE(e){return typeof e=="string"?Xm(e):typeof e=="object"&&e!==null?e:{}}function Nu(e,t={}){const r=IE(e);if(!t.doNotParse)try{return JSON.parse(r)}catch{}return e}function IE(e){return e&&e[0]==="j"&&e[1]===":"?e.substr(2):e}class Jm{constructor(t,r={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const o=this.cookies;this.cookies=Xm(document.cookie),this._checkChanges(o)};const n=typeof document>"u"?"":document.cookie;this.cookies=NE(t||n),this.defaultSetOptions=r,this.HAS_DOCUMENT_COOKIE=PE()}_emitChange(t){for(let r=0;r<this.changeListeners.length;++r)this.changeListeners[r](t)}_checkChanges(t){new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach(n=>{t[n]!==this.cookies[n]&&this._emitChange({name:n,value:Nu(t[n])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,r={}){return r.doNotUpdate||this.update(),Nu(this.cookies[t],r)}getAll(t={}){t.doNotUpdate||this.update();const r={};for(let n in this.cookies)r[n]=Nu(this.cookies[n],t);return r}set(t,r,n){n?n=Object.assign(Object.assign({},this.defaultSetOptions),n):n=this.defaultSetOptions;const o=typeof r=="string"?r:JSON.stringify(r);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:o}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=ch(t,o,n)),this._emitChange({name:t,value:r,options:n})}remove(t,r){const n=r=Object.assign(Object.assign({},r),{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=ch(t,"",n)),this._emitChange({name:t,value:void 0,options:r})}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 r=this.changeListeners.indexOf(t);r>=0&&this.changeListeners.splice(r,1),this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}const Zm=pe.createContext(new Jm),{Provider:LE,Consumer:
|
|
10
|
+
*/var Xm=TE,ch=xE,SE=Object.prototype.toString,sa=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function TE(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");for(var r={},n=t||{},o=n.decode||OE,i=0;i<e.length;){var a=e.indexOf("=",i);if(a===-1)break;var s=e.indexOf(";",i);if(s===-1)s=e.length;else if(s<a){i=e.lastIndexOf(";",a-1)+1;continue}var c=e.slice(i,a).trim();if(r[c]===void 0){var l=e.slice(a+1,s).trim();l.charCodeAt(0)===34&&(l=l.slice(1,-1)),r[c]=RE(l,o)}i=s+1}return r}function xE(e,t,r){var n=r||{},o=n.encode||AE;if(typeof o!="function")throw new TypeError("option encode is invalid");if(!sa.test(e))throw new TypeError("argument name is invalid");var i=o(t);if(i&&!sa.test(i))throw new TypeError("argument val is invalid");var a=e+"="+i;if(n.maxAge!=null){var s=n.maxAge-0;if(isNaN(s)||!isFinite(s))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(s)}if(n.domain){if(!sa.test(n.domain))throw new TypeError("option domain is invalid");a+="; Domain="+n.domain}if(n.path){if(!sa.test(n.path))throw new TypeError("option path is invalid");a+="; Path="+n.path}if(n.expires){var c=n.expires;if(!CE(c)||isNaN(c.valueOf()))throw new TypeError("option expires is invalid");a+="; Expires="+c.toUTCString()}if(n.httpOnly&&(a+="; HttpOnly"),n.secure&&(a+="; Secure"),n.priority){var l=typeof n.priority=="string"?n.priority.toLowerCase():n.priority;switch(l){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(n.sameSite){var u=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(u){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a}function OE(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function AE(e){return encodeURIComponent(e)}function CE(e){return SE.call(e)==="[object Date]"||e instanceof Date}function RE(e,t){try{return t(e)}catch{return e}}function PE(){return typeof document=="object"&&typeof document.cookie=="string"}function NE(e){return typeof e=="string"?Xm(e):typeof e=="object"&&e!==null?e:{}}function Nu(e,t={}){const r=IE(e);if(!t.doNotParse)try{return JSON.parse(r)}catch{}return e}function IE(e){return e&&e[0]==="j"&&e[1]===":"?e.substr(2):e}class Jm{constructor(t,r={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const o=this.cookies;this.cookies=Xm(document.cookie),this._checkChanges(o)};const n=typeof document>"u"?"":document.cookie;this.cookies=NE(t||n),this.defaultSetOptions=r,this.HAS_DOCUMENT_COOKIE=PE()}_emitChange(t){for(let r=0;r<this.changeListeners.length;++r)this.changeListeners[r](t)}_checkChanges(t){new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach(n=>{t[n]!==this.cookies[n]&&this._emitChange({name:n,value:Nu(t[n])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,r={}){return r.doNotUpdate||this.update(),Nu(this.cookies[t],r)}getAll(t={}){t.doNotUpdate||this.update();const r={};for(let n in this.cookies)r[n]=Nu(this.cookies[n],t);return r}set(t,r,n){n?n=Object.assign(Object.assign({},this.defaultSetOptions),n):n=this.defaultSetOptions;const o=typeof r=="string"?r:JSON.stringify(r);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:o}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=ch(t,o,n)),this._emitChange({name:t,value:r,options:n})}remove(t,r){const n=r=Object.assign(Object.assign({},r),{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=ch(t,"",n)),this._emitChange({name:t,value:void 0,options:r})}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 r=this.changeListeners.indexOf(t);r>=0&&this.changeListeners.splice(r,1),this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}const Zm=pe.createContext(new Jm),{Provider:LE,Consumer:ON}=Zm,kE=Zm;class ME extends pe.Component{constructor(t){super(t),t.cookies?this.cookies=t.cookies:this.cookies=new Jm(void 0,t.defaultSetOptions)}render(){return pe.createElement(LE,{value:this.cookies},this.props.children)}}var wl={exports:{}},Le={};/** @license React v16.13.1
|
|
11
11
|
* react-is.production.min.js
|
|
12
12
|
*
|
|
13
13
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -98,4 +98,4 @@ For more details see https://formatjs.io/docs/getting-started/message-distributi
|
|
|
98
98
|
`},paragraph:{t:xC,i:Te.LOW,l:rl,h:(f,p,m)=>n("p",{key:m.k},p(f.v,m))},ref:{t:Kr(YA),i:Te.MAX,l:f=>(s[f[1]]={B:f[2],F:f[4]},{}),h:il},refImage:{t:Xr(KA),i:Te.MAX,l:f=>({D:f[1]||void 0,P:f[2]}),h:(f,p,m)=>n("img",{key:m.k,alt:f.D,src:xi(s[f.P].B),title:s[f.P].F})},refLink:{t:Kr(XA),i:Te.MAX,l:(f,p,m)=>({v:p(f[1],m),Z:p(f[0].replace(JA,"\\$1"),m),P:f[2]}),h:(f,p,m)=>s[f.P]?n("a",{key:m.k,href:xi(s[f.P].B),title:s[f.P].F},p(f.v,m)):n("span",{key:m.k},p(f.Z,m))},table:{t:Nr(Kv),i:Te.HIGH,l:TC,h:(f,p,m)=>n("table",{key:m.k},n("thead",null,n("tr",null,f.L.map(function(_,w){return n("th",{key:w,style:cm(f,w)},p(_,m))}))),n("tbody",null,f.A.map(function(_,w){return n("tr",{key:w},_.map(function(v,b){return n("td",{key:b,style:cm(f,b)},p(v,m))}))})))},tableSeparator:{t:function(f,p){return p.$?(p._=!0,tC.exec(f)):null},i:Te.HIGH,l:function(){return{type:"tableSeparator"}},h:()=>" | "},text:{t:gs(hC),i:Te.MIN,l:f=>({v:f[0].replace(HA,(p,m)=>t.namedCodesToUnicode[m]?t.namedCodesToUnicode[m]:p)}),h:f=>f.v},textBolded:{t:Xr(aC),i:Te.MED,l:(f,p,m)=>({v:p(f[2],m)}),h:(f,p,m)=>n("strong",{key:m.k},p(f.v,m))},textEmphasized:{t:Xr(uC),i:Te.LOW,l:(f,p,m)=>({v:p(f[2],m)}),h:(f,p,m)=>n("em",{key:m.k},p(f.v,m))},textEscaped:{t:Xr(fC),i:Te.HIGH,l:f=>({v:f[1],type:"text"})},textMarked:{t:Xr(cC),i:Te.LOW,l:rl,h:(f,p,m)=>n("mark",{key:m.k},p(f.v,m))},textStrikethroughed:{t:Xr(lC),i:Te.LOW,l:rl,h:(f,p,m)=>n("del",{key:m.k},p(f.v,m))}};t.disableParsingRawHTML!==!0&&(c.htmlBlock={t:gs(zl),i:Te.HIGH,l(f,p,m){const[,_]=f[3].match(pC),w=new RegExp(`^${_}`,"gm"),v=f[3].replace(w,""),b=(A=v,bC.some(L=>L.test(A))?AC:Ba);var A;const S=f[1].toLowerCase(),P=CA.indexOf(S)!==-1;m.N=m.N||S==="a";const R=P?f[3]:b(p,v,m);return m.N=!1,{O:i(f[2]),v:R,G:P,H:P?S:f[1]}},h:(f,p,m)=>n(f.H,qn({key:m.k},f.O),f.G?f.v:p(f.v,m))},c.htmlSelfClosing={t:gs(Ql),i:Te.HIGH,l:f=>({O:i(f[2]||""),H:f[1]}),h:(f,p,m)=>n(f.H,qn({},f.O,{key:m.k}))});const l=function(f){let p=Object.keys(f);function m(_,w){let v=[],b="";for(;_;){let A=0;for(;A<p.length;){const S=p[A],P=f[S],R=P.t(_,w,b);if(R){const L=R[0];_=_.substring(L.length);const k=P.l(R,m,w);k.type==null&&(k.type=S),v.push(k),b=L;break}A++}}return v}return p.sort(function(_,w){let v=f[_].i,b=f[w].i;return v!==b?v-b:_<w?-1:1}),function(_,w){return m(function(v){return v.replace(BA,`
|
|
99
99
|
`).replace($A,"").replace(eC," ")}(_),w)}}(c),u=(d=function(f){return function(p,m,_){return f[p.type].h(p,m,_)}}(c),function f(p,m={}){if(Array.isArray(p)){const _=m.k,w=[];let v=!1;for(let b=0;b<p.length;b++){m.k=b;const A=f(p[b],m),S=typeof A=="string";S&&v?w[w.length-1]+=A:A!==null&&w.push(A),v=S}return m.k=_,w}return d(p,f,m)});var d;const h=o(e);return a.length?n("div",null,h,n("footer",{key:"footer"},a.map(function(f){return n("div",{id:t.slugify(f.j),key:f.j},f.j,u(l(f.I,{_:!0})))}))):h}(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"})(Te||(Te={}));const Eu=e=>{let{children:t,options:r}=e,n=function(o,i){if(o==null)return{};var a,s,c={},l=Object.keys(o);for(s=0;s<l.length;s++)i.indexOf(a=l[s])>=0||(c[a]=o[a]);return c}(e,AA);return pe.cloneElement(RC(t,r),n)};const Dr=({variant:e="primary",className:t="",children:r,...n})=>x.jsx("div",{className:ue("highlighted-text-box",e,t),...n,children:r});const ra=({variant:e="empty",text:t=!1,button:r=!1,className:n=""})=>{let o=r&&!!Object.keys(r).length;const i=typeof r=="object"&&"breakpoints"in r,a=Js(i);if(i&&typeof r=="object"&&typeof a=="number"){const d=Object.assign({},r.breakpoints),h=sv(Object.keys(d));o=av(a,h,d)}const{breakpoints:s,text:c="",component:l,...u}=r;return x.jsx(Dr,{variant:"subtle",className:ue("empty-state-box",e,n),children:x.jsxs(x.Fragment,{children:[t&&x.jsx(Eu,{options:{forceBlock:!0},children:t}),o&&typeof r=="object"&&(l||x.jsx(ze,{...u,variant:r.variant?r.variant:"secondary",children:c}))]})})};const Yl=({children:e,...t})=>x.jsx("p",{...t,children:e}),u0={q:Yl,blockquote:Yl};for(let e=1;e<=6;e++)u0[`h${e}`]={component:Yl,props:{className:"title"}};const c0=({type:e="default",className:t="",heading:r=!1,children:n})=>x.jsxs("div",{className:ue("helper-text-box text-small",e,t),children:[r&&x.jsx("p",{className:"title",children:r}),typeof n=="string"?x.jsx(Eu,{options:{wrapper:$.Fragment,forceBlock:!0,overrides:u0},children:n}):x.jsx("p",{children:n})]});const PC=({className:e="",show:t=!1,hide:r=!1,text:n,children:o})=>{const i=Oe(),a=$.useRef(null),[s,c]=$.useState(""),[l,u]=$.useState("closed");$.useEffect(()=>{const f=a.current;if(f)return f.addEventListener("transitionend",d),()=>{f.removeEventListener("transitionend",d)}},[]),$.useEffect(()=>{if(!n||typeof n!="string")return;const f=n.split(`
|
|
100
100
|
`);c(f.length<3?`${n.substring(0,400)}...`:f.slice(0,3).join(`
|
|
101
|
-
`))},[n]),$.useEffect(()=>{l==="ready-to-close"&&u("closing")},[l]);const d=({propertyName:f})=>{f==="max-height"&&u(p=>p==="opening"?"open":p==="closing"?"closed":p)};if(!n)return null;const h=["opening","open"].includes(l);return x.jsxs(Dr,{variant:"subtle",className:ue("hide-show-text-box",e),children:[x.jsxs("div",{ref:a,className:ue("content",l),children:[x.jsx(Eu,{options:{forceBlock:!0},children:l==="closed"?s:n}),l!=="closed"&&o]}),x.jsx("p",{className:"cta",children:x.jsx(ze,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:ue({"rotate-180":h}),onClick:()=>{u(h?"ready-to-close":"opening")},children:h?r||i.formatMessage({id:"hideShowTextBox_hide"}):t||i.formatMessage({id:"hideShowTextBox_show"})})})]})},NC=()=>$.Fragment,IC=({children:e})=>x.jsx(Dr,{variant:"secondary",children:e}),LC=["span","strong","h1","h2","h3","h4","h5","h6","p"],kC=({children:e})=>{const t=Oe();if(!e)return null;let r=t.formatMessage({id:"markdown_collapsibleSection_summary"});const n=[];for(const i of $.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number"))if($.isValidElement(i)&&i.type==="summary"){if(i.props&&i.props.children){for(const a of $.Children.toArray(i.props.children))if(!(!a||typeof a=="string"||typeof a=="number")&&$.isValidElement(a)){const s=a.type;if(LC.includes(s)){for(r=a.props.children;typeof r!="string"&&(Array.isArray(r)&&r[0].props&&r[0].props.children&&r[0].props.children[0]);)r=r[0].props.children[0];break}}}}else n.push(i);const o=r?r.toString():"";return x.jsx(Hf,{label:o,className:["Sources","Resources"].includes(o)?"discrete-links":"",children:n.map(i=>i)})},MC=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return x.jsx(Dr,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return x.jsx(Dr,{variant:"primary",children:e});case"pink-textbox":return x.jsx(Dr,{variant:"tertiary",children:e});default:return x.jsx("div",{...t,children:e})}return x.jsx("div",{...t,children:e})},FC=e=>{const t=Oe(),r=Date.now().toString();let n="default";const o=e.src;return o.includes("youtube")||o.includes("vimeo")?n="video":o.includes("riddle")||o.includes("sli.do")?n="poll":o.includes("padlet")&&(n="padlet"),x.jsxs(x.Fragment,{children:[x.jsx(lt,{children:x.jsx("a",{href:`#content-after-iframe-${r}`,children:t.formatMessage({id:`markdown_skip${n==="default"?"":`_${n}`}`})})}),x.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${n==="default"?"":`_${n}`}`})}),x.jsx("span",{id:`content-after-iframe-${r}`,tabIndex:-1})]})},fm=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},BC=({children:e,...t})=>{let r={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(r.target="_blank");let n=e,o=!1;for(const i of $.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number")&&$.isValidElement(i)){const a=i.type;if(["button","center","span","strong"].includes(a)&&i.props&&i.props.children&&i.props.children[0])for((a==="button"||fm(i.props.children[0])==="button")&&(o=!0),n=i.props.children[0];n&&typeof n!="string"&&!(typeof n=="boolean"||typeof n=="number"||!$.isValidElement(n));)if(n.props&&n.props.children&&n.props.children[0])n=n.props.children[0],n&&fm(n)==="button"&&(o=!0);else break}return o?(r={...r,className:"button primary medium"},x.jsx("p",{className:"center",children:x.jsx(ze,{variant:"primary",size:"medium",...r,children:n})})):x.jsx("a",{...r,children:n})};const Kl=({className:e="",options:t={},children:r})=>{r=r.replace(/^<br\/?>/,"");const n={wrapper:$.Fragment,forceBlock:!0,overrides:{a:BC,CollapsibleSection:Hf,TextBox:Dr,CaseStudy:IC,style:NC,details:kC,div:MC,iframe:FC}};return x.jsx("div",{className:ue("markdown-text",e),children:x.jsx(Eu,{options:{...n,...t},children:r})})};const l0=({size:e="medium",variant:t="default",className:r="",children:n})=>x.jsx("span",{className:ue("pill",e,t,r),children:n});const Ka=({element:e="p",children:t=null,className:r="",...n})=>$.createElement(e,{...n,className:ue("status-banner text-small",r),"aria-live":"assertive"},t);const DC=({progress:e=0,text:t=!1,className:r=""})=>{const n=Oe(),o=e>75?100:e>50?75:e>25?50:e>5?25:0,i={"--progress":`${e}%`};return x.jsx("span",{className:ue(`progress-bar section-${o}`,r),style:i,children:x.jsx(lt,{children:t?`${e} ${t}`:n.formatMessage({id:"progressBar"},{number:e})})})},f0=$.memo(DC);const sl="loadingBlock_",UC=({progress:e=0,steps:t=!1,className:r=""})=>{const n=Oe();t||(t={0:{text:n.formatMessage({id:`${sl}loading`})},75:{text:n.formatMessage({id:`${sl}almostDone`})},100:{text:n.formatMessage({id:`${sl}complete`})}});let o=null;const i=Object.keys(t);for(let s=0;s<i.length&&!(e<parseInt(i[s]));s++)o=i[s];const a=o&&t[o].icon?{"--icon":`url(${Ya}icons/${t[o].icon}.svg)`}:{};return x.jsxs(Dr,{className:ue("loading-block",r,{"has-icon":o&&t[o].icon}),variant:"subtle",style:a,children:[o&&x.jsx("span",{className:"step",children:t[o].text}),x.jsx(f0,{progress:e})]})},$C=$.memo(UC);const gr=({element:e="div",className:t="",...r})=>x.jsx(yf,{element:e,className:ue("loading-placeholder",t),...r});const Xl={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"]},h0=(e,t)=>e in Xl?x.jsx("div",{className:e,children:Xl[e].map((r,n)=>h0(r,n))},t):x.jsx(gr,{className:e},t),d0=({layout:e="overview-page"})=>x.jsx("div",{className:ue("loading-state",e),children:Xl[e].map((t,r)=>h0(t,r))}),p0=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):""},Ra=["#5AB6A3","#A2D7AF","#806056","#3962B3"],jC=e=>{const t=Math.ceil(26/Ra.length),r=p0(e).toLowerCase();if(r==="")return Ra[0];const n=r.charCodeAt(0)-96;for(let o=0;o<Ra.length;o++)if(n<=t*(o+1))return Ra[o]};const hm=256,_u=({className:e="",src:t="",name:r,alt:n,width:o=hm,height:i=hm,...a})=>{const[s,c]=$.useState(!1),l=$.useRef(null);return $.useEffect(()=>{const u=l.current;if(!u)return;const d=u.getContext("2d");if(!d)return;const h=o,f=i;typeof window<"u"&&window.devicePixelRatio&&(u.width=h*window.devicePixelRatio,u.height=f*window.devicePixelRatio,d.scale(window.devicePixelRatio,window.devicePixelRatio)),d.fillStyle=jC(r),d.fillRect(0,0,h,f),d.font=`${h/3}px Arial`,d.textAlign="center",d.fillStyle="white",d.fillText(p0(r),h/2,f/1.6)},[r]),x.jsxs("figure",{className:ue("profile-picture",e,{error:s}),...a,children:[t!==""&&!s&&x.jsx("img",{src:t,alt:n||r,onError:()=>{c(!0)},width:o,height:i}),(t===""||s)&&x.jsx("canvas",{ref:l})]})},Vf=e=>e==="apolitical"?{image:`${Ya}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${Ya}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},HC=({role:e="",organisation:t="",country:r="",maximumCharacters:n=80})=>{const o=e!=="",i=t!=="",a=r!=="";if(!o&&!i&&!a)return"";const s=`${e}${o&&i?` — ${t}`:t}`;let c=`${s}${(o||i)&&a?`, ${r}`:r}`;return c.length>n&&(c=s),c.length>n&&(c=Hv(c,n)),c};const bu=({element:e="div",member:t="community",additionalContent:r=!1,gtmContext:n="member",gtmType:o="member-click",className:i=""})=>{const a=Oe(),s=Vf(t);s.name||(s.name=a.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:c,url:l,image:u}=s,d=HC(s),h=r&&r.createdAt?Gx(r.createdAt):!1,f=r&&r.createdAt?qx(r.createdAt):"";return $.createElement(e,{className:ue("member text-medium",i),children:x.jsxs(Ff,{href:l,gtmType:o,gtmContext:n,onClick:p=>{p==null||p.stopPropagation()},children:[x.jsx(_u,{name:c,src:u}),x.jsxs("p",{className:"details",children:[x.jsx("strong",{children:c}),r&&x.jsxs("span",{className:"additional-content",children:[r.createdAt&&h&&x.jsx("span",{className:"date",title:f,"aria-label":f,children:a.formatMessage({id:`dates_${h.path}`},{number:h.number})}),r.didEdit&&x.jsx("em",{children:a.formatMessage({id:"discussion_edited"})})]}),d&&x.jsx("small",{children:d})]})]})})};const dm={small:24,medium:48},m0=({element:e="div",contributors:{total:t,data:r}={total:void 0,data:[]},styling:{showText:n,size:o,showGap:i,showPlaceholders:a}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:s=2,className:c=""})=>{const l=Oe();return!r||r.length===0?null:$.createElement(e,{className:ue("contributors",c,o,{"has-gap":i}),children:x.jsxs(x.Fragment,{children:[x.jsx("ul",{children:r.map((u,d)=>{let h,f="";if(d<s){const{name:p="",image:m=""}=Vf(u);if(a)return x.jsx(gr,{element:"li",className:"contributor"},d);h=x.jsx(_u,{name:p,src:m,width:dm[o||"medium"],height:dm[o||"medium"]})}else if(d===s){const p=(t||r.length)-s;h=x.jsxs("small",{className:ue({"large-number":p>99}),children:["+",Qx(p,0)]}),f="number-left"}return h?x.jsx("li",{className:ue("contributor",f),children:h},d):null})}),n&&x.jsx("span",{className:"label",children:typeof n=="string"?n:r.length===1?typeof r[0]=="string"?l.formatMessage({id:`member_${r[0]}`}):Hv(r[0].name||"",20):null})]})})},qC=({children:e,locale:t,messages:r})=>{const n=t||"en",o={...zx[n],...r||{}};return x.jsx(yA,{locale:n,messages:o,children:e})},$r=$.createContext(null),GC=({children:e,user:t})=>x.jsx($r.Provider,{value:t,children:e});var fo=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(){}},io=typeof window>"u"||"Deno"in window;function jt(){}function VC(e,t){return typeof e=="function"?e(t):e}function Jl(e){return typeof e=="number"&&e>=0&&e!==1/0}function g0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pm(e,t){const{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(n){if(t.queryHash!==Wf(a,t.options))return!1}else if(!Os(t.queryKey,a))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||typeof o<"u"&&o!==t.state.fetchStatus||i&&!i(t))}function mm(e,t){const{exact:r,status:n,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(xs(t.options.mutationKey)!==xs(i))return!1}else if(!Os(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||o&&!o(t))}function Wf(e,t){return((t==null?void 0:t.queryKeyHashFn)||xs)(e)}function xs(e){return JSON.stringify(e,(t,r)=>Zl(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function Os(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!Os(e[r],t[r])):!1}function y0(e,t){if(e===t)return e;const r=gm(e)&&gm(t);if(r||Zl(e)&&Zl(t)){const n=r?e.length:Object.keys(e).length,o=r?t:Object.keys(t),i=o.length,a=r?[]:{};let s=0;for(let c=0;c<i;c++){const l=r?c:o[c];a[l]=y0(e[l],t[l]),a[l]===e[l]&&s++}return n===i&&s===n?e:a}return t}function Xa(e,t){if(e&&!t||t&&!e)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function gm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Zl(e){if(!ym(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!ym(r)||!r.hasOwnProperty("isPrototypeOf"))}function ym(e){return Object.prototype.toString.call(e)==="[object Object]"}function v0(e){return new Promise(t=>{setTimeout(t,e)})}function vm(e){v0(0).then(e)}function ef(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?y0(e,t):t}function WC(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function zC(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Gn,en,Ni,Um,QC=(Um=class extends fo{constructor(){super();ne(this,Gn,void 0);ne(this,en,void 0);ne(this,Ni,void 0);Z(this,Ni,t=>{if(!io&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){N(this,en)||this.setEventListener(N(this,Ni))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,en))==null||t.call(this),Z(this,en,void 0))}setEventListener(t){var r;Z(this,Ni,t),(r=N(this,en))==null||r.call(this),Z(this,en,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){N(this,Gn)!==t&&(Z(this,Gn,t),this.onFocus())}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){var t;return typeof N(this,Gn)=="boolean"?N(this,Gn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Gn=new WeakMap,en=new WeakMap,Ni=new WeakMap,Um),Ja=new QC,Ii,tn,Li,$m,YC=($m=class extends fo{constructor(){super();ne(this,Ii,!0);ne(this,tn,void 0);ne(this,Li,void 0);Z(this,Li,t=>{if(!io&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){N(this,tn)||this.setEventListener(N(this,Li))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,tn))==null||t.call(this),Z(this,tn,void 0))}setEventListener(t){var r;Z(this,Li,t),(r=N(this,tn))==null||r.call(this),Z(this,tn,t(this.setOnline.bind(this)))}setOnline(t){N(this,Ii)!==t&&(Z(this,Ii,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return N(this,Ii)}},Ii=new WeakMap,tn=new WeakMap,Li=new WeakMap,$m),As=new YC;function KC(e){return Math.min(1e3*2**e,3e4)}function wu(e){return(e??"online")==="online"?As.isOnline():!0}var E0=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function al(e){return e instanceof E0}function _0(e){let t=!1,r=0,n=!1,o,i,a;const s=new Promise((_,w)=>{i=_,a=w}),c=_=>{var w;n||(f(new E0(_)),(w=e.abort)==null||w.call(e))},l=()=>{t=!0},u=()=>{t=!1},d=()=>!Ja.isFocused()||e.networkMode!=="always"&&!As.isOnline(),h=_=>{var w;n||(n=!0,(w=e.onSuccess)==null||w.call(e,_),o==null||o(),i(_))},f=_=>{var w;n||(n=!0,(w=e.onError)==null||w.call(e,_),o==null||o(),a(_))},p=()=>new Promise(_=>{var w;o=v=>{const b=n||!d();return b&&_(v),b},(w=e.onPause)==null||w.call(e)}).then(()=>{var _;o=void 0,n||(_=e.onContinue)==null||_.call(e)}),m=()=>{if(n)return;let _;try{_=e.fn()}catch(w){_=Promise.reject(w)}Promise.resolve(_).then(h).catch(w=>{var P;if(n)return;const v=e.retry??(io?0:3),b=e.retryDelay??KC,A=typeof b=="function"?b(r,w):b,S=v===!0||typeof v=="number"&&r<v||typeof v=="function"&&v(r,w);if(t||!S){f(w);return}r++,(P=e.onFail)==null||P.call(e,r,w),v0(A).then(()=>{if(d())return p()}).then(()=>{t?f(w):m()})})};return wu(e.networkMode)?m():p().then(m),{promise:s,cancel:c,continue:()=>(o==null?void 0:o())?s:Promise.resolve(),cancelRetry:l,continueRetry:u}}function XC(){let e=[],t=0,r=u=>{u()},n=u=>{u()};const o=u=>{let d;t++;try{d=u()}finally{t--,t||s()}return d},i=u=>{t?e.push(u):vm(()=>{r(u)})},a=u=>(...d)=>{i(()=>{u(...d)})},s=()=>{const u=e;e=[],u.length&&vm(()=>{n(()=>{u.forEach(d=>{r(d)})})})};return{batch:o,batchCalls:a,schedule:i,setNotifyFunction:u=>{r=u},setBatchNotifyFunction:u=>{n=u}}}var Ke=XC(),Vn,jm,b0=(jm=class{constructor(){ne(this,Vn,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Jl(this.gcTime)&&Z(this,Vn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(io?1/0:5*60*1e3))}clearGcTimeout(){N(this,Vn)&&(clearTimeout(N(this,Vn)),Z(this,Vn,void 0))}},Vn=new WeakMap,jm),ki,Mi,Bt,rn,Dt,it,Is,Wn,Fi,Da,Zt,kr,Hm,JC=(Hm=class extends b0{constructor(t){super();ne(this,Fi);ne(this,Zt);ne(this,ki,void 0);ne(this,Mi,void 0);ne(this,Bt,void 0);ne(this,rn,void 0);ne(this,Dt,void 0);ne(this,it,void 0);ne(this,Is,void 0);ne(this,Wn,void 0);Z(this,Wn,!1),Z(this,Is,t.defaultOptions),ye(this,Fi,Da).call(this,t.options),Z(this,it,[]),Z(this,Bt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Z(this,ki,t.state||ZC(this.options)),this.state=N(this,ki),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!N(this,it).length&&this.state.fetchStatus==="idle"&&N(this,Bt).remove(this)}setData(t,r){const n=ef(this.state.data,t,this.options);return ye(this,Zt,kr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){ye(this,Zt,kr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n;const r=N(this,rn);return(n=N(this,Dt))==null||n.cancel(t),r?r.then(jt).catch(jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(N(this,ki))}isActive(){return N(this,it).some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||N(this,it).some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!g0(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=N(this,it).find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,Dt))==null||r.continue()}onOnline(){var r;const t=N(this,it).find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,Dt))==null||r.continue()}addObserver(t){N(this,it).includes(t)||(N(this,it).push(t),this.clearGcTimeout(),N(this,Bt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){N(this,it).includes(t)&&(Z(this,it,N(this,it).filter(r=>r!==t)),N(this,it).length||(N(this,Dt)&&(N(this,Wn)?N(this,Dt).cancel({revert:!0}):N(this,Dt).cancelRetry()),this.scheduleGc()),N(this,Bt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return N(this,it).length}invalidate(){this.state.isInvalidated||ye(this,Zt,kr).call(this,{type:"invalidate"})}fetch(t,r){var l,u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(N(this,rn))return(l=N(this,Dt))==null||l.continueRetry(),N(this,rn)}if(t&&ye(this,Fi,Da).call(this,t),!this.options.queryFn){const f=N(this,it).find(p=>p.options.queryFn);f&&ye(this,Fi,Da).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 n=new AbortController,o={queryKey:this.queryKey,meta:this.meta},i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(Z(this,Wn,!0),n.signal)})};i(o);const a=()=>this.options.queryFn?(Z(this,Wn,!1),this.options.persister?this.options.persister(this.options.queryFn,o,this):this.options.queryFn(o)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)),s={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:a};i(s),(u=this.options.behavior)==null||u.onFetch(s,this),Z(this,Mi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=s.fetchOptions)==null?void 0:d.meta))&&ye(this,Zt,kr).call(this,{type:"fetch",meta:(h=s.fetchOptions)==null?void 0:h.meta});const c=f=>{var p,m,_,w;al(f)&&f.silent||ye(this,Zt,kr).call(this,{type:"error",error:f}),al(f)||((m=(p=N(this,Bt).config).onError)==null||m.call(p,f,this),(w=(_=N(this,Bt).config).onSettled)==null||w.call(_,this.state.data,f,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return Z(this,Dt,_0({fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var p,m,_,w;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}`),c(new Error(`${this.queryHash} data is undefined`));return}this.setData(f),(m=(p=N(this,Bt).config).onSuccess)==null||m.call(p,f,this),(w=(_=N(this,Bt).config).onSettled)==null||w.call(_,f,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:c,onFail:(f,p)=>{ye(this,Zt,kr).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{ye(this,Zt,kr).call(this,{type:"pause"})},onContinue:()=>{ye(this,Zt,kr).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode})),Z(this,rn,N(this,Dt).promise),N(this,rn)}},ki=new WeakMap,Mi=new WeakMap,Bt=new WeakMap,rn=new WeakMap,Dt=new WeakMap,it=new WeakMap,Is=new WeakMap,Wn=new WeakMap,Fi=new WeakSet,Da=function(t){this.options={...N(this,Is),...t},this.updateGcTime(this.options.gcTime)},Zt=new WeakSet,kr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:t.meta??null,fetchStatus:wu(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return al(o)&&o.revert&&N(this,Mi)?{...N(this,Mi),fetchStatus:"idle"}:{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Ke.batch(()=>{N(this,it).forEach(n=>{n.onQueryUpdate()}),N(this,Bt).notify({query:this,type:"updated",action:t})})},Hm);function ZC(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=typeof t<"u",n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var cr,qm,e1=(qm=class extends fo{constructor(t={}){super();ne(this,cr,void 0);this.config=t,Z(this,cr,new Map)}build(t,r,n){const o=r.queryKey,i=r.queryHash??Wf(o,r);let a=this.get(i);return a||(a=new JC({cache:this,queryKey:o,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){N(this,cr).has(t.queryHash)||(N(this,cr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=N(this,cr).get(t.queryHash);r&&(t.destroy(),r===t&&N(this,cr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,cr).get(t)}getAll(){return[...N(this,cr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>pm(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>pm(t,n)):r}notify(t){Ke.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},cr=new WeakMap,qm),lr,Ls,Lt,Bi,fr,Jr,Gm,t1=(Gm=class extends b0{constructor(t){super();ne(this,fr);ne(this,lr,void 0);ne(this,Ls,void 0);ne(this,Lt,void 0);ne(this,Bi,void 0);this.mutationId=t.mutationId,Z(this,Ls,t.defaultOptions),Z(this,Lt,t.mutationCache),Z(this,lr,[]),this.state=t.state||w0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...N(this,Ls),...t},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){N(this,lr).includes(t)||(N(this,lr).push(t),this.clearGcTimeout(),N(this,Lt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Z(this,lr,N(this,lr).filter(r=>r!==t)),this.scheduleGc(),N(this,Lt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,lr).length||(this.state.status==="pending"?this.scheduleGc():N(this,Lt).remove(this))}continue(){var t;return((t=N(this,Bi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,s,c,l,u,d,h,f,p,m,_,w,v,b,A,S,P,R;const r=()=>(Z(this,Bi,_0({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(L,k)=>{ye(this,fr,Jr).call(this,{type:"failed",failureCount:L,error:k})},onPause:()=>{ye(this,fr,Jr).call(this,{type:"pause"})},onContinue:()=>{ye(this,fr,Jr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),N(this,Bi).promise),n=this.state.status==="pending";try{if(!n){ye(this,fr,Jr).call(this,{type:"pending",variables:t}),await((i=(o=N(this,Lt).config).onMutate)==null?void 0:i.call(o,t,this));const k=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,t));k!==this.state.context&&ye(this,fr,Jr).call(this,{type:"pending",context:k,variables:t})}const L=await r();return await((l=(c=N(this,Lt).config).onSuccess)==null?void 0:l.call(c,L,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,L,t,this.state.context)),await((f=(h=N(this,Lt).config).onSettled)==null?void 0:f.call(h,L,null,this.state.variables,this.state.context,this)),await((m=(p=this.options).onSettled)==null?void 0:m.call(p,L,null,t,this.state.context)),ye(this,fr,Jr).call(this,{type:"success",data:L}),L}catch(L){try{throw await((w=(_=N(this,Lt).config).onError)==null?void 0:w.call(_,L,t,this.state.context,this)),await((b=(v=this.options).onError)==null?void 0:b.call(v,L,t,this.state.context)),await((S=(A=N(this,Lt).config).onSettled)==null?void 0:S.call(A,void 0,L,this.state.variables,this.state.context,this)),await((R=(P=this.options).onSettled)==null?void 0:R.call(P,void 0,L,t,this.state.context)),L}finally{ye(this,fr,Jr).call(this,{type:"error",error:L})}}}},lr=new WeakMap,Ls=new WeakMap,Lt=new WeakMap,Bi=new WeakMap,fr=new WeakSet,Jr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!wu(this.options.networkMode),status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ke.batch(()=>{N(this,lr).forEach(n=>{n.onMutationUpdate(t)}),N(this,Lt).notify({mutation:this,type:"updated",action:t})})},Gm);function w0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ut,ks,zn,Vm,r1=(Vm=class extends fo{constructor(t={}){super();ne(this,Ut,void 0);ne(this,ks,void 0);ne(this,zn,void 0);this.config=t,Z(this,Ut,[]),Z(this,ks,0)}build(t,r,n){const o=new t1({mutationCache:this,mutationId:++oa(this,ks)._,options:t.defaultMutationOptions(r),state:n});return this.add(o),o}add(t){N(this,Ut).push(t),this.notify({type:"added",mutation:t})}remove(t){Z(this,Ut,N(this,Ut).filter(r=>r!==t)),this.notify({type:"removed",mutation:t})}clear(){Ke.batch(()=>{N(this,Ut).forEach(t=>{this.remove(t)})})}getAll(){return N(this,Ut)}find(t){const r={exact:!0,...t};return N(this,Ut).find(n=>mm(r,n))}findAll(t={}){return N(this,Ut).filter(r=>mm(t,r))}notify(t){Ke.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){return Z(this,zn,(N(this,zn)??Promise.resolve()).then(()=>{const t=N(this,Ut).filter(r=>r.state.isPaused);return Ke.batch(()=>t.reduce((r,n)=>r.then(()=>n.continue().catch(jt)),Promise.resolve()))}).then(()=>{Z(this,zn,void 0)})),N(this,zn)}},Ut=new WeakMap,ks=new WeakMap,zn=new WeakMap,Vm);function n1(e){return{onFetch:(t,r)=>{const n=async()=>{var p,m,_,w,v;const o=t.options,i=(_=(m=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:m.fetchMore)==null?void 0:_.direction,a=((w=t.state.data)==null?void 0:w.pages)||[],s=((v=t.state.data)==null?void 0:v.pageParams)||[],c={pages:[],pageParams:[]};let l=!1;const u=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?l=!0:t.signal.addEventListener("abort",()=>{l=!0}),t.signal)})},d=t.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${t.options.queryHash}'`))),h=async(b,A,S)=>{if(l)return Promise.reject();if(A==null&&b.pages.length)return Promise.resolve(b);const P={queryKey:t.queryKey,pageParam:A,direction:S?"backward":"forward",meta:t.options.meta};u(P);const R=await d(P),{maxPages:L}=t.options,k=S?zC:WC;return{pages:k(b.pages,R,L),pageParams:k(b.pageParams,A,L)}};let f;if(i&&a.length){const b=i==="backward",A=b?i1:Em,S={pages:a,pageParams:s},P=A(o,S);f=await h(S,P,b)}else{f=await h(c,s[0]??o.initialPageParam);const b=e??a.length;for(let A=1;A<b;A++){const S=Em(o,f);f=await h(f,S)}}return f};t.options.persister?t.fetchFn=()=>{var o,i;return(i=(o=t.options).persister)==null?void 0:i.call(o,n,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=n}}}function Em(e,{pages:t,pageParams:r}){const n=t.length-1;return e.getNextPageParam(t[n],t,r[n],r)}function i1(e,{pages:t,pageParams:r}){var n;return(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r)}var Ye,nn,on,Di,Ui,sn,$i,ji,Wm,o1=(Wm=class{constructor(e={}){ne(this,Ye,void 0);ne(this,nn,void 0);ne(this,on,void 0);ne(this,Di,void 0);ne(this,Ui,void 0);ne(this,sn,void 0);ne(this,$i,void 0);ne(this,ji,void 0);Z(this,Ye,e.queryCache||new e1),Z(this,nn,e.mutationCache||new r1),Z(this,on,e.defaultOptions||{}),Z(this,Di,new Map),Z(this,Ui,new Map),Z(this,sn,0)}mount(){oa(this,sn)._++,N(this,sn)===1&&(Z(this,$i,Ja.subscribe(()=>{Ja.isFocused()&&(this.resumePausedMutations(),N(this,Ye).onFocus())})),Z(this,ji,As.subscribe(()=>{As.isOnline()&&(this.resumePausedMutations(),N(this,Ye).onOnline())})))}unmount(){var e,t;oa(this,sn)._--,N(this,sn)===0&&((e=N(this,$i))==null||e.call(this),Z(this,$i,void 0),(t=N(this,ji))==null||t.call(this),Z(this,ji,void 0))}isFetching(e){return N(this,Ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,nn).findAll({...e,status:"pending"}).length}getQueryData(e){var t;return(t=N(this,Ye).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:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=N(this,Ye).find({queryKey:e}),o=n==null?void 0:n.state.data,i=VC(t,o);if(typeof i>"u")return;const a=this.defaultQueryOptions({queryKey:e});return N(this,Ye).build(this,a).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Ke.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var t;return(t=N(this,Ye).find({queryKey:e}))==null?void 0:t.state}removeQueries(e){const t=N(this,Ye);Ke.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=N(this,Ye),n={type:"active",...e};return Ke.batch(()=>(r.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries(n,t)))}cancelQueries(e={},t={}){const r={revert:!0,...t},n=Ke.batch(()=>N(this,Ye).findAll(e).map(o=>o.cancel(r)));return Promise.all(n).then(jt).catch(jt)}invalidateQueries(e={},t={}){return Ke.batch(()=>{if(N(this,Ye).findAll(e).forEach(n=>{n.invalidate()}),e.refetchType==="none")return Promise.resolve();const r={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(r,t)})}refetchQueries(e={},t){const r={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},n=Ke.batch(()=>N(this,Ye).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,r);return r.throwOnError||(i=i.catch(jt)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);typeof t.retry>"u"&&(t.retry=!1);const r=N(this,Ye).build(this,t);return r.isStaleByTime(t.staleTime)?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jt).catch(jt)}fetchInfiniteQuery(e){return e.behavior=n1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jt).catch(jt)}resumePausedMutations(){return N(this,nn).resumePausedMutations()}getQueryCache(){return N(this,Ye)}getMutationCache(){return N(this,nn)}getDefaultOptions(){return N(this,on)}setDefaultOptions(e){Z(this,on,e)}setQueryDefaults(e,t){N(this,Di).set(xs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,Di).values()];let r={};return t.forEach(n=>{Os(e,n.queryKey)&&(r={...r,...n.defaultOptions})}),r}setMutationDefaults(e,t){N(this,Ui).set(xs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,Ui).values()];let r={};return t.forEach(n=>{Os(e,n.mutationKey)&&(r={...r,...n.defaultOptions})}),r}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const t={...N(this,on).queries,...(e==null?void 0:e.queryKey)&&this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Wf(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:{...N(this,on).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,Ye).clear(),N(this,nn).clear()}},Ye=new WeakMap,nn=new WeakMap,on=new WeakMap,Di=new WeakMap,Ui=new WeakMap,sn=new WeakMap,$i=new WeakMap,ji=new WeakMap,Wm),Ot,De,Hi,pt,Qn,qi,hr,Ms,Gi,Vi,Yn,Kn,an,Xn,Jn,ys,Fs,tf,Bs,rf,Ds,nf,Us,of,$s,sf,js,af,Hs,uf,lu,S0,zm,s1=(zm=class extends fo{constructor(t,r){super();ne(this,Jn);ne(this,Fs);ne(this,Bs);ne(this,Ds);ne(this,Us);ne(this,$s);ne(this,js);ne(this,Hs);ne(this,lu);ne(this,Ot,void 0);ne(this,De,void 0);ne(this,Hi,void 0);ne(this,pt,void 0);ne(this,Qn,void 0);ne(this,qi,void 0);ne(this,hr,void 0);ne(this,Ms,void 0);ne(this,Gi,void 0);ne(this,Vi,void 0);ne(this,Yn,void 0);ne(this,Kn,void 0);ne(this,an,void 0);ne(this,Xn,void 0);Z(this,De,void 0),Z(this,Hi,void 0),Z(this,pt,void 0),Z(this,Xn,new Set),Z(this,Ot,t),this.options=r,Z(this,hr,null),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,De).addObserver(this),_m(N(this,De),this.options)&&ye(this,Jn,ys).call(this),ye(this,Us,of).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return cf(N(this,De),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return cf(N(this,De),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ye(this,$s,sf).call(this),ye(this,js,af).call(this),N(this,De).removeObserver(this)}setOptions(t,r){const n=this.options,o=N(this,De);if(this.options=N(this,Ot).defaultQueryOptions(t),Xa(n,this.options)||N(this,Ot).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,De),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=n.queryKey),ye(this,Hs,uf).call(this);const i=this.hasListeners();i&&bm(N(this,De),o,this.options,n)&&ye(this,Jn,ys).call(this),this.updateResult(r),i&&(N(this,De)!==o||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&ye(this,Fs,tf).call(this);const a=ye(this,Bs,rf).call(this);i&&(N(this,De)!==o||this.options.enabled!==n.enabled||a!==N(this,an))&&ye(this,Ds,nf).call(this,a)}getOptimisticResult(t){const r=N(this,Ot).getQueryCache().build(N(this,Ot),t),n=this.createResult(r,t);return u1(this,n)&&(Z(this,pt,n),Z(this,qi,this.options),Z(this,Qn,N(this,De).state)),n}getCurrentResult(){return N(this,pt)}trackResult(t){const r={};return Object.keys(t).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(N(this,Xn).add(n),t[n])})}),r}getCurrentQuery(){return N(this,De)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=N(this,Ot).defaultQueryOptions(t),n=N(this,Ot).getQueryCache().build(N(this,Ot),r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ye(this,Jn,ys).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,pt)))}createResult(t,r){var P;const n=N(this,De),o=this.options,i=N(this,pt),a=N(this,Qn),s=N(this,qi),l=t!==n?t.state:N(this,Hi),{state:u}=t;let{error:d,errorUpdatedAt:h,fetchStatus:f,status:p}=u,m=!1,_;if(r._optimisticResults){const R=this.hasListeners(),L=!R&&_m(t,r),k=R&&bm(t,n,r,o);(L||k)&&(f=wu(t.options.networkMode)?"fetching":"paused",u.dataUpdatedAt||(p="pending")),r._optimisticResults==="isRestoring"&&(f="idle")}if(r.select&&typeof u.data<"u")if(i&&u.data===(a==null?void 0:a.data)&&r.select===N(this,Ms))_=N(this,Gi);else try{Z(this,Ms,r.select),_=r.select(u.data),_=ef(i==null?void 0:i.data,_,r),Z(this,Gi,_),Z(this,hr,null)}catch(R){Z(this,hr,R)}else _=u.data;if(typeof r.placeholderData<"u"&&typeof _>"u"&&p==="pending"){let R;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData))R=i.data;else if(R=typeof r.placeholderData=="function"?r.placeholderData((P=N(this,Vi))==null?void 0:P.state.data,N(this,Vi)):r.placeholderData,r.select&&typeof R<"u")try{R=r.select(R),Z(this,hr,null)}catch(L){Z(this,hr,L)}typeof R<"u"&&(p="success",_=ef(i==null?void 0:i.data,R,r),m=!0)}N(this,hr)&&(d=N(this,hr),_=N(this,Gi),h=Date.now(),p="error");const w=f==="fetching",v=p==="pending",b=p==="error",A=v&&w;return{status:p,fetchStatus:f,isPending:v,isSuccess:p==="success",isError:b,isInitialLoading:A,isLoading:A,data:_,dataUpdatedAt:u.dataUpdatedAt,error:d,errorUpdatedAt:h,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>l.dataUpdateCount||u.errorUpdateCount>l.errorUpdateCount,isFetching:w,isRefetching:w&&!v,isLoadingError:b&&u.dataUpdatedAt===0,isPaused:f==="paused",isPlaceholderData:m,isRefetchError:b&&u.dataUpdatedAt!==0,isStale:zf(t,r),refetch:this.refetch}}updateResult(t){const r=N(this,pt),n=this.createResult(N(this,De),this.options);if(Z(this,Qn,N(this,De).state),Z(this,qi,this.options),Xa(n,r))return;N(this,Qn).data!==void 0&&Z(this,Vi,N(this,De)),Z(this,pt,n);const o={},i=()=>{if(!r)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!N(this,Xn).size)return!0;const c=new Set(s??N(this,Xn));return this.options.throwOnError&&c.add("error"),Object.keys(N(this,pt)).some(l=>{const u=l;return N(this,pt)[u]!==r[u]&&c.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),ye(this,lu,S0).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ye(this,Us,of).call(this)}},Ot=new WeakMap,De=new WeakMap,Hi=new WeakMap,pt=new WeakMap,Qn=new WeakMap,qi=new WeakMap,hr=new WeakMap,Ms=new WeakMap,Gi=new WeakMap,Vi=new WeakMap,Yn=new WeakMap,Kn=new WeakMap,an=new WeakMap,Xn=new WeakMap,Jn=new WeakSet,ys=function(t){ye(this,Hs,uf).call(this);let r=N(this,De).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(jt)),r},Fs=new WeakSet,tf=function(){if(ye(this,$s,sf).call(this),io||N(this,pt).isStale||!Jl(this.options.staleTime))return;const r=g0(N(this,pt).dataUpdatedAt,this.options.staleTime)+1;Z(this,Yn,setTimeout(()=>{N(this,pt).isStale||this.updateResult()},r))},Bs=new WeakSet,rf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,De)):this.options.refetchInterval)??!1},Ds=new WeakSet,nf=function(t){ye(this,js,af).call(this),Z(this,an,t),!(io||this.options.enabled===!1||!Jl(N(this,an))||N(this,an)===0)&&Z(this,Kn,setInterval(()=>{(this.options.refetchIntervalInBackground||Ja.isFocused())&&ye(this,Jn,ys).call(this)},N(this,an)))},Us=new WeakSet,of=function(){ye(this,Fs,tf).call(this),ye(this,Ds,nf).call(this,ye(this,Bs,rf).call(this))},$s=new WeakSet,sf=function(){N(this,Yn)&&(clearTimeout(N(this,Yn)),Z(this,Yn,void 0))},js=new WeakSet,af=function(){N(this,Kn)&&(clearInterval(N(this,Kn)),Z(this,Kn,void 0))},Hs=new WeakSet,uf=function(){const t=N(this,Ot).getQueryCache().build(N(this,Ot),this.options);if(t===N(this,De))return;const r=N(this,De);Z(this,De,t),Z(this,Hi,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},lu=new WeakSet,S0=function(t){Ke.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(N(this,pt))}),N(this,Ot).getQueryCache().notify({query:N(this,De),type:"observerResultsUpdated"})})},zm);function a1(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function _m(e,t){return a1(e,t)||e.state.dataUpdatedAt>0&&cf(e,t,t.refetchOnMount)}function cf(e,t,r){if(t.enabled!==!1){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&zf(e,t)}return!1}function bm(e,t,r,n){return r.enabled!==!1&&(e!==t||n.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&zf(e,r)}function zf(e,t){return e.isStaleByTime(t.staleTime)}function u1(e,t){return!Xa(e.getCurrentResult(),t)}var un,Et,$t,Fr,Wi,Ua,qs,lf,Qm,c1=(Qm=class extends fo{constructor(t,r){super();ne(this,Wi);ne(this,qs);ne(this,un,void 0);ne(this,Et,void 0);ne(this,$t,void 0);ne(this,Fr,void 0);Z(this,Et,void 0),Z(this,un,t),this.setOptions(r),this.bindMethods(),ye(this,Wi,Ua).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=N(this,un).defaultMutationOptions(t),Xa(r,this.options)||N(this,un).getMutationCache().notify({type:"observerOptionsUpdated",mutation:N(this,$t),observer:this}),(n=N(this,$t))==null||n.setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=N(this,$t))==null||t.removeObserver(this)}onMutationUpdate(t){ye(this,Wi,Ua).call(this),ye(this,qs,lf).call(this,t)}getCurrentResult(){return N(this,Et)}reset(){Z(this,$t,void 0),ye(this,Wi,Ua).call(this),ye(this,qs,lf).call(this)}mutate(t,r){var n;return Z(this,Fr,r),(n=N(this,$t))==null||n.removeObserver(this),Z(this,$t,N(this,un).getMutationCache().build(N(this,un),this.options)),N(this,$t).addObserver(this),N(this,$t).execute(t)}},un=new WeakMap,Et=new WeakMap,$t=new WeakMap,Fr=new WeakMap,Wi=new WeakSet,Ua=function(){var r;const t=((r=N(this,$t))==null?void 0:r.state)??w0();Z(this,Et,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},qs=new WeakSet,lf=function(t){Ke.batch(()=>{var r,n,o,i,a,s,c,l;N(this,Fr)&&this.hasListeners()&&((t==null?void 0:t.type)==="success"?((n=(r=N(this,Fr)).onSuccess)==null||n.call(r,t.data,N(this,Et).variables,N(this,Et).context),(i=(o=N(this,Fr)).onSettled)==null||i.call(o,t.data,null,N(this,Et).variables,N(this,Et).context)):(t==null?void 0:t.type)==="error"&&((s=(a=N(this,Fr)).onError)==null||s.call(a,t.error,N(this,Et).variables,N(this,Et).context),(l=(c=N(this,Fr)).onSettled)==null||l.call(c,void 0,t.error,N(this,Et).variables,N(this,Et).context))),this.listeners.forEach(u=>{u(N(this,Et))})})},Qm),T0=pe.createContext(void 0),ho=e=>{const t=pe.useContext(T0);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},l1=({client:e,children:t})=>(pe.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),pe.createElement(T0.Provider,{value:e},t)),x0=pe.createContext(!1),f1=()=>pe.useContext(x0);x0.Provider;function h1(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var d1=pe.createContext(h1()),p1=()=>pe.useContext(d1);function O0(e,t){return typeof e=="function"?e(...t):!!e}var m1=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},g1=e=>{pe.useEffect(()=>{e.clearReset()},[e])},y1=({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&O0(r,[e.error,n]),v1=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},E1=(e,t)=>e.isLoading&&e.isFetching&&!t,_1=(e,t,r)=>(e==null?void 0:e.suspense)&&E1(t,r),b1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function w1(e,t,r){const n=ho(r),o=f1(),i=p1(),a=n.defaultQueryOptions(e);a._optimisticResults=o?"isRestoring":"optimistic",v1(a),m1(a,i),g1(i);const[s]=pe.useState(()=>new t(n,a)),c=s.getOptimisticResult(a);if(pe.useSyncExternalStore(pe.useCallback(l=>{const u=o?()=>{}:s.subscribe(Ke.batchCalls(l));return s.updateResult(),u},[s,o]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),pe.useEffect(()=>{s.setOptions(a,{listeners:!1})},[a,s]),_1(a,c,o))throw b1(a,s,i);if(y1({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:s.getCurrentQuery()}))throw c.error;return a.notifyOnChangeProps?c:s.trackResult(c)}function A0(e,t){return w1(e,s1,t)}function fn(e,t){const r=ho(t),[n]=pe.useState(()=>new c1(r,e));pe.useEffect(()=>{n.setOptions(e)},[n,e]);const o=pe.useSyncExternalStore(pe.useCallback(a=>n.subscribe(Ke.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=pe.useCallback((a,s)=>{n.mutate(a,s).catch(S1)},[n]);if(o.error&&O0(n.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}function S1(){}var ve={context:void 0,registry:void 0};function vs(e){ve.context=e}var T1=(e,t)=>e===t,Cs=Symbol("solid-proxy"),Qf=Symbol("solid-track"),x1=Symbol("solid-dev-component"),Za={equals:T1},C0=I0,jr=1,eu=2,R0={owned:null,cleanups:null,context:null,owner:null},ul={},Ue=null,cl=null,Me=null,mt=null,Ur=null,Su=0,[O1,RN]=bt(!1);function hn(e,t){const r=Me,n=Ue,o=e.length===0,i=o?R0:{owned:null,cleanups:null,context:null,owner:t===void 0?n:t},a=o?e:()=>e(()=>Xe(()=>xu(i)));Ue=i,Me=null;try{return yr(a,!0)}finally{Me=r,Ue=n}}function bt(e,t){t=t?Object.assign({},Za,t):Za;const r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=o=>(typeof o=="function"&&(o=o(r.value)),N0(r,o));return[P0.bind(r),n]}function ff(e,t,r){const n=Tu(e,t,!0,jr);po(n)}function dn(e,t,r){const n=Tu(e,t,!1,jr);po(n)}function Yf(e,t,r){C0=$1;const n=Tu(e,t,!1,jr);(!r||!r.render)&&(n.user=!0),Ur?Ur.push(n):po(n)}function St(e,t,r){r=r?Object.assign({},Za,r):Za;const n=Tu(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,po(n),P0.bind(n)}function A1(e,t,r){let n,o,i;arguments.length===2&&typeof t=="object"||arguments.length===1?(n=!0,o=e,i=t||{}):(n=e,o=t,i=r||{});let a=null,s=ul,c=null,l=!1,u="initialValue"in i,d=typeof n=="function"&&St(n);const h=new Set,[f,p]=(i.storage||bt)(i.initialValue),[m,_]=bt(void 0),[w,v]=bt(void 0,{equals:!1}),[b,A]=bt(u?"ready":"unresolved");if(ve.context){c=`${ve.context.id}${ve.context.count++}`;let k;i.ssrLoadFrom==="initial"?s=i.initialValue:ve.load&&(k=ve.load(c))&&(s=k[0])}function S(k,q,G,H){return a===k&&(a=null,H!==void 0&&(u=!0),(k===s||q===s)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(H,{value:q})),s=ul,P(q,G)),q}function P(k,q){yr(()=>{q===void 0&&p(()=>k),A(q!==void 0?"errored":u?"ready":"unresolved"),_(q);for(const G of h.keys())G.decrement();h.clear()},!1)}function R(){const k=B1,q=f(),G=m();if(G!==void 0&&!a)throw G;return Me&&!Me.user&&k&&ff(()=>{w(),a&&(k.resolved||h.has(k)||(k.increment(),h.add(k)))}),q}function L(k=!0){if(k!==!1&&l)return;l=!1;const q=d?d():n;if(q==null||q===!1){S(a,Xe(f));return}const G=s!==ul?s:Xe(()=>o(q,{value:f(),refetching:k}));return typeof G!="object"||!(G&&"then"in G)?(S(a,G,void 0,q),G):(a=G,l=!0,queueMicrotask(()=>l=!1),yr(()=>{A(u?"refreshing":"pending"),v()},!1),G.then(H=>S(G,H,void 0,q),H=>S(G,void 0,k0(H),q)))}return Object.defineProperties(R,{state:{get:()=>b()},error:{get:()=>m()},loading:{get(){const k=b();return k==="pending"||k==="refreshing"}},latest:{get(){if(!u)return R();const k=m();if(k&&!a)throw k;return f()}}}),d?ff(()=>L(!1)):L(!1),[R,{refetch:L,mutate:p}]}function C1(e){return yr(e,!1)}function Xe(e){if(Me===null)return e();const t=Me;Me=null;try{return e()}finally{Me=t}}function R1(e,t,r){const n=Array.isArray(e);let o,i=r&&r.defer;return a=>{let s;if(n){s=Array(e.length);for(let l=0;l<e.length;l++)s[l]=e[l]()}else s=e();if(i){i=!1;return}const c=Xe(()=>t(s,o,a));return o=s,c}}function P1(e){Yf(()=>Xe(e))}function Rs(e){return Ue===null||(Ue.cleanups===null?Ue.cleanups=[e]:Ue.cleanups.push(e)),e}function N1(){return Me}function wm(){return Ue}function I1(e,t){const r=Ue,n=Me;Ue=e,Me=null;try{return yr(t,!0)}catch(o){Xf(o)}finally{Ue=r,Me=n}}function L1(e){const t=Me,r=Ue;return Promise.resolve().then(()=>{Me=t,Ue=r;let n;return yr(e,!1),Me=Ue=null,n?n.done:void 0})}function k1(){return[O1,L1]}function M1(e,t){const r=Symbol("context");return{id:r,Provider:j1(r),defaultValue:e}}function F1(e){let t;return(t=M0(Ue,e.id))!==void 0?t:e.defaultValue}function Kf(e){const t=St(e),r=St(()=>hf(t()));return r.toArray=()=>{const n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}var B1;function P0(){if(this.sources&&this.state)if(this.state===jr)po(this);else{const e=mt;mt=null,yr(()=>ru(this),!1),mt=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 N0(e,t,r){let n=e.value;return(!e.comparator||!e.comparator(n,t))&&(e.value=t,e.observers&&e.observers.length&&yr(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],a=cl&&cl.running;a&&cl.disposed.has(i),(a?!i.tState:!i.state)&&(i.pure?mt.push(i):Ur.push(i),i.observers&&L0(i)),a||(i.state=jr)}if(mt.length>1e6)throw mt=[],new Error},!1)),t}function po(e){if(!e.fn)return;xu(e);const t=Ue,r=Me,n=Su;Me=Ue=e,D1(e,e.value,n),Me=r,Ue=t}function D1(e,t,r){let n;try{n=e.fn(t)}catch(o){return e.pure&&(e.state=jr,e.owned&&e.owned.forEach(xu),e.owned=null),e.updatedAt=r+1,Xf(o)}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?N0(e,n):e.value=n,e.updatedAt=r)}function Tu(e,t,r,n=jr,o){const i={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Ue,context:null,pure:r};return Ue===null||Ue!==R0&&(Ue.owned?Ue.owned.push(i):Ue.owned=[i]),i}function tu(e){if(e.state===0)return;if(e.state===eu)return ru(e);if(e.suspense&&Xe(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Su);)e.state&&t.push(e);for(let r=t.length-1;r>=0;r--)if(e=t[r],e.state===jr)po(e);else if(e.state===eu){const n=mt;mt=null,yr(()=>ru(e,t[0]),!1),mt=n}}function yr(e,t){if(mt)return e();let r=!1;t||(mt=[]),Ur?r=!0:Ur=[],Su++;try{const n=e();return U1(r),n}catch(n){r||(Ur=null),mt=null,Xf(n)}}function U1(e){if(mt&&(I0(mt),mt=null),e)return;const t=Ur;Ur=null,t.length&&yr(()=>C0(t),!1)}function I0(e){for(let t=0;t<e.length;t++)tu(e[t])}function $1(e){let t,r=0;for(t=0;t<e.length;t++){const n=e[t];n.user?e[r++]=n:tu(n)}if(ve.context){if(ve.count){ve.effects||(ve.effects=[]),ve.effects.push(...e.slice(0,r));return}else ve.effects&&(e=[...ve.effects,...e],r+=ve.effects.length,delete ve.effects);vs()}for(t=0;t<r;t++)tu(e[t])}function ru(e,t){e.state=0;for(let r=0;r<e.sources.length;r+=1){const n=e.sources[r];if(n.sources){const o=n.state;o===jr?n!==t&&(!n.updatedAt||n.updatedAt<Su)&&tu(n):o===eu&&ru(n,t)}}}function L0(e){for(let t=0;t<e.observers.length;t+=1){const r=e.observers[t];r.state||(r.state=eu,r.pure?mt.push(r):Ur.push(r),r.observers&&L0(r))}}function xu(e){let t;if(e.sources)for(;e.sources.length;){const r=e.sources.pop(),n=e.sourceSlots.pop(),o=r.observers;if(o&&o.length){const i=o.pop(),a=r.observerSlots.pop();n<o.length&&(i.sourceSlots[a]=n,o[n]=i,r.observerSlots[n]=a)}}if(e.owned){for(t=e.owned.length-1;t>=0;t--)xu(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 k0(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Xf(e,t=Ue){throw k0(e)}function M0(e,t){return e?e.context&&e.context[t]!==void 0?e.context[t]:M0(e.owner,t):void 0}function hf(e){if(typeof e=="function"&&!e.length)return hf(e());if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++){const n=hf(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function j1(e,t){return function(n){let o;return dn(()=>o=Xe(()=>(Ue.context={[e]:n.value},Kf(()=>n.children))),void 0),o}}var df=Symbol("fallback");function nu(e){for(let t=0;t<e.length;t++)e[t]()}function H1(e,t,r={}){let n=[],o=[],i=[],a=0,s=t.length>1?[]:null;return Rs(()=>nu(i)),()=>{let c=e()||[],l,u;return c[Qf],Xe(()=>{let h=c.length,f,p,m,_,w,v,b,A,S;if(h===0)a!==0&&(nu(i),i=[],n=[],o=[],a=0,s&&(s=[])),r.fallback&&(n=[df],o[0]=hn(P=>(i[0]=P,r.fallback())),a=1);else if(a===0){for(o=new Array(h),u=0;u<h;u++)n[u]=c[u],o[u]=hn(d);a=h}else{for(m=new Array(h),_=new Array(h),s&&(w=new Array(h)),v=0,b=Math.min(a,h);v<b&&n[v]===c[v];v++);for(b=a-1,A=h-1;b>=v&&A>=v&&n[b]===c[A];b--,A--)m[A]=o[b],_[A]=i[b],s&&(w[A]=s[b]);for(f=new Map,p=new Array(A+1),u=A;u>=v;u--)S=c[u],l=f.get(S),p[u]=l===void 0?-1:l,f.set(S,u);for(l=v;l<=b;l++)S=n[l],u=f.get(S),u!==void 0&&u!==-1?(m[u]=o[l],_[u]=i[l],s&&(w[u]=s[l]),u=p[u],f.set(S,u)):i[l]();for(u=v;u<h;u++)u in m?(o[u]=m[u],i[u]=_[u],s&&(s[u]=w[u],s[u](u))):o[u]=hn(d);o=o.slice(0,a=h),n=c.slice(0)}return o});function d(h){if(i[u]=h,s){const[f,p]=bt(u);return s[u]=p,t(c[u],f)}return t(c[u])}}}function q1(e,t,r={}){let n=[],o=[],i=[],a=[],s=0,c;return Rs(()=>nu(i)),()=>{const l=e()||[];return l[Qf],Xe(()=>{if(l.length===0)return s!==0&&(nu(i),i=[],n=[],o=[],s=0,a=[]),r.fallback&&(n=[df],o[0]=hn(d=>(i[0]=d,r.fallback())),s=1),o;for(n[0]===df&&(i[0](),i=[],n=[],o=[],s=0),c=0;c<l.length;c++)c<n.length&&n[c]!==l[c]?a[c](()=>l[c]):c>=n.length&&(o[c]=hn(u));for(;c<n.length;c++)i[c]();return s=a.length=i.length=l.length,n=l.slice(0),o=o.slice(0,s)});function u(d){i[c]=d;const[h,f]=bt(l[c]);return a[c]=f,t(h,c)}}}function F0(e,t){return Xe(()=>e(t||{}))}function Pa(){return!0}var pf={get(e,t,r){return t===Cs?r:e.get(t)},has(e,t){return t===Cs?!0:e.has(t)},set:Pa,deleteProperty:Pa,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Pa,deleteProperty:Pa}},ownKeys(e){return e.keys()}};function ll(e){return(e=typeof e=="function"?e():e)?e:{}}function G1(){for(let e=0,t=this.length;e<t;++e){const r=this[e]();if(r!==void 0)return r}}function B0(...e){let t=!1;for(let i=0;i<e.length;i++){const a=e[i];t=t||!!a&&Cs in a,e[i]=typeof a=="function"?(t=!0,St(a)):a}if(t)return new Proxy({get(i){for(let a=e.length-1;a>=0;a--){const s=ll(e[a])[i];if(s!==void 0)return s}},has(i){for(let a=e.length-1;a>=0;a--)if(i in ll(e[a]))return!0;return!1},keys(){const i=[];for(let a=0;a<e.length;a++)i.push(...Object.keys(ll(e[a])));return[...new Set(i)]}},pf);const r={},n={},o=new Set;for(let i=e.length-1;i>=0;i--){const a=e[i];if(!a)continue;const s=Object.getOwnPropertyNames(a);for(let c=0,l=s.length;c<l;c++){const u=s[c];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,u);if(!o.has(u))d.get?(o.add(u),Object.defineProperty(r,u,{enumerable:!0,configurable:!0,get:G1.bind(n[u]=[d.get.bind(a)])})):(d.value!==void 0&&o.add(u),r[u]=d.value);else{const h=n[u];h?d.get?h.push(d.get.bind(a)):d.value!==void 0&&h.push(()=>d.value):r[u]===void 0&&(r[u]=d.value)}}}return r}function D0(e,...t){if(Cs in e){const o=new Set(t.length>1?t.flat():t[0]),i=t.map(a=>new Proxy({get(s){return a.includes(s)?e[s]:void 0},has(s){return a.includes(s)&&s in e},keys(){return a.filter(s=>s in e)}},pf));return i.push(new Proxy({get(a){return o.has(a)?void 0:e[a]},has(a){return o.has(a)?!1:a in e},keys(){return Object.keys(e).filter(a=>!o.has(a))}},pf)),i}const r={},n=t.map(()=>({}));for(const o of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,o),a=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let s=!1,c=0;for(const l of t)l.includes(o)&&(s=!0,a?n[c][o]=i.value:Object.defineProperty(n[c],o,i)),++c;s||(a?r[o]=i.value:Object.defineProperty(r,o,i))}return[...n,r]}function V1(e){let t,r;const n=o=>{const i=ve.context;if(i){const[s,c]=bt();ve.count||(ve.count=0),ve.count++,(r||(r=e())).then(l=>{vs(i),ve.count--,c(()=>l.default),vs()}),t=s}else if(!t){const[s]=A1(()=>(r||(r=e())).then(c=>c.default));t=s}let a;return St(()=>(a=t())&&Xe(()=>{if(!i)return a(o);const s=ve.context;vs(i);const c=a(o);return vs(s),c}))};return n.preload=()=>r||((r=e()).then(o=>t=()=>o.default),r),n}var W1=0;function z1(){const e=ve.context;return e?`${e.id}${e.count++}`:`cl-${W1++}`}var U0=e=>`Stale read from <${e}>.`;function Q1(e){const t="fallback"in e&&{fallback:()=>e.fallback};return St(H1(()=>e.each,e.children,t||void 0))}function Y1(e){const t="fallback"in e&&{fallback:()=>e.fallback};return St(q1(()=>e.each,e.children,t||void 0))}function K1(e){const t=e.keyed,r=St(()=>e.when,void 0,{equals:(n,o)=>t?n===o:!n==!o});return St(()=>{const n=r();if(n){const o=e.children;return typeof o=="function"&&o.length>0?Xe(()=>o(t?n:()=>{if(!Xe(r))throw U0("Show");return e.when})):o}return e.fallback},void 0,void 0)}function X1(e){let t=!1;const r=(i,a)=>i[0]===a[0]&&(t?i[1]===a[1]:!i[1]==!a[1])&&i[2]===a[2],n=Kf(()=>e.children),o=St(()=>{let i=n();Array.isArray(i)||(i=[i]);for(let a=0;a<i.length;a++){const s=i[a].when;if(s)return t=!!i[a].keyed,[a,s,i[a]]}return[-1]},void 0,{equals:r});return St(()=>{const[i,a,s]=o();if(i<0)return e.fallback;const c=s.children;return typeof c=="function"&&c.length>0?Xe(()=>c(t?a:()=>{if(Xe(o)[0]!==i)throw U0("Match");return s.when})):c},void 0,void 0)}function J1(e){return e}var Z1=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],eR=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Z1]),tR=new Set(["innerHTML","textContent","innerText","children"]),rR=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),nR=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 iR(e,t){const r=nR[e];return typeof r=="object"?r[t]?r.$:void 0:r}var oR=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),sR=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"]),aR={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function uR(e,t,r){let n=r.length,o=t.length,i=n,a=0,s=0,c=t[o-1].nextSibling,l=null;for(;a<o||s<i;){if(t[a]===r[s]){a++,s++;continue}for(;t[o-1]===r[i-1];)o--,i--;if(o===a){const u=i<n?s?r[s-1].nextSibling:r[i-s]:c;for(;s<i;)e.insertBefore(r[s++],u)}else if(i===s)for(;a<o;)(!l||!l.has(t[a]))&&t[a].remove(),a++;else if(t[a]===r[i-1]&&r[s]===t[o-1]){const u=t[--o].nextSibling;e.insertBefore(r[s++],t[a++].nextSibling),e.insertBefore(r[--i],u),t[o]=r[i]}else{if(!l){l=new Map;let d=s;for(;d<i;)l.set(r[d],d++)}const u=l.get(t[a]);if(u!=null)if(s<u&&u<i){let d=a,h=1,f;for(;++d<o&&d<i&&!((f=l.get(t[d]))==null||f!==u+h);)h++;if(h>u-s){const p=t[a];for(;s<u;)e.insertBefore(r[s++],p)}else e.replaceChild(r[s++],t[a++])}else a++;else t[a++].remove()}}}var Sm="_$DX_DELEGATE";function cR(e,t,r,n={}){let o;return hn(i=>{o=i,t===document?e():ou(t,e(),t.firstChild?null:void 0,r)},n.owner),()=>{o(),t.textContent=""}}function lR(e,t,r){let n;const o=()=>{const a=document.createElement("template");return a.innerHTML=e,r?a.content.firstChild.firstChild:a.content.firstChild},i=t?()=>Xe(()=>document.importNode(n||(n=o()),!0)):()=>(n||(n=o())).cloneNode(!0);return i.cloneNode=i,i}function $0(e,t=window.document){const r=t[Sm]||(t[Sm]=new Set);for(let n=0,o=e.length;n<o;n++){const i=e[n];r.has(i)||(r.add(i),t.addEventListener(i,vR))}}function iu(e,t,r){r==null?e.removeAttribute(t):e.setAttribute(t,r)}function fR(e,t,r,n){n==null?e.removeAttributeNS(t,r):e.setAttributeNS(t,r,n)}function j0(e,t){t==null?e.removeAttribute("class"):e.className=t}function H0(e,t,r,n){if(n)Array.isArray(r)?(e[`$$${t}`]=r[0],e[`$$${t}Data`]=r[1]):e[`$$${t}`]=r;else if(Array.isArray(r)){const o=r[0];e.addEventListener(t,r[0]=i=>o.call(e,r[1],i))}else e.addEventListener(t,r)}function hR(e,t,r={}){const n=Object.keys(t||{}),o=Object.keys(r);let i,a;for(i=0,a=o.length;i<a;i++){const s=o[i];!s||s==="undefined"||t[s]||(Tm(e,s,!1),delete r[s])}for(i=0,a=n.length;i<a;i++){const s=n[i],c=!!t[s];!s||s==="undefined"||r[s]===c||!c||(Tm(e,s,!0),r[s]=c)}return r}function dR(e,t,r){if(!t)return r?iu(e,"style"):t;const n=e.style;if(typeof t=="string")return n.cssText=t;typeof r=="string"&&(n.cssText=r=void 0),r||(r={}),t||(t={});let o,i;for(i in r)t[i]==null&&n.removeProperty(i),delete r[i];for(i in t)o=t[i],o!==r[i]&&(n.setProperty(i,o),r[i]=o);return r}function q0(e,t={},r,n){const o={};return n||dn(()=>o.children=oo(e,t.children,o.children)),dn(()=>t.ref&&t.ref(e)),dn(()=>mR(e,t,r,!0,o,!0)),o}function pR(e,t,r){return Xe(()=>e(t,r))}function ou(e,t,r,n){if(r!==void 0&&!n&&(n=[]),typeof t!="function")return oo(e,t,n,r);dn(o=>oo(e,t(),o,r),n)}function mR(e,t,r,n,o={},i=!1){t||(t={});for(const a in o)if(!(a in t)){if(a==="children")continue;o[a]=xm(e,a,null,o[a],r,i)}for(const a in t){if(a==="children"){n||oo(e,t.children);continue}const s=t[a];o[a]=xm(e,a,s,o[a],r,i)}}function gR(e){let t,r;if(!ve.context||!(t=ve.registry.get(r=ER()))){if(ve.context,!e)throw new Error("Unrecoverable Hydration Mismatch. No template for key: "+r);return e()}return ve.completed&&ve.completed.add(t),ve.registry.delete(r),t}function yR(e){return e.toLowerCase().replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function Tm(e,t,r){const n=t.trim().split(/\s+/);for(let o=0,i=n.length;o<i;o++)e.classList.toggle(n[o],r)}function xm(e,t,r,n,o,i){let a,s,c,l,u;if(t==="style")return dR(e,r,n);if(t==="classList")return hR(e,r,n);if(r===n)return n;if(t==="ref")i||r(e);else if(t.slice(0,3)==="on:"){const d=t.slice(3);n&&e.removeEventListener(d,n),r&&e.addEventListener(d,r)}else if(t.slice(0,10)==="oncapture:"){const d=t.slice(10);n&&e.removeEventListener(d,n,!0),r&&e.addEventListener(d,r,!0)}else if(t.slice(0,2)==="on"){const d=t.slice(2).toLowerCase(),h=oR.has(d);if(!h&&n){const f=Array.isArray(n)?n[0]:n;e.removeEventListener(d,f)}(h||r)&&(H0(e,d,r,h),h&&$0([d]))}else if(t.slice(0,5)==="attr:")iu(e,t.slice(5),r);else if((u=t.slice(0,5)==="prop:")||(c=tR.has(t))||!o&&((l=iR(t,e.tagName))||(s=eR.has(t)))||(a=e.nodeName.includes("-")))u&&(t=t.slice(5),s=!0),t==="class"||t==="className"?j0(e,r):a&&!s&&!c?e[yR(t)]=r:e[l||t]=r;else{const d=o&&t.indexOf(":")>-1&&aR[t.split(":")[0]];d?fR(e,d,t,r):iu(e,rR[t]||t,r)}return r}function vR(e){const t=`$$${e.type}`;let r=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==r&&Object.defineProperty(e,"target",{configurable:!0,value:r}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return r||document}}),ve.registry&&!ve.done&&(ve.done=_$HY.done=!0);r;){const n=r[t];if(n&&!r.disabled){const o=r[`${t}Data`];if(o!==void 0?n.call(r,o,e):n.call(r,e),e.cancelBubble)return}r=r._$host||r.parentNode||r.host}}function oo(e,t,r,n,o){if(ve.context){!r&&(r=[...e.childNodes]);let s=[];for(let c=0;c<r.length;c++){const l=r[c];l.nodeType===8&&l.data.slice(0,2)==="!$"?l.remove():s.push(l)}r=s}for(;typeof r=="function";)r=r();if(t===r)return r;const i=typeof t,a=n!==void 0;if(e=a&&r[0]&&r[0].parentNode||e,i==="string"||i==="number"){if(ve.context)return r;if(i==="number"&&(t=t.toString()),a){let s=r[0];s&&s.nodeType===3?s.data=t:s=document.createTextNode(t),r=Oi(e,r,n,s)}else r!==""&&typeof r=="string"?r=e.firstChild.data=t:r=e.textContent=t}else if(t==null||i==="boolean"){if(ve.context)return r;r=Oi(e,r,n)}else{if(i==="function")return dn(()=>{let s=t();for(;typeof s=="function";)s=s();r=oo(e,s,r,n)}),()=>r;if(Array.isArray(t)){const s=[],c=r&&Array.isArray(r);if(mf(s,t,r,o))return dn(()=>r=oo(e,s,r,n,!0)),()=>r;if(ve.context){if(!s.length)return r;for(let l=0;l<s.length;l++)if(s[l].parentNode)return r=s}if(s.length===0){if(r=Oi(e,r,n),a)return r}else c?r.length===0?Om(e,s,n):uR(e,r,s):(r&&Oi(e),Om(e,s));r=s}else if(t.nodeType){if(ve.context&&t.parentNode)return r=a?[t]:t;if(Array.isArray(r)){if(a)return r=Oi(e,r,n,t);Oi(e,r,null,t)}else r==null||r===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);r=t}}return r}function mf(e,t,r,n){let o=!1;for(let i=0,a=t.length;i<a;i++){let s=t[i],c=r&&r[i],l;if(!(s==null||s===!0||s===!1))if((l=typeof s)=="object"&&s.nodeType)e.push(s);else if(Array.isArray(s))o=mf(e,s,c)||o;else if(l==="function")if(n){for(;typeof s=="function";)s=s();o=mf(e,Array.isArray(s)?s:[s],Array.isArray(c)?c:[c])||o}else e.push(s),o=!0;else{const u=String(s);c&&c.nodeType===3&&c.data===u?e.push(c):e.push(document.createTextNode(u))}}return o}function Om(e,t,r=null){for(let n=0,o=t.length;n<o;n++)e.insertBefore(t[n],r)}function Oi(e,t,r,n){if(r===void 0)return e.textContent="";const o=n||document.createTextNode("");if(t.length){let i=!1;for(let a=t.length-1;a>=0;a--){const s=t[a];if(o!==s){const c=s.parentNode===e;!i&&!a?c?e.replaceChild(o,s):e.insertBefore(o,r):c&&s.remove()}else i=!0}}else e.insertBefore(o,r);return[o]}function ER(){const e=ve.context;return`${e.id}${e.count++}`}var _R="http://www.w3.org/2000/svg";function G0(e,t=!1){return t?document.createElementNS(_R,e):document.createElement(e)}function bR(e){const{useShadow:t}=e,r=document.createTextNode(""),n=()=>e.mount||document.body,o=wm();let i,a=!!ve.context;return Yf(()=>{a&&(wm().user=a=!1),i||(i=I1(o,()=>St(()=>e.children)));const s=n();if(s instanceof HTMLHeadElement){const[c,l]=bt(!1),u=()=>l(!0);hn(d=>ou(s,()=>c()?d():i(),null)),Rs(u)}else{const c=G0(e.isSVG?"g":"div",e.isSVG),l=t&&c.attachShadow?c.attachShadow({mode:"open"}):c;Object.defineProperty(c,"_$host",{get(){return r.parentNode},configurable:!0}),ou(l,i),s.appendChild(c),e.ref&&e.ref(c),Rs(()=>s.removeChild(c))}},void 0,{render:!a}),r}function wR(e){const[t,r]=D0(e,["component"]),n=St(()=>t.component);return St(()=>{const o=n();switch(typeof o){case"function":return Object.assign(o,{[x1]:!0}),Xe(()=>o(r));case"string":const i=sR.has(o),a=ve.context?gR():G0(o,i);return q0(a,r,i),a}})}var zi,Gs,Vs,Ws,Zn,Qi,Yi,Ki,Xi,Ji,zs,Ym,SR=(Ym=class{constructor(e){ne(this,zi,void 0);ne(this,Gs,void 0);ne(this,Vs,void 0);ne(this,Ws,void 0);ne(this,Zn,!1);ne(this,Qi,void 0);ne(this,Yi,void 0);ne(this,Ki,void 0);ne(this,Xi,void 0);ne(this,Ji,void 0);ne(this,zs,void 0);const{client:t,queryFlavor:r,version:n,onlineManager:o,buttonPosition:i,position:a,initialIsOpen:s,errorTypes:c}=e;Z(this,zi,bt(t)),Z(this,Vs,r),Z(this,Ws,n),Z(this,Gs,o),Z(this,Qi,bt(i)),Z(this,Yi,bt(a)),Z(this,Ki,bt(s)),Z(this,Xi,bt(c))}setButtonPosition(e){N(this,Qi)[1](e)}setPosition(e){N(this,Yi)[1](e)}setInitialIsOpen(e){N(this,Ki)[1](e)}setErrorTypes(e){N(this,Xi)[1](e)}setClient(e){N(this,zi)[1](e)}mount(e){if(N(this,Zn))throw new Error("Devtools is already mounted");const t=cR(()=>{const[r]=N(this,Qi),[n]=N(this,Yi),[o]=N(this,Ki),[i]=N(this,Xi),[a]=N(this,zi);let s;N(this,Ji)?s=N(this,Ji):(s=V1(()=>Promise.resolve().then(()=>require("./4TNE5QTO-988be988.js"))),Z(this,Ji,s));const c=this;return F0(s,B0({get queryFlavor(){return N(c,Vs)},get version(){return N(c,Ws)},get onlineManager(){return N(c,Gs)}},{get client(){return a()},get buttonPosition(){return r()},get position(){return n()},get initialIsOpen(){return o()},get errorTypes(){return i()}}))},e);Z(this,Zn,!0),Z(this,zs,t)}unmount(){var e;if(!N(this,Zn))throw new Error("Devtools is not mounted");(e=N(this,zs))==null||e.call(this),Z(this,Zn,!1)}},zi=new WeakMap,Gs=new WeakMap,Vs=new WeakMap,Ws=new WeakMap,Zn=new WeakMap,Qi=new WeakMap,Yi=new WeakMap,Ki=new WeakMap,Xi=new WeakMap,Ji=new WeakMap,zs=new WeakMap,Ym);function TR(e){const t=ho(),r=e.client||t,n=$.useRef(null),{buttonPosition:o,position:i,initialIsOpen:a,errorTypes:s}=e,[c]=$.useState(new SR({client:r,queryFlavor:"React Query",version:"5",onlineManager:As,buttonPosition:o,position:i,initialIsOpen:a,errorTypes:s}));return $.useEffect(()=>{c.setClient(r)},[r,c]),$.useEffect(()=>{o&&c.setButtonPosition(o)},[o,c]),$.useEffect(()=>{i&&c.setPosition(i)},[i,c]),$.useEffect(()=>{c.setInitialIsOpen(a||!1)},[a,c]),$.useEffect(()=>{c.setErrorTypes(s||[])},[s,c]),$.useEffect(()=>(n.current&&c.mount(n.current),()=>{c.unmount()}),[c]),$.createElement("div",{className:"tsqd-parent-container",ref:n})}var xR=process.env.NODE_ENV!=="development"?function(){return null}:TR;const OR=new o1({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:1e3*60}}}),AR=({showDevTools:e,children:t})=>x.jsxs(l1,{client:OR,children:[t,e&&x.jsx(xR,{initialIsOpen:!1})]});const fl="joinCommunityButton",Jf=({isMember:e=!1,isShort:t=!1,functions:{join:r,leave:n}={join:()=>{},leave:()=>{}}})=>{const o=Oe(),i=$.useContext($r),a=i&&typeof i.id=="string",[s,c]=$.useState(e),[l,u]=$.useState(e?"joined":"notJoined");$.useEffect(()=>{l==="joining"?u("joined"):l==="leaving"&&u("notJoined")},[s]);const d={},h={};return s&&l!=="leaving"&&(d["data-hover-text"]=o.formatMessage({id:`${fl}_leave`}),d["aria-label"]=o.formatMessage({id:`${fl}_member_aria`}),h["aria-hidden"]="true"),x.jsx(ze,{variant:s?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:s&&l!=="leaving"?{icon:"tick",position:"left"}:!1,onClick:async f=>{a&&(f.currentTarget.blur(),s?(u("leaving"),typeof n=="function"&&await n()):(u("joining"),typeof r=="function"&&await r()),c(!s))},className:ue("join-community-button",l,{active:l==="joining"}),disabled:!a,...d,children:x.jsx("span",{className:"text",...h,children:o.formatMessage({id:`${fl}${["joining","leaving"].includes(l)?`_${l}`:s?"_member":t?"_short":""}`})})})};const hl="communityDetails_",CR=({isMember:e=!1,slug:t,members:{number:r,data:n}={number:void 0,data:[]},className:o="",...i})=>{const a=Oe(),s=r||(n==null?void 0:n.length)||0;return x.jsxs("div",{className:ue("community-details",o),children:[x.jsx(Qa,{}),x.jsxs("div",{className:"member-details",children:[x.jsxs("div",{className:"top",children:[x.jsxs("h3",{children:[a.formatMessage({id:`${hl}members`}),x.jsx("span",{className:"count",children:s})]}),x.jsx("p",{className:"text-small",children:x.jsx("a",{href:`/communities/${t}/members`,children:a.formatMessage({id:`${hl}viewAll`})})})]}),x.jsx(m0,{contributors:{total:r,data:n!=null&&n.length?n.reverse():[{},{},{},{},{}]},styling:{size:"medium",showGap:!0,showPlaceholders:s===0},cutoff:5})]}),x.jsx(Jf,{isMember:e,...i}),e&&x.jsx(ze,{variant:"primary",icon:{icon:"plus"},styling:{fullWidth:!0},children:a.formatMessage({id:`${hl}invite`})})]})};const RR=({breadcrumbs:e,className:t=""})=>{const r=Oe();return x.jsxs(x.Fragment,{children:[x.jsx(lt,{element:"p",children:r.formatMessage({id:"breadcrumbs_label"})}),x.jsx("ul",{className:ue("breadcrumbs text-small",t),children:e.map(({text:n,href:o,current:i=!1},a)=>x.jsxs("li",{children:[i&&x.jsx(lt,{element:"span",children:r.formatMessage({id:"breadcrumbs_currentPage"})}),x.jsx(Ff,{href:i?void 0:o,children:n})]},`${window.btoa(n)}_${a}`))})]})};const PR=({options:e,allOption:t=!1,allowMultiple:r=!0,onChange:n=()=>{},className:o=""})=>{const i=Oe(),a=t?[{id:"all",text:typeof t!="boolean"&&t.text||i.formatMessage({id:"filters_all"})},...e]:e,[s,c]=$.useState(t?["all"]:[]),l=(u,d)=>{let h=[];s.includes(u)?h=s.filter(f=>f!==u):u==="all"?h=["all"]:r?h=[...s.filter(f=>f!=="all"),u]:h=[u],c(f=>(n&&typeof n=="function"&&n({current:h,previous:f}),h)),d&&typeof d=="function"&&d()};return x.jsx("ul",{className:ue("filters",o),children:a.map(({id:u,text:d,disabled:h=!1,callback:f=()=>{}})=>{let p={};return h&&(p={disabled:!0,"aria-label":i.formatMessage({id:"filters_disabled"},{name:d})}),x.jsx("li",{children:x.jsx("button",{className:ue(u,{selected:s.includes(u)}),onClick:m=>{m.preventDefault(),m.stopPropagation(),l(u,f)},...p,children:d})},u)})})};const dl=Wl({locale:"en",messages:Mf}),V0=({page:e=1,length:t=0,limit:r=10,loadNextPage:n=()=>{},icon:o=!1,messages:i={button:dl.formatMessage({id:"loadMore_button"}),endOfFeed:dl.formatMessage({id:"loadMore_endOfFeed"}),error:dl.formatMessage({id:"loadMore_error"})},className:a="",gtmContext:s="LoadMore"})=>{const[c,l]=$.useState(!1),[u,d]=$.useState(!1);if(t<=0||t<r*e)return null;const h=async f=>{try{await n(f)}catch(p){p instanceof Error&&p.message&&p.message.includes("Cannot read items")?d(!0):l(!0)}};return x.jsxs("footer",{className:ue("load-more",a),children:[c&&x.jsx("p",{className:"error",children:i.error}),u?x.jsx("p",{children:i.endOfFeed}):x.jsx(ze,{variant:"secondary",icon:o,onClick:h,"data-gtm-event-context":s,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:i.button})]})};let Na=!1;const W0=({element:e="div",id:t="more-menu",options:r,className:n=""})=>{const o=Oe(),i=$.useRef(null),[a,s]=$.useState(!1),c=l=>{i.current&&l.target instanceof HTMLElement&&!i.current.contains(l.target)&&s(!1)};return $.useEffect(()=>(document.addEventListener("click",c,!0),()=>{document.removeEventListener("click",c,!0)})),$.createElement(e,{ref:i,className:ue("more-menu text-medium",n),children:x.jsxs(x.Fragment,{children:[x.jsx(ze,{variant:"tertiary",size:"medium",icon:{icon:"ellipsis"},onClick:()=>s(!a),"aria-haspopup":"true","aria-expanded":a,"aria-controls":t,screenreaderText:o.formatMessage({id:"moreMenu"})}),x.jsx("ul",{id:t,hidden:!a,children:r.map(({href:l,onClick:u,text:d,icon:h,...f},p)=>{const m={...f,onClick:_=>{s(!1),typeof u=="function"&&u(_)},onFocus:()=>{Na&&(clearTimeout(Na),Na=!1)},onBlur:()=>{Na=setTimeout(()=>{s(!1)},100)}};return l&&(m.href=l),x.jsx("li",{children:x.jsx(ze,{variant:"tertiary",size:"medium",icon:h?{icon:h,position:"left"}:!1,...m,children:d})},`${window.btoa(d)}_${p}`)})})]})})};const Zf=({variant:e="default",version:t="default",className:r="",...n})=>x.jsx("p",{className:"logo-wrapper",children:x.jsx("a",{className:ue("logo",e,t,r),href:"/home/",...n,children:x.jsx(lt,{children:x.jsx(ln,{id:"apolitical"})})})});const NR={"2-1":901},IR=({layout:e="2-1",hideOnMobile:t=!1,className:r="",children:n})=>{const o=Js(!0);let i=n;return $.Children.count(n)===1&&(i=$.Children.toArray(n)[0],i.props&&(i=i.props.children)),x.jsx("section",{className:ue("columns",`layout-${e}`,r),children:$.Children.map(i,(a,s)=>t!==!1&&s===t&&o&&o<NR[e]?null:a)})};const pl="cookieBanner_",ml=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],gl=new Date(Date.now()+12*30*24*60*60*1e3),z0=()=>{const e=Oe(),[t,r,n]=rg(ml),[o,i]=$.useState(!t["apol-cookie-banner"]),a=()=>{ml.forEach(u=>{r(u,!0,{path:"/",expires:gl,domain:u==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),i(!1),window.location.reload()},s=()=>{r("apol-cookie-banner",!0,{path:"/",expires:gl}),ml.forEach(u=>{if(u==="apol-cookie-banner"){r(u,!0,{path:"/",expires:gl});return}n(u)}),i(!1)};if(!o)return null;const c=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:s,gtmType:"reject-all"},{id:"accept",onClick:a,gtmType:"accepted-all"}],l=[];return c.forEach(u=>{l.push({variant:u.href?"tertiary":"primary",href:u.href,onClick:u.onClick,className:"gtm-trackable","data-gtm-event-context":"cookie-banner","data-gtm-event-type":`cookie-${u.gtmType}-click`,children:e.formatMessage({id:`${pl}buttons_${u.id}`})})}),x.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[x.jsx("h6",{children:e.formatMessage({id:`${pl}title`})}),x.jsx("p",{children:e.formatMessage({id:`${pl}text`})}),x.jsx(Zs,{buttons:l})]})},Br={platform:{order:["events","courses","qanda","articles"],events:{href:"/events/",gtmType:"events-click"},courses:{href:"/microcourses/",gtmType:"microcourses-click"},qanda:{href:"/questions-answers/",gtmType:"q-and-a-click"},articles:{href:"/solution-articles/",gtmType:"articles-click"}},community:{order:["support","post","join","guidelines"],support:{name:"Support FAQ",href:"/pages/support-faq",gtmType:"support-faq-click"},post:{href:"/pages/post-an-article",gtmType:"post-an-article-click"},join:{href:"/pages/who-can-join-the-community",gtmType:"who-can-join-click"},guidelines:{href:"/pages/values-and-guidelines",gtmType:"guidelines-and-values-click"}},company:{order:["story","team","careers","partner","contact"],story:{href:"/pages/our-story",gtmType:"our-story-click"},team:{href:"/pages/meet-our-team",gtmType:"team-click"},careers:{href:"/pages/careers",gtmType:"careers-click"},partner:{href:"/partnerships/",gtmType:"partner-with-us-click"},contact:{href:"/pages/get-in-touch",gtmType:"contact-click"},child:"legal"},legal:{order:["privacy","terms","cookie","accessibility"],privacy:{href:"https://about.apolitical.co/privacy-policy",gtmType:"privacy-policy-link"},terms:{href:"https://about.apolitical.co/terms-and-conditions",gtmType:"terms-conditions-link"},cookie:{href:"/pages/cookie-policy",gtmType:"cookie-policy-link"},accessibility:{href:"/pages/accessibility-statement",gtmType:"accessibility-link"},text:{order:["dataProtection","euDataProtection"],dataProtection:{email:"dpo@apolitical.co",gtmType:"email-dpo-link"},euDataProtection:{email:"dpo.agl@apolitical.foundation",gtmType:"email-eu-dpo-link"}}},contact:{text:{order:["correspondence","registered","berlin","support","business"],correspondence:{address:!0},registered:{address:!0},berlin:{address:!0},support:{email:"concierge@apolitical.co",gtmType:"concierge-email-click"},business:{email:"hello@apolitical.co",gtmType:"hello-email-click"}}},social:{order:["linkedin","twitter","facebook"],linkedin:{href:"https://www.linkedin.com/company/apolitical"},twitter:{href:"https://twitter.com/apoliticalco"},facebook:{href:"https://www.facebook.com/apoliticalco"}}};const Ri="footer_",su="SiteFooter",Am=({group:e})=>{const t=Br[e].order||[];let r=!1;return"text"in Br[e]&&(r=Br[e].text),x.jsxs($.Fragment,{children:[x.jsx("p",{className:"pre-title",children:x.jsx(ln,{id:`${Ri}${e}`})}),Array.isArray(t)&&t.length>0&&x.jsx("ul",{className:"text-medium",children:t.map(n=>{if(["order","child","text"].includes(n))return null;const{href:o,gtmType:i}=Br[e][n],a={};return["legal"].includes(e)&&(a.target="_blank",a.rel="noopener"),x.jsx("li",{children:x.jsx("a",{href:o,className:"gtm-trackable","data-gtm-event-context":su,"data-gtm-event-type":i,...a,children:x.jsx(ln,{id:`${Ri}${e}_${n}`})})},`${e}_${n}`)})}),typeof r!="boolean"&&"order"in r&&Array.isArray(r.order)&&x.jsx("dl",{className:"text-medium",children:r.order.map(n=>x.jsxs($.Fragment,{children:[x.jsx("dt",{children:x.jsx(ln,{id:`${Ri}${e}_${n}`})}),x.jsxs("dd",{children:[typeof r!="boolean"&&r[n].address&&x.jsx("address",{children:x.jsx(ln,{id:`${Ri}${e}_${n}_address`,values:{br:x.jsx("br",{})}})}),typeof r!="boolean"&&r[n].email&&x.jsx("a",{href:`mailto:${r[n].email}`,className:"gtm-trackable","data-gtm-event-context":su,"data-gtm-event-type":r[n].gtmType,children:r[n].email})]})]},`dl-${e}-${n}`))})]},e)},eh=()=>x.jsx("div",{id:"footer",children:x.jsxs("div",{className:"wrapper",children:[x.jsx(yf,{element:"hr"}),x.jsx(Zf,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":su,"data-gtm-event-type":"logo-homepage-link"}),x.jsx("footer",{children:["platform","community","company","contact"].map(e=>x.jsxs("div",{className:"group",children:[x.jsx(Am,{group:e}),Object.keys(Br[e]).includes("child")&&x.jsx(Am,{group:Br[e].child})]},e))}),x.jsx("hr",{}),x.jsxs("div",{className:"sub-footer",children:[x.jsx("ul",{children:Array.isArray(Br.social.order)&&Br.social.order.map(e=>{const t=Br.social[e];return x.jsx("li",{className:e,children:x.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":su,"data-gtm-event-type":"social-click",children:x.jsx("span",{className:"hidden",children:x.jsx(ln,{id:`${Ri}social_${e}`})})})},e)})}),x.jsx("small",{children:x.jsx(ln,{id:`${Ri}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});const Ia="emailHelperTextBox_",LR=({type:e,email:t,redirectPath:r,resendVerificationCode:n})=>{const o=Oe(),[i,a]=$.useState({path:`${Ia}default`,type:"default",link:{},mail:{},error:""}),[s,c]=$.useState(!1),l=$.useCallback(f=>{f.preventDefault(),f.stopPropagation();const p=m=>{a({path:`${Ia}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:_=>l(_),href:"#","data-testid":"send-verify-email-click"},mail:{href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"ErrorVerifyingBox","data-gtm-event-type":"email-concierge-click"},error:m})};if(typeof n!="function"){p(o.formatMessage({id:`${Ia}error_noFunction`}));return}c(!0),n(t).then(()=>{localStorage.setItem("email",t),window.location.href=r||"/signup/verify-email"}).catch(m=>{p(m.message)}).finally(()=>{c(!1)})},[t,r,n]);$.useEffect(()=>{let f=Ia,p="default",m={},_={};switch(e){case"gov":f+="autoApproved",p="success";break;case"nonGov":f+="unrecognisedEmail",p="error",m={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":f+="pendingApproval",p="error",_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":f+="emailUnverified",p="error",m={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:w=>l(w),"data-testid":"send-verify-email-click"};break;case"exists":f+="emailAlreadyExists",p="error",m={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:f+="default",m={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}a({...i,path:f,type:p,link:m,mail:_})},[e]);const u={};return["link","mail"].forEach(f=>{u[f]=Object.keys(i[f]).length?p=>x.jsx("a",{...i[f],children:p}):p=>p}),x.jsx(c0,{type:i.type,heading:s?!1:o.formatMessage({id:`${i.path}_title`}),children:s?x.jsxs(x.Fragment,{children:[x.jsx(gr,{element:"span"}),x.jsx(gr,{element:"span"})]}):o.formatMessage({id:`${i.path}_text`},{...u,strong:f=>x.jsx("strong",{children:f}),em:f=>x.jsx("em",{children:f}),br:x.jsxs(x.Fragment,{children:[x.jsx("br",{}),x.jsx("br",{})]}),error:i.error})})};const La="passwordRules_",Q0="isMoreThanEightCharacters",Y0="includesNumberAndSymbol",K0="includesLowerAndUppercase",kR={[Q0]:"8Characters",[Y0]:"numberSymbol",[K0]:"lowercaseUppercase"},MR=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const r=Oe();return x.jsxs("aside",{className:ue("password-rules",t),children:[x.jsx("small",{children:r.formatMessage({id:`${La}intro`})}),x.jsx("ul",{children:[Q0,Y0,K0].map(n=>x.jsxs("li",{className:ue({matches:e[n]}),children:[x.jsxs(lt,{children:[r.formatMessage({id:`${La}rule_label`})," "]}),x.jsx("span",{children:r.formatMessage({id:`${La}rule_${kR[n]}`})}),!e[n]&&x.jsxs(lt,{element:"strong",children:[" "," ",r.formatMessage({id:`${La}notMet`})]})]},`rule-${n}`))})]})},FR=$.memo(MR);const BR=({text:e={},topRating:t=5,functions:{createRating:r=()=>null,updateRating:n=()=>{},reportError:o=()=>{}},className:i="",hasLoaded:a=!1})=>{const s=Oe(),[c,l]=$.useState({setUp:!1,id:null,rating:null,disabled:!0}),u=async()=>{try{const w=await r();l(v=>({...v,setUp:!0,id:w&&w.id,disabled:!1}))}catch(w){l(v=>({...v,setUp:!0,disabled:!0})),o(w)}};if($.useEffect(()=>{a&&!c.setUp&&u()},[a]),!a)return x.jsx(gr,{className:"rating-placeholder"});const{id:d,rating:h,disabled:f}=c,p="ratings_",m={text:s.formatMessage({id:`${p}text`}),low:s.formatMessage({id:`${p}low`}),high:s.formatMessage({id:`${p}high`}),success:s.formatMessage({id:`${p}success`}),...e},_=async w=>{if(!(!d||f))try{l(v=>({...v,rating:w,disabled:!0})),await n({id:d,value:w})}catch(v){l(b=>({...b,rating:null})),o(v)}finally{l(v=>({...v,disabled:!1}))}};return x.jsxs("div",{className:ue("rating",i),children:[x.jsx("span",{className:"label",children:m[h?"success":"text"]}),x.jsx("ol",{children:Array.from(new Array(t).keys()).map(w=>{const v=w+1;return x.jsx("li",{className:ue({selected:h&&v<=h}),children:x.jsx(ze,{variant:"tertiary",size:"small",icon:{icon:`star${!h||v>h?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${s.formatMessage({id:`${p}stars`},{number:v,total:t})}${v===1||v===t?` - ${m[v===1?"low":"high"]}`:""}`,onClick:b=>{b.preventDefault(),b.stopPropagation(),_(v)},disabled:f})},`rating-${v}`)})})]})};const X0=({id:e="search",className:t="",handleToggle:r=!1,defaultValue:n="",gtmContext:o="search-bar",gtmEvent:i="form-submission"})=>{const{searchIsOpen:a=!0,isDesktopVersion:s=!1}=r||{},c=Oe(),l=$.useRef(null);ri(()=>{!r||s||!a||l.current&&l.current.focus()},[a]);const u=d=>{if(d.preventDefault(),d.stopPropagation(),!(!l.current||!l.current.value||l.current.value.length<1))return window&&window.location&&window.location.replace(`/search?search=${encodeURIComponent(l.current.value)}`)};return x.jsx("form",{onSubmit:u,className:ue("search-form gtm-trackable",t),"data-gtm-event-context":o,"data-gtm-event-type":i,children:x.jsx("fieldset",{id:`${e}-form`,hidden:r?!a:!1,role:"search",children:x.jsxs("p",{children:[x.jsx(lt,{element:"label",htmlFor:e,children:c.formatMessage({id:"search_label"})}),x.jsx("input",{ref:l,type:"search",id:e,name:e,defaultValue:n,placeholder:c.formatMessage({id:"search_placeholder"}),onKeyDown:d=>{d.key==="Enter"&&u(d)}}),x.jsx("button",{className:"clear",onClick:d=>{d.preventDefault(),d.stopPropagation(),l.current&&l.current.value&&(l.current.value="")},children:x.jsx(lt,{children:c.formatMessage({id:"search_clear"})})}),x.jsx("button",{className:"search",onClick:u,children:x.jsx(lt,{children:c.formatMessage({id:"search_cta"})})})]})})})};var DR="Expected a function",J0="__lodash_hash_undefined__",Z0=1/0,UR="[object Function]",$R="[object GeneratorFunction]",jR="[object Symbol]",HR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qR=/^\w*$/,GR=/^\./,VR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,WR=/[\\^$.*+?()[\]{}|]/g,zR=/\\(\\)?/g,QR=/^\[object .+?Constructor\]$/,YR=typeof de=="object"&&de&&de.Object===Object&&de,KR=typeof self=="object"&&self&&self.Object===Object&&self,th=YR||KR||Function("return this")();function XR(e,t){return e==null?void 0:e[t]}function JR(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var ZR=Array.prototype,eP=Function.prototype,eE=Object.prototype,yl=th["__core-js_shared__"],Cm=function(){var e=/[^.]+$/.exec(yl&&yl.keys&&yl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),tE=eP.toString,rh=eE.hasOwnProperty,rE=eE.toString,tP=RegExp("^"+tE.call(rh).replace(WR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rm=th.Symbol,rP=ZR.splice,nP=nE(th,"Map"),Ps=nE(Object,"create"),Pm=Rm?Rm.prototype:void 0,Nm=Pm?Pm.toString:void 0;function oi(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function iP(){this.__data__=Ps?Ps(null):{}}function oP(e){return this.has(e)&&delete this.__data__[e]}function sP(e){var t=this.__data__;if(Ps){var r=t[e];return r===J0?void 0:r}return rh.call(t,e)?t[e]:void 0}function aP(e){var t=this.__data__;return Ps?t[e]!==void 0:rh.call(t,e)}function uP(e,t){var r=this.__data__;return r[e]=Ps&&t===void 0?J0:t,this}oi.prototype.clear=iP;oi.prototype.delete=oP;oi.prototype.get=sP;oi.prototype.has=aP;oi.prototype.set=uP;function mo(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function cP(){this.__data__=[]}function lP(e){var t=this.__data__,r=Ou(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():rP.call(t,r,1),!0}function fP(e){var t=this.__data__,r=Ou(t,e);return r<0?void 0:t[r][1]}function hP(e){return Ou(this.__data__,e)>-1}function dP(e,t){var r=this.__data__,n=Ou(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}mo.prototype.clear=cP;mo.prototype.delete=lP;mo.prototype.get=fP;mo.prototype.has=hP;mo.prototype.set=dP;function ui(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function pP(){this.__data__={hash:new oi,map:new(nP||mo),string:new oi}}function mP(e){return Au(this,e).delete(e)}function gP(e){return Au(this,e).get(e)}function yP(e){return Au(this,e).has(e)}function vP(e,t){return Au(this,e).set(e,t),this}ui.prototype.clear=pP;ui.prototype.delete=mP;ui.prototype.get=gP;ui.prototype.has=yP;ui.prototype.set=vP;function Ou(e,t){for(var r=e.length;r--;)if(RP(e[r][0],t))return r;return-1}function EP(e,t){t=SP(t,e)?[t]:wP(t);for(var r=0,n=t.length;e!=null&&r<n;)e=e[AP(t[r++])];return r&&r==n?e:void 0}function _P(e){if(!oE(e)||xP(e))return!1;var t=PP(e)||JR(e)?tP:QR;return t.test(CP(e))}function bP(e){if(typeof e=="string")return e;if(ih(e))return Nm?Nm.call(e):"";var t=e+"";return t=="0"&&1/e==-Z0?"-0":t}function wP(e){return iE(e)?e:OP(e)}function Au(e,t){var r=e.__data__;return TP(t)?r[typeof t=="string"?"string":"hash"]:r.map}function nE(e,t){var r=XR(e,t);return _P(r)?r:void 0}function SP(e,t){if(iE(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ih(e)?!0:qR.test(e)||!HR.test(e)||t!=null&&e in Object(t)}function TP(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function xP(e){return!!Cm&&Cm in e}var OP=nh(function(e){e=IP(e);var t=[];return GR.test(e)&&t.push(""),e.replace(VR,function(r,n,o,i){t.push(o?i.replace(zR,"$1"):n||r)}),t});function AP(e){if(typeof e=="string"||ih(e))return e;var t=e+"";return t=="0"&&1/e==-Z0?"-0":t}function CP(e){if(e!=null){try{return tE.call(e)}catch{}try{return e+""}catch{}}return""}function nh(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(DR);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(nh.Cache||ui),r}nh.Cache=ui;function RP(e,t){return e===t||e!==e&&t!==t}var iE=Array.isArray;function PP(e){var t=oE(e)?rE.call(e):"";return t==UR||t==$R}function oE(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function NP(e){return!!e&&typeof e=="object"}function ih(e){return typeof e=="symbol"||NP(e)&&rE.call(e)==jR}function IP(e){return e==null?"":bP(e)}function LP(e,t,r){var n=e==null?void 0:EP(e,t);return n===void 0?r:n}var kP=LP;const sE=vr(kP),Fe={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const r={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},n=i=>{const a=`logged${e?"In":"Out"}`;return t>=r[i][a]};let o={};return["navigation","search"].forEach(i=>{o[i]=n(i)}),o},shouldChangeHeaderIsVisible:(e,t,r)=>{Object.values(t).filter(o=>o===!0).length||r([{type:"headerIsVisible",value:e}])},handleMenus:({id:e,value:t,menus:r,dispatch:n})=>{if(r[e]===t||e==="account"&&t===!1&&r.navigation===!0)return;const o=Date.now();if(!t&&Fe.handlerCalled[e]&&o-Fe.handlerCalled[e]<500)return;Fe.handlerCalled[e]=o;let i=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(r).forEach(a=>{a===e||r[a]===!1||i.push({type:`menus.${a}`,value:!1})}),n(i)},findFirstChild:(e,t,r=!1)=>{if(!e||!e[0])return!1;for(let n=0;n<=e.length;n++){if(!e[n])continue;if(e[n][t]&&(!r||e[n][t].includes(r)))return e[n];if(!t.includes("."))continue;const o=sE(e[n],t);if(!(typeof o>"u")&&(!r||o[t]&&o[t].includes(r)||o.value&&o.value.includes(r)||o.toString().includes(r)))return e[n]}return e[0].children?Fe.findFirstChild(e[0].children,t,r):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:r,focusElements:n,dispatch:o})=>{if(!t.current||!t.current.children)return;const i=r?"desktop":"default";if(n[e][i]){n[e][i].focus();return}let a,s;switch(e){case"navigation":if(r){const c=Fe.findFirstChild(t.current.children,"attributes.aria-controls","navigation");a=Fe.findFirstChild(c.children,"href")}else a=Fe.findFirstChild(t.current.children,"href");a||(a=t.current);break;case"account":if(s=Fe.findFirstChild(t.current.children,"className","account"),!s||!s.children)return;a=Fe.findFirstChild(s.children,"href");break;default:return}a&&(o([{type:`focusElements.${e}.${i}`,value:a}]),a.focus())},events:{onClick:(e,{id:t,callback:r,isOpen:n})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(Fe.timeouts[t]),r(t,!n))},onFocus:({id:e})=>{clearTimeout(Fe.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(Fe.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{Fe.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},Ns={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"}}}},au=({id:e,isLoggedIn:t=!1,isDesktopVersion:r=!1,menus:n={},callback:o=()=>{},doTrack:i=null})=>{const a=Oe(),s=sE(Ns,e);if(!s||s.onlyShow&&(s.onlyShow==="logged-in"&&!t||s.onlyShow==="logged-out"&&t))return null;const c="doTrack"in s,l=i===null?c?s.doTrack:!0:i,u=e.includes("buttons.");let d=`header_${e.replaceAll(".","_")}`;s.hasVariantText&&(d+=`_logged${t?"In":"Out"}`);let h=!1;if(s.href){let v=s.gtmType||`${e}-click`;if(v.includes(".")){const b=v.split("."),A=b[b.length-2];v=`${A==="topics"?`${A}-`:""}${b[b.length-1]}`}h={href:s.href,role:"menuitem"},l&&(h={...h,className:"gtm-trackable","data-gtm-event-type":v,"data-gtm-event-context":"HeaderButtons"}),u&&(h={...h,variant:"secondary",size:{mobile:"small",881:"large"},...s.props||{}})}const f=s.order&&s.order[0]&&s[s.order[0]],p=f&&s[s.order[0]].order,m=h&&typeof window<"u"&&window.location&&window.location.pathname===s.href;let _={},w={};if(f){const v=s.menuId||e,b={onClick:A=>Fe.events.onClick(A,{id:v,callback:o,isOpen:n[v]}),onFocus:()=>Fe.events.onFocus({id:v}),onBlur:()=>Fe.events.onBlur({id:v,callback:o}),onMouseLeave:()=>Fe.events.onBlur({id:v,callback:o}),onMouseEnter:()=>Fe.events.onMouseEnter({id:v,callback:o})};r&&(p&&(_={...b,onKeyPress:A=>{A.key==="Enter"&&Fe.events.onClick(A,{id:v,callback:o,isOpen:n[v]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":n[v],"aria-controls":v}),w={hidden:v in n?!n[v]:!0}),p||(w={...w,...b})}return x.jsxs("li",{className:ue({[s.className]:s.className,"has-submenu":f,parent:p,active:m}),role:"none",..._,children:[h?$.createElement(u?ze:"a",h,a.formatMessage({id:d})):a.formatMessage({id:d}),s.order&&x.jsx("ul",{...w,children:s.order.map(v=>{if(!s[v])return null;const b={isLoggedIn:t,isDesktopVersion:r,menus:n,callback:o,doTrack:c?l:null};return s[v].order?x.jsxs("li",{className:ue({[s[v].className]:s[v].className}),children:[a.formatMessage({id:`${d}_${v}`}),x.jsx("ul",{children:s[v].order.map(A=>x.jsx(au,{id:`${e}.${v}.${A}`,...b},A))})]},v):x.jsx(au,{id:`${e}.${v}`,...b},v)})})]},e)};const MP={height:67,height_desktop:83},oh=()=>{const e=Oe(),t=$.useContext($r),r=Js(!0,!0),n=t&&typeof t.id=="string",o=$.useMemo(()=>Fe.getIsDesktopVersion(n,r),[n,r]),[i,a]=$.useReducer(Hx,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:s,menus:c,focusElements:l}=i;Xy({scrollPosition:MP[`height${o.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!o&&c.navigation||Fe.shouldChangeHeaderIsVisible(!0,c,a)},scrollDown:()=>{!o&&c.navigation||Fe.shouldChangeHeaderIsVisible(!1,c,a)}}});const u=(h,f)=>{Fe.handleMenus({id:h,value:f,menus:c,dispatch:a})},d=$.useRef(null);return ri(()=>{c.navigation&&Fe.autoFocus({menu:"navigation",navigationRef:d,isDesktopVersion:o.navigation,focusElements:l,dispatch:a})},[c.navigation]),ri(()=>{c.account&&Fe.autoFocus({menu:"account",navigationRef:d,isDesktopVersion:o.navigation,focusElements:l,dispatch:a})},[c.account]),t&&t.isLoading?null:x.jsxs(x.Fragment,{children:[x.jsxs("nav",{id:"header",className:ue({"logged-in":n,"logged-out":!n,visible:s}),children:[x.jsx(lt,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),x.jsx(Zf,{}),!o.navigation&&x.jsx("button",{className:"menu-button gtm-trackable",onClick:h=>{h.preventDefault(),h.stopPropagation(),u("navigation",!c.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":c.navigation,"aria-controls":"navigation",children:x.jsx(lt,{children:e.formatMessage({id:`header_menu_${c.navigation?"hide":"show"}`})})}),x.jsx("ul",{ref:d,id:"navigation",hidden:o.navigation||c.account?!1:!c.navigation,role:"menu","data-showing":!o.navigation&&c.account?"account":"default",children:Ns.order.map(h=>x.jsx(au,{id:h,isLoggedIn:n,isDesktopVersion:o.navigation,menus:{navigation:c.navigation,account:c.account},callback:u},h))}),!o.search&&x.jsx("button",{className:"search toggle-search-button",onClick:h=>{h.preventDefault(),h.stopPropagation(),u("search",!c.search)},"aria-haspopup":"true","aria-expanded":c.search,"aria-controls":"search-form",children:x.jsx(lt,{children:e.formatMessage({id:`header_search_${c.search?"hide":"show"}`})})}),x.jsx(X0,{id:"global-search",handleToggle:{searchIsOpen:c.search,isDesktopVersion:o.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),n?x.jsxs("button",{className:"account-button",onClick:h=>Fe.events.onClick(h,{id:"account",callback:u,isOpen:c.account}),onMouseEnter:()=>Fe.events.onMouseEnter({id:"account",callback:u}),onMouseLeave:()=>Fe.events.onBlur({id:"account",callback:u}),"aria-haspopup":"true","aria-expanded":c.account,"aria-controls":"navigation",children:[x.jsx(lt,{children:e.formatMessage({id:`header_account_${c.account?"hide":"show"}`})}),x.jsx(_u,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):x.jsx("ul",{className:"sign-in-buttons",children:Ns.buttons.order.map(h=>x.jsx(au,{id:`buttons.${h}`},h))})]}),x.jsx("hr",{id:"content-of-page"}),x.jsx("div",{className:ue("overlay",{open:c.navigation||c.account||!o.search&&c.search})})]})},FP=$.createContext(null),vl={didCatch:!1,error:null};class BP extends $.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 r,n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:i,reason:"imperative-api"}),this.setState(vl)}}componentDidCatch(t,r){var n,o;(n=(o=this.props).onError)===null||n===void 0||n.call(o,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:o}=this.props;if(n&&r.error!==null&&DP(t.resetKeys,o)){var i,a;(i=(a=this.props).onReset)===null||i===void 0||i.call(a,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(vl)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:o}=this.props,{didCatch:i,error:a}=this.state;let s=t;if(i){const c={error:a,resetErrorBoundary:this.resetErrorBoundary};if($.isValidElement(o))s=o;else if(typeof r=="function")s=r(c);else if(n)s=$.createElement(n,c);else throw a}return $.createElement(FP.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}}function DP(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}const UP=()=>{const e=Oe();return x.jsxs(x.Fragment,{children:[x.jsx(oh,{}),x.jsx("div",{className:"content",children:x.jsx(ra,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),x.jsx(eh,{})]})},$P=({children:e,reportError:t,showFooter:r=!0,background:n="default",className:o="",locale:i="en"})=>{const a=uv(e,{locale:i});return x.jsx(BP,{onError:t,fallback:x.jsx(UP,{}),children:x.jsx($.Suspense,{fallback:x.jsx(d0,{layout:"overview-page"}),children:x.jsx("div",{id:"wrapper",className:ue(o,{[n]:n!=="default"}),children:x.jsxs(ME,{children:[x.jsx(oh,{}),x.jsx("div",{className:"content",children:a}),r&&x.jsx(eh,{}),x.jsx(z0,{})]})})})})},Im={default:"tags_",headerTopics:"header_topics_topics_"},El={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"},jP={getTagDetails:e=>{if(e.includes("topic_")){if(e=El.topic[e.replace("topic_","")],e){const t=Ns.topics.topics[e].href;return t?{id:e,href:t,text:`${Im.headerTopics}${e}`}:null}return null}return El[e]?(e=El[e],{id:e,text:`${Im.default}${e}`}):null}};const HP=({tags:e=[],color:t="default",forceOneLine:r=!1,canHaveLinks:n=!0,className:o="",gtmType:i="tag-click",gtmContext:a="tags"})=>{const s=Oe();if(!e||e.length<1)return null;const c=[];return e.forEach(l=>{if(!l)return;const u=jP.getTagDetails(l);u&&c.push(u)}),c.length<1?null:x.jsx("ul",{className:ue("tags text-small",t,o,{"one-line":r}),children:c.map(l=>{const u=s.formatMessage({id:l.text});return x.jsx("li",{children:l.href&&n?x.jsx("a",{href:l.href,className:"gtm-trackable","data-gtm-event-type":i,"data-gtm-event-context":a,children:u}):u},l.id)})})};const qP=({members:{total:e,data:t=[]},pagination:r,gtmContext:n="member",gtmType:o="member-click",className:i=""})=>{const a=Oe();return t.length===0?null:(e||(e=t.length),x.jsxs("div",{className:ue("members-list",i),children:[x.jsxs("h1",{children:[a.formatMessage({id:"membersList"}),x.jsx("span",{className:"count",children:e})]}),x.jsx("ul",{children:t.map((s,c)=>x.jsxs("li",{children:[x.jsx(bu,{member:s,gtmContext:n,gtmType:o}),s.isAdmin&&x.jsx(l0,{children:a.formatMessage({id:"membersList_admin"})})]},c))}),r&&x.jsx(V0,{...r,icon:{icon:"arrow-down",position:"right"},gtmContext:n})]}))};function gf(){return gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gf.apply(this,arguments)}function GP(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var VP=$.useLayoutEffect,WP=function(t){var r=pe.useRef(t);return VP(function(){r.current=t}),r},Lm=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},zP=function(t,r){var n=$.useRef();return $.useCallback(function(o){t.current=o,n.current&&Lm(n.current,null),n.current=r,r&&Lm(r,o)},[r])},km={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},QP=function(t){Object.keys(km).forEach(function(r){t.style.setProperty(r,km[r],"important")})},Mm=QP,vt=null,Fm=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function YP(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),vt||(vt=document.createElement("textarea"),vt.setAttribute("tabindex","-1"),vt.setAttribute("aria-hidden","true"),Mm(vt)),vt.parentNode===null&&document.body.appendChild(vt);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(h){var f=h;vt.style[f]=a[f]}),Mm(vt),vt.value=t;var c=Fm(vt,e);vt.value=t,c=Fm(vt,e),vt.value="x";var l=vt.scrollHeight-o,u=l*r;s==="border-box"&&(u=u+o+i),c=Math.max(u,c);var d=l*n;return s==="border-box"&&(d=d+o+i),c=Math.min(d,c),[c,l]}var Bm=function(){},KP=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},XP=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],JP=!!document.documentElement.currentStyle,ZP=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=KP(XP,r),o=n.boxSizing;if(o==="")return null;JP&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var i=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:i,borderSize:a}},eN=ZP;function aE(e,t,r){var n=WP(r);pe.useLayoutEffect(function(){var o=function(a){return n.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var tN=function(t){aE(window,"resize",t)},rN=function(t){aE(document.fonts,"loadingdone",t)},nN=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],iN=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?Bm:a,c=t.onHeightChange,l=c===void 0?Bm:c,u=GP(t,nN),d=u.value!==void 0,h=pe.useRef(null),f=zP(h,r),p=pe.useRef(0),m=pe.useRef(),_=function(){var b=h.current,A=n&&m.current?m.current:eN(b);if(A){m.current=A;var S=YP(A,b.value||b.placeholder||"x",i,o),P=S[0],R=S[1];p.current!==P&&(p.current=P,b.style.setProperty("height",P+"px","important"),l(P,{rowHeight:R}))}},w=function(b){d||_(),s(b)};return pe.useLayoutEffect(_),tN(_),rN(_),pe.createElement("textarea",gf({},u,{onChange:w,ref:f}))},oN=pe.forwardRef(iN);let ka=null;const It="discussion_form_",uu=({content:e={type:"response",slugs:{}},meta:t={isLoading:!1,isInWrapper:!1,isEditing:!1,showTitle:!1},inputRef:r,maxLength:n=5e4,minRows:o=4,forceShow:i={cancel:!1,error:!1},functions:a={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:s="DiscussionForm"})=>{var L,k;const c=Oe(),l=$.useContext($r),[u,d]=$.useState(t.isEditing&&t.isEditing.text||""),[h,f]=$.useState(i.error||!1),[p,m]=$.useState(!1),_=$.useRef(null);if(r||(r=_),t.isLoading)return x.jsx(gr,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const w=q=>{const G=q.target.value;d(G);let H;!l||!l.id?H=Lr(c.formatMessage,`${It}error_loggedOut`,e.type,"action"):G.length>=n&&(H=`${It}error_tooLong`),H?f(H):h&&f(!1)};let v=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const q=e.type==="response"?((L=e.slugs)==null?void 0:L.question)||"":((k=e.slugs)==null?void 0:k.answer)||"";q&&(v=`${v}-${q.slice(-15)}`)}const b=async q=>{var H;if(q.preventDefault(),q.stopPropagation(),S)return;ka&&clearTimeout(ka),m("submitting");const G=window.location.pathname;try{let Y;switch(e.type){case"post":Y=await a.create({content:u});break;case"question":Y=await a.create({title:u,authorId:l&&l.id,...(H=a.props)==null?void 0:H.create});break;case"response":Y=await a.create({question:e.slugs.question},{body:u,authorId:l&&l.id,contentPath:G});break;case"reply":Y=await a.create({question:e.slugs.question,answer:e.slugs.answer},{body:u,authorId:l&&l.id,contentPath:G});break;default:break}await Vx(1e3),a.callback&&await a.callback(Y),ka=setTimeout(()=>{d(""),m("submitted"),A()},500)}catch(Y){const ie=Y;let K=`${It}error`;ie.message.includes("entry already exists")&&(K=Lr(c.formatMessage,`${It}error_alreadyExists`,e.type,"action")),ie.message.includes("429")?K=Lr(c.formatMessage,`${It}error_tooMany`,e.type,"action"):ie.message.includes("400")&&(K=`${It}error`),f(K),A()}},A=()=>{ka=setTimeout(()=>{f(!1),m(!1)},5e3)},S=!u||!Yx(u),P=p==="submitting",R=[];return(t.isEditing&&!P||i.cancel)&&R.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:a.handleCancel,className:"gtm-trackable","data-gtm-event-context":s,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!i.cancel&&(!l||!l.id||!u),children:c.formatMessage({id:`${It}cancel`})}),R.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:q=>{if(t.isEditing){m("submitting"),a.handleSaveEdit&&a.handleSaveEdit(_.current&&"value"in _.current?_.current.value:"");return}b(q)},className:"gtm-trackable","data-gtm-event-context":s,"data-gtm-event-type":`${t.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!l||!l.id||S||P||t.isEditing&&u===t.isEditing.text,children:c.formatMessage({id:`${It}${P?t.isEditing?"saving":"posting":t.isEditing?"save":"post"}`})}),x.jsxs("form",{id:v,className:ue("discussion-card discussion-form",{"no-styling":t.isInWrapper&&t.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[(t==null?void 0:t.showTitle)&&!t.isEditing&&["question"].includes(e.type)&&x.jsx("h2",{children:Lr(c.formatMessage,`${It}title`,e.type,"action")}),x.jsx(bu,{member:l||"community",gtmContext:s,gtmType:"profile-click"}),x.jsx(lt,{element:"label",showOnFocus:!1,htmlFor:`${v}-input`,children:Lr(c.formatMessage,`${It}label`,e.type,"action")}),x.jsx(oN,{ref:r,id:`${v}-input`,name:e.type,placeholder:Lr(c.formatMessage,`${It}placeholder`,e.type,"action"),onChange:w,value:u,maxLength:n,"aria-invalid":!!h,"aria-errormessage":"error-message",minRows:o,autoFocus:!!t.isEditing}),x.jsx("small",{children:Lr(c.formatMessage,`${It}explainer`,e.type,"action",{a:q=>x.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",className:"gtm-trackable","data-gtm-event-context":s,"data-gtm-event-type":"community-guidelines-link",children:q})})}),x.jsx(Zs,{buttons:R}),p==="submitted"&&x.jsx(Ka,{className:"success","data-testid":"success",children:Lr(c.formatMessage,`${It}success`,e.type,"action")}),h&&x.jsx(Ka,{id:"error-message",className:"error","data-testid":"error",children:i.error?i.error:typeof h=="string"?h.includes(" ")?h:c.formatMessage({id:h},{action:c.formatMessage({id:`discussion_action_${e.type}`}),maxLength:n}):h})]})},sh=({contentType:e,createPost:t,membershipRequiredToPost:{isMember:r,required:n,join:o,leave:i,notMemberStateText:a}})=>n?r?x.jsx(uu,{content:{type:e,slugs:{}},functions:{create:t}}):x.jsx(ra,{text:a,button:{component:x.jsx(Jf,{functions:{join:o,leave:i}})}}):x.jsx(uu,{content:{type:e,slugs:{}},functions:{create:t}}),sN={showThread:!1,showForm:!1},ah=$.createContext(sN),aN=({children:e})=>{const[t,r]=$.useState({showThread:!1,showForm:!1});return x.jsx(ah.Provider,{value:{...t,updateConversation:r},children:e})},uN=({question:e,answer:t,reply:r})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...r&&{replySlug:r}}),cN=(e,t=10)=>!e||e.length===0?[]:e.reverse().slice(0,t);let ws=!1;const _l=()=>{ws!==!1&&(clearTimeout(ws),ws=!1)},uE=({element:e="div",likes:t=0,peopleWhoLiked:r=!1,isShort:n=!0,userLiked:o=!1,content:i={type:"reply",slugs:{}},canLike:a=!0,functions:{createLike:s=()=>{},deleteLike:c=()=>{}}={}})=>{const l=Oe();$.useEffect(()=>{f(o)},[o]);const[u,d]=$.useState(t),[h,f]=$.useState(o),[p,m]=$.useState(!1),[_,w]=$.useState(!1),v=$.useMemo(()=>cN(r),[r]),b=window.location.pathname,A=P=>{if(P.preventDefault(),P.stopPropagation(),w(!1),ws)return _l(),!1;if(_l(),p||!a)return!1;ws=setTimeout(S,350)},S=async()=>{if(_l(),p||!a)return!1;let P=h?u-1:u+1;P<0&&(P=0),m(!0),d(P),f(!h);try{if(i&&i.slugs){const R=uN(i.slugs);h?await c(R):await s(R,{contentPath:b})}}catch{d(t),f(o)}finally{m(!1)}};return $.createElement(e,{className:ue("likes-wrapper text-medium action-button",{"show-spinner":p,"is-liked":h,disabled:!a}),onClick:A,onMouseEnter:()=>{w(!0)},onMouseLeave:()=>{w(!1)},onFocus:()=>{w(!0)},onBlur:()=>{w(!1)},children:x.jsxs(x.Fragment,{children:[x.jsx(ze,{variant:"tertiary",size:"medium",icon:{icon:h?"heart":"heart_empty",animate:"bounce"},className:ue({"do-animation":h&&!o}),screenreaderText:a?l.formatMessage({id:`discussion_${i.type}_likes_${h?"unlike":"like"}`}):!1,onClick:A,disabled:!a,"aria-hidden":!a,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${i.type}-click`}),x.jsx("span",{className:"number-of-likes","data-testid":"number-of-likes",children:l.formatMessage({id:`discussion_likes${n?"_short":""}`},{number:u})}),r&&x.jsx($v,{isOpen:_,isLoading:r.length===0,children:r.length&&x.jsx("ul",{children:v.map(P=>typeof P=="string"||!P.name?null:x.jsx("li",{children:P.name},P.id||window.btoa(P.name)))})})]})})};var cu={exports:{}};cu.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",o=1,i=2,a=9007199254740991,s="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",_="[object Number]",w="[object Null]",v="[object Object]",b="[object Promise]",A="[object Proxy]",S="[object RegExp]",P="[object Set]",R="[object String]",L="[object Symbol]",k="[object Undefined]",q="[object WeakMap]",G="[object ArrayBuffer]",H="[object DataView]",Y="[object Float32Array]",ie="[object Float64Array]",K="[object Int8Array]",D="[object Int16Array]",Q="[object Int32Array]",ee="[object Uint8Array]",he="[object Uint8ClampedArray]",J="[object Uint16Array]",X="[object Uint32Array]",se=/[\\^$.*+?()[\]{}|]/g,fe=/^\[object .+?Constructor\]$/,He=/^(?:0|[1-9]\d*)$/,te={};te[Y]=te[ie]=te[K]=te[D]=te[Q]=te[ee]=te[he]=te[J]=te[X]=!0,te[s]=te[c]=te[G]=te[u]=te[H]=te[d]=te[h]=te[f]=te[m]=te[_]=te[v]=te[S]=te[P]=te[R]=te[q]=!1;var ae=typeof de=="object"&&de&&de.Object===Object&&de,Be=typeof self=="object"&&self&&self.Object===Object&&self,Ie=ae||Be||Function("return this")(),Tt=t&&!t.nodeType&&t,At=Tt&&!0&&e&&!e.nodeType&&e,Gt=At&&At.exports===Tt,oe=Gt&&ae.process,st=function(){try{return oe&&oe.binding&&oe.binding("util")}catch{}}(),Je=st&&st.isTypedArray;function Vt(y,O){for(var I=-1,W=y==null?0:y.length,ge=0,le=[];++I<W;){var _e=y[I];O(_e,I,y)&&(le[ge++]=_e)}return le}function br(y,O){for(var I=-1,W=O.length,ge=y.length;++I<W;)y[ge+I]=O[I];return y}function er(y,O){for(var I=-1,W=y==null?0:y.length;++I<W;)if(O(y[I],I,y))return!0;return!1}function kt(y,O){for(var I=-1,W=Array(y);++I<y;)W[I]=O(I);return W}function yn(y){return function(O){return y(O)}}function Wt(y,O){return y.has(O)}function Mt(y,O){return y==null?void 0:y[O]}function Ze(y){var O=-1,I=Array(y.size);return y.forEach(function(W,ge){I[++O]=[ge,W]}),I}function zt(y,O){return function(I){return y(O(I))}}function yt(y){var O=-1,I=Array(y.size);return y.forEach(function(W){I[++O]=W}),I}var at=Array.prototype,vn=Function.prototype,T=Object.prototype,g=Ie["__core-js_shared__"],E=vn.toString,C=T.hasOwnProperty,M=function(){var y=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),j=T.toString,z=RegExp("^"+E.call(C).replace(se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me=Gt?Ie.Buffer:void 0,Ce=Ie.Symbol,Re=Ie.Uint8Array,Pe=T.propertyIsEnumerable,Ee=at.splice,Ct=Ce?Ce.toStringTag:void 0,Hr=Object.getOwnPropertySymbols,En=me?me.isBuffer:void 0,wr=zt(Object.keys,Object),_n=Yt(Ie,"DataView"),Sr=Yt(Ie,"Map"),bn=Yt(Ie,"Promise"),wn=Yt(Ie,"Set"),Sn=Yt(Ie,"WeakMap"),tr=Yt(Object,"create"),ci=ut(_n),Qt=ut(Sr),go=ut(bn),yo=ut(wn),vo=ut(Sn),li=Ce?Ce.prototype:void 0,Tn=li?li.valueOf:void 0;function We(y){var O=-1,I=y==null?0:y.length;for(this.clear();++O<I;){var W=y[O];this.set(W[0],W[1])}}function xn(){this.__data__=tr?tr(null):{},this.size=0}function On(y){var O=this.has(y)&&delete this.__data__[y];return this.size-=O?1:0,O}function Tr(y){var O=this.__data__;if(tr){var I=O[y];return I===n?void 0:I}return C.call(O,y)?O[y]:void 0}function fi(y){var O=this.__data__;return tr?O[y]!==void 0:C.call(O,y)}function Eo(y,O){var I=this.__data__;return this.size+=this.has(y)?0:1,I[y]=tr&&O===void 0?n:O,this}We.prototype.clear=xn,We.prototype.delete=On,We.prototype.get=Tr,We.prototype.has=fi,We.prototype.set=Eo;function et(y){var O=-1,I=y==null?0:y.length;for(this.clear();++O<I;){var W=y[O];this.set(W[0],W[1])}}function _o(){this.__data__=[],this.size=0}function bo(y){var O=this.__data__,I=Vr(O,y);if(I<0)return!1;var W=O.length-1;return I==W?O.pop():Ee.call(O,I,1),--this.size,!0}function wo(y){var O=this.__data__,I=Vr(O,y);return I<0?void 0:O[I][1]}function So(y){return Vr(this.__data__,y)>-1}function An(y,O){var I=this.__data__,W=Vr(I,y);return W<0?(++this.size,I.push([y,O])):I[W][1]=O,this}et.prototype.clear=_o,et.prototype.delete=bo,et.prototype.get=wo,et.prototype.has=So,et.prototype.set=An;function ht(y){var O=-1,I=y==null?0:y.length;for(this.clear();++O<I;){var W=y[O];this.set(W[0],W[1])}}function To(){this.size=0,this.__data__={hash:new We,map:new(Sr||et),string:new We}}function xo(y){var O=Rt(this,y).delete(y);return this.size-=O?1:0,O}function Oo(y){return Rt(this,y).get(y)}function Ao(y){return Rt(this,y).has(y)}function Co(y,O){var I=Rt(this,y),W=I.size;return I.set(y,O),this.size+=I.size==W?0:1,this}ht.prototype.clear=To,ht.prototype.delete=xo,ht.prototype.get=Oo,ht.prototype.has=Ao,ht.prototype.set=Co;function qr(y){var O=-1,I=y==null?0:y.length;for(this.__data__=new ht;++O<I;)this.add(y[O])}function hi(y){return this.__data__.set(y,n),this}function Gr(y){return this.__data__.has(y)}qr.prototype.add=qr.prototype.push=hi,qr.prototype.has=Gr;function xt(y){var O=this.__data__=new et(y);this.size=O.size}function Cn(){this.__data__=new et,this.size=0}function Ro(y){var O=this.__data__,I=O.delete(y);return this.size=O.size,I}function Po(y){return this.__data__.get(y)}function No(y){return this.__data__.has(y)}function Io(y,O){var I=this.__data__;if(I instanceof et){var W=I.__data__;if(!Sr||W.length<r-1)return W.push([y,O]),this.size=++I.size,this;I=this.__data__=new ht(W)}return I.set(y,O),this.size=I.size,this}xt.prototype.clear=Cn,xt.prototype.delete=Ro,xt.prototype.get=Po,xt.prototype.has=No,xt.prototype.set=Io;function Lo(y,O){var I=Wr(y),W=!I&&vi(y),ge=!I&&!W&&Qr(y),le=!I&&!W&&!ge&&Ln(y),_e=I||W||ge||le,be=_e?kt(y.length,String):[],qe=be.length;for(var Ae in y)(O||C.call(y,Ae))&&!(_e&&(Ae=="length"||ge&&(Ae=="offset"||Ae=="parent")||le&&(Ae=="buffer"||Ae=="byteLength"||Ae=="byteOffset")||rr(Ae,qe)))&&be.push(Ae);return be}function Vr(y,O){for(var I=y.length;I--;)if(yi(y[I][0],O))return I;return-1}function Rn(y,O,I){var W=O(y);return Wr(y)?W:br(W,I(y))}function xr(y){return y==null?y===void 0?k:w:Ct&&Ct in Object(y)?Kt(y):gi(y)}function di(y){return Ft(y)&&xr(y)==s}function pi(y,O,I,W,ge){return y===O?!0:y==null||O==null||!Ft(y)&&!Ft(O)?y!==y&&O!==O:mi(y,O,I,W,pi,ge)}function mi(y,O,I,W,ge,le){var _e=Wr(y),be=Wr(O),qe=_e?c:Pt(y),Ae=be?c:Pt(O);qe=qe==s?v:qe,Ae=Ae==s?v:Ae;var tt=qe==v,ct=Ae==v,Ve=qe==Ae;if(Ve&&Qr(y)){if(!Qr(O))return!1;_e=!0,tt=!1}if(Ve&&!tt)return le||(le=new xt),_e||Ln(y)?Pn(y,O,I,W,ge,le):Bo(y,O,qe,I,W,ge,le);if(!(I&o)){var rt=tt&&C.call(y,"__wrapped__"),Qe=ct&&C.call(O,"__wrapped__");if(rt||Qe){var nr=rt?y.value():y,Xt=Qe?O.value():O;return le||(le=new xt),ge(nr,Xt,I,W,le)}}return Ve?(le||(le=new xt),Nn(y,O,I,W,ge,le)):!1}function ko(y){if(!_i(y)||$o(y))return!1;var O=Ei(y)?z:fe;return O.test(ut(y))}function Mo(y){return Ft(y)&&In(y.length)&&!!te[xr(y)]}function Fo(y){if(!jo(y))return wr(y);var O=[];for(var I in Object(y))C.call(y,I)&&I!="constructor"&&O.push(I);return O}function Pn(y,O,I,W,ge,le){var _e=I&o,be=y.length,qe=O.length;if(be!=qe&&!(_e&&qe>be))return!1;var Ae=le.get(y);if(Ae&&le.get(O))return Ae==O;var tt=-1,ct=!0,Ve=I&i?new qr:void 0;for(le.set(y,O),le.set(O,y);++tt<be;){var rt=y[tt],Qe=O[tt];if(W)var nr=_e?W(Qe,rt,tt,O,y,le):W(rt,Qe,tt,y,O,le);if(nr!==void 0){if(nr)continue;ct=!1;break}if(Ve){if(!er(O,function(Xt,Ar){if(!Wt(Ve,Ar)&&(rt===Xt||ge(rt,Xt,I,W,le)))return Ve.push(Ar)})){ct=!1;break}}else if(!(rt===Qe||ge(rt,Qe,I,W,le))){ct=!1;break}}return le.delete(y),le.delete(O),ct}function Bo(y,O,I,W,ge,le,_e){switch(I){case H:if(y.byteLength!=O.byteLength||y.byteOffset!=O.byteOffset)return!1;y=y.buffer,O=O.buffer;case G:return!(y.byteLength!=O.byteLength||!le(new Re(y),new Re(O)));case u:case d:case _:return yi(+y,+O);case h:return y.name==O.name&&y.message==O.message;case S:case R:return y==O+"";case m:var be=Ze;case P:var qe=W&o;if(be||(be=yt),y.size!=O.size&&!qe)return!1;var Ae=_e.get(y);if(Ae)return Ae==O;W|=i,_e.set(y,O);var tt=Pn(be(y),be(O),W,ge,le,_e);return _e.delete(y),tt;case L:if(Tn)return Tn.call(y)==Tn.call(O)}return!1}function Nn(y,O,I,W,ge,le){var _e=I&o,be=Or(y),qe=be.length,Ae=Or(O),tt=Ae.length;if(qe!=tt&&!_e)return!1;for(var ct=qe;ct--;){var Ve=be[ct];if(!(_e?Ve in O:C.call(O,Ve)))return!1}var rt=le.get(y);if(rt&&le.get(O))return rt==O;var Qe=!0;le.set(y,O),le.set(O,y);for(var nr=_e;++ct<qe;){Ve=be[ct];var Xt=y[Ve],Ar=O[Ve];if(W)var na=_e?W(Ar,Xt,Ve,O,y,le):W(Xt,Ar,Ve,y,O,le);if(!(na===void 0?Xt===Ar||ge(Xt,Ar,I,W,le):na)){Qe=!1;break}nr||(nr=Ve=="constructor")}if(Qe&&!nr){var ir=y.constructor,Yr=O.constructor;ir!=Yr&&"constructor"in y&&"constructor"in O&&!(typeof ir=="function"&&ir instanceof ir&&typeof Yr=="function"&&Yr instanceof Yr)&&(Qe=!1)}return le.delete(y),le.delete(O),Qe}function Or(y){return Rn(y,bi,Do)}function Rt(y,O){var I=y.__data__;return Uo(O)?I[typeof O=="string"?"string":"hash"]:I.map}function Yt(y,O){var I=Mt(y,O);return ko(I)?I:void 0}function Kt(y){var O=C.call(y,Ct),I=y[Ct];try{y[Ct]=void 0;var W=!0}catch{}var ge=j.call(y);return W&&(O?y[Ct]=I:delete y[Ct]),ge}var Do=Hr?function(y){return y==null?[]:(y=Object(y),Vt(Hr(y),function(O){return Pe.call(y,O)}))}:wi,Pt=xr;(_n&&Pt(new _n(new ArrayBuffer(1)))!=H||Sr&&Pt(new Sr)!=m||bn&&Pt(bn.resolve())!=b||wn&&Pt(new wn)!=P||Sn&&Pt(new Sn)!=q)&&(Pt=function(y){var O=xr(y),I=O==v?y.constructor:void 0,W=I?ut(I):"";if(W)switch(W){case ci:return H;case Qt:return m;case go:return b;case yo:return P;case vo:return q}return O});function rr(y,O){return O=O??a,!!O&&(typeof y=="number"||He.test(y))&&y>-1&&y%1==0&&y<O}function Uo(y){var O=typeof y;return O=="string"||O=="number"||O=="symbol"||O=="boolean"?y!=="__proto__":y===null}function $o(y){return!!M&&M in y}function jo(y){var O=y&&y.constructor,I=typeof O=="function"&&O.prototype||T;return y===I}function gi(y){return j.call(y)}function ut(y){if(y!=null){try{return E.call(y)}catch{}try{return y+""}catch{}}return""}function yi(y,O){return y===O||y!==y&&O!==O}var vi=di(function(){return arguments}())?di:function(y){return Ft(y)&&C.call(y,"callee")&&!Pe.call(y,"callee")},Wr=Array.isArray;function zr(y){return y!=null&&In(y.length)&&!Ei(y)}var Qr=En||qo;function Ho(y,O){return pi(y,O)}function Ei(y){if(!_i(y))return!1;var O=xr(y);return O==f||O==p||O==l||O==A}function In(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=a}function _i(y){var O=typeof y;return y!=null&&(O=="object"||O=="function")}function Ft(y){return y!=null&&typeof y=="object"}var Ln=Je?yn(Je):Mo;function bi(y){return zr(y)?Lo(y):Fo(y)}function wi(){return[]}function qo(){return!1}e.exports=Ho})(cu,cu.exports);var lN=cu.exports;const fN=vr(lN);const cE=({element:e="section",children:t,className:r,...n})=>$.createElement(e,{className:ue("modal",r),children:typeof t=="string"?x.jsx("p",{children:t}):t,...n});const lE=({id:e="content-overlay",isOpen:t=!1,maxWidth:r,functions:{onOpen:n=()=>{},onClose:o=()=>{}}={},forceShow:{error:i=!1}={},title:a,children:s,buttons:c,className:l="",gtmContext:u="Modal"})=>{const d=Oe(),[h,f]=$.useState(t),p=_=>{f(_),_?(n(),document.body.classList.add("has-overlay")):(o(),document.body.classList.remove("has-overlay"))};$.useEffect(()=>{p(t)},[t]);const m=r?{"--max-width":`${r/16}rem`}:{};return x.jsx("div",{className:ue("overlay",{open:h}),children:x.jsx(cE,{id:e,className:ue("overlay-modal",l,{"has-max-width":r}),hidden:!h,style:m,children:t&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"top",children:[x.jsx("h2",{children:a}),x.jsx(ze,{variant:"tertiary",size:"medium",icon:{icon:"close"},onClick:()=>p(!1),className:"gtm-trackable","data-gtm-event-type":"close-modal-click","data-gtm-event-context":u,screenreaderText:d.formatMessage({id:"overlay_button"})})]}),x.jsx(Qa,{}),s,c&&x.jsxs("div",{className:"bottom",children:[x.jsx(Qa,{}),x.jsx(Zs,{buttons:c})]}),i&&x.jsx(Ka,{className:"error",children:i})]})})})},fE=(e,t)=>({"aria-haspopup":!0,"aria-expanded":t,"aria-controls":e}),Dm=e=>{const t={};return Object.keys(e).forEach(r=>{t[`${r}Slug`]=e[r]}),t};const Ir="discussion_",Cu=({element:e="div",content:t,isLoading:r=!1,originalAuthorId:n,functions:{content:{createContent:o,deleteContent:i,updateContent:a}={createContent:()=>{},deleteContent:()=>{},updateContent:()=>{}},likes:{createLike:s,deleteLike:c}={createLike:()=>{},deleteLike:()=>{}},comments:{openComments:l}={openComments:()=>{}}},links:u={},className:d,gtmContext:h="DiscussionAnswer",locale:f="en",children:p})=>{const m=Oe(),_=$.useContext($r),w=$.useContext(ah),[v,b]=$.useState({body:t&&t.body||"",isEditing:!1,didEdit:t&&t.isEdited||!1}),[A,S]=$.useState(!1),[P,R]=$.useState("");if($.useEffect(()=>{b({...v,body:t&&t.body||"",didEdit:t&&t.isEdited||!1})},[t.isEdited]),r||!t||t.type==="answer"&&(!t.slugs||!t.slugs.question))return x.jsx(gr,{className:"discussion-card discussion-post"});const{author:L,canLike:k,createdAt:q,id:G,likes:H=0,userLiked:Y,comments:ie=0}=t,K=_&&_.id&&typeof L!="string"&&L.id&&L.id===_.id||!1,D=typeof k=="boolean"?k:!K,Q=async X=>{X||(X=""),R("");try{if(!fN(X,v.body)){const se=t.type==="question"?{title:X}:{body:X};await a(Dm(t.slugs),se)}b({body:X,isEditing:!1,didEdit:!0})}catch{R(`${Ir}form_error`)}},ee=()=>{w&&w.updateConversation&&w.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const se=`reply-form-${(t.type==="answer"?t.slug:t.slugs.answer||"").toLowerCase().slice(-15)}`,fe=document.getElementById(se),He=document.getElementById(`${se}-input`);He&&He.focus(),fe&&fe.scrollIntoView({behavior:"smooth"})},0)},he=()=>{try{i(Dm(t.slugs))}catch{R("delete-error")}},J=[{text:m.formatMessage({id:`${Ir}moreMenu_report`}),href:`mailto:community@apolitical.co?subject=${encodeURI(m.formatMessage({id:`${Ir}report_subject`}))}&body=${encodeURI(m.formatMessage({id:`${Ir}report_body`},{contentType:t.type||"",contentSlug:t.slug||"",contentUrl:`${window.origin}${typeof process<"u"&&process.env.PUBLIC_URL||""}/${t.slugs.question||""}`}))}`,icon:"flag"}];return K&&J.push({text:m.formatMessage({id:`${Ir}moreMenu_edit`}),onClick:()=>b({...v,isEditing:!0}),icon:"pencil-paper",className:"gtm-trackable","data-gtm-event-context":h,"data-gtm-event-type":`edit-${t.type}-click`},{text:m.formatMessage({id:`${Ir}moreMenu_delete`}),onClick:X=>{X.preventDefault(),X.stopPropagation(),S(!0)},icon:"trash",className:"gtm-trackable","data-gtm-event-context":h,"data-gtm-event-type":`delete-${t.type}-click`,...fE(`delete-${t.slug}-modal`,A)}),$.createElement(e,{className:ue("discussion-post",d),"data-testid":`discussion-${t.type}-thread`,children:x.jsxs(x.Fragment,{children:[x.jsxs("div",{id:G||t.slug,className:ue("discussion-card",t.type,{editing:v.isEditing,"has-link":u.post&&!v.isEditing}),onClick:X=>{!u.post||v.isEditing||(X.preventDefault(),X.stopPropagation(),window.location.href=u.post)},children:[!v.isEditing&&x.jsx(bu,{member:L,additionalContent:{createdAt:q,didEdit:v.didEdit},className:typeof L!="string"&&L.id===n?"highlighted":"",gtmContext:h,gtmType:"profile-click"}),v.isEditing?x.jsx(uu,{content:{type:t.type,slugs:t.slugs},meta:{isLoading:r,isInWrapper:!0,isEditing:{text:v.body}},maxLength:t.type==="question"?250:5e4,forceShow:{error:P!==""&&P!=="delete-error"?m.formatMessage({id:P},{action:m.formatMessage({id:`discussion_action_${t.type}`})}):!1},functions:{create:o,handleSaveEdit:Q,handleCancel:()=>{R(""),b({...v,isEditing:!1})}},gtmContext:`${h}Form`}):u.post?x.jsx("a",{href:u.post,className:"gtm-trackable","data-gtm-event-context":h,"data-gtm-event-type":"title-click",children:x.jsx(Kl,{options:{overrides:{a:null}},children:v.body})}):x.jsx(Kl,{options:{wrapper:t.type==="question"?"h1":$.Fragment,forceWrapper:t.type==="question",forceInline:t.type==="question",forceBlock:t.type!=="question"},children:v.body}),!v.isEditing&&x.jsxs("ul",{className:ue("actions text-medium",t.type),"data-testid":`${t.type}-actions`,children:[x.jsx(uE,{element:"li",likes:H,isShort:!1,userLiked:Y,content:{type:t.type,slugs:t.slugs},canLike:D,functions:{createLike:s,deleteLike:c}}),["question","post"].includes(t.type)||u.comments||typeof l=="function"&&x.jsxs("li",{className:"action-button",onClick:X=>{X.preventDefault(),X.stopPropagation(),u.comments&&(window.location.href=u.comments),typeof l=="function"&&l()},children:[x.jsx(ze,{variant:"tertiary",size:"medium",styling:{muted:!0},icon:{icon:"speech-bubble_square_thick"},href:u.comments?u.comments:!1,onClick:u.comments||typeof l!="function"?!1:l,className:"gtm-trackable","data-gtm-event-context":h,"data-gtm-event-type":`answer-${t.type}-click`,screenreaderText:m.formatMessage({id:`${Ir}comments_screenReader`},{count:ie})}),x.jsx("span",{children:m.formatMessage({id:`${Ir}comments`},{count:ie})})]}),(t.type==="answer"||t.type==="reply")&&x.jsx("li",{children:x.jsx(ze,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:ee,children:m.formatMessage({id:`${Ir}reply`})})}),x.jsx(W0,{element:"li",id:`more-${t.slug}`,options:J})]})]}),p,x.jsx(lE,{id:`delete-${t.slug}-modal`,isOpen:A,functions:{onOpen:()=>{},onClose:()=>S(!1)},forceShow:{error:P==="delete-error"?m.formatMessage({id:"discussion_delete_error"},{action:m.formatMessage({id:`discussion_action_${t.type}`})}):!1},title:m.formatMessage({id:"discussion_delete_title"},{action:m.formatMessage({id:`discussion_action_${t.type}`})}),buttons:[{variant:"secondary",onClick:()=>S(!1),children:m.formatMessage({id:"discussion_delete_cancel"})},{variant:"primary",className:"destructive",onClick:he,children:m.formatMessage({id:"discussion_delete_delete"})}],gtmContext:`${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,children:x.jsx(ln,{id:"discussion_delete_text",values:{p:X=>x.jsx("p",{children:X}),action:m.formatMessage({id:`discussion_action_${t.type}`})}})})]})})};const bl="discussion_responses_",hN=({type:e="answer",responses:t=0})=>{const r=Oe();return x.jsxs("div",{className:"responses-heading",children:[x.jsx("h3",{children:r.formatMessage({id:`${bl}title`},{action:r.formatMessage({id:`${bl}${e}`}),count:t})}),t===0&&x.jsx("p",{children:Lr(r.formatMessage,`${bl}empty`,e,e)})]})};const dN=({isOpen:e=!1,count:t=0,children:r})=>{const n=Oe(),o=$.useRef(null),[i,a]=$.useState(e),[s,c]=$.useState("closed");$.useEffect(()=>{const h=o.current;if(h)return h.addEventListener("transitionend",l),()=>{h.removeEventListener("transitionend",l)}},[]),ri(()=>{s==="closed"&&!i||c(["opening","open"].includes(s)?"ready-to-close":"opening")},[i]),$.useEffect(()=>{s==="ready-to-close"&&c("closing")},[s]);const l=({propertyName:h})=>{h==="max-height"&&c(f=>f==="opening"?"open":f==="closing"?"closed":f)},u=["opening","open"].includes(s),d=uv(r,{element:"li"});return x.jsxs("div",{className:"thread-wrapper",children:[x.jsx(ze,{variant:"secondary",size:"small",styling:{muted:!0},icon:{icon:`arrow_corner-down_${u?"left":"right"}`},onClick:()=>{a(!i)},children:n.formatMessage({id:`discussion_thread_${u?"hide":"show"}`},{count:t})}),x.jsx("ul",{ref:o,className:ue("thread",s),hidden:!i,children:d})]})},pN=({user:e,content:t,verb:r="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:r}),mN=({queryClient:e,queryKey:t,user:r,mutationFn:n})=>({mutationFn:n,onMutate:async({content:s})=>{if(!r)return;const c=pN({user:r,content:s,verb:"post"});await e.cancelQueries({queryKey:[t]});const l=e.getQueryData([t]);return e.setQueryData([t],u=>[...u,c]),{previousActivities:l}},onError:(s,c,l)=>{e.setQueryData([t],l.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:[t]})}}),gN=({queryClient:e,queryKey:t,mutationFn:r,affectedQueryKey:n})=>({mutationFn:r,onMutate:async({activityId:c})=>{await e.cancelQueries({queryKey:[t]});const l=e.getQueryData([t]),u=l==null?void 0:l.map(d=>{var h;return(d==null?void 0:d.id)===c&&((h=d.reaction_counts)!=null&&h.like?d.reaction_counts.like+=1:d.reaction_counts.like=1),d});return e.setQueryData([t],()=>u&&[...u]),{previousActivities:u}},onError:(c,l,u)=>{e.setQueryData([t],u.previousActivities)},onSuccess:c=>{const l=e.getQueryData([t]),u=l==null?void 0:l.map(d=>((d==null?void 0:d.id)===(c==null?void 0:c.activity_id)&&(d.latest_reactions.like?d.latest_reactions.like.push(c):d.latest_reactions.like=[c]),d));return e.setQueryData([t],()=>u&&[...u]),{previousActivities:l}},onSettled:(c,l,u)=>{e.invalidateQueries({queryKey:[`${n}/${u.activityId}`]})}}),yN=({queryClient:e,queryKey:t,user:r,mutationFn:n,affectedQueryKey:o})=>({mutationFn:n,onMutate:async({activityId:l})=>{await e.cancelQueries({queryKey:[t]});const u=e.getQueryData([t]),d=u==null?void 0:u.map(h=>{var f;return(h==null?void 0:h.id)===l&&(f=h.reaction_counts)!=null&&f.like&&(h.reaction_counts.like-=1),h});return e.setQueryData([t],()=>d&&[...d]),{previousActivities:d}},onError:(l,u,d)=>{e.setQueryData([t],d.previousActivities)},onSuccess:(l,{activityId:u})=>{const d=e.getQueryData([t]),h=d==null?void 0:d.map(f=>{var p,m,_,w;if(f.id===u){const v=(_=(m=(p=f.latest_reactions)==null?void 0:p.like)==null?void 0:m.find(b=>b.user_id===(r==null?void 0:r.id)))==null?void 0:_.id;return f.latest_reactions.like=(w=f.latest_reactions.like)==null?void 0:w.filter(b=>b.id!==v),f}else return f});return e.setQueryData([t],()=>h&&[...h]),{previousActivities:d}},onSettled:(l,u,d)=>{e.invalidateQueries({queryKey:[`${o}/${d.activityId}`]})}}),vN=({parentId:e,uiSlug:t,membershipRequiredToPost:{isMember:r,join:n,leave:o},functions:{list:i,create:a,like:s,unlike:c},cache:{activitiesListQueryKey:l,singleActivityQueryKeyWithoutVariable:u}})=>{const d=ho(),h=$.useContext($r),{data:f,error:p,isLoading:m,isFetching:_}=A0({queryKey:[l],queryFn:i}),w=mN({queryClient:d,queryKey:l,user:h,mutationFn:a}),{mutate:v}=fn(w),b=gN({queryClient:d,queryKey:l,mutationFn:s,affectedQueryKey:u}),{mutate:A}=fn(b),S=yN({queryClient:d,queryKey:l,user:h,mutationFn:async({activityId:k})=>{var H,Y,ie;const q=f&&(f==null?void 0:f.find(K=>K.id===k)),G=(ie=(Y=(H=q==null?void 0:q.latest_reactions)==null?void 0:H.like)==null?void 0:Y.find(K=>K.user_id===(h==null?void 0:h.id)))==null?void 0:ie.id;await c({reactionId:G||"",activityId:k})},affectedQueryKey:u}),{mutate:P}=fn(S),R=$.useCallback(({activityId:k})=>A({activityId:k}),[A]),L=$.useCallback(({activityId:k})=>P({activityId:k}),[P]);if(p)return x.jsx(ra,{variant:"error",text:p.message});if(m)return x.jsx(gr,{style:{height:"400px"}});if(!(Array.isArray(f)&&f.length===0))return x.jsxs(x.Fragment,{children:[x.jsx(sh,{contentType:"post",createPost:v,membershipRequiredToPost:{isMember:r,required:!0,join:n,leave:o,notMemberStateText:"Join community to create a post."}}),!_&&Array.isArray(f)&&(f==null?void 0:f.map(k=>{var G,H,Y,ie,K,D,Q,ee,he,J,X;const q=(H=(G=k==null?void 0:k.latest_reactions)==null?void 0:G.like)==null?void 0:H.filter(se=>se.user_id===(h==null?void 0:h.id));return x.jsx(Cu,{content:{type:"post",body:k==null?void 0:k.content,createdAt:(k==null?void 0:k.time)||"",slugs:{question:e},slug:k==null?void 0:k.id,author:{id:(Y=k==null?void 0:k.actor)==null?void 0:Y.id,name:(K=(ie=k==null?void 0:k.actor)==null?void 0:ie.data)==null?void 0:K.name,organization:(Q=(D=k==null?void 0:k.actor)==null?void 0:D.data)==null?void 0:Q.organization,jobTitle:(he=(ee=k==null?void 0:k.actor)==null?void 0:ee.data)==null?void 0:he.jobTitle,image:{thumbnail:((X=(J=k==null?void 0:k.actor)==null?void 0:J.data)==null?void 0:X.thumbnail)||void 0}},userLiked:!!(q!=null&&q.length),likes:(k==null?void 0:k.reaction_counts.like)||0,comments:(k==null?void 0:k.reaction_counts.reply)||0},links:{post:`${t}/${e}/${k==null?void 0:k.id}`,comments:`${t}/${e}/${k==null?void 0:k.id}`},functions:{content:{createContent:()=>null,deleteContent:()=>null,updateContent:()=>null},likes:{createLike:()=>{R({activityId:k==null?void 0:k.id})},deleteLike:()=>{L({activityId:k==null?void 0:k.id})}},comments:{openComments:()=>null}}},k==null?void 0:k.id)}))]})},EN=({queryClient:e,queryKey:t,mutationFn:r,affectedQueryKey:n})=>({mutationFn:r,onMutate:async()=>{await e.cancelQueries({queryKey:[t]})},onError:(c,l,u)=>{e.setQueryData([t],u.previousActivity)},onSuccess:c=>{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(c),l&&(l.reaction_counts={reply:l.latest_reactions.reply.length})):(l.latest_reactions={reply:[c]},l.reaction_counts={reply:1}),e.setQueryData([t],()=>({...l})),{previousActivity:l}},onSettled:()=>{e.invalidateQueries({queryKey:[n]})}}),_N=({queryClient:e,queryKey:t,mutationFn:r})=>({mutationFn:r,onMutate:async({replyId:a})=>{var l,u;await e.cancelQueries({queryKey:[t]});const s=e.getQueryData([t]),c=(u=(l=s==null?void 0:s.latest_reactions)==null?void 0:l.reply)==null?void 0:u.map(d=>{var h;return d.id===a&&((h=d.children_counts)!=null&&h.like?d.children_counts.like+=1:d.children_counts={like:1}),d});return e.setQueryData([t],()=>({...s,latest_reactions:{reply:c}})),{previousActivity:s}},onError:(a,s,c)=>{e.setQueryData([t],c.previousActivity)},onSuccess:a=>{var l;const s=e.getQueryData([t]),c=(l=s==null?void 0:s.latest_reactions.reply)==null?void 0:l.map(u=>(u.id===a.id&&(u.latest_children.like?u.latest_children.like.push(a):u.latest_children.like=[a]),u));return e.setQueryData([t],()=>({...s,latest_reactions:{reply:c}})),{previousActivity:s}}}),bN=({queryClient:e,queryKey:t,user:r,mutationFn:n})=>({mutationFn:n,onMutate:async({replyId:s})=>{var u;await e.cancelQueries({queryKey:[t]});const c=e.getQueryData([t]);if(!c)return;const l=(u=c.latest_reactions.reply)==null?void 0:u.map(d=>(d.id===s&&d.children_counts.like&&(d.children_counts.like-=1),d));return e.setQueryData([t],()=>({...c,latest_reactions:{reply:l}})),{previousActivity:c}},onError:(s,c,l)=>{e.setQueryData([t],l.previousActivity)},onSuccess:(s,{replyId:c})=>{var d;const l=e.getQueryData([t]);if(!l)return;const u=(d=l.latest_reactions.reply)==null?void 0:d.map(h=>{var f;return h.id===c?(f=h.latest_children.reply)==null?void 0:f.filter(m=>m.user_id!==(r==null?void 0:r.id)):h});return e.setQueryData([t],()=>({...l,latest_reactions:{reply:u}})),{previousActivity:l}}}),hE=({uiSlug:e,parentId:t,activityId:r,repliesList:n,cache:{activitiesListQueryKey:o,singleActivityQueryKeyWithoutVariable:i},membershipRequiredToPost:{isMember:a,join:s,leave:c},functions:{createReply:l,like:u,unlike:d}})=>{const h=ho(),f=$.useContext($r),p=`${i}/${r}`,m=EN({queryClient:h,queryKey:p,mutationFn:l,affectedQueryKey:o}),{mutate:_}=fn(m),w=_N({queryClient:h,queryKey:p,mutationFn:u}),{mutate:v}=fn(w),b=bN({queryClient:h,queryKey:p,user:f,mutationFn:d}),{mutate:A}=fn(b),S=$.useCallback(({replyId:R})=>v({replyId:R}),[v]),P=$.useCallback(({replyId:R})=>A({replyId:R}),[A]);return x.jsxs(x.Fragment,{children:[x.jsx(sh,{contentType:"post",createPost:_,membershipRequiredToPost:{isMember:a,required:!0,join:s,leave:c,notMemberStateText:"Join community to create a post."}}),(n==null?void 0:n.length)===0?x.jsx(x.Fragment,{}):n==null?void 0:n.map(R=>{var k,q,G,H,Y,ie,K,D,Q,ee,he,J,X,se,fe;const L=((k=R==null?void 0:R.latest_children)==null?void 0:k.like)&&((q=R==null?void 0:R.latest_children)==null?void 0:q.like.filter(He=>He.user_id===(f==null?void 0:f.id)));return x.jsx(Cu,{content:{type:"post",body:((H=(G=R==null?void 0:R.data)==null?void 0:G.content)==null?void 0:H.text)||"",createdAt:R==null?void 0:R.created_at,slugs:{question:`${t}/${r}`,reply:R==null?void 0:R.id},slug:`${e}/${t}/${r}#${R==null?void 0:R.id}`,author:{id:(Y=R==null?void 0:R.user)==null?void 0:Y.id,name:(K=(ie=R==null?void 0:R.user)==null?void 0:ie.data)==null?void 0:K.name,organization:(Q=(D=R==null?void 0:R.user)==null?void 0:D.data)==null?void 0:Q.organization,jobTitle:(he=(ee=R==null?void 0:R.user)==null?void 0:ee.data)==null?void 0:he.jobTitle,image:{thumbnail:((X=(J=R==null?void 0:R.user)==null?void 0:J.data)==null?void 0:X.thumbnail)||void 0}},userLiked:!!(L!=null&&L.length),likes:((se=R==null?void 0:R.children_counts)==null?void 0:se.like)||0,comments:((fe=R==null?void 0:R.children_counts)==null?void 0:fe.reply)||0},functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:()=>console.log("update")},likes:{createLike:()=>S({replyId:R==null?void 0:R.id}),deleteLike:()=>P({replyId:R==null?void 0:R.id})},comments:{openComments:()=>{}}}},R==null?void 0:R.id)})]})},wN=({queryClient:e,queryKey:t,mutationFn:r,affectedQueryKey:n})=>({mutationFn:r,onMutate:async()=>{var l;await e.cancelQueries({queryKey:[t]});const c=e.getQueryData([t]);return(l=c==null?void 0:c.reaction_counts)!=null&&l.like?c.reaction_counts.like+=1:c&&(c.reaction_counts={like:1}),e.setQueryData([t],()=>({...c})),{previousActivity:c}},onError:(c,l,u)=>{e.setQueryData([t],u.previousActivity)},onSuccess:c=>{const l=e.getQueryData([t]);return l!=null&&l.latest_reactions.like?l.latest_reactions.like.push(c):l&&(l.latest_reactions={like:[c]}),e.setQueryData([t],()=>({...l})),{previousActivity:l}},onSettled:()=>{e.invalidateQueries({queryKey:[n]})}}),SN=({queryClient:e,queryKey:t,user:r,activity:n,mutationFn:o,affectedQueryKey:i})=>({mutationFn:o,onMutate:async()=>{var d;await e.cancelQueries({queryKey:[t]});const u=e.getQueryData([t]);return(d=u==null?void 0:u.reaction_counts)!=null&&d.like&&(u.reaction_counts.like-=1),e.setQueryData([t],()=>({...u})),{previousActivity:u}},onError:(u,d,h)=>{e.setQueryData([t],h.previousActivity)},onSuccess:()=>{var h,f,p;if(!n)return;const u=(p=(f=(h=n.latest_reactions)==null?void 0:h.like)==null?void 0:f.find(m=>m.user_id===(r==null?void 0:r.id)))==null?void 0:p.id,d=e.getQueryData([t]);if(d!=null&&d.latest_reactions.like)return d.latest_reactions.like=d.latest_reactions.like.filter(m=>m.id!==u),e.setQueryData([t],()=>({...d})),{previousActivity:d}},onSettled:()=>{e.invalidateQueries({queryKey:[i]})}}),TN=({uiSlug:e,parentId:t,activityId:r,cache:{activitiesListQueryKey:n,singleActivityQueryKeyWithoutVariable:o},membershipRequiredToPost:i,functions:{get:a,likeActivity:s,unlikeActivity:c,createReply:l,likeReply:u,unlikeReply:d}})=>{var k,q,G,H,Y,ie,K,D,Q,ee,he;const h=$.useContext($r),f=ho(),p=`${o}/${r}`,{data:m,error:_,isLoading:w,isFetching:v}=A0({queryKey:[p],queryFn:a}),b=wN({queryClient:f,queryKey:p,mutationFn:s,affectedQueryKey:n}),{mutate:A}=fn(b),S=SN({queryClient:f,queryKey:p,user:h,mutationFn:async()=>{var X,se,fe;const J=(fe=(se=(X=m==null?void 0:m.latest_reactions)==null?void 0:X.like)==null?void 0:se.find(He=>He.user_id===(h==null?void 0:h.id)))==null?void 0:fe.id;await c({activityId:r,reactionId:J})},affectedQueryKey:n,activity:m}),{mutate:P}=fn(S),R=$.useCallback(({activityId:J})=>A({activityId:J}),[m,t,h,f,s,A]),L=$.useCallback(async({activityId:J})=>P({activityId:J}),[m,t,h,f,c,P]);return _?x.jsx(ra,{variant:"error",text:_.message}):w||v?x.jsx(gr,{style:{height:"400px"}}):x.jsx(Cu,{content:{type:"post",body:m==null?void 0:m.content,createdAt:(m==null?void 0:m.time)||"",slugs:{question:`${t}/${r}`},slug:r,author:{id:(k=m==null?void 0:m.actor)==null?void 0:k.id,name:(q=m==null?void 0:m.actor)==null?void 0:q.data.name,organization:(G=m==null?void 0:m.actor)==null?void 0:G.data.organization,jobTitle:(H=m==null?void 0:m.actor)==null?void 0:H.data.jobTitle,image:{thumbnail:((Y=m==null?void 0:m.actor)==null?void 0:Y.data.thumbnail)||void 0}},userLiked:((ie=m==null?void 0:m.latest_reactions)==null?void 0:ie.like)&&((D=(K=m==null?void 0:m.latest_reactions)==null?void 0:K.like.filter(J=>(J==null?void 0:J.user_id)===(h==null?void 0:h.id)))==null?void 0:D.length)>0,likes:m&&(m==null?void 0:m.reaction_counts.like),comments:m&&(m==null?void 0:m.reaction_counts.reply)},originalAuthorId:(Q=m==null?void 0:m.actor)==null?void 0:Q.id,functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:()=>console.log("update")},likes:{createLike:()=>R({activityId:r}),deleteLike:()=>L({activityId:r})},comments:{openComments:()=>{}}},children:x.jsxs(x.Fragment,{children:[x.jsxs("h3",{children:["Comments (",((ee=m==null?void 0:m.reaction_counts)==null?void 0:ee.reply)||0,")"]}),x.jsx(hE,{uiSlug:e,parentId:t,activityId:r,repliesList:(he=m==null?void 0:m.latest_reactions)==null?void 0:he.reply,cache:{activitiesListQueryKey:n,singleActivityQueryKeyWithoutVariable:o},membershipRequiredToPost:i,functions:{createReply:l,like:u,unlike:d}})]})},r)},xN=({id:e,data:{jobTitle:t,name:r,organization:n,thumbnail:o}})=>({id:e,name:r,jobTitle:t,organization:n,image:{thumbnail:o}});exports.$PROXY=Cs;exports.$TRACK=Qf;exports.ASSETS_BUCKET=Ya;exports.ActivitiesFeed=vN;exports.ActivitySection=TN;exports.AddPost=sh;exports.Breadcrumbs=RR;exports.Button=ze;exports.ButtonWrapper=Zs;exports.CollapsibleSection=Hf;exports.Columns=IR;exports.CommunityDetails=CR;exports.Contributors=m0;exports.Conversation=aN;exports.ConversationContext=ah;exports.CookieBanner=z0;exports.Divider=Qa;exports.DownloadSection=EA;exports.Dynamic=wR;exports.EmailHelperTextBox=LR;exports.EmptyStateBox=ra;exports.Filters=PR;exports.Footer=eh;exports.For=Q1;exports.Form=uu;exports.FullWidthSection=jf;exports.Header=oh;exports.HelperTextBox=c0;exports.HiddenFromScreenReaders=yf;exports.HideShowTextBox=PC;exports.HighlightedTextBoxWrapper=Dr;exports.Index=Y1;exports.IntlProvider=qC;exports.JoinButton=Jf;exports.Likes=uE;exports.Link=Ff;exports.LoadMore=V0;exports.LoadingPlaceholder=gr;exports.LoadingState=d0;exports.Logo=Zf;exports.LogoSection=_A;exports.MarkdownText=Kl;exports.MarketingBlock=TA;exports.Match=J1;exports.Member=bu;exports.MembersList=qP;exports.Modal=cE;exports.MoreMenu=W0;exports.NUMBER_OF_USERS=OA;exports.Overlay=lE;exports.PageLayout=$P;exports.Pill=l0;exports.Portal=bR;exports.Post=Cu;exports.ProfilePicture=_u;exports.ProgressBar=f0;exports.Rating=BR;exports.ReactQueryProvider=AR;exports.RepliesFeed=hE;exports.ResponsesHeading=hN;exports.ResponsiveImage=cv;exports.SearchForm=X0;exports.Show=K1;exports.StatusBanner=Ka;exports.Switch=X1;exports.Tags=HP;exports.Thread=dN;exports.Tooltip=$v;exports.UserContext=$r;exports.UserProvider=GC;exports.VisuallyHidden=lt;exports.addAriaProps=fE;exports.addEventListener=H0;exports.bannerSection=SA;exports.batch=C1;exports.children=Kf;exports.className=j0;exports.createComponent=F0;exports.createComputed=ff;exports.createContext=M1;exports.createEffect=Yf;exports.createMemo=St;exports.createRenderEffect=dn;exports.createRoot=hn;exports.createSignal=bt;exports.createUniqueId=z1;exports.delegateEvents=$0;exports.getListener=N1;exports.getMember=Vf;exports.headerData=Ns;exports.insert=ou;exports.loadingBlock=$C;exports.mapGetSteamData=xN;exports.mergeProps=B0;exports.on=R1;exports.onCleanup=Rs;exports.onMount=P1;exports.passwordRules=FR;exports.setAttribute=iu;exports.splitProps=D0;exports.spread=q0;exports.template=lR;exports.untrack=Xe;exports.use=pR;exports.useContext=F1;exports.useEffectAfterMount=ri;exports.useFeatureFlag=FT;exports.useScreenWidth=Js;exports.useScrollListener=Xy;exports.useScrollToHash=DT;exports.useTransition=k1;
|
|
101
|
+
`))},[n]),$.useEffect(()=>{l==="ready-to-close"&&u("closing")},[l]);const d=({propertyName:f})=>{f==="max-height"&&u(p=>p==="opening"?"open":p==="closing"?"closed":p)};if(!n)return null;const h=["opening","open"].includes(l);return x.jsxs(Dr,{variant:"subtle",className:ue("hide-show-text-box",e),children:[x.jsxs("div",{ref:a,className:ue("content",l),children:[x.jsx(Eu,{options:{forceBlock:!0},children:l==="closed"?s:n}),l!=="closed"&&o]}),x.jsx("p",{className:"cta",children:x.jsx(ze,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:ue({"rotate-180":h}),onClick:()=>{u(h?"ready-to-close":"opening")},children:h?r||i.formatMessage({id:"hideShowTextBox_hide"}):t||i.formatMessage({id:"hideShowTextBox_show"})})})]})},NC=()=>$.Fragment,IC=({children:e})=>x.jsx(Dr,{variant:"secondary",children:e}),LC=["span","strong","h1","h2","h3","h4","h5","h6","p"],kC=({children:e})=>{const t=Oe();if(!e)return null;let r=t.formatMessage({id:"markdown_collapsibleSection_summary"});const n=[];for(const i of $.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number"))if($.isValidElement(i)&&i.type==="summary"){if(i.props&&i.props.children){for(const a of $.Children.toArray(i.props.children))if(!(!a||typeof a=="string"||typeof a=="number")&&$.isValidElement(a)){const s=a.type;if(LC.includes(s)){for(r=a.props.children;typeof r!="string"&&(Array.isArray(r)&&r[0].props&&r[0].props.children&&r[0].props.children[0]);)r=r[0].props.children[0];break}}}}else n.push(i);const o=r?r.toString():"";return x.jsx(Hf,{label:o,className:["Sources","Resources"].includes(o)?"discrete-links":"",children:n.map(i=>i)})},MC=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return x.jsx(Dr,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return x.jsx(Dr,{variant:"primary",children:e});case"pink-textbox":return x.jsx(Dr,{variant:"tertiary",children:e});default:return x.jsx("div",{...t,children:e})}return x.jsx("div",{...t,children:e})},FC=e=>{const t=Oe(),r=Date.now().toString();let n="default";const o=e.src;return o.includes("youtube")||o.includes("vimeo")?n="video":o.includes("riddle")||o.includes("sli.do")?n="poll":o.includes("padlet")&&(n="padlet"),x.jsxs(x.Fragment,{children:[x.jsx(lt,{children:x.jsx("a",{href:`#content-after-iframe-${r}`,children:t.formatMessage({id:`markdown_skip${n==="default"?"":`_${n}`}`})})}),x.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${n==="default"?"":`_${n}`}`})}),x.jsx("span",{id:`content-after-iframe-${r}`,tabIndex:-1})]})},fm=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},BC=({children:e,...t})=>{let r={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(r.target="_blank");let n=e,o=!1;for(const i of $.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number")&&$.isValidElement(i)){const a=i.type;if(["button","center","span","strong"].includes(a)&&i.props&&i.props.children&&i.props.children[0])for((a==="button"||fm(i.props.children[0])==="button")&&(o=!0),n=i.props.children[0];n&&typeof n!="string"&&!(typeof n=="boolean"||typeof n=="number"||!$.isValidElement(n));)if(n.props&&n.props.children&&n.props.children[0])n=n.props.children[0],n&&fm(n)==="button"&&(o=!0);else break}return o?(r={...r,className:"button primary medium"},x.jsx("p",{className:"center",children:x.jsx(ze,{variant:"primary",size:"medium",...r,children:n})})):x.jsx("a",{...r,children:n})};const Kl=({className:e="",options:t={},children:r})=>{r=r.replace(/^<br\/?>/,"");const n={wrapper:$.Fragment,forceBlock:!0,overrides:{a:BC,CollapsibleSection:Hf,TextBox:Dr,CaseStudy:IC,style:NC,details:kC,div:MC,iframe:FC}};return x.jsx("div",{className:ue("markdown-text",e),children:x.jsx(Eu,{options:{...n,...t},children:r})})};const l0=({size:e="medium",variant:t="default",className:r="",children:n})=>x.jsx("span",{className:ue("pill",e,t,r),children:n});const Ka=({element:e="p",children:t=null,className:r="",...n})=>$.createElement(e,{...n,className:ue("status-banner text-small",r),"aria-live":"assertive"},t);const DC=({progress:e=0,text:t=!1,className:r=""})=>{const n=Oe(),o=e>75?100:e>50?75:e>25?50:e>5?25:0,i={"--progress":`${e}%`};return x.jsx("span",{className:ue(`progress-bar section-${o}`,r),style:i,children:x.jsx(lt,{children:t?`${e} ${t}`:n.formatMessage({id:"progressBar"},{number:e})})})},f0=$.memo(DC);const sl="loadingBlock_",UC=({progress:e=0,steps:t=!1,className:r=""})=>{const n=Oe();t||(t={0:{text:n.formatMessage({id:`${sl}loading`})},75:{text:n.formatMessage({id:`${sl}almostDone`})},100:{text:n.formatMessage({id:`${sl}complete`})}});let o=null;const i=Object.keys(t);for(let s=0;s<i.length&&!(e<parseInt(i[s]));s++)o=i[s];const a=o&&t[o].icon?{"--icon":`url(${Ya}icons/${t[o].icon}.svg)`}:{};return x.jsxs(Dr,{className:ue("loading-block",r,{"has-icon":o&&t[o].icon}),variant:"subtle",style:a,children:[o&&x.jsx("span",{className:"step",children:t[o].text}),x.jsx(f0,{progress:e})]})},$C=$.memo(UC);const gr=({element:e="div",className:t="",...r})=>x.jsx(yf,{element:e,className:ue("loading-placeholder",t),...r});const Xl={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"]},h0=(e,t)=>e in Xl?x.jsx("div",{className:e,children:Xl[e].map((r,n)=>h0(r,n))},t):x.jsx(gr,{className:e},t),d0=({layout:e="overview-page"})=>x.jsx("div",{className:ue("loading-state",e),children:Xl[e].map((t,r)=>h0(t,r))}),p0=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):""},Ra=["#5AB6A3","#A2D7AF","#806056","#3962B3"],jC=e=>{const t=Math.ceil(26/Ra.length),r=p0(e).toLowerCase();if(r==="")return Ra[0];const n=r.charCodeAt(0)-96;for(let o=0;o<Ra.length;o++)if(n<=t*(o+1))return Ra[o]};const hm=256,_u=({className:e="",src:t="",name:r,alt:n,width:o=hm,height:i=hm,...a})=>{const[s,c]=$.useState(!1),l=$.useRef(null);return $.useEffect(()=>{const u=l.current;if(!u)return;const d=u.getContext("2d");if(!d)return;const h=o,f=i;typeof window<"u"&&window.devicePixelRatio&&(u.width=h*window.devicePixelRatio,u.height=f*window.devicePixelRatio,d.scale(window.devicePixelRatio,window.devicePixelRatio)),d.fillStyle=jC(r),d.fillRect(0,0,h,f),d.font=`${h/3}px Arial`,d.textAlign="center",d.fillStyle="white",d.fillText(p0(r),h/2,f/1.6)},[r]),x.jsxs("figure",{className:ue("profile-picture",e,{error:s}),...a,children:[t!==""&&!s&&x.jsx("img",{src:t,alt:n||r,onError:()=>{c(!0)},width:o,height:i}),(t===""||s)&&x.jsx("canvas",{ref:l})]})},Vf=e=>e==="apolitical"?{image:`${Ya}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${Ya}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},HC=({role:e="",organisation:t="",country:r="",maximumCharacters:n=80})=>{const o=e!=="",i=t!=="",a=r!=="";if(!o&&!i&&!a)return"";const s=`${e}${o&&i?` — ${t}`:t}`;let c=`${s}${(o||i)&&a?`, ${r}`:r}`;return c.length>n&&(c=s),c.length>n&&(c=Hv(c,n)),c};const bu=({element:e="div",member:t="community",additionalContent:r=!1,gtmContext:n="member",gtmType:o="member-click",className:i=""})=>{const a=Oe(),s=Vf(t);s.name||(s.name=a.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:c,url:l,image:u}=s,d=HC(s),h=r&&r.createdAt?Gx(r.createdAt):!1,f=r&&r.createdAt?qx(r.createdAt):"";return $.createElement(e,{className:ue("member text-medium",i),children:x.jsxs(Ff,{href:l,gtmType:o,gtmContext:n,onClick:p=>{p==null||p.stopPropagation()},children:[x.jsx(_u,{name:c,src:u}),x.jsxs("p",{className:"details",children:[x.jsx("strong",{children:c}),r&&x.jsxs("span",{className:"additional-content",children:[r.createdAt&&h&&x.jsx("span",{className:"date",title:f,"aria-label":f,children:a.formatMessage({id:`dates_${h.path}`},{number:h.number})}),r.didEdit&&x.jsx("em",{children:a.formatMessage({id:"discussion_edited"})})]}),d&&x.jsx("small",{children:d})]})]})})};const dm={small:24,medium:48},m0=({element:e="div",contributors:{total:t,data:r}={total:void 0,data:[]},styling:{showText:n,size:o,showGap:i,showPlaceholders:a}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:s=2,className:c=""})=>{const l=Oe();return!r||r.length===0?null:$.createElement(e,{className:ue("contributors",c,o,{"has-gap":i}),children:x.jsxs(x.Fragment,{children:[x.jsx("ul",{children:r.map((u,d)=>{let h,f="";if(d<s){const{name:p="",image:m=""}=Vf(u);if(a)return x.jsx(gr,{element:"li",className:"contributor"},d);h=x.jsx(_u,{name:p,src:m,width:dm[o||"medium"],height:dm[o||"medium"]})}else if(d===s){const p=(t||r.length)-s;h=x.jsxs("small",{className:ue({"large-number":p>99}),children:["+",Qx(p,0)]}),f="number-left"}return h?x.jsx("li",{className:ue("contributor",f),children:h},d):null})}),n&&x.jsx("span",{className:"label",children:typeof n=="string"?n:r.length===1?typeof r[0]=="string"?l.formatMessage({id:`member_${r[0]}`}):Hv(r[0].name||"",20):null})]})})},qC=({children:e,locale:t,messages:r})=>{const n=t||"en",o={...zx[n],...r||{}};return x.jsx(yA,{locale:n,messages:o,children:e})},$r=$.createContext(null),GC=({children:e,user:t})=>x.jsx($r.Provider,{value:t,children:e});var fo=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(){}},io=typeof window>"u"||"Deno"in window;function jt(){}function VC(e,t){return typeof e=="function"?e(t):e}function Jl(e){return typeof e=="number"&&e>=0&&e!==1/0}function g0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pm(e,t){const{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(n){if(t.queryHash!==Wf(a,t.options))return!1}else if(!Os(t.queryKey,a))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||typeof o<"u"&&o!==t.state.fetchStatus||i&&!i(t))}function mm(e,t){const{exact:r,status:n,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(xs(t.options.mutationKey)!==xs(i))return!1}else if(!Os(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||o&&!o(t))}function Wf(e,t){return((t==null?void 0:t.queryKeyHashFn)||xs)(e)}function xs(e){return JSON.stringify(e,(t,r)=>Zl(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function Os(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(r=>!Os(e[r],t[r])):!1}function y0(e,t){if(e===t)return e;const r=gm(e)&&gm(t);if(r||Zl(e)&&Zl(t)){const n=r?e.length:Object.keys(e).length,o=r?t:Object.keys(t),i=o.length,a=r?[]:{};let s=0;for(let c=0;c<i;c++){const l=r?c:o[c];a[l]=y0(e[l],t[l]),a[l]===e[l]&&s++}return n===i&&s===n?e:a}return t}function Xa(e,t){if(e&&!t||t&&!e)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function gm(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Zl(e){if(!ym(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!ym(r)||!r.hasOwnProperty("isPrototypeOf"))}function ym(e){return Object.prototype.toString.call(e)==="[object Object]"}function v0(e){return new Promise(t=>{setTimeout(t,e)})}function vm(e){v0(0).then(e)}function ef(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?y0(e,t):t}function WC(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function zC(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Gn,en,Ni,Um,QC=(Um=class extends fo{constructor(){super();ne(this,Gn,void 0);ne(this,en,void 0);ne(this,Ni,void 0);Z(this,Ni,t=>{if(!io&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){N(this,en)||this.setEventListener(N(this,Ni))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,en))==null||t.call(this),Z(this,en,void 0))}setEventListener(t){var r;Z(this,Ni,t),(r=N(this,en))==null||r.call(this),Z(this,en,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){N(this,Gn)!==t&&(Z(this,Gn,t),this.onFocus())}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){var t;return typeof N(this,Gn)=="boolean"?N(this,Gn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Gn=new WeakMap,en=new WeakMap,Ni=new WeakMap,Um),Ja=new QC,Ii,tn,Li,$m,YC=($m=class extends fo{constructor(){super();ne(this,Ii,!0);ne(this,tn,void 0);ne(this,Li,void 0);Z(this,Li,t=>{if(!io&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){N(this,tn)||this.setEventListener(N(this,Li))}onUnsubscribe(){var t;this.hasListeners()||((t=N(this,tn))==null||t.call(this),Z(this,tn,void 0))}setEventListener(t){var r;Z(this,Li,t),(r=N(this,tn))==null||r.call(this),Z(this,tn,t(this.setOnline.bind(this)))}setOnline(t){N(this,Ii)!==t&&(Z(this,Ii,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return N(this,Ii)}},Ii=new WeakMap,tn=new WeakMap,Li=new WeakMap,$m),As=new YC;function KC(e){return Math.min(1e3*2**e,3e4)}function wu(e){return(e??"online")==="online"?As.isOnline():!0}var E0=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function al(e){return e instanceof E0}function _0(e){let t=!1,r=0,n=!1,o,i,a;const s=new Promise((_,w)=>{i=_,a=w}),c=_=>{var w;n||(f(new E0(_)),(w=e.abort)==null||w.call(e))},l=()=>{t=!0},u=()=>{t=!1},d=()=>!Ja.isFocused()||e.networkMode!=="always"&&!As.isOnline(),h=_=>{var w;n||(n=!0,(w=e.onSuccess)==null||w.call(e,_),o==null||o(),i(_))},f=_=>{var w;n||(n=!0,(w=e.onError)==null||w.call(e,_),o==null||o(),a(_))},p=()=>new Promise(_=>{var w;o=v=>{const b=n||!d();return b&&_(v),b},(w=e.onPause)==null||w.call(e)}).then(()=>{var _;o=void 0,n||(_=e.onContinue)==null||_.call(e)}),m=()=>{if(n)return;let _;try{_=e.fn()}catch(w){_=Promise.reject(w)}Promise.resolve(_).then(h).catch(w=>{var P;if(n)return;const v=e.retry??(io?0:3),b=e.retryDelay??KC,A=typeof b=="function"?b(r,w):b,S=v===!0||typeof v=="number"&&r<v||typeof v=="function"&&v(r,w);if(t||!S){f(w);return}r++,(P=e.onFail)==null||P.call(e,r,w),v0(A).then(()=>{if(d())return p()}).then(()=>{t?f(w):m()})})};return wu(e.networkMode)?m():p().then(m),{promise:s,cancel:c,continue:()=>(o==null?void 0:o())?s:Promise.resolve(),cancelRetry:l,continueRetry:u}}function XC(){let e=[],t=0,r=u=>{u()},n=u=>{u()};const o=u=>{let d;t++;try{d=u()}finally{t--,t||s()}return d},i=u=>{t?e.push(u):vm(()=>{r(u)})},a=u=>(...d)=>{i(()=>{u(...d)})},s=()=>{const u=e;e=[],u.length&&vm(()=>{n(()=>{u.forEach(d=>{r(d)})})})};return{batch:o,batchCalls:a,schedule:i,setNotifyFunction:u=>{r=u},setBatchNotifyFunction:u=>{n=u}}}var Ke=XC(),Vn,jm,b0=(jm=class{constructor(){ne(this,Vn,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Jl(this.gcTime)&&Z(this,Vn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(io?1/0:5*60*1e3))}clearGcTimeout(){N(this,Vn)&&(clearTimeout(N(this,Vn)),Z(this,Vn,void 0))}},Vn=new WeakMap,jm),ki,Mi,Bt,rn,Dt,it,Is,Wn,Fi,Da,Zt,kr,Hm,JC=(Hm=class extends b0{constructor(t){super();ne(this,Fi);ne(this,Zt);ne(this,ki,void 0);ne(this,Mi,void 0);ne(this,Bt,void 0);ne(this,rn,void 0);ne(this,Dt,void 0);ne(this,it,void 0);ne(this,Is,void 0);ne(this,Wn,void 0);Z(this,Wn,!1),Z(this,Is,t.defaultOptions),ye(this,Fi,Da).call(this,t.options),Z(this,it,[]),Z(this,Bt,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Z(this,ki,t.state||ZC(this.options)),this.state=N(this,ki),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!N(this,it).length&&this.state.fetchStatus==="idle"&&N(this,Bt).remove(this)}setData(t,r){const n=ef(this.state.data,t,this.options);return ye(this,Zt,kr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){ye(this,Zt,kr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n;const r=N(this,rn);return(n=N(this,Dt))==null||n.cancel(t),r?r.then(jt).catch(jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(N(this,ki))}isActive(){return N(this,it).some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||N(this,it).some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!g0(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=N(this,it).find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,Dt))==null||r.continue()}onOnline(){var r;const t=N(this,it).find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=N(this,Dt))==null||r.continue()}addObserver(t){N(this,it).includes(t)||(N(this,it).push(t),this.clearGcTimeout(),N(this,Bt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){N(this,it).includes(t)&&(Z(this,it,N(this,it).filter(r=>r!==t)),N(this,it).length||(N(this,Dt)&&(N(this,Wn)?N(this,Dt).cancel({revert:!0}):N(this,Dt).cancelRetry()),this.scheduleGc()),N(this,Bt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return N(this,it).length}invalidate(){this.state.isInvalidated||ye(this,Zt,kr).call(this,{type:"invalidate"})}fetch(t,r){var l,u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(N(this,rn))return(l=N(this,Dt))==null||l.continueRetry(),N(this,rn)}if(t&&ye(this,Fi,Da).call(this,t),!this.options.queryFn){const f=N(this,it).find(p=>p.options.queryFn);f&&ye(this,Fi,Da).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 n=new AbortController,o={queryKey:this.queryKey,meta:this.meta},i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(Z(this,Wn,!0),n.signal)})};i(o);const a=()=>this.options.queryFn?(Z(this,Wn,!1),this.options.persister?this.options.persister(this.options.queryFn,o,this):this.options.queryFn(o)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)),s={fetchOptions:r,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:a};i(s),(u=this.options.behavior)==null||u.onFetch(s,this),Z(this,Mi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=s.fetchOptions)==null?void 0:d.meta))&&ye(this,Zt,kr).call(this,{type:"fetch",meta:(h=s.fetchOptions)==null?void 0:h.meta});const c=f=>{var p,m,_,w;al(f)&&f.silent||ye(this,Zt,kr).call(this,{type:"error",error:f}),al(f)||((m=(p=N(this,Bt).config).onError)==null||m.call(p,f,this),(w=(_=N(this,Bt).config).onSettled)==null||w.call(_,this.state.data,f,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return Z(this,Dt,_0({fn:s.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var p,m,_,w;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}`),c(new Error(`${this.queryHash} data is undefined`));return}this.setData(f),(m=(p=N(this,Bt).config).onSuccess)==null||m.call(p,f,this),(w=(_=N(this,Bt).config).onSettled)==null||w.call(_,f,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:c,onFail:(f,p)=>{ye(this,Zt,kr).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{ye(this,Zt,kr).call(this,{type:"pause"})},onContinue:()=>{ye(this,Zt,kr).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode})),Z(this,rn,N(this,Dt).promise),N(this,rn)}},ki=new WeakMap,Mi=new WeakMap,Bt=new WeakMap,rn=new WeakMap,Dt=new WeakMap,it=new WeakMap,Is=new WeakMap,Wn=new WeakMap,Fi=new WeakSet,Da=function(t){this.options={...N(this,Is),...t},this.updateGcTime(this.options.gcTime)},Zt=new WeakSet,kr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:t.meta??null,fetchStatus:wu(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return al(o)&&o.revert&&N(this,Mi)?{...N(this,Mi),fetchStatus:"idle"}:{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Ke.batch(()=>{N(this,it).forEach(n=>{n.onQueryUpdate()}),N(this,Bt).notify({query:this,type:"updated",action:t})})},Hm);function ZC(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=typeof t<"u",n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var cr,qm,e1=(qm=class extends fo{constructor(t={}){super();ne(this,cr,void 0);this.config=t,Z(this,cr,new Map)}build(t,r,n){const o=r.queryKey,i=r.queryHash??Wf(o,r);let a=this.get(i);return a||(a=new JC({cache:this,queryKey:o,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){N(this,cr).has(t.queryHash)||(N(this,cr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=N(this,cr).get(t.queryHash);r&&(t.destroy(),r===t&&N(this,cr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return N(this,cr).get(t)}getAll(){return[...N(this,cr).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>pm(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>pm(t,n)):r}notify(t){Ke.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},cr=new WeakMap,qm),lr,Ls,Lt,Bi,fr,Jr,Gm,t1=(Gm=class extends b0{constructor(t){super();ne(this,fr);ne(this,lr,void 0);ne(this,Ls,void 0);ne(this,Lt,void 0);ne(this,Bi,void 0);this.mutationId=t.mutationId,Z(this,Ls,t.defaultOptions),Z(this,Lt,t.mutationCache),Z(this,lr,[]),this.state=t.state||w0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...N(this,Ls),...t},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){N(this,lr).includes(t)||(N(this,lr).push(t),this.clearGcTimeout(),N(this,Lt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Z(this,lr,N(this,lr).filter(r=>r!==t)),this.scheduleGc(),N(this,Lt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){N(this,lr).length||(this.state.status==="pending"?this.scheduleGc():N(this,Lt).remove(this))}continue(){var t;return((t=N(this,Bi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,s,c,l,u,d,h,f,p,m,_,w,v,b,A,S,P,R;const r=()=>(Z(this,Bi,_0({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(L,k)=>{ye(this,fr,Jr).call(this,{type:"failed",failureCount:L,error:k})},onPause:()=>{ye(this,fr,Jr).call(this,{type:"pause"})},onContinue:()=>{ye(this,fr,Jr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),N(this,Bi).promise),n=this.state.status==="pending";try{if(!n){ye(this,fr,Jr).call(this,{type:"pending",variables:t}),await((i=(o=N(this,Lt).config).onMutate)==null?void 0:i.call(o,t,this));const k=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,t));k!==this.state.context&&ye(this,fr,Jr).call(this,{type:"pending",context:k,variables:t})}const L=await r();return await((l=(c=N(this,Lt).config).onSuccess)==null?void 0:l.call(c,L,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,L,t,this.state.context)),await((f=(h=N(this,Lt).config).onSettled)==null?void 0:f.call(h,L,null,this.state.variables,this.state.context,this)),await((m=(p=this.options).onSettled)==null?void 0:m.call(p,L,null,t,this.state.context)),ye(this,fr,Jr).call(this,{type:"success",data:L}),L}catch(L){try{throw await((w=(_=N(this,Lt).config).onError)==null?void 0:w.call(_,L,t,this.state.context,this)),await((b=(v=this.options).onError)==null?void 0:b.call(v,L,t,this.state.context)),await((S=(A=N(this,Lt).config).onSettled)==null?void 0:S.call(A,void 0,L,this.state.variables,this.state.context,this)),await((R=(P=this.options).onSettled)==null?void 0:R.call(P,void 0,L,t,this.state.context)),L}finally{ye(this,fr,Jr).call(this,{type:"error",error:L})}}}},lr=new WeakMap,Ls=new WeakMap,Lt=new WeakMap,Bi=new WeakMap,fr=new WeakSet,Jr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!wu(this.options.networkMode),status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ke.batch(()=>{N(this,lr).forEach(n=>{n.onMutationUpdate(t)}),N(this,Lt).notify({mutation:this,type:"updated",action:t})})},Gm);function w0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ut,ks,zn,Vm,r1=(Vm=class extends fo{constructor(t={}){super();ne(this,Ut,void 0);ne(this,ks,void 0);ne(this,zn,void 0);this.config=t,Z(this,Ut,[]),Z(this,ks,0)}build(t,r,n){const o=new t1({mutationCache:this,mutationId:++oa(this,ks)._,options:t.defaultMutationOptions(r),state:n});return this.add(o),o}add(t){N(this,Ut).push(t),this.notify({type:"added",mutation:t})}remove(t){Z(this,Ut,N(this,Ut).filter(r=>r!==t)),this.notify({type:"removed",mutation:t})}clear(){Ke.batch(()=>{N(this,Ut).forEach(t=>{this.remove(t)})})}getAll(){return N(this,Ut)}find(t){const r={exact:!0,...t};return N(this,Ut).find(n=>mm(r,n))}findAll(t={}){return N(this,Ut).filter(r=>mm(t,r))}notify(t){Ke.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){return Z(this,zn,(N(this,zn)??Promise.resolve()).then(()=>{const t=N(this,Ut).filter(r=>r.state.isPaused);return Ke.batch(()=>t.reduce((r,n)=>r.then(()=>n.continue().catch(jt)),Promise.resolve()))}).then(()=>{Z(this,zn,void 0)})),N(this,zn)}},Ut=new WeakMap,ks=new WeakMap,zn=new WeakMap,Vm);function n1(e){return{onFetch:(t,r)=>{const n=async()=>{var p,m,_,w,v;const o=t.options,i=(_=(m=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:m.fetchMore)==null?void 0:_.direction,a=((w=t.state.data)==null?void 0:w.pages)||[],s=((v=t.state.data)==null?void 0:v.pageParams)||[],c={pages:[],pageParams:[]};let l=!1;const u=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?l=!0:t.signal.addEventListener("abort",()=>{l=!0}),t.signal)})},d=t.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${t.options.queryHash}'`))),h=async(b,A,S)=>{if(l)return Promise.reject();if(A==null&&b.pages.length)return Promise.resolve(b);const P={queryKey:t.queryKey,pageParam:A,direction:S?"backward":"forward",meta:t.options.meta};u(P);const R=await d(P),{maxPages:L}=t.options,k=S?zC:WC;return{pages:k(b.pages,R,L),pageParams:k(b.pageParams,A,L)}};let f;if(i&&a.length){const b=i==="backward",A=b?i1:Em,S={pages:a,pageParams:s},P=A(o,S);f=await h(S,P,b)}else{f=await h(c,s[0]??o.initialPageParam);const b=e??a.length;for(let A=1;A<b;A++){const S=Em(o,f);f=await h(f,S)}}return f};t.options.persister?t.fetchFn=()=>{var o,i;return(i=(o=t.options).persister)==null?void 0:i.call(o,n,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=n}}}function Em(e,{pages:t,pageParams:r}){const n=t.length-1;return e.getNextPageParam(t[n],t,r[n],r)}function i1(e,{pages:t,pageParams:r}){var n;return(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r)}var Ye,nn,on,Di,Ui,sn,$i,ji,Wm,o1=(Wm=class{constructor(e={}){ne(this,Ye,void 0);ne(this,nn,void 0);ne(this,on,void 0);ne(this,Di,void 0);ne(this,Ui,void 0);ne(this,sn,void 0);ne(this,$i,void 0);ne(this,ji,void 0);Z(this,Ye,e.queryCache||new e1),Z(this,nn,e.mutationCache||new r1),Z(this,on,e.defaultOptions||{}),Z(this,Di,new Map),Z(this,Ui,new Map),Z(this,sn,0)}mount(){oa(this,sn)._++,N(this,sn)===1&&(Z(this,$i,Ja.subscribe(()=>{Ja.isFocused()&&(this.resumePausedMutations(),N(this,Ye).onFocus())})),Z(this,ji,As.subscribe(()=>{As.isOnline()&&(this.resumePausedMutations(),N(this,Ye).onOnline())})))}unmount(){var e,t;oa(this,sn)._--,N(this,sn)===0&&((e=N(this,$i))==null||e.call(this),Z(this,$i,void 0),(t=N(this,ji))==null||t.call(this),Z(this,ji,void 0))}isFetching(e){return N(this,Ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,nn).findAll({...e,status:"pending"}).length}getQueryData(e){var t;return(t=N(this,Ye).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:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=N(this,Ye).find({queryKey:e}),o=n==null?void 0:n.state.data,i=VC(t,o);if(typeof i>"u")return;const a=this.defaultQueryOptions({queryKey:e});return N(this,Ye).build(this,a).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Ke.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var t;return(t=N(this,Ye).find({queryKey:e}))==null?void 0:t.state}removeQueries(e){const t=N(this,Ye);Ke.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=N(this,Ye),n={type:"active",...e};return Ke.batch(()=>(r.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries(n,t)))}cancelQueries(e={},t={}){const r={revert:!0,...t},n=Ke.batch(()=>N(this,Ye).findAll(e).map(o=>o.cancel(r)));return Promise.all(n).then(jt).catch(jt)}invalidateQueries(e={},t={}){return Ke.batch(()=>{if(N(this,Ye).findAll(e).forEach(n=>{n.invalidate()}),e.refetchType==="none")return Promise.resolve();const r={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(r,t)})}refetchQueries(e={},t){const r={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},n=Ke.batch(()=>N(this,Ye).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,r);return r.throwOnError||(i=i.catch(jt)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);typeof t.retry>"u"&&(t.retry=!1);const r=N(this,Ye).build(this,t);return r.isStaleByTime(t.staleTime)?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jt).catch(jt)}fetchInfiniteQuery(e){return e.behavior=n1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jt).catch(jt)}resumePausedMutations(){return N(this,nn).resumePausedMutations()}getQueryCache(){return N(this,Ye)}getMutationCache(){return N(this,nn)}getDefaultOptions(){return N(this,on)}setDefaultOptions(e){Z(this,on,e)}setQueryDefaults(e,t){N(this,Di).set(xs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...N(this,Di).values()];let r={};return t.forEach(n=>{Os(e,n.queryKey)&&(r={...r,...n.defaultOptions})}),r}setMutationDefaults(e,t){N(this,Ui).set(xs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...N(this,Ui).values()];let r={};return t.forEach(n=>{Os(e,n.mutationKey)&&(r={...r,...n.defaultOptions})}),r}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const t={...N(this,on).queries,...(e==null?void 0:e.queryKey)&&this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Wf(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:{...N(this,on).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,Ye).clear(),N(this,nn).clear()}},Ye=new WeakMap,nn=new WeakMap,on=new WeakMap,Di=new WeakMap,Ui=new WeakMap,sn=new WeakMap,$i=new WeakMap,ji=new WeakMap,Wm),Ot,De,Hi,pt,Qn,qi,hr,Ms,Gi,Vi,Yn,Kn,an,Xn,Jn,ys,Fs,tf,Bs,rf,Ds,nf,Us,of,$s,sf,js,af,Hs,uf,lu,S0,zm,s1=(zm=class extends fo{constructor(t,r){super();ne(this,Jn);ne(this,Fs);ne(this,Bs);ne(this,Ds);ne(this,Us);ne(this,$s);ne(this,js);ne(this,Hs);ne(this,lu);ne(this,Ot,void 0);ne(this,De,void 0);ne(this,Hi,void 0);ne(this,pt,void 0);ne(this,Qn,void 0);ne(this,qi,void 0);ne(this,hr,void 0);ne(this,Ms,void 0);ne(this,Gi,void 0);ne(this,Vi,void 0);ne(this,Yn,void 0);ne(this,Kn,void 0);ne(this,an,void 0);ne(this,Xn,void 0);Z(this,De,void 0),Z(this,Hi,void 0),Z(this,pt,void 0),Z(this,Xn,new Set),Z(this,Ot,t),this.options=r,Z(this,hr,null),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,De).addObserver(this),_m(N(this,De),this.options)&&ye(this,Jn,ys).call(this),ye(this,Us,of).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return cf(N(this,De),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return cf(N(this,De),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ye(this,$s,sf).call(this),ye(this,js,af).call(this),N(this,De).removeObserver(this)}setOptions(t,r){const n=this.options,o=N(this,De);if(this.options=N(this,Ot).defaultQueryOptions(t),Xa(n,this.options)||N(this,Ot).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,De),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=n.queryKey),ye(this,Hs,uf).call(this);const i=this.hasListeners();i&&bm(N(this,De),o,this.options,n)&&ye(this,Jn,ys).call(this),this.updateResult(r),i&&(N(this,De)!==o||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&ye(this,Fs,tf).call(this);const a=ye(this,Bs,rf).call(this);i&&(N(this,De)!==o||this.options.enabled!==n.enabled||a!==N(this,an))&&ye(this,Ds,nf).call(this,a)}getOptimisticResult(t){const r=N(this,Ot).getQueryCache().build(N(this,Ot),t),n=this.createResult(r,t);return u1(this,n)&&(Z(this,pt,n),Z(this,qi,this.options),Z(this,Qn,N(this,De).state)),n}getCurrentResult(){return N(this,pt)}trackResult(t){const r={};return Object.keys(t).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(N(this,Xn).add(n),t[n])})}),r}getCurrentQuery(){return N(this,De)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=N(this,Ot).defaultQueryOptions(t),n=N(this,Ot).getQueryCache().build(N(this,Ot),r);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ye(this,Jn,ys).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,pt)))}createResult(t,r){var P;const n=N(this,De),o=this.options,i=N(this,pt),a=N(this,Qn),s=N(this,qi),l=t!==n?t.state:N(this,Hi),{state:u}=t;let{error:d,errorUpdatedAt:h,fetchStatus:f,status:p}=u,m=!1,_;if(r._optimisticResults){const R=this.hasListeners(),L=!R&&_m(t,r),k=R&&bm(t,n,r,o);(L||k)&&(f=wu(t.options.networkMode)?"fetching":"paused",u.dataUpdatedAt||(p="pending")),r._optimisticResults==="isRestoring"&&(f="idle")}if(r.select&&typeof u.data<"u")if(i&&u.data===(a==null?void 0:a.data)&&r.select===N(this,Ms))_=N(this,Gi);else try{Z(this,Ms,r.select),_=r.select(u.data),_=ef(i==null?void 0:i.data,_,r),Z(this,Gi,_),Z(this,hr,null)}catch(R){Z(this,hr,R)}else _=u.data;if(typeof r.placeholderData<"u"&&typeof _>"u"&&p==="pending"){let R;if(i!=null&&i.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData))R=i.data;else if(R=typeof r.placeholderData=="function"?r.placeholderData((P=N(this,Vi))==null?void 0:P.state.data,N(this,Vi)):r.placeholderData,r.select&&typeof R<"u")try{R=r.select(R),Z(this,hr,null)}catch(L){Z(this,hr,L)}typeof R<"u"&&(p="success",_=ef(i==null?void 0:i.data,R,r),m=!0)}N(this,hr)&&(d=N(this,hr),_=N(this,Gi),h=Date.now(),p="error");const w=f==="fetching",v=p==="pending",b=p==="error",A=v&&w;return{status:p,fetchStatus:f,isPending:v,isSuccess:p==="success",isError:b,isInitialLoading:A,isLoading:A,data:_,dataUpdatedAt:u.dataUpdatedAt,error:d,errorUpdatedAt:h,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>l.dataUpdateCount||u.errorUpdateCount>l.errorUpdateCount,isFetching:w,isRefetching:w&&!v,isLoadingError:b&&u.dataUpdatedAt===0,isPaused:f==="paused",isPlaceholderData:m,isRefetchError:b&&u.dataUpdatedAt!==0,isStale:zf(t,r),refetch:this.refetch}}updateResult(t){const r=N(this,pt),n=this.createResult(N(this,De),this.options);if(Z(this,Qn,N(this,De).state),Z(this,qi,this.options),Xa(n,r))return;N(this,Qn).data!==void 0&&Z(this,Vi,N(this,De)),Z(this,pt,n);const o={},i=()=>{if(!r)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!N(this,Xn).size)return!0;const c=new Set(s??N(this,Xn));return this.options.throwOnError&&c.add("error"),Object.keys(N(this,pt)).some(l=>{const u=l;return N(this,pt)[u]!==r[u]&&c.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),ye(this,lu,S0).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ye(this,Us,of).call(this)}},Ot=new WeakMap,De=new WeakMap,Hi=new WeakMap,pt=new WeakMap,Qn=new WeakMap,qi=new WeakMap,hr=new WeakMap,Ms=new WeakMap,Gi=new WeakMap,Vi=new WeakMap,Yn=new WeakMap,Kn=new WeakMap,an=new WeakMap,Xn=new WeakMap,Jn=new WeakSet,ys=function(t){ye(this,Hs,uf).call(this);let r=N(this,De).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(jt)),r},Fs=new WeakSet,tf=function(){if(ye(this,$s,sf).call(this),io||N(this,pt).isStale||!Jl(this.options.staleTime))return;const r=g0(N(this,pt).dataUpdatedAt,this.options.staleTime)+1;Z(this,Yn,setTimeout(()=>{N(this,pt).isStale||this.updateResult()},r))},Bs=new WeakSet,rf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(N(this,De)):this.options.refetchInterval)??!1},Ds=new WeakSet,nf=function(t){ye(this,js,af).call(this),Z(this,an,t),!(io||this.options.enabled===!1||!Jl(N(this,an))||N(this,an)===0)&&Z(this,Kn,setInterval(()=>{(this.options.refetchIntervalInBackground||Ja.isFocused())&&ye(this,Jn,ys).call(this)},N(this,an)))},Us=new WeakSet,of=function(){ye(this,Fs,tf).call(this),ye(this,Ds,nf).call(this,ye(this,Bs,rf).call(this))},$s=new WeakSet,sf=function(){N(this,Yn)&&(clearTimeout(N(this,Yn)),Z(this,Yn,void 0))},js=new WeakSet,af=function(){N(this,Kn)&&(clearInterval(N(this,Kn)),Z(this,Kn,void 0))},Hs=new WeakSet,uf=function(){const t=N(this,Ot).getQueryCache().build(N(this,Ot),this.options);if(t===N(this,De))return;const r=N(this,De);Z(this,De,t),Z(this,Hi,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},lu=new WeakSet,S0=function(t){Ke.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(N(this,pt))}),N(this,Ot).getQueryCache().notify({query:N(this,De),type:"observerResultsUpdated"})})},zm);function a1(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function _m(e,t){return a1(e,t)||e.state.dataUpdatedAt>0&&cf(e,t,t.refetchOnMount)}function cf(e,t,r){if(t.enabled!==!1){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&zf(e,t)}return!1}function bm(e,t,r,n){return r.enabled!==!1&&(e!==t||n.enabled===!1)&&(!r.suspense||e.state.status!=="error")&&zf(e,r)}function zf(e,t){return e.isStaleByTime(t.staleTime)}function u1(e,t){return!Xa(e.getCurrentResult(),t)}var un,Et,$t,Fr,Wi,Ua,qs,lf,Qm,c1=(Qm=class extends fo{constructor(t,r){super();ne(this,Wi);ne(this,qs);ne(this,un,void 0);ne(this,Et,void 0);ne(this,$t,void 0);ne(this,Fr,void 0);Z(this,Et,void 0),Z(this,un,t),this.setOptions(r),this.bindMethods(),ye(this,Wi,Ua).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=N(this,un).defaultMutationOptions(t),Xa(r,this.options)||N(this,un).getMutationCache().notify({type:"observerOptionsUpdated",mutation:N(this,$t),observer:this}),(n=N(this,$t))==null||n.setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=N(this,$t))==null||t.removeObserver(this)}onMutationUpdate(t){ye(this,Wi,Ua).call(this),ye(this,qs,lf).call(this,t)}getCurrentResult(){return N(this,Et)}reset(){Z(this,$t,void 0),ye(this,Wi,Ua).call(this),ye(this,qs,lf).call(this)}mutate(t,r){var n;return Z(this,Fr,r),(n=N(this,$t))==null||n.removeObserver(this),Z(this,$t,N(this,un).getMutationCache().build(N(this,un),this.options)),N(this,$t).addObserver(this),N(this,$t).execute(t)}},un=new WeakMap,Et=new WeakMap,$t=new WeakMap,Fr=new WeakMap,Wi=new WeakSet,Ua=function(){var r;const t=((r=N(this,$t))==null?void 0:r.state)??w0();Z(this,Et,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},qs=new WeakSet,lf=function(t){Ke.batch(()=>{var r,n,o,i,a,s,c,l;N(this,Fr)&&this.hasListeners()&&((t==null?void 0:t.type)==="success"?((n=(r=N(this,Fr)).onSuccess)==null||n.call(r,t.data,N(this,Et).variables,N(this,Et).context),(i=(o=N(this,Fr)).onSettled)==null||i.call(o,t.data,null,N(this,Et).variables,N(this,Et).context)):(t==null?void 0:t.type)==="error"&&((s=(a=N(this,Fr)).onError)==null||s.call(a,t.error,N(this,Et).variables,N(this,Et).context),(l=(c=N(this,Fr)).onSettled)==null||l.call(c,void 0,t.error,N(this,Et).variables,N(this,Et).context))),this.listeners.forEach(u=>{u(N(this,Et))})})},Qm),T0=pe.createContext(void 0),ho=e=>{const t=pe.useContext(T0);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},l1=({client:e,children:t})=>(pe.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),pe.createElement(T0.Provider,{value:e},t)),x0=pe.createContext(!1),f1=()=>pe.useContext(x0);x0.Provider;function h1(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var d1=pe.createContext(h1()),p1=()=>pe.useContext(d1);function O0(e,t){return typeof e=="function"?e(...t):!!e}var m1=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},g1=e=>{pe.useEffect(()=>{e.clearReset()},[e])},y1=({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&O0(r,[e.error,n]),v1=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},E1=(e,t)=>e.isLoading&&e.isFetching&&!t,_1=(e,t,r)=>(e==null?void 0:e.suspense)&&E1(t,r),b1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function w1(e,t,r){const n=ho(r),o=f1(),i=p1(),a=n.defaultQueryOptions(e);a._optimisticResults=o?"isRestoring":"optimistic",v1(a),m1(a,i),g1(i);const[s]=pe.useState(()=>new t(n,a)),c=s.getOptimisticResult(a);if(pe.useSyncExternalStore(pe.useCallback(l=>{const u=o?()=>{}:s.subscribe(Ke.batchCalls(l));return s.updateResult(),u},[s,o]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),pe.useEffect(()=>{s.setOptions(a,{listeners:!1})},[a,s]),_1(a,c,o))throw b1(a,s,i);if(y1({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:s.getCurrentQuery()}))throw c.error;return a.notifyOnChangeProps?c:s.trackResult(c)}function A0(e,t){return w1(e,s1,t)}function fn(e,t){const r=ho(t),[n]=pe.useState(()=>new c1(r,e));pe.useEffect(()=>{n.setOptions(e)},[n,e]);const o=pe.useSyncExternalStore(pe.useCallback(a=>n.subscribe(Ke.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=pe.useCallback((a,s)=>{n.mutate(a,s).catch(S1)},[n]);if(o.error&&O0(n.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}function S1(){}var ve={context:void 0,registry:void 0};function vs(e){ve.context=e}var T1=(e,t)=>e===t,Cs=Symbol("solid-proxy"),Qf=Symbol("solid-track"),x1=Symbol("solid-dev-component"),Za={equals:T1},C0=I0,jr=1,eu=2,R0={owned:null,cleanups:null,context:null,owner:null},ul={},Ue=null,cl=null,Me=null,mt=null,Ur=null,Su=0,[O1,CN]=bt(!1);function hn(e,t){const r=Me,n=Ue,o=e.length===0,i=o?R0:{owned:null,cleanups:null,context:null,owner:t===void 0?n:t},a=o?e:()=>e(()=>Xe(()=>xu(i)));Ue=i,Me=null;try{return yr(a,!0)}finally{Me=r,Ue=n}}function bt(e,t){t=t?Object.assign({},Za,t):Za;const r={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=o=>(typeof o=="function"&&(o=o(r.value)),N0(r,o));return[P0.bind(r),n]}function ff(e,t,r){const n=Tu(e,t,!0,jr);po(n)}function dn(e,t,r){const n=Tu(e,t,!1,jr);po(n)}function Yf(e,t,r){C0=$1;const n=Tu(e,t,!1,jr);(!r||!r.render)&&(n.user=!0),Ur?Ur.push(n):po(n)}function St(e,t,r){r=r?Object.assign({},Za,r):Za;const n=Tu(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=r.equals||void 0,po(n),P0.bind(n)}function A1(e,t,r){let n,o,i;arguments.length===2&&typeof t=="object"||arguments.length===1?(n=!0,o=e,i=t||{}):(n=e,o=t,i=r||{});let a=null,s=ul,c=null,l=!1,u="initialValue"in i,d=typeof n=="function"&&St(n);const h=new Set,[f,p]=(i.storage||bt)(i.initialValue),[m,_]=bt(void 0),[w,v]=bt(void 0,{equals:!1}),[b,A]=bt(u?"ready":"unresolved");if(ve.context){c=`${ve.context.id}${ve.context.count++}`;let k;i.ssrLoadFrom==="initial"?s=i.initialValue:ve.load&&(k=ve.load(c))&&(s=k[0])}function S(k,q,G,H){return a===k&&(a=null,H!==void 0&&(u=!0),(k===s||q===s)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(H,{value:q})),s=ul,P(q,G)),q}function P(k,q){yr(()=>{q===void 0&&p(()=>k),A(q!==void 0?"errored":u?"ready":"unresolved"),_(q);for(const G of h.keys())G.decrement();h.clear()},!1)}function R(){const k=B1,q=f(),G=m();if(G!==void 0&&!a)throw G;return Me&&!Me.user&&k&&ff(()=>{w(),a&&(k.resolved||h.has(k)||(k.increment(),h.add(k)))}),q}function L(k=!0){if(k!==!1&&l)return;l=!1;const q=d?d():n;if(q==null||q===!1){S(a,Xe(f));return}const G=s!==ul?s:Xe(()=>o(q,{value:f(),refetching:k}));return typeof G!="object"||!(G&&"then"in G)?(S(a,G,void 0,q),G):(a=G,l=!0,queueMicrotask(()=>l=!1),yr(()=>{A(u?"refreshing":"pending"),v()},!1),G.then(H=>S(G,H,void 0,q),H=>S(G,void 0,k0(H),q)))}return Object.defineProperties(R,{state:{get:()=>b()},error:{get:()=>m()},loading:{get(){const k=b();return k==="pending"||k==="refreshing"}},latest:{get(){if(!u)return R();const k=m();if(k&&!a)throw k;return f()}}}),d?ff(()=>L(!1)):L(!1),[R,{refetch:L,mutate:p}]}function C1(e){return yr(e,!1)}function Xe(e){if(Me===null)return e();const t=Me;Me=null;try{return e()}finally{Me=t}}function R1(e,t,r){const n=Array.isArray(e);let o,i=r&&r.defer;return a=>{let s;if(n){s=Array(e.length);for(let l=0;l<e.length;l++)s[l]=e[l]()}else s=e();if(i){i=!1;return}const c=Xe(()=>t(s,o,a));return o=s,c}}function P1(e){Yf(()=>Xe(e))}function Rs(e){return Ue===null||(Ue.cleanups===null?Ue.cleanups=[e]:Ue.cleanups.push(e)),e}function N1(){return Me}function wm(){return Ue}function I1(e,t){const r=Ue,n=Me;Ue=e,Me=null;try{return yr(t,!0)}catch(o){Xf(o)}finally{Ue=r,Me=n}}function L1(e){const t=Me,r=Ue;return Promise.resolve().then(()=>{Me=t,Ue=r;let n;return yr(e,!1),Me=Ue=null,n?n.done:void 0})}function k1(){return[O1,L1]}function M1(e,t){const r=Symbol("context");return{id:r,Provider:j1(r),defaultValue:e}}function F1(e){let t;return(t=M0(Ue,e.id))!==void 0?t:e.defaultValue}function Kf(e){const t=St(e),r=St(()=>hf(t()));return r.toArray=()=>{const n=r();return Array.isArray(n)?n:n!=null?[n]:[]},r}var B1;function P0(){if(this.sources&&this.state)if(this.state===jr)po(this);else{const e=mt;mt=null,yr(()=>ru(this),!1),mt=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 N0(e,t,r){let n=e.value;return(!e.comparator||!e.comparator(n,t))&&(e.value=t,e.observers&&e.observers.length&&yr(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],a=cl&&cl.running;a&&cl.disposed.has(i),(a?!i.tState:!i.state)&&(i.pure?mt.push(i):Ur.push(i),i.observers&&L0(i)),a||(i.state=jr)}if(mt.length>1e6)throw mt=[],new Error},!1)),t}function po(e){if(!e.fn)return;xu(e);const t=Ue,r=Me,n=Su;Me=Ue=e,D1(e,e.value,n),Me=r,Ue=t}function D1(e,t,r){let n;try{n=e.fn(t)}catch(o){return e.pure&&(e.state=jr,e.owned&&e.owned.forEach(xu),e.owned=null),e.updatedAt=r+1,Xf(o)}(!e.updatedAt||e.updatedAt<=r)&&(e.updatedAt!=null&&"observers"in e?N0(e,n):e.value=n,e.updatedAt=r)}function Tu(e,t,r,n=jr,o){const i={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Ue,context:null,pure:r};return Ue===null||Ue!==R0&&(Ue.owned?Ue.owned.push(i):Ue.owned=[i]),i}function tu(e){if(e.state===0)return;if(e.state===eu)return ru(e);if(e.suspense&&Xe(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Su);)e.state&&t.push(e);for(let r=t.length-1;r>=0;r--)if(e=t[r],e.state===jr)po(e);else if(e.state===eu){const n=mt;mt=null,yr(()=>ru(e,t[0]),!1),mt=n}}function yr(e,t){if(mt)return e();let r=!1;t||(mt=[]),Ur?r=!0:Ur=[],Su++;try{const n=e();return U1(r),n}catch(n){r||(Ur=null),mt=null,Xf(n)}}function U1(e){if(mt&&(I0(mt),mt=null),e)return;const t=Ur;Ur=null,t.length&&yr(()=>C0(t),!1)}function I0(e){for(let t=0;t<e.length;t++)tu(e[t])}function $1(e){let t,r=0;for(t=0;t<e.length;t++){const n=e[t];n.user?e[r++]=n:tu(n)}if(ve.context){if(ve.count){ve.effects||(ve.effects=[]),ve.effects.push(...e.slice(0,r));return}else ve.effects&&(e=[...ve.effects,...e],r+=ve.effects.length,delete ve.effects);vs()}for(t=0;t<r;t++)tu(e[t])}function ru(e,t){e.state=0;for(let r=0;r<e.sources.length;r+=1){const n=e.sources[r];if(n.sources){const o=n.state;o===jr?n!==t&&(!n.updatedAt||n.updatedAt<Su)&&tu(n):o===eu&&ru(n,t)}}}function L0(e){for(let t=0;t<e.observers.length;t+=1){const r=e.observers[t];r.state||(r.state=eu,r.pure?mt.push(r):Ur.push(r),r.observers&&L0(r))}}function xu(e){let t;if(e.sources)for(;e.sources.length;){const r=e.sources.pop(),n=e.sourceSlots.pop(),o=r.observers;if(o&&o.length){const i=o.pop(),a=r.observerSlots.pop();n<o.length&&(i.sourceSlots[a]=n,o[n]=i,r.observerSlots[n]=a)}}if(e.owned){for(t=e.owned.length-1;t>=0;t--)xu(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 k0(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Xf(e,t=Ue){throw k0(e)}function M0(e,t){return e?e.context&&e.context[t]!==void 0?e.context[t]:M0(e.owner,t):void 0}function hf(e){if(typeof e=="function"&&!e.length)return hf(e());if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++){const n=hf(e[r]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function j1(e,t){return function(n){let o;return dn(()=>o=Xe(()=>(Ue.context={[e]:n.value},Kf(()=>n.children))),void 0),o}}var df=Symbol("fallback");function nu(e){for(let t=0;t<e.length;t++)e[t]()}function H1(e,t,r={}){let n=[],o=[],i=[],a=0,s=t.length>1?[]:null;return Rs(()=>nu(i)),()=>{let c=e()||[],l,u;return c[Qf],Xe(()=>{let h=c.length,f,p,m,_,w,v,b,A,S;if(h===0)a!==0&&(nu(i),i=[],n=[],o=[],a=0,s&&(s=[])),r.fallback&&(n=[df],o[0]=hn(P=>(i[0]=P,r.fallback())),a=1);else if(a===0){for(o=new Array(h),u=0;u<h;u++)n[u]=c[u],o[u]=hn(d);a=h}else{for(m=new Array(h),_=new Array(h),s&&(w=new Array(h)),v=0,b=Math.min(a,h);v<b&&n[v]===c[v];v++);for(b=a-1,A=h-1;b>=v&&A>=v&&n[b]===c[A];b--,A--)m[A]=o[b],_[A]=i[b],s&&(w[A]=s[b]);for(f=new Map,p=new Array(A+1),u=A;u>=v;u--)S=c[u],l=f.get(S),p[u]=l===void 0?-1:l,f.set(S,u);for(l=v;l<=b;l++)S=n[l],u=f.get(S),u!==void 0&&u!==-1?(m[u]=o[l],_[u]=i[l],s&&(w[u]=s[l]),u=p[u],f.set(S,u)):i[l]();for(u=v;u<h;u++)u in m?(o[u]=m[u],i[u]=_[u],s&&(s[u]=w[u],s[u](u))):o[u]=hn(d);o=o.slice(0,a=h),n=c.slice(0)}return o});function d(h){if(i[u]=h,s){const[f,p]=bt(u);return s[u]=p,t(c[u],f)}return t(c[u])}}}function q1(e,t,r={}){let n=[],o=[],i=[],a=[],s=0,c;return Rs(()=>nu(i)),()=>{const l=e()||[];return l[Qf],Xe(()=>{if(l.length===0)return s!==0&&(nu(i),i=[],n=[],o=[],s=0,a=[]),r.fallback&&(n=[df],o[0]=hn(d=>(i[0]=d,r.fallback())),s=1),o;for(n[0]===df&&(i[0](),i=[],n=[],o=[],s=0),c=0;c<l.length;c++)c<n.length&&n[c]!==l[c]?a[c](()=>l[c]):c>=n.length&&(o[c]=hn(u));for(;c<n.length;c++)i[c]();return s=a.length=i.length=l.length,n=l.slice(0),o=o.slice(0,s)});function u(d){i[c]=d;const[h,f]=bt(l[c]);return a[c]=f,t(h,c)}}}function F0(e,t){return Xe(()=>e(t||{}))}function Pa(){return!0}var pf={get(e,t,r){return t===Cs?r:e.get(t)},has(e,t){return t===Cs?!0:e.has(t)},set:Pa,deleteProperty:Pa,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Pa,deleteProperty:Pa}},ownKeys(e){return e.keys()}};function ll(e){return(e=typeof e=="function"?e():e)?e:{}}function G1(){for(let e=0,t=this.length;e<t;++e){const r=this[e]();if(r!==void 0)return r}}function B0(...e){let t=!1;for(let i=0;i<e.length;i++){const a=e[i];t=t||!!a&&Cs in a,e[i]=typeof a=="function"?(t=!0,St(a)):a}if(t)return new Proxy({get(i){for(let a=e.length-1;a>=0;a--){const s=ll(e[a])[i];if(s!==void 0)return s}},has(i){for(let a=e.length-1;a>=0;a--)if(i in ll(e[a]))return!0;return!1},keys(){const i=[];for(let a=0;a<e.length;a++)i.push(...Object.keys(ll(e[a])));return[...new Set(i)]}},pf);const r={},n={},o=new Set;for(let i=e.length-1;i>=0;i--){const a=e[i];if(!a)continue;const s=Object.getOwnPropertyNames(a);for(let c=0,l=s.length;c<l;c++){const u=s[c];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,u);if(!o.has(u))d.get?(o.add(u),Object.defineProperty(r,u,{enumerable:!0,configurable:!0,get:G1.bind(n[u]=[d.get.bind(a)])})):(d.value!==void 0&&o.add(u),r[u]=d.value);else{const h=n[u];h?d.get?h.push(d.get.bind(a)):d.value!==void 0&&h.push(()=>d.value):r[u]===void 0&&(r[u]=d.value)}}}return r}function D0(e,...t){if(Cs in e){const o=new Set(t.length>1?t.flat():t[0]),i=t.map(a=>new Proxy({get(s){return a.includes(s)?e[s]:void 0},has(s){return a.includes(s)&&s in e},keys(){return a.filter(s=>s in e)}},pf));return i.push(new Proxy({get(a){return o.has(a)?void 0:e[a]},has(a){return o.has(a)?!1:a in e},keys(){return Object.keys(e).filter(a=>!o.has(a))}},pf)),i}const r={},n=t.map(()=>({}));for(const o of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,o),a=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let s=!1,c=0;for(const l of t)l.includes(o)&&(s=!0,a?n[c][o]=i.value:Object.defineProperty(n[c],o,i)),++c;s||(a?r[o]=i.value:Object.defineProperty(r,o,i))}return[...n,r]}function V1(e){let t,r;const n=o=>{const i=ve.context;if(i){const[s,c]=bt();ve.count||(ve.count=0),ve.count++,(r||(r=e())).then(l=>{vs(i),ve.count--,c(()=>l.default),vs()}),t=s}else if(!t){const[s]=A1(()=>(r||(r=e())).then(c=>c.default));t=s}let a;return St(()=>(a=t())&&Xe(()=>{if(!i)return a(o);const s=ve.context;vs(i);const c=a(o);return vs(s),c}))};return n.preload=()=>r||((r=e()).then(o=>t=()=>o.default),r),n}var W1=0;function z1(){const e=ve.context;return e?`${e.id}${e.count++}`:`cl-${W1++}`}var U0=e=>`Stale read from <${e}>.`;function Q1(e){const t="fallback"in e&&{fallback:()=>e.fallback};return St(H1(()=>e.each,e.children,t||void 0))}function Y1(e){const t="fallback"in e&&{fallback:()=>e.fallback};return St(q1(()=>e.each,e.children,t||void 0))}function K1(e){const t=e.keyed,r=St(()=>e.when,void 0,{equals:(n,o)=>t?n===o:!n==!o});return St(()=>{const n=r();if(n){const o=e.children;return typeof o=="function"&&o.length>0?Xe(()=>o(t?n:()=>{if(!Xe(r))throw U0("Show");return e.when})):o}return e.fallback},void 0,void 0)}function X1(e){let t=!1;const r=(i,a)=>i[0]===a[0]&&(t?i[1]===a[1]:!i[1]==!a[1])&&i[2]===a[2],n=Kf(()=>e.children),o=St(()=>{let i=n();Array.isArray(i)||(i=[i]);for(let a=0;a<i.length;a++){const s=i[a].when;if(s)return t=!!i[a].keyed,[a,s,i[a]]}return[-1]},void 0,{equals:r});return St(()=>{const[i,a,s]=o();if(i<0)return e.fallback;const c=s.children;return typeof c=="function"&&c.length>0?Xe(()=>c(t?a:()=>{if(Xe(o)[0]!==i)throw U0("Match");return s.when})):c},void 0,void 0)}function J1(e){return e}var Z1=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],eR=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Z1]),tR=new Set(["innerHTML","textContent","innerText","children"]),rR=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),nR=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 iR(e,t){const r=nR[e];return typeof r=="object"?r[t]?r.$:void 0:r}var oR=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),sR=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"]),aR={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function uR(e,t,r){let n=r.length,o=t.length,i=n,a=0,s=0,c=t[o-1].nextSibling,l=null;for(;a<o||s<i;){if(t[a]===r[s]){a++,s++;continue}for(;t[o-1]===r[i-1];)o--,i--;if(o===a){const u=i<n?s?r[s-1].nextSibling:r[i-s]:c;for(;s<i;)e.insertBefore(r[s++],u)}else if(i===s)for(;a<o;)(!l||!l.has(t[a]))&&t[a].remove(),a++;else if(t[a]===r[i-1]&&r[s]===t[o-1]){const u=t[--o].nextSibling;e.insertBefore(r[s++],t[a++].nextSibling),e.insertBefore(r[--i],u),t[o]=r[i]}else{if(!l){l=new Map;let d=s;for(;d<i;)l.set(r[d],d++)}const u=l.get(t[a]);if(u!=null)if(s<u&&u<i){let d=a,h=1,f;for(;++d<o&&d<i&&!((f=l.get(t[d]))==null||f!==u+h);)h++;if(h>u-s){const p=t[a];for(;s<u;)e.insertBefore(r[s++],p)}else e.replaceChild(r[s++],t[a++])}else a++;else t[a++].remove()}}}var Sm="_$DX_DELEGATE";function cR(e,t,r,n={}){let o;return hn(i=>{o=i,t===document?e():ou(t,e(),t.firstChild?null:void 0,r)},n.owner),()=>{o(),t.textContent=""}}function lR(e,t,r){let n;const o=()=>{const a=document.createElement("template");return a.innerHTML=e,r?a.content.firstChild.firstChild:a.content.firstChild},i=t?()=>Xe(()=>document.importNode(n||(n=o()),!0)):()=>(n||(n=o())).cloneNode(!0);return i.cloneNode=i,i}function $0(e,t=window.document){const r=t[Sm]||(t[Sm]=new Set);for(let n=0,o=e.length;n<o;n++){const i=e[n];r.has(i)||(r.add(i),t.addEventListener(i,vR))}}function iu(e,t,r){r==null?e.removeAttribute(t):e.setAttribute(t,r)}function fR(e,t,r,n){n==null?e.removeAttributeNS(t,r):e.setAttributeNS(t,r,n)}function j0(e,t){t==null?e.removeAttribute("class"):e.className=t}function H0(e,t,r,n){if(n)Array.isArray(r)?(e[`$$${t}`]=r[0],e[`$$${t}Data`]=r[1]):e[`$$${t}`]=r;else if(Array.isArray(r)){const o=r[0];e.addEventListener(t,r[0]=i=>o.call(e,r[1],i))}else e.addEventListener(t,r)}function hR(e,t,r={}){const n=Object.keys(t||{}),o=Object.keys(r);let i,a;for(i=0,a=o.length;i<a;i++){const s=o[i];!s||s==="undefined"||t[s]||(Tm(e,s,!1),delete r[s])}for(i=0,a=n.length;i<a;i++){const s=n[i],c=!!t[s];!s||s==="undefined"||r[s]===c||!c||(Tm(e,s,!0),r[s]=c)}return r}function dR(e,t,r){if(!t)return r?iu(e,"style"):t;const n=e.style;if(typeof t=="string")return n.cssText=t;typeof r=="string"&&(n.cssText=r=void 0),r||(r={}),t||(t={});let o,i;for(i in r)t[i]==null&&n.removeProperty(i),delete r[i];for(i in t)o=t[i],o!==r[i]&&(n.setProperty(i,o),r[i]=o);return r}function q0(e,t={},r,n){const o={};return n||dn(()=>o.children=oo(e,t.children,o.children)),dn(()=>t.ref&&t.ref(e)),dn(()=>mR(e,t,r,!0,o,!0)),o}function pR(e,t,r){return Xe(()=>e(t,r))}function ou(e,t,r,n){if(r!==void 0&&!n&&(n=[]),typeof t!="function")return oo(e,t,n,r);dn(o=>oo(e,t(),o,r),n)}function mR(e,t,r,n,o={},i=!1){t||(t={});for(const a in o)if(!(a in t)){if(a==="children")continue;o[a]=xm(e,a,null,o[a],r,i)}for(const a in t){if(a==="children"){n||oo(e,t.children);continue}const s=t[a];o[a]=xm(e,a,s,o[a],r,i)}}function gR(e){let t,r;if(!ve.context||!(t=ve.registry.get(r=ER()))){if(ve.context,!e)throw new Error("Unrecoverable Hydration Mismatch. No template for key: "+r);return e()}return ve.completed&&ve.completed.add(t),ve.registry.delete(r),t}function yR(e){return e.toLowerCase().replace(/-([a-z])/g,(t,r)=>r.toUpperCase())}function Tm(e,t,r){const n=t.trim().split(/\s+/);for(let o=0,i=n.length;o<i;o++)e.classList.toggle(n[o],r)}function xm(e,t,r,n,o,i){let a,s,c,l,u;if(t==="style")return dR(e,r,n);if(t==="classList")return hR(e,r,n);if(r===n)return n;if(t==="ref")i||r(e);else if(t.slice(0,3)==="on:"){const d=t.slice(3);n&&e.removeEventListener(d,n),r&&e.addEventListener(d,r)}else if(t.slice(0,10)==="oncapture:"){const d=t.slice(10);n&&e.removeEventListener(d,n,!0),r&&e.addEventListener(d,r,!0)}else if(t.slice(0,2)==="on"){const d=t.slice(2).toLowerCase(),h=oR.has(d);if(!h&&n){const f=Array.isArray(n)?n[0]:n;e.removeEventListener(d,f)}(h||r)&&(H0(e,d,r,h),h&&$0([d]))}else if(t.slice(0,5)==="attr:")iu(e,t.slice(5),r);else if((u=t.slice(0,5)==="prop:")||(c=tR.has(t))||!o&&((l=iR(t,e.tagName))||(s=eR.has(t)))||(a=e.nodeName.includes("-")))u&&(t=t.slice(5),s=!0),t==="class"||t==="className"?j0(e,r):a&&!s&&!c?e[yR(t)]=r:e[l||t]=r;else{const d=o&&t.indexOf(":")>-1&&aR[t.split(":")[0]];d?fR(e,d,t,r):iu(e,rR[t]||t,r)}return r}function vR(e){const t=`$$${e.type}`;let r=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==r&&Object.defineProperty(e,"target",{configurable:!0,value:r}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return r||document}}),ve.registry&&!ve.done&&(ve.done=_$HY.done=!0);r;){const n=r[t];if(n&&!r.disabled){const o=r[`${t}Data`];if(o!==void 0?n.call(r,o,e):n.call(r,e),e.cancelBubble)return}r=r._$host||r.parentNode||r.host}}function oo(e,t,r,n,o){if(ve.context){!r&&(r=[...e.childNodes]);let s=[];for(let c=0;c<r.length;c++){const l=r[c];l.nodeType===8&&l.data.slice(0,2)==="!$"?l.remove():s.push(l)}r=s}for(;typeof r=="function";)r=r();if(t===r)return r;const i=typeof t,a=n!==void 0;if(e=a&&r[0]&&r[0].parentNode||e,i==="string"||i==="number"){if(ve.context)return r;if(i==="number"&&(t=t.toString()),a){let s=r[0];s&&s.nodeType===3?s.data=t:s=document.createTextNode(t),r=Oi(e,r,n,s)}else r!==""&&typeof r=="string"?r=e.firstChild.data=t:r=e.textContent=t}else if(t==null||i==="boolean"){if(ve.context)return r;r=Oi(e,r,n)}else{if(i==="function")return dn(()=>{let s=t();for(;typeof s=="function";)s=s();r=oo(e,s,r,n)}),()=>r;if(Array.isArray(t)){const s=[],c=r&&Array.isArray(r);if(mf(s,t,r,o))return dn(()=>r=oo(e,s,r,n,!0)),()=>r;if(ve.context){if(!s.length)return r;for(let l=0;l<s.length;l++)if(s[l].parentNode)return r=s}if(s.length===0){if(r=Oi(e,r,n),a)return r}else c?r.length===0?Om(e,s,n):uR(e,r,s):(r&&Oi(e),Om(e,s));r=s}else if(t.nodeType){if(ve.context&&t.parentNode)return r=a?[t]:t;if(Array.isArray(r)){if(a)return r=Oi(e,r,n,t);Oi(e,r,null,t)}else r==null||r===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);r=t}}return r}function mf(e,t,r,n){let o=!1;for(let i=0,a=t.length;i<a;i++){let s=t[i],c=r&&r[i],l;if(!(s==null||s===!0||s===!1))if((l=typeof s)=="object"&&s.nodeType)e.push(s);else if(Array.isArray(s))o=mf(e,s,c)||o;else if(l==="function")if(n){for(;typeof s=="function";)s=s();o=mf(e,Array.isArray(s)?s:[s],Array.isArray(c)?c:[c])||o}else e.push(s),o=!0;else{const u=String(s);c&&c.nodeType===3&&c.data===u?e.push(c):e.push(document.createTextNode(u))}}return o}function Om(e,t,r=null){for(let n=0,o=t.length;n<o;n++)e.insertBefore(t[n],r)}function Oi(e,t,r,n){if(r===void 0)return e.textContent="";const o=n||document.createTextNode("");if(t.length){let i=!1;for(let a=t.length-1;a>=0;a--){const s=t[a];if(o!==s){const c=s.parentNode===e;!i&&!a?c?e.replaceChild(o,s):e.insertBefore(o,r):c&&s.remove()}else i=!0}}else e.insertBefore(o,r);return[o]}function ER(){const e=ve.context;return`${e.id}${e.count++}`}var _R="http://www.w3.org/2000/svg";function G0(e,t=!1){return t?document.createElementNS(_R,e):document.createElement(e)}function bR(e){const{useShadow:t}=e,r=document.createTextNode(""),n=()=>e.mount||document.body,o=wm();let i,a=!!ve.context;return Yf(()=>{a&&(wm().user=a=!1),i||(i=I1(o,()=>St(()=>e.children)));const s=n();if(s instanceof HTMLHeadElement){const[c,l]=bt(!1),u=()=>l(!0);hn(d=>ou(s,()=>c()?d():i(),null)),Rs(u)}else{const c=G0(e.isSVG?"g":"div",e.isSVG),l=t&&c.attachShadow?c.attachShadow({mode:"open"}):c;Object.defineProperty(c,"_$host",{get(){return r.parentNode},configurable:!0}),ou(l,i),s.appendChild(c),e.ref&&e.ref(c),Rs(()=>s.removeChild(c))}},void 0,{render:!a}),r}function wR(e){const[t,r]=D0(e,["component"]),n=St(()=>t.component);return St(()=>{const o=n();switch(typeof o){case"function":return Object.assign(o,{[x1]:!0}),Xe(()=>o(r));case"string":const i=sR.has(o),a=ve.context?gR():G0(o,i);return q0(a,r,i),a}})}var zi,Gs,Vs,Ws,Zn,Qi,Yi,Ki,Xi,Ji,zs,Ym,SR=(Ym=class{constructor(e){ne(this,zi,void 0);ne(this,Gs,void 0);ne(this,Vs,void 0);ne(this,Ws,void 0);ne(this,Zn,!1);ne(this,Qi,void 0);ne(this,Yi,void 0);ne(this,Ki,void 0);ne(this,Xi,void 0);ne(this,Ji,void 0);ne(this,zs,void 0);const{client:t,queryFlavor:r,version:n,onlineManager:o,buttonPosition:i,position:a,initialIsOpen:s,errorTypes:c}=e;Z(this,zi,bt(t)),Z(this,Vs,r),Z(this,Ws,n),Z(this,Gs,o),Z(this,Qi,bt(i)),Z(this,Yi,bt(a)),Z(this,Ki,bt(s)),Z(this,Xi,bt(c))}setButtonPosition(e){N(this,Qi)[1](e)}setPosition(e){N(this,Yi)[1](e)}setInitialIsOpen(e){N(this,Ki)[1](e)}setErrorTypes(e){N(this,Xi)[1](e)}setClient(e){N(this,zi)[1](e)}mount(e){if(N(this,Zn))throw new Error("Devtools is already mounted");const t=cR(()=>{const[r]=N(this,Qi),[n]=N(this,Yi),[o]=N(this,Ki),[i]=N(this,Xi),[a]=N(this,zi);let s;N(this,Ji)?s=N(this,Ji):(s=V1(()=>Promise.resolve().then(()=>require("./4TNE5QTO-59ee46fe.js"))),Z(this,Ji,s));const c=this;return F0(s,B0({get queryFlavor(){return N(c,Vs)},get version(){return N(c,Ws)},get onlineManager(){return N(c,Gs)}},{get client(){return a()},get buttonPosition(){return r()},get position(){return n()},get initialIsOpen(){return o()},get errorTypes(){return i()}}))},e);Z(this,Zn,!0),Z(this,zs,t)}unmount(){var e;if(!N(this,Zn))throw new Error("Devtools is not mounted");(e=N(this,zs))==null||e.call(this),Z(this,Zn,!1)}},zi=new WeakMap,Gs=new WeakMap,Vs=new WeakMap,Ws=new WeakMap,Zn=new WeakMap,Qi=new WeakMap,Yi=new WeakMap,Ki=new WeakMap,Xi=new WeakMap,Ji=new WeakMap,zs=new WeakMap,Ym);function TR(e){const t=ho(),r=e.client||t,n=$.useRef(null),{buttonPosition:o,position:i,initialIsOpen:a,errorTypes:s}=e,[c]=$.useState(new SR({client:r,queryFlavor:"React Query",version:"5",onlineManager:As,buttonPosition:o,position:i,initialIsOpen:a,errorTypes:s}));return $.useEffect(()=>{c.setClient(r)},[r,c]),$.useEffect(()=>{o&&c.setButtonPosition(o)},[o,c]),$.useEffect(()=>{i&&c.setPosition(i)},[i,c]),$.useEffect(()=>{c.setInitialIsOpen(a||!1)},[a,c]),$.useEffect(()=>{c.setErrorTypes(s||[])},[s,c]),$.useEffect(()=>(n.current&&c.mount(n.current),()=>{c.unmount()}),[c]),$.createElement("div",{className:"tsqd-parent-container",ref:n})}var xR=process.env.NODE_ENV!=="development"?function(){return null}:TR;const OR=({showDevTools:e,children:t})=>{const r=new o1({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e4}}});return x.jsxs(l1,{client:r,children:[t,e&&x.jsx(xR,{initialIsOpen:!1})]})};const fl="joinCommunityButton",Jf=({isMember:e=!1,isShort:t=!1,functions:{join:r,leave:n}={join:()=>{},leave:()=>{}}})=>{const o=Oe(),i=$.useContext($r),a=i&&typeof i.id=="string",[s,c]=$.useState(e),[l,u]=$.useState(e?"joined":"notJoined");$.useEffect(()=>{l==="joining"?u("joined"):l==="leaving"&&u("notJoined")},[s]);const d={},h={};return s&&l!=="leaving"&&(d["data-hover-text"]=o.formatMessage({id:`${fl}_leave`}),d["aria-label"]=o.formatMessage({id:`${fl}_member_aria`}),h["aria-hidden"]="true"),x.jsx(ze,{variant:s?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:s&&l!=="leaving"?{icon:"tick",position:"left"}:!1,onClick:async f=>{a&&(f.currentTarget.blur(),s?(u("leaving"),typeof n=="function"&&await n()):(u("joining"),typeof r=="function"&&await r()),c(!s))},className:ue("join-community-button",l,{active:l==="joining"}),disabled:!a,...d,children:x.jsx("span",{className:"text",...h,children:o.formatMessage({id:`${fl}${["joining","leaving"].includes(l)?`_${l}`:s?"_member":t?"_short":""}`})})})};const hl="communityDetails_",AR=({isMember:e=!1,slug:t,members:{number:r,data:n}={number:void 0,data:[]},className:o="",...i})=>{const a=Oe(),s=r||(n==null?void 0:n.length)||0;return x.jsxs("div",{className:ue("community-details",o),children:[x.jsx(Qa,{}),x.jsxs("div",{className:"member-details",children:[x.jsxs("div",{className:"top",children:[x.jsxs("h3",{children:[a.formatMessage({id:`${hl}members`}),x.jsx("span",{className:"count",children:s})]}),x.jsx("p",{className:"text-small",children:x.jsx("a",{href:`/communities/${t}/members`,children:a.formatMessage({id:`${hl}viewAll`})})})]}),x.jsx(m0,{contributors:{total:r,data:n!=null&&n.length?n.reverse():[{},{},{},{},{}]},styling:{size:"medium",showGap:!0,showPlaceholders:s===0},cutoff:5})]}),x.jsx(Jf,{isMember:e,...i}),e&&x.jsx(ze,{variant:"primary",icon:{icon:"plus"},styling:{fullWidth:!0},children:a.formatMessage({id:`${hl}invite`})})]})};const CR=({breadcrumbs:e,className:t=""})=>{const r=Oe();return x.jsxs(x.Fragment,{children:[x.jsx(lt,{element:"p",children:r.formatMessage({id:"breadcrumbs_label"})}),x.jsx("ul",{className:ue("breadcrumbs text-small",t),children:e.map(({text:n,href:o,current:i=!1},a)=>x.jsxs("li",{children:[i&&x.jsx(lt,{element:"span",children:r.formatMessage({id:"breadcrumbs_currentPage"})}),x.jsx(Ff,{href:i?void 0:o,children:n})]},`${window.btoa(n)}_${a}`))})]})};const RR=({options:e,allOption:t=!1,allowMultiple:r=!0,onChange:n=()=>{},className:o=""})=>{const i=Oe(),a=t?[{id:"all",text:typeof t!="boolean"&&t.text||i.formatMessage({id:"filters_all"})},...e]:e,[s,c]=$.useState(t?["all"]:[]),l=(u,d)=>{let h=[];s.includes(u)?h=s.filter(f=>f!==u):u==="all"?h=["all"]:r?h=[...s.filter(f=>f!=="all"),u]:h=[u],c(f=>(n&&typeof n=="function"&&n({current:h,previous:f}),h)),d&&typeof d=="function"&&d()};return x.jsx("ul",{className:ue("filters",o),children:a.map(({id:u,text:d,disabled:h=!1,callback:f=()=>{}})=>{let p={};return h&&(p={disabled:!0,"aria-label":i.formatMessage({id:"filters_disabled"},{name:d})}),x.jsx("li",{children:x.jsx("button",{className:ue(u,{selected:s.includes(u)}),onClick:m=>{m.preventDefault(),m.stopPropagation(),l(u,f)},...p,children:d})},u)})})};const dl=Wl({locale:"en",messages:Mf}),V0=({page:e=1,length:t=0,limit:r=10,loadNextPage:n=()=>{},icon:o=!1,messages:i={button:dl.formatMessage({id:"loadMore_button"}),endOfFeed:dl.formatMessage({id:"loadMore_endOfFeed"}),error:dl.formatMessage({id:"loadMore_error"})},className:a="",gtmContext:s="LoadMore"})=>{const[c,l]=$.useState(!1),[u,d]=$.useState(!1);if(t<=0||t<r*e)return null;const h=async f=>{try{await n(f)}catch(p){p instanceof Error&&p.message&&p.message.includes("Cannot read items")?d(!0):l(!0)}};return x.jsxs("footer",{className:ue("load-more",a),children:[c&&x.jsx("p",{className:"error",children:i.error}),u?x.jsx("p",{children:i.endOfFeed}):x.jsx(ze,{variant:"secondary",icon:o,onClick:h,"data-gtm-event-context":s,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:i.button})]})};let Na=!1;const W0=({element:e="div",id:t="more-menu",options:r,className:n=""})=>{const o=Oe(),i=$.useRef(null),[a,s]=$.useState(!1),c=l=>{i.current&&l.target instanceof HTMLElement&&!i.current.contains(l.target)&&s(!1)};return $.useEffect(()=>(document.addEventListener("click",c,!0),()=>{document.removeEventListener("click",c,!0)})),$.createElement(e,{ref:i,className:ue("more-menu text-medium",n),children:x.jsxs(x.Fragment,{children:[x.jsx(ze,{variant:"tertiary",size:"medium",icon:{icon:"ellipsis"},onClick:()=>s(!a),"aria-haspopup":"true","aria-expanded":a,"aria-controls":t,screenreaderText:o.formatMessage({id:"moreMenu"})}),x.jsx("ul",{id:t,hidden:!a,children:r.map(({href:l,onClick:u,text:d,icon:h,...f},p)=>{const m={...f,onClick:_=>{s(!1),typeof u=="function"&&u(_)},onFocus:()=>{Na&&(clearTimeout(Na),Na=!1)},onBlur:()=>{Na=setTimeout(()=>{s(!1)},100)}};return l&&(m.href=l),x.jsx("li",{children:x.jsx(ze,{variant:"tertiary",size:"medium",icon:h?{icon:h,position:"left"}:!1,...m,children:d})},`${window.btoa(d)}_${p}`)})})]})})};const Zf=({variant:e="default",version:t="default",className:r="",...n})=>x.jsx("p",{className:"logo-wrapper",children:x.jsx("a",{className:ue("logo",e,t,r),href:"/home/",...n,children:x.jsx(lt,{children:x.jsx(ln,{id:"apolitical"})})})});const PR={"2-1":901},NR=({layout:e="2-1",hideOnMobile:t=!1,className:r="",children:n})=>{const o=Js(!0);let i=n;return $.Children.count(n)===1&&(i=$.Children.toArray(n)[0],i.props&&(i=i.props.children)),x.jsx("section",{className:ue("columns",`layout-${e}`,r),children:$.Children.map(i,(a,s)=>t!==!1&&s===t&&o&&o<PR[e]?null:a)})};const pl="cookieBanner_",ml=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],gl=new Date(Date.now()+12*30*24*60*60*1e3),z0=()=>{const e=Oe(),[t,r,n]=rg(ml),[o,i]=$.useState(!t["apol-cookie-banner"]),a=()=>{ml.forEach(u=>{r(u,!0,{path:"/",expires:gl,domain:u==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),i(!1),window.location.reload()},s=()=>{r("apol-cookie-banner",!0,{path:"/",expires:gl}),ml.forEach(u=>{if(u==="apol-cookie-banner"){r(u,!0,{path:"/",expires:gl});return}n(u)}),i(!1)};if(!o)return null;const c=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:s,gtmType:"reject-all"},{id:"accept",onClick:a,gtmType:"accepted-all"}],l=[];return c.forEach(u=>{l.push({variant:u.href?"tertiary":"primary",href:u.href,onClick:u.onClick,className:"gtm-trackable","data-gtm-event-context":"cookie-banner","data-gtm-event-type":`cookie-${u.gtmType}-click`,children:e.formatMessage({id:`${pl}buttons_${u.id}`})})}),x.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[x.jsx("h6",{children:e.formatMessage({id:`${pl}title`})}),x.jsx("p",{children:e.formatMessage({id:`${pl}text`})}),x.jsx(Zs,{buttons:l})]})},Br={platform:{order:["events","courses","qanda","articles"],events:{href:"/events/",gtmType:"events-click"},courses:{href:"/microcourses/",gtmType:"microcourses-click"},qanda:{href:"/questions-answers/",gtmType:"q-and-a-click"},articles:{href:"/solution-articles/",gtmType:"articles-click"}},community:{order:["support","post","join","guidelines"],support:{name:"Support FAQ",href:"/pages/support-faq",gtmType:"support-faq-click"},post:{href:"/pages/post-an-article",gtmType:"post-an-article-click"},join:{href:"/pages/who-can-join-the-community",gtmType:"who-can-join-click"},guidelines:{href:"/pages/values-and-guidelines",gtmType:"guidelines-and-values-click"}},company:{order:["story","team","careers","partner","contact"],story:{href:"/pages/our-story",gtmType:"our-story-click"},team:{href:"/pages/meet-our-team",gtmType:"team-click"},careers:{href:"/pages/careers",gtmType:"careers-click"},partner:{href:"/partnerships/",gtmType:"partner-with-us-click"},contact:{href:"/pages/get-in-touch",gtmType:"contact-click"},child:"legal"},legal:{order:["privacy","terms","cookie","accessibility"],privacy:{href:"https://about.apolitical.co/privacy-policy",gtmType:"privacy-policy-link"},terms:{href:"https://about.apolitical.co/terms-and-conditions",gtmType:"terms-conditions-link"},cookie:{href:"/pages/cookie-policy",gtmType:"cookie-policy-link"},accessibility:{href:"/pages/accessibility-statement",gtmType:"accessibility-link"},text:{order:["dataProtection","euDataProtection"],dataProtection:{email:"dpo@apolitical.co",gtmType:"email-dpo-link"},euDataProtection:{email:"dpo.agl@apolitical.foundation",gtmType:"email-eu-dpo-link"}}},contact:{text:{order:["correspondence","registered","berlin","support","business"],correspondence:{address:!0},registered:{address:!0},berlin:{address:!0},support:{email:"concierge@apolitical.co",gtmType:"concierge-email-click"},business:{email:"hello@apolitical.co",gtmType:"hello-email-click"}}},social:{order:["linkedin","twitter","facebook"],linkedin:{href:"https://www.linkedin.com/company/apolitical"},twitter:{href:"https://twitter.com/apoliticalco"},facebook:{href:"https://www.facebook.com/apoliticalco"}}};const Ri="footer_",su="SiteFooter",Am=({group:e})=>{const t=Br[e].order||[];let r=!1;return"text"in Br[e]&&(r=Br[e].text),x.jsxs($.Fragment,{children:[x.jsx("p",{className:"pre-title",children:x.jsx(ln,{id:`${Ri}${e}`})}),Array.isArray(t)&&t.length>0&&x.jsx("ul",{className:"text-medium",children:t.map(n=>{if(["order","child","text"].includes(n))return null;const{href:o,gtmType:i}=Br[e][n],a={};return["legal"].includes(e)&&(a.target="_blank",a.rel="noopener"),x.jsx("li",{children:x.jsx("a",{href:o,className:"gtm-trackable","data-gtm-event-context":su,"data-gtm-event-type":i,...a,children:x.jsx(ln,{id:`${Ri}${e}_${n}`})})},`${e}_${n}`)})}),typeof r!="boolean"&&"order"in r&&Array.isArray(r.order)&&x.jsx("dl",{className:"text-medium",children:r.order.map(n=>x.jsxs($.Fragment,{children:[x.jsx("dt",{children:x.jsx(ln,{id:`${Ri}${e}_${n}`})}),x.jsxs("dd",{children:[typeof r!="boolean"&&r[n].address&&x.jsx("address",{children:x.jsx(ln,{id:`${Ri}${e}_${n}_address`,values:{br:x.jsx("br",{})}})}),typeof r!="boolean"&&r[n].email&&x.jsx("a",{href:`mailto:${r[n].email}`,className:"gtm-trackable","data-gtm-event-context":su,"data-gtm-event-type":r[n].gtmType,children:r[n].email})]})]},`dl-${e}-${n}`))})]},e)},eh=()=>x.jsx("div",{id:"footer",children:x.jsxs("div",{className:"wrapper",children:[x.jsx(yf,{element:"hr"}),x.jsx(Zf,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":su,"data-gtm-event-type":"logo-homepage-link"}),x.jsx("footer",{children:["platform","community","company","contact"].map(e=>x.jsxs("div",{className:"group",children:[x.jsx(Am,{group:e}),Object.keys(Br[e]).includes("child")&&x.jsx(Am,{group:Br[e].child})]},e))}),x.jsx("hr",{}),x.jsxs("div",{className:"sub-footer",children:[x.jsx("ul",{children:Array.isArray(Br.social.order)&&Br.social.order.map(e=>{const t=Br.social[e];return x.jsx("li",{className:e,children:x.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":su,"data-gtm-event-type":"social-click",children:x.jsx("span",{className:"hidden",children:x.jsx(ln,{id:`${Ri}social_${e}`})})})},e)})}),x.jsx("small",{children:x.jsx(ln,{id:`${Ri}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});const Ia="emailHelperTextBox_",IR=({type:e,email:t,redirectPath:r,resendVerificationCode:n})=>{const o=Oe(),[i,a]=$.useState({path:`${Ia}default`,type:"default",link:{},mail:{},error:""}),[s,c]=$.useState(!1),l=$.useCallback(f=>{f.preventDefault(),f.stopPropagation();const p=m=>{a({path:`${Ia}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:_=>l(_),href:"#","data-testid":"send-verify-email-click"},mail:{href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"ErrorVerifyingBox","data-gtm-event-type":"email-concierge-click"},error:m})};if(typeof n!="function"){p(o.formatMessage({id:`${Ia}error_noFunction`}));return}c(!0),n(t).then(()=>{localStorage.setItem("email",t),window.location.href=r||"/signup/verify-email"}).catch(m=>{p(m.message)}).finally(()=>{c(!1)})},[t,r,n]);$.useEffect(()=>{let f=Ia,p="default",m={},_={};switch(e){case"gov":f+="autoApproved",p="success";break;case"nonGov":f+="unrecognisedEmail",p="error",m={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":f+="pendingApproval",p="error",_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":f+="emailUnverified",p="error",m={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:w=>l(w),"data-testid":"send-verify-email-click"};break;case"exists":f+="emailAlreadyExists",p="error",m={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},_={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:f+="default",m={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}a({...i,path:f,type:p,link:m,mail:_})},[e]);const u={};return["link","mail"].forEach(f=>{u[f]=Object.keys(i[f]).length?p=>x.jsx("a",{...i[f],children:p}):p=>p}),x.jsx(c0,{type:i.type,heading:s?!1:o.formatMessage({id:`${i.path}_title`}),children:s?x.jsxs(x.Fragment,{children:[x.jsx(gr,{element:"span"}),x.jsx(gr,{element:"span"})]}):o.formatMessage({id:`${i.path}_text`},{...u,strong:f=>x.jsx("strong",{children:f}),em:f=>x.jsx("em",{children:f}),br:x.jsxs(x.Fragment,{children:[x.jsx("br",{}),x.jsx("br",{})]}),error:i.error})})};const La="passwordRules_",Q0="isMoreThanEightCharacters",Y0="includesNumberAndSymbol",K0="includesLowerAndUppercase",LR={[Q0]:"8Characters",[Y0]:"numberSymbol",[K0]:"lowercaseUppercase"},kR=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const r=Oe();return x.jsxs("aside",{className:ue("password-rules",t),children:[x.jsx("small",{children:r.formatMessage({id:`${La}intro`})}),x.jsx("ul",{children:[Q0,Y0,K0].map(n=>x.jsxs("li",{className:ue({matches:e[n]}),children:[x.jsxs(lt,{children:[r.formatMessage({id:`${La}rule_label`})," "]}),x.jsx("span",{children:r.formatMessage({id:`${La}rule_${LR[n]}`})}),!e[n]&&x.jsxs(lt,{element:"strong",children:[" "," ",r.formatMessage({id:`${La}notMet`})]})]},`rule-${n}`))})]})},MR=$.memo(kR);const FR=({text:e={},topRating:t=5,functions:{createRating:r=()=>null,updateRating:n=()=>{},reportError:o=()=>{}},className:i="",hasLoaded:a=!1})=>{const s=Oe(),[c,l]=$.useState({setUp:!1,id:null,rating:null,disabled:!0}),u=async()=>{try{const w=await r();l(v=>({...v,setUp:!0,id:w&&w.id,disabled:!1}))}catch(w){l(v=>({...v,setUp:!0,disabled:!0})),o(w)}};if($.useEffect(()=>{a&&!c.setUp&&u()},[a]),!a)return x.jsx(gr,{className:"rating-placeholder"});const{id:d,rating:h,disabled:f}=c,p="ratings_",m={text:s.formatMessage({id:`${p}text`}),low:s.formatMessage({id:`${p}low`}),high:s.formatMessage({id:`${p}high`}),success:s.formatMessage({id:`${p}success`}),...e},_=async w=>{if(!(!d||f))try{l(v=>({...v,rating:w,disabled:!0})),await n({id:d,value:w})}catch(v){l(b=>({...b,rating:null})),o(v)}finally{l(v=>({...v,disabled:!1}))}};return x.jsxs("div",{className:ue("rating",i),children:[x.jsx("span",{className:"label",children:m[h?"success":"text"]}),x.jsx("ol",{children:Array.from(new Array(t).keys()).map(w=>{const v=w+1;return x.jsx("li",{className:ue({selected:h&&v<=h}),children:x.jsx(ze,{variant:"tertiary",size:"small",icon:{icon:`star${!h||v>h?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${s.formatMessage({id:`${p}stars`},{number:v,total:t})}${v===1||v===t?` - ${m[v===1?"low":"high"]}`:""}`,onClick:b=>{b.preventDefault(),b.stopPropagation(),_(v)},disabled:f})},`rating-${v}`)})})]})};const X0=({id:e="search",className:t="",handleToggle:r=!1,defaultValue:n="",gtmContext:o="search-bar",gtmEvent:i="form-submission"})=>{const{searchIsOpen:a=!0,isDesktopVersion:s=!1}=r||{},c=Oe(),l=$.useRef(null);ri(()=>{!r||s||!a||l.current&&l.current.focus()},[a]);const u=d=>{if(d.preventDefault(),d.stopPropagation(),!(!l.current||!l.current.value||l.current.value.length<1))return window&&window.location&&window.location.replace(`/search?search=${encodeURIComponent(l.current.value)}`)};return x.jsx("form",{onSubmit:u,className:ue("search-form gtm-trackable",t),"data-gtm-event-context":o,"data-gtm-event-type":i,children:x.jsx("fieldset",{id:`${e}-form`,hidden:r?!a:!1,role:"search",children:x.jsxs("p",{children:[x.jsx(lt,{element:"label",htmlFor:e,children:c.formatMessage({id:"search_label"})}),x.jsx("input",{ref:l,type:"search",id:e,name:e,defaultValue:n,placeholder:c.formatMessage({id:"search_placeholder"}),onKeyDown:d=>{d.key==="Enter"&&u(d)}}),x.jsx("button",{className:"clear",onClick:d=>{d.preventDefault(),d.stopPropagation(),l.current&&l.current.value&&(l.current.value="")},children:x.jsx(lt,{children:c.formatMessage({id:"search_clear"})})}),x.jsx("button",{className:"search",onClick:u,children:x.jsx(lt,{children:c.formatMessage({id:"search_cta"})})})]})})})};var BR="Expected a function",J0="__lodash_hash_undefined__",Z0=1/0,DR="[object Function]",UR="[object GeneratorFunction]",$R="[object Symbol]",jR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,HR=/^\w*$/,qR=/^\./,GR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,VR=/[\\^$.*+?()[\]{}|]/g,WR=/\\(\\)?/g,zR=/^\[object .+?Constructor\]$/,QR=typeof de=="object"&&de&&de.Object===Object&&de,YR=typeof self=="object"&&self&&self.Object===Object&&self,th=QR||YR||Function("return this")();function KR(e,t){return e==null?void 0:e[t]}function XR(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var JR=Array.prototype,ZR=Function.prototype,eE=Object.prototype,yl=th["__core-js_shared__"],Cm=function(){var e=/[^.]+$/.exec(yl&&yl.keys&&yl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),tE=ZR.toString,rh=eE.hasOwnProperty,rE=eE.toString,eP=RegExp("^"+tE.call(rh).replace(VR,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rm=th.Symbol,tP=JR.splice,rP=nE(th,"Map"),Ps=nE(Object,"create"),Pm=Rm?Rm.prototype:void 0,Nm=Pm?Pm.toString:void 0;function oi(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function nP(){this.__data__=Ps?Ps(null):{}}function iP(e){return this.has(e)&&delete this.__data__[e]}function oP(e){var t=this.__data__;if(Ps){var r=t[e];return r===J0?void 0:r}return rh.call(t,e)?t[e]:void 0}function sP(e){var t=this.__data__;return Ps?t[e]!==void 0:rh.call(t,e)}function aP(e,t){var r=this.__data__;return r[e]=Ps&&t===void 0?J0:t,this}oi.prototype.clear=nP;oi.prototype.delete=iP;oi.prototype.get=oP;oi.prototype.has=sP;oi.prototype.set=aP;function mo(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function uP(){this.__data__=[]}function cP(e){var t=this.__data__,r=Ou(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():tP.call(t,r,1),!0}function lP(e){var t=this.__data__,r=Ou(t,e);return r<0?void 0:t[r][1]}function fP(e){return Ou(this.__data__,e)>-1}function hP(e,t){var r=this.__data__,n=Ou(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}mo.prototype.clear=uP;mo.prototype.delete=cP;mo.prototype.get=lP;mo.prototype.has=fP;mo.prototype.set=hP;function ui(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function dP(){this.__data__={hash:new oi,map:new(rP||mo),string:new oi}}function pP(e){return Au(this,e).delete(e)}function mP(e){return Au(this,e).get(e)}function gP(e){return Au(this,e).has(e)}function yP(e,t){return Au(this,e).set(e,t),this}ui.prototype.clear=dP;ui.prototype.delete=pP;ui.prototype.get=mP;ui.prototype.has=gP;ui.prototype.set=yP;function Ou(e,t){for(var r=e.length;r--;)if(CP(e[r][0],t))return r;return-1}function vP(e,t){t=wP(t,e)?[t]:bP(t);for(var r=0,n=t.length;e!=null&&r<n;)e=e[OP(t[r++])];return r&&r==n?e:void 0}function EP(e){if(!oE(e)||TP(e))return!1;var t=RP(e)||XR(e)?eP:zR;return t.test(AP(e))}function _P(e){if(typeof e=="string")return e;if(ih(e))return Nm?Nm.call(e):"";var t=e+"";return t=="0"&&1/e==-Z0?"-0":t}function bP(e){return iE(e)?e:xP(e)}function Au(e,t){var r=e.__data__;return SP(t)?r[typeof t=="string"?"string":"hash"]:r.map}function nE(e,t){var r=KR(e,t);return EP(r)?r:void 0}function wP(e,t){if(iE(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ih(e)?!0:HR.test(e)||!jR.test(e)||t!=null&&e in Object(t)}function SP(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function TP(e){return!!Cm&&Cm in e}var xP=nh(function(e){e=NP(e);var t=[];return qR.test(e)&&t.push(""),e.replace(GR,function(r,n,o,i){t.push(o?i.replace(WR,"$1"):n||r)}),t});function OP(e){if(typeof e=="string"||ih(e))return e;var t=e+"";return t=="0"&&1/e==-Z0?"-0":t}function AP(e){if(e!=null){try{return tE.call(e)}catch{}try{return e+""}catch{}}return""}function nh(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(BR);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(nh.Cache||ui),r}nh.Cache=ui;function CP(e,t){return e===t||e!==e&&t!==t}var iE=Array.isArray;function RP(e){var t=oE(e)?rE.call(e):"";return t==DR||t==UR}function oE(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function PP(e){return!!e&&typeof e=="object"}function ih(e){return typeof e=="symbol"||PP(e)&&rE.call(e)==$R}function NP(e){return e==null?"":_P(e)}function IP(e,t,r){var n=e==null?void 0:vP(e,t);return n===void 0?r:n}var LP=IP;const sE=vr(LP),Fe={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const r={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},n=i=>{const a=`logged${e?"In":"Out"}`;return t>=r[i][a]};let o={};return["navigation","search"].forEach(i=>{o[i]=n(i)}),o},shouldChangeHeaderIsVisible:(e,t,r)=>{Object.values(t).filter(o=>o===!0).length||r([{type:"headerIsVisible",value:e}])},handleMenus:({id:e,value:t,menus:r,dispatch:n})=>{if(r[e]===t||e==="account"&&t===!1&&r.navigation===!0)return;const o=Date.now();if(!t&&Fe.handlerCalled[e]&&o-Fe.handlerCalled[e]<500)return;Fe.handlerCalled[e]=o;let i=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(r).forEach(a=>{a===e||r[a]===!1||i.push({type:`menus.${a}`,value:!1})}),n(i)},findFirstChild:(e,t,r=!1)=>{if(!e||!e[0])return!1;for(let n=0;n<=e.length;n++){if(!e[n])continue;if(e[n][t]&&(!r||e[n][t].includes(r)))return e[n];if(!t.includes("."))continue;const o=sE(e[n],t);if(!(typeof o>"u")&&(!r||o[t]&&o[t].includes(r)||o.value&&o.value.includes(r)||o.toString().includes(r)))return e[n]}return e[0].children?Fe.findFirstChild(e[0].children,t,r):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:r,focusElements:n,dispatch:o})=>{if(!t.current||!t.current.children)return;const i=r?"desktop":"default";if(n[e][i]){n[e][i].focus();return}let a,s;switch(e){case"navigation":if(r){const c=Fe.findFirstChild(t.current.children,"attributes.aria-controls","navigation");a=Fe.findFirstChild(c.children,"href")}else a=Fe.findFirstChild(t.current.children,"href");a||(a=t.current);break;case"account":if(s=Fe.findFirstChild(t.current.children,"className","account"),!s||!s.children)return;a=Fe.findFirstChild(s.children,"href");break;default:return}a&&(o([{type:`focusElements.${e}.${i}`,value:a}]),a.focus())},events:{onClick:(e,{id:t,callback:r,isOpen:n})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(Fe.timeouts[t]),r(t,!n))},onFocus:({id:e})=>{clearTimeout(Fe.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(Fe.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{Fe.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},Ns={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"}}}},au=({id:e,isLoggedIn:t=!1,isDesktopVersion:r=!1,menus:n={},callback:o=()=>{},doTrack:i=null})=>{const a=Oe(),s=sE(Ns,e);if(!s||s.onlyShow&&(s.onlyShow==="logged-in"&&!t||s.onlyShow==="logged-out"&&t))return null;const c="doTrack"in s,l=i===null?c?s.doTrack:!0:i,u=e.includes("buttons.");let d=`header_${e.replaceAll(".","_")}`;s.hasVariantText&&(d+=`_logged${t?"In":"Out"}`);let h=!1;if(s.href){let v=s.gtmType||`${e}-click`;if(v.includes(".")){const b=v.split("."),A=b[b.length-2];v=`${A==="topics"?`${A}-`:""}${b[b.length-1]}`}h={href:s.href,role:"menuitem"},l&&(h={...h,className:"gtm-trackable","data-gtm-event-type":v,"data-gtm-event-context":"HeaderButtons"}),u&&(h={...h,variant:"secondary",size:{mobile:"small",881:"large"},...s.props||{}})}const f=s.order&&s.order[0]&&s[s.order[0]],p=f&&s[s.order[0]].order,m=h&&typeof window<"u"&&window.location&&window.location.pathname===s.href;let _={},w={};if(f){const v=s.menuId||e,b={onClick:A=>Fe.events.onClick(A,{id:v,callback:o,isOpen:n[v]}),onFocus:()=>Fe.events.onFocus({id:v}),onBlur:()=>Fe.events.onBlur({id:v,callback:o}),onMouseLeave:()=>Fe.events.onBlur({id:v,callback:o}),onMouseEnter:()=>Fe.events.onMouseEnter({id:v,callback:o})};r&&(p&&(_={...b,onKeyPress:A=>{A.key==="Enter"&&Fe.events.onClick(A,{id:v,callback:o,isOpen:n[v]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":n[v],"aria-controls":v}),w={hidden:v in n?!n[v]:!0}),p||(w={...w,...b})}return x.jsxs("li",{className:ue({[s.className]:s.className,"has-submenu":f,parent:p,active:m}),role:"none",..._,children:[h?$.createElement(u?ze:"a",h,a.formatMessage({id:d})):a.formatMessage({id:d}),s.order&&x.jsx("ul",{...w,children:s.order.map(v=>{if(!s[v])return null;const b={isLoggedIn:t,isDesktopVersion:r,menus:n,callback:o,doTrack:c?l:null};return s[v].order?x.jsxs("li",{className:ue({[s[v].className]:s[v].className}),children:[a.formatMessage({id:`${d}_${v}`}),x.jsx("ul",{children:s[v].order.map(A=>x.jsx(au,{id:`${e}.${v}.${A}`,...b},A))})]},v):x.jsx(au,{id:`${e}.${v}`,...b},v)})})]},e)};const kP={height:67,height_desktop:83},oh=()=>{const e=Oe(),t=$.useContext($r),r=Js(!0,!0),n=t&&typeof t.id=="string",o=$.useMemo(()=>Fe.getIsDesktopVersion(n,r),[n,r]),[i,a]=$.useReducer(Hx,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:s,menus:c,focusElements:l}=i;Xy({scrollPosition:kP[`height${o.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!o&&c.navigation||Fe.shouldChangeHeaderIsVisible(!0,c,a)},scrollDown:()=>{!o&&c.navigation||Fe.shouldChangeHeaderIsVisible(!1,c,a)}}});const u=(h,f)=>{Fe.handleMenus({id:h,value:f,menus:c,dispatch:a})},d=$.useRef(null);return ri(()=>{c.navigation&&Fe.autoFocus({menu:"navigation",navigationRef:d,isDesktopVersion:o.navigation,focusElements:l,dispatch:a})},[c.navigation]),ri(()=>{c.account&&Fe.autoFocus({menu:"account",navigationRef:d,isDesktopVersion:o.navigation,focusElements:l,dispatch:a})},[c.account]),t&&t.isLoading?null:x.jsxs(x.Fragment,{children:[x.jsxs("nav",{id:"header",className:ue({"logged-in":n,"logged-out":!n,visible:s}),children:[x.jsx(lt,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),x.jsx(Zf,{}),!o.navigation&&x.jsx("button",{className:"menu-button gtm-trackable",onClick:h=>{h.preventDefault(),h.stopPropagation(),u("navigation",!c.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":c.navigation,"aria-controls":"navigation",children:x.jsx(lt,{children:e.formatMessage({id:`header_menu_${c.navigation?"hide":"show"}`})})}),x.jsx("ul",{ref:d,id:"navigation",hidden:o.navigation||c.account?!1:!c.navigation,role:"menu","data-showing":!o.navigation&&c.account?"account":"default",children:Ns.order.map(h=>x.jsx(au,{id:h,isLoggedIn:n,isDesktopVersion:o.navigation,menus:{navigation:c.navigation,account:c.account},callback:u},h))}),!o.search&&x.jsx("button",{className:"search toggle-search-button",onClick:h=>{h.preventDefault(),h.stopPropagation(),u("search",!c.search)},"aria-haspopup":"true","aria-expanded":c.search,"aria-controls":"search-form",children:x.jsx(lt,{children:e.formatMessage({id:`header_search_${c.search?"hide":"show"}`})})}),x.jsx(X0,{id:"global-search",handleToggle:{searchIsOpen:c.search,isDesktopVersion:o.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),n?x.jsxs("button",{className:"account-button",onClick:h=>Fe.events.onClick(h,{id:"account",callback:u,isOpen:c.account}),onMouseEnter:()=>Fe.events.onMouseEnter({id:"account",callback:u}),onMouseLeave:()=>Fe.events.onBlur({id:"account",callback:u}),"aria-haspopup":"true","aria-expanded":c.account,"aria-controls":"navigation",children:[x.jsx(lt,{children:e.formatMessage({id:`header_account_${c.account?"hide":"show"}`})}),x.jsx(_u,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):x.jsx("ul",{className:"sign-in-buttons",children:Ns.buttons.order.map(h=>x.jsx(au,{id:`buttons.${h}`},h))})]}),x.jsx("hr",{id:"content-of-page"}),x.jsx("div",{className:ue("overlay",{open:c.navigation||c.account||!o.search&&c.search})})]})},MP=$.createContext(null),vl={didCatch:!1,error:null};class FP extends $.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 r,n,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];(r=(n=this.props).onReset)===null||r===void 0||r.call(n,{args:i,reason:"imperative-api"}),this.setState(vl)}}componentDidCatch(t,r){var n,o;(n=(o=this.props).onError)===null||n===void 0||n.call(o,t,r)}componentDidUpdate(t,r){const{didCatch:n}=this.state,{resetKeys:o}=this.props;if(n&&r.error!==null&&BP(t.resetKeys,o)){var i,a;(i=(a=this.props).onReset)===null||i===void 0||i.call(a,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(vl)}}render(){const{children:t,fallbackRender:r,FallbackComponent:n,fallback:o}=this.props,{didCatch:i,error:a}=this.state;let s=t;if(i){const c={error:a,resetErrorBoundary:this.resetErrorBoundary};if($.isValidElement(o))s=o;else if(typeof r=="function")s=r(c);else if(n)s=$.createElement(n,c);else throw a}return $.createElement(MP.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},s)}}function BP(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((r,n)=>!Object.is(r,t[n]))}const DP=()=>{const e=Oe();return x.jsxs(x.Fragment,{children:[x.jsx(oh,{}),x.jsx("div",{className:"content",children:x.jsx(ra,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),x.jsx(eh,{})]})},UP=({children:e,reportError:t,showFooter:r=!0,background:n="default",className:o="",locale:i="en"})=>{const a=uv(e,{locale:i});return x.jsx(FP,{onError:t,fallback:x.jsx(DP,{}),children:x.jsx($.Suspense,{fallback:x.jsx(d0,{layout:"overview-page"}),children:x.jsx("div",{id:"wrapper",className:ue(o,{[n]:n!=="default"}),children:x.jsxs(ME,{children:[x.jsx(oh,{}),x.jsx("div",{className:"content",children:a}),r&&x.jsx(eh,{}),x.jsx(z0,{})]})})})})},Im={default:"tags_",headerTopics:"header_topics_topics_"},El={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"},$P={getTagDetails:e=>{if(e.includes("topic_")){if(e=El.topic[e.replace("topic_","")],e){const t=Ns.topics.topics[e].href;return t?{id:e,href:t,text:`${Im.headerTopics}${e}`}:null}return null}return El[e]?(e=El[e],{id:e,text:`${Im.default}${e}`}):null}};const jP=({tags:e=[],color:t="default",forceOneLine:r=!1,canHaveLinks:n=!0,className:o="",gtmType:i="tag-click",gtmContext:a="tags"})=>{const s=Oe();if(!e||e.length<1)return null;const c=[];return e.forEach(l=>{if(!l)return;const u=$P.getTagDetails(l);u&&c.push(u)}),c.length<1?null:x.jsx("ul",{className:ue("tags text-small",t,o,{"one-line":r}),children:c.map(l=>{const u=s.formatMessage({id:l.text});return x.jsx("li",{children:l.href&&n?x.jsx("a",{href:l.href,className:"gtm-trackable","data-gtm-event-type":i,"data-gtm-event-context":a,children:u}):u},l.id)})})};const HP=({members:{total:e,data:t=[]},pagination:r,gtmContext:n="member",gtmType:o="member-click",className:i=""})=>{const a=Oe();return t.length===0?null:(e||(e=t.length),x.jsxs("div",{className:ue("members-list",i),children:[x.jsxs("h1",{children:[a.formatMessage({id:"membersList"}),x.jsx("span",{className:"count",children:e})]}),x.jsx("ul",{children:t.map((s,c)=>x.jsxs("li",{children:[x.jsx(bu,{member:s,gtmContext:n,gtmType:o}),s.isAdmin&&x.jsx(l0,{children:a.formatMessage({id:"membersList_admin"})})]},c))}),r&&x.jsx(V0,{...r,icon:{icon:"arrow-down",position:"right"},gtmContext:n})]}))};function gf(){return gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gf.apply(this,arguments)}function qP(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var GP=$.useLayoutEffect,VP=function(t){var r=pe.useRef(t);return GP(function(){r.current=t}),r},Lm=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},WP=function(t,r){var n=$.useRef();return $.useCallback(function(o){t.current=o,n.current&&Lm(n.current,null),n.current=r,r&&Lm(r,o)},[r])},km={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},zP=function(t){Object.keys(km).forEach(function(r){t.style.setProperty(r,km[r],"important")})},Mm=zP,vt=null,Fm=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function QP(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),vt||(vt=document.createElement("textarea"),vt.setAttribute("tabindex","-1"),vt.setAttribute("aria-hidden","true"),Mm(vt)),vt.parentNode===null&&document.body.appendChild(vt);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(h){var f=h;vt.style[f]=a[f]}),Mm(vt),vt.value=t;var c=Fm(vt,e);vt.value=t,c=Fm(vt,e),vt.value="x";var l=vt.scrollHeight-o,u=l*r;s==="border-box"&&(u=u+o+i),c=Math.max(u,c);var d=l*n;return s==="border-box"&&(d=d+o+i),c=Math.min(d,c),[c,l]}var Bm=function(){},YP=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},KP=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],XP=!!document.documentElement.currentStyle,JP=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=YP(KP,r),o=n.boxSizing;if(o==="")return null;XP&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var i=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:i,borderSize:a}},ZP=JP;function aE(e,t,r){var n=VP(r);pe.useLayoutEffect(function(){var o=function(a){return n.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var eN=function(t){aE(window,"resize",t)},tN=function(t){aE(document.fonts,"loadingdone",t)},rN=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],nN=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?Bm:a,c=t.onHeightChange,l=c===void 0?Bm:c,u=qP(t,rN),d=u.value!==void 0,h=pe.useRef(null),f=WP(h,r),p=pe.useRef(0),m=pe.useRef(),_=function(){var b=h.current,A=n&&m.current?m.current:ZP(b);if(A){m.current=A;var S=QP(A,b.value||b.placeholder||"x",i,o),P=S[0],R=S[1];p.current!==P&&(p.current=P,b.style.setProperty("height",P+"px","important"),l(P,{rowHeight:R}))}},w=function(b){d||_(),s(b)};return pe.useLayoutEffect(_),eN(_),tN(_),pe.createElement("textarea",gf({},u,{onChange:w,ref:f}))},iN=pe.forwardRef(nN);let ka=null;const It="discussion_form_",uu=({content:e={type:"response",slugs:{}},meta:t={isLoading:!1,isInWrapper:!1,isEditing:!1,showTitle:!1},inputRef:r,maxLength:n=5e4,minRows:o=4,forceShow:i={cancel:!1,error:!1},functions:a={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:s="DiscussionForm"})=>{var L,k;const c=Oe(),l=$.useContext($r),[u,d]=$.useState(t.isEditing&&t.isEditing.text||""),[h,f]=$.useState(i.error||!1),[p,m]=$.useState(!1),_=$.useRef(null);if(r||(r=_),t.isLoading)return x.jsx(gr,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const w=q=>{const G=q.target.value;d(G);let H;!l||!l.id?H=Lr(c.formatMessage,`${It}error_loggedOut`,e.type,"action"):G.length>=n&&(H=`${It}error_tooLong`),H?f(H):h&&f(!1)};let v=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const q=e.type==="response"?((L=e.slugs)==null?void 0:L.question)||"":((k=e.slugs)==null?void 0:k.answer)||"";q&&(v=`${v}-${q.slice(-15)}`)}const b=async q=>{var H;if(q.preventDefault(),q.stopPropagation(),S)return;ka&&clearTimeout(ka),m("submitting");const G=window.location.pathname;try{let Y;switch(e.type){case"post":Y=await a.create({content:u});break;case"question":Y=await a.create({title:u,authorId:l&&l.id,...(H=a.props)==null?void 0:H.create});break;case"response":Y=await a.create({question:e.slugs.question},{body:u,authorId:l&&l.id,contentPath:G});break;case"reply":Y=await a.create({question:e.slugs.question,answer:e.slugs.answer},{body:u,authorId:l&&l.id,contentPath:G});break;default:break}await Vx(1e3),a.callback&&await a.callback(Y),ka=setTimeout(()=>{d(""),m("submitted"),A()},500)}catch(Y){const ie=Y;let K=`${It}error`;ie.message.includes("entry already exists")&&(K=Lr(c.formatMessage,`${It}error_alreadyExists`,e.type,"action")),ie.message.includes("429")?K=Lr(c.formatMessage,`${It}error_tooMany`,e.type,"action"):ie.message.includes("400")&&(K=`${It}error`),f(K),A()}},A=()=>{ka=setTimeout(()=>{f(!1),m(!1)},5e3)},S=!u||!Yx(u),P=p==="submitting",R=[];return(t.isEditing&&!P||i.cancel)&&R.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:a.handleCancel,className:"gtm-trackable","data-gtm-event-context":s,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!i.cancel&&(!l||!l.id||!u),children:c.formatMessage({id:`${It}cancel`})}),R.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:q=>{if(t.isEditing){m("submitting"),a.handleSaveEdit&&a.handleSaveEdit(_.current&&"value"in _.current?_.current.value:"");return}b(q)},className:"gtm-trackable","data-gtm-event-context":s,"data-gtm-event-type":`${t.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!l||!l.id||S||P||t.isEditing&&u===t.isEditing.text,children:c.formatMessage({id:`${It}${P?t.isEditing?"saving":"posting":t.isEditing?"save":"post"}`})}),x.jsxs("form",{id:v,className:ue("discussion-card discussion-form",{"no-styling":t.isInWrapper&&t.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[(t==null?void 0:t.showTitle)&&!t.isEditing&&["question"].includes(e.type)&&x.jsx("h2",{children:Lr(c.formatMessage,`${It}title`,e.type,"action")}),x.jsx(bu,{member:l||"community",gtmContext:s,gtmType:"profile-click"}),x.jsx(lt,{element:"label",showOnFocus:!1,htmlFor:`${v}-input`,children:Lr(c.formatMessage,`${It}label`,e.type,"action")}),x.jsx(iN,{ref:r,id:`${v}-input`,name:e.type,placeholder:Lr(c.formatMessage,`${It}placeholder`,e.type,"action"),onChange:w,value:u,maxLength:n,"aria-invalid":!!h,"aria-errormessage":"error-message",minRows:o,autoFocus:!!t.isEditing}),x.jsx("small",{children:Lr(c.formatMessage,`${It}explainer`,e.type,"action",{a:q=>x.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",className:"gtm-trackable","data-gtm-event-context":s,"data-gtm-event-type":"community-guidelines-link",children:q})})}),x.jsx(Zs,{buttons:R}),p==="submitted"&&x.jsx(Ka,{className:"success","data-testid":"success",children:Lr(c.formatMessage,`${It}success`,e.type,"action")}),h&&x.jsx(Ka,{id:"error-message",className:"error","data-testid":"error",children:i.error?i.error:typeof h=="string"?h.includes(" ")?h:c.formatMessage({id:h},{action:c.formatMessage({id:`discussion_action_${e.type}`}),maxLength:n}):h})]})},sh=({contentType:e,createPost:t,membershipRequiredToPost:{isMember:r,required:n,join:o,leave:i,notMemberStateText:a}})=>n?r?x.jsx(uu,{content:{type:e,slugs:{}},functions:{create:t}}):x.jsx(ra,{text:a,button:{component:x.jsx(Jf,{functions:{join:o,leave:i}})}}):x.jsx(uu,{content:{type:e,slugs:{}},functions:{create:t}}),oN={showThread:!1,showForm:!1},ah=$.createContext(oN),sN=({children:e})=>{const[t,r]=$.useState({showThread:!1,showForm:!1});return x.jsx(ah.Provider,{value:{...t,updateConversation:r},children:e})},aN=({question:e,answer:t,reply:r})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...r&&{replySlug:r}}),uN=(e,t=10)=>!e||e.length===0?[]:e.reverse().slice(0,t);let ws=!1;const _l=()=>{ws!==!1&&(clearTimeout(ws),ws=!1)},uE=({element:e="div",likes:t=0,peopleWhoLiked:r=!1,isShort:n=!0,userLiked:o=!1,content:i={type:"reply",slugs:{}},canLike:a=!0,functions:{createLike:s=()=>{},deleteLike:c=()=>{}}={}})=>{const l=Oe();$.useEffect(()=>{f(o)},[o]);const[u,d]=$.useState(t),[h,f]=$.useState(o),[p,m]=$.useState(!1),[_,w]=$.useState(!1),v=$.useMemo(()=>uN(r),[r]),b=window.location.pathname,A=P=>{if(P.preventDefault(),P.stopPropagation(),w(!1),ws)return _l(),!1;if(_l(),p||!a)return!1;ws=setTimeout(S,350)},S=async()=>{if(_l(),p||!a)return!1;let P=h?u-1:u+1;P<0&&(P=0),m(!0),d(P),f(!h);try{if(i&&i.slugs){const R=aN(i.slugs);h?await c(R):await s(R,{contentPath:b})}}catch{d(t),f(o)}finally{m(!1)}};return $.createElement(e,{className:ue("likes-wrapper text-medium action-button",{"show-spinner":p,"is-liked":h,disabled:!a}),onClick:A,onMouseEnter:()=>{w(!0)},onMouseLeave:()=>{w(!1)},onFocus:()=>{w(!0)},onBlur:()=>{w(!1)},children:x.jsxs(x.Fragment,{children:[x.jsx(ze,{variant:"tertiary",size:"medium",icon:{icon:h?"heart":"heart_empty",animate:"bounce"},className:ue({"do-animation":h&&!o}),screenreaderText:a?l.formatMessage({id:`discussion_${i.type}_likes_${h?"unlike":"like"}`}):!1,onClick:A,disabled:!a,"aria-hidden":!a,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${i.type}-click`}),x.jsx("span",{className:"number-of-likes","data-testid":"number-of-likes",children:l.formatMessage({id:`discussion_likes${n?"_short":""}`},{number:u})}),r&&x.jsx($v,{isOpen:_,isLoading:r.length===0,children:r.length&&x.jsx("ul",{children:v.map(P=>typeof P=="string"||!P.name?null:x.jsx("li",{children:P.name},P.id||window.btoa(P.name)))})})]})})};var cu={exports:{}};cu.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",o=1,i=2,a=9007199254740991,s="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",m="[object Map]",_="[object Number]",w="[object Null]",v="[object Object]",b="[object Promise]",A="[object Proxy]",S="[object RegExp]",P="[object Set]",R="[object String]",L="[object Symbol]",k="[object Undefined]",q="[object WeakMap]",G="[object ArrayBuffer]",H="[object DataView]",Y="[object Float32Array]",ie="[object Float64Array]",K="[object Int8Array]",D="[object Int16Array]",Q="[object Int32Array]",ee="[object Uint8Array]",he="[object Uint8ClampedArray]",J="[object Uint16Array]",X="[object Uint32Array]",se=/[\\^$.*+?()[\]{}|]/g,fe=/^\[object .+?Constructor\]$/,He=/^(?:0|[1-9]\d*)$/,te={};te[Y]=te[ie]=te[K]=te[D]=te[Q]=te[ee]=te[he]=te[J]=te[X]=!0,te[s]=te[c]=te[G]=te[u]=te[H]=te[d]=te[h]=te[f]=te[m]=te[_]=te[v]=te[S]=te[P]=te[R]=te[q]=!1;var ae=typeof de=="object"&&de&&de.Object===Object&&de,Be=typeof self=="object"&&self&&self.Object===Object&&self,Ie=ae||Be||Function("return this")(),Tt=t&&!t.nodeType&&t,At=Tt&&!0&&e&&!e.nodeType&&e,Gt=At&&At.exports===Tt,oe=Gt&&ae.process,st=function(){try{return oe&&oe.binding&&oe.binding("util")}catch{}}(),Je=st&&st.isTypedArray;function Vt(y,O){for(var I=-1,W=y==null?0:y.length,ge=0,le=[];++I<W;){var _e=y[I];O(_e,I,y)&&(le[ge++]=_e)}return le}function br(y,O){for(var I=-1,W=O.length,ge=y.length;++I<W;)y[ge+I]=O[I];return y}function er(y,O){for(var I=-1,W=y==null?0:y.length;++I<W;)if(O(y[I],I,y))return!0;return!1}function kt(y,O){for(var I=-1,W=Array(y);++I<y;)W[I]=O(I);return W}function yn(y){return function(O){return y(O)}}function Wt(y,O){return y.has(O)}function Mt(y,O){return y==null?void 0:y[O]}function Ze(y){var O=-1,I=Array(y.size);return y.forEach(function(W,ge){I[++O]=[ge,W]}),I}function zt(y,O){return function(I){return y(O(I))}}function yt(y){var O=-1,I=Array(y.size);return y.forEach(function(W){I[++O]=W}),I}var at=Array.prototype,vn=Function.prototype,T=Object.prototype,g=Ie["__core-js_shared__"],E=vn.toString,C=T.hasOwnProperty,M=function(){var y=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),j=T.toString,z=RegExp("^"+E.call(C).replace(se,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me=Gt?Ie.Buffer:void 0,Ce=Ie.Symbol,Re=Ie.Uint8Array,Pe=T.propertyIsEnumerable,Ee=at.splice,Ct=Ce?Ce.toStringTag:void 0,Hr=Object.getOwnPropertySymbols,En=me?me.isBuffer:void 0,wr=zt(Object.keys,Object),_n=Yt(Ie,"DataView"),Sr=Yt(Ie,"Map"),bn=Yt(Ie,"Promise"),wn=Yt(Ie,"Set"),Sn=Yt(Ie,"WeakMap"),tr=Yt(Object,"create"),ci=ut(_n),Qt=ut(Sr),go=ut(bn),yo=ut(wn),vo=ut(Sn),li=Ce?Ce.prototype:void 0,Tn=li?li.valueOf:void 0;function We(y){var O=-1,I=y==null?0:y.length;for(this.clear();++O<I;){var W=y[O];this.set(W[0],W[1])}}function xn(){this.__data__=tr?tr(null):{},this.size=0}function On(y){var O=this.has(y)&&delete this.__data__[y];return this.size-=O?1:0,O}function Tr(y){var O=this.__data__;if(tr){var I=O[y];return I===n?void 0:I}return C.call(O,y)?O[y]:void 0}function fi(y){var O=this.__data__;return tr?O[y]!==void 0:C.call(O,y)}function Eo(y,O){var I=this.__data__;return this.size+=this.has(y)?0:1,I[y]=tr&&O===void 0?n:O,this}We.prototype.clear=xn,We.prototype.delete=On,We.prototype.get=Tr,We.prototype.has=fi,We.prototype.set=Eo;function et(y){var O=-1,I=y==null?0:y.length;for(this.clear();++O<I;){var W=y[O];this.set(W[0],W[1])}}function _o(){this.__data__=[],this.size=0}function bo(y){var O=this.__data__,I=Vr(O,y);if(I<0)return!1;var W=O.length-1;return I==W?O.pop():Ee.call(O,I,1),--this.size,!0}function wo(y){var O=this.__data__,I=Vr(O,y);return I<0?void 0:O[I][1]}function So(y){return Vr(this.__data__,y)>-1}function An(y,O){var I=this.__data__,W=Vr(I,y);return W<0?(++this.size,I.push([y,O])):I[W][1]=O,this}et.prototype.clear=_o,et.prototype.delete=bo,et.prototype.get=wo,et.prototype.has=So,et.prototype.set=An;function ht(y){var O=-1,I=y==null?0:y.length;for(this.clear();++O<I;){var W=y[O];this.set(W[0],W[1])}}function To(){this.size=0,this.__data__={hash:new We,map:new(Sr||et),string:new We}}function xo(y){var O=Rt(this,y).delete(y);return this.size-=O?1:0,O}function Oo(y){return Rt(this,y).get(y)}function Ao(y){return Rt(this,y).has(y)}function Co(y,O){var I=Rt(this,y),W=I.size;return I.set(y,O),this.size+=I.size==W?0:1,this}ht.prototype.clear=To,ht.prototype.delete=xo,ht.prototype.get=Oo,ht.prototype.has=Ao,ht.prototype.set=Co;function qr(y){var O=-1,I=y==null?0:y.length;for(this.__data__=new ht;++O<I;)this.add(y[O])}function hi(y){return this.__data__.set(y,n),this}function Gr(y){return this.__data__.has(y)}qr.prototype.add=qr.prototype.push=hi,qr.prototype.has=Gr;function xt(y){var O=this.__data__=new et(y);this.size=O.size}function Cn(){this.__data__=new et,this.size=0}function Ro(y){var O=this.__data__,I=O.delete(y);return this.size=O.size,I}function Po(y){return this.__data__.get(y)}function No(y){return this.__data__.has(y)}function Io(y,O){var I=this.__data__;if(I instanceof et){var W=I.__data__;if(!Sr||W.length<r-1)return W.push([y,O]),this.size=++I.size,this;I=this.__data__=new ht(W)}return I.set(y,O),this.size=I.size,this}xt.prototype.clear=Cn,xt.prototype.delete=Ro,xt.prototype.get=Po,xt.prototype.has=No,xt.prototype.set=Io;function Lo(y,O){var I=Wr(y),W=!I&&vi(y),ge=!I&&!W&&Qr(y),le=!I&&!W&&!ge&&Ln(y),_e=I||W||ge||le,be=_e?kt(y.length,String):[],qe=be.length;for(var Ae in y)(O||C.call(y,Ae))&&!(_e&&(Ae=="length"||ge&&(Ae=="offset"||Ae=="parent")||le&&(Ae=="buffer"||Ae=="byteLength"||Ae=="byteOffset")||rr(Ae,qe)))&&be.push(Ae);return be}function Vr(y,O){for(var I=y.length;I--;)if(yi(y[I][0],O))return I;return-1}function Rn(y,O,I){var W=O(y);return Wr(y)?W:br(W,I(y))}function xr(y){return y==null?y===void 0?k:w:Ct&&Ct in Object(y)?Kt(y):gi(y)}function di(y){return Ft(y)&&xr(y)==s}function pi(y,O,I,W,ge){return y===O?!0:y==null||O==null||!Ft(y)&&!Ft(O)?y!==y&&O!==O:mi(y,O,I,W,pi,ge)}function mi(y,O,I,W,ge,le){var _e=Wr(y),be=Wr(O),qe=_e?c:Pt(y),Ae=be?c:Pt(O);qe=qe==s?v:qe,Ae=Ae==s?v:Ae;var tt=qe==v,ct=Ae==v,Ve=qe==Ae;if(Ve&&Qr(y)){if(!Qr(O))return!1;_e=!0,tt=!1}if(Ve&&!tt)return le||(le=new xt),_e||Ln(y)?Pn(y,O,I,W,ge,le):Bo(y,O,qe,I,W,ge,le);if(!(I&o)){var rt=tt&&C.call(y,"__wrapped__"),Qe=ct&&C.call(O,"__wrapped__");if(rt||Qe){var nr=rt?y.value():y,Xt=Qe?O.value():O;return le||(le=new xt),ge(nr,Xt,I,W,le)}}return Ve?(le||(le=new xt),Nn(y,O,I,W,ge,le)):!1}function ko(y){if(!_i(y)||$o(y))return!1;var O=Ei(y)?z:fe;return O.test(ut(y))}function Mo(y){return Ft(y)&&In(y.length)&&!!te[xr(y)]}function Fo(y){if(!jo(y))return wr(y);var O=[];for(var I in Object(y))C.call(y,I)&&I!="constructor"&&O.push(I);return O}function Pn(y,O,I,W,ge,le){var _e=I&o,be=y.length,qe=O.length;if(be!=qe&&!(_e&&qe>be))return!1;var Ae=le.get(y);if(Ae&&le.get(O))return Ae==O;var tt=-1,ct=!0,Ve=I&i?new qr:void 0;for(le.set(y,O),le.set(O,y);++tt<be;){var rt=y[tt],Qe=O[tt];if(W)var nr=_e?W(Qe,rt,tt,O,y,le):W(rt,Qe,tt,y,O,le);if(nr!==void 0){if(nr)continue;ct=!1;break}if(Ve){if(!er(O,function(Xt,Ar){if(!Wt(Ve,Ar)&&(rt===Xt||ge(rt,Xt,I,W,le)))return Ve.push(Ar)})){ct=!1;break}}else if(!(rt===Qe||ge(rt,Qe,I,W,le))){ct=!1;break}}return le.delete(y),le.delete(O),ct}function Bo(y,O,I,W,ge,le,_e){switch(I){case H:if(y.byteLength!=O.byteLength||y.byteOffset!=O.byteOffset)return!1;y=y.buffer,O=O.buffer;case G:return!(y.byteLength!=O.byteLength||!le(new Re(y),new Re(O)));case u:case d:case _:return yi(+y,+O);case h:return y.name==O.name&&y.message==O.message;case S:case R:return y==O+"";case m:var be=Ze;case P:var qe=W&o;if(be||(be=yt),y.size!=O.size&&!qe)return!1;var Ae=_e.get(y);if(Ae)return Ae==O;W|=i,_e.set(y,O);var tt=Pn(be(y),be(O),W,ge,le,_e);return _e.delete(y),tt;case L:if(Tn)return Tn.call(y)==Tn.call(O)}return!1}function Nn(y,O,I,W,ge,le){var _e=I&o,be=Or(y),qe=be.length,Ae=Or(O),tt=Ae.length;if(qe!=tt&&!_e)return!1;for(var ct=qe;ct--;){var Ve=be[ct];if(!(_e?Ve in O:C.call(O,Ve)))return!1}var rt=le.get(y);if(rt&&le.get(O))return rt==O;var Qe=!0;le.set(y,O),le.set(O,y);for(var nr=_e;++ct<qe;){Ve=be[ct];var Xt=y[Ve],Ar=O[Ve];if(W)var na=_e?W(Ar,Xt,Ve,O,y,le):W(Xt,Ar,Ve,y,O,le);if(!(na===void 0?Xt===Ar||ge(Xt,Ar,I,W,le):na)){Qe=!1;break}nr||(nr=Ve=="constructor")}if(Qe&&!nr){var ir=y.constructor,Yr=O.constructor;ir!=Yr&&"constructor"in y&&"constructor"in O&&!(typeof ir=="function"&&ir instanceof ir&&typeof Yr=="function"&&Yr instanceof Yr)&&(Qe=!1)}return le.delete(y),le.delete(O),Qe}function Or(y){return Rn(y,bi,Do)}function Rt(y,O){var I=y.__data__;return Uo(O)?I[typeof O=="string"?"string":"hash"]:I.map}function Yt(y,O){var I=Mt(y,O);return ko(I)?I:void 0}function Kt(y){var O=C.call(y,Ct),I=y[Ct];try{y[Ct]=void 0;var W=!0}catch{}var ge=j.call(y);return W&&(O?y[Ct]=I:delete y[Ct]),ge}var Do=Hr?function(y){return y==null?[]:(y=Object(y),Vt(Hr(y),function(O){return Pe.call(y,O)}))}:wi,Pt=xr;(_n&&Pt(new _n(new ArrayBuffer(1)))!=H||Sr&&Pt(new Sr)!=m||bn&&Pt(bn.resolve())!=b||wn&&Pt(new wn)!=P||Sn&&Pt(new Sn)!=q)&&(Pt=function(y){var O=xr(y),I=O==v?y.constructor:void 0,W=I?ut(I):"";if(W)switch(W){case ci:return H;case Qt:return m;case go:return b;case yo:return P;case vo:return q}return O});function rr(y,O){return O=O??a,!!O&&(typeof y=="number"||He.test(y))&&y>-1&&y%1==0&&y<O}function Uo(y){var O=typeof y;return O=="string"||O=="number"||O=="symbol"||O=="boolean"?y!=="__proto__":y===null}function $o(y){return!!M&&M in y}function jo(y){var O=y&&y.constructor,I=typeof O=="function"&&O.prototype||T;return y===I}function gi(y){return j.call(y)}function ut(y){if(y!=null){try{return E.call(y)}catch{}try{return y+""}catch{}}return""}function yi(y,O){return y===O||y!==y&&O!==O}var vi=di(function(){return arguments}())?di:function(y){return Ft(y)&&C.call(y,"callee")&&!Pe.call(y,"callee")},Wr=Array.isArray;function zr(y){return y!=null&&In(y.length)&&!Ei(y)}var Qr=En||qo;function Ho(y,O){return pi(y,O)}function Ei(y){if(!_i(y))return!1;var O=xr(y);return O==f||O==p||O==l||O==A}function In(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=a}function _i(y){var O=typeof y;return y!=null&&(O=="object"||O=="function")}function Ft(y){return y!=null&&typeof y=="object"}var Ln=Je?yn(Je):Mo;function bi(y){return zr(y)?Lo(y):Fo(y)}function wi(){return[]}function qo(){return!1}e.exports=Ho})(cu,cu.exports);var cN=cu.exports;const lN=vr(cN);const cE=({element:e="section",children:t,className:r,...n})=>$.createElement(e,{className:ue("modal",r),children:typeof t=="string"?x.jsx("p",{children:t}):t,...n});const lE=({id:e="content-overlay",isOpen:t=!1,maxWidth:r,functions:{onOpen:n=()=>{},onClose:o=()=>{}}={},forceShow:{error:i=!1}={},title:a,children:s,buttons:c,className:l="",gtmContext:u="Modal"})=>{const d=Oe(),[h,f]=$.useState(t),p=_=>{f(_),_?(n(),document.body.classList.add("has-overlay")):(o(),document.body.classList.remove("has-overlay"))};$.useEffect(()=>{p(t)},[t]);const m=r?{"--max-width":`${r/16}rem`}:{};return x.jsx("div",{className:ue("overlay",{open:h}),children:x.jsx(cE,{id:e,className:ue("overlay-modal",l,{"has-max-width":r}),hidden:!h,style:m,children:t&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"top",children:[x.jsx("h2",{children:a}),x.jsx(ze,{variant:"tertiary",size:"medium",icon:{icon:"close"},onClick:()=>p(!1),className:"gtm-trackable","data-gtm-event-type":"close-modal-click","data-gtm-event-context":u,screenreaderText:d.formatMessage({id:"overlay_button"})})]}),x.jsx(Qa,{}),s,c&&x.jsxs("div",{className:"bottom",children:[x.jsx(Qa,{}),x.jsx(Zs,{buttons:c})]}),i&&x.jsx(Ka,{className:"error",children:i})]})})})},fE=(e,t)=>({"aria-haspopup":!0,"aria-expanded":t,"aria-controls":e}),Dm=e=>{const t={};return Object.keys(e).forEach(r=>{t[`${r}Slug`]=e[r]}),t};const Ir="discussion_",Cu=({element:e="div",content:t,isLoading:r=!1,originalAuthorId:n,functions:{content:{createContent:o,deleteContent:i,updateContent:a}={createContent:()=>{},deleteContent:()=>{},updateContent:()=>{}},likes:{createLike:s,deleteLike:c}={createLike:()=>{},deleteLike:()=>{}},comments:{openComments:l}={openComments:()=>{}}},links:u={},className:d,gtmContext:h="DiscussionAnswer",locale:f="en",children:p})=>{const m=Oe(),_=$.useContext($r),w=$.useContext(ah),[v,b]=$.useState({body:t&&t.body||"",isEditing:!1,didEdit:t&&t.isEdited||!1}),[A,S]=$.useState(!1),[P,R]=$.useState("");if($.useEffect(()=>{b({...v,body:t&&t.body||"",didEdit:t&&t.isEdited||!1})},[t.isEdited]),r||!t||t.type==="answer"&&(!t.slugs||!t.slugs.question))return x.jsx(gr,{className:"discussion-card discussion-post"});const{author:L,canLike:k,createdAt:q,id:G,likes:H=0,userLiked:Y,comments:ie=0}=t,K=_&&_.id&&typeof L!="string"&&L.id&&L.id===_.id||!1,D=typeof k=="boolean"?k:!K,Q=async X=>{X||(X=""),R("");try{if(!lN(X,v.body)){const se=t.type==="question"?{title:X}:{body:X};await a(Dm(t.slugs),se)}b({body:X,isEditing:!1,didEdit:!0})}catch{R(`${Ir}form_error`)}},ee=()=>{w&&w.updateConversation&&w.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const se=`reply-form-${(t.type==="answer"?t.slug:t.slugs.answer||"").toLowerCase().slice(-15)}`,fe=document.getElementById(se),He=document.getElementById(`${se}-input`);He&&He.focus(),fe&&fe.scrollIntoView({behavior:"smooth"})},0)},he=()=>{try{i(Dm(t.slugs))}catch{R("delete-error")}},J=[{text:m.formatMessage({id:`${Ir}moreMenu_report`}),href:`mailto:community@apolitical.co?subject=${encodeURI(m.formatMessage({id:`${Ir}report_subject`}))}&body=${encodeURI(m.formatMessage({id:`${Ir}report_body`},{contentType:t.type||"",contentSlug:t.slug||"",contentUrl:`${window.origin}${typeof process<"u"&&process.env.PUBLIC_URL||""}/${t.slugs.question||""}`}))}`,icon:"flag"}];return K&&J.push({text:m.formatMessage({id:`${Ir}moreMenu_edit`}),onClick:()=>b({...v,isEditing:!0}),icon:"pencil-paper",className:"gtm-trackable","data-gtm-event-context":h,"data-gtm-event-type":`edit-${t.type}-click`},{text:m.formatMessage({id:`${Ir}moreMenu_delete`}),onClick:X=>{X.preventDefault(),X.stopPropagation(),S(!0)},icon:"trash",className:"gtm-trackable","data-gtm-event-context":h,"data-gtm-event-type":`delete-${t.type}-click`,...fE(`delete-${t.slug}-modal`,A)}),$.createElement(e,{className:ue("discussion-post",d),"data-testid":`discussion-${t.type}-thread`,children:x.jsxs(x.Fragment,{children:[x.jsxs("div",{id:G||t.slug,className:ue("discussion-card",t.type,{editing:v.isEditing,"has-link":u.post&&!v.isEditing}),onClick:X=>{!u.post||v.isEditing||(X.preventDefault(),X.stopPropagation(),window.location.href=u.post)},children:[!v.isEditing&&x.jsx(bu,{member:L,additionalContent:{createdAt:q,didEdit:v.didEdit},className:typeof L!="string"&&L.id===n?"highlighted":"",gtmContext:h,gtmType:"profile-click"}),v.isEditing?x.jsx(uu,{content:{type:t.type,slugs:t.slugs},meta:{isLoading:r,isInWrapper:!0,isEditing:{text:v.body}},maxLength:t.type==="question"?250:5e4,forceShow:{error:P!==""&&P!=="delete-error"?m.formatMessage({id:P},{action:m.formatMessage({id:`discussion_action_${t.type}`})}):!1},functions:{create:o,handleSaveEdit:Q,handleCancel:()=>{R(""),b({...v,isEditing:!1})}},gtmContext:`${h}Form`}):u.post?x.jsx("a",{href:u.post,className:"gtm-trackable","data-gtm-event-context":h,"data-gtm-event-type":"title-click",children:x.jsx(Kl,{options:{overrides:{a:null}},children:v.body})}):x.jsx(Kl,{options:{wrapper:t.type==="question"?"h1":$.Fragment,forceWrapper:t.type==="question",forceInline:t.type==="question",forceBlock:t.type!=="question"},children:v.body}),!v.isEditing&&x.jsxs("ul",{className:ue("actions text-medium",t.type),"data-testid":`${t.type}-actions`,children:[x.jsx(uE,{element:"li",likes:H,isShort:!1,userLiked:Y,content:{type:t.type,slugs:t.slugs},canLike:D,functions:{createLike:s,deleteLike:c}}),["question","post"].includes(t.type)||u.comments||typeof l=="function"&&x.jsxs("li",{className:"action-button",onClick:X=>{X.preventDefault(),X.stopPropagation(),u.comments&&(window.location.href=u.comments),typeof l=="function"&&l()},children:[x.jsx(ze,{variant:"tertiary",size:"medium",styling:{muted:!0},icon:{icon:"speech-bubble_square_thick"},href:u.comments?u.comments:!1,onClick:u.comments||typeof l!="function"?!1:l,className:"gtm-trackable","data-gtm-event-context":h,"data-gtm-event-type":`answer-${t.type}-click`,screenreaderText:m.formatMessage({id:`${Ir}comments_screenReader`},{count:ie})}),x.jsx("span",{children:m.formatMessage({id:`${Ir}comments`},{count:ie})})]}),(t.type==="answer"||t.type==="reply")&&x.jsx("li",{children:x.jsx(ze,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:ee,children:m.formatMessage({id:`${Ir}reply`})})}),x.jsx(W0,{element:"li",id:`more-${t.slug}`,options:J})]})]}),p,x.jsx(lE,{id:`delete-${t.slug}-modal`,isOpen:A,functions:{onOpen:()=>{},onClose:()=>S(!1)},forceShow:{error:P==="delete-error"?m.formatMessage({id:"discussion_delete_error"},{action:m.formatMessage({id:`discussion_action_${t.type}`})}):!1},title:m.formatMessage({id:"discussion_delete_title"},{action:m.formatMessage({id:`discussion_action_${t.type}`})}),buttons:[{variant:"secondary",onClick:()=>S(!1),children:m.formatMessage({id:"discussion_delete_cancel"})},{variant:"primary",className:"destructive",onClick:he,children:m.formatMessage({id:"discussion_delete_delete"})}],gtmContext:`${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,children:x.jsx(ln,{id:"discussion_delete_text",values:{p:X=>x.jsx("p",{children:X}),action:m.formatMessage({id:`discussion_action_${t.type}`})}})})]})})};const bl="discussion_responses_",fN=({type:e="answer",responses:t=0})=>{const r=Oe();return x.jsxs("div",{className:"responses-heading",children:[x.jsx("h3",{children:r.formatMessage({id:`${bl}title`},{action:r.formatMessage({id:`${bl}${e}`}),count:t})}),t===0&&x.jsx("p",{children:Lr(r.formatMessage,`${bl}empty`,e,e)})]})};const hN=({isOpen:e=!1,count:t=0,children:r})=>{const n=Oe(),o=$.useRef(null),[i,a]=$.useState(e),[s,c]=$.useState("closed");$.useEffect(()=>{const h=o.current;if(h)return h.addEventListener("transitionend",l),()=>{h.removeEventListener("transitionend",l)}},[]),ri(()=>{s==="closed"&&!i||c(["opening","open"].includes(s)?"ready-to-close":"opening")},[i]),$.useEffect(()=>{s==="ready-to-close"&&c("closing")},[s]);const l=({propertyName:h})=>{h==="max-height"&&c(f=>f==="opening"?"open":f==="closing"?"closed":f)},u=["opening","open"].includes(s),d=uv(r,{element:"li"});return x.jsxs("div",{className:"thread-wrapper",children:[x.jsx(ze,{variant:"secondary",size:"small",styling:{muted:!0},icon:{icon:`arrow_corner-down_${u?"left":"right"}`},onClick:()=>{a(!i)},children:n.formatMessage({id:`discussion_thread_${u?"hide":"show"}`},{count:t})}),x.jsx("ul",{ref:o,className:ue("thread",s),hidden:!i,children:d})]})},dN=({user:e,content:t,verb:r="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:r}),pN=({queryClient:e,queryKey:t,user:r,mutationFn:n})=>({mutationFn:n,onMutate:async({content:s})=>{if(!r)return;const c=dN({user:r,content:s,verb:"post"});await e.cancelQueries({queryKey:[t]});const l=e.getQueryData([t]);return e.setQueryData([t],u=>[...u,c]),{previousActivities:l}},onError:(s,c,l)=>{e.setQueryData([t],l.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:[t]})}}),mN=({queryClient:e,queryKey:t,mutationFn:r,affectedQueryKey:n})=>({mutationFn:r,onMutate:async({activityId:c})=>{await e.cancelQueries({queryKey:[t]});const l=e.getQueryData([t]),u=l==null?void 0:l.map(d=>{var h;return(d==null?void 0:d.id)===c&&((h=d.reaction_counts)!=null&&h.like?d.reaction_counts.like+=1:d.reaction_counts.like=1),d});return e.setQueryData([t],()=>u&&[...u]),{previousActivities:u}},onError:(c,l,u)=>{e.setQueryData([t],u.previousActivities)},onSuccess:c=>{const l=e.getQueryData([t]),u=l==null?void 0:l.map(d=>((d==null?void 0:d.id)===(c==null?void 0:c.activity_id)&&(d.latest_reactions.like?d.latest_reactions.like.push(c):d.latest_reactions.like=[c]),d));return e.setQueryData([t],()=>u&&[...u]),{previousActivities:l}},onSettled:(c,l,u)=>{e.invalidateQueries({queryKey:[`${n}/${u.activityId}`]})}}),gN=({queryClient:e,queryKey:t,user:r,mutationFn:n,affectedQueryKey:o})=>({mutationFn:n,onMutate:async({activityId:l})=>{await e.cancelQueries({queryKey:[t]});const u=e.getQueryData([t]),d=u==null?void 0:u.map(h=>{var f;return(h==null?void 0:h.id)===l&&(f=h.reaction_counts)!=null&&f.like&&(h.reaction_counts.like-=1),h});return e.setQueryData([t],()=>d&&[...d]),{previousActivities:d}},onError:(l,u,d)=>{e.setQueryData([t],d.previousActivities)},onSuccess:(l,{activityId:u})=>{const d=e.getQueryData([t]),h=d==null?void 0:d.map(f=>{var p,m,_,w;if(f.id===u){const v=(_=(m=(p=f.latest_reactions)==null?void 0:p.like)==null?void 0:m.find(b=>b.user_id===(r==null?void 0:r.id)))==null?void 0:_.id;return f.latest_reactions.like=(w=f.latest_reactions.like)==null?void 0:w.filter(b=>b.id!==v),f}else return f});return e.setQueryData([t],()=>h&&[...h]),{previousActivities:d}},onSettled:(l,u,d)=>{e.invalidateQueries({queryKey:[`${o}/${d.activityId}`]})}}),yN=({parentId:e,basePath:t,membershipRequiredToPost:{isMember:r,join:n,leave:o},functions:{list:i,create:a,like:s,unlike:c},cache:{activitiesListQueryKey:l,singleActivityQueryKeyWithoutVariable:u}})=>{const d=ho(),h=$.useContext($r),{data:f,error:p,isLoading:m,isFetching:_}=A0({queryKey:[l],queryFn:i}),w=pN({queryClient:d,queryKey:l,user:h,mutationFn:a}),{mutate:v}=fn(w),b=mN({queryClient:d,queryKey:l,mutationFn:s,affectedQueryKey:u}),{mutate:A}=fn(b),S=gN({queryClient:d,queryKey:l,user:h,mutationFn:async({activityId:k})=>{var H,Y,ie;const q=f&&(f==null?void 0:f.find(K=>K.id===k)),G=(ie=(Y=(H=q==null?void 0:q.latest_reactions)==null?void 0:H.like)==null?void 0:Y.find(K=>K.user_id===(h==null?void 0:h.id)))==null?void 0:ie.id;await c({reactionId:G||"",activityId:k})},affectedQueryKey:u}),{mutate:P}=fn(S),R=$.useCallback(({activityId:k})=>A({activityId:k}),[A]),L=$.useCallback(({activityId:k})=>P({activityId:k}),[P]);return p?x.jsx(ra,{variant:"error",text:p.message}):m?x.jsx(gr,{style:{height:"400px"}}):x.jsxs(x.Fragment,{children:[x.jsx(sh,{contentType:"post",createPost:v,membershipRequiredToPost:{isMember:r,required:!0,join:n,leave:o,notMemberStateText:"Join community to create a post."}}),!_&&Array.isArray(f)&&(f==null?void 0:f.map(k=>{var G,H,Y,ie,K,D,Q,ee,he,J,X;const q=(H=(G=k==null?void 0:k.latest_reactions)==null?void 0:G.like)==null?void 0:H.filter(se=>se.user_id===(h==null?void 0:h.id));return x.jsx(Cu,{content:{type:"post",body:k==null?void 0:k.content,createdAt:(k==null?void 0:k.time)||"",slugs:{question:e},slug:k==null?void 0:k.id,author:{id:(Y=k==null?void 0:k.actor)==null?void 0:Y.id,name:(K=(ie=k==null?void 0:k.actor)==null?void 0:ie.data)==null?void 0:K.name,organization:(Q=(D=k==null?void 0:k.actor)==null?void 0:D.data)==null?void 0:Q.organization,jobTitle:(he=(ee=k==null?void 0:k.actor)==null?void 0:ee.data)==null?void 0:he.jobTitle,image:{thumbnail:((X=(J=k==null?void 0:k.actor)==null?void 0:J.data)==null?void 0:X.thumbnail)||void 0}},userLiked:!!(q!=null&&q.length),likes:(k==null?void 0:k.reaction_counts.like)||0,comments:(k==null?void 0:k.reaction_counts.reply)||0},links:{post:`${t}/${e}/${k==null?void 0:k.id}`,comments:`${t}/${e}/${k==null?void 0:k.id}`},functions:{content:{createContent:()=>null,deleteContent:()=>null,updateContent:()=>null},likes:{createLike:()=>{R({activityId:k==null?void 0:k.id})},deleteLike:()=>{L({activityId:k==null?void 0:k.id})}},comments:{openComments:()=>null}}},k==null?void 0:k.id)}))]})},vN=({queryClient:e,queryKey:t,mutationFn:r,affectedQueryKey:n})=>({mutationFn:r,onMutate:async()=>{await e.cancelQueries({queryKey:[t]})},onError:(c,l,u)=>{e.setQueryData([t],u.previousActivity)},onSuccess:c=>{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(c),l&&(l.reaction_counts={reply:l.latest_reactions.reply.length})):(l.latest_reactions={reply:[c]},l.reaction_counts={reply:1}),e.setQueryData([t],()=>({...l})),{previousActivity:l}},onSettled:()=>{e.invalidateQueries({queryKey:[n]})}}),EN=({queryClient:e,queryKey:t,mutationFn:r})=>({mutationFn:r,onMutate:async({replyId:a})=>{var l,u;await e.cancelQueries({queryKey:[t]});const s=e.getQueryData([t]),c=(u=(l=s==null?void 0:s.latest_reactions)==null?void 0:l.reply)==null?void 0:u.map(d=>{var h;return d.id===a&&((h=d.children_counts)!=null&&h.like?d.children_counts.like+=1:d.children_counts={like:1}),d});return e.setQueryData([t],()=>({...s,latest_reactions:{reply:c}})),{previousActivity:s}},onError:(a,s,c)=>{e.setQueryData([t],c.previousActivity)},onSuccess:a=>{var l;const s=e.getQueryData([t]),c=(l=s==null?void 0:s.latest_reactions.reply)==null?void 0:l.map(u=>(u.id===a.id&&(u.latest_children.like?u.latest_children.like.push(a):u.latest_children.like=[a]),u));return e.setQueryData([t],()=>({...s,latest_reactions:{reply:c}})),{previousActivity:s}}}),_N=({queryClient:e,queryKey:t,user:r,mutationFn:n})=>({mutationFn:n,onMutate:async({replyId:s})=>{var u;await e.cancelQueries({queryKey:[t]});const c=e.getQueryData([t]);if(!c)return;const l=(u=c.latest_reactions.reply)==null?void 0:u.map(d=>(d.id===s&&d.children_counts.like&&(d.children_counts.like-=1),d));return e.setQueryData([t],()=>({...c,latest_reactions:{reply:l}})),{previousActivity:c}},onError:(s,c,l)=>{e.setQueryData([t],l.previousActivity)},onSuccess:(s,{replyId:c})=>{var d;const l=e.getQueryData([t]);if(!l)return;const u=(d=l.latest_reactions.reply)==null?void 0:d.map(h=>{var f;return h.id===c?(f=h.latest_children.reply)==null?void 0:f.filter(m=>m.user_id!==(r==null?void 0:r.id)):h});return e.setQueryData([t],()=>({...l,latest_reactions:{reply:u}})),{previousActivity:l}}}),hE=({basePath:e,parentId:t,activityId:r,repliesList:n,cache:{activitiesListQueryKey:o,singleActivityQueryKeyWithoutVariable:i},membershipRequiredToPost:{isMember:a,join:s,leave:c},functions:{createReply:l,like:u,unlike:d}})=>{const h=ho(),f=$.useContext($r),p=`${i}/${r}`,m=vN({queryClient:h,queryKey:p,mutationFn:l,affectedQueryKey:o}),{mutate:_}=fn(m),w=EN({queryClient:h,queryKey:p,mutationFn:u}),{mutate:v}=fn(w),b=_N({queryClient:h,queryKey:p,user:f,mutationFn:d}),{mutate:A}=fn(b),S=$.useCallback(({replyId:R})=>v({replyId:R}),[v]),P=$.useCallback(({replyId:R})=>A({replyId:R}),[A]);return x.jsxs(x.Fragment,{children:[x.jsx(sh,{contentType:"post",createPost:_,membershipRequiredToPost:{isMember:a,required:!0,join:s,leave:c,notMemberStateText:"Join community to create a post."}}),(n==null?void 0:n.length)===0||(n==null?void 0:n.map(R=>{var k,q,G,H,Y,ie,K,D,Q,ee,he,J,X,se,fe;const L=((k=R==null?void 0:R.latest_children)==null?void 0:k.like)&&((q=R==null?void 0:R.latest_children)==null?void 0:q.like.filter(He=>He.user_id===(f==null?void 0:f.id)));return x.jsx(Cu,{content:{type:"post",body:((H=(G=R==null?void 0:R.data)==null?void 0:G.content)==null?void 0:H.text)||"",createdAt:R==null?void 0:R.created_at,slugs:{question:`${t}/${r}`,reply:R==null?void 0:R.id},slug:`${e}/${t}/${r}#${R==null?void 0:R.id}`,author:{id:(Y=R==null?void 0:R.user)==null?void 0:Y.id,name:(K=(ie=R==null?void 0:R.user)==null?void 0:ie.data)==null?void 0:K.name,organization:(Q=(D=R==null?void 0:R.user)==null?void 0:D.data)==null?void 0:Q.organization,jobTitle:(he=(ee=R==null?void 0:R.user)==null?void 0:ee.data)==null?void 0:he.jobTitle,image:{thumbnail:((X=(J=R==null?void 0:R.user)==null?void 0:J.data)==null?void 0:X.thumbnail)||void 0}},userLiked:!!(L!=null&&L.length),likes:((se=R==null?void 0:R.children_counts)==null?void 0:se.like)||0,comments:((fe=R==null?void 0:R.children_counts)==null?void 0:fe.reply)||0},functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:()=>console.log("update")},likes:{createLike:()=>S({replyId:R==null?void 0:R.id}),deleteLike:()=>P({replyId:R==null?void 0:R.id})},comments:{openComments:()=>{}}}},R==null?void 0:R.id)}))]})},bN=({queryClient:e,queryKey:t,mutationFn:r,affectedQueryKey:n})=>({mutationFn:r,onMutate:async()=>{var l;await e.cancelQueries({queryKey:[t]});const c=e.getQueryData([t]);return(l=c==null?void 0:c.reaction_counts)!=null&&l.like?c.reaction_counts.like+=1:c&&(c.reaction_counts={like:1}),e.setQueryData([t],()=>({...c})),{previousActivity:c}},onError:(c,l,u)=>{e.setQueryData([t],u.previousActivity)},onSuccess:c=>{const l=e.getQueryData([t]);return l!=null&&l.latest_reactions.like?l.latest_reactions.like.push(c):l&&(l.latest_reactions={like:[c]}),e.setQueryData([t],()=>({...l})),{previousActivity:l}},onSettled:()=>{e.invalidateQueries({queryKey:[n]})}}),wN=({queryClient:e,queryKey:t,user:r,activity:n,mutationFn:o,affectedQueryKey:i})=>({mutationFn:o,onMutate:async()=>{var d;await e.cancelQueries({queryKey:[t]});const u=e.getQueryData([t]);return(d=u==null?void 0:u.reaction_counts)!=null&&d.like&&(u.reaction_counts.like-=1),e.setQueryData([t],()=>({...u})),{previousActivity:u}},onError:(u,d,h)=>{e.setQueryData([t],h.previousActivity)},onSuccess:()=>{var h,f,p;if(!n)return;const u=(p=(f=(h=n.latest_reactions)==null?void 0:h.like)==null?void 0:f.find(m=>m.user_id===(r==null?void 0:r.id)))==null?void 0:p.id,d=e.getQueryData([t]);if(d!=null&&d.latest_reactions.like)return d.latest_reactions.like=d.latest_reactions.like.filter(m=>m.id!==u),e.setQueryData([t],()=>({...d})),{previousActivity:d}},onSettled:()=>{e.invalidateQueries({queryKey:[i]})}}),SN=({basePath:e,parentId:t,activityId:r,cache:{activitiesListQueryKey:n,singleActivityQueryKeyWithoutVariable:o},membershipRequiredToPost:i,functions:{get:a,likeActivity:s,unlikeActivity:c,createReply:l,likeReply:u,unlikeReply:d}})=>{var k,q,G,H,Y,ie,K,D,Q,ee,he;const h=$.useContext($r),f=ho(),p=`${o}/${r}`,{data:m,error:_,isLoading:w,isFetching:v}=A0({queryKey:[p],queryFn:a}),b=bN({queryClient:f,queryKey:p,mutationFn:s,affectedQueryKey:n}),{mutate:A}=fn(b),S=wN({queryClient:f,queryKey:p,user:h,mutationFn:async()=>{var X,se,fe;const J=(fe=(se=(X=m==null?void 0:m.latest_reactions)==null?void 0:X.like)==null?void 0:se.find(He=>He.user_id===(h==null?void 0:h.id)))==null?void 0:fe.id;await c({activityId:r,reactionId:J})},affectedQueryKey:n,activity:m}),{mutate:P}=fn(S),R=$.useCallback(({activityId:J})=>A({activityId:J}),[A]),L=$.useCallback(async({activityId:J})=>P({activityId:J}),[P]);return _?x.jsx(ra,{variant:"error",text:_.message}):w||v?x.jsx(gr,{style:{height:"400px"}}):x.jsx(Cu,{content:{type:"post",body:m==null?void 0:m.content,createdAt:(m==null?void 0:m.time)||"",slugs:{question:`${t}/${r}`},slug:r,author:{id:(k=m==null?void 0:m.actor)==null?void 0:k.id,name:(q=m==null?void 0:m.actor)==null?void 0:q.data.name,organization:(G=m==null?void 0:m.actor)==null?void 0:G.data.organization,jobTitle:(H=m==null?void 0:m.actor)==null?void 0:H.data.jobTitle,image:{thumbnail:((Y=m==null?void 0:m.actor)==null?void 0:Y.data.thumbnail)||void 0}},userLiked:((ie=m==null?void 0:m.latest_reactions)==null?void 0:ie.like)&&((D=(K=m==null?void 0:m.latest_reactions)==null?void 0:K.like.filter(J=>(J==null?void 0:J.user_id)===(h==null?void 0:h.id)))==null?void 0:D.length)>0,likes:m&&(m==null?void 0:m.reaction_counts.like),comments:m&&(m==null?void 0:m.reaction_counts.reply)},originalAuthorId:(Q=m==null?void 0:m.actor)==null?void 0:Q.id,functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:()=>console.log("update")},likes:{createLike:()=>R({activityId:r}),deleteLike:()=>L({activityId:r})},comments:{openComments:()=>{}}},children:x.jsxs(x.Fragment,{children:[x.jsxs("h3",{children:["Comments (",((ee=m==null?void 0:m.reaction_counts)==null?void 0:ee.reply)||0,")"]}),x.jsx(hE,{basePath:e,parentId:t,activityId:r,repliesList:(he=m==null?void 0:m.latest_reactions)==null?void 0:he.reply,cache:{activitiesListQueryKey:n,singleActivityQueryKeyWithoutVariable:o},membershipRequiredToPost:i,functions:{createReply:l,like:u,unlike:d}})]})},r)},TN=({id:e,data:{jobTitle:t,name:r,organization:n,thumbnail:o}})=>({id:e,name:r,jobTitle:t,organization:n,image:{thumbnail:o}});exports.$PROXY=Cs;exports.$TRACK=Qf;exports.ASSETS_BUCKET=Ya;exports.ActivitiesFeed=yN;exports.ActivitySection=SN;exports.AddPost=sh;exports.Breadcrumbs=CR;exports.Button=ze;exports.ButtonWrapper=Zs;exports.CollapsibleSection=Hf;exports.Columns=NR;exports.CommunityDetails=AR;exports.Contributors=m0;exports.Conversation=sN;exports.ConversationContext=ah;exports.CookieBanner=z0;exports.Divider=Qa;exports.DownloadSection=EA;exports.Dynamic=wR;exports.EmailHelperTextBox=IR;exports.EmptyStateBox=ra;exports.Filters=RR;exports.Footer=eh;exports.For=Q1;exports.Form=uu;exports.FullWidthSection=jf;exports.Header=oh;exports.HelperTextBox=c0;exports.HiddenFromScreenReaders=yf;exports.HideShowTextBox=PC;exports.HighlightedTextBoxWrapper=Dr;exports.Index=Y1;exports.IntlProvider=qC;exports.JoinButton=Jf;exports.Likes=uE;exports.Link=Ff;exports.LoadMore=V0;exports.LoadingPlaceholder=gr;exports.LoadingState=d0;exports.Logo=Zf;exports.LogoSection=_A;exports.MarkdownText=Kl;exports.MarketingBlock=TA;exports.Match=J1;exports.Member=bu;exports.MembersList=HP;exports.Modal=cE;exports.MoreMenu=W0;exports.NUMBER_OF_USERS=OA;exports.Overlay=lE;exports.PageLayout=UP;exports.Pill=l0;exports.Portal=bR;exports.Post=Cu;exports.ProfilePicture=_u;exports.ProgressBar=f0;exports.Rating=FR;exports.ReactQueryProvider=OR;exports.RepliesFeed=hE;exports.ResponsesHeading=fN;exports.ResponsiveImage=cv;exports.SearchForm=X0;exports.Show=K1;exports.StatusBanner=Ka;exports.Switch=X1;exports.Tags=jP;exports.Thread=hN;exports.Tooltip=$v;exports.UserContext=$r;exports.UserProvider=GC;exports.VisuallyHidden=lt;exports.addAriaProps=fE;exports.addEventListener=H0;exports.bannerSection=SA;exports.batch=C1;exports.children=Kf;exports.className=j0;exports.createComponent=F0;exports.createComputed=ff;exports.createContext=M1;exports.createEffect=Yf;exports.createMemo=St;exports.createRenderEffect=dn;exports.createRoot=hn;exports.createSignal=bt;exports.createUniqueId=z1;exports.delegateEvents=$0;exports.getListener=N1;exports.getMember=Vf;exports.headerData=Ns;exports.insert=ou;exports.loadingBlock=$C;exports.mapGetSteamData=TN;exports.mergeProps=B0;exports.on=R1;exports.onCleanup=Rs;exports.onMount=P1;exports.passwordRules=MR;exports.setAttribute=iu;exports.splitProps=D0;exports.spread=q0;exports.template=lR;exports.untrack=Xe;exports.use=pR;exports.useContext=F1;exports.useEffectAfterMount=ri;exports.useFeatureFlag=FT;exports.useScreenWidth=Js;exports.useScrollListener=Xy;exports.useScrollToHash=DT;exports.useTransition=k1;
|