@apolitical/component-library 1.10.0-beta.1 → 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.mjs CHANGED
@@ -1,84 +1,4432 @@
1
- import { O as r, a7 as t, a9 as i, _ as n, G as d, aD as l, ae as u, af as c, T as S, aN as g, ap as m, K as B, aW as p, a1 as P, ar as x, a0 as L, a2 as h, a3 as v, a4 as C, a6 as M, ag as T, aK as D, Q as F, aa as H, aO as R, aE as E, U as b, as as A, aL as k, W as y, at as U, aP as f, H as w, aQ as W, aR as G, X as I, L as O, aF as _, ah as J, aG as K, av as N, aw as V, ax as Q, aI as X, aM as Y, aS as Z, J as j, aX as q, N as z, aA as $, aH as aa, R as sa, aB as ea, aq as oa, ab as ra, aU as ta, aZ as ia, ay as na, ac as da, a8 as la, a5 as ua, ai as ca, ad as Sa, aT as ga, aV as ma, aJ as Ba, aj as pa, Y as Pa, Z as xa, V as La, aC as ha, aY as va, au as Ca, az as Ma, ak as Ta, al as Da, am as Fa, an as Ha, ao as Ra } from "./index-aeeb4f98.mjs";
2
- import "react";
3
- import "react/jsx-runtime";
1
+ import C, { memo as je, useState as F, useEffect as V, useRef as Z, useMemo as Ye, Children as yt, createContext as Tt, useContext as ge, Fragment as Jt, useCallback as be, useReducer as tr, Suspense as nr } from "react";
2
+ import rr from "lodash.clonedeep";
3
+ import sr from "lodash.set";
4
+ import { useIntl as A, IntlProvider as or, createIntl as ar, FormattedMessage as fe } from "react-intl";
5
+ import Mt from "truncate";
6
+ import Ge from "markdown-to-jsx";
7
+ import { QueryClient as ir, QueryClientProvider as lr, useQueryClient as Ct, useQuery as an, useMutation as pe } from "@tanstack/react-query";
8
+ import { ReactQueryDevtools as cr } from "@tanstack/react-query-devtools";
9
+ import We from "posthog-js";
10
+ import { useCookies as ur, CookiesProvider as dr } from "react-cookie";
11
+ import ln from "lodash.get";
12
+ import { ErrorBoundary as mr } from "react-error-boundary";
13
+ import fr from "react-textarea-autosize";
14
+ import pr from "lodash.isequal";
15
+ function hr(e) {
16
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
17
+ }
18
+ var cn = { exports: {} };
19
+ /*!
20
+ Copyright (c) 2018 Jed Watson.
21
+ Licensed under the MIT License (MIT), see
22
+ http://jedwatson.github.io/classnames
23
+ */
24
+ (function(e) {
25
+ (function() {
26
+ var t = {}.hasOwnProperty;
27
+ function n() {
28
+ for (var s = [], o = 0; o < arguments.length; o++) {
29
+ var l = arguments[o];
30
+ if (l) {
31
+ var m = typeof l;
32
+ if (m === "string" || m === "number")
33
+ s.push(l);
34
+ else if (Array.isArray(l)) {
35
+ if (l.length) {
36
+ var a = n.apply(null, l);
37
+ a && s.push(a);
38
+ }
39
+ } else if (m === "object") {
40
+ if (l.toString !== Object.prototype.toString && !l.toString.toString().includes("[native code]")) {
41
+ s.push(l.toString());
42
+ continue;
43
+ }
44
+ for (var i in l)
45
+ t.call(l, i) && l[i] && s.push(i);
46
+ }
47
+ }
48
+ }
49
+ return s.join(" ");
50
+ }
51
+ e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
52
+ })();
53
+ })(cn);
54
+ var gr = cn.exports;
55
+ const k = /* @__PURE__ */ hr(gr), _r = ({ element: e = "span", showOnFocus: t = !0, children: n, ...s }) => C.createElement(e, { ...s, className: k("hidden", { "show-on-focus": t }), children: n }), ee = je(_r), xr = ({ element: e = "span", children: t = null, ...n }) => C.createElement(e, { ...n, "aria-hidden": !0 }, t), un = je(xr);
56
+ var wt = { exports: {} }, Se = {};
57
+ /**
58
+ * @license React
59
+ * react-jsx-runtime.production.min.js
60
+ *
61
+ * Copyright (c) Facebook, Inc. and its affiliates.
62
+ *
63
+ * This source code is licensed under the MIT license found in the
64
+ * LICENSE file in the root directory of this source tree.
65
+ */
66
+ var qt;
67
+ function br() {
68
+ if (qt)
69
+ return Se;
70
+ qt = 1;
71
+ var e = C, 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 };
72
+ function m(a, i, u) {
73
+ var d, f = {}, p = null, g = null;
74
+ u !== void 0 && (p = "" + u), i.key !== void 0 && (p = "" + i.key), i.ref !== void 0 && (g = i.ref);
75
+ for (d in i)
76
+ s.call(i, d) && !l.hasOwnProperty(d) && (f[d] = i[d]);
77
+ if (a && a.defaultProps)
78
+ for (d in i = a.defaultProps, i)
79
+ f[d] === void 0 && (f[d] = i[d]);
80
+ return { $$typeof: t, type: a, key: p, ref: g, props: f, _owner: o.current };
81
+ }
82
+ return Se.Fragment = n, Se.jsx = m, Se.jsxs = m, Se;
83
+ }
84
+ var $e = {};
85
+ /**
86
+ * @license React
87
+ * react-jsx-runtime.development.js
88
+ *
89
+ * Copyright (c) Facebook, Inc. and its affiliates.
90
+ *
91
+ * This source code is licensed under the MIT license found in the
92
+ * LICENSE file in the root directory of this source tree.
93
+ */
94
+ var Xt;
95
+ function vr() {
96
+ return Xt || (Xt = 1, process.env.NODE_ENV !== "production" && function() {
97
+ var e = C, 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"), g = Symbol.for("react.offscreen"), h = Symbol.iterator, v = "@@iterator";
98
+ function j(c) {
99
+ if (c === null || typeof c != "object")
100
+ return null;
101
+ var x = h && c[h] || c[v];
102
+ return typeof x == "function" ? x : null;
103
+ }
104
+ var E = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
105
+ function _(c) {
106
+ {
107
+ for (var x = arguments.length, w = new Array(x > 1 ? x - 1 : 0), S = 1; S < x; S++)
108
+ w[S - 1] = arguments[S];
109
+ $("error", c, w);
110
+ }
111
+ }
112
+ function $(c, x, w) {
113
+ {
114
+ var S = E.ReactDebugCurrentFrame, R = S.getStackAddendum();
115
+ R !== "" && (x += "%s", w = w.concat([R]));
116
+ var H = w.map(function(P) {
117
+ return String(P);
118
+ });
119
+ H.unshift("Warning: " + x), Function.prototype.apply.call(console[c], console, H);
120
+ }
121
+ }
122
+ var B = !1, y = !1, U = !1, W = !1, b = !1, M;
123
+ M = Symbol.for("react.module.reference");
124
+ function Q(c) {
125
+ return !!(typeof c == "string" || typeof c == "function" || c === s || c === l || b || c === o || c === u || c === d || W || c === g || B || y || U || typeof c == "object" && c !== null && (c.$$typeof === p || c.$$typeof === f || c.$$typeof === m || c.$$typeof === a || c.$$typeof === i || // This needs to include all possible module reference object
126
+ // types supported by any Flight configuration anywhere since
127
+ // we don't know which Flight build this will end up being used
128
+ // with.
129
+ c.$$typeof === M || c.getModuleId !== void 0));
130
+ }
131
+ function O(c, x, w) {
132
+ var S = c.displayName;
133
+ if (S)
134
+ return S;
135
+ var R = x.displayName || x.name || "";
136
+ return R !== "" ? w + "(" + R + ")" : w;
137
+ }
138
+ function z(c) {
139
+ return c.displayName || "Context";
140
+ }
141
+ function N(c) {
142
+ if (c == null)
143
+ return null;
144
+ if (typeof c.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof c == "function")
145
+ return c.displayName || c.name || null;
146
+ if (typeof c == "string")
147
+ return c;
148
+ switch (c) {
149
+ case s:
150
+ return "Fragment";
151
+ case n:
152
+ return "Portal";
153
+ case l:
154
+ return "Profiler";
155
+ case o:
156
+ return "StrictMode";
157
+ case u:
158
+ return "Suspense";
159
+ case d:
160
+ return "SuspenseList";
161
+ }
162
+ if (typeof c == "object")
163
+ switch (c.$$typeof) {
164
+ case a:
165
+ var x = c;
166
+ return z(x) + ".Consumer";
167
+ case m:
168
+ var w = c;
169
+ return z(w._context) + ".Provider";
170
+ case i:
171
+ return O(c, c.render, "ForwardRef");
172
+ case f:
173
+ var S = c.displayName || null;
174
+ return S !== null ? S : N(c.type) || "Memo";
175
+ case p: {
176
+ var R = c, H = R._payload, P = R._init;
177
+ try {
178
+ return N(P(H));
179
+ } catch {
180
+ return null;
181
+ }
182
+ }
183
+ }
184
+ return null;
185
+ }
186
+ var D = Object.assign, Y = 0, X, re, K, se, ie, L, oe;
187
+ function xe() {
188
+ }
189
+ xe.__reactDisabledLog = !0;
190
+ function Pe() {
191
+ {
192
+ if (Y === 0) {
193
+ X = console.log, re = console.info, K = console.warn, se = console.error, ie = console.group, L = console.groupCollapsed, oe = console.groupEnd;
194
+ var c = {
195
+ configurable: !0,
196
+ enumerable: !0,
197
+ value: xe,
198
+ writable: !0
199
+ };
200
+ Object.defineProperties(console, {
201
+ info: c,
202
+ log: c,
203
+ warn: c,
204
+ error: c,
205
+ group: c,
206
+ groupCollapsed: c,
207
+ groupEnd: c
208
+ });
209
+ }
210
+ Y++;
211
+ }
212
+ }
213
+ function Pn() {
214
+ {
215
+ if (Y--, Y === 0) {
216
+ var c = {
217
+ configurable: !0,
218
+ enumerable: !0,
219
+ writable: !0
220
+ };
221
+ Object.defineProperties(console, {
222
+ log: D({}, c, {
223
+ value: X
224
+ }),
225
+ info: D({}, c, {
226
+ value: re
227
+ }),
228
+ warn: D({}, c, {
229
+ value: K
230
+ }),
231
+ error: D({}, c, {
232
+ value: se
233
+ }),
234
+ group: D({}, c, {
235
+ value: ie
236
+ }),
237
+ groupCollapsed: D({}, c, {
238
+ value: L
239
+ }),
240
+ groupEnd: D({}, c, {
241
+ value: oe
242
+ })
243
+ });
244
+ }
245
+ Y < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
246
+ }
247
+ }
248
+ var Ke = E.ReactCurrentDispatcher, et;
249
+ function Ae(c, x, w) {
250
+ {
251
+ if (et === void 0)
252
+ try {
253
+ throw Error();
254
+ } catch (R) {
255
+ var S = R.stack.trim().match(/\n( *(at )?)/);
256
+ et = S && S[1] || "";
257
+ }
258
+ return `
259
+ ` + et + c;
260
+ }
261
+ }
262
+ var tt = !1, Ne;
263
+ {
264
+ var An = typeof WeakMap == "function" ? WeakMap : Map;
265
+ Ne = new An();
266
+ }
267
+ function Rt(c, x) {
268
+ if (!c || tt)
269
+ return "";
270
+ {
271
+ var w = Ne.get(c);
272
+ if (w !== void 0)
273
+ return w;
274
+ }
275
+ var S;
276
+ tt = !0;
277
+ var R = Error.prepareStackTrace;
278
+ Error.prepareStackTrace = void 0;
279
+ var H;
280
+ H = Ke.current, Ke.current = null, Pe();
281
+ try {
282
+ if (x) {
283
+ var P = function() {
284
+ throw Error();
285
+ };
286
+ if (Object.defineProperty(P.prototype, "props", {
287
+ set: function() {
288
+ throw Error();
289
+ }
290
+ }), typeof Reflect == "object" && Reflect.construct) {
291
+ try {
292
+ Reflect.construct(P, []);
293
+ } catch (ce) {
294
+ S = ce;
295
+ }
296
+ Reflect.construct(c, [], P);
297
+ } else {
298
+ try {
299
+ P.call();
300
+ } catch (ce) {
301
+ S = ce;
302
+ }
303
+ c.call(P.prototype);
304
+ }
305
+ } else {
306
+ try {
307
+ throw Error();
308
+ } catch (ce) {
309
+ S = ce;
310
+ }
311
+ c();
312
+ }
313
+ } catch (ce) {
314
+ if (ce && S && typeof ce.stack == "string") {
315
+ for (var T = ce.stack.split(`
316
+ `), te = S.stack.split(`
317
+ `), G = T.length - 1, J = te.length - 1; G >= 1 && J >= 0 && T[G] !== te[J]; )
318
+ J--;
319
+ for (; G >= 1 && J >= 0; G--, J--)
320
+ if (T[G] !== te[J]) {
321
+ if (G !== 1 || J !== 1)
322
+ do
323
+ if (G--, J--, J < 0 || T[G] !== te[J]) {
324
+ var ae = `
325
+ ` + T[G].replace(" at new ", " at ");
326
+ return c.displayName && ae.includes("<anonymous>") && (ae = ae.replace("<anonymous>", c.displayName)), typeof c == "function" && Ne.set(c, ae), ae;
327
+ }
328
+ while (G >= 1 && J >= 0);
329
+ break;
330
+ }
331
+ }
332
+ } finally {
333
+ tt = !1, Ke.current = H, Pn(), Error.prepareStackTrace = R;
334
+ }
335
+ var ye = c ? c.displayName || c.name : "", Gt = ye ? Ae(ye) : "";
336
+ return typeof c == "function" && Ne.set(c, Gt), Gt;
337
+ }
338
+ function Nn(c, x, w) {
339
+ return Rt(c, !1);
340
+ }
341
+ function Dn(c) {
342
+ var x = c.prototype;
343
+ return !!(x && x.isReactComponent);
344
+ }
345
+ function De(c, x, w) {
346
+ if (c == null)
347
+ return "";
348
+ if (typeof c == "function")
349
+ return Rt(c, Dn(c));
350
+ if (typeof c == "string")
351
+ return Ae(c);
352
+ switch (c) {
353
+ case u:
354
+ return Ae("Suspense");
355
+ case d:
356
+ return Ae("SuspenseList");
357
+ }
358
+ if (typeof c == "object")
359
+ switch (c.$$typeof) {
360
+ case i:
361
+ return Nn(c.render);
362
+ case f:
363
+ return De(c.type, x, w);
364
+ case p: {
365
+ var S = c, R = S._payload, H = S._init;
366
+ try {
367
+ return De(H(R), x, w);
368
+ } catch {
369
+ }
370
+ }
371
+ }
372
+ return "";
373
+ }
374
+ var Re = Object.prototype.hasOwnProperty, Ft = {}, Ot = E.ReactDebugCurrentFrame;
375
+ function Fe(c) {
376
+ if (c) {
377
+ var x = c._owner, w = De(c.type, c._source, x ? x.type : null);
378
+ Ot.setExtraStackFrame(w);
379
+ } else
380
+ Ot.setExtraStackFrame(null);
381
+ }
382
+ function Rn(c, x, w, S, R) {
383
+ {
384
+ var H = Function.call.bind(Re);
385
+ for (var P in c)
386
+ if (H(c, P)) {
387
+ var T = void 0;
388
+ try {
389
+ if (typeof c[P] != "function") {
390
+ var te = Error((S || "React class") + ": " + w + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof c[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
391
+ throw te.name = "Invariant Violation", te;
392
+ }
393
+ T = c[P](x, P, S, w, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
394
+ } catch (G) {
395
+ T = G;
396
+ }
397
+ T && !(T instanceof Error) && (Fe(R), _("%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).", S || "React class", w, P, typeof T), Fe(null)), T instanceof Error && !(T.message in Ft) && (Ft[T.message] = !0, Fe(R), _("Failed %s type: %s", w, T.message), Fe(null));
398
+ }
399
+ }
400
+ }
401
+ var Fn = Array.isArray;
402
+ function nt(c) {
403
+ return Fn(c);
404
+ }
405
+ function On(c) {
406
+ {
407
+ var x = typeof Symbol == "function" && Symbol.toStringTag, w = x && c[Symbol.toStringTag] || c.constructor.name || "Object";
408
+ return w;
409
+ }
410
+ }
411
+ function Bn(c) {
412
+ try {
413
+ return Bt(c), !1;
414
+ } catch {
415
+ return !0;
416
+ }
417
+ }
418
+ function Bt(c) {
419
+ return "" + c;
420
+ }
421
+ function Lt(c) {
422
+ if (Bn(c))
423
+ return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", On(c)), Bt(c);
424
+ }
425
+ var Ee = E.ReactCurrentOwner, Ln = {
426
+ key: !0,
427
+ ref: !0,
428
+ __self: !0,
429
+ __source: !0
430
+ }, It, Ht, rt;
431
+ rt = {};
432
+ function In(c) {
433
+ if (Re.call(c, "ref")) {
434
+ var x = Object.getOwnPropertyDescriptor(c, "ref").get;
435
+ if (x && x.isReactWarning)
436
+ return !1;
437
+ }
438
+ return c.ref !== void 0;
439
+ }
440
+ function Hn(c) {
441
+ if (Re.call(c, "key")) {
442
+ var x = Object.getOwnPropertyDescriptor(c, "key").get;
443
+ if (x && x.isReactWarning)
444
+ return !1;
445
+ }
446
+ return c.key !== void 0;
447
+ }
448
+ function Un(c, x) {
449
+ if (typeof c.ref == "string" && Ee.current && x && Ee.current.stateNode !== x) {
450
+ var w = N(Ee.current.type);
451
+ rt[w] || (_('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', N(Ee.current.type), c.ref), rt[w] = !0);
452
+ }
453
+ }
454
+ function Wn(c, x) {
455
+ {
456
+ var w = function() {
457
+ It || (It = !0, _("%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)", x));
458
+ };
459
+ w.isReactWarning = !0, Object.defineProperty(c, "key", {
460
+ get: w,
461
+ configurable: !0
462
+ });
463
+ }
464
+ }
465
+ function Qn(c, x) {
466
+ {
467
+ var w = function() {
468
+ Ht || (Ht = !0, _("%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)", x));
469
+ };
470
+ w.isReactWarning = !0, Object.defineProperty(c, "ref", {
471
+ get: w,
472
+ configurable: !0
473
+ });
474
+ }
475
+ }
476
+ var zn = function(c, x, w, S, R, H, P) {
477
+ var T = {
478
+ // This tag allows us to uniquely identify this as a React Element
479
+ $$typeof: t,
480
+ // Built-in properties that belong on the element
481
+ type: c,
482
+ key: x,
483
+ ref: w,
484
+ props: P,
485
+ // Record the component responsible for creating this element.
486
+ _owner: H
487
+ };
488
+ return T._store = {}, Object.defineProperty(T._store, "validated", {
489
+ configurable: !1,
490
+ enumerable: !1,
491
+ writable: !0,
492
+ value: !1
493
+ }), Object.defineProperty(T, "_self", {
494
+ configurable: !1,
495
+ enumerable: !1,
496
+ writable: !1,
497
+ value: S
498
+ }), Object.defineProperty(T, "_source", {
499
+ configurable: !1,
500
+ enumerable: !1,
501
+ writable: !1,
502
+ value: R
503
+ }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
504
+ };
505
+ function Vn(c, x, w, S, R) {
506
+ {
507
+ var H, P = {}, T = null, te = null;
508
+ w !== void 0 && (Lt(w), T = "" + w), Hn(x) && (Lt(x.key), T = "" + x.key), In(x) && (te = x.ref, Un(x, R));
509
+ for (H in x)
510
+ Re.call(x, H) && !Ln.hasOwnProperty(H) && (P[H] = x[H]);
511
+ if (c && c.defaultProps) {
512
+ var G = c.defaultProps;
513
+ for (H in G)
514
+ P[H] === void 0 && (P[H] = G[H]);
515
+ }
516
+ if (T || te) {
517
+ var J = typeof c == "function" ? c.displayName || c.name || "Unknown" : c;
518
+ T && Wn(P, J), te && Qn(P, J);
519
+ }
520
+ return zn(c, T, te, R, S, Ee.current, P);
521
+ }
522
+ }
523
+ var st = E.ReactCurrentOwner, Ut = E.ReactDebugCurrentFrame;
524
+ function ve(c) {
525
+ if (c) {
526
+ var x = c._owner, w = De(c.type, c._source, x ? x.type : null);
527
+ Ut.setExtraStackFrame(w);
528
+ } else
529
+ Ut.setExtraStackFrame(null);
530
+ }
531
+ var ot;
532
+ ot = !1;
533
+ function at(c) {
534
+ return typeof c == "object" && c !== null && c.$$typeof === t;
535
+ }
536
+ function Wt() {
537
+ {
538
+ if (st.current) {
539
+ var c = N(st.current.type);
540
+ if (c)
541
+ return `
542
+
543
+ Check the render method of \`` + c + "`.";
544
+ }
545
+ return "";
546
+ }
547
+ }
548
+ function Yn(c) {
549
+ {
550
+ if (c !== void 0) {
551
+ var x = c.fileName.replace(/^.*[\\\/]/, ""), w = c.lineNumber;
552
+ return `
553
+
554
+ Check your code at ` + x + ":" + w + ".";
555
+ }
556
+ return "";
557
+ }
558
+ }
559
+ var Qt = {};
560
+ function Gn(c) {
561
+ {
562
+ var x = Wt();
563
+ if (!x) {
564
+ var w = typeof c == "string" ? c : c.displayName || c.name;
565
+ w && (x = `
566
+
567
+ Check the top-level render call using <` + w + ">.");
568
+ }
569
+ return x;
570
+ }
571
+ }
572
+ function zt(c, x) {
573
+ {
574
+ if (!c._store || c._store.validated || c.key != null)
575
+ return;
576
+ c._store.validated = !0;
577
+ var w = Gn(x);
578
+ if (Qt[w])
579
+ return;
580
+ Qt[w] = !0;
581
+ var S = "";
582
+ c && c._owner && c._owner !== st.current && (S = " It was passed a child from " + N(c._owner.type) + "."), ve(c), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', w, S), ve(null);
583
+ }
584
+ }
585
+ function Vt(c, x) {
586
+ {
587
+ if (typeof c != "object")
588
+ return;
589
+ if (nt(c))
590
+ for (var w = 0; w < c.length; w++) {
591
+ var S = c[w];
592
+ at(S) && zt(S, x);
593
+ }
594
+ else if (at(c))
595
+ c._store && (c._store.validated = !0);
596
+ else if (c) {
597
+ var R = j(c);
598
+ if (typeof R == "function" && R !== c.entries)
599
+ for (var H = R.call(c), P; !(P = H.next()).done; )
600
+ at(P.value) && zt(P.value, x);
601
+ }
602
+ }
603
+ }
604
+ function Jn(c) {
605
+ {
606
+ var x = c.type;
607
+ if (x == null || typeof x == "string")
608
+ return;
609
+ var w;
610
+ if (typeof x == "function")
611
+ w = x.propTypes;
612
+ else if (typeof x == "object" && (x.$$typeof === i || // Note: Memo only checks outer props here.
613
+ // Inner props are checked in the reconciler.
614
+ x.$$typeof === f))
615
+ w = x.propTypes;
616
+ else
617
+ return;
618
+ if (w) {
619
+ var S = N(x);
620
+ Rn(w, c.props, "prop", S, c);
621
+ } else if (x.PropTypes !== void 0 && !ot) {
622
+ ot = !0;
623
+ var R = N(x);
624
+ _("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", R || "Unknown");
625
+ }
626
+ typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
627
+ }
628
+ }
629
+ function qn(c) {
630
+ {
631
+ for (var x = Object.keys(c.props), w = 0; w < x.length; w++) {
632
+ var S = x[w];
633
+ if (S !== "children" && S !== "key") {
634
+ ve(c), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", S), ve(null);
635
+ break;
636
+ }
637
+ }
638
+ c.ref !== null && (ve(c), _("Invalid attribute `ref` supplied to `React.Fragment`."), ve(null));
639
+ }
640
+ }
641
+ function Yt(c, x, w, S, R, H) {
642
+ {
643
+ var P = Q(c);
644
+ if (!P) {
645
+ var T = "";
646
+ (c === void 0 || typeof c == "object" && c !== null && Object.keys(c).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
647
+ var te = Yn(R);
648
+ te ? T += te : T += Wt();
649
+ var G;
650
+ c === null ? G = "null" : nt(c) ? G = "array" : c !== void 0 && c.$$typeof === t ? (G = "<" + (N(c.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : G = typeof c, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", G, T);
651
+ }
652
+ var J = Vn(c, x, w, R, H);
653
+ if (J == null)
654
+ return J;
655
+ if (P) {
656
+ var ae = x.children;
657
+ if (ae !== void 0)
658
+ if (S)
659
+ if (nt(ae)) {
660
+ for (var ye = 0; ye < ae.length; ye++)
661
+ Vt(ae[ye], c);
662
+ Object.freeze && Object.freeze(ae);
663
+ } else
664
+ _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
665
+ else
666
+ Vt(ae, c);
667
+ }
668
+ return c === s ? qn(J) : Jn(J), J;
669
+ }
670
+ }
671
+ function Xn(c, x, w) {
672
+ return Yt(c, x, w, !0);
673
+ }
674
+ function Zn(c, x, w) {
675
+ return Yt(c, x, w, !1);
676
+ }
677
+ var Kn = Zn, er = Xn;
678
+ $e.Fragment = s, $e.jsx = Kn, $e.jsxs = er;
679
+ }()), $e;
680
+ }
681
+ process.env.NODE_ENV === "production" ? wt.exports = br() : wt.exports = vr();
682
+ var r = wt.exports;
683
+ const yr = () => {
684
+ const [e, t] = F(window.location.pathname), n = () => {
685
+ const s = window.location.pathname;
686
+ t(s);
687
+ };
688
+ return V(() => (window.addEventListener("popstate", n), () => {
689
+ window.removeEventListener("popstate", n);
690
+ }), []), e;
691
+ }, ke = (e, t) => {
692
+ const n = Z(!1);
693
+ V(() => {
694
+ n.current ? e() : n.current = !0;
695
+ }, t);
696
+ };
697
+ function wr(e, t, n) {
698
+ var s = this, o = Z(null), l = Z(0), m = Z(null), a = Z([]), i = Z(), u = Z(), d = Z(e), f = Z(!0);
699
+ V(function() {
700
+ d.current = e;
701
+ }, [e]);
702
+ var p = !t && t !== 0 && typeof window < "u";
703
+ if (typeof e != "function")
704
+ throw new TypeError("Expected a function");
705
+ t = +t || 0;
706
+ var g = !!(n = n || {}).leading, h = !("trailing" in n) || !!n.trailing, v = "maxWait" in n, j = v ? Math.max(+n.maxWait || 0, t) : null;
707
+ V(function() {
708
+ return f.current = !0, function() {
709
+ f.current = !1;
710
+ };
711
+ }, []);
712
+ var E = Ye(function() {
713
+ var _ = function(b) {
714
+ var M = a.current, Q = i.current;
715
+ return a.current = i.current = null, l.current = b, u.current = d.current.apply(Q, M);
716
+ }, $ = function(b, M) {
717
+ p && cancelAnimationFrame(m.current), m.current = p ? requestAnimationFrame(b) : setTimeout(b, M);
718
+ }, B = function(b) {
719
+ if (!f.current)
720
+ return !1;
721
+ var M = b - o.current;
722
+ return !o.current || M >= t || M < 0 || v && b - l.current >= j;
723
+ }, y = function(b) {
724
+ return m.current = null, h && a.current ? _(b) : (a.current = i.current = null, u.current);
725
+ }, U = function b() {
726
+ var M = Date.now();
727
+ if (B(M))
728
+ return y(M);
729
+ if (f.current) {
730
+ var Q = t - (M - o.current), O = v ? Math.min(Q, j - (M - l.current)) : Q;
731
+ $(b, O);
732
+ }
733
+ }, W = function() {
734
+ var b = Date.now(), M = B(b);
735
+ if (a.current = [].slice.call(arguments), i.current = s, o.current = b, M) {
736
+ if (!m.current && f.current)
737
+ return l.current = o.current, $(U, t), g ? _(o.current) : u.current;
738
+ if (v)
739
+ return $(U, t), _(o.current);
740
+ }
741
+ return m.current || $(U, t), u.current;
742
+ };
743
+ return W.cancel = function() {
744
+ m.current && (p ? cancelAnimationFrame(m.current) : clearTimeout(m.current)), l.current = 0, a.current = o.current = i.current = m.current = null;
745
+ }, W.isPending = function() {
746
+ return !!m.current;
747
+ }, W.flush = function() {
748
+ return m.current ? y(Date.now()) : u.current;
749
+ }, W;
750
+ }, [g, v, t, j, h, p]);
751
+ return E;
752
+ }
753
+ function dn(e, t, n) {
754
+ var s = n === void 0 ? {} : n, o = s.leading, l = s.trailing;
755
+ return wr(e, t, { maxWait: t, leading: o === void 0 || o, trailing: l === void 0 || l });
756
+ }
757
+ let it;
758
+ const Je = (e = !0, t = !1) => {
759
+ if (!e)
760
+ return;
761
+ const [n, s] = C.useState(0) || [!1, () => {
762
+ }];
763
+ V(() => (l(), window.addEventListener("resize", m), () => {
764
+ clearTimeout(it), m.flush(), window.removeEventListener("resize", m);
765
+ }), []);
766
+ const o = () => window.innerWidth, l = () => {
767
+ s(o());
768
+ }, m = dn(
769
+ () => {
770
+ o() !== n && (t && (clearTimeout(it), document.body.classList.add("is-resizing"), it = setTimeout(() => {
771
+ document.body.classList.remove("is-resizing");
772
+ }, 550)), l());
773
+ },
774
+ 500,
775
+ { leading: !0 }
776
+ );
777
+ return n;
778
+ }, kr = ({
779
+ scrollPosition: e = 0,
780
+ // The position on the page to scroll past
781
+ offset: t = { down: 0, up: 10 },
782
+ // An optional buffer
783
+ callbacks: { scrollDown: n = () => {
784
+ }, scrollUp: s = () => {
785
+ } }
786
+ }) => {
787
+ if (!window)
788
+ return;
789
+ const [o, l] = C.useState({ current: 0, past: 0 }) || [!1, () => {
790
+ }], [m, a] = C.useState({ scrollDown: !1, scrollUp: !1 }) || [!1, () => {
791
+ }];
792
+ V(() => (i(), window.addEventListener("scroll", u), () => {
793
+ u.flush(), window.removeEventListener("scroll", u);
794
+ }), []);
795
+ const i = () => {
796
+ const d = window.scrollY, f = o.current, p = d - f, g = p > 0 ? "down" : "up";
797
+ if (l({ current: d, past: f }), g === "down") {
798
+ d >= e + t.down && !m.scrollDown && (!m.scrollUp || p > t.up) && (n(), a({ scrollUp: !1, scrollDown: !0 }));
799
+ return;
800
+ }
801
+ Math.abs(p) >= t.up && !m.scrollUp && (s(), a({ scrollUp: !0, scrollDown: !1 }));
802
+ }, u = dn(() => {
803
+ i();
804
+ }, 250);
805
+ return o;
806
+ }, Xs = (e = [], t = !0) => {
807
+ e = Array.isArray(e) ? e : [e];
808
+ const n = Z(!1);
809
+ ke(() => {
810
+ if (window && window.location && window.location.hash) {
811
+ if (n.current)
812
+ return;
813
+ const s = document.getElementById(window.location.hash.replace("#", ""));
814
+ s && (s.scrollIntoView(t ? { behavior: "smooth" } : null), n.current = !0);
815
+ }
816
+ }, e);
817
+ }, jr = (e, t) => {
818
+ Array.isArray(t) || (t = [t]);
819
+ const n = rr(e);
820
+ return t.forEach(({ type: s, value: o }) => {
821
+ sr(n, s, o);
822
+ }), n;
823
+ }, mn = (e) => {
824
+ const t = [];
825
+ return e.forEach((n) => {
826
+ const s = parseInt(n);
827
+ isNaN(s) || t.push(s);
828
+ }), t.sort((n, s) => n - s);
829
+ }, fn = (e, t, n) => {
830
+ let s = n.mobile;
831
+ for (const o in t) {
832
+ const l = parseInt(String(t[o]));
833
+ if (e >= l)
834
+ s = n[l];
835
+ else if (e < l)
836
+ break;
837
+ }
838
+ return s;
839
+ }, Er = (e, t = "en") => new Date(e).toLocaleString(t, {
840
+ weekday: "long",
841
+ day: "numeric",
842
+ month: "short",
843
+ year: "numeric"
844
+ }), Sr = (e) => {
845
+ let l;
846
+ try {
847
+ l = (/* @__PURE__ */ new Date()).getTime() - new Date(e).getTime();
848
+ } catch {
849
+ return "";
850
+ }
851
+ const m = l / 36e5, a = Math.floor(l / 864e5);
852
+ if (a < 1)
853
+ return m < 1 ? { path: "now" } : { path: "hours", number: Math.floor(m) };
854
+ if (a < 7)
855
+ return { path: "days", number: a };
856
+ const i = Math.floor(a / 7);
857
+ return i <= 52 ? { path: "weeks", number: i } : { path: "years", number: Math.floor(a / 365) };
858
+ }, $r = (e) => new Promise((t) => setTimeout(t, e)), Pt = {
859
+ apolitical: "Apolitical",
860
+ breadcrumbs_label: "Go back to:",
861
+ breadcrumbs_currentPage: "Current page:",
862
+ card_bootcamp: "Email boot camp",
863
+ card_ended: "Ended",
864
+ card_registered: "Registered",
865
+ card_answers: "{number, plural, =0 {0 answers} one {# answer} other {# answers}}",
866
+ card_time_ago: "{time} ago",
867
+ card_time_read: "{time} min read",
868
+ card_watch: "Watch recording",
869
+ card_cta_people: "View profile",
870
+ collapsibleSection_summary: "Find out more",
871
+ communityDetails_members: "Members",
872
+ communityDetails_viewAll: "View all",
873
+ communityDetails_invite: "Invite colleagues",
874
+ community_joinToPost: "Join community to create a post.",
875
+ contactFooter_title: "Contact us",
876
+ contactFooter_text: "We're always open to new ideas, so please reach out to see how we can collaborate.",
877
+ contactFooter_phone: "+44 203 608 2241",
878
+ contactFooter_email: "hello@apolitical.co",
879
+ contactForm_name: "Name",
880
+ contactForm_email: "Email address",
881
+ contactForm_organisation: "Government department or organisation",
882
+ contactForm_interests: "I'm interested in",
883
+ contactForm_interests_publishingCourse: "Publishing or creating a course",
884
+ contactForm_interests_buyingCourse: "Buying courses for my team",
885
+ contactForm_interests_learningExperience: "Customised learning experiences",
886
+ contactForm_interests_somethingElse: "Something else",
887
+ contactForm_message: "Message",
888
+ cookieBanner_title: "Cookies and your privacy",
889
+ 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.",
890
+ cookieBanner_buttons_settings: "Change my settings",
891
+ cookieBanner_buttons_reject: "Reject all",
892
+ cookieBanner_buttons_accept: "Accept all",
893
+ dates_now: "now",
894
+ dates_hours: "{number}h",
895
+ dates_days: "{number}d",
896
+ dates_weeks: "{number}w",
897
+ dates_years: "{number}y",
898
+ discussion_action_answer: "answer",
899
+ discussion_action_comment: "comment",
900
+ discussion_action_post: "post",
901
+ discussion_action_response: "response",
902
+ discussion_action_reply: "reply",
903
+ discussion_action_question: "question",
904
+ discussion_edited: "Edited",
905
+ discussion_delete_title: "Delete {action}",
906
+ discussion_delete_text: "<p>Are you sure you want to delete your {action}?</p><p>This can't be undone.</p>",
907
+ discussion_delete_cancel: "Cancel",
908
+ discussion_delete_delete: "Delete",
909
+ discussion_delete_error: "We are unable to delete your {action} at the moment. Please try again later or contact us if problem persists.",
910
+ discussion_reply: "Reply",
911
+ discussion_report_subject: "Report a post on Apolitical",
912
+ discussion_report_body: `I'd like to report the {contentType} <{contentSlug}> at {contentUrl}.
913
+
914
+ 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.
915
+
916
+ Thank you for helping to protect the Apolitical community from abusive content.`,
917
+ discussion_form_title: "Write your {action}",
918
+ discussion_form_placeholder: "Type your {action} here...",
919
+ discussion_form_label: "Your {action}",
920
+ discussion_form_explainer: "Try to make your {action} specific and practical. Be respectful and kind. See our <a>community guidelines</a>",
921
+ discussion_form_success: "Your {action} has been submitted.",
922
+ discussion_form_post: "Post",
923
+ discussion_form_posting: "Posting...",
924
+ discussion_form_save: "Save",
925
+ discussion_form_saving: "Saving...",
926
+ discussion_form_cancel: "Cancel",
927
+ discussion_form_submitting: "Submitting...",
928
+ discussion_form_placeholder_post: "Write something...",
929
+ discussion_form_error: "We are unable to process your {action} right now. Please try again later or contact us if the problem persists",
930
+ discussion_form_error_tooLong: "Please keep your content to {maxLength, plural, one {1 character} other {# characters}}.",
931
+ discussion_form_error_tooMany: "You have posted too many times in a row. Please wait and try again.",
932
+ discussion_form_error_loggedOut: "Please log in to submit your {action}.",
933
+ discussion_form_error_noPermission: "You do not have permission to {action}.",
934
+ discussion_form_error_alreadyExists: "This {action} already exists.",
935
+ discussion_form_title_question: "Start a conversation",
936
+ discussion_form_placeholder_question: "Ask your question here",
937
+ discussion_form_explainer_question: "Unsure what you can post? See our <a>community guidelines</a>.",
938
+ discussion_likes: "{number, plural, =0 {0 likes} one {# like} other {# likes}}",
939
+ discussion_likes_short: "{number}",
940
+ discussion_likes_more: "and {number} more...",
941
+ discussion_likes_like: "Like this {action}",
942
+ discussion_likes_unlike: "Unlike {action}",
943
+ discussion_moreMenu_edit: "Edit",
944
+ discussion_moreMenu_delete: "Delete",
945
+ discussion_moreMenu_report: "Report",
946
+ discussion_comments_screenReader: "See {count, plural, =0 {0 comments} one {# comment} other {# comments}}",
947
+ discussion_comments: "{count, plural, =0 {0 comments} one {# comment} other {# comments}}",
948
+ discussion_responses_answer: "Answers",
949
+ discussion_responses_comment: "Comments",
950
+ discussion_responses_title: "{action} ({count})",
951
+ discussion_responses_empty: "Be the first to respond",
952
+ discussion_responses_empty_answer: "Be the first to answer this question",
953
+ discussion_thread_show: "Show {count, plural, =0 {replies} one {# reply} other {# replies}}",
954
+ discussion_thread_hide: "Hide replies",
955
+ emailHelperTextBox_fallback_title: "Who can join",
956
+ emailHelperTextBox_fallback_text: "Apolitical is a private community for public servants and policymakers.",
957
+ emailHelperTextBox_default_title: "Who can join",
958
+ emailHelperTextBox_default_text: "Apolitical is a private community for public servants and policymakers. <link>Learn more</link>.",
959
+ emailHelperTextBox_autoApproved_title: "Email check",
960
+ emailHelperTextBox_autoApproved_text: "Great! Looks like you are using a **government email domain we recognise.** You will be **auto-approved** once you sign up.",
961
+ emailHelperTextBox_unrecognisedEmail_title: "Not a recognised government email",
962
+ emailHelperTextBox_unrecognisedEmail_text: "To confirm you work in government or policy, please add more details below. <link>Learn more</link>.",
963
+ emailHelperTextBox_pendingApproval_title: "Email is pending approval",
964
+ 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>.",
965
+ emailHelperTextBox_emailUnverified_title: "Hello again!",
966
+ 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>.",
967
+ emailHelperTextBox_emailAlreadyExists_title: "Email is already registered",
968
+ 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>.",
969
+ emailHelperTextBox_error_verificationFailedToSend_title: "Verification code failed to send",
970
+ 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>",
971
+ emailHelperTextBox_error_noFunction: "Cannot resend verification code.",
972
+ filters_all: "Show all",
973
+ filters_disabled: "{name} - no results",
974
+ footer_platform: "Platform",
975
+ footer_platform_events: "Events",
976
+ footer_platform_courses: "Courses",
977
+ footer_platform_qanda: "Q&A",
978
+ footer_platform_articles: "Articles",
979
+ footer_community: "Community",
980
+ footer_community_support: "Support FAQ",
981
+ footer_community_post: "Post on Apolitical",
982
+ footer_community_join: "Who can join",
983
+ footer_community_guidelines: "Guidelines & values",
984
+ footer_company: "Company",
985
+ footer_company_story: "Our story",
986
+ footer_company_team: "Meet our team",
987
+ footer_company_careers: "Careers",
988
+ footer_company_partner: "Partner with us",
989
+ footer_company_contact: "Get in touch",
990
+ footer_legal: "Legal",
991
+ footer_legal_privacy: "Privacy policy",
992
+ footer_legal_terms: "Terms & conditions",
993
+ footer_legal_cookie: "Cookie policy",
994
+ footer_legal_accessibility: "Accessibility statement",
995
+ footer_legal_dataProtection: "Data protection officer",
996
+ footer_legal_euDataProtection: "EU data protection officer",
997
+ footer_contact: "Contact",
998
+ footer_contact_correspondence: "Correspondence address",
999
+ footer_contact_correspondence_address: "251 Southwark Bridge Road{br}London, SE1 6FL{br}United Kingdom",
1000
+ footer_contact_registered: "Registered address",
1001
+ footer_contact_registered_address: "20–22 Wenlock Road{br}London, N1 7GU{br}United Kingdom",
1002
+ footer_contact_berlin: "Berlin address",
1003
+ footer_contact_berlin_address: "Torstraße 220{br}10115 Berlin{br}Germany",
1004
+ footer_contact_support: "For platform support",
1005
+ footer_contact_business: "For business inquiries",
1006
+ footer_social_linkedin: "LinkedIn",
1007
+ footer_social_twitter: "Twitter",
1008
+ footer_social_facebook: "Facebook",
1009
+ footer_copyright: "Copyright © {currentYear} Apolitical Group Limited",
1010
+ form_fieldWrapper_required: "required",
1011
+ form_fieldWrapper_characterLimit: "Character limit:",
1012
+ form_error_generalError: "Sorry, something has gone. Please refresh the page and try again.",
1013
+ form_error_required: "Please fill in this required field",
1014
+ form_error_numbers: "Numbers are not allowed in this text field",
1015
+ form_error_email: "Please enter a valid email address",
1016
+ form_error_url: "Please enter a valid URL",
1017
+ form_submit: "Submit",
1018
+ form_submitting: "Submitting form...",
1019
+ form_submitted: "Submitted",
1020
+ header_skip: "Skip to main content",
1021
+ header_search_show: "Show search bar",
1022
+ header_search_hide: "Close search bar",
1023
+ header_menu_show: "Show navigation",
1024
+ header_menu_hide: "Close navigation",
1025
+ header_home_loggedOut: "Home",
1026
+ header_home_loggedIn: "My Home",
1027
+ header_topics: "Topics",
1028
+ header_topics_explore: "Explore",
1029
+ header_topics_explore_events: "Events",
1030
+ header_topics_explore_courses: "Courses",
1031
+ "header_topics_explore_q-and-a": "Q&A",
1032
+ header_topics_explore_articles: "Articles",
1033
+ header_topics_topics: "Topics",
1034
+ header_topics_topics_climate: "Climate",
1035
+ "header_topics_topics_cities-and-local-government": "Cities and local government",
1036
+ "header_topics_topics_digital-and-data": "Digital and data",
1037
+ header_topics_topics_education: "Education",
1038
+ "header_topics_topics_equity-justice-and-inclusion": "Equity, justice and inclusion",
1039
+ "header_topics_topics_health-and-social-care": "Health and social care",
1040
+ header_topics_topics_innovation: "Innovation",
1041
+ "header_topics_topics_leadership-and-skills": "Leadership and skills",
1042
+ "header_topics_topics_life-in-government": "Life in government",
1043
+ header_topics_topics_policymaking: "Policymaking",
1044
+ "header_topics_topics_transport-and-infrastructure": "Transport and infrastructure",
1045
+ "header_topics_topics_work-and-the-economy": "Work and the economy",
1046
+ header_partners: "For partners",
1047
+ header_account: "My account",
1048
+ header_account_show: "Show account menu",
1049
+ header_account_hide: "Close account menu",
1050
+ header_account_profile: "My profile",
1051
+ header_account_settings: "Settings & privacy",
1052
+ "header_account_log-out": "Log out",
1053
+ header_buttons_login: "Log in",
1054
+ header_buttons_signup: "Sign up",
1055
+ hideShowTextBox_hide: "View less",
1056
+ hideShowTextBox_show: "View more",
1057
+ joinCommunityButton: "Join community",
1058
+ joinCommunityButton_short: "Join",
1059
+ joinCommunityButton_joining: "Joining...",
1060
+ joinCommunityButton_member: "Member",
1061
+ joinCommunityButton_member_aria: "Leave community",
1062
+ joinCommunityButton_leave: "Leave",
1063
+ joinCommunityButton_leaving: "Leaving...",
1064
+ languageSwitcher_label: "I would like to read this article in...",
1065
+ languageSwitcher_translation_original: "original language",
1066
+ languageSwitcher_translation_human: "translated by person",
1067
+ languageSwitcher_translation_machine: "translated by machine",
1068
+ languageSwitcher_selected: "{language} - currently selected",
1069
+ 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>",
1070
+ loadMore_button: "Load more",
1071
+ loadMore_endOfFeed: "You're all caught up",
1072
+ loadMore_error: "We're having trouble loading more content. Please refresh the page or try again later.",
1073
+ loadingBlock_loading: "Loading...",
1074
+ loadingBlock_almostDone: "Almost done...",
1075
+ loadingBlock_complete: "Complete!",
1076
+ markdown_collapsibleSection_summary: "Resources",
1077
+ markdown_skip_video: "Skip past video",
1078
+ markdown_skip_padlet: "Skip past interactive board",
1079
+ markdown_skip_poll: "Skip past poll",
1080
+ markdown_skip: "Skip to next section",
1081
+ markdown_iframe_title: "Course information",
1082
+ markdown_iframe_video: "Video",
1083
+ markdown_iframe_padlet: "Interactive board",
1084
+ markdown_iframe_poll: "Poll",
1085
+ member_apolitical: "Apolitical",
1086
+ member_community: "Community post",
1087
+ membersList: "Members",
1088
+ membersList_admin: "Admin",
1089
+ moreMenu: "See more options",
1090
+ overlay_close: "Close",
1091
+ pageLayout_error: "An error occurred while rendering this page. Please refresh the page or try again later.",
1092
+ passwordRules_intro: "We advise you not to use your name or email in your password.",
1093
+ passwordRules_rule_label: "Password",
1094
+ passwordRules_rule_8Characters: "must be longer than 8 characters",
1095
+ passwordRules_rule_numberSymbol: "must include a number and a symbol",
1096
+ passwordRules_rule_lowercaseUppercase: "must include both lower and upper case characters",
1097
+ passwordRules_notMet: "Your password does not meet this requirement",
1098
+ progressBar: "{number}% loaded",
1099
+ ratings_text: "Rate answer",
1100
+ ratings_stars: "{number} out of {total}",
1101
+ ratings_low: "this is incorrect or confusing",
1102
+ ratings_high: "this is a fantastic answer",
1103
+ ratings_success: "Thank you!",
1104
+ search_label: "Search for:",
1105
+ search_placeholder: "Ask Apolitical",
1106
+ search_clear: "Clear search",
1107
+ search_cta: "Search",
1108
+ signup_title: "Sign up",
1109
+ signup_full_name: "Full name",
1110
+ signup_full_name_placeholder: "Lionel Messi",
1111
+ signup_email_address: "Work email",
1112
+ signup_email_address_placeholder: "lionel.messi@argentina.gov",
1113
+ signup_job_title: "Job title",
1114
+ signup_job_title_placeholder: "e.g. Senior Policy Advisor",
1115
+ signup_organization: "Organisation",
1116
+ signup_organization_placeholder: "e.g. Department of Justice",
1117
+ signup_url: "Link to official government bio / LinkedIn <small>(optional)</small>",
1118
+ signup_url_placeholder: "https://organisation.com/bio",
1119
+ signup_expectation: "What do you want to know<small>Optional, but we will use your response to build the session!</small>",
1120
+ signup_expectation_placeholder: "What do you want to know?",
1121
+ 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",
1122
+ 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.",
1123
+ signup_button_join: "Join for free",
1124
+ signup_button_login: "Log in",
1125
+ signup_submitting: "Submitting form...",
1126
+ signup_success_title: "Thank you for applying to join Apolitical!",
1127
+ 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>",
1128
+ sharedLinks_copy_text: "Copy link",
1129
+ tags_community: "From the community",
1130
+ tooltip_loading: "Loading..."
1131
+ }, Tr = {
1132
+ languageSwitcher_label: "Me gustaría leer este artículo en...",
1133
+ languageSwitcher_translation_original: "idioma original",
1134
+ languageSwitcher_translation_human: "traducido por un humano",
1135
+ languageSwitcher_translation_machine: "traducido por máquina",
1136
+ 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>"
1137
+ }, Mr = {
1138
+ collapsibleSection_summary: "En savoir plus",
1139
+ languageSwitcher_label: "Je voudrais lire cet article dans...",
1140
+ languageSwitcher_translation_original: "langue originale",
1141
+ languageSwitcher_translation_human: "traduit par un humain",
1142
+ languageSwitcher_translation_machine: "traduit par machine",
1143
+ 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>"
1144
+ }, Cr = {
1145
+ languageSwitcher_label: "Eu gostaria de ler este artigo em...",
1146
+ languageSwitcher_translation_original: "linguagem original",
1147
+ languageSwitcher_translation_human: "traduzido por um humano",
1148
+ languageSwitcher_translation_machine: "traduzido por máquina",
1149
+ 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>"
1150
+ }, Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1151
+ __proto__: null,
1152
+ en: Pt,
1153
+ es: Tr,
1154
+ fr: Mr,
1155
+ pt: Cr
1156
+ }, Symbol.toStringTag, { value: "Module" })), le = (e, t, n, s, o = {}) => {
1157
+ let l = "";
1158
+ return `${t}_${n}` in Pt ? l = e({ id: `${t}_${n}` }, o) : l = e({ id: t }, { [s]: n, ...o }), l;
1159
+ }, Ar = (e, t, n) => {
1160
+ if (!e || e === 0)
1161
+ return "0";
1162
+ t || (t = 0), n || (n = ["k", "m", "b", "t"]);
1163
+ let s = e.toString();
1164
+ t = Math.pow(10, t);
1165
+ for (let o = n.length - 1; o >= 0; o--) {
1166
+ const l = Math.pow(10, (o + 1) * 3);
1167
+ if (l <= e) {
1168
+ e = Math.round(e * t / l) / t, e === 1e3 && o < n.length - 1 && (e = 1, o++), s = `${e}${n[o]}`;
1169
+ break;
1170
+ }
1171
+ }
1172
+ return s;
1173
+ }, pn = (e, t) => C.Children.map(e, (n) => C.cloneElement(n, {
1174
+ ...t
1175
+ })), Nr = (e) => e.replace(/\s+/g, "").length > 0, q = ({
1176
+ variant: e = "primary",
1177
+ size: t = "medium",
1178
+ styling: n = { muted: !1, fullWidth: !1 },
1179
+ icon: s = !1,
1180
+ href: o = !1,
1181
+ element: l = "button",
1182
+ onClick: m = !1,
1183
+ className: a = "",
1184
+ disabled: i = !1,
1185
+ screenreaderText: u = !1,
1186
+ children: d = !1,
1187
+ ...f
1188
+ }) => {
1189
+ const g = Je(typeof t == "object");
1190
+ if (typeof t == "object" && typeof g == "number") {
1191
+ const j = Object.assign({}, t), E = mn(Object.keys(j));
1192
+ t = fn(g, E, j);
1193
+ }
1194
+ const h = [];
1195
+ 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");
1196
+ const v = {
1197
+ ...f,
1198
+ className: k(e, a, h, {
1199
+ "no-text": !d,
1200
+ disabled: i,
1201
+ button: o
1202
+ }),
1203
+ onClick: (j) => {
1204
+ (!o || o[0] === "#") && m && (j.preventDefault(), j.stopPropagation()), m && m(j);
1205
+ },
1206
+ disabled: typeof i == "object" && "isClickable" in i ? !i.isClickable : i
1207
+ };
1208
+ return o && (l = "a", v.href = o), C.createElement(
1209
+ l,
1210
+ v,
1211
+ d || (u ? /* @__PURE__ */ r.jsx(ee, { showOnFocus: !1, children: u }) : null)
1212
+ );
1213
+ }, qe = ({ buttons: e, className: t = "", ...n }) => {
1214
+ const s = e.length > 1 ? "ul" : "p", o = e.map((l, m) => s === "p" ? /* @__PURE__ */ r.jsx(q, { ...l }, m) : /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(q, { ...l }) }, m));
1215
+ return C.createElement(s, { className: k("button-wrapper", t), ...n, children: o });
1216
+ };
1217
+ const kt = ({ maxWidth: e = !1 }) => {
1218
+ const t = e ? { "--max-width": `${e / 16}rem` } : {};
1219
+ return /* @__PURE__ */ r.jsx("hr", { className: k({ "has-max-width": e }), style: t });
1220
+ }, Xe = ({
1221
+ href: e,
1222
+ children: t,
1223
+ fallbackElement: n,
1224
+ className: s = "",
1225
+ onClick: o,
1226
+ gtmContext: l,
1227
+ gtmType: m,
1228
+ ...a
1229
+ }) => {
1230
+ if (e) {
1231
+ const i = { ...a };
1232
+ return o && (i.onClick = o), l && (i["data-gtm-event-context"] = l), m && (i["data-gtm-event-type"] = m), /* @__PURE__ */ r.jsx(
1233
+ "a",
1234
+ {
1235
+ href: e,
1236
+ className: k("gtm-trackable", s),
1237
+ ...i,
1238
+ children: t
1239
+ }
1240
+ );
1241
+ }
1242
+ return n ? C.createElement(n, { children: t, className: s, ...a }) : t;
1243
+ }, Zt = {
1244
+ card: {
1245
+ range: [
1246
+ {
1247
+ height: 320,
1248
+ width: 320
1249
+ },
1250
+ {
1251
+ height: 425,
1252
+ width: 687
1253
+ },
1254
+ {
1255
+ height: 510,
1256
+ width: 768
1257
+ }
1258
+ ],
1259
+ sizes: "(min-width: 1024px) 720px, 30vw"
1260
+ },
1261
+ responsiveCard: {
1262
+ range: [
1263
+ {
1264
+ height: 125,
1265
+ width: 200
1266
+ },
1267
+ {
1268
+ height: 188,
1269
+ width: 300
1270
+ },
1271
+ {
1272
+ height: 313,
1273
+ width: 500
1274
+ }
1275
+ ],
1276
+ sizes: "(min-width: 1024px) 720px, 30vw"
1277
+ },
1278
+ banner: {
1279
+ range: [
1280
+ {
1281
+ height: 124,
1282
+ width: 425
1283
+ },
1284
+ {
1285
+ height: 320,
1286
+ width: 768
1287
+ },
1288
+ {
1289
+ height: 510,
1290
+ width: 1368
1291
+ }
1292
+ ],
1293
+ sizes: "(min-width: 1024px) 975px, 50vw"
1294
+ },
1295
+ feed: {
1296
+ range: [
1297
+ {
1298
+ height: 270,
1299
+ width: 124
1300
+ },
1301
+ {
1302
+ height: 320,
1303
+ width: 425
1304
+ },
1305
+ {
1306
+ height: 425,
1307
+ width: 687
1308
+ }
1309
+ ],
1310
+ sizes: "(min-width: 1024px) 510px, 20vw"
1311
+ },
1312
+ fallback: {
1313
+ range: [
1314
+ {
1315
+ height: 124,
1316
+ width: 375
1317
+ },
1318
+ {
1319
+ height: 320,
1320
+ width: 687
1321
+ },
1322
+ {
1323
+ height: 510,
1324
+ width: 990
1325
+ }
1326
+ ],
1327
+ sizes: "(min-width: 1024px) 885px, 35vw"
1328
+ },
1329
+ thumbnail: {
1330
+ range: [
1331
+ {
1332
+ height: 124,
1333
+ width: 124
1334
+ },
1335
+ {
1336
+ height: 320,
1337
+ width: 320
1338
+ },
1339
+ {
1340
+ height: 510,
1341
+ width: 510
1342
+ }
1343
+ ],
1344
+ sizes: "(min-width: 1024px) 453px, 20vw"
1345
+ }
1346
+ }, Dr = ({
1347
+ aspect: e,
1348
+ range: t,
1349
+ sizes: n
1350
+ }) => {
1351
+ const { range: s, sizes: o } = e ? Zt[e] : Zt.fallback;
1352
+ return { range: t && t.length > 0 ? t : s, sizes: n || o };
1353
+ }, Rr = ({ format: e, height: t, query: n, width: s }) => {
1354
+ let o = `w=${s}&h=${t}`;
1355
+ return o = e ? `${o}&fm=${e}` : o, o = n ? `${o}&${n}` : o, o;
1356
+ }, lt = ({ format: e, range: t, url: n, query: s }) => t.map(({ height: o, width: l }) => `${n}?${Rr({
1357
+ format: e,
1358
+ height: o,
1359
+ query: s,
1360
+ width: l
1361
+ })} ${l}w`).join(", ");
1362
+ const Fr = ({ image: e, className: t, testId: n }) => {
1363
+ const {
1364
+ description: s,
1365
+ height: o,
1366
+ type: l,
1367
+ query: m,
1368
+ url: a,
1369
+ width: i,
1370
+ loading: u,
1371
+ decoding: d,
1372
+ fetchPriority: f
1373
+ } = e, { range: p, sizes: g } = Dr(e), h = lt({ format: "avif", query: m, range: p, url: a }), v = lt({ format: "webp", query: m, range: p, url: a }), j = lt({ format: "", query: m, range: p, url: a });
1374
+ return /* @__PURE__ */ r.jsxs("picture", { className: t, children: [
1375
+ l !== "image/gif" && /* @__PURE__ */ r.jsx(
1376
+ "source",
1377
+ {
1378
+ type: "image/avif",
1379
+ srcSet: h,
1380
+ sizes: g,
1381
+ "data-testid": "source"
1382
+ }
1383
+ ),
1384
+ /* @__PURE__ */ r.jsx(
1385
+ "source",
1386
+ {
1387
+ type: "image/webp",
1388
+ srcSet: v,
1389
+ sizes: g,
1390
+ "data-testid": "source"
1391
+ }
1392
+ ),
1393
+ /* @__PURE__ */ r.jsx(
1394
+ "img",
1395
+ {
1396
+ srcSet: j,
1397
+ sizes: g,
1398
+ src: a,
1399
+ alt: s,
1400
+ loading: u || "lazy",
1401
+ decoding: d || "async",
1402
+ fetchpriority: f || "auto",
1403
+ width: i,
1404
+ height: o,
1405
+ "data-testid": n || "image"
1406
+ }
1407
+ )
1408
+ ] });
1409
+ };
1410
+ let Te = !1;
1411
+ const Or = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
1412
+ const s = A(), o = Z(null), [l, m] = F("hidden");
1413
+ V(() => {
1414
+ const i = o.current;
1415
+ if (i)
1416
+ return i.addEventListener("transitionend", a), () => {
1417
+ i.removeEventListener("transitionend", a);
1418
+ };
1419
+ }, []);
1420
+ const a = ({ propertyName: i }) => {
1421
+ i === "opacity" && (Te !== !1 && clearTimeout(Te), m((u) => u === "opening" ? "open" : u === "closing" ? "closed" : u === "closed" ? "hidden" : u));
1422
+ };
1423
+ return ke(() => {
1424
+ Te !== !1 && clearTimeout(Te);
1425
+ let i = "open";
1426
+ e ? m("opening") : (m("closing"), i = "hidden"), Te = setTimeout(() => {
1427
+ m(i);
1428
+ }, 300);
1429
+ }, [e]), /* @__PURE__ */ r.jsx("aside", { ref: o, className: k("tooltip text-medium", l, { loading: t }), hidden: l === "hidden", children: t ? /* @__PURE__ */ r.jsx("p", { children: s.formatMessage({ id: "tooltip_loading" }) }) : typeof n == "string" ? /* @__PURE__ */ r.jsx("p", { children: n }) : n });
1430
+ };
1431
+ const hn = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ r.jsx("section", { className: k("full-width-section", t), ...n, children: e });
1432
+ const Zs = ({ text: e, buttons: t, className: n = "" }) => {
1433
+ const s = [];
1434
+ return t.forEach((o) => {
1435
+ s.push({
1436
+ href: o.link,
1437
+ variant: "secondary",
1438
+ size: { mobile: "medium", 1024: "large" },
1439
+ className: "gtm-trackable",
1440
+ "data-gtm-event-type": "download-click",
1441
+ "data-gtm-event-context": o.eventContext || "Download",
1442
+ target: "_blank",
1443
+ children: o.text
1444
+ });
1445
+ }), /* @__PURE__ */ r.jsx(hn, { className: k("download-section", n), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1446
+ C.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
1447
+ /* @__PURE__ */ r.jsx(qe, { buttons: s })
1448
+ ] }) });
1449
+ };
1450
+ const Ks = ({ title: e = !1, logos: t = [], className: n = "" }) => {
1451
+ const s = t.length;
1452
+ if (s === 0)
1453
+ return null;
1454
+ const o = {
1455
+ element: typeof e == "object" ? e.element : "h2",
1456
+ text: typeof e == "string" ? e : typeof e == "object" ? e.text : ""
1457
+ };
1458
+ return /* @__PURE__ */ r.jsxs("div", { className: k("logos", n), children: [
1459
+ e && C.createElement(o.element, { className: "title" }, o.text),
1460
+ /* @__PURE__ */ r.jsx(
1461
+ "ul",
1462
+ {
1463
+ className: k({ "two-col": s === 2 || s === 4, "three-col": s === 5 || s <= 10 && s % 3 === 0 }),
1464
+ children: t.map(
1465
+ ({ logo: l, nameOfBusiness: m, link: a = !1, description: i = !1 }, u) => {
1466
+ if (!l || !l.url)
1467
+ return null;
1468
+ const d = /* @__PURE__ */ r.jsx(
1469
+ "img",
1470
+ {
1471
+ src: l.url,
1472
+ width: l.width || "auto",
1473
+ height: l.height || "auto",
1474
+ alt: m
1475
+ }
1476
+ );
1477
+ return /* @__PURE__ */ r.jsxs("li", { children: [
1478
+ /* @__PURE__ */ r.jsx("p", { className: "img-wrapper", children: a ? /* @__PURE__ */ r.jsx(
1479
+ "a",
1480
+ {
1481
+ href: a,
1482
+ target: "_blank",
1483
+ rel: "nofollow noreferrer noopener",
1484
+ children: d
1485
+ }
1486
+ ) : d }),
1487
+ i && /* @__PURE__ */ r.jsx("small", { children: i })
1488
+ ] }, window.btoa(`${l.url}_${u}`));
1489
+ }
1490
+ )
1491
+ }
1492
+ )
1493
+ ] });
1494
+ };
1495
+ const Br = [
1496
+ "small",
1497
+ "span",
1498
+ "strong",
1499
+ "em",
1500
+ "p",
1501
+ "h1",
1502
+ "h2",
1503
+ "h3",
1504
+ "h4",
1505
+ "h5",
1506
+ "h6",
1507
+ "blockquote",
1508
+ "q"
1509
+ ], Lr = ({ content: e, image: t, variant: n = "default", spacing: s = "normal", cta: o, children: l }) => {
1510
+ const m = ["eyebrow", "title", "text"], a = { eyebrow: "small", title: "h1", text: "p" }, i = {};
1511
+ return m.forEach((u) => {
1512
+ if (!e[u]) {
1513
+ i[u] = !1;
1514
+ return;
1515
+ }
1516
+ if (typeof e[u] == "object") {
1517
+ i[u] = e[u];
1518
+ const { text: d, element: f } = e[u];
1519
+ if (f && Br.includes(f.toLowerCase()))
1520
+ return;
1521
+ i[u] = {
1522
+ text: d,
1523
+ element: a[u]
1524
+ };
1525
+ return;
1526
+ }
1527
+ i[u] = { text: e[u], element: a[u] };
1528
+ }), o && o.link && o.link[0] === "#" && (o.props || (o.props = {}), o.props.onClick = (u) => {
1529
+ u.preventDefault(), u.stopPropagation();
1530
+ const d = document.getElementById(o.link.substring(1));
1531
+ d && d.scrollIntoView({ behavior: "smooth" });
1532
+ }), /* @__PURE__ */ r.jsx(hn, { className: k("banner-section", n, s, { "has-image": t, "has-extra-spacing": s === "normal" && i.eyebrow && i.title }), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1533
+ /* @__PURE__ */ r.jsxs("div", { className: "content-wrapper", children: [
1534
+ m.map((u) => {
1535
+ if (i[u] && typeof i[u] == "object") {
1536
+ const { text: d, element: f = "" } = i[u];
1537
+ return C.createElement(
1538
+ f.toLowerCase(),
1539
+ { key: u, className: u },
1540
+ d
1541
+ );
1542
+ }
1543
+ return null;
1544
+ }),
1545
+ l,
1546
+ o && o.text && o.link && /* @__PURE__ */ r.jsx(
1547
+ q,
1548
+ {
1549
+ variant: t || n === "light" ? "primary" : "secondary",
1550
+ size: { mobile: "medium", 768: "large" },
1551
+ href: o.link,
1552
+ ...o.props,
1553
+ children: o.text
1554
+ }
1555
+ )
1556
+ ] }),
1557
+ t && /* @__PURE__ */ r.jsx(Fr, { image: { ...t, aspect: "banner" } })
1558
+ ] }) });
1559
+ }, eo = je(Lr);
1560
+ const to = ({
1561
+ variant: e = "primary",
1562
+ button: t = null,
1563
+ title: n,
1564
+ text: s,
1565
+ gtmContext: o
1566
+ }) => !n && !s ? null : /* @__PURE__ */ r.jsxs("aside", { className: k("marketing-block", e), children: [
1567
+ n && /* @__PURE__ */ r.jsx("p", { className: "title", children: n }),
1568
+ s && /* @__PURE__ */ r.jsx("p", { children: s }),
1569
+ t && /* @__PURE__ */ r.jsx(q, { variant: "secondary", size: "medium", href: t.link, className: "gtm-trackable", "data-gtm-event-context": o, "data-gtm-event-type": "learn-more-click", children: t.text })
1570
+ ] }), jt = "https://storage.googleapis.com/apolitical-assets/", Me = {
1571
+ general: "hello@apolitical.co",
1572
+ support: "concierge@apolitical.co",
1573
+ "data-protection": {
1574
+ default: "dpo@apolitical.co",
1575
+ eu: "dpo.agl@apolitical.foundation"
1576
+ }
1577
+ }, no = "200,000+";
1578
+ const gn = ({ label: e = !1, className: t = "", children: n }) => {
1579
+ const s = A();
1580
+ return /* @__PURE__ */ r.jsxs("details", { className: k("collapsible-section", t), children: [
1581
+ /* @__PURE__ */ r.jsx("summary", { children: e || s.formatMessage({ id: "collapsibleSection_summary" }) }),
1582
+ /* @__PURE__ */ r.jsx("div", { className: "content", children: n })
1583
+ ] });
1584
+ };
1585
+ const he = ({ variant: e = "primary", className: t = "", children: n, ...s }) => /* @__PURE__ */ r.jsx("div", { className: k("highlighted-text-box", e, t), ...s, children: n });
1586
+ const Ze = ({ variant: e = "empty", text: t = !1, button: n = !1, className: s = "" }) => {
1587
+ let o = n && !!Object.keys(n).length;
1588
+ const l = typeof n == "object" && "breakpoints" in n, m = Je(l);
1589
+ if (l && typeof n == "object" && typeof m == "number") {
1590
+ const f = Object.assign({}, n.breakpoints), p = mn(Object.keys(f));
1591
+ o = fn(m, p, f);
1592
+ }
1593
+ const { breakpoints: a, text: i = "", component: u, ...d } = n;
1594
+ return /* @__PURE__ */ r.jsx(he, { variant: "subtle", className: k("empty-state-box", e, s), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1595
+ t && /* @__PURE__ */ r.jsx(Ge, { options: { forceBlock: !0 }, children: t }),
1596
+ o && typeof n == "object" && (u || /* @__PURE__ */ r.jsx(
1597
+ q,
1598
+ {
1599
+ ...d,
1600
+ variant: n.variant ? n.variant : "secondary",
1601
+ children: i
1602
+ }
1603
+ ))
1604
+ ] }) });
1605
+ };
1606
+ const Et = ({ children: e, ...t }) => /* @__PURE__ */ r.jsx("p", { ...t, children: e }), _n = { q: Et, blockquote: Et };
1607
+ for (let e = 1; e <= 6; e++)
1608
+ _n[`h${e}`] = { component: Et, props: { className: "title" } };
1609
+ const Ir = ({ type: e = "default", className: t = "", heading: n = !1, children: s }) => /* @__PURE__ */ r.jsxs("div", { className: k("helper-text-box text-small", e, t), children: [
1610
+ n && /* @__PURE__ */ r.jsx("p", { className: "title", children: n }),
1611
+ typeof s == "string" ? /* @__PURE__ */ r.jsx(
1612
+ Ge,
1613
+ {
1614
+ options: {
1615
+ wrapper: C.Fragment,
1616
+ forceBlock: !0,
1617
+ overrides: _n
1618
+ },
1619
+ children: s
1620
+ }
1621
+ ) : /* @__PURE__ */ r.jsx("p", { children: s })
1622
+ ] });
1623
+ const ro = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children: o }) => {
1624
+ const l = A(), m = Z(null), [a, i] = F(""), [u, d] = F("closed");
1625
+ V(() => {
1626
+ const g = m.current;
1627
+ if (g)
1628
+ return g.addEventListener("transitionend", f), () => {
1629
+ g.removeEventListener("transitionend", f);
1630
+ };
1631
+ }, []), V(() => {
1632
+ if (!s || typeof s != "string")
1633
+ return;
1634
+ const g = s.split(`
1635
+ `);
1636
+ i(g.length < 3 ? `${s.substring(0, 400)}...` : g.slice(0, 3).join(`
1637
+ `));
1638
+ }, [s]), V(() => {
1639
+ u === "ready-to-close" && d("closing");
1640
+ }, [u]);
1641
+ const f = ({ propertyName: g }) => {
1642
+ g === "max-height" && d((h) => h === "opening" ? "open" : h === "closing" ? "closed" : h);
1643
+ };
1644
+ if (!s)
1645
+ return null;
1646
+ const p = ["opening", "open"].includes(u);
1647
+ return /* @__PURE__ */ r.jsxs(he, { variant: "subtle", className: k("hide-show-text-box", e), children: [
1648
+ /* @__PURE__ */ r.jsxs("div", { ref: m, className: k("content", u), children: [
1649
+ /* @__PURE__ */ r.jsx(Ge, { options: { forceBlock: !0 }, children: u === "closed" ? a : s }),
1650
+ u !== "closed" && o
1651
+ ] }),
1652
+ /* @__PURE__ */ r.jsx("p", { className: "cta", children: /* @__PURE__ */ r.jsx(
1653
+ q,
1654
+ {
1655
+ variant: "tertiary",
1656
+ icon: { icon: "navigation_arrow", position: "left", animate: !0 },
1657
+ styling: { muted: !0 },
1658
+ className: k({ "rotate-180": p }),
1659
+ onClick: () => {
1660
+ d(p ? "ready-to-close" : "opening");
1661
+ },
1662
+ children: p ? n || l.formatMessage({ id: "hideShowTextBox_hide" }) : t || l.formatMessage({ id: "hideShowTextBox_show" })
1663
+ }
1664
+ ) })
1665
+ ] });
1666
+ }, Hr = () => C.Fragment, Ur = ({ children: e }) => /* @__PURE__ */ r.jsx(he, { variant: "secondary", children: e }), Wr = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], Qr = ({ children: e }) => {
1667
+ const t = A();
1668
+ if (!e)
1669
+ return null;
1670
+ let n = t.formatMessage({ id: "markdown_collapsibleSection_summary" });
1671
+ const s = [];
1672
+ for (const l of yt.toArray(e))
1673
+ if (!(!l || typeof l == "string" || typeof l == "number"))
1674
+ if (C.isValidElement(l) && l.type === "summary") {
1675
+ if (l.props && l.props.children) {
1676
+ for (const m of yt.toArray(l.props.children))
1677
+ if (!(!m || typeof m == "string" || typeof m == "number") && C.isValidElement(m)) {
1678
+ const a = m.type;
1679
+ if (Wr.includes(a)) {
1680
+ for (n = m.props.children; typeof n != "string" && (Array.isArray(n) && n[0].props && n[0].props.children && n[0].props.children[0]); )
1681
+ n = n[0].props.children[0];
1682
+ break;
1683
+ }
1684
+ }
1685
+ }
1686
+ } else
1687
+ s.push(l);
1688
+ const o = n ? n.toString() : "";
1689
+ return /* @__PURE__ */ r.jsx(
1690
+ gn,
1691
+ {
1692
+ label: o,
1693
+ className: ["Sources", "Resources"].includes(o) ? "discrete-links" : "",
1694
+ children: s.map((l) => l)
1695
+ }
1696
+ );
1697
+ }, zr = ({ children: e, ...t }) => {
1698
+ if (t.class)
1699
+ switch (t.class) {
1700
+ case "casestudy":
1701
+ return /* @__PURE__ */ r.jsx(he, { variant: "secondary", children: e });
1702
+ case "general-textbox":
1703
+ case "highlight-box":
1704
+ return /* @__PURE__ */ r.jsx(he, { variant: "primary", children: e });
1705
+ case "pink-textbox":
1706
+ return /* @__PURE__ */ r.jsx(he, { variant: "tertiary", children: e });
1707
+ default:
1708
+ return /* @__PURE__ */ r.jsx("div", { ...t, children: e });
1709
+ }
1710
+ return /* @__PURE__ */ r.jsx("div", { ...t, children: e });
1711
+ }, Vr = (e) => {
1712
+ const t = A(), n = Date.now().toString();
1713
+ let s = "default";
1714
+ const o = e.src;
1715
+ return o.includes("youtube") || o.includes("vimeo") ? s = "video" : o.includes("riddle") || o.includes("sli.do") ? s = "poll" : o.includes("padlet") && (s = "padlet"), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1716
+ /* @__PURE__ */ r.jsx(ee, { children: /* @__PURE__ */ r.jsx("a", { href: `#content-after-iframe-${n}`, children: t.formatMessage({ id: `markdown_skip${s === "default" ? "" : `_${s}`}` }) }) }),
1717
+ /* @__PURE__ */ r.jsx("iframe", { ...e, title: t.formatMessage({ id: `markdown_iframe${s === "default" ? "" : `_${s}`}` }) }),
1718
+ /* @__PURE__ */ r.jsx("span", { id: `content-after-iframe-${n}`, tabIndex: -1 })
1719
+ ] });
1720
+ }, Kt = (e) => {
1721
+ let t = "";
1722
+ return e && typeof e != "string" && typeof e != "number" && typeof e != "boolean" && "type" in e && (t = e.type), t;
1723
+ }, Yr = ({ children: e, ...t }) => {
1724
+ let n = { ...t };
1725
+ t.href && (t.href.includes("http:") || t.href.includes("https:")) && !t.target && (n.target = "_blank");
1726
+ let s = e, o = !1;
1727
+ for (const l of yt.toArray(e))
1728
+ if (!(!l || typeof l == "string" || typeof l == "number") && C.isValidElement(l)) {
1729
+ const m = l.type;
1730
+ if (["button", "center", "span", "strong"].includes(m) && l.props && l.props.children && l.props.children[0])
1731
+ 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" || !C.isValidElement(s)); )
1732
+ if (s.props && s.props.children && s.props.children[0])
1733
+ s = s.props.children[0], s && Kt(s) === "button" && (o = !0);
1734
+ else
1735
+ break;
1736
+ }
1737
+ return o ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ r.jsx("p", { className: "center", children: /* @__PURE__ */ r.jsx(q, { variant: "primary", size: "medium", ...n, children: s }) })) : /* @__PURE__ */ r.jsx("a", { ...n, children: s });
1738
+ }, Gr = ({ children: e }) => /* @__PURE__ */ r.jsx("span", { children: e });
1739
+ const en = ({ className: e = "", options: t = {}, children: n }) => {
1740
+ n = n.replace(/^<br\/?>/, "");
1741
+ const s = {
1742
+ wrapper: C.Fragment,
1743
+ forceBlock: !0,
1744
+ overrides: {
1745
+ a: Yr,
1746
+ // Override psuedo-code
1747
+ // We give the content team psuedo-code short cuts to use in Contentful
1748
+ CollapsibleSection: gn,
1749
+ TextBox: he,
1750
+ CaseStudy: Ur,
1751
+ // Override embedded HTML
1752
+ // Our content team previously used real HTML, which we need to tear out and replace with React components
1753
+ style: Hr,
1754
+ details: Qr,
1755
+ div: zr,
1756
+ iframe: Vr
1757
+ }
1758
+ };
1759
+ return /* @__PURE__ */ r.jsx("div", { className: k("markdown-text", e), children: /* @__PURE__ */ r.jsx(Ge, { options: { ...s, ...t }, children: n }) });
1760
+ };
1761
+ const Jr = ({ size: e = "medium", variant: t = "default", className: n = "", children: s }) => /* @__PURE__ */ r.jsx("span", { className: k("pill", e, t, n), children: s });
1762
+ const St = ({ element: e = "p", children: t = null, className: n = "", ...s }) => C.createElement(e, { ...s, className: k("status-banner text-small", n), "aria-live": "assertive" }, t);
1763
+ const qr = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
1764
+ const s = A(), o = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, l = { "--progress": `${e}%` };
1765
+ return /* @__PURE__ */ r.jsx("span", { className: k(`progress-bar section-${o}`, n), style: l, children: /* @__PURE__ */ r.jsx(ee, { children: t ? `${e} ${t}` : s.formatMessage({ id: "progressBar" }, { number: e }) }) });
1766
+ }, Xr = je(qr);
1767
+ const ct = "loadingBlock_", Zr = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
1768
+ const s = A();
1769
+ t || (t = {
1770
+ 0: { text: s.formatMessage({ id: `${ct}loading` }) },
1771
+ 75: { text: s.formatMessage({ id: `${ct}almostDone` }) },
1772
+ 100: { text: s.formatMessage({ id: `${ct}complete` }) }
1773
+ });
1774
+ let o = null;
1775
+ const l = Object.keys(t);
1776
+ for (let a = 0; a < l.length && !(e < parseInt(l[a])); a++)
1777
+ o = l[a];
1778
+ const m = o && t[o].icon ? { "--icon": `url(${jt}icons/${t[o].icon}.svg)` } : {};
1779
+ return /* @__PURE__ */ r.jsxs(
1780
+ he,
1781
+ {
1782
+ className: k("loading-block", n, { "has-icon": o && t[o].icon }),
1783
+ variant: "subtle",
1784
+ style: m,
1785
+ children: [
1786
+ o && /* @__PURE__ */ r.jsx("span", { className: "step", children: t[o].text }),
1787
+ /* @__PURE__ */ r.jsx(Xr, { progress: e })
1788
+ ]
1789
+ }
1790
+ );
1791
+ }, so = je(Zr);
1792
+ const me = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ r.jsx(un, { element: e, className: k("loading-placeholder", t), ...n });
1793
+ const $t = {
1794
+ header: ["logo", "link", "link", "search"],
1795
+ sidebar: ["text", "text", "text", "text", "text"],
1796
+ "cards-section": ["subtitle", "cards"],
1797
+ cards: ["card", "card", "card", "card"],
1798
+ "overview-page": ["header", "sidebar", "title", "text", "cards-section", "cards-section", "footer"]
1799
+ }, xn = (e, t) => e in $t ? /* @__PURE__ */ r.jsx("div", { className: e, children: $t[e].map((n, s) => xn(n, s)) }, t) : /* @__PURE__ */ r.jsx(me, { className: e }, t), Kr = ({ layout: e = "overview-page" }) => /* @__PURE__ */ r.jsx("div", { className: k("loading-state", e), children: $t[e].map((t, n) => xn(t, n)) }), bn = (e) => {
1800
+ const t = e && e.toUpperCase().split(" ");
1801
+ 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) : "";
1802
+ }, Oe = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], es = (e) => {
1803
+ const t = Math.ceil(26 / Oe.length), n = bn(e).toLowerCase();
1804
+ if (n === "")
1805
+ return Oe[0];
1806
+ const s = n.charCodeAt(0) - 96;
1807
+ for (let o = 0; o < Oe.length; o++)
1808
+ if (s <= t * (o + 1))
1809
+ return Oe[o];
1810
+ };
1811
+ const tn = 256, At = ({ className: e = "", src: t = "", name: n, alt: s, width: o = tn, height: l = tn, ...m }) => {
1812
+ const [a, i] = F(!1), u = Z(null);
1813
+ V(() => {
1814
+ const f = u.current;
1815
+ if (!f)
1816
+ return;
1817
+ const p = f.getContext("2d");
1818
+ if (!p)
1819
+ return;
1820
+ const g = o, h = l;
1821
+ typeof window < "u" && window.devicePixelRatio && (f.width = g * window.devicePixelRatio, f.height = h * window.devicePixelRatio, p.scale(window.devicePixelRatio, window.devicePixelRatio)), p.fillStyle = es(n), p.fillRect(0, 0, g, h), p.font = `${g / 3}px Arial`, p.textAlign = "center", p.fillStyle = "white", p.fillText(bn(n), g / 2, h / 1.6);
1822
+ }, [n]);
1823
+ let d = !1;
1824
+ return t && t !== "" && !a && (t.includes("http") || t.includes("//")) && (d = !0), /* @__PURE__ */ r.jsx("figure", { className: k("profile-picture", e, { error: a }), ...m, children: d ? /* @__PURE__ */ r.jsx(
1825
+ "img",
1826
+ {
1827
+ src: t,
1828
+ alt: s || n,
1829
+ onError: () => {
1830
+ i(!0);
1831
+ },
1832
+ width: o,
1833
+ height: l
1834
+ }
1835
+ ) : /* @__PURE__ */ r.jsx("canvas", { ref: u }) });
1836
+ }, vn = (e) => e === "apolitical" ? {
1837
+ image: `${jt}logos/member_apolitical.svg`
1838
+ } : e === "community" || typeof e == "object" && !e.name ? {
1839
+ image: `${jt}logos/member_community.svg`
1840
+ } : {
1841
+ name: e.name,
1842
+ role: e.jobTitle || "",
1843
+ organisation: e.organization || "",
1844
+ country: e.location && e.location.country || "",
1845
+ url: `/profiles/${e.id}`,
1846
+ image: e.image && e.image.thumbnail
1847
+ }, ts = ({
1848
+ role: e = "",
1849
+ organisation: t = "",
1850
+ country: n = "",
1851
+ maximumCharacters: s = 80
1852
+ }) => {
1853
+ const o = e !== "", l = t !== "", m = n !== "";
1854
+ if (!o && !l && !m)
1855
+ return "";
1856
+ const a = `${e}${o && l ? ` — ${t}` : t}`;
1857
+ let i = `${a}${(o || l) && m ? `, ${n}` : n}`;
1858
+ return i.length > s && (i = a), i.length > s && (i = Mt(i, s)), i;
1859
+ };
1860
+ const Nt = ({
1861
+ element: e = "div",
1862
+ member: t = "community",
1863
+ additionalContent: n = !1,
1864
+ gtmContext: s = "member",
1865
+ gtmType: o = "member-click",
1866
+ className: l = ""
1867
+ }) => {
1868
+ const m = A(), a = vn(t);
1869
+ a.name || (a.name = m.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
1870
+ const { name: i, url: u, image: d } = a, f = ts(a), p = n && n.createdAt ? Sr(n.createdAt) : !1, g = n && n.createdAt ? Er(n.createdAt) : "";
1871
+ return C.createElement(e, {
1872
+ className: k("member text-medium", l),
1873
+ children: /* @__PURE__ */ r.jsxs(
1874
+ Xe,
1875
+ {
1876
+ href: u,
1877
+ gtmType: o,
1878
+ gtmContext: s,
1879
+ onClick: (h) => {
1880
+ h == null || h.stopPropagation();
1881
+ },
1882
+ children: [
1883
+ /* @__PURE__ */ r.jsx(At, { name: i, src: d }),
1884
+ /* @__PURE__ */ r.jsxs("p", { className: "details", children: [
1885
+ /* @__PURE__ */ r.jsx("strong", { children: i }),
1886
+ n && /* @__PURE__ */ r.jsxs("span", { className: "additional-content", children: [
1887
+ n.createdAt && p && /* @__PURE__ */ r.jsx("span", { className: "date", title: g, "aria-label": g, children: m.formatMessage({ id: `dates_${p.path}` }, { number: p.number }) }),
1888
+ n.didEdit && /* @__PURE__ */ r.jsx("em", { children: m.formatMessage({ id: "discussion_edited" }) })
1889
+ ] }),
1890
+ f && /* @__PURE__ */ r.jsx("small", { children: f })
1891
+ ] })
1892
+ ]
1893
+ }
1894
+ )
1895
+ });
1896
+ };
1897
+ const nn = {
1898
+ small: 24,
1899
+ medium: 48
1900
+ }, ns = ({ 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 = "" }) => {
1901
+ const u = A();
1902
+ return !n || n.length === 0 ? null : C.createElement(
1903
+ e,
1904
+ { className: k("contributors", i, o, { "has-gap": l }), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1905
+ /* @__PURE__ */ r.jsx("ul", { children: n.map((d, f) => {
1906
+ let p, g = "";
1907
+ if (f < a) {
1908
+ const { name: h = "", image: v = "" } = vn(d);
1909
+ if (m)
1910
+ return /* @__PURE__ */ r.jsx(me, { element: "li", className: "contributor" }, f);
1911
+ p = /* @__PURE__ */ r.jsx(At, { name: h, src: v, width: nn[o || "medium"], height: nn[o || "medium"] });
1912
+ } else if (f === a) {
1913
+ const h = (t || n.length) - a;
1914
+ p = /* @__PURE__ */ r.jsxs("small", { className: k({ "large-number": h > 99 }), children: [
1915
+ "+",
1916
+ Ar(h, 0)
1917
+ ] }), g = "number-left";
1918
+ }
1919
+ return p ? /* @__PURE__ */ r.jsx("li", { className: k("contributor", g), children: p }, f) : null;
1920
+ }) }),
1921
+ s && /* @__PURE__ */ r.jsx("span", { className: "label", children: typeof s == "string" ? s : n.length === 1 ? typeof n[0] == "string" ? u.formatMessage({ id: `member_${n[0]}` }) : Mt(n[0].name || "", 20) : null })
1922
+ ] }) }
1923
+ );
1924
+ }, rs = ({ children: e, showDevTools: t = !0 }) => {
1925
+ const n = new ir({
1926
+ // default options we would like on all queries can be overridden individually
1927
+ defaultOptions: {
1928
+ queries: {
1929
+ // data should not refetch if the window is refocussed
1930
+ refetchOnWindowFocus: !1,
1931
+ // data should go stale after 1 minute
1932
+ staleTime: 6e4
1933
+ }
1934
+ }
1935
+ });
1936
+ return /* @__PURE__ */ r.jsxs(lr, { client: n, children: [
1937
+ e,
1938
+ t && /* @__PURE__ */ r.jsx(cr, { initialIsOpen: !1 })
1939
+ ] });
1940
+ };
1941
+ var ss = Tt({ client: We });
1942
+ function os(e) {
1943
+ var t = e.children, n = e.client, s = e.apiKey, o = e.options, l = Ye(function() {
1944
+ 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 && (We.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), We.init(s, o)), We);
1945
+ }, [n, s]);
1946
+ return C.createElement(ss.Provider, { value: { client: l } }, t);
1947
+ }
1948
+ const as = ({ children: e, user: t }) => /* @__PURE__ */ r.jsx(
1949
+ os,
1950
+ {
1951
+ apiKey: process.env.REACT_APP_PUBLIC_POSTHOG_KEY,
1952
+ options: {
1953
+ api_host: process.env.REACT_APP_PUBLIC_POSTHOG_HOST,
1954
+ autocapture: !1,
1955
+ secure_cookie: !0,
1956
+ bootstrap: {
1957
+ distinctID: (t == null ? void 0 : t.id) || "00000000-0000-0000-0000-000000000000",
1958
+ isIdentifiedID: !!(t != null && t.id)
1959
+ }
1960
+ },
1961
+ children: e
1962
+ }
1963
+ ), is = ({ children: e, locale: t, messages: n }) => {
1964
+ const s = t || "en", o = {
1965
+ ...Pr[s],
1966
+ ...n || {}
1967
+ };
1968
+ return /* @__PURE__ */ r.jsx(or, { locale: s, messages: o, children: e });
1969
+ }, _e = Tt(null), ls = ({ children: e, user: t }) => /* @__PURE__ */ r.jsx(_e.Provider, { value: t, children: e }), oo = ({ children: e, intl: t, user: n }) => /* @__PURE__ */ r.jsx(is, { locale: t == null ? void 0 : t.locale, messages: t == null ? void 0 : t.messages, children: /* @__PURE__ */ r.jsx(ls, { user: n, children: /* @__PURE__ */ r.jsx(rs, { children: /* @__PURE__ */ r.jsx(as, { user: n, children: e }) }) }) });
1970
+ const ut = "joinCommunityButton", yn = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: s } = { join: () => {
1971
+ }, leave: () => {
1972
+ } } }) => {
1973
+ const o = A(), l = ge(_e), m = l && typeof l.id == "string", [a, i] = F(e), [u, d] = F(e ? "joined" : "notJoined");
1974
+ V(() => {
1975
+ u === "joining" ? d("joined") : u === "leaving" && d("notJoined");
1976
+ }, [a]);
1977
+ const f = {}, p = {};
1978
+ return a && u !== "leaving" && (f["data-hover-text"] = o.formatMessage({ id: `${ut}_leave` }), f["aria-label"] = o.formatMessage({ id: `${ut}_member_aria` }), p["aria-hidden"] = "true"), /* @__PURE__ */ r.jsx(
1979
+ q,
1980
+ {
1981
+ variant: a ? "secondary" : "primary",
1982
+ size: "medium",
1983
+ styling: { fullWidth: !0 },
1984
+ icon: a && u !== "leaving" ? { icon: "tick", position: "left" } : !1,
1985
+ onClick: async (g) => {
1986
+ m && (g.currentTarget.blur(), a ? (d("leaving"), typeof s == "function" && await s()) : (d("joining"), typeof n == "function" && await n()), i(!a));
1987
+ },
1988
+ className: k("join-community-button", u, { active: u === "joining" }),
1989
+ disabled: !m,
1990
+ ...f,
1991
+ children: /* @__PURE__ */ r.jsx("span", { className: "text", ...p, children: o.formatMessage({ id: `${ut}${["joining", "leaving"].includes(u) ? `_${u}` : a ? "_member" : t ? "_short" : ""}` }) })
1992
+ }
1993
+ );
1994
+ };
1995
+ const dt = "communityDetails_", ao = ({ isMember: e = !1, slug: t, members: { number: n, data: s } = { number: void 0, data: [] }, className: o = "", ...l }) => {
1996
+ const m = A(), a = n || (s == null ? void 0 : s.length) || 0;
1997
+ return /* @__PURE__ */ r.jsxs("div", { className: k("community-details", o), children: [
1998
+ /* @__PURE__ */ r.jsx(kt, {}),
1999
+ /* @__PURE__ */ r.jsxs("div", { className: "member-details", children: [
2000
+ /* @__PURE__ */ r.jsxs("div", { className: "top", children: [
2001
+ /* @__PURE__ */ r.jsxs("h3", { children: [
2002
+ m.formatMessage({ id: `${dt}members` }),
2003
+ /* @__PURE__ */ r.jsx("span", { className: "count", children: a })
2004
+ ] }),
2005
+ /* @__PURE__ */ r.jsx("p", { className: "text-small", children: /* @__PURE__ */ r.jsx("a", { href: `/communities/${t}/members`, children: m.formatMessage({ id: `${dt}viewAll` }) }) })
2006
+ ] }),
2007
+ /* @__PURE__ */ r.jsx(ns, { contributors: { total: n, data: s != null && s.length ? s : [{}, {}, {}, {}, {}] }, styling: { size: "medium", showGap: !0, showPlaceholders: a === 0 }, cutoff: 5 })
2008
+ ] }),
2009
+ /* @__PURE__ */ r.jsx(yn, { isMember: e, ...l }),
2010
+ e && /* @__PURE__ */ r.jsx(q, { variant: "primary", icon: { icon: "plus" }, styling: { fullWidth: !0 }, children: m.formatMessage({ id: `${dt}invite` }) })
2011
+ ] });
2012
+ };
2013
+ const io = ({
2014
+ breadcrumbs: e,
2015
+ cutoff: t = 20,
2016
+ className: n = ""
2017
+ }) => {
2018
+ const s = A();
2019
+ return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
2020
+ /* @__PURE__ */ r.jsx(ee, { element: "p", children: s.formatMessage({ id: "breadcrumbs_label" }) }),
2021
+ /* @__PURE__ */ r.jsx("ul", { className: k("breadcrumbs text-small", n), children: e.map(({ text: o, href: l, current: m = !1 }, a) => /* @__PURE__ */ r.jsxs("li", { children: [
2022
+ m && /* @__PURE__ */ r.jsx(ee, { element: "span", children: s.formatMessage({ id: "breadcrumbs_currentPage" }) }),
2023
+ /* @__PURE__ */ r.jsx(Xe, { href: m ? void 0 : l, children: Mt(o, t) })
2024
+ ] }, `${window.btoa(o)}_${a}`)) })
2025
+ ] });
2026
+ };
2027
+ const lo = ({
2028
+ options: e,
2029
+ allOption: t = !1,
2030
+ allowMultiple: n = !0,
2031
+ onChange: s = () => {
2032
+ },
2033
+ className: o = ""
2034
+ }) => {
2035
+ const l = A(), m = t ? [{ id: "all", text: typeof t != "boolean" && t.text || l.formatMessage({ id: "filters_all" }) }, ...e] : e, [a, i] = F(t ? ["all"] : []), u = (d, f) => {
2036
+ let p = [];
2037
+ a.includes(d) ? p = a.filter((g) => g !== d) : d === "all" ? p = ["all"] : n ? p = [...a.filter((g) => g !== "all"), d] : p = [d], i((g) => (s && typeof s == "function" && s({ current: p, previous: g }), p)), f && typeof f == "function" && f();
2038
+ };
2039
+ return /* @__PURE__ */ r.jsx("ul", { className: k("filters", o), children: m.map(({ id: d, text: f, disabled: p = !1, callback: g = () => {
2040
+ } }) => {
2041
+ let h = {};
2042
+ return p && (h = { disabled: !0, "aria-label": l.formatMessage({ id: "filters_disabled" }, { name: f }) }), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
2043
+ "button",
2044
+ {
2045
+ className: k(d, { selected: a.includes(d) }),
2046
+ onClick: (v) => {
2047
+ v.preventDefault(), v.stopPropagation(), u(d, g);
2048
+ },
2049
+ ...h,
2050
+ children: f
2051
+ }
2052
+ ) }, d);
2053
+ }) });
2054
+ }, cs = (e, t) => {
2055
+ const n = String(e);
2056
+ if (!t || !t.length)
2057
+ return `/${n}`;
2058
+ let s = "";
2059
+ return t.forEach(({ url: o, position: l }) => {
2060
+ l === "before-lang" ? s += `/${o}` : (s.includes(`/${n}/`) || (s += `/${n}`), s += `/${o}`);
2061
+ }), s.includes(`/${n}/`) || (s += `/${n}`), s;
2062
+ };
2063
+ const mt = { en: "English", es: "Español", fr: "Français", pt: "Português" }, Be = "languageSwitcher_", co = ({
2064
+ currentLanguage: e,
2065
+ isOriginalLanguage: t = !1,
2066
+ isHumanTranslation: n = !1,
2067
+ translations: s,
2068
+ onChange: o = () => {
2069
+ },
2070
+ urlParts: l,
2071
+ variant: m = "default",
2072
+ label: a,
2073
+ className: i = ""
2074
+ }) => {
2075
+ const u = A(), [d, f] = F(e);
2076
+ if (V(() => {
2077
+ e !== d && f(e);
2078
+ }, [e]), !s || !Object.values(s).some((v) => v && v.post_name))
2079
+ return null;
2080
+ const g = Object.keys(s), h = d !== e;
2081
+ return /* @__PURE__ */ r.jsxs("div", { className: k("language-switcher text-small", m, i), children: [
2082
+ /* @__PURE__ */ r.jsxs("nav", { children: [
2083
+ m !== "short" && /* @__PURE__ */ r.jsx("p", { children: a || u.formatMessage({ id: `${Be}label` }) }),
2084
+ /* @__PURE__ */ r.jsx("ul", { children: g.map((v) => {
2085
+ if (!mt[v])
2086
+ return null;
2087
+ let j = { className: v };
2088
+ return d === v ? j["aria-label"] = u.formatMessage({ id: `${Be}selected` }, { language: mt[v] }) : j = {
2089
+ ...j,
2090
+ href: cs(v, l),
2091
+ onClick: (E) => {
2092
+ E.preventDefault(), E.stopPropagation(), f(v), o(v);
2093
+ }
2094
+ }, /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(Xe, { ...j, fallbackElement: "span", children: mt[v] }) }, v);
2095
+ }) }),
2096
+ m !== "short" && !h && /* @__PURE__ */ r.jsx("p", { children: u.formatMessage({ id: `${Be}translation_${t ? "original" : n ? "human" : "machine"}` }) })
2097
+ ] }),
2098
+ m !== "short" && !h && !t && !n && /* @__PURE__ */ r.jsx("small", {
2099
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2100
+ // @ts-ignore
2101
+ // `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
2102
+ children: u.formatMessage({ id: `${Be}disclaimer` }, {
2103
+ email: Me.support,
2104
+ link: (v) => {
2105
+ const j = `mailto:${v}`;
2106
+ return /* @__PURE__ */ r.jsx("a", { href: j, children: v });
2107
+ }
2108
+ })
2109
+ })
2110
+ ] });
2111
+ };
2112
+ const ft = ar({ locale: "en", messages: Pt }), us = ({
2113
+ page: e = 1,
2114
+ length: t = 0,
2115
+ limit: n = 10,
2116
+ loadNextPage: s = () => {
2117
+ },
2118
+ icon: o = !1,
2119
+ messages: l = {
2120
+ button: ft.formatMessage({ id: "loadMore_button" }),
2121
+ endOfFeed: ft.formatMessage({ id: "loadMore_endOfFeed" }),
2122
+ error: ft.formatMessage({ id: "loadMore_error" })
2123
+ },
2124
+ className: m = "",
2125
+ gtmContext: a = "LoadMore"
2126
+ }) => {
2127
+ const [i, u] = F(!1), [d, f] = F(!1);
2128
+ if (t <= 0 || t < n * e)
2129
+ return null;
2130
+ const p = async (g) => {
2131
+ try {
2132
+ await s(g);
2133
+ } catch (h) {
2134
+ h instanceof Error && h.message && h.message.includes("Cannot read items") ? f(!0) : u(!0);
2135
+ }
2136
+ };
2137
+ return /* @__PURE__ */ r.jsxs("footer", { className: k("load-more", m), children: [
2138
+ i && /* @__PURE__ */ r.jsx("p", { className: "error", children: l.error }),
2139
+ d ? /* @__PURE__ */ r.jsx("p", { children: l.endOfFeed }) : /* @__PURE__ */ r.jsx(
2140
+ q,
2141
+ {
2142
+ variant: "secondary",
2143
+ icon: o,
2144
+ onClick: p,
2145
+ "data-gtm-event-context": a,
2146
+ "data-gtm-event-type": "load-more-click",
2147
+ className: "gtm-trackable",
2148
+ "data-testid": "load-more-button",
2149
+ children: l.button
2150
+ }
2151
+ )
2152
+ ] });
2153
+ };
2154
+ let Le = !1;
2155
+ const ds = ({ element: e = "div", id: t = "more-menu", options: n, className: s = "" }) => {
2156
+ const o = A(), l = Z(null), [m, a] = F(!1), i = (u) => {
2157
+ l.current && u.target instanceof HTMLElement && !l.current.contains(u.target) && a(!1);
2158
+ };
2159
+ return V(() => (document.addEventListener("click", i, !0), () => {
2160
+ document.removeEventListener("click", i, !0);
2161
+ })), C.createElement(e, {
2162
+ ref: l,
2163
+ className: k("more-menu text-medium", s),
2164
+ children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
2165
+ /* @__PURE__ */ r.jsx(
2166
+ q,
2167
+ {
2168
+ variant: "tertiary",
2169
+ size: "medium",
2170
+ icon: { icon: "ellipsis" },
2171
+ onClick: () => a(!m),
2172
+ "aria-haspopup": "true",
2173
+ "aria-expanded": m,
2174
+ "aria-controls": t,
2175
+ screenreaderText: o.formatMessage({ id: "moreMenu" })
2176
+ }
2177
+ ),
2178
+ /* @__PURE__ */ r.jsx("ul", { id: t, hidden: !m, children: n.map(({ href: u, onClick: d, text: f, icon: p, ...g }, h) => {
2179
+ const v = {
2180
+ ...g,
2181
+ onClick: (j) => {
2182
+ a(!1), typeof d == "function" && d(j);
2183
+ },
2184
+ onFocus: () => {
2185
+ Le && (clearTimeout(Le), Le = !1);
2186
+ },
2187
+ onBlur: () => {
2188
+ Le = setTimeout(() => {
2189
+ a(!1);
2190
+ }, 100);
2191
+ }
2192
+ };
2193
+ return u && (v.href = u), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
2194
+ q,
2195
+ {
2196
+ variant: "tertiary",
2197
+ size: "medium",
2198
+ icon: p ? { icon: p, position: "left" } : !1,
2199
+ ...v,
2200
+ children: f
2201
+ }
2202
+ ) }, `${window.btoa(f)}_${h}`);
2203
+ }) })
2204
+ ] })
2205
+ });
2206
+ };
2207
+ const wn = ({ variant: e = "default", version: t = "default", className: n = "", ...s }) => /* @__PURE__ */ r.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ r.jsx("a", { href: "/home/", className: k("logo", e, t, n), ...s, children: /* @__PURE__ */ r.jsx(ee, { children: /* @__PURE__ */ r.jsx(fe, { id: "apolitical" }) }) }) });
2208
+ const ms = {
2209
+ "2-1": 901
2210
+ }, uo = ({ layout: e = "2-1", hideOnMobile: t = !1, className: n = "", children: s }) => {
2211
+ const o = Je(!0);
2212
+ let l = s;
2213
+ return C.Children.count(s) === 1 && (l = C.Children.toArray(s)[0], l.props && (l = l.props.children)), /* @__PURE__ */ r.jsx("section", { className: k("columns", `layout-${e}`, n), children: C.Children.map(l, (m, a) => t !== !1 && a === t && o && o < ms[e] ? null : m) });
2214
+ };
2215
+ const pt = "cookieBanner_", ht = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], gt = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), fs = () => {
2216
+ const e = A(), [t, n, s] = ur(ht), [o, l] = F(!t["apol-cookie-banner"]), m = () => {
2217
+ ht.forEach((d) => {
2218
+ n(d, !0, {
2219
+ path: "/",
2220
+ expires: gt,
2221
+ domain: d === "apolitical-performance-cookie-consent" ? ".apolitical.co" : void 0
2222
+ });
2223
+ }), l(!1), window.location.reload();
2224
+ }, a = () => {
2225
+ n("apol-cookie-banner", !0, {
2226
+ path: "/",
2227
+ expires: gt
2228
+ }), ht.forEach((d) => {
2229
+ if (d === "apol-cookie-banner") {
2230
+ n(d, !0, {
2231
+ path: "/",
2232
+ expires: gt
2233
+ });
2234
+ return;
2235
+ }
2236
+ s(d);
2237
+ }), l(!1);
2238
+ };
2239
+ if (!o)
2240
+ return null;
2241
+ const i = [
2242
+ { id: "settings", href: "/pages/cookie-policy", gtmType: "policy-page" },
2243
+ { id: "reject", onClick: a, gtmType: "reject-all" },
2244
+ { id: "accept", onClick: m, gtmType: "accepted-all" }
2245
+ ], u = [];
2246
+ return i.forEach((d) => {
2247
+ u.push({
2248
+ variant: d.href ? "tertiary" : "primary",
2249
+ href: d.href,
2250
+ onClick: d.onClick,
2251
+ className: "gtm-trackable",
2252
+ "data-gtm-event-context": "cookie-banner",
2253
+ "data-gtm-event-type": `cookie-${d.gtmType}-click`,
2254
+ children: e.formatMessage({ id: `${pt}buttons_${d.id}` })
2255
+ });
2256
+ }), /* @__PURE__ */ r.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
2257
+ /* @__PURE__ */ r.jsx("h6", { children: e.formatMessage({ id: `${pt}title` }) }),
2258
+ /* @__PURE__ */ r.jsx("p", { children: e.formatMessage({ id: `${pt}text` }) }),
2259
+ /* @__PURE__ */ r.jsx(qe, { buttons: u })
2260
+ ] });
2261
+ }, de = {
2262
+ platform: {
2263
+ order: ["events", "courses", "qanda", "articles"],
2264
+ // An array guarantees the right order
2265
+ events: { href: "/events/", gtmType: "events-click" },
2266
+ courses: { href: "/microcourses/", gtmType: "microcourses-click" },
2267
+ qanda: { href: "/questions-answers/", gtmType: "q-and-a-click" },
2268
+ articles: { href: "/solution-articles/", gtmType: "articles-click" }
2269
+ },
2270
+ community: {
2271
+ order: ["support", "post", "join", "guidelines"],
2272
+ support: {
2273
+ name: "Support FAQ",
2274
+ href: "/pages/support-faq",
2275
+ gtmType: "support-faq-click"
2276
+ },
2277
+ post: { href: "/pages/post-an-article", gtmType: "post-an-article-click" },
2278
+ join: {
2279
+ href: "/pages/who-can-join-the-community",
2280
+ gtmType: "who-can-join-click"
2281
+ },
2282
+ guidelines: {
2283
+ href: "/pages/values-and-guidelines",
2284
+ gtmType: "guidelines-and-values-click"
2285
+ }
2286
+ },
2287
+ company: {
2288
+ order: ["story", "team", "careers", "partner", "contact"],
2289
+ story: {
2290
+ href: "/pages/our-story",
2291
+ gtmType: "our-story-click"
2292
+ },
2293
+ team: {
2294
+ href: "/pages/meet-our-team",
2295
+ gtmType: "team-click"
2296
+ },
2297
+ careers: {
2298
+ href: "/pages/careers",
2299
+ gtmType: "careers-click"
2300
+ },
2301
+ partner: { href: "/partnerships/", gtmType: "partner-with-us-click" },
2302
+ contact: {
2303
+ href: "/pages/get-in-touch",
2304
+ gtmType: "contact-click"
2305
+ },
2306
+ child: "legal"
2307
+ },
2308
+ legal: {
2309
+ order: ["privacy", "terms", "cookie", "accessibility"],
2310
+ privacy: {
2311
+ href: "https://about.apolitical.co/privacy-policy",
2312
+ gtmType: "privacy-policy-link"
2313
+ },
2314
+ terms: {
2315
+ href: "https://about.apolitical.co/terms-and-conditions",
2316
+ gtmType: "terms-conditions-link"
2317
+ },
2318
+ cookie: { href: "/pages/cookie-policy", gtmType: "cookie-policy-link" },
2319
+ accessibility: {
2320
+ href: "/pages/accessibility-statement",
2321
+ gtmType: "accessibility-link"
2322
+ },
2323
+ text: {
2324
+ order: ["dataProtection", "euDataProtection"],
2325
+ dataProtection: {
2326
+ email: Me["data-protection"].default,
2327
+ gtmType: "email-dpo-link"
2328
+ },
2329
+ euDataProtection: {
2330
+ email: Me["data-protection"].eu,
2331
+ gtmType: "email-eu-dpo-link"
2332
+ }
2333
+ }
2334
+ },
2335
+ contact: {
2336
+ text: {
2337
+ order: ["correspondence", "registered", "berlin", "support", "business"],
2338
+ correspondence: { address: !0 },
2339
+ registered: { address: !0 },
2340
+ berlin: { address: !0 },
2341
+ support: {
2342
+ email: Me.support,
2343
+ gtmType: "concierge-email-click"
2344
+ },
2345
+ business: { email: Me.general, gtmType: "hello-email-click" }
2346
+ }
2347
+ },
2348
+ social: {
2349
+ order: ["linkedin", "twitter", "facebook"],
2350
+ linkedin: { href: "https://www.linkedin.com/company/apolitical" },
2351
+ twitter: { href: "https://twitter.com/apoliticalco" },
2352
+ facebook: { href: "https://www.facebook.com/apoliticalco" }
2353
+ }
2354
+ };
2355
+ const we = "footer_", Qe = "SiteFooter", rn = ({ group: e }) => {
2356
+ const t = de[e].order || [];
2357
+ let n = !1;
2358
+ return "text" in de[e] && (n = de[e].text), /* @__PURE__ */ r.jsxs(Jt, { children: [
2359
+ /* @__PURE__ */ r.jsx("p", { className: "pre-title", children: /* @__PURE__ */ r.jsx(fe, { id: `${we}${e}` }) }),
2360
+ Array.isArray(t) && t.length > 0 && /* @__PURE__ */ r.jsx("ul", { className: "text-medium", children: t.map((s) => {
2361
+ if (["order", "child", "text"].includes(s))
2362
+ return null;
2363
+ const { href: o, gtmType: l } = de[e][s], m = {};
2364
+ return ["legal"].includes(e) && (m.target = "_blank", m.rel = "noopener"), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
2365
+ "a",
2366
+ {
2367
+ href: o,
2368
+ className: "gtm-trackable",
2369
+ "data-gtm-event-context": Qe,
2370
+ "data-gtm-event-type": l,
2371
+ ...m,
2372
+ children: /* @__PURE__ */ r.jsx(fe, { id: `${we}${e}_${s}` })
2373
+ }
2374
+ ) }, `${e}_${s}`);
2375
+ }) }),
2376
+ typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ r.jsx("dl", { className: "text-medium", children: n.order.map((s) => /* @__PURE__ */ r.jsxs(Jt, { children: [
2377
+ /* @__PURE__ */ r.jsx("dt", { children: /* @__PURE__ */ r.jsx(fe, { id: `${we}${e}_${s}` }) }),
2378
+ /* @__PURE__ */ r.jsxs("dd", { children: [
2379
+ typeof n != "boolean" && n[s].address && /* @__PURE__ */ r.jsx("address", { children: /* @__PURE__ */ r.jsx(fe, { id: `${we}${e}_${s}_address`, values: { br: /* @__PURE__ */ r.jsx("br", {}) } }) }),
2380
+ typeof n != "boolean" && n[s].email && /* @__PURE__ */ r.jsx(
2381
+ "a",
2382
+ {
2383
+ href: `mailto:${n[s].email}`,
2384
+ className: "gtm-trackable",
2385
+ "data-gtm-event-context": Qe,
2386
+ "data-gtm-event-type": n[s].gtmType,
2387
+ children: n[s].email
2388
+ }
2389
+ )
2390
+ ] })
2391
+ ] }, `dl-${e}-${s}`)) })
2392
+ ] }, e);
2393
+ }, kn = () => /* @__PURE__ */ r.jsx("div", { id: "footer", children: /* @__PURE__ */ r.jsxs("div", { className: "wrapper", children: [
2394
+ /* @__PURE__ */ r.jsx(un, { element: "hr" }),
2395
+ /* @__PURE__ */ r.jsx(
2396
+ wn,
2397
+ {
2398
+ variant: "inverted",
2399
+ version: "full",
2400
+ className: "gtm-trackable",
2401
+ "data-gtm-event-context": Qe,
2402
+ "data-gtm-event-type": "logo-homepage-link"
2403
+ }
2404
+ ),
2405
+ /* @__PURE__ */ r.jsx("footer", { children: ["platform", "community", "company", "contact"].map((e) => /* @__PURE__ */ r.jsxs("div", { className: "group", children: [
2406
+ /* @__PURE__ */ r.jsx(rn, { group: e }),
2407
+ Object.keys(de[e]).includes("child") && /* @__PURE__ */ r.jsx(rn, { group: de[e].child })
2408
+ ] }, e)) }),
2409
+ /* @__PURE__ */ r.jsx("hr", {}),
2410
+ /* @__PURE__ */ r.jsxs("div", { className: "sub-footer", children: [
2411
+ /* @__PURE__ */ r.jsx("ul", { children: Array.isArray(de.social.order) && de.social.order.map((e) => {
2412
+ const t = de.social[e];
2413
+ return /* @__PURE__ */ r.jsx("li", { className: e, children: /* @__PURE__ */ r.jsx(
2414
+ "a",
2415
+ {
2416
+ href: t.href,
2417
+ target: "_blank",
2418
+ rel: "noopener noreferrer",
2419
+ className: "gtm-trackable",
2420
+ "data-gtm-event-context": Qe,
2421
+ "data-gtm-event-type": "social-click",
2422
+ children: /* @__PURE__ */ r.jsx("span", { className: "hidden", children: /* @__PURE__ */ r.jsx(fe, { id: `${we}social_${e}` }) })
2423
+ }
2424
+ ) }, e);
2425
+ }) }),
2426
+ /* @__PURE__ */ r.jsx("small", { children: /* @__PURE__ */ r.jsx(fe, { id: `${we}copyright`, values: { currentYear: (/* @__PURE__ */ new Date()).getFullYear() } }) })
2427
+ ] })
2428
+ ] }) });
2429
+ const Ie = "emailHelperTextBox_", mo = ({ type: e, email: t, redirectPath: n, resendVerificationCode: s }) => {
2430
+ const o = A(), [l, m] = F({ path: `${Ie}default`, type: "default", link: {}, mail: {}, error: "" }), [a, i] = F(!1), u = be(
2431
+ (g) => {
2432
+ g.preventDefault(), g.stopPropagation();
2433
+ const h = (v) => {
2434
+ m({
2435
+ path: `${Ie}error_verificationFailedToSend`,
2436
+ type: "error",
2437
+ link: {
2438
+ "data-gtm-event-context": "VerifyEmailBox",
2439
+ "data-gtm-event-type": "SendEmailClick",
2440
+ className: "gtm-trackable",
2441
+ onClick: (j) => u(j),
2442
+ href: "#",
2443
+ "data-testid": "send-verify-email-click"
2444
+ },
2445
+ mail: {
2446
+ href: "mailto:concierge@apolitical.co",
2447
+ className: "gtm-trackable",
2448
+ "data-gtm-event-context": "ErrorVerifyingBox",
2449
+ "data-gtm-event-type": "email-concierge-click"
2450
+ },
2451
+ error: v
2452
+ });
2453
+ };
2454
+ if (typeof s != "function") {
2455
+ h(o.formatMessage({ id: `${Ie}error_noFunction` }));
2456
+ return;
2457
+ }
2458
+ i(!0), s(t).then(() => {
2459
+ localStorage.setItem("email", t), window.location.href = n || "/signup/verify-email";
2460
+ }).catch((v) => {
2461
+ h(v.message);
2462
+ }).finally(() => {
2463
+ i(!1);
2464
+ });
2465
+ },
2466
+ /* eslint-disable react-hooks/exhaustive-deps */
2467
+ [t, n, s]
2468
+ );
2469
+ V(
2470
+ () => {
2471
+ let g = Ie, h = "default", v = {}, j = {};
2472
+ switch (e) {
2473
+ case "gov":
2474
+ g += "autoApproved", h = "success";
2475
+ break;
2476
+ case "nonGov":
2477
+ g += "unrecognisedEmail", h = "error", v = {
2478
+ href: "https://about.apolitical.co/who-can-join-the-community",
2479
+ "data-gtm-event-context": "NonGovEmailHelperTextBox",
2480
+ "data-gtm-event-type": "LearnMoreClick"
2481
+ };
2482
+ break;
2483
+ case "pending":
2484
+ g += "pendingApproval", h = "error", j = {
2485
+ href: "mailto:concierge@apolitical.co",
2486
+ className: "gtm-trackable",
2487
+ "data-gtm-event-context": "EmailExistsBox",
2488
+ "data-gtm-event-type": "email-concierge-click"
2489
+ };
2490
+ break;
2491
+ case "verify":
2492
+ g += "emailUnverified", h = "error", v = {
2493
+ href: "#",
2494
+ "data-gtm-event-context": "VerifyEmailBox",
2495
+ "data-gtm-event-type": "SendEmailClick",
2496
+ className: "gtm-trackable",
2497
+ onClick: (E) => u(E),
2498
+ "data-testid": "send-verify-email-click"
2499
+ };
2500
+ break;
2501
+ case "exists":
2502
+ g += "emailAlreadyExists", h = "error", v = {
2503
+ href: "/user-onboarding/login",
2504
+ "data-gtm-event-context": "EmailExistsBox",
2505
+ "data-gtm-event-type": "login-click"
2506
+ }, j = {
2507
+ href: "mailto:concierge@apolitical.co",
2508
+ className: "gtm-trackable",
2509
+ "data-gtm-event-context": "EmailExistsBox",
2510
+ "data-gtm-event-type": "email-concierge-click"
2511
+ };
2512
+ break;
2513
+ default:
2514
+ g += "default", v = {
2515
+ href: "https://about.apolitical.co/who-can-join-the-community",
2516
+ "data-gtm-event-context": "DefaultEmailHelperTextBox",
2517
+ "data-gtm-event-type": "LearnMoreClick"
2518
+ };
2519
+ break;
2520
+ }
2521
+ m({ ...l, path: g, type: h, link: v, mail: j });
2522
+ },
2523
+ /* eslint-disable react-hooks/exhaustive-deps */
2524
+ [e]
2525
+ );
2526
+ const d = {};
2527
+ return ["link", "mail"].forEach((g) => {
2528
+ d[g] = Object.keys(l[g]).length ? (h) => /* @__PURE__ */ r.jsx("a", { ...l[g], children: h }) : (h) => h;
2529
+ }), /* @__PURE__ */ r.jsx(Ir, { type: l.type, heading: a ? !1 : o.formatMessage({ id: `${l.path}_title` }), children: a ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
2530
+ /* @__PURE__ */ r.jsx(me, { element: "span" }),
2531
+ /* @__PURE__ */ r.jsx(me, { element: "span" })
2532
+ ] }) : (
2533
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2534
+ // @ts-ignore
2535
+ // `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
2536
+ o.formatMessage(
2537
+ { id: `${l.path}_text` },
2538
+ {
2539
+ ...d,
2540
+ strong: (g) => /* @__PURE__ */ r.jsx("strong", { children: g }),
2541
+ em: (g) => /* @__PURE__ */ r.jsx("em", { children: g }),
2542
+ br: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
2543
+ /* @__PURE__ */ r.jsx("br", {}),
2544
+ /* @__PURE__ */ r.jsx("br", {})
2545
+ ] }),
2546
+ error: l.error
2547
+ }
2548
+ )
2549
+ ) });
2550
+ };
2551
+ const He = "passwordRules_", jn = "isMoreThanEightCharacters", En = "includesNumberAndSymbol", Sn = "includesLowerAndUppercase", ps = {
2552
+ [jn]: "8Characters",
2553
+ [En]: "numberSymbol",
2554
+ [Sn]: "lowercaseUppercase"
2555
+ }, hs = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
2556
+ const n = A();
2557
+ return /* @__PURE__ */ r.jsxs("aside", { className: k("password-rules", t), children: [
2558
+ /* @__PURE__ */ r.jsx("small", { children: n.formatMessage({ id: `${He}intro` }) }),
2559
+ /* @__PURE__ */ r.jsx("ul", { children: [jn, En, Sn].map((s) => /* @__PURE__ */ r.jsxs("li", { className: k({ matches: e[s] }), children: [
2560
+ /* @__PURE__ */ r.jsxs(ee, { children: [
2561
+ n.formatMessage({ id: `${He}rule_label` }),
2562
+ " "
2563
+ ] }),
2564
+ /* @__PURE__ */ r.jsx("span", { children: n.formatMessage({ id: `${He}rule_${ps[s]}` }) }),
2565
+ !e[s] && /* @__PURE__ */ r.jsxs(ee, { element: "strong", children: [
2566
+ " ",
2567
+ " ",
2568
+ n.formatMessage({ id: `${He}notMet` })
2569
+ ] })
2570
+ ] }, `rule-${s}`)) })
2571
+ ] });
2572
+ }, fo = je(hs);
2573
+ const po = ({
2574
+ text: e = {},
2575
+ topRating: t = 5,
2576
+ functions: { createRating: n = () => null, updateRating: s = () => {
2577
+ }, reportError: o = () => {
2578
+ } },
2579
+ className: l = "",
2580
+ hasLoaded: m = !1
2581
+ }) => {
2582
+ const a = A(), [i, u] = F({ setUp: !1, id: null, rating: null, disabled: !0 }), d = async () => {
2583
+ try {
2584
+ const E = await n();
2585
+ u((_) => ({ ..._, setUp: !0, id: E && E.id, disabled: !1 }));
2586
+ } catch (E) {
2587
+ u((_) => ({ ..._, setUp: !0, disabled: !0 })), o(E);
2588
+ }
2589
+ };
2590
+ if (V(() => {
2591
+ m && !i.setUp && d();
2592
+ }, [m]), !m)
2593
+ return /* @__PURE__ */ r.jsx(me, { className: "rating-placeholder" });
2594
+ const { id: f, rating: p, disabled: g } = i, h = "ratings_", v = {
2595
+ text: a.formatMessage({ id: `${h}text` }),
2596
+ low: a.formatMessage({ id: `${h}low` }),
2597
+ high: a.formatMessage({ id: `${h}high` }),
2598
+ success: a.formatMessage({ id: `${h}success` }),
2599
+ ...e
2600
+ }, j = async (E) => {
2601
+ if (!(!f || g))
2602
+ try {
2603
+ u((_) => ({ ..._, rating: E, disabled: !0 })), await s({ id: f, value: E });
2604
+ } catch (_) {
2605
+ u(($) => ({ ...$, rating: null })), o(_);
2606
+ } finally {
2607
+ u((_) => ({ ..._, disabled: !1 }));
2608
+ }
2609
+ };
2610
+ return /* @__PURE__ */ r.jsxs("div", { className: k("rating", l), children: [
2611
+ /* @__PURE__ */ r.jsx("span", { className: "label", children: v[p ? "success" : "text"] }),
2612
+ /* @__PURE__ */ r.jsx("ol", { children: Array.from(new Array(t).keys()).map((E) => {
2613
+ const _ = E + 1;
2614
+ return /* @__PURE__ */ r.jsx("li", { className: k({ selected: p && _ <= p }), children: /* @__PURE__ */ r.jsx(
2615
+ q,
2616
+ {
2617
+ variant: "tertiary",
2618
+ size: "small",
2619
+ icon: { icon: `star${!p || _ > p ? "_empty" : ""}`, position: "left", hover: "star" },
2620
+ screenreaderText: `${a.formatMessage(
2621
+ { id: `${h}stars` },
2622
+ { number: _, total: t }
2623
+ )}${_ === 1 || _ === t ? ` - ${v[_ === 1 ? "low" : "high"]}` : ""}`,
2624
+ onClick: ($) => {
2625
+ $.preventDefault(), $.stopPropagation(), j(_);
2626
+ },
2627
+ disabled: g
2628
+ }
2629
+ ) }, `rating-${_}`);
2630
+ }) })
2631
+ ] });
2632
+ };
2633
+ const gs = ({
2634
+ id: e = "search",
2635
+ className: t = "",
2636
+ handleToggle: n = !1,
2637
+ defaultValue: s = "",
2638
+ gtmContext: o = "search-bar",
2639
+ gtmEvent: l = "form-submission"
2640
+ }) => {
2641
+ const { searchIsOpen: m = !0, isDesktopVersion: a = !1 } = n || {}, i = A(), u = Z(null);
2642
+ ke(() => {
2643
+ !n || a || !m || u.current && u.current.focus();
2644
+ }, [m]);
2645
+ const d = (f) => {
2646
+ f.preventDefault(), f.stopPropagation(), !(!u.current || !u.current.value || u.current.value.length < 1) && (window.location.href = `/search?search=${encodeURIComponent(u.current.value)}`);
2647
+ };
2648
+ return /* @__PURE__ */ r.jsx(
2649
+ "form",
2650
+ {
2651
+ onSubmit: d,
2652
+ className: k("search-form gtm-trackable", t),
2653
+ "data-gtm-event-context": o,
2654
+ "data-gtm-event-type": l,
2655
+ children: /* @__PURE__ */ r.jsx("fieldset", { id: `${e}-form`, hidden: n ? !m : !1, role: "search", children: /* @__PURE__ */ r.jsxs("p", { children: [
2656
+ /* @__PURE__ */ r.jsx(ee, { element: "label", htmlFor: e, children: i.formatMessage({ id: "search_label" }) }),
2657
+ /* @__PURE__ */ r.jsx(
2658
+ "input",
2659
+ {
2660
+ ref: u,
2661
+ type: "search",
2662
+ id: e,
2663
+ name: e,
2664
+ defaultValue: s,
2665
+ placeholder: i.formatMessage({ id: "search_placeholder" }),
2666
+ onKeyDown: (f) => {
2667
+ f.key === "Enter" && d(f);
2668
+ }
2669
+ }
2670
+ ),
2671
+ /* @__PURE__ */ r.jsx(
2672
+ "button",
2673
+ {
2674
+ className: "clear",
2675
+ onClick: (f) => {
2676
+ f.preventDefault(), f.stopPropagation(), u.current && u.current.value && (u.current.value = "");
2677
+ },
2678
+ children: /* @__PURE__ */ r.jsx(ee, { children: i.formatMessage({ id: "search_clear" }) })
2679
+ }
2680
+ ),
2681
+ /* @__PURE__ */ r.jsx("button", { className: "search", onClick: d, children: /* @__PURE__ */ r.jsx(ee, { children: i.formatMessage({ id: "search_cta" }) }) })
2682
+ ] }) })
2683
+ }
2684
+ );
2685
+ }, I = {
2686
+ timeouts: {},
2687
+ handlerCalled: {},
2688
+ getIsDesktopVersion: (e, t) => {
2689
+ const n = {
2690
+ navigation: { loggedIn: 769, loggedOut: 881 },
2691
+ search: { loggedIn: 961, loggedOut: 1121 }
2692
+ }, s = (l) => {
2693
+ const m = `logged${e ? "In" : "Out"}`;
2694
+ return t >= n[l][m];
2695
+ };
2696
+ let o = {};
2697
+ return ["navigation", "search"].forEach((l) => {
2698
+ o[l] = s(l);
2699
+ }), o;
2700
+ },
2701
+ shouldChangeHeaderIsVisible: (e, t, n) => {
2702
+ Object.values(t).filter((o) => o === !0).length || n([{ type: "headerIsVisible", value: e }]);
2703
+ },
2704
+ handleMenus: ({ id: e, value: t, menus: n, dispatch: s }) => {
2705
+ if (n[e] === t || e === "account" && t === !1 && n.navigation === !0)
2706
+ return;
2707
+ const o = Date.now();
2708
+ if (!t && I.handlerCalled[e] && o - I.handlerCalled[e] < 500)
2709
+ return;
2710
+ I.handlerCalled[e] = o;
2711
+ let l = [{ type: `menus.${e}`, value: t }];
2712
+ t === !0 && Object.keys(n).forEach((m) => {
2713
+ m === e || n[m] === !1 || l.push({ type: `menus.${m}`, value: !1 });
2714
+ }), s(l);
2715
+ },
2716
+ // Find the first child inside a ref that matches the `key` (and optional `value`) we're looking for,
2717
+ // so we can automatically focus on the first link inside a menu for accessibility.
2718
+ // E.g. a `key` of `href` will match the first child with an `href`. Passing a `value` will match
2719
+ // the first child with an `href` that includes `value`.
2720
+ // Using `ref` lets us call `focus()`
2721
+ findFirstChild: (e, t, n = !1) => {
2722
+ if (!e || !e[0])
2723
+ return !1;
2724
+ for (let s = 0; s <= e.length; s++) {
2725
+ if (!e[s])
2726
+ continue;
2727
+ if (e[s][t] && (!n || e[s][t].includes(n)))
2728
+ return e[s];
2729
+ if (!t.includes("."))
2730
+ continue;
2731
+ const o = ln(e[s], t);
2732
+ if (!(typeof o > "u") && (!n || o[t] && o[t].includes(n) || o.value && o.value.includes(n) || o.toString().includes(n)))
2733
+ return e[s];
2734
+ }
2735
+ return e[0].children ? I.findFirstChild(e[0].children, t, n) : !1;
2736
+ },
2737
+ autoFocus: ({ menu: e, navigationRef: t, isDesktopVersion: n, focusElements: s, dispatch: o }) => {
2738
+ if (!t.current || !t.current.children)
2739
+ return;
2740
+ const l = n ? "desktop" : "default";
2741
+ if (s[e][l]) {
2742
+ s[e][l].focus();
2743
+ return;
2744
+ }
2745
+ let m, a;
2746
+ switch (e) {
2747
+ case "navigation":
2748
+ if (n) {
2749
+ const i = I.findFirstChild(
2750
+ t.current.children,
2751
+ "attributes.aria-controls",
2752
+ "navigation"
2753
+ );
2754
+ m = I.findFirstChild(i.children, "href");
2755
+ } else
2756
+ m = I.findFirstChild(t.current.children, "href");
2757
+ m || (m = t.current);
2758
+ break;
2759
+ case "account":
2760
+ if (a = I.findFirstChild(t.current.children, "className", "account"), !a || !a.children)
2761
+ return;
2762
+ m = I.findFirstChild(a.children, "href");
2763
+ break;
2764
+ default:
2765
+ return;
2766
+ }
2767
+ m && (o([{ type: `focusElements.${e}.${l}`, value: m }]), m.focus());
2768
+ },
2769
+ events: {
2770
+ onClick: (e, { id: t, callback: n, isOpen: s }) => {
2771
+ e.target && e.target.attributes && e.target.attributes.href || (e.preventDefault(), e.stopPropagation(), clearTimeout(I.timeouts[t]), n(t, !s));
2772
+ },
2773
+ onFocus: ({ id: e }) => {
2774
+ clearTimeout(I.timeouts[e]);
2775
+ },
2776
+ onMouseEnter: ({ id: e, callback: t }) => {
2777
+ clearTimeout(I.timeouts[e]), t(e, !0);
2778
+ },
2779
+ onBlur: ({ id: e, callback: t }) => {
2780
+ I.timeouts[e] = setTimeout(() => {
2781
+ t(e, !1);
2782
+ }, 250);
2783
+ }
2784
+ }
2785
+ }, ze = {
2786
+ order: ["home", "topics", "partners", "account"],
2787
+ home: {
2788
+ href: "/home/",
2789
+ hasVariantText: !0,
2790
+ gtmType: "homepage-click"
2791
+ },
2792
+ topics: {
2793
+ order: ["explore", "topics"],
2794
+ menuId: "navigation",
2795
+ explore: {
2796
+ order: ["events", "courses", "q-and-a", "articles"],
2797
+ events: { href: "/events/", className: "icon events" },
2798
+ courses: {
2799
+ href: "/microcourses/",
2800
+ gtmType: "microcourses-click",
2801
+ className: "icon courses"
2802
+ },
2803
+ "q-and-a": { href: "/questions-answers/", className: "icon q-and-a" },
2804
+ articles: {
2805
+ href: "/solution-articles/",
2806
+ gtmType: "articles-click",
2807
+ className: "icon articles"
2808
+ }
2809
+ },
2810
+ topics: {
2811
+ order: [
2812
+ "climate",
2813
+ "cities-and-local-government",
2814
+ "digital-and-data",
2815
+ "education",
2816
+ "equity-justice-and-inclusion",
2817
+ "health-and-social-care",
2818
+ "innovation",
2819
+ "leadership-and-skills",
2820
+ "life-in-government",
2821
+ "policymaking",
2822
+ "transport-and-infrastructure",
2823
+ "work-and-the-economy"
2824
+ ],
2825
+ className: "columns",
2826
+ climate: { href: "/topics/climate/" },
2827
+ "cities-and-local-government": { href: "/topics/cities-and-local-government/" },
2828
+ "digital-and-data": { href: "/topics/digital-and-data/" },
2829
+ education: { href: "/topics/education/" },
2830
+ "equity-justice-and-inclusion": { href: "/topics/equity-justice-and-inclusion/" },
2831
+ "health-and-social-care": { href: "/topics/health-and-social-care/" },
2832
+ innovation: { href: "/topics/innovation/" },
2833
+ "leadership-and-skills": { href: "/topics/leadership-and-skills/" },
2834
+ "life-in-government": { href: "/topics/life-in-government/" },
2835
+ policymaking: { href: "/topics/policymaking/" },
2836
+ "transport-and-infrastructure": { href: "/topics/transport-and-infrastructure/" },
2837
+ "work-and-the-economy": { href: "/topics/work-and-the-economy/" }
2838
+ }
2839
+ },
2840
+ partners: {
2841
+ href: "/partnerships/",
2842
+ onlyShow: "logged-out"
2843
+ },
2844
+ account: {
2845
+ order: ["profile", "settings", "log-out"],
2846
+ className: "account",
2847
+ onlyShow: "logged-in",
2848
+ doTrack: !1,
2849
+ profile: { href: "/profiles/me" },
2850
+ settings: { href: "/profiles/me/manage-account" },
2851
+ "log-out": { href: "/user-onboarding/logout", className: "divider" }
2852
+ },
2853
+ buttons: {
2854
+ order: ["login", "signup"],
2855
+ login: { href: "/user-onboarding/login" },
2856
+ signup: {
2857
+ href: "/signup/?ref=header-banner",
2858
+ props: { variant: "primary" }
2859
+ }
2860
+ }
2861
+ }, Ve = ({
2862
+ id: e,
2863
+ isLoggedIn: t = !1,
2864
+ isDesktopVersion: n = !1,
2865
+ menus: s = {},
2866
+ callback: o = () => {
2867
+ },
2868
+ doTrack: l = null
2869
+ }) => {
2870
+ const m = A(), a = ln(ze, e);
2871
+ if (!a || a.onlyShow && (a.onlyShow === "logged-in" && !t || a.onlyShow === "logged-out" && t))
2872
+ return null;
2873
+ const i = "doTrack" in a, u = l === null ? i ? a.doTrack : !0 : l, d = e.includes("buttons.");
2874
+ let f = `header_${e.replaceAll(".", "_")}`;
2875
+ a.hasVariantText && (f += `_logged${t ? "In" : "Out"}`);
2876
+ let p = !1;
2877
+ if (a.href) {
2878
+ let _ = a.gtmType || `${e}-click`;
2879
+ if (_.includes(".")) {
2880
+ const $ = _.split("."), B = $[$.length - 2];
2881
+ _ = `${B === "topics" ? `${B}-` : ""}${$[$.length - 1]}`;
2882
+ }
2883
+ p = {
2884
+ href: a.href,
2885
+ role: "menuitem"
2886
+ }, u && (p = {
2887
+ ...p,
2888
+ className: "gtm-trackable",
2889
+ "data-gtm-event-type": _,
2890
+ "data-gtm-event-context": "HeaderButtons"
2891
+ }), d && (p = {
2892
+ ...p,
2893
+ variant: "secondary",
2894
+ size: { mobile: "small", 881: "large" },
2895
+ ...a.props || {}
2896
+ });
2897
+ }
2898
+ const g = a.order && a.order[0] && a[a.order[0]], h = g && a[a.order[0]].order, v = p && window.location.pathname === a.href;
2899
+ let j = {}, E = {};
2900
+ if (g) {
2901
+ const _ = a.menuId || e, $ = {
2902
+ onClick: (B) => I.events.onClick(B, { id: _, callback: o, isOpen: s[_] }),
2903
+ onFocus: () => I.events.onFocus({ id: _ }),
2904
+ onBlur: () => I.events.onBlur({ id: _, callback: o }),
2905
+ onMouseLeave: () => I.events.onBlur({ id: _, callback: o }),
2906
+ onMouseEnter: () => I.events.onMouseEnter({ id: _, callback: o })
2907
+ };
2908
+ n && (h && (j = {
2909
+ ...$,
2910
+ onKeyPress: (B) => {
2911
+ B.key === "Enter" && I.events.onClick(B, { id: _, callback: o, isOpen: s[_] });
2912
+ },
2913
+ tabIndex: "0",
2914
+ // Add a `tabIndex` so keyboard users can focus on the `li`
2915
+ "aria-haspopup": !0,
2916
+ "aria-expanded": s[_],
2917
+ "aria-controls": _
2918
+ }), E = { hidden: _ in s ? !s[_] : !0 }), h || (E = {
2919
+ ...E,
2920
+ ...$
2921
+ });
2922
+ }
2923
+ return /* @__PURE__ */ r.jsxs("li", { className: k({ [a.className]: a.className, "has-submenu": g, parent: h, active: v }), role: "none", ...j, children: [
2924
+ p ? C.createElement(d ? q : "a", p, m.formatMessage({ id: f })) : m.formatMessage({ id: f }),
2925
+ a.order && /* @__PURE__ */ r.jsx("ul", { ...E, children: a.order.map((_) => {
2926
+ if (!a[_])
2927
+ return null;
2928
+ const $ = {
2929
+ isLoggedIn: t,
2930
+ isDesktopVersion: n,
2931
+ menus: s,
2932
+ callback: o,
2933
+ doTrack: i ? u : null
2934
+ };
2935
+ return a[_].order ? /* @__PURE__ */ r.jsxs("li", { className: k({ [a[_].className]: a[_].className }), children: [
2936
+ m.formatMessage({ id: `${f}_${_}` }),
2937
+ /* @__PURE__ */ r.jsx("ul", { children: a[_].order.map((B) => /* @__PURE__ */ r.jsx(Ve, { id: `${e}.${_}.${B}`, ...$ }, B)) })
2938
+ ] }, _) : /* @__PURE__ */ r.jsx(Ve, { id: `${e}.${_}`, ...$ }, _);
2939
+ }) })
2940
+ ] }, e);
2941
+ };
2942
+ const _s = { height: 67, height_desktop: 83 }, $n = () => {
2943
+ const e = A(), t = ge(_e), n = Je(!0, !0), s = t && typeof t.id == "string", o = Ye(
2944
+ () => I.getIsDesktopVersion(s, n),
2945
+ [s, n]
2946
+ ), [l, m] = tr(jr, {
2947
+ headerIsVisible: !0,
2948
+ menus: { navigation: !1, search: !1, account: !1 },
2949
+ focusElements: {
2950
+ navigation: { desktop: !1, default: !1 },
2951
+ account: { desktop: !1, default: !1 }
2952
+ }
2953
+ }), { headerIsVisible: a, menus: i, focusElements: u } = l;
2954
+ kr({
2955
+ scrollPosition: _s[`height${o.navigation ? "_desktop" : ""}`],
2956
+ callbacks: {
2957
+ scrollUp: () => {
2958
+ !o && i.navigation || I.shouldChangeHeaderIsVisible(!0, i, m);
2959
+ },
2960
+ scrollDown: () => {
2961
+ !o && i.navigation || I.shouldChangeHeaderIsVisible(!1, i, m);
2962
+ }
2963
+ }
2964
+ });
2965
+ const d = (p, g) => {
2966
+ I.handleMenus({ id: p, value: g, menus: i, dispatch: m });
2967
+ }, f = Z(null);
2968
+ return ke(() => {
2969
+ i.navigation && I.autoFocus({
2970
+ menu: "navigation",
2971
+ navigationRef: f,
2972
+ isDesktopVersion: o.navigation,
2973
+ focusElements: u,
2974
+ dispatch: m
2975
+ });
2976
+ }, [i.navigation]), ke(() => {
2977
+ i.account && I.autoFocus({
2978
+ menu: "account",
2979
+ navigationRef: f,
2980
+ isDesktopVersion: o.navigation,
2981
+ focusElements: u,
2982
+ dispatch: m
2983
+ });
2984
+ }, [i.account]), t && t.isLoading ? null : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
2985
+ /* @__PURE__ */ r.jsxs("nav", { id: "header", className: k({ "logged-in": s, "logged-out": !s, visible: a }), children: [
2986
+ /* @__PURE__ */ r.jsx(ee, { element: "a", href: "#content-of-page", children: e.formatMessage({ id: "header_skip" }) }),
2987
+ /* @__PURE__ */ r.jsx(wn, {}),
2988
+ !o.navigation && /* @__PURE__ */ r.jsx(
2989
+ "button",
2990
+ {
2991
+ className: "menu-button gtm-trackable",
2992
+ onClick: (p) => {
2993
+ p.preventDefault(), p.stopPropagation(), d("navigation", !i.navigation);
2994
+ },
2995
+ "data-gtm-event-type": "open-tab-menu-click",
2996
+ "data-gtm-event-context": "HeaderLeft-Chevron",
2997
+ "aria-haspopup": "true",
2998
+ "aria-expanded": i.navigation,
2999
+ "aria-controls": "navigation",
3000
+ children: /* @__PURE__ */ r.jsx(ee, { children: e.formatMessage({ id: `header_menu_${i.navigation ? "hide" : "show"}` }) })
3001
+ }
3002
+ ),
3003
+ /* @__PURE__ */ r.jsx(
3004
+ "ul",
3005
+ {
3006
+ ref: f,
3007
+ id: "navigation",
3008
+ hidden: o.navigation || i.account ? !1 : !i.navigation,
3009
+ role: "menu",
3010
+ "data-showing": !o.navigation && i.account ? "account" : "default",
3011
+ children: ze.order.map((p) => /* @__PURE__ */ r.jsx(
3012
+ Ve,
3013
+ {
3014
+ id: p,
3015
+ isLoggedIn: s,
3016
+ isDesktopVersion: o.navigation,
3017
+ menus: { navigation: i.navigation, account: i.account },
3018
+ callback: d
3019
+ },
3020
+ p
3021
+ ))
3022
+ }
3023
+ ),
3024
+ !o.search && /* @__PURE__ */ r.jsx(
3025
+ "button",
3026
+ {
3027
+ className: "search toggle-search-button",
3028
+ onClick: (p) => {
3029
+ p.preventDefault(), p.stopPropagation(), d("search", !i.search);
3030
+ },
3031
+ "aria-haspopup": "true",
3032
+ "aria-expanded": i.search,
3033
+ "aria-controls": "search-form",
3034
+ children: /* @__PURE__ */ r.jsx(ee, { children: e.formatMessage({ id: `header_search_${i.search ? "hide" : "show"}` }) })
3035
+ }
3036
+ ),
3037
+ /* @__PURE__ */ r.jsx(
3038
+ gs,
3039
+ {
3040
+ id: "global-search",
3041
+ handleToggle: { searchIsOpen: i.search, isDesktopVersion: o.search },
3042
+ gtmContext: "search-bar-header",
3043
+ gtmEvent: "form-submission"
3044
+ }
3045
+ ),
3046
+ s ? /* @__PURE__ */ r.jsxs(
3047
+ "button",
3048
+ {
3049
+ className: "account-button",
3050
+ onClick: (p) => I.events.onClick(p, { id: "account", callback: d, isOpen: i.account }),
3051
+ onMouseEnter: () => I.events.onMouseEnter({ id: "account", callback: d }),
3052
+ onMouseLeave: () => I.events.onBlur({ id: "account", callback: d }),
3053
+ "aria-haspopup": "true",
3054
+ "aria-expanded": i.account,
3055
+ "aria-controls": "navigation",
3056
+ children: [
3057
+ /* @__PURE__ */ r.jsx(ee, { children: e.formatMessage({ id: `header_account_${i.account ? "hide" : "show"}` }) }),
3058
+ /* @__PURE__ */ r.jsx(At, { name: t && t.name || "", src: t && t.image && t.image.thumbnail || "" })
3059
+ ]
3060
+ }
3061
+ ) : /* @__PURE__ */ r.jsx("ul", { className: "sign-in-buttons", children: ze.buttons.order.map((p) => /* @__PURE__ */ r.jsx(Ve, { id: `buttons.${p}` }, p)) })
3062
+ ] }),
3063
+ /* @__PURE__ */ r.jsx("hr", { id: "content-of-page" }),
3064
+ /* @__PURE__ */ r.jsx(
3065
+ "div",
3066
+ {
3067
+ className: k("overlay", { open: i.navigation || i.account || !o.search && i.search })
3068
+ }
3069
+ )
3070
+ ] });
3071
+ };
3072
+ const xs = () => {
3073
+ const e = A();
3074
+ return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
3075
+ /* @__PURE__ */ r.jsx($n, {}),
3076
+ /* @__PURE__ */ r.jsx("div", { className: "content", children: /* @__PURE__ */ r.jsx(Ze, { variant: "error", text: e.formatMessage({ id: "pageLayout_error" }) }) }),
3077
+ /* @__PURE__ */ r.jsx(kn, {})
3078
+ ] });
3079
+ }, ho = ({ children: e, reportError: t, showFooter: n = !0, background: s = "default", className: o = "", locale: l = "en" }) => {
3080
+ const m = yr();
3081
+ V(() => {
3082
+ window.scrollTo(0, 0);
3083
+ }, [m]);
3084
+ const a = pn(e, { locale: l });
3085
+ return /* @__PURE__ */ r.jsx(mr, { onError: t, fallback: /* @__PURE__ */ r.jsx(xs, {}), children: /* @__PURE__ */ r.jsx(nr, { fallback: /* @__PURE__ */ r.jsx(Kr, { layout: "overview-page" }), children: /* @__PURE__ */ r.jsx("div", { id: "wrapper", className: k(o, { [s]: s !== "default" }), children: /* @__PURE__ */ r.jsxs(dr, { children: [
3086
+ /* @__PURE__ */ r.jsx($n, {}),
3087
+ /* @__PURE__ */ r.jsx("div", { className: "content", children: a }),
3088
+ n && /* @__PURE__ */ r.jsx(kn, {}),
3089
+ /* @__PURE__ */ r.jsx(fs, {})
3090
+ ] }) }) }) });
3091
+ }, sn = {
3092
+ default: "tags_",
3093
+ headerTopics: "header_topics_topics_"
3094
+ }, _t = {
3095
+ topic: {
3096
+ Climate: "climate",
3097
+ CitiesAndLocalGovernment: "cities-and-local-government",
3098
+ DigitalAndData: "digital-and-data",
3099
+ Education: "education",
3100
+ EquityJusticeAndInclusion: "equity-justice-and-inclusion",
3101
+ HealthAndSocialCare: "health-and-social-care",
3102
+ Innovation: "innovation",
3103
+ LeadershipAndSkills: "leadership-and-skills",
3104
+ LifeInGovernment: "life-in-government",
3105
+ Policymaking: "policymaking",
3106
+ TransportAndInfrastructure: "transport-and-infrastructure",
3107
+ WorkAndTheEconomy: "work-and-the-economy"
3108
+ },
3109
+ "from the community": "community"
3110
+ }, bs = {
3111
+ getTagDetails: (e) => {
3112
+ if (e.includes("topic_")) {
3113
+ if (e = _t.topic[e.replace("topic_", "")], e) {
3114
+ const t = ze.topics.topics[e].href;
3115
+ return t ? { id: e, href: t, text: `${sn.headerTopics}${e}` } : null;
3116
+ }
3117
+ return null;
3118
+ }
3119
+ return _t[e] ? (e = _t[e], { id: e, text: `${sn.default}${e}` }) : null;
3120
+ }
3121
+ };
3122
+ const go = ({
3123
+ tags: e = [],
3124
+ color: t = "default",
3125
+ forceOneLine: n = !1,
3126
+ canHaveLinks: s = !0,
3127
+ className: o = "",
3128
+ gtmType: l = "tag-click",
3129
+ gtmContext: m = "tags"
3130
+ }) => {
3131
+ const a = A();
3132
+ if (!e || e.length < 1)
3133
+ return null;
3134
+ const i = [];
3135
+ return e.forEach((u) => {
3136
+ if (!u)
3137
+ return;
3138
+ const d = bs.getTagDetails(u);
3139
+ d && i.push(d);
3140
+ }), i.length < 1 ? null : /* @__PURE__ */ r.jsx("ul", { className: k("tags text-small", t, o, { "one-line": n }), children: i.map((u) => {
3141
+ const d = a.formatMessage({ id: u.text });
3142
+ return /* @__PURE__ */ r.jsx("li", { children: u.href && s ? /* @__PURE__ */ r.jsx(
3143
+ "a",
3144
+ {
3145
+ href: u.href,
3146
+ className: "gtm-trackable",
3147
+ "data-gtm-event-type": l,
3148
+ "data-gtm-event-context": m,
3149
+ children: d
3150
+ }
3151
+ ) : d }, u.id);
3152
+ }) });
3153
+ };
3154
+ const _o = ({
3155
+ members: { total: e, data: t = [] },
3156
+ pagination: n,
3157
+ gtmContext: s = "member",
3158
+ gtmType: o = "member-click",
3159
+ className: l = ""
3160
+ }) => {
3161
+ const m = A();
3162
+ return t.length === 0 ? null : (e || (e = t.length), /* @__PURE__ */ r.jsxs("div", { className: k("members-list", l), children: [
3163
+ /* @__PURE__ */ r.jsxs("h1", { children: [
3164
+ m.formatMessage({ id: "membersList" }),
3165
+ /* @__PURE__ */ r.jsx("span", { className: "count", children: e })
3166
+ ] }),
3167
+ /* @__PURE__ */ r.jsx("ul", { children: t.map((a, i) => /* @__PURE__ */ r.jsxs("li", { children: [
3168
+ /* @__PURE__ */ r.jsx(Nt, { member: a, gtmContext: s, gtmType: o }),
3169
+ a.isAdmin && /* @__PURE__ */ r.jsx(Jr, { children: m.formatMessage({ id: "membersList_admin" }) })
3170
+ ] }, i)) }),
3171
+ n && /* @__PURE__ */ r.jsx(
3172
+ us,
3173
+ {
3174
+ ...n,
3175
+ icon: { icon: "arrow-down", position: "right" },
3176
+ gtmContext: s
3177
+ }
3178
+ )
3179
+ ] }));
3180
+ };
3181
+ let Ue = null;
3182
+ const ne = "discussion_form_", Tn = ({
3183
+ content: e = { type: "response", slugs: {} },
3184
+ userHasPermissions: t = !0,
3185
+ meta: n = {
3186
+ isLoading: !1,
3187
+ isInWrapper: !1,
3188
+ isEditing: !1,
3189
+ showTitle: !1
3190
+ },
3191
+ inputRef: s,
3192
+ maxLength: o = 5e4,
3193
+ minRows: l = 4,
3194
+ forceShow: m = {
3195
+ cancel: !1,
3196
+ error: !1
3197
+ },
3198
+ functions: a = {
3199
+ create: () => {
3200
+ },
3201
+ handleSaveEdit: () => {
3202
+ },
3203
+ handleCancel: () => {
3204
+ },
3205
+ callback: () => {
3206
+ },
3207
+ props: {
3208
+ create: { projectNames: ["questions-answers"] }
3209
+ }
3210
+ },
3211
+ gtmContext: i = "DiscussionForm"
3212
+ }) => {
3213
+ var M, Q;
3214
+ const u = A(), d = ge(_e), [f, p] = F(n.isEditing && n.isEditing.text || ""), [g, h] = F(m.error || !1), [v, j] = F(!1), E = Z(null);
3215
+ if (s || (s = E), n.isLoading)
3216
+ return /* @__PURE__ */ r.jsx(me, { className: "discussion-card discussion-form", "data-testid": "loading-placeholder" });
3217
+ const _ = (O) => {
3218
+ const z = O.target.value;
3219
+ p(z);
3220
+ let N;
3221
+ !d || !d.id ? N = le(u.formatMessage, `${ne}error_loggedOut`, e.type, "action") : t ? z.length >= o && (N = `${ne}error_tooLong`) : N = le(u.formatMessage, `${ne}error_noPermission`, e.type, "action"), N ? h(N) : g && h(!1);
3222
+ };
3223
+ let $ = `${e.type}-form`;
3224
+ if (e.type === "response" || e.type === "reply") {
3225
+ const O = e.type === "response" ? ((M = e.slugs) == null ? void 0 : M.question) || "" : ((Q = e.slugs) == null ? void 0 : Q.answer) || "";
3226
+ O && ($ = `${$}-${O.slice(-15)}`);
3227
+ }
3228
+ const B = async (O) => {
3229
+ var N;
3230
+ if (O.preventDefault(), O.stopPropagation(), !d || !d.id || !t || U)
3231
+ return;
3232
+ Ue && clearTimeout(Ue), j("submitting");
3233
+ const z = window.location.pathname;
3234
+ try {
3235
+ let D;
3236
+ switch (e.type) {
3237
+ case "post":
3238
+ D = await a.create({ content: f });
3239
+ break;
3240
+ case "question":
3241
+ D = await a.create({ title: f, authorId: d && d.id, ...(N = a.props) == null ? void 0 : N.create });
3242
+ break;
3243
+ case "response":
3244
+ D = await a.create(
3245
+ { question: e.slugs.question },
3246
+ { body: f, authorId: d && d.id, contentPath: z }
3247
+ );
3248
+ break;
3249
+ case "reply":
3250
+ D = await a.create(
3251
+ { question: e.slugs.question, answer: e.slugs.answer },
3252
+ { body: f, authorId: d && d.id, contentPath: z }
3253
+ );
3254
+ break;
3255
+ default:
3256
+ break;
3257
+ }
3258
+ await $r(1e3), a.callback && await a.callback(D), Ue = setTimeout(() => {
3259
+ p(""), j("submitted"), y();
3260
+ }, 500);
3261
+ } catch (D) {
3262
+ const Y = D;
3263
+ let X = `${ne}error`;
3264
+ Y.message.includes("entry already exists") && (X = le(u.formatMessage, `${ne}error_alreadyExists`, e.type, "action")), Y.message.includes("429") ? X = le(u.formatMessage, `${ne}error_tooMany`, e.type, "action") : Y.message.includes("400") && (X = `${ne}error`), h(X), y();
3265
+ }
3266
+ }, y = () => {
3267
+ Ue = setTimeout(() => {
3268
+ h(!1), j(!1);
3269
+ }, 5e3);
3270
+ }, U = !f || !Nr(f), W = v === "submitting", b = [];
3271
+ return (n.isEditing && !W || m.cancel) && b.push({
3272
+ variant: "secondary",
3273
+ size: { mobile: "small", 600: "medium" },
3274
+ onClick: a.handleCancel,
3275
+ className: "gtm-trackable",
3276
+ "data-gtm-event-context": i,
3277
+ "data-gtm-event-type": `cancel-${e.type}-click`,
3278
+ disabled: !m.cancel && (!d || !d.id || !f),
3279
+ children: u.formatMessage({ id: `${ne}cancel` })
3280
+ }), b.push({
3281
+ variant: "primary",
3282
+ size: { mobile: "small", 600: "medium" },
3283
+ onClick: (O) => {
3284
+ if (n.isEditing) {
3285
+ j("submitting"), a.handleSaveEdit && a.handleSaveEdit(E.current && "value" in E.current ? E.current.value : "");
3286
+ return;
3287
+ }
3288
+ B(O);
3289
+ },
3290
+ className: "gtm-trackable",
3291
+ "data-gtm-event-context": i,
3292
+ "data-gtm-event-type": `${n.isEditing ? "save" : "submit"}-${e.type}-click`,
3293
+ "data-testid": "save-button",
3294
+ disabled: !d || !d.id || !t || U || W || n.isEditing && f === n.isEditing.text,
3295
+ children: u.formatMessage({ id: `${ne}${W ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}` })
3296
+ }), /* @__PURE__ */ r.jsxs(
3297
+ "form",
3298
+ {
3299
+ id: $,
3300
+ className: k("discussion-card discussion-form", { "no-styling": n.isInWrapper && n.isEditing }),
3301
+ "data-testid": `discussion-${e.type}-form`,
3302
+ children: [
3303
+ (n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ r.jsx("h2", { children: le(u.formatMessage, `${ne}title`, e.type, "action") }),
3304
+ /* @__PURE__ */ r.jsx(Nt, { member: d || "community", gtmContext: i, gtmType: "profile-click" }),
3305
+ /* @__PURE__ */ r.jsx(ee, { element: "label", showOnFocus: !1, htmlFor: `${$}-input`, children: le(u.formatMessage, `${ne}label`, e.type, "action") }),
3306
+ /* @__PURE__ */ r.jsx(
3307
+ fr,
3308
+ {
3309
+ ref: s,
3310
+ id: `${$}-input`,
3311
+ name: e.type,
3312
+ placeholder: le(u.formatMessage, `${ne}placeholder`, e.type, "action"),
3313
+ onChange: _,
3314
+ value: f,
3315
+ maxLength: o,
3316
+ "aria-invalid": !!g,
3317
+ "aria-errormessage": "error-message",
3318
+ minRows: l,
3319
+ autoFocus: !!n.isEditing
3320
+ }
3321
+ ),
3322
+ /* @__PURE__ */ r.jsx("small", { children: le(u.formatMessage, `${ne}explainer`, e.type, "action", {
3323
+ a: (O) => /* @__PURE__ */ r.jsx(
3324
+ "a",
3325
+ {
3326
+ href: "https://about.apolitical.co/q-and-a-community-guidelines",
3327
+ target: "_blank",
3328
+ className: "gtm-trackable",
3329
+ "data-gtm-event-context": i,
3330
+ "data-gtm-event-type": "community-guidelines-link",
3331
+ children: O
3332
+ }
3333
+ )
3334
+ }) }),
3335
+ /* @__PURE__ */ r.jsx(qe, { buttons: b }),
3336
+ v === "submitted" && /* @__PURE__ */ r.jsx(St, { className: "success", "data-testid": "success", children: le(u.formatMessage, `${ne}success`, e.type, "action") }),
3337
+ g && /* @__PURE__ */ r.jsx(St, { id: "error-message", className: "error", "data-testid": "error", children: m.error ? m.error : typeof g == "string" ? g.includes(" ") ? g : u.formatMessage({ id: g }, { action: u.formatMessage({ id: `discussion_action_${e.type}` }), maxLength: o }) : g })
3338
+ ]
3339
+ }
3340
+ );
3341
+ }, Mn = ({
3342
+ contentType: e,
3343
+ createPost: t,
3344
+ membershipRequiredToPost: { isMember: n, required: s, join: o, leave: l, notMemberStateText: m }
3345
+ }) => s && !n ? /* @__PURE__ */ r.jsx(
3346
+ Ze,
3347
+ {
3348
+ text: m,
3349
+ button: {
3350
+ component: /* @__PURE__ */ r.jsx(yn, { functions: { join: o, leave: l } })
3351
+ }
3352
+ }
3353
+ ) : /* @__PURE__ */ r.jsx(
3354
+ Tn,
3355
+ {
3356
+ content: { type: e, slugs: {} },
3357
+ functions: {
3358
+ create: t
3359
+ }
3360
+ }
3361
+ ), vs = {
3362
+ showThread: !1,
3363
+ showForm: !1
3364
+ }, Cn = Tt(vs), xo = ({ children: e }) => {
3365
+ const [t, n] = F({
3366
+ showThread: !1,
3367
+ showForm: !1
3368
+ });
3369
+ return /* @__PURE__ */ r.jsx(Cn.Provider, { value: { ...t, updateConversation: n }, children: e });
3370
+ }, ys = ({
3371
+ question: e,
3372
+ answer: t,
3373
+ reply: n
3374
+ }) => ({
3375
+ ...e && { questionSlug: e },
3376
+ ...t && { answerSlug: t },
3377
+ ...n && { replySlug: n }
3378
+ }), ws = (e, t = 10) => !e || e.length === 0 ? [] : e.slice(0, t);
3379
+ let Ce = !1;
3380
+ const xt = () => {
3381
+ Ce !== !1 && (clearTimeout(Ce), Ce = !1);
3382
+ }, bt = 10, ks = ({
3383
+ element: e = "div",
3384
+ likes: t = 0,
3385
+ peopleWhoLiked: n = !1,
3386
+ isShort: s = !0,
3387
+ userLiked: o = !1,
3388
+ content: l = { type: "reply", slugs: {} },
3389
+ canLike: m = !0,
3390
+ functions: { createLike: a = () => {
3391
+ }, deleteLike: i = () => {
3392
+ } } = {}
3393
+ }) => {
3394
+ const u = A();
3395
+ V(() => {
3396
+ g(o);
3397
+ }, [o]);
3398
+ const [d, f] = F(t), [p, g] = F(o), [h, v] = F(!1), [j, E] = F(!1), _ = Ye(() => ws(n, bt), [n]), $ = (y) => {
3399
+ if (y.preventDefault(), y.stopPropagation(), E(!1), Ce)
3400
+ return xt(), !1;
3401
+ if (xt(), h || !m)
3402
+ return !1;
3403
+ Ce = setTimeout(B, 350);
3404
+ }, B = async () => {
3405
+ if (xt(), h || !m)
3406
+ return !1;
3407
+ let y = p ? d - 1 : d + 1;
3408
+ y < 0 && (y = 0), v(!0), f(y), g(!p);
3409
+ try {
3410
+ if (l && l.slugs) {
3411
+ const U = ys(l.slugs);
3412
+ p ? await i(U) : await a(U, { contentPath: window.location.pathname });
3413
+ }
3414
+ } catch {
3415
+ f(t), g(o);
3416
+ } finally {
3417
+ v(!1);
3418
+ }
3419
+ };
3420
+ return C.createElement(
3421
+ e,
3422
+ {
3423
+ className: k("likes-wrapper text-medium action-button", { "show-spinner": h, "is-liked": p, disabled: !m }),
3424
+ onClick: $,
3425
+ onMouseEnter: () => {
3426
+ E(!0);
3427
+ },
3428
+ onMouseLeave: () => {
3429
+ E(!1);
3430
+ },
3431
+ onFocus: () => {
3432
+ E(!0);
3433
+ },
3434
+ onBlur: () => {
3435
+ E(!1);
3436
+ },
3437
+ children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
3438
+ /* @__PURE__ */ r.jsx(
3439
+ q,
3440
+ {
3441
+ variant: "tertiary",
3442
+ size: "medium",
3443
+ icon: { icon: p ? "heart" : "heart_empty", animate: "bounce" },
3444
+ className: k({ "do-animation": p && !o }),
3445
+ screenreaderText: m ? u.formatMessage({
3446
+ id: `discussion_likes_${p ? "unlike" : "like"}`
3447
+ }, { action: u.formatMessage({ id: `discussion_action_${l.type}` }) }) : !1,
3448
+ onClick: $,
3449
+ disabled: !m,
3450
+ "aria-hidden": !m,
3451
+ "data-testid": "like-button",
3452
+ "data-gtm-event-context": "Likes",
3453
+ "data-gtm-event-type": `like-${l.type}-click`
3454
+ }
3455
+ ),
3456
+ /* @__PURE__ */ r.jsx("span", { className: k("number-of-likes", { "no-likes": d === 0 }), "data-testid": "number-of-likes", children: u.formatMessage({ id: `discussion_likes${s ? "_short" : ""}` }, { number: d }) }),
3457
+ n && /* @__PURE__ */ r.jsx(Or, { isOpen: j, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ r.jsxs("ul", { children: [
3458
+ _.map((y) => typeof y == "string" || !y.name ? null : /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(Xe, { href: y.id ? `/profiles/${y.id}` : void 0, gtmContext: "Likes", gtmType: "liked-name-click", children: y.name }) }, y.id || window.btoa(y.name))),
3459
+ n.length > bt && /* @__PURE__ */ r.jsx("li", { children: u.formatMessage({ id: "discussion_likes_more" }, { number: n.length - bt }) })
3460
+ ] }) })
3461
+ ] })
3462
+ }
3463
+ );
3464
+ };
3465
+ const js = ({ element: e = "section", children: t, className: n, ...s }) => C.createElement(
3466
+ e,
3467
+ {
3468
+ className: k("modal", n),
3469
+ children: typeof t == "string" ? /* @__PURE__ */ r.jsx("p", { children: t }) : t,
3470
+ ...s
3471
+ }
3472
+ );
3473
+ const Es = ({
3474
+ id: e = "content-overlay",
3475
+ isOpen: t = !1,
3476
+ maxWidth: n,
3477
+ functions: { onOpen: s = () => {
3478
+ }, onClose: o = () => {
3479
+ } } = {},
3480
+ forceShow: { error: l = !1 } = {},
3481
+ title: m,
3482
+ children: a,
3483
+ buttons: i,
3484
+ className: u = "",
3485
+ gtmContext: d = "Modal"
3486
+ }) => {
3487
+ const f = A(), [p, g] = F(t), h = (j) => {
3488
+ g(j), j ? (s(), document.body.classList.add("has-overlay")) : (o(), document.body.classList.remove("has-overlay"));
3489
+ };
3490
+ V(() => {
3491
+ h(t);
3492
+ }, [t]);
3493
+ const v = n ? { "--max-width": `${n / 16}rem` } : {};
3494
+ return /* @__PURE__ */ r.jsx("div", { className: k("overlay", { open: p }), children: /* @__PURE__ */ r.jsx(
3495
+ js,
3496
+ {
3497
+ id: e,
3498
+ className: k("overlay-modal", u, { "has-max-width": n }),
3499
+ hidden: !p,
3500
+ style: v,
3501
+ children: t && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
3502
+ /* @__PURE__ */ r.jsxs("div", { className: "top", children: [
3503
+ /* @__PURE__ */ r.jsx("h2", { children: m }),
3504
+ /* @__PURE__ */ r.jsx(
3505
+ q,
3506
+ {
3507
+ variant: "tertiary",
3508
+ size: "medium",
3509
+ icon: { icon: "close" },
3510
+ onClick: () => h(!1),
3511
+ className: "gtm-trackable",
3512
+ "data-gtm-event-type": "close-modal-click",
3513
+ "data-gtm-event-context": d,
3514
+ screenreaderText: f.formatMessage({ id: "overlay_button" })
3515
+ }
3516
+ )
3517
+ ] }),
3518
+ /* @__PURE__ */ r.jsx(kt, {}),
3519
+ a,
3520
+ i && /* @__PURE__ */ r.jsxs("div", { className: "bottom", children: [
3521
+ /* @__PURE__ */ r.jsx(kt, {}),
3522
+ /* @__PURE__ */ r.jsx(qe, { buttons: i })
3523
+ ] }),
3524
+ l && /* @__PURE__ */ r.jsx(St, { className: "error", children: l })
3525
+ ] })
3526
+ }
3527
+ ) });
3528
+ }, Ss = (e, t) => ({
3529
+ "aria-haspopup": !0,
3530
+ "aria-expanded": t,
3531
+ "aria-controls": e
3532
+ }), on = (e) => {
3533
+ const t = {};
3534
+ return Object.keys(e).forEach((n) => {
3535
+ t[`${n}Slug`] = e[n];
3536
+ }), t;
3537
+ };
3538
+ const ue = "discussion_", Dt = ({
3539
+ element: e = "div",
3540
+ content: t,
3541
+ userHasPermissions: n = !0,
3542
+ isLoading: s = !1,
3543
+ originalAuthorId: o,
3544
+ functions: {
3545
+ content: { createContent: l, deleteContent: m, updateContent: a } = { createContent: () => {
3546
+ }, deleteContent: () => {
3547
+ }, updateContent: () => {
3548
+ } },
3549
+ likes: { createLike: i, deleteLike: u } = { createLike: () => {
3550
+ }, deleteLike: () => {
3551
+ } },
3552
+ comments: { openComments: d } = { openComments: () => {
3553
+ } }
3554
+ },
3555
+ links: f = {},
3556
+ className: p,
3557
+ gtmContext: g = "DiscussionAnswer",
3558
+ children: h
3559
+ }) => {
3560
+ const v = A(), j = ge(_e), E = ge(Cn), [_, $] = F({
3561
+ body: t && t.body || "",
3562
+ isEditing: !1,
3563
+ didEdit: t && t.isEdited || !1
3564
+ }), [B, y] = F(!1), [U, W] = F("");
3565
+ if (V(() => {
3566
+ $({
3567
+ ..._,
3568
+ body: t && t.body || "",
3569
+ didEdit: t && t.isEdited || !1
3570
+ });
3571
+ }, [t.isEdited]), s || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
3572
+ return /* @__PURE__ */ r.jsx(me, { className: "discussion-card discussion-post" });
3573
+ const { author: b, canLike: M, createdAt: Q, id: O, likes: z = 0, userLiked: N, comments: D = 0 } = t, Y = j && j.id && typeof b != "string" && b.id && b.id === j.id || !1, X = typeof M == "boolean" ? M : n ? !Y : !1, re = async (L) => {
3574
+ L || (L = ""), W("");
3575
+ try {
3576
+ if (!pr(L, _.body)) {
3577
+ const oe = t.type === "question" ? { title: L } : { body: L };
3578
+ await a(on(t.slugs), oe);
3579
+ }
3580
+ $({ body: L, isEditing: !1, didEdit: !0 });
3581
+ } catch {
3582
+ W(`${ue}form_error`);
3583
+ }
3584
+ }, K = () => {
3585
+ E && E.updateConversation && E.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
3586
+ const oe = `reply-form-${(t.type === "answer" ? t.slug : t.slugs.answer || "").toLowerCase().slice(-15)}`, xe = document.getElementById(oe), Pe = document.getElementById(`${oe}-input`);
3587
+ Pe && Pe.focus(), xe && xe.scrollIntoView({ behavior: "smooth" });
3588
+ }, 0);
3589
+ }, se = () => {
3590
+ try {
3591
+ m(on(t.slugs));
3592
+ } catch {
3593
+ W("delete-error");
3594
+ }
3595
+ }, ie = [{
3596
+ text: v.formatMessage({ id: `${ue}moreMenu_report` }),
3597
+ href: `mailto:community@apolitical.co?subject=${encodeURI(v.formatMessage({ id: `${ue}report_subject` }))}&body=${encodeURI(
3598
+ v.formatMessage(
3599
+ { id: `${ue}report_body` },
3600
+ {
3601
+ contentType: t.type || "",
3602
+ contentSlug: t.slug || "",
3603
+ contentUrl: `${window.origin}${typeof process < "u" && process.env.PUBLIC_URL || ""}/${t.slugs.question || ""}`
3604
+ }
3605
+ )
3606
+ )}`,
3607
+ icon: "flag"
3608
+ }];
3609
+ return n && Y && ie.push(
3610
+ {
3611
+ text: v.formatMessage({ id: `${ue}moreMenu_edit` }),
3612
+ onClick: () => $({ ..._, isEditing: !0 }),
3613
+ icon: "pencil-paper",
3614
+ className: "gtm-trackable",
3615
+ "data-gtm-event-context": g,
3616
+ "data-gtm-event-type": `edit-${t.type}-click`
3617
+ },
3618
+ {
3619
+ text: v.formatMessage({ id: `${ue}moreMenu_delete` }),
3620
+ onClick: (L) => {
3621
+ L.preventDefault(), L.stopPropagation(), y(!0);
3622
+ },
3623
+ icon: "trash",
3624
+ className: "gtm-trackable",
3625
+ "data-gtm-event-context": g,
3626
+ "data-gtm-event-type": `delete-${t.type}-click`,
3627
+ ...Ss(`delete-${t.slug}-modal`, B)
3628
+ }
3629
+ ), C.createElement(e, {
3630
+ className: k("discussion-post", p),
3631
+ "data-testid": `discussion-${t.type}-thread`,
3632
+ children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
3633
+ /* @__PURE__ */ r.jsxs(
3634
+ "div",
3635
+ {
3636
+ id: O || t.slug,
3637
+ className: k("discussion-card", t.type, { editing: _.isEditing, "has-link": f.post && !_.isEditing }),
3638
+ onClick: (L) => {
3639
+ !f.post || _.isEditing || (L.preventDefault(), L.stopPropagation(), window.location.href = f.post);
3640
+ },
3641
+ children: [
3642
+ !_.isEditing && /* @__PURE__ */ r.jsx(
3643
+ Nt,
3644
+ {
3645
+ member: b,
3646
+ additionalContent: { createdAt: Q, didEdit: _.didEdit },
3647
+ className: typeof b != "string" && b.id === o ? "highlighted" : "",
3648
+ gtmContext: g,
3649
+ gtmType: "profile-click"
3650
+ }
3651
+ ),
3652
+ _.isEditing ? /* @__PURE__ */ r.jsx(
3653
+ Tn,
3654
+ {
3655
+ content: { type: t.type, slugs: t.slugs },
3656
+ userHasPermissions: n,
3657
+ meta: { isLoading: s, isInWrapper: !0, isEditing: { text: _.body } },
3658
+ maxLength: t.type === "question" ? 250 : 5e4,
3659
+ forceShow: { error: U !== "" && U !== "delete-error" ? v.formatMessage({ id: U }, {
3660
+ action: v.formatMessage({
3661
+ id: `discussion_action_${t.type}`
3662
+ })
3663
+ }) : !1 },
3664
+ functions: {
3665
+ create: l,
3666
+ handleSaveEdit: re,
3667
+ handleCancel: () => {
3668
+ W(""), $({ ..._, isEditing: !1 });
3669
+ }
3670
+ },
3671
+ gtmContext: `${g}Form`
3672
+ }
3673
+ ) : f.post ? /* @__PURE__ */ r.jsx("a", { href: f.post, className: "gtm-trackable", "data-gtm-event-context": g, "data-gtm-event-type": "title-click", children: /* @__PURE__ */ r.jsx(en, { options: { overrides: { a: Gr } }, children: _.body }) }) : /* @__PURE__ */ r.jsx(en, { options: { wrapper: t.type === "question" ? "h1" : C.Fragment, forceWrapper: t.type === "question", forceInline: t.type === "question", forceBlock: t.type !== "question" }, children: _.body }),
3674
+ !_.isEditing && /* @__PURE__ */ r.jsxs("ul", { className: k("actions text-medium", t.type), "data-testid": `${t.type}-actions`, children: [
3675
+ /* @__PURE__ */ r.jsx(
3676
+ ks,
3677
+ {
3678
+ element: "li",
3679
+ likes: z,
3680
+ isShort: !1,
3681
+ userLiked: N,
3682
+ content: { type: t.type, slugs: t.slugs },
3683
+ canLike: X,
3684
+ functions: {
3685
+ createLike: i,
3686
+ deleteLike: u
3687
+ }
3688
+ }
3689
+ ),
3690
+ (["question", "post"].includes(t.type) || f.comments || typeof d == "function") && /* @__PURE__ */ r.jsxs("li", { className: "action-button", onClick: (L) => {
3691
+ L.preventDefault(), L.stopPropagation(), f.comments && (window.location.href = f.comments), typeof d == "function" && d();
3692
+ }, children: [
3693
+ /* @__PURE__ */ r.jsx(
3694
+ q,
3695
+ {
3696
+ variant: "tertiary",
3697
+ size: "medium",
3698
+ styling: { muted: !0 },
3699
+ icon: { icon: "speech-bubble_square_thick" },
3700
+ href: f.comments ? f.comments : !1,
3701
+ onClick: f.comments || typeof d != "function" ? !1 : d,
3702
+ className: "gtm-trackable",
3703
+ "data-gtm-event-context": g,
3704
+ "data-gtm-event-type": `answer-${t.type}-click`,
3705
+ screenreaderText: v.formatMessage({ id: `${ue}comments_screenReader` }, { count: D })
3706
+ }
3707
+ ),
3708
+ /* @__PURE__ */ r.jsx("span", { children: v.formatMessage({ id: `${ue}comments` }, { count: D }) })
3709
+ ] }),
3710
+ (t.type === "answer" || t.type === "reply") && /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
3711
+ q,
3712
+ {
3713
+ variant: "tertiary",
3714
+ size: "medium",
3715
+ styling: { muted: !0 },
3716
+ onClick: K,
3717
+ children: v.formatMessage({ id: `${ue}reply` })
3718
+ }
3719
+ ) }),
3720
+ /* @__PURE__ */ r.jsx(ds, { element: "li", id: `more-${t.slug}`, options: ie })
3721
+ ] })
3722
+ ]
3723
+ }
3724
+ ),
3725
+ h,
3726
+ /* @__PURE__ */ r.jsx(
3727
+ Es,
3728
+ {
3729
+ id: `delete-${t.slug}-modal`,
3730
+ isOpen: B,
3731
+ functions: { onOpen: () => {
3732
+ }, onClose: () => y(!1) },
3733
+ forceShow: { error: U === "delete-error" ? v.formatMessage({ id: "discussion_delete_error" }, {
3734
+ action: v.formatMessage({
3735
+ id: `discussion_action_${t.type}`
3736
+ })
3737
+ }) : !1 },
3738
+ title: v.formatMessage(
3739
+ { id: "discussion_delete_title" },
3740
+ { action: v.formatMessage({ id: `discussion_action_${t.type}` }) }
3741
+ ),
3742
+ buttons: [
3743
+ { variant: "secondary", onClick: () => y(!1), children: v.formatMessage({ id: "discussion_delete_cancel" }) },
3744
+ { variant: "primary", className: "destructive", onClick: se, children: v.formatMessage({ id: "discussion_delete_delete" }) }
3745
+ ],
3746
+ gtmContext: `${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,
3747
+ children: /* @__PURE__ */ r.jsx(
3748
+ fe,
3749
+ {
3750
+ id: "discussion_delete_text",
3751
+ values: {
3752
+ p: (L) => /* @__PURE__ */ r.jsx("p", { children: L }),
3753
+ action: v.formatMessage({
3754
+ id: `discussion_action_${t.type}`
3755
+ })
3756
+ }
3757
+ }
3758
+ )
3759
+ }
3760
+ )
3761
+ ] })
3762
+ });
3763
+ };
3764
+ const vt = "discussion_responses_", bo = ({ type: e = "answer", responses: t = 0 }) => {
3765
+ const n = A();
3766
+ return /* @__PURE__ */ r.jsxs("div", { className: "responses-heading", children: [
3767
+ /* @__PURE__ */ r.jsx("h3", { children: n.formatMessage({ id: `${vt}title` }, { action: n.formatMessage({ id: `${vt}${e}` }), count: t }) }),
3768
+ t === 0 && /* @__PURE__ */ r.jsx("p", { children: le(n.formatMessage, `${vt}empty`, e, e) })
3769
+ ] });
3770
+ };
3771
+ const vo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
3772
+ const s = A(), o = Z(null), [l, m] = F(e), [a, i] = F("closed");
3773
+ V(() => {
3774
+ const p = o.current;
3775
+ if (p)
3776
+ return p.addEventListener("transitionend", u), () => {
3777
+ p.removeEventListener("transitionend", u);
3778
+ };
3779
+ }, []), ke(() => {
3780
+ a === "closed" && !l || i(["opening", "open"].includes(a) ? "ready-to-close" : "opening");
3781
+ }, [l]), V(() => {
3782
+ a === "ready-to-close" && i("closing");
3783
+ }, [a]);
3784
+ const u = ({ propertyName: p }) => {
3785
+ p === "max-height" && i((g) => g === "opening" ? "open" : g === "closing" ? "closed" : g);
3786
+ }, d = ["opening", "open"].includes(a), f = pn(n, { element: "li" });
3787
+ return /* @__PURE__ */ r.jsxs("div", { className: "thread-wrapper", children: [
3788
+ /* @__PURE__ */ r.jsx(
3789
+ q,
3790
+ {
3791
+ variant: "secondary",
3792
+ size: "small",
3793
+ styling: { muted: !0 },
3794
+ icon: { icon: `arrow_corner-down_${d ? "left" : "right"}` },
3795
+ onClick: () => {
3796
+ m(!l);
3797
+ },
3798
+ children: s.formatMessage({ id: `discussion_thread_${d ? "hide" : "show"}` }, { count: t })
3799
+ }
3800
+ ),
3801
+ /* @__PURE__ */ r.jsx("ul", { ref: o, className: k("thread", a), hidden: !l, children: f })
3802
+ ] });
3803
+ }, $s = ({
3804
+ user: e,
3805
+ content: t,
3806
+ verb: n = "post"
3807
+ }) => ({
3808
+ actor: {
3809
+ id: e.id,
3810
+ data: {
3811
+ name: e.name,
3812
+ organization: e == null ? void 0 : e.organization,
3813
+ jobTitle: e == null ? void 0 : e.jobTitle
3814
+ }
3815
+ },
3816
+ content: t,
3817
+ latest_reactions: {
3818
+ like: []
3819
+ },
3820
+ reaction_counts: {
3821
+ like: 0
3822
+ },
3823
+ verb: n
3824
+ }), Ts = ({
3825
+ queryClient: e,
3826
+ queryKey: t,
3827
+ user: n,
3828
+ mutationFn: s
3829
+ }) => ({ mutationFn: s, onMutate: async ({ content: a }) => {
3830
+ if (!n)
3831
+ return;
3832
+ const i = $s({ user: n, content: a, verb: "post" });
3833
+ await e.cancelQueries({ queryKey: t });
3834
+ const u = e.getQueryData(t);
3835
+ return e.setQueryData(t, (d) => [...d, i]), { previousActivities: u };
3836
+ }, onError: (a, i, u) => {
3837
+ e.setQueryData(t, u.previousActivities);
3838
+ }, onSettled: () => {
3839
+ e.invalidateQueries({ queryKey: t });
3840
+ } }), Ms = ({
3841
+ queryClient: e,
3842
+ queryKey: t,
3843
+ mutationFn: n
3844
+ }) => ({ mutationFn: n, onMutate: async ({ activityId: a }) => {
3845
+ await e.cancelQueries({ queryKey: t });
3846
+ const i = e.getQueryData(t), u = i == null ? void 0 : i.map((d) => {
3847
+ var f;
3848
+ 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;
3849
+ });
3850
+ return e.setQueryData(t, () => u && [...u]), { previousActivities: u };
3851
+ }, onError: (a, i, u) => {
3852
+ e.setQueryData(t, u.previousActivities);
3853
+ }, onSuccess: (a) => {
3854
+ 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));
3855
+ return e.setQueryData(t, () => u && [...u]), { previousActivities: i };
3856
+ }, onSettled: (a, i, u) => {
3857
+ e.invalidateQueries({
3858
+ queryKey: [...t, u.activityId]
3859
+ });
3860
+ } }), Cs = ({
3861
+ queryClient: e,
3862
+ queryKey: t,
3863
+ user: n,
3864
+ mutationFn: s
3865
+ }) => ({ mutationFn: s, onMutate: async ({ activityId: i }) => {
3866
+ await e.cancelQueries({ queryKey: t });
3867
+ const u = e.getQueryData(t), d = u == null ? void 0 : u.map((f) => {
3868
+ var p;
3869
+ return (f == null ? void 0 : f.id) === i && (p = f.reaction_counts) != null && p.like && (f.reaction_counts.like -= 1), f;
3870
+ });
3871
+ return e.setQueryData(t, () => d && [...d]), { previousActivities: d };
3872
+ }, onError: (i, u, d) => {
3873
+ e.setQueryData(t, d.previousActivities);
3874
+ }, onSuccess: (i, { activityId: u }) => {
3875
+ const d = e.getQueryData(t), f = d == null ? void 0 : d.map((p) => {
3876
+ var g, h, v, j;
3877
+ if (p.id === u) {
3878
+ const E = (v = (h = (g = p.latest_reactions) == null ? void 0 : g.like) == null ? void 0 : h.find(
3879
+ (_) => _.user_id === (n == null ? void 0 : n.id)
3880
+ )) == null ? void 0 : v.id;
3881
+ return p.latest_reactions.like = (j = p.latest_reactions.like) == null ? void 0 : j.filter(
3882
+ (_) => _.id !== E
3883
+ ), p;
3884
+ } else
3885
+ return p;
3886
+ });
3887
+ return e.setQueryData(t, () => f && [...f]), { previousActivities: d };
3888
+ }, onSettled: (i, u, d) => {
3889
+ e.invalidateQueries({
3890
+ queryKey: [...t, d.activityId]
3891
+ });
3892
+ } }), yo = ({
3893
+ basePath: e,
3894
+ parentId: t,
3895
+ isMember: n,
3896
+ functions: { list: s, create: o, like: l, unlike: m, join: a, leave: i }
3897
+ }) => {
3898
+ const u = A(), d = Ct(), f = ge(_e), {
3899
+ data: p,
3900
+ error: g,
3901
+ isLoading: h,
3902
+ isFetching: v
3903
+ } = an({
3904
+ queryKey: [e, t],
3905
+ queryFn: s
3906
+ }), j = Ts({
3907
+ queryClient: d,
3908
+ queryKey: [e, t],
3909
+ user: f,
3910
+ mutationFn: o
3911
+ }), { mutate: E } = pe(j), _ = Ms({
3912
+ queryClient: d,
3913
+ queryKey: [e, t],
3914
+ mutationFn: l
3915
+ }), {
3916
+ mutate: $
3917
+ } = pe(_), B = Cs({
3918
+ queryClient: d,
3919
+ queryKey: [e, t],
3920
+ user: f,
3921
+ mutationFn: async ({ activityId: b }) => {
3922
+ var O, z, N;
3923
+ const M = p && (p == null ? void 0 : p.find(
3924
+ (D) => D.id === b
3925
+ )), Q = (N = (z = (O = M == null ? void 0 : M.latest_reactions) == null ? void 0 : O.like) == null ? void 0 : z.find(
3926
+ (D) => D.user_id === (f == null ? void 0 : f.id)
3927
+ )) == null ? void 0 : N.id;
3928
+ await m({ reactionId: Q || "", activityId: b });
3929
+ }
3930
+ }), {
3931
+ mutate: y
3932
+ } = pe(B), U = be(
3933
+ ({ activityId: b }) => $({ activityId: b }),
3934
+ [$]
3935
+ ), W = be(
3936
+ ({ activityId: b }) => y({ activityId: b }),
3937
+ [y]
3938
+ );
3939
+ return g ? /* @__PURE__ */ r.jsx(Ze, { variant: "error", text: g.message }) : h ? /* @__PURE__ */ r.jsx(me, { style: { height: "400px" } }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
3940
+ /* @__PURE__ */ r.jsx(
3941
+ Mn,
3942
+ {
3943
+ contentType: "post",
3944
+ createPost: E,
3945
+ membershipRequiredToPost: {
3946
+ isMember: n,
3947
+ required: !0,
3948
+ join: a,
3949
+ leave: i,
3950
+ notMemberStateText: u.formatMessage({ id: "community_joinToPost" })
3951
+ }
3952
+ }
3953
+ ),
3954
+ !v && Array.isArray(p) && (p == null ? void 0 : p.map((b) => {
3955
+ var M, Q, O, z, N, D, Y, X, re, K, se;
3956
+ return /* @__PURE__ */ r.jsx(
3957
+ Dt,
3958
+ {
3959
+ content: {
3960
+ type: "post",
3961
+ body: b == null ? void 0 : b.content,
3962
+ createdAt: (b == null ? void 0 : b.time) || "",
3963
+ slugs: { question: t },
3964
+ slug: b == null ? void 0 : b.id,
3965
+ author: {
3966
+ id: (M = b == null ? void 0 : b.actor) == null ? void 0 : M.id,
3967
+ name: (O = (Q = b == null ? void 0 : b.actor) == null ? void 0 : Q.data) == null ? void 0 : O.name,
3968
+ organization: (N = (z = b == null ? void 0 : b.actor) == null ? void 0 : z.data) == null ? void 0 : N.organization,
3969
+ jobTitle: (Y = (D = b == null ? void 0 : b.actor) == null ? void 0 : D.data) == null ? void 0 : Y.jobTitle,
3970
+ image: {
3971
+ thumbnail: ((re = (X = b == null ? void 0 : b.actor) == null ? void 0 : X.data) == null ? void 0 : re.thumbnail) || void 0
3972
+ }
3973
+ },
3974
+ userLiked: ((K = b == null ? void 0 : b.own_reactions) == null ? void 0 : K.like) && ((se = b == null ? void 0 : b.own_reactions) == null ? void 0 : se.like.length) > 0,
3975
+ likes: (b == null ? void 0 : b.reaction_counts.like) || 0,
3976
+ comments: (b == null ? void 0 : b.reaction_counts.reply) || 0
3977
+ },
3978
+ links: {
3979
+ post: `${e}/${t}/${b == null ? void 0 : b.id}`,
3980
+ comments: `${e}/${t}/${b == null ? void 0 : b.id}`
3981
+ },
3982
+ functions: {
3983
+ content: {
3984
+ createContent: () => null,
3985
+ deleteContent: () => null,
3986
+ updateContent: () => null
3987
+ },
3988
+ likes: {
3989
+ createLike: () => {
3990
+ U({ activityId: b == null ? void 0 : b.id });
3991
+ },
3992
+ deleteLike: () => {
3993
+ W({ activityId: b == null ? void 0 : b.id });
3994
+ }
3995
+ },
3996
+ comments: {
3997
+ openComments: () => null
3998
+ }
3999
+ }
4000
+ },
4001
+ b == null ? void 0 : b.id
4002
+ );
4003
+ }))
4004
+ ] });
4005
+ }, Ps = ({
4006
+ queryClient: e,
4007
+ queryKey: t,
4008
+ mutationFn: n
4009
+ }) => ({ mutationFn: n, onMutate: async () => {
4010
+ await e.cancelQueries({ queryKey: t });
4011
+ }, onError: (a, i, u) => {
4012
+ e.setQueryData(t, u.previousActivity);
4013
+ }, onSuccess: (a) => {
4014
+ var u;
4015
+ const i = e.getQueryData(t);
4016
+ if (i)
4017
+ return (u = i == null ? void 0 : i.latest_reactions) != null && u.reply ? (i.latest_reactions.reply.unshift(a), i && (i.reaction_counts = {
4018
+ reply: i.latest_reactions.reply.length
4019
+ })) : (i.latest_reactions = { reply: [a] }, i.reaction_counts = { reply: 1 }), e.setQueryData(t, () => ({
4020
+ ...i
4021
+ })), { previousActivity: i };
4022
+ }, onSettled: () => {
4023
+ e.invalidateQueries({ queryKey: t });
4024
+ } }), As = ({
4025
+ queryClient: e,
4026
+ queryKey: t,
4027
+ mutationFn: n
4028
+ }) => ({ mutationFn: n, onMutate: async ({ replyId: m }) => {
4029
+ var u, d;
4030
+ await e.cancelQueries({ queryKey: t });
4031
+ 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) => {
4032
+ var p;
4033
+ return f.id === m && ((p = f.children_counts) != null && p.like ? f.children_counts.like += 1 : f.children_counts = { like: 1 }), f;
4034
+ });
4035
+ return e.setQueryData(t, () => ({
4036
+ ...a,
4037
+ latest_reactions: { reply: i }
4038
+ })), { previousActivity: a };
4039
+ }, onError: (m, a, i) => {
4040
+ e.setQueryData(t, i.previousActivity);
4041
+ }, onSuccess: (m) => {
4042
+ var u;
4043
+ 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));
4044
+ return e.setQueryData(t, () => ({
4045
+ ...a,
4046
+ latest_reactions: { reply: i }
4047
+ })), { previousActivity: a };
4048
+ } }), Ns = ({
4049
+ queryClient: e,
4050
+ queryKey: t,
4051
+ user: n,
4052
+ mutationFn: s
4053
+ }) => ({ mutationFn: s, onMutate: async ({ replyId: a }) => {
4054
+ var d;
4055
+ await e.cancelQueries({ queryKey: t });
4056
+ const i = e.getQueryData(t);
4057
+ if (!i)
4058
+ return;
4059
+ 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));
4060
+ return e.setQueryData(t, () => ({
4061
+ ...i,
4062
+ latest_reactions: { reply: u }
4063
+ })), { previousActivity: i };
4064
+ }, onError: (a, i, u) => {
4065
+ e.setQueryData(t, u.previousActivity);
4066
+ }, onSuccess: (a, { replyId: i }) => {
4067
+ var f;
4068
+ const u = e.getQueryData(t);
4069
+ if (!u)
4070
+ return;
4071
+ const d = (f = u.latest_reactions.reply) == null ? void 0 : f.map((p) => {
4072
+ var g;
4073
+ return p.id === i ? (g = p.latest_children.reply) == null ? void 0 : g.filter(
4074
+ (v) => v.user_id !== (n == null ? void 0 : n.id)
4075
+ ) : p;
4076
+ });
4077
+ return e.setQueryData(t, () => ({
4078
+ ...u,
4079
+ latest_reactions: { reply: d }
4080
+ })), { previousActivity: u };
4081
+ } }), Ds = ({
4082
+ basePath: e,
4083
+ parentId: t,
4084
+ activityId: n,
4085
+ repliesList: s,
4086
+ isMember: o,
4087
+ functions: { createReply: l, like: m, unlike: a, join: i, leave: u }
4088
+ }) => {
4089
+ const d = A(), f = Ct(), p = ge(_e), g = Ps({
4090
+ queryClient: f,
4091
+ queryKey: [e, t, n],
4092
+ mutationFn: l
4093
+ }), { mutate: h } = pe(g), v = As({
4094
+ queryClient: f,
4095
+ queryKey: [e, t, n],
4096
+ mutationFn: m
4097
+ }), {
4098
+ mutate: j
4099
+ } = pe(v), E = Ns({
4100
+ queryClient: f,
4101
+ queryKey: [e, t, n],
4102
+ user: p,
4103
+ mutationFn: a
4104
+ }), {
4105
+ mutate: _
4106
+ } = pe(E), $ = be(
4107
+ ({ replyId: y }) => j({ replyId: y }),
4108
+ [j]
4109
+ ), B = be(
4110
+ ({ replyId: y }) => _({ replyId: y }),
4111
+ [_]
4112
+ );
4113
+ return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
4114
+ /* @__PURE__ */ r.jsx(
4115
+ Mn,
4116
+ {
4117
+ contentType: "post",
4118
+ createPost: h,
4119
+ membershipRequiredToPost: {
4120
+ isMember: o,
4121
+ required: !0,
4122
+ join: i,
4123
+ leave: u,
4124
+ notMemberStateText: d.formatMessage({ id: "community_joinToPost" })
4125
+ }
4126
+ }
4127
+ ),
4128
+ (s == null ? void 0 : s.length) === 0 || (s == null ? void 0 : s.map((y) => {
4129
+ var W, b, M, Q, O, z, N, D, Y, X, re, K, se, ie, L, oe;
4130
+ const U = ((W = y == null ? void 0 : y.latest_children) == null ? void 0 : W.like) && ((b = y == null ? void 0 : y.latest_children) == null ? void 0 : b.like.filter(
4131
+ (xe) => xe.user_id === (p == null ? void 0 : p.id)
4132
+ ));
4133
+ return /* @__PURE__ */ r.jsx(
4134
+ Dt,
4135
+ {
4136
+ content: {
4137
+ type: "post",
4138
+ body: typeof y.data.content == "string" ? (M = y == null ? void 0 : y.data) == null ? void 0 : M.content : ((O = (Q = y == null ? void 0 : y.data) == null ? void 0 : Q.content) == null ? void 0 : O.text) || "",
4139
+ createdAt: y == null ? void 0 : y.created_at,
4140
+ slugs: {
4141
+ question: `${e}/${t}/${n}`,
4142
+ reply: y == null ? void 0 : y.id
4143
+ },
4144
+ slug: `${e}/${t}/${n}#${y == null ? void 0 : y.id}`,
4145
+ author: {
4146
+ id: (z = y == null ? void 0 : y.user) == null ? void 0 : z.id,
4147
+ name: (D = (N = y == null ? void 0 : y.user) == null ? void 0 : N.data) == null ? void 0 : D.name,
4148
+ organization: (X = (Y = y == null ? void 0 : y.user) == null ? void 0 : Y.data) == null ? void 0 : X.organization,
4149
+ jobTitle: (K = (re = y == null ? void 0 : y.user) == null ? void 0 : re.data) == null ? void 0 : K.jobTitle,
4150
+ image: {
4151
+ thumbnail: ((ie = (se = y == null ? void 0 : y.user) == null ? void 0 : se.data) == null ? void 0 : ie.thumbnail) || void 0
4152
+ }
4153
+ },
4154
+ userLiked: !!(U != null && U.length),
4155
+ likes: ((L = y == null ? void 0 : y.children_counts) == null ? void 0 : L.like) || 0,
4156
+ comments: ((oe = y == null ? void 0 : y.children_counts) == null ? void 0 : oe.reply) || 0
4157
+ },
4158
+ functions: {
4159
+ content: {
4160
+ createContent: () => console.log("create"),
4161
+ deleteContent: () => console.log("delete"),
4162
+ updateContent: () => console.log("update")
4163
+ },
4164
+ likes: {
4165
+ createLike: () => $({ replyId: y == null ? void 0 : y.id }),
4166
+ deleteLike: () => B({ replyId: y == null ? void 0 : y.id })
4167
+ },
4168
+ comments: {
4169
+ openComments: () => {
4170
+ }
4171
+ }
4172
+ }
4173
+ },
4174
+ y == null ? void 0 : y.id
4175
+ );
4176
+ }))
4177
+ ] });
4178
+ }, Rs = ({
4179
+ queryClient: e,
4180
+ queryKey: t,
4181
+ mutationFn: n
4182
+ }) => ({ mutationFn: n, onMutate: async () => {
4183
+ var i;
4184
+ await e.cancelQueries({ queryKey: t });
4185
+ const a = e.getQueryData(t);
4186
+ 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, () => ({
4187
+ ...a
4188
+ })), { previousActivity: a };
4189
+ }, onError: (a, i, u) => {
4190
+ e.setQueryData(t, u.previousActivity);
4191
+ }, onSuccess: (a) => {
4192
+ const i = e.getQueryData(t);
4193
+ return i != null && i.latest_reactions.like ? i.latest_reactions.like.push(a) : i && (i.latest_reactions = { like: [a] }), e.setQueryData(t, () => ({
4194
+ ...i
4195
+ })), { previousActivity: i };
4196
+ }, onSettled: () => {
4197
+ e.invalidateQueries({ queryKey: t });
4198
+ } }), Fs = ({
4199
+ queryClient: e,
4200
+ queryKey: t,
4201
+ user: n,
4202
+ activity: s,
4203
+ mutationFn: o
4204
+ }) => ({ mutationFn: o, onMutate: async () => {
4205
+ var d;
4206
+ await e.cancelQueries({ queryKey: t });
4207
+ const u = e.getQueryData(t);
4208
+ 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, () => ({
4209
+ ...u
4210
+ })), { previousActivity: u };
4211
+ }, onError: (u, d, f) => {
4212
+ e.setQueryData(t, f.previousActivity);
4213
+ }, onSuccess: () => {
4214
+ var f, p, g;
4215
+ if (!s)
4216
+ return;
4217
+ const u = (g = (p = (f = s.latest_reactions) == null ? void 0 : f.like) == null ? void 0 : p.find(
4218
+ (h) => h.user_id === (n == null ? void 0 : n.id)
4219
+ )) == null ? void 0 : g.id, d = e.getQueryData(t);
4220
+ if (d != null && d.latest_reactions.like)
4221
+ return d.latest_reactions.like = d.latest_reactions.like.filter(
4222
+ (h) => h.id !== u
4223
+ ), e.setQueryData(t, () => ({
4224
+ ...d
4225
+ })), { previousActivity: d };
4226
+ }, onSettled: () => {
4227
+ e.invalidateQueries({ queryKey: t });
4228
+ } }), wo = ({
4229
+ basePath: e,
4230
+ parentId: t,
4231
+ activityId: n,
4232
+ isMember: s,
4233
+ functions: {
4234
+ get: o,
4235
+ likeActivity: l,
4236
+ unlikeActivity: m,
4237
+ createReply: a,
4238
+ likeReply: i,
4239
+ unlikeReply: u,
4240
+ join: d,
4241
+ leave: f
4242
+ }
4243
+ }) => {
4244
+ var b, M, Q, O, z, N, D, Y, X, re;
4245
+ const p = ge(_e), g = Ct(), {
4246
+ data: h,
4247
+ error: v,
4248
+ isLoading: j,
4249
+ isFetching: E
4250
+ } = an({
4251
+ queryKey: [e, t, n],
4252
+ queryFn: o
4253
+ }), _ = Rs({
4254
+ queryClient: g,
4255
+ queryKey: [e, t, n],
4256
+ mutationFn: l
4257
+ }), {
4258
+ mutate: $
4259
+ } = pe(_), B = Fs({
4260
+ queryClient: g,
4261
+ queryKey: [e, t, n],
4262
+ user: p,
4263
+ mutationFn: async () => {
4264
+ var se, ie, L;
4265
+ const K = (L = (ie = (se = h == null ? void 0 : h.latest_reactions) == null ? void 0 : se.like) == null ? void 0 : ie.find(
4266
+ (oe) => oe.user_id === (p == null ? void 0 : p.id)
4267
+ )) == null ? void 0 : L.id;
4268
+ await m({ activityId: n, reactionId: K });
4269
+ },
4270
+ activity: h
4271
+ }), {
4272
+ mutate: y
4273
+ } = pe(B), U = be(
4274
+ ({ activityId: K }) => $({ activityId: K }),
4275
+ [$]
4276
+ ), W = be(
4277
+ async ({ activityId: K }) => y({ activityId: K }),
4278
+ [y]
4279
+ );
4280
+ return v ? /* @__PURE__ */ r.jsx(Ze, { variant: "error", text: v.message }) : j || E ? /* @__PURE__ */ r.jsx(me, { style: { height: "400px" } }) : /* @__PURE__ */ r.jsx(
4281
+ Dt,
4282
+ {
4283
+ content: {
4284
+ type: "post",
4285
+ body: h == null ? void 0 : h.content,
4286
+ createdAt: (h == null ? void 0 : h.time) || "",
4287
+ slugs: { question: `${t}/${n}` },
4288
+ slug: n,
4289
+ author: {
4290
+ id: (b = h == null ? void 0 : h.actor) == null ? void 0 : b.id,
4291
+ name: (M = h == null ? void 0 : h.actor) == null ? void 0 : M.data.name,
4292
+ organization: (Q = h == null ? void 0 : h.actor) == null ? void 0 : Q.data.organization,
4293
+ jobTitle: (O = h == null ? void 0 : h.actor) == null ? void 0 : O.data.jobTitle,
4294
+ image: {
4295
+ thumbnail: ((z = h == null ? void 0 : h.actor) == null ? void 0 : z.data.thumbnail) || void 0
4296
+ }
4297
+ },
4298
+ userLiked: ((N = h == null ? void 0 : h.own_reactions) == null ? void 0 : N.like) && ((D = h == null ? void 0 : h.own_reactions) == null ? void 0 : D.like.length) > 0,
4299
+ likes: h && (h == null ? void 0 : h.reaction_counts.like),
4300
+ comments: h && (h == null ? void 0 : h.reaction_counts.reply)
4301
+ },
4302
+ originalAuthorId: (Y = h == null ? void 0 : h.actor) == null ? void 0 : Y.id,
4303
+ functions: {
4304
+ content: {
4305
+ createContent: () => console.log("create"),
4306
+ deleteContent: () => console.log("delete"),
4307
+ updateContent: () => console.log("update")
4308
+ },
4309
+ likes: {
4310
+ createLike: () => U({ activityId: n }),
4311
+ deleteLike: () => W({ activityId: n })
4312
+ },
4313
+ comments: {
4314
+ openComments: () => {
4315
+ }
4316
+ }
4317
+ },
4318
+ children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
4319
+ /* @__PURE__ */ r.jsxs("h3", { children: [
4320
+ "Comments (",
4321
+ ((X = h == null ? void 0 : h.reaction_counts) == null ? void 0 : X.reply) || 0,
4322
+ ")"
4323
+ ] }),
4324
+ /* @__PURE__ */ r.jsx(
4325
+ Ds,
4326
+ {
4327
+ basePath: e,
4328
+ parentId: t,
4329
+ activityId: n,
4330
+ repliesList: (re = h == null ? void 0 : h.latest_reactions) == null ? void 0 : re.reply,
4331
+ isMember: s,
4332
+ functions: {
4333
+ createReply: a,
4334
+ like: i,
4335
+ unlike: u,
4336
+ join: d,
4337
+ leave: f
4338
+ }
4339
+ }
4340
+ )
4341
+ ] })
4342
+ },
4343
+ n
4344
+ );
4345
+ }, ko = ({ id: e, data: { jobTitle: t, name: n, organization: s, thumbnail: o } }) => ({
4346
+ id: e,
4347
+ name: n,
4348
+ jobTitle: t,
4349
+ organization: s,
4350
+ image: { thumbnail: o }
4351
+ });
4
4352
  export {
5
- r as ASSETS_BUCKET,
6
- t as ActivitiesFeed,
7
- i as ActivitySection,
8
- n as AddPost,
9
- d as BannerSection,
10
- l as Breadcrumbs,
11
- u as Button,
12
- c as ButtonWrapper,
13
- S as CacheProvider,
14
- g as CollapsibleSection,
15
- m as Columns,
16
- B as CommunityDetails,
17
- p as Contributors,
18
- P as ConversationContext,
19
- x as CookieBanner,
20
- L as DiscussionConversation,
21
- h as DiscussionForm,
22
- v as DiscussionLikes,
23
- C as DiscussionPost,
24
- M as DiscussionThread,
25
- T as Divider,
26
- D as DownloadSection,
27
- F as EMAILS,
28
- H as EmailHelperTextBox,
29
- R as EmptyStateBox,
30
- E as Filters,
31
- b as FlagsProvider,
32
- A as Footer,
33
- k as FullWidthSection,
34
- y as GlobalProviders,
35
- U as Header,
36
- f as HelperTextBox,
37
- w as HiddenFromScreenReaders,
38
- W as HideShowTextBox,
39
- G as HighlightedTextBox,
40
- I as IntlProvider,
41
- O as JoinButton,
42
- _ as LanguageSwitcher,
43
- J as Link,
44
- K as LoadMore,
45
- N as LoadingBlock,
46
- V as LoadingPlaceholder,
47
- Q as LoadingState,
48
- X as Logo,
49
- Y as LogoSection,
50
- Z as MarkdownText,
51
- j as MarketingBox,
52
- q as Member,
53
- z as MembersList,
54
- $ as Modal,
55
- aa as MoreMenu,
56
- sa as NUMBER_OF_USERS,
57
- ea as Overlay,
58
- oa as PageLayout,
59
- ra as PasswordRules,
60
- ta as Pill,
61
- ia as ProfilePicture,
62
- na as ProgressBar,
63
- da as Rating,
64
- la as RepliesFeed,
65
- ua as ResponsesHeading,
66
- ca as ResponsiveImage,
67
- Sa as SearchForm,
68
- ga as Span,
69
- ma as StatusBanner,
70
- Ba as Tags,
71
- pa as Tooltip,
72
- Pa as UserContext,
73
- xa as UserProvider,
74
- La as VisuallyHidden,
75
- ha as addAriaProps,
76
- va as getMember,
77
- Ca as headerData,
78
- Ma as mapGetStreamData,
79
- Ta as useCurrentPath,
80
- Da as useEffectAfterMount,
81
- Fa as useScreenWidth,
82
- Ha as useScrollListener,
83
- Ra as useScrollToHash
4353
+ jt as ASSETS_BUCKET,
4354
+ yo as ActivitiesFeed,
4355
+ wo as ActivitySection,
4356
+ Mn as AddPost,
4357
+ eo as BannerSection,
4358
+ io as Breadcrumbs,
4359
+ q as Button,
4360
+ qe as ButtonWrapper,
4361
+ rs as CacheProvider,
4362
+ gn as CollapsibleSection,
4363
+ uo as Columns,
4364
+ ao as CommunityDetails,
4365
+ ns as Contributors,
4366
+ Cn as ConversationContext,
4367
+ fs as CookieBanner,
4368
+ xo as DiscussionConversation,
4369
+ Tn as DiscussionForm,
4370
+ ks as DiscussionLikes,
4371
+ Dt as DiscussionPost,
4372
+ vo as DiscussionThread,
4373
+ kt as Divider,
4374
+ Zs as DownloadSection,
4375
+ Me as EMAILS,
4376
+ mo as EmailHelperTextBox,
4377
+ Ze as EmptyStateBox,
4378
+ lo as Filters,
4379
+ as as FlagsProvider,
4380
+ kn as Footer,
4381
+ hn as FullWidthSection,
4382
+ oo as GlobalProviders,
4383
+ $n as Header,
4384
+ Ir as HelperTextBox,
4385
+ un as HiddenFromScreenReaders,
4386
+ ro as HideShowTextBox,
4387
+ he as HighlightedTextBox,
4388
+ is as IntlProvider,
4389
+ yn as JoinButton,
4390
+ co as LanguageSwitcher,
4391
+ Xe as Link,
4392
+ us as LoadMore,
4393
+ so as LoadingBlock,
4394
+ me as LoadingPlaceholder,
4395
+ Kr as LoadingState,
4396
+ wn as Logo,
4397
+ Ks as LogoSection,
4398
+ en as MarkdownText,
4399
+ to as MarketingBox,
4400
+ Nt as Member,
4401
+ _o as MembersList,
4402
+ js as Modal,
4403
+ ds as MoreMenu,
4404
+ no as NUMBER_OF_USERS,
4405
+ Es as Overlay,
4406
+ ho as PageLayout,
4407
+ fo as PasswordRules,
4408
+ Jr as Pill,
4409
+ At as ProfilePicture,
4410
+ Xr as ProgressBar,
4411
+ po as Rating,
4412
+ Ds as RepliesFeed,
4413
+ bo as ResponsesHeading,
4414
+ Fr as ResponsiveImage,
4415
+ gs as SearchForm,
4416
+ Gr as Span,
4417
+ St as StatusBanner,
4418
+ go as Tags,
4419
+ Or as Tooltip,
4420
+ _e as UserContext,
4421
+ ls as UserProvider,
4422
+ ee as VisuallyHidden,
4423
+ Ss as addAriaProps,
4424
+ vn as getMember,
4425
+ ze as headerData,
4426
+ ko as mapGetStreamData,
4427
+ yr as useCurrentPath,
4428
+ ke as useEffectAfterMount,
4429
+ Je as useScreenWidth,
4430
+ kr as useScrollListener,
4431
+ Xs as useScrollToHash
84
4432
  };