@apolitical/component-library 1.13.4-beta.0 → 1.13.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +12 -12
- package/index.mjs +688 -681
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import A, { memo as Ae, useState as F, useEffect as
|
|
1
|
+
import A, { memo as Ae, useState as F, useEffect as X, useRef as ne, useMemo as et, Children as Mt, createContext as Ft, useContext as ge, Fragment as Ct, useCallback as ke, useReducer as rs, Suspense as os } from "react";
|
|
2
2
|
import as from "lodash.clonedeep";
|
|
3
3
|
import is from "lodash.set";
|
|
4
|
-
import { useIntl as N, IntlProvider as ls, createIntl as cs, FormattedMessage as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { QueryClient as ds, QueryClientProvider as us, useQueryClient as
|
|
4
|
+
import { useIntl as N, IntlProvider as ls, createIntl as cs, FormattedMessage as ye } from "react-intl";
|
|
5
|
+
import tt from "truncate";
|
|
6
|
+
import nt from "markdown-to-jsx";
|
|
7
|
+
import { QueryClient as ds, QueryClientProvider as us, useQueryClient as st, useQuery as fn, useMutation as de } from "@tanstack/react-query";
|
|
8
8
|
import { ReactQueryDevtools as ms } from "@tanstack/react-query-devtools";
|
|
9
|
-
import
|
|
9
|
+
import Xe from "posthog-js";
|
|
10
10
|
import { useCookies as fs, CookiesProvider as hs } from "react-cookie";
|
|
11
11
|
import { ReactMultiEmail as ps } from "react-multi-email";
|
|
12
|
-
import
|
|
12
|
+
import hn from "lodash.get";
|
|
13
13
|
import { ErrorBoundary as gs } from "react-error-boundary";
|
|
14
14
|
import _s from "react-textarea-autosize";
|
|
15
15
|
import xs from "lodash.isequal";
|
|
16
16
|
function bs(e) {
|
|
17
17
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
18
18
|
}
|
|
19
|
-
var
|
|
19
|
+
var pn = { exports: {} };
|
|
20
20
|
/*!
|
|
21
21
|
Copyright (c) 2018 Jed Watson.
|
|
22
22
|
Licensed under the MIT License (MIT), see
|
|
@@ -51,10 +51,10 @@ var hn = { exports: {} };
|
|
|
51
51
|
}
|
|
52
52
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
53
53
|
})();
|
|
54
|
-
})(
|
|
55
|
-
var vs =
|
|
56
|
-
const E = /* @__PURE__ */ bs(vs), ws = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => A.createElement(e, { ...r, className: E("hidden", { "show-on-focus": t }), children: n }), le = Ae(ws), ks = ({ element: e = "span", children: t = null, ...n }) => A.createElement(e, { ...n, "aria-hidden": !0 }, t),
|
|
57
|
-
var
|
|
54
|
+
})(pn);
|
|
55
|
+
var vs = pn.exports;
|
|
56
|
+
const E = /* @__PURE__ */ bs(vs), ws = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => A.createElement(e, { ...r, className: E("hidden", { "show-on-focus": t }), children: n }), le = Ae(ws), ks = ({ element: e = "span", children: t = null, ...n }) => A.createElement(e, { ...n, "aria-hidden": !0 }, t), gn = Ae(ks);
|
|
57
|
+
var Dt = { exports: {} }, Re = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
60
60
|
* react-jsx-runtime.production.min.js
|
|
@@ -64,11 +64,11 @@ var Mt = { exports: {} }, Pe = {};
|
|
|
64
64
|
* This source code is licensed under the MIT license found in the
|
|
65
65
|
* LICENSE file in the root directory of this source tree.
|
|
66
66
|
*/
|
|
67
|
-
var
|
|
67
|
+
var tn;
|
|
68
68
|
function js() {
|
|
69
|
-
if (
|
|
70
|
-
return
|
|
71
|
-
|
|
69
|
+
if (tn)
|
|
70
|
+
return Re;
|
|
71
|
+
tn = 1;
|
|
72
72
|
var e = A, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
73
|
function d(o, i, c) {
|
|
74
74
|
var u, f = {}, h = null, p = null;
|
|
@@ -80,9 +80,9 @@ function js() {
|
|
|
80
80
|
f[u] === void 0 && (f[u] = i[u]);
|
|
81
81
|
return { $$typeof: t, type: o, key: h, ref: p, props: f, _owner: a.current };
|
|
82
82
|
}
|
|
83
|
-
return
|
|
83
|
+
return Re.Fragment = n, Re.jsx = d, Re.jsxs = d, Re;
|
|
84
84
|
}
|
|
85
|
-
var
|
|
85
|
+
var Fe = {};
|
|
86
86
|
/**
|
|
87
87
|
* @license React
|
|
88
88
|
* react-jsx-runtime.development.js
|
|
@@ -92,48 +92,48 @@ var Re = {};
|
|
|
92
92
|
* This source code is licensed under the MIT license found in the
|
|
93
93
|
* LICENSE file in the root directory of this source tree.
|
|
94
94
|
*/
|
|
95
|
-
var
|
|
95
|
+
var nn;
|
|
96
96
|
function ys() {
|
|
97
|
-
return
|
|
97
|
+
return nn || (nn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
98
|
var e = A, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), o = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), _ = Symbol.iterator, j = "@@iterator";
|
|
99
99
|
function g(m) {
|
|
100
100
|
if (m === null || typeof m != "object")
|
|
101
101
|
return null;
|
|
102
|
-
var
|
|
103
|
-
return typeof
|
|
102
|
+
var v = _ && m[_] || m[j];
|
|
103
|
+
return typeof v == "function" ? v : null;
|
|
104
104
|
}
|
|
105
105
|
var S = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
106
106
|
function k(m) {
|
|
107
107
|
{
|
|
108
|
-
for (var
|
|
108
|
+
for (var v = arguments.length, y = new Array(v > 1 ? v - 1 : 0), $ = 1; $ < v; $++)
|
|
109
109
|
y[$ - 1] = arguments[$];
|
|
110
110
|
T("error", m, y);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function T(m,
|
|
113
|
+
function T(m, v, y) {
|
|
114
114
|
{
|
|
115
115
|
var $ = S.ReactDebugCurrentFrame, B = $.getStackAddendum();
|
|
116
|
-
B !== "" && (
|
|
116
|
+
B !== "" && (v += "%s", y = y.concat([B]));
|
|
117
117
|
var z = y.map(function(R) {
|
|
118
118
|
return String(R);
|
|
119
119
|
});
|
|
120
|
-
z.unshift("Warning: " +
|
|
120
|
+
z.unshift("Warning: " + v), Function.prototype.apply.call(console[m], console, z);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var M = !1, C = !1, I = !1, V = !1, x = !1,
|
|
124
|
-
|
|
123
|
+
var M = !1, C = !1, I = !1, V = !1, x = !1, b;
|
|
124
|
+
b = Symbol.for("react.module.reference");
|
|
125
125
|
function Q(m) {
|
|
126
126
|
return !!(typeof m == "string" || typeof m == "function" || m === r || m === l || x || m === a || m === c || m === u || V || m === p || M || C || I || typeof m == "object" && m !== null && (m.$$typeof === h || m.$$typeof === f || m.$$typeof === d || m.$$typeof === o || m.$$typeof === i || // This needs to include all possible module reference object
|
|
127
127
|
// types supported by any Flight configuration anywhere since
|
|
128
128
|
// we don't know which Flight build this will end up being used
|
|
129
129
|
// with.
|
|
130
|
-
m.$$typeof ===
|
|
130
|
+
m.$$typeof === b || m.getModuleId !== void 0));
|
|
131
131
|
}
|
|
132
|
-
function w(m,
|
|
132
|
+
function w(m, v, y) {
|
|
133
133
|
var $ = m.displayName;
|
|
134
134
|
if ($)
|
|
135
135
|
return $;
|
|
136
|
-
var B =
|
|
136
|
+
var B = v.displayName || v.name || "";
|
|
137
137
|
return B !== "" ? y + "(" + B + ")" : y;
|
|
138
138
|
}
|
|
139
139
|
function Y(m) {
|
|
@@ -163,8 +163,8 @@ function ys() {
|
|
|
163
163
|
if (typeof m == "object")
|
|
164
164
|
switch (m.$$typeof) {
|
|
165
165
|
case o:
|
|
166
|
-
var
|
|
167
|
-
return Y(
|
|
166
|
+
var v = m;
|
|
167
|
+
return Y(v) + ".Consumer";
|
|
168
168
|
case d:
|
|
169
169
|
var y = m;
|
|
170
170
|
return Y(y._context) + ".Provider";
|
|
@@ -184,14 +184,14 @@ function ys() {
|
|
|
184
184
|
}
|
|
185
185
|
return null;
|
|
186
186
|
}
|
|
187
|
-
var O = Object.assign, U = 0, W, Z,
|
|
187
|
+
var O = Object.assign, U = 0, W, Z, re, oe, ae, ie, se;
|
|
188
188
|
function P() {
|
|
189
189
|
}
|
|
190
190
|
P.__reactDisabledLog = !0;
|
|
191
|
-
function
|
|
191
|
+
function te() {
|
|
192
192
|
{
|
|
193
193
|
if (U === 0) {
|
|
194
|
-
W = console.log, Z = console.info,
|
|
194
|
+
W = console.log, Z = console.info, re = console.warn, oe = console.error, ae = console.group, ie = console.groupCollapsed, se = console.groupEnd;
|
|
195
195
|
var m = {
|
|
196
196
|
configurable: !0,
|
|
197
197
|
enumerable: !0,
|
|
@@ -211,7 +211,7 @@ function ys() {
|
|
|
211
211
|
U++;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function G() {
|
|
215
215
|
{
|
|
216
216
|
if (U--, U === 0) {
|
|
217
217
|
var m = {
|
|
@@ -227,60 +227,60 @@ function ys() {
|
|
|
227
227
|
value: Z
|
|
228
228
|
}),
|
|
229
229
|
warn: O({}, m, {
|
|
230
|
-
value:
|
|
230
|
+
value: re
|
|
231
231
|
}),
|
|
232
232
|
error: O({}, m, {
|
|
233
|
-
value:
|
|
233
|
+
value: oe
|
|
234
234
|
}),
|
|
235
235
|
group: O({}, m, {
|
|
236
|
-
value:
|
|
236
|
+
value: ae
|
|
237
237
|
}),
|
|
238
238
|
groupCollapsed: O({}, m, {
|
|
239
|
-
value:
|
|
239
|
+
value: ie
|
|
240
240
|
}),
|
|
241
241
|
groupEnd: O({}, m, {
|
|
242
|
-
value:
|
|
242
|
+
value: se
|
|
243
243
|
})
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
U < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
var
|
|
250
|
-
function
|
|
249
|
+
var K = S.ReactCurrentDispatcher, ue;
|
|
250
|
+
function fe(m, v, y) {
|
|
251
251
|
{
|
|
252
|
-
if (
|
|
252
|
+
if (ue === void 0)
|
|
253
253
|
try {
|
|
254
254
|
throw Error();
|
|
255
255
|
} catch (B) {
|
|
256
256
|
var $ = B.stack.trim().match(/\n( *(at )?)/);
|
|
257
|
-
|
|
257
|
+
ue = $ && $[1] || "";
|
|
258
258
|
}
|
|
259
259
|
return `
|
|
260
|
-
` +
|
|
260
|
+
` + ue + m;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
var
|
|
263
|
+
var _e = !1, xe;
|
|
264
264
|
{
|
|
265
|
-
var
|
|
266
|
-
|
|
265
|
+
var Ie = typeof WeakMap == "function" ? WeakMap : Map;
|
|
266
|
+
xe = new Ie();
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
if (!m ||
|
|
268
|
+
function Ne(m, v) {
|
|
269
|
+
if (!m || _e)
|
|
270
270
|
return "";
|
|
271
271
|
{
|
|
272
|
-
var y =
|
|
272
|
+
var y = xe.get(m);
|
|
273
273
|
if (y !== void 0)
|
|
274
274
|
return y;
|
|
275
275
|
}
|
|
276
276
|
var $;
|
|
277
|
-
|
|
277
|
+
_e = !0;
|
|
278
278
|
var B = Error.prepareStackTrace;
|
|
279
279
|
Error.prepareStackTrace = void 0;
|
|
280
280
|
var z;
|
|
281
|
-
z =
|
|
281
|
+
z = K.current, K.current = null, te();
|
|
282
282
|
try {
|
|
283
|
-
if (
|
|
283
|
+
if (v) {
|
|
284
284
|
var R = function() {
|
|
285
285
|
throw Error();
|
|
286
286
|
};
|
|
@@ -291,98 +291,98 @@ function ys() {
|
|
|
291
291
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
292
292
|
try {
|
|
293
293
|
Reflect.construct(R, []);
|
|
294
|
-
} catch (
|
|
295
|
-
$ =
|
|
294
|
+
} catch (be) {
|
|
295
|
+
$ = be;
|
|
296
296
|
}
|
|
297
297
|
Reflect.construct(m, [], R);
|
|
298
298
|
} else {
|
|
299
299
|
try {
|
|
300
300
|
R.call();
|
|
301
|
-
} catch (
|
|
302
|
-
$ =
|
|
301
|
+
} catch (be) {
|
|
302
|
+
$ = be;
|
|
303
303
|
}
|
|
304
304
|
m.call(R.prototype);
|
|
305
305
|
}
|
|
306
306
|
} else {
|
|
307
307
|
try {
|
|
308
308
|
throw Error();
|
|
309
|
-
} catch (
|
|
310
|
-
$ =
|
|
309
|
+
} catch (be) {
|
|
310
|
+
$ = be;
|
|
311
311
|
}
|
|
312
312
|
m();
|
|
313
313
|
}
|
|
314
|
-
} catch (
|
|
315
|
-
if (
|
|
316
|
-
for (var D =
|
|
314
|
+
} catch (be) {
|
|
315
|
+
if (be && $ && typeof be.stack == "string") {
|
|
316
|
+
for (var D = be.stack.split(`
|
|
317
317
|
`), ce = $.stack.split(`
|
|
318
|
-
`),
|
|
319
|
-
|
|
320
|
-
for (;
|
|
321
|
-
if (D[
|
|
322
|
-
if (
|
|
318
|
+
`), q = D.length - 1, ee = ce.length - 1; q >= 1 && ee >= 0 && D[q] !== ce[ee]; )
|
|
319
|
+
ee--;
|
|
320
|
+
for (; q >= 1 && ee >= 0; q--, ee--)
|
|
321
|
+
if (D[q] !== ce[ee]) {
|
|
322
|
+
if (q !== 1 || ee !== 1)
|
|
323
323
|
do
|
|
324
|
-
if (
|
|
325
|
-
var
|
|
326
|
-
` + D[
|
|
327
|
-
return m.displayName &&
|
|
324
|
+
if (q--, ee--, ee < 0 || D[q] !== ce[ee]) {
|
|
325
|
+
var he = `
|
|
326
|
+
` + D[q].replace(" at new ", " at ");
|
|
327
|
+
return m.displayName && he.includes("<anonymous>") && (he = he.replace("<anonymous>", m.displayName)), typeof m == "function" && xe.set(m, he), he;
|
|
328
328
|
}
|
|
329
|
-
while (
|
|
329
|
+
while (q >= 1 && ee >= 0);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
} finally {
|
|
334
|
-
|
|
334
|
+
_e = !1, K.current = z, G(), Error.prepareStackTrace = B;
|
|
335
335
|
}
|
|
336
|
-
var $e = m ? m.displayName || m.name : "",
|
|
337
|
-
return typeof m == "function" &&
|
|
336
|
+
var $e = m ? m.displayName || m.name : "", en = $e ? fe($e) : "";
|
|
337
|
+
return typeof m == "function" && xe.set(m, en), en;
|
|
338
338
|
}
|
|
339
|
-
function Fn(m,
|
|
340
|
-
return
|
|
339
|
+
function Fn(m, v, y) {
|
|
340
|
+
return Ne(m, !1);
|
|
341
341
|
}
|
|
342
342
|
function Ln(m) {
|
|
343
|
-
var
|
|
344
|
-
return !!(
|
|
343
|
+
var v = m.prototype;
|
|
344
|
+
return !!(v && v.isReactComponent);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function He(m, v, y) {
|
|
347
347
|
if (m == null)
|
|
348
348
|
return "";
|
|
349
349
|
if (typeof m == "function")
|
|
350
|
-
return
|
|
350
|
+
return Ne(m, Ln(m));
|
|
351
351
|
if (typeof m == "string")
|
|
352
|
-
return
|
|
352
|
+
return fe(m);
|
|
353
353
|
switch (m) {
|
|
354
354
|
case c:
|
|
355
|
-
return
|
|
355
|
+
return fe("Suspense");
|
|
356
356
|
case u:
|
|
357
|
-
return
|
|
357
|
+
return fe("SuspenseList");
|
|
358
358
|
}
|
|
359
359
|
if (typeof m == "object")
|
|
360
360
|
switch (m.$$typeof) {
|
|
361
361
|
case i:
|
|
362
362
|
return Fn(m.render);
|
|
363
363
|
case f:
|
|
364
|
-
return
|
|
364
|
+
return He(m.type, v, y);
|
|
365
365
|
case h: {
|
|
366
366
|
var $ = m, B = $._payload, z = $._init;
|
|
367
367
|
try {
|
|
368
|
-
return
|
|
368
|
+
return He(z(B), v, y);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
return "";
|
|
374
374
|
}
|
|
375
|
-
var
|
|
376
|
-
function
|
|
375
|
+
var Qe = Object.prototype.hasOwnProperty, Qt = {}, Ut = S.ReactDebugCurrentFrame;
|
|
376
|
+
function Ue(m) {
|
|
377
377
|
if (m) {
|
|
378
|
-
var
|
|
379
|
-
|
|
378
|
+
var v = m._owner, y = He(m.type, m._source, v ? v.type : null);
|
|
379
|
+
Ut.setExtraStackFrame(y);
|
|
380
380
|
} else
|
|
381
|
-
|
|
381
|
+
Ut.setExtraStackFrame(null);
|
|
382
382
|
}
|
|
383
|
-
function On(m,
|
|
383
|
+
function On(m, v, y, $, B) {
|
|
384
384
|
{
|
|
385
|
-
var z = Function.call.bind(
|
|
385
|
+
var z = Function.call.bind(Qe);
|
|
386
386
|
for (var R in m)
|
|
387
387
|
if (z(m, R)) {
|
|
388
388
|
var D = void 0;
|
|
@@ -391,71 +391,71 @@ function ys() {
|
|
|
391
391
|
var ce = Error(($ || "React class") + ": " + y + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof m[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
392
392
|
throw ce.name = "Invariant Violation", ce;
|
|
393
393
|
}
|
|
394
|
-
D = m[R](
|
|
395
|
-
} catch (
|
|
396
|
-
D =
|
|
394
|
+
D = m[R](v, R, $, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
|
+
} catch (q) {
|
|
396
|
+
D = q;
|
|
397
397
|
}
|
|
398
|
-
D && !(D instanceof Error) && (
|
|
398
|
+
D && !(D instanceof Error) && (Ue(B), k("%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).", $ || "React class", y, R, typeof D), Ue(null)), D instanceof Error && !(D.message in Qt) && (Qt[D.message] = !0, Ue(B), k("Failed %s type: %s", y, D.message), Ue(null));
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
var Bn = Array.isArray;
|
|
403
|
-
function
|
|
403
|
+
function dt(m) {
|
|
404
404
|
return Bn(m);
|
|
405
405
|
}
|
|
406
406
|
function In(m) {
|
|
407
407
|
{
|
|
408
|
-
var
|
|
408
|
+
var v = typeof Symbol == "function" && Symbol.toStringTag, y = v && m[Symbol.toStringTag] || m.constructor.name || "Object";
|
|
409
409
|
return y;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
function Hn(m) {
|
|
413
413
|
try {
|
|
414
|
-
return
|
|
414
|
+
return zt(m), !1;
|
|
415
415
|
} catch {
|
|
416
416
|
return !0;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function zt(m) {
|
|
420
420
|
return "" + m;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Wt(m) {
|
|
423
423
|
if (Hn(m))
|
|
424
|
-
return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", In(m)),
|
|
424
|
+
return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", In(m)), zt(m);
|
|
425
425
|
}
|
|
426
|
-
var
|
|
426
|
+
var Pe = S.ReactCurrentOwner, Qn = {
|
|
427
427
|
key: !0,
|
|
428
428
|
ref: !0,
|
|
429
429
|
__self: !0,
|
|
430
430
|
__source: !0
|
|
431
|
-
},
|
|
432
|
-
|
|
431
|
+
}, Vt, Yt, ut;
|
|
432
|
+
ut = {};
|
|
433
433
|
function Un(m) {
|
|
434
|
-
if (
|
|
435
|
-
var
|
|
436
|
-
if (
|
|
434
|
+
if (Qe.call(m, "ref")) {
|
|
435
|
+
var v = Object.getOwnPropertyDescriptor(m, "ref").get;
|
|
436
|
+
if (v && v.isReactWarning)
|
|
437
437
|
return !1;
|
|
438
438
|
}
|
|
439
439
|
return m.ref !== void 0;
|
|
440
440
|
}
|
|
441
441
|
function zn(m) {
|
|
442
|
-
if (
|
|
443
|
-
var
|
|
444
|
-
if (
|
|
442
|
+
if (Qe.call(m, "key")) {
|
|
443
|
+
var v = Object.getOwnPropertyDescriptor(m, "key").get;
|
|
444
|
+
if (v && v.isReactWarning)
|
|
445
445
|
return !1;
|
|
446
446
|
}
|
|
447
447
|
return m.key !== void 0;
|
|
448
448
|
}
|
|
449
|
-
function Wn(m,
|
|
450
|
-
if (typeof m.ref == "string" &&
|
|
451
|
-
var y = L(
|
|
452
|
-
|
|
449
|
+
function Wn(m, v) {
|
|
450
|
+
if (typeof m.ref == "string" && Pe.current && v && Pe.current.stateNode !== v) {
|
|
451
|
+
var y = L(Pe.current.type);
|
|
452
|
+
ut[y] || (k('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', L(Pe.current.type), m.ref), ut[y] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
function Vn(m,
|
|
455
|
+
function Vn(m, v) {
|
|
456
456
|
{
|
|
457
457
|
var y = function() {
|
|
458
|
-
|
|
458
|
+
Vt || (Vt = !0, k("%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)", v));
|
|
459
459
|
};
|
|
460
460
|
y.isReactWarning = !0, Object.defineProperty(m, "key", {
|
|
461
461
|
get: y,
|
|
@@ -463,10 +463,10 @@ function ys() {
|
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
function Yn(m,
|
|
466
|
+
function Yn(m, v) {
|
|
467
467
|
{
|
|
468
468
|
var y = function() {
|
|
469
|
-
|
|
469
|
+
Yt || (Yt = !0, k("%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)", v));
|
|
470
470
|
};
|
|
471
471
|
y.isReactWarning = !0, Object.defineProperty(m, "ref", {
|
|
472
472
|
get: y,
|
|
@@ -474,13 +474,13 @@ function ys() {
|
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var Gn = function(m,
|
|
477
|
+
var Gn = function(m, v, y, $, B, z, R) {
|
|
478
478
|
var D = {
|
|
479
479
|
// This tag allows us to uniquely identify this as a React Element
|
|
480
480
|
$$typeof: t,
|
|
481
481
|
// Built-in properties that belong on the element
|
|
482
482
|
type: m,
|
|
483
|
-
key:
|
|
483
|
+
key: v,
|
|
484
484
|
ref: y,
|
|
485
485
|
props: R,
|
|
486
486
|
// Record the component responsible for creating this element.
|
|
@@ -503,41 +503,41 @@ function ys() {
|
|
|
503
503
|
value: B
|
|
504
504
|
}), Object.freeze && (Object.freeze(D.props), Object.freeze(D)), D;
|
|
505
505
|
};
|
|
506
|
-
function Jn(m,
|
|
506
|
+
function Jn(m, v, y, $, B) {
|
|
507
507
|
{
|
|
508
508
|
var z, R = {}, D = null, ce = null;
|
|
509
|
-
y !== void 0 && (
|
|
510
|
-
for (z in
|
|
511
|
-
|
|
509
|
+
y !== void 0 && (Wt(y), D = "" + y), zn(v) && (Wt(v.key), D = "" + v.key), Un(v) && (ce = v.ref, Wn(v, B));
|
|
510
|
+
for (z in v)
|
|
511
|
+
Qe.call(v, z) && !Qn.hasOwnProperty(z) && (R[z] = v[z]);
|
|
512
512
|
if (m && m.defaultProps) {
|
|
513
|
-
var
|
|
514
|
-
for (z in
|
|
515
|
-
R[z] === void 0 && (R[z] =
|
|
513
|
+
var q = m.defaultProps;
|
|
514
|
+
for (z in q)
|
|
515
|
+
R[z] === void 0 && (R[z] = q[z]);
|
|
516
516
|
}
|
|
517
517
|
if (D || ce) {
|
|
518
|
-
var
|
|
519
|
-
D && Vn(R,
|
|
518
|
+
var ee = typeof m == "function" ? m.displayName || m.name || "Unknown" : m;
|
|
519
|
+
D && Vn(R, ee), ce && Yn(R, ee);
|
|
520
520
|
}
|
|
521
|
-
return Gn(m, D, ce, B, $,
|
|
521
|
+
return Gn(m, D, ce, B, $, Pe.current, R);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
var
|
|
524
|
+
var mt = S.ReactCurrentOwner, Gt = S.ReactDebugCurrentFrame;
|
|
525
525
|
function Te(m) {
|
|
526
526
|
if (m) {
|
|
527
|
-
var
|
|
528
|
-
|
|
527
|
+
var v = m._owner, y = He(m.type, m._source, v ? v.type : null);
|
|
528
|
+
Gt.setExtraStackFrame(y);
|
|
529
529
|
} else
|
|
530
|
-
|
|
530
|
+
Gt.setExtraStackFrame(null);
|
|
531
531
|
}
|
|
532
|
-
var
|
|
533
|
-
|
|
534
|
-
function
|
|
532
|
+
var ft;
|
|
533
|
+
ft = !1;
|
|
534
|
+
function ht(m) {
|
|
535
535
|
return typeof m == "object" && m !== null && m.$$typeof === t;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function Jt() {
|
|
538
538
|
{
|
|
539
|
-
if (
|
|
540
|
-
var m = L(
|
|
539
|
+
if (mt.current) {
|
|
540
|
+
var m = L(mt.current.type);
|
|
541
541
|
if (m)
|
|
542
542
|
return `
|
|
543
543
|
|
|
@@ -549,88 +549,88 @@ Check the render method of \`` + m + "`.";
|
|
|
549
549
|
function Xn(m) {
|
|
550
550
|
{
|
|
551
551
|
if (m !== void 0) {
|
|
552
|
-
var
|
|
552
|
+
var v = m.fileName.replace(/^.*[\\\/]/, ""), y = m.lineNumber;
|
|
553
553
|
return `
|
|
554
554
|
|
|
555
|
-
Check your code at ` +
|
|
555
|
+
Check your code at ` + v + ":" + y + ".";
|
|
556
556
|
}
|
|
557
557
|
return "";
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
var
|
|
560
|
+
var Xt = {};
|
|
561
561
|
function Zn(m) {
|
|
562
562
|
{
|
|
563
|
-
var
|
|
564
|
-
if (!
|
|
563
|
+
var v = Jt();
|
|
564
|
+
if (!v) {
|
|
565
565
|
var y = typeof m == "string" ? m : m.displayName || m.name;
|
|
566
|
-
y && (
|
|
566
|
+
y && (v = `
|
|
567
567
|
|
|
568
568
|
Check the top-level render call using <` + y + ">.");
|
|
569
569
|
}
|
|
570
|
-
return
|
|
570
|
+
return v;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Zt(m, v) {
|
|
574
574
|
{
|
|
575
575
|
if (!m._store || m._store.validated || m.key != null)
|
|
576
576
|
return;
|
|
577
577
|
m._store.validated = !0;
|
|
578
|
-
var y = Zn(
|
|
579
|
-
if (
|
|
578
|
+
var y = Zn(v);
|
|
579
|
+
if (Xt[y])
|
|
580
580
|
return;
|
|
581
|
-
|
|
581
|
+
Xt[y] = !0;
|
|
582
582
|
var $ = "";
|
|
583
|
-
m && m._owner && m._owner !==
|
|
583
|
+
m && m._owner && m._owner !== mt.current && ($ = " It was passed a child from " + L(m._owner.type) + "."), Te(m), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, $), Te(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function Kt(m, v) {
|
|
587
587
|
{
|
|
588
588
|
if (typeof m != "object")
|
|
589
589
|
return;
|
|
590
|
-
if (
|
|
590
|
+
if (dt(m))
|
|
591
591
|
for (var y = 0; y < m.length; y++) {
|
|
592
592
|
var $ = m[y];
|
|
593
|
-
|
|
593
|
+
ht($) && Zt($, v);
|
|
594
594
|
}
|
|
595
|
-
else if (
|
|
595
|
+
else if (ht(m))
|
|
596
596
|
m._store && (m._store.validated = !0);
|
|
597
597
|
else if (m) {
|
|
598
598
|
var B = g(m);
|
|
599
599
|
if (typeof B == "function" && B !== m.entries)
|
|
600
600
|
for (var z = B.call(m), R; !(R = z.next()).done; )
|
|
601
|
-
|
|
601
|
+
ht(R.value) && Zt(R.value, v);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
function Kn(m) {
|
|
606
606
|
{
|
|
607
|
-
var
|
|
608
|
-
if (
|
|
607
|
+
var v = m.type;
|
|
608
|
+
if (v == null || typeof v == "string")
|
|
609
609
|
return;
|
|
610
610
|
var y;
|
|
611
|
-
if (typeof
|
|
612
|
-
y =
|
|
613
|
-
else if (typeof
|
|
611
|
+
if (typeof v == "function")
|
|
612
|
+
y = v.propTypes;
|
|
613
|
+
else if (typeof v == "object" && (v.$$typeof === i || // Note: Memo only checks outer props here.
|
|
614
614
|
// Inner props are checked in the reconciler.
|
|
615
|
-
|
|
616
|
-
y =
|
|
615
|
+
v.$$typeof === f))
|
|
616
|
+
y = v.propTypes;
|
|
617
617
|
else
|
|
618
618
|
return;
|
|
619
619
|
if (y) {
|
|
620
|
-
var $ = L(
|
|
620
|
+
var $ = L(v);
|
|
621
621
|
On(y, m.props, "prop", $, m);
|
|
622
|
-
} else if (
|
|
623
|
-
|
|
624
|
-
var B = L(
|
|
622
|
+
} else if (v.PropTypes !== void 0 && !ft) {
|
|
623
|
+
ft = !0;
|
|
624
|
+
var B = L(v);
|
|
625
625
|
k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", B || "Unknown");
|
|
626
626
|
}
|
|
627
|
-
typeof
|
|
627
|
+
typeof v.getDefaultProps == "function" && !v.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
function qn(m) {
|
|
631
631
|
{
|
|
632
|
-
for (var
|
|
633
|
-
var $ =
|
|
632
|
+
for (var v = Object.keys(m.props), y = 0; y < v.length; y++) {
|
|
633
|
+
var $ = v[y];
|
|
634
634
|
if ($ !== "children" && $ !== "key") {
|
|
635
635
|
Te(m), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), Te(null);
|
|
636
636
|
break;
|
|
@@ -639,65 +639,65 @@ Check the top-level render call using <` + y + ">.");
|
|
|
639
639
|
m.ref !== null && (Te(m), k("Invalid attribute `ref` supplied to `React.Fragment`."), Te(null));
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function qt(m, v, y, $, B, z) {
|
|
643
643
|
{
|
|
644
644
|
var R = Q(m);
|
|
645
645
|
if (!R) {
|
|
646
646
|
var D = "";
|
|
647
647
|
(m === void 0 || typeof m == "object" && m !== null && Object.keys(m).length === 0) && (D += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
648
648
|
var ce = Xn(B);
|
|
649
|
-
ce ? D += ce : D +=
|
|
650
|
-
var
|
|
651
|
-
m === null ?
|
|
649
|
+
ce ? D += ce : D += Jt();
|
|
650
|
+
var q;
|
|
651
|
+
m === null ? q = "null" : dt(m) ? q = "array" : m !== void 0 && m.$$typeof === t ? (q = "<" + (L(m.type) || "Unknown") + " />", D = " Did you accidentally export a JSX literal instead of a component?") : q = typeof m, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", q, D);
|
|
652
652
|
}
|
|
653
|
-
var
|
|
654
|
-
if (
|
|
655
|
-
return
|
|
653
|
+
var ee = Jn(m, v, y, B, z);
|
|
654
|
+
if (ee == null)
|
|
655
|
+
return ee;
|
|
656
656
|
if (R) {
|
|
657
|
-
var
|
|
658
|
-
if (
|
|
657
|
+
var he = v.children;
|
|
658
|
+
if (he !== void 0)
|
|
659
659
|
if ($)
|
|
660
|
-
if (
|
|
661
|
-
for (var $e = 0; $e <
|
|
662
|
-
|
|
663
|
-
Object.freeze && Object.freeze(
|
|
660
|
+
if (dt(he)) {
|
|
661
|
+
for (var $e = 0; $e < he.length; $e++)
|
|
662
|
+
Kt(he[$e], m);
|
|
663
|
+
Object.freeze && Object.freeze(he);
|
|
664
664
|
} else
|
|
665
665
|
k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
666
666
|
else
|
|
667
|
-
|
|
667
|
+
Kt(he, m);
|
|
668
668
|
}
|
|
669
|
-
return m === r ? qn(
|
|
669
|
+
return m === r ? qn(ee) : Kn(ee), ee;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
function es(m,
|
|
673
|
-
return
|
|
672
|
+
function es(m, v, y) {
|
|
673
|
+
return qt(m, v, y, !0);
|
|
674
674
|
}
|
|
675
|
-
function ts(m,
|
|
676
|
-
return
|
|
675
|
+
function ts(m, v, y) {
|
|
676
|
+
return qt(m, v, y, !1);
|
|
677
677
|
}
|
|
678
678
|
var ns = ts, ss = es;
|
|
679
|
-
|
|
680
|
-
}()),
|
|
679
|
+
Fe.Fragment = r, Fe.jsx = ns, Fe.jsxs = ss;
|
|
680
|
+
}()), Fe;
|
|
681
681
|
}
|
|
682
|
-
process.env.NODE_ENV === "production" ?
|
|
683
|
-
var s =
|
|
682
|
+
process.env.NODE_ENV === "production" ? Dt.exports = js() : Dt.exports = ys();
|
|
683
|
+
var s = Dt.exports;
|
|
684
684
|
const Es = () => {
|
|
685
685
|
const [e, t] = F(window.location.pathname), n = () => {
|
|
686
686
|
const r = window.location.pathname;
|
|
687
687
|
t(r);
|
|
688
688
|
};
|
|
689
|
-
return
|
|
689
|
+
return X(() => (window.addEventListener("popstate", n), () => {
|
|
690
690
|
window.removeEventListener("popstate", n);
|
|
691
691
|
}), []), e;
|
|
692
692
|
}, Ce = (e, t) => {
|
|
693
|
-
const n =
|
|
694
|
-
|
|
693
|
+
const n = ne(!1);
|
|
694
|
+
X(() => {
|
|
695
695
|
n.current ? e() : n.current = !0;
|
|
696
696
|
}, t);
|
|
697
697
|
};
|
|
698
698
|
function Ss(e, t, n) {
|
|
699
|
-
var r = this, a =
|
|
700
|
-
|
|
699
|
+
var r = this, a = ne(null), l = ne(0), d = ne(null), o = ne([]), i = ne(), c = ne(), u = ne(e), f = ne(!0);
|
|
700
|
+
X(function() {
|
|
701
701
|
u.current = e;
|
|
702
702
|
}, [e]);
|
|
703
703
|
var h = !t && t !== 0 && typeof window < "u";
|
|
@@ -705,35 +705,35 @@ function Ss(e, t, n) {
|
|
|
705
705
|
throw new TypeError("Expected a function");
|
|
706
706
|
t = +t || 0;
|
|
707
707
|
var p = !!(n = n || {}).leading, _ = !("trailing" in n) || !!n.trailing, j = "maxWait" in n, g = j ? Math.max(+n.maxWait || 0, t) : null;
|
|
708
|
-
|
|
708
|
+
X(function() {
|
|
709
709
|
return f.current = !0, function() {
|
|
710
710
|
f.current = !1;
|
|
711
711
|
};
|
|
712
712
|
}, []);
|
|
713
|
-
var S =
|
|
713
|
+
var S = et(function() {
|
|
714
714
|
var k = function(x) {
|
|
715
|
-
var
|
|
716
|
-
return o.current = i.current = null, l.current = x, c.current = u.current.apply(Q,
|
|
717
|
-
}, T = function(x,
|
|
718
|
-
h && cancelAnimationFrame(d.current), d.current = h ? requestAnimationFrame(x) : setTimeout(x,
|
|
715
|
+
var b = o.current, Q = i.current;
|
|
716
|
+
return o.current = i.current = null, l.current = x, c.current = u.current.apply(Q, b);
|
|
717
|
+
}, T = function(x, b) {
|
|
718
|
+
h && cancelAnimationFrame(d.current), d.current = h ? requestAnimationFrame(x) : setTimeout(x, b);
|
|
719
719
|
}, M = function(x) {
|
|
720
720
|
if (!f.current)
|
|
721
721
|
return !1;
|
|
722
|
-
var
|
|
723
|
-
return !a.current ||
|
|
722
|
+
var b = x - a.current;
|
|
723
|
+
return !a.current || b >= t || b < 0 || j && x - l.current >= g;
|
|
724
724
|
}, C = function(x) {
|
|
725
725
|
return d.current = null, _ && o.current ? k(x) : (o.current = i.current = null, c.current);
|
|
726
726
|
}, I = function x() {
|
|
727
|
-
var
|
|
728
|
-
if (M(
|
|
729
|
-
return C(
|
|
727
|
+
var b = Date.now();
|
|
728
|
+
if (M(b))
|
|
729
|
+
return C(b);
|
|
730
730
|
if (f.current) {
|
|
731
|
-
var Q = t - (
|
|
731
|
+
var Q = t - (b - a.current), w = j ? Math.min(Q, g - (b - l.current)) : Q;
|
|
732
732
|
T(x, w);
|
|
733
733
|
}
|
|
734
734
|
}, V = function() {
|
|
735
|
-
var x = Date.now(),
|
|
736
|
-
if (o.current = [].slice.call(arguments), i.current = r, a.current = x,
|
|
735
|
+
var x = Date.now(), b = M(x);
|
|
736
|
+
if (o.current = [].slice.call(arguments), i.current = r, a.current = x, b) {
|
|
737
737
|
if (!d.current && f.current)
|
|
738
738
|
return l.current = a.current, T(I, t), p ? k(a.current) : c.current;
|
|
739
739
|
if (j)
|
|
@@ -751,24 +751,24 @@ function Ss(e, t, n) {
|
|
|
751
751
|
}, [p, j, t, g, _, h]);
|
|
752
752
|
return S;
|
|
753
753
|
}
|
|
754
|
-
function
|
|
754
|
+
function _n(e, t, n) {
|
|
755
755
|
var r = n === void 0 ? {} : n, a = r.leading, l = r.trailing;
|
|
756
756
|
return Ss(e, t, { maxWait: t, leading: a === void 0 || a, trailing: l === void 0 || l });
|
|
757
757
|
}
|
|
758
|
-
let
|
|
759
|
-
const
|
|
758
|
+
let pt;
|
|
759
|
+
const rt = (e = !0, t = !1) => {
|
|
760
760
|
if (!e)
|
|
761
761
|
return;
|
|
762
762
|
const [n, r] = A.useState(0) || [!1, () => {
|
|
763
763
|
}];
|
|
764
|
-
|
|
765
|
-
clearTimeout(
|
|
764
|
+
X(() => (l(), window.addEventListener("resize", d), () => {
|
|
765
|
+
clearTimeout(pt), d.flush(), window.removeEventListener("resize", d);
|
|
766
766
|
}), []);
|
|
767
767
|
const a = () => window.innerWidth, l = () => {
|
|
768
768
|
r(a());
|
|
769
|
-
}, d =
|
|
769
|
+
}, d = _n(
|
|
770
770
|
() => {
|
|
771
|
-
a() !== n && (t && (clearTimeout(
|
|
771
|
+
a() !== n && (t && (clearTimeout(pt), document.body.classList.add("is-resizing"), pt = setTimeout(() => {
|
|
772
772
|
document.body.classList.remove("is-resizing");
|
|
773
773
|
}, 550)), l());
|
|
774
774
|
},
|
|
@@ -790,7 +790,7 @@ const nt = (e = !0, t = !1) => {
|
|
|
790
790
|
const [a, l] = A.useState({ current: 0, past: 0 }) || [!1, () => {
|
|
791
791
|
}], [d, o] = A.useState({ scrollDown: !1, scrollUp: !1 }) || [!1, () => {
|
|
792
792
|
}];
|
|
793
|
-
|
|
793
|
+
X(() => (i(), window.addEventListener("scroll", c), () => {
|
|
794
794
|
c.flush(), window.removeEventListener("scroll", c);
|
|
795
795
|
}), []);
|
|
796
796
|
const i = () => {
|
|
@@ -800,13 +800,13 @@ const nt = (e = !0, t = !1) => {
|
|
|
800
800
|
return;
|
|
801
801
|
}
|
|
802
802
|
Math.abs(h) >= t.up && !d.scrollUp && (r(), o({ scrollUp: !0, scrollDown: !1 }));
|
|
803
|
-
}, c =
|
|
803
|
+
}, c = _n(() => {
|
|
804
804
|
i();
|
|
805
805
|
}, 250);
|
|
806
806
|
return a;
|
|
807
807
|
}, mo = (e = [], t = !0) => {
|
|
808
808
|
e = Array.isArray(e) ? e : [e];
|
|
809
|
-
const n =
|
|
809
|
+
const n = ne(!1);
|
|
810
810
|
Ce(() => {
|
|
811
811
|
if (window && window.location && window.location.hash) {
|
|
812
812
|
if (n.current)
|
|
@@ -821,13 +821,13 @@ const nt = (e = !0, t = !1) => {
|
|
|
821
821
|
return t.forEach(({ type: r, value: a }) => {
|
|
822
822
|
is(n, r, a);
|
|
823
823
|
}), n;
|
|
824
|
-
},
|
|
824
|
+
}, xn = (e) => {
|
|
825
825
|
const t = [];
|
|
826
826
|
return e.forEach((n) => {
|
|
827
827
|
const r = parseInt(n);
|
|
828
828
|
isNaN(r) || t.push(r);
|
|
829
829
|
}), t.sort((n, r) => n - r);
|
|
830
|
-
},
|
|
830
|
+
}, bn = (e, t, n) => {
|
|
831
831
|
let r = n.mobile;
|
|
832
832
|
for (const a in t) {
|
|
833
833
|
const l = parseInt(String(t[a]));
|
|
@@ -856,7 +856,7 @@ const nt = (e = !0, t = !1) => {
|
|
|
856
856
|
return { path: "days", number: o };
|
|
857
857
|
const i = Math.floor(o / 7);
|
|
858
858
|
return i <= 52 ? { path: "weeks", number: i } : { path: "years", number: Math.floor(o / 365) };
|
|
859
|
-
}, Ds = (e) => new Promise((t) => setTimeout(t, e)),
|
|
859
|
+
}, Ds = (e) => new Promise((t) => setTimeout(t, e)), Lt = {
|
|
860
860
|
apolitical: "Apolitical",
|
|
861
861
|
breadcrumbs_label: "Go back to:",
|
|
862
862
|
breadcrumbs_currentPage: "Current page:",
|
|
@@ -1160,13 +1160,13 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1160
1160
|
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>"
|
|
1161
1161
|
}, Rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1162
1162
|
__proto__: null,
|
|
1163
|
-
en:
|
|
1163
|
+
en: Lt,
|
|
1164
1164
|
es: As,
|
|
1165
1165
|
fr: Ns,
|
|
1166
1166
|
pt: Ps
|
|
1167
1167
|
}, Symbol.toStringTag, { value: "Module" })), pe = (e, t, n, r, a = {}) => {
|
|
1168
1168
|
let l = "";
|
|
1169
|
-
return `${t}_${n}` in
|
|
1169
|
+
return `${t}_${n}` in Lt ? l = e({ id: `${t}_${n}` }, a) : l = e({ id: t }, { [r]: n, ...a }), l;
|
|
1170
1170
|
}, Fs = (e, t, n) => {
|
|
1171
1171
|
if (!e || e === 0)
|
|
1172
1172
|
return "0";
|
|
@@ -1181,9 +1181,9 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
return r;
|
|
1184
|
-
},
|
|
1184
|
+
}, vn = (e, t) => A.Children.map(e, (n) => A.cloneElement(n, {
|
|
1185
1185
|
...t
|
|
1186
|
-
})), Ls = (e) => e.replace(/\s+/g, "").length > 0,
|
|
1186
|
+
})), Ls = (e) => e.replace(/\s+/g, "").length > 0, J = ({
|
|
1187
1187
|
variant: e = "primary",
|
|
1188
1188
|
size: t = "medium",
|
|
1189
1189
|
styling: n = { muted: !1, fullWidth: !1 },
|
|
@@ -1197,10 +1197,10 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1197
1197
|
children: u = !1,
|
|
1198
1198
|
...f
|
|
1199
1199
|
}) => {
|
|
1200
|
-
const p =
|
|
1200
|
+
const p = rt(typeof t == "object");
|
|
1201
1201
|
if (typeof t == "object" && typeof p == "number") {
|
|
1202
|
-
const g = Object.assign({}, t), S =
|
|
1203
|
-
t =
|
|
1202
|
+
const g = Object.assign({}, t), S = xn(Object.keys(g));
|
|
1203
|
+
t = bn(p, S, g);
|
|
1204
1204
|
}
|
|
1205
1205
|
const _ = [];
|
|
1206
1206
|
typeof t == "string" && _.push(t), r && (_.push("icon"), typeof r == "object" ? (_.push(r.icon), r.position ? _.push(r.position) : _.push("left"), r.hover && _.push(`hover_${r.hover}`), r.animate && (_.push("animate"), typeof r.animate == "string" && _.push(r.animate))) : (_.push(r), !r.includes("right") && !r.includes("left") && _.push("left"))), n.muted && _.push("muted"), n.fullWidth && _.push("full-width");
|
|
@@ -1221,14 +1221,14 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1221
1221
|
j,
|
|
1222
1222
|
u || (c ? /* @__PURE__ */ s.jsx(le, { showOnFocus: !1, children: c }) : null)
|
|
1223
1223
|
);
|
|
1224
|
-
},
|
|
1225
|
-
const r = e.length > 1 ? "ul" : "p", a = e.map((l, d) => r === "p" ? /* @__PURE__ */ s.jsx(
|
|
1224
|
+
}, ot = ({ buttons: e, className: t = "", ...n }) => {
|
|
1225
|
+
const r = e.length > 1 ? "ul" : "p", a = e.map((l, d) => r === "p" ? /* @__PURE__ */ s.jsx(J, { ...l }, d) : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(J, { ...l }) }, d));
|
|
1226
1226
|
return A.createElement(r, { className: E("button-wrapper", t), ...n, children: a });
|
|
1227
1227
|
};
|
|
1228
1228
|
const De = ({ maxWidth: e = !1 }) => {
|
|
1229
1229
|
const t = e ? { "--max-width": `${e / 16}rem` } : {};
|
|
1230
1230
|
return /* @__PURE__ */ s.jsx("hr", { className: E({ "has-max-width": e }), style: t });
|
|
1231
|
-
},
|
|
1231
|
+
}, at = ({
|
|
1232
1232
|
href: e,
|
|
1233
1233
|
children: t,
|
|
1234
1234
|
fallbackElement: n,
|
|
@@ -1251,7 +1251,7 @@ const De = ({ maxWidth: e = !1 }) => {
|
|
|
1251
1251
|
);
|
|
1252
1252
|
}
|
|
1253
1253
|
return n ? A.createElement(n, { children: t, className: r, ...o }) : t;
|
|
1254
|
-
},
|
|
1254
|
+
}, sn = {
|
|
1255
1255
|
card: {
|
|
1256
1256
|
range: [
|
|
1257
1257
|
{
|
|
@@ -1359,12 +1359,12 @@ const De = ({ maxWidth: e = !1 }) => {
|
|
|
1359
1359
|
range: t,
|
|
1360
1360
|
sizes: n
|
|
1361
1361
|
}) => {
|
|
1362
|
-
const { range: r, sizes: a } = e ?
|
|
1362
|
+
const { range: r, sizes: a } = e ? sn[e] : sn.fallback;
|
|
1363
1363
|
return { range: t && t.length > 0 ? t : r, sizes: n || a };
|
|
1364
1364
|
}, Bs = ({ format: e, height: t, query: n, width: r }) => {
|
|
1365
1365
|
let a = `w=${r}&h=${t}`;
|
|
1366
1366
|
return a = e ? `${a}&fm=${e}` : a, a = n ? `${a}&${n}` : a, a;
|
|
1367
|
-
},
|
|
1367
|
+
}, gt = ({ format: e, range: t, url: n, query: r }) => t.map(({ height: a, width: l }) => `${n}?${Bs({
|
|
1368
1368
|
format: e,
|
|
1369
1369
|
height: a,
|
|
1370
1370
|
query: r,
|
|
@@ -1381,7 +1381,7 @@ const Is = ({ image: e, className: t, testId: n }) => {
|
|
|
1381
1381
|
loading: c,
|
|
1382
1382
|
decoding: u,
|
|
1383
1383
|
fetchPriority: f
|
|
1384
|
-
} = e, { range: h, sizes: p } = Os(e), _ =
|
|
1384
|
+
} = e, { range: h, sizes: p } = Os(e), _ = gt({ format: "avif", query: d, range: h, url: o }), j = gt({ format: "webp", query: d, range: h, url: o }), g = gt({ format: "", query: d, range: h, url: o });
|
|
1385
1385
|
return /* @__PURE__ */ s.jsxs("picture", { className: t, children: [
|
|
1386
1386
|
l !== "image/gif" && /* @__PURE__ */ s.jsx(
|
|
1387
1387
|
"source",
|
|
@@ -1418,10 +1418,10 @@ const Is = ({ image: e, className: t, testId: n }) => {
|
|
|
1418
1418
|
)
|
|
1419
1419
|
] });
|
|
1420
1420
|
};
|
|
1421
|
-
let
|
|
1421
|
+
let Le = !1;
|
|
1422
1422
|
const Hs = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
1423
|
-
const r = N(), a =
|
|
1424
|
-
|
|
1423
|
+
const r = N(), a = ne(null), [l, d] = F("hidden");
|
|
1424
|
+
X(() => {
|
|
1425
1425
|
const i = a.current;
|
|
1426
1426
|
if (i)
|
|
1427
1427
|
return i.addEventListener("transitionend", o), () => {
|
|
@@ -1429,17 +1429,17 @@ const Hs = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
|
1429
1429
|
};
|
|
1430
1430
|
}, []);
|
|
1431
1431
|
const o = ({ propertyName: i }) => {
|
|
1432
|
-
i === "opacity" && (
|
|
1432
|
+
i === "opacity" && (Le !== !1 && clearTimeout(Le), d((c) => c === "opening" ? "open" : c === "closing" ? "closed" : c === "closed" ? "hidden" : c));
|
|
1433
1433
|
};
|
|
1434
1434
|
return Ce(() => {
|
|
1435
|
-
|
|
1435
|
+
Le !== !1 && clearTimeout(Le);
|
|
1436
1436
|
let i = "open";
|
|
1437
|
-
e ? d("opening") : (d("closing"), i = "hidden"),
|
|
1437
|
+
e ? d("opening") : (d("closing"), i = "hidden"), Le = setTimeout(() => {
|
|
1438
1438
|
d(i);
|
|
1439
1439
|
}, 300);
|
|
1440
1440
|
}, [e]), /* @__PURE__ */ s.jsx("aside", { ref: a, className: E("tooltip text-medium", l, { loading: t }), hidden: l === "hidden", children: t ? /* @__PURE__ */ s.jsx("p", { children: r.formatMessage({ id: "tooltip_loading" }) }) : typeof n == "string" ? /* @__PURE__ */ s.jsx("p", { children: n }) : n });
|
|
1441
1441
|
};
|
|
1442
|
-
const
|
|
1442
|
+
const wn = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ s.jsx("section", { className: E("full-width-section", t), ...n, children: e });
|
|
1443
1443
|
const fo = ({ text: e, buttons: t, className: n = "" }) => {
|
|
1444
1444
|
const r = [];
|
|
1445
1445
|
return t.forEach((a) => {
|
|
@@ -1453,9 +1453,9 @@ const fo = ({ text: e, buttons: t, className: n = "" }) => {
|
|
|
1453
1453
|
target: "_blank",
|
|
1454
1454
|
children: a.text
|
|
1455
1455
|
});
|
|
1456
|
-
}), /* @__PURE__ */ s.jsx(
|
|
1456
|
+
}), /* @__PURE__ */ s.jsx(wn, { className: E("download-section", n), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1457
1457
|
A.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
|
|
1458
|
-
/* @__PURE__ */ s.jsx(
|
|
1458
|
+
/* @__PURE__ */ s.jsx(ot, { buttons: r })
|
|
1459
1459
|
] }) });
|
|
1460
1460
|
};
|
|
1461
1461
|
const ho = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
@@ -1540,7 +1540,7 @@ const Qs = [
|
|
|
1540
1540
|
c.preventDefault(), c.stopPropagation();
|
|
1541
1541
|
const u = document.getElementById(a.link.substring(1));
|
|
1542
1542
|
u && u.scrollIntoView({ behavior: "smooth" });
|
|
1543
|
-
}), /* @__PURE__ */ s.jsx(
|
|
1543
|
+
}), /* @__PURE__ */ s.jsx(wn, { className: E("banner-section", n, r, { "has-image": t, "has-extra-spacing": r === "normal" && i.eyebrow && i.title }), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1544
1544
|
/* @__PURE__ */ s.jsxs("div", { className: "content-wrapper", children: [
|
|
1545
1545
|
d.map((c) => {
|
|
1546
1546
|
if (i[c] && typeof i[c] == "object") {
|
|
@@ -1555,7 +1555,7 @@ const Qs = [
|
|
|
1555
1555
|
}),
|
|
1556
1556
|
l,
|
|
1557
1557
|
a && a.text && a.link && /* @__PURE__ */ s.jsx(
|
|
1558
|
-
|
|
1558
|
+
J,
|
|
1559
1559
|
{
|
|
1560
1560
|
variant: t || n === "light" ? "primary" : "secondary",
|
|
1561
1561
|
size: { mobile: "medium", 768: "large" },
|
|
@@ -1577,8 +1577,8 @@ const go = ({
|
|
|
1577
1577
|
}) => !n && !r ? null : /* @__PURE__ */ s.jsxs("aside", { className: E("marketing-block", e), children: [
|
|
1578
1578
|
n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
|
|
1579
1579
|
r && /* @__PURE__ */ s.jsx("p", { children: r }),
|
|
1580
|
-
t && /* @__PURE__ */ s.jsx(
|
|
1581
|
-
] }),
|
|
1580
|
+
t && /* @__PURE__ */ s.jsx(J, { variant: "secondary", size: "medium", href: t.link, className: "gtm-trackable", "data-gtm-event-context": a, "data-gtm-event-type": "learn-more-click", children: t.text })
|
|
1581
|
+
] }), At = "https://storage.googleapis.com/apolitical-assets/", Oe = {
|
|
1582
1582
|
general: "hello@apolitical.co",
|
|
1583
1583
|
support: "concierge@apolitical.co",
|
|
1584
1584
|
"data-protection": {
|
|
@@ -1586,26 +1586,26 @@ const go = ({
|
|
|
1586
1586
|
eu: "dpo.agl@apolitical.foundation"
|
|
1587
1587
|
}
|
|
1588
1588
|
}, _o = "200,000+";
|
|
1589
|
-
const
|
|
1589
|
+
const kn = ({ label: e = !1, className: t = "", children: n }) => {
|
|
1590
1590
|
const r = N();
|
|
1591
1591
|
return /* @__PURE__ */ s.jsxs("details", { className: E("collapsible-section", t), children: [
|
|
1592
1592
|
/* @__PURE__ */ s.jsx("summary", { children: e || r.formatMessage({ id: "collapsibleSection_summary" }) }),
|
|
1593
1593
|
/* @__PURE__ */ s.jsx("div", { className: "content", children: n })
|
|
1594
1594
|
] });
|
|
1595
1595
|
};
|
|
1596
|
-
const
|
|
1597
|
-
const
|
|
1596
|
+
const Ee = ({ variant: e = "primary", className: t = "", children: n, ...r }) => /* @__PURE__ */ s.jsx("div", { className: E("highlighted-text-box", e, t), ...r, children: n });
|
|
1597
|
+
const it = ({ variant: e = "empty", text: t = !1, button: n = !1, className: r = "" }) => {
|
|
1598
1598
|
let a = n && !!Object.keys(n).length;
|
|
1599
|
-
const l = typeof n == "object" && "breakpoints" in n, d =
|
|
1599
|
+
const l = typeof n == "object" && "breakpoints" in n, d = rt(l);
|
|
1600
1600
|
if (l && typeof n == "object" && typeof d == "number") {
|
|
1601
|
-
const f = Object.assign({}, n.breakpoints), h =
|
|
1602
|
-
a =
|
|
1601
|
+
const f = Object.assign({}, n.breakpoints), h = xn(Object.keys(f));
|
|
1602
|
+
a = bn(d, h, f);
|
|
1603
1603
|
}
|
|
1604
1604
|
const { breakpoints: o, text: i = "", component: c, ...u } = n;
|
|
1605
|
-
return /* @__PURE__ */ s.jsx(
|
|
1606
|
-
t && /* @__PURE__ */ s.jsx(
|
|
1605
|
+
return /* @__PURE__ */ s.jsx(Ee, { variant: "subtle", className: E("empty-state-box", e, r), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1606
|
+
t && /* @__PURE__ */ s.jsx(nt, { options: { forceBlock: !0 }, children: t }),
|
|
1607
1607
|
a && typeof n == "object" && (c || /* @__PURE__ */ s.jsx(
|
|
1608
|
-
|
|
1608
|
+
J,
|
|
1609
1609
|
{
|
|
1610
1610
|
...u,
|
|
1611
1611
|
variant: n.variant ? n.variant : "secondary",
|
|
@@ -1614,39 +1614,39 @@ const ot = ({ variant: e = "empty", text: t = !1, button: n = !1, className: r =
|
|
|
1614
1614
|
))
|
|
1615
1615
|
] }) });
|
|
1616
1616
|
};
|
|
1617
|
-
const
|
|
1617
|
+
const Nt = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("p", { ...t, children: e }), jn = { q: Nt, blockquote: Nt };
|
|
1618
1618
|
for (let e = 1; e <= 6; e++)
|
|
1619
|
-
|
|
1619
|
+
jn[`h${e}`] = { component: Nt, props: { className: "title" } };
|
|
1620
1620
|
const zs = ({ type: e = "default", className: t = "", heading: n = !1, children: r }) => /* @__PURE__ */ s.jsxs("div", { className: E("helper-text-box text-small", e, t), children: [
|
|
1621
1621
|
n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
|
|
1622
1622
|
typeof r == "string" ? /* @__PURE__ */ s.jsx(
|
|
1623
|
-
|
|
1623
|
+
nt,
|
|
1624
1624
|
{
|
|
1625
1625
|
options: {
|
|
1626
1626
|
wrapper: A.Fragment,
|
|
1627
1627
|
forceBlock: !0,
|
|
1628
|
-
overrides:
|
|
1628
|
+
overrides: jn
|
|
1629
1629
|
},
|
|
1630
1630
|
children: r
|
|
1631
1631
|
}
|
|
1632
1632
|
) : /* @__PURE__ */ s.jsx("p", { children: r })
|
|
1633
1633
|
] });
|
|
1634
1634
|
const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children: a }) => {
|
|
1635
|
-
const l = N(), d =
|
|
1636
|
-
|
|
1635
|
+
const l = N(), d = ne(null), [o, i] = F(""), [c, u] = F("closed");
|
|
1636
|
+
X(() => {
|
|
1637
1637
|
const p = d.current;
|
|
1638
1638
|
if (p)
|
|
1639
1639
|
return p.addEventListener("transitionend", f), () => {
|
|
1640
1640
|
p.removeEventListener("transitionend", f);
|
|
1641
1641
|
};
|
|
1642
|
-
}, []),
|
|
1642
|
+
}, []), X(() => {
|
|
1643
1643
|
if (!r || typeof r != "string")
|
|
1644
1644
|
return;
|
|
1645
1645
|
const p = r.split(`
|
|
1646
1646
|
`);
|
|
1647
1647
|
i(p.length < 3 ? `${r.substring(0, 400)}...` : p.slice(0, 3).join(`
|
|
1648
1648
|
`));
|
|
1649
|
-
}, [r]),
|
|
1649
|
+
}, [r]), X(() => {
|
|
1650
1650
|
c === "ready-to-close" && u("closing");
|
|
1651
1651
|
}, [c]);
|
|
1652
1652
|
const f = ({ propertyName: p }) => {
|
|
@@ -1655,13 +1655,13 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1655
1655
|
if (!r)
|
|
1656
1656
|
return null;
|
|
1657
1657
|
const h = ["opening", "open"].includes(c);
|
|
1658
|
-
return /* @__PURE__ */ s.jsxs(
|
|
1658
|
+
return /* @__PURE__ */ s.jsxs(Ee, { variant: "subtle", className: E("hide-show-text-box", e), children: [
|
|
1659
1659
|
/* @__PURE__ */ s.jsxs("div", { ref: d, className: E("content", c), children: [
|
|
1660
|
-
/* @__PURE__ */ s.jsx(
|
|
1660
|
+
/* @__PURE__ */ s.jsx(nt, { options: { forceBlock: !0 }, children: c === "closed" ? o : r }),
|
|
1661
1661
|
c !== "closed" && a
|
|
1662
1662
|
] }),
|
|
1663
1663
|
/* @__PURE__ */ s.jsx("p", { className: "cta", children: /* @__PURE__ */ s.jsx(
|
|
1664
|
-
|
|
1664
|
+
J,
|
|
1665
1665
|
{
|
|
1666
1666
|
variant: "tertiary",
|
|
1667
1667
|
icon: { icon: "navigation_arrow", position: "left", animate: !0 },
|
|
@@ -1674,17 +1674,17 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1674
1674
|
}
|
|
1675
1675
|
) })
|
|
1676
1676
|
] });
|
|
1677
|
-
}, Ws = () => A.Fragment, Vs = ({ children: e }) => /* @__PURE__ */ s.jsx(
|
|
1677
|
+
}, Ws = () => A.Fragment, Vs = ({ children: e }) => /* @__PURE__ */ s.jsx(Ee, { variant: "secondary", children: e }), Ys = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], Gs = ({ children: e }) => {
|
|
1678
1678
|
const t = N();
|
|
1679
1679
|
if (!e)
|
|
1680
1680
|
return null;
|
|
1681
1681
|
let n = t.formatMessage({ id: "markdown_collapsibleSection_summary" });
|
|
1682
1682
|
const r = [];
|
|
1683
|
-
for (const l of
|
|
1683
|
+
for (const l of Mt.toArray(e))
|
|
1684
1684
|
if (!(!l || typeof l == "string" || typeof l == "number"))
|
|
1685
1685
|
if (A.isValidElement(l) && l.type === "summary") {
|
|
1686
1686
|
if (l.props && l.props.children) {
|
|
1687
|
-
for (const d of
|
|
1687
|
+
for (const d of Mt.toArray(l.props.children))
|
|
1688
1688
|
if (!(!d || typeof d == "string" || typeof d == "number") && A.isValidElement(d)) {
|
|
1689
1689
|
const o = d.type;
|
|
1690
1690
|
if (Ys.includes(o)) {
|
|
@@ -1698,7 +1698,7 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1698
1698
|
r.push(l);
|
|
1699
1699
|
const a = n ? n.toString() : "";
|
|
1700
1700
|
return /* @__PURE__ */ s.jsx(
|
|
1701
|
-
|
|
1701
|
+
kn,
|
|
1702
1702
|
{
|
|
1703
1703
|
label: a,
|
|
1704
1704
|
className: ["Sources", "Resources"].includes(a) ? "discrete-links" : "",
|
|
@@ -1709,12 +1709,12 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1709
1709
|
if (t.class)
|
|
1710
1710
|
switch (t.class) {
|
|
1711
1711
|
case "casestudy":
|
|
1712
|
-
return /* @__PURE__ */ s.jsx(
|
|
1712
|
+
return /* @__PURE__ */ s.jsx(Ee, { variant: "secondary", children: e });
|
|
1713
1713
|
case "general-textbox":
|
|
1714
1714
|
case "highlight-box":
|
|
1715
|
-
return /* @__PURE__ */ s.jsx(
|
|
1715
|
+
return /* @__PURE__ */ s.jsx(Ee, { variant: "primary", children: e });
|
|
1716
1716
|
case "pink-textbox":
|
|
1717
|
-
return /* @__PURE__ */ s.jsx(
|
|
1717
|
+
return /* @__PURE__ */ s.jsx(Ee, { variant: "tertiary", children: e });
|
|
1718
1718
|
default:
|
|
1719
1719
|
return /* @__PURE__ */ s.jsx("div", { ...t, children: e });
|
|
1720
1720
|
}
|
|
@@ -1728,26 +1728,26 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1728
1728
|
/* @__PURE__ */ s.jsx("iframe", { ...e, title: t.formatMessage({ id: `markdown_iframe${r === "default" ? "" : `_${r}`}` }) }),
|
|
1729
1729
|
/* @__PURE__ */ s.jsx("span", { id: `content-after-iframe-${n}`, tabIndex: -1 })
|
|
1730
1730
|
] });
|
|
1731
|
-
},
|
|
1731
|
+
}, rn = (e) => {
|
|
1732
1732
|
let t = "";
|
|
1733
1733
|
return e && typeof e != "string" && typeof e != "number" && typeof e != "boolean" && "type" in e && (t = e.type), t;
|
|
1734
1734
|
}, Zs = ({ children: e, ...t }) => {
|
|
1735
1735
|
let n = { ...t };
|
|
1736
1736
|
t.href && (t.href.includes("http:") || t.href.includes("https:")) && !t.target && (n.target = "_blank");
|
|
1737
1737
|
let r = e, a = !1;
|
|
1738
|
-
for (const l of
|
|
1738
|
+
for (const l of Mt.toArray(e))
|
|
1739
1739
|
if (!(!l || typeof l == "string" || typeof l == "number") && A.isValidElement(l)) {
|
|
1740
1740
|
const d = l.type;
|
|
1741
1741
|
if (["button", "center", "span", "strong"].includes(d) && l.props && l.props.children && l.props.children[0])
|
|
1742
|
-
for ((d === "button" ||
|
|
1742
|
+
for ((d === "button" || rn(l.props.children[0]) === "button") && (a = !0), r = l.props.children[0]; r && typeof r != "string" && !(typeof r == "boolean" || typeof r == "number" || !A.isValidElement(r)); )
|
|
1743
1743
|
if (r.props && r.props.children && r.props.children[0])
|
|
1744
|
-
r = r.props.children[0], r &&
|
|
1744
|
+
r = r.props.children[0], r && rn(r) === "button" && (a = !0);
|
|
1745
1745
|
else
|
|
1746
1746
|
break;
|
|
1747
1747
|
}
|
|
1748
|
-
return a ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ s.jsx("p", { className: "center", children: /* @__PURE__ */ s.jsx(
|
|
1748
|
+
return a ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ s.jsx("p", { className: "center", children: /* @__PURE__ */ s.jsx(J, { variant: "primary", size: "medium", ...n, children: r }) })) : /* @__PURE__ */ s.jsx("a", { ...n, children: r });
|
|
1749
1749
|
}, Ks = ({ children: e }) => /* @__PURE__ */ s.jsx("span", { children: e });
|
|
1750
|
-
const
|
|
1750
|
+
const on = ({ className: e = "", options: t = {}, children: n }) => {
|
|
1751
1751
|
n = n.replace(/^<br\/?>/, "");
|
|
1752
1752
|
const r = {
|
|
1753
1753
|
wrapper: A.Fragment,
|
|
@@ -1756,8 +1756,8 @@ const rn = ({ className: e = "", options: t = {}, children: n }) => {
|
|
|
1756
1756
|
a: Zs,
|
|
1757
1757
|
// Override psuedo-code
|
|
1758
1758
|
// We give the content team psuedo-code short cuts to use in Contentful
|
|
1759
|
-
CollapsibleSection:
|
|
1760
|
-
TextBox:
|
|
1759
|
+
CollapsibleSection: kn,
|
|
1760
|
+
TextBox: Ee,
|
|
1761
1761
|
CaseStudy: Vs,
|
|
1762
1762
|
// Override embedded HTML
|
|
1763
1763
|
// Our content team previously used real HTML, which we need to tear out and replace with React components
|
|
@@ -1767,28 +1767,28 @@ const rn = ({ className: e = "", options: t = {}, children: n }) => {
|
|
|
1767
1767
|
iframe: Xs
|
|
1768
1768
|
}
|
|
1769
1769
|
};
|
|
1770
|
-
return /* @__PURE__ */ s.jsx("div", { className: E("markdown-text", e), children: /* @__PURE__ */ s.jsx(
|
|
1770
|
+
return /* @__PURE__ */ s.jsx("div", { className: E("markdown-text", e), children: /* @__PURE__ */ s.jsx(nt, { options: { ...r, ...t }, children: n }) });
|
|
1771
1771
|
};
|
|
1772
1772
|
const qs = ({ size: e = "medium", variant: t = "default", className: n = "", children: r }) => /* @__PURE__ */ s.jsx("span", { className: E("pill", e, t, n), children: r });
|
|
1773
|
-
const
|
|
1773
|
+
const Pt = ({ element: e = "p", children: t = null, className: n = "", ...r }) => A.createElement(e, { ...r, className: E("status-banner text-small", n), "aria-live": "assertive" }, t);
|
|
1774
1774
|
const er = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
|
|
1775
1775
|
const r = N(), a = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, l = { "--progress": `${e}%` };
|
|
1776
1776
|
return /* @__PURE__ */ s.jsx("span", { className: E(`progress-bar section-${a}`, n), style: l, children: /* @__PURE__ */ s.jsx(le, { children: t ? `${e} ${t}` : r.formatMessage({ id: "progressBar" }, { number: e }) }) });
|
|
1777
1777
|
}, tr = Ae(er);
|
|
1778
|
-
const
|
|
1778
|
+
const _t = "loadingBlock_", nr = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
|
|
1779
1779
|
const r = N();
|
|
1780
1780
|
t || (t = {
|
|
1781
|
-
0: { text: r.formatMessage({ id: `${
|
|
1782
|
-
75: { text: r.formatMessage({ id: `${
|
|
1783
|
-
100: { text: r.formatMessage({ id: `${
|
|
1781
|
+
0: { text: r.formatMessage({ id: `${_t}loading` }) },
|
|
1782
|
+
75: { text: r.formatMessage({ id: `${_t}almostDone` }) },
|
|
1783
|
+
100: { text: r.formatMessage({ id: `${_t}complete` }) }
|
|
1784
1784
|
});
|
|
1785
1785
|
let a = null;
|
|
1786
1786
|
const l = Object.keys(t);
|
|
1787
1787
|
for (let o = 0; o < l.length && !(e < parseInt(l[o])); o++)
|
|
1788
1788
|
a = l[o];
|
|
1789
|
-
const d = a && t[a].icon ? { "--icon": `url(${
|
|
1789
|
+
const d = a && t[a].icon ? { "--icon": `url(${At}icons/${t[a].icon}.svg)` } : {};
|
|
1790
1790
|
return /* @__PURE__ */ s.jsxs(
|
|
1791
|
-
|
|
1791
|
+
Ee,
|
|
1792
1792
|
{
|
|
1793
1793
|
className: E("loading-block", n, { "has-icon": a && t[a].icon }),
|
|
1794
1794
|
variant: "subtle",
|
|
@@ -1800,28 +1800,28 @@ const pt = "loadingBlock_", nr = ({ progress: e = 0, steps: t = !1, className: n
|
|
|
1800
1800
|
}
|
|
1801
1801
|
);
|
|
1802
1802
|
}, bo = Ae(nr);
|
|
1803
|
-
const
|
|
1804
|
-
const
|
|
1803
|
+
const je = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ s.jsx(gn, { element: e, className: E("loading-placeholder", t), ...n });
|
|
1804
|
+
const Rt = {
|
|
1805
1805
|
header: ["logo", "link", "link", "search"],
|
|
1806
1806
|
sidebar: ["text", "text", "text", "text", "text"],
|
|
1807
1807
|
"cards-section": ["subtitle", "cards"],
|
|
1808
1808
|
cards: ["card", "card", "card", "card"],
|
|
1809
1809
|
"overview-page": ["header", "sidebar", "title", "text", "cards-section", "cards-section", "footer"]
|
|
1810
|
-
},
|
|
1810
|
+
}, yn = (e, t) => e in Rt ? /* @__PURE__ */ s.jsx("div", { className: e, children: Rt[e].map((n, r) => yn(n, r)) }, t) : /* @__PURE__ */ s.jsx(je, { className: e }, t), sr = ({ layout: e = "overview-page" }) => /* @__PURE__ */ s.jsx("div", { className: E("loading-state", e), children: Rt[e].map((t, n) => yn(t, n)) }), En = (e) => {
|
|
1811
1811
|
const t = e && e.toUpperCase().split(" ");
|
|
1812
1812
|
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) : "";
|
|
1813
|
-
},
|
|
1814
|
-
const t = Math.ceil(26 /
|
|
1813
|
+
}, ze = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], rr = (e) => {
|
|
1814
|
+
const t = Math.ceil(26 / ze.length), n = En(e).toLowerCase();
|
|
1815
1815
|
if (n === "")
|
|
1816
|
-
return
|
|
1816
|
+
return ze[0];
|
|
1817
1817
|
const r = n.charCodeAt(0) - 96;
|
|
1818
|
-
for (let a = 0; a <
|
|
1818
|
+
for (let a = 0; a < ze.length; a++)
|
|
1819
1819
|
if (r <= t * (a + 1))
|
|
1820
|
-
return
|
|
1820
|
+
return ze[a];
|
|
1821
1821
|
};
|
|
1822
|
-
const
|
|
1823
|
-
const [o, i] = F(!1), c =
|
|
1824
|
-
|
|
1822
|
+
const an = 256, Ot = ({ className: e = "", src: t = "", name: n, alt: r, width: a = an, height: l = an, ...d }) => {
|
|
1823
|
+
const [o, i] = F(!1), c = ne(null);
|
|
1824
|
+
X(() => {
|
|
1825
1825
|
const f = c.current;
|
|
1826
1826
|
if (!f)
|
|
1827
1827
|
return;
|
|
@@ -1829,7 +1829,7 @@ const on = 256, Ft = ({ className: e = "", src: t = "", name: n, alt: r, width:
|
|
|
1829
1829
|
if (!h)
|
|
1830
1830
|
return;
|
|
1831
1831
|
const p = a, _ = l;
|
|
1832
|
-
typeof window < "u" && window.devicePixelRatio && (f.width = p * window.devicePixelRatio, f.height = _ * window.devicePixelRatio, h.scale(window.devicePixelRatio, window.devicePixelRatio)), h.fillStyle = rr(n), h.fillRect(0, 0, p, _), h.font = `${p / 3}px Arial`, h.textAlign = "center", h.fillStyle = "white", h.fillText(
|
|
1832
|
+
typeof window < "u" && window.devicePixelRatio && (f.width = p * window.devicePixelRatio, f.height = _ * window.devicePixelRatio, h.scale(window.devicePixelRatio, window.devicePixelRatio)), h.fillStyle = rr(n), h.fillRect(0, 0, p, _), h.font = `${p / 3}px Arial`, h.textAlign = "center", h.fillStyle = "white", h.fillText(En(n), p / 2, _ / 1.6);
|
|
1833
1833
|
}, [n]);
|
|
1834
1834
|
let u = !1;
|
|
1835
1835
|
return t && t !== "" && !o && (t.includes("http") || t.includes("//")) && (u = !0), /* @__PURE__ */ s.jsx("figure", { className: E("profile-picture", e, { error: o }), ...d, children: u ? /* @__PURE__ */ s.jsx(
|
|
@@ -1844,10 +1844,10 @@ const on = 256, Ft = ({ className: e = "", src: t = "", name: n, alt: r, width:
|
|
|
1844
1844
|
height: l
|
|
1845
1845
|
}
|
|
1846
1846
|
) : /* @__PURE__ */ s.jsx("canvas", { ref: c }) });
|
|
1847
|
-
},
|
|
1848
|
-
image: `${
|
|
1847
|
+
}, Sn = (e) => e === "apolitical" ? {
|
|
1848
|
+
image: `${At}logos/member_apolitical.svg`
|
|
1849
1849
|
} : e === "community" || typeof e == "object" && !e.name ? {
|
|
1850
|
-
image: `${
|
|
1850
|
+
image: `${At}logos/member_community.svg`
|
|
1851
1851
|
} : {
|
|
1852
1852
|
name: e.name,
|
|
1853
1853
|
role: e.jobTitle || "",
|
|
@@ -1866,9 +1866,9 @@ const on = 256, Ft = ({ className: e = "", src: t = "", name: n, alt: r, width:
|
|
|
1866
1866
|
return "";
|
|
1867
1867
|
const o = `${e}${a && l ? ` — ${t}` : t}`;
|
|
1868
1868
|
let i = `${o}${(a || l) && d ? `, ${n}` : n}`;
|
|
1869
|
-
return i.length > r && (i = o), i.length > r && (i =
|
|
1869
|
+
return i.length > r && (i = o), i.length > r && (i = tt(i, r)), i;
|
|
1870
1870
|
};
|
|
1871
|
-
const
|
|
1871
|
+
const Bt = ({
|
|
1872
1872
|
element: e = "div",
|
|
1873
1873
|
member: t = "community",
|
|
1874
1874
|
additionalContent: n = !1,
|
|
@@ -1876,13 +1876,13 @@ const Lt = ({
|
|
|
1876
1876
|
gtmType: a = "member-click",
|
|
1877
1877
|
className: l = ""
|
|
1878
1878
|
}) => {
|
|
1879
|
-
const d = N(), o =
|
|
1879
|
+
const d = N(), o = Sn(t);
|
|
1880
1880
|
o.name || (o.name = d.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
|
|
1881
1881
|
const { name: i, url: c, image: u } = o, f = or(o), h = n && n.createdAt ? Cs(n.createdAt) : !1, p = n && n.createdAt ? Ms(n.createdAt) : "";
|
|
1882
1882
|
return A.createElement(e, {
|
|
1883
1883
|
className: E("member text-medium", l),
|
|
1884
1884
|
children: /* @__PURE__ */ s.jsxs(
|
|
1885
|
-
|
|
1885
|
+
at,
|
|
1886
1886
|
{
|
|
1887
1887
|
href: c,
|
|
1888
1888
|
gtmType: a,
|
|
@@ -1891,7 +1891,7 @@ const Lt = ({
|
|
|
1891
1891
|
_ == null || _.stopPropagation();
|
|
1892
1892
|
},
|
|
1893
1893
|
children: [
|
|
1894
|
-
/* @__PURE__ */ s.jsx(
|
|
1894
|
+
/* @__PURE__ */ s.jsx(Ot, { name: i, src: u }),
|
|
1895
1895
|
/* @__PURE__ */ s.jsxs("p", { className: "details", children: [
|
|
1896
1896
|
/* @__PURE__ */ s.jsx("strong", { children: i }),
|
|
1897
1897
|
n && /* @__PURE__ */ s.jsxs("span", { className: "additional-content", children: [
|
|
@@ -1905,7 +1905,7 @@ const Lt = ({
|
|
|
1905
1905
|
)
|
|
1906
1906
|
});
|
|
1907
1907
|
};
|
|
1908
|
-
const
|
|
1908
|
+
const ln = {
|
|
1909
1909
|
small: 24,
|
|
1910
1910
|
medium: 48
|
|
1911
1911
|
}, ar = ({ element: e = "div", contributors: { total: t, data: n } = { total: void 0, data: [] }, styling: { showText: r, size: a, showGap: l, showPlaceholders: d } = { showText: !0, size: "medium", showGap: !0, showPlaceholders: !1 }, cutoff: o = 2, className: i = "" }) => {
|
|
@@ -1916,10 +1916,10 @@ const an = {
|
|
|
1916
1916
|
/* @__PURE__ */ s.jsx("ul", { children: n.map((u, f) => {
|
|
1917
1917
|
let h, p = "";
|
|
1918
1918
|
if (f < o) {
|
|
1919
|
-
const { name: _ = "", image: j = "" } =
|
|
1919
|
+
const { name: _ = "", image: j = "" } = Sn(u);
|
|
1920
1920
|
if (d)
|
|
1921
|
-
return /* @__PURE__ */ s.jsx(
|
|
1922
|
-
h = /* @__PURE__ */ s.jsx(
|
|
1921
|
+
return /* @__PURE__ */ s.jsx(je, { element: "li", className: "contributor" }, f);
|
|
1922
|
+
h = /* @__PURE__ */ s.jsx(Ot, { name: _, src: j, width: ln[a || "medium"], height: ln[a || "medium"] });
|
|
1923
1923
|
} else if (f === o) {
|
|
1924
1924
|
const _ = (t || n.length) - o;
|
|
1925
1925
|
h = /* @__PURE__ */ s.jsxs("small", { className: E({ "large-number": _ > 99 }), children: [
|
|
@@ -1929,7 +1929,7 @@ const an = {
|
|
|
1929
1929
|
}
|
|
1930
1930
|
return h ? /* @__PURE__ */ s.jsx("li", { className: E("contributor", p), children: h }, f) : null;
|
|
1931
1931
|
}) }),
|
|
1932
|
-
r && /* @__PURE__ */ s.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? c.formatMessage({ id: `member_${n[0]}` }) :
|
|
1932
|
+
r && /* @__PURE__ */ s.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? c.formatMessage({ id: `member_${n[0]}` }) : tt(n[0].name || "", 20) : null })
|
|
1933
1933
|
] }) }
|
|
1934
1934
|
);
|
|
1935
1935
|
}, ir = ({ showDevTools: e = !0, children: t }) => {
|
|
@@ -1949,10 +1949,10 @@ const an = {
|
|
|
1949
1949
|
e && /* @__PURE__ */ s.jsx(ms, { initialIsOpen: !1 })
|
|
1950
1950
|
] });
|
|
1951
1951
|
};
|
|
1952
|
-
var lr =
|
|
1952
|
+
var lr = Ft({ client: Xe });
|
|
1953
1953
|
function cr(e) {
|
|
1954
|
-
var t = e.children, n = e.client, r = e.apiKey, a = e.options, l =
|
|
1955
|
-
return n && r && console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."), n && a && console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."), n || (r && (
|
|
1954
|
+
var t = e.children, n = e.client, r = e.apiKey, a = e.options, l = et(function() {
|
|
1955
|
+
return n && r && console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."), n && a && console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."), n || (r && (Xe.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), Xe.init(r, a)), Xe);
|
|
1956
1956
|
}, [n, r]);
|
|
1957
1957
|
return A.createElement(lr.Provider, { value: { client: l } }, t);
|
|
1958
1958
|
}
|
|
@@ -1978,22 +1978,22 @@ const dr = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ s.jsx(s.F
|
|
|
1978
1978
|
...n || {}
|
|
1979
1979
|
};
|
|
1980
1980
|
return /* @__PURE__ */ s.jsx(ls, { locale: r, messages: a, children: e });
|
|
1981
|
-
},
|
|
1981
|
+
}, Se = Ft(null), mr = ({ children: e, user: t }) => /* @__PURE__ */ s.jsx(Se.Provider, { value: t, children: e }), vo = ({ bootstrap: e, children: t, intl: n }) => {
|
|
1982
1982
|
const [r, a] = F({ isLoading: !0 });
|
|
1983
|
-
return
|
|
1983
|
+
return X(() => {
|
|
1984
1984
|
e().then((l) => a({ ...l, isLoading: !1 })).catch(() => a({ isLoading: !1 }));
|
|
1985
1985
|
}, []), /* @__PURE__ */ s.jsx(ur, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ s.jsx(mr, { user: r, children: /* @__PURE__ */ s.jsx(ir, { children: /* @__PURE__ */ s.jsx(dr, { user: r, children: t }) }) }) });
|
|
1986
1986
|
};
|
|
1987
|
-
const
|
|
1987
|
+
const xt = "joinCommunityButton", Tn = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: r } = { join: () => {
|
|
1988
1988
|
}, leave: () => {
|
|
1989
1989
|
} } }) => {
|
|
1990
|
-
const a = N(), l = ge(
|
|
1991
|
-
|
|
1990
|
+
const a = N(), l = ge(Se), d = l && typeof l.id == "string", [o, i] = F(e), [c, u] = F(e ? "joined" : "notJoined");
|
|
1991
|
+
X(() => {
|
|
1992
1992
|
c === "joining" ? u("joined") : c === "leaving" && u("notJoined");
|
|
1993
1993
|
}, [o]);
|
|
1994
1994
|
const f = {}, h = {};
|
|
1995
|
-
return o && c !== "leaving" && (f["data-hover-text"] = a.formatMessage({ id: `${
|
|
1996
|
-
|
|
1995
|
+
return o && c !== "leaving" && (f["data-hover-text"] = a.formatMessage({ id: `${xt}_leave` }), f["aria-label"] = a.formatMessage({ id: `${xt}_member_aria` }), h["aria-hidden"] = "true"), /* @__PURE__ */ s.jsx(
|
|
1996
|
+
J,
|
|
1997
1997
|
{
|
|
1998
1998
|
variant: o ? "secondary" : "primary",
|
|
1999
1999
|
size: "medium",
|
|
@@ -2005,26 +2005,26 @@ const gt = "joinCommunityButton", Sn = ({ isMember: e = !1, isShort: t = !1, fun
|
|
|
2005
2005
|
className: E("join-community-button", c, { active: c === "joining" }),
|
|
2006
2006
|
disabled: !d,
|
|
2007
2007
|
...f,
|
|
2008
|
-
children: /* @__PURE__ */ s.jsx("span", { className: "text", ...h, children: a.formatMessage({ id: `${
|
|
2008
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "text", ...h, children: a.formatMessage({ id: `${xt}${["joining", "leaving"].includes(c) ? `_${c}` : o ? "_member" : t ? "_short" : ""}` }) })
|
|
2009
2009
|
}
|
|
2010
2010
|
);
|
|
2011
2011
|
};
|
|
2012
|
-
const
|
|
2012
|
+
const bt = "communityDetails_", wo = ({ isMember: e = !1, slug: t, members: { number: n, data: r } = { number: void 0, data: [] }, className: a = "", ...l }) => {
|
|
2013
2013
|
const d = N(), o = n || (r == null ? void 0 : r.length) || 0;
|
|
2014
2014
|
return /* @__PURE__ */ s.jsxs("div", { className: E("community-details", a), children: [
|
|
2015
2015
|
/* @__PURE__ */ s.jsx(De, {}),
|
|
2016
2016
|
/* @__PURE__ */ s.jsxs("div", { className: "member-details", children: [
|
|
2017
2017
|
/* @__PURE__ */ s.jsxs("div", { className: "top", children: [
|
|
2018
2018
|
/* @__PURE__ */ s.jsxs("h3", { children: [
|
|
2019
|
-
d.formatMessage({ id: `${
|
|
2019
|
+
d.formatMessage({ id: `${bt}members` }),
|
|
2020
2020
|
/* @__PURE__ */ s.jsx("span", { className: "count", children: o })
|
|
2021
2021
|
] }),
|
|
2022
|
-
/* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: `/communities/${t}/members`, children: d.formatMessage({ id: `${
|
|
2022
|
+
/* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: `/communities/${t}/members`, children: d.formatMessage({ id: `${bt}viewAll` }) }) })
|
|
2023
2023
|
] }),
|
|
2024
2024
|
/* @__PURE__ */ s.jsx(ar, { contributors: { total: n, data: r != null && r.length ? r : [{}, {}, {}, {}, {}] }, styling: { size: "medium", showGap: !0, showPlaceholders: o === 0 }, cutoff: 5 })
|
|
2025
2025
|
] }),
|
|
2026
|
-
/* @__PURE__ */ s.jsx(
|
|
2027
|
-
e && /* @__PURE__ */ s.jsx(
|
|
2026
|
+
/* @__PURE__ */ s.jsx(Tn, { isMember: e, ...l }),
|
|
2027
|
+
e && /* @__PURE__ */ s.jsx(J, { variant: "primary", icon: { icon: "plus" }, styling: { fullWidth: !0 }, children: d.formatMessage({ id: `${bt}invite` }) })
|
|
2028
2028
|
] });
|
|
2029
2029
|
};
|
|
2030
2030
|
const ko = ({
|
|
@@ -2037,7 +2037,7 @@ const ko = ({
|
|
|
2037
2037
|
/* @__PURE__ */ s.jsx(le, { element: "p", children: r.formatMessage({ id: "breadcrumbs_label" }) }),
|
|
2038
2038
|
/* @__PURE__ */ s.jsx("ul", { className: E("breadcrumbs text-small", n), children: e.map(({ text: a, href: l, current: d = !1 }, o) => /* @__PURE__ */ s.jsxs("li", { children: [
|
|
2039
2039
|
d && /* @__PURE__ */ s.jsx(le, { element: "span", children: r.formatMessage({ id: "breadcrumbs_currentPage" }) }),
|
|
2040
|
-
/* @__PURE__ */ s.jsx(
|
|
2040
|
+
/* @__PURE__ */ s.jsx(at, { href: d ? void 0 : l, children: tt(a, t) })
|
|
2041
2041
|
] }, `${window.btoa(a)}_${o}`)) })
|
|
2042
2042
|
] });
|
|
2043
2043
|
};
|
|
@@ -2077,7 +2077,7 @@ const jo = ({
|
|
|
2077
2077
|
l === "before-lang" ? r += `/${a}` : (r.includes(`/${n}/`) || (r += `/${n}`), r += `/${a}`);
|
|
2078
2078
|
}), r.includes(`/${n}/`) || (r += `/${n}`), r;
|
|
2079
2079
|
};
|
|
2080
|
-
const
|
|
2080
|
+
const vt = { en: "English", es: "Español", fr: "Français", pt: "Português" }, We = "languageSwitcher_", yo = ({
|
|
2081
2081
|
currentLanguage: e,
|
|
2082
2082
|
isOriginalLanguage: t = !1,
|
|
2083
2083
|
isHumanTranslation: n = !1,
|
|
@@ -2090,34 +2090,34 @@ const xt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2090
2090
|
className: i = ""
|
|
2091
2091
|
}) => {
|
|
2092
2092
|
const c = N(), [u, f] = F(e);
|
|
2093
|
-
if (
|
|
2093
|
+
if (X(() => {
|
|
2094
2094
|
e !== u && f(e);
|
|
2095
2095
|
}, [e]), !r || !Object.values(r).some((j) => j && j.post_name))
|
|
2096
2096
|
return null;
|
|
2097
2097
|
const p = Object.keys(r), _ = u !== e;
|
|
2098
2098
|
return /* @__PURE__ */ s.jsxs("div", { className: E("language-switcher text-small", d, i), children: [
|
|
2099
2099
|
/* @__PURE__ */ s.jsxs("nav", { children: [
|
|
2100
|
-
d !== "short" && /* @__PURE__ */ s.jsx("p", { children: o || c.formatMessage({ id: `${
|
|
2100
|
+
d !== "short" && /* @__PURE__ */ s.jsx("p", { children: o || c.formatMessage({ id: `${We}label` }) }),
|
|
2101
2101
|
/* @__PURE__ */ s.jsx("ul", { children: p.map((j) => {
|
|
2102
|
-
if (!
|
|
2102
|
+
if (!vt[j])
|
|
2103
2103
|
return null;
|
|
2104
2104
|
let g = { className: j };
|
|
2105
|
-
return u === j ? g["aria-label"] = c.formatMessage({ id: `${
|
|
2105
|
+
return u === j ? g["aria-label"] = c.formatMessage({ id: `${We}selected` }, { language: vt[j] }) : g = {
|
|
2106
2106
|
...g,
|
|
2107
2107
|
href: fr(j, l),
|
|
2108
2108
|
onClick: (S) => {
|
|
2109
2109
|
S.preventDefault(), S.stopPropagation(), f(j), a(j);
|
|
2110
2110
|
}
|
|
2111
|
-
}, /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2111
|
+
}, /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(at, { ...g, fallbackElement: "span", children: vt[j] }) }, j);
|
|
2112
2112
|
}) }),
|
|
2113
|
-
d !== "short" && !_ && /* @__PURE__ */ s.jsx("p", { children: c.formatMessage({ id: `${
|
|
2113
|
+
d !== "short" && !_ && /* @__PURE__ */ s.jsx("p", { children: c.formatMessage({ id: `${We}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2114
2114
|
] }),
|
|
2115
2115
|
d !== "short" && !_ && !t && !n && /* @__PURE__ */ s.jsx("small", {
|
|
2116
2116
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2117
2117
|
// @ts-ignore
|
|
2118
2118
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
2119
|
-
children: c.formatMessage({ id: `${
|
|
2120
|
-
email:
|
|
2119
|
+
children: c.formatMessage({ id: `${We}disclaimer` }, {
|
|
2120
|
+
email: Oe.support,
|
|
2121
2121
|
link: (j) => {
|
|
2122
2122
|
const g = `mailto:${j}`;
|
|
2123
2123
|
return /* @__PURE__ */ s.jsx("a", { href: g, children: j });
|
|
@@ -2126,7 +2126,7 @@ const xt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2126
2126
|
})
|
|
2127
2127
|
] });
|
|
2128
2128
|
};
|
|
2129
|
-
const
|
|
2129
|
+
const wt = cs({ locale: "en", messages: Lt }), hr = ({
|
|
2130
2130
|
page: e = 1,
|
|
2131
2131
|
length: t = 0,
|
|
2132
2132
|
limit: n = 10,
|
|
@@ -2134,9 +2134,9 @@ const bt = cs({ locale: "en", messages: Rt }), hr = ({
|
|
|
2134
2134
|
},
|
|
2135
2135
|
icon: a = !1,
|
|
2136
2136
|
messages: l = {
|
|
2137
|
-
button:
|
|
2138
|
-
endOfFeed:
|
|
2139
|
-
error:
|
|
2137
|
+
button: wt.formatMessage({ id: "loadMore_button" }),
|
|
2138
|
+
endOfFeed: wt.formatMessage({ id: "loadMore_endOfFeed" }),
|
|
2139
|
+
error: wt.formatMessage({ id: "loadMore_error" })
|
|
2140
2140
|
},
|
|
2141
2141
|
className: d = "",
|
|
2142
2142
|
gtmContext: o = "LoadMore"
|
|
@@ -2154,7 +2154,7 @@ const bt = cs({ locale: "en", messages: Rt }), hr = ({
|
|
|
2154
2154
|
return /* @__PURE__ */ s.jsxs("footer", { className: E("load-more", d), children: [
|
|
2155
2155
|
i && /* @__PURE__ */ s.jsx("p", { className: "error", children: l.error }),
|
|
2156
2156
|
u ? /* @__PURE__ */ s.jsx("p", { children: l.endOfFeed }) : /* @__PURE__ */ s.jsx(
|
|
2157
|
-
|
|
2157
|
+
J,
|
|
2158
2158
|
{
|
|
2159
2159
|
variant: "secondary",
|
|
2160
2160
|
icon: a,
|
|
@@ -2168,19 +2168,19 @@ const bt = cs({ locale: "en", messages: Rt }), hr = ({
|
|
|
2168
2168
|
)
|
|
2169
2169
|
] });
|
|
2170
2170
|
};
|
|
2171
|
-
let
|
|
2171
|
+
let Ve = !1;
|
|
2172
2172
|
const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r = "" }) => {
|
|
2173
|
-
const a = N(), l =
|
|
2173
|
+
const a = N(), l = ne(null), [d, o] = F(!1), i = (c) => {
|
|
2174
2174
|
l.current && c.target instanceof HTMLElement && !l.current.contains(c.target) && o(!1);
|
|
2175
2175
|
};
|
|
2176
|
-
return
|
|
2176
|
+
return X(() => (document.addEventListener("click", i, !0), () => {
|
|
2177
2177
|
document.removeEventListener("click", i, !0);
|
|
2178
2178
|
})), A.createElement(e, {
|
|
2179
2179
|
ref: l,
|
|
2180
2180
|
className: E("more-menu text-medium", r),
|
|
2181
2181
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2182
2182
|
/* @__PURE__ */ s.jsx(
|
|
2183
|
-
|
|
2183
|
+
J,
|
|
2184
2184
|
{
|
|
2185
2185
|
variant: "tertiary",
|
|
2186
2186
|
size: "medium",
|
|
@@ -2199,16 +2199,16 @@ const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2199
2199
|
o(!1), typeof u == "function" && u(g);
|
|
2200
2200
|
},
|
|
2201
2201
|
onFocus: () => {
|
|
2202
|
-
|
|
2202
|
+
Ve && (clearTimeout(Ve), Ve = !1);
|
|
2203
2203
|
},
|
|
2204
2204
|
onBlur: () => {
|
|
2205
|
-
|
|
2205
|
+
Ve = setTimeout(() => {
|
|
2206
2206
|
o(!1);
|
|
2207
2207
|
}, 100);
|
|
2208
2208
|
}
|
|
2209
2209
|
};
|
|
2210
2210
|
return c && (j.href = c), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2211
|
-
|
|
2211
|
+
J,
|
|
2212
2212
|
{
|
|
2213
2213
|
variant: "tertiary",
|
|
2214
2214
|
size: "medium",
|
|
@@ -2221,32 +2221,32 @@ const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2221
2221
|
] })
|
|
2222
2222
|
});
|
|
2223
2223
|
};
|
|
2224
|
-
const
|
|
2224
|
+
const $n = ({ variant: e = "default", version: t = "default", className: n = "", ...r }) => /* @__PURE__ */ s.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ s.jsx("a", { href: "/home/", className: E("logo", e, t, n), ...r, children: /* @__PURE__ */ s.jsx(le, { children: /* @__PURE__ */ s.jsx(ye, { id: "apolitical" }) }) }) });
|
|
2225
2225
|
const gr = {
|
|
2226
2226
|
"2-1": 901
|
|
2227
2227
|
}, Eo = ({ layout: e = "2-1", hideOnMobile: t = !1, className: n = "", children: r }) => {
|
|
2228
|
-
const a =
|
|
2228
|
+
const a = rt(!0);
|
|
2229
2229
|
let l = r;
|
|
2230
2230
|
return A.Children.count(r) === 1 && (l = A.Children.toArray(r)[0], l.props && (l = l.props.children)), /* @__PURE__ */ s.jsx("section", { className: E("columns", `layout-${e}`, n), children: A.Children.map(l, (d, o) => t !== !1 && o === t && a && a < gr[e] ? null : d) });
|
|
2231
2231
|
};
|
|
2232
|
-
const
|
|
2233
|
-
const e = N(), [t, n, r] = fs(
|
|
2234
|
-
|
|
2232
|
+
const kt = "cookieBanner_", jt = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], yt = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), _r = () => {
|
|
2233
|
+
const e = N(), [t, n, r] = fs(jt), [a, l] = F(!t["apol-cookie-banner"]), d = () => {
|
|
2234
|
+
jt.forEach((u) => {
|
|
2235
2235
|
n(u, !0, {
|
|
2236
2236
|
path: "/",
|
|
2237
|
-
expires:
|
|
2237
|
+
expires: yt,
|
|
2238
2238
|
domain: u === "apolitical-performance-cookie-consent" ? ".apolitical.co" : void 0
|
|
2239
2239
|
});
|
|
2240
2240
|
}), l(!1), window.location.reload();
|
|
2241
2241
|
}, o = () => {
|
|
2242
2242
|
n("apol-cookie-banner", !0, {
|
|
2243
2243
|
path: "/",
|
|
2244
|
-
expires:
|
|
2245
|
-
}),
|
|
2244
|
+
expires: yt
|
|
2245
|
+
}), jt.forEach((u) => {
|
|
2246
2246
|
if (u === "apol-cookie-banner") {
|
|
2247
2247
|
n(u, !0, {
|
|
2248
2248
|
path: "/",
|
|
2249
|
-
expires:
|
|
2249
|
+
expires: yt
|
|
2250
2250
|
});
|
|
2251
2251
|
return;
|
|
2252
2252
|
}
|
|
@@ -2268,14 +2268,14 @@ const vt = "cookieBanner_", wt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2268
2268
|
className: "gtm-trackable",
|
|
2269
2269
|
"data-gtm-event-context": "cookie-banner",
|
|
2270
2270
|
"data-gtm-event-type": `cookie-${u.gtmType}-click`,
|
|
2271
|
-
children: e.formatMessage({ id: `${
|
|
2271
|
+
children: e.formatMessage({ id: `${kt}buttons_${u.id}` })
|
|
2272
2272
|
});
|
|
2273
2273
|
}), /* @__PURE__ */ s.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
2274
|
-
/* @__PURE__ */ s.jsx("h6", { children: e.formatMessage({ id: `${
|
|
2275
|
-
/* @__PURE__ */ s.jsx("p", { children: e.formatMessage({ id: `${
|
|
2276
|
-
/* @__PURE__ */ s.jsx(
|
|
2274
|
+
/* @__PURE__ */ s.jsx("h6", { children: e.formatMessage({ id: `${kt}title` }) }),
|
|
2275
|
+
/* @__PURE__ */ s.jsx("p", { children: e.formatMessage({ id: `${kt}text` }) }),
|
|
2276
|
+
/* @__PURE__ */ s.jsx(ot, { buttons: c })
|
|
2277
2277
|
] });
|
|
2278
|
-
},
|
|
2278
|
+
}, we = {
|
|
2279
2279
|
platform: {
|
|
2280
2280
|
order: ["events", "courses", "qanda", "articles"],
|
|
2281
2281
|
// An array guarantees the right order
|
|
@@ -2340,11 +2340,11 @@ const vt = "cookieBanner_", wt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2340
2340
|
text: {
|
|
2341
2341
|
order: ["dataProtection", "euDataProtection"],
|
|
2342
2342
|
dataProtection: {
|
|
2343
|
-
email:
|
|
2343
|
+
email: Oe["data-protection"].default,
|
|
2344
2344
|
gtmType: "email-dpo-link"
|
|
2345
2345
|
},
|
|
2346
2346
|
euDataProtection: {
|
|
2347
|
-
email:
|
|
2347
|
+
email: Oe["data-protection"].eu,
|
|
2348
2348
|
gtmType: "email-eu-dpo-link"
|
|
2349
2349
|
}
|
|
2350
2350
|
}
|
|
@@ -2356,10 +2356,10 @@ const vt = "cookieBanner_", wt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2356
2356
|
registered: { address: !0 },
|
|
2357
2357
|
berlin: { address: !0 },
|
|
2358
2358
|
support: {
|
|
2359
|
-
email:
|
|
2359
|
+
email: Oe.support,
|
|
2360
2360
|
gtmType: "concierge-email-click"
|
|
2361
2361
|
},
|
|
2362
|
-
business: { email:
|
|
2362
|
+
business: { email: Oe.general, gtmType: "hello-email-click" }
|
|
2363
2363
|
}
|
|
2364
2364
|
},
|
|
2365
2365
|
social: {
|
|
@@ -2369,37 +2369,37 @@ const vt = "cookieBanner_", wt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2369
2369
|
facebook: { href: "https://www.facebook.com/apoliticalco" }
|
|
2370
2370
|
}
|
|
2371
2371
|
};
|
|
2372
|
-
const Me = "footer_",
|
|
2373
|
-
const t =
|
|
2372
|
+
const Me = "footer_", Ze = "SiteFooter", cn = ({ group: e }) => {
|
|
2373
|
+
const t = we[e].order || [];
|
|
2374
2374
|
let n = !1;
|
|
2375
|
-
return "text" in
|
|
2376
|
-
/* @__PURE__ */ s.jsx("p", { className: "pre-title", children: /* @__PURE__ */ s.jsx(
|
|
2375
|
+
return "text" in we[e] && (n = we[e].text), /* @__PURE__ */ s.jsxs(Ct, { children: [
|
|
2376
|
+
/* @__PURE__ */ s.jsx("p", { className: "pre-title", children: /* @__PURE__ */ s.jsx(ye, { id: `${Me}${e}` }) }),
|
|
2377
2377
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ s.jsx("ul", { className: "text-medium", children: t.map((r) => {
|
|
2378
2378
|
if (["order", "child", "text"].includes(r))
|
|
2379
2379
|
return null;
|
|
2380
|
-
const { href: a, gtmType: l } =
|
|
2380
|
+
const { href: a, gtmType: l } = we[e][r], d = {};
|
|
2381
2381
|
return ["legal"].includes(e) && (d.target = "_blank", d.rel = "noopener"), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2382
2382
|
"a",
|
|
2383
2383
|
{
|
|
2384
2384
|
href: a,
|
|
2385
2385
|
className: "gtm-trackable",
|
|
2386
|
-
"data-gtm-event-context":
|
|
2386
|
+
"data-gtm-event-context": Ze,
|
|
2387
2387
|
"data-gtm-event-type": l,
|
|
2388
2388
|
...d,
|
|
2389
|
-
children: /* @__PURE__ */ s.jsx(
|
|
2389
|
+
children: /* @__PURE__ */ s.jsx(ye, { id: `${Me}${e}_${r}` })
|
|
2390
2390
|
}
|
|
2391
2391
|
) }, `${e}_${r}`);
|
|
2392
2392
|
}) }),
|
|
2393
|
-
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ s.jsx("dl", { className: "text-medium", children: n.order.map((r) => /* @__PURE__ */ s.jsxs(
|
|
2394
|
-
/* @__PURE__ */ s.jsx("dt", { children: /* @__PURE__ */ s.jsx(
|
|
2393
|
+
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ s.jsx("dl", { className: "text-medium", children: n.order.map((r) => /* @__PURE__ */ s.jsxs(Ct, { children: [
|
|
2394
|
+
/* @__PURE__ */ s.jsx("dt", { children: /* @__PURE__ */ s.jsx(ye, { id: `${Me}${e}_${r}` }) }),
|
|
2395
2395
|
/* @__PURE__ */ s.jsxs("dd", { children: [
|
|
2396
|
-
typeof n != "boolean" && n[r].address && /* @__PURE__ */ s.jsx("address", { children: /* @__PURE__ */ s.jsx(
|
|
2396
|
+
typeof n != "boolean" && n[r].address && /* @__PURE__ */ s.jsx("address", { children: /* @__PURE__ */ s.jsx(ye, { id: `${Me}${e}_${r}_address`, values: { br: /* @__PURE__ */ s.jsx("br", {}) } }) }),
|
|
2397
2397
|
typeof n != "boolean" && n[r].email && /* @__PURE__ */ s.jsx(
|
|
2398
2398
|
"a",
|
|
2399
2399
|
{
|
|
2400
2400
|
href: `mailto:${n[r].email}`,
|
|
2401
2401
|
className: "gtm-trackable",
|
|
2402
|
-
"data-gtm-event-context":
|
|
2402
|
+
"data-gtm-event-context": Ze,
|
|
2403
2403
|
"data-gtm-event-type": n[r].gtmType,
|
|
2404
2404
|
children: n[r].email
|
|
2405
2405
|
}
|
|
@@ -2407,26 +2407,26 @@ const Me = "footer_", Je = "SiteFooter", ln = ({ group: e }) => {
|
|
|
2407
2407
|
] })
|
|
2408
2408
|
] }, `dl-${e}-${r}`)) })
|
|
2409
2409
|
] }, e);
|
|
2410
|
-
},
|
|
2411
|
-
/* @__PURE__ */ s.jsx(
|
|
2410
|
+
}, Mn = () => /* @__PURE__ */ s.jsx("div", { id: "footer", children: /* @__PURE__ */ s.jsxs("div", { className: "wrapper", children: [
|
|
2411
|
+
/* @__PURE__ */ s.jsx(gn, { element: "hr" }),
|
|
2412
2412
|
/* @__PURE__ */ s.jsx(
|
|
2413
|
-
|
|
2413
|
+
$n,
|
|
2414
2414
|
{
|
|
2415
2415
|
variant: "inverted",
|
|
2416
2416
|
version: "full",
|
|
2417
2417
|
className: "gtm-trackable",
|
|
2418
|
-
"data-gtm-event-context":
|
|
2418
|
+
"data-gtm-event-context": Ze,
|
|
2419
2419
|
"data-gtm-event-type": "logo-homepage-link"
|
|
2420
2420
|
}
|
|
2421
2421
|
),
|
|
2422
2422
|
/* @__PURE__ */ s.jsx("footer", { children: ["platform", "community", "company", "contact"].map((e) => /* @__PURE__ */ s.jsxs("div", { className: "group", children: [
|
|
2423
|
-
/* @__PURE__ */ s.jsx(
|
|
2424
|
-
Object.keys(
|
|
2423
|
+
/* @__PURE__ */ s.jsx(cn, { group: e }),
|
|
2424
|
+
Object.keys(we[e]).includes("child") && /* @__PURE__ */ s.jsx(cn, { group: we[e].child })
|
|
2425
2425
|
] }, e)) }),
|
|
2426
2426
|
/* @__PURE__ */ s.jsx("hr", {}),
|
|
2427
2427
|
/* @__PURE__ */ s.jsxs("div", { className: "sub-footer", children: [
|
|
2428
|
-
/* @__PURE__ */ s.jsx("ul", { children: Array.isArray(
|
|
2429
|
-
const t =
|
|
2428
|
+
/* @__PURE__ */ s.jsx("ul", { children: Array.isArray(we.social.order) && we.social.order.map((e) => {
|
|
2429
|
+
const t = we.social[e];
|
|
2430
2430
|
return /* @__PURE__ */ s.jsx("li", { className: e, children: /* @__PURE__ */ s.jsx(
|
|
2431
2431
|
"a",
|
|
2432
2432
|
{
|
|
@@ -2434,22 +2434,22 @@ const Me = "footer_", Je = "SiteFooter", ln = ({ group: e }) => {
|
|
|
2434
2434
|
target: "_blank",
|
|
2435
2435
|
rel: "noopener noreferrer",
|
|
2436
2436
|
className: "gtm-trackable",
|
|
2437
|
-
"data-gtm-event-context":
|
|
2437
|
+
"data-gtm-event-context": Ze,
|
|
2438
2438
|
"data-gtm-event-type": "social-click",
|
|
2439
|
-
children: /* @__PURE__ */ s.jsx("span", { className: "hidden", children: /* @__PURE__ */ s.jsx(
|
|
2439
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "hidden", children: /* @__PURE__ */ s.jsx(ye, { id: `${Me}social_${e}` }) })
|
|
2440
2440
|
}
|
|
2441
2441
|
) }, e);
|
|
2442
2442
|
}) }),
|
|
2443
|
-
/* @__PURE__ */ s.jsx("small", { children: /* @__PURE__ */ s.jsx(
|
|
2443
|
+
/* @__PURE__ */ s.jsx("small", { children: /* @__PURE__ */ s.jsx(ye, { id: `${Me}copyright`, values: { currentYear: (/* @__PURE__ */ new Date()).getFullYear() } }) })
|
|
2444
2444
|
] })
|
|
2445
2445
|
] }) });
|
|
2446
|
-
const
|
|
2447
|
-
const a = N(), [l, d] = F({ path: `${
|
|
2446
|
+
const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, resendVerificationCode: r }) => {
|
|
2447
|
+
const a = N(), [l, d] = F({ path: `${Ye}default`, type: "default", link: {}, mail: {}, error: "" }), [o, i] = F(!1), c = ke(
|
|
2448
2448
|
(p) => {
|
|
2449
2449
|
p.preventDefault(), p.stopPropagation();
|
|
2450
2450
|
const _ = (j) => {
|
|
2451
2451
|
d({
|
|
2452
|
-
path: `${
|
|
2452
|
+
path: `${Ye}error_verificationFailedToSend`,
|
|
2453
2453
|
type: "error",
|
|
2454
2454
|
link: {
|
|
2455
2455
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
@@ -2469,7 +2469,7 @@ const We = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2469
2469
|
});
|
|
2470
2470
|
};
|
|
2471
2471
|
if (typeof r != "function") {
|
|
2472
|
-
_(a.formatMessage({ id: `${
|
|
2472
|
+
_(a.formatMessage({ id: `${Ye}error_noFunction` }));
|
|
2473
2473
|
return;
|
|
2474
2474
|
}
|
|
2475
2475
|
i(!0), r(t).then(() => {
|
|
@@ -2483,9 +2483,9 @@ const We = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2483
2483
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2484
2484
|
[t, n, r]
|
|
2485
2485
|
);
|
|
2486
|
-
|
|
2486
|
+
X(
|
|
2487
2487
|
() => {
|
|
2488
|
-
let p =
|
|
2488
|
+
let p = Ye, _ = "default", j = {}, g = {};
|
|
2489
2489
|
switch (e) {
|
|
2490
2490
|
case "gov":
|
|
2491
2491
|
p += "autoApproved", _ = "success";
|
|
@@ -2544,8 +2544,8 @@ const We = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2544
2544
|
return ["link", "mail"].forEach((p) => {
|
|
2545
2545
|
u[p] = Object.keys(l[p]).length ? (_) => /* @__PURE__ */ s.jsx("a", { ...l[p], children: _ }) : (_) => _;
|
|
2546
2546
|
}), /* @__PURE__ */ s.jsx(zs, { type: l.type, heading: o ? !1 : a.formatMessage({ id: `${l.path}_title` }), children: o ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2547
|
-
/* @__PURE__ */ s.jsx(
|
|
2548
|
-
/* @__PURE__ */ s.jsx(
|
|
2547
|
+
/* @__PURE__ */ s.jsx(je, { element: "span" }),
|
|
2548
|
+
/* @__PURE__ */ s.jsx(je, { element: "span" })
|
|
2549
2549
|
] }) : (
|
|
2550
2550
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2551
2551
|
// @ts-ignore
|
|
@@ -2565,24 +2565,24 @@ const We = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2565
2565
|
)
|
|
2566
2566
|
) });
|
|
2567
2567
|
};
|
|
2568
|
-
const
|
|
2569
|
-
[
|
|
2570
|
-
[
|
|
2571
|
-
[
|
|
2568
|
+
const Ge = "passwordRules_", Cn = "isMoreThanEightCharacters", Dn = "includesNumberAndSymbol", An = "includesLowerAndUppercase", xr = {
|
|
2569
|
+
[Cn]: "8Characters",
|
|
2570
|
+
[Dn]: "numberSymbol",
|
|
2571
|
+
[An]: "lowercaseUppercase"
|
|
2572
2572
|
}, br = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
|
|
2573
2573
|
const n = N();
|
|
2574
2574
|
return /* @__PURE__ */ s.jsxs("aside", { className: E("password-rules", t), children: [
|
|
2575
|
-
/* @__PURE__ */ s.jsx("small", { children: n.formatMessage({ id: `${
|
|
2576
|
-
/* @__PURE__ */ s.jsx("ul", { children: [
|
|
2575
|
+
/* @__PURE__ */ s.jsx("small", { children: n.formatMessage({ id: `${Ge}intro` }) }),
|
|
2576
|
+
/* @__PURE__ */ s.jsx("ul", { children: [Cn, Dn, An].map((r) => /* @__PURE__ */ s.jsxs("li", { className: E({ matches: e[r] }), children: [
|
|
2577
2577
|
/* @__PURE__ */ s.jsxs(le, { children: [
|
|
2578
|
-
n.formatMessage({ id: `${
|
|
2578
|
+
n.formatMessage({ id: `${Ge}rule_label` }),
|
|
2579
2579
|
" "
|
|
2580
2580
|
] }),
|
|
2581
|
-
/* @__PURE__ */ s.jsx("span", { children: n.formatMessage({ id: `${
|
|
2581
|
+
/* @__PURE__ */ s.jsx("span", { children: n.formatMessage({ id: `${Ge}rule_${xr[r]}` }) }),
|
|
2582
2582
|
!e[r] && /* @__PURE__ */ s.jsxs(le, { element: "strong", children: [
|
|
2583
2583
|
" ",
|
|
2584
2584
|
" ",
|
|
2585
|
-
n.formatMessage({ id: `${
|
|
2585
|
+
n.formatMessage({ id: `${Ge}notMet` })
|
|
2586
2586
|
] })
|
|
2587
2587
|
] }, `rule-${r}`)) })
|
|
2588
2588
|
] });
|
|
@@ -2604,10 +2604,10 @@ const $o = ({
|
|
|
2604
2604
|
c((k) => ({ ...k, setUp: !0, disabled: !0 })), a(S);
|
|
2605
2605
|
}
|
|
2606
2606
|
};
|
|
2607
|
-
if (
|
|
2607
|
+
if (X(() => {
|
|
2608
2608
|
d && !i.setUp && u();
|
|
2609
2609
|
}, [d]), !d)
|
|
2610
|
-
return /* @__PURE__ */ s.jsx(
|
|
2610
|
+
return /* @__PURE__ */ s.jsx(je, { className: "rating-placeholder" });
|
|
2611
2611
|
const { id: f, rating: h, disabled: p } = i, _ = "ratings_", j = {
|
|
2612
2612
|
text: o.formatMessage({ id: `${_}text` }),
|
|
2613
2613
|
low: o.formatMessage({ id: `${_}low` }),
|
|
@@ -2629,7 +2629,7 @@ const $o = ({
|
|
|
2629
2629
|
/* @__PURE__ */ s.jsx("ol", { children: Array.from(new Array(t).keys()).map((S) => {
|
|
2630
2630
|
const k = S + 1;
|
|
2631
2631
|
return /* @__PURE__ */ s.jsx("li", { className: E({ selected: h && k <= h }), children: /* @__PURE__ */ s.jsx(
|
|
2632
|
-
|
|
2632
|
+
J,
|
|
2633
2633
|
{
|
|
2634
2634
|
variant: "tertiary",
|
|
2635
2635
|
size: "small",
|
|
@@ -2655,7 +2655,7 @@ const vr = ({
|
|
|
2655
2655
|
gtmContext: a = "search-bar",
|
|
2656
2656
|
gtmEvent: l = "form-submission"
|
|
2657
2657
|
}) => {
|
|
2658
|
-
const { searchIsOpen: d = !0, isDesktopVersion: o = !1 } = n || {}, i = N(), c =
|
|
2658
|
+
const { searchIsOpen: d = !0, isDesktopVersion: o = !1 } = n || {}, i = N(), c = ne(null);
|
|
2659
2659
|
Ce(() => {
|
|
2660
2660
|
!n || o || !d || c.current && c.current.focus();
|
|
2661
2661
|
}, [d]);
|
|
@@ -2744,9 +2744,9 @@ const wr = ({
|
|
|
2744
2744
|
] }) }),
|
|
2745
2745
|
/* @__PURE__ */ s.jsx(De, {}),
|
|
2746
2746
|
/* @__PURE__ */ s.jsx("div", { className: "footer", children: _ === "SUCCESS" ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2747
|
-
/* @__PURE__ */ s.jsx(
|
|
2748
|
-
/* @__PURE__ */ s.jsx(
|
|
2749
|
-
] }) : /* @__PURE__ */ s.jsx(
|
|
2747
|
+
/* @__PURE__ */ s.jsx(J, { variant: "secondary", onClick: k, children: g({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
2748
|
+
/* @__PURE__ */ s.jsx(J, { onClick: T, children: g({ id: "inviteForm_ctaDone" }) })
|
|
2749
|
+
] }) : /* @__PURE__ */ s.jsx(J, { onClick: k, children: g({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
2750
2750
|
] }) : /* @__PURE__ */ s.jsxs(
|
|
2751
2751
|
"form",
|
|
2752
2752
|
{
|
|
@@ -2771,7 +2771,7 @@ const wr = ({
|
|
|
2771
2771
|
getLabel: (M, C, I) => /* @__PURE__ */ s.jsxs("div", { className: "email text-medium", children: [
|
|
2772
2772
|
/* @__PURE__ */ s.jsx("div", { "data-tag-item": !0, children: M }),
|
|
2773
2773
|
/* @__PURE__ */ s.jsx(
|
|
2774
|
-
|
|
2774
|
+
J,
|
|
2775
2775
|
{
|
|
2776
2776
|
variant: "tertiary",
|
|
2777
2777
|
size: "small",
|
|
@@ -2788,7 +2788,7 @@ const wr = ({
|
|
|
2788
2788
|
)
|
|
2789
2789
|
] }),
|
|
2790
2790
|
/* @__PURE__ */ s.jsx(De, {}),
|
|
2791
|
-
/* @__PURE__ */ s.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ s.jsx(
|
|
2791
|
+
/* @__PURE__ */ s.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ s.jsx(J, { className: "sendEmailsButton", disabled: h, children: n }) })
|
|
2792
2792
|
]
|
|
2793
2793
|
}
|
|
2794
2794
|
);
|
|
@@ -2838,7 +2838,7 @@ const wr = ({
|
|
|
2838
2838
|
return e[r];
|
|
2839
2839
|
if (!t.includes("."))
|
|
2840
2840
|
continue;
|
|
2841
|
-
const a =
|
|
2841
|
+
const a = hn(e[r], t);
|
|
2842
2842
|
if (!(typeof a > "u") && (!n || a[t] && a[t].includes(n) || a.value && a.value.includes(n) || a.toString().includes(n)))
|
|
2843
2843
|
return e[r];
|
|
2844
2844
|
}
|
|
@@ -2892,7 +2892,7 @@ const wr = ({
|
|
|
2892
2892
|
}, 250);
|
|
2893
2893
|
}
|
|
2894
2894
|
}
|
|
2895
|
-
},
|
|
2895
|
+
}, Ke = {
|
|
2896
2896
|
order: ["home", "topics", "partners", "account"],
|
|
2897
2897
|
home: {
|
|
2898
2898
|
href: "/home/",
|
|
@@ -2968,7 +2968,7 @@ const wr = ({
|
|
|
2968
2968
|
props: { variant: "primary" }
|
|
2969
2969
|
}
|
|
2970
2970
|
}
|
|
2971
|
-
},
|
|
2971
|
+
}, qe = ({
|
|
2972
2972
|
id: e,
|
|
2973
2973
|
isLoggedIn: t = !1,
|
|
2974
2974
|
isDesktopVersion: n = !1,
|
|
@@ -2977,7 +2977,7 @@ const wr = ({
|
|
|
2977
2977
|
},
|
|
2978
2978
|
doTrack: l = null
|
|
2979
2979
|
}) => {
|
|
2980
|
-
const d = N(), o =
|
|
2980
|
+
const d = N(), o = hn(Ke, e);
|
|
2981
2981
|
if (!o || o.onlyShow && (o.onlyShow === "logged-in" && !t || o.onlyShow === "logged-out" && t))
|
|
2982
2982
|
return null;
|
|
2983
2983
|
const i = "doTrack" in o, c = l === null ? i ? o.doTrack : !0 : l, u = e.includes("buttons.");
|
|
@@ -3031,7 +3031,7 @@ const wr = ({
|
|
|
3031
3031
|
});
|
|
3032
3032
|
}
|
|
3033
3033
|
return /* @__PURE__ */ s.jsxs("li", { className: E({ [o.className]: o.className, "has-submenu": p, parent: _, active: j }), role: "none", ...g, children: [
|
|
3034
|
-
h ? A.createElement(u ?
|
|
3034
|
+
h ? A.createElement(u ? J : "a", h, d.formatMessage({ id: f })) : d.formatMessage({ id: f }),
|
|
3035
3035
|
o.order && /* @__PURE__ */ s.jsx("ul", { ...S, children: o.order.map((k) => {
|
|
3036
3036
|
if (!o[k])
|
|
3037
3037
|
return null;
|
|
@@ -3044,13 +3044,13 @@ const wr = ({
|
|
|
3044
3044
|
};
|
|
3045
3045
|
return o[k].order ? /* @__PURE__ */ s.jsxs("li", { className: E({ [o[k].className]: o[k].className }), children: [
|
|
3046
3046
|
d.formatMessage({ id: `${f}_${k}` }),
|
|
3047
|
-
/* @__PURE__ */ s.jsx("ul", { children: o[k].order.map((M) => /* @__PURE__ */ s.jsx(
|
|
3048
|
-
] }, k) : /* @__PURE__ */ s.jsx(
|
|
3047
|
+
/* @__PURE__ */ s.jsx("ul", { children: o[k].order.map((M) => /* @__PURE__ */ s.jsx(qe, { id: `${e}.${k}.${M}`, ...T }, M)) })
|
|
3048
|
+
] }, k) : /* @__PURE__ */ s.jsx(qe, { id: `${e}.${k}`, ...T }, k);
|
|
3049
3049
|
}) })
|
|
3050
3050
|
] }, e);
|
|
3051
3051
|
};
|
|
3052
|
-
const kr = { height: 67, height_desktop: 83 },
|
|
3053
|
-
const e = N(), t = ge(
|
|
3052
|
+
const kr = { height: 67, height_desktop: 83 }, Nn = () => {
|
|
3053
|
+
const e = N(), t = ge(Se), n = rt(!0, !0), r = t && typeof t.id == "string", a = et(
|
|
3054
3054
|
() => H.getIsDesktopVersion(r, n),
|
|
3055
3055
|
[r, n]
|
|
3056
3056
|
), [l, d] = rs($s, {
|
|
@@ -3074,7 +3074,7 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3074
3074
|
});
|
|
3075
3075
|
const u = (h, p) => {
|
|
3076
3076
|
H.handleMenus({ id: h, value: p, menus: i, dispatch: d });
|
|
3077
|
-
}, f =
|
|
3077
|
+
}, f = ne(null);
|
|
3078
3078
|
return Ce(() => {
|
|
3079
3079
|
i.navigation && H.autoFocus({
|
|
3080
3080
|
menu: "navigation",
|
|
@@ -3094,7 +3094,7 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3094
3094
|
}, [i.account]), t && t.isLoading ? null : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3095
3095
|
/* @__PURE__ */ s.jsxs("nav", { id: "header", className: E({ "logged-in": r, "logged-out": !r, visible: o }), children: [
|
|
3096
3096
|
/* @__PURE__ */ s.jsx(le, { element: "a", href: "#content-of-page", children: e.formatMessage({ id: "header_skip" }) }),
|
|
3097
|
-
/* @__PURE__ */ s.jsx(
|
|
3097
|
+
/* @__PURE__ */ s.jsx($n, {}),
|
|
3098
3098
|
!a.navigation && /* @__PURE__ */ s.jsx(
|
|
3099
3099
|
"button",
|
|
3100
3100
|
{
|
|
@@ -3118,8 +3118,8 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3118
3118
|
hidden: a.navigation || i.account ? !1 : !i.navigation,
|
|
3119
3119
|
role: "menu",
|
|
3120
3120
|
"data-showing": !a.navigation && i.account ? "account" : "default",
|
|
3121
|
-
children:
|
|
3122
|
-
|
|
3121
|
+
children: Ke.order.map((h) => /* @__PURE__ */ s.jsx(
|
|
3122
|
+
qe,
|
|
3123
3123
|
{
|
|
3124
3124
|
id: h,
|
|
3125
3125
|
isLoggedIn: r,
|
|
@@ -3165,10 +3165,10 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3165
3165
|
"aria-controls": "navigation",
|
|
3166
3166
|
children: [
|
|
3167
3167
|
/* @__PURE__ */ s.jsx(le, { children: e.formatMessage({ id: `header_account_${i.account ? "hide" : "show"}` }) }),
|
|
3168
|
-
/* @__PURE__ */ s.jsx(
|
|
3168
|
+
/* @__PURE__ */ s.jsx(Ot, { name: t && t.name || "", src: t && t.image && t.image.thumbnail || "" })
|
|
3169
3169
|
]
|
|
3170
3170
|
}
|
|
3171
|
-
) : /* @__PURE__ */ s.jsx("ul", { className: "sign-in-buttons", children:
|
|
3171
|
+
) : /* @__PURE__ */ s.jsx("ul", { className: "sign-in-buttons", children: Ke.buttons.order.map((h) => /* @__PURE__ */ s.jsx(qe, { id: `buttons.${h}` }, h)) })
|
|
3172
3172
|
] }),
|
|
3173
3173
|
/* @__PURE__ */ s.jsx("hr", { id: "content-of-page" }),
|
|
3174
3174
|
/* @__PURE__ */ s.jsx(
|
|
@@ -3182,26 +3182,26 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3182
3182
|
const jr = () => {
|
|
3183
3183
|
const e = N();
|
|
3184
3184
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3185
|
-
/* @__PURE__ */ s.jsx(
|
|
3186
|
-
/* @__PURE__ */ s.jsx("div", { className: "content", children: /* @__PURE__ */ s.jsx(
|
|
3187
|
-
/* @__PURE__ */ s.jsx(
|
|
3185
|
+
/* @__PURE__ */ s.jsx(Nn, {}),
|
|
3186
|
+
/* @__PURE__ */ s.jsx("div", { className: "content", children: /* @__PURE__ */ s.jsx(it, { variant: "error", text: e.formatMessage({ id: "pageLayout_error" }) }) }),
|
|
3187
|
+
/* @__PURE__ */ s.jsx(Mn, {})
|
|
3188
3188
|
] });
|
|
3189
3189
|
}, Mo = ({ children: e, reportError: t, showFooter: n = !0, background: r = "default", className: a = "", locale: l = "en" }) => {
|
|
3190
3190
|
const d = Es();
|
|
3191
|
-
|
|
3191
|
+
X(() => {
|
|
3192
3192
|
window.scrollTo(0, 0);
|
|
3193
3193
|
}, [d]);
|
|
3194
|
-
const o =
|
|
3194
|
+
const o = vn(e, { locale: l });
|
|
3195
3195
|
return /* @__PURE__ */ s.jsx(gs, { onError: t, fallback: /* @__PURE__ */ s.jsx(jr, {}), children: /* @__PURE__ */ s.jsx(os, { fallback: /* @__PURE__ */ s.jsx(sr, { layout: "overview-page" }), children: /* @__PURE__ */ s.jsx("div", { id: "wrapper", className: E(a, { [r]: r !== "default" }), children: /* @__PURE__ */ s.jsxs(hs, { children: [
|
|
3196
|
-
/* @__PURE__ */ s.jsx(
|
|
3196
|
+
/* @__PURE__ */ s.jsx(Nn, {}),
|
|
3197
3197
|
/* @__PURE__ */ s.jsx("div", { className: "content", children: o }),
|
|
3198
|
-
n && /* @__PURE__ */ s.jsx(
|
|
3198
|
+
n && /* @__PURE__ */ s.jsx(Mn, {}),
|
|
3199
3199
|
/* @__PURE__ */ s.jsx(_r, {})
|
|
3200
3200
|
] }) }) }) });
|
|
3201
|
-
},
|
|
3201
|
+
}, dn = {
|
|
3202
3202
|
default: "tags_",
|
|
3203
3203
|
headerTopics: "header_topics_topics_"
|
|
3204
|
-
},
|
|
3204
|
+
}, Et = {
|
|
3205
3205
|
topic: {
|
|
3206
3206
|
Climate: "climate",
|
|
3207
3207
|
CitiesAndLocalGovernment: "cities-and-local-government",
|
|
@@ -3220,13 +3220,13 @@ const jr = () => {
|
|
|
3220
3220
|
}, yr = {
|
|
3221
3221
|
getTagDetails: (e) => {
|
|
3222
3222
|
if (e.includes("topic_")) {
|
|
3223
|
-
if (e =
|
|
3224
|
-
const t =
|
|
3225
|
-
return t ? { id: e, href: t, text: `${
|
|
3223
|
+
if (e = Et.topic[e.replace("topic_", "")], e) {
|
|
3224
|
+
const t = Ke.topics.topics[e].href;
|
|
3225
|
+
return t ? { id: e, href: t, text: `${dn.headerTopics}${e}` } : null;
|
|
3226
3226
|
}
|
|
3227
3227
|
return null;
|
|
3228
3228
|
}
|
|
3229
|
-
return
|
|
3229
|
+
return Et[e] ? (e = Et[e], { id: e, text: `${dn.default}${e}` }) : null;
|
|
3230
3230
|
}
|
|
3231
3231
|
};
|
|
3232
3232
|
const Co = ({
|
|
@@ -3275,7 +3275,7 @@ const Do = ({
|
|
|
3275
3275
|
/* @__PURE__ */ s.jsx("span", { className: "count", children: e })
|
|
3276
3276
|
] }),
|
|
3277
3277
|
/* @__PURE__ */ s.jsx("ul", { children: t.map((o, i) => /* @__PURE__ */ s.jsxs("li", { children: [
|
|
3278
|
-
/* @__PURE__ */ s.jsx(
|
|
3278
|
+
/* @__PURE__ */ s.jsx(Bt, { member: o, gtmContext: r, gtmType: a }),
|
|
3279
3279
|
o.isAdmin && /* @__PURE__ */ s.jsx(qs, { children: d.formatMessage({ id: "membersList_admin" }) })
|
|
3280
3280
|
] }, i)) }),
|
|
3281
3281
|
n && /* @__PURE__ */ s.jsx(
|
|
@@ -3288,8 +3288,8 @@ const Do = ({
|
|
|
3288
3288
|
)
|
|
3289
3289
|
] }));
|
|
3290
3290
|
};
|
|
3291
|
-
let
|
|
3292
|
-
const
|
|
3291
|
+
let Je = null;
|
|
3292
|
+
const me = "discussion_form_", Pn = ({
|
|
3293
3293
|
content: e = { type: "response", slugs: {} },
|
|
3294
3294
|
userHasPermissions: t = !0,
|
|
3295
3295
|
meta: n = {
|
|
@@ -3320,13 +3320,13 @@ const ue = "discussion_form_", Nn = ({
|
|
|
3320
3320
|
},
|
|
3321
3321
|
gtmContext: i = "DiscussionForm"
|
|
3322
3322
|
}) => {
|
|
3323
|
-
var
|
|
3324
|
-
const c = N(), u = ge(
|
|
3323
|
+
var b, Q;
|
|
3324
|
+
const c = N(), u = ge(Se), [f, h] = F(
|
|
3325
3325
|
n.isEditing && n.isEditing.text || ""
|
|
3326
|
-
), [p, _] = F(d.error || !1), [j, g] = F(!1), S =
|
|
3326
|
+
), [p, _] = F(d.error || !1), [j, g] = F(!1), S = ne(null);
|
|
3327
3327
|
if (r || (r = S), n.isLoading)
|
|
3328
3328
|
return /* @__PURE__ */ s.jsx(
|
|
3329
|
-
|
|
3329
|
+
je,
|
|
3330
3330
|
{
|
|
3331
3331
|
className: "discussion-card discussion-form",
|
|
3332
3332
|
"data-testid": "loading-placeholder"
|
|
@@ -3338,26 +3338,26 @@ const ue = "discussion_form_", Nn = ({
|
|
|
3338
3338
|
let L;
|
|
3339
3339
|
!u || !u.id ? L = pe(
|
|
3340
3340
|
c.formatMessage,
|
|
3341
|
-
`${
|
|
3341
|
+
`${me}error_loggedOut`,
|
|
3342
3342
|
e.type,
|
|
3343
3343
|
"action"
|
|
3344
|
-
) : t ? Y.length >= a && (L = `${
|
|
3344
|
+
) : t ? Y.length >= a && (L = `${me}error_tooLong`) : L = pe(
|
|
3345
3345
|
c.formatMessage,
|
|
3346
|
-
`${
|
|
3346
|
+
`${me}error_noPermission`,
|
|
3347
3347
|
e.type,
|
|
3348
3348
|
"action"
|
|
3349
3349
|
), L ? _(L) : p && _(!1);
|
|
3350
3350
|
};
|
|
3351
3351
|
let T = `${e.type}-form`;
|
|
3352
3352
|
if (e.type === "response" || e.type === "reply") {
|
|
3353
|
-
const w = e.type === "response" ? ((
|
|
3353
|
+
const w = e.type === "response" ? ((b = e.slugs) == null ? void 0 : b.question) || "" : ((Q = e.slugs) == null ? void 0 : Q.answer) || "";
|
|
3354
3354
|
w && (T = `${T}-${w.slice(-15)}`);
|
|
3355
3355
|
}
|
|
3356
3356
|
const M = async (w) => {
|
|
3357
3357
|
var L;
|
|
3358
3358
|
if (w.preventDefault(), w.stopPropagation(), !u || !u.id || !t || I)
|
|
3359
3359
|
return;
|
|
3360
|
-
|
|
3360
|
+
Je && clearTimeout(Je), g("submitting");
|
|
3361
3361
|
const Y = window.location.pathname;
|
|
3362
3362
|
try {
|
|
3363
3363
|
let O;
|
|
@@ -3387,26 +3387,26 @@ const ue = "discussion_form_", Nn = ({
|
|
|
3387
3387
|
default:
|
|
3388
3388
|
break;
|
|
3389
3389
|
}
|
|
3390
|
-
await Ds(1e3), o.callback && await o.callback(O),
|
|
3390
|
+
await Ds(1e3), o.callback && await o.callback(O), Je = setTimeout(() => {
|
|
3391
3391
|
h(""), g("submitted"), C();
|
|
3392
3392
|
}, 500);
|
|
3393
3393
|
} catch (O) {
|
|
3394
3394
|
const U = O;
|
|
3395
|
-
let W = `${
|
|
3395
|
+
let W = `${me}error`;
|
|
3396
3396
|
U.message.includes("entry already exists") && (W = pe(
|
|
3397
3397
|
c.formatMessage,
|
|
3398
|
-
`${
|
|
3398
|
+
`${me}error_alreadyExists`,
|
|
3399
3399
|
e.type,
|
|
3400
3400
|
"action"
|
|
3401
3401
|
)), U.message.includes("429") ? W = pe(
|
|
3402
3402
|
c.formatMessage,
|
|
3403
|
-
`${
|
|
3403
|
+
`${me}error_tooMany`,
|
|
3404
3404
|
e.type,
|
|
3405
3405
|
"action"
|
|
3406
|
-
) : U.message.includes("400") && (W = `${
|
|
3406
|
+
) : U.message.includes("400") && (W = `${me}error`), _(W), C();
|
|
3407
3407
|
}
|
|
3408
3408
|
}, C = () => {
|
|
3409
|
-
|
|
3409
|
+
Je = setTimeout(() => {
|
|
3410
3410
|
_(!1), g(!1);
|
|
3411
3411
|
}, 5e3);
|
|
3412
3412
|
}, I = !f || !Ls(f), V = j === "submitting", x = [];
|
|
@@ -3418,7 +3418,7 @@ const ue = "discussion_form_", Nn = ({
|
|
|
3418
3418
|
"data-gtm-event-context": i,
|
|
3419
3419
|
"data-gtm-event-type": `cancel-${e.type}-click`,
|
|
3420
3420
|
disabled: !d.cancel && (!u || !u.id || !f),
|
|
3421
|
-
children: c.formatMessage({ id: `${
|
|
3421
|
+
children: c.formatMessage({ id: `${me}cancel` })
|
|
3422
3422
|
}), x.push({
|
|
3423
3423
|
variant: "primary",
|
|
3424
3424
|
size: { mobile: "small", 600: "medium" },
|
|
@@ -3437,7 +3437,7 @@ const ue = "discussion_form_", Nn = ({
|
|
|
3437
3437
|
"data-testid": "save-button",
|
|
3438
3438
|
disabled: !u || !u.id || !t || I || V || n.isEditing && f === n.isEditing.text,
|
|
3439
3439
|
children: c.formatMessage({
|
|
3440
|
-
id: `${
|
|
3440
|
+
id: `${me}${V ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}`
|
|
3441
3441
|
})
|
|
3442
3442
|
}), /* @__PURE__ */ s.jsxs(
|
|
3443
3443
|
"form",
|
|
@@ -3448,16 +3448,16 @@ const ue = "discussion_form_", Nn = ({
|
|
|
3448
3448
|
}),
|
|
3449
3449
|
"data-testid": `discussion-${e.type}-form`,
|
|
3450
3450
|
children: [
|
|
3451
|
-
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ s.jsx("h2", { children: pe(c.formatMessage, `${
|
|
3451
|
+
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ s.jsx("h2", { children: pe(c.formatMessage, `${me}title`, e.type, "action") }),
|
|
3452
3452
|
/* @__PURE__ */ s.jsx(
|
|
3453
|
-
|
|
3453
|
+
Bt,
|
|
3454
3454
|
{
|
|
3455
3455
|
member: u || "community",
|
|
3456
3456
|
gtmContext: i,
|
|
3457
3457
|
gtmType: "profile-click"
|
|
3458
3458
|
}
|
|
3459
3459
|
),
|
|
3460
|
-
/* @__PURE__ */ s.jsx(le, { element: "label", showOnFocus: !1, htmlFor: `${T}-input`, children: pe(c.formatMessage, `${
|
|
3460
|
+
/* @__PURE__ */ s.jsx(le, { element: "label", showOnFocus: !1, htmlFor: `${T}-input`, children: pe(c.formatMessage, `${me}label`, e.type, "action") }),
|
|
3461
3461
|
/* @__PURE__ */ s.jsx(
|
|
3462
3462
|
_s,
|
|
3463
3463
|
{
|
|
@@ -3466,7 +3466,7 @@ const ue = "discussion_form_", Nn = ({
|
|
|
3466
3466
|
name: e.type,
|
|
3467
3467
|
placeholder: pe(
|
|
3468
3468
|
c.formatMessage,
|
|
3469
|
-
`${
|
|
3469
|
+
`${me}placeholder`,
|
|
3470
3470
|
e.type,
|
|
3471
3471
|
"action"
|
|
3472
3472
|
),
|
|
@@ -3479,7 +3479,7 @@ const ue = "discussion_form_", Nn = ({
|
|
|
3479
3479
|
autoFocus: !!n.isEditing
|
|
3480
3480
|
}
|
|
3481
3481
|
),
|
|
3482
|
-
/* @__PURE__ */ s.jsx("small", { children: pe(c.formatMessage, `${
|
|
3482
|
+
/* @__PURE__ */ s.jsx("small", { children: pe(c.formatMessage, `${me}explainer`, e.type, "action", {
|
|
3483
3483
|
a: (w) => /* @__PURE__ */ s.jsx(
|
|
3484
3484
|
"a",
|
|
3485
3485
|
{
|
|
@@ -3493,9 +3493,9 @@ const ue = "discussion_form_", Nn = ({
|
|
|
3493
3493
|
}
|
|
3494
3494
|
)
|
|
3495
3495
|
}) }),
|
|
3496
|
-
/* @__PURE__ */ s.jsx(
|
|
3497
|
-
j === "submitted" && /* @__PURE__ */ s.jsx(
|
|
3498
|
-
p && /* @__PURE__ */ s.jsx(
|
|
3496
|
+
/* @__PURE__ */ s.jsx(ot, { buttons: x }),
|
|
3497
|
+
j === "submitted" && /* @__PURE__ */ s.jsx(Pt, { className: "success", "data-testid": "success", children: pe(c.formatMessage, `${me}success`, e.type, "action") }),
|
|
3498
|
+
p && /* @__PURE__ */ s.jsx(Pt, { id: "error-message", className: "error", "data-testid": "error", children: d.error ? d.error : typeof p == "string" ? p.includes(" ") ? p : c.formatMessage(
|
|
3499
3499
|
{ id: p },
|
|
3500
3500
|
{
|
|
3501
3501
|
action: c.formatMessage({
|
|
@@ -3507,20 +3507,20 @@ const ue = "discussion_form_", Nn = ({
|
|
|
3507
3507
|
]
|
|
3508
3508
|
}
|
|
3509
3509
|
);
|
|
3510
|
-
},
|
|
3510
|
+
}, It = ({
|
|
3511
3511
|
contentType: e,
|
|
3512
3512
|
createPost: t,
|
|
3513
3513
|
membershipRequiredToPost: { isMember: n, required: r, join: a, leave: l, notMemberStateText: d }
|
|
3514
3514
|
}) => r && !n ? /* @__PURE__ */ s.jsx(
|
|
3515
|
-
|
|
3515
|
+
it,
|
|
3516
3516
|
{
|
|
3517
3517
|
text: d,
|
|
3518
3518
|
button: {
|
|
3519
|
-
component: /* @__PURE__ */ s.jsx(
|
|
3519
|
+
component: /* @__PURE__ */ s.jsx(Tn, { functions: { join: a, leave: l } })
|
|
3520
3520
|
}
|
|
3521
3521
|
}
|
|
3522
3522
|
) : /* @__PURE__ */ s.jsx(
|
|
3523
|
-
|
|
3523
|
+
Pn,
|
|
3524
3524
|
{
|
|
3525
3525
|
content: { type: e, slugs: {} },
|
|
3526
3526
|
functions: {
|
|
@@ -3530,12 +3530,12 @@ const ue = "discussion_form_", Nn = ({
|
|
|
3530
3530
|
), Er = {
|
|
3531
3531
|
showThread: !1,
|
|
3532
3532
|
showForm: !1
|
|
3533
|
-
},
|
|
3533
|
+
}, lt = Ft(Er), Sr = ({ children: e }) => {
|
|
3534
3534
|
const [t, n] = F({
|
|
3535
3535
|
showThread: !1,
|
|
3536
3536
|
showForm: !1
|
|
3537
3537
|
});
|
|
3538
|
-
return /* @__PURE__ */ s.jsx(
|
|
3538
|
+
return /* @__PURE__ */ s.jsx(lt.Provider, { value: { ...t, updateConversation: n }, children: e });
|
|
3539
3539
|
}, Tr = ({
|
|
3540
3540
|
question: e,
|
|
3541
3541
|
answer: t,
|
|
@@ -3545,10 +3545,10 @@ const ue = "discussion_form_", Nn = ({
|
|
|
3545
3545
|
...t && { answerSlug: t },
|
|
3546
3546
|
...n && { replySlug: n }
|
|
3547
3547
|
}), $r = (e, t = 10) => !e || e.length === 0 ? [] : e.slice(0, t);
|
|
3548
|
-
let
|
|
3549
|
-
const
|
|
3550
|
-
|
|
3551
|
-
},
|
|
3548
|
+
let Be = !1;
|
|
3549
|
+
const St = () => {
|
|
3550
|
+
Be !== !1 && (clearTimeout(Be), Be = !1);
|
|
3551
|
+
}, Tt = 10, Mr = ({
|
|
3552
3552
|
element: e = "div",
|
|
3553
3553
|
likes: t = 0,
|
|
3554
3554
|
peopleWhoLiked: n = !1,
|
|
@@ -3561,17 +3561,17 @@ const yt = () => {
|
|
|
3561
3561
|
} } = {}
|
|
3562
3562
|
}) => {
|
|
3563
3563
|
const c = N();
|
|
3564
|
-
|
|
3564
|
+
X(() => {
|
|
3565
3565
|
p(a);
|
|
3566
3566
|
}, [a]);
|
|
3567
|
-
const [u, f] = F(t), [h, p] = F(a), [_, j] = F(!1), [g, S] = F(!1), k =
|
|
3568
|
-
if (C.preventDefault(), C.stopPropagation(), S(!1),
|
|
3569
|
-
return
|
|
3570
|
-
if (
|
|
3567
|
+
const [u, f] = F(t), [h, p] = F(a), [_, j] = F(!1), [g, S] = F(!1), k = et(() => $r(n, Tt), [n]), T = (C) => {
|
|
3568
|
+
if (C.preventDefault(), C.stopPropagation(), S(!1), Be)
|
|
3569
|
+
return St(), !1;
|
|
3570
|
+
if (St(), _ || !d)
|
|
3571
3571
|
return !1;
|
|
3572
|
-
|
|
3572
|
+
Be = setTimeout(M, 350);
|
|
3573
3573
|
}, M = async () => {
|
|
3574
|
-
if (
|
|
3574
|
+
if (St(), _ || !d)
|
|
3575
3575
|
return !1;
|
|
3576
3576
|
let C = h ? u - 1 : u + 1;
|
|
3577
3577
|
C < 0 && (C = 0), j(!0), f(C), p(!h);
|
|
@@ -3605,7 +3605,7 @@ const yt = () => {
|
|
|
3605
3605
|
},
|
|
3606
3606
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3607
3607
|
/* @__PURE__ */ s.jsx(
|
|
3608
|
-
|
|
3608
|
+
J,
|
|
3609
3609
|
{
|
|
3610
3610
|
variant: "tertiary",
|
|
3611
3611
|
size: "medium",
|
|
@@ -3624,8 +3624,8 @@ const yt = () => {
|
|
|
3624
3624
|
),
|
|
3625
3625
|
/* @__PURE__ */ s.jsx("span", { className: E("number-of-likes", { "no-likes": u === 0 }), "data-testid": "number-of-likes", children: c.formatMessage({ id: `discussion_likes${r ? "_short" : ""}` }, { number: u }) }),
|
|
3626
3626
|
n && /* @__PURE__ */ s.jsx(Hs, { isOpen: g, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ s.jsxs("ul", { children: [
|
|
3627
|
-
k.map((C) => typeof C == "string" || !C.name ? null : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
3628
|
-
n.length >
|
|
3627
|
+
k.map((C) => typeof C == "string" || !C.name ? null : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(at, { href: C.id ? `/profiles/${C.id}` : void 0, gtmContext: "Likes", gtmType: "liked-name-click", children: C.name }) }, C.id || window.btoa(C.name))),
|
|
3628
|
+
n.length > Tt && /* @__PURE__ */ s.jsx("li", { children: c.formatMessage({ id: "discussion_likes_more" }, { number: n.length - Tt }) })
|
|
3629
3629
|
] }) })
|
|
3630
3630
|
] })
|
|
3631
3631
|
}
|
|
@@ -3639,7 +3639,7 @@ const Cr = ({ element: e = "section", children: t, className: n, ...r }) => A.cr
|
|
|
3639
3639
|
...r
|
|
3640
3640
|
}
|
|
3641
3641
|
);
|
|
3642
|
-
const
|
|
3642
|
+
const Rn = ({
|
|
3643
3643
|
id: e = "content-overlay",
|
|
3644
3644
|
isOpen: t = !1,
|
|
3645
3645
|
showDivider: n = !0,
|
|
@@ -3657,7 +3657,7 @@ const Pn = ({
|
|
|
3657
3657
|
const h = N(), [p, _] = F(t), j = (S) => {
|
|
3658
3658
|
_(S), S ? (a(), document.body.classList.add("has-overlay")) : (l(), document.body.classList.remove("has-overlay"));
|
|
3659
3659
|
};
|
|
3660
|
-
|
|
3660
|
+
X(() => {
|
|
3661
3661
|
j(t);
|
|
3662
3662
|
}, [t]);
|
|
3663
3663
|
const g = r ? { "--max-width": `${r / 16}rem` } : {};
|
|
@@ -3672,7 +3672,7 @@ const Pn = ({
|
|
|
3672
3672
|
/* @__PURE__ */ s.jsxs("div", { className: "top", children: [
|
|
3673
3673
|
o && /* @__PURE__ */ s.jsx("h2", { className: "modal-title", children: o }),
|
|
3674
3674
|
/* @__PURE__ */ s.jsx(
|
|
3675
|
-
|
|
3675
|
+
J,
|
|
3676
3676
|
{
|
|
3677
3677
|
variant: "tertiary",
|
|
3678
3678
|
size: "medium",
|
|
@@ -3689,9 +3689,9 @@ const Pn = ({
|
|
|
3689
3689
|
i,
|
|
3690
3690
|
c && /* @__PURE__ */ s.jsxs("div", { className: "bottom", children: [
|
|
3691
3691
|
/* @__PURE__ */ s.jsx(De, {}),
|
|
3692
|
-
/* @__PURE__ */ s.jsx(
|
|
3692
|
+
/* @__PURE__ */ s.jsx(ot, { buttons: c })
|
|
3693
3693
|
] }),
|
|
3694
|
-
d && /* @__PURE__ */ s.jsx(
|
|
3694
|
+
d && /* @__PURE__ */ s.jsx(Pt, { className: "error", children: d })
|
|
3695
3695
|
] })
|
|
3696
3696
|
}
|
|
3697
3697
|
) });
|
|
@@ -3713,7 +3713,7 @@ const Ao = ({
|
|
|
3713
3713
|
},
|
|
3714
3714
|
sendInvites: c
|
|
3715
3715
|
}) => /* @__PURE__ */ s.jsx(
|
|
3716
|
-
|
|
3716
|
+
Rn,
|
|
3717
3717
|
{
|
|
3718
3718
|
title: n,
|
|
3719
3719
|
isOpen: t,
|
|
@@ -3732,11 +3732,11 @@ const Ao = ({
|
|
|
3732
3732
|
}
|
|
3733
3733
|
)
|
|
3734
3734
|
}
|
|
3735
|
-
),
|
|
3735
|
+
), un = (e) => {
|
|
3736
3736
|
const t = {};
|
|
3737
3737
|
return Object.keys(e).forEach((n) => n.includes("Id") ? t[n] = e[n] : t[`${n}Slug`] = e[n]), t;
|
|
3738
|
-
},
|
|
3739
|
-
const
|
|
3738
|
+
}, Ht = (e, t) => e && !t;
|
|
3739
|
+
const ve = "discussion_", Ar = 280, ct = ({
|
|
3740
3740
|
element: e = "div",
|
|
3741
3741
|
content: t,
|
|
3742
3742
|
userHasPermissions: n = !0,
|
|
@@ -3763,49 +3763,49 @@ const xe = "discussion_", Ar = 280, it = ({
|
|
|
3763
3763
|
children: _,
|
|
3764
3764
|
isTruncated: j = !1
|
|
3765
3765
|
}) => {
|
|
3766
|
-
const g = N(), S = ge(
|
|
3766
|
+
const g = N(), S = ge(Se), k = ge(lt), [T, M] = F({
|
|
3767
3767
|
body: t && t.body || "",
|
|
3768
3768
|
isEditing: !1,
|
|
3769
3769
|
didEdit: t && t.isEdited || !1
|
|
3770
3770
|
}), [C, I] = F(!1), [V, x] = F("");
|
|
3771
|
-
if (
|
|
3771
|
+
if (X(() => {
|
|
3772
3772
|
M({
|
|
3773
3773
|
...T,
|
|
3774
3774
|
body: t && t.body || "",
|
|
3775
3775
|
didEdit: t && t.isEdited || !1
|
|
3776
3776
|
});
|
|
3777
3777
|
}, [t.isEdited]), r || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
3778
|
-
return /* @__PURE__ */ s.jsx(
|
|
3779
|
-
const { author:
|
|
3778
|
+
return /* @__PURE__ */ s.jsx(je, { className: "discussion-card discussion-post" });
|
|
3779
|
+
const { author: b, canLike: Q, createdAt: w, id: Y, likes: L = 0, userLiked: O, comments: U = 0 } = t, W = j ? tt(T.body, Ar) : T.body, Z = S && S.id && typeof b != "string" && b.id && b.id === S.id || !1, re = typeof Q == "boolean" ? Q : n ? !Z : !1, oe = async (P) => {
|
|
3780
3780
|
P || (P = ""), x("");
|
|
3781
3781
|
try {
|
|
3782
3782
|
if (!xs(P, T.body)) {
|
|
3783
|
-
const
|
|
3784
|
-
await o(
|
|
3783
|
+
const te = t.type === "question" ? { title: P } : { body: P };
|
|
3784
|
+
await o(un(t.slugs), te);
|
|
3785
3785
|
}
|
|
3786
3786
|
M({ body: P, isEditing: !1, didEdit: !0 });
|
|
3787
3787
|
} catch {
|
|
3788
|
-
x(`${
|
|
3788
|
+
x(`${ve}form_error`);
|
|
3789
3789
|
}
|
|
3790
|
-
},
|
|
3790
|
+
}, ae = () => {
|
|
3791
3791
|
k && k.updateConversation && k.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
|
|
3792
|
-
const
|
|
3793
|
-
|
|
3792
|
+
const te = `reply-form-${(t.type === "answer" ? t.slug : t.slugs.answer || "").toLowerCase().slice(-15)}`, G = document.getElementById(te), K = document.getElementById(`${te}-input`);
|
|
3793
|
+
K && K.focus(), G && G.scrollIntoView({ behavior: "smooth" });
|
|
3794
3794
|
}, 0);
|
|
3795
|
-
},
|
|
3795
|
+
}, ie = () => {
|
|
3796
3796
|
try {
|
|
3797
|
-
d(
|
|
3797
|
+
d(un(t.slugs));
|
|
3798
3798
|
} catch {
|
|
3799
3799
|
x("delete-error");
|
|
3800
3800
|
}
|
|
3801
|
-
},
|
|
3801
|
+
}, se = [
|
|
3802
3802
|
{
|
|
3803
|
-
text: g.formatMessage({ id: `${
|
|
3803
|
+
text: g.formatMessage({ id: `${ve}moreMenu_report` }),
|
|
3804
3804
|
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
3805
|
-
g.formatMessage({ id: `${
|
|
3805
|
+
g.formatMessage({ id: `${ve}report_subject` })
|
|
3806
3806
|
)}&body=${encodeURI(
|
|
3807
3807
|
g.formatMessage(
|
|
3808
|
-
{ id: `${
|
|
3808
|
+
{ id: `${ve}report_body` },
|
|
3809
3809
|
{
|
|
3810
3810
|
contentType: t.type || "",
|
|
3811
3811
|
contentSlug: t.slug || "",
|
|
@@ -3816,9 +3816,9 @@ const xe = "discussion_", Ar = 280, it = ({
|
|
|
3816
3816
|
icon: "flag"
|
|
3817
3817
|
}
|
|
3818
3818
|
];
|
|
3819
|
-
return n && Z &&
|
|
3819
|
+
return n && Z && se.push(
|
|
3820
3820
|
{
|
|
3821
|
-
text: g.formatMessage({ id: `${
|
|
3821
|
+
text: g.formatMessage({ id: `${ve}moreMenu_edit` }),
|
|
3822
3822
|
onClick: () => M({ ...T, isEditing: !0 }),
|
|
3823
3823
|
icon: "pencil-paper",
|
|
3824
3824
|
className: "gtm-trackable",
|
|
@@ -3826,7 +3826,7 @@ const xe = "discussion_", Ar = 280, it = ({
|
|
|
3826
3826
|
"data-gtm-event-type": `edit-${t.type}-click`
|
|
3827
3827
|
},
|
|
3828
3828
|
{
|
|
3829
|
-
text: g.formatMessage({ id: `${
|
|
3829
|
+
text: g.formatMessage({ id: `${ve}moreMenu_delete` }),
|
|
3830
3830
|
onClick: (P) => {
|
|
3831
3831
|
P.preventDefault(), P.stopPropagation(), I(!0);
|
|
3832
3832
|
},
|
|
@@ -3853,17 +3853,17 @@ const xe = "discussion_", Ar = 280, it = ({
|
|
|
3853
3853
|
},
|
|
3854
3854
|
children: [
|
|
3855
3855
|
!T.isEditing && /* @__PURE__ */ s.jsx(
|
|
3856
|
-
|
|
3856
|
+
Bt,
|
|
3857
3857
|
{
|
|
3858
|
-
member:
|
|
3858
|
+
member: b,
|
|
3859
3859
|
additionalContent: { createdAt: w, didEdit: T.didEdit },
|
|
3860
|
-
className: typeof
|
|
3860
|
+
className: typeof b != "string" && b.id === a ? "highlighted" : "",
|
|
3861
3861
|
gtmContext: p,
|
|
3862
3862
|
gtmType: "profile-click"
|
|
3863
3863
|
}
|
|
3864
3864
|
),
|
|
3865
3865
|
T.isEditing ? /* @__PURE__ */ s.jsx(
|
|
3866
|
-
|
|
3866
|
+
Pn,
|
|
3867
3867
|
{
|
|
3868
3868
|
content: { type: t.type, slugs: t.slugs },
|
|
3869
3869
|
userHasPermissions: n,
|
|
@@ -3885,7 +3885,7 @@ const xe = "discussion_", Ar = 280, it = ({
|
|
|
3885
3885
|
},
|
|
3886
3886
|
functions: {
|
|
3887
3887
|
create: l,
|
|
3888
|
-
handleSaveEdit:
|
|
3888
|
+
handleSaveEdit: oe,
|
|
3889
3889
|
handleCancel: () => {
|
|
3890
3890
|
x(""), M({ ...T, isEditing: !1 });
|
|
3891
3891
|
}
|
|
@@ -3899,10 +3899,10 @@ const xe = "discussion_", Ar = 280, it = ({
|
|
|
3899
3899
|
className: "gtm-trackable",
|
|
3900
3900
|
"data-gtm-event-context": p,
|
|
3901
3901
|
"data-gtm-event-type": "title-click",
|
|
3902
|
-
children: /* @__PURE__ */ s.jsx(
|
|
3902
|
+
children: /* @__PURE__ */ s.jsx(on, { options: { overrides: { a: Ks } }, children: W })
|
|
3903
3903
|
}
|
|
3904
3904
|
) : /* @__PURE__ */ s.jsx(
|
|
3905
|
-
|
|
3905
|
+
on,
|
|
3906
3906
|
{
|
|
3907
3907
|
options: {
|
|
3908
3908
|
wrapper: t.type === "question" ? "h1" : A.Fragment,
|
|
@@ -3927,7 +3927,7 @@ const xe = "discussion_", Ar = 280, it = ({
|
|
|
3927
3927
|
isShort: !1,
|
|
3928
3928
|
userLiked: O,
|
|
3929
3929
|
content: { type: t.type, slugs: t.slugs },
|
|
3930
|
-
canLike:
|
|
3930
|
+
canLike: re,
|
|
3931
3931
|
functions: {
|
|
3932
3932
|
createLike: i,
|
|
3933
3933
|
deleteLike: c
|
|
@@ -3943,7 +3943,7 @@ const xe = "discussion_", Ar = 280, it = ({
|
|
|
3943
3943
|
},
|
|
3944
3944
|
children: [
|
|
3945
3945
|
/* @__PURE__ */ s.jsx(
|
|
3946
|
-
|
|
3946
|
+
J,
|
|
3947
3947
|
{
|
|
3948
3948
|
variant: "tertiary",
|
|
3949
3949
|
size: "medium",
|
|
@@ -3955,26 +3955,26 @@ const xe = "discussion_", Ar = 280, it = ({
|
|
|
3955
3955
|
"data-gtm-event-context": p,
|
|
3956
3956
|
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
3957
3957
|
screenreaderText: g.formatMessage(
|
|
3958
|
-
{ id: `${
|
|
3958
|
+
{ id: `${ve}comments_screenReader` },
|
|
3959
3959
|
{ count: U }
|
|
3960
3960
|
)
|
|
3961
3961
|
}
|
|
3962
3962
|
),
|
|
3963
3963
|
/* @__PURE__ */ s.jsx("span", { children: g.formatMessage(
|
|
3964
|
-
{ id: `${
|
|
3964
|
+
{ id: `${ve}comments` },
|
|
3965
3965
|
{ count: U }
|
|
3966
3966
|
) })
|
|
3967
3967
|
]
|
|
3968
3968
|
}
|
|
3969
3969
|
),
|
|
3970
3970
|
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
3971
|
-
|
|
3971
|
+
J,
|
|
3972
3972
|
{
|
|
3973
3973
|
variant: "tertiary",
|
|
3974
3974
|
size: "medium",
|
|
3975
3975
|
styling: { muted: !0 },
|
|
3976
|
-
onClick:
|
|
3977
|
-
children: g.formatMessage({ id: `${
|
|
3976
|
+
onClick: ae,
|
|
3977
|
+
children: g.formatMessage({ id: `${ve}reply` })
|
|
3978
3978
|
}
|
|
3979
3979
|
) }),
|
|
3980
3980
|
/* @__PURE__ */ s.jsx(
|
|
@@ -3982,7 +3982,7 @@ const xe = "discussion_", Ar = 280, it = ({
|
|
|
3982
3982
|
{
|
|
3983
3983
|
element: "li",
|
|
3984
3984
|
id: `more-${t.slug}`,
|
|
3985
|
-
options:
|
|
3985
|
+
options: se
|
|
3986
3986
|
}
|
|
3987
3987
|
)
|
|
3988
3988
|
]
|
|
@@ -3993,7 +3993,7 @@ const xe = "discussion_", Ar = 280, it = ({
|
|
|
3993
3993
|
),
|
|
3994
3994
|
_,
|
|
3995
3995
|
/* @__PURE__ */ s.jsx(
|
|
3996
|
-
|
|
3996
|
+
Rn,
|
|
3997
3997
|
{
|
|
3998
3998
|
id: `delete-${t.slug}-modal`,
|
|
3999
3999
|
isOpen: C,
|
|
@@ -4022,13 +4022,13 @@ const xe = "discussion_", Ar = 280, it = ({
|
|
|
4022
4022
|
{
|
|
4023
4023
|
variant: "primary",
|
|
4024
4024
|
className: "destructive",
|
|
4025
|
-
onClick:
|
|
4025
|
+
onClick: ie,
|
|
4026
4026
|
children: g.formatMessage({ id: "discussion_delete_delete" })
|
|
4027
4027
|
}
|
|
4028
4028
|
],
|
|
4029
4029
|
gtmContext: `${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,
|
|
4030
4030
|
children: /* @__PURE__ */ s.jsx(
|
|
4031
|
-
|
|
4031
|
+
ye,
|
|
4032
4032
|
{
|
|
4033
4033
|
id: "discussion_delete_text",
|
|
4034
4034
|
values: {
|
|
@@ -4044,16 +4044,16 @@ const xe = "discussion_", Ar = 280, it = ({
|
|
|
4044
4044
|
] })
|
|
4045
4045
|
});
|
|
4046
4046
|
};
|
|
4047
|
-
const
|
|
4047
|
+
const $t = "discussion_responses_", No = ({ type: e = "answer", responses: t = 0 }) => {
|
|
4048
4048
|
const n = N();
|
|
4049
4049
|
return /* @__PURE__ */ s.jsxs("div", { className: "responses-heading", children: [
|
|
4050
|
-
/* @__PURE__ */ s.jsx("h3", { children: n.formatMessage({ id: `${
|
|
4051
|
-
t === 0 && /* @__PURE__ */ s.jsx("p", { children: pe(n.formatMessage, `${
|
|
4050
|
+
/* @__PURE__ */ s.jsx("h3", { children: n.formatMessage({ id: `${$t}title` }, { action: n.formatMessage({ id: `${$t}${e}` }), count: t }) }),
|
|
4051
|
+
t === 0 && /* @__PURE__ */ s.jsx("p", { children: pe(n.formatMessage, `${$t}empty`, e, e) })
|
|
4052
4052
|
] });
|
|
4053
4053
|
};
|
|
4054
4054
|
const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
4055
|
-
const r = N(), a =
|
|
4056
|
-
|
|
4055
|
+
const r = N(), a = ne(null), l = ge(lt), [d, o] = F("closed");
|
|
4056
|
+
X(() => {
|
|
4057
4057
|
const f = a.current;
|
|
4058
4058
|
if (f)
|
|
4059
4059
|
return f.addEventListener("transitionend", i), () => {
|
|
@@ -4061,17 +4061,17 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4061
4061
|
};
|
|
4062
4062
|
}, []), Ce(() => {
|
|
4063
4063
|
d === "closed" && !l.showThread || o(["opening", "open"].includes(d) ? "ready-to-close" : "opening");
|
|
4064
|
-
}, [l.showThread]),
|
|
4064
|
+
}, [l.showThread]), X(() => {
|
|
4065
4065
|
d === "ready-to-close" && o("closing");
|
|
4066
4066
|
}, [d]);
|
|
4067
4067
|
const i = ({ propertyName: f }) => {
|
|
4068
4068
|
f === "max-height" && o((h) => h === "opening" ? "open" : h === "closing" ? "closed" : h);
|
|
4069
|
-
}, c = ["opening", "open"].includes(d), u =
|
|
4069
|
+
}, c = ["opening", "open"].includes(d), u = vn(n, {
|
|
4070
4070
|
element: "li"
|
|
4071
4071
|
});
|
|
4072
4072
|
return /* @__PURE__ */ s.jsxs("div", { className: "thread-wrapper", children: [
|
|
4073
4073
|
t && /* @__PURE__ */ s.jsx(
|
|
4074
|
-
|
|
4074
|
+
J,
|
|
4075
4075
|
{
|
|
4076
4076
|
variant: "secondary",
|
|
4077
4077
|
size: "small",
|
|
@@ -4217,12 +4217,12 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4217
4217
|
isMember: n,
|
|
4218
4218
|
functions: { list: r, create: a, edit: l, like: d, unlike: o, join: i, leave: c }
|
|
4219
4219
|
}) => {
|
|
4220
|
-
const u = N(), f =
|
|
4220
|
+
const u = N(), f = st(), h = ge(Se), {
|
|
4221
4221
|
data: p,
|
|
4222
4222
|
error: _,
|
|
4223
4223
|
isLoading: j,
|
|
4224
4224
|
isFetching: g
|
|
4225
|
-
} =
|
|
4225
|
+
} = fn({
|
|
4226
4226
|
queryKey: [e, t],
|
|
4227
4227
|
queryFn: r
|
|
4228
4228
|
}), S = Rr({
|
|
@@ -4250,23 +4250,23 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4250
4250
|
var O, U, W;
|
|
4251
4251
|
const Y = p && (p == null ? void 0 : p.find(
|
|
4252
4252
|
(Z) => Z.id === w
|
|
4253
|
-
)), L = (W = (U = (O = Y == null ? void 0 : Y.
|
|
4253
|
+
)), L = (W = (U = (O = Y == null ? void 0 : Y.own_reactions) == null ? void 0 : O.like) == null ? void 0 : U.find(
|
|
4254
4254
|
(Z) => Z.user_id === (h == null ? void 0 : h.id)
|
|
4255
4255
|
)) == null ? void 0 : W.id;
|
|
4256
4256
|
await o({ reactionId: L || "", activityId: w });
|
|
4257
4257
|
}
|
|
4258
4258
|
}), {
|
|
4259
4259
|
mutate: x
|
|
4260
|
-
} = de(V),
|
|
4260
|
+
} = de(V), b = ke(
|
|
4261
4261
|
({ activityId: w }) => I({ activityId: w }),
|
|
4262
4262
|
[I]
|
|
4263
|
-
), Q =
|
|
4263
|
+
), Q = ke(
|
|
4264
4264
|
({ activityId: w }) => x({ activityId: w }),
|
|
4265
4265
|
[x]
|
|
4266
4266
|
);
|
|
4267
|
-
return _ ? /* @__PURE__ */ s.jsx(
|
|
4267
|
+
return _ ? /* @__PURE__ */ s.jsx(it, { variant: "error", text: _.message }) : j ? /* @__PURE__ */ s.jsx(je, { style: { height: "400px" } }) : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4268
4268
|
/* @__PURE__ */ s.jsx(
|
|
4269
|
-
|
|
4269
|
+
It,
|
|
4270
4270
|
{
|
|
4271
4271
|
contentType: "post",
|
|
4272
4272
|
createPost: k,
|
|
@@ -4280,11 +4280,11 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4280
4280
|
}
|
|
4281
4281
|
),
|
|
4282
4282
|
!g && Array.isArray(p) && (p == null ? void 0 : p.map((w) => {
|
|
4283
|
-
var O, U, W, Z,
|
|
4284
|
-
const Y = ((O = w == null ? void 0 : w.actor) == null ? void 0 : O.id) === (h == null ? void 0 : h.id), L =
|
|
4285
|
-
return /* @__PURE__ */ s.jsxs(
|
|
4283
|
+
var O, U, W, Z, re, oe, ae, ie, se, P, te, G;
|
|
4284
|
+
const Y = ((O = w == null ? void 0 : w.actor) == null ? void 0 : O.id) === (h == null ? void 0 : h.id), L = Ht(n, Y);
|
|
4285
|
+
return /* @__PURE__ */ s.jsxs(Ct, { children: [
|
|
4286
4286
|
/* @__PURE__ */ s.jsx(
|
|
4287
|
-
|
|
4287
|
+
ct,
|
|
4288
4288
|
{
|
|
4289
4289
|
content: {
|
|
4290
4290
|
type: "post",
|
|
@@ -4296,13 +4296,13 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4296
4296
|
author: {
|
|
4297
4297
|
id: (U = w == null ? void 0 : w.actor) == null ? void 0 : U.id,
|
|
4298
4298
|
name: `${(Z = (W = w == null ? void 0 : w.actor) == null ? void 0 : W.data) == null ? void 0 : Z.name}`,
|
|
4299
|
-
organization: (
|
|
4300
|
-
jobTitle: (
|
|
4299
|
+
organization: (oe = (re = w == null ? void 0 : w.actor) == null ? void 0 : re.data) == null ? void 0 : oe.organization,
|
|
4300
|
+
jobTitle: (ie = (ae = w == null ? void 0 : w.actor) == null ? void 0 : ae.data) == null ? void 0 : ie.jobTitle,
|
|
4301
4301
|
image: {
|
|
4302
|
-
thumbnail: ((P = (
|
|
4302
|
+
thumbnail: ((P = (se = w == null ? void 0 : w.actor) == null ? void 0 : se.data) == null ? void 0 : P.thumbnail) || void 0
|
|
4303
4303
|
}
|
|
4304
4304
|
},
|
|
4305
|
-
userLiked: ((
|
|
4305
|
+
userLiked: ((te = w == null ? void 0 : w.own_reactions) == null ? void 0 : te.like) && ((G = w == null ? void 0 : w.own_reactions) == null ? void 0 : G.like.length) > 0,
|
|
4306
4306
|
likes: (w == null ? void 0 : w.reaction_counts.like) || 0,
|
|
4307
4307
|
comments: (w == null ? void 0 : w.reaction_counts.reply) || 0
|
|
4308
4308
|
},
|
|
@@ -4314,11 +4314,11 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4314
4314
|
content: {
|
|
4315
4315
|
createContent: () => null,
|
|
4316
4316
|
deleteContent: () => null,
|
|
4317
|
-
updateContent: (
|
|
4317
|
+
updateContent: (K, ue) => M({ activityInfo: K, content: ue })
|
|
4318
4318
|
},
|
|
4319
4319
|
likes: {
|
|
4320
4320
|
createLike: () => {
|
|
4321
|
-
|
|
4321
|
+
b({ activityId: w == null ? void 0 : w.id });
|
|
4322
4322
|
},
|
|
4323
4323
|
deleteLike: () => {
|
|
4324
4324
|
Q({ activityId: w == null ? void 0 : w.id });
|
|
@@ -4485,7 +4485,7 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4485
4485
|
...o,
|
|
4486
4486
|
latest_reactions: { reply: i }
|
|
4487
4487
|
})), { previousActivity: o };
|
|
4488
|
-
} }),
|
|
4488
|
+
} }), mn = ({
|
|
4489
4489
|
queryClient: e,
|
|
4490
4490
|
queryKey: t,
|
|
4491
4491
|
mutationFn: n
|
|
@@ -4527,33 +4527,33 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4527
4527
|
replies: l,
|
|
4528
4528
|
functions: { create: d, edit: o, join: i, leave: c, like: u, unlike: f }
|
|
4529
4529
|
}) => {
|
|
4530
|
-
const h = N(), p =
|
|
4530
|
+
const h = N(), p = st(), _ = ge(lt), j = Ur({
|
|
4531
4531
|
queryClient: p,
|
|
4532
4532
|
queryKey: [e, t, r],
|
|
4533
|
-
mutationFn: async (
|
|
4533
|
+
mutationFn: async (b) => d({ replyId: n, content: b.body })
|
|
4534
4534
|
}), { mutate: g } = de(j), S = zr({
|
|
4535
4535
|
queryClient: p,
|
|
4536
4536
|
queryKey: [e, t, r],
|
|
4537
4537
|
mutationFn: o
|
|
4538
4538
|
}), {
|
|
4539
4539
|
mutate: k
|
|
4540
|
-
} = de(S), T =
|
|
4540
|
+
} = de(S), T = mn({
|
|
4541
4541
|
queryClient: p,
|
|
4542
4542
|
queryKey: [e, t, r],
|
|
4543
4543
|
mutationFn: u
|
|
4544
4544
|
}), {
|
|
4545
4545
|
mutate: M
|
|
4546
|
-
} = de(T), C =
|
|
4546
|
+
} = de(T), C = mn({
|
|
4547
4547
|
queryClient: p,
|
|
4548
4548
|
queryKey: [e, t, r],
|
|
4549
4549
|
mutationFn: f
|
|
4550
4550
|
}), {
|
|
4551
4551
|
mutate: I
|
|
4552
|
-
} = de(C), V =
|
|
4553
|
-
({ replyId:
|
|
4552
|
+
} = de(C), V = ke(
|
|
4553
|
+
({ replyId: b, replyParentId: Q }) => M({ replyId: b, replyParentId: Q }),
|
|
4554
4554
|
[M]
|
|
4555
|
-
), x =
|
|
4556
|
-
({ replyId:
|
|
4555
|
+
), x = ke(
|
|
4556
|
+
({ replyId: b, replyParentId: Q }) => I({ replyId: b, replyParentId: Q }),
|
|
4557
4557
|
[I]
|
|
4558
4558
|
);
|
|
4559
4559
|
return /* @__PURE__ */ s.jsx(
|
|
@@ -4562,61 +4562,64 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4562
4562
|
count: a,
|
|
4563
4563
|
showRepliesButton: a > 0 || _.showForm,
|
|
4564
4564
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4565
|
-
(l == null ? void 0 : l.length) === 0 || (l == null ? void 0 : l.map((
|
|
4566
|
-
var Q, w, Y, L, O, U, W, Z,
|
|
4565
|
+
(l == null ? void 0 : l.length) === 0 || (l == null ? void 0 : l.map((b) => {
|
|
4566
|
+
var Q, w, Y, L, O, U, W, Z, re, oe, ae, ie, se, P, te;
|
|
4567
4567
|
return /* @__PURE__ */ s.jsx(
|
|
4568
|
-
|
|
4568
|
+
ct,
|
|
4569
4569
|
{
|
|
4570
4570
|
content: {
|
|
4571
4571
|
type: "reply",
|
|
4572
|
-
body: typeof
|
|
4573
|
-
createdAt:
|
|
4572
|
+
body: typeof b.data.content == "string" ? (Q = b == null ? void 0 : b.data) == null ? void 0 : Q.content : ((Y = (w = b == null ? void 0 : b.data) == null ? void 0 : w.content) == null ? void 0 : Y.text) || "",
|
|
4573
|
+
createdAt: b == null ? void 0 : b.created_at,
|
|
4574
4574
|
slugs: {
|
|
4575
4575
|
parentId: t,
|
|
4576
4576
|
activityId: r,
|
|
4577
|
-
replyParentId:
|
|
4578
|
-
reply:
|
|
4577
|
+
replyParentId: b == null ? void 0 : b.parent,
|
|
4578
|
+
reply: b == null ? void 0 : b.id
|
|
4579
4579
|
},
|
|
4580
4580
|
slug: "",
|
|
4581
4581
|
author: {
|
|
4582
|
-
id: (L =
|
|
4583
|
-
name: (U = (O =
|
|
4584
|
-
organization: (Z = (W =
|
|
4585
|
-
jobTitle: (
|
|
4582
|
+
id: (L = b == null ? void 0 : b.user) == null ? void 0 : L.id,
|
|
4583
|
+
name: (U = (O = b == null ? void 0 : b.user) == null ? void 0 : O.data) == null ? void 0 : U.name,
|
|
4584
|
+
organization: (Z = (W = b == null ? void 0 : b.user) == null ? void 0 : W.data) == null ? void 0 : Z.organization,
|
|
4585
|
+
jobTitle: (oe = (re = b == null ? void 0 : b.user) == null ? void 0 : re.data) == null ? void 0 : oe.jobTitle,
|
|
4586
4586
|
image: {
|
|
4587
|
-
thumbnail: ((
|
|
4587
|
+
thumbnail: ((ie = (ae = b == null ? void 0 : b.user) == null ? void 0 : ae.data) == null ? void 0 : ie.thumbnail) || void 0
|
|
4588
4588
|
}
|
|
4589
4589
|
},
|
|
4590
|
-
userLiked: ((
|
|
4591
|
-
likes: 0
|
|
4590
|
+
userLiked: ((se = b == null ? void 0 : b.own_children) == null ? void 0 : se.like) && ((P = b == null ? void 0 : b.own_children) == null ? void 0 : P.like.length) > 0,
|
|
4591
|
+
likes: ((te = b == null ? void 0 : b.children_counts) == null ? void 0 : te.like) || 0
|
|
4592
4592
|
},
|
|
4593
4593
|
functions: {
|
|
4594
4594
|
content: {
|
|
4595
4595
|
createContent: () => console.log("create"),
|
|
4596
4596
|
deleteContent: () => console.log("delete"),
|
|
4597
|
-
updateContent: (
|
|
4597
|
+
updateContent: (G, K) => k({ replyInfo: G, content: K })
|
|
4598
4598
|
},
|
|
4599
4599
|
likes: {
|
|
4600
4600
|
createLike: () => V({
|
|
4601
|
-
replyId:
|
|
4602
|
-
replyParentId:
|
|
4601
|
+
replyId: b == null ? void 0 : b.id,
|
|
4602
|
+
replyParentId: b == null ? void 0 : b.parent
|
|
4603
4603
|
}),
|
|
4604
|
-
deleteLike: () =>
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4604
|
+
deleteLike: () => {
|
|
4605
|
+
var K, ue, fe;
|
|
4606
|
+
const G = ((K = b == null ? void 0 : b.own_children) == null ? void 0 : K.like) && ((fe = (ue = b == null ? void 0 : b.own_children) == null ? void 0 : ue.like[0]) == null ? void 0 : fe.id);
|
|
4607
|
+
return x({
|
|
4608
|
+
replyId: G || ""
|
|
4609
|
+
});
|
|
4610
|
+
}
|
|
4608
4611
|
},
|
|
4609
4612
|
comments: {}
|
|
4610
4613
|
}
|
|
4611
4614
|
},
|
|
4612
|
-
|
|
4615
|
+
b == null ? void 0 : b.id
|
|
4613
4616
|
);
|
|
4614
4617
|
})),
|
|
4615
4618
|
_.showForm && /* @__PURE__ */ s.jsx(
|
|
4616
|
-
|
|
4619
|
+
It,
|
|
4617
4620
|
{
|
|
4618
4621
|
contentType: "reply",
|
|
4619
|
-
createPost: (
|
|
4622
|
+
createPost: (b, Q) => g(Q),
|
|
4620
4623
|
membershipRequiredToPost: {
|
|
4621
4624
|
isMember: !0,
|
|
4622
4625
|
required: !0,
|
|
@@ -4637,7 +4640,7 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4637
4640
|
isMember: a,
|
|
4638
4641
|
functions: { createReply: l, editReply: d, like: o, unlike: i, join: c, leave: u }
|
|
4639
4642
|
}) => {
|
|
4640
|
-
const f = N(), h =
|
|
4643
|
+
const f = N(), h = st(), p = ge(Se), _ = Br({
|
|
4641
4644
|
queryClient: h,
|
|
4642
4645
|
queryKey: [e, t, n],
|
|
4643
4646
|
mutationFn: async (x) => l({ activityId: n, content: x.body })
|
|
@@ -4660,20 +4663,20 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4660
4663
|
mutationFn: i
|
|
4661
4664
|
}), {
|
|
4662
4665
|
mutate: C
|
|
4663
|
-
} = de(M), I =
|
|
4666
|
+
} = de(M), I = ke(
|
|
4664
4667
|
({ replyId: x }) => T({ replyId: x }),
|
|
4665
4668
|
[T]
|
|
4666
|
-
), V =
|
|
4669
|
+
), V = ke(
|
|
4667
4670
|
({ replyId: x }) => C({ replyId: x }),
|
|
4668
4671
|
[C]
|
|
4669
4672
|
);
|
|
4670
4673
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4671
4674
|
/* @__PURE__ */ s.jsx(
|
|
4672
|
-
|
|
4675
|
+
It,
|
|
4673
4676
|
{
|
|
4674
4677
|
contentType: "reply",
|
|
4675
|
-
createPost: (x,
|
|
4676
|
-
j(
|
|
4678
|
+
createPost: (x, b) => {
|
|
4679
|
+
j(b);
|
|
4677
4680
|
},
|
|
4678
4681
|
membershipRequiredToPost: {
|
|
4679
4682
|
isMember: a,
|
|
@@ -4685,10 +4688,10 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4685
4688
|
}
|
|
4686
4689
|
),
|
|
4687
4690
|
(r == null ? void 0 : r.length) === 0 || (r == null ? void 0 : r.map((x) => {
|
|
4688
|
-
var w, Y, L, O, U, W, Z,
|
|
4689
|
-
const
|
|
4691
|
+
var w, Y, L, O, U, W, Z, re, oe, ae, ie, se, P, te, G, K, ue, fe;
|
|
4692
|
+
const b = ((w = x == null ? void 0 : x.user) == null ? void 0 : w.id) === (p == null ? void 0 : p.id), Q = Ht(a, b);
|
|
4690
4693
|
return /* @__PURE__ */ s.jsx(Sr, { children: /* @__PURE__ */ s.jsx(
|
|
4691
|
-
|
|
4694
|
+
ct,
|
|
4692
4695
|
{
|
|
4693
4696
|
content: {
|
|
4694
4697
|
type: "reply",
|
|
@@ -4704,24 +4707,28 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4704
4707
|
author: {
|
|
4705
4708
|
id: (U = x == null ? void 0 : x.user) == null ? void 0 : U.id,
|
|
4706
4709
|
name: (Z = (W = x == null ? void 0 : x.user) == null ? void 0 : W.data) == null ? void 0 : Z.name,
|
|
4707
|
-
organization: (
|
|
4708
|
-
jobTitle: (
|
|
4710
|
+
organization: (oe = (re = x == null ? void 0 : x.user) == null ? void 0 : re.data) == null ? void 0 : oe.organization,
|
|
4711
|
+
jobTitle: (ie = (ae = x == null ? void 0 : x.user) == null ? void 0 : ae.data) == null ? void 0 : ie.jobTitle,
|
|
4709
4712
|
image: {
|
|
4710
|
-
thumbnail: ((P = (
|
|
4713
|
+
thumbnail: ((P = (se = x == null ? void 0 : x.user) == null ? void 0 : se.data) == null ? void 0 : P.thumbnail) || void 0
|
|
4711
4714
|
}
|
|
4712
4715
|
},
|
|
4713
|
-
userLiked: ((
|
|
4714
|
-
likes: ((
|
|
4716
|
+
userLiked: ((te = x == null ? void 0 : x.own_children) == null ? void 0 : te.like) && ((G = x == null ? void 0 : x.own_children) == null ? void 0 : G.like.length) > 0,
|
|
4717
|
+
likes: ((K = x == null ? void 0 : x.children_counts) == null ? void 0 : K.like) || 0
|
|
4715
4718
|
},
|
|
4716
4719
|
functions: {
|
|
4717
4720
|
content: {
|
|
4718
4721
|
createContent: () => console.log("create"),
|
|
4719
4722
|
deleteContent: () => console.log("delete"),
|
|
4720
|
-
updateContent: (
|
|
4723
|
+
updateContent: (_e, xe) => S({ replyInfo: _e, content: xe })
|
|
4721
4724
|
},
|
|
4722
4725
|
likes: {
|
|
4723
4726
|
createLike: () => I({ replyId: x == null ? void 0 : x.id }),
|
|
4724
|
-
deleteLike: () =>
|
|
4727
|
+
deleteLike: () => {
|
|
4728
|
+
var xe, Ie, Ne;
|
|
4729
|
+
const _e = ((xe = x == null ? void 0 : x.own_children) == null ? void 0 : xe.like) && ((Ne = (Ie = x == null ? void 0 : x.own_children) == null ? void 0 : Ie.like[0]) == null ? void 0 : Ne.id);
|
|
4730
|
+
return V({ replyId: _e || "" });
|
|
4731
|
+
}
|
|
4725
4732
|
},
|
|
4726
4733
|
comments: {}
|
|
4727
4734
|
},
|
|
@@ -4732,8 +4739,8 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4732
4739
|
parentId: t,
|
|
4733
4740
|
replyParentId: x == null ? void 0 : x.id,
|
|
4734
4741
|
activityId: n,
|
|
4735
|
-
replyCount: ((
|
|
4736
|
-
replies: (
|
|
4742
|
+
replyCount: ((ue = x == null ? void 0 : x.children_counts) == null ? void 0 : ue.reply) || 0,
|
|
4743
|
+
replies: (fe = x == null ? void 0 : x.latest_children) == null ? void 0 : fe.reply,
|
|
4737
4744
|
isMember: a,
|
|
4738
4745
|
functions: {
|
|
4739
4746
|
create: l,
|
|
@@ -4842,19 +4849,19 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4842
4849
|
leave: p
|
|
4843
4850
|
}
|
|
4844
4851
|
}) => {
|
|
4845
|
-
var O, U, W, Z,
|
|
4846
|
-
const _ = ge(
|
|
4852
|
+
var O, U, W, Z, re, oe, ae, ie, se, P, te;
|
|
4853
|
+
const _ = ge(Se), j = st(), {
|
|
4847
4854
|
data: g,
|
|
4848
4855
|
error: S,
|
|
4849
4856
|
isLoading: k,
|
|
4850
4857
|
isFetching: T
|
|
4851
|
-
} =
|
|
4858
|
+
} = fn({
|
|
4852
4859
|
queryKey: [e, t, n],
|
|
4853
4860
|
queryFn: a
|
|
4854
4861
|
}), M = Yr({
|
|
4855
4862
|
queryClient: j,
|
|
4856
4863
|
queryKey: [e, t, n],
|
|
4857
|
-
mutationFn: async (
|
|
4864
|
+
mutationFn: async (G) => await l(G)
|
|
4858
4865
|
}), {
|
|
4859
4866
|
mutate: C
|
|
4860
4867
|
} = de(M), I = Gr({
|
|
@@ -4868,29 +4875,29 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4868
4875
|
queryKey: [e, t, n],
|
|
4869
4876
|
user: _,
|
|
4870
4877
|
mutationFn: async () => {
|
|
4871
|
-
var
|
|
4872
|
-
const
|
|
4873
|
-
(
|
|
4874
|
-
)) == null ? void 0 :
|
|
4875
|
-
await o({ activityId: n, reactionId:
|
|
4878
|
+
var K, ue, fe;
|
|
4879
|
+
const G = (fe = (ue = (K = g == null ? void 0 : g.own_reactions) == null ? void 0 : K.like) == null ? void 0 : ue.find(
|
|
4880
|
+
(_e) => _e.user_id === (_ == null ? void 0 : _.id)
|
|
4881
|
+
)) == null ? void 0 : fe.id;
|
|
4882
|
+
await o({ activityId: n, reactionId: G });
|
|
4876
4883
|
},
|
|
4877
4884
|
activity: g
|
|
4878
4885
|
}), {
|
|
4879
|
-
mutate:
|
|
4880
|
-
} = de(x), Q =
|
|
4881
|
-
({ activityId:
|
|
4886
|
+
mutate: b
|
|
4887
|
+
} = de(x), Q = ke(
|
|
4888
|
+
({ activityId: G }) => V({ activityId: G }),
|
|
4882
4889
|
[V]
|
|
4883
|
-
), w =
|
|
4884
|
-
async ({ activityId:
|
|
4885
|
-
[
|
|
4890
|
+
), w = ke(
|
|
4891
|
+
async ({ activityId: G }) => b({ activityId: G }),
|
|
4892
|
+
[b]
|
|
4886
4893
|
);
|
|
4887
4894
|
if (S)
|
|
4888
|
-
return /* @__PURE__ */ s.jsx(
|
|
4895
|
+
return /* @__PURE__ */ s.jsx(it, { variant: "error", text: S.message });
|
|
4889
4896
|
if (k || T)
|
|
4890
|
-
return /* @__PURE__ */ s.jsx(
|
|
4891
|
-
const Y = ((O = g == null ? void 0 : g.actor) == null ? void 0 : O.id) === (_ == null ? void 0 : _.id), L =
|
|
4897
|
+
return /* @__PURE__ */ s.jsx(je, { style: { height: "400px" } });
|
|
4898
|
+
const Y = ((O = g == null ? void 0 : g.actor) == null ? void 0 : O.id) === (_ == null ? void 0 : _.id), L = Ht(r, Y);
|
|
4892
4899
|
return /* @__PURE__ */ s.jsx(
|
|
4893
|
-
|
|
4900
|
+
ct,
|
|
4894
4901
|
{
|
|
4895
4902
|
content: {
|
|
4896
4903
|
type: "post",
|
|
@@ -4907,21 +4914,21 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4907
4914
|
id: (U = g == null ? void 0 : g.actor) == null ? void 0 : U.id,
|
|
4908
4915
|
name: (W = g == null ? void 0 : g.actor) == null ? void 0 : W.data.name,
|
|
4909
4916
|
organization: (Z = g == null ? void 0 : g.actor) == null ? void 0 : Z.data.organization,
|
|
4910
|
-
jobTitle: (
|
|
4917
|
+
jobTitle: (re = g == null ? void 0 : g.actor) == null ? void 0 : re.data.jobTitle,
|
|
4911
4918
|
image: {
|
|
4912
|
-
thumbnail: ((
|
|
4919
|
+
thumbnail: ((oe = g == null ? void 0 : g.actor) == null ? void 0 : oe.data.thumbnail) || void 0
|
|
4913
4920
|
}
|
|
4914
4921
|
},
|
|
4915
|
-
userLiked: ((
|
|
4922
|
+
userLiked: ((ae = g == null ? void 0 : g.own_reactions) == null ? void 0 : ae.like) && ((ie = g == null ? void 0 : g.own_reactions) == null ? void 0 : ie.like.length) > 0,
|
|
4916
4923
|
likes: g && (g == null ? void 0 : g.reaction_counts.like),
|
|
4917
4924
|
comments: g && (g == null ? void 0 : g.reaction_counts.reply)
|
|
4918
4925
|
},
|
|
4919
|
-
originalAuthorId: (
|
|
4926
|
+
originalAuthorId: (se = g == null ? void 0 : g.actor) == null ? void 0 : se.id,
|
|
4920
4927
|
functions: {
|
|
4921
4928
|
content: {
|
|
4922
4929
|
createContent: () => console.log("create"),
|
|
4923
4930
|
deleteContent: () => console.log("delete"),
|
|
4924
|
-
updateContent: (
|
|
4931
|
+
updateContent: (G, K) => C({ activityInfo: G, content: K })
|
|
4925
4932
|
},
|
|
4926
4933
|
likes: {
|
|
4927
4934
|
createLike: () => Q({ activityId: n }),
|
|
@@ -4944,7 +4951,7 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4944
4951
|
basePath: e,
|
|
4945
4952
|
parentId: t,
|
|
4946
4953
|
activityId: n,
|
|
4947
|
-
repliesList: (
|
|
4954
|
+
repliesList: (te = g == null ? void 0 : g.latest_reactions) == null ? void 0 : te.reply,
|
|
4948
4955
|
isMember: r,
|
|
4949
4956
|
functions: {
|
|
4950
4957
|
createReply: i,
|
|
@@ -4968,65 +4975,65 @@ const Nr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4968
4975
|
image: { thumbnail: a }
|
|
4969
4976
|
});
|
|
4970
4977
|
export {
|
|
4971
|
-
|
|
4978
|
+
At as ASSETS_BUCKET,
|
|
4972
4979
|
Po as ActivitiesFeed,
|
|
4973
4980
|
Ro as ActivitySection,
|
|
4974
|
-
|
|
4981
|
+
It as AddPost,
|
|
4975
4982
|
po as BannerSection,
|
|
4976
4983
|
ko as Breadcrumbs,
|
|
4977
|
-
|
|
4978
|
-
|
|
4984
|
+
J as Button,
|
|
4985
|
+
ot as ButtonWrapper,
|
|
4979
4986
|
ir as CacheProvider,
|
|
4980
|
-
|
|
4987
|
+
kn as CollapsibleSection,
|
|
4981
4988
|
Eo as Columns,
|
|
4982
4989
|
wo as CommunityDetails,
|
|
4983
4990
|
ar as Contributors,
|
|
4984
|
-
|
|
4991
|
+
lt as ConversationContext,
|
|
4985
4992
|
_r as CookieBanner,
|
|
4986
4993
|
Sr as DiscussionConversation,
|
|
4987
|
-
|
|
4994
|
+
Pn as DiscussionForm,
|
|
4988
4995
|
Mr as DiscussionLikes,
|
|
4989
|
-
|
|
4996
|
+
ct as DiscussionPost,
|
|
4990
4997
|
Nr as DiscussionThread,
|
|
4991
4998
|
De as Divider,
|
|
4992
4999
|
fo as DownloadSection,
|
|
4993
|
-
|
|
5000
|
+
Oe as EMAILS,
|
|
4994
5001
|
So as EmailHelperTextBox,
|
|
4995
|
-
|
|
5002
|
+
it as EmptyStateBox,
|
|
4996
5003
|
jo as Filters,
|
|
4997
5004
|
dr as FlagsProvider,
|
|
4998
|
-
|
|
4999
|
-
|
|
5005
|
+
Mn as Footer,
|
|
5006
|
+
wn as FullWidthSection,
|
|
5000
5007
|
vo as GlobalProviders,
|
|
5001
|
-
|
|
5008
|
+
Nn as Header,
|
|
5002
5009
|
zs as HelperTextBox,
|
|
5003
|
-
|
|
5010
|
+
gn as HiddenFromScreenReaders,
|
|
5004
5011
|
xo as HideShowTextBox,
|
|
5005
|
-
|
|
5012
|
+
Ee as HighlightedTextBox,
|
|
5006
5013
|
ur as IntlProvider,
|
|
5007
5014
|
wr as InviteForm,
|
|
5008
5015
|
Ao as InviteModal,
|
|
5009
|
-
|
|
5016
|
+
Tn as JoinButton,
|
|
5010
5017
|
yo as LanguageSwitcher,
|
|
5011
|
-
|
|
5018
|
+
at as Link,
|
|
5012
5019
|
hr as LoadMore,
|
|
5013
5020
|
bo as LoadingBlock,
|
|
5014
|
-
|
|
5021
|
+
je as LoadingPlaceholder,
|
|
5015
5022
|
sr as LoadingState,
|
|
5016
|
-
|
|
5023
|
+
$n as Logo,
|
|
5017
5024
|
ho as LogoSection,
|
|
5018
|
-
|
|
5025
|
+
on as MarkdownText,
|
|
5019
5026
|
go as MarketingBox,
|
|
5020
|
-
|
|
5027
|
+
Bt as Member,
|
|
5021
5028
|
Do as MembersList,
|
|
5022
5029
|
Cr as Modal,
|
|
5023
5030
|
pr as MoreMenu,
|
|
5024
5031
|
_o as NUMBER_OF_USERS,
|
|
5025
|
-
|
|
5032
|
+
Rn as Overlay,
|
|
5026
5033
|
Mo as PageLayout,
|
|
5027
5034
|
To as PasswordRules,
|
|
5028
5035
|
qs as Pill,
|
|
5029
|
-
|
|
5036
|
+
Ot as ProfilePicture,
|
|
5030
5037
|
tr as ProgressBar,
|
|
5031
5038
|
$o as Rating,
|
|
5032
5039
|
Vr as RepliesFeed,
|
|
@@ -5034,19 +5041,19 @@ export {
|
|
|
5034
5041
|
Is as ResponsiveImage,
|
|
5035
5042
|
vr as SearchForm,
|
|
5036
5043
|
Ks as Span,
|
|
5037
|
-
|
|
5044
|
+
Pt as StatusBanner,
|
|
5038
5045
|
Co as Tags,
|
|
5039
5046
|
Hs as Tooltip,
|
|
5040
|
-
|
|
5047
|
+
Se as UserContext,
|
|
5041
5048
|
mr as UserProvider,
|
|
5042
5049
|
le as VisuallyHidden,
|
|
5043
5050
|
Dr as addAriaProps,
|
|
5044
|
-
|
|
5045
|
-
|
|
5051
|
+
Sn as getMember,
|
|
5052
|
+
Ke as headerData,
|
|
5046
5053
|
Fo as mapGetStreamData,
|
|
5047
5054
|
Es as useCurrentPath,
|
|
5048
5055
|
Ce as useEffectAfterMount,
|
|
5049
|
-
|
|
5056
|
+
rt as useScreenWidth,
|
|
5050
5057
|
Ts as useScrollListener,
|
|
5051
5058
|
mo as useScrollToHash
|
|
5052
5059
|
};
|