@apolitical/component-library 1.10.0-beta.2 → 1.10.0-beta.3

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/index.js CHANGED
@@ -1 +1,37 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-828b4830.js");require("react");require("react/jsx-runtime");exports.ASSETS_BUCKET=e.ASSETS_BUCKET;exports.ActivitiesFeed=e.ActivitiesFeed;exports.ActivitySection=e.ActivitySection;exports.AddPost=e.AddPost;exports.BannerSection=e.bannerSection;exports.Breadcrumbs=e.Breadcrumbs;exports.Button=e.Button;exports.ButtonWrapper=e.ButtonWrapper;exports.CacheProvider=e.CacheProvider;exports.CollapsibleSection=e.CollapsibleSection;exports.Columns=e.Columns;exports.CommunityDetails=e.CommunityDetails;exports.Contributors=e.Contributors;exports.ConversationContext=e.ConversationContext;exports.CookieBanner=e.CookieBanner;exports.DiscussionConversation=e.Conversation;exports.DiscussionForm=e.Form;exports.DiscussionLikes=e.Likes;exports.DiscussionPost=e.Post;exports.DiscussionThread=e.Thread;exports.Divider=e.Divider;exports.DownloadSection=e.DownloadSection;exports.EMAILS=e.EMAILS;exports.EmailHelperTextBox=e.EmailHelperTextBox;exports.EmptyStateBox=e.EmptyStateBox;exports.Filters=e.Filters;exports.FlagsProvider=e.FlagsProvider;exports.Footer=e.Footer;exports.FullWidthSection=e.FullWidthSection;exports.GlobalProviders=e.GlobalProviders;exports.Header=e.Header;exports.HelperTextBox=e.HelperTextBox;exports.HiddenFromScreenReaders=e.HiddenFromScreenReaders;exports.HideShowTextBox=e.HideShowTextBox;exports.HighlightedTextBox=e.HighlightedTextBoxWrapper;exports.IntlProvider=e.IntlProvider;exports.JoinButton=e.JoinButton;exports.LanguageSwitcher=e.LanguageSwitcher;exports.Link=e.Link;exports.LoadMore=e.LoadMore;exports.LoadingBlock=e.loadingBlock;exports.LoadingPlaceholder=e.LoadingPlaceholder;exports.LoadingState=e.LoadingState;exports.Logo=e.Logo;exports.LogoSection=e.LogoSection;exports.MarkdownText=e.MarkdownText;exports.MarketingBox=e.MarketingBlock;exports.Member=e.Member;exports.MembersList=e.MembersList;exports.Modal=e.Modal;exports.MoreMenu=e.MoreMenu;exports.NUMBER_OF_USERS=e.NUMBER_OF_USERS;exports.Overlay=e.Overlay;exports.PageLayout=e.PageLayout;exports.PasswordRules=e.passwordRules;exports.Pill=e.Pill;exports.ProfilePicture=e.ProfilePicture;exports.ProgressBar=e.ProgressBar;exports.Rating=e.Rating;exports.RepliesFeed=e.RepliesFeed;exports.ResponsesHeading=e.ResponsesHeading;exports.ResponsiveImage=e.ResponsiveImage;exports.SearchForm=e.SearchForm;exports.Span=e.Span;exports.StatusBanner=e.StatusBanner;exports.Tags=e.Tags;exports.Tooltip=e.Tooltip;exports.UserContext=e.UserContext;exports.UserProvider=e.UserProvider;exports.VisuallyHidden=e.VisuallyHidden;exports.addAriaProps=e.addAriaProps;exports.getMember=e.getMember;exports.headerData=e.headerData;exports.mapGetStreamData=e.mapGetSteamData;exports.useCurrentPath=e.useCurrentPath;exports.useEffectAfterMount=e.useEffectAfterMount;exports.useScreenWidth=e.useScreenWidth;exports.useScrollListener=e.useScrollListener;exports.useScrollToHash=e.useScrollToHash;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),mr=require("lodash.clonedeep"),fr=require("lodash.set"),M=require("react-intl"),wt=require("truncate"),Ye=require("markdown-to-jsx"),K=require("@tanstack/react-query"),pr=require("@tanstack/react-query-devtools"),He=require("posthog-js"),on=require("react-cookie"),an=require("lodash.get"),hr=require("react-error-boundary"),gr=require("react-textarea-autosize"),_r=require("lodash.isequal");function xr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ln={exports:{}};/*!
2
+ Copyright (c) 2018 Jed Watson.
3
+ Licensed under the MIT License (MIT), see
4
+ http://jedwatson.github.io/classnames
5
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s=[],o=0;o<arguments.length;o++){var l=arguments[o];if(l){var m=typeof l;if(m==="string"||m==="number")s.push(l);else if(Array.isArray(l)){if(l.length){var a=n.apply(null,l);a&&s.push(a)}}else if(m==="object"){if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]")){s.push(l.toString());continue}for(var i in l)t.call(l,i)&&l[i]&&s.push(i)}}}return s.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ln);var br=ln.exports;const j=xr(br),vr=({element:e="span",showOnFocus:t=!0,children:n,...s})=>g.createElement(e,{...s,className:j("hidden",{"show-on-focus":t}),children:n}),J=g.memo(vr),yr=({element:e="span",children:t=null,...n})=>g.createElement(e,{...n,"aria-hidden":!0},t),jt=g.memo(yr);var bt={exports:{}},ve={};/**
6
+ * @license React
7
+ * react-jsx-runtime.production.min.js
8
+ *
9
+ * Copyright (c) Facebook, Inc. and its affiliates.
10
+ *
11
+ * This source code is licensed under the MIT license found in the
12
+ * LICENSE file in the root directory of this source tree.
13
+ */var Jt;function kr(){if(Jt)return ve;Jt=1;var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function m(a,i,u){var d,f={},p=null,_=null;u!==void 0&&(p=""+u),i.key!==void 0&&(p=""+i.key),i.ref!==void 0&&(_=i.ref);for(d in i)s.call(i,d)&&!l.hasOwnProperty(d)&&(f[d]=i[d]);if(a&&a.defaultProps)for(d in i=a.defaultProps,i)f[d]===void 0&&(f[d]=i[d]);return{$$typeof:t,type:a,key:p,ref:_,props:f,_owner:o.current}}return ve.Fragment=n,ve.jsx=m,ve.jsxs=m,ve}var ye={};/**
14
+ * @license React
15
+ * react-jsx-runtime.development.js
16
+ *
17
+ * Copyright (c) Facebook, Inc. and its affiliates.
18
+ *
19
+ * This source code is licensed under the MIT license found in the
20
+ * LICENSE file in the root directory of this source tree.
21
+ */var Xt;function wr(){return Xt||(Xt=1,process.env.NODE_ENV!=="production"&&function(){var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),a=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),h=Symbol.iterator,y="@@iterator";function S(c){if(c===null||typeof c!="object")return null;var b=h&&c[h]||c[y];return typeof b=="function"?b:null}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(c){{for(var b=arguments.length,w=new Array(b>1?b-1:0),T=1;T<b;T++)w[T-1]=arguments[T];$("error",c,w)}}function $(c,b,w){{var T=E.ReactDebugCurrentFrame,D=T.getStackAddendum();D!==""&&(b+="%s",w=w.concat([D]));var L=w.map(function(A){return String(A)});L.unshift("Warning: "+b),Function.prototype.apply.call(console[c],console,L)}}var I=!1,k=!1,H=!1,U=!1,v=!1,P;P=Symbol.for("react.module.reference");function Q(c){return!!(typeof c=="string"||typeof c=="function"||c===s||c===l||v||c===o||c===u||c===d||U||c===_||I||k||H||typeof c=="object"&&c!==null&&(c.$$typeof===p||c.$$typeof===f||c.$$typeof===m||c.$$typeof===a||c.$$typeof===i||c.$$typeof===P||c.getModuleId!==void 0))}function F(c,b,w){var T=c.displayName;if(T)return T;var D=b.displayName||b.name||"";return D!==""?w+"("+D+")":w}function W(c){return c.displayName||"Context"}function R(c){if(c==null)return null;if(typeof c.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case s:return"Fragment";case n:return"Portal";case l:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case a:var b=c;return W(b)+".Consumer";case m:var w=c;return W(w._context)+".Provider";case i:return F(c,c.render,"ForwardRef");case f:var T=c.displayName||null;return T!==null?T:R(c.type)||"Memo";case p:{var D=c,L=D._payload,A=D._init;try{return R(A(L))}catch{return null}}}return null}var N=Object.assign,z=0,q,te,X,ne,oe,B,re;function fe(){}fe.__reactDisabledLog=!0;function Me(){{if(z===0){q=console.log,te=console.info,X=console.warn,ne=console.error,oe=console.group,B=console.groupCollapsed,re=console.groupEnd;var c={configurable:!0,enumerable:!0,value:fe,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}z++}}function Un(){{if(z--,z===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},c,{value:q}),info:N({},c,{value:te}),warn:N({},c,{value:X}),error:N({},c,{value:ne}),group:N({},c,{value:oe}),groupCollapsed:N({},c,{value:B}),groupEnd:N({},c,{value:re})})}z<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Xe=E.ReactCurrentDispatcher,Ze;function Ce(c,b,w){{if(Ze===void 0)try{throw Error()}catch(D){var T=D.stack.trim().match(/\n( *(at )?)/);Ze=T&&T[1]||""}return`
22
+ `+Ze+c}}var Ke=!1,Pe;{var Qn=typeof WeakMap=="function"?WeakMap:Map;Pe=new Qn}function Ft(c,b){if(!c||Ke)return"";{var w=Pe.get(c);if(w!==void 0)return w}var T;Ke=!0;var D=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var L;L=Xe.current,Xe.current=null,Me();try{if(b){var A=function(){throw Error()};if(Object.defineProperty(A.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(A,[])}catch(le){T=le}Reflect.construct(c,[],A)}else{try{A.call()}catch(le){T=le}c.call(A.prototype)}}else{try{throw Error()}catch(le){T=le}c()}}catch(le){if(le&&T&&typeof le.stack=="string"){for(var C=le.stack.split(`
23
+ `),Z=T.stack.split(`
24
+ `),V=C.length-1,Y=Z.length-1;V>=1&&Y>=0&&C[V]!==Z[Y];)Y--;for(;V>=1&&Y>=0;V--,Y--)if(C[V]!==Z[Y]){if(V!==1||Y!==1)do if(V--,Y--,Y<0||C[V]!==Z[Y]){var se=`
25
+ `+C[V].replace(" at new "," at ");return c.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",c.displayName)),typeof c=="function"&&Pe.set(c,se),se}while(V>=1&&Y>=0);break}}}finally{Ke=!1,Xe.current=L,Un(),Error.prepareStackTrace=D}var ge=c?c.displayName||c.name:"",qt=ge?Ce(ge):"";return typeof c=="function"&&Pe.set(c,qt),qt}function Wn(c,b,w){return Ft(c,!1)}function zn(c){var b=c.prototype;return!!(b&&b.isReactComponent)}function Ae(c,b,w){if(c==null)return"";if(typeof c=="function")return Ft(c,zn(c));if(typeof c=="string")return Ce(c);switch(c){case u:return Ce("Suspense");case d:return Ce("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case i:return Wn(c.render);case f:return Ae(c.type,b,w);case p:{var T=c,D=T._payload,L=T._init;try{return Ae(L(D),b,w)}catch{}}}return""}var Re=Object.prototype.hasOwnProperty,It={},Bt=E.ReactDebugCurrentFrame;function Ne(c){if(c){var b=c._owner,w=Ae(c.type,c._source,b?b.type:null);Bt.setExtraStackFrame(w)}else Bt.setExtraStackFrame(null)}function Vn(c,b,w,T,D){{var L=Function.call.bind(Re);for(var A in c)if(L(c,A)){var C=void 0;try{if(typeof c[A]!="function"){var Z=Error((T||"React class")+": "+w+" type `"+A+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[A]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Z.name="Invariant Violation",Z}C=c[A](b,A,T,w,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(V){C=V}C&&!(C instanceof Error)&&(Ne(D),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",T||"React class",w,A,typeof C),Ne(null)),C instanceof Error&&!(C.message in It)&&(It[C.message]=!0,Ne(D),x("Failed %s type: %s",w,C.message),Ne(null))}}}var Yn=Array.isArray;function et(c){return Yn(c)}function Gn(c){{var b=typeof Symbol=="function"&&Symbol.toStringTag,w=b&&c[Symbol.toStringTag]||c.constructor.name||"Object";return w}}function qn(c){try{return Ot(c),!1}catch{return!0}}function Ot(c){return""+c}function Lt(c){if(qn(c))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Gn(c)),Ot(c)}var be=E.ReactCurrentOwner,Jn={key:!0,ref:!0,__self:!0,__source:!0},Ht,Ut,tt;tt={};function Xn(c){if(Re.call(c,"ref")){var b=Object.getOwnPropertyDescriptor(c,"ref").get;if(b&&b.isReactWarning)return!1}return c.ref!==void 0}function Zn(c){if(Re.call(c,"key")){var b=Object.getOwnPropertyDescriptor(c,"key").get;if(b&&b.isReactWarning)return!1}return c.key!==void 0}function Kn(c,b){if(typeof c.ref=="string"&&be.current&&b&&be.current.stateNode!==b){var w=R(be.current.type);tt[w]||(x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R(be.current.type),c.ref),tt[w]=!0)}}function er(c,b){{var w=function(){Ht||(Ht=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",b))};w.isReactWarning=!0,Object.defineProperty(c,"key",{get:w,configurable:!0})}}function tr(c,b){{var w=function(){Ut||(Ut=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",b))};w.isReactWarning=!0,Object.defineProperty(c,"ref",{get:w,configurable:!0})}}var nr=function(c,b,w,T,D,L,A){var C={$$typeof:t,type:c,key:b,ref:w,props:A,_owner:L};return C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(C,"_self",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.defineProperty(C,"_source",{configurable:!1,enumerable:!1,writable:!1,value:D}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C};function rr(c,b,w,T,D){{var L,A={},C=null,Z=null;w!==void 0&&(Lt(w),C=""+w),Zn(b)&&(Lt(b.key),C=""+b.key),Xn(b)&&(Z=b.ref,Kn(b,D));for(L in b)Re.call(b,L)&&!Jn.hasOwnProperty(L)&&(A[L]=b[L]);if(c&&c.defaultProps){var V=c.defaultProps;for(L in V)A[L]===void 0&&(A[L]=V[L])}if(C||Z){var Y=typeof c=="function"?c.displayName||c.name||"Unknown":c;C&&er(A,Y),Z&&tr(A,Y)}return nr(c,C,Z,D,T,be.current,A)}}var nt=E.ReactCurrentOwner,Qt=E.ReactDebugCurrentFrame;function he(c){if(c){var b=c._owner,w=Ae(c.type,c._source,b?b.type:null);Qt.setExtraStackFrame(w)}else Qt.setExtraStackFrame(null)}var rt;rt=!1;function st(c){return typeof c=="object"&&c!==null&&c.$$typeof===t}function Wt(){{if(nt.current){var c=R(nt.current.type);if(c)return`
26
+
27
+ Check the render method of \``+c+"`."}return""}}function sr(c){{if(c!==void 0){var b=c.fileName.replace(/^.*[\\\/]/,""),w=c.lineNumber;return`
28
+
29
+ Check your code at `+b+":"+w+"."}return""}}var zt={};function or(c){{var b=Wt();if(!b){var w=typeof c=="string"?c:c.displayName||c.name;w&&(b=`
30
+
31
+ Check the top-level render call using <`+w+">.")}return b}}function Vt(c,b){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var w=or(b);if(zt[w])return;zt[w]=!0;var T="";c&&c._owner&&c._owner!==nt.current&&(T=" It was passed a child from "+R(c._owner.type)+"."),he(c),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',w,T),he(null)}}function Yt(c,b){{if(typeof c!="object")return;if(et(c))for(var w=0;w<c.length;w++){var T=c[w];st(T)&&Vt(T,b)}else if(st(c))c._store&&(c._store.validated=!0);else if(c){var D=S(c);if(typeof D=="function"&&D!==c.entries)for(var L=D.call(c),A;!(A=L.next()).done;)st(A.value)&&Vt(A.value,b)}}}function ar(c){{var b=c.type;if(b==null||typeof b=="string")return;var w;if(typeof b=="function")w=b.propTypes;else if(typeof b=="object"&&(b.$$typeof===i||b.$$typeof===f))w=b.propTypes;else return;if(w){var T=R(b);Vn(w,c.props,"prop",T,c)}else if(b.PropTypes!==void 0&&!rt){rt=!0;var D=R(b);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",D||"Unknown")}typeof b.getDefaultProps=="function"&&!b.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ir(c){{for(var b=Object.keys(c.props),w=0;w<b.length;w++){var T=b[w];if(T!=="children"&&T!=="key"){he(c),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",T),he(null);break}}c.ref!==null&&(he(c),x("Invalid attribute `ref` supplied to `React.Fragment`."),he(null))}}function Gt(c,b,w,T,D,L){{var A=Q(c);if(!A){var C="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(C+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Z=sr(D);Z?C+=Z:C+=Wt();var V;c===null?V="null":et(c)?V="array":c!==void 0&&c.$$typeof===t?(V="<"+(R(c.type)||"Unknown")+" />",C=" Did you accidentally export a JSX literal instead of a component?"):V=typeof c,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",V,C)}var Y=rr(c,b,w,D,L);if(Y==null)return Y;if(A){var se=b.children;if(se!==void 0)if(T)if(et(se)){for(var ge=0;ge<se.length;ge++)Yt(se[ge],c);Object.freeze&&Object.freeze(se)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Yt(se,c)}return c===s?ir(Y):ar(Y),Y}}function lr(c,b,w){return Gt(c,b,w,!0)}function cr(c,b,w){return Gt(c,b,w,!1)}var ur=cr,dr=lr;ye.Fragment=s,ye.jsx=ur,ye.jsxs=dr}()),ye}process.env.NODE_ENV==="production"?bt.exports=kr():bt.exports=wr();var r=bt.exports;const cn=()=>{const[e,t]=g.useState(window.location.pathname),n=()=>{const s=window.location.pathname;t(s)};return g.useEffect(()=>(window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n)}),[]),e},pe=(e,t)=>{const n=g.useRef(!1);g.useEffect(()=>{n.current?e():n.current=!0},t)};function jr(e,t,n){var s=this,o=g.useRef(null),l=g.useRef(0),m=g.useRef(null),a=g.useRef([]),i=g.useRef(),u=g.useRef(),d=g.useRef(e),f=g.useRef(!0);g.useEffect(function(){d.current=e},[e]);var p=!t&&t!==0&&typeof window<"u";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var _=!!(n=n||{}).leading,h=!("trailing"in n)||!!n.trailing,y="maxWait"in n,S=y?Math.max(+n.maxWait||0,t):null;g.useEffect(function(){return f.current=!0,function(){f.current=!1}},[]);var E=g.useMemo(function(){var x=function(v){var P=a.current,Q=i.current;return a.current=i.current=null,l.current=v,u.current=d.current.apply(Q,P)},$=function(v,P){p&&cancelAnimationFrame(m.current),m.current=p?requestAnimationFrame(v):setTimeout(v,P)},I=function(v){if(!f.current)return!1;var P=v-o.current;return!o.current||P>=t||P<0||y&&v-l.current>=S},k=function(v){return m.current=null,h&&a.current?x(v):(a.current=i.current=null,u.current)},H=function v(){var P=Date.now();if(I(P))return k(P);if(f.current){var Q=t-(P-o.current),F=y?Math.min(Q,S-(P-l.current)):Q;$(v,F)}},U=function(){var v=Date.now(),P=I(v);if(a.current=[].slice.call(arguments),i.current=s,o.current=v,P){if(!m.current&&f.current)return l.current=o.current,$(H,t),_?x(o.current):u.current;if(y)return $(H,t),x(o.current)}return m.current||$(H,t),u.current};return U.cancel=function(){m.current&&(p?cancelAnimationFrame(m.current):clearTimeout(m.current)),l.current=0,a.current=o.current=i.current=m.current=null},U.isPending=function(){return!!m.current},U.flush=function(){return m.current?k(Date.now()):u.current},U},[_,y,t,S,h,p]);return E}function un(e,t,n){var s=n===void 0?{}:n,o=s.leading,l=s.trailing;return jr(e,t,{maxWait:t,leading:o===void 0||o,trailing:l===void 0||l})}let ot;const Se=(e=!0,t=!1)=>{if(!e)return;const[n,s]=g.useState(0)||[!1,()=>{}];g.useEffect(()=>(l(),window.addEventListener("resize",m),()=>{clearTimeout(ot),m.flush(),window.removeEventListener("resize",m)}),[]);const o=()=>window.innerWidth,l=()=>{s(o())},m=un(()=>{o()!==n&&(t&&(clearTimeout(ot),document.body.classList.add("is-resizing"),ot=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),l())},500,{leading:!0});return n},dn=({scrollPosition:e=0,offset:t={down:0,up:10},callbacks:{scrollDown:n=()=>{},scrollUp:s=()=>{}}})=>{if(!window)return;const[o,l]=g.useState({current:0,past:0})||[!1,()=>{}],[m,a]=g.useState({scrollDown:!1,scrollUp:!1})||[!1,()=>{}];g.useEffect(()=>(i(),window.addEventListener("scroll",u),()=>{u.flush(),window.removeEventListener("scroll",u)}),[]);const i=()=>{const d=window.scrollY,f=o.current,p=d-f,_=p>0?"down":"up";if(l({current:d,past:f}),_==="down"){d>=e+t.down&&!m.scrollDown&&(!m.scrollUp||p>t.up)&&(n(),a({scrollUp:!1,scrollDown:!0}));return}Math.abs(p)>=t.up&&!m.scrollUp&&(s(),a({scrollUp:!0,scrollDown:!1}))},u=un(()=>{i()},250);return o},Sr=(e=[],t=!0)=>{e=Array.isArray(e)?e:[e];const n=g.useRef(!1);pe(()=>{if(window&&window.location&&window.location.hash){if(n.current)return;const s=document.getElementById(window.location.hash.replace("#",""));s&&(s.scrollIntoView(t?{behavior:"smooth"}:null),n.current=!0)}},e)},Er=(e,t)=>{Array.isArray(t)||(t=[t]);const n=mr(e);return t.forEach(({type:s,value:o})=>{fr(n,s,o)}),n},mn=e=>{const t=[];return e.forEach(n=>{const s=parseInt(n);isNaN(s)||t.push(s)}),t.sort((n,s)=>n-s)},fn=(e,t,n)=>{let s=n.mobile;for(const o in t){const l=parseInt(String(t[o]));if(e>=l)s=n[l];else if(e<l)break}return s},Tr=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),$r=e=>{let l;try{l=new Date().getTime()-new Date(e).getTime()}catch{return""}const m=l/36e5,a=Math.floor(l/864e5);if(a<1)return m<1?{path:"now"}:{path:"hours",number:Math.floor(m)};if(a<7)return{path:"days",number:a};const i=Math.floor(a/7);return i<=52?{path:"weeks",number:i}:{path:"years",number:Math.floor(a/365)}},Mr=e=>new Promise(t=>setTimeout(t,e)),St={apolitical:"Apolitical",breadcrumbs_label:"Go back to:",breadcrumbs_currentPage:"Current page:",card_bootcamp:"Email boot camp",card_ended:"Ended",card_registered:"Registered",card_answers:"{number, plural, =0 {0 answers} one {# answer} other {# answers}}",card_time_ago:"{time} ago",card_time_read:"{time} min read",card_watch:"Watch recording",card_cta_people:"View profile",collapsibleSection_summary:"Find out more",communityDetails_members:"Members",communityDetails_viewAll:"View all",communityDetails_invite:"Invite colleagues",community_joinToPost:"Join community to create a post.",contactFooter_title:"Contact us",contactFooter_text:"We're always open to new ideas, so please reach out to see how we can collaborate.",contactFooter_phone:"+44 203 608 2241",contactFooter_email:"hello@apolitical.co",contactForm_name:"Name",contactForm_email:"Email address",contactForm_organisation:"Government department or organisation",contactForm_interests:"I'm interested in",contactForm_interests_publishingCourse:"Publishing or creating a course",contactForm_interests_buyingCourse:"Buying courses for my team",contactForm_interests_learningExperience:"Customised learning experiences",contactForm_interests_somethingElse:"Something else",contactForm_message:"Message",cookieBanner_title:"Cookies and your privacy",cookieBanner_text:"We take your trust and privacy very seriously. Apolitical uses safe cookies (small files on your device) to run the site. You can reject non-essential cookies, but some site features may not work without them.",cookieBanner_buttons_settings:"Change my settings",cookieBanner_buttons_reject:"Reject all",cookieBanner_buttons_accept:"Accept all",dates_now:"now",dates_hours:"{number}h",dates_days:"{number}d",dates_weeks:"{number}w",dates_years:"{number}y",discussion_action_answer:"answer",discussion_action_comment:"comment",discussion_action_post:"post",discussion_action_response:"response",discussion_action_reply:"reply",discussion_action_question:"question",discussion_edited:"Edited",discussion_delete_title:"Delete {action}",discussion_delete_text:"<p>Are you sure you want to delete your {action}?</p><p>This can't be undone.</p>",discussion_delete_cancel:"Cancel",discussion_delete_delete:"Delete",discussion_delete_error:"We are unable to delete your {action} at the moment. Please try again later or contact us if problem persists.",discussion_reply:"Reply",discussion_report_subject:"Report a post on Apolitical",discussion_report_body:`I'd like to report the {contentType} <{contentSlug}> at {contentUrl}.
32
+
33
+ Please explain why you're reporting this post. Reasons could include: inappropriate language, harassment, spam, hate speech, false information, among others. Include as much detail as you feel comfortable.
34
+
35
+ Thank you for helping to protect the Apolitical community from abusive content.`,discussion_form_title:"Write your {action}",discussion_form_placeholder:"Type your {action} here...",discussion_form_label:"Your {action}",discussion_form_explainer:"Try to make your {action} specific and practical. Be respectful and kind. See our <a>community guidelines</a>",discussion_form_success:"Your {action} has been submitted.",discussion_form_post:"Post",discussion_form_posting:"Posting...",discussion_form_save:"Save",discussion_form_saving:"Saving...",discussion_form_cancel:"Cancel",discussion_form_submitting:"Submitting...",discussion_form_placeholder_post:"Write something...",discussion_form_error:"We are unable to process your {action} right now. Please try again later or contact us if the problem persists",discussion_form_error_tooLong:"Please keep your content to {maxLength, plural, one {1 character} other {# characters}}.",discussion_form_error_tooMany:"You have posted too many times in a row. Please wait and try again.",discussion_form_error_loggedOut:"Please log in to submit your {action}.",discussion_form_error_noPermission:"You do not have permission to {action}.",discussion_form_error_alreadyExists:"This {action} already exists.",discussion_form_title_question:"Start a conversation",discussion_form_placeholder_question:"Ask your question here",discussion_form_explainer_question:"Unsure what you can post? See our <a>community guidelines</a>.",discussion_likes:"{number, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_likes_short:"{number}",discussion_likes_more:"and {number} more...",discussion_likes_like:"Like this {action}",discussion_likes_unlike:"Unlike {action}",discussion_moreMenu_edit:"Edit",discussion_moreMenu_delete:"Delete",discussion_moreMenu_report:"Report",discussion_comments_screenReader:"See {count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_comments:"{count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_responses_answer:"Answers",discussion_responses_comment:"Comments",discussion_responses_title:"{action} ({count})",discussion_responses_empty:"Be the first to respond",discussion_responses_empty_answer:"Be the first to answer this question",discussion_thread_show:"Show {count, plural, =0 {replies} one {# reply} other {# replies}}",discussion_thread_hide:"Hide replies",emailHelperTextBox_fallback_title:"Who can join",emailHelperTextBox_fallback_text:"Apolitical is a private community for public servants and policymakers.",emailHelperTextBox_default_title:"Who can join",emailHelperTextBox_default_text:"Apolitical is a private community for public servants and policymakers. <link>Learn more</link>.",emailHelperTextBox_autoApproved_title:"Email check",emailHelperTextBox_autoApproved_text:"Great! Looks like you are using a **government email domain we recognise.** You will be **auto-approved** once you sign up.",emailHelperTextBox_unrecognisedEmail_title:"Not a recognised government email",emailHelperTextBox_unrecognisedEmail_text:"To confirm you work in government or policy, please add more details below. <link>Learn more</link>.",emailHelperTextBox_pendingApproval_title:"Email is pending approval",emailHelperTextBox_pendingApproval_text:"Looks like this email has been used to sign up to Apolitical before, but <strong>we have not yet approved it.</strong> If you cannot wait to join, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_emailUnverified_title:"Hello again!",emailHelperTextBox_emailUnverified_text:"It looks like you're already an Apolitical member. To access your account, please verify your email address. <link>Click here to get a verification code sent to your email</link>.",emailHelperTextBox_emailAlreadyExists_title:"Email is already registered",emailHelperTextBox_emailAlreadyExists_text:"Looks like this email has been used to sign up to Apolitical before, try <link>logging in</link> instead. If you're still having issues, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_error_verificationFailedToSend_title:"Verification code failed to send",emailHelperTextBox_error_verificationFailedToSend_text:"Error details: <em>{error}</em>{br}<link>Click here to try again</link>.{br}If you continue to have problems, contact us at <mail>concierge@apolitical.co</mail>",emailHelperTextBox_error_noFunction:"Cannot resend verification code.",filters_all:"Show all",filters_disabled:"{name} - no results",footer_platform:"Platform",footer_platform_events:"Events",footer_platform_courses:"Courses",footer_platform_qanda:"Q&A",footer_platform_articles:"Articles",footer_community:"Community",footer_community_support:"Support FAQ",footer_community_post:"Post on Apolitical",footer_community_join:"Who can join",footer_community_guidelines:"Guidelines & values",footer_company:"Company",footer_company_story:"Our story",footer_company_team:"Meet our team",footer_company_careers:"Careers",footer_company_partner:"Partner with us",footer_company_contact:"Get in touch",footer_legal:"Legal",footer_legal_privacy:"Privacy policy",footer_legal_terms:"Terms & conditions",footer_legal_cookie:"Cookie policy",footer_legal_accessibility:"Accessibility statement",footer_legal_dataProtection:"Data protection officer",footer_legal_euDataProtection:"EU data protection officer",footer_contact:"Contact",footer_contact_correspondence:"Correspondence address",footer_contact_correspondence_address:"251 Southwark Bridge Road{br}London, SE1 6FL{br}United Kingdom",footer_contact_registered:"Registered address",footer_contact_registered_address:"20–22 Wenlock Road{br}London, N1 7GU{br}United Kingdom",footer_contact_berlin:"Berlin address",footer_contact_berlin_address:"Torstraße 220{br}10115 Berlin{br}Germany",footer_contact_support:"For platform support",footer_contact_business:"For business inquiries",footer_social_linkedin:"LinkedIn",footer_social_twitter:"Twitter",footer_social_facebook:"Facebook",footer_copyright:"Copyright © {currentYear} Apolitical Group Limited",form_fieldWrapper_required:"required",form_fieldWrapper_characterLimit:"Character limit:",form_error_generalError:"Sorry, something has gone. Please refresh the page and try again.",form_error_required:"Please fill in this required field",form_error_numbers:"Numbers are not allowed in this text field",form_error_email:"Please enter a valid email address",form_error_url:"Please enter a valid URL",form_submit:"Submit",form_submitting:"Submitting form...",form_submitted:"Submitted",header_skip:"Skip to main content",header_search_show:"Show search bar",header_search_hide:"Close search bar",header_menu_show:"Show navigation",header_menu_hide:"Close navigation",header_home_loggedOut:"Home",header_home_loggedIn:"My Home",header_topics:"Topics",header_topics_explore:"Explore",header_topics_explore_events:"Events",header_topics_explore_courses:"Courses","header_topics_explore_q-and-a":"Q&A",header_topics_explore_articles:"Articles",header_topics_topics:"Topics",header_topics_topics_climate:"Climate","header_topics_topics_cities-and-local-government":"Cities and local government","header_topics_topics_digital-and-data":"Digital and data",header_topics_topics_education:"Education","header_topics_topics_equity-justice-and-inclusion":"Equity, justice and inclusion","header_topics_topics_health-and-social-care":"Health and social care",header_topics_topics_innovation:"Innovation","header_topics_topics_leadership-and-skills":"Leadership and skills","header_topics_topics_life-in-government":"Life in government",header_topics_topics_policymaking:"Policymaking","header_topics_topics_transport-and-infrastructure":"Transport and infrastructure","header_topics_topics_work-and-the-economy":"Work and the economy",header_partners:"For partners",header_account:"My account",header_account_show:"Show account menu",header_account_hide:"Close account menu",header_account_profile:"My profile",header_account_settings:"Settings & privacy","header_account_log-out":"Log out",header_buttons_login:"Log in",header_buttons_signup:"Sign up",hideShowTextBox_hide:"View less",hideShowTextBox_show:"View more",joinCommunityButton:"Join community",joinCommunityButton_short:"Join",joinCommunityButton_joining:"Joining...",joinCommunityButton_member:"Member",joinCommunityButton_member_aria:"Leave community",joinCommunityButton_leave:"Leave",joinCommunityButton_leaving:"Leaving...",languageSwitcher_label:"I would like to read this article in...",languageSwitcher_translation_original:"original language",languageSwitcher_translation_human:"translated by person",languageSwitcher_translation_machine:"translated by machine",languageSwitcher_selected:"{language} - currently selected",languageSwitcher_disclaimer:"This content is machine translated and will occasionally get gendered language or other direct translations wrong. We’re trying to resolve this but in the meantime, if you notice something very wrong, let us know at <link>{email}</link>",loadMore_button:"Load more",loadMore_endOfFeed:"You're all caught up",loadMore_error:"We're having trouble loading more content. Please refresh the page or try again later.",loadingBlock_loading:"Loading...",loadingBlock_almostDone:"Almost done...",loadingBlock_complete:"Complete!",markdown_collapsibleSection_summary:"Resources",markdown_skip_video:"Skip past video",markdown_skip_padlet:"Skip past interactive board",markdown_skip_poll:"Skip past poll",markdown_skip:"Skip to next section",markdown_iframe_title:"Course information",markdown_iframe_video:"Video",markdown_iframe_padlet:"Interactive board",markdown_iframe_poll:"Poll",member_apolitical:"Apolitical",member_community:"Community post",membersList:"Members",membersList_admin:"Admin",moreMenu:"See more options",overlay_close:"Close",pageLayout_error:"An error occurred while rendering this page. Please refresh the page or try again later.",passwordRules_intro:"We advise you not to use your name or email in your password.",passwordRules_rule_label:"Password",passwordRules_rule_8Characters:"must be longer than 8 characters",passwordRules_rule_numberSymbol:"must include a number and a symbol",passwordRules_rule_lowercaseUppercase:"must include both lower and upper case characters",passwordRules_notMet:"Your password does not meet this requirement",progressBar:"{number}% loaded",ratings_text:"Rate answer",ratings_stars:"{number} out of {total}",ratings_low:"this is incorrect or confusing",ratings_high:"this is a fantastic answer",ratings_success:"Thank you!",search_label:"Search for:",search_placeholder:"Ask Apolitical",search_clear:"Clear search",search_cta:"Search",signup_title:"Sign up",signup_full_name:"Full name",signup_full_name_placeholder:"Lionel Messi",signup_email_address:"Work email",signup_email_address_placeholder:"lionel.messi@argentina.gov",signup_job_title:"Job title",signup_job_title_placeholder:"e.g. Senior Policy Advisor",signup_organization:"Organisation",signup_organization_placeholder:"e.g. Department of Justice",signup_url:"Link to official government bio / LinkedIn <small>(optional)</small>",signup_url_placeholder:"https://organisation.com/bio",signup_expectation:"What do you want to know<small>Optional, but we will use your response to build the session!</small>",signup_expectation_placeholder:"What do you want to know?",signup_terms:"I accept Apolitical's <terms>Terms of Service</terms>, <privacy>Privacy Policy</privacy> and that I'll get essential emails for my use of Apolitical",signup_error:"We're really sorry, but we've had a problem trying to sign you up. This could be an issue with our system, so we suggest you try again later.",signup_button_join:"Join for free",signup_button_login:"Log in",signup_submitting:"Submitting form...",signup_success_title:"Thank you for applying to join Apolitical!",signup_success_text:"<p>Once we've vetted your application, you'll get a secure login link to help you get started.</p><p>Please note that trust is everything to our community, so you can't login until your identity has been verified.</p>",sharedLinks_copy_text:"Copy link",tags_community:"From the community",tooltip_loading:"Loading..."},Cr={languageSwitcher_label:"Me gustaría leer este artículo en...",languageSwitcher_translation_original:"idioma original",languageSwitcher_translation_human:"traducido por un humano",languageSwitcher_translation_machine:"traducido por máquina",languageSwitcher_disclaimer:"Este contenido fue traducido automáticamente y ocasionalmente tendrá errores de género u otras traducciones directas. Estamos intentando resolver este problema, pero mientras tanto, si notas algún error grave, escríbenos a <link>{email}</link>"},Pr={collapsibleSection_summary:"En savoir plus",languageSwitcher_label:"Je voudrais lire cet article dans...",languageSwitcher_translation_original:"langue originale",languageSwitcher_translation_human:"traduit par un humain",languageSwitcher_translation_machine:"traduit par machine",languageSwitcher_disclaimer:"Ce contenu est traduit automatiquement et contiendra d’évantuelles erreurs de genre ou d’autres traductions directes. Nous essayons de résoudre ce problème, mais en attendant, si vous remarquez une erreur importante, faites-le nous savoir à <link>{email}</link>"},Ar={languageSwitcher_label:"Eu gostaria de ler este artigo em...",languageSwitcher_translation_original:"linguagem original",languageSwitcher_translation_human:"traduzido por um humano",languageSwitcher_translation_machine:"traduzido por máquina",languageSwitcher_disclaimer:"Este conteúdo foi traduzido automaticamente e, ocasionalmente, poderão ocorrer erros de linguagem de gênero ou outras traduções diretas. Estamos tentando resolver isso, porém se perceber algo errado por favor nos avise em <link>{email}</link>"},Rr=Object.freeze(Object.defineProperty({__proto__:null,en:St,es:Cr,fr:Pr,pt:Ar},Symbol.toStringTag,{value:"Module"})),ae=(e,t,n,s,o={})=>{let l="";return`${t}_${n}`in St?l=e({id:`${t}_${n}`},o):l=e({id:t},{[s]:n,...o}),l},Nr=(e,t,n)=>{if(!e||e===0)return"0";t||(t=0),n||(n=["k","m","b","t"]);let s=e.toString();t=Math.pow(10,t);for(let o=n.length-1;o>=0;o--){const l=Math.pow(10,(o+1)*3);if(l<=e){e=Math.round(e*t/l)/t,e===1e3&&o<n.length-1&&(e=1,o++),s=`${e}${n[o]}`;break}}return s},pn=(e,t)=>g.Children.map(e,n=>g.cloneElement(n,{...t})),Dr=e=>e.replace(/\s+/g,"").length>0,G=({variant:e="primary",size:t="medium",styling:n={muted:!1,fullWidth:!1},icon:s=!1,href:o=!1,element:l="button",onClick:m=!1,className:a="",disabled:i=!1,screenreaderText:u=!1,children:d=!1,...f})=>{const _=Se(typeof t=="object");if(typeof t=="object"&&typeof _=="number"){const S=Object.assign({},t),E=mn(Object.keys(S));t=fn(_,E,S)}const h=[];typeof t=="string"&&h.push(t),s&&(h.push("icon"),typeof s=="object"?(h.push(s.icon),s.position?h.push(s.position):h.push("left"),s.hover&&h.push(`hover_${s.hover}`),s.animate&&(h.push("animate"),typeof s.animate=="string"&&h.push(s.animate))):(h.push(s),!s.includes("right")&&!s.includes("left")&&h.push("left"))),n.muted&&h.push("muted"),n.fullWidth&&h.push("full-width");const y={...f,className:j(e,a,h,{"no-text":!d,disabled:i,button:o}),onClick:S=>{(!o||o[0]==="#")&&m&&(S.preventDefault(),S.stopPropagation()),m&&m(S)},disabled:typeof i=="object"&&"isClickable"in i?!i.isClickable:i};return o&&(l="a",y.href=o),g.createElement(l,y,d||(u?r.jsx(J,{showOnFocus:!1,children:u}):null))},Ee=({buttons:e,className:t="",...n})=>{const s=e.length>1?"ul":"p",o=e.map((l,m)=>s==="p"?r.jsx(G,{...l},m):r.jsx("li",{children:r.jsx(G,{...l})},m));return g.createElement(s,{className:j("button-wrapper",t),...n,children:o})};const Ue=({maxWidth:e=!1})=>{const t=e?{"--max-width":`${e/16}rem`}:{};return r.jsx("hr",{className:j({"has-max-width":e}),style:t})},Te=({href:e,children:t,fallbackElement:n,className:s="",onClick:o,gtmContext:l,gtmType:m,...a})=>{if(e){const i={...a};return o&&(i.onClick=o),l&&(i["data-gtm-event-context"]=l),m&&(i["data-gtm-event-type"]=m),r.jsx("a",{href:e,className:j("gtm-trackable",s),...i,children:t})}return n?g.createElement(n,{children:t,className:s,...a}):t},Zt={card:{range:[{height:320,width:320},{height:425,width:687},{height:510,width:768}],sizes:"(min-width: 1024px) 720px, 30vw"},responsiveCard:{range:[{height:125,width:200},{height:188,width:300},{height:313,width:500}],sizes:"(min-width: 1024px) 720px, 30vw"},banner:{range:[{height:124,width:425},{height:320,width:768},{height:510,width:1368}],sizes:"(min-width: 1024px) 975px, 50vw"},feed:{range:[{height:270,width:124},{height:320,width:425},{height:425,width:687}],sizes:"(min-width: 1024px) 510px, 20vw"},fallback:{range:[{height:124,width:375},{height:320,width:687},{height:510,width:990}],sizes:"(min-width: 1024px) 885px, 35vw"},thumbnail:{range:[{height:124,width:124},{height:320,width:320},{height:510,width:510}],sizes:"(min-width: 1024px) 453px, 20vw"}},Fr=({aspect:e,range:t,sizes:n})=>{const{range:s,sizes:o}=e?Zt[e]:Zt.fallback;return{range:t&&t.length>0?t:s,sizes:n||o}},Ir=({format:e,height:t,query:n,width:s})=>{let o=`w=${s}&h=${t}`;return o=e?`${o}&fm=${e}`:o,o=n?`${o}&${n}`:o,o},at=({format:e,range:t,url:n,query:s})=>t.map(({height:o,width:l})=>`${n}?${Ir({format:e,height:o,query:s,width:l})} ${l}w`).join(", ");const hn=({image:e,className:t,testId:n})=>{const{description:s,height:o,type:l,query:m,url:a,width:i,loading:u,decoding:d,fetchPriority:f}=e,{range:p,sizes:_}=Fr(e),h=at({format:"avif",query:m,range:p,url:a}),y=at({format:"webp",query:m,range:p,url:a}),S=at({format:"",query:m,range:p,url:a});return r.jsxs("picture",{className:t,children:[l!=="image/gif"&&r.jsx("source",{type:"image/avif",srcSet:h,sizes:_,"data-testid":"source"}),r.jsx("source",{type:"image/webp",srcSet:y,sizes:_,"data-testid":"source"}),r.jsx("img",{srcSet:S,sizes:_,src:a,alt:s,loading:u||"lazy",decoding:d||"async",fetchpriority:f||"auto",width:i,height:o,"data-testid":n||"image"})]})};let ke=!1;const gn=({isOpen:e=!1,isLoading:t=!1,children:n})=>{const s=M.useIntl(),o=g.useRef(null),[l,m]=g.useState("hidden");g.useEffect(()=>{const i=o.current;if(i)return i.addEventListener("transitionend",a),()=>{i.removeEventListener("transitionend",a)}},[]);const a=({propertyName:i})=>{i==="opacity"&&(ke!==!1&&clearTimeout(ke),m(u=>u==="opening"?"open":u==="closing"?"closed":u==="closed"?"hidden":u))};return pe(()=>{ke!==!1&&clearTimeout(ke);let i="open";e?m("opening"):(m("closing"),i="hidden"),ke=setTimeout(()=>{m(i)},300)},[e]),r.jsx("aside",{ref:o,className:j("tooltip text-medium",l,{loading:t}),hidden:l==="hidden",children:t?r.jsx("p",{children:s.formatMessage({id:"tooltip_loading"})}):typeof n=="string"?r.jsx("p",{children:n}):n})};const Et=({children:e,className:t="",...n})=>r.jsx("section",{className:j("full-width-section",t),...n,children:e});const Br=({text:e,buttons:t,className:n=""})=>{const s=[];return t.forEach(o=>{s.push({href:o.link,variant:"secondary",size:{mobile:"medium",1024:"large"},className:"gtm-trackable","data-gtm-event-type":"download-click","data-gtm-event-context":o.eventContext||"Download",target:"_blank",children:o.text})}),r.jsx(Et,{className:j("download-section",n),children:r.jsxs(r.Fragment,{children:[g.createElement(typeof e=="string"?"h2":e.element,{className:"text"},typeof e=="string"?e:e.text),r.jsx(Ee,{buttons:s})]})})};const Or=({title:e=!1,logos:t=[],className:n=""})=>{const s=t.length;if(s===0)return null;const o={element:typeof e=="object"?e.element:"h2",text:typeof e=="string"?e:typeof e=="object"?e.text:""};return r.jsxs("div",{className:j("logos",n),children:[e&&g.createElement(o.element,{className:"title"},o.text),r.jsx("ul",{className:j({"two-col":s===2||s===4,"three-col":s===5||s<=10&&s%3===0}),children:t.map(({logo:l,nameOfBusiness:m,link:a=!1,description:i=!1},u)=>{if(!l||!l.url)return null;const d=r.jsx("img",{src:l.url,width:l.width||"auto",height:l.height||"auto",alt:m});return r.jsxs("li",{children:[r.jsx("p",{className:"img-wrapper",children:a?r.jsx("a",{href:a,target:"_blank",rel:"nofollow noreferrer noopener",children:d}):d}),i&&r.jsx("small",{children:i})]},window.btoa(`${l.url}_${u}`))})})]})};const Lr=["small","span","strong","em","p","h1","h2","h3","h4","h5","h6","blockquote","q"],Hr=({content:e,image:t,variant:n="default",spacing:s="normal",cta:o,children:l})=>{const m=["eyebrow","title","text"],a={eyebrow:"small",title:"h1",text:"p"},i={};return m.forEach(u=>{if(!e[u]){i[u]=!1;return}if(typeof e[u]=="object"){i[u]=e[u];const{text:d,element:f}=e[u];if(f&&Lr.includes(f.toLowerCase()))return;i[u]={text:d,element:a[u]};return}i[u]={text:e[u],element:a[u]}}),o&&o.link&&o.link[0]==="#"&&(o.props||(o.props={}),o.props.onClick=u=>{u.preventDefault(),u.stopPropagation();const d=document.getElementById(o.link.substring(1));d&&d.scrollIntoView({behavior:"smooth"})}),r.jsx(Et,{className:j("banner-section",n,s,{"has-image":t,"has-extra-spacing":s==="normal"&&i.eyebrow&&i.title}),children:r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"content-wrapper",children:[m.map(u=>{if(i[u]&&typeof i[u]=="object"){const{text:d,element:f=""}=i[u];return g.createElement(f.toLowerCase(),{key:u,className:u},d)}return null}),l,o&&o.text&&o.link&&r.jsx(G,{variant:t||n==="light"?"primary":"secondary",size:{mobile:"medium",768:"large"},href:o.link,...o.props,children:o.text})]}),t&&r.jsx(hn,{image:{...t,aspect:"banner"}})]})})},Ur=g.memo(Hr);const Qr=({variant:e="primary",button:t=null,title:n,text:s,gtmContext:o})=>!n&&!s?null:r.jsxs("aside",{className:j("marketing-block",e),children:[n&&r.jsx("p",{className:"title",children:n}),s&&r.jsx("p",{children:s}),t&&r.jsx(G,{variant:"secondary",size:"medium",href:t.link,className:"gtm-trackable","data-gtm-event-context":o,"data-gtm-event-type":"learn-more-click",children:t.text})]}),Qe="https://storage.googleapis.com/apolitical-assets/",_e={general:"hello@apolitical.co",support:"concierge@apolitical.co","data-protection":{default:"dpo@apolitical.co",eu:"dpo.agl@apolitical.foundation"}},Wr="200,000+";const Tt=({label:e=!1,className:t="",children:n})=>{const s=M.useIntl();return r.jsxs("details",{className:j("collapsible-section",t),children:[r.jsx("summary",{children:e||s.formatMessage({id:"collapsibleSection_summary"})}),r.jsx("div",{className:"content",children:n})]})};const de=({variant:e="primary",className:t="",children:n,...s})=>r.jsx("div",{className:j("highlighted-text-box",e,t),...s,children:n});const $e=({variant:e="empty",text:t=!1,button:n=!1,className:s=""})=>{let o=n&&!!Object.keys(n).length;const l=typeof n=="object"&&"breakpoints"in n,m=Se(l);if(l&&typeof n=="object"&&typeof m=="number"){const f=Object.assign({},n.breakpoints),p=mn(Object.keys(f));o=fn(m,p,f)}const{breakpoints:a,text:i="",component:u,...d}=n;return r.jsx(de,{variant:"subtle",className:j("empty-state-box",e,s),children:r.jsxs(r.Fragment,{children:[t&&r.jsx(Ye,{options:{forceBlock:!0},children:t}),o&&typeof n=="object"&&(u||r.jsx(G,{...d,variant:n.variant?n.variant:"secondary",children:i}))]})})};const vt=({children:e,...t})=>r.jsx("p",{...t,children:e}),_n={q:vt,blockquote:vt};for(let e=1;e<=6;e++)_n[`h${e}`]={component:vt,props:{className:"title"}};const xn=({type:e="default",className:t="",heading:n=!1,children:s})=>r.jsxs("div",{className:j("helper-text-box text-small",e,t),children:[n&&r.jsx("p",{className:"title",children:n}),typeof s=="string"?r.jsx(Ye,{options:{wrapper:g.Fragment,forceBlock:!0,overrides:_n},children:s}):r.jsx("p",{children:s})]});const zr=({className:e="",show:t=!1,hide:n=!1,text:s,children:o})=>{const l=M.useIntl(),m=g.useRef(null),[a,i]=g.useState(""),[u,d]=g.useState("closed");g.useEffect(()=>{const _=m.current;if(_)return _.addEventListener("transitionend",f),()=>{_.removeEventListener("transitionend",f)}},[]),g.useEffect(()=>{if(!s||typeof s!="string")return;const _=s.split(`
36
+ `);i(_.length<3?`${s.substring(0,400)}...`:_.slice(0,3).join(`
37
+ `))},[s]),g.useEffect(()=>{u==="ready-to-close"&&d("closing")},[u]);const f=({propertyName:_})=>{_==="max-height"&&d(h=>h==="opening"?"open":h==="closing"?"closed":h)};if(!s)return null;const p=["opening","open"].includes(u);return r.jsxs(de,{variant:"subtle",className:j("hide-show-text-box",e),children:[r.jsxs("div",{ref:m,className:j("content",u),children:[r.jsx(Ye,{options:{forceBlock:!0},children:u==="closed"?a:s}),u!=="closed"&&o]}),r.jsx("p",{className:"cta",children:r.jsx(G,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:j({"rotate-180":p}),onClick:()=>{d(p?"ready-to-close":"opening")},children:p?n||l.formatMessage({id:"hideShowTextBox_hide"}):t||l.formatMessage({id:"hideShowTextBox_show"})})})]})},Vr=()=>g.Fragment,Yr=({children:e})=>r.jsx(de,{variant:"secondary",children:e}),Gr=["span","strong","h1","h2","h3","h4","h5","h6","p"],qr=({children:e})=>{const t=M.useIntl();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const s=[];for(const l of g.Children.toArray(e))if(!(!l||typeof l=="string"||typeof l=="number"))if(g.isValidElement(l)&&l.type==="summary"){if(l.props&&l.props.children){for(const m of g.Children.toArray(l.props.children))if(!(!m||typeof m=="string"||typeof m=="number")&&g.isValidElement(m)){const a=m.type;if(Gr.includes(a)){for(n=m.props.children;typeof n!="string"&&(Array.isArray(n)&&n[0].props&&n[0].props.children&&n[0].props.children[0]);)n=n[0].props.children[0];break}}}}else s.push(l);const o=n?n.toString():"";return r.jsx(Tt,{label:o,className:["Sources","Resources"].includes(o)?"discrete-links":"",children:s.map(l=>l)})},Jr=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return r.jsx(de,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return r.jsx(de,{variant:"primary",children:e});case"pink-textbox":return r.jsx(de,{variant:"tertiary",children:e});default:return r.jsx("div",{...t,children:e})}return r.jsx("div",{...t,children:e})},Xr=e=>{const t=M.useIntl(),n=Date.now().toString();let s="default";const o=e.src;return o.includes("youtube")||o.includes("vimeo")?s="video":o.includes("riddle")||o.includes("sli.do")?s="poll":o.includes("padlet")&&(s="padlet"),r.jsxs(r.Fragment,{children:[r.jsx(J,{children:r.jsx("a",{href:`#content-after-iframe-${n}`,children:t.formatMessage({id:`markdown_skip${s==="default"?"":`_${s}`}`})})}),r.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${s==="default"?"":`_${s}`}`})}),r.jsx("span",{id:`content-after-iframe-${n}`,tabIndex:-1})]})},Kt=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},Zr=({children:e,...t})=>{let n={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(n.target="_blank");let s=e,o=!1;for(const l of g.Children.toArray(e))if(!(!l||typeof l=="string"||typeof l=="number")&&g.isValidElement(l)){const m=l.type;if(["button","center","span","strong"].includes(m)&&l.props&&l.props.children&&l.props.children[0])for((m==="button"||Kt(l.props.children[0])==="button")&&(o=!0),s=l.props.children[0];s&&typeof s!="string"&&!(typeof s=="boolean"||typeof s=="number"||!g.isValidElement(s));)if(s.props&&s.props.children&&s.props.children[0])s=s.props.children[0],s&&Kt(s)==="button"&&(o=!0);else break}return o?(n={...n,className:"button primary medium"},r.jsx("p",{className:"center",children:r.jsx(G,{variant:"primary",size:"medium",...n,children:s})})):r.jsx("a",{...n,children:s})},bn=({children:e})=>r.jsx("span",{children:e});const yt=({className:e="",options:t={},children:n})=>{n=n.replace(/^<br\/?>/,"");const s={wrapper:g.Fragment,forceBlock:!0,overrides:{a:Zr,CollapsibleSection:Tt,TextBox:de,CaseStudy:Yr,style:Vr,details:qr,div:Jr,iframe:Xr}};return r.jsx("div",{className:j("markdown-text",e),children:r.jsx(Ye,{options:{...s,...t},children:n})})};const vn=({size:e="medium",variant:t="default",className:n="",children:s})=>r.jsx("span",{className:j("pill",e,t,n),children:s});const We=({element:e="p",children:t=null,className:n="",...s})=>g.createElement(e,{...s,className:j("status-banner text-small",n),"aria-live":"assertive"},t);const Kr=({progress:e=0,text:t=!1,className:n=""})=>{const s=M.useIntl(),o=e>75?100:e>50?75:e>25?50:e>5?25:0,l={"--progress":`${e}%`};return r.jsx("span",{className:j(`progress-bar section-${o}`,n),style:l,children:r.jsx(J,{children:t?`${e} ${t}`:s.formatMessage({id:"progressBar"},{number:e})})})},yn=g.memo(Kr);const it="loadingBlock_",es=({progress:e=0,steps:t=!1,className:n=""})=>{const s=M.useIntl();t||(t={0:{text:s.formatMessage({id:`${it}loading`})},75:{text:s.formatMessage({id:`${it}almostDone`})},100:{text:s.formatMessage({id:`${it}complete`})}});let o=null;const l=Object.keys(t);for(let a=0;a<l.length&&!(e<parseInt(l[a]));a++)o=l[a];const m=o&&t[o].icon?{"--icon":`url(${Qe}icons/${t[o].icon}.svg)`}:{};return r.jsxs(de,{className:j("loading-block",n,{"has-icon":o&&t[o].icon}),variant:"subtle",style:m,children:[o&&r.jsx("span",{className:"step",children:t[o].text}),r.jsx(yn,{progress:e})]})},ts=g.memo(es);const ie=({element:e="div",className:t="",...n})=>r.jsx(jt,{element:e,className:j("loading-placeholder",t),...n});const kt={header:["logo","link","link","search"],sidebar:["text","text","text","text","text"],"cards-section":["subtitle","cards"],cards:["card","card","card","card"],"overview-page":["header","sidebar","title","text","cards-section","cards-section","footer"]},kn=(e,t)=>e in kt?r.jsx("div",{className:e,children:kt[e].map((n,s)=>kn(n,s))},t):r.jsx(ie,{className:e},t),wn=({layout:e="overview-page"})=>r.jsx("div",{className:j("loading-state",e),children:kt[e].map((t,n)=>kn(t,n))}),jn=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):""},De=["#5AB6A3","#A2D7AF","#806056","#3962B3"],ns=e=>{const t=Math.ceil(26/De.length),n=jn(e).toLowerCase();if(n==="")return De[0];const s=n.charCodeAt(0)-96;for(let o=0;o<De.length;o++)if(s<=t*(o+1))return De[o]};const en=256,Ge=({className:e="",src:t="",name:n,alt:s,width:o=en,height:l=en,...m})=>{const[a,i]=g.useState(!1),u=g.useRef(null);g.useEffect(()=>{const f=u.current;if(!f)return;const p=f.getContext("2d");if(!p)return;const _=o,h=l;typeof window<"u"&&window.devicePixelRatio&&(f.width=_*window.devicePixelRatio,f.height=h*window.devicePixelRatio,p.scale(window.devicePixelRatio,window.devicePixelRatio)),p.fillStyle=ns(n),p.fillRect(0,0,_,h),p.font=`${_/3}px Arial`,p.textAlign="center",p.fillStyle="white",p.fillText(jn(n),_/2,h/1.6)},[n]);let d=!1;return t&&t!==""&&!a&&(t.includes("http")||t.includes("//"))&&(d=!0),r.jsx("figure",{className:j("profile-picture",e,{error:a}),...m,children:d?r.jsx("img",{src:t,alt:s||n,onError:()=>{i(!0)},width:o,height:l}):r.jsx("canvas",{ref:u})})},$t=e=>e==="apolitical"?{image:`${Qe}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${Qe}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},rs=({role:e="",organisation:t="",country:n="",maximumCharacters:s=80})=>{const o=e!=="",l=t!=="",m=n!=="";if(!o&&!l&&!m)return"";const a=`${e}${o&&l?` — ${t}`:t}`;let i=`${a}${(o||l)&&m?`, ${n}`:n}`;return i.length>s&&(i=a),i.length>s&&(i=wt(i,s)),i};const qe=({element:e="div",member:t="community",additionalContent:n=!1,gtmContext:s="member",gtmType:o="member-click",className:l=""})=>{const m=M.useIntl(),a=$t(t);a.name||(a.name=m.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:i,url:u,image:d}=a,f=rs(a),p=n&&n.createdAt?$r(n.createdAt):!1,_=n&&n.createdAt?Tr(n.createdAt):"";return g.createElement(e,{className:j("member text-medium",l),children:r.jsxs(Te,{href:u,gtmType:o,gtmContext:s,onClick:h=>{h==null||h.stopPropagation()},children:[r.jsx(Ge,{name:i,src:d}),r.jsxs("p",{className:"details",children:[r.jsx("strong",{children:i}),n&&r.jsxs("span",{className:"additional-content",children:[n.createdAt&&p&&r.jsx("span",{className:"date",title:_,"aria-label":_,children:m.formatMessage({id:`dates_${p.path}`},{number:p.number})}),n.didEdit&&r.jsx("em",{children:m.formatMessage({id:"discussion_edited"})})]}),f&&r.jsx("small",{children:f})]})]})})};const tn={small:24,medium:48},Sn=({element:e="div",contributors:{total:t,data:n}={total:void 0,data:[]},styling:{showText:s,size:o,showGap:l,showPlaceholders:m}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:a=2,className:i=""})=>{const u=M.useIntl();return!n||n.length===0?null:g.createElement(e,{className:j("contributors",i,o,{"has-gap":l}),children:r.jsxs(r.Fragment,{children:[r.jsx("ul",{children:n.map((d,f)=>{let p,_="";if(f<a){const{name:h="",image:y=""}=$t(d);if(m)return r.jsx(ie,{element:"li",className:"contributor"},f);p=r.jsx(Ge,{name:h,src:y,width:tn[o||"medium"],height:tn[o||"medium"]})}else if(f===a){const h=(t||n.length)-a;p=r.jsxs("small",{className:j({"large-number":h>99}),children:["+",Nr(h,0)]}),_="number-left"}return p?r.jsx("li",{className:j("contributor",_),children:p},f):null})}),s&&r.jsx("span",{className:"label",children:typeof s=="string"?s:n.length===1?typeof n[0]=="string"?u.formatMessage({id:`member_${n[0]}`}):wt(n[0].name||"",20):null})]})})},En=({children:e,showDevTools:t=!0})=>{const n=new K.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:6e4}}});return r.jsxs(K.QueryClientProvider,{client:n,children:[e,t&&r.jsx(pr.ReactQueryDevtools,{initialIsOpen:!1})]})};var ss=g.createContext({client:He});function os(e){var t=e.children,n=e.client,s=e.apiKey,o=e.options,l=g.useMemo(function(){return n&&s&&console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."),n&&o&&console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."),n||(s&&(He.__loaded&&console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."),He.init(s,o)),He)},[n,s]);return g.createElement(ss.Provider,{value:{client:l}},t)}const Tn=({children:e,user:t})=>r.jsx(os,{apiKey:process.env.REACT_APP_PUBLIC_POSTHOG_KEY,options:{api_host:process.env.REACT_APP_PUBLIC_POSTHOG_HOST,autocapture:!1,secure_cookie:!0,bootstrap:{distinctID:(t==null?void 0:t.id)||"00000000-0000-0000-0000-000000000000",isIdentifiedID:!!(t!=null&&t.id)}},children:e}),$n=({children:e,locale:t,messages:n})=>{const s=t||"en",o={...Rr[s],...n||{}};return r.jsx(M.IntlProvider,{locale:s,messages:o,children:e})},me=g.createContext(null),Mn=({children:e,user:t})=>r.jsx(me.Provider,{value:t,children:e}),as=({children:e,intl:t,user:n})=>r.jsx($n,{locale:t==null?void 0:t.locale,messages:t==null?void 0:t.messages,children:r.jsx(Mn,{user:n,children:r.jsx(En,{children:r.jsx(Tn,{user:n,children:e})})})});const lt="joinCommunityButton",Mt=({isMember:e=!1,isShort:t=!1,functions:{join:n,leave:s}={join:()=>{},leave:()=>{}}})=>{const o=M.useIntl(),l=g.useContext(me),m=l&&typeof l.id=="string",[a,i]=g.useState(e),[u,d]=g.useState(e?"joined":"notJoined");g.useEffect(()=>{u==="joining"?d("joined"):u==="leaving"&&d("notJoined")},[a]);const f={},p={};return a&&u!=="leaving"&&(f["data-hover-text"]=o.formatMessage({id:`${lt}_leave`}),f["aria-label"]=o.formatMessage({id:`${lt}_member_aria`}),p["aria-hidden"]="true"),r.jsx(G,{variant:a?"secondary":"primary",size:"medium",styling:{fullWidth:!0},icon:a&&u!=="leaving"?{icon:"tick",position:"left"}:!1,onClick:async _=>{m&&(_.currentTarget.blur(),a?(d("leaving"),typeof s=="function"&&await s()):(d("joining"),typeof n=="function"&&await n()),i(!a))},className:j("join-community-button",u,{active:u==="joining"}),disabled:!m,...f,children:r.jsx("span",{className:"text",...p,children:o.formatMessage({id:`${lt}${["joining","leaving"].includes(u)?`_${u}`:a?"_member":t?"_short":""}`})})})};const ct="communityDetails_",is=({isMember:e=!1,slug:t,members:{number:n,data:s}={number:void 0,data:[]},className:o="",...l})=>{const m=M.useIntl(),a=n||(s==null?void 0:s.length)||0;return r.jsxs("div",{className:j("community-details",o),children:[r.jsx(Ue,{}),r.jsxs("div",{className:"member-details",children:[r.jsxs("div",{className:"top",children:[r.jsxs("h3",{children:[m.formatMessage({id:`${ct}members`}),r.jsx("span",{className:"count",children:a})]}),r.jsx("p",{className:"text-small",children:r.jsx("a",{href:`/communities/${t}/members`,children:m.formatMessage({id:`${ct}viewAll`})})})]}),r.jsx(Sn,{contributors:{total:n,data:s!=null&&s.length?s:[{},{},{},{},{}]},styling:{size:"medium",showGap:!0,showPlaceholders:a===0},cutoff:5})]}),r.jsx(Mt,{isMember:e,...l}),e&&r.jsx(G,{variant:"primary",icon:{icon:"plus"},styling:{fullWidth:!0},children:m.formatMessage({id:`${ct}invite`})})]})};const ls=({breadcrumbs:e,cutoff:t=20,className:n=""})=>{const s=M.useIntl();return r.jsxs(r.Fragment,{children:[r.jsx(J,{element:"p",children:s.formatMessage({id:"breadcrumbs_label"})}),r.jsx("ul",{className:j("breadcrumbs text-small",n),children:e.map(({text:o,href:l,current:m=!1},a)=>r.jsxs("li",{children:[m&&r.jsx(J,{element:"span",children:s.formatMessage({id:"breadcrumbs_currentPage"})}),r.jsx(Te,{href:m?void 0:l,children:wt(o,t)})]},`${window.btoa(o)}_${a}`))})]})};const cs=({options:e,allOption:t=!1,allowMultiple:n=!0,onChange:s=()=>{},className:o=""})=>{const l=M.useIntl(),m=t?[{id:"all",text:typeof t!="boolean"&&t.text||l.formatMessage({id:"filters_all"})},...e]:e,[a,i]=g.useState(t?["all"]:[]),u=(d,f)=>{let p=[];a.includes(d)?p=a.filter(_=>_!==d):d==="all"?p=["all"]:n?p=[...a.filter(_=>_!=="all"),d]:p=[d],i(_=>(s&&typeof s=="function"&&s({current:p,previous:_}),p)),f&&typeof f=="function"&&f()};return r.jsx("ul",{className:j("filters",o),children:m.map(({id:d,text:f,disabled:p=!1,callback:_=()=>{}})=>{let h={};return p&&(h={disabled:!0,"aria-label":l.formatMessage({id:"filters_disabled"},{name:f})}),r.jsx("li",{children:r.jsx("button",{className:j(d,{selected:a.includes(d)}),onClick:y=>{y.preventDefault(),y.stopPropagation(),u(d,_)},...h,children:f})},d)})})},us=(e,t)=>{const n=String(e);if(!t||!t.length)return`/${n}`;let s="";return t.forEach(({url:o,position:l})=>{l==="before-lang"?s+=`/${o}`:(s.includes(`/${n}/`)||(s+=`/${n}`),s+=`/${o}`)}),s.includes(`/${n}/`)||(s+=`/${n}`),s};const ut={en:"English",es:"Español",fr:"Français",pt:"Português"},Fe="languageSwitcher_",ds=({currentLanguage:e,isOriginalLanguage:t=!1,isHumanTranslation:n=!1,translations:s,onChange:o=()=>{},urlParts:l,variant:m="default",label:a,className:i=""})=>{const u=M.useIntl(),[d,f]=g.useState(e);if(g.useEffect(()=>{e!==d&&f(e)},[e]),!s||!Object.values(s).some(y=>y&&y.post_name))return null;const _=Object.keys(s),h=d!==e;return r.jsxs("div",{className:j("language-switcher text-small",m,i),children:[r.jsxs("nav",{children:[m!=="short"&&r.jsx("p",{children:a||u.formatMessage({id:`${Fe}label`})}),r.jsx("ul",{children:_.map(y=>{if(!ut[y])return null;let S={className:y};return d===y?S["aria-label"]=u.formatMessage({id:`${Fe}selected`},{language:ut[y]}):S={...S,href:us(y,l),onClick:E=>{E.preventDefault(),E.stopPropagation(),f(y),o(y)}},r.jsx("li",{children:r.jsx(Te,{...S,fallbackElement:"span",children:ut[y]})},y)})}),m!=="short"&&!h&&r.jsx("p",{children:u.formatMessage({id:`${Fe}translation_${t?"original":n?"human":"machine"}`})})]}),m!=="short"&&!h&&!t&&!n&&r.jsx("small",{children:u.formatMessage({id:`${Fe}disclaimer`},{email:_e.support,link:y=>{const S=`mailto:${y}`;return r.jsx("a",{href:S,children:y})}})})]})};const dt=M.createIntl({locale:"en",messages:St}),Cn=({page:e=1,length:t=0,limit:n=10,loadNextPage:s=()=>{},icon:o=!1,messages:l={button:dt.formatMessage({id:"loadMore_button"}),endOfFeed:dt.formatMessage({id:"loadMore_endOfFeed"}),error:dt.formatMessage({id:"loadMore_error"})},className:m="",gtmContext:a="LoadMore"})=>{const[i,u]=g.useState(!1),[d,f]=g.useState(!1);if(t<=0||t<n*e)return null;const p=async _=>{try{await s(_)}catch(h){h instanceof Error&&h.message&&h.message.includes("Cannot read items")?f(!0):u(!0)}};return r.jsxs("footer",{className:j("load-more",m),children:[i&&r.jsx("p",{className:"error",children:l.error}),d?r.jsx("p",{children:l.endOfFeed}):r.jsx(G,{variant:"secondary",icon:o,onClick:p,"data-gtm-event-context":a,"data-gtm-event-type":"load-more-click",className:"gtm-trackable","data-testid":"load-more-button",children:l.button})]})};let Ie=!1;const Pn=({element:e="div",id:t="more-menu",options:n,className:s=""})=>{const o=M.useIntl(),l=g.useRef(null),[m,a]=g.useState(!1),i=u=>{l.current&&u.target instanceof HTMLElement&&!l.current.contains(u.target)&&a(!1)};return g.useEffect(()=>(document.addEventListener("click",i,!0),()=>{document.removeEventListener("click",i,!0)})),g.createElement(e,{ref:l,className:j("more-menu text-medium",s),children:r.jsxs(r.Fragment,{children:[r.jsx(G,{variant:"tertiary",size:"medium",icon:{icon:"ellipsis"},onClick:()=>a(!m),"aria-haspopup":"true","aria-expanded":m,"aria-controls":t,screenreaderText:o.formatMessage({id:"moreMenu"})}),r.jsx("ul",{id:t,hidden:!m,children:n.map(({href:u,onClick:d,text:f,icon:p,..._},h)=>{const y={..._,onClick:S=>{a(!1),typeof d=="function"&&d(S)},onFocus:()=>{Ie&&(clearTimeout(Ie),Ie=!1)},onBlur:()=>{Ie=setTimeout(()=>{a(!1)},100)}};return u&&(y.href=u),r.jsx("li",{children:r.jsx(G,{variant:"tertiary",size:"medium",icon:p?{icon:p,position:"left"}:!1,...y,children:f})},`${window.btoa(f)}_${h}`)})})]})})};const Ct=({variant:e="default",version:t="default",className:n="",...s})=>r.jsx("p",{className:"logo-wrapper",children:r.jsx("a",{href:"/home/",className:j("logo",e,t,n),...s,children:r.jsx(J,{children:r.jsx(M.FormattedMessage,{id:"apolitical"})})})});const ms={"2-1":901},fs=({layout:e="2-1",hideOnMobile:t=!1,className:n="",children:s})=>{const o=Se(!0);let l=s;return g.Children.count(s)===1&&(l=g.Children.toArray(s)[0],l.props&&(l=l.props.children)),r.jsx("section",{className:j("columns",`layout-${e}`,n),children:g.Children.map(l,(m,a)=>t!==!1&&a===t&&o&&o<ms[e]?null:m)})};const mt="cookieBanner_",ft=["apol-cookie-banner","apolitical-performance-cookie-consent","functional-cookie-consent"],pt=new Date(Date.now()+12*30*24*60*60*1e3),An=()=>{const e=M.useIntl(),[t,n,s]=on.useCookies(ft),[o,l]=g.useState(!t["apol-cookie-banner"]),m=()=>{ft.forEach(d=>{n(d,!0,{path:"/",expires:pt,domain:d==="apolitical-performance-cookie-consent"?".apolitical.co":void 0})}),l(!1),window.location.reload()},a=()=>{n("apol-cookie-banner",!0,{path:"/",expires:pt}),ft.forEach(d=>{if(d==="apol-cookie-banner"){n(d,!0,{path:"/",expires:pt});return}s(d)}),l(!1)};if(!o)return null;const i=[{id:"settings",href:"/pages/cookie-policy",gtmType:"policy-page"},{id:"reject",onClick:a,gtmType:"reject-all"},{id:"accept",onClick:m,gtmType:"accepted-all"}],u=[];return i.forEach(d=>{u.push({variant:d.href?"tertiary":"primary",href:d.href,onClick:d.onClick,className:"gtm-trackable","data-gtm-event-context":"cookie-banner","data-gtm-event-type":`cookie-${d.gtmType}-click`,children:e.formatMessage({id:`${mt}buttons_${d.id}`})})}),r.jsxs("aside",{id:"cookie-banner",className:"text-medium",children:[r.jsx("h6",{children:e.formatMessage({id:`${mt}title`})}),r.jsx("p",{children:e.formatMessage({id:`${mt}text`})}),r.jsx(Ee,{buttons:u})]})},ue={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:_e["data-protection"].default,gtmType:"email-dpo-link"},euDataProtection:{email:_e["data-protection"].eu,gtmType:"email-eu-dpo-link"}}},contact:{text:{order:["correspondence","registered","berlin","support","business"],correspondence:{address:!0},registered:{address:!0},berlin:{address:!0},support:{email:_e.support,gtmType:"concierge-email-click"},business:{email:_e.general,gtmType:"hello-email-click"}}},social:{order:["linkedin","twitter","facebook"],linkedin:{href:"https://www.linkedin.com/company/apolitical"},twitter:{href:"https://twitter.com/apoliticalco"},facebook:{href:"https://www.facebook.com/apoliticalco"}}};const xe="footer_",ze="SiteFooter",nn=({group:e})=>{const t=ue[e].order||[];let n=!1;return"text"in ue[e]&&(n=ue[e].text),r.jsxs(g.Fragment,{children:[r.jsx("p",{className:"pre-title",children:r.jsx(M.FormattedMessage,{id:`${xe}${e}`})}),Array.isArray(t)&&t.length>0&&r.jsx("ul",{className:"text-medium",children:t.map(s=>{if(["order","child","text"].includes(s))return null;const{href:o,gtmType:l}=ue[e][s],m={};return["legal"].includes(e)&&(m.target="_blank",m.rel="noopener"),r.jsx("li",{children:r.jsx("a",{href:o,className:"gtm-trackable","data-gtm-event-context":ze,"data-gtm-event-type":l,...m,children:r.jsx(M.FormattedMessage,{id:`${xe}${e}_${s}`})})},`${e}_${s}`)})}),typeof n!="boolean"&&"order"in n&&Array.isArray(n.order)&&r.jsx("dl",{className:"text-medium",children:n.order.map(s=>r.jsxs(g.Fragment,{children:[r.jsx("dt",{children:r.jsx(M.FormattedMessage,{id:`${xe}${e}_${s}`})}),r.jsxs("dd",{children:[typeof n!="boolean"&&n[s].address&&r.jsx("address",{children:r.jsx(M.FormattedMessage,{id:`${xe}${e}_${s}_address`,values:{br:r.jsx("br",{})}})}),typeof n!="boolean"&&n[s].email&&r.jsx("a",{href:`mailto:${n[s].email}`,className:"gtm-trackable","data-gtm-event-context":ze,"data-gtm-event-type":n[s].gtmType,children:n[s].email})]})]},`dl-${e}-${s}`))})]},e)},Pt=()=>r.jsx("div",{id:"footer",children:r.jsxs("div",{className:"wrapper",children:[r.jsx(jt,{element:"hr"}),r.jsx(Ct,{variant:"inverted",version:"full",className:"gtm-trackable","data-gtm-event-context":ze,"data-gtm-event-type":"logo-homepage-link"}),r.jsx("footer",{children:["platform","community","company","contact"].map(e=>r.jsxs("div",{className:"group",children:[r.jsx(nn,{group:e}),Object.keys(ue[e]).includes("child")&&r.jsx(nn,{group:ue[e].child})]},e))}),r.jsx("hr",{}),r.jsxs("div",{className:"sub-footer",children:[r.jsx("ul",{children:Array.isArray(ue.social.order)&&ue.social.order.map(e=>{const t=ue.social[e];return r.jsx("li",{className:e,children:r.jsx("a",{href:t.href,target:"_blank",rel:"noopener noreferrer",className:"gtm-trackable","data-gtm-event-context":ze,"data-gtm-event-type":"social-click",children:r.jsx("span",{className:"hidden",children:r.jsx(M.FormattedMessage,{id:`${xe}social_${e}`})})})},e)})}),r.jsx("small",{children:r.jsx(M.FormattedMessage,{id:`${xe}copyright`,values:{currentYear:new Date().getFullYear()}})})]})]})});const Be="emailHelperTextBox_",ps=({type:e,email:t,redirectPath:n,resendVerificationCode:s})=>{const o=M.useIntl(),[l,m]=g.useState({path:`${Be}default`,type:"default",link:{},mail:{},error:""}),[a,i]=g.useState(!1),u=g.useCallback(_=>{_.preventDefault(),_.stopPropagation();const h=y=>{m({path:`${Be}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:S=>u(S),href:"#","data-testid":"send-verify-email-click"},mail:{href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"ErrorVerifyingBox","data-gtm-event-type":"email-concierge-click"},error:y})};if(typeof s!="function"){h(o.formatMessage({id:`${Be}error_noFunction`}));return}i(!0),s(t).then(()=>{localStorage.setItem("email",t),window.location.href=n||"/signup/verify-email"}).catch(y=>{h(y.message)}).finally(()=>{i(!1)})},[t,n,s]);g.useEffect(()=>{let _=Be,h="default",y={},S={};switch(e){case"gov":_+="autoApproved",h="success";break;case"nonGov":_+="unrecognisedEmail",h="error",y={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":_+="pendingApproval",h="error",S={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":_+="emailUnverified",h="error",y={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:E=>u(E),"data-testid":"send-verify-email-click"};break;case"exists":_+="emailAlreadyExists",h="error",y={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},S={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:_+="default",y={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}m({...l,path:_,type:h,link:y,mail:S})},[e]);const d={};return["link","mail"].forEach(_=>{d[_]=Object.keys(l[_]).length?h=>r.jsx("a",{...l[_],children:h}):h=>h}),r.jsx(xn,{type:l.type,heading:a?!1:o.formatMessage({id:`${l.path}_title`}),children:a?r.jsxs(r.Fragment,{children:[r.jsx(ie,{element:"span"}),r.jsx(ie,{element:"span"})]}):o.formatMessage({id:`${l.path}_text`},{...d,strong:_=>r.jsx("strong",{children:_}),em:_=>r.jsx("em",{children:_}),br:r.jsxs(r.Fragment,{children:[r.jsx("br",{}),r.jsx("br",{})]}),error:l.error})})};const Oe="passwordRules_",Rn="isMoreThanEightCharacters",Nn="includesNumberAndSymbol",Dn="includesLowerAndUppercase",hs={[Rn]:"8Characters",[Nn]:"numberSymbol",[Dn]:"lowercaseUppercase"},gs=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const n=M.useIntl();return r.jsxs("aside",{className:j("password-rules",t),children:[r.jsx("small",{children:n.formatMessage({id:`${Oe}intro`})}),r.jsx("ul",{children:[Rn,Nn,Dn].map(s=>r.jsxs("li",{className:j({matches:e[s]}),children:[r.jsxs(J,{children:[n.formatMessage({id:`${Oe}rule_label`})," "]}),r.jsx("span",{children:n.formatMessage({id:`${Oe}rule_${hs[s]}`})}),!e[s]&&r.jsxs(J,{element:"strong",children:[" "," ",n.formatMessage({id:`${Oe}notMet`})]})]},`rule-${s}`))})]})},_s=g.memo(gs);const xs=({text:e={},topRating:t=5,functions:{createRating:n=()=>null,updateRating:s=()=>{},reportError:o=()=>{}},className:l="",hasLoaded:m=!1})=>{const a=M.useIntl(),[i,u]=g.useState({setUp:!1,id:null,rating:null,disabled:!0}),d=async()=>{try{const E=await n();u(x=>({...x,setUp:!0,id:E&&E.id,disabled:!1}))}catch(E){u(x=>({...x,setUp:!0,disabled:!0})),o(E)}};if(g.useEffect(()=>{m&&!i.setUp&&d()},[m]),!m)return r.jsx(ie,{className:"rating-placeholder"});const{id:f,rating:p,disabled:_}=i,h="ratings_",y={text:a.formatMessage({id:`${h}text`}),low:a.formatMessage({id:`${h}low`}),high:a.formatMessage({id:`${h}high`}),success:a.formatMessage({id:`${h}success`}),...e},S=async E=>{if(!(!f||_))try{u(x=>({...x,rating:E,disabled:!0})),await s({id:f,value:E})}catch(x){u($=>({...$,rating:null})),o(x)}finally{u(x=>({...x,disabled:!1}))}};return r.jsxs("div",{className:j("rating",l),children:[r.jsx("span",{className:"label",children:y[p?"success":"text"]}),r.jsx("ol",{children:Array.from(new Array(t).keys()).map(E=>{const x=E+1;return r.jsx("li",{className:j({selected:p&&x<=p}),children:r.jsx(G,{variant:"tertiary",size:"small",icon:{icon:`star${!p||x>p?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${a.formatMessage({id:`${h}stars`},{number:x,total:t})}${x===1||x===t?` - ${y[x===1?"low":"high"]}`:""}`,onClick:$=>{$.preventDefault(),$.stopPropagation(),S(x)},disabled:_})},`rating-${x}`)})})]})};const Fn=({id:e="search",className:t="",handleToggle:n=!1,defaultValue:s="",gtmContext:o="search-bar",gtmEvent:l="form-submission"})=>{const{searchIsOpen:m=!0,isDesktopVersion:a=!1}=n||{},i=M.useIntl(),u=g.useRef(null);pe(()=>{!n||a||!m||u.current&&u.current.focus()},[m]);const d=f=>{f.preventDefault(),f.stopPropagation(),!(!u.current||!u.current.value||u.current.value.length<1)&&(window.location.href=`/search?search=${encodeURIComponent(u.current.value)}`)};return r.jsx("form",{onSubmit:d,className:j("search-form gtm-trackable",t),"data-gtm-event-context":o,"data-gtm-event-type":l,children:r.jsx("fieldset",{id:`${e}-form`,hidden:n?!m:!1,role:"search",children:r.jsxs("p",{children:[r.jsx(J,{element:"label",htmlFor:e,children:i.formatMessage({id:"search_label"})}),r.jsx("input",{ref:u,type:"search",id:e,name:e,defaultValue:s,placeholder:i.formatMessage({id:"search_placeholder"}),onKeyDown:f=>{f.key==="Enter"&&d(f)}}),r.jsx("button",{className:"clear",onClick:f=>{f.preventDefault(),f.stopPropagation(),u.current&&u.current.value&&(u.current.value="")},children:r.jsx(J,{children:i.formatMessage({id:"search_clear"})})}),r.jsx("button",{className:"search",onClick:d,children:r.jsx(J,{children:i.formatMessage({id:"search_cta"})})})]})})})},O={timeouts:{},handlerCalled:{},getIsDesktopVersion:(e,t)=>{const n={navigation:{loggedIn:769,loggedOut:881},search:{loggedIn:961,loggedOut:1121}},s=l=>{const m=`logged${e?"In":"Out"}`;return t>=n[l][m]};let o={};return["navigation","search"].forEach(l=>{o[l]=s(l)}),o},shouldChangeHeaderIsVisible:(e,t,n)=>{Object.values(t).filter(o=>o===!0).length||n([{type:"headerIsVisible",value:e}])},handleMenus:({id:e,value:t,menus:n,dispatch:s})=>{if(n[e]===t||e==="account"&&t===!1&&n.navigation===!0)return;const o=Date.now();if(!t&&O.handlerCalled[e]&&o-O.handlerCalled[e]<500)return;O.handlerCalled[e]=o;let l=[{type:`menus.${e}`,value:t}];t===!0&&Object.keys(n).forEach(m=>{m===e||n[m]===!1||l.push({type:`menus.${m}`,value:!1})}),s(l)},findFirstChild:(e,t,n=!1)=>{if(!e||!e[0])return!1;for(let s=0;s<=e.length;s++){if(!e[s])continue;if(e[s][t]&&(!n||e[s][t].includes(n)))return e[s];if(!t.includes("."))continue;const o=an(e[s],t);if(!(typeof o>"u")&&(!n||o[t]&&o[t].includes(n)||o.value&&o.value.includes(n)||o.toString().includes(n)))return e[s]}return e[0].children?O.findFirstChild(e[0].children,t,n):!1},autoFocus:({menu:e,navigationRef:t,isDesktopVersion:n,focusElements:s,dispatch:o})=>{if(!t.current||!t.current.children)return;const l=n?"desktop":"default";if(s[e][l]){s[e][l].focus();return}let m,a;switch(e){case"navigation":if(n){const i=O.findFirstChild(t.current.children,"attributes.aria-controls","navigation");m=O.findFirstChild(i.children,"href")}else m=O.findFirstChild(t.current.children,"href");m||(m=t.current);break;case"account":if(a=O.findFirstChild(t.current.children,"className","account"),!a||!a.children)return;m=O.findFirstChild(a.children,"href");break;default:return}m&&(o([{type:`focusElements.${e}.${l}`,value:m}]),m.focus())},events:{onClick:(e,{id:t,callback:n,isOpen:s})=>{e.target&&e.target.attributes&&e.target.attributes.href||(e.preventDefault(),e.stopPropagation(),clearTimeout(O.timeouts[t]),n(t,!s))},onFocus:({id:e})=>{clearTimeout(O.timeouts[e])},onMouseEnter:({id:e,callback:t})=>{clearTimeout(O.timeouts[e]),t(e,!0)},onBlur:({id:e,callback:t})=>{O.timeouts[e]=setTimeout(()=>{t(e,!1)},250)}}},je={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"}}}},Ve=({id:e,isLoggedIn:t=!1,isDesktopVersion:n=!1,menus:s={},callback:o=()=>{},doTrack:l=null})=>{const m=M.useIntl(),a=an(je,e);if(!a||a.onlyShow&&(a.onlyShow==="logged-in"&&!t||a.onlyShow==="logged-out"&&t))return null;const i="doTrack"in a,u=l===null?i?a.doTrack:!0:l,d=e.includes("buttons.");let f=`header_${e.replaceAll(".","_")}`;a.hasVariantText&&(f+=`_logged${t?"In":"Out"}`);let p=!1;if(a.href){let x=a.gtmType||`${e}-click`;if(x.includes(".")){const $=x.split("."),I=$[$.length-2];x=`${I==="topics"?`${I}-`:""}${$[$.length-1]}`}p={href:a.href,role:"menuitem"},u&&(p={...p,className:"gtm-trackable","data-gtm-event-type":x,"data-gtm-event-context":"HeaderButtons"}),d&&(p={...p,variant:"secondary",size:{mobile:"small",881:"large"},...a.props||{}})}const _=a.order&&a.order[0]&&a[a.order[0]],h=_&&a[a.order[0]].order,y=p&&window.location.pathname===a.href;let S={},E={};if(_){const x=a.menuId||e,$={onClick:I=>O.events.onClick(I,{id:x,callback:o,isOpen:s[x]}),onFocus:()=>O.events.onFocus({id:x}),onBlur:()=>O.events.onBlur({id:x,callback:o}),onMouseLeave:()=>O.events.onBlur({id:x,callback:o}),onMouseEnter:()=>O.events.onMouseEnter({id:x,callback:o})};n&&(h&&(S={...$,onKeyPress:I=>{I.key==="Enter"&&O.events.onClick(I,{id:x,callback:o,isOpen:s[x]})},tabIndex:"0","aria-haspopup":!0,"aria-expanded":s[x],"aria-controls":x}),E={hidden:x in s?!s[x]:!0}),h||(E={...E,...$})}return r.jsxs("li",{className:j({[a.className]:a.className,"has-submenu":_,parent:h,active:y}),role:"none",...S,children:[p?g.createElement(d?G:"a",p,m.formatMessage({id:f})):m.formatMessage({id:f}),a.order&&r.jsx("ul",{...E,children:a.order.map(x=>{if(!a[x])return null;const $={isLoggedIn:t,isDesktopVersion:n,menus:s,callback:o,doTrack:i?u:null};return a[x].order?r.jsxs("li",{className:j({[a[x].className]:a[x].className}),children:[m.formatMessage({id:`${f}_${x}`}),r.jsx("ul",{children:a[x].order.map(I=>r.jsx(Ve,{id:`${e}.${x}.${I}`,...$},I))})]},x):r.jsx(Ve,{id:`${e}.${x}`,...$},x)})})]},e)};const bs={height:67,height_desktop:83},At=()=>{const e=M.useIntl(),t=g.useContext(me),n=Se(!0,!0),s=t&&typeof t.id=="string",o=g.useMemo(()=>O.getIsDesktopVersion(s,n),[s,n]),[l,m]=g.useReducer(Er,{headerIsVisible:!0,menus:{navigation:!1,search:!1,account:!1},focusElements:{navigation:{desktop:!1,default:!1},account:{desktop:!1,default:!1}}}),{headerIsVisible:a,menus:i,focusElements:u}=l;dn({scrollPosition:bs[`height${o.navigation?"_desktop":""}`],callbacks:{scrollUp:()=>{!o&&i.navigation||O.shouldChangeHeaderIsVisible(!0,i,m)},scrollDown:()=>{!o&&i.navigation||O.shouldChangeHeaderIsVisible(!1,i,m)}}});const d=(p,_)=>{O.handleMenus({id:p,value:_,menus:i,dispatch:m})},f=g.useRef(null);return pe(()=>{i.navigation&&O.autoFocus({menu:"navigation",navigationRef:f,isDesktopVersion:o.navigation,focusElements:u,dispatch:m})},[i.navigation]),pe(()=>{i.account&&O.autoFocus({menu:"account",navigationRef:f,isDesktopVersion:o.navigation,focusElements:u,dispatch:m})},[i.account]),t&&t.isLoading?null:r.jsxs(r.Fragment,{children:[r.jsxs("nav",{id:"header",className:j({"logged-in":s,"logged-out":!s,visible:a}),children:[r.jsx(J,{element:"a",href:"#content-of-page",children:e.formatMessage({id:"header_skip"})}),r.jsx(Ct,{}),!o.navigation&&r.jsx("button",{className:"menu-button gtm-trackable",onClick:p=>{p.preventDefault(),p.stopPropagation(),d("navigation",!i.navigation)},"data-gtm-event-type":"open-tab-menu-click","data-gtm-event-context":"HeaderLeft-Chevron","aria-haspopup":"true","aria-expanded":i.navigation,"aria-controls":"navigation",children:r.jsx(J,{children:e.formatMessage({id:`header_menu_${i.navigation?"hide":"show"}`})})}),r.jsx("ul",{ref:f,id:"navigation",hidden:o.navigation||i.account?!1:!i.navigation,role:"menu","data-showing":!o.navigation&&i.account?"account":"default",children:je.order.map(p=>r.jsx(Ve,{id:p,isLoggedIn:s,isDesktopVersion:o.navigation,menus:{navigation:i.navigation,account:i.account},callback:d},p))}),!o.search&&r.jsx("button",{className:"search toggle-search-button",onClick:p=>{p.preventDefault(),p.stopPropagation(),d("search",!i.search)},"aria-haspopup":"true","aria-expanded":i.search,"aria-controls":"search-form",children:r.jsx(J,{children:e.formatMessage({id:`header_search_${i.search?"hide":"show"}`})})}),r.jsx(Fn,{id:"global-search",handleToggle:{searchIsOpen:i.search,isDesktopVersion:o.search},gtmContext:"search-bar-header",gtmEvent:"form-submission"}),s?r.jsxs("button",{className:"account-button",onClick:p=>O.events.onClick(p,{id:"account",callback:d,isOpen:i.account}),onMouseEnter:()=>O.events.onMouseEnter({id:"account",callback:d}),onMouseLeave:()=>O.events.onBlur({id:"account",callback:d}),"aria-haspopup":"true","aria-expanded":i.account,"aria-controls":"navigation",children:[r.jsx(J,{children:e.formatMessage({id:`header_account_${i.account?"hide":"show"}`})}),r.jsx(Ge,{name:t&&t.name||"",src:t&&t.image&&t.image.thumbnail||""})]}):r.jsx("ul",{className:"sign-in-buttons",children:je.buttons.order.map(p=>r.jsx(Ve,{id:`buttons.${p}`},p))})]}),r.jsx("hr",{id:"content-of-page"}),r.jsx("div",{className:j("overlay",{open:i.navigation||i.account||!o.search&&i.search})})]})};const vs=()=>{const e=M.useIntl();return r.jsxs(r.Fragment,{children:[r.jsx(At,{}),r.jsx("div",{className:"content",children:r.jsx($e,{variant:"error",text:e.formatMessage({id:"pageLayout_error"})})}),r.jsx(Pt,{})]})},ys=({children:e,reportError:t,showFooter:n=!0,background:s="default",className:o="",locale:l="en"})=>{const m=cn();g.useEffect(()=>{window.scrollTo(0,0)},[m]);const a=pn(e,{locale:l});return r.jsx(hr.ErrorBoundary,{onError:t,fallback:r.jsx(vs,{}),children:r.jsx(g.Suspense,{fallback:r.jsx(wn,{layout:"overview-page"}),children:r.jsx("div",{id:"wrapper",className:j(o,{[s]:s!=="default"}),children:r.jsxs(on.CookiesProvider,{children:[r.jsx(At,{}),r.jsx("div",{className:"content",children:a}),n&&r.jsx(Pt,{}),r.jsx(An,{})]})})})})},rn={default:"tags_",headerTopics:"header_topics_topics_"},ht={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"},ks={getTagDetails:e=>{if(e.includes("topic_")){if(e=ht.topic[e.replace("topic_","")],e){const t=je.topics.topics[e].href;return t?{id:e,href:t,text:`${rn.headerTopics}${e}`}:null}return null}return ht[e]?(e=ht[e],{id:e,text:`${rn.default}${e}`}):null}};const ws=({tags:e=[],color:t="default",forceOneLine:n=!1,canHaveLinks:s=!0,className:o="",gtmType:l="tag-click",gtmContext:m="tags"})=>{const a=M.useIntl();if(!e||e.length<1)return null;const i=[];return e.forEach(u=>{if(!u)return;const d=ks.getTagDetails(u);d&&i.push(d)}),i.length<1?null:r.jsx("ul",{className:j("tags text-small",t,o,{"one-line":n}),children:i.map(u=>{const d=a.formatMessage({id:u.text});return r.jsx("li",{children:u.href&&s?r.jsx("a",{href:u.href,className:"gtm-trackable","data-gtm-event-type":l,"data-gtm-event-context":m,children:d}):d},u.id)})})};const js=({members:{total:e,data:t=[]},pagination:n,gtmContext:s="member",gtmType:o="member-click",className:l=""})=>{const m=M.useIntl();return t.length===0?null:(e||(e=t.length),r.jsxs("div",{className:j("members-list",l),children:[r.jsxs("h1",{children:[m.formatMessage({id:"membersList"}),r.jsx("span",{className:"count",children:e})]}),r.jsx("ul",{children:t.map((a,i)=>r.jsxs("li",{children:[r.jsx(qe,{member:a,gtmContext:s,gtmType:o}),a.isAdmin&&r.jsx(vn,{children:m.formatMessage({id:"membersList_admin"})})]},i))}),n&&r.jsx(Cn,{...n,icon:{icon:"arrow-down",position:"right"},gtmContext:s})]}))};let Le=null;const ee="discussion_form_",Rt=({content:e={type:"response",slugs:{}},userHasPermissions:t=!0,meta:n={isLoading:!1,isInWrapper:!1,isEditing:!1,showTitle:!1},inputRef:s,maxLength:o=5e4,minRows:l=4,forceShow:m={cancel:!1,error:!1},functions:a={create:()=>{},handleSaveEdit:()=>{},handleCancel:()=>{},callback:()=>{},props:{create:{projectNames:["questions-answers"]}}},gtmContext:i="DiscussionForm"})=>{var P,Q;const u=M.useIntl(),d=g.useContext(me),[f,p]=g.useState(n.isEditing&&n.isEditing.text||""),[_,h]=g.useState(m.error||!1),[y,S]=g.useState(!1),E=g.useRef(null);if(s||(s=E),n.isLoading)return r.jsx(ie,{className:"discussion-card discussion-form","data-testid":"loading-placeholder"});const x=F=>{const W=F.target.value;p(W);let R;!d||!d.id?R=ae(u.formatMessage,`${ee}error_loggedOut`,e.type,"action"):t?W.length>=o&&(R=`${ee}error_tooLong`):R=ae(u.formatMessage,`${ee}error_noPermission`,e.type,"action"),R?h(R):_&&h(!1)};let $=`${e.type}-form`;if(e.type==="response"||e.type==="reply"){const F=e.type==="response"?((P=e.slugs)==null?void 0:P.question)||"":((Q=e.slugs)==null?void 0:Q.answer)||"";F&&($=`${$}-${F.slice(-15)}`)}const I=async F=>{var R;if(F.preventDefault(),F.stopPropagation(),!d||!d.id||!t||H)return;Le&&clearTimeout(Le),S("submitting");const W=window.location.pathname;try{let N;switch(e.type){case"post":N=await a.create({content:f});break;case"question":N=await a.create({title:f,authorId:d&&d.id,...(R=a.props)==null?void 0:R.create});break;case"response":N=await a.create({question:e.slugs.question},{body:f,authorId:d&&d.id,contentPath:W});break;case"reply":N=await a.create({question:e.slugs.question,answer:e.slugs.answer},{body:f,authorId:d&&d.id,contentPath:W});break;default:break}await Mr(1e3),a.callback&&await a.callback(N),Le=setTimeout(()=>{p(""),S("submitted"),k()},500)}catch(N){const z=N;let q=`${ee}error`;z.message.includes("entry already exists")&&(q=ae(u.formatMessage,`${ee}error_alreadyExists`,e.type,"action")),z.message.includes("429")?q=ae(u.formatMessage,`${ee}error_tooMany`,e.type,"action"):z.message.includes("400")&&(q=`${ee}error`),h(q),k()}},k=()=>{Le=setTimeout(()=>{h(!1),S(!1)},5e3)},H=!f||!Dr(f),U=y==="submitting",v=[];return(n.isEditing&&!U||m.cancel)&&v.push({variant:"secondary",size:{mobile:"small",600:"medium"},onClick:a.handleCancel,className:"gtm-trackable","data-gtm-event-context":i,"data-gtm-event-type":`cancel-${e.type}-click`,disabled:!m.cancel&&(!d||!d.id||!f),children:u.formatMessage({id:`${ee}cancel`})}),v.push({variant:"primary",size:{mobile:"small",600:"medium"},onClick:F=>{if(n.isEditing){S("submitting"),a.handleSaveEdit&&a.handleSaveEdit(E.current&&"value"in E.current?E.current.value:"");return}I(F)},className:"gtm-trackable","data-gtm-event-context":i,"data-gtm-event-type":`${n.isEditing?"save":"submit"}-${e.type}-click`,"data-testid":"save-button",disabled:!d||!d.id||!t||H||U||n.isEditing&&f===n.isEditing.text,children:u.formatMessage({id:`${ee}${U?n.isEditing?"saving":"posting":n.isEditing?"save":"post"}`})}),r.jsxs("form",{id:$,className:j("discussion-card discussion-form",{"no-styling":n.isInWrapper&&n.isEditing}),"data-testid":`discussion-${e.type}-form`,children:[(n==null?void 0:n.showTitle)&&!n.isEditing&&["question"].includes(e.type)&&r.jsx("h2",{children:ae(u.formatMessage,`${ee}title`,e.type,"action")}),r.jsx(qe,{member:d||"community",gtmContext:i,gtmType:"profile-click"}),r.jsx(J,{element:"label",showOnFocus:!1,htmlFor:`${$}-input`,children:ae(u.formatMessage,`${ee}label`,e.type,"action")}),r.jsx(gr,{ref:s,id:`${$}-input`,name:e.type,placeholder:ae(u.formatMessage,`${ee}placeholder`,e.type,"action"),onChange:x,value:f,maxLength:o,"aria-invalid":!!_,"aria-errormessage":"error-message",minRows:l,autoFocus:!!n.isEditing}),r.jsx("small",{children:ae(u.formatMessage,`${ee}explainer`,e.type,"action",{a:F=>r.jsx("a",{href:"https://about.apolitical.co/q-and-a-community-guidelines",target:"_blank",className:"gtm-trackable","data-gtm-event-context":i,"data-gtm-event-type":"community-guidelines-link",children:F})})}),r.jsx(Ee,{buttons:v}),y==="submitted"&&r.jsx(We,{className:"success","data-testid":"success",children:ae(u.formatMessage,`${ee}success`,e.type,"action")}),_&&r.jsx(We,{id:"error-message",className:"error","data-testid":"error",children:m.error?m.error:typeof _=="string"?_.includes(" ")?_:u.formatMessage({id:_},{action:u.formatMessage({id:`discussion_action_${e.type}`}),maxLength:o}):_})]})},Nt=({contentType:e,createPost:t,membershipRequiredToPost:{isMember:n,required:s,join:o,leave:l,notMemberStateText:m}})=>s&&!n?r.jsx($e,{text:m,button:{component:r.jsx(Mt,{functions:{join:o,leave:l}})}}):r.jsx(Rt,{content:{type:e,slugs:{}},functions:{create:t}}),Ss={showThread:!1,showForm:!1},Dt=g.createContext(Ss),Es=({children:e})=>{const[t,n]=g.useState({showThread:!1,showForm:!1});return r.jsx(Dt.Provider,{value:{...t,updateConversation:n},children:e})},Ts=({question:e,answer:t,reply:n})=>({...e&&{questionSlug:e},...t&&{answerSlug:t},...n&&{replySlug:n}}),$s=(e,t=10)=>!e||e.length===0?[]:e.slice(0,t);let we=!1;const gt=()=>{we!==!1&&(clearTimeout(we),we=!1)},_t=10,In=({element:e="div",likes:t=0,peopleWhoLiked:n=!1,isShort:s=!0,userLiked:o=!1,content:l={type:"reply",slugs:{}},canLike:m=!0,functions:{createLike:a=()=>{},deleteLike:i=()=>{}}={}})=>{const u=M.useIntl();g.useEffect(()=>{_(o)},[o]);const[d,f]=g.useState(t),[p,_]=g.useState(o),[h,y]=g.useState(!1),[S,E]=g.useState(!1),x=g.useMemo(()=>$s(n,_t),[n]),$=k=>{if(k.preventDefault(),k.stopPropagation(),E(!1),we)return gt(),!1;if(gt(),h||!m)return!1;we=setTimeout(I,350)},I=async()=>{if(gt(),h||!m)return!1;let k=p?d-1:d+1;k<0&&(k=0),y(!0),f(k),_(!p);try{if(l&&l.slugs){const H=Ts(l.slugs);p?await i(H):await a(H,{contentPath:window.location.pathname})}}catch{f(t),_(o)}finally{y(!1)}};return g.createElement(e,{className:j("likes-wrapper text-medium action-button",{"show-spinner":h,"is-liked":p,disabled:!m}),onClick:$,onMouseEnter:()=>{E(!0)},onMouseLeave:()=>{E(!1)},onFocus:()=>{E(!0)},onBlur:()=>{E(!1)},children:r.jsxs(r.Fragment,{children:[r.jsx(G,{variant:"tertiary",size:"medium",icon:{icon:p?"heart":"heart_empty",animate:"bounce"},className:j({"do-animation":p&&!o}),screenreaderText:m?u.formatMessage({id:`discussion_likes_${p?"unlike":"like"}`},{action:u.formatMessage({id:`discussion_action_${l.type}`})}):!1,onClick:$,disabled:!m,"aria-hidden":!m,"data-testid":"like-button","data-gtm-event-context":"Likes","data-gtm-event-type":`like-${l.type}-click`}),r.jsx("span",{className:j("number-of-likes",{"no-likes":d===0}),"data-testid":"number-of-likes",children:u.formatMessage({id:`discussion_likes${s?"_short":""}`},{number:d})}),n&&r.jsx(gn,{isOpen:S,isLoading:n.length===0,children:n.length&&r.jsxs("ul",{children:[x.map(k=>typeof k=="string"||!k.name?null:r.jsx("li",{children:r.jsx(Te,{href:k.id?`/profiles/${k.id}`:void 0,gtmContext:"Likes",gtmType:"liked-name-click",children:k.name})},k.id||window.btoa(k.name))),n.length>_t&&r.jsx("li",{children:u.formatMessage({id:"discussion_likes_more"},{number:n.length-_t})})]})})]})})};const Bn=({element:e="section",children:t,className:n,...s})=>g.createElement(e,{className:j("modal",n),children:typeof t=="string"?r.jsx("p",{children:t}):t,...s});const On=({id:e="content-overlay",isOpen:t=!1,maxWidth:n,functions:{onOpen:s=()=>{},onClose:o=()=>{}}={},forceShow:{error:l=!1}={},title:m,children:a,buttons:i,className:u="",gtmContext:d="Modal"})=>{const f=M.useIntl(),[p,_]=g.useState(t),h=S=>{_(S),S?(s(),document.body.classList.add("has-overlay")):(o(),document.body.classList.remove("has-overlay"))};g.useEffect(()=>{h(t)},[t]);const y=n?{"--max-width":`${n/16}rem`}:{};return r.jsx("div",{className:j("overlay",{open:p}),children:r.jsx(Bn,{id:e,className:j("overlay-modal",u,{"has-max-width":n}),hidden:!p,style:y,children:t&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"top",children:[r.jsx("h2",{children:m}),r.jsx(G,{variant:"tertiary",size:"medium",icon:{icon:"close"},onClick:()=>h(!1),className:"gtm-trackable","data-gtm-event-type":"close-modal-click","data-gtm-event-context":d,screenreaderText:f.formatMessage({id:"overlay_button"})})]}),r.jsx(Ue,{}),a,i&&r.jsxs("div",{className:"bottom",children:[r.jsx(Ue,{}),r.jsx(Ee,{buttons:i})]}),l&&r.jsx(We,{className:"error",children:l})]})})})},Ln=(e,t)=>({"aria-haspopup":!0,"aria-expanded":t,"aria-controls":e}),sn=e=>{const t={};return Object.keys(e).forEach(n=>{t[`${n}Slug`]=e[n]}),t};const ce="discussion_",Je=({element:e="div",content:t,userHasPermissions:n=!0,isLoading:s=!1,originalAuthorId:o,functions:{content:{createContent:l,deleteContent:m,updateContent:a}={createContent:()=>{},deleteContent:()=>{},updateContent:()=>{}},likes:{createLike:i,deleteLike:u}={createLike:()=>{},deleteLike:()=>{}},comments:{openComments:d}={openComments:()=>{}}},links:f={},className:p,gtmContext:_="DiscussionAnswer",children:h})=>{const y=M.useIntl(),S=g.useContext(me),E=g.useContext(Dt),[x,$]=g.useState({body:t&&t.body||"",isEditing:!1,didEdit:t&&t.isEdited||!1}),[I,k]=g.useState(!1),[H,U]=g.useState("");if(g.useEffect(()=>{$({...x,body:t&&t.body||"",didEdit:t&&t.isEdited||!1})},[t.isEdited]),s||!t||t.type==="answer"&&(!t.slugs||!t.slugs.question))return r.jsx(ie,{className:"discussion-card discussion-post"});const{author:v,canLike:P,createdAt:Q,id:F,likes:W=0,userLiked:R,comments:N=0}=t,z=S&&S.id&&typeof v!="string"&&v.id&&v.id===S.id||!1,q=typeof P=="boolean"?P:n?!z:!1,te=async B=>{B||(B=""),U("");try{if(!_r(B,x.body)){const re=t.type==="question"?{title:B}:{body:B};await a(sn(t.slugs),re)}$({body:B,isEditing:!1,didEdit:!0})}catch{U(`${ce}form_error`)}},X=()=>{E&&E.updateConversation&&E.updateConversation({showThread:!0,showForm:!0}),setTimeout(()=>{const re=`reply-form-${(t.type==="answer"?t.slug:t.slugs.answer||"").toLowerCase().slice(-15)}`,fe=document.getElementById(re),Me=document.getElementById(`${re}-input`);Me&&Me.focus(),fe&&fe.scrollIntoView({behavior:"smooth"})},0)},ne=()=>{try{m(sn(t.slugs))}catch{U("delete-error")}},oe=[{text:y.formatMessage({id:`${ce}moreMenu_report`}),href:`mailto:community@apolitical.co?subject=${encodeURI(y.formatMessage({id:`${ce}report_subject`}))}&body=${encodeURI(y.formatMessage({id:`${ce}report_body`},{contentType:t.type||"",contentSlug:t.slug||"",contentUrl:`${window.origin}${typeof process<"u"&&process.env.PUBLIC_URL||""}/${t.slugs.question||""}`}))}`,icon:"flag"}];return n&&z&&oe.push({text:y.formatMessage({id:`${ce}moreMenu_edit`}),onClick:()=>$({...x,isEditing:!0}),icon:"pencil-paper",className:"gtm-trackable","data-gtm-event-context":_,"data-gtm-event-type":`edit-${t.type}-click`},{text:y.formatMessage({id:`${ce}moreMenu_delete`}),onClick:B=>{B.preventDefault(),B.stopPropagation(),k(!0)},icon:"trash",className:"gtm-trackable","data-gtm-event-context":_,"data-gtm-event-type":`delete-${t.type}-click`,...Ln(`delete-${t.slug}-modal`,I)}),g.createElement(e,{className:j("discussion-post",p),"data-testid":`discussion-${t.type}-thread`,children:r.jsxs(r.Fragment,{children:[r.jsxs("div",{id:F||t.slug,className:j("discussion-card",t.type,{editing:x.isEditing,"has-link":f.post&&!x.isEditing}),onClick:B=>{!f.post||x.isEditing||(B.preventDefault(),B.stopPropagation(),window.location.href=f.post)},children:[!x.isEditing&&r.jsx(qe,{member:v,additionalContent:{createdAt:Q,didEdit:x.didEdit},className:typeof v!="string"&&v.id===o?"highlighted":"",gtmContext:_,gtmType:"profile-click"}),x.isEditing?r.jsx(Rt,{content:{type:t.type,slugs:t.slugs},userHasPermissions:n,meta:{isLoading:s,isInWrapper:!0,isEditing:{text:x.body}},maxLength:t.type==="question"?250:5e4,forceShow:{error:H!==""&&H!=="delete-error"?y.formatMessage({id:H},{action:y.formatMessage({id:`discussion_action_${t.type}`})}):!1},functions:{create:l,handleSaveEdit:te,handleCancel:()=>{U(""),$({...x,isEditing:!1})}},gtmContext:`${_}Form`}):f.post?r.jsx("a",{href:f.post,className:"gtm-trackable","data-gtm-event-context":_,"data-gtm-event-type":"title-click",children:r.jsx(yt,{options:{overrides:{a:bn}},children:x.body})}):r.jsx(yt,{options:{wrapper:t.type==="question"?"h1":g.Fragment,forceWrapper:t.type==="question",forceInline:t.type==="question",forceBlock:t.type!=="question"},children:x.body}),!x.isEditing&&r.jsxs("ul",{className:j("actions text-medium",t.type),"data-testid":`${t.type}-actions`,children:[r.jsx(In,{element:"li",likes:W,isShort:!1,userLiked:R,content:{type:t.type,slugs:t.slugs},canLike:q,functions:{createLike:i,deleteLike:u}}),(["question","post"].includes(t.type)||f.comments||typeof d=="function")&&r.jsxs("li",{className:"action-button",onClick:B=>{B.preventDefault(),B.stopPropagation(),f.comments&&(window.location.href=f.comments),typeof d=="function"&&d()},children:[r.jsx(G,{variant:"tertiary",size:"medium",styling:{muted:!0},icon:{icon:"speech-bubble_square_thick"},href:f.comments?f.comments:!1,onClick:f.comments||typeof d!="function"?!1:d,className:"gtm-trackable","data-gtm-event-context":_,"data-gtm-event-type":`answer-${t.type}-click`,screenreaderText:y.formatMessage({id:`${ce}comments_screenReader`},{count:N})}),r.jsx("span",{children:y.formatMessage({id:`${ce}comments`},{count:N})})]}),(t.type==="answer"||t.type==="reply")&&r.jsx("li",{children:r.jsx(G,{variant:"tertiary",size:"medium",styling:{muted:!0},onClick:X,children:y.formatMessage({id:`${ce}reply`})})}),r.jsx(Pn,{element:"li",id:`more-${t.slug}`,options:oe})]})]}),h,r.jsx(On,{id:`delete-${t.slug}-modal`,isOpen:I,functions:{onOpen:()=>{},onClose:()=>k(!1)},forceShow:{error:H==="delete-error"?y.formatMessage({id:"discussion_delete_error"},{action:y.formatMessage({id:`discussion_action_${t.type}`})}):!1},title:y.formatMessage({id:"discussion_delete_title"},{action:y.formatMessage({id:`discussion_action_${t.type}`})}),buttons:[{variant:"secondary",onClick:()=>k(!1),children:y.formatMessage({id:"discussion_delete_cancel"})},{variant:"primary",className:"destructive",onClick:ne,children:y.formatMessage({id:"discussion_delete_delete"})}],gtmContext:`${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,children:r.jsx(M.FormattedMessage,{id:"discussion_delete_text",values:{p:B=>r.jsx("p",{children:B}),action:y.formatMessage({id:`discussion_action_${t.type}`})}})})]})})};const xt="discussion_responses_",Ms=({type:e="answer",responses:t=0})=>{const n=M.useIntl();return r.jsxs("div",{className:"responses-heading",children:[r.jsx("h3",{children:n.formatMessage({id:`${xt}title`},{action:n.formatMessage({id:`${xt}${e}`}),count:t})}),t===0&&r.jsx("p",{children:ae(n.formatMessage,`${xt}empty`,e,e)})]})};const Cs=({isOpen:e=!1,count:t=0,children:n})=>{const s=M.useIntl(),o=g.useRef(null),[l,m]=g.useState(e),[a,i]=g.useState("closed");g.useEffect(()=>{const p=o.current;if(p)return p.addEventListener("transitionend",u),()=>{p.removeEventListener("transitionend",u)}},[]),pe(()=>{a==="closed"&&!l||i(["opening","open"].includes(a)?"ready-to-close":"opening")},[l]),g.useEffect(()=>{a==="ready-to-close"&&i("closing")},[a]);const u=({propertyName:p})=>{p==="max-height"&&i(_=>_==="opening"?"open":_==="closing"?"closed":_)},d=["opening","open"].includes(a),f=pn(n,{element:"li"});return r.jsxs("div",{className:"thread-wrapper",children:[r.jsx(G,{variant:"secondary",size:"small",styling:{muted:!0},icon:{icon:`arrow_corner-down_${d?"left":"right"}`},onClick:()=>{m(!l)},children:s.formatMessage({id:`discussion_thread_${d?"hide":"show"}`},{count:t})}),r.jsx("ul",{ref:o,className:j("thread",a),hidden:!l,children:f})]})},Ps=({user:e,content:t,verb:n="post"})=>({actor:{id:e.id,data:{name:e.name,organization:e==null?void 0:e.organization,jobTitle:e==null?void 0:e.jobTitle}},content:t,latest_reactions:{like:[]},reaction_counts:{like:0},verb:n}),As=({queryClient:e,queryKey:t,user:n,mutationFn:s})=>({mutationFn:s,onMutate:async({content:a})=>{if(!n)return;const i=Ps({user:n,content:a,verb:"post"});await e.cancelQueries({queryKey:t});const u=e.getQueryData(t);return e.setQueryData(t,d=>[...d,i]),{previousActivities:u}},onError:(a,i,u)=>{e.setQueryData(t,u.previousActivities)},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Rs=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({activityId:a})=>{await e.cancelQueries({queryKey:t});const i=e.getQueryData(t),u=i==null?void 0:i.map(d=>{var f;return(d==null?void 0:d.id)===a&&((f=d.reaction_counts)!=null&&f.like?d.reaction_counts.like+=1:d.reaction_counts.like=1),d});return e.setQueryData(t,()=>u&&[...u]),{previousActivities:u}},onError:(a,i,u)=>{e.setQueryData(t,u.previousActivities)},onSuccess:a=>{const i=e.getQueryData(t),u=i==null?void 0:i.map(d=>((d==null?void 0:d.id)===(a==null?void 0:a.activity_id)&&(d.latest_reactions.like?d.latest_reactions.like.push(a):d.latest_reactions.like=[a]),d));return e.setQueryData(t,()=>u&&[...u]),{previousActivities:i}},onSettled:(a,i,u)=>{e.invalidateQueries({queryKey:[...t,u.activityId]})}}),Ns=({queryClient:e,queryKey:t,user:n,mutationFn:s})=>({mutationFn:s,onMutate:async({activityId:i})=>{await e.cancelQueries({queryKey:t});const u=e.getQueryData(t),d=u==null?void 0:u.map(f=>{var p;return(f==null?void 0:f.id)===i&&(p=f.reaction_counts)!=null&&p.like&&(f.reaction_counts.like-=1),f});return e.setQueryData(t,()=>d&&[...d]),{previousActivities:d}},onError:(i,u,d)=>{e.setQueryData(t,d.previousActivities)},onSuccess:(i,{activityId:u})=>{const d=e.getQueryData(t),f=d==null?void 0:d.map(p=>{var _,h,y,S;if(p.id===u){const E=(y=(h=(_=p.latest_reactions)==null?void 0:_.like)==null?void 0:h.find(x=>x.user_id===(n==null?void 0:n.id)))==null?void 0:y.id;return p.latest_reactions.like=(S=p.latest_reactions.like)==null?void 0:S.filter(x=>x.id!==E),p}else return p});return e.setQueryData(t,()=>f&&[...f]),{previousActivities:d}},onSettled:(i,u,d)=>{e.invalidateQueries({queryKey:[...t,d.activityId]})}}),Ds=({basePath:e,parentId:t,isMember:n,functions:{list:s,create:o,like:l,unlike:m,join:a,leave:i}})=>{const u=M.useIntl(),d=K.useQueryClient(),f=g.useContext(me),{data:p,error:_,isLoading:h,isFetching:y}=K.useQuery({queryKey:[e,t],queryFn:s}),S=As({queryClient:d,queryKey:[e,t],user:f,mutationFn:o}),{mutate:E}=K.useMutation(S),x=Rs({queryClient:d,queryKey:[e,t],mutationFn:l}),{mutate:$}=K.useMutation(x),I=Ns({queryClient:d,queryKey:[e,t],user:f,mutationFn:async({activityId:v})=>{var F,W,R;const P=p&&(p==null?void 0:p.find(N=>N.id===v)),Q=(R=(W=(F=P==null?void 0:P.latest_reactions)==null?void 0:F.like)==null?void 0:W.find(N=>N.user_id===(f==null?void 0:f.id)))==null?void 0:R.id;await m({reactionId:Q||"",activityId:v})}}),{mutate:k}=K.useMutation(I),H=g.useCallback(({activityId:v})=>$({activityId:v}),[$]),U=g.useCallback(({activityId:v})=>k({activityId:v}),[k]);return _?r.jsx($e,{variant:"error",text:_.message}):h?r.jsx(ie,{style:{height:"400px"}}):r.jsxs(r.Fragment,{children:[r.jsx(Nt,{contentType:"post",createPost:E,membershipRequiredToPost:{isMember:n,required:!0,join:a,leave:i,notMemberStateText:u.formatMessage({id:"community_joinToPost"})}}),!y&&Array.isArray(p)&&(p==null?void 0:p.map(v=>{var P,Q,F,W,R,N,z,q,te,X,ne;return r.jsx(Je,{content:{type:"post",body:v==null?void 0:v.content,createdAt:(v==null?void 0:v.time)||"",slugs:{question:t},slug:v==null?void 0:v.id,author:{id:(P=v==null?void 0:v.actor)==null?void 0:P.id,name:(F=(Q=v==null?void 0:v.actor)==null?void 0:Q.data)==null?void 0:F.name,organization:(R=(W=v==null?void 0:v.actor)==null?void 0:W.data)==null?void 0:R.organization,jobTitle:(z=(N=v==null?void 0:v.actor)==null?void 0:N.data)==null?void 0:z.jobTitle,image:{thumbnail:((te=(q=v==null?void 0:v.actor)==null?void 0:q.data)==null?void 0:te.thumbnail)||void 0}},userLiked:((X=v==null?void 0:v.own_reactions)==null?void 0:X.like)&&((ne=v==null?void 0:v.own_reactions)==null?void 0:ne.like.length)>0,likes:(v==null?void 0:v.reaction_counts.like)||0,comments:(v==null?void 0:v.reaction_counts.reply)||0},links:{post:`${e}/${t}/${v==null?void 0:v.id}`,comments:`${e}/${t}/${v==null?void 0:v.id}`},functions:{content:{createContent:()=>null,deleteContent:()=>null,updateContent:()=>null},likes:{createLike:()=>{H({activityId:v==null?void 0:v.id})},deleteLike:()=>{U({activityId:v==null?void 0:v.id})}},comments:{openComments:()=>null}}},v==null?void 0:v.id)}))]})},Fs=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{await e.cancelQueries({queryKey:t})},onError:(a,i,u)=>{e.setQueryData(t,u.previousActivity)},onSuccess:a=>{var u;const i=e.getQueryData(t);if(i)return(u=i==null?void 0:i.latest_reactions)!=null&&u.reply?(i.latest_reactions.reply.unshift(a),i&&(i.reaction_counts={reply:i.latest_reactions.reply.length})):(i.latest_reactions={reply:[a]},i.reaction_counts={reply:1}),e.setQueryData(t,()=>({...i})),{previousActivity:i}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Is=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async({replyId:m})=>{var u,d;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t),i=(d=(u=a==null?void 0:a.latest_reactions)==null?void 0:u.reply)==null?void 0:d.map(f=>{var p;return f.id===m&&((p=f.children_counts)!=null&&p.like?f.children_counts.like+=1:f.children_counts={like:1}),f});return e.setQueryData(t,()=>({...a,latest_reactions:{reply:i}})),{previousActivity:a}},onError:(m,a,i)=>{e.setQueryData(t,i.previousActivity)},onSuccess:m=>{var u;const a=e.getQueryData(t),i=(u=a==null?void 0:a.latest_reactions.reply)==null?void 0:u.map(d=>(d.id===m.id&&(d.latest_children.like?d.latest_children.like.push(m):d.latest_children.like=[m]),d));return e.setQueryData(t,()=>({...a,latest_reactions:{reply:i}})),{previousActivity:a}}}),Bs=({queryClient:e,queryKey:t,user:n,mutationFn:s})=>({mutationFn:s,onMutate:async({replyId:a})=>{var d;await e.cancelQueries({queryKey:t});const i=e.getQueryData(t);if(!i)return;const u=(d=i.latest_reactions.reply)==null?void 0:d.map(f=>(f.id===a&&f.children_counts.like&&(f.children_counts.like-=1),f));return e.setQueryData(t,()=>({...i,latest_reactions:{reply:u}})),{previousActivity:i}},onError:(a,i,u)=>{e.setQueryData(t,u.previousActivity)},onSuccess:(a,{replyId:i})=>{var f;const u=e.getQueryData(t);if(!u)return;const d=(f=u.latest_reactions.reply)==null?void 0:f.map(p=>{var _;return p.id===i?(_=p.latest_children.reply)==null?void 0:_.filter(y=>y.user_id!==(n==null?void 0:n.id)):p});return e.setQueryData(t,()=>({...u,latest_reactions:{reply:d}})),{previousActivity:u}}}),Hn=({basePath:e,parentId:t,activityId:n,repliesList:s,isMember:o,functions:{createReply:l,like:m,unlike:a,join:i,leave:u}})=>{const d=M.useIntl(),f=K.useQueryClient(),p=g.useContext(me),_=Fs({queryClient:f,queryKey:[e,t,n],mutationFn:l}),{mutate:h}=K.useMutation(_),y=Is({queryClient:f,queryKey:[e,t,n],mutationFn:m}),{mutate:S}=K.useMutation(y),E=Bs({queryClient:f,queryKey:[e,t,n],user:p,mutationFn:a}),{mutate:x}=K.useMutation(E),$=g.useCallback(({replyId:k})=>S({replyId:k}),[S]),I=g.useCallback(({replyId:k})=>x({replyId:k}),[x]);return r.jsxs(r.Fragment,{children:[r.jsx(Nt,{contentType:"post",createPost:h,membershipRequiredToPost:{isMember:o,required:!0,join:i,leave:u,notMemberStateText:d.formatMessage({id:"community_joinToPost"})}}),(s==null?void 0:s.length)===0||(s==null?void 0:s.map(k=>{var U,v,P,Q,F,W,R,N,z,q,te,X,ne,oe,B,re;const H=((U=k==null?void 0:k.latest_children)==null?void 0:U.like)&&((v=k==null?void 0:k.latest_children)==null?void 0:v.like.filter(fe=>fe.user_id===(p==null?void 0:p.id)));return r.jsx(Je,{content:{type:"post",body:typeof k.data.content=="string"?(P=k==null?void 0:k.data)==null?void 0:P.content:((F=(Q=k==null?void 0:k.data)==null?void 0:Q.content)==null?void 0:F.text)||"",createdAt:k==null?void 0:k.created_at,slugs:{question:`${e}/${t}/${n}`,reply:k==null?void 0:k.id},slug:`${e}/${t}/${n}#${k==null?void 0:k.id}`,author:{id:(W=k==null?void 0:k.user)==null?void 0:W.id,name:(N=(R=k==null?void 0:k.user)==null?void 0:R.data)==null?void 0:N.name,organization:(q=(z=k==null?void 0:k.user)==null?void 0:z.data)==null?void 0:q.organization,jobTitle:(X=(te=k==null?void 0:k.user)==null?void 0:te.data)==null?void 0:X.jobTitle,image:{thumbnail:((oe=(ne=k==null?void 0:k.user)==null?void 0:ne.data)==null?void 0:oe.thumbnail)||void 0}},userLiked:!!(H!=null&&H.length),likes:((B=k==null?void 0:k.children_counts)==null?void 0:B.like)||0,comments:((re=k==null?void 0:k.children_counts)==null?void 0:re.reply)||0},functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:()=>console.log("update")},likes:{createLike:()=>$({replyId:k==null?void 0:k.id}),deleteLike:()=>I({replyId:k==null?void 0:k.id})},comments:{openComments:()=>{}}}},k==null?void 0:k.id)}))]})},Os=({queryClient:e,queryKey:t,mutationFn:n})=>({mutationFn:n,onMutate:async()=>{var i;await e.cancelQueries({queryKey:t});const a=e.getQueryData(t);return(i=a==null?void 0:a.reaction_counts)!=null&&i.like?a.reaction_counts.like+=1:a&&(a.reaction_counts={like:1}),e.setQueryData(t,()=>({...a})),{previousActivity:a}},onError:(a,i,u)=>{e.setQueryData(t,u.previousActivity)},onSuccess:a=>{const i=e.getQueryData(t);return i!=null&&i.latest_reactions.like?i.latest_reactions.like.push(a):i&&(i.latest_reactions={like:[a]}),e.setQueryData(t,()=>({...i})),{previousActivity:i}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Ls=({queryClient:e,queryKey:t,user:n,activity:s,mutationFn:o})=>({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>0&&(u.reaction_counts.like-=1),e.setQueryData(t,()=>({...u})),{previousActivity:u}},onError:(u,d,f)=>{e.setQueryData(t,f.previousActivity)},onSuccess:()=>{var f,p,_;if(!s)return;const u=(_=(p=(f=s.latest_reactions)==null?void 0:f.like)==null?void 0:p.find(h=>h.user_id===(n==null?void 0:n.id)))==null?void 0:_.id,d=e.getQueryData(t);if(d!=null&&d.latest_reactions.like)return d.latest_reactions.like=d.latest_reactions.like.filter(h=>h.id!==u),e.setQueryData(t,()=>({...d})),{previousActivity:d}},onSettled:()=>{e.invalidateQueries({queryKey:t})}}),Hs=({basePath:e,parentId:t,activityId:n,isMember:s,functions:{get:o,likeActivity:l,unlikeActivity:m,createReply:a,likeReply:i,unlikeReply:u,join:d,leave:f}})=>{var v,P,Q,F,W,R,N,z,q,te;const p=g.useContext(me),_=K.useQueryClient(),{data:h,error:y,isLoading:S,isFetching:E}=K.useQuery({queryKey:[e,t,n],queryFn:o}),x=Os({queryClient:_,queryKey:[e,t,n],mutationFn:l}),{mutate:$}=K.useMutation(x),I=Ls({queryClient:_,queryKey:[e,t,n],user:p,mutationFn:async()=>{var ne,oe,B;const X=(B=(oe=(ne=h==null?void 0:h.latest_reactions)==null?void 0:ne.like)==null?void 0:oe.find(re=>re.user_id===(p==null?void 0:p.id)))==null?void 0:B.id;await m({activityId:n,reactionId:X})},activity:h}),{mutate:k}=K.useMutation(I),H=g.useCallback(({activityId:X})=>$({activityId:X}),[$]),U=g.useCallback(async({activityId:X})=>k({activityId:X}),[k]);return y?r.jsx($e,{variant:"error",text:y.message}):S||E?r.jsx(ie,{style:{height:"400px"}}):r.jsx(Je,{content:{type:"post",body:h==null?void 0:h.content,createdAt:(h==null?void 0:h.time)||"",slugs:{question:`${t}/${n}`},slug:n,author:{id:(v=h==null?void 0:h.actor)==null?void 0:v.id,name:(P=h==null?void 0:h.actor)==null?void 0:P.data.name,organization:(Q=h==null?void 0:h.actor)==null?void 0:Q.data.organization,jobTitle:(F=h==null?void 0:h.actor)==null?void 0:F.data.jobTitle,image:{thumbnail:((W=h==null?void 0:h.actor)==null?void 0:W.data.thumbnail)||void 0}},userLiked:((R=h==null?void 0:h.own_reactions)==null?void 0:R.like)&&((N=h==null?void 0:h.own_reactions)==null?void 0:N.like.length)>0,likes:h&&(h==null?void 0:h.reaction_counts.like),comments:h&&(h==null?void 0:h.reaction_counts.reply)},originalAuthorId:(z=h==null?void 0:h.actor)==null?void 0:z.id,functions:{content:{createContent:()=>console.log("create"),deleteContent:()=>console.log("delete"),updateContent:()=>console.log("update")},likes:{createLike:()=>H({activityId:n}),deleteLike:()=>U({activityId:n})},comments:{openComments:()=>{}}},children:r.jsxs(r.Fragment,{children:[r.jsxs("h3",{children:["Comments (",((q=h==null?void 0:h.reaction_counts)==null?void 0:q.reply)||0,")"]}),r.jsx(Hn,{basePath:e,parentId:t,activityId:n,repliesList:(te=h==null?void 0:h.latest_reactions)==null?void 0:te.reply,isMember:s,functions:{createReply:a,like:i,unlike:u,join:d,leave:f}})]})},n)},Us=({id:e,data:{jobTitle:t,name:n,organization:s,thumbnail:o}})=>({id:e,name:n,jobTitle:t,organization:s,image:{thumbnail:o}});exports.ASSETS_BUCKET=Qe;exports.ActivitiesFeed=Ds;exports.ActivitySection=Hs;exports.AddPost=Nt;exports.BannerSection=Ur;exports.Breadcrumbs=ls;exports.Button=G;exports.ButtonWrapper=Ee;exports.CacheProvider=En;exports.CollapsibleSection=Tt;exports.Columns=fs;exports.CommunityDetails=is;exports.Contributors=Sn;exports.ConversationContext=Dt;exports.CookieBanner=An;exports.DiscussionConversation=Es;exports.DiscussionForm=Rt;exports.DiscussionLikes=In;exports.DiscussionPost=Je;exports.DiscussionThread=Cs;exports.Divider=Ue;exports.DownloadSection=Br;exports.EMAILS=_e;exports.EmailHelperTextBox=ps;exports.EmptyStateBox=$e;exports.Filters=cs;exports.FlagsProvider=Tn;exports.Footer=Pt;exports.FullWidthSection=Et;exports.GlobalProviders=as;exports.Header=At;exports.HelperTextBox=xn;exports.HiddenFromScreenReaders=jt;exports.HideShowTextBox=zr;exports.HighlightedTextBox=de;exports.IntlProvider=$n;exports.JoinButton=Mt;exports.LanguageSwitcher=ds;exports.Link=Te;exports.LoadMore=Cn;exports.LoadingBlock=ts;exports.LoadingPlaceholder=ie;exports.LoadingState=wn;exports.Logo=Ct;exports.LogoSection=Or;exports.MarkdownText=yt;exports.MarketingBox=Qr;exports.Member=qe;exports.MembersList=js;exports.Modal=Bn;exports.MoreMenu=Pn;exports.NUMBER_OF_USERS=Wr;exports.Overlay=On;exports.PageLayout=ys;exports.PasswordRules=_s;exports.Pill=vn;exports.ProfilePicture=Ge;exports.ProgressBar=yn;exports.Rating=xs;exports.RepliesFeed=Hn;exports.ResponsesHeading=Ms;exports.ResponsiveImage=hn;exports.SearchForm=Fn;exports.Span=bn;exports.StatusBanner=We;exports.Tags=ws;exports.Tooltip=gn;exports.UserContext=me;exports.UserProvider=Mn;exports.VisuallyHidden=J;exports.addAriaProps=Ln;exports.getMember=$t;exports.headerData=je;exports.mapGetStreamData=Us;exports.useCurrentPath=cn;exports.useEffectAfterMount=pe;exports.useScreenWidth=Se;exports.useScrollListener=dn;exports.useScrollToHash=Sr;