@apolitical/component-library 1.13.0-beta.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/discussion/discussion.helpers.d.ts +1 -0
- package/index.js +12 -12
- package/index.mjs +839 -830
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import N, { memo as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useIntl as P, IntlProvider as
|
|
1
|
+
import N, { memo as Ne, useState as D, useEffect as z, useRef as Z, useMemo as qe, Children as yt, createContext as Mt, useContext as ye, Fragment as Zt, useCallback as Ee, useReducer as rr, Suspense as sr } from "react";
|
|
2
|
+
import or from "lodash.clonedeep";
|
|
3
|
+
import ar from "lodash.set";
|
|
4
|
+
import { useIntl as P, IntlProvider as ir, createIntl as lr, FormattedMessage as we } from "react-intl";
|
|
5
5
|
import Ct from "truncate";
|
|
6
|
-
import
|
|
7
|
-
import { QueryClient as
|
|
8
|
-
import { ReactQueryDevtools as
|
|
9
|
-
import
|
|
10
|
-
import { useCookies as
|
|
11
|
-
import { ReactMultiEmail as
|
|
12
|
-
import
|
|
13
|
-
import { ErrorBoundary as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
function
|
|
6
|
+
import Ke from "markdown-to-jsx";
|
|
7
|
+
import { QueryClient as cr, QueryClientProvider as ur, useQueryClient as Nt, useQuery as cn, useMutation as fe } from "@tanstack/react-query";
|
|
8
|
+
import { ReactQueryDevtools as dr } from "@tanstack/react-query-devtools";
|
|
9
|
+
import Ge from "posthog-js";
|
|
10
|
+
import { useCookies as mr, CookiesProvider as fr } from "react-cookie";
|
|
11
|
+
import { ReactMultiEmail as pr } from "react-multi-email";
|
|
12
|
+
import un from "lodash.get";
|
|
13
|
+
import { ErrorBoundary as hr } from "react-error-boundary";
|
|
14
|
+
import gr from "react-textarea-autosize";
|
|
15
|
+
import _r from "lodash.isequal";
|
|
16
|
+
function xr(e) {
|
|
17
17
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
18
18
|
}
|
|
19
|
-
var
|
|
19
|
+
var dn = { exports: {} };
|
|
20
20
|
/*!
|
|
21
21
|
Copyright (c) 2018 Jed Watson.
|
|
22
22
|
Licensed under the MIT License (MIT), see
|
|
@@ -51,10 +51,10 @@ var un = { exports: {} };
|
|
|
51
51
|
}
|
|
52
52
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
53
53
|
})();
|
|
54
|
-
})(
|
|
55
|
-
var
|
|
56
|
-
const j = /* @__PURE__ */
|
|
57
|
-
var jt = { exports: {} },
|
|
54
|
+
})(dn);
|
|
55
|
+
var vr = dn.exports;
|
|
56
|
+
const j = /* @__PURE__ */ xr(vr), br = ({ element: e = "span", showOnFocus: t = !0, children: n, ...s }) => N.createElement(e, { ...s, className: j("hidden", { "show-on-focus": t }), children: n }), ne = Ne(br), wr = ({ element: e = "span", children: t = null, ...n }) => N.createElement(e, { ...n, "aria-hidden": !0 }, t), mn = Ne(wr);
|
|
57
|
+
var jt = { exports: {} }, De = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
60
60
|
* react-jsx-runtime.production.min.js
|
|
@@ -64,11 +64,11 @@ var jt = { exports: {} }, Ce = {};
|
|
|
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
|
|
68
|
-
function
|
|
69
|
-
if (
|
|
70
|
-
return
|
|
71
|
-
|
|
67
|
+
var qt;
|
|
68
|
+
function kr() {
|
|
69
|
+
if (qt)
|
|
70
|
+
return De;
|
|
71
|
+
qt = 1;
|
|
72
72
|
var e = N, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
73
|
function d(a, i, c) {
|
|
74
74
|
var u, f = {}, p = null, h = null;
|
|
@@ -80,9 +80,9 @@ function wr() {
|
|
|
80
80
|
f[u] === void 0 && (f[u] = i[u]);
|
|
81
81
|
return { $$typeof: t, type: a, key: p, ref: h, props: f, _owner: o.current };
|
|
82
82
|
}
|
|
83
|
-
return
|
|
83
|
+
return De.Fragment = n, De.jsx = d, De.jsxs = d, De;
|
|
84
84
|
}
|
|
85
|
-
var
|
|
85
|
+
var Pe = {};
|
|
86
86
|
/**
|
|
87
87
|
* @license React
|
|
88
88
|
* react-jsx-runtime.development.js
|
|
@@ -92,9 +92,9 @@ var Ne = {};
|
|
|
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
|
|
96
|
-
function
|
|
97
|
-
return
|
|
95
|
+
var Kt;
|
|
96
|
+
function yr() {
|
|
97
|
+
return Kt || (Kt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
98
|
var e = N, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), a = 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"), p = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), _ = Symbol.iterator, v = "@@iterator";
|
|
99
99
|
function g(m) {
|
|
100
100
|
if (m === null || typeof m != "object")
|
|
@@ -112,18 +112,18 @@ function kr() {
|
|
|
112
112
|
}
|
|
113
113
|
function $(m, b, y) {
|
|
114
114
|
{
|
|
115
|
-
var S = E.ReactDebugCurrentFrame,
|
|
116
|
-
|
|
115
|
+
var S = E.ReactDebugCurrentFrame, O = S.getStackAddendum();
|
|
116
|
+
O !== "" && (b += "%s", y = y.concat([O]));
|
|
117
117
|
var H = y.map(function(A) {
|
|
118
118
|
return String(A);
|
|
119
119
|
});
|
|
120
120
|
H.unshift("Warning: " + b), Function.prototype.apply.call(console[m], console, H);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var T = !1, M = !1, Q = !1,
|
|
123
|
+
var T = !1, M = !1, Q = !1, V = !1, w = !1, F;
|
|
124
124
|
F = Symbol.for("react.module.reference");
|
|
125
125
|
function q(m) {
|
|
126
|
-
return !!(typeof m == "string" || typeof m == "function" || m === s || m === l || w || m === o || m === c || m === u ||
|
|
126
|
+
return !!(typeof m == "string" || typeof m == "function" || m === s || m === l || w || m === o || m === c || m === u || V || m === h || T || M || Q || typeof m == "object" && m !== null && (m.$$typeof === p || m.$$typeof === f || m.$$typeof === d || m.$$typeof === a || 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.
|
|
@@ -133,13 +133,13 @@ function kr() {
|
|
|
133
133
|
var S = m.displayName;
|
|
134
134
|
if (S)
|
|
135
135
|
return S;
|
|
136
|
-
var
|
|
137
|
-
return
|
|
136
|
+
var O = b.displayName || b.name || "";
|
|
137
|
+
return O !== "" ? y + "(" + O + ")" : y;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function Y(m) {
|
|
140
140
|
return m.displayName || "Context";
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function B(m) {
|
|
143
143
|
if (m == null)
|
|
144
144
|
return null;
|
|
145
145
|
if (typeof m.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof m == "function")
|
|
@@ -164,19 +164,19 @@ function kr() {
|
|
|
164
164
|
switch (m.$$typeof) {
|
|
165
165
|
case a:
|
|
166
166
|
var b = m;
|
|
167
|
-
return
|
|
167
|
+
return Y(b) + ".Consumer";
|
|
168
168
|
case d:
|
|
169
169
|
var y = m;
|
|
170
|
-
return
|
|
170
|
+
return Y(y._context) + ".Provider";
|
|
171
171
|
case i:
|
|
172
172
|
return k(m, m.render, "ForwardRef");
|
|
173
173
|
case f:
|
|
174
174
|
var S = m.displayName || null;
|
|
175
|
-
return S !== null ? S :
|
|
175
|
+
return S !== null ? S : B(m.type) || "Memo";
|
|
176
176
|
case p: {
|
|
177
|
-
var
|
|
177
|
+
var O = m, H = O._payload, A = O._init;
|
|
178
178
|
try {
|
|
179
|
-
return
|
|
179
|
+
return B(A(H));
|
|
180
180
|
} catch {
|
|
181
181
|
return null;
|
|
182
182
|
}
|
|
@@ -184,18 +184,18 @@ function kr() {
|
|
|
184
184
|
}
|
|
185
185
|
return null;
|
|
186
186
|
}
|
|
187
|
-
var L = Object.assign, U = 0,
|
|
188
|
-
function
|
|
187
|
+
var L = Object.assign, U = 0, G, K, ie, le, se, R, ee;
|
|
188
|
+
function oe() {
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
function
|
|
190
|
+
oe.__reactDisabledLog = !0;
|
|
191
|
+
function ce() {
|
|
192
192
|
{
|
|
193
193
|
if (U === 0) {
|
|
194
|
-
|
|
194
|
+
G = console.log, K = console.info, ie = console.warn, le = console.error, se = console.group, R = console.groupCollapsed, ee = console.groupEnd;
|
|
195
195
|
var m = {
|
|
196
196
|
configurable: !0,
|
|
197
197
|
enumerable: !0,
|
|
198
|
-
value:
|
|
198
|
+
value: oe,
|
|
199
199
|
writable: !0
|
|
200
200
|
};
|
|
201
201
|
Object.defineProperties(console, {
|
|
@@ -211,7 +211,7 @@ function kr() {
|
|
|
211
211
|
U++;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function te() {
|
|
215
215
|
{
|
|
216
216
|
if (U--, U === 0) {
|
|
217
217
|
var m = {
|
|
@@ -221,64 +221,64 @@ function kr() {
|
|
|
221
221
|
};
|
|
222
222
|
Object.defineProperties(console, {
|
|
223
223
|
log: L({}, m, {
|
|
224
|
-
value:
|
|
224
|
+
value: G
|
|
225
225
|
}),
|
|
226
226
|
info: L({}, m, {
|
|
227
|
-
value:
|
|
227
|
+
value: K
|
|
228
228
|
}),
|
|
229
229
|
warn: L({}, m, {
|
|
230
|
-
value:
|
|
230
|
+
value: ie
|
|
231
231
|
}),
|
|
232
232
|
error: L({}, m, {
|
|
233
|
-
value:
|
|
233
|
+
value: le
|
|
234
234
|
}),
|
|
235
235
|
group: L({}, m, {
|
|
236
236
|
value: se
|
|
237
237
|
}),
|
|
238
238
|
groupCollapsed: L({}, m, {
|
|
239
|
-
value:
|
|
239
|
+
value: R
|
|
240
240
|
}),
|
|
241
241
|
groupEnd: L({}, m, {
|
|
242
|
-
value:
|
|
242
|
+
value: ee
|
|
243
243
|
})
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
U < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
var
|
|
250
|
-
function
|
|
249
|
+
var ue = E.ReactCurrentDispatcher, me;
|
|
250
|
+
function pe(m, b, y) {
|
|
251
251
|
{
|
|
252
|
-
if (
|
|
252
|
+
if (me === void 0)
|
|
253
253
|
try {
|
|
254
254
|
throw Error();
|
|
255
|
-
} catch (
|
|
256
|
-
var S =
|
|
257
|
-
|
|
255
|
+
} catch (O) {
|
|
256
|
+
var S = O.stack.trim().match(/\n( *(at )?)/);
|
|
257
|
+
me = S && S[1] || "";
|
|
258
258
|
}
|
|
259
259
|
return `
|
|
260
|
-
` +
|
|
260
|
+
` + me + m;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
var
|
|
263
|
+
var ge = !1, Se;
|
|
264
264
|
{
|
|
265
|
-
var
|
|
266
|
-
|
|
265
|
+
var Pn = typeof WeakMap == "function" ? WeakMap : Map;
|
|
266
|
+
Se = new Pn();
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
if (!m ||
|
|
268
|
+
function Ot(m, b) {
|
|
269
|
+
if (!m || ge)
|
|
270
270
|
return "";
|
|
271
271
|
{
|
|
272
|
-
var y =
|
|
272
|
+
var y = Se.get(m);
|
|
273
273
|
if (y !== void 0)
|
|
274
274
|
return y;
|
|
275
275
|
}
|
|
276
276
|
var S;
|
|
277
|
-
|
|
278
|
-
var
|
|
277
|
+
ge = !0;
|
|
278
|
+
var O = Error.prepareStackTrace;
|
|
279
279
|
Error.prepareStackTrace = void 0;
|
|
280
280
|
var H;
|
|
281
|
-
H =
|
|
281
|
+
H = ue.current, ue.current = null, ce();
|
|
282
282
|
try {
|
|
283
283
|
if (b) {
|
|
284
284
|
var A = function() {
|
|
@@ -291,55 +291,55 @@ function kr() {
|
|
|
291
291
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
292
292
|
try {
|
|
293
293
|
Reflect.construct(A, []);
|
|
294
|
-
} catch (
|
|
295
|
-
S =
|
|
294
|
+
} catch (_e) {
|
|
295
|
+
S = _e;
|
|
296
296
|
}
|
|
297
297
|
Reflect.construct(m, [], A);
|
|
298
298
|
} else {
|
|
299
299
|
try {
|
|
300
300
|
A.call();
|
|
301
|
-
} catch (
|
|
302
|
-
S =
|
|
301
|
+
} catch (_e) {
|
|
302
|
+
S = _e;
|
|
303
303
|
}
|
|
304
304
|
m.call(A.prototype);
|
|
305
305
|
}
|
|
306
306
|
} else {
|
|
307
307
|
try {
|
|
308
308
|
throw Error();
|
|
309
|
-
} catch (
|
|
310
|
-
S =
|
|
309
|
+
} catch (_e) {
|
|
310
|
+
S = _e;
|
|
311
311
|
}
|
|
312
312
|
m();
|
|
313
313
|
}
|
|
314
|
-
} catch (
|
|
315
|
-
if (
|
|
316
|
-
for (var C =
|
|
314
|
+
} catch (_e) {
|
|
315
|
+
if (_e && S && typeof _e.stack == "string") {
|
|
316
|
+
for (var C = _e.stack.split(`
|
|
317
317
|
`), re = S.stack.split(`
|
|
318
|
-
`),
|
|
319
|
-
|
|
320
|
-
for (;
|
|
321
|
-
if (C[
|
|
322
|
-
if (
|
|
318
|
+
`), J = C.length - 1, X = re.length - 1; J >= 1 && X >= 0 && C[J] !== re[X]; )
|
|
319
|
+
X--;
|
|
320
|
+
for (; J >= 1 && X >= 0; J--, X--)
|
|
321
|
+
if (C[J] !== re[X]) {
|
|
322
|
+
if (J !== 1 || X !== 1)
|
|
323
323
|
do
|
|
324
|
-
if (
|
|
325
|
-
var
|
|
326
|
-
` + C[
|
|
327
|
-
return m.displayName &&
|
|
324
|
+
if (J--, X--, X < 0 || C[J] !== re[X]) {
|
|
325
|
+
var de = `
|
|
326
|
+
` + C[J].replace(" at new ", " at ");
|
|
327
|
+
return m.displayName && de.includes("<anonymous>") && (de = de.replace("<anonymous>", m.displayName)), typeof m == "function" && Se.set(m, de), de;
|
|
328
328
|
}
|
|
329
|
-
while (
|
|
329
|
+
while (J >= 1 && X >= 0);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
} finally {
|
|
334
|
-
|
|
334
|
+
ge = !1, ue.current = H, te(), Error.prepareStackTrace = O;
|
|
335
335
|
}
|
|
336
|
-
var
|
|
337
|
-
return typeof m == "function" &&
|
|
336
|
+
var Te = m ? m.displayName || m.name : "", Xt = Te ? pe(Te) : "";
|
|
337
|
+
return typeof m == "function" && Se.set(m, Xt), Xt;
|
|
338
338
|
}
|
|
339
|
-
function
|
|
340
|
-
return
|
|
339
|
+
function Fn(m, b, y) {
|
|
340
|
+
return Ot(m, !1);
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function Rn(m) {
|
|
343
343
|
var b = m.prototype;
|
|
344
344
|
return !!(b && b.isReactComponent);
|
|
345
345
|
}
|
|
@@ -347,42 +347,42 @@ function kr() {
|
|
|
347
347
|
if (m == null)
|
|
348
348
|
return "";
|
|
349
349
|
if (typeof m == "function")
|
|
350
|
-
return
|
|
350
|
+
return Ot(m, Rn(m));
|
|
351
351
|
if (typeof m == "string")
|
|
352
|
-
return
|
|
352
|
+
return pe(m);
|
|
353
353
|
switch (m) {
|
|
354
354
|
case c:
|
|
355
|
-
return
|
|
355
|
+
return pe("Suspense");
|
|
356
356
|
case u:
|
|
357
|
-
return
|
|
357
|
+
return pe("SuspenseList");
|
|
358
358
|
}
|
|
359
359
|
if (typeof m == "object")
|
|
360
360
|
switch (m.$$typeof) {
|
|
361
361
|
case i:
|
|
362
|
-
return
|
|
362
|
+
return Fn(m.render);
|
|
363
363
|
case f:
|
|
364
364
|
return Be(m.type, b, y);
|
|
365
365
|
case p: {
|
|
366
|
-
var S = m,
|
|
366
|
+
var S = m, O = S._payload, H = S._init;
|
|
367
367
|
try {
|
|
368
|
-
return Be(H(
|
|
368
|
+
return Be(H(O), b, y);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
return "";
|
|
374
374
|
}
|
|
375
|
-
var
|
|
376
|
-
function
|
|
375
|
+
var Ie = Object.prototype.hasOwnProperty, Lt = {}, Bt = E.ReactDebugCurrentFrame;
|
|
376
|
+
function He(m) {
|
|
377
377
|
if (m) {
|
|
378
378
|
var b = m._owner, y = Be(m.type, m._source, b ? b.type : null);
|
|
379
379
|
Bt.setExtraStackFrame(y);
|
|
380
380
|
} else
|
|
381
381
|
Bt.setExtraStackFrame(null);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function On(m, b, y, S, O) {
|
|
384
384
|
{
|
|
385
|
-
var H = Function.call.bind(
|
|
385
|
+
var H = Function.call.bind(Ie);
|
|
386
386
|
for (var A in m)
|
|
387
387
|
if (H(m, A)) {
|
|
388
388
|
var C = void 0;
|
|
@@ -392,16 +392,16 @@ function kr() {
|
|
|
392
392
|
throw re.name = "Invariant Violation", re;
|
|
393
393
|
}
|
|
394
394
|
C = m[A](b, A, S, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
|
-
} catch (
|
|
396
|
-
C =
|
|
395
|
+
} catch (J) {
|
|
396
|
+
C = J;
|
|
397
397
|
}
|
|
398
|
-
C && !(C instanceof Error) && (
|
|
398
|
+
C && !(C instanceof Error) && (He(O), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", S || "React class", y, A, typeof C), He(null)), C instanceof Error && !(C.message in Lt) && (Lt[C.message] = !0, He(O), x("Failed %s type: %s", y, C.message), He(null));
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
var
|
|
402
|
+
var Ln = Array.isArray;
|
|
403
403
|
function st(m) {
|
|
404
|
-
return
|
|
404
|
+
return Ln(m);
|
|
405
405
|
}
|
|
406
406
|
function Bn(m) {
|
|
407
407
|
{
|
|
@@ -409,53 +409,53 @@ function kr() {
|
|
|
409
409
|
return y;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
function
|
|
412
|
+
function In(m) {
|
|
413
413
|
try {
|
|
414
|
-
return
|
|
414
|
+
return It(m), !1;
|
|
415
415
|
} catch {
|
|
416
416
|
return !0;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function It(m) {
|
|
420
420
|
return "" + m;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
if (
|
|
424
|
-
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Bn(m)),
|
|
422
|
+
function Ht(m) {
|
|
423
|
+
if (In(m))
|
|
424
|
+
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Bn(m)), It(m);
|
|
425
425
|
}
|
|
426
|
-
var
|
|
426
|
+
var Ae = E.ReactCurrentOwner, Hn = {
|
|
427
427
|
key: !0,
|
|
428
428
|
ref: !0,
|
|
429
429
|
__self: !0,
|
|
430
430
|
__source: !0
|
|
431
|
-
},
|
|
431
|
+
}, Qt, Ut, ot;
|
|
432
432
|
ot = {};
|
|
433
|
-
function
|
|
434
|
-
if (
|
|
433
|
+
function Qn(m) {
|
|
434
|
+
if (Ie.call(m, "ref")) {
|
|
435
435
|
var b = Object.getOwnPropertyDescriptor(m, "ref").get;
|
|
436
436
|
if (b && b.isReactWarning)
|
|
437
437
|
return !1;
|
|
438
438
|
}
|
|
439
439
|
return m.ref !== void 0;
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
if (
|
|
441
|
+
function Un(m) {
|
|
442
|
+
if (Ie.call(m, "key")) {
|
|
443
443
|
var b = Object.getOwnPropertyDescriptor(m, "key").get;
|
|
444
444
|
if (b && b.isReactWarning)
|
|
445
445
|
return !1;
|
|
446
446
|
}
|
|
447
447
|
return m.key !== void 0;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
if (typeof m.ref == "string" &&
|
|
451
|
-
var y =
|
|
452
|
-
ot[y] || (x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',
|
|
449
|
+
function Wn(m, b) {
|
|
450
|
+
if (typeof m.ref == "string" && Ae.current && b && Ae.current.stateNode !== b) {
|
|
451
|
+
var y = B(Ae.current.type);
|
|
452
|
+
ot[y] || (x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', B(Ae.current.type), m.ref), ot[y] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function zn(m, b) {
|
|
456
456
|
{
|
|
457
457
|
var y = function() {
|
|
458
|
-
|
|
458
|
+
Qt || (Qt = !0, x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", b));
|
|
459
459
|
};
|
|
460
460
|
y.isReactWarning = !0, Object.defineProperty(m, "key", {
|
|
461
461
|
get: y,
|
|
@@ -463,10 +463,10 @@ function kr() {
|
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function Vn(m, b) {
|
|
467
467
|
{
|
|
468
468
|
var y = function() {
|
|
469
|
-
|
|
469
|
+
Ut || (Ut = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", b));
|
|
470
470
|
};
|
|
471
471
|
y.isReactWarning = !0, Object.defineProperty(m, "ref", {
|
|
472
472
|
get: y,
|
|
@@ -474,7 +474,7 @@ function kr() {
|
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var
|
|
477
|
+
var Yn = function(m, b, y, S, O, H, A) {
|
|
478
478
|
var C = {
|
|
479
479
|
// This tag allows us to uniquely identify this as a React Element
|
|
480
480
|
$$typeof: t,
|
|
@@ -500,44 +500,44 @@ function kr() {
|
|
|
500
500
|
configurable: !1,
|
|
501
501
|
enumerable: !1,
|
|
502
502
|
writable: !1,
|
|
503
|
-
value:
|
|
503
|
+
value: O
|
|
504
504
|
}), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
|
|
505
505
|
};
|
|
506
|
-
function
|
|
506
|
+
function Gn(m, b, y, S, O) {
|
|
507
507
|
{
|
|
508
508
|
var H, A = {}, C = null, re = null;
|
|
509
|
-
y !== void 0 && (
|
|
509
|
+
y !== void 0 && (Ht(y), C = "" + y), Un(b) && (Ht(b.key), C = "" + b.key), Qn(b) && (re = b.ref, Wn(b, O));
|
|
510
510
|
for (H in b)
|
|
511
|
-
|
|
511
|
+
Ie.call(b, H) && !Hn.hasOwnProperty(H) && (A[H] = b[H]);
|
|
512
512
|
if (m && m.defaultProps) {
|
|
513
|
-
var
|
|
514
|
-
for (H in
|
|
515
|
-
A[H] === void 0 && (A[H] =
|
|
513
|
+
var J = m.defaultProps;
|
|
514
|
+
for (H in J)
|
|
515
|
+
A[H] === void 0 && (A[H] = J[H]);
|
|
516
516
|
}
|
|
517
517
|
if (C || re) {
|
|
518
|
-
var
|
|
519
|
-
C &&
|
|
518
|
+
var X = typeof m == "function" ? m.displayName || m.name || "Unknown" : m;
|
|
519
|
+
C && zn(A, X), re && Vn(A, X);
|
|
520
520
|
}
|
|
521
|
-
return
|
|
521
|
+
return Yn(m, C, re, O, S, Ae.current, A);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
var at = E.ReactCurrentOwner,
|
|
525
|
-
function
|
|
524
|
+
var at = E.ReactCurrentOwner, Wt = E.ReactDebugCurrentFrame;
|
|
525
|
+
function $e(m) {
|
|
526
526
|
if (m) {
|
|
527
527
|
var b = m._owner, y = Be(m.type, m._source, b ? b.type : null);
|
|
528
|
-
|
|
528
|
+
Wt.setExtraStackFrame(y);
|
|
529
529
|
} else
|
|
530
|
-
|
|
530
|
+
Wt.setExtraStackFrame(null);
|
|
531
531
|
}
|
|
532
532
|
var it;
|
|
533
533
|
it = !1;
|
|
534
534
|
function lt(m) {
|
|
535
535
|
return typeof m == "object" && m !== null && m.$$typeof === t;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function zt() {
|
|
538
538
|
{
|
|
539
539
|
if (at.current) {
|
|
540
|
-
var m =
|
|
540
|
+
var m = B(at.current.type);
|
|
541
541
|
if (m)
|
|
542
542
|
return `
|
|
543
543
|
|
|
@@ -546,7 +546,7 @@ Check the render method of \`` + m + "`.";
|
|
|
546
546
|
return "";
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function Jn(m) {
|
|
550
550
|
{
|
|
551
551
|
if (m !== void 0) {
|
|
552
552
|
var b = m.fileName.replace(/^.*[\\\/]/, ""), y = m.lineNumber;
|
|
@@ -557,10 +557,10 @@ Check your code at ` + b + ":" + y + ".";
|
|
|
557
557
|
return "";
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
var
|
|
561
|
-
function
|
|
560
|
+
var Vt = {};
|
|
561
|
+
function Xn(m) {
|
|
562
562
|
{
|
|
563
|
-
var b =
|
|
563
|
+
var b = zt();
|
|
564
564
|
if (!b) {
|
|
565
565
|
var y = typeof m == "string" ? m : m.displayName || m.name;
|
|
566
566
|
y && (b = `
|
|
@@ -570,39 +570,39 @@ Check the top-level render call using <` + y + ">.");
|
|
|
570
570
|
return b;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Yt(m, b) {
|
|
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 =
|
|
579
|
-
if (
|
|
578
|
+
var y = Xn(b);
|
|
579
|
+
if (Vt[y])
|
|
580
580
|
return;
|
|
581
|
-
|
|
581
|
+
Vt[y] = !0;
|
|
582
582
|
var S = "";
|
|
583
|
-
m && m._owner && m._owner !== at.current && (S = " It was passed a child from " +
|
|
583
|
+
m && m._owner && m._owner !== at.current && (S = " It was passed a child from " + B(m._owner.type) + "."), $e(m), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, S), $e(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function Gt(m, b) {
|
|
587
587
|
{
|
|
588
588
|
if (typeof m != "object")
|
|
589
589
|
return;
|
|
590
590
|
if (st(m))
|
|
591
591
|
for (var y = 0; y < m.length; y++) {
|
|
592
592
|
var S = m[y];
|
|
593
|
-
lt(S) &&
|
|
593
|
+
lt(S) && Yt(S, b);
|
|
594
594
|
}
|
|
595
595
|
else if (lt(m))
|
|
596
596
|
m._store && (m._store.validated = !0);
|
|
597
597
|
else if (m) {
|
|
598
|
-
var
|
|
599
|
-
if (typeof
|
|
600
|
-
for (var H =
|
|
601
|
-
lt(A.value) &&
|
|
598
|
+
var O = g(m);
|
|
599
|
+
if (typeof O == "function" && O !== m.entries)
|
|
600
|
+
for (var H = O.call(m), A; !(A = H.next()).done; )
|
|
601
|
+
lt(A.value) && Yt(A.value, b);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function Zn(m) {
|
|
606
606
|
{
|
|
607
607
|
var b = m.type;
|
|
608
608
|
if (b == null || typeof b == "string")
|
|
@@ -617,87 +617,87 @@ Check the top-level render call using <` + y + ">.");
|
|
|
617
617
|
else
|
|
618
618
|
return;
|
|
619
619
|
if (y) {
|
|
620
|
-
var S =
|
|
621
|
-
|
|
620
|
+
var S = B(b);
|
|
621
|
+
On(y, m.props, "prop", S, m);
|
|
622
622
|
} else if (b.PropTypes !== void 0 && !it) {
|
|
623
623
|
it = !0;
|
|
624
|
-
var
|
|
625
|
-
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
624
|
+
var O = B(b);
|
|
625
|
+
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O || "Unknown");
|
|
626
626
|
}
|
|
627
627
|
typeof b.getDefaultProps == "function" && !b.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function qn(m) {
|
|
631
631
|
{
|
|
632
632
|
for (var b = Object.keys(m.props), y = 0; y < b.length; y++) {
|
|
633
633
|
var S = b[y];
|
|
634
634
|
if (S !== "children" && S !== "key") {
|
|
635
|
-
|
|
635
|
+
$e(m), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", S), $e(null);
|
|
636
636
|
break;
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
m.ref !== null && (
|
|
639
|
+
m.ref !== null && ($e(m), x("Invalid attribute `ref` supplied to `React.Fragment`."), $e(null));
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function Jt(m, b, y, S, O, H) {
|
|
643
643
|
{
|
|
644
644
|
var A = q(m);
|
|
645
645
|
if (!A) {
|
|
646
646
|
var C = "";
|
|
647
647
|
(m === void 0 || typeof m == "object" && m !== null && Object.keys(m).length === 0) && (C += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
648
|
-
var re =
|
|
649
|
-
re ? C += re : C +=
|
|
650
|
-
var
|
|
651
|
-
m === null ?
|
|
648
|
+
var re = Jn(O);
|
|
649
|
+
re ? C += re : C += zt();
|
|
650
|
+
var J;
|
|
651
|
+
m === null ? J = "null" : st(m) ? J = "array" : m !== void 0 && m.$$typeof === t ? (J = "<" + (B(m.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : J = typeof m, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", J, C);
|
|
652
652
|
}
|
|
653
|
-
var
|
|
654
|
-
if (
|
|
655
|
-
return
|
|
653
|
+
var X = Gn(m, b, y, O, H);
|
|
654
|
+
if (X == null)
|
|
655
|
+
return X;
|
|
656
656
|
if (A) {
|
|
657
|
-
var
|
|
658
|
-
if (
|
|
657
|
+
var de = b.children;
|
|
658
|
+
if (de !== void 0)
|
|
659
659
|
if (S)
|
|
660
|
-
if (st(
|
|
661
|
-
for (var
|
|
662
|
-
|
|
663
|
-
Object.freeze && Object.freeze(
|
|
660
|
+
if (st(de)) {
|
|
661
|
+
for (var Te = 0; Te < de.length; Te++)
|
|
662
|
+
Gt(de[Te], m);
|
|
663
|
+
Object.freeze && Object.freeze(de);
|
|
664
664
|
} else
|
|
665
665
|
x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
666
666
|
else
|
|
667
|
-
|
|
667
|
+
Gt(de, m);
|
|
668
668
|
}
|
|
669
|
-
return m === s ?
|
|
669
|
+
return m === s ? qn(X) : Zn(X), X;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
function qn(m, b, y) {
|
|
673
|
-
return Gt(m, b, y, !0);
|
|
674
|
-
}
|
|
675
672
|
function Kn(m, b, y) {
|
|
676
|
-
return
|
|
673
|
+
return Jt(m, b, y, !0);
|
|
674
|
+
}
|
|
675
|
+
function er(m, b, y) {
|
|
676
|
+
return Jt(m, b, y, !1);
|
|
677
677
|
}
|
|
678
|
-
var
|
|
679
|
-
|
|
680
|
-
}()),
|
|
678
|
+
var tr = er, nr = Kn;
|
|
679
|
+
Pe.Fragment = s, Pe.jsx = tr, Pe.jsxs = nr;
|
|
680
|
+
}()), Pe;
|
|
681
681
|
}
|
|
682
|
-
process.env.NODE_ENV === "production" ? jt.exports =
|
|
682
|
+
process.env.NODE_ENV === "production" ? jt.exports = kr() : jt.exports = yr();
|
|
683
683
|
var r = jt.exports;
|
|
684
|
-
const
|
|
684
|
+
const jr = () => {
|
|
685
685
|
const [e, t] = D(window.location.pathname), n = () => {
|
|
686
686
|
const s = window.location.pathname;
|
|
687
687
|
t(s);
|
|
688
688
|
};
|
|
689
|
-
return
|
|
689
|
+
return z(() => (window.addEventListener("popstate", n), () => {
|
|
690
690
|
window.removeEventListener("popstate", n);
|
|
691
691
|
}), []), e;
|
|
692
|
-
},
|
|
693
|
-
const n =
|
|
694
|
-
|
|
692
|
+
}, Ce = (e, t) => {
|
|
693
|
+
const n = Z(!1);
|
|
694
|
+
z(() => {
|
|
695
695
|
n.current ? e() : n.current = !0;
|
|
696
696
|
}, t);
|
|
697
697
|
};
|
|
698
|
-
function
|
|
699
|
-
var s = this, o =
|
|
700
|
-
|
|
698
|
+
function Er(e, t, n) {
|
|
699
|
+
var s = this, o = Z(null), l = Z(0), d = Z(null), a = Z([]), i = Z(), c = Z(), u = Z(e), f = Z(!0);
|
|
700
|
+
z(function() {
|
|
701
701
|
u.current = e;
|
|
702
702
|
}, [e]);
|
|
703
703
|
var p = !t && t !== 0 && typeof window < "u";
|
|
@@ -705,12 +705,12 @@ function jr(e, t, n) {
|
|
|
705
705
|
throw new TypeError("Expected a function");
|
|
706
706
|
t = +t || 0;
|
|
707
707
|
var h = !!(n = n || {}).leading, _ = !("trailing" in n) || !!n.trailing, v = "maxWait" in n, g = v ? Math.max(+n.maxWait || 0, t) : null;
|
|
708
|
-
|
|
708
|
+
z(function() {
|
|
709
709
|
return f.current = !0, function() {
|
|
710
710
|
f.current = !1;
|
|
711
711
|
};
|
|
712
712
|
}, []);
|
|
713
|
-
var E =
|
|
713
|
+
var E = qe(function() {
|
|
714
714
|
var x = function(w) {
|
|
715
715
|
var F = a.current, q = i.current;
|
|
716
716
|
return a.current = i.current = null, l.current = w, c.current = u.current.apply(q, F);
|
|
@@ -731,7 +731,7 @@ function jr(e, t, n) {
|
|
|
731
731
|
var q = t - (F - o.current), k = v ? Math.min(q, g - (F - l.current)) : q;
|
|
732
732
|
$(w, k);
|
|
733
733
|
}
|
|
734
|
-
},
|
|
734
|
+
}, V = function() {
|
|
735
735
|
var w = Date.now(), F = T(w);
|
|
736
736
|
if (a.current = [].slice.call(arguments), i.current = s, o.current = w, F) {
|
|
737
737
|
if (!d.current && f.current)
|
|
@@ -741,32 +741,32 @@ function jr(e, t, n) {
|
|
|
741
741
|
}
|
|
742
742
|
return d.current || $(Q, t), c.current;
|
|
743
743
|
};
|
|
744
|
-
return
|
|
744
|
+
return V.cancel = function() {
|
|
745
745
|
d.current && (p ? cancelAnimationFrame(d.current) : clearTimeout(d.current)), l.current = 0, a.current = o.current = i.current = d.current = null;
|
|
746
|
-
},
|
|
746
|
+
}, V.isPending = function() {
|
|
747
747
|
return !!d.current;
|
|
748
|
-
},
|
|
748
|
+
}, V.flush = function() {
|
|
749
749
|
return d.current ? M(Date.now()) : c.current;
|
|
750
|
-
},
|
|
750
|
+
}, V;
|
|
751
751
|
}, [h, v, t, g, _, p]);
|
|
752
752
|
return E;
|
|
753
753
|
}
|
|
754
|
-
function
|
|
754
|
+
function fn(e, t, n) {
|
|
755
755
|
var s = n === void 0 ? {} : n, o = s.leading, l = s.trailing;
|
|
756
|
-
return
|
|
756
|
+
return Er(e, t, { maxWait: t, leading: o === void 0 || o, trailing: l === void 0 || l });
|
|
757
757
|
}
|
|
758
758
|
let ct;
|
|
759
|
-
const
|
|
759
|
+
const et = (e = !0, t = !1) => {
|
|
760
760
|
if (!e)
|
|
761
761
|
return;
|
|
762
762
|
const [n, s] = N.useState(0) || [!1, () => {
|
|
763
763
|
}];
|
|
764
|
-
|
|
764
|
+
z(() => (l(), window.addEventListener("resize", d), () => {
|
|
765
765
|
clearTimeout(ct), d.flush(), window.removeEventListener("resize", d);
|
|
766
766
|
}), []);
|
|
767
767
|
const o = () => window.innerWidth, l = () => {
|
|
768
768
|
s(o());
|
|
769
|
-
}, d =
|
|
769
|
+
}, d = fn(
|
|
770
770
|
() => {
|
|
771
771
|
o() !== n && (t && (clearTimeout(ct), document.body.classList.add("is-resizing"), ct = setTimeout(() => {
|
|
772
772
|
document.body.classList.remove("is-resizing");
|
|
@@ -776,7 +776,7 @@ const Ke = (e = !0, t = !1) => {
|
|
|
776
776
|
{ leading: !0 }
|
|
777
777
|
);
|
|
778
778
|
return n;
|
|
779
|
-
},
|
|
779
|
+
}, Sr = ({
|
|
780
780
|
scrollPosition: e = 0,
|
|
781
781
|
// The position on the page to scroll past
|
|
782
782
|
offset: t = { down: 0, up: 10 },
|
|
@@ -790,7 +790,7 @@ const Ke = (e = !0, t = !1) => {
|
|
|
790
790
|
const [o, l] = N.useState({ current: 0, past: 0 }) || [!1, () => {
|
|
791
791
|
}], [d, a] = N.useState({ scrollDown: !1, scrollUp: !1 }) || [!1, () => {
|
|
792
792
|
}];
|
|
793
|
-
|
|
793
|
+
z(() => (i(), window.addEventListener("scroll", c), () => {
|
|
794
794
|
c.flush(), window.removeEventListener("scroll", c);
|
|
795
795
|
}), []);
|
|
796
796
|
const i = () => {
|
|
@@ -800,14 +800,14 @@ const Ke = (e = !0, t = !1) => {
|
|
|
800
800
|
return;
|
|
801
801
|
}
|
|
802
802
|
Math.abs(p) >= t.up && !d.scrollUp && (s(), a({ scrollUp: !0, scrollDown: !1 }));
|
|
803
|
-
}, c =
|
|
803
|
+
}, c = fn(() => {
|
|
804
804
|
i();
|
|
805
805
|
}, 250);
|
|
806
806
|
return o;
|
|
807
|
-
},
|
|
807
|
+
}, so = (e = [], t = !0) => {
|
|
808
808
|
e = Array.isArray(e) ? e : [e];
|
|
809
|
-
const n =
|
|
810
|
-
|
|
809
|
+
const n = Z(!1);
|
|
810
|
+
Ce(() => {
|
|
811
811
|
if (window && window.location && window.location.hash) {
|
|
812
812
|
if (n.current)
|
|
813
813
|
return;
|
|
@@ -815,19 +815,19 @@ const Ke = (e = !0, t = !1) => {
|
|
|
815
815
|
s && (s.scrollIntoView(t ? { behavior: "smooth" } : null), n.current = !0);
|
|
816
816
|
}
|
|
817
817
|
}, e);
|
|
818
|
-
},
|
|
818
|
+
}, $r = (e, t) => {
|
|
819
819
|
Array.isArray(t) || (t = [t]);
|
|
820
|
-
const n =
|
|
820
|
+
const n = or(e);
|
|
821
821
|
return t.forEach(({ type: s, value: o }) => {
|
|
822
|
-
|
|
822
|
+
ar(n, s, o);
|
|
823
823
|
}), n;
|
|
824
|
-
},
|
|
824
|
+
}, pn = (e) => {
|
|
825
825
|
const t = [];
|
|
826
826
|
return e.forEach((n) => {
|
|
827
827
|
const s = parseInt(n);
|
|
828
828
|
isNaN(s) || t.push(s);
|
|
829
829
|
}), t.sort((n, s) => n - s);
|
|
830
|
-
},
|
|
830
|
+
}, hn = (e, t, n) => {
|
|
831
831
|
let s = n.mobile;
|
|
832
832
|
for (const o in t) {
|
|
833
833
|
const l = parseInt(String(t[o]));
|
|
@@ -837,12 +837,12 @@ const Ke = (e = !0, t = !1) => {
|
|
|
837
837
|
break;
|
|
838
838
|
}
|
|
839
839
|
return s;
|
|
840
|
-
},
|
|
840
|
+
}, Tr = (e, t = "en") => new Date(e).toLocaleString(t, {
|
|
841
841
|
weekday: "long",
|
|
842
842
|
day: "numeric",
|
|
843
843
|
month: "short",
|
|
844
844
|
year: "numeric"
|
|
845
|
-
}),
|
|
845
|
+
}), Mr = (e) => {
|
|
846
846
|
let l;
|
|
847
847
|
try {
|
|
848
848
|
l = (/* @__PURE__ */ new Date()).getTime() - new Date(e).getTime();
|
|
@@ -856,7 +856,7 @@ const Ke = (e = !0, t = !1) => {
|
|
|
856
856
|
return { path: "days", number: a };
|
|
857
857
|
const i = Math.floor(a / 7);
|
|
858
858
|
return i <= 52 ? { path: "weeks", number: i } : { path: "years", number: Math.floor(a / 365) };
|
|
859
|
-
},
|
|
859
|
+
}, Cr = (e) => new Promise((t) => setTimeout(t, e)), At = {
|
|
860
860
|
apolitical: "Apolitical",
|
|
861
861
|
breadcrumbs_label: "Go back to:",
|
|
862
862
|
breadcrumbs_currentPage: "Current page:",
|
|
@@ -1139,35 +1139,35 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1139
1139
|
sharedLinks_copy_text: "Copy link",
|
|
1140
1140
|
tags_community: "From the community",
|
|
1141
1141
|
tooltip_loading: "Loading..."
|
|
1142
|
-
},
|
|
1142
|
+
}, Nr = {
|
|
1143
1143
|
languageSwitcher_label: "Me gustaría leer este artículo en...",
|
|
1144
1144
|
languageSwitcher_translation_original: "idioma original",
|
|
1145
1145
|
languageSwitcher_translation_human: "traducido por un humano",
|
|
1146
1146
|
languageSwitcher_translation_machine: "traducido por máquina",
|
|
1147
1147
|
languageSwitcher_disclaimer: "Este contenido fue traducido automáticamente y ocasionalmente tendrá errores de género u otras traducciones directas. Estamos intentando resolver este problema, pero mientras tanto, si notas algún error grave, escríbenos a <link>{email}</link>"
|
|
1148
|
-
},
|
|
1148
|
+
}, Ar = {
|
|
1149
1149
|
collapsibleSection_summary: "En savoir plus",
|
|
1150
1150
|
languageSwitcher_label: "Je voudrais lire cet article dans...",
|
|
1151
1151
|
languageSwitcher_translation_original: "langue originale",
|
|
1152
1152
|
languageSwitcher_translation_human: "traduit par un humain",
|
|
1153
1153
|
languageSwitcher_translation_machine: "traduit par machine",
|
|
1154
1154
|
languageSwitcher_disclaimer: "Ce contenu est traduit automatiquement et contiendra d’évantuelles erreurs de genre ou d’autres traductions directes. Nous essayons de résoudre ce problème, mais en attendant, si vous remarquez une erreur importante, faites-le nous savoir à <link>{email}</link>"
|
|
1155
|
-
},
|
|
1155
|
+
}, Dr = {
|
|
1156
1156
|
languageSwitcher_label: "Eu gostaria de ler este artigo em...",
|
|
1157
1157
|
languageSwitcher_translation_original: "linguagem original",
|
|
1158
1158
|
languageSwitcher_translation_human: "traduzido por um humano",
|
|
1159
1159
|
languageSwitcher_translation_machine: "traduzido por máquina",
|
|
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
|
+
}, Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1162
1162
|
__proto__: null,
|
|
1163
1163
|
en: At,
|
|
1164
|
-
es:
|
|
1165
|
-
fr:
|
|
1166
|
-
pt:
|
|
1167
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1164
|
+
es: Nr,
|
|
1165
|
+
fr: Ar,
|
|
1166
|
+
pt: Dr
|
|
1167
|
+
}, Symbol.toStringTag, { value: "Module" })), he = (e, t, n, s, o = {}) => {
|
|
1168
1168
|
let l = "";
|
|
1169
1169
|
return `${t}_${n}` in At ? l = e({ id: `${t}_${n}` }, o) : l = e({ id: t }, { [s]: n, ...o }), l;
|
|
1170
|
-
},
|
|
1170
|
+
}, Fr = (e, t, n) => {
|
|
1171
1171
|
if (!e || e === 0)
|
|
1172
1172
|
return "0";
|
|
1173
1173
|
t || (t = 0), n || (n = ["k", "m", "b", "t"]);
|
|
@@ -1181,9 +1181,9 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
return s;
|
|
1184
|
-
},
|
|
1184
|
+
}, gn = (e, t) => N.Children.map(e, (n) => N.cloneElement(n, {
|
|
1185
1185
|
...t
|
|
1186
|
-
})),
|
|
1186
|
+
})), Rr = (e) => e.replace(/\s+/g, "").length > 0, W = ({
|
|
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 h =
|
|
1200
|
+
const h = et(typeof t == "object");
|
|
1201
1201
|
if (typeof t == "object" && typeof h == "number") {
|
|
1202
|
-
const g = Object.assign({}, t), E =
|
|
1203
|
-
t =
|
|
1202
|
+
const g = Object.assign({}, t), E = pn(Object.keys(g));
|
|
1203
|
+
t = hn(h, E, g);
|
|
1204
1204
|
}
|
|
1205
1205
|
const _ = [];
|
|
1206
1206
|
typeof t == "string" && _.push(t), s && (_.push("icon"), typeof s == "object" ? (_.push(s.icon), s.position ? _.push(s.position) : _.push("left"), s.hover && _.push(`hover_${s.hover}`), s.animate && (_.push("animate"), typeof s.animate == "string" && _.push(s.animate))) : (_.push(s), !s.includes("right") && !s.includes("left") && _.push("left"))), n.muted && _.push("muted"), n.fullWidth && _.push("full-width");
|
|
@@ -1219,16 +1219,16 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1219
1219
|
return o && (l = "a", v.href = o), N.createElement(
|
|
1220
1220
|
l,
|
|
1221
1221
|
v,
|
|
1222
|
-
u || (c ? /* @__PURE__ */ r.jsx(
|
|
1222
|
+
u || (c ? /* @__PURE__ */ r.jsx(ne, { showOnFocus: !1, children: c }) : null)
|
|
1223
1223
|
);
|
|
1224
|
-
},
|
|
1225
|
-
const s = e.length > 1 ? "ul" : "p", o = e.map((l, d) => s === "p" ? /* @__PURE__ */ r.jsx(
|
|
1224
|
+
}, tt = ({ buttons: e, className: t = "", ...n }) => {
|
|
1225
|
+
const s = e.length > 1 ? "ul" : "p", o = e.map((l, d) => s === "p" ? /* @__PURE__ */ r.jsx(W, { ...l }, d) : /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(W, { ...l }) }, d));
|
|
1226
1226
|
return N.createElement(s, { className: j("button-wrapper", t), ...n, children: o });
|
|
1227
1227
|
};
|
|
1228
|
-
const
|
|
1228
|
+
const Le = ({ maxWidth: e = !1 }) => {
|
|
1229
1229
|
const t = e ? { "--max-width": `${e / 16}rem` } : {};
|
|
1230
1230
|
return /* @__PURE__ */ r.jsx("hr", { className: j({ "has-max-width": e }), style: t });
|
|
1231
|
-
},
|
|
1231
|
+
}, nt = ({
|
|
1232
1232
|
href: e,
|
|
1233
1233
|
children: t,
|
|
1234
1234
|
fallbackElement: n,
|
|
@@ -1251,7 +1251,7 @@ const Fe = ({ maxWidth: e = !1 }) => {
|
|
|
1251
1251
|
);
|
|
1252
1252
|
}
|
|
1253
1253
|
return n ? N.createElement(n, { children: t, className: s, ...a }) : t;
|
|
1254
|
-
},
|
|
1254
|
+
}, en = {
|
|
1255
1255
|
card: {
|
|
1256
1256
|
range: [
|
|
1257
1257
|
{
|
|
@@ -1354,17 +1354,17 @@ const Fe = ({ maxWidth: e = !1 }) => {
|
|
|
1354
1354
|
],
|
|
1355
1355
|
sizes: "(min-width: 1024px) 453px, 20vw"
|
|
1356
1356
|
}
|
|
1357
|
-
},
|
|
1357
|
+
}, Or = ({
|
|
1358
1358
|
aspect: e,
|
|
1359
1359
|
range: t,
|
|
1360
1360
|
sizes: n
|
|
1361
1361
|
}) => {
|
|
1362
|
-
const { range: s, sizes: o } = e ?
|
|
1362
|
+
const { range: s, sizes: o } = e ? en[e] : en.fallback;
|
|
1363
1363
|
return { range: t && t.length > 0 ? t : s, sizes: n || o };
|
|
1364
|
-
},
|
|
1364
|
+
}, Lr = ({ format: e, height: t, query: n, width: s }) => {
|
|
1365
1365
|
let o = `w=${s}&h=${t}`;
|
|
1366
1366
|
return o = e ? `${o}&fm=${e}` : o, o = n ? `${o}&${n}` : o, o;
|
|
1367
|
-
}, ut = ({ format: e, range: t, url: n, query: s }) => t.map(({ height: o, width: l }) => `${n}?${
|
|
1367
|
+
}, ut = ({ format: e, range: t, url: n, query: s }) => t.map(({ height: o, width: l }) => `${n}?${Lr({
|
|
1368
1368
|
format: e,
|
|
1369
1369
|
height: o,
|
|
1370
1370
|
query: s,
|
|
@@ -1381,7 +1381,7 @@ const Br = ({ image: e, className: t, testId: n }) => {
|
|
|
1381
1381
|
loading: c,
|
|
1382
1382
|
decoding: u,
|
|
1383
1383
|
fetchPriority: f
|
|
1384
|
-
} = e, { range: p, sizes: h } =
|
|
1384
|
+
} = e, { range: p, sizes: h } = Or(e), _ = ut({ format: "avif", query: d, range: p, url: a }), v = ut({ format: "webp", query: d, range: p, url: a }), g = ut({ format: "", query: d, range: p, url: a });
|
|
1385
1385
|
return /* @__PURE__ */ r.jsxs("picture", { className: t, children: [
|
|
1386
1386
|
l !== "image/gif" && /* @__PURE__ */ r.jsx(
|
|
1387
1387
|
"source",
|
|
@@ -1418,10 +1418,10 @@ const Br = ({ image: e, className: t, testId: n }) => {
|
|
|
1418
1418
|
)
|
|
1419
1419
|
] });
|
|
1420
1420
|
};
|
|
1421
|
-
let
|
|
1422
|
-
const
|
|
1423
|
-
const s = P(), o =
|
|
1424
|
-
|
|
1421
|
+
let Fe = !1;
|
|
1422
|
+
const Ir = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
1423
|
+
const s = P(), o = Z(null), [l, d] = D("hidden");
|
|
1424
|
+
z(() => {
|
|
1425
1425
|
const i = o.current;
|
|
1426
1426
|
if (i)
|
|
1427
1427
|
return i.addEventListener("transitionend", a), () => {
|
|
@@ -1429,18 +1429,18 @@ const Lr = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
|
1429
1429
|
};
|
|
1430
1430
|
}, []);
|
|
1431
1431
|
const a = ({ propertyName: i }) => {
|
|
1432
|
-
i === "opacity" && (
|
|
1432
|
+
i === "opacity" && (Fe !== !1 && clearTimeout(Fe), d((c) => c === "opening" ? "open" : c === "closing" ? "closed" : c === "closed" ? "hidden" : c));
|
|
1433
1433
|
};
|
|
1434
|
-
return
|
|
1435
|
-
|
|
1434
|
+
return Ce(() => {
|
|
1435
|
+
Fe !== !1 && clearTimeout(Fe);
|
|
1436
1436
|
let i = "open";
|
|
1437
|
-
e ? d("opening") : (d("closing"), i = "hidden"),
|
|
1437
|
+
e ? d("opening") : (d("closing"), i = "hidden"), Fe = setTimeout(() => {
|
|
1438
1438
|
d(i);
|
|
1439
1439
|
}, 300);
|
|
1440
1440
|
}, [e]), /* @__PURE__ */ r.jsx("aside", { ref: o, className: j("tooltip text-medium", l, { loading: t }), hidden: l === "hidden", children: t ? /* @__PURE__ */ r.jsx("p", { children: s.formatMessage({ id: "tooltip_loading" }) }) : typeof n == "string" ? /* @__PURE__ */ r.jsx("p", { children: n }) : n });
|
|
1441
1441
|
};
|
|
1442
|
-
const
|
|
1443
|
-
const
|
|
1442
|
+
const _n = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ r.jsx("section", { className: j("full-width-section", t), ...n, children: e });
|
|
1443
|
+
const oo = ({ text: e, buttons: t, className: n = "" }) => {
|
|
1444
1444
|
const s = [];
|
|
1445
1445
|
return t.forEach((o) => {
|
|
1446
1446
|
s.push({
|
|
@@ -1453,12 +1453,12 @@ const so = ({ text: e, buttons: t, className: n = "" }) => {
|
|
|
1453
1453
|
target: "_blank",
|
|
1454
1454
|
children: o.text
|
|
1455
1455
|
});
|
|
1456
|
-
}), /* @__PURE__ */ r.jsx(
|
|
1456
|
+
}), /* @__PURE__ */ r.jsx(_n, { className: j("download-section", n), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1457
1457
|
N.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
|
|
1458
|
-
/* @__PURE__ */ r.jsx(
|
|
1458
|
+
/* @__PURE__ */ r.jsx(tt, { buttons: s })
|
|
1459
1459
|
] }) });
|
|
1460
1460
|
};
|
|
1461
|
-
const
|
|
1461
|
+
const ao = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
1462
1462
|
const s = t.length;
|
|
1463
1463
|
if (s === 0)
|
|
1464
1464
|
return null;
|
|
@@ -1503,7 +1503,7 @@ const oo = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1503
1503
|
)
|
|
1504
1504
|
] });
|
|
1505
1505
|
};
|
|
1506
|
-
const
|
|
1506
|
+
const Hr = [
|
|
1507
1507
|
"small",
|
|
1508
1508
|
"span",
|
|
1509
1509
|
"strong",
|
|
@@ -1517,7 +1517,7 @@ const Ir = [
|
|
|
1517
1517
|
"h6",
|
|
1518
1518
|
"blockquote",
|
|
1519
1519
|
"q"
|
|
1520
|
-
],
|
|
1520
|
+
], Qr = ({ content: e, image: t, variant: n = "default", spacing: s = "normal", cta: o, children: l }) => {
|
|
1521
1521
|
const d = ["eyebrow", "title", "text"], a = { eyebrow: "small", title: "h1", text: "p" }, i = {};
|
|
1522
1522
|
return d.forEach((c) => {
|
|
1523
1523
|
if (!e[c]) {
|
|
@@ -1527,7 +1527,7 @@ const Ir = [
|
|
|
1527
1527
|
if (typeof e[c] == "object") {
|
|
1528
1528
|
i[c] = e[c];
|
|
1529
1529
|
const { text: u, element: f } = e[c];
|
|
1530
|
-
if (f &&
|
|
1530
|
+
if (f && Hr.includes(f.toLowerCase()))
|
|
1531
1531
|
return;
|
|
1532
1532
|
i[c] = {
|
|
1533
1533
|
text: u,
|
|
@@ -1540,7 +1540,7 @@ const Ir = [
|
|
|
1540
1540
|
c.preventDefault(), c.stopPropagation();
|
|
1541
1541
|
const u = document.getElementById(o.link.substring(1));
|
|
1542
1542
|
u && u.scrollIntoView({ behavior: "smooth" });
|
|
1543
|
-
}), /* @__PURE__ */ r.jsx(
|
|
1543
|
+
}), /* @__PURE__ */ r.jsx(_n, { className: j("banner-section", n, s, { "has-image": t, "has-extra-spacing": s === "normal" && i.eyebrow && i.title }), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1544
1544
|
/* @__PURE__ */ r.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 Ir = [
|
|
|
1555
1555
|
}),
|
|
1556
1556
|
l,
|
|
1557
1557
|
o && o.text && o.link && /* @__PURE__ */ r.jsx(
|
|
1558
|
-
|
|
1558
|
+
W,
|
|
1559
1559
|
{
|
|
1560
1560
|
variant: t || n === "light" ? "primary" : "secondary",
|
|
1561
1561
|
size: { mobile: "medium", 768: "large" },
|
|
@@ -1567,8 +1567,8 @@ const Ir = [
|
|
|
1567
1567
|
] }),
|
|
1568
1568
|
t && /* @__PURE__ */ r.jsx(Br, { image: { ...t, aspect: "banner" } })
|
|
1569
1569
|
] }) });
|
|
1570
|
-
},
|
|
1571
|
-
const
|
|
1570
|
+
}, io = Ne(Qr);
|
|
1571
|
+
const lo = ({
|
|
1572
1572
|
variant: e = "primary",
|
|
1573
1573
|
button: t = null,
|
|
1574
1574
|
title: n,
|
|
@@ -1577,35 +1577,35 @@ const io = ({
|
|
|
1577
1577
|
}) => !n && !s ? null : /* @__PURE__ */ r.jsxs("aside", { className: j("marketing-block", e), children: [
|
|
1578
1578
|
n && /* @__PURE__ */ r.jsx("p", { className: "title", children: n }),
|
|
1579
1579
|
s && /* @__PURE__ */ r.jsx("p", { children: s }),
|
|
1580
|
-
t && /* @__PURE__ */ r.jsx(
|
|
1581
|
-
] }), Et = "https://storage.googleapis.com/apolitical-assets/",
|
|
1580
|
+
t && /* @__PURE__ */ r.jsx(W, { variant: "secondary", size: "medium", href: t.link, className: "gtm-trackable", "data-gtm-event-context": o, "data-gtm-event-type": "learn-more-click", children: t.text })
|
|
1581
|
+
] }), Et = "https://storage.googleapis.com/apolitical-assets/", Re = {
|
|
1582
1582
|
general: "hello@apolitical.co",
|
|
1583
1583
|
support: "concierge@apolitical.co",
|
|
1584
1584
|
"data-protection": {
|
|
1585
1585
|
default: "dpo@apolitical.co",
|
|
1586
1586
|
eu: "dpo.agl@apolitical.foundation"
|
|
1587
1587
|
}
|
|
1588
|
-
},
|
|
1589
|
-
const
|
|
1588
|
+
}, co = "200,000+";
|
|
1589
|
+
const xn = ({ label: e = !1, className: t = "", children: n }) => {
|
|
1590
1590
|
const s = P();
|
|
1591
1591
|
return /* @__PURE__ */ r.jsxs("details", { className: j("collapsible-section", t), children: [
|
|
1592
1592
|
/* @__PURE__ */ r.jsx("summary", { children: e || s.formatMessage({ id: "collapsibleSection_summary" }) }),
|
|
1593
1593
|
/* @__PURE__ */ r.jsx("div", { className: "content", children: n })
|
|
1594
1594
|
] });
|
|
1595
1595
|
};
|
|
1596
|
-
const
|
|
1597
|
-
const
|
|
1596
|
+
const ke = ({ variant: e = "primary", className: t = "", children: n, ...s }) => /* @__PURE__ */ r.jsx("div", { className: j("highlighted-text-box", e, t), ...s, children: n });
|
|
1597
|
+
const rt = ({ variant: e = "empty", text: t = !1, button: n = !1, className: s = "" }) => {
|
|
1598
1598
|
let o = 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 = et(l);
|
|
1600
1600
|
if (l && typeof n == "object" && typeof d == "number") {
|
|
1601
|
-
const f = Object.assign({}, n.breakpoints), p =
|
|
1602
|
-
o =
|
|
1601
|
+
const f = Object.assign({}, n.breakpoints), p = pn(Object.keys(f));
|
|
1602
|
+
o = hn(d, p, f);
|
|
1603
1603
|
}
|
|
1604
1604
|
const { breakpoints: a, text: i = "", component: c, ...u } = n;
|
|
1605
|
-
return /* @__PURE__ */ r.jsx(
|
|
1606
|
-
t && /* @__PURE__ */ r.jsx(
|
|
1605
|
+
return /* @__PURE__ */ r.jsx(ke, { variant: "subtle", className: j("empty-state-box", e, s), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1606
|
+
t && /* @__PURE__ */ r.jsx(Ke, { options: { forceBlock: !0 }, children: t }),
|
|
1607
1607
|
o && typeof n == "object" && (c || /* @__PURE__ */ r.jsx(
|
|
1608
|
-
|
|
1608
|
+
W,
|
|
1609
1609
|
{
|
|
1610
1610
|
...u,
|
|
1611
1611
|
variant: n.variant ? n.variant : "secondary",
|
|
@@ -1614,39 +1614,39 @@ const nt = ({ variant: e = "empty", text: t = !1, button: n = !1, className: s =
|
|
|
1614
1614
|
))
|
|
1615
1615
|
] }) });
|
|
1616
1616
|
};
|
|
1617
|
-
const St = ({ children: e, ...t }) => /* @__PURE__ */ r.jsx("p", { ...t, children: e }),
|
|
1617
|
+
const St = ({ children: e, ...t }) => /* @__PURE__ */ r.jsx("p", { ...t, children: e }), vn = { q: St, blockquote: St };
|
|
1618
1618
|
for (let e = 1; e <= 6; e++)
|
|
1619
|
-
|
|
1620
|
-
const
|
|
1619
|
+
vn[`h${e}`] = { component: St, props: { className: "title" } };
|
|
1620
|
+
const Ur = ({ type: e = "default", className: t = "", heading: n = !1, children: s }) => /* @__PURE__ */ r.jsxs("div", { className: j("helper-text-box text-small", e, t), children: [
|
|
1621
1621
|
n && /* @__PURE__ */ r.jsx("p", { className: "title", children: n }),
|
|
1622
1622
|
typeof s == "string" ? /* @__PURE__ */ r.jsx(
|
|
1623
|
-
|
|
1623
|
+
Ke,
|
|
1624
1624
|
{
|
|
1625
1625
|
options: {
|
|
1626
1626
|
wrapper: N.Fragment,
|
|
1627
1627
|
forceBlock: !0,
|
|
1628
|
-
overrides:
|
|
1628
|
+
overrides: vn
|
|
1629
1629
|
},
|
|
1630
1630
|
children: s
|
|
1631
1631
|
}
|
|
1632
1632
|
) : /* @__PURE__ */ r.jsx("p", { children: s })
|
|
1633
1633
|
] });
|
|
1634
|
-
const
|
|
1635
|
-
const l = P(), d =
|
|
1636
|
-
|
|
1634
|
+
const uo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children: o }) => {
|
|
1635
|
+
const l = P(), d = Z(null), [a, i] = D(""), [c, u] = D("closed");
|
|
1636
|
+
z(() => {
|
|
1637
1637
|
const h = d.current;
|
|
1638
1638
|
if (h)
|
|
1639
1639
|
return h.addEventListener("transitionend", f), () => {
|
|
1640
1640
|
h.removeEventListener("transitionend", f);
|
|
1641
1641
|
};
|
|
1642
|
-
}, []),
|
|
1642
|
+
}, []), z(() => {
|
|
1643
1643
|
if (!s || typeof s != "string")
|
|
1644
1644
|
return;
|
|
1645
1645
|
const h = s.split(`
|
|
1646
1646
|
`);
|
|
1647
1647
|
i(h.length < 3 ? `${s.substring(0, 400)}...` : h.slice(0, 3).join(`
|
|
1648
1648
|
`));
|
|
1649
|
-
}, [s]),
|
|
1649
|
+
}, [s]), z(() => {
|
|
1650
1650
|
c === "ready-to-close" && u("closing");
|
|
1651
1651
|
}, [c]);
|
|
1652
1652
|
const f = ({ propertyName: h }) => {
|
|
@@ -1655,13 +1655,13 @@ const co = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1655
1655
|
if (!s)
|
|
1656
1656
|
return null;
|
|
1657
1657
|
const p = ["opening", "open"].includes(c);
|
|
1658
|
-
return /* @__PURE__ */ r.jsxs(
|
|
1658
|
+
return /* @__PURE__ */ r.jsxs(ke, { variant: "subtle", className: j("hide-show-text-box", e), children: [
|
|
1659
1659
|
/* @__PURE__ */ r.jsxs("div", { ref: d, className: j("content", c), children: [
|
|
1660
|
-
/* @__PURE__ */ r.jsx(
|
|
1660
|
+
/* @__PURE__ */ r.jsx(Ke, { options: { forceBlock: !0 }, children: c === "closed" ? a : s }),
|
|
1661
1661
|
c !== "closed" && o
|
|
1662
1662
|
] }),
|
|
1663
1663
|
/* @__PURE__ */ r.jsx("p", { className: "cta", children: /* @__PURE__ */ r.jsx(
|
|
1664
|
-
|
|
1664
|
+
W,
|
|
1665
1665
|
{
|
|
1666
1666
|
variant: "tertiary",
|
|
1667
1667
|
icon: { icon: "navigation_arrow", position: "left", animate: !0 },
|
|
@@ -1674,7 +1674,7 @@ const co = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1674
1674
|
}
|
|
1675
1675
|
) })
|
|
1676
1676
|
] });
|
|
1677
|
-
},
|
|
1677
|
+
}, Wr = () => N.Fragment, zr = ({ children: e }) => /* @__PURE__ */ r.jsx(ke, { variant: "secondary", children: e }), Vr = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], Yr = ({ children: e }) => {
|
|
1678
1678
|
const t = P();
|
|
1679
1679
|
if (!e)
|
|
1680
1680
|
return null;
|
|
@@ -1687,7 +1687,7 @@ const co = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1687
1687
|
for (const d of yt.toArray(l.props.children))
|
|
1688
1688
|
if (!(!d || typeof d == "string" || typeof d == "number") && N.isValidElement(d)) {
|
|
1689
1689
|
const a = d.type;
|
|
1690
|
-
if (
|
|
1690
|
+
if (Vr.includes(a)) {
|
|
1691
1691
|
for (n = d.props.children; typeof n != "string" && (Array.isArray(n) && n[0].props && n[0].props.children && n[0].props.children[0]); )
|
|
1692
1692
|
n = n[0].props.children[0];
|
|
1693
1693
|
break;
|
|
@@ -1698,40 +1698,40 @@ const co = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1698
1698
|
s.push(l);
|
|
1699
1699
|
const o = n ? n.toString() : "";
|
|
1700
1700
|
return /* @__PURE__ */ r.jsx(
|
|
1701
|
-
|
|
1701
|
+
xn,
|
|
1702
1702
|
{
|
|
1703
1703
|
label: o,
|
|
1704
1704
|
className: ["Sources", "Resources"].includes(o) ? "discrete-links" : "",
|
|
1705
1705
|
children: s.map((l) => l)
|
|
1706
1706
|
}
|
|
1707
1707
|
);
|
|
1708
|
-
},
|
|
1708
|
+
}, Gr = ({ children: e, ...t }) => {
|
|
1709
1709
|
if (t.class)
|
|
1710
1710
|
switch (t.class) {
|
|
1711
1711
|
case "casestudy":
|
|
1712
|
-
return /* @__PURE__ */ r.jsx(
|
|
1712
|
+
return /* @__PURE__ */ r.jsx(ke, { variant: "secondary", children: e });
|
|
1713
1713
|
case "general-textbox":
|
|
1714
1714
|
case "highlight-box":
|
|
1715
|
-
return /* @__PURE__ */ r.jsx(
|
|
1715
|
+
return /* @__PURE__ */ r.jsx(ke, { variant: "primary", children: e });
|
|
1716
1716
|
case "pink-textbox":
|
|
1717
|
-
return /* @__PURE__ */ r.jsx(
|
|
1717
|
+
return /* @__PURE__ */ r.jsx(ke, { variant: "tertiary", children: e });
|
|
1718
1718
|
default:
|
|
1719
1719
|
return /* @__PURE__ */ r.jsx("div", { ...t, children: e });
|
|
1720
1720
|
}
|
|
1721
1721
|
return /* @__PURE__ */ r.jsx("div", { ...t, children: e });
|
|
1722
|
-
},
|
|
1722
|
+
}, Jr = (e) => {
|
|
1723
1723
|
const t = P(), n = Date.now().toString();
|
|
1724
1724
|
let s = "default";
|
|
1725
1725
|
const o = e.src;
|
|
1726
1726
|
return o.includes("youtube") || o.includes("vimeo") ? s = "video" : o.includes("riddle") || o.includes("sli.do") ? s = "poll" : o.includes("padlet") && (s = "padlet"), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1727
|
-
/* @__PURE__ */ r.jsx(
|
|
1727
|
+
/* @__PURE__ */ r.jsx(ne, { children: /* @__PURE__ */ r.jsx("a", { href: `#content-after-iframe-${n}`, children: t.formatMessage({ id: `markdown_skip${s === "default" ? "" : `_${s}`}` }) }) }),
|
|
1728
1728
|
/* @__PURE__ */ r.jsx("iframe", { ...e, title: t.formatMessage({ id: `markdown_iframe${s === "default" ? "" : `_${s}`}` }) }),
|
|
1729
1729
|
/* @__PURE__ */ r.jsx("span", { id: `content-after-iframe-${n}`, tabIndex: -1 })
|
|
1730
1730
|
] });
|
|
1731
|
-
},
|
|
1731
|
+
}, tn = (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
|
+
}, Xr = ({ 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 s = e, o = !1;
|
|
@@ -1739,43 +1739,43 @@ const co = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1739
1739
|
if (!(!l || typeof l == "string" || typeof l == "number") && N.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" || tn(l.props.children[0]) === "button") && (o = !0), s = l.props.children[0]; s && typeof s != "string" && !(typeof s == "boolean" || typeof s == "number" || !N.isValidElement(s)); )
|
|
1743
1743
|
if (s.props && s.props.children && s.props.children[0])
|
|
1744
|
-
s = s.props.children[0], s &&
|
|
1744
|
+
s = s.props.children[0], s && tn(s) === "button" && (o = !0);
|
|
1745
1745
|
else
|
|
1746
1746
|
break;
|
|
1747
1747
|
}
|
|
1748
|
-
return o ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ r.jsx("p", { className: "center", children: /* @__PURE__ */ r.jsx(
|
|
1749
|
-
},
|
|
1750
|
-
const
|
|
1748
|
+
return o ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ r.jsx("p", { className: "center", children: /* @__PURE__ */ r.jsx(W, { variant: "primary", size: "medium", ...n, children: s }) })) : /* @__PURE__ */ r.jsx("a", { ...n, children: s });
|
|
1749
|
+
}, Zr = ({ children: e }) => /* @__PURE__ */ r.jsx("span", { children: e });
|
|
1750
|
+
const nn = ({ className: e = "", options: t = {}, children: n }) => {
|
|
1751
1751
|
n = n.replace(/^<br\/?>/, "");
|
|
1752
1752
|
const s = {
|
|
1753
1753
|
wrapper: N.Fragment,
|
|
1754
1754
|
forceBlock: !0,
|
|
1755
1755
|
overrides: {
|
|
1756
|
-
a:
|
|
1756
|
+
a: Xr,
|
|
1757
1757
|
// Override psuedo-code
|
|
1758
1758
|
// We give the content team psuedo-code short cuts to use in Contentful
|
|
1759
|
-
CollapsibleSection:
|
|
1760
|
-
TextBox:
|
|
1761
|
-
CaseStudy:
|
|
1759
|
+
CollapsibleSection: xn,
|
|
1760
|
+
TextBox: ke,
|
|
1761
|
+
CaseStudy: zr,
|
|
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
|
|
1764
|
-
style:
|
|
1765
|
-
details:
|
|
1766
|
-
div:
|
|
1767
|
-
iframe:
|
|
1764
|
+
style: Wr,
|
|
1765
|
+
details: Yr,
|
|
1766
|
+
div: Gr,
|
|
1767
|
+
iframe: Jr
|
|
1768
1768
|
}
|
|
1769
1769
|
};
|
|
1770
|
-
return /* @__PURE__ */ r.jsx("div", { className: j("markdown-text", e), children: /* @__PURE__ */ r.jsx(
|
|
1770
|
+
return /* @__PURE__ */ r.jsx("div", { className: j("markdown-text", e), children: /* @__PURE__ */ r.jsx(Ke, { options: { ...s, ...t }, children: n }) });
|
|
1771
1771
|
};
|
|
1772
|
-
const
|
|
1772
|
+
const qr = ({ size: e = "medium", variant: t = "default", className: n = "", children: s }) => /* @__PURE__ */ r.jsx("span", { className: j("pill", e, t, n), children: s });
|
|
1773
1773
|
const $t = ({ element: e = "p", children: t = null, className: n = "", ...s }) => N.createElement(e, { ...s, className: j("status-banner text-small", n), "aria-live": "assertive" }, t);
|
|
1774
|
-
const
|
|
1774
|
+
const Kr = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
|
|
1775
1775
|
const s = P(), o = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, l = { "--progress": `${e}%` };
|
|
1776
|
-
return /* @__PURE__ */ r.jsx("span", { className: j(`progress-bar section-${o}`, n), style: l, children: /* @__PURE__ */ r.jsx(
|
|
1777
|
-
},
|
|
1778
|
-
const dt = "loadingBlock_",
|
|
1776
|
+
return /* @__PURE__ */ r.jsx("span", { className: j(`progress-bar section-${o}`, n), style: l, children: /* @__PURE__ */ r.jsx(ne, { children: t ? `${e} ${t}` : s.formatMessage({ id: "progressBar" }, { number: e }) }) });
|
|
1777
|
+
}, es = Ne(Kr);
|
|
1778
|
+
const dt = "loadingBlock_", ts = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
|
|
1779
1779
|
const s = P();
|
|
1780
1780
|
t || (t = {
|
|
1781
1781
|
0: { text: s.formatMessage({ id: `${dt}loading` }) },
|
|
@@ -1788,40 +1788,40 @@ const dt = "loadingBlock_", es = ({ progress: e = 0, steps: t = !1, className: n
|
|
|
1788
1788
|
o = l[a];
|
|
1789
1789
|
const d = o && t[o].icon ? { "--icon": `url(${Et}icons/${t[o].icon}.svg)` } : {};
|
|
1790
1790
|
return /* @__PURE__ */ r.jsxs(
|
|
1791
|
-
|
|
1791
|
+
ke,
|
|
1792
1792
|
{
|
|
1793
1793
|
className: j("loading-block", n, { "has-icon": o && t[o].icon }),
|
|
1794
1794
|
variant: "subtle",
|
|
1795
1795
|
style: d,
|
|
1796
1796
|
children: [
|
|
1797
1797
|
o && /* @__PURE__ */ r.jsx("span", { className: "step", children: t[o].text }),
|
|
1798
|
-
/* @__PURE__ */ r.jsx(
|
|
1798
|
+
/* @__PURE__ */ r.jsx(es, { progress: e })
|
|
1799
1799
|
]
|
|
1800
1800
|
}
|
|
1801
1801
|
);
|
|
1802
|
-
},
|
|
1803
|
-
const
|
|
1802
|
+
}, mo = Ne(ts);
|
|
1803
|
+
const be = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ r.jsx(mn, { element: e, className: j("loading-placeholder", t), ...n });
|
|
1804
1804
|
const Tt = {
|
|
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
|
+
}, bn = (e, t) => e in Tt ? /* @__PURE__ */ r.jsx("div", { className: e, children: Tt[e].map((n, s) => bn(n, s)) }, t) : /* @__PURE__ */ r.jsx(be, { className: e }, t), ns = ({ layout: e = "overview-page" }) => /* @__PURE__ */ r.jsx("div", { className: j("loading-state", e), children: Tt[e].map((t, n) => bn(t, n)) }), wn = (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
|
+
}, Qe = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], rs = (e) => {
|
|
1814
|
+
const t = Math.ceil(26 / Qe.length), n = wn(e).toLowerCase();
|
|
1815
1815
|
if (n === "")
|
|
1816
|
-
return
|
|
1816
|
+
return Qe[0];
|
|
1817
1817
|
const s = n.charCodeAt(0) - 96;
|
|
1818
|
-
for (let o = 0; o <
|
|
1818
|
+
for (let o = 0; o < Qe.length; o++)
|
|
1819
1819
|
if (s <= t * (o + 1))
|
|
1820
|
-
return
|
|
1820
|
+
return Qe[o];
|
|
1821
1821
|
};
|
|
1822
|
-
const
|
|
1823
|
-
const [a, i] = D(!1), c =
|
|
1824
|
-
|
|
1822
|
+
const rn = 256, Dt = ({ className: e = "", src: t = "", name: n, alt: s, width: o = rn, height: l = rn, ...d }) => {
|
|
1823
|
+
const [a, i] = D(!1), c = Z(null);
|
|
1824
|
+
z(() => {
|
|
1825
1825
|
const f = c.current;
|
|
1826
1826
|
if (!f)
|
|
1827
1827
|
return;
|
|
@@ -1829,7 +1829,7 @@ const nn = 256, Dt = ({ className: e = "", src: t = "", name: n, alt: s, width:
|
|
|
1829
1829
|
if (!p)
|
|
1830
1830
|
return;
|
|
1831
1831
|
const h = o, _ = l;
|
|
1832
|
-
typeof window < "u" && window.devicePixelRatio && (f.width = h * window.devicePixelRatio, f.height = _ * window.devicePixelRatio, p.scale(window.devicePixelRatio, window.devicePixelRatio)), p.fillStyle =
|
|
1832
|
+
typeof window < "u" && window.devicePixelRatio && (f.width = h * window.devicePixelRatio, f.height = _ * window.devicePixelRatio, p.scale(window.devicePixelRatio, window.devicePixelRatio)), p.fillStyle = rs(n), p.fillRect(0, 0, h, _), p.font = `${h / 3}px Arial`, p.textAlign = "center", p.fillStyle = "white", p.fillText(wn(n), h / 2, _ / 1.6);
|
|
1833
1833
|
}, [n]);
|
|
1834
1834
|
let u = !1;
|
|
1835
1835
|
return t && t !== "" && !a && (t.includes("http") || t.includes("//")) && (u = !0), /* @__PURE__ */ r.jsx("figure", { className: j("profile-picture", e, { error: a }), ...d, children: u ? /* @__PURE__ */ r.jsx(
|
|
@@ -1844,7 +1844,7 @@ const nn = 256, Dt = ({ className: e = "", src: t = "", name: n, alt: s, width:
|
|
|
1844
1844
|
height: l
|
|
1845
1845
|
}
|
|
1846
1846
|
) : /* @__PURE__ */ r.jsx("canvas", { ref: c }) });
|
|
1847
|
-
},
|
|
1847
|
+
}, kn = (e) => e === "apolitical" ? {
|
|
1848
1848
|
image: `${Et}logos/member_apolitical.svg`
|
|
1849
1849
|
} : e === "community" || typeof e == "object" && !e.name ? {
|
|
1850
1850
|
image: `${Et}logos/member_community.svg`
|
|
@@ -1855,7 +1855,7 @@ const nn = 256, Dt = ({ className: e = "", src: t = "", name: n, alt: s, width:
|
|
|
1855
1855
|
country: e.location && e.location.country || "",
|
|
1856
1856
|
url: `/profiles/${e.id}`,
|
|
1857
1857
|
image: e.image && e.image.thumbnail
|
|
1858
|
-
},
|
|
1858
|
+
}, ss = ({
|
|
1859
1859
|
role: e = "",
|
|
1860
1860
|
organisation: t = "",
|
|
1861
1861
|
country: n = "",
|
|
@@ -1876,13 +1876,13 @@ const Pt = ({
|
|
|
1876
1876
|
gtmType: o = "member-click",
|
|
1877
1877
|
className: l = ""
|
|
1878
1878
|
}) => {
|
|
1879
|
-
const d = P(), a =
|
|
1879
|
+
const d = P(), a = kn(t);
|
|
1880
1880
|
a.name || (a.name = d.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
|
|
1881
|
-
const { name: i, url: c, image: u } = a, f =
|
|
1881
|
+
const { name: i, url: c, image: u } = a, f = ss(a), p = n && n.createdAt ? Mr(n.createdAt) : !1, h = n && n.createdAt ? Tr(n.createdAt) : "";
|
|
1882
1882
|
return N.createElement(e, {
|
|
1883
1883
|
className: j("member text-medium", l),
|
|
1884
1884
|
children: /* @__PURE__ */ r.jsxs(
|
|
1885
|
-
|
|
1885
|
+
nt,
|
|
1886
1886
|
{
|
|
1887
1887
|
href: c,
|
|
1888
1888
|
gtmType: o,
|
|
@@ -1905,10 +1905,10 @@ const Pt = ({
|
|
|
1905
1905
|
)
|
|
1906
1906
|
});
|
|
1907
1907
|
};
|
|
1908
|
-
const
|
|
1908
|
+
const sn = {
|
|
1909
1909
|
small: 24,
|
|
1910
1910
|
medium: 48
|
|
1911
|
-
},
|
|
1911
|
+
}, os = ({ element: e = "div", contributors: { total: t, data: n } = { total: void 0, data: [] }, styling: { showText: s, size: o, showGap: l, showPlaceholders: d } = { showText: !0, size: "medium", showGap: !0, showPlaceholders: !1 }, cutoff: a = 2, className: i = "" }) => {
|
|
1912
1912
|
const c = P();
|
|
1913
1913
|
return !n || n.length === 0 ? null : N.createElement(
|
|
1914
1914
|
e,
|
|
@@ -1916,15 +1916,15 @@ const rn = {
|
|
|
1916
1916
|
/* @__PURE__ */ r.jsx("ul", { children: n.map((u, f) => {
|
|
1917
1917
|
let p, h = "";
|
|
1918
1918
|
if (f < a) {
|
|
1919
|
-
const { name: _ = "", image: v = "" } =
|
|
1919
|
+
const { name: _ = "", image: v = "" } = kn(u);
|
|
1920
1920
|
if (d)
|
|
1921
|
-
return /* @__PURE__ */ r.jsx(
|
|
1922
|
-
p = /* @__PURE__ */ r.jsx(Dt, { name: _, src: v, width:
|
|
1921
|
+
return /* @__PURE__ */ r.jsx(be, { element: "li", className: "contributor" }, f);
|
|
1922
|
+
p = /* @__PURE__ */ r.jsx(Dt, { name: _, src: v, width: sn[o || "medium"], height: sn[o || "medium"] });
|
|
1923
1923
|
} else if (f === a) {
|
|
1924
1924
|
const _ = (t || n.length) - a;
|
|
1925
1925
|
p = /* @__PURE__ */ r.jsxs("small", { className: j({ "large-number": _ > 99 }), children: [
|
|
1926
1926
|
"+",
|
|
1927
|
-
|
|
1927
|
+
Fr(_, 0)
|
|
1928
1928
|
] }), h = "number-left";
|
|
1929
1929
|
}
|
|
1930
1930
|
return p ? /* @__PURE__ */ r.jsx("li", { className: j("contributor", h), children: p }, f) : null;
|
|
@@ -1932,8 +1932,8 @@ const rn = {
|
|
|
1932
1932
|
s && /* @__PURE__ */ r.jsx("span", { className: "label", children: typeof s == "string" ? s : n.length === 1 ? typeof n[0] == "string" ? c.formatMessage({ id: `member_${n[0]}` }) : Ct(n[0].name || "", 20) : null })
|
|
1933
1933
|
] }) }
|
|
1934
1934
|
);
|
|
1935
|
-
},
|
|
1936
|
-
const n = new
|
|
1935
|
+
}, as = ({ showDevTools: e = !0, children: t }) => {
|
|
1936
|
+
const n = new cr({
|
|
1937
1937
|
// default options we would like on all queries can be overridden individually
|
|
1938
1938
|
defaultOptions: {
|
|
1939
1939
|
queries: {
|
|
@@ -1944,20 +1944,20 @@ const rn = {
|
|
|
1944
1944
|
}
|
|
1945
1945
|
}
|
|
1946
1946
|
});
|
|
1947
|
-
return /* @__PURE__ */ r.jsxs(
|
|
1947
|
+
return /* @__PURE__ */ r.jsxs(ur, { client: n, children: [
|
|
1948
1948
|
t,
|
|
1949
|
-
e && /* @__PURE__ */ r.jsx(
|
|
1949
|
+
e && /* @__PURE__ */ r.jsx(dr, { initialIsOpen: !1 })
|
|
1950
1950
|
] });
|
|
1951
1951
|
};
|
|
1952
|
-
var
|
|
1953
|
-
function
|
|
1954
|
-
var t = e.children, n = e.client, s = e.apiKey, o = e.options, l =
|
|
1955
|
-
return n && s && console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."), n && o && console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."), n || (s && (
|
|
1952
|
+
var is = Mt({ client: Ge });
|
|
1953
|
+
function ls(e) {
|
|
1954
|
+
var t = e.children, n = e.client, s = e.apiKey, o = e.options, l = qe(function() {
|
|
1955
|
+
return n && s && console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."), n && o && console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."), n || (s && (Ge.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), Ge.init(s, o)), Ge);
|
|
1956
1956
|
}, [n, s]);
|
|
1957
|
-
return N.createElement(
|
|
1957
|
+
return N.createElement(is.Provider, { value: { client: l } }, t);
|
|
1958
1958
|
}
|
|
1959
|
-
const
|
|
1960
|
-
|
|
1959
|
+
const cs = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ r.jsx(r.Fragment, {}) : process.env.REACT_APP_PUBLIC_POSTHOG_KEY ? /* @__PURE__ */ r.jsx(
|
|
1960
|
+
ls,
|
|
1961
1961
|
{
|
|
1962
1962
|
apiKey: atob(process.env.REACT_APP_PUBLIC_POSTHOG_KEY),
|
|
1963
1963
|
options: {
|
|
@@ -1972,28 +1972,28 @@ const ls = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ r.jsx(r.F
|
|
|
1972
1972
|
},
|
|
1973
1973
|
children: e
|
|
1974
1974
|
}
|
|
1975
|
-
) : e,
|
|
1975
|
+
) : e, us = ({ children: e, locale: t, messages: n }) => {
|
|
1976
1976
|
const s = t || "en", o = {
|
|
1977
|
-
...
|
|
1977
|
+
...Pr[s],
|
|
1978
1978
|
...n || {}
|
|
1979
1979
|
};
|
|
1980
|
-
return /* @__PURE__ */ r.jsx(
|
|
1981
|
-
},
|
|
1980
|
+
return /* @__PURE__ */ r.jsx(ir, { locale: s, messages: o, children: e });
|
|
1981
|
+
}, je = Mt(null), ds = ({ children: e, user: t }) => /* @__PURE__ */ r.jsx(je.Provider, { value: t, children: e }), fo = ({ bootstrap: e, children: t, intl: n }) => {
|
|
1982
1982
|
const [s, o] = D({ isLoading: !0 });
|
|
1983
|
-
return
|
|
1983
|
+
return z(() => {
|
|
1984
1984
|
e().then((l) => o({ ...l, isLoading: !1 })).catch(() => o({ isLoading: !1 }));
|
|
1985
|
-
}, []), /* @__PURE__ */ r.jsx(
|
|
1985
|
+
}, []), /* @__PURE__ */ r.jsx(us, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ r.jsx(ds, { user: s, children: /* @__PURE__ */ r.jsx(as, { children: /* @__PURE__ */ r.jsx(cs, { user: s, children: t }) }) }) });
|
|
1986
1986
|
};
|
|
1987
|
-
const mt = "joinCommunityButton",
|
|
1987
|
+
const mt = "joinCommunityButton", yn = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: s } = { join: () => {
|
|
1988
1988
|
}, leave: () => {
|
|
1989
1989
|
} } }) => {
|
|
1990
|
-
const o = P(), l =
|
|
1991
|
-
|
|
1990
|
+
const o = P(), l = ye(je), d = l && typeof l.id == "string", [a, i] = D(e), [c, u] = D(e ? "joined" : "notJoined");
|
|
1991
|
+
z(() => {
|
|
1992
1992
|
c === "joining" ? u("joined") : c === "leaving" && u("notJoined");
|
|
1993
1993
|
}, [a]);
|
|
1994
1994
|
const f = {}, p = {};
|
|
1995
1995
|
return a && c !== "leaving" && (f["data-hover-text"] = o.formatMessage({ id: `${mt}_leave` }), f["aria-label"] = o.formatMessage({ id: `${mt}_member_aria` }), p["aria-hidden"] = "true"), /* @__PURE__ */ r.jsx(
|
|
1996
|
-
|
|
1996
|
+
W,
|
|
1997
1997
|
{
|
|
1998
1998
|
variant: a ? "secondary" : "primary",
|
|
1999
1999
|
size: "medium",
|
|
@@ -2009,10 +2009,10 @@ const mt = "joinCommunityButton", kn = ({ isMember: e = !1, isShort: t = !1, fun
|
|
|
2009
2009
|
}
|
|
2010
2010
|
);
|
|
2011
2011
|
};
|
|
2012
|
-
const ft = "communityDetails_",
|
|
2012
|
+
const ft = "communityDetails_", po = ({ isMember: e = !1, slug: t, members: { number: n, data: s } = { number: void 0, data: [] }, className: o = "", ...l }) => {
|
|
2013
2013
|
const d = P(), a = n || (s == null ? void 0 : s.length) || 0;
|
|
2014
2014
|
return /* @__PURE__ */ r.jsxs("div", { className: j("community-details", o), children: [
|
|
2015
|
-
/* @__PURE__ */ r.jsx(
|
|
2015
|
+
/* @__PURE__ */ r.jsx(Le, {}),
|
|
2016
2016
|
/* @__PURE__ */ r.jsxs("div", { className: "member-details", children: [
|
|
2017
2017
|
/* @__PURE__ */ r.jsxs("div", { className: "top", children: [
|
|
2018
2018
|
/* @__PURE__ */ r.jsxs("h3", { children: [
|
|
@@ -2021,27 +2021,27 @@ const ft = "communityDetails_", fo = ({ isMember: e = !1, slug: t, members: { nu
|
|
|
2021
2021
|
] }),
|
|
2022
2022
|
/* @__PURE__ */ r.jsx("p", { className: "text-small", children: /* @__PURE__ */ r.jsx("a", { href: `/communities/${t}/members`, children: d.formatMessage({ id: `${ft}viewAll` }) }) })
|
|
2023
2023
|
] }),
|
|
2024
|
-
/* @__PURE__ */ r.jsx(
|
|
2024
|
+
/* @__PURE__ */ r.jsx(os, { contributors: { total: n, data: s != null && s.length ? s : [{}, {}, {}, {}, {}] }, styling: { size: "medium", showGap: !0, showPlaceholders: a === 0 }, cutoff: 5 })
|
|
2025
2025
|
] }),
|
|
2026
|
-
/* @__PURE__ */ r.jsx(
|
|
2027
|
-
e && /* @__PURE__ */ r.jsx(
|
|
2026
|
+
/* @__PURE__ */ r.jsx(yn, { isMember: e, ...l }),
|
|
2027
|
+
e && /* @__PURE__ */ r.jsx(W, { variant: "primary", icon: { icon: "plus" }, styling: { fullWidth: !0 }, children: d.formatMessage({ id: `${ft}invite` }) })
|
|
2028
2028
|
] });
|
|
2029
2029
|
};
|
|
2030
|
-
const
|
|
2030
|
+
const ho = ({
|
|
2031
2031
|
breadcrumbs: e,
|
|
2032
2032
|
cutoff: t = 20,
|
|
2033
2033
|
className: n = ""
|
|
2034
2034
|
}) => {
|
|
2035
2035
|
const s = P();
|
|
2036
2036
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2037
|
-
/* @__PURE__ */ r.jsx(
|
|
2037
|
+
/* @__PURE__ */ r.jsx(ne, { element: "p", children: s.formatMessage({ id: "breadcrumbs_label" }) }),
|
|
2038
2038
|
/* @__PURE__ */ r.jsx("ul", { className: j("breadcrumbs text-small", n), children: e.map(({ text: o, href: l, current: d = !1 }, a) => /* @__PURE__ */ r.jsxs("li", { children: [
|
|
2039
|
-
d && /* @__PURE__ */ r.jsx(
|
|
2040
|
-
/* @__PURE__ */ r.jsx(
|
|
2039
|
+
d && /* @__PURE__ */ r.jsx(ne, { element: "span", children: s.formatMessage({ id: "breadcrumbs_currentPage" }) }),
|
|
2040
|
+
/* @__PURE__ */ r.jsx(nt, { href: d ? void 0 : l, children: Ct(o, t) })
|
|
2041
2041
|
] }, `${window.btoa(o)}_${a}`)) })
|
|
2042
2042
|
] });
|
|
2043
2043
|
};
|
|
2044
|
-
const
|
|
2044
|
+
const go = ({
|
|
2045
2045
|
options: e,
|
|
2046
2046
|
allOption: t = !1,
|
|
2047
2047
|
allowMultiple: n = !0,
|
|
@@ -2068,7 +2068,7 @@ const ho = ({
|
|
|
2068
2068
|
}
|
|
2069
2069
|
) }, u);
|
|
2070
2070
|
}) });
|
|
2071
|
-
},
|
|
2071
|
+
}, ms = (e, t) => {
|
|
2072
2072
|
const n = String(e);
|
|
2073
2073
|
if (!t || !t.length)
|
|
2074
2074
|
return `/${n}`;
|
|
@@ -2077,7 +2077,7 @@ const ho = ({
|
|
|
2077
2077
|
l === "before-lang" ? s += `/${o}` : (s.includes(`/${n}/`) || (s += `/${n}`), s += `/${o}`);
|
|
2078
2078
|
}), s.includes(`/${n}/`) || (s += `/${n}`), s;
|
|
2079
2079
|
};
|
|
2080
|
-
const pt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
2080
|
+
const pt = { en: "English", es: "Español", fr: "Français", pt: "Português" }, Ue = "languageSwitcher_", _o = ({
|
|
2081
2081
|
currentLanguage: e,
|
|
2082
2082
|
isOriginalLanguage: t = !1,
|
|
2083
2083
|
isHumanTranslation: n = !1,
|
|
@@ -2090,34 +2090,34 @@ const pt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2090
2090
|
className: i = ""
|
|
2091
2091
|
}) => {
|
|
2092
2092
|
const c = P(), [u, f] = D(e);
|
|
2093
|
-
if (
|
|
2093
|
+
if (z(() => {
|
|
2094
2094
|
e !== u && f(e);
|
|
2095
2095
|
}, [e]), !s || !Object.values(s).some((v) => v && v.post_name))
|
|
2096
2096
|
return null;
|
|
2097
2097
|
const h = Object.keys(s), _ = u !== e;
|
|
2098
2098
|
return /* @__PURE__ */ r.jsxs("div", { className: j("language-switcher text-small", d, i), children: [
|
|
2099
2099
|
/* @__PURE__ */ r.jsxs("nav", { children: [
|
|
2100
|
-
d !== "short" && /* @__PURE__ */ r.jsx("p", { children: a || c.formatMessage({ id: `${
|
|
2100
|
+
d !== "short" && /* @__PURE__ */ r.jsx("p", { children: a || c.formatMessage({ id: `${Ue}label` }) }),
|
|
2101
2101
|
/* @__PURE__ */ r.jsx("ul", { children: h.map((v) => {
|
|
2102
2102
|
if (!pt[v])
|
|
2103
2103
|
return null;
|
|
2104
2104
|
let g = { className: v };
|
|
2105
|
-
return u === v ? g["aria-label"] = c.formatMessage({ id: `${
|
|
2105
|
+
return u === v ? g["aria-label"] = c.formatMessage({ id: `${Ue}selected` }, { language: pt[v] }) : g = {
|
|
2106
2106
|
...g,
|
|
2107
|
-
href:
|
|
2107
|
+
href: ms(v, l),
|
|
2108
2108
|
onClick: (E) => {
|
|
2109
2109
|
E.preventDefault(), E.stopPropagation(), f(v), o(v);
|
|
2110
2110
|
}
|
|
2111
|
-
}, /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2111
|
+
}, /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(nt, { ...g, fallbackElement: "span", children: pt[v] }) }, v);
|
|
2112
2112
|
}) }),
|
|
2113
|
-
d !== "short" && !_ && /* @__PURE__ */ r.jsx("p", { children: c.formatMessage({ id: `${
|
|
2113
|
+
d !== "short" && !_ && /* @__PURE__ */ r.jsx("p", { children: c.formatMessage({ id: `${Ue}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2114
2114
|
] }),
|
|
2115
2115
|
d !== "short" && !_ && !t && !n && /* @__PURE__ */ r.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: `${Ue}disclaimer` }, {
|
|
2120
|
+
email: Re.support,
|
|
2121
2121
|
link: (v) => {
|
|
2122
2122
|
const g = `mailto:${v}`;
|
|
2123
2123
|
return /* @__PURE__ */ r.jsx("a", { href: g, children: v });
|
|
@@ -2126,7 +2126,7 @@ const pt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2126
2126
|
})
|
|
2127
2127
|
] });
|
|
2128
2128
|
};
|
|
2129
|
-
const ht =
|
|
2129
|
+
const ht = lr({ locale: "en", messages: At }), fs = ({
|
|
2130
2130
|
page: e = 1,
|
|
2131
2131
|
length: t = 0,
|
|
2132
2132
|
limit: n = 10,
|
|
@@ -2154,7 +2154,7 @@ const ht = ir({ locale: "en", messages: At }), ms = ({
|
|
|
2154
2154
|
return /* @__PURE__ */ r.jsxs("footer", { className: j("load-more", d), children: [
|
|
2155
2155
|
i && /* @__PURE__ */ r.jsx("p", { className: "error", children: l.error }),
|
|
2156
2156
|
u ? /* @__PURE__ */ r.jsx("p", { children: l.endOfFeed }) : /* @__PURE__ */ r.jsx(
|
|
2157
|
-
|
|
2157
|
+
W,
|
|
2158
2158
|
{
|
|
2159
2159
|
variant: "secondary",
|
|
2160
2160
|
icon: o,
|
|
@@ -2168,19 +2168,19 @@ const ht = ir({ locale: "en", messages: At }), ms = ({
|
|
|
2168
2168
|
)
|
|
2169
2169
|
] });
|
|
2170
2170
|
};
|
|
2171
|
-
let
|
|
2172
|
-
const
|
|
2173
|
-
const o = P(), l =
|
|
2171
|
+
let We = !1;
|
|
2172
|
+
const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s = "" }) => {
|
|
2173
|
+
const o = P(), l = Z(null), [d, a] = D(!1), i = (c) => {
|
|
2174
2174
|
l.current && c.target instanceof HTMLElement && !l.current.contains(c.target) && a(!1);
|
|
2175
2175
|
};
|
|
2176
|
-
return
|
|
2176
|
+
return z(() => (document.addEventListener("click", i, !0), () => {
|
|
2177
2177
|
document.removeEventListener("click", i, !0);
|
|
2178
2178
|
})), N.createElement(e, {
|
|
2179
2179
|
ref: l,
|
|
2180
2180
|
className: j("more-menu text-medium", s),
|
|
2181
2181
|
children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2182
2182
|
/* @__PURE__ */ r.jsx(
|
|
2183
|
-
|
|
2183
|
+
W,
|
|
2184
2184
|
{
|
|
2185
2185
|
variant: "tertiary",
|
|
2186
2186
|
size: "medium",
|
|
@@ -2199,16 +2199,16 @@ const fs = ({ element: e = "div", id: t = "more-menu", options: n, className: s
|
|
|
2199
2199
|
a(!1), typeof u == "function" && u(g);
|
|
2200
2200
|
},
|
|
2201
2201
|
onFocus: () => {
|
|
2202
|
-
|
|
2202
|
+
We && (clearTimeout(We), We = !1);
|
|
2203
2203
|
},
|
|
2204
2204
|
onBlur: () => {
|
|
2205
|
-
|
|
2205
|
+
We = setTimeout(() => {
|
|
2206
2206
|
a(!1);
|
|
2207
2207
|
}, 100);
|
|
2208
2208
|
}
|
|
2209
2209
|
};
|
|
2210
2210
|
return c && (v.href = c), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2211
|
-
|
|
2211
|
+
W,
|
|
2212
2212
|
{
|
|
2213
2213
|
variant: "tertiary",
|
|
2214
2214
|
size: "medium",
|
|
@@ -2221,16 +2221,16 @@ const fs = ({ element: e = "div", id: t = "more-menu", options: n, className: s
|
|
|
2221
2221
|
] })
|
|
2222
2222
|
});
|
|
2223
2223
|
};
|
|
2224
|
-
const
|
|
2225
|
-
const
|
|
2224
|
+
const jn = ({ variant: e = "default", version: t = "default", className: n = "", ...s }) => /* @__PURE__ */ r.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ r.jsx("a", { href: "/home/", className: j("logo", e, t, n), ...s, children: /* @__PURE__ */ r.jsx(ne, { children: /* @__PURE__ */ r.jsx(we, { id: "apolitical" }) }) }) });
|
|
2225
|
+
const hs = {
|
|
2226
2226
|
"2-1": 901
|
|
2227
|
-
},
|
|
2228
|
-
const o =
|
|
2227
|
+
}, xo = ({ layout: e = "2-1", hideOnMobile: t = !1, className: n = "", children: s }) => {
|
|
2228
|
+
const o = et(!0);
|
|
2229
2229
|
let l = s;
|
|
2230
|
-
return N.Children.count(s) === 1 && (l = N.Children.toArray(s)[0], l.props && (l = l.props.children)), /* @__PURE__ */ r.jsx("section", { className: j("columns", `layout-${e}`, n), children: N.Children.map(l, (d, a) => t !== !1 && a === t && o && o <
|
|
2230
|
+
return N.Children.count(s) === 1 && (l = N.Children.toArray(s)[0], l.props && (l = l.props.children)), /* @__PURE__ */ r.jsx("section", { className: j("columns", `layout-${e}`, n), children: N.Children.map(l, (d, a) => t !== !1 && a === t && o && o < hs[e] ? null : d) });
|
|
2231
2231
|
};
|
|
2232
|
-
const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], xt = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3),
|
|
2233
|
-
const e = P(), [t, n, s] =
|
|
2232
|
+
const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], xt = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), gs = () => {
|
|
2233
|
+
const e = P(), [t, n, s] = mr(_t), [o, l] = D(!t["apol-cookie-banner"]), d = () => {
|
|
2234
2234
|
_t.forEach((u) => {
|
|
2235
2235
|
n(u, !0, {
|
|
2236
2236
|
path: "/",
|
|
@@ -2273,9 +2273,9 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2273
2273
|
}), /* @__PURE__ */ r.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
2274
2274
|
/* @__PURE__ */ r.jsx("h6", { children: e.formatMessage({ id: `${gt}title` }) }),
|
|
2275
2275
|
/* @__PURE__ */ r.jsx("p", { children: e.formatMessage({ id: `${gt}text` }) }),
|
|
2276
|
-
/* @__PURE__ */ r.jsx(
|
|
2276
|
+
/* @__PURE__ */ r.jsx(tt, { buttons: c })
|
|
2277
2277
|
] });
|
|
2278
|
-
},
|
|
2278
|
+
}, ve = {
|
|
2279
2279
|
platform: {
|
|
2280
2280
|
order: ["events", "courses", "qanda", "articles"],
|
|
2281
2281
|
// An array guarantees the right order
|
|
@@ -2340,11 +2340,11 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2340
2340
|
text: {
|
|
2341
2341
|
order: ["dataProtection", "euDataProtection"],
|
|
2342
2342
|
dataProtection: {
|
|
2343
|
-
email:
|
|
2343
|
+
email: Re["data-protection"].default,
|
|
2344
2344
|
gtmType: "email-dpo-link"
|
|
2345
2345
|
},
|
|
2346
2346
|
euDataProtection: {
|
|
2347
|
-
email:
|
|
2347
|
+
email: Re["data-protection"].eu,
|
|
2348
2348
|
gtmType: "email-eu-dpo-link"
|
|
2349
2349
|
}
|
|
2350
2350
|
}
|
|
@@ -2356,10 +2356,10 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2356
2356
|
registered: { address: !0 },
|
|
2357
2357
|
berlin: { address: !0 },
|
|
2358
2358
|
support: {
|
|
2359
|
-
email:
|
|
2359
|
+
email: Re.support,
|
|
2360
2360
|
gtmType: "concierge-email-click"
|
|
2361
2361
|
},
|
|
2362
|
-
business: { email:
|
|
2362
|
+
business: { email: Re.general, gtmType: "hello-email-click" }
|
|
2363
2363
|
}
|
|
2364
2364
|
},
|
|
2365
2365
|
social: {
|
|
@@ -2369,37 +2369,37 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2369
2369
|
facebook: { href: "https://www.facebook.com/apoliticalco" }
|
|
2370
2370
|
}
|
|
2371
2371
|
};
|
|
2372
|
-
const
|
|
2373
|
-
const t =
|
|
2372
|
+
const Me = "footer_", Je = "SiteFooter", on = ({ group: e }) => {
|
|
2373
|
+
const t = ve[e].order || [];
|
|
2374
2374
|
let n = !1;
|
|
2375
|
-
return "text" in
|
|
2376
|
-
/* @__PURE__ */ r.jsx("p", { className: "pre-title", children: /* @__PURE__ */ r.jsx(
|
|
2375
|
+
return "text" in ve[e] && (n = ve[e].text), /* @__PURE__ */ r.jsxs(Zt, { children: [
|
|
2376
|
+
/* @__PURE__ */ r.jsx("p", { className: "pre-title", children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}` }) }),
|
|
2377
2377
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ r.jsx("ul", { className: "text-medium", children: t.map((s) => {
|
|
2378
2378
|
if (["order", "child", "text"].includes(s))
|
|
2379
2379
|
return null;
|
|
2380
|
-
const { href: o, gtmType: l } =
|
|
2380
|
+
const { href: o, gtmType: l } = ve[e][s], d = {};
|
|
2381
2381
|
return ["legal"].includes(e) && (d.target = "_blank", d.rel = "noopener"), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2382
2382
|
"a",
|
|
2383
2383
|
{
|
|
2384
2384
|
href: o,
|
|
2385
2385
|
className: "gtm-trackable",
|
|
2386
|
-
"data-gtm-event-context":
|
|
2386
|
+
"data-gtm-event-context": Je,
|
|
2387
2387
|
"data-gtm-event-type": l,
|
|
2388
2388
|
...d,
|
|
2389
|
-
children: /* @__PURE__ */ r.jsx(
|
|
2389
|
+
children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}_${s}` })
|
|
2390
2390
|
}
|
|
2391
2391
|
) }, `${e}_${s}`);
|
|
2392
2392
|
}) }),
|
|
2393
|
-
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ r.jsx("dl", { className: "text-medium", children: n.order.map((s) => /* @__PURE__ */ r.jsxs(
|
|
2394
|
-
/* @__PURE__ */ r.jsx("dt", { children: /* @__PURE__ */ r.jsx(
|
|
2393
|
+
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ r.jsx("dl", { className: "text-medium", children: n.order.map((s) => /* @__PURE__ */ r.jsxs(Zt, { children: [
|
|
2394
|
+
/* @__PURE__ */ r.jsx("dt", { children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}_${s}` }) }),
|
|
2395
2395
|
/* @__PURE__ */ r.jsxs("dd", { children: [
|
|
2396
|
-
typeof n != "boolean" && n[s].address && /* @__PURE__ */ r.jsx("address", { children: /* @__PURE__ */ r.jsx(
|
|
2396
|
+
typeof n != "boolean" && n[s].address && /* @__PURE__ */ r.jsx("address", { children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}_${s}_address`, values: { br: /* @__PURE__ */ r.jsx("br", {}) } }) }),
|
|
2397
2397
|
typeof n != "boolean" && n[s].email && /* @__PURE__ */ r.jsx(
|
|
2398
2398
|
"a",
|
|
2399
2399
|
{
|
|
2400
2400
|
href: `mailto:${n[s].email}`,
|
|
2401
2401
|
className: "gtm-trackable",
|
|
2402
|
-
"data-gtm-event-context":
|
|
2402
|
+
"data-gtm-event-context": Je,
|
|
2403
2403
|
"data-gtm-event-type": n[s].gtmType,
|
|
2404
2404
|
children: n[s].email
|
|
2405
2405
|
}
|
|
@@ -2407,26 +2407,26 @@ const Ee = "footer_", Ge = "SiteFooter", sn = ({ group: e }) => {
|
|
|
2407
2407
|
] })
|
|
2408
2408
|
] }, `dl-${e}-${s}`)) })
|
|
2409
2409
|
] }, e);
|
|
2410
|
-
},
|
|
2411
|
-
/* @__PURE__ */ r.jsx(
|
|
2410
|
+
}, En = () => /* @__PURE__ */ r.jsx("div", { id: "footer", children: /* @__PURE__ */ r.jsxs("div", { className: "wrapper", children: [
|
|
2411
|
+
/* @__PURE__ */ r.jsx(mn, { element: "hr" }),
|
|
2412
2412
|
/* @__PURE__ */ r.jsx(
|
|
2413
|
-
|
|
2413
|
+
jn,
|
|
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": Je,
|
|
2419
2419
|
"data-gtm-event-type": "logo-homepage-link"
|
|
2420
2420
|
}
|
|
2421
2421
|
),
|
|
2422
2422
|
/* @__PURE__ */ r.jsx("footer", { children: ["platform", "community", "company", "contact"].map((e) => /* @__PURE__ */ r.jsxs("div", { className: "group", children: [
|
|
2423
|
-
/* @__PURE__ */ r.jsx(
|
|
2424
|
-
Object.keys(
|
|
2423
|
+
/* @__PURE__ */ r.jsx(on, { group: e }),
|
|
2424
|
+
Object.keys(ve[e]).includes("child") && /* @__PURE__ */ r.jsx(on, { group: ve[e].child })
|
|
2425
2425
|
] }, e)) }),
|
|
2426
2426
|
/* @__PURE__ */ r.jsx("hr", {}),
|
|
2427
2427
|
/* @__PURE__ */ r.jsxs("div", { className: "sub-footer", children: [
|
|
2428
|
-
/* @__PURE__ */ r.jsx("ul", { children: Array.isArray(
|
|
2429
|
-
const t =
|
|
2428
|
+
/* @__PURE__ */ r.jsx("ul", { children: Array.isArray(ve.social.order) && ve.social.order.map((e) => {
|
|
2429
|
+
const t = ve.social[e];
|
|
2430
2430
|
return /* @__PURE__ */ r.jsx("li", { className: e, children: /* @__PURE__ */ r.jsx(
|
|
2431
2431
|
"a",
|
|
2432
2432
|
{
|
|
@@ -2434,22 +2434,22 @@ const Ee = "footer_", Ge = "SiteFooter", sn = ({ 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": Je,
|
|
2438
2438
|
"data-gtm-event-type": "social-click",
|
|
2439
|
-
children: /* @__PURE__ */ r.jsx("span", { className: "hidden", children: /* @__PURE__ */ r.jsx(
|
|
2439
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "hidden", children: /* @__PURE__ */ r.jsx(we, { id: `${Me}social_${e}` }) })
|
|
2440
2440
|
}
|
|
2441
2441
|
) }, e);
|
|
2442
2442
|
}) }),
|
|
2443
|
-
/* @__PURE__ */ r.jsx("small", { children: /* @__PURE__ */ r.jsx(
|
|
2443
|
+
/* @__PURE__ */ r.jsx("small", { children: /* @__PURE__ */ r.jsx(we, { id: `${Me}copyright`, values: { currentYear: (/* @__PURE__ */ new Date()).getFullYear() } }) })
|
|
2444
2444
|
] })
|
|
2445
2445
|
] }) });
|
|
2446
|
-
const
|
|
2447
|
-
const o = P(), [l, d] = D({ path: `${
|
|
2446
|
+
const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, resendVerificationCode: s }) => {
|
|
2447
|
+
const o = P(), [l, d] = D({ path: `${ze}default`, type: "default", link: {}, mail: {}, error: "" }), [a, i] = D(!1), c = Ee(
|
|
2448
2448
|
(h) => {
|
|
2449
2449
|
h.preventDefault(), h.stopPropagation();
|
|
2450
2450
|
const _ = (v) => {
|
|
2451
2451
|
d({
|
|
2452
|
-
path: `${
|
|
2452
|
+
path: `${ze}error_verificationFailedToSend`,
|
|
2453
2453
|
type: "error",
|
|
2454
2454
|
link: {
|
|
2455
2455
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
@@ -2469,7 +2469,7 @@ const We = "emailHelperTextBox_", xo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2469
2469
|
});
|
|
2470
2470
|
};
|
|
2471
2471
|
if (typeof s != "function") {
|
|
2472
|
-
_(o.formatMessage({ id: `${
|
|
2472
|
+
_(o.formatMessage({ id: `${ze}error_noFunction` }));
|
|
2473
2473
|
return;
|
|
2474
2474
|
}
|
|
2475
2475
|
i(!0), s(t).then(() => {
|
|
@@ -2483,9 +2483,9 @@ const We = "emailHelperTextBox_", xo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2483
2483
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2484
2484
|
[t, n, s]
|
|
2485
2485
|
);
|
|
2486
|
-
|
|
2486
|
+
z(
|
|
2487
2487
|
() => {
|
|
2488
|
-
let h =
|
|
2488
|
+
let h = ze, _ = "default", v = {}, g = {};
|
|
2489
2489
|
switch (e) {
|
|
2490
2490
|
case "gov":
|
|
2491
2491
|
h += "autoApproved", _ = "success";
|
|
@@ -2543,9 +2543,9 @@ const We = "emailHelperTextBox_", xo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2543
2543
|
const u = {};
|
|
2544
2544
|
return ["link", "mail"].forEach((h) => {
|
|
2545
2545
|
u[h] = Object.keys(l[h]).length ? (_) => /* @__PURE__ */ r.jsx("a", { ...l[h], children: _ }) : (_) => _;
|
|
2546
|
-
}), /* @__PURE__ */ r.jsx(
|
|
2547
|
-
/* @__PURE__ */ r.jsx(
|
|
2548
|
-
/* @__PURE__ */ r.jsx(
|
|
2546
|
+
}), /* @__PURE__ */ r.jsx(Ur, { type: l.type, heading: a ? !1 : o.formatMessage({ id: `${l.path}_title` }), children: a ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2547
|
+
/* @__PURE__ */ r.jsx(be, { element: "span" }),
|
|
2548
|
+
/* @__PURE__ */ r.jsx(be, { element: "span" })
|
|
2549
2549
|
] }) : (
|
|
2550
2550
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2551
2551
|
// @ts-ignore
|
|
@@ -2565,29 +2565,29 @@ const We = "emailHelperTextBox_", xo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2565
2565
|
)
|
|
2566
2566
|
) });
|
|
2567
2567
|
};
|
|
2568
|
-
const
|
|
2569
|
-
[
|
|
2570
|
-
[
|
|
2571
|
-
[
|
|
2572
|
-
},
|
|
2568
|
+
const Ve = "passwordRules_", Sn = "isMoreThanEightCharacters", $n = "includesNumberAndSymbol", Tn = "includesLowerAndUppercase", _s = {
|
|
2569
|
+
[Sn]: "8Characters",
|
|
2570
|
+
[$n]: "numberSymbol",
|
|
2571
|
+
[Tn]: "lowercaseUppercase"
|
|
2572
|
+
}, xs = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
|
|
2573
2573
|
const n = P();
|
|
2574
2574
|
return /* @__PURE__ */ r.jsxs("aside", { className: j("password-rules", t), children: [
|
|
2575
|
-
/* @__PURE__ */ r.jsx("small", { children: n.formatMessage({ id: `${
|
|
2576
|
-
/* @__PURE__ */ r.jsx("ul", { children: [
|
|
2577
|
-
/* @__PURE__ */ r.jsxs(
|
|
2578
|
-
n.formatMessage({ id: `${
|
|
2575
|
+
/* @__PURE__ */ r.jsx("small", { children: n.formatMessage({ id: `${Ve}intro` }) }),
|
|
2576
|
+
/* @__PURE__ */ r.jsx("ul", { children: [Sn, $n, Tn].map((s) => /* @__PURE__ */ r.jsxs("li", { className: j({ matches: e[s] }), children: [
|
|
2577
|
+
/* @__PURE__ */ r.jsxs(ne, { children: [
|
|
2578
|
+
n.formatMessage({ id: `${Ve}rule_label` }),
|
|
2579
2579
|
" "
|
|
2580
2580
|
] }),
|
|
2581
|
-
/* @__PURE__ */ r.jsx("span", { children: n.formatMessage({ id: `${
|
|
2582
|
-
!e[s] && /* @__PURE__ */ r.jsxs(
|
|
2581
|
+
/* @__PURE__ */ r.jsx("span", { children: n.formatMessage({ id: `${Ve}rule_${_s[s]}` }) }),
|
|
2582
|
+
!e[s] && /* @__PURE__ */ r.jsxs(ne, { element: "strong", children: [
|
|
2583
2583
|
" ",
|
|
2584
2584
|
" ",
|
|
2585
|
-
n.formatMessage({ id: `${
|
|
2585
|
+
n.formatMessage({ id: `${Ve}notMet` })
|
|
2586
2586
|
] })
|
|
2587
2587
|
] }, `rule-${s}`)) })
|
|
2588
2588
|
] });
|
|
2589
|
-
},
|
|
2590
|
-
const
|
|
2589
|
+
}, bo = Ne(xs);
|
|
2590
|
+
const wo = ({
|
|
2591
2591
|
text: e = {},
|
|
2592
2592
|
topRating: t = 5,
|
|
2593
2593
|
functions: { createRating: n = () => null, updateRating: s = () => {
|
|
@@ -2604,10 +2604,10 @@ const bo = ({
|
|
|
2604
2604
|
c((x) => ({ ...x, setUp: !0, disabled: !0 })), o(E);
|
|
2605
2605
|
}
|
|
2606
2606
|
};
|
|
2607
|
-
if (
|
|
2607
|
+
if (z(() => {
|
|
2608
2608
|
d && !i.setUp && u();
|
|
2609
2609
|
}, [d]), !d)
|
|
2610
|
-
return /* @__PURE__ */ r.jsx(
|
|
2610
|
+
return /* @__PURE__ */ r.jsx(be, { className: "rating-placeholder" });
|
|
2611
2611
|
const { id: f, rating: p, disabled: h } = i, _ = "ratings_", v = {
|
|
2612
2612
|
text: a.formatMessage({ id: `${_}text` }),
|
|
2613
2613
|
low: a.formatMessage({ id: `${_}low` }),
|
|
@@ -2629,7 +2629,7 @@ const bo = ({
|
|
|
2629
2629
|
/* @__PURE__ */ r.jsx("ol", { children: Array.from(new Array(t).keys()).map((E) => {
|
|
2630
2630
|
const x = E + 1;
|
|
2631
2631
|
return /* @__PURE__ */ r.jsx("li", { className: j({ selected: p && x <= p }), children: /* @__PURE__ */ r.jsx(
|
|
2632
|
-
|
|
2632
|
+
W,
|
|
2633
2633
|
{
|
|
2634
2634
|
variant: "tertiary",
|
|
2635
2635
|
size: "small",
|
|
@@ -2647,7 +2647,7 @@ const bo = ({
|
|
|
2647
2647
|
}) })
|
|
2648
2648
|
] });
|
|
2649
2649
|
};
|
|
2650
|
-
const
|
|
2650
|
+
const vs = ({
|
|
2651
2651
|
id: e = "search",
|
|
2652
2652
|
className: t = "",
|
|
2653
2653
|
handleToggle: n = !1,
|
|
@@ -2655,8 +2655,8 @@ const xs = ({
|
|
|
2655
2655
|
gtmContext: o = "search-bar",
|
|
2656
2656
|
gtmEvent: l = "form-submission"
|
|
2657
2657
|
}) => {
|
|
2658
|
-
const { searchIsOpen: d = !0, isDesktopVersion: a = !1 } = n || {}, i = P(), c =
|
|
2659
|
-
|
|
2658
|
+
const { searchIsOpen: d = !0, isDesktopVersion: a = !1 } = n || {}, i = P(), c = Z(null);
|
|
2659
|
+
Ce(() => {
|
|
2660
2660
|
!n || a || !d || c.current && c.current.focus();
|
|
2661
2661
|
}, [d]);
|
|
2662
2662
|
const u = (f) => {
|
|
@@ -2670,7 +2670,7 @@ const xs = ({
|
|
|
2670
2670
|
"data-gtm-event-context": o,
|
|
2671
2671
|
"data-gtm-event-type": l,
|
|
2672
2672
|
children: /* @__PURE__ */ r.jsx("fieldset", { id: `${e}-form`, hidden: n ? !d : !1, role: "search", children: /* @__PURE__ */ r.jsxs("p", { children: [
|
|
2673
|
-
/* @__PURE__ */ r.jsx(
|
|
2673
|
+
/* @__PURE__ */ r.jsx(ne, { element: "label", htmlFor: e, children: i.formatMessage({ id: "search_label" }) }),
|
|
2674
2674
|
/* @__PURE__ */ r.jsx(
|
|
2675
2675
|
"input",
|
|
2676
2676
|
{
|
|
@@ -2692,15 +2692,15 @@ const xs = ({
|
|
|
2692
2692
|
onClick: (f) => {
|
|
2693
2693
|
f.preventDefault(), f.stopPropagation(), c.current && c.current.value && (c.current.value = "");
|
|
2694
2694
|
},
|
|
2695
|
-
children: /* @__PURE__ */ r.jsx(
|
|
2695
|
+
children: /* @__PURE__ */ r.jsx(ne, { children: i.formatMessage({ id: "search_clear" }) })
|
|
2696
2696
|
}
|
|
2697
2697
|
),
|
|
2698
|
-
/* @__PURE__ */ r.jsx("button", { className: "search", onClick: u, children: /* @__PURE__ */ r.jsx(
|
|
2698
|
+
/* @__PURE__ */ r.jsx("button", { className: "search", onClick: u, children: /* @__PURE__ */ r.jsx(ne, { children: i.formatMessage({ id: "search_cta" }) }) })
|
|
2699
2699
|
] }) })
|
|
2700
2700
|
}
|
|
2701
2701
|
);
|
|
2702
2702
|
};
|
|
2703
|
-
const
|
|
2703
|
+
const bs = ({
|
|
2704
2704
|
title: e,
|
|
2705
2705
|
label: t,
|
|
2706
2706
|
ctaMessage: n,
|
|
@@ -2742,11 +2742,11 @@ const vs = ({
|
|
|
2742
2742
|
" ",
|
|
2743
2743
|
g({ id: "inviteForm_error" })
|
|
2744
2744
|
] }) }),
|
|
2745
|
-
/* @__PURE__ */ r.jsx(
|
|
2745
|
+
/* @__PURE__ */ r.jsx(Le, {}),
|
|
2746
2746
|
/* @__PURE__ */ r.jsx("div", { className: "footer", children: _ === "SUCCESS" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2747
|
-
/* @__PURE__ */ r.jsx(
|
|
2748
|
-
/* @__PURE__ */ r.jsx(
|
|
2749
|
-
] }) : /* @__PURE__ */ r.jsx(
|
|
2747
|
+
/* @__PURE__ */ r.jsx(W, { variant: "secondary", onClick: x, children: g({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
2748
|
+
/* @__PURE__ */ r.jsx(W, { onClick: $, children: g({ id: "inviteForm_ctaDone" }) })
|
|
2749
|
+
] }) : /* @__PURE__ */ r.jsx(W, { onClick: x, children: g({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
2750
2750
|
] }) : /* @__PURE__ */ r.jsxs(
|
|
2751
2751
|
"form",
|
|
2752
2752
|
{
|
|
@@ -2758,7 +2758,7 @@ const vs = ({
|
|
|
2758
2758
|
/* @__PURE__ */ r.jsx("h2", { className: "title", style: { color: s }, children: e }),
|
|
2759
2759
|
/* @__PURE__ */ r.jsx("label", { htmlFor: "email-input", className: "label", style: { color: o }, children: t }),
|
|
2760
2760
|
/* @__PURE__ */ r.jsx(
|
|
2761
|
-
|
|
2761
|
+
pr,
|
|
2762
2762
|
{
|
|
2763
2763
|
id: "email-input",
|
|
2764
2764
|
inputClassName: "email-input input",
|
|
@@ -2771,7 +2771,7 @@ const vs = ({
|
|
|
2771
2771
|
getLabel: (T, M, Q) => /* @__PURE__ */ r.jsxs("div", { className: "email text-medium", children: [
|
|
2772
2772
|
/* @__PURE__ */ r.jsx("div", { "data-tag-item": !0, children: T }),
|
|
2773
2773
|
/* @__PURE__ */ r.jsx(
|
|
2774
|
-
|
|
2774
|
+
W,
|
|
2775
2775
|
{
|
|
2776
2776
|
variant: "tertiary",
|
|
2777
2777
|
size: "small",
|
|
@@ -2787,8 +2787,8 @@ const vs = ({
|
|
|
2787
2787
|
}
|
|
2788
2788
|
)
|
|
2789
2789
|
] }),
|
|
2790
|
-
/* @__PURE__ */ r.jsx(
|
|
2791
|
-
/* @__PURE__ */ r.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ r.jsx(
|
|
2790
|
+
/* @__PURE__ */ r.jsx(Le, {}),
|
|
2791
|
+
/* @__PURE__ */ r.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ r.jsx(W, { className: "sendEmailsButton", disabled: p, children: n }) })
|
|
2792
2792
|
]
|
|
2793
2793
|
}
|
|
2794
2794
|
);
|
|
@@ -2838,7 +2838,7 @@ const vs = ({
|
|
|
2838
2838
|
return e[s];
|
|
2839
2839
|
if (!t.includes("."))
|
|
2840
2840
|
continue;
|
|
2841
|
-
const o =
|
|
2841
|
+
const o = un(e[s], t);
|
|
2842
2842
|
if (!(typeof o > "u") && (!n || o[t] && o[t].includes(n) || o.value && o.value.includes(n) || o.toString().includes(n)))
|
|
2843
2843
|
return e[s];
|
|
2844
2844
|
}
|
|
@@ -2892,7 +2892,7 @@ const vs = ({
|
|
|
2892
2892
|
}, 250);
|
|
2893
2893
|
}
|
|
2894
2894
|
}
|
|
2895
|
-
},
|
|
2895
|
+
}, Xe = {
|
|
2896
2896
|
order: ["home", "topics", "partners", "account"],
|
|
2897
2897
|
home: {
|
|
2898
2898
|
href: "/home/",
|
|
@@ -2968,7 +2968,7 @@ const vs = ({
|
|
|
2968
2968
|
props: { variant: "primary" }
|
|
2969
2969
|
}
|
|
2970
2970
|
}
|
|
2971
|
-
},
|
|
2971
|
+
}, Ze = ({
|
|
2972
2972
|
id: e,
|
|
2973
2973
|
isLoggedIn: t = !1,
|
|
2974
2974
|
isDesktopVersion: n = !1,
|
|
@@ -2977,7 +2977,7 @@ const vs = ({
|
|
|
2977
2977
|
},
|
|
2978
2978
|
doTrack: l = null
|
|
2979
2979
|
}) => {
|
|
2980
|
-
const d = P(), a =
|
|
2980
|
+
const d = P(), a = un(Xe, e);
|
|
2981
2981
|
if (!a || a.onlyShow && (a.onlyShow === "logged-in" && !t || a.onlyShow === "logged-out" && t))
|
|
2982
2982
|
return null;
|
|
2983
2983
|
const i = "doTrack" in a, c = l === null ? i ? a.doTrack : !0 : l, u = e.includes("buttons.");
|
|
@@ -3031,7 +3031,7 @@ const vs = ({
|
|
|
3031
3031
|
});
|
|
3032
3032
|
}
|
|
3033
3033
|
return /* @__PURE__ */ r.jsxs("li", { className: j({ [a.className]: a.className, "has-submenu": h, parent: _, active: v }), role: "none", ...g, children: [
|
|
3034
|
-
p ? N.createElement(u ?
|
|
3034
|
+
p ? N.createElement(u ? W : "a", p, d.formatMessage({ id: f })) : d.formatMessage({ id: f }),
|
|
3035
3035
|
a.order && /* @__PURE__ */ r.jsx("ul", { ...E, children: a.order.map((x) => {
|
|
3036
3036
|
if (!a[x])
|
|
3037
3037
|
return null;
|
|
@@ -3044,16 +3044,16 @@ const vs = ({
|
|
|
3044
3044
|
};
|
|
3045
3045
|
return a[x].order ? /* @__PURE__ */ r.jsxs("li", { className: j({ [a[x].className]: a[x].className }), children: [
|
|
3046
3046
|
d.formatMessage({ id: `${f}_${x}` }),
|
|
3047
|
-
/* @__PURE__ */ r.jsx("ul", { children: a[x].order.map((T) => /* @__PURE__ */ r.jsx(
|
|
3048
|
-
] }, x) : /* @__PURE__ */ r.jsx(
|
|
3047
|
+
/* @__PURE__ */ r.jsx("ul", { children: a[x].order.map((T) => /* @__PURE__ */ r.jsx(Ze, { id: `${e}.${x}.${T}`, ...$ }, T)) })
|
|
3048
|
+
] }, x) : /* @__PURE__ */ r.jsx(Ze, { id: `${e}.${x}`, ...$ }, x);
|
|
3049
3049
|
}) })
|
|
3050
3050
|
] }, e);
|
|
3051
3051
|
};
|
|
3052
|
-
const
|
|
3053
|
-
const e = P(), t =
|
|
3052
|
+
const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
3053
|
+
const e = P(), t = ye(je), n = et(!0, !0), s = t && typeof t.id == "string", o = qe(
|
|
3054
3054
|
() => I.getIsDesktopVersion(s, n),
|
|
3055
3055
|
[s, n]
|
|
3056
|
-
), [l, d] =
|
|
3056
|
+
), [l, d] = rr($r, {
|
|
3057
3057
|
headerIsVisible: !0,
|
|
3058
3058
|
menus: { navigation: !1, search: !1, account: !1 },
|
|
3059
3059
|
focusElements: {
|
|
@@ -3061,8 +3061,8 @@ const bs = { height: 67, height_desktop: 83 }, Tn = () => {
|
|
|
3061
3061
|
account: { desktop: !1, default: !1 }
|
|
3062
3062
|
}
|
|
3063
3063
|
}), { headerIsVisible: a, menus: i, focusElements: c } = l;
|
|
3064
|
-
|
|
3065
|
-
scrollPosition:
|
|
3064
|
+
Sr({
|
|
3065
|
+
scrollPosition: ws[`height${o.navigation ? "_desktop" : ""}`],
|
|
3066
3066
|
callbacks: {
|
|
3067
3067
|
scrollUp: () => {
|
|
3068
3068
|
!o && i.navigation || I.shouldChangeHeaderIsVisible(!0, i, d);
|
|
@@ -3074,8 +3074,8 @@ const bs = { height: 67, height_desktop: 83 }, Tn = () => {
|
|
|
3074
3074
|
});
|
|
3075
3075
|
const u = (p, h) => {
|
|
3076
3076
|
I.handleMenus({ id: p, value: h, menus: i, dispatch: d });
|
|
3077
|
-
}, f =
|
|
3078
|
-
return
|
|
3077
|
+
}, f = Z(null);
|
|
3078
|
+
return Ce(() => {
|
|
3079
3079
|
i.navigation && I.autoFocus({
|
|
3080
3080
|
menu: "navigation",
|
|
3081
3081
|
navigationRef: f,
|
|
@@ -3083,7 +3083,7 @@ const bs = { height: 67, height_desktop: 83 }, Tn = () => {
|
|
|
3083
3083
|
focusElements: c,
|
|
3084
3084
|
dispatch: d
|
|
3085
3085
|
});
|
|
3086
|
-
}, [i.navigation]),
|
|
3086
|
+
}, [i.navigation]), Ce(() => {
|
|
3087
3087
|
i.account && I.autoFocus({
|
|
3088
3088
|
menu: "account",
|
|
3089
3089
|
navigationRef: f,
|
|
@@ -3093,8 +3093,8 @@ const bs = { height: 67, height_desktop: 83 }, Tn = () => {
|
|
|
3093
3093
|
});
|
|
3094
3094
|
}, [i.account]), t && t.isLoading ? null : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3095
3095
|
/* @__PURE__ */ r.jsxs("nav", { id: "header", className: j({ "logged-in": s, "logged-out": !s, visible: a }), children: [
|
|
3096
|
-
/* @__PURE__ */ r.jsx(
|
|
3097
|
-
/* @__PURE__ */ r.jsx(
|
|
3096
|
+
/* @__PURE__ */ r.jsx(ne, { element: "a", href: "#content-of-page", children: e.formatMessage({ id: "header_skip" }) }),
|
|
3097
|
+
/* @__PURE__ */ r.jsx(jn, {}),
|
|
3098
3098
|
!o.navigation && /* @__PURE__ */ r.jsx(
|
|
3099
3099
|
"button",
|
|
3100
3100
|
{
|
|
@@ -3107,7 +3107,7 @@ const bs = { height: 67, height_desktop: 83 }, Tn = () => {
|
|
|
3107
3107
|
"aria-haspopup": "true",
|
|
3108
3108
|
"aria-expanded": i.navigation,
|
|
3109
3109
|
"aria-controls": "navigation",
|
|
3110
|
-
children: /* @__PURE__ */ r.jsx(
|
|
3110
|
+
children: /* @__PURE__ */ r.jsx(ne, { children: e.formatMessage({ id: `header_menu_${i.navigation ? "hide" : "show"}` }) })
|
|
3111
3111
|
}
|
|
3112
3112
|
),
|
|
3113
3113
|
/* @__PURE__ */ r.jsx(
|
|
@@ -3118,8 +3118,8 @@ const bs = { height: 67, height_desktop: 83 }, Tn = () => {
|
|
|
3118
3118
|
hidden: o.navigation || i.account ? !1 : !i.navigation,
|
|
3119
3119
|
role: "menu",
|
|
3120
3120
|
"data-showing": !o.navigation && i.account ? "account" : "default",
|
|
3121
|
-
children:
|
|
3122
|
-
|
|
3121
|
+
children: Xe.order.map((p) => /* @__PURE__ */ r.jsx(
|
|
3122
|
+
Ze,
|
|
3123
3123
|
{
|
|
3124
3124
|
id: p,
|
|
3125
3125
|
isLoggedIn: s,
|
|
@@ -3141,11 +3141,11 @@ const bs = { height: 67, height_desktop: 83 }, Tn = () => {
|
|
|
3141
3141
|
"aria-haspopup": "true",
|
|
3142
3142
|
"aria-expanded": i.search,
|
|
3143
3143
|
"aria-controls": "search-form",
|
|
3144
|
-
children: /* @__PURE__ */ r.jsx(
|
|
3144
|
+
children: /* @__PURE__ */ r.jsx(ne, { children: e.formatMessage({ id: `header_search_${i.search ? "hide" : "show"}` }) })
|
|
3145
3145
|
}
|
|
3146
3146
|
),
|
|
3147
3147
|
/* @__PURE__ */ r.jsx(
|
|
3148
|
-
|
|
3148
|
+
vs,
|
|
3149
3149
|
{
|
|
3150
3150
|
id: "global-search",
|
|
3151
3151
|
handleToggle: { searchIsOpen: i.search, isDesktopVersion: o.search },
|
|
@@ -3164,11 +3164,11 @@ const bs = { height: 67, height_desktop: 83 }, Tn = () => {
|
|
|
3164
3164
|
"aria-expanded": i.account,
|
|
3165
3165
|
"aria-controls": "navigation",
|
|
3166
3166
|
children: [
|
|
3167
|
-
/* @__PURE__ */ r.jsx(
|
|
3167
|
+
/* @__PURE__ */ r.jsx(ne, { children: e.formatMessage({ id: `header_account_${i.account ? "hide" : "show"}` }) }),
|
|
3168
3168
|
/* @__PURE__ */ r.jsx(Dt, { name: t && t.name || "", src: t && t.image && t.image.thumbnail || "" })
|
|
3169
3169
|
]
|
|
3170
3170
|
}
|
|
3171
|
-
) : /* @__PURE__ */ r.jsx("ul", { className: "sign-in-buttons", children:
|
|
3171
|
+
) : /* @__PURE__ */ r.jsx("ul", { className: "sign-in-buttons", children: Xe.buttons.order.map((p) => /* @__PURE__ */ r.jsx(Ze, { id: `buttons.${p}` }, p)) })
|
|
3172
3172
|
] }),
|
|
3173
3173
|
/* @__PURE__ */ r.jsx("hr", { id: "content-of-page" }),
|
|
3174
3174
|
/* @__PURE__ */ r.jsx(
|
|
@@ -3179,26 +3179,26 @@ const bs = { height: 67, height_desktop: 83 }, Tn = () => {
|
|
|
3179
3179
|
)
|
|
3180
3180
|
] });
|
|
3181
3181
|
};
|
|
3182
|
-
const
|
|
3182
|
+
const ks = () => {
|
|
3183
3183
|
const e = P();
|
|
3184
3184
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3185
|
-
/* @__PURE__ */ r.jsx(
|
|
3186
|
-
/* @__PURE__ */ r.jsx("div", { className: "content", children: /* @__PURE__ */ r.jsx(
|
|
3187
|
-
/* @__PURE__ */ r.jsx(
|
|
3185
|
+
/* @__PURE__ */ r.jsx(Mn, {}),
|
|
3186
|
+
/* @__PURE__ */ r.jsx("div", { className: "content", children: /* @__PURE__ */ r.jsx(rt, { variant: "error", text: e.formatMessage({ id: "pageLayout_error" }) }) }),
|
|
3187
|
+
/* @__PURE__ */ r.jsx(En, {})
|
|
3188
3188
|
] });
|
|
3189
|
-
},
|
|
3190
|
-
const d =
|
|
3191
|
-
|
|
3189
|
+
}, ko = ({ children: e, reportError: t, showFooter: n = !0, background: s = "default", className: o = "", locale: l = "en" }) => {
|
|
3190
|
+
const d = jr();
|
|
3191
|
+
z(() => {
|
|
3192
3192
|
window.scrollTo(0, 0);
|
|
3193
3193
|
}, [d]);
|
|
3194
|
-
const a =
|
|
3195
|
-
return /* @__PURE__ */ r.jsx(
|
|
3196
|
-
/* @__PURE__ */ r.jsx(
|
|
3194
|
+
const a = gn(e, { locale: l });
|
|
3195
|
+
return /* @__PURE__ */ r.jsx(hr, { onError: t, fallback: /* @__PURE__ */ r.jsx(ks, {}), children: /* @__PURE__ */ r.jsx(sr, { fallback: /* @__PURE__ */ r.jsx(ns, { layout: "overview-page" }), children: /* @__PURE__ */ r.jsx("div", { id: "wrapper", className: j(o, { [s]: s !== "default" }), children: /* @__PURE__ */ r.jsxs(fr, { children: [
|
|
3196
|
+
/* @__PURE__ */ r.jsx(Mn, {}),
|
|
3197
3197
|
/* @__PURE__ */ r.jsx("div", { className: "content", children: a }),
|
|
3198
|
-
n && /* @__PURE__ */ r.jsx(
|
|
3199
|
-
/* @__PURE__ */ r.jsx(
|
|
3198
|
+
n && /* @__PURE__ */ r.jsx(En, {}),
|
|
3199
|
+
/* @__PURE__ */ r.jsx(gs, {})
|
|
3200
3200
|
] }) }) }) });
|
|
3201
|
-
},
|
|
3201
|
+
}, an = {
|
|
3202
3202
|
default: "tags_",
|
|
3203
3203
|
headerTopics: "header_topics_topics_"
|
|
3204
3204
|
}, vt = {
|
|
@@ -3217,19 +3217,19 @@ const ws = () => {
|
|
|
3217
3217
|
WorkAndTheEconomy: "work-and-the-economy"
|
|
3218
3218
|
},
|
|
3219
3219
|
"from the community": "community"
|
|
3220
|
-
},
|
|
3220
|
+
}, ys = {
|
|
3221
3221
|
getTagDetails: (e) => {
|
|
3222
3222
|
if (e.includes("topic_")) {
|
|
3223
3223
|
if (e = vt.topic[e.replace("topic_", "")], e) {
|
|
3224
|
-
const t =
|
|
3225
|
-
return t ? { id: e, href: t, text: `${
|
|
3224
|
+
const t = Xe.topics.topics[e].href;
|
|
3225
|
+
return t ? { id: e, href: t, text: `${an.headerTopics}${e}` } : null;
|
|
3226
3226
|
}
|
|
3227
3227
|
return null;
|
|
3228
3228
|
}
|
|
3229
|
-
return vt[e] ? (e = vt[e], { id: e, text: `${
|
|
3229
|
+
return vt[e] ? (e = vt[e], { id: e, text: `${an.default}${e}` }) : null;
|
|
3230
3230
|
}
|
|
3231
3231
|
};
|
|
3232
|
-
const
|
|
3232
|
+
const yo = ({
|
|
3233
3233
|
tags: e = [],
|
|
3234
3234
|
color: t = "default",
|
|
3235
3235
|
forceOneLine: n = !1,
|
|
@@ -3245,7 +3245,7 @@ const ko = ({
|
|
|
3245
3245
|
return e.forEach((c) => {
|
|
3246
3246
|
if (!c)
|
|
3247
3247
|
return;
|
|
3248
|
-
const u =
|
|
3248
|
+
const u = ys.getTagDetails(c);
|
|
3249
3249
|
u && i.push(u);
|
|
3250
3250
|
}), i.length < 1 ? null : /* @__PURE__ */ r.jsx("ul", { className: j("tags text-small", t, o, { "one-line": n }), children: i.map((c) => {
|
|
3251
3251
|
const u = a.formatMessage({ id: c.text });
|
|
@@ -3261,7 +3261,7 @@ const ko = ({
|
|
|
3261
3261
|
) : u }, c.id);
|
|
3262
3262
|
}) });
|
|
3263
3263
|
};
|
|
3264
|
-
const
|
|
3264
|
+
const jo = ({
|
|
3265
3265
|
members: { total: e, data: t = [] },
|
|
3266
3266
|
pagination: n,
|
|
3267
3267
|
gtmContext: s = "member",
|
|
@@ -3276,10 +3276,10 @@ const yo = ({
|
|
|
3276
3276
|
] }),
|
|
3277
3277
|
/* @__PURE__ */ r.jsx("ul", { children: t.map((a, i) => /* @__PURE__ */ r.jsxs("li", { children: [
|
|
3278
3278
|
/* @__PURE__ */ r.jsx(Pt, { member: a, gtmContext: s, gtmType: o }),
|
|
3279
|
-
a.isAdmin && /* @__PURE__ */ r.jsx(
|
|
3279
|
+
a.isAdmin && /* @__PURE__ */ r.jsx(qr, { children: d.formatMessage({ id: "membersList_admin" }) })
|
|
3280
3280
|
] }, i)) }),
|
|
3281
3281
|
n && /* @__PURE__ */ r.jsx(
|
|
3282
|
-
|
|
3282
|
+
fs,
|
|
3283
3283
|
{
|
|
3284
3284
|
...n,
|
|
3285
3285
|
icon: { icon: "arrow-down", position: "right" },
|
|
@@ -3288,8 +3288,8 @@ const yo = ({
|
|
|
3288
3288
|
)
|
|
3289
3289
|
] }));
|
|
3290
3290
|
};
|
|
3291
|
-
let
|
|
3292
|
-
const
|
|
3291
|
+
let Ye = null;
|
|
3292
|
+
const ae = "discussion_form_", Cn = ({
|
|
3293
3293
|
content: e = { type: "response", slugs: {} },
|
|
3294
3294
|
userHasPermissions: t = !0,
|
|
3295
3295
|
meta: n = {
|
|
@@ -3321,32 +3321,32 @@ const oe = "discussion_form_", Mn = ({
|
|
|
3321
3321
|
gtmContext: i = "DiscussionForm"
|
|
3322
3322
|
}) => {
|
|
3323
3323
|
var F, q;
|
|
3324
|
-
const c = P(), u =
|
|
3324
|
+
const c = P(), u = ye(je), [f, p] = D(
|
|
3325
3325
|
n.isEditing && n.isEditing.text || ""
|
|
3326
|
-
), [h, _] = D(d.error || !1), [v, g] = D(!1), E =
|
|
3326
|
+
), [h, _] = D(d.error || !1), [v, g] = D(!1), E = Z(null);
|
|
3327
3327
|
if (s || (s = E), n.isLoading)
|
|
3328
3328
|
return /* @__PURE__ */ r.jsx(
|
|
3329
|
-
|
|
3329
|
+
be,
|
|
3330
3330
|
{
|
|
3331
3331
|
className: "discussion-card discussion-form",
|
|
3332
3332
|
"data-testid": "loading-placeholder"
|
|
3333
3333
|
}
|
|
3334
3334
|
);
|
|
3335
3335
|
const x = (k) => {
|
|
3336
|
-
const
|
|
3337
|
-
p(
|
|
3338
|
-
let
|
|
3339
|
-
!u || !u.id ?
|
|
3336
|
+
const Y = k.target.value;
|
|
3337
|
+
p(Y);
|
|
3338
|
+
let B;
|
|
3339
|
+
!u || !u.id ? B = he(
|
|
3340
3340
|
c.formatMessage,
|
|
3341
|
-
`${
|
|
3341
|
+
`${ae}error_loggedOut`,
|
|
3342
3342
|
e.type,
|
|
3343
3343
|
"action"
|
|
3344
|
-
) : t ?
|
|
3344
|
+
) : t ? Y.length >= o && (B = `${ae}error_tooLong`) : B = he(
|
|
3345
3345
|
c.formatMessage,
|
|
3346
|
-
`${
|
|
3346
|
+
`${ae}error_noPermission`,
|
|
3347
3347
|
e.type,
|
|
3348
3348
|
"action"
|
|
3349
|
-
),
|
|
3349
|
+
), B ? _(B) : h && _(!1);
|
|
3350
3350
|
};
|
|
3351
3351
|
let $ = `${e.type}-form`;
|
|
3352
3352
|
if (e.type === "response" || e.type === "reply") {
|
|
@@ -3354,11 +3354,11 @@ const oe = "discussion_form_", Mn = ({
|
|
|
3354
3354
|
k && ($ = `${$}-${k.slice(-15)}`);
|
|
3355
3355
|
}
|
|
3356
3356
|
const T = async (k) => {
|
|
3357
|
-
var
|
|
3357
|
+
var B;
|
|
3358
3358
|
if (k.preventDefault(), k.stopPropagation(), !u || !u.id || !t || Q)
|
|
3359
3359
|
return;
|
|
3360
|
-
|
|
3361
|
-
const
|
|
3360
|
+
Ye && clearTimeout(Ye), g("submitting");
|
|
3361
|
+
const Y = window.location.pathname;
|
|
3362
3362
|
try {
|
|
3363
3363
|
let L;
|
|
3364
3364
|
switch (e.type) {
|
|
@@ -3369,48 +3369,48 @@ const oe = "discussion_form_", Mn = ({
|
|
|
3369
3369
|
L = await a.create({
|
|
3370
3370
|
title: f,
|
|
3371
3371
|
authorId: u && u.id,
|
|
3372
|
-
...(
|
|
3372
|
+
...(B = a.props) == null ? void 0 : B.create
|
|
3373
3373
|
});
|
|
3374
3374
|
break;
|
|
3375
3375
|
case "response":
|
|
3376
3376
|
L = await a.create(
|
|
3377
3377
|
{ question: e.slugs.question },
|
|
3378
|
-
{ body: f, authorId: u && u.id, contentPath:
|
|
3378
|
+
{ body: f, authorId: u && u.id, contentPath: Y }
|
|
3379
3379
|
);
|
|
3380
3380
|
break;
|
|
3381
3381
|
case "reply":
|
|
3382
3382
|
L = await a.create(
|
|
3383
3383
|
{ question: e.slugs.question, answer: e.slugs.answer },
|
|
3384
|
-
{ body: f, authorId: u && u.id, contentPath:
|
|
3384
|
+
{ body: f, authorId: u && u.id, contentPath: Y }
|
|
3385
3385
|
);
|
|
3386
3386
|
break;
|
|
3387
3387
|
default:
|
|
3388
3388
|
break;
|
|
3389
3389
|
}
|
|
3390
|
-
await
|
|
3390
|
+
await Cr(1e3), a.callback && await a.callback(L), Ye = setTimeout(() => {
|
|
3391
3391
|
p(""), g("submitted"), M();
|
|
3392
3392
|
}, 500);
|
|
3393
3393
|
} catch (L) {
|
|
3394
3394
|
const U = L;
|
|
3395
|
-
let
|
|
3396
|
-
U.message.includes("entry already exists") && (
|
|
3395
|
+
let G = `${ae}error`;
|
|
3396
|
+
U.message.includes("entry already exists") && (G = he(
|
|
3397
3397
|
c.formatMessage,
|
|
3398
|
-
`${
|
|
3398
|
+
`${ae}error_alreadyExists`,
|
|
3399
3399
|
e.type,
|
|
3400
3400
|
"action"
|
|
3401
|
-
)), U.message.includes("429") ?
|
|
3401
|
+
)), U.message.includes("429") ? G = he(
|
|
3402
3402
|
c.formatMessage,
|
|
3403
|
-
`${
|
|
3403
|
+
`${ae}error_tooMany`,
|
|
3404
3404
|
e.type,
|
|
3405
3405
|
"action"
|
|
3406
|
-
) : U.message.includes("400") && (
|
|
3406
|
+
) : U.message.includes("400") && (G = `${ae}error`), _(G), M();
|
|
3407
3407
|
}
|
|
3408
3408
|
}, M = () => {
|
|
3409
|
-
|
|
3409
|
+
Ye = setTimeout(() => {
|
|
3410
3410
|
_(!1), g(!1);
|
|
3411
3411
|
}, 5e3);
|
|
3412
|
-
}, Q = !f || !
|
|
3413
|
-
return (n.isEditing && !
|
|
3412
|
+
}, Q = !f || !Rr(f), V = v === "submitting", w = [];
|
|
3413
|
+
return (n.isEditing && !V || d.cancel) && w.push({
|
|
3414
3414
|
variant: "secondary",
|
|
3415
3415
|
size: { mobile: "small", 600: "medium" },
|
|
3416
3416
|
onClick: a.handleCancel,
|
|
@@ -3418,7 +3418,7 @@ const oe = "discussion_form_", Mn = ({
|
|
|
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: `${ae}cancel` })
|
|
3422
3422
|
}), w.push({
|
|
3423
3423
|
variant: "primary",
|
|
3424
3424
|
size: { mobile: "small", 600: "medium" },
|
|
@@ -3435,9 +3435,9 @@ const oe = "discussion_form_", Mn = ({
|
|
|
3435
3435
|
"data-gtm-event-context": i,
|
|
3436
3436
|
"data-gtm-event-type": `${n.isEditing ? "save" : "submit"}-${e.type}-click`,
|
|
3437
3437
|
"data-testid": "save-button",
|
|
3438
|
-
disabled: !u || !u.id || !t || Q ||
|
|
3438
|
+
disabled: !u || !u.id || !t || Q || V || n.isEditing && f === n.isEditing.text,
|
|
3439
3439
|
children: c.formatMessage({
|
|
3440
|
-
id: `${
|
|
3440
|
+
id: `${ae}${V ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}`
|
|
3441
3441
|
})
|
|
3442
3442
|
}), /* @__PURE__ */ r.jsxs(
|
|
3443
3443
|
"form",
|
|
@@ -3448,7 +3448,7 @@ const oe = "discussion_form_", Mn = ({
|
|
|
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__ */ r.jsx("h2", { children:
|
|
3451
|
+
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ r.jsx("h2", { children: he(c.formatMessage, `${ae}title`, e.type, "action") }),
|
|
3452
3452
|
/* @__PURE__ */ r.jsx(
|
|
3453
3453
|
Pt,
|
|
3454
3454
|
{
|
|
@@ -3457,16 +3457,16 @@ const oe = "discussion_form_", Mn = ({
|
|
|
3457
3457
|
gtmType: "profile-click"
|
|
3458
3458
|
}
|
|
3459
3459
|
),
|
|
3460
|
-
/* @__PURE__ */ r.jsx(
|
|
3460
|
+
/* @__PURE__ */ r.jsx(ne, { element: "label", showOnFocus: !1, htmlFor: `${$}-input`, children: he(c.formatMessage, `${ae}label`, e.type, "action") }),
|
|
3461
3461
|
/* @__PURE__ */ r.jsx(
|
|
3462
|
-
|
|
3462
|
+
gr,
|
|
3463
3463
|
{
|
|
3464
3464
|
ref: s,
|
|
3465
3465
|
id: `${$}-input`,
|
|
3466
3466
|
name: e.type,
|
|
3467
|
-
placeholder:
|
|
3467
|
+
placeholder: he(
|
|
3468
3468
|
c.formatMessage,
|
|
3469
|
-
`${
|
|
3469
|
+
`${ae}placeholder`,
|
|
3470
3470
|
e.type,
|
|
3471
3471
|
"action"
|
|
3472
3472
|
),
|
|
@@ -3479,7 +3479,7 @@ const oe = "discussion_form_", Mn = ({
|
|
|
3479
3479
|
autoFocus: !!n.isEditing
|
|
3480
3480
|
}
|
|
3481
3481
|
),
|
|
3482
|
-
/* @__PURE__ */ r.jsx("small", { children:
|
|
3482
|
+
/* @__PURE__ */ r.jsx("small", { children: he(c.formatMessage, `${ae}explainer`, e.type, "action", {
|
|
3483
3483
|
a: (k) => /* @__PURE__ */ r.jsx(
|
|
3484
3484
|
"a",
|
|
3485
3485
|
{
|
|
@@ -3493,8 +3493,8 @@ const oe = "discussion_form_", Mn = ({
|
|
|
3493
3493
|
}
|
|
3494
3494
|
)
|
|
3495
3495
|
}) }),
|
|
3496
|
-
/* @__PURE__ */ r.jsx(
|
|
3497
|
-
v === "submitted" && /* @__PURE__ */ r.jsx($t, { className: "success", "data-testid": "success", children:
|
|
3496
|
+
/* @__PURE__ */ r.jsx(tt, { buttons: w }),
|
|
3497
|
+
v === "submitted" && /* @__PURE__ */ r.jsx($t, { className: "success", "data-testid": "success", children: he(c.formatMessage, `${ae}success`, e.type, "action") }),
|
|
3498
3498
|
h && /* @__PURE__ */ r.jsx($t, { id: "error-message", className: "error", "data-testid": "error", children: d.error ? d.error : typeof h == "string" ? h.includes(" ") ? h : c.formatMessage(
|
|
3499
3499
|
{ id: h },
|
|
3500
3500
|
{
|
|
@@ -3507,36 +3507,36 @@ const oe = "discussion_form_", Mn = ({
|
|
|
3507
3507
|
]
|
|
3508
3508
|
}
|
|
3509
3509
|
);
|
|
3510
|
-
},
|
|
3510
|
+
}, Nn = ({
|
|
3511
3511
|
contentType: e,
|
|
3512
3512
|
createPost: t,
|
|
3513
3513
|
membershipRequiredToPost: { isMember: n, required: s, join: o, leave: l, notMemberStateText: d }
|
|
3514
3514
|
}) => s && !n ? /* @__PURE__ */ r.jsx(
|
|
3515
|
-
|
|
3515
|
+
rt,
|
|
3516
3516
|
{
|
|
3517
3517
|
text: d,
|
|
3518
3518
|
button: {
|
|
3519
|
-
component: /* @__PURE__ */ r.jsx(
|
|
3519
|
+
component: /* @__PURE__ */ r.jsx(yn, { functions: { join: o, leave: l } })
|
|
3520
3520
|
}
|
|
3521
3521
|
}
|
|
3522
3522
|
) : /* @__PURE__ */ r.jsx(
|
|
3523
|
-
|
|
3523
|
+
Cn,
|
|
3524
3524
|
{
|
|
3525
3525
|
content: { type: e, slugs: {} },
|
|
3526
3526
|
functions: {
|
|
3527
3527
|
create: t
|
|
3528
3528
|
}
|
|
3529
3529
|
}
|
|
3530
|
-
),
|
|
3530
|
+
), js = {
|
|
3531
3531
|
showThread: !1,
|
|
3532
3532
|
showForm: !1
|
|
3533
|
-
},
|
|
3533
|
+
}, An = Mt(js), Eo = ({ children: e }) => {
|
|
3534
3534
|
const [t, n] = D({
|
|
3535
3535
|
showThread: !1,
|
|
3536
3536
|
showForm: !1
|
|
3537
3537
|
});
|
|
3538
|
-
return /* @__PURE__ */ r.jsx(
|
|
3539
|
-
},
|
|
3538
|
+
return /* @__PURE__ */ r.jsx(An.Provider, { value: { ...t, updateConversation: n }, children: e });
|
|
3539
|
+
}, Es = ({
|
|
3540
3540
|
question: e,
|
|
3541
3541
|
answer: t,
|
|
3542
3542
|
reply: n
|
|
@@ -3544,11 +3544,11 @@ const oe = "discussion_form_", Mn = ({
|
|
|
3544
3544
|
...e && { questionSlug: e },
|
|
3545
3545
|
...t && { answerSlug: t },
|
|
3546
3546
|
...n && { replySlug: n }
|
|
3547
|
-
}),
|
|
3548
|
-
let
|
|
3547
|
+
}), Ss = (e, t = 10) => !e || e.length === 0 ? [] : e.slice(0, t);
|
|
3548
|
+
let Oe = !1;
|
|
3549
3549
|
const bt = () => {
|
|
3550
|
-
|
|
3551
|
-
}, wt = 10,
|
|
3550
|
+
Oe !== !1 && (clearTimeout(Oe), Oe = !1);
|
|
3551
|
+
}, wt = 10, $s = ({
|
|
3552
3552
|
element: e = "div",
|
|
3553
3553
|
likes: t = 0,
|
|
3554
3554
|
peopleWhoLiked: n = !1,
|
|
@@ -3561,15 +3561,15 @@ const bt = () => {
|
|
|
3561
3561
|
} } = {}
|
|
3562
3562
|
}) => {
|
|
3563
3563
|
const c = P();
|
|
3564
|
-
|
|
3564
|
+
z(() => {
|
|
3565
3565
|
h(o);
|
|
3566
3566
|
}, [o]);
|
|
3567
|
-
const [u, f] = D(t), [p, h] = D(o), [_, v] = D(!1), [g, E] = D(!1), x =
|
|
3568
|
-
if (M.preventDefault(), M.stopPropagation(), E(!1),
|
|
3567
|
+
const [u, f] = D(t), [p, h] = D(o), [_, v] = D(!1), [g, E] = D(!1), x = qe(() => Ss(n, wt), [n]), $ = (M) => {
|
|
3568
|
+
if (M.preventDefault(), M.stopPropagation(), E(!1), Oe)
|
|
3569
3569
|
return bt(), !1;
|
|
3570
3570
|
if (bt(), _ || !d)
|
|
3571
3571
|
return !1;
|
|
3572
|
-
|
|
3572
|
+
Oe = setTimeout(T, 350);
|
|
3573
3573
|
}, T = async () => {
|
|
3574
3574
|
if (bt(), _ || !d)
|
|
3575
3575
|
return !1;
|
|
@@ -3577,7 +3577,7 @@ const bt = () => {
|
|
|
3577
3577
|
M < 0 && (M = 0), v(!0), f(M), h(!p);
|
|
3578
3578
|
try {
|
|
3579
3579
|
if (l && l.slugs) {
|
|
3580
|
-
const Q =
|
|
3580
|
+
const Q = Es(l.slugs);
|
|
3581
3581
|
p ? await i(Q) : await a(Q, { contentPath: window.location.pathname });
|
|
3582
3582
|
}
|
|
3583
3583
|
} catch {
|
|
@@ -3605,7 +3605,7 @@ const bt = () => {
|
|
|
3605
3605
|
},
|
|
3606
3606
|
children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3607
3607
|
/* @__PURE__ */ r.jsx(
|
|
3608
|
-
|
|
3608
|
+
W,
|
|
3609
3609
|
{
|
|
3610
3610
|
variant: "tertiary",
|
|
3611
3611
|
size: "medium",
|
|
@@ -3623,15 +3623,15 @@ const bt = () => {
|
|
|
3623
3623
|
}
|
|
3624
3624
|
),
|
|
3625
3625
|
/* @__PURE__ */ r.jsx("span", { className: j("number-of-likes", { "no-likes": u === 0 }), "data-testid": "number-of-likes", children: c.formatMessage({ id: `discussion_likes${s ? "_short" : ""}` }, { number: u }) }),
|
|
3626
|
-
n && /* @__PURE__ */ r.jsx(
|
|
3627
|
-
x.map((M) => typeof M == "string" || !M.name ? null : /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
3626
|
+
n && /* @__PURE__ */ r.jsx(Ir, { isOpen: g, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ r.jsxs("ul", { children: [
|
|
3627
|
+
x.map((M) => typeof M == "string" || !M.name ? null : /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(nt, { href: M.id ? `/profiles/${M.id}` : void 0, gtmContext: "Likes", gtmType: "liked-name-click", children: M.name }) }, M.id || window.btoa(M.name))),
|
|
3628
3628
|
n.length > wt && /* @__PURE__ */ r.jsx("li", { children: c.formatMessage({ id: "discussion_likes_more" }, { number: n.length - wt }) })
|
|
3629
3629
|
] }) })
|
|
3630
3630
|
] })
|
|
3631
3631
|
}
|
|
3632
3632
|
);
|
|
3633
3633
|
};
|
|
3634
|
-
const
|
|
3634
|
+
const Ts = ({ element: e = "section", children: t, className: n, ...s }) => N.createElement(
|
|
3635
3635
|
e,
|
|
3636
3636
|
{
|
|
3637
3637
|
className: j("modal", n),
|
|
@@ -3639,7 +3639,7 @@ const $s = ({ element: e = "section", children: t, className: n, ...s }) => N.cr
|
|
|
3639
3639
|
...s
|
|
3640
3640
|
}
|
|
3641
3641
|
);
|
|
3642
|
-
const
|
|
3642
|
+
const Dn = ({
|
|
3643
3643
|
id: e = "content-overlay",
|
|
3644
3644
|
isOpen: t = !1,
|
|
3645
3645
|
showDivider: n = !0,
|
|
@@ -3657,12 +3657,12 @@ const An = ({
|
|
|
3657
3657
|
const p = P(), [h, _] = D(t), v = (E) => {
|
|
3658
3658
|
_(E), E ? (o(), document.body.classList.add("has-overlay")) : (l(), document.body.classList.remove("has-overlay"));
|
|
3659
3659
|
};
|
|
3660
|
-
|
|
3660
|
+
z(() => {
|
|
3661
3661
|
v(t);
|
|
3662
3662
|
}, [t]);
|
|
3663
3663
|
const g = s ? { "--max-width": `${s / 16}rem` } : {};
|
|
3664
3664
|
return /* @__PURE__ */ r.jsx("div", { className: j("overlay", { open: h }), children: /* @__PURE__ */ r.jsx(
|
|
3665
|
-
|
|
3665
|
+
Ts,
|
|
3666
3666
|
{
|
|
3667
3667
|
id: e,
|
|
3668
3668
|
className: j("overlay-modal", u, { "has-max-width": s }),
|
|
@@ -3672,7 +3672,7 @@ const An = ({
|
|
|
3672
3672
|
/* @__PURE__ */ r.jsxs("div", { className: "top", children: [
|
|
3673
3673
|
a && /* @__PURE__ */ r.jsx("h2", { className: "modal-title", children: a }),
|
|
3674
3674
|
/* @__PURE__ */ r.jsx(
|
|
3675
|
-
|
|
3675
|
+
W,
|
|
3676
3676
|
{
|
|
3677
3677
|
variant: "tertiary",
|
|
3678
3678
|
size: "medium",
|
|
@@ -3685,22 +3685,22 @@ const An = ({
|
|
|
3685
3685
|
}
|
|
3686
3686
|
)
|
|
3687
3687
|
] }),
|
|
3688
|
-
n && /* @__PURE__ */ r.jsx(
|
|
3688
|
+
n && /* @__PURE__ */ r.jsx(Le, {}),
|
|
3689
3689
|
i,
|
|
3690
3690
|
c && /* @__PURE__ */ r.jsxs("div", { className: "bottom", children: [
|
|
3691
|
-
/* @__PURE__ */ r.jsx(
|
|
3692
|
-
/* @__PURE__ */ r.jsx(
|
|
3691
|
+
/* @__PURE__ */ r.jsx(Le, {}),
|
|
3692
|
+
/* @__PURE__ */ r.jsx(tt, { buttons: c })
|
|
3693
3693
|
] }),
|
|
3694
3694
|
d && /* @__PURE__ */ r.jsx($t, { className: "error", children: d })
|
|
3695
3695
|
] })
|
|
3696
3696
|
}
|
|
3697
3697
|
) });
|
|
3698
|
-
},
|
|
3698
|
+
}, Ms = (e, t) => ({
|
|
3699
3699
|
"aria-haspopup": !0,
|
|
3700
3700
|
"aria-expanded": t,
|
|
3701
3701
|
"aria-controls": e
|
|
3702
3702
|
});
|
|
3703
|
-
const
|
|
3703
|
+
const So = ({
|
|
3704
3704
|
className: e,
|
|
3705
3705
|
showModal: t = !0,
|
|
3706
3706
|
title: n,
|
|
@@ -3713,7 +3713,7 @@ const Eo = ({
|
|
|
3713
3713
|
},
|
|
3714
3714
|
sendInvites: c
|
|
3715
3715
|
}) => /* @__PURE__ */ r.jsx(
|
|
3716
|
-
|
|
3716
|
+
Dn,
|
|
3717
3717
|
{
|
|
3718
3718
|
title: n,
|
|
3719
3719
|
isOpen: t,
|
|
@@ -3721,7 +3721,7 @@ const Eo = ({
|
|
|
3721
3721
|
showIcon: d,
|
|
3722
3722
|
className: j("invite-modal", e, { success: !!n }),
|
|
3723
3723
|
children: /* @__PURE__ */ r.jsx(
|
|
3724
|
-
|
|
3724
|
+
bs,
|
|
3725
3725
|
{
|
|
3726
3726
|
title: s,
|
|
3727
3727
|
label: o,
|
|
@@ -3732,11 +3732,11 @@ const Eo = ({
|
|
|
3732
3732
|
}
|
|
3733
3733
|
)
|
|
3734
3734
|
}
|
|
3735
|
-
),
|
|
3735
|
+
), ln = (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
|
+
}, Ft = (e, t) => e && !t;
|
|
3739
|
+
const xe = "discussion_", Rt = ({
|
|
3740
3740
|
element: e = "div",
|
|
3741
3741
|
content: t,
|
|
3742
3742
|
userHasPermissions: n = !0,
|
|
@@ -3758,46 +3758,46 @@ const pe = "discussion_", Ft = ({
|
|
|
3758
3758
|
gtmContext: h = "DiscussionAnswer",
|
|
3759
3759
|
children: _
|
|
3760
3760
|
}) => {
|
|
3761
|
-
const v = P(), g =
|
|
3761
|
+
const v = P(), g = ye(je), E = ye(An), [x, $] = D({
|
|
3762
3762
|
body: t && t.body || "",
|
|
3763
3763
|
isEditing: !1,
|
|
3764
3764
|
didEdit: t && t.isEdited || !1
|
|
3765
|
-
}), [T, M] = D(!1), [Q,
|
|
3766
|
-
if (
|
|
3765
|
+
}), [T, M] = D(!1), [Q, V] = D("");
|
|
3766
|
+
if (z(() => {
|
|
3767
3767
|
$({
|
|
3768
3768
|
...x,
|
|
3769
3769
|
body: t && t.body || "",
|
|
3770
3770
|
didEdit: t && t.isEdited || !1
|
|
3771
3771
|
});
|
|
3772
3772
|
}, [t.isEdited]), s || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
3773
|
-
return /* @__PURE__ */ r.jsx(
|
|
3774
|
-
const { author: w, canLike: F, createdAt: q, id: k, likes:
|
|
3775
|
-
|
|
3773
|
+
return /* @__PURE__ */ r.jsx(be, { className: "discussion-card discussion-post" });
|
|
3774
|
+
const { author: w, canLike: F, createdAt: q, id: k, likes: Y = 0, userLiked: B, comments: L = 0 } = t, U = g && g.id && typeof w != "string" && w.id && w.id === g.id || !1, G = typeof F == "boolean" ? F : n ? !U : !1, K = async (R) => {
|
|
3775
|
+
R || (R = ""), V("");
|
|
3776
3776
|
try {
|
|
3777
|
-
if (!
|
|
3778
|
-
const
|
|
3779
|
-
await a(
|
|
3777
|
+
if (!_r(R, x.body)) {
|
|
3778
|
+
const ee = t.type === "question" ? { title: R } : { body: R };
|
|
3779
|
+
await a(ln(t.slugs), ee);
|
|
3780
3780
|
}
|
|
3781
|
-
$({ body:
|
|
3781
|
+
$({ body: R, isEditing: !1, didEdit: !0 });
|
|
3782
3782
|
} catch {
|
|
3783
|
-
|
|
3783
|
+
V(`${xe}form_error`);
|
|
3784
3784
|
}
|
|
3785
|
-
},
|
|
3785
|
+
}, ie = () => {
|
|
3786
3786
|
E && E.updateConversation && E.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
|
|
3787
|
-
const
|
|
3788
|
-
|
|
3787
|
+
const ee = `reply-form-${(t.type === "answer" ? t.slug : t.slugs.answer || "").toLowerCase().slice(-15)}`, oe = document.getElementById(ee), ce = document.getElementById(`${ee}-input`);
|
|
3788
|
+
ce && ce.focus(), oe && oe.scrollIntoView({ behavior: "smooth" });
|
|
3789
3789
|
}, 0);
|
|
3790
|
-
},
|
|
3790
|
+
}, le = () => {
|
|
3791
3791
|
try {
|
|
3792
|
-
d(
|
|
3792
|
+
d(ln(t.slugs));
|
|
3793
3793
|
} catch {
|
|
3794
|
-
|
|
3794
|
+
V("delete-error");
|
|
3795
3795
|
}
|
|
3796
3796
|
}, se = [{
|
|
3797
|
-
text: v.formatMessage({ id: `${
|
|
3798
|
-
href: `mailto:community@apolitical.co?subject=${encodeURI(v.formatMessage({ id: `${
|
|
3797
|
+
text: v.formatMessage({ id: `${xe}moreMenu_report` }),
|
|
3798
|
+
href: `mailto:community@apolitical.co?subject=${encodeURI(v.formatMessage({ id: `${xe}report_subject` }))}&body=${encodeURI(
|
|
3799
3799
|
v.formatMessage(
|
|
3800
|
-
{ id: `${
|
|
3800
|
+
{ id: `${xe}report_body` },
|
|
3801
3801
|
{
|
|
3802
3802
|
contentType: t.type || "",
|
|
3803
3803
|
contentSlug: t.slug || "",
|
|
@@ -3809,7 +3809,7 @@ const pe = "discussion_", Ft = ({
|
|
|
3809
3809
|
}];
|
|
3810
3810
|
return n && U && se.push(
|
|
3811
3811
|
{
|
|
3812
|
-
text: v.formatMessage({ id: `${
|
|
3812
|
+
text: v.formatMessage({ id: `${xe}moreMenu_edit` }),
|
|
3813
3813
|
onClick: () => $({ ...x, isEditing: !0 }),
|
|
3814
3814
|
icon: "pencil-paper",
|
|
3815
3815
|
className: "gtm-trackable",
|
|
@@ -3817,15 +3817,15 @@ const pe = "discussion_", Ft = ({
|
|
|
3817
3817
|
"data-gtm-event-type": `edit-${t.type}-click`
|
|
3818
3818
|
},
|
|
3819
3819
|
{
|
|
3820
|
-
text: v.formatMessage({ id: `${
|
|
3821
|
-
onClick: (
|
|
3822
|
-
|
|
3820
|
+
text: v.formatMessage({ id: `${xe}moreMenu_delete` }),
|
|
3821
|
+
onClick: (R) => {
|
|
3822
|
+
R.preventDefault(), R.stopPropagation(), M(!0);
|
|
3823
3823
|
},
|
|
3824
3824
|
icon: "trash",
|
|
3825
3825
|
className: "gtm-trackable",
|
|
3826
3826
|
"data-gtm-event-context": h,
|
|
3827
3827
|
"data-gtm-event-type": `delete-${t.type}-click`,
|
|
3828
|
-
...
|
|
3828
|
+
...Ms(`delete-${t.slug}-modal`, T)
|
|
3829
3829
|
}
|
|
3830
3830
|
), N.createElement(e, {
|
|
3831
3831
|
className: j("discussion-post", p),
|
|
@@ -3836,8 +3836,8 @@ const pe = "discussion_", Ft = ({
|
|
|
3836
3836
|
{
|
|
3837
3837
|
id: k || t.slug,
|
|
3838
3838
|
className: j("discussion-card", t.type, { editing: x.isEditing, "has-link": f.post && !x.isEditing }),
|
|
3839
|
-
onClick: (
|
|
3840
|
-
!f.post || x.isEditing || (
|
|
3839
|
+
onClick: (R) => {
|
|
3840
|
+
!f.post || x.isEditing || (R.preventDefault(), R.stopPropagation(), window.location.href = f.post);
|
|
3841
3841
|
},
|
|
3842
3842
|
children: [
|
|
3843
3843
|
!x.isEditing && /* @__PURE__ */ r.jsx(
|
|
@@ -3851,7 +3851,7 @@ const pe = "discussion_", Ft = ({
|
|
|
3851
3851
|
}
|
|
3852
3852
|
),
|
|
3853
3853
|
x.isEditing ? /* @__PURE__ */ r.jsx(
|
|
3854
|
-
|
|
3854
|
+
Cn,
|
|
3855
3855
|
{
|
|
3856
3856
|
content: { type: t.type, slugs: t.slugs },
|
|
3857
3857
|
userHasPermissions: n,
|
|
@@ -3864,35 +3864,35 @@ const pe = "discussion_", Ft = ({
|
|
|
3864
3864
|
}) : !1 },
|
|
3865
3865
|
functions: {
|
|
3866
3866
|
create: l,
|
|
3867
|
-
handleSaveEdit:
|
|
3867
|
+
handleSaveEdit: K,
|
|
3868
3868
|
handleCancel: () => {
|
|
3869
|
-
|
|
3869
|
+
V(""), $({ ...x, isEditing: !1 });
|
|
3870
3870
|
}
|
|
3871
3871
|
},
|
|
3872
3872
|
gtmContext: `${h}Form`
|
|
3873
3873
|
}
|
|
3874
|
-
) : f.post ? /* @__PURE__ */ r.jsx("a", { href: f.post, className: "gtm-trackable", "data-gtm-event-context": h, "data-gtm-event-type": "title-click", children: /* @__PURE__ */ r.jsx(
|
|
3874
|
+
) : f.post ? /* @__PURE__ */ r.jsx("a", { href: f.post, className: "gtm-trackable", "data-gtm-event-context": h, "data-gtm-event-type": "title-click", children: /* @__PURE__ */ r.jsx(nn, { options: { overrides: { a: Zr } }, children: x.body }) }) : /* @__PURE__ */ r.jsx(nn, { options: { wrapper: t.type === "question" ? "h1" : N.Fragment, forceWrapper: t.type === "question", forceInline: t.type === "question", forceBlock: t.type !== "question" }, children: x.body }),
|
|
3875
3875
|
!x.isEditing && /* @__PURE__ */ r.jsxs("ul", { className: j("actions text-medium", t.type), "data-testid": `${t.type}-actions`, children: [
|
|
3876
3876
|
/* @__PURE__ */ r.jsx(
|
|
3877
|
-
|
|
3877
|
+
$s,
|
|
3878
3878
|
{
|
|
3879
3879
|
element: "li",
|
|
3880
|
-
likes:
|
|
3880
|
+
likes: Y,
|
|
3881
3881
|
isShort: !1,
|
|
3882
|
-
userLiked:
|
|
3882
|
+
userLiked: B,
|
|
3883
3883
|
content: { type: t.type, slugs: t.slugs },
|
|
3884
|
-
canLike:
|
|
3884
|
+
canLike: G,
|
|
3885
3885
|
functions: {
|
|
3886
3886
|
createLike: i,
|
|
3887
3887
|
deleteLike: c
|
|
3888
3888
|
}
|
|
3889
3889
|
}
|
|
3890
3890
|
),
|
|
3891
|
-
(["question", "post"].includes(t.type) || f.comments || typeof u == "function") && /* @__PURE__ */ r.jsxs("li", { className: "action-button", onClick: (
|
|
3892
|
-
|
|
3891
|
+
(["question", "post"].includes(t.type) || f.comments || typeof u == "function") && /* @__PURE__ */ r.jsxs("li", { className: "action-button", onClick: (R) => {
|
|
3892
|
+
R.preventDefault(), R.stopPropagation(), f.comments && (window.location.href = f.comments), typeof u == "function" && u();
|
|
3893
3893
|
}, children: [
|
|
3894
3894
|
/* @__PURE__ */ r.jsx(
|
|
3895
|
-
|
|
3895
|
+
W,
|
|
3896
3896
|
{
|
|
3897
3897
|
variant: "tertiary",
|
|
3898
3898
|
size: "medium",
|
|
@@ -3903,29 +3903,29 @@ const pe = "discussion_", Ft = ({
|
|
|
3903
3903
|
className: "gtm-trackable",
|
|
3904
3904
|
"data-gtm-event-context": h,
|
|
3905
3905
|
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
3906
|
-
screenreaderText: v.formatMessage({ id: `${
|
|
3906
|
+
screenreaderText: v.formatMessage({ id: `${xe}comments_screenReader` }, { count: L })
|
|
3907
3907
|
}
|
|
3908
3908
|
),
|
|
3909
|
-
/* @__PURE__ */ r.jsx("span", { children: v.formatMessage({ id: `${
|
|
3909
|
+
/* @__PURE__ */ r.jsx("span", { children: v.formatMessage({ id: `${xe}comments` }, { count: L }) })
|
|
3910
3910
|
] }),
|
|
3911
3911
|
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
3912
|
-
|
|
3912
|
+
W,
|
|
3913
3913
|
{
|
|
3914
3914
|
variant: "tertiary",
|
|
3915
3915
|
size: "medium",
|
|
3916
3916
|
styling: { muted: !0 },
|
|
3917
|
-
onClick:
|
|
3918
|
-
children: v.formatMessage({ id: `${
|
|
3917
|
+
onClick: ie,
|
|
3918
|
+
children: v.formatMessage({ id: `${xe}reply` })
|
|
3919
3919
|
}
|
|
3920
3920
|
) }),
|
|
3921
|
-
/* @__PURE__ */ r.jsx(
|
|
3921
|
+
/* @__PURE__ */ r.jsx(ps, { element: "li", id: `more-${t.slug}`, options: se })
|
|
3922
3922
|
] })
|
|
3923
3923
|
]
|
|
3924
3924
|
}
|
|
3925
3925
|
),
|
|
3926
3926
|
_,
|
|
3927
3927
|
/* @__PURE__ */ r.jsx(
|
|
3928
|
-
|
|
3928
|
+
Dn,
|
|
3929
3929
|
{
|
|
3930
3930
|
id: `delete-${t.slug}-modal`,
|
|
3931
3931
|
isOpen: T,
|
|
@@ -3942,15 +3942,15 @@ const pe = "discussion_", Ft = ({
|
|
|
3942
3942
|
),
|
|
3943
3943
|
buttons: [
|
|
3944
3944
|
{ variant: "secondary", onClick: () => M(!1), children: v.formatMessage({ id: "discussion_delete_cancel" }) },
|
|
3945
|
-
{ variant: "primary", className: "destructive", onClick:
|
|
3945
|
+
{ variant: "primary", className: "destructive", onClick: le, children: v.formatMessage({ id: "discussion_delete_delete" }) }
|
|
3946
3946
|
],
|
|
3947
3947
|
gtmContext: `${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,
|
|
3948
3948
|
children: /* @__PURE__ */ r.jsx(
|
|
3949
|
-
|
|
3949
|
+
we,
|
|
3950
3950
|
{
|
|
3951
3951
|
id: "discussion_delete_text",
|
|
3952
3952
|
values: {
|
|
3953
|
-
p: (
|
|
3953
|
+
p: (R) => /* @__PURE__ */ r.jsx("p", { children: R }),
|
|
3954
3954
|
action: v.formatMessage({
|
|
3955
3955
|
id: `discussion_action_${t.type}`
|
|
3956
3956
|
})
|
|
@@ -3962,32 +3962,32 @@ const pe = "discussion_", Ft = ({
|
|
|
3962
3962
|
] })
|
|
3963
3963
|
});
|
|
3964
3964
|
};
|
|
3965
|
-
const kt = "discussion_responses_",
|
|
3965
|
+
const kt = "discussion_responses_", $o = ({ type: e = "answer", responses: t = 0 }) => {
|
|
3966
3966
|
const n = P();
|
|
3967
3967
|
return /* @__PURE__ */ r.jsxs("div", { className: "responses-heading", children: [
|
|
3968
3968
|
/* @__PURE__ */ r.jsx("h3", { children: n.formatMessage({ id: `${kt}title` }, { action: n.formatMessage({ id: `${kt}${e}` }), count: t }) }),
|
|
3969
|
-
t === 0 && /* @__PURE__ */ r.jsx("p", { children:
|
|
3969
|
+
t === 0 && /* @__PURE__ */ r.jsx("p", { children: he(n.formatMessage, `${kt}empty`, e, e) })
|
|
3970
3970
|
] });
|
|
3971
3971
|
};
|
|
3972
|
-
const
|
|
3973
|
-
const s = P(), o =
|
|
3974
|
-
|
|
3972
|
+
const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
3973
|
+
const s = P(), o = Z(null), [l, d] = D(e), [a, i] = D("closed");
|
|
3974
|
+
z(() => {
|
|
3975
3975
|
const p = o.current;
|
|
3976
3976
|
if (p)
|
|
3977
3977
|
return p.addEventListener("transitionend", c), () => {
|
|
3978
3978
|
p.removeEventListener("transitionend", c);
|
|
3979
3979
|
};
|
|
3980
|
-
}, []),
|
|
3980
|
+
}, []), Ce(() => {
|
|
3981
3981
|
a === "closed" && !l || i(["opening", "open"].includes(a) ? "ready-to-close" : "opening");
|
|
3982
|
-
}, [l]),
|
|
3982
|
+
}, [l]), z(() => {
|
|
3983
3983
|
a === "ready-to-close" && i("closing");
|
|
3984
3984
|
}, [a]);
|
|
3985
3985
|
const c = ({ propertyName: p }) => {
|
|
3986
3986
|
p === "max-height" && i((h) => h === "opening" ? "open" : h === "closing" ? "closed" : h);
|
|
3987
|
-
}, u = ["opening", "open"].includes(a), f =
|
|
3987
|
+
}, u = ["opening", "open"].includes(a), f = gn(n, { element: "li" });
|
|
3988
3988
|
return /* @__PURE__ */ r.jsxs("div", { className: "thread-wrapper", children: [
|
|
3989
3989
|
/* @__PURE__ */ r.jsx(
|
|
3990
|
-
|
|
3990
|
+
W,
|
|
3991
3991
|
{
|
|
3992
3992
|
variant: "secondary",
|
|
3993
3993
|
size: "small",
|
|
@@ -4001,7 +4001,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4001
4001
|
),
|
|
4002
4002
|
/* @__PURE__ */ r.jsx("ul", { ref: o, className: j("thread", a), hidden: !l, children: f })
|
|
4003
4003
|
] });
|
|
4004
|
-
},
|
|
4004
|
+
}, Cs = ({
|
|
4005
4005
|
user: e,
|
|
4006
4006
|
content: t,
|
|
4007
4007
|
verb: n = "post"
|
|
@@ -4022,7 +4022,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4022
4022
|
like: 0
|
|
4023
4023
|
},
|
|
4024
4024
|
verb: n
|
|
4025
|
-
}),
|
|
4025
|
+
}), Ns = ({
|
|
4026
4026
|
queryClient: e,
|
|
4027
4027
|
queryKey: t,
|
|
4028
4028
|
user: n,
|
|
@@ -4030,7 +4030,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4030
4030
|
}) => ({ mutationFn: s, onMutate: async ({ content: a }) => {
|
|
4031
4031
|
if (!n)
|
|
4032
4032
|
return;
|
|
4033
|
-
const i =
|
|
4033
|
+
const i = Cs({ user: n, content: a, verb: "post" });
|
|
4034
4034
|
await e.cancelQueries({ queryKey: t });
|
|
4035
4035
|
const c = e.getQueryData(t);
|
|
4036
4036
|
return e.setQueryData(t, (u) => [...u, i]), { previousActivities: c };
|
|
@@ -4038,7 +4038,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4038
4038
|
e.setQueryData(t, c.previousActivities);
|
|
4039
4039
|
}, onSettled: () => {
|
|
4040
4040
|
e.invalidateQueries({ queryKey: t });
|
|
4041
|
-
} }),
|
|
4041
|
+
} }), As = ({
|
|
4042
4042
|
queryClient: e,
|
|
4043
4043
|
queryKey: t,
|
|
4044
4044
|
mutationFn: n
|
|
@@ -4060,7 +4060,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4060
4060
|
onSettled: () => {
|
|
4061
4061
|
e.invalidateQueries({ queryKey: t });
|
|
4062
4062
|
}
|
|
4063
|
-
}),
|
|
4063
|
+
}), Ds = ({
|
|
4064
4064
|
queryClient: e,
|
|
4065
4065
|
queryKey: t,
|
|
4066
4066
|
mutationFn: n
|
|
@@ -4080,7 +4080,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4080
4080
|
e.invalidateQueries({
|
|
4081
4081
|
queryKey: [...t, c.activityId]
|
|
4082
4082
|
});
|
|
4083
|
-
} }),
|
|
4083
|
+
} }), Ps = ({
|
|
4084
4084
|
queryClient: e,
|
|
4085
4085
|
queryKey: t,
|
|
4086
4086
|
user: n,
|
|
@@ -4112,62 +4112,62 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4112
4112
|
e.invalidateQueries({
|
|
4113
4113
|
queryKey: [...t, u.activityId]
|
|
4114
4114
|
});
|
|
4115
|
-
} }),
|
|
4115
|
+
} }), Mo = ({
|
|
4116
4116
|
basePath: e,
|
|
4117
4117
|
parentId: t,
|
|
4118
4118
|
isMember: n,
|
|
4119
4119
|
functions: { list: s, create: o, edit: l, like: d, unlike: a, join: i, leave: c }
|
|
4120
4120
|
}) => {
|
|
4121
|
-
const u = P(), f = Nt(), p =
|
|
4121
|
+
const u = P(), f = Nt(), p = ye(je), {
|
|
4122
4122
|
data: h,
|
|
4123
4123
|
error: _,
|
|
4124
4124
|
isLoading: v,
|
|
4125
4125
|
isFetching: g
|
|
4126
|
-
} =
|
|
4126
|
+
} = cn({
|
|
4127
4127
|
queryKey: [e, t],
|
|
4128
4128
|
queryFn: s
|
|
4129
|
-
}), E =
|
|
4129
|
+
}), E = Ns({
|
|
4130
4130
|
queryClient: f,
|
|
4131
4131
|
queryKey: [e, t],
|
|
4132
4132
|
user: p,
|
|
4133
4133
|
mutationFn: o
|
|
4134
|
-
}), { mutate: x } =
|
|
4134
|
+
}), { mutate: x } = fe(E), $ = As({
|
|
4135
4135
|
queryClient: f,
|
|
4136
4136
|
queryKey: [e, t],
|
|
4137
4137
|
mutationFn: async (k) => await l(k)
|
|
4138
4138
|
}), {
|
|
4139
4139
|
mutate: T
|
|
4140
|
-
} =
|
|
4140
|
+
} = fe($), M = Ds({
|
|
4141
4141
|
queryClient: f,
|
|
4142
4142
|
queryKey: [e, t],
|
|
4143
4143
|
mutationFn: d
|
|
4144
4144
|
}), {
|
|
4145
4145
|
mutate: Q
|
|
4146
|
-
} =
|
|
4146
|
+
} = fe(M), V = Ps({
|
|
4147
4147
|
queryClient: f,
|
|
4148
4148
|
queryKey: [e, t],
|
|
4149
4149
|
user: p,
|
|
4150
4150
|
mutationFn: async ({ activityId: k }) => {
|
|
4151
|
-
var L, U,
|
|
4152
|
-
const
|
|
4153
|
-
(
|
|
4154
|
-
)),
|
|
4155
|
-
(
|
|
4156
|
-
)) == null ? void 0 :
|
|
4157
|
-
await a({ reactionId:
|
|
4151
|
+
var L, U, G;
|
|
4152
|
+
const Y = h && (h == null ? void 0 : h.find(
|
|
4153
|
+
(K) => K.id === k
|
|
4154
|
+
)), B = (G = (U = (L = Y == null ? void 0 : Y.latest_reactions) == null ? void 0 : L.like) == null ? void 0 : U.find(
|
|
4155
|
+
(K) => K.user_id === (p == null ? void 0 : p.id)
|
|
4156
|
+
)) == null ? void 0 : G.id;
|
|
4157
|
+
await a({ reactionId: B || "", activityId: k });
|
|
4158
4158
|
}
|
|
4159
4159
|
}), {
|
|
4160
4160
|
mutate: w
|
|
4161
|
-
} =
|
|
4161
|
+
} = fe(V), F = Ee(
|
|
4162
4162
|
({ activityId: k }) => Q({ activityId: k }),
|
|
4163
4163
|
[Q]
|
|
4164
|
-
), q =
|
|
4164
|
+
), q = Ee(
|
|
4165
4165
|
({ activityId: k }) => w({ activityId: k }),
|
|
4166
4166
|
[w]
|
|
4167
4167
|
);
|
|
4168
|
-
return _ ? /* @__PURE__ */ r.jsx(
|
|
4168
|
+
return _ ? /* @__PURE__ */ r.jsx(rt, { variant: "error", text: _.message }) : v ? /* @__PURE__ */ r.jsx(be, { style: { height: "400px" } }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4169
4169
|
/* @__PURE__ */ r.jsx(
|
|
4170
|
-
|
|
4170
|
+
Nn,
|
|
4171
4171
|
{
|
|
4172
4172
|
contentType: "post",
|
|
4173
4173
|
createPost: x,
|
|
@@ -4181,26 +4181,28 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4181
4181
|
}
|
|
4182
4182
|
),
|
|
4183
4183
|
!g && Array.isArray(h) && (h == null ? void 0 : h.map((k) => {
|
|
4184
|
-
var
|
|
4184
|
+
var L, U, G, K, ie, le, se, R, ee, oe, ce, te;
|
|
4185
|
+
const Y = ((L = k == null ? void 0 : k.actor) == null ? void 0 : L.id) === (p == null ? void 0 : p.id), B = Ft(n, Y);
|
|
4185
4186
|
return /* @__PURE__ */ r.jsx(
|
|
4186
|
-
|
|
4187
|
+
Rt,
|
|
4187
4188
|
{
|
|
4188
4189
|
content: {
|
|
4189
4190
|
type: "post",
|
|
4190
4191
|
body: k == null ? void 0 : k.content,
|
|
4192
|
+
canLike: B,
|
|
4191
4193
|
createdAt: (k == null ? void 0 : k.time) || "",
|
|
4192
4194
|
slugs: { parentId: t, activityId: k == null ? void 0 : k.id },
|
|
4193
4195
|
slug: k == null ? void 0 : k.id,
|
|
4194
4196
|
author: {
|
|
4195
|
-
id: (
|
|
4196
|
-
name: (
|
|
4197
|
-
organization: (
|
|
4198
|
-
jobTitle: (
|
|
4197
|
+
id: (U = k == null ? void 0 : k.actor) == null ? void 0 : U.id,
|
|
4198
|
+
name: `${(K = (G = k == null ? void 0 : k.actor) == null ? void 0 : G.data) == null ? void 0 : K.name}`,
|
|
4199
|
+
organization: (le = (ie = k == null ? void 0 : k.actor) == null ? void 0 : ie.data) == null ? void 0 : le.organization,
|
|
4200
|
+
jobTitle: (R = (se = k == null ? void 0 : k.actor) == null ? void 0 : se.data) == null ? void 0 : R.jobTitle,
|
|
4199
4201
|
image: {
|
|
4200
|
-
thumbnail: ((
|
|
4202
|
+
thumbnail: ((oe = (ee = k == null ? void 0 : k.actor) == null ? void 0 : ee.data) == null ? void 0 : oe.thumbnail) || void 0
|
|
4201
4203
|
}
|
|
4202
4204
|
},
|
|
4203
|
-
userLiked: ((
|
|
4205
|
+
userLiked: ((ce = k == null ? void 0 : k.own_reactions) == null ? void 0 : ce.like) && ((te = k == null ? void 0 : k.own_reactions) == null ? void 0 : te.like.length) > 0,
|
|
4204
4206
|
likes: (k == null ? void 0 : k.reaction_counts.like) || 0,
|
|
4205
4207
|
comments: (k == null ? void 0 : k.reaction_counts.reply) || 0
|
|
4206
4208
|
},
|
|
@@ -4212,7 +4214,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4212
4214
|
content: {
|
|
4213
4215
|
createContent: () => null,
|
|
4214
4216
|
deleteContent: () => null,
|
|
4215
|
-
updateContent: (
|
|
4217
|
+
updateContent: (ue, me) => T({ activityInfo: ue, content: me })
|
|
4216
4218
|
},
|
|
4217
4219
|
likes: {
|
|
4218
4220
|
createLike: () => {
|
|
@@ -4231,7 +4233,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4231
4233
|
);
|
|
4232
4234
|
}))
|
|
4233
4235
|
] });
|
|
4234
|
-
},
|
|
4236
|
+
}, Fs = ({
|
|
4235
4237
|
queryClient: e,
|
|
4236
4238
|
queryKey: t,
|
|
4237
4239
|
mutationFn: n
|
|
@@ -4250,7 +4252,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4250
4252
|
})), { previousActivity: i };
|
|
4251
4253
|
}, onSettled: () => {
|
|
4252
4254
|
e.invalidateQueries({ queryKey: t });
|
|
4253
|
-
} }),
|
|
4255
|
+
} }), Rs = ({
|
|
4254
4256
|
queryClient: e,
|
|
4255
4257
|
queryKey: t,
|
|
4256
4258
|
mutationFn: n
|
|
@@ -4276,7 +4278,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4276
4278
|
onError: (l, d, a) => {
|
|
4277
4279
|
e.setQueryData(t, a.previousActivity);
|
|
4278
4280
|
}
|
|
4279
|
-
}),
|
|
4281
|
+
}), Os = ({
|
|
4280
4282
|
queryClient: e,
|
|
4281
4283
|
queryKey: t,
|
|
4282
4284
|
mutationFn: n
|
|
@@ -4300,7 +4302,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4300
4302
|
...a,
|
|
4301
4303
|
latest_reactions: { reply: i }
|
|
4302
4304
|
})), { previousActivity: a };
|
|
4303
|
-
} }),
|
|
4305
|
+
} }), Ls = ({
|
|
4304
4306
|
queryClient: e,
|
|
4305
4307
|
queryKey: t,
|
|
4306
4308
|
user: n,
|
|
@@ -4341,39 +4343,39 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4341
4343
|
isMember: o,
|
|
4342
4344
|
functions: { createReply: l, editReply: d, like: a, unlike: i, join: c, leave: u }
|
|
4343
4345
|
}) => {
|
|
4344
|
-
const f = P(), p = Nt(), h =
|
|
4346
|
+
const f = P(), p = Nt(), h = ye(je), _ = Fs({
|
|
4345
4347
|
queryClient: p,
|
|
4346
4348
|
queryKey: [e, t, n],
|
|
4347
4349
|
mutationFn: l
|
|
4348
|
-
}), { mutate: v } =
|
|
4350
|
+
}), { mutate: v } = fe(_), g = Rs({
|
|
4349
4351
|
queryClient: p,
|
|
4350
4352
|
queryKey: [e, t, n],
|
|
4351
4353
|
mutationFn: async (w) => d(w)
|
|
4352
4354
|
}), {
|
|
4353
4355
|
mutate: E
|
|
4354
|
-
} =
|
|
4356
|
+
} = fe(g), x = Os({
|
|
4355
4357
|
queryClient: p,
|
|
4356
4358
|
queryKey: [e, t, n],
|
|
4357
4359
|
mutationFn: a
|
|
4358
4360
|
}), {
|
|
4359
4361
|
mutate: $
|
|
4360
|
-
} =
|
|
4362
|
+
} = fe(x), T = Ls({
|
|
4361
4363
|
queryClient: p,
|
|
4362
4364
|
queryKey: [e, t, n],
|
|
4363
4365
|
user: h,
|
|
4364
4366
|
mutationFn: i
|
|
4365
4367
|
}), {
|
|
4366
4368
|
mutate: M
|
|
4367
|
-
} =
|
|
4369
|
+
} = fe(T), Q = Ee(
|
|
4368
4370
|
({ replyId: w }) => $({ replyId: w }),
|
|
4369
4371
|
[$]
|
|
4370
|
-
),
|
|
4372
|
+
), V = Ee(
|
|
4371
4373
|
({ replyId: w }) => M({ replyId: w }),
|
|
4372
4374
|
[M]
|
|
4373
4375
|
);
|
|
4374
4376
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4375
4377
|
/* @__PURE__ */ r.jsx(
|
|
4376
|
-
|
|
4378
|
+
Nn,
|
|
4377
4379
|
{
|
|
4378
4380
|
contentType: "post",
|
|
4379
4381
|
createPost: v,
|
|
@@ -4387,16 +4389,17 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4387
4389
|
}
|
|
4388
4390
|
),
|
|
4389
4391
|
(s == null ? void 0 : s.length) === 0 || (s == null ? void 0 : s.map((w) => {
|
|
4390
|
-
var
|
|
4391
|
-
const F = ((
|
|
4392
|
-
(
|
|
4393
|
-
));
|
|
4392
|
+
var Y, B, L, U, G, K, ie, le, se, R, ee, oe, ce, te, ue, me, pe;
|
|
4393
|
+
const F = ((Y = w == null ? void 0 : w.latest_children) == null ? void 0 : Y.like) && ((B = w == null ? void 0 : w.latest_children) == null ? void 0 : B.like.filter(
|
|
4394
|
+
(ge) => ge.user_id === (h == null ? void 0 : h.id)
|
|
4395
|
+
)), q = ((L = w == null ? void 0 : w.user) == null ? void 0 : L.id) === (h == null ? void 0 : h.id), k = Ft(o, q);
|
|
4394
4396
|
return /* @__PURE__ */ r.jsx(
|
|
4395
|
-
|
|
4397
|
+
Rt,
|
|
4396
4398
|
{
|
|
4397
4399
|
content: {
|
|
4398
4400
|
type: "post",
|
|
4399
|
-
body: typeof w.data.content == "string" ? (
|
|
4401
|
+
body: typeof w.data.content == "string" ? (U = w == null ? void 0 : w.data) == null ? void 0 : U.content : ((K = (G = w == null ? void 0 : w.data) == null ? void 0 : G.content) == null ? void 0 : K.text) || "",
|
|
4402
|
+
canLike: k,
|
|
4400
4403
|
createdAt: w == null ? void 0 : w.created_at,
|
|
4401
4404
|
slugs: {
|
|
4402
4405
|
question: `${e}/${t}/${n}`,
|
|
@@ -4405,27 +4408,27 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4405
4408
|
},
|
|
4406
4409
|
slug: `${e}/${t}/${n}#${w == null ? void 0 : w.id}`,
|
|
4407
4410
|
author: {
|
|
4408
|
-
id: (
|
|
4409
|
-
name: (
|
|
4410
|
-
organization: (
|
|
4411
|
-
jobTitle: (
|
|
4411
|
+
id: (ie = w == null ? void 0 : w.user) == null ? void 0 : ie.id,
|
|
4412
|
+
name: (se = (le = w == null ? void 0 : w.user) == null ? void 0 : le.data) == null ? void 0 : se.name,
|
|
4413
|
+
organization: (ee = (R = w == null ? void 0 : w.user) == null ? void 0 : R.data) == null ? void 0 : ee.organization,
|
|
4414
|
+
jobTitle: (ce = (oe = w == null ? void 0 : w.user) == null ? void 0 : oe.data) == null ? void 0 : ce.jobTitle,
|
|
4412
4415
|
image: {
|
|
4413
|
-
thumbnail: ((
|
|
4416
|
+
thumbnail: ((ue = (te = w == null ? void 0 : w.user) == null ? void 0 : te.data) == null ? void 0 : ue.thumbnail) || void 0
|
|
4414
4417
|
}
|
|
4415
4418
|
},
|
|
4416
4419
|
userLiked: !!(F != null && F.length),
|
|
4417
|
-
likes: ((
|
|
4418
|
-
comments: ((
|
|
4420
|
+
likes: ((me = w == null ? void 0 : w.children_counts) == null ? void 0 : me.like) || 0,
|
|
4421
|
+
comments: ((pe = w == null ? void 0 : w.children_counts) == null ? void 0 : pe.reply) || 0
|
|
4419
4422
|
},
|
|
4420
4423
|
functions: {
|
|
4421
4424
|
content: {
|
|
4422
4425
|
createContent: () => console.log("create"),
|
|
4423
4426
|
deleteContent: () => console.log("delete"),
|
|
4424
|
-
updateContent: (
|
|
4427
|
+
updateContent: (ge, Se) => E({ replyInfo: ge, content: Se })
|
|
4425
4428
|
},
|
|
4426
4429
|
likes: {
|
|
4427
4430
|
createLike: () => Q({ replyId: w == null ? void 0 : w.id }),
|
|
4428
|
-
deleteLike: () =>
|
|
4431
|
+
deleteLike: () => V({ replyId: w == null ? void 0 : w.id })
|
|
4429
4432
|
},
|
|
4430
4433
|
comments: {
|
|
4431
4434
|
openComments: () => {
|
|
@@ -4437,7 +4440,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4437
4440
|
);
|
|
4438
4441
|
}))
|
|
4439
4442
|
] });
|
|
4440
|
-
},
|
|
4443
|
+
}, Is = ({
|
|
4441
4444
|
queryClient: e,
|
|
4442
4445
|
queryKey: t,
|
|
4443
4446
|
mutationFn: n
|
|
@@ -4461,7 +4464,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4461
4464
|
onSettled: () => {
|
|
4462
4465
|
e.invalidateQueries({ queryKey: t });
|
|
4463
4466
|
}
|
|
4464
|
-
}),
|
|
4467
|
+
}), Hs = ({
|
|
4465
4468
|
queryClient: e,
|
|
4466
4469
|
queryKey: t,
|
|
4467
4470
|
mutationFn: n
|
|
@@ -4481,7 +4484,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4481
4484
|
})), { previousActivity: i };
|
|
4482
4485
|
}, onSettled: () => {
|
|
4483
4486
|
e.invalidateQueries({ queryKey: t });
|
|
4484
|
-
} }),
|
|
4487
|
+
} }), Qs = ({
|
|
4485
4488
|
queryClient: e,
|
|
4486
4489
|
queryKey: t,
|
|
4487
4490
|
user: n,
|
|
@@ -4511,7 +4514,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4511
4514
|
})), { previousActivity: u };
|
|
4512
4515
|
}, onSettled: () => {
|
|
4513
4516
|
e.invalidateQueries({ queryKey: t });
|
|
4514
|
-
} }),
|
|
4517
|
+
} }), Co = ({
|
|
4515
4518
|
basePath: e,
|
|
4516
4519
|
parentId: t,
|
|
4517
4520
|
activityId: n,
|
|
@@ -4529,54 +4532,60 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4529
4532
|
leave: h
|
|
4530
4533
|
}
|
|
4531
4534
|
}) => {
|
|
4532
|
-
var
|
|
4533
|
-
const _ =
|
|
4535
|
+
var L, U, G, K, ie, le, se, R, ee, oe, ce;
|
|
4536
|
+
const _ = ye(je), v = Nt(), {
|
|
4534
4537
|
data: g,
|
|
4535
4538
|
error: E,
|
|
4536
4539
|
isLoading: x,
|
|
4537
4540
|
isFetching: $
|
|
4538
|
-
} =
|
|
4541
|
+
} = cn({
|
|
4539
4542
|
queryKey: [e, t, n],
|
|
4540
4543
|
queryFn: o
|
|
4541
|
-
}), T =
|
|
4544
|
+
}), T = Is({
|
|
4542
4545
|
queryClient: v,
|
|
4543
4546
|
queryKey: [e, t, n],
|
|
4544
|
-
mutationFn: async (
|
|
4547
|
+
mutationFn: async (te) => await l(te)
|
|
4545
4548
|
}), {
|
|
4546
4549
|
mutate: M
|
|
4547
|
-
} =
|
|
4550
|
+
} = fe(T), Q = Hs({
|
|
4548
4551
|
queryClient: v,
|
|
4549
4552
|
queryKey: [e, t, n],
|
|
4550
4553
|
mutationFn: d
|
|
4551
4554
|
}), {
|
|
4552
|
-
mutate:
|
|
4553
|
-
} =
|
|
4555
|
+
mutate: V
|
|
4556
|
+
} = fe(Q), w = Qs({
|
|
4554
4557
|
queryClient: v,
|
|
4555
4558
|
queryKey: [e, t, n],
|
|
4556
4559
|
user: _,
|
|
4557
4560
|
mutationFn: async () => {
|
|
4558
|
-
var
|
|
4559
|
-
const
|
|
4560
|
-
(
|
|
4561
|
-
)) == null ? void 0 :
|
|
4562
|
-
await a({ activityId: n, reactionId:
|
|
4561
|
+
var ue, me, pe;
|
|
4562
|
+
const te = (pe = (me = (ue = g == null ? void 0 : g.latest_reactions) == null ? void 0 : ue.like) == null ? void 0 : me.find(
|
|
4563
|
+
(ge) => ge.user_id === (_ == null ? void 0 : _.id)
|
|
4564
|
+
)) == null ? void 0 : pe.id;
|
|
4565
|
+
await a({ activityId: n, reactionId: te });
|
|
4563
4566
|
},
|
|
4564
4567
|
activity: g
|
|
4565
4568
|
}), {
|
|
4566
4569
|
mutate: F
|
|
4567
|
-
} =
|
|
4568
|
-
({ activityId:
|
|
4569
|
-
[
|
|
4570
|
-
), k =
|
|
4571
|
-
async ({ activityId:
|
|
4570
|
+
} = fe(w), q = Ee(
|
|
4571
|
+
({ activityId: te }) => V({ activityId: te }),
|
|
4572
|
+
[V]
|
|
4573
|
+
), k = Ee(
|
|
4574
|
+
async ({ activityId: te }) => F({ activityId: te }),
|
|
4572
4575
|
[F]
|
|
4573
4576
|
);
|
|
4574
|
-
|
|
4575
|
-
|
|
4577
|
+
if (E)
|
|
4578
|
+
return /* @__PURE__ */ r.jsx(rt, { variant: "error", text: E.message });
|
|
4579
|
+
if (x || $)
|
|
4580
|
+
return /* @__PURE__ */ r.jsx(be, { style: { height: "400px" } });
|
|
4581
|
+
const Y = ((L = g == null ? void 0 : g.actor) == null ? void 0 : L.id) === (_ == null ? void 0 : _.id), B = Ft(s, Y);
|
|
4582
|
+
return /* @__PURE__ */ r.jsx(
|
|
4583
|
+
Rt,
|
|
4576
4584
|
{
|
|
4577
4585
|
content: {
|
|
4578
4586
|
type: "post",
|
|
4579
4587
|
body: g == null ? void 0 : g.content,
|
|
4588
|
+
canLike: B,
|
|
4580
4589
|
createdAt: (g == null ? void 0 : g.time) || "",
|
|
4581
4590
|
slugs: {
|
|
4582
4591
|
question: `${t}/${n}`,
|
|
@@ -4585,24 +4594,24 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4585
4594
|
},
|
|
4586
4595
|
slug: n,
|
|
4587
4596
|
author: {
|
|
4588
|
-
id: (
|
|
4589
|
-
name: (
|
|
4590
|
-
organization: (
|
|
4591
|
-
jobTitle: (
|
|
4597
|
+
id: (U = g == null ? void 0 : g.actor) == null ? void 0 : U.id,
|
|
4598
|
+
name: (G = g == null ? void 0 : g.actor) == null ? void 0 : G.data.name,
|
|
4599
|
+
organization: (K = g == null ? void 0 : g.actor) == null ? void 0 : K.data.organization,
|
|
4600
|
+
jobTitle: (ie = g == null ? void 0 : g.actor) == null ? void 0 : ie.data.jobTitle,
|
|
4592
4601
|
image: {
|
|
4593
|
-
thumbnail: ((
|
|
4602
|
+
thumbnail: ((le = g == null ? void 0 : g.actor) == null ? void 0 : le.data.thumbnail) || void 0
|
|
4594
4603
|
}
|
|
4595
4604
|
},
|
|
4596
|
-
userLiked: ((
|
|
4605
|
+
userLiked: ((se = g == null ? void 0 : g.own_reactions) == null ? void 0 : se.like) && ((R = g == null ? void 0 : g.own_reactions) == null ? void 0 : R.like.length) > 0,
|
|
4597
4606
|
likes: g && (g == null ? void 0 : g.reaction_counts.like),
|
|
4598
4607
|
comments: g && (g == null ? void 0 : g.reaction_counts.reply)
|
|
4599
4608
|
},
|
|
4600
|
-
originalAuthorId: (
|
|
4609
|
+
originalAuthorId: (ee = g == null ? void 0 : g.actor) == null ? void 0 : ee.id,
|
|
4601
4610
|
functions: {
|
|
4602
4611
|
content: {
|
|
4603
4612
|
createContent: () => console.log("create"),
|
|
4604
4613
|
deleteContent: () => console.log("delete"),
|
|
4605
|
-
updateContent: (
|
|
4614
|
+
updateContent: (te, ue) => M({ activityInfo: te, content: ue })
|
|
4606
4615
|
},
|
|
4607
4616
|
likes: {
|
|
4608
4617
|
createLike: () => q({ activityId: n }),
|
|
@@ -4616,7 +4625,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4616
4625
|
children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4617
4626
|
/* @__PURE__ */ r.jsxs("h3", { children: [
|
|
4618
4627
|
"Comments (",
|
|
4619
|
-
((
|
|
4628
|
+
((oe = g == null ? void 0 : g.reaction_counts) == null ? void 0 : oe.reply) || 0,
|
|
4620
4629
|
")"
|
|
4621
4630
|
] }),
|
|
4622
4631
|
/* @__PURE__ */ r.jsx(
|
|
@@ -4625,7 +4634,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4625
4634
|
basePath: e,
|
|
4626
4635
|
parentId: t,
|
|
4627
4636
|
activityId: n,
|
|
4628
|
-
repliesList: (
|
|
4637
|
+
repliesList: (ce = g == null ? void 0 : g.latest_reactions) == null ? void 0 : ce.reply,
|
|
4629
4638
|
isMember: s,
|
|
4630
4639
|
functions: {
|
|
4631
4640
|
createReply: i,
|
|
@@ -4641,7 +4650,7 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4641
4650
|
},
|
|
4642
4651
|
n
|
|
4643
4652
|
);
|
|
4644
|
-
},
|
|
4653
|
+
}, No = ({ id: e, data: { jobTitle: t, name: n, organization: s, thumbnail: o } }) => ({
|
|
4645
4654
|
id: e,
|
|
4646
4655
|
name: n,
|
|
4647
4656
|
jobTitle: t,
|
|
@@ -4650,84 +4659,84 @@ const $o = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4650
4659
|
});
|
|
4651
4660
|
export {
|
|
4652
4661
|
Et as ASSETS_BUCKET,
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4662
|
+
Mo as ActivitiesFeed,
|
|
4663
|
+
Co as ActivitySection,
|
|
4664
|
+
Nn as AddPost,
|
|
4665
|
+
io as BannerSection,
|
|
4666
|
+
ho as Breadcrumbs,
|
|
4667
|
+
W as Button,
|
|
4668
|
+
tt as ButtonWrapper,
|
|
4669
|
+
as as CacheProvider,
|
|
4670
|
+
xn as CollapsibleSection,
|
|
4671
|
+
xo as Columns,
|
|
4672
|
+
po as CommunityDetails,
|
|
4673
|
+
os as Contributors,
|
|
4674
|
+
An as ConversationContext,
|
|
4675
|
+
gs as CookieBanner,
|
|
4676
|
+
Eo as DiscussionConversation,
|
|
4677
|
+
Cn as DiscussionForm,
|
|
4678
|
+
$s as DiscussionLikes,
|
|
4679
|
+
Rt as DiscussionPost,
|
|
4680
|
+
To as DiscussionThread,
|
|
4681
|
+
Le as Divider,
|
|
4682
|
+
oo as DownloadSection,
|
|
4683
|
+
Re as EMAILS,
|
|
4684
|
+
vo as EmailHelperTextBox,
|
|
4685
|
+
rt as EmptyStateBox,
|
|
4686
|
+
go as Filters,
|
|
4687
|
+
cs as FlagsProvider,
|
|
4688
|
+
En as Footer,
|
|
4689
|
+
_n as FullWidthSection,
|
|
4690
|
+
fo as GlobalProviders,
|
|
4691
|
+
Mn as Header,
|
|
4692
|
+
Ur as HelperTextBox,
|
|
4693
|
+
mn as HiddenFromScreenReaders,
|
|
4694
|
+
uo as HideShowTextBox,
|
|
4695
|
+
ke as HighlightedTextBox,
|
|
4696
|
+
us as IntlProvider,
|
|
4697
|
+
bs as InviteForm,
|
|
4698
|
+
So as InviteModal,
|
|
4699
|
+
yn as JoinButton,
|
|
4700
|
+
_o as LanguageSwitcher,
|
|
4701
|
+
nt as Link,
|
|
4702
|
+
fs as LoadMore,
|
|
4703
|
+
mo as LoadingBlock,
|
|
4704
|
+
be as LoadingPlaceholder,
|
|
4705
|
+
ns as LoadingState,
|
|
4706
|
+
jn as Logo,
|
|
4707
|
+
ao as LogoSection,
|
|
4708
|
+
nn as MarkdownText,
|
|
4709
|
+
lo as MarketingBox,
|
|
4701
4710
|
Pt as Member,
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4711
|
+
jo as MembersList,
|
|
4712
|
+
Ts as Modal,
|
|
4713
|
+
ps as MoreMenu,
|
|
4714
|
+
co as NUMBER_OF_USERS,
|
|
4715
|
+
Dn as Overlay,
|
|
4716
|
+
ko as PageLayout,
|
|
4717
|
+
bo as PasswordRules,
|
|
4718
|
+
qr as Pill,
|
|
4710
4719
|
Dt as ProfilePicture,
|
|
4711
|
-
|
|
4712
|
-
|
|
4720
|
+
es as ProgressBar,
|
|
4721
|
+
wo as Rating,
|
|
4713
4722
|
Bs as RepliesFeed,
|
|
4714
|
-
|
|
4723
|
+
$o as ResponsesHeading,
|
|
4715
4724
|
Br as ResponsiveImage,
|
|
4716
|
-
|
|
4717
|
-
|
|
4725
|
+
vs as SearchForm,
|
|
4726
|
+
Zr as Span,
|
|
4718
4727
|
$t as StatusBanner,
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4728
|
+
yo as Tags,
|
|
4729
|
+
Ir as Tooltip,
|
|
4730
|
+
je as UserContext,
|
|
4731
|
+
ds as UserProvider,
|
|
4732
|
+
ne as VisuallyHidden,
|
|
4733
|
+
Ms as addAriaProps,
|
|
4734
|
+
kn as getMember,
|
|
4735
|
+
Xe as headerData,
|
|
4736
|
+
No as mapGetStreamData,
|
|
4737
|
+
jr as useCurrentPath,
|
|
4738
|
+
Ce as useEffectAfterMount,
|
|
4739
|
+
et as useScreenWidth,
|
|
4740
|
+
Sr as useScrollListener,
|
|
4741
|
+
so as useScrollToHash
|
|
4733
4742
|
};
|