@apolitical/component-library 1.18.3 → 1.18.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +12 -12
- package/index.mjs +898 -898
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import F, { memo as
|
|
1
|
+
import F, { memo as De, useState as D, useEffect as G, useRef as ae, useMemo as ht, createContext as Qt, useContext as _e, Children as zt, useCallback as Rn, Fragment as Ue, useReducer as Oa, Suspense as Ba } from "react";
|
|
2
2
|
import Za from "lodash.clonedeep";
|
|
3
3
|
import qa from "lodash.set";
|
|
4
|
-
import { useIntl as A, IntlProvider as Ha, createIntl as Ua, FormattedMessage as
|
|
5
|
-
import
|
|
6
|
-
import { QueryClient as za, QueryClientProvider as Wa, useMutation as fe, useQueryClient as
|
|
4
|
+
import { useIntl as A, IntlProvider as Ha, createIntl as Ua, FormattedMessage as Te } from "react-intl";
|
|
5
|
+
import Ae from "truncate";
|
|
6
|
+
import { QueryClient as za, QueryClientProvider as Wa, useMutation as fe, useQueryClient as Jt, useInfiniteQuery as In, useQuery as Va } from "@tanstack/react-query";
|
|
7
7
|
import { ReactQueryDevtools as Ya } from "@tanstack/react-query-devtools";
|
|
8
|
-
import
|
|
8
|
+
import st from "posthog-js";
|
|
9
9
|
import { CookiesProvider as Ga, useCookies as Ka } from "react-cookie";
|
|
10
|
-
import
|
|
10
|
+
import gt from "markdown-to-jsx";
|
|
11
11
|
import { ReactMultiEmail as Qa } from "react-multi-email";
|
|
12
|
-
import
|
|
12
|
+
import On from "lodash.get";
|
|
13
13
|
import { ErrorBoundary as Ja } from "react-error-boundary";
|
|
14
14
|
import Xa from "react-textarea-autosize";
|
|
15
15
|
import er from "lodash.isequal";
|
|
16
16
|
function tr(e) {
|
|
17
17
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
18
18
|
}
|
|
19
|
-
var
|
|
19
|
+
var Bn = { exports: {} };
|
|
20
20
|
/*!
|
|
21
21
|
Copyright (c) 2018 Jed Watson.
|
|
22
22
|
Licensed under the MIT License (MIT), see
|
|
@@ -51,10 +51,10 @@ var On = { exports: {} };
|
|
|
51
51
|
}
|
|
52
52
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
53
53
|
})();
|
|
54
|
-
})(
|
|
55
|
-
var nr =
|
|
56
|
-
const j = /* @__PURE__ */ tr(nr), ar = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => F.createElement(e, { ...r, className: j("hidden", { "show-on-focus": t }), children: n }), ie =
|
|
57
|
-
var
|
|
54
|
+
})(Bn);
|
|
55
|
+
var nr = Bn.exports;
|
|
56
|
+
const j = /* @__PURE__ */ tr(nr), ar = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => F.createElement(e, { ...r, className: j("hidden", { "show-on-focus": t }), children: n }), ie = De(ar), rr = ({ element: e = "span", children: t = null, ...n }) => F.createElement(e, { ...n, "aria-hidden": !0 }, t), Zn = De(rr);
|
|
57
|
+
var Wt = { exports: {} }, Ie = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
60
60
|
* react-jsx-runtime.production.min.js
|
|
@@ -64,11 +64,11 @@ var Ut = { exports: {} }, Re = {};
|
|
|
64
64
|
* This source code is licensed under the MIT license found in the
|
|
65
65
|
* LICENSE file in the root directory of this source tree.
|
|
66
66
|
*/
|
|
67
|
-
var
|
|
67
|
+
var yn;
|
|
68
68
|
function sr() {
|
|
69
|
-
if (
|
|
70
|
-
return
|
|
71
|
-
|
|
69
|
+
if (yn)
|
|
70
|
+
return Ie;
|
|
71
|
+
yn = 1;
|
|
72
72
|
var e = F, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
73
|
function o(c, m, l) {
|
|
74
74
|
var f, d = {}, p = null, h = null;
|
|
@@ -80,9 +80,9 @@ function sr() {
|
|
|
80
80
|
d[f] === void 0 && (d[f] = m[f]);
|
|
81
81
|
return { $$typeof: t, type: c, key: p, ref: h, props: d, _owner: s.current };
|
|
82
82
|
}
|
|
83
|
-
return
|
|
83
|
+
return Ie.Fragment = n, Ie.jsx = o, Ie.jsxs = o, Ie;
|
|
84
84
|
}
|
|
85
|
-
var
|
|
85
|
+
var Oe = {};
|
|
86
86
|
/**
|
|
87
87
|
* @license React
|
|
88
88
|
* react-jsx-runtime.development.js
|
|
@@ -92,9 +92,9 @@ var Le = {};
|
|
|
92
92
|
* This source code is licensed under the MIT license found in the
|
|
93
93
|
* LICENSE file in the root directory of this source tree.
|
|
94
94
|
*/
|
|
95
|
-
var
|
|
95
|
+
var vn;
|
|
96
96
|
function ir() {
|
|
97
|
-
return
|
|
97
|
+
return vn || (vn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
98
|
var e = F, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), g = Symbol.iterator, y = "@@iterator";
|
|
99
99
|
function k(u) {
|
|
100
100
|
if (u === null || typeof u != "object")
|
|
@@ -114,32 +114,32 @@ function ir() {
|
|
|
114
114
|
{
|
|
115
115
|
var P = b.ReactDebugCurrentFrame, B = P.getStackAddendum();
|
|
116
116
|
B !== "" && (x += "%s", T = T.concat([B]));
|
|
117
|
-
var V = T.map(function(
|
|
118
|
-
return String(
|
|
117
|
+
var V = T.map(function(I) {
|
|
118
|
+
return String(I);
|
|
119
119
|
});
|
|
120
120
|
V.unshift("Warning: " + x), Function.prototype.apply.call(console[u], console, V);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var w = !1,
|
|
123
|
+
var w = !1, E = !1, M = !1, L = !1, O = !1, $;
|
|
124
124
|
$ = Symbol.for("react.module.reference");
|
|
125
|
-
function
|
|
126
|
-
return !!(typeof u == "string" || typeof u == "function" || u === r || u === i ||
|
|
125
|
+
function S(u) {
|
|
126
|
+
return !!(typeof u == "string" || typeof u == "function" || u === r || u === i || O || u === s || u === l || u === f || L || u === h || w || E || M || typeof u == "object" && u !== null && (u.$$typeof === p || u.$$typeof === d || u.$$typeof === o || u.$$typeof === c || u.$$typeof === m || // This needs to include all possible module reference object
|
|
127
127
|
// types supported by any Flight configuration anywhere since
|
|
128
128
|
// we don't know which Flight build this will end up being used
|
|
129
129
|
// with.
|
|
130
130
|
u.$$typeof === $ || u.getModuleId !== void 0));
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function C(u, x, T) {
|
|
133
133
|
var P = u.displayName;
|
|
134
134
|
if (P)
|
|
135
135
|
return P;
|
|
136
136
|
var B = x.displayName || x.name || "";
|
|
137
137
|
return B !== "" ? T + "(" + B + ")" : T;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function U(u) {
|
|
140
140
|
return u.displayName || "Context";
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function H(u) {
|
|
143
143
|
if (u == null)
|
|
144
144
|
return null;
|
|
145
145
|
if (typeof u.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof u == "function")
|
|
@@ -164,19 +164,19 @@ function ir() {
|
|
|
164
164
|
switch (u.$$typeof) {
|
|
165
165
|
case c:
|
|
166
166
|
var x = u;
|
|
167
|
-
return
|
|
167
|
+
return U(x) + ".Consumer";
|
|
168
168
|
case o:
|
|
169
169
|
var T = u;
|
|
170
|
-
return
|
|
170
|
+
return U(T._context) + ".Provider";
|
|
171
171
|
case m:
|
|
172
|
-
return
|
|
172
|
+
return C(u, u.render, "ForwardRef");
|
|
173
173
|
case d:
|
|
174
174
|
var P = u.displayName || null;
|
|
175
|
-
return P !== null ? P :
|
|
175
|
+
return P !== null ? P : H(u.type) || "Memo";
|
|
176
176
|
case p: {
|
|
177
|
-
var B = u, V = B._payload,
|
|
177
|
+
var B = u, V = B._payload, I = B._init;
|
|
178
178
|
try {
|
|
179
|
-
return
|
|
179
|
+
return H(I(V));
|
|
180
180
|
} catch {
|
|
181
181
|
return null;
|
|
182
182
|
}
|
|
@@ -184,14 +184,14 @@ function ir() {
|
|
|
184
184
|
}
|
|
185
185
|
return null;
|
|
186
186
|
}
|
|
187
|
-
var
|
|
187
|
+
var N = Object.assign, Y = 0, ne, ee, Q, re, J, se, de;
|
|
188
188
|
function ce() {
|
|
189
189
|
}
|
|
190
190
|
ce.__reactDisabledLog = !0;
|
|
191
191
|
function W() {
|
|
192
192
|
{
|
|
193
193
|
if (Y === 0) {
|
|
194
|
-
ne = console.log,
|
|
194
|
+
ne = console.log, ee = console.info, Q = console.warn, re = console.error, J = console.group, se = console.groupCollapsed, de = console.groupEnd;
|
|
195
195
|
var u = {
|
|
196
196
|
configurable: !0,
|
|
197
197
|
enumerable: !0,
|
|
@@ -220,25 +220,25 @@ function ir() {
|
|
|
220
220
|
writable: !0
|
|
221
221
|
};
|
|
222
222
|
Object.defineProperties(console, {
|
|
223
|
-
log:
|
|
223
|
+
log: N({}, u, {
|
|
224
224
|
value: ne
|
|
225
225
|
}),
|
|
226
|
-
info:
|
|
227
|
-
value:
|
|
226
|
+
info: N({}, u, {
|
|
227
|
+
value: ee
|
|
228
228
|
}),
|
|
229
|
-
warn:
|
|
230
|
-
value:
|
|
229
|
+
warn: N({}, u, {
|
|
230
|
+
value: Q
|
|
231
231
|
}),
|
|
232
|
-
error:
|
|
232
|
+
error: N({}, u, {
|
|
233
233
|
value: re
|
|
234
234
|
}),
|
|
235
|
-
group:
|
|
236
|
-
value:
|
|
235
|
+
group: N({}, u, {
|
|
236
|
+
value: J
|
|
237
237
|
}),
|
|
238
|
-
groupCollapsed:
|
|
238
|
+
groupCollapsed: N({}, u, {
|
|
239
239
|
value: se
|
|
240
240
|
}),
|
|
241
|
-
groupEnd:
|
|
241
|
+
groupEnd: N({}, u, {
|
|
242
242
|
value: de
|
|
243
243
|
})
|
|
244
244
|
});
|
|
@@ -246,62 +246,62 @@ function ir() {
|
|
|
246
246
|
Y < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
var pe = b.ReactCurrentDispatcher,
|
|
250
|
-
function
|
|
249
|
+
var pe = b.ReactCurrentDispatcher, he;
|
|
250
|
+
function me(u, x, T) {
|
|
251
251
|
{
|
|
252
|
-
if (
|
|
252
|
+
if (he === void 0)
|
|
253
253
|
try {
|
|
254
254
|
throw Error();
|
|
255
255
|
} catch (B) {
|
|
256
256
|
var P = B.stack.trim().match(/\n( *(at )?)/);
|
|
257
|
-
|
|
257
|
+
he = P && P[1] || "";
|
|
258
258
|
}
|
|
259
259
|
return `
|
|
260
|
-
` +
|
|
260
|
+
` + he + u;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
var
|
|
263
|
+
var Z = !1, K;
|
|
264
264
|
{
|
|
265
|
-
var
|
|
266
|
-
|
|
265
|
+
var Se = typeof WeakMap == "function" ? WeakMap : Map;
|
|
266
|
+
K = new Se();
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
if (!u ||
|
|
268
|
+
function je(u, x) {
|
|
269
|
+
if (!u || Z)
|
|
270
270
|
return "";
|
|
271
271
|
{
|
|
272
|
-
var T =
|
|
272
|
+
var T = K.get(u);
|
|
273
273
|
if (T !== void 0)
|
|
274
274
|
return T;
|
|
275
275
|
}
|
|
276
276
|
var P;
|
|
277
|
-
|
|
277
|
+
Z = !0;
|
|
278
278
|
var B = Error.prepareStackTrace;
|
|
279
279
|
Error.prepareStackTrace = void 0;
|
|
280
280
|
var V;
|
|
281
281
|
V = pe.current, pe.current = null, W();
|
|
282
282
|
try {
|
|
283
283
|
if (x) {
|
|
284
|
-
var
|
|
284
|
+
var I = function() {
|
|
285
285
|
throw Error();
|
|
286
286
|
};
|
|
287
|
-
if (Object.defineProperty(
|
|
287
|
+
if (Object.defineProperty(I.prototype, "props", {
|
|
288
288
|
set: function() {
|
|
289
289
|
throw Error();
|
|
290
290
|
}
|
|
291
291
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
292
292
|
try {
|
|
293
|
-
Reflect.construct(
|
|
293
|
+
Reflect.construct(I, []);
|
|
294
294
|
} catch (ve) {
|
|
295
295
|
P = ve;
|
|
296
296
|
}
|
|
297
|
-
Reflect.construct(u, [],
|
|
297
|
+
Reflect.construct(u, [], I);
|
|
298
298
|
} else {
|
|
299
299
|
try {
|
|
300
|
-
|
|
300
|
+
I.call();
|
|
301
301
|
} catch (ve) {
|
|
302
302
|
P = ve;
|
|
303
303
|
}
|
|
304
|
-
u.call(
|
|
304
|
+
u.call(I.prototype);
|
|
305
305
|
}
|
|
306
306
|
} else {
|
|
307
307
|
try {
|
|
@@ -313,94 +313,94 @@ function ir() {
|
|
|
313
313
|
}
|
|
314
314
|
} catch (ve) {
|
|
315
315
|
if (ve && P && typeof ve.stack == "string") {
|
|
316
|
-
for (var
|
|
316
|
+
for (var R = ve.stack.split(`
|
|
317
317
|
`), oe = P.stack.split(`
|
|
318
|
-
`),
|
|
318
|
+
`), X = R.length - 1, te = oe.length - 1; X >= 1 && te >= 0 && R[X] !== oe[te]; )
|
|
319
319
|
te--;
|
|
320
|
-
for (;
|
|
321
|
-
if (
|
|
322
|
-
if (
|
|
320
|
+
for (; X >= 1 && te >= 0; X--, te--)
|
|
321
|
+
if (R[X] !== oe[te]) {
|
|
322
|
+
if (X !== 1 || te !== 1)
|
|
323
323
|
do
|
|
324
|
-
if (
|
|
324
|
+
if (X--, te--, te < 0 || R[X] !== oe[te]) {
|
|
325
325
|
var ge = `
|
|
326
|
-
` +
|
|
327
|
-
return u.displayName && ge.includes("<anonymous>") && (ge = ge.replace("<anonymous>", u.displayName)), typeof u == "function" &&
|
|
326
|
+
` + R[X].replace(" at new ", " at ");
|
|
327
|
+
return u.displayName && ge.includes("<anonymous>") && (ge = ge.replace("<anonymous>", u.displayName)), typeof u == "function" && K.set(u, ge), ge;
|
|
328
328
|
}
|
|
329
|
-
while (
|
|
329
|
+
while (X >= 1 && te >= 0);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
} finally {
|
|
334
|
-
|
|
334
|
+
Z = !1, pe.current = V, ue(), Error.prepareStackTrace = B;
|
|
335
335
|
}
|
|
336
|
-
var
|
|
337
|
-
return typeof u == "function" &&
|
|
336
|
+
var Ne = u ? u.displayName || u.name : "", bn = Ne ? me(Ne) : "";
|
|
337
|
+
return typeof u == "function" && K.set(u, bn), bn;
|
|
338
338
|
}
|
|
339
339
|
function _a(u, x, T) {
|
|
340
|
-
return
|
|
340
|
+
return je(u, !1);
|
|
341
341
|
}
|
|
342
342
|
function ba(u) {
|
|
343
343
|
var x = u.prototype;
|
|
344
344
|
return !!(x && x.isReactComponent);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function Ye(u, x, T) {
|
|
347
347
|
if (u == null)
|
|
348
348
|
return "";
|
|
349
349
|
if (typeof u == "function")
|
|
350
|
-
return
|
|
350
|
+
return je(u, ba(u));
|
|
351
351
|
if (typeof u == "string")
|
|
352
|
-
return
|
|
352
|
+
return me(u);
|
|
353
353
|
switch (u) {
|
|
354
354
|
case l:
|
|
355
|
-
return
|
|
355
|
+
return me("Suspense");
|
|
356
356
|
case f:
|
|
357
|
-
return
|
|
357
|
+
return me("SuspenseList");
|
|
358
358
|
}
|
|
359
359
|
if (typeof u == "object")
|
|
360
360
|
switch (u.$$typeof) {
|
|
361
361
|
case m:
|
|
362
362
|
return _a(u.render);
|
|
363
363
|
case d:
|
|
364
|
-
return
|
|
364
|
+
return Ye(u.type, x, T);
|
|
365
365
|
case p: {
|
|
366
366
|
var P = u, B = P._payload, V = P._init;
|
|
367
367
|
try {
|
|
368
|
-
return
|
|
368
|
+
return Ye(V(B), x, T);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
return "";
|
|
374
374
|
}
|
|
375
|
-
var
|
|
376
|
-
function
|
|
375
|
+
var Ge = Object.prototype.hasOwnProperty, sn = {}, on = b.ReactDebugCurrentFrame;
|
|
376
|
+
function Ke(u) {
|
|
377
377
|
if (u) {
|
|
378
|
-
var x = u._owner, T =
|
|
379
|
-
|
|
378
|
+
var x = u._owner, T = Ye(u.type, u._source, x ? x.type : null);
|
|
379
|
+
on.setExtraStackFrame(T);
|
|
380
380
|
} else
|
|
381
|
-
|
|
381
|
+
on.setExtraStackFrame(null);
|
|
382
382
|
}
|
|
383
383
|
function ya(u, x, T, P, B) {
|
|
384
384
|
{
|
|
385
|
-
var V = Function.call.bind(
|
|
386
|
-
for (var
|
|
387
|
-
if (V(u,
|
|
388
|
-
var
|
|
385
|
+
var V = Function.call.bind(Ge);
|
|
386
|
+
for (var I in u)
|
|
387
|
+
if (V(u, I)) {
|
|
388
|
+
var R = void 0;
|
|
389
389
|
try {
|
|
390
|
-
if (typeof u[
|
|
391
|
-
var oe = Error((P || "React class") + ": " + T + " type `" +
|
|
390
|
+
if (typeof u[I] != "function") {
|
|
391
|
+
var oe = Error((P || "React class") + ": " + T + " type `" + I + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof u[I] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
392
392
|
throw oe.name = "Invariant Violation", oe;
|
|
393
393
|
}
|
|
394
|
-
|
|
395
|
-
} catch (
|
|
396
|
-
|
|
394
|
+
R = u[I](x, I, P, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
|
+
} catch (X) {
|
|
396
|
+
R = X;
|
|
397
397
|
}
|
|
398
|
-
|
|
398
|
+
R && !(R instanceof Error) && (Ke(B), _("%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).", P || "React class", T, I, typeof R), Ke(null)), R instanceof Error && !(R.message in sn) && (sn[R.message] = !0, Ke(B), _("Failed %s type: %s", T, R.message), Ke(null));
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
var va = Array.isArray;
|
|
403
|
-
function
|
|
403
|
+
function Tt(u) {
|
|
404
404
|
return va(u);
|
|
405
405
|
}
|
|
406
406
|
function xa(u) {
|
|
@@ -411,27 +411,27 @@ function ir() {
|
|
|
411
411
|
}
|
|
412
412
|
function ka(u) {
|
|
413
413
|
try {
|
|
414
|
-
return
|
|
414
|
+
return cn(u), !1;
|
|
415
415
|
} catch {
|
|
416
416
|
return !0;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function cn(u) {
|
|
420
420
|
return "" + u;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function ln(u) {
|
|
423
423
|
if (ka(u))
|
|
424
|
-
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", xa(u)),
|
|
424
|
+
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", xa(u)), cn(u);
|
|
425
425
|
}
|
|
426
|
-
var
|
|
426
|
+
var Re = b.ReactCurrentOwner, wa = {
|
|
427
427
|
key: !0,
|
|
428
428
|
ref: !0,
|
|
429
429
|
__self: !0,
|
|
430
430
|
__source: !0
|
|
431
|
-
},
|
|
432
|
-
|
|
431
|
+
}, dn, un, $t;
|
|
432
|
+
$t = {};
|
|
433
433
|
function ja(u) {
|
|
434
|
-
if (
|
|
434
|
+
if (Ge.call(u, "ref")) {
|
|
435
435
|
var x = Object.getOwnPropertyDescriptor(u, "ref").get;
|
|
436
436
|
if (x && x.isReactWarning)
|
|
437
437
|
return !1;
|
|
@@ -439,7 +439,7 @@ function ir() {
|
|
|
439
439
|
return u.ref !== void 0;
|
|
440
440
|
}
|
|
441
441
|
function Ta(u) {
|
|
442
|
-
if (
|
|
442
|
+
if (Ge.call(u, "key")) {
|
|
443
443
|
var x = Object.getOwnPropertyDescriptor(u, "key").get;
|
|
444
444
|
if (x && x.isReactWarning)
|
|
445
445
|
return !1;
|
|
@@ -447,15 +447,15 @@ function ir() {
|
|
|
447
447
|
return u.key !== void 0;
|
|
448
448
|
}
|
|
449
449
|
function $a(u, x) {
|
|
450
|
-
if (typeof u.ref == "string" &&
|
|
451
|
-
var T =
|
|
452
|
-
|
|
450
|
+
if (typeof u.ref == "string" && Re.current && x && Re.current.stateNode !== x) {
|
|
451
|
+
var T = H(Re.current.type);
|
|
452
|
+
$t[T] || (_('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', H(Re.current.type), u.ref), $t[T] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
function Ea(u, x) {
|
|
456
456
|
{
|
|
457
457
|
var T = function() {
|
|
458
|
-
|
|
458
|
+
dn || (dn = !0, _("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
|
|
459
459
|
};
|
|
460
460
|
T.isReactWarning = !0, Object.defineProperty(u, "key", {
|
|
461
461
|
get: T,
|
|
@@ -466,7 +466,7 @@ function ir() {
|
|
|
466
466
|
function Ca(u, x) {
|
|
467
467
|
{
|
|
468
468
|
var T = function() {
|
|
469
|
-
|
|
469
|
+
un || (un = !0, _("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", x));
|
|
470
470
|
};
|
|
471
471
|
T.isReactWarning = !0, Object.defineProperty(u, "ref", {
|
|
472
472
|
get: T,
|
|
@@ -474,70 +474,70 @@ function ir() {
|
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var Sa = function(u, x, T, P, B, V,
|
|
478
|
-
var
|
|
477
|
+
var Sa = function(u, x, T, P, B, V, I) {
|
|
478
|
+
var R = {
|
|
479
479
|
// This tag allows us to uniquely identify this as a React Element
|
|
480
480
|
$$typeof: t,
|
|
481
481
|
// Built-in properties that belong on the element
|
|
482
482
|
type: u,
|
|
483
483
|
key: x,
|
|
484
484
|
ref: T,
|
|
485
|
-
props:
|
|
485
|
+
props: I,
|
|
486
486
|
// Record the component responsible for creating this element.
|
|
487
487
|
_owner: V
|
|
488
488
|
};
|
|
489
|
-
return
|
|
489
|
+
return R._store = {}, Object.defineProperty(R._store, "validated", {
|
|
490
490
|
configurable: !1,
|
|
491
491
|
enumerable: !1,
|
|
492
492
|
writable: !0,
|
|
493
493
|
value: !1
|
|
494
|
-
}), Object.defineProperty(
|
|
494
|
+
}), Object.defineProperty(R, "_self", {
|
|
495
495
|
configurable: !1,
|
|
496
496
|
enumerable: !1,
|
|
497
497
|
writable: !1,
|
|
498
498
|
value: P
|
|
499
|
-
}), Object.defineProperty(
|
|
499
|
+
}), Object.defineProperty(R, "_source", {
|
|
500
500
|
configurable: !1,
|
|
501
501
|
enumerable: !1,
|
|
502
502
|
writable: !1,
|
|
503
503
|
value: B
|
|
504
|
-
}), Object.freeze && (Object.freeze(
|
|
504
|
+
}), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
|
|
505
505
|
};
|
|
506
506
|
function Ma(u, x, T, P, B) {
|
|
507
507
|
{
|
|
508
|
-
var V,
|
|
509
|
-
T !== void 0 && (
|
|
508
|
+
var V, I = {}, R = null, oe = null;
|
|
509
|
+
T !== void 0 && (ln(T), R = "" + T), Ta(x) && (ln(x.key), R = "" + x.key), ja(x) && (oe = x.ref, $a(x, B));
|
|
510
510
|
for (V in x)
|
|
511
|
-
|
|
511
|
+
Ge.call(x, V) && !wa.hasOwnProperty(V) && (I[V] = x[V]);
|
|
512
512
|
if (u && u.defaultProps) {
|
|
513
|
-
var
|
|
514
|
-
for (V in
|
|
515
|
-
|
|
513
|
+
var X = u.defaultProps;
|
|
514
|
+
for (V in X)
|
|
515
|
+
I[V] === void 0 && (I[V] = X[V]);
|
|
516
516
|
}
|
|
517
|
-
if (
|
|
517
|
+
if (R || oe) {
|
|
518
518
|
var te = typeof u == "function" ? u.displayName || u.name || "Unknown" : u;
|
|
519
|
-
|
|
519
|
+
R && Ea(I, te), oe && Ca(I, te);
|
|
520
520
|
}
|
|
521
|
-
return Sa(u,
|
|
521
|
+
return Sa(u, R, oe, B, P, Re.current, I);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
var
|
|
525
|
-
function
|
|
524
|
+
var Et = b.ReactCurrentOwner, mn = b.ReactDebugCurrentFrame;
|
|
525
|
+
function Me(u) {
|
|
526
526
|
if (u) {
|
|
527
|
-
var x = u._owner, T =
|
|
528
|
-
|
|
527
|
+
var x = u._owner, T = Ye(u.type, u._source, x ? x.type : null);
|
|
528
|
+
mn.setExtraStackFrame(T);
|
|
529
529
|
} else
|
|
530
|
-
|
|
530
|
+
mn.setExtraStackFrame(null);
|
|
531
531
|
}
|
|
532
|
-
var
|
|
533
|
-
|
|
534
|
-
function
|
|
532
|
+
var Ct;
|
|
533
|
+
Ct = !1;
|
|
534
|
+
function St(u) {
|
|
535
535
|
return typeof u == "object" && u !== null && u.$$typeof === t;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function fn() {
|
|
538
538
|
{
|
|
539
|
-
if (
|
|
540
|
-
var u =
|
|
539
|
+
if (Et.current) {
|
|
540
|
+
var u = H(Et.current.type);
|
|
541
541
|
if (u)
|
|
542
542
|
return `
|
|
543
543
|
|
|
@@ -557,10 +557,10 @@ Check your code at ` + x + ":" + T + ".";
|
|
|
557
557
|
return "";
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
var
|
|
560
|
+
var pn = {};
|
|
561
561
|
function Pa(u) {
|
|
562
562
|
{
|
|
563
|
-
var x =
|
|
563
|
+
var x = fn();
|
|
564
564
|
if (!x) {
|
|
565
565
|
var T = typeof u == "string" ? u : u.displayName || u.name;
|
|
566
566
|
T && (x = `
|
|
@@ -570,35 +570,35 @@ Check the top-level render call using <` + T + ">.");
|
|
|
570
570
|
return x;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function hn(u, x) {
|
|
574
574
|
{
|
|
575
575
|
if (!u._store || u._store.validated || u.key != null)
|
|
576
576
|
return;
|
|
577
577
|
u._store.validated = !0;
|
|
578
578
|
var T = Pa(x);
|
|
579
|
-
if (
|
|
579
|
+
if (pn[T])
|
|
580
580
|
return;
|
|
581
|
-
|
|
581
|
+
pn[T] = !0;
|
|
582
582
|
var P = "";
|
|
583
|
-
u && u._owner && u._owner !==
|
|
583
|
+
u && u._owner && u._owner !== Et.current && (P = " It was passed a child from " + H(u._owner.type) + "."), Me(u), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, P), Me(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function gn(u, x) {
|
|
587
587
|
{
|
|
588
588
|
if (typeof u != "object")
|
|
589
589
|
return;
|
|
590
|
-
if (
|
|
590
|
+
if (Tt(u))
|
|
591
591
|
for (var T = 0; T < u.length; T++) {
|
|
592
592
|
var P = u[T];
|
|
593
|
-
|
|
593
|
+
St(P) && hn(P, x);
|
|
594
594
|
}
|
|
595
|
-
else if (
|
|
595
|
+
else if (St(u))
|
|
596
596
|
u._store && (u._store.validated = !0);
|
|
597
597
|
else if (u) {
|
|
598
598
|
var B = k(u);
|
|
599
599
|
if (typeof B == "function" && B !== u.entries)
|
|
600
|
-
for (var V = B.call(u),
|
|
601
|
-
|
|
600
|
+
for (var V = B.call(u), I; !(I = V.next()).done; )
|
|
601
|
+
St(I.value) && hn(I.value, x);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
@@ -617,11 +617,11 @@ Check the top-level render call using <` + T + ">.");
|
|
|
617
617
|
else
|
|
618
618
|
return;
|
|
619
619
|
if (T) {
|
|
620
|
-
var P =
|
|
620
|
+
var P = H(x);
|
|
621
621
|
ya(T, u.props, "prop", P, u);
|
|
622
|
-
} else if (x.PropTypes !== void 0 &&
|
|
623
|
-
|
|
624
|
-
var B =
|
|
622
|
+
} else if (x.PropTypes !== void 0 && !Ct) {
|
|
623
|
+
Ct = !0;
|
|
624
|
+
var B = H(x);
|
|
625
625
|
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", B || "Unknown");
|
|
626
626
|
}
|
|
627
627
|
typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -632,64 +632,64 @@ Check the top-level render call using <` + T + ">.");
|
|
|
632
632
|
for (var x = Object.keys(u.props), T = 0; T < x.length; T++) {
|
|
633
633
|
var P = x[T];
|
|
634
634
|
if (P !== "children" && P !== "key") {
|
|
635
|
-
|
|
635
|
+
Me(u), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", P), Me(null);
|
|
636
636
|
break;
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
u.ref !== null && (
|
|
639
|
+
u.ref !== null && (Me(u), _("Invalid attribute `ref` supplied to `React.Fragment`."), Me(null));
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function _n(u, x, T, P, B, V) {
|
|
643
643
|
{
|
|
644
|
-
var
|
|
645
|
-
if (!
|
|
646
|
-
var
|
|
647
|
-
(u === void 0 || typeof u == "object" && u !== null && Object.keys(u).length === 0) && (
|
|
644
|
+
var I = S(u);
|
|
645
|
+
if (!I) {
|
|
646
|
+
var R = "";
|
|
647
|
+
(u === void 0 || typeof u == "object" && u !== null && Object.keys(u).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
648
648
|
var oe = Na(B);
|
|
649
|
-
oe ?
|
|
650
|
-
var
|
|
651
|
-
u === null ?
|
|
649
|
+
oe ? R += oe : R += fn();
|
|
650
|
+
var X;
|
|
651
|
+
u === null ? X = "null" : Tt(u) ? X = "array" : u !== void 0 && u.$$typeof === t ? (X = "<" + (H(u.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : X = typeof u, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", X, R);
|
|
652
652
|
}
|
|
653
653
|
var te = Ma(u, x, T, B, V);
|
|
654
654
|
if (te == null)
|
|
655
655
|
return te;
|
|
656
|
-
if (
|
|
656
|
+
if (I) {
|
|
657
657
|
var ge = x.children;
|
|
658
658
|
if (ge !== void 0)
|
|
659
659
|
if (P)
|
|
660
|
-
if (
|
|
661
|
-
for (var
|
|
662
|
-
|
|
660
|
+
if (Tt(ge)) {
|
|
661
|
+
for (var Ne = 0; Ne < ge.length; Ne++)
|
|
662
|
+
gn(ge[Ne], u);
|
|
663
663
|
Object.freeze && Object.freeze(ge);
|
|
664
664
|
} else
|
|
665
665
|
_("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
|
+
gn(ge, u);
|
|
668
668
|
}
|
|
669
669
|
return u === r ? Fa(te) : Aa(te), te;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
function
|
|
673
|
-
return
|
|
672
|
+
function La(u, x, T) {
|
|
673
|
+
return _n(u, x, T, !0);
|
|
674
674
|
}
|
|
675
|
-
function
|
|
676
|
-
return
|
|
675
|
+
function Da(u, x, T) {
|
|
676
|
+
return _n(u, x, T, !1);
|
|
677
677
|
}
|
|
678
|
-
var
|
|
679
|
-
|
|
680
|
-
}()),
|
|
678
|
+
var Ra = Da, Ia = La;
|
|
679
|
+
Oe.Fragment = r, Oe.jsx = Ra, Oe.jsxs = Ia;
|
|
680
|
+
}()), Oe;
|
|
681
681
|
}
|
|
682
|
-
process.env.NODE_ENV === "production" ?
|
|
683
|
-
var a =
|
|
682
|
+
process.env.NODE_ENV === "production" ? Wt.exports = sr() : Wt.exports = ir();
|
|
683
|
+
var a = Wt.exports;
|
|
684
684
|
const or = () => {
|
|
685
|
-
const [e, t] =
|
|
685
|
+
const [e, t] = D(window.location.pathname), n = () => {
|
|
686
686
|
const r = window.location.pathname;
|
|
687
687
|
t(r);
|
|
688
688
|
};
|
|
689
689
|
return G(() => (window.addEventListener("popstate", n), () => {
|
|
690
690
|
window.removeEventListener("popstate", n);
|
|
691
691
|
}), []), e;
|
|
692
|
-
},
|
|
692
|
+
}, Fe = (e, t) => {
|
|
693
693
|
const n = ae(!1);
|
|
694
694
|
G(() => {
|
|
695
695
|
n.current ? e() : n.current = !0;
|
|
@@ -708,37 +708,37 @@ function cr(e, t, n) {
|
|
|
708
708
|
d.current = !1;
|
|
709
709
|
};
|
|
710
710
|
}, []);
|
|
711
|
-
var v =
|
|
712
|
-
var w = function(
|
|
713
|
-
var
|
|
714
|
-
return c.current = m.current = null, i.current =
|
|
715
|
-
},
|
|
716
|
-
h && cancelAnimationFrame(o.current), o.current = h ? requestAnimationFrame(
|
|
717
|
-
}, M = function(
|
|
711
|
+
var v = ht(function() {
|
|
712
|
+
var w = function(S) {
|
|
713
|
+
var C = c.current, U = m.current;
|
|
714
|
+
return c.current = m.current = null, i.current = S, l.current = f.current.apply(U, C);
|
|
715
|
+
}, E = function(S, C) {
|
|
716
|
+
h && cancelAnimationFrame(o.current), o.current = h ? requestAnimationFrame(S) : setTimeout(S, C);
|
|
717
|
+
}, M = function(S) {
|
|
718
718
|
if (!d.current)
|
|
719
719
|
return !1;
|
|
720
|
-
var
|
|
721
|
-
return !s.current ||
|
|
722
|
-
},
|
|
723
|
-
return o.current = null, y && c.current ? w(
|
|
724
|
-
},
|
|
725
|
-
var
|
|
726
|
-
if (M(
|
|
727
|
-
return
|
|
720
|
+
var C = S - s.current;
|
|
721
|
+
return !s.current || C >= t || C < 0 || k && S - i.current >= _;
|
|
722
|
+
}, L = function(S) {
|
|
723
|
+
return o.current = null, y && c.current ? w(S) : (c.current = m.current = null, l.current);
|
|
724
|
+
}, O = function S() {
|
|
725
|
+
var C = Date.now();
|
|
726
|
+
if (M(C))
|
|
727
|
+
return L(C);
|
|
728
728
|
if (d.current) {
|
|
729
|
-
var
|
|
730
|
-
S
|
|
729
|
+
var U = t - (C - s.current), H = k ? Math.min(U, _ - (C - i.current)) : U;
|
|
730
|
+
E(S, H);
|
|
731
731
|
}
|
|
732
732
|
}, $ = function() {
|
|
733
733
|
if (p || b) {
|
|
734
|
-
var
|
|
735
|
-
if (c.current = [].slice.call(arguments), m.current = r, s.current =
|
|
734
|
+
var S = Date.now(), C = M(S);
|
|
735
|
+
if (c.current = [].slice.call(arguments), m.current = r, s.current = S, C) {
|
|
736
736
|
if (!o.current && d.current)
|
|
737
|
-
return i.current = s.current,
|
|
737
|
+
return i.current = s.current, E(O, t), g ? w(s.current) : l.current;
|
|
738
738
|
if (k)
|
|
739
|
-
return
|
|
739
|
+
return E(O, t), w(s.current);
|
|
740
740
|
}
|
|
741
|
-
return o.current ||
|
|
741
|
+
return o.current || E(O, t), l.current;
|
|
742
742
|
}
|
|
743
743
|
};
|
|
744
744
|
return $.cancel = function() {
|
|
@@ -746,32 +746,32 @@ function cr(e, t, n) {
|
|
|
746
746
|
}, $.isPending = function() {
|
|
747
747
|
return !!o.current;
|
|
748
748
|
}, $.flush = function() {
|
|
749
|
-
return o.current ?
|
|
749
|
+
return o.current ? L(Date.now()) : l.current;
|
|
750
750
|
}, $;
|
|
751
751
|
}, [g, k, t, _, y, h, p, b]);
|
|
752
752
|
return v;
|
|
753
753
|
}
|
|
754
|
-
function
|
|
754
|
+
function qn(e, t, n) {
|
|
755
755
|
var r = n === void 0 ? {} : n, s = r.leading, i = r.trailing;
|
|
756
756
|
return cr(e, t, { maxWait: t, leading: s === void 0 || s, trailing: i === void 0 || i });
|
|
757
757
|
}
|
|
758
|
-
let
|
|
759
|
-
const
|
|
758
|
+
let Mt;
|
|
759
|
+
const We = (e = !0, t = !1, n = "window") => {
|
|
760
760
|
if (!e)
|
|
761
761
|
return;
|
|
762
762
|
const [r, s] = F.useState(0) || [!1, () => {
|
|
763
763
|
}];
|
|
764
764
|
G(() => (c(), window.addEventListener("resize", m), () => {
|
|
765
|
-
clearTimeout(
|
|
765
|
+
clearTimeout(Mt), m.flush(), window.removeEventListener("resize", m);
|
|
766
766
|
}), n === "window" ? [] : [n]);
|
|
767
767
|
const o = () => {
|
|
768
768
|
if (n)
|
|
769
769
|
return n === "window" ? window.innerWidth : n.offsetWidth;
|
|
770
770
|
}, c = () => {
|
|
771
771
|
s(o());
|
|
772
|
-
}, m =
|
|
772
|
+
}, m = qn(
|
|
773
773
|
() => {
|
|
774
|
-
o() !== r && (t && (clearTimeout(
|
|
774
|
+
o() !== r && (t && (clearTimeout(Mt), document.body.classList.add("is-resizing"), Mt = setTimeout(() => {
|
|
775
775
|
document.body.classList.remove("is-resizing");
|
|
776
776
|
}, 550)), c());
|
|
777
777
|
},
|
|
@@ -803,14 +803,14 @@ const Ue = (e = !0, t = !1, n = "window") => {
|
|
|
803
803
|
return;
|
|
804
804
|
}
|
|
805
805
|
Math.abs(p) >= t.up && !o.scrollUp && (r(), c({ scrollUp: !0, scrollDown: !1 }));
|
|
806
|
-
}, l =
|
|
806
|
+
}, l = qn(() => {
|
|
807
807
|
m();
|
|
808
808
|
}, 250);
|
|
809
809
|
return s;
|
|
810
810
|
}, dr = (e = [], t = !0) => {
|
|
811
811
|
e = Array.isArray(e) ? e : [e];
|
|
812
812
|
const n = ae(!1);
|
|
813
|
-
|
|
813
|
+
Fe(() => {
|
|
814
814
|
if (window && window.location && window.location.hash) {
|
|
815
815
|
if (n.current)
|
|
816
816
|
return;
|
|
@@ -818,13 +818,13 @@ const Ue = (e = !0, t = !1, n = "window") => {
|
|
|
818
818
|
r && (r.scrollIntoView(t ? { behavior: "smooth" } : null), n.current = !0);
|
|
819
819
|
}
|
|
820
820
|
}, e);
|
|
821
|
-
},
|
|
821
|
+
}, Hn = (e) => {
|
|
822
822
|
const t = [];
|
|
823
823
|
return e.forEach((n) => {
|
|
824
824
|
const r = parseInt(n);
|
|
825
825
|
isNaN(r) || t.push(r);
|
|
826
826
|
}), t.sort((n, r) => n - r);
|
|
827
|
-
},
|
|
827
|
+
}, Un = (e, t, n) => {
|
|
828
828
|
let r = n.mobile;
|
|
829
829
|
for (const s in t) {
|
|
830
830
|
const i = parseInt(String(t[s]));
|
|
@@ -834,14 +834,14 @@ const Ue = (e = !0, t = !1, n = "window") => {
|
|
|
834
834
|
break;
|
|
835
835
|
}
|
|
836
836
|
return r;
|
|
837
|
-
}, ur = (e) => e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`), mr = (e, t = "en") => new Date(e).toLocaleString(t, { day: "numeric", month: "short" }),
|
|
837
|
+
}, ur = (e) => e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`), mr = (e, t = "en") => new Date(e).toLocaleString(t, { day: "numeric", month: "short" }), zn = (e, t = "en") => new Date(e).toLocaleString(t, {
|
|
838
838
|
weekday: "long",
|
|
839
839
|
day: "numeric",
|
|
840
840
|
month: "short",
|
|
841
841
|
year: "numeric"
|
|
842
|
-
}),
|
|
842
|
+
}), Vt = (e) => {
|
|
843
843
|
let i;
|
|
844
|
-
const o =
|
|
844
|
+
const o = xn(), c = xn(new Date(e));
|
|
845
845
|
try {
|
|
846
846
|
i = o.getTime() - c.getTime();
|
|
847
847
|
} catch {
|
|
@@ -854,10 +854,10 @@ const Ue = (e = !0, t = !1, n = "window") => {
|
|
|
854
854
|
return { path: "days", number: l };
|
|
855
855
|
const f = Math.floor(l / 7);
|
|
856
856
|
return f <= 52 ? { path: "weeks", number: f } : { path: "years", number: Math.floor(l / 365) };
|
|
857
|
-
},
|
|
857
|
+
}, xn = (e) => {
|
|
858
858
|
const n = (e || /* @__PURE__ */ new Date()).toUTCString();
|
|
859
859
|
return new Date(n);
|
|
860
|
-
},
|
|
860
|
+
}, Xt = {
|
|
861
861
|
apolitical: "Apolitical",
|
|
862
862
|
breadcrumbs_label: "Go back to:",
|
|
863
863
|
breadcrumbs_currentPage: "Current page:",
|
|
@@ -1195,13 +1195,13 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1195
1195
|
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>"
|
|
1196
1196
|
}, gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1197
1197
|
__proto__: null,
|
|
1198
|
-
en:
|
|
1198
|
+
en: Xt,
|
|
1199
1199
|
es: fr,
|
|
1200
1200
|
fr: pr,
|
|
1201
1201
|
pt: hr
|
|
1202
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1202
|
+
}, Symbol.toStringTag, { value: "Module" })), Wn = (e) => e in Xt, ye = (e, t, n, r, s = {}) => {
|
|
1203
1203
|
let i = "";
|
|
1204
|
-
return
|
|
1204
|
+
return Wn(`${t}_${n}`) ? i = e({ id: `${t}_${n}` }, s) : i = e({ id: t }, { [r]: n, ...s }), i;
|
|
1205
1205
|
}, _r = (e, t, n) => {
|
|
1206
1206
|
if (!e || e === 0)
|
|
1207
1207
|
return "0";
|
|
@@ -1227,9 +1227,9 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1227
1227
|
return t.forEach(({ type: r, value: s }) => {
|
|
1228
1228
|
qa(n, r, s);
|
|
1229
1229
|
}), n;
|
|
1230
|
-
}, xr = (e) => new Promise((t) => setTimeout(t, e)),
|
|
1230
|
+
}, xr = (e) => new Promise((t) => setTimeout(t, e)), it = (e, t) => F.Children.map(e, (n) => F.cloneElement(n, {
|
|
1231
1231
|
...t
|
|
1232
|
-
})),
|
|
1232
|
+
})), q = ({
|
|
1233
1233
|
variant: e = "primary",
|
|
1234
1234
|
size: t = "medium",
|
|
1235
1235
|
styling: n = { muted: !1, fullWidth: !1 },
|
|
@@ -1243,10 +1243,10 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1243
1243
|
children: f = !1,
|
|
1244
1244
|
...d
|
|
1245
1245
|
}) => {
|
|
1246
|
-
const h =
|
|
1246
|
+
const h = We(typeof t == "object");
|
|
1247
1247
|
if (typeof t == "object" && typeof h == "number") {
|
|
1248
|
-
const k = Object.assign({}, t), b =
|
|
1249
|
-
t =
|
|
1248
|
+
const k = Object.assign({}, t), b = Hn(Object.keys(k));
|
|
1249
|
+
t = Un(h, b, k);
|
|
1250
1250
|
}
|
|
1251
1251
|
const g = [];
|
|
1252
1252
|
typeof t == "string" && g.push(t), r && (g.push("icon"), typeof r == "object" ? (g.push(r.icon), r.position ? g.push(r.position) : g.push("left"), r.hover && g.push(`hover_${r.hover}`), r.animate && (g.push("animate"), typeof r.animate == "string" && g.push(r.animate))) : (g.push(r), !r.includes("right") && !r.includes("left") && g.push("left"))), n.muted && g.push("muted"), n.fullWidth && g.push("full-width");
|
|
@@ -1267,14 +1267,14 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1267
1267
|
y,
|
|
1268
1268
|
f || (l ? /* @__PURE__ */ a.jsx(ie, { showOnFocus: !1, children: l }) : null)
|
|
1269
1269
|
);
|
|
1270
|
-
},
|
|
1271
|
-
const r = e.length > 1 ? "ul" : "p", s = e.map((i, o) => r === "p" ? /* @__PURE__ */ a.jsx(
|
|
1270
|
+
}, _t = ({ buttons: e, className: t = "", ...n }) => {
|
|
1271
|
+
const r = e.length > 1 ? "ul" : "p", s = e.map((i, o) => r === "p" ? /* @__PURE__ */ a.jsx(q, { ...i }, o) : /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(q, { ...i }) }, o));
|
|
1272
1272
|
return F.createElement(r, { className: j("button-wrapper", t), ...n, children: s });
|
|
1273
1273
|
};
|
|
1274
|
-
const
|
|
1274
|
+
const Ee = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
1275
1275
|
const n = t ? { "--max-width": `${t / 16}rem` } : {};
|
|
1276
1276
|
return /* @__PURE__ */ a.jsx("hr", { className: j(e, { "has-max-width": t }), style: n });
|
|
1277
|
-
},
|
|
1277
|
+
}, bt = ({
|
|
1278
1278
|
href: e,
|
|
1279
1279
|
children: t,
|
|
1280
1280
|
fallbackElement: n,
|
|
@@ -1297,7 +1297,7 @@ const $e = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
|
1297
1297
|
);
|
|
1298
1298
|
}
|
|
1299
1299
|
return n ? F.createElement(n, { children: t, className: r, ...c }) : t;
|
|
1300
|
-
},
|
|
1300
|
+
}, kn = {
|
|
1301
1301
|
card: {
|
|
1302
1302
|
range: [
|
|
1303
1303
|
{
|
|
@@ -1405,18 +1405,18 @@ const $e = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
|
1405
1405
|
range: t,
|
|
1406
1406
|
sizes: n
|
|
1407
1407
|
}) => {
|
|
1408
|
-
const { range: r, sizes: s } = e ?
|
|
1408
|
+
const { range: r, sizes: s } = e ? kn[e] : kn.fallback;
|
|
1409
1409
|
return { range: t && t.length > 0 ? t : r, sizes: n || s };
|
|
1410
1410
|
}, wr = ({ format: e, height: t, query: n, width: r }) => {
|
|
1411
1411
|
let s = `w=${r}&h=${t}`;
|
|
1412
1412
|
return s = e ? `${s}&fm=${e}` : s, s = n ? `${s}&${n}` : s, s;
|
|
1413
|
-
},
|
|
1413
|
+
}, Nt = ({ format: e, range: t, url: n, query: r }) => t.map(({ height: s, width: i }) => `${n}?${wr({
|
|
1414
1414
|
format: e,
|
|
1415
1415
|
height: s,
|
|
1416
1416
|
query: r,
|
|
1417
1417
|
width: i
|
|
1418
1418
|
})} ${i}w`).join(", ");
|
|
1419
|
-
const
|
|
1419
|
+
const Vn = ({ image: e, className: t, testId: n }) => {
|
|
1420
1420
|
const {
|
|
1421
1421
|
description: r,
|
|
1422
1422
|
height: s,
|
|
@@ -1427,7 +1427,7 @@ const Wn = ({ image: e, className: t, testId: n }) => {
|
|
|
1427
1427
|
loading: l,
|
|
1428
1428
|
decoding: f,
|
|
1429
1429
|
fetchPriority: d
|
|
1430
|
-
} = e, { range: p, sizes: h } = kr(e), g =
|
|
1430
|
+
} = e, { range: p, sizes: h } = kr(e), g = Nt({ format: "avif", query: o, range: p, url: c }), y = Nt({ format: "webp", query: o, range: p, url: c }), k = Nt({ format: "", query: o, range: p, url: c });
|
|
1431
1431
|
return /* @__PURE__ */ a.jsxs("picture", { className: t, children: [
|
|
1432
1432
|
i !== "image/gif" && /* @__PURE__ */ a.jsx(
|
|
1433
1433
|
"source",
|
|
@@ -1464,9 +1464,9 @@ const Wn = ({ image: e, className: t, testId: n }) => {
|
|
|
1464
1464
|
)
|
|
1465
1465
|
] });
|
|
1466
1466
|
};
|
|
1467
|
-
let
|
|
1467
|
+
let Be = !1;
|
|
1468
1468
|
const jr = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
1469
|
-
const r = A(), s = ae(null), [i, o] =
|
|
1469
|
+
const r = A(), s = ae(null), [i, o] = D("hidden");
|
|
1470
1470
|
G(() => {
|
|
1471
1471
|
const m = s.current;
|
|
1472
1472
|
if (m)
|
|
@@ -1475,17 +1475,17 @@ const jr = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
|
1475
1475
|
};
|
|
1476
1476
|
}, []);
|
|
1477
1477
|
const c = ({ propertyName: m }) => {
|
|
1478
|
-
m === "opacity" && (
|
|
1478
|
+
m === "opacity" && (Be !== !1 && clearTimeout(Be), o((l) => l === "opening" ? "open" : l === "closing" ? "closed" : l === "closed" ? "hidden" : l));
|
|
1479
1479
|
};
|
|
1480
|
-
return
|
|
1481
|
-
|
|
1480
|
+
return Fe(() => {
|
|
1481
|
+
Be !== !1 && clearTimeout(Be);
|
|
1482
1482
|
let m = "open";
|
|
1483
|
-
e ? o("opening") : (o("closing"), m = "hidden"),
|
|
1483
|
+
e ? o("opening") : (o("closing"), m = "hidden"), Be = setTimeout(() => {
|
|
1484
1484
|
o(m);
|
|
1485
1485
|
}, 300);
|
|
1486
1486
|
}, [e]), /* @__PURE__ */ a.jsx("aside", { ref: s, className: j("tooltip text-medium", i, { loading: t }), hidden: i === "hidden", children: t ? /* @__PURE__ */ a.jsx("p", { children: r.formatMessage({ id: "tooltip_loading" }) }) : typeof n == "string" ? /* @__PURE__ */ a.jsx("p", { children: n }) : n });
|
|
1487
1487
|
};
|
|
1488
|
-
const
|
|
1488
|
+
const yt = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ a.jsx("section", { className: j("full-width-section", t), ...n, children: e });
|
|
1489
1489
|
const $i = ({ text: e, buttons: t, className: n = "" }) => {
|
|
1490
1490
|
const r = [];
|
|
1491
1491
|
return t.forEach((s) => {
|
|
@@ -1499,9 +1499,9 @@ const $i = ({ text: e, buttons: t, className: n = "" }) => {
|
|
|
1499
1499
|
target: "_blank",
|
|
1500
1500
|
children: s.text
|
|
1501
1501
|
});
|
|
1502
|
-
}), /* @__PURE__ */ a.jsx(
|
|
1502
|
+
}), /* @__PURE__ */ a.jsx(yt, { className: j("download-section", n), children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1503
1503
|
F.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
|
|
1504
|
-
/* @__PURE__ */ a.jsx(
|
|
1504
|
+
/* @__PURE__ */ a.jsx(_t, { buttons: r })
|
|
1505
1505
|
] }) });
|
|
1506
1506
|
};
|
|
1507
1507
|
const Ei = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
@@ -1605,7 +1605,7 @@ const Tr = [
|
|
|
1605
1605
|
const p = document.getElementById(o.link.substring(1));
|
|
1606
1606
|
p && p.scrollIntoView({ behavior: "smooth" });
|
|
1607
1607
|
}), /* @__PURE__ */ a.jsx(
|
|
1608
|
-
|
|
1608
|
+
yt,
|
|
1609
1609
|
{
|
|
1610
1610
|
className: j("banner-section", r, s, e, {
|
|
1611
1611
|
"has-image": n,
|
|
@@ -1626,7 +1626,7 @@ const Tr = [
|
|
|
1626
1626
|
}),
|
|
1627
1627
|
c,
|
|
1628
1628
|
o && o.text && o.link && /* @__PURE__ */ a.jsx(
|
|
1629
|
-
|
|
1629
|
+
q,
|
|
1630
1630
|
{
|
|
1631
1631
|
variant: n || r === "light" ? "primary" : "secondary",
|
|
1632
1632
|
size: { mobile: "medium", 768: "large" },
|
|
@@ -1636,11 +1636,11 @@ const Tr = [
|
|
|
1636
1636
|
}
|
|
1637
1637
|
)
|
|
1638
1638
|
] }),
|
|
1639
|
-
n && /* @__PURE__ */ a.jsx(
|
|
1639
|
+
n && /* @__PURE__ */ a.jsx(Vn, { image: { ...n, aspect: "banner" } })
|
|
1640
1640
|
] })
|
|
1641
1641
|
}
|
|
1642
1642
|
);
|
|
1643
|
-
}, Ci =
|
|
1643
|
+
}, Ci = De($r);
|
|
1644
1644
|
const Si = ({
|
|
1645
1645
|
variant: e = "primary",
|
|
1646
1646
|
button: t = null,
|
|
@@ -1650,7 +1650,7 @@ const Si = ({
|
|
|
1650
1650
|
}) => !n && !r ? null : /* @__PURE__ */ a.jsxs("aside", { className: j("marketing-block", e), children: [
|
|
1651
1651
|
n && /* @__PURE__ */ a.jsx("p", { className: "title", children: n }),
|
|
1652
1652
|
r && /* @__PURE__ */ a.jsx("p", { children: r }),
|
|
1653
|
-
t && /* @__PURE__ */ a.jsx(
|
|
1653
|
+
t && /* @__PURE__ */ a.jsx(q, { variant: "secondary", size: "medium", href: t.link, className: "gtm-trackable", "data-gtm-event-context": s, "data-gtm-event-type": "learn-more-click", children: t.text })
|
|
1654
1654
|
] }), Er = ({ showDevTools: e = !0, children: t }) => {
|
|
1655
1655
|
const n = new za({
|
|
1656
1656
|
// default options we would like on all queries can be overridden individually
|
|
@@ -1668,10 +1668,10 @@ const Si = ({
|
|
|
1668
1668
|
e && /* @__PURE__ */ a.jsx(Ya, { initialIsOpen: !1 })
|
|
1669
1669
|
] });
|
|
1670
1670
|
};
|
|
1671
|
-
var Cr =
|
|
1671
|
+
var Cr = Qt({ client: st });
|
|
1672
1672
|
function Sr(e) {
|
|
1673
|
-
var t = e.children, n = e.client, r = e.apiKey, s = e.options, i =
|
|
1674
|
-
return n && r && console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."), n && s && console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."), n || (r && (
|
|
1673
|
+
var t = e.children, n = e.client, r = e.apiKey, s = e.options, i = ht(function() {
|
|
1674
|
+
return n && r && console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."), n && s && console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."), n || (r && (st.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), st.init(r, s)), st);
|
|
1675
1675
|
}, [n, r]);
|
|
1676
1676
|
return F.createElement(Cr.Provider, { value: { client: i } }, t);
|
|
1677
1677
|
}
|
|
@@ -1700,18 +1700,18 @@ const Mr = ({ children: e, user: t }) => t.isLoading ? null : process.env.REACT_
|
|
|
1700
1700
|
...n || {}
|
|
1701
1701
|
};
|
|
1702
1702
|
return /* @__PURE__ */ a.jsx(Ha, { locale: r, messages: s, children: e });
|
|
1703
|
-
}, we =
|
|
1704
|
-
function
|
|
1703
|
+
}, we = Qt({ isLoading: !0 });
|
|
1704
|
+
function en() {
|
|
1705
1705
|
return _e(we);
|
|
1706
1706
|
}
|
|
1707
1707
|
const Pr = ({ children: e, user: t }) => /* @__PURE__ */ a.jsx(we.Provider, { value: t, children: e }), Mi = ({ bootstrap: e, children: t, intl: n }) => {
|
|
1708
|
-
const [r, s] =
|
|
1708
|
+
const [r, s] = D({ isLoading: !0 });
|
|
1709
1709
|
return G(() => {
|
|
1710
1710
|
e().then((i) => {
|
|
1711
1711
|
s({ ...i, isLoading: !1 }), br(5e3);
|
|
1712
1712
|
}).catch(() => s({ isLoading: !1 }));
|
|
1713
1713
|
}, []), /* @__PURE__ */ a.jsx(Nr, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ a.jsx(Ga, { children: /* @__PURE__ */ a.jsx(Pr, { user: r, children: /* @__PURE__ */ a.jsx(Er, { children: /* @__PURE__ */ a.jsx(Mr, { user: r, children: t }) }) }) }) });
|
|
1714
|
-
},
|
|
1714
|
+
}, ze = "https://storage.googleapis.com/apolitical-assets/", qe = {
|
|
1715
1715
|
general: "hello@apolitical.co",
|
|
1716
1716
|
support: "concierge@apolitical.co",
|
|
1717
1717
|
"data-protection": {
|
|
@@ -1719,21 +1719,21 @@ const Pr = ({ children: e, user: t }) => /* @__PURE__ */ a.jsx(we.Provider, { va
|
|
|
1719
1719
|
eu: "dpo.agl@apolitical.foundation"
|
|
1720
1720
|
}
|
|
1721
1721
|
}, Ni = "200,000+";
|
|
1722
|
-
const
|
|
1722
|
+
const Yn = ({ label: e = !1, className: t = "", children: n }) => {
|
|
1723
1723
|
const r = A();
|
|
1724
1724
|
return /* @__PURE__ */ a.jsxs("details", { className: j("collapsible-section", t), children: [
|
|
1725
1725
|
/* @__PURE__ */ a.jsx("summary", { children: e || r.formatMessage({ id: "collapsibleSection_summary" }) }),
|
|
1726
1726
|
/* @__PURE__ */ a.jsx("div", { className: "content", children: n })
|
|
1727
1727
|
] });
|
|
1728
1728
|
};
|
|
1729
|
-
const
|
|
1729
|
+
const $e = ({
|
|
1730
1730
|
variant: e = "primary",
|
|
1731
1731
|
icon: t,
|
|
1732
1732
|
className: n = "",
|
|
1733
1733
|
children: r,
|
|
1734
1734
|
...s
|
|
1735
1735
|
}) => {
|
|
1736
|
-
const i = t ? { "--icon": `url(${
|
|
1736
|
+
const i = t ? { "--icon": `url(${ze}icons/${t}.svg)` } : {};
|
|
1737
1737
|
return /* @__PURE__ */ a.jsx(
|
|
1738
1738
|
"div",
|
|
1739
1739
|
{
|
|
@@ -1746,17 +1746,17 @@ const Te = ({
|
|
|
1746
1746
|
}
|
|
1747
1747
|
);
|
|
1748
1748
|
};
|
|
1749
|
-
const
|
|
1749
|
+
const vt = ({
|
|
1750
1750
|
variant: e = "empty",
|
|
1751
1751
|
text: t = !1,
|
|
1752
1752
|
button: n = !1,
|
|
1753
1753
|
className: r = ""
|
|
1754
1754
|
}) => {
|
|
1755
1755
|
let s = n && !!Object.keys(n).length;
|
|
1756
|
-
const i = typeof n == "object" && "breakpoints" in n, o =
|
|
1756
|
+
const i = typeof n == "object" && "breakpoints" in n, o = We(i);
|
|
1757
1757
|
if (i && typeof n == "object" && typeof o == "number") {
|
|
1758
|
-
const d = Object.assign({}, n.breakpoints), p =
|
|
1759
|
-
s =
|
|
1758
|
+
const d = Object.assign({}, n.breakpoints), p = Hn(Object.keys(d));
|
|
1759
|
+
s = Un(o, p, d);
|
|
1760
1760
|
}
|
|
1761
1761
|
const {
|
|
1762
1762
|
breakpoints: c,
|
|
@@ -1765,14 +1765,14 @@ const bt = ({
|
|
|
1765
1765
|
...f
|
|
1766
1766
|
} = n;
|
|
1767
1767
|
return /* @__PURE__ */ a.jsx(
|
|
1768
|
-
|
|
1768
|
+
$e,
|
|
1769
1769
|
{
|
|
1770
1770
|
variant: "subtle",
|
|
1771
1771
|
className: j("empty-state-box", e, r),
|
|
1772
1772
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1773
|
-
t && /* @__PURE__ */ a.jsx(
|
|
1773
|
+
t && /* @__PURE__ */ a.jsx(gt, { options: { forceBlock: !0 }, children: t }),
|
|
1774
1774
|
s && typeof n == "object" && (l || /* @__PURE__ */ a.jsx(
|
|
1775
|
-
|
|
1775
|
+
q,
|
|
1776
1776
|
{
|
|
1777
1777
|
...f,
|
|
1778
1778
|
variant: n.variant ? n.variant : "secondary",
|
|
@@ -1783,25 +1783,25 @@ const bt = ({
|
|
|
1783
1783
|
}
|
|
1784
1784
|
);
|
|
1785
1785
|
};
|
|
1786
|
-
const
|
|
1786
|
+
const Yt = ({ children: e, ...t }) => /* @__PURE__ */ a.jsx("p", { ...t, children: e }), Gn = { q: Yt, blockquote: Yt };
|
|
1787
1787
|
for (let e = 1; e <= 6; e++)
|
|
1788
|
-
|
|
1788
|
+
Gn[`h${e}`] = { component: Yt, props: { className: "title" } };
|
|
1789
1789
|
const Ar = ({ type: e = "default", className: t = "", heading: n = !1, children: r }) => /* @__PURE__ */ a.jsxs("div", { className: j("helper-text-box text-small", e, t), children: [
|
|
1790
1790
|
n && /* @__PURE__ */ a.jsx("p", { className: "title", children: n }),
|
|
1791
1791
|
typeof r == "string" ? /* @__PURE__ */ a.jsx(
|
|
1792
|
-
|
|
1792
|
+
gt,
|
|
1793
1793
|
{
|
|
1794
1794
|
options: {
|
|
1795
1795
|
wrapper: F.Fragment,
|
|
1796
1796
|
forceBlock: !0,
|
|
1797
|
-
overrides:
|
|
1797
|
+
overrides: Gn
|
|
1798
1798
|
},
|
|
1799
1799
|
children: r
|
|
1800
1800
|
}
|
|
1801
1801
|
) : /* @__PURE__ */ a.jsx("p", { children: r })
|
|
1802
1802
|
] });
|
|
1803
1803
|
const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children: s }) => {
|
|
1804
|
-
const i = A(), o = ae(null), [c, m] =
|
|
1804
|
+
const i = A(), o = ae(null), [c, m] = D(""), [l, f] = D("closed");
|
|
1805
1805
|
G(() => {
|
|
1806
1806
|
const h = o.current;
|
|
1807
1807
|
if (h)
|
|
@@ -1824,13 +1824,13 @@ const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1824
1824
|
if (!r)
|
|
1825
1825
|
return null;
|
|
1826
1826
|
const p = ["opening", "open"].includes(l);
|
|
1827
|
-
return /* @__PURE__ */ a.jsxs(
|
|
1827
|
+
return /* @__PURE__ */ a.jsxs($e, { variant: "subtle", className: j("hide-show-text-box", e), children: [
|
|
1828
1828
|
/* @__PURE__ */ a.jsxs("div", { ref: o, className: j("content", l), children: [
|
|
1829
|
-
/* @__PURE__ */ a.jsx(
|
|
1829
|
+
/* @__PURE__ */ a.jsx(gt, { options: { forceBlock: !0 }, children: l === "closed" ? c : r }),
|
|
1830
1830
|
l !== "closed" && s
|
|
1831
1831
|
] }),
|
|
1832
1832
|
/* @__PURE__ */ a.jsx("p", { className: "cta", children: /* @__PURE__ */ a.jsx(
|
|
1833
|
-
|
|
1833
|
+
q,
|
|
1834
1834
|
{
|
|
1835
1835
|
variant: "tertiary",
|
|
1836
1836
|
icon: { icon: "navigation_arrow", position: "left", animate: !0 },
|
|
@@ -1843,20 +1843,20 @@ const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1843
1843
|
}
|
|
1844
1844
|
) })
|
|
1845
1845
|
] });
|
|
1846
|
-
}, Fr = () => F.Fragment,
|
|
1846
|
+
}, Fr = () => F.Fragment, Lr = ({ children: e }) => /* @__PURE__ */ a.jsx($e, { variant: "secondary", children: e }), Dr = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], Rr = ({ children: e }) => {
|
|
1847
1847
|
const t = A();
|
|
1848
1848
|
if (!e)
|
|
1849
1849
|
return null;
|
|
1850
1850
|
let n = t.formatMessage({ id: "markdown_collapsibleSection_summary" });
|
|
1851
1851
|
const r = [];
|
|
1852
|
-
for (const i of
|
|
1852
|
+
for (const i of zt.toArray(e))
|
|
1853
1853
|
if (!(!i || typeof i == "string" || typeof i == "number"))
|
|
1854
1854
|
if (F.isValidElement(i) && i.type === "summary") {
|
|
1855
1855
|
if (i.props && i.props.children) {
|
|
1856
|
-
for (const o of
|
|
1856
|
+
for (const o of zt.toArray(i.props.children))
|
|
1857
1857
|
if (!(!o || typeof o == "string" || typeof o == "number") && F.isValidElement(o)) {
|
|
1858
1858
|
const c = o.type;
|
|
1859
|
-
if (
|
|
1859
|
+
if (Dr.includes(c)) {
|
|
1860
1860
|
for (n = o.props.children; typeof n != "string" && (Array.isArray(n) && n[0].props && n[0].props.children && n[0].props.children[0]); )
|
|
1861
1861
|
n = n[0].props.children[0];
|
|
1862
1862
|
break;
|
|
@@ -1867,7 +1867,7 @@ const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1867
1867
|
r.push(i);
|
|
1868
1868
|
const s = n ? n.toString() : "";
|
|
1869
1869
|
return /* @__PURE__ */ a.jsx(
|
|
1870
|
-
|
|
1870
|
+
Yn,
|
|
1871
1871
|
{
|
|
1872
1872
|
label: s,
|
|
1873
1873
|
className: ["Sources", "Resources"].includes(s) ? "discrete-links" : "",
|
|
@@ -1878,12 +1878,12 @@ const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1878
1878
|
if (t.class)
|
|
1879
1879
|
switch (t.class) {
|
|
1880
1880
|
case "casestudy":
|
|
1881
|
-
return /* @__PURE__ */ a.jsx(
|
|
1881
|
+
return /* @__PURE__ */ a.jsx($e, { variant: "secondary", children: e });
|
|
1882
1882
|
case "general-textbox":
|
|
1883
1883
|
case "highlight-box":
|
|
1884
|
-
return /* @__PURE__ */ a.jsx(
|
|
1884
|
+
return /* @__PURE__ */ a.jsx($e, { variant: "primary", children: e });
|
|
1885
1885
|
case "pink-textbox":
|
|
1886
|
-
return /* @__PURE__ */ a.jsx(
|
|
1886
|
+
return /* @__PURE__ */ a.jsx($e, { variant: "tertiary", children: e });
|
|
1887
1887
|
default:
|
|
1888
1888
|
return /* @__PURE__ */ a.jsx("div", { ...t, children: e });
|
|
1889
1889
|
}
|
|
@@ -1897,26 +1897,26 @@ const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1897
1897
|
/* @__PURE__ */ a.jsx("iframe", { ...e, title: t.formatMessage({ id: `markdown_iframe${r === "default" ? "" : `_${r}`}` }) }),
|
|
1898
1898
|
/* @__PURE__ */ a.jsx("span", { id: `content-after-iframe-${n}`, tabIndex: -1 })
|
|
1899
1899
|
] });
|
|
1900
|
-
},
|
|
1900
|
+
}, wn = (e) => {
|
|
1901
1901
|
let t = "";
|
|
1902
1902
|
return e && typeof e != "string" && typeof e != "number" && typeof e != "boolean" && "type" in e && (t = e.type), t;
|
|
1903
1903
|
}, Br = ({ children: e, ...t }) => {
|
|
1904
1904
|
let n = { ...t };
|
|
1905
1905
|
t.href && (t.href.includes("http:") || t.href.includes("https:")) && !t.target && (n.target = "_blank");
|
|
1906
1906
|
let r = e, s = !1;
|
|
1907
|
-
for (const i of
|
|
1907
|
+
for (const i of zt.toArray(e))
|
|
1908
1908
|
if (!(!i || typeof i == "string" || typeof i == "number") && F.isValidElement(i)) {
|
|
1909
1909
|
const o = i.type;
|
|
1910
1910
|
if (["button", "center", "span", "strong"].includes(o) && i.props && i.props.children && i.props.children[0])
|
|
1911
|
-
for ((o === "button" ||
|
|
1911
|
+
for ((o === "button" || wn(i.props.children[0]) === "button") && (s = !0), r = i.props.children[0]; r && typeof r != "string" && !(typeof r == "boolean" || typeof r == "number" || !F.isValidElement(r)); )
|
|
1912
1912
|
if (r.props && r.props.children && r.props.children[0])
|
|
1913
|
-
r = r.props.children[0], r &&
|
|
1913
|
+
r = r.props.children[0], r && wn(r) === "button" && (s = !0);
|
|
1914
1914
|
else
|
|
1915
1915
|
break;
|
|
1916
1916
|
}
|
|
1917
|
-
return s ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ a.jsx("p", { className: "center", children: /* @__PURE__ */ a.jsx(
|
|
1917
|
+
return s ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ a.jsx("p", { className: "center", children: /* @__PURE__ */ a.jsx(q, { variant: "primary", size: "medium", ...n, children: r }) })) : /* @__PURE__ */ a.jsx("a", { ...n, children: r });
|
|
1918
1918
|
}, Zr = ({ children: e }) => /* @__PURE__ */ a.jsx("span", { children: e });
|
|
1919
|
-
const
|
|
1919
|
+
const jn = ({ className: e = "", options: t = {}, children: n }) => {
|
|
1920
1920
|
n = n.replace(/^<br\/?>/, "");
|
|
1921
1921
|
const r = {
|
|
1922
1922
|
wrapper: F.Fragment,
|
|
@@ -1925,18 +1925,18 @@ const wn = ({ className: e = "", options: t = {}, children: n }) => {
|
|
|
1925
1925
|
a: Br,
|
|
1926
1926
|
// Override psuedo-code
|
|
1927
1927
|
// We give the content team psuedo-code short cuts to use in Contentful
|
|
1928
|
-
CollapsibleSection:
|
|
1929
|
-
TextBox:
|
|
1930
|
-
CaseStudy:
|
|
1928
|
+
CollapsibleSection: Yn,
|
|
1929
|
+
TextBox: $e,
|
|
1930
|
+
CaseStudy: Lr,
|
|
1931
1931
|
// Override embedded HTML
|
|
1932
1932
|
// Our content team previously used real HTML, which we need to tear out and replace with React components
|
|
1933
1933
|
style: Fr,
|
|
1934
|
-
details:
|
|
1934
|
+
details: Rr,
|
|
1935
1935
|
div: Ir,
|
|
1936
1936
|
iframe: Or
|
|
1937
1937
|
}
|
|
1938
1938
|
};
|
|
1939
|
-
return /* @__PURE__ */ a.jsx("div", { className: j("markdown-text", e), children: /* @__PURE__ */ a.jsx(
|
|
1939
|
+
return /* @__PURE__ */ a.jsx("div", { className: j("markdown-text", e), children: /* @__PURE__ */ a.jsx(gt, { options: { ...r, ...t }, children: n }) });
|
|
1940
1940
|
};
|
|
1941
1941
|
const qr = ({
|
|
1942
1942
|
maxWidth: e = !1,
|
|
@@ -1958,32 +1958,32 @@ const qr = ({
|
|
|
1958
1958
|
r
|
|
1959
1959
|
] });
|
|
1960
1960
|
};
|
|
1961
|
-
const
|
|
1961
|
+
const ot = ({
|
|
1962
1962
|
size: e = "medium",
|
|
1963
1963
|
variant: t = "default",
|
|
1964
1964
|
className: n = "",
|
|
1965
1965
|
children: r,
|
|
1966
1966
|
...s
|
|
1967
1967
|
}) => /* @__PURE__ */ a.jsx("span", { className: j("pill", e, t, n), ...s, children: r });
|
|
1968
|
-
const
|
|
1968
|
+
const Gt = ({ element: e = "p", children: t = null, className: n = "", ...r }) => F.createElement(e, { ...r, className: j("status-banner text-small", n), "aria-live": "assertive" }, t);
|
|
1969
1969
|
const Hr = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
|
|
1970
1970
|
const r = A(), s = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, i = { "--progress": `${e}%` };
|
|
1971
1971
|
return /* @__PURE__ */ a.jsx("span", { className: j(`progress-bar section-${s}`, n), style: i, children: /* @__PURE__ */ a.jsx(ie, { children: t ? `${e} ${t}` : r.formatMessage({ id: "progressBar" }, { number: e }) }) });
|
|
1972
|
-
}, Ur =
|
|
1973
|
-
const
|
|
1972
|
+
}, Ur = De(Hr);
|
|
1973
|
+
const Pt = "loadingBlock_", zr = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
|
|
1974
1974
|
const r = A();
|
|
1975
1975
|
t || (t = {
|
|
1976
|
-
0: { text: r.formatMessage({ id: `${
|
|
1977
|
-
75: { text: r.formatMessage({ id: `${
|
|
1978
|
-
100: { text: r.formatMessage({ id: `${
|
|
1976
|
+
0: { text: r.formatMessage({ id: `${Pt}loading` }) },
|
|
1977
|
+
75: { text: r.formatMessage({ id: `${Pt}almostDone` }) },
|
|
1978
|
+
100: { text: r.formatMessage({ id: `${Pt}complete` }) }
|
|
1979
1979
|
});
|
|
1980
1980
|
let s = null;
|
|
1981
1981
|
const i = Object.keys(t);
|
|
1982
1982
|
for (let c = 0; c < i.length && !(e < parseInt(i[c])); c++)
|
|
1983
1983
|
s = i[c];
|
|
1984
|
-
const o = s && t[s].icon ? { "--icon": `url(${
|
|
1984
|
+
const o = s && t[s].icon ? { "--icon": `url(${ze}icons/${t[s].icon}.svg)` } : {};
|
|
1985
1985
|
return /* @__PURE__ */ a.jsxs(
|
|
1986
|
-
|
|
1986
|
+
$e,
|
|
1987
1987
|
{
|
|
1988
1988
|
className: j("loading-block", n, { "has-icon": s && t[s].icon }),
|
|
1989
1989
|
variant: "subtle",
|
|
@@ -1994,9 +1994,9 @@ const Mt = "loadingBlock_", zr = ({ progress: e = 0, steps: t = !1, className: n
|
|
|
1994
1994
|
]
|
|
1995
1995
|
}
|
|
1996
1996
|
);
|
|
1997
|
-
}, Ai =
|
|
1998
|
-
const be = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ a.jsx(
|
|
1999
|
-
const
|
|
1997
|
+
}, Ai = De(zr);
|
|
1998
|
+
const be = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ a.jsx(Zn, { element: e, className: j("loading-placeholder", t), ...n });
|
|
1999
|
+
const Kt = {
|
|
2000
2000
|
header: ["logo", "link", "link", "search"],
|
|
2001
2001
|
sidebar: ["text", "text", "text", "text", "text"],
|
|
2002
2002
|
"cards-section": ["subtitle", "cards"],
|
|
@@ -2013,28 +2013,28 @@ const Yt = {
|
|
|
2013
2013
|
"cards-section",
|
|
2014
2014
|
"footer"
|
|
2015
2015
|
]
|
|
2016
|
-
},
|
|
2016
|
+
}, Kn = (e, t) => e in Kt ? /* @__PURE__ */ a.jsx("div", { className: e, children: Kt[e].map((n, r) => Kn(n, r)) }, t) : /* @__PURE__ */ a.jsx(be, { className: e }, t), Qn = ({ layout: e = "overview-page", ...t }) => /* @__PURE__ */ a.jsx("div", { className: j("loading-state", e), ...t, children: Kt[e].map((n, r) => Kn(n, r)) }), Jn = (e) => {
|
|
2017
2017
|
const t = e && e.toUpperCase().split(" ");
|
|
2018
2018
|
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) : "";
|
|
2019
|
-
},
|
|
2020
|
-
const t = Math.ceil(26 /
|
|
2019
|
+
}, Qe = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], Wr = (e) => {
|
|
2020
|
+
const t = Math.ceil(26 / Qe.length), n = Jn(e).toLowerCase();
|
|
2021
2021
|
if (n === "")
|
|
2022
|
-
return
|
|
2022
|
+
return Qe[0];
|
|
2023
2023
|
const r = n.charCodeAt(0) - 96;
|
|
2024
|
-
for (let s = 0; s <
|
|
2024
|
+
for (let s = 0; s < Qe.length; s++)
|
|
2025
2025
|
if (r <= t * (s + 1))
|
|
2026
|
-
return
|
|
2026
|
+
return Qe[s];
|
|
2027
2027
|
};
|
|
2028
|
-
const
|
|
2028
|
+
const Tn = 256, Ve = ({
|
|
2029
2029
|
className: e = "",
|
|
2030
2030
|
src: t = "",
|
|
2031
2031
|
name: n,
|
|
2032
2032
|
alt: r,
|
|
2033
|
-
width: s =
|
|
2034
|
-
height: i =
|
|
2033
|
+
width: s = Tn,
|
|
2034
|
+
height: i = Tn,
|
|
2035
2035
|
...o
|
|
2036
2036
|
}) => {
|
|
2037
|
-
const [c, m] =
|
|
2037
|
+
const [c, m] = D(!1), l = ae(null);
|
|
2038
2038
|
G(() => {
|
|
2039
2039
|
const d = l.current;
|
|
2040
2040
|
if (!d)
|
|
@@ -2043,7 +2043,7 @@ const jn = 256, ze = ({
|
|
|
2043
2043
|
if (!p)
|
|
2044
2044
|
return;
|
|
2045
2045
|
const h = s, g = i;
|
|
2046
|
-
typeof window < "u" && window.devicePixelRatio && (d.width = h * window.devicePixelRatio, d.height = g * window.devicePixelRatio, p.scale(window.devicePixelRatio, window.devicePixelRatio)), p.fillStyle = Wr(n), p.fillRect(0, 0, h, g), p.font = `${h / 3}px Arial`, p.textAlign = "center", p.fillStyle = "white", p.fillText(
|
|
2046
|
+
typeof window < "u" && window.devicePixelRatio && (d.width = h * window.devicePixelRatio, d.height = g * window.devicePixelRatio, p.scale(window.devicePixelRatio, window.devicePixelRatio)), p.fillStyle = Wr(n), p.fillRect(0, 0, h, g), p.font = `${h / 3}px Arial`, p.textAlign = "center", p.fillStyle = "white", p.fillText(Jn(n), h / 2, g / 1.6);
|
|
2047
2047
|
}, [n]);
|
|
2048
2048
|
let f = !1;
|
|
2049
2049
|
return t && t !== "" && !c && (t.includes("http") || t.includes("//")) && (f = !0), /* @__PURE__ */ a.jsx(
|
|
@@ -2065,10 +2065,10 @@ const jn = 256, ze = ({
|
|
|
2065
2065
|
) : /* @__PURE__ */ a.jsx("canvas", { ref: l })
|
|
2066
2066
|
}
|
|
2067
2067
|
);
|
|
2068
|
-
},
|
|
2069
|
-
image: `${
|
|
2068
|
+
}, Xn = (e) => e === "apolitical" ? {
|
|
2069
|
+
image: `${ze}logos/member_apolitical.svg`
|
|
2070
2070
|
} : e === "community" || typeof e == "object" && !e.name ? {
|
|
2071
|
-
image: `${
|
|
2071
|
+
image: `${ze}logos/member_community.svg`
|
|
2072
2072
|
} : {
|
|
2073
2073
|
name: e.name,
|
|
2074
2074
|
role: e.jobTitle || "",
|
|
@@ -2087,9 +2087,9 @@ const jn = 256, ze = ({
|
|
|
2087
2087
|
return "";
|
|
2088
2088
|
const c = `${e}${s && i ? ` — ${t}` : t}`;
|
|
2089
2089
|
let m = `${c}${(s || i) && o ? `, ${n}` : n}`;
|
|
2090
|
-
return m.length > r && (m = c), m.length > r && (m =
|
|
2090
|
+
return m.length > r && (m = c), m.length > r && (m = Ae(m, r)), m;
|
|
2091
2091
|
};
|
|
2092
|
-
const
|
|
2092
|
+
const tn = ({
|
|
2093
2093
|
element: e = "div",
|
|
2094
2094
|
member: t = "community",
|
|
2095
2095
|
additionalContent: n = !1,
|
|
@@ -2097,13 +2097,13 @@ const Xt = ({
|
|
|
2097
2097
|
gtmType: s = "member-click",
|
|
2098
2098
|
className: i = ""
|
|
2099
2099
|
}) => {
|
|
2100
|
-
const o = A(), c =
|
|
2100
|
+
const o = A(), c = Xn(t);
|
|
2101
2101
|
c.name || (c.name = o.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
|
|
2102
|
-
const { name: m, url: l, image: f } = c, d = Vr(c), p = n && n.createdAt ?
|
|
2102
|
+
const { name: m, url: l, image: f } = c, d = Vr(c), p = n && n.createdAt ? Vt(n.createdAt) : !1, h = n && n.createdAt ? zn(n.createdAt) : "";
|
|
2103
2103
|
return F.createElement(e, {
|
|
2104
2104
|
className: j("member text-medium", i),
|
|
2105
2105
|
children: /* @__PURE__ */ a.jsxs(
|
|
2106
|
-
|
|
2106
|
+
bt,
|
|
2107
2107
|
{
|
|
2108
2108
|
href: l,
|
|
2109
2109
|
gtmType: s,
|
|
@@ -2112,7 +2112,7 @@ const Xt = ({
|
|
|
2112
2112
|
g == null || g.stopPropagation();
|
|
2113
2113
|
},
|
|
2114
2114
|
children: [
|
|
2115
|
-
/* @__PURE__ */ a.jsx(
|
|
2115
|
+
/* @__PURE__ */ a.jsx(Ve, { name: m, src: f }),
|
|
2116
2116
|
/* @__PURE__ */ a.jsxs("p", { className: "details", children: [
|
|
2117
2117
|
/* @__PURE__ */ a.jsx("strong", { children: m }),
|
|
2118
2118
|
n && /* @__PURE__ */ a.jsxs("span", { className: "additional-content", children: [
|
|
@@ -2126,10 +2126,10 @@ const Xt = ({
|
|
|
2126
2126
|
)
|
|
2127
2127
|
});
|
|
2128
2128
|
};
|
|
2129
|
-
const
|
|
2129
|
+
const $n = {
|
|
2130
2130
|
small: 24,
|
|
2131
2131
|
medium: 48
|
|
2132
|
-
},
|
|
2132
|
+
}, ea = ({
|
|
2133
2133
|
element: e = "div",
|
|
2134
2134
|
contributors: { total: t, data: n } = { total: void 0, data: [] },
|
|
2135
2135
|
styling: { showText: r, size: s, showGap: i, showPlaceholders: o } = {
|
|
@@ -2150,16 +2150,16 @@ const Tn = {
|
|
|
2150
2150
|
/* @__PURE__ */ a.jsx("ul", { children: n.map((d, p) => {
|
|
2151
2151
|
let h, g = "";
|
|
2152
2152
|
if (p < c) {
|
|
2153
|
-
const { name: y = "", image: k = "" } =
|
|
2153
|
+
const { name: y = "", image: k = "" } = Xn(d);
|
|
2154
2154
|
if (o)
|
|
2155
2155
|
return /* @__PURE__ */ a.jsx(be, { element: "li", className: "contributor" }, p);
|
|
2156
2156
|
h = /* @__PURE__ */ a.jsx(
|
|
2157
|
-
|
|
2157
|
+
Ve,
|
|
2158
2158
|
{
|
|
2159
2159
|
name: y,
|
|
2160
2160
|
src: k,
|
|
2161
|
-
width:
|
|
2162
|
-
height:
|
|
2161
|
+
width: $n[s || "medium"],
|
|
2162
|
+
height: $n[s || "medium"]
|
|
2163
2163
|
}
|
|
2164
2164
|
);
|
|
2165
2165
|
} else if (p === c) {
|
|
@@ -2177,7 +2177,7 @@ const Tn = {
|
|
|
2177
2177
|
}
|
|
2178
2178
|
return h ? /* @__PURE__ */ a.jsx("li", { className: j("contributor", g), children: h }, p) : null;
|
|
2179
2179
|
}) }),
|
|
2180
|
-
r && /* @__PURE__ */ a.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? f.formatMessage({ id: `member_${n[0]}` }) :
|
|
2180
|
+
r && /* @__PURE__ */ a.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? f.formatMessage({ id: `member_${n[0]}` }) : Ae(n[0].name || "", 20) : null })
|
|
2181
2181
|
] })
|
|
2182
2182
|
});
|
|
2183
2183
|
}, Yr = ({ type: e, data: t }) => {
|
|
@@ -2192,7 +2192,7 @@ const Tn = {
|
|
|
2192
2192
|
startDate: f
|
|
2193
2193
|
} = t;
|
|
2194
2194
|
if (e === "question") {
|
|
2195
|
-
const d = s &&
|
|
2195
|
+
const d = s && Vt(s);
|
|
2196
2196
|
return /* @__PURE__ */ a.jsxs("p", { className: "details answers", "data-testid": "question-answers", children: [
|
|
2197
2197
|
n.formatMessage({ id: "card_answers" }, { number: r }),
|
|
2198
2198
|
s && /* @__PURE__ */ a.jsxs("span", { "data-testid": "question-created-at", children: [
|
|
@@ -2212,10 +2212,10 @@ const Tn = {
|
|
|
2212
2212
|
] });
|
|
2213
2213
|
}
|
|
2214
2214
|
if (f && !i || o)
|
|
2215
|
-
return /* @__PURE__ */ a.jsx("p", { className: "details", children: o ? n.formatMessage({ id: "card_bootcamp" }) :
|
|
2215
|
+
return /* @__PURE__ */ a.jsx("p", { className: "details", children: o ? n.formatMessage({ id: "card_bootcamp" }) : zn(f) });
|
|
2216
2216
|
if (c)
|
|
2217
2217
|
return /* @__PURE__ */ a.jsx(
|
|
2218
|
-
|
|
2218
|
+
ot,
|
|
2219
2219
|
{
|
|
2220
2220
|
variant: c === "free" ? "subtle" : "highlighted",
|
|
2221
2221
|
className: c,
|
|
@@ -2224,7 +2224,7 @@ const Tn = {
|
|
|
2224
2224
|
}
|
|
2225
2225
|
);
|
|
2226
2226
|
if (m || l) {
|
|
2227
|
-
const d = l &&
|
|
2227
|
+
const d = l && Vt(l);
|
|
2228
2228
|
return /* @__PURE__ */ a.jsxs("ul", { className: "details", children: [
|
|
2229
2229
|
m && /* @__PURE__ */ a.jsx("li", { "data-testid": "reading-time", children: n.formatMessage({ id: "card_time_read" }, { time: m }) }),
|
|
2230
2230
|
l && /* @__PURE__ */ a.jsx("li", { "data-testid": "published-date", children: n.formatMessage(
|
|
@@ -2239,7 +2239,7 @@ const Tn = {
|
|
|
2239
2239
|
] });
|
|
2240
2240
|
}
|
|
2241
2241
|
return null;
|
|
2242
|
-
},
|
|
2242
|
+
}, ct = {
|
|
2243
2243
|
customCard: {
|
|
2244
2244
|
className: "custom",
|
|
2245
2245
|
gtmEvent: "custom",
|
|
@@ -2298,7 +2298,7 @@ const Tn = {
|
|
|
2298
2298
|
}
|
|
2299
2299
|
}, Gr = ({ data: e, cta: t, link: n, gtmContext: r }) => {
|
|
2300
2300
|
var g;
|
|
2301
|
-
const s = A(), [i, o] =
|
|
2301
|
+
const s = A(), [i, o] = D({
|
|
2302
2302
|
loading: !1,
|
|
2303
2303
|
registered: e.registered || !1
|
|
2304
2304
|
});
|
|
@@ -2307,7 +2307,7 @@ const Tn = {
|
|
|
2307
2307
|
}, [e.registered]);
|
|
2308
2308
|
const { startDate: c, dateHasPassed: m, pill: l, slug: f } = e, d = e.contentType;
|
|
2309
2309
|
let p = "";
|
|
2310
|
-
if ((g =
|
|
2310
|
+
if ((g = ct[d]) != null && g.gtmEvent && (p = ct[d].gtmEvent), c && m)
|
|
2311
2311
|
return /* @__PURE__ */ a.jsx(
|
|
2312
2312
|
"a",
|
|
2313
2313
|
{
|
|
@@ -2320,7 +2320,7 @@ const Tn = {
|
|
|
2320
2320
|
);
|
|
2321
2321
|
if (d === "people")
|
|
2322
2322
|
return /* @__PURE__ */ a.jsx(
|
|
2323
|
-
|
|
2323
|
+
q,
|
|
2324
2324
|
{
|
|
2325
2325
|
variant: "tertiary",
|
|
2326
2326
|
size: "small",
|
|
@@ -2345,7 +2345,7 @@ const Tn = {
|
|
|
2345
2345
|
}
|
|
2346
2346
|
};
|
|
2347
2347
|
return /* @__PURE__ */ a.jsx(
|
|
2348
|
-
|
|
2348
|
+
q,
|
|
2349
2349
|
{
|
|
2350
2350
|
onClick: k,
|
|
2351
2351
|
className: "gtm-trackable",
|
|
@@ -2362,7 +2362,7 @@ const Tn = {
|
|
|
2362
2362
|
);
|
|
2363
2363
|
}
|
|
2364
2364
|
return null;
|
|
2365
|
-
},
|
|
2365
|
+
}, En = {
|
|
2366
2366
|
cube: "box",
|
|
2367
2367
|
graduationCap: "graduation-cap",
|
|
2368
2368
|
person: "user",
|
|
@@ -2370,14 +2370,14 @@ const Tn = {
|
|
|
2370
2370
|
star: "star_empty_thin"
|
|
2371
2371
|
}, Kr = (e) => {
|
|
2372
2372
|
let t = e;
|
|
2373
|
-
return Object.keys(
|
|
2373
|
+
return Object.keys(En).includes(e) && (t = En[e]), `url(${ze}icons/${t}.svg)`;
|
|
2374
2374
|
};
|
|
2375
2375
|
const Qr = {
|
|
2376
2376
|
title: 66,
|
|
2377
2377
|
text: 3e3,
|
|
2378
2378
|
secondaryText: 1e3,
|
|
2379
2379
|
partner: 25
|
|
2380
|
-
},
|
|
2380
|
+
}, ta = ({
|
|
2381
2381
|
id: e = "",
|
|
2382
2382
|
card: t,
|
|
2383
2383
|
buildCardData: n,
|
|
@@ -2385,13 +2385,13 @@ const Qr = {
|
|
|
2385
2385
|
gtmContext: s = "Carousel",
|
|
2386
2386
|
className: i = ""
|
|
2387
2387
|
}) => {
|
|
2388
|
-
const o = A(), c = _e(we), m = c && typeof c.id == "string", [l, f] =
|
|
2388
|
+
const o = A(), c = _e(we), m = c && typeof c.id == "string", [l, f] = D({
|
|
2389
2389
|
data: null,
|
|
2390
2390
|
isLoading: !0
|
|
2391
2391
|
}), { data: d, isLoading: p } = l, h = Rn(() => {
|
|
2392
|
-
n(t, m).then((
|
|
2393
|
-
f(() => ({ data:
|
|
2394
|
-
}).catch(() => f((
|
|
2392
|
+
n(t, m).then((O) => {
|
|
2393
|
+
f(() => ({ data: O, isLoading: !1 }));
|
|
2394
|
+
}).catch(() => f((O) => ({ ...O, isLoading: !1 })));
|
|
2395
2395
|
}, [e]);
|
|
2396
2396
|
if (G(() => {
|
|
2397
2397
|
h();
|
|
@@ -2405,14 +2405,14 @@ const Qr = {
|
|
|
2405
2405
|
}
|
|
2406
2406
|
);
|
|
2407
2407
|
const { contentType: g } = d;
|
|
2408
|
-
if (!g || !
|
|
2408
|
+
if (!g || !ct[g])
|
|
2409
2409
|
return /* @__PURE__ */ a.jsx(be, { element: "li", className: "card-wrapper" });
|
|
2410
2410
|
const {
|
|
2411
2411
|
basePath: y = "",
|
|
2412
2412
|
className: k,
|
|
2413
2413
|
length: b,
|
|
2414
2414
|
gtmEvent: _
|
|
2415
|
-
} =
|
|
2415
|
+
} = ct[g], v = Wn(`card_label_${g}`) ? o.formatMessage({ id: `card_label_${g}` }) : !1, w = d.slug ? `${y}${d.slug}` : !1, E = { ...Qr, ...b };
|
|
2416
2416
|
let M = { className: "card" };
|
|
2417
2417
|
w && (M = {
|
|
2418
2418
|
href: w,
|
|
@@ -2421,7 +2421,7 @@ const Qr = {
|
|
|
2421
2421
|
"data-gtm-event-type": `${_}-click`,
|
|
2422
2422
|
"data-testid": "link"
|
|
2423
2423
|
}, d.openInNewTab && (M.target = "_blank"));
|
|
2424
|
-
const
|
|
2424
|
+
const L = d.customIcon ? { "--custom-icon": Kr(d.customIcon) } : {};
|
|
2425
2425
|
return /* @__PURE__ */ a.jsx(
|
|
2426
2426
|
"li",
|
|
2427
2427
|
{
|
|
@@ -2431,7 +2431,7 @@ const Qr = {
|
|
|
2431
2431
|
"has-custom-icon": d.customIcon,
|
|
2432
2432
|
"has-image": d.banner
|
|
2433
2433
|
}),
|
|
2434
|
-
style:
|
|
2434
|
+
style: L,
|
|
2435
2435
|
"data-testid": `${g}-card`,
|
|
2436
2436
|
children: F.createElement(
|
|
2437
2437
|
w ? "a" : "div",
|
|
@@ -2439,7 +2439,7 @@ const Qr = {
|
|
|
2439
2439
|
/* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2440
2440
|
(d.customLabel || v) && /* @__PURE__ */ a.jsx("small", { className: j("card-label text-small", k), children: d.customLabel || v }),
|
|
2441
2441
|
d.startDate && !d.isOngoingEvent && /* @__PURE__ */ a.jsx(
|
|
2442
|
-
|
|
2442
|
+
ot,
|
|
2443
2443
|
{
|
|
2444
2444
|
size: "small",
|
|
2445
2445
|
variant: d.dateHasPassed ? "default" : "information",
|
|
@@ -2448,10 +2448,10 @@ const Qr = {
|
|
|
2448
2448
|
}
|
|
2449
2449
|
),
|
|
2450
2450
|
d.banner ? /* @__PURE__ */ a.jsxs("p", { className: "img", children: [
|
|
2451
|
-
d.registered && /* @__PURE__ */ a.jsx(
|
|
2452
|
-
/* @__PURE__ */ a.jsx(
|
|
2451
|
+
d.registered && /* @__PURE__ */ a.jsx(ot, { size: "small", variant: "registered", children: o.formatMessage({ id: "card_registered" }) }),
|
|
2452
|
+
/* @__PURE__ */ a.jsx(Vn, { image: d.banner })
|
|
2453
2453
|
] }) : k === "people" ? /* @__PURE__ */ a.jsx(
|
|
2454
|
-
|
|
2454
|
+
Ve,
|
|
2455
2455
|
{
|
|
2456
2456
|
name: d.title || "",
|
|
2457
2457
|
src: d.profile,
|
|
@@ -2459,7 +2459,7 @@ const Qr = {
|
|
|
2459
2459
|
}
|
|
2460
2460
|
) : null,
|
|
2461
2461
|
d.contributors && /* @__PURE__ */ a.jsx(
|
|
2462
|
-
|
|
2462
|
+
ea,
|
|
2463
2463
|
{
|
|
2464
2464
|
contributors: { data: d.contributors },
|
|
2465
2465
|
styling: {
|
|
@@ -2470,14 +2470,14 @@ const Qr = {
|
|
|
2470
2470
|
"data-testid": "contributors"
|
|
2471
2471
|
}
|
|
2472
2472
|
),
|
|
2473
|
-
d.partner && /* @__PURE__ */ a.jsx("p", { className: "partners", "data-testid": "partners", children:
|
|
2473
|
+
d.partner && /* @__PURE__ */ a.jsx("p", { className: "partners", "data-testid": "partners", children: Ae(d.partner.title, E.partner) }),
|
|
2474
2474
|
/* Text */
|
|
2475
|
-
["title", "text", "secondaryText"].map((
|
|
2476
|
-
const $ = d[
|
|
2475
|
+
["title", "text", "secondaryText"].map((O) => {
|
|
2476
|
+
const $ = d[O];
|
|
2477
2477
|
if (!$)
|
|
2478
2478
|
return null;
|
|
2479
|
-
const
|
|
2480
|
-
return /* @__PURE__ */ a.jsx("p", { className:
|
|
2479
|
+
const S = ur(O);
|
|
2480
|
+
return /* @__PURE__ */ a.jsx("p", { className: S, "data-testid": S, children: Ae($, E[O]) }, O);
|
|
2481
2481
|
}),
|
|
2482
2482
|
/* @__PURE__ */ a.jsx(Yr, { type: k || "", data: d }),
|
|
2483
2483
|
/* @__PURE__ */ a.jsx(Gr, { data: d, cta: r, link: w || "", gtmContext: s })
|
|
@@ -2489,7 +2489,7 @@ const Qr = {
|
|
|
2489
2489
|
const Jr = ({ cards: e, cardTypes: t, className: n = "", ...r }) => /* @__PURE__ */ a.jsx("ul", { className: j("card-block", n), children: e.map((s, i) => {
|
|
2490
2490
|
const o = s.slug ? `${s.slug}-${t[i]}` : `${t[i]}-${i}`;
|
|
2491
2491
|
return /* @__PURE__ */ a.jsx(
|
|
2492
|
-
|
|
2492
|
+
ta,
|
|
2493
2493
|
{
|
|
2494
2494
|
id: o,
|
|
2495
2495
|
card: { ...s, contentType: t[i] },
|
|
@@ -2524,12 +2524,12 @@ const Jr = ({ cards: e, cardTypes: t, className: n = "", ...r }) => /* @__PURE__
|
|
|
2524
2524
|
] })
|
|
2525
2525
|
});
|
|
2526
2526
|
};
|
|
2527
|
-
const
|
|
2527
|
+
const At = {
|
|
2528
2528
|
fourCards: 1024,
|
|
2529
2529
|
threeCards: 769,
|
|
2530
2530
|
twoCards: 480
|
|
2531
2531
|
};
|
|
2532
|
-
let
|
|
2532
|
+
let Je = null;
|
|
2533
2533
|
const ts = ({
|
|
2534
2534
|
id: e,
|
|
2535
2535
|
cards: t,
|
|
@@ -2539,55 +2539,55 @@ const ts = ({
|
|
|
2539
2539
|
className: i,
|
|
2540
2540
|
gtmContext: o
|
|
2541
2541
|
}) => {
|
|
2542
|
-
var
|
|
2543
|
-
const c = A(), [m, l] =
|
|
2542
|
+
var O;
|
|
2543
|
+
const c = A(), [m, l] = D({
|
|
2544
2544
|
cardsPerPage: 4,
|
|
2545
2545
|
isLoading: !0
|
|
2546
|
-
}), { cardsPerPage: f, isLoading: d } = m, [p, h] =
|
|
2546
|
+
}), { cardsPerPage: f, isLoading: d } = m, [p, h] = D({
|
|
2547
2547
|
currentPage: 0,
|
|
2548
2548
|
loadedPages: [0]
|
|
2549
|
-
}), { currentPage: g, loadedPages: y } = p, k = t.length, b = Math.ceil(k / f), _ = ae(null), v =
|
|
2549
|
+
}), { currentPage: g, loadedPages: y } = p, k = t.length, b = Math.ceil(k / f), _ = ae(null), v = We(!0, !0, _ == null ? void 0 : _.current);
|
|
2550
2550
|
G(() => {
|
|
2551
2551
|
let $ = 1;
|
|
2552
|
-
v && (v >=
|
|
2553
|
-
...
|
|
2552
|
+
v && (v >= At.fourCards ? $ = 4 : v >= At.threeCards ? $ = 3 : v >= At.twoCards && ($ = 2), $ > k && ($ = k)), l((S) => ({
|
|
2553
|
+
...S,
|
|
2554
2554
|
cardsPerPage: $,
|
|
2555
2555
|
isLoading: !1
|
|
2556
2556
|
}));
|
|
2557
2557
|
}, [v, k]);
|
|
2558
2558
|
const w = ($ = "next") => {
|
|
2559
|
-
let
|
|
2559
|
+
let S = g;
|
|
2560
2560
|
if (typeof $ == "string")
|
|
2561
2561
|
if ($ === "next")
|
|
2562
2562
|
if (g < b - 1)
|
|
2563
|
-
|
|
2563
|
+
S = g + 1;
|
|
2564
2564
|
else
|
|
2565
2565
|
return;
|
|
2566
2566
|
else if (g > 0)
|
|
2567
|
-
|
|
2567
|
+
S = g - 1;
|
|
2568
2568
|
else
|
|
2569
2569
|
return;
|
|
2570
2570
|
else
|
|
2571
|
-
|
|
2572
|
-
h((
|
|
2573
|
-
...
|
|
2574
|
-
currentPage:
|
|
2575
|
-
loadedPages: [.../* @__PURE__ */ new Set([...y,
|
|
2571
|
+
S = $;
|
|
2572
|
+
h((C) => ({
|
|
2573
|
+
...C,
|
|
2574
|
+
currentPage: S,
|
|
2575
|
+
loadedPages: [.../* @__PURE__ */ new Set([...y, S])]
|
|
2576
2576
|
}));
|
|
2577
|
-
},
|
|
2578
|
-
|
|
2577
|
+
}, E = ($) => {
|
|
2578
|
+
Je = $.touches[0].clientX;
|
|
2579
2579
|
}, M = ($) => {
|
|
2580
|
-
if (
|
|
2580
|
+
if (Je === null)
|
|
2581
2581
|
return;
|
|
2582
|
-
const
|
|
2583
|
-
|
|
2584
|
-
},
|
|
2585
|
-
"--width": `${((
|
|
2582
|
+
const S = $.touches[0].clientX, C = Je - S;
|
|
2583
|
+
C > 5 ? w("next") : C < -5 && w("previous"), Je = null;
|
|
2584
|
+
}, L = {
|
|
2585
|
+
"--width": `${((O = _ == null ? void 0 : _.current) == null ? void 0 : O.offsetWidth) || 0}px`,
|
|
2586
2586
|
"--total-cards": k,
|
|
2587
2587
|
"--cards-per-page": f,
|
|
2588
2588
|
"--page": g
|
|
2589
2589
|
};
|
|
2590
|
-
return d ? /* @__PURE__ */ a.jsx(
|
|
2590
|
+
return d ? /* @__PURE__ */ a.jsx(Qn, { layout: `carousel${s ? "-with-title" : ""}` }) : /* @__PURE__ */ a.jsxs(
|
|
2591
2591
|
"section",
|
|
2592
2592
|
{
|
|
2593
2593
|
ref: _,
|
|
@@ -2599,36 +2599,36 @@ const ts = ({
|
|
|
2599
2599
|
"ul",
|
|
2600
2600
|
{
|
|
2601
2601
|
className: "carousel",
|
|
2602
|
-
onTouchStart:
|
|
2602
|
+
onTouchStart: E,
|
|
2603
2603
|
onTouchMove: M,
|
|
2604
|
-
style:
|
|
2604
|
+
style: L,
|
|
2605
2605
|
"data-testid": "carousel-list",
|
|
2606
|
-
children: t.map(($,
|
|
2607
|
-
let
|
|
2608
|
-
return
|
|
2609
|
-
|
|
2606
|
+
children: t.map(($, S) => {
|
|
2607
|
+
let C = $ && $.sys && $.sys.id ? `${e}-card-${$.sys.id}` : null;
|
|
2608
|
+
return C && Xr(S, f, g, y) ? /* @__PURE__ */ a.jsx(
|
|
2609
|
+
ta,
|
|
2610
2610
|
{
|
|
2611
|
-
id:
|
|
2612
|
-
card: { ...$, contentType: n[
|
|
2611
|
+
id: C,
|
|
2612
|
+
card: { ...$, contentType: n[S] },
|
|
2613
2613
|
buildCardData: r,
|
|
2614
2614
|
gtmContext: o
|
|
2615
2615
|
},
|
|
2616
|
-
|
|
2617
|
-
) : (
|
|
2616
|
+
C
|
|
2617
|
+
) : (C = C || `${e}-card-${S}`, /* @__PURE__ */ a.jsx(
|
|
2618
2618
|
be,
|
|
2619
2619
|
{
|
|
2620
2620
|
element: "li",
|
|
2621
2621
|
className: "card-wrapper",
|
|
2622
2622
|
"data-testid": "card-placeholder"
|
|
2623
2623
|
},
|
|
2624
|
-
|
|
2624
|
+
C
|
|
2625
2625
|
));
|
|
2626
2626
|
})
|
|
2627
2627
|
}
|
|
2628
2628
|
),
|
|
2629
2629
|
b <= 1 ? null : /* @__PURE__ */ a.jsxs("ul", { className: "controls", "data-testid": "carousel-controls", children: [
|
|
2630
2630
|
/* @__PURE__ */ a.jsx("li", { className: "arrow previous", children: /* @__PURE__ */ a.jsx(
|
|
2631
|
-
|
|
2631
|
+
q,
|
|
2632
2632
|
{
|
|
2633
2633
|
variant: "secondary",
|
|
2634
2634
|
size: "large",
|
|
@@ -2642,23 +2642,23 @@ const ts = ({
|
|
|
2642
2642
|
disabled: g <= 0
|
|
2643
2643
|
}
|
|
2644
2644
|
) }),
|
|
2645
|
-
[...Array(b)].map(($,
|
|
2645
|
+
[...Array(b)].map(($, S) => /* @__PURE__ */ a.jsx("li", { "data-testid": "carousel-controls-button", children: /* @__PURE__ */ a.jsx(
|
|
2646
2646
|
"button",
|
|
2647
2647
|
{
|
|
2648
2648
|
className: j("page-indicator", {
|
|
2649
|
-
selected:
|
|
2649
|
+
selected: S === g
|
|
2650
2650
|
}),
|
|
2651
|
-
onClick: (
|
|
2652
|
-
|
|
2651
|
+
onClick: (C) => {
|
|
2652
|
+
C.preventDefault(), C.stopPropagation(), w(S);
|
|
2653
2653
|
},
|
|
2654
2654
|
children: /* @__PURE__ */ a.jsx(ie, { showOnFocus: !1, children: c.formatMessage(
|
|
2655
2655
|
{ id: "carousel_pagination_page" },
|
|
2656
|
-
{ number:
|
|
2656
|
+
{ number: S + 1, total: b }
|
|
2657
2657
|
) })
|
|
2658
2658
|
}
|
|
2659
|
-
) }, `page-indicator-${
|
|
2659
|
+
) }, `page-indicator-${S}`)),
|
|
2660
2660
|
/* @__PURE__ */ a.jsx("li", { className: "arrow next", children: /* @__PURE__ */ a.jsx(
|
|
2661
|
-
|
|
2661
|
+
q,
|
|
2662
2662
|
{
|
|
2663
2663
|
variant: "secondary",
|
|
2664
2664
|
size: "large",
|
|
@@ -2683,16 +2683,16 @@ const ts = ({
|
|
|
2683
2683
|
}) => !e || !e.length ? null : e.map(
|
|
2684
2684
|
({ title: i, viewAllUrl: o, cards: c, cardsTypes: m }, l) => {
|
|
2685
2685
|
const f = i ? window.btoa(i) : `carousel-${l}`, d = l === e.length - 1;
|
|
2686
|
-
return t ? /* @__PURE__ */ a.jsxs(
|
|
2686
|
+
return t ? /* @__PURE__ */ a.jsxs(Ue, { children: [
|
|
2687
2687
|
/* @__PURE__ */ a.jsx(
|
|
2688
|
-
|
|
2688
|
+
Qn,
|
|
2689
2689
|
{
|
|
2690
2690
|
layout: `carousel${i ? "-with-title" : ""}`,
|
|
2691
2691
|
"data-testid": "carousel-placeholder"
|
|
2692
2692
|
}
|
|
2693
2693
|
),
|
|
2694
|
-
d ? null : /* @__PURE__ */ a.jsx(
|
|
2695
|
-
] }, `placeholder-${f}`) : /* @__PURE__ */ a.jsxs(
|
|
2694
|
+
d ? null : /* @__PURE__ */ a.jsx(Ee, {})
|
|
2695
|
+
] }, `placeholder-${f}`) : /* @__PURE__ */ a.jsxs(Ue, { children: [
|
|
2696
2696
|
/* @__PURE__ */ a.jsx(
|
|
2697
2697
|
ts,
|
|
2698
2698
|
{
|
|
@@ -2702,20 +2702,20 @@ const ts = ({
|
|
|
2702
2702
|
...s
|
|
2703
2703
|
}
|
|
2704
2704
|
),
|
|
2705
|
-
d ? null : /* @__PURE__ */ a.jsx(
|
|
2705
|
+
d ? null : /* @__PURE__ */ a.jsx(Ee, {})
|
|
2706
2706
|
] }, `carousel-${f}`);
|
|
2707
2707
|
}
|
|
2708
2708
|
);
|
|
2709
|
-
const
|
|
2709
|
+
const Ft = "joinCommunityButton", na = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: r } = { join: () => {
|
|
2710
2710
|
}, leave: () => {
|
|
2711
2711
|
} } }) => {
|
|
2712
|
-
const s = A(), i = _e(we), o = i && typeof i.id == "string", [c, m] =
|
|
2712
|
+
const s = A(), i = _e(we), o = i && typeof i.id == "string", [c, m] = D(e), [l, f] = D(e ? "joined" : "notJoined");
|
|
2713
2713
|
G(() => {
|
|
2714
2714
|
l === "joining" ? f("joined") : l === "leaving" && f("notJoined");
|
|
2715
2715
|
}, [c]);
|
|
2716
2716
|
const d = {}, p = {};
|
|
2717
|
-
return c && l !== "leaving" && (d["data-hover-text"] = s.formatMessage({ id: `${
|
|
2718
|
-
|
|
2717
|
+
return c && l !== "leaving" && (d["data-hover-text"] = s.formatMessage({ id: `${Ft}_leave` }), d["aria-label"] = s.formatMessage({ id: `${Ft}_member_aria` }), p["aria-hidden"] = "true"), /* @__PURE__ */ a.jsx(
|
|
2718
|
+
q,
|
|
2719
2719
|
{
|
|
2720
2720
|
variant: c ? "secondary" : "primary",
|
|
2721
2721
|
size: "medium",
|
|
@@ -2727,11 +2727,11 @@ const Pt = "joinCommunityButton", ta = ({ isMember: e = !1, isShort: t = !1, fun
|
|
|
2727
2727
|
className: j("join-community-button", l, { active: l === "joining" }),
|
|
2728
2728
|
disabled: !o,
|
|
2729
2729
|
...d,
|
|
2730
|
-
children: /* @__PURE__ */ a.jsx("span", { className: "text", ...p, children: s.formatMessage({ id: `${
|
|
2730
|
+
children: /* @__PURE__ */ a.jsx("span", { className: "text", ...p, children: s.formatMessage({ id: `${Ft}${["joining", "leaving"].includes(l) ? `_${l}` : c ? "_member" : t ? "_short" : ""}` }) })
|
|
2731
2731
|
}
|
|
2732
2732
|
);
|
|
2733
2733
|
};
|
|
2734
|
-
const
|
|
2734
|
+
const Lt = "communityDetails_", Li = ({
|
|
2735
2735
|
className: e = "",
|
|
2736
2736
|
isMember: t = !1,
|
|
2737
2737
|
slug: n,
|
|
@@ -2740,17 +2740,17 @@ const At = "communityDetails_", Di = ({
|
|
|
2740
2740
|
}) => {
|
|
2741
2741
|
const c = A(), m = 5, l = r || s.length, f = s.length ? s : Array(m).fill({}), d = `/communities/${n}/members` === window.location.pathname;
|
|
2742
2742
|
return /* @__PURE__ */ a.jsxs("div", { className: j("community-details", e), children: [
|
|
2743
|
-
/* @__PURE__ */ a.jsx(
|
|
2743
|
+
/* @__PURE__ */ a.jsx(Ee, {}),
|
|
2744
2744
|
/* @__PURE__ */ a.jsxs("div", { className: "member-details", children: [
|
|
2745
2745
|
/* @__PURE__ */ a.jsxs("div", { className: "top", children: [
|
|
2746
2746
|
/* @__PURE__ */ a.jsxs("h3", { children: [
|
|
2747
|
-
c.formatMessage({ id: `${
|
|
2747
|
+
c.formatMessage({ id: `${Lt}members` }),
|
|
2748
2748
|
/* @__PURE__ */ a.jsx("span", { className: "count", children: l })
|
|
2749
2749
|
] }),
|
|
2750
|
-
!d && /* @__PURE__ */ a.jsx("p", { className: "text-small", children: /* @__PURE__ */ a.jsx("a", { href: `/communities/${n}/members`, children: c.formatMessage({ id: `${
|
|
2750
|
+
!d && /* @__PURE__ */ a.jsx("p", { className: "text-small", children: /* @__PURE__ */ a.jsx("a", { href: `/communities/${n}/members`, children: c.formatMessage({ id: `${Lt}viewAll` }) }) })
|
|
2751
2751
|
] }),
|
|
2752
2752
|
/* @__PURE__ */ a.jsx(
|
|
2753
|
-
|
|
2753
|
+
ea,
|
|
2754
2754
|
{
|
|
2755
2755
|
contributors: {
|
|
2756
2756
|
total: r,
|
|
@@ -2765,20 +2765,20 @@ const At = "communityDetails_", Di = ({
|
|
|
2765
2765
|
}
|
|
2766
2766
|
)
|
|
2767
2767
|
] }),
|
|
2768
|
-
/* @__PURE__ */ a.jsx(
|
|
2768
|
+
/* @__PURE__ */ a.jsx(na, { isMember: t, functions: { ...o } }),
|
|
2769
2769
|
t && /* @__PURE__ */ a.jsx(
|
|
2770
|
-
|
|
2770
|
+
q,
|
|
2771
2771
|
{
|
|
2772
2772
|
variant: "primary",
|
|
2773
2773
|
onClick: i,
|
|
2774
2774
|
icon: { icon: "plus" },
|
|
2775
2775
|
styling: { fullWidth: !0 },
|
|
2776
|
-
children: c.formatMessage({ id: `${
|
|
2776
|
+
children: c.formatMessage({ id: `${Lt}invite` })
|
|
2777
2777
|
}
|
|
2778
2778
|
)
|
|
2779
2779
|
] });
|
|
2780
2780
|
};
|
|
2781
|
-
const
|
|
2781
|
+
const Di = ({
|
|
2782
2782
|
breadcrumbs: e,
|
|
2783
2783
|
cutoff: t = 20,
|
|
2784
2784
|
className: n = ""
|
|
@@ -2788,11 +2788,11 @@ const Ri = ({
|
|
|
2788
2788
|
/* @__PURE__ */ a.jsx(ie, { element: "p", children: r.formatMessage({ id: "breadcrumbs_label" }) }),
|
|
2789
2789
|
/* @__PURE__ */ a.jsx("ul", { className: j("breadcrumbs text-small", n), children: e.map(({ text: s, href: i, current: o = !1 }, c) => /* @__PURE__ */ a.jsxs("li", { children: [
|
|
2790
2790
|
o && /* @__PURE__ */ a.jsx(ie, { element: "span", children: r.formatMessage({ id: "breadcrumbs_currentPage" }) }),
|
|
2791
|
-
/* @__PURE__ */ a.jsx(
|
|
2791
|
+
/* @__PURE__ */ a.jsx(bt, { href: o ? void 0 : i, children: Ae(s, t) })
|
|
2792
2792
|
] }, `${window.btoa(s)}_${c}`)) })
|
|
2793
2793
|
] });
|
|
2794
2794
|
};
|
|
2795
|
-
const
|
|
2795
|
+
const Ri = ({
|
|
2796
2796
|
options: e,
|
|
2797
2797
|
allOption: t = !1,
|
|
2798
2798
|
allowMultiple: n = !0,
|
|
@@ -2800,7 +2800,7 @@ const Li = ({
|
|
|
2800
2800
|
},
|
|
2801
2801
|
className: s = ""
|
|
2802
2802
|
}) => {
|
|
2803
|
-
const i = A(), o = t ? [{ id: "all", text: typeof t != "boolean" && t.text || i.formatMessage({ id: "filters_all" }) }, ...e] : e, [c, m] =
|
|
2803
|
+
const i = A(), o = t ? [{ id: "all", text: typeof t != "boolean" && t.text || i.formatMessage({ id: "filters_all" }) }, ...e] : e, [c, m] = D(t ? ["all"] : []), l = (f, d) => {
|
|
2804
2804
|
let p = [];
|
|
2805
2805
|
c.includes(f) ? p = c.filter((h) => h !== f) : f === "all" ? p = ["all"] : n ? p = [...c.filter((h) => h !== "all"), f] : p = [f], m((h) => (r && typeof r == "function" && r({ current: p, previous: h }), p)), d && typeof d == "function" && d();
|
|
2806
2806
|
};
|
|
@@ -2828,7 +2828,7 @@ const Li = ({
|
|
|
2828
2828
|
i === "before-lang" ? r += `/${s}` : (r.includes(`/${n}/`) || (r += `/${n}`), r += `/${s}`);
|
|
2829
2829
|
}), r.includes(`/${n}/`) || (r += `/${n}`), r;
|
|
2830
2830
|
};
|
|
2831
|
-
const
|
|
2831
|
+
const Dt = { en: "English", es: "Español", fr: "Français", pt: "Português" }, Xe = "languageSwitcher_", Ii = ({
|
|
2832
2832
|
currentLanguage: e,
|
|
2833
2833
|
isOriginalLanguage: t = !1,
|
|
2834
2834
|
isHumanTranslation: n = !1,
|
|
@@ -2840,7 +2840,7 @@ const Ft = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2840
2840
|
label: c,
|
|
2841
2841
|
className: m = ""
|
|
2842
2842
|
}) => {
|
|
2843
|
-
const l = A(), [f, d] =
|
|
2843
|
+
const l = A(), [f, d] = D(e);
|
|
2844
2844
|
if (G(() => {
|
|
2845
2845
|
e !== f && d(e);
|
|
2846
2846
|
}, [e]), !r || !Object.values(r).some((y) => y && y.post_name))
|
|
@@ -2848,27 +2848,27 @@ const Ft = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2848
2848
|
const h = Object.keys(r), g = f !== e;
|
|
2849
2849
|
return /* @__PURE__ */ a.jsxs("div", { className: j("language-switcher text-small", o, m), children: [
|
|
2850
2850
|
/* @__PURE__ */ a.jsxs("nav", { children: [
|
|
2851
|
-
o !== "short" && /* @__PURE__ */ a.jsx("p", { children: c || l.formatMessage({ id: `${
|
|
2851
|
+
o !== "short" && /* @__PURE__ */ a.jsx("p", { children: c || l.formatMessage({ id: `${Xe}label` }) }),
|
|
2852
2852
|
/* @__PURE__ */ a.jsx("ul", { children: h.map((y) => {
|
|
2853
|
-
if (!
|
|
2853
|
+
if (!Dt[y])
|
|
2854
2854
|
return null;
|
|
2855
2855
|
let k = { className: y };
|
|
2856
|
-
return f === y ? k["aria-label"] = l.formatMessage({ id: `${
|
|
2856
|
+
return f === y ? k["aria-label"] = l.formatMessage({ id: `${Xe}selected` }, { language: Dt[y] }) : k = {
|
|
2857
2857
|
...k,
|
|
2858
2858
|
href: ns(y, i),
|
|
2859
2859
|
onClick: (b) => {
|
|
2860
2860
|
b.preventDefault(), b.stopPropagation(), d(y), s(y);
|
|
2861
2861
|
}
|
|
2862
|
-
}, /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
2862
|
+
}, /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(bt, { ...k, fallbackElement: "span", children: Dt[y] }) }, y);
|
|
2863
2863
|
}) }),
|
|
2864
|
-
o !== "short" && !g && /* @__PURE__ */ a.jsx("p", { children: l.formatMessage({ id: `${
|
|
2864
|
+
o !== "short" && !g && /* @__PURE__ */ a.jsx("p", { children: l.formatMessage({ id: `${Xe}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2865
2865
|
] }),
|
|
2866
2866
|
o !== "short" && !g && !t && !n && /* @__PURE__ */ a.jsx("small", {
|
|
2867
2867
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2868
2868
|
// @ts-ignore
|
|
2869
2869
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
2870
|
-
children: l.formatMessage({ id: `${
|
|
2871
|
-
email:
|
|
2870
|
+
children: l.formatMessage({ id: `${Xe}disclaimer` }, {
|
|
2871
|
+
email: qe.support,
|
|
2872
2872
|
link: (y) => {
|
|
2873
2873
|
const k = `mailto:${y}`;
|
|
2874
2874
|
return /* @__PURE__ */ a.jsx("a", { href: k, children: y });
|
|
@@ -2877,20 +2877,20 @@ const Ft = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2877
2877
|
})
|
|
2878
2878
|
] });
|
|
2879
2879
|
};
|
|
2880
|
-
const
|
|
2880
|
+
const Rt = Ua({ locale: "en", messages: Xt }), xt = ({
|
|
2881
2881
|
hasNextPage: e = !0,
|
|
2882
2882
|
loadNextPage: t = () => {
|
|
2883
2883
|
},
|
|
2884
2884
|
icon: n = !1,
|
|
2885
2885
|
messages: r = {
|
|
2886
|
-
button:
|
|
2887
|
-
endOfFeed:
|
|
2888
|
-
error:
|
|
2886
|
+
button: Rt.formatMessage({ id: "loadMore_button" }),
|
|
2887
|
+
endOfFeed: Rt.formatMessage({ id: "loadMore_endOfFeed" }),
|
|
2888
|
+
error: Rt.formatMessage({ id: "loadMore_error" })
|
|
2889
2889
|
},
|
|
2890
2890
|
className: s = "",
|
|
2891
2891
|
gtmContext: i = "LoadMore"
|
|
2892
2892
|
}) => {
|
|
2893
|
-
const [o, c] =
|
|
2893
|
+
const [o, c] = D(""), m = async (l) => {
|
|
2894
2894
|
try {
|
|
2895
2895
|
await t(l);
|
|
2896
2896
|
} catch (f) {
|
|
@@ -2898,7 +2898,7 @@ const Dt = Ua({ locale: "en", messages: Qt }), yt = ({
|
|
|
2898
2898
|
}
|
|
2899
2899
|
};
|
|
2900
2900
|
return /* @__PURE__ */ a.jsx("footer", { className: j("load-more", s), children: !o && e ? /* @__PURE__ */ a.jsx(
|
|
2901
|
-
|
|
2901
|
+
q,
|
|
2902
2902
|
{
|
|
2903
2903
|
variant: "secondary",
|
|
2904
2904
|
icon: n,
|
|
@@ -2911,10 +2911,10 @@ const Dt = Ua({ locale: "en", messages: Qt }), yt = ({
|
|
|
2911
2911
|
}
|
|
2912
2912
|
) : r.endOfFeed && (!o || o != null && o.includes("Cannot read items")) ? /* @__PURE__ */ a.jsx("p", { children: r.endOfFeed }) : o && /* @__PURE__ */ a.jsx("p", { className: "error", children: r.error }) });
|
|
2913
2913
|
};
|
|
2914
|
-
const
|
|
2915
|
-
let
|
|
2914
|
+
const aa = ({ variant: e = "default", version: t = "default", className: n = "", ...r }) => /* @__PURE__ */ a.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ a.jsx("a", { href: "/home/", className: j("logo", e, t, n), ...r, children: /* @__PURE__ */ a.jsx(ie, { children: /* @__PURE__ */ a.jsx(Te, { id: "apolitical" }) }) }) });
|
|
2915
|
+
let et = !1;
|
|
2916
2916
|
const as = ({ element: e = "div", id: t = "more-menu", options: n, className: r = "" }) => {
|
|
2917
|
-
const s = A(), i = ae(null), [o, c] =
|
|
2917
|
+
const s = A(), i = ae(null), [o, c] = D(!1), m = (l) => {
|
|
2918
2918
|
i.current && l.target instanceof HTMLElement && !i.current.contains(l.target) && c(!1);
|
|
2919
2919
|
};
|
|
2920
2920
|
return G(() => (document.addEventListener("click", m, !0), () => {
|
|
@@ -2924,7 +2924,7 @@ const as = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2924
2924
|
className: j("more-menu text-medium", r),
|
|
2925
2925
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2926
2926
|
/* @__PURE__ */ a.jsx(
|
|
2927
|
-
|
|
2927
|
+
q,
|
|
2928
2928
|
{
|
|
2929
2929
|
variant: "tertiary",
|
|
2930
2930
|
size: "medium",
|
|
@@ -2943,16 +2943,16 @@ const as = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2943
2943
|
c(!1), typeof f == "function" && f(k);
|
|
2944
2944
|
},
|
|
2945
2945
|
onFocus: () => {
|
|
2946
|
-
|
|
2946
|
+
et && (clearTimeout(et), et = !1);
|
|
2947
2947
|
},
|
|
2948
2948
|
onBlur: () => {
|
|
2949
|
-
|
|
2949
|
+
et = setTimeout(() => {
|
|
2950
2950
|
c(!1);
|
|
2951
2951
|
}, 100);
|
|
2952
2952
|
}
|
|
2953
2953
|
};
|
|
2954
2954
|
return l && (y.href = l), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
2955
|
-
|
|
2955
|
+
q,
|
|
2956
2956
|
{
|
|
2957
2957
|
variant: "tertiary",
|
|
2958
2958
|
size: "medium",
|
|
@@ -3011,7 +3011,7 @@ const ss = [
|
|
|
3011
3011
|
className: "gtm-trackable",
|
|
3012
3012
|
children: [
|
|
3013
3013
|
/* @__PURE__ */ a.jsx(
|
|
3014
|
-
|
|
3014
|
+
Ve,
|
|
3015
3015
|
{
|
|
3016
3016
|
name: (n == null ? void 0 : n.name) || "",
|
|
3017
3017
|
src: n != null && n.image ? n.image.thumbnail : ""
|
|
@@ -3022,7 +3022,7 @@ const ss = [
|
|
|
3022
3022
|
}
|
|
3023
3023
|
) })
|
|
3024
3024
|
] });
|
|
3025
|
-
},
|
|
3025
|
+
}, Ze = (e, t, n) => `${e}?share=${t}${n ? `&uuid=${n}` : ""}`, os = ({
|
|
3026
3026
|
title: e,
|
|
3027
3027
|
link: t,
|
|
3028
3028
|
referrer: n
|
|
@@ -3031,21 +3031,21 @@ const ss = [
|
|
|
3031
3031
|
key: "linkedin",
|
|
3032
3032
|
icon: "social_linkedin",
|
|
3033
3033
|
url: `https://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(
|
|
3034
|
-
`${
|
|
3034
|
+
`${Ze(t, "linkedin", n)}&src=linkedin`
|
|
3035
3035
|
)}&title=${encodeURIComponent(e)}&source=Apolitical`
|
|
3036
3036
|
},
|
|
3037
3037
|
{
|
|
3038
3038
|
key: "twitter",
|
|
3039
3039
|
icon: "social_twitter",
|
|
3040
3040
|
url: `https://twitter.com/share?ref_src=twsrc%5Etfw&url=${encodeURIComponent(
|
|
3041
|
-
`${
|
|
3041
|
+
`${Ze(t, "twitter", n)}&src=twitter`
|
|
3042
3042
|
)}&text=${encodeURIComponent(e)}&via=${encodeURIComponent("apoliticalco")}`
|
|
3043
3043
|
},
|
|
3044
3044
|
{
|
|
3045
3045
|
key: "facebook",
|
|
3046
3046
|
icon: "social_facebook",
|
|
3047
3047
|
url: `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(
|
|
3048
|
-
`${
|
|
3048
|
+
`${Ze(t, "facebook", n)}`
|
|
3049
3049
|
)}&t=${e}`
|
|
3050
3050
|
},
|
|
3051
3051
|
{
|
|
@@ -3054,13 +3054,13 @@ const ss = [
|
|
|
3054
3054
|
url: `mailto:?subject=${encodeURIComponent(e)}&body=${encodeURIComponent(
|
|
3055
3055
|
`${e}
|
|
3056
3056
|
|
|
3057
|
-
${
|
|
3057
|
+
${Ze(t, "mailto", n)}&src=email`
|
|
3058
3058
|
)}`
|
|
3059
3059
|
},
|
|
3060
3060
|
{
|
|
3061
3061
|
key: "clipboard-copy",
|
|
3062
3062
|
icon: "share_copy-link",
|
|
3063
|
-
url:
|
|
3063
|
+
url: Ze(t, "copy", n),
|
|
3064
3064
|
shouldRender: () => navigator && navigator.clipboard && navigator.clipboard.writeText,
|
|
3065
3065
|
onClick: (r, s) => (r.preventDefault(), r.stopPropagation(), navigator.clipboard.writeText(s))
|
|
3066
3066
|
}
|
|
@@ -3082,7 +3082,7 @@ const cs = "shareLinks_", Oi = ({
|
|
|
3082
3082
|
return null;
|
|
3083
3083
|
const g = {};
|
|
3084
3084
|
return h && (g.onClick = (y) => h(y, d)), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
3085
|
-
|
|
3085
|
+
q,
|
|
3086
3086
|
{
|
|
3087
3087
|
size: s,
|
|
3088
3088
|
variant: "tertiary",
|
|
@@ -3115,7 +3115,7 @@ const Bi = ({ tabs: e, className: t = "" }) => {
|
|
|
3115
3115
|
}
|
|
3116
3116
|
}
|
|
3117
3117
|
}
|
|
3118
|
-
const [s, i] =
|
|
3118
|
+
const [s, i] = D(
|
|
3119
3119
|
(m = e[r]) != null && m.id ? e[r].id : n(e[r].id, e[r].text, r)
|
|
3120
3120
|
), o = [], c = [];
|
|
3121
3121
|
return e.forEach(({ id: l, text: f, content: d, href: p }, h) => {
|
|
@@ -3164,31 +3164,31 @@ const ls = {
|
|
|
3164
3164
|
className: n = "",
|
|
3165
3165
|
children: r
|
|
3166
3166
|
}) => {
|
|
3167
|
-
const s =
|
|
3167
|
+
const s = We(!0);
|
|
3168
3168
|
let i = r;
|
|
3169
3169
|
return F.Children.count(r) === 1 && (i = F.Children.toArray(r)[0], i.props && (i = i.props.children)), /* @__PURE__ */ a.jsx("section", { className: j("columns", `layout-${e}`, n), children: F.Children.map(i, (o, c) => t !== !1 && c === t && s && s < ls[e] ? null : o) });
|
|
3170
|
-
}, Zi = ({ activeLink: e, ...t }) => /* @__PURE__ */ a.jsx(
|
|
3170
|
+
}, Zi = ({ activeLink: e, ...t }) => /* @__PURE__ */ a.jsx(yt, { children: /* @__PURE__ */ a.jsx(ds, { layout: "1-3", children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3171
3171
|
/* @__PURE__ */ a.jsx(is, { activeLink: e }),
|
|
3172
3172
|
/* @__PURE__ */ a.jsx(qr, { ...t })
|
|
3173
3173
|
] }) }) });
|
|
3174
|
-
const
|
|
3175
|
-
const e = A(), [t, n, r] = Ka(
|
|
3176
|
-
|
|
3174
|
+
const It = "cookieBanner_", Ot = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], Bt = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), us = () => {
|
|
3175
|
+
const e = A(), [t, n, r] = Ka(Ot), [s, i] = D(!t["apol-cookie-banner"]), o = () => {
|
|
3176
|
+
Ot.forEach((f) => {
|
|
3177
3177
|
n(f, !0, {
|
|
3178
3178
|
path: "/",
|
|
3179
|
-
expires:
|
|
3179
|
+
expires: Bt,
|
|
3180
3180
|
domain: f === "apolitical-performance-cookie-consent" ? ".apolitical.co" : void 0
|
|
3181
3181
|
});
|
|
3182
3182
|
}), i(!1), window.location.reload();
|
|
3183
3183
|
}, c = () => {
|
|
3184
3184
|
n("apol-cookie-banner", !0, {
|
|
3185
3185
|
path: "/",
|
|
3186
|
-
expires:
|
|
3187
|
-
}),
|
|
3186
|
+
expires: Bt
|
|
3187
|
+
}), Ot.forEach((f) => {
|
|
3188
3188
|
if (f === "apol-cookie-banner") {
|
|
3189
3189
|
n(f, !0, {
|
|
3190
3190
|
path: "/",
|
|
3191
|
-
expires:
|
|
3191
|
+
expires: Bt
|
|
3192
3192
|
});
|
|
3193
3193
|
return;
|
|
3194
3194
|
}
|
|
@@ -3210,12 +3210,12 @@ const Rt = "cookieBanner_", Lt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
3210
3210
|
className: "gtm-trackable",
|
|
3211
3211
|
"data-gtm-event-context": "cookie-banner",
|
|
3212
3212
|
"data-gtm-event-type": `cookie-${f.gtmType}-click`,
|
|
3213
|
-
children: e.formatMessage({ id: `${
|
|
3213
|
+
children: e.formatMessage({ id: `${It}buttons_${f.id}` })
|
|
3214
3214
|
});
|
|
3215
3215
|
}), /* @__PURE__ */ a.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
3216
|
-
/* @__PURE__ */ a.jsx("h6", { children: e.formatMessage({ id: `${
|
|
3217
|
-
/* @__PURE__ */ a.jsx("p", { children: e.formatMessage({ id: `${
|
|
3218
|
-
/* @__PURE__ */ a.jsx(
|
|
3216
|
+
/* @__PURE__ */ a.jsx("h6", { children: e.formatMessage({ id: `${It}title` }) }),
|
|
3217
|
+
/* @__PURE__ */ a.jsx("p", { children: e.formatMessage({ id: `${It}text` }) }),
|
|
3218
|
+
/* @__PURE__ */ a.jsx(_t, { buttons: l })
|
|
3219
3219
|
] });
|
|
3220
3220
|
}, ke = {
|
|
3221
3221
|
platform: {
|
|
@@ -3281,11 +3281,11 @@ const Rt = "cookieBanner_", Lt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
3281
3281
|
text: {
|
|
3282
3282
|
order: ["dataProtection", "euDataProtection"],
|
|
3283
3283
|
dataProtection: {
|
|
3284
|
-
email:
|
|
3284
|
+
email: qe["data-protection"].default,
|
|
3285
3285
|
gtmType: "email-dpo-link"
|
|
3286
3286
|
},
|
|
3287
3287
|
euDataProtection: {
|
|
3288
|
-
email:
|
|
3288
|
+
email: qe["data-protection"].eu,
|
|
3289
3289
|
gtmType: "email-eu-dpo-link"
|
|
3290
3290
|
}
|
|
3291
3291
|
}
|
|
@@ -3297,10 +3297,10 @@ const Rt = "cookieBanner_", Lt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
3297
3297
|
registered: { address: !0 },
|
|
3298
3298
|
berlin: { address: !0 },
|
|
3299
3299
|
support: {
|
|
3300
|
-
email:
|
|
3300
|
+
email: qe.support,
|
|
3301
3301
|
gtmType: "concierge-email-click"
|
|
3302
3302
|
},
|
|
3303
|
-
business: { email:
|
|
3303
|
+
business: { email: qe.general, gtmType: "hello-email-click" }
|
|
3304
3304
|
}
|
|
3305
3305
|
},
|
|
3306
3306
|
social: {
|
|
@@ -3310,11 +3310,11 @@ const Rt = "cookieBanner_", Lt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
3310
3310
|
facebook: { href: "https://www.facebook.com/apoliticalco" }
|
|
3311
3311
|
}
|
|
3312
3312
|
};
|
|
3313
|
-
const
|
|
3313
|
+
const Pe = "footer_", lt = "SiteFooter", Cn = ({ group: e }) => {
|
|
3314
3314
|
const t = ke[e].order || [];
|
|
3315
3315
|
let n = !1;
|
|
3316
|
-
return "text" in ke[e] && (n = ke[e].text), /* @__PURE__ */ a.jsxs(
|
|
3317
|
-
/* @__PURE__ */ a.jsx("p", { className: "pre-title", children: /* @__PURE__ */ a.jsx(
|
|
3316
|
+
return "text" in ke[e] && (n = ke[e].text), /* @__PURE__ */ a.jsxs(Ue, { children: [
|
|
3317
|
+
/* @__PURE__ */ a.jsx("p", { className: "pre-title", children: /* @__PURE__ */ a.jsx(Te, { id: `${Pe}${e}` }) }),
|
|
3318
3318
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ a.jsx("ul", { className: "text-medium", children: t.map((r) => {
|
|
3319
3319
|
if (["order", "child", "text"].includes(r))
|
|
3320
3320
|
return null;
|
|
@@ -3324,23 +3324,23 @@ const Me = "footer_", ot = "SiteFooter", En = ({ group: e }) => {
|
|
|
3324
3324
|
{
|
|
3325
3325
|
href: s,
|
|
3326
3326
|
className: "gtm-trackable",
|
|
3327
|
-
"data-gtm-event-context":
|
|
3327
|
+
"data-gtm-event-context": lt,
|
|
3328
3328
|
"data-gtm-event-type": i,
|
|
3329
3329
|
...o,
|
|
3330
|
-
children: /* @__PURE__ */ a.jsx(
|
|
3330
|
+
children: /* @__PURE__ */ a.jsx(Te, { id: `${Pe}${e}_${r}` })
|
|
3331
3331
|
}
|
|
3332
3332
|
) }, `${e}_${r}`);
|
|
3333
3333
|
}) }),
|
|
3334
|
-
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ a.jsx("dl", { className: "text-medium", children: n.order.map((r) => /* @__PURE__ */ a.jsxs(
|
|
3335
|
-
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsx(
|
|
3334
|
+
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ a.jsx("dl", { className: "text-medium", children: n.order.map((r) => /* @__PURE__ */ a.jsxs(Ue, { children: [
|
|
3335
|
+
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsx(Te, { id: `${Pe}${e}_${r}` }) }),
|
|
3336
3336
|
/* @__PURE__ */ a.jsxs("dd", { children: [
|
|
3337
|
-
typeof n != "boolean" && n[r].address && /* @__PURE__ */ a.jsx("address", { children: /* @__PURE__ */ a.jsx(
|
|
3337
|
+
typeof n != "boolean" && n[r].address && /* @__PURE__ */ a.jsx("address", { children: /* @__PURE__ */ a.jsx(Te, { id: `${Pe}${e}_${r}_address`, values: { br: /* @__PURE__ */ a.jsx("br", {}) } }) }),
|
|
3338
3338
|
typeof n != "boolean" && n[r].email && /* @__PURE__ */ a.jsx(
|
|
3339
3339
|
"a",
|
|
3340
3340
|
{
|
|
3341
3341
|
href: `mailto:${n[r].email}`,
|
|
3342
3342
|
className: "gtm-trackable",
|
|
3343
|
-
"data-gtm-event-context":
|
|
3343
|
+
"data-gtm-event-context": lt,
|
|
3344
3344
|
"data-gtm-event-type": n[r].gtmType,
|
|
3345
3345
|
children: n[r].email
|
|
3346
3346
|
}
|
|
@@ -3348,21 +3348,21 @@ const Me = "footer_", ot = "SiteFooter", En = ({ group: e }) => {
|
|
|
3348
3348
|
] })
|
|
3349
3349
|
] }, `dl-${e}-${r}`)) })
|
|
3350
3350
|
] }, e);
|
|
3351
|
-
},
|
|
3352
|
-
/* @__PURE__ */ a.jsx(
|
|
3351
|
+
}, ra = () => /* @__PURE__ */ a.jsx("div", { id: "footer", children: /* @__PURE__ */ a.jsxs("div", { className: "wrapper", children: [
|
|
3352
|
+
/* @__PURE__ */ a.jsx(Zn, { element: "hr" }),
|
|
3353
3353
|
/* @__PURE__ */ a.jsx(
|
|
3354
|
-
|
|
3354
|
+
aa,
|
|
3355
3355
|
{
|
|
3356
3356
|
variant: "inverted",
|
|
3357
3357
|
version: "full",
|
|
3358
3358
|
className: "gtm-trackable",
|
|
3359
|
-
"data-gtm-event-context":
|
|
3359
|
+
"data-gtm-event-context": lt,
|
|
3360
3360
|
"data-gtm-event-type": "logo-homepage-link"
|
|
3361
3361
|
}
|
|
3362
3362
|
),
|
|
3363
3363
|
/* @__PURE__ */ a.jsx("footer", { children: ["platform", "community", "company", "contact"].map((e) => /* @__PURE__ */ a.jsxs("div", { className: "group", children: [
|
|
3364
|
-
/* @__PURE__ */ a.jsx(
|
|
3365
|
-
Object.keys(ke[e]).includes("child") && /* @__PURE__ */ a.jsx(
|
|
3364
|
+
/* @__PURE__ */ a.jsx(Cn, { group: e }),
|
|
3365
|
+
Object.keys(ke[e]).includes("child") && /* @__PURE__ */ a.jsx(Cn, { group: ke[e].child })
|
|
3366
3366
|
] }, e)) }),
|
|
3367
3367
|
/* @__PURE__ */ a.jsx("hr", {}),
|
|
3368
3368
|
/* @__PURE__ */ a.jsxs("div", { className: "sub-footer", children: [
|
|
@@ -3375,22 +3375,22 @@ const Me = "footer_", ot = "SiteFooter", En = ({ group: e }) => {
|
|
|
3375
3375
|
target: "_blank",
|
|
3376
3376
|
rel: "noopener noreferrer",
|
|
3377
3377
|
className: "gtm-trackable",
|
|
3378
|
-
"data-gtm-event-context":
|
|
3378
|
+
"data-gtm-event-context": lt,
|
|
3379
3379
|
"data-gtm-event-type": "social-click",
|
|
3380
|
-
children: /* @__PURE__ */ a.jsx("span", { className: "hidden", children: /* @__PURE__ */ a.jsx(
|
|
3380
|
+
children: /* @__PURE__ */ a.jsx("span", { className: "hidden", children: /* @__PURE__ */ a.jsx(Te, { id: `${Pe}social_${e}` }) })
|
|
3381
3381
|
}
|
|
3382
3382
|
) }, e);
|
|
3383
3383
|
}) }),
|
|
3384
|
-
/* @__PURE__ */ a.jsx("small", { children: /* @__PURE__ */ a.jsx(
|
|
3384
|
+
/* @__PURE__ */ a.jsx("small", { children: /* @__PURE__ */ a.jsx(Te, { id: `${Pe}copyright`, values: { currentYear: (/* @__PURE__ */ new Date()).getFullYear() } }) })
|
|
3385
3385
|
] })
|
|
3386
3386
|
] }) });
|
|
3387
|
-
const
|
|
3388
|
-
const s = A(), [i, o] =
|
|
3387
|
+
const tt = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, resendVerificationCode: r }) => {
|
|
3388
|
+
const s = A(), [i, o] = D({ path: `${tt}default`, type: "default", link: {}, mail: {}, error: "" }), [c, m] = D(!1), l = Rn(
|
|
3389
3389
|
(h) => {
|
|
3390
3390
|
h.preventDefault(), h.stopPropagation();
|
|
3391
3391
|
const g = (y) => {
|
|
3392
3392
|
o({
|
|
3393
|
-
path: `${
|
|
3393
|
+
path: `${tt}error_verificationFailedToSend`,
|
|
3394
3394
|
type: "error",
|
|
3395
3395
|
link: {
|
|
3396
3396
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
@@ -3410,7 +3410,7 @@ const Xe = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3410
3410
|
});
|
|
3411
3411
|
};
|
|
3412
3412
|
if (typeof r != "function") {
|
|
3413
|
-
g(s.formatMessage({ id: `${
|
|
3413
|
+
g(s.formatMessage({ id: `${tt}error_noFunction` }));
|
|
3414
3414
|
return;
|
|
3415
3415
|
}
|
|
3416
3416
|
m(!0), r(t).then(() => {
|
|
@@ -3426,7 +3426,7 @@ const Xe = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3426
3426
|
);
|
|
3427
3427
|
G(
|
|
3428
3428
|
() => {
|
|
3429
|
-
let h =
|
|
3429
|
+
let h = tt, g = "default", y = {}, k = {};
|
|
3430
3430
|
switch (e) {
|
|
3431
3431
|
case "gov":
|
|
3432
3432
|
h += "autoApproved", g = "success";
|
|
@@ -3506,28 +3506,28 @@ const Xe = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3506
3506
|
)
|
|
3507
3507
|
) });
|
|
3508
3508
|
};
|
|
3509
|
-
const
|
|
3510
|
-
[
|
|
3511
|
-
[
|
|
3512
|
-
[
|
|
3509
|
+
const nt = "passwordRules_", sa = "isMoreThanEightCharacters", ia = "includesNumberAndSymbol", oa = "includesLowerAndUppercase", ms = {
|
|
3510
|
+
[sa]: "8Characters",
|
|
3511
|
+
[ia]: "numberSymbol",
|
|
3512
|
+
[oa]: "lowercaseUppercase"
|
|
3513
3513
|
}, fs = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
|
|
3514
3514
|
const n = A();
|
|
3515
3515
|
return /* @__PURE__ */ a.jsxs("aside", { className: j("password-rules", t), children: [
|
|
3516
|
-
/* @__PURE__ */ a.jsx("small", { children: n.formatMessage({ id: `${
|
|
3517
|
-
/* @__PURE__ */ a.jsx("ul", { children: [
|
|
3516
|
+
/* @__PURE__ */ a.jsx("small", { children: n.formatMessage({ id: `${nt}intro` }) }),
|
|
3517
|
+
/* @__PURE__ */ a.jsx("ul", { children: [sa, ia, oa].map((r) => /* @__PURE__ */ a.jsxs("li", { className: j({ matches: e[r] }), children: [
|
|
3518
3518
|
/* @__PURE__ */ a.jsxs(ie, { children: [
|
|
3519
|
-
n.formatMessage({ id: `${
|
|
3519
|
+
n.formatMessage({ id: `${nt}rule_label` }),
|
|
3520
3520
|
" "
|
|
3521
3521
|
] }),
|
|
3522
|
-
/* @__PURE__ */ a.jsx("span", { children: n.formatMessage({ id: `${
|
|
3522
|
+
/* @__PURE__ */ a.jsx("span", { children: n.formatMessage({ id: `${nt}rule_${ms[r]}` }) }),
|
|
3523
3523
|
!e[r] && /* @__PURE__ */ a.jsxs(ie, { element: "strong", children: [
|
|
3524
3524
|
" ",
|
|
3525
3525
|
" ",
|
|
3526
|
-
n.formatMessage({ id: `${
|
|
3526
|
+
n.formatMessage({ id: `${nt}notMet` })
|
|
3527
3527
|
] })
|
|
3528
3528
|
] }, `rule-${r}`)) })
|
|
3529
3529
|
] });
|
|
3530
|
-
}, Hi =
|
|
3530
|
+
}, Hi = De(fs);
|
|
3531
3531
|
const Ui = ({
|
|
3532
3532
|
text: e = {},
|
|
3533
3533
|
topRating: t = 5,
|
|
@@ -3537,7 +3537,7 @@ const Ui = ({
|
|
|
3537
3537
|
className: i = "",
|
|
3538
3538
|
hasLoaded: o = !1
|
|
3539
3539
|
}) => {
|
|
3540
|
-
const c = A(), [m, l] =
|
|
3540
|
+
const c = A(), [m, l] = D({ setUp: !1, id: null, rating: null, disabled: !0 }), f = async () => {
|
|
3541
3541
|
try {
|
|
3542
3542
|
const b = await n();
|
|
3543
3543
|
l((_) => ({ ..._, setUp: !0, id: b && b.id, disabled: !1 }));
|
|
@@ -3570,7 +3570,7 @@ const Ui = ({
|
|
|
3570
3570
|
/* @__PURE__ */ a.jsx("ol", { children: Array.from(new Array(t).keys()).map((b) => {
|
|
3571
3571
|
const _ = b + 1;
|
|
3572
3572
|
return /* @__PURE__ */ a.jsx("li", { className: j({ selected: p && _ <= p }), children: /* @__PURE__ */ a.jsx(
|
|
3573
|
-
|
|
3573
|
+
q,
|
|
3574
3574
|
{
|
|
3575
3575
|
variant: "tertiary",
|
|
3576
3576
|
size: "small",
|
|
@@ -3597,7 +3597,7 @@ const ps = ({
|
|
|
3597
3597
|
gtmEvent: i = "form-submission"
|
|
3598
3598
|
}) => {
|
|
3599
3599
|
const { searchIsOpen: o = !0, isDesktopVersion: c = !1 } = n || {}, m = A(), l = ae(null);
|
|
3600
|
-
|
|
3600
|
+
Fe(() => {
|
|
3601
3601
|
!n || c || !o || l.current && l.current.focus();
|
|
3602
3602
|
}, [o]);
|
|
3603
3603
|
const f = (d) => {
|
|
@@ -3654,18 +3654,18 @@ const hs = ({
|
|
|
3654
3654
|
initialFormStatus: l = "NOT_SUBMITTED"
|
|
3655
3655
|
/* NOT_SUBMITTED */
|
|
3656
3656
|
}) => {
|
|
3657
|
-
const [f, d] =
|
|
3657
|
+
const [f, d] = D([]), [p, h] = D(!0), [g, y] = D(l), { formatMessage: k } = A(), b = async (w) => {
|
|
3658
3658
|
w.preventDefault();
|
|
3659
3659
|
try {
|
|
3660
3660
|
await m(f), d([]), y(
|
|
3661
3661
|
"SUCCESS"
|
|
3662
3662
|
/* SUCCESS */
|
|
3663
3663
|
);
|
|
3664
|
-
} catch (
|
|
3664
|
+
} catch (E) {
|
|
3665
3665
|
y(
|
|
3666
3666
|
"ERROR"
|
|
3667
3667
|
/* ERROR */
|
|
3668
|
-
), c(
|
|
3668
|
+
), c(E);
|
|
3669
3669
|
}
|
|
3670
3670
|
}, _ = (w) => {
|
|
3671
3671
|
w.preventDefault(), y(
|
|
@@ -3683,11 +3683,11 @@ const hs = ({
|
|
|
3683
3683
|
" ",
|
|
3684
3684
|
k({ id: "inviteForm_error" })
|
|
3685
3685
|
] }) }),
|
|
3686
|
-
/* @__PURE__ */ a.jsx(
|
|
3686
|
+
/* @__PURE__ */ a.jsx(Ee, {}),
|
|
3687
3687
|
/* @__PURE__ */ a.jsx("div", { className: "footer", children: g === "SUCCESS" ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3688
|
-
/* @__PURE__ */ a.jsx(
|
|
3689
|
-
/* @__PURE__ */ a.jsx(
|
|
3690
|
-
] }) : /* @__PURE__ */ a.jsx(
|
|
3688
|
+
/* @__PURE__ */ a.jsx(q, { variant: "secondary", onClick: _, children: k({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
3689
|
+
/* @__PURE__ */ a.jsx(q, { onClick: v, children: k({ id: "inviteForm_ctaDone" }) })
|
|
3690
|
+
] }) : /* @__PURE__ */ a.jsx(q, { onClick: _, children: k({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
3691
3691
|
] }) : /* @__PURE__ */ a.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ a.jsxs(
|
|
3692
3692
|
"form",
|
|
3693
3693
|
{
|
|
@@ -3709,27 +3709,27 @@ const hs = ({
|
|
|
3709
3709
|
d(w), h(!w.length);
|
|
3710
3710
|
},
|
|
3711
3711
|
autoFocus: !1,
|
|
3712
|
-
getLabel: (w,
|
|
3712
|
+
getLabel: (w, E, M) => /* @__PURE__ */ a.jsxs("div", { className: "email text-medium", children: [
|
|
3713
3713
|
/* @__PURE__ */ a.jsx("div", { "data-tag-item": !0, children: w }),
|
|
3714
3714
|
/* @__PURE__ */ a.jsx(
|
|
3715
|
-
|
|
3715
|
+
q,
|
|
3716
3716
|
{
|
|
3717
3717
|
variant: "tertiary",
|
|
3718
3718
|
size: "small",
|
|
3719
3719
|
icon: { icon: "close" },
|
|
3720
3720
|
onClick: () => {
|
|
3721
|
-
M(
|
|
3721
|
+
M(E), h(!f.length);
|
|
3722
3722
|
},
|
|
3723
3723
|
className: "remove-email-button",
|
|
3724
3724
|
screenreaderText: k({ id: "overlay_close" })
|
|
3725
3725
|
}
|
|
3726
3726
|
)
|
|
3727
|
-
] },
|
|
3727
|
+
] }, E)
|
|
3728
3728
|
}
|
|
3729
3729
|
)
|
|
3730
3730
|
] }),
|
|
3731
|
-
/* @__PURE__ */ a.jsx(
|
|
3732
|
-
/* @__PURE__ */ a.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ a.jsx(
|
|
3731
|
+
/* @__PURE__ */ a.jsx(Ee, {}),
|
|
3732
|
+
/* @__PURE__ */ a.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ a.jsx(q, { className: "sendEmailsButton", disabled: p, children: n }) })
|
|
3733
3733
|
]
|
|
3734
3734
|
}
|
|
3735
3735
|
) });
|
|
@@ -3779,7 +3779,7 @@ const hs = ({
|
|
|
3779
3779
|
return e[r];
|
|
3780
3780
|
if (!t.includes("."))
|
|
3781
3781
|
continue;
|
|
3782
|
-
const s =
|
|
3782
|
+
const s = On(e[r], t);
|
|
3783
3783
|
if (!(typeof s > "u") && (!n || s[t] && s[t].includes(n) || s.value && s.value.includes(n) || s.toString().includes(n)))
|
|
3784
3784
|
return e[r];
|
|
3785
3785
|
}
|
|
@@ -3833,7 +3833,7 @@ const hs = ({
|
|
|
3833
3833
|
}, 250);
|
|
3834
3834
|
}
|
|
3835
3835
|
}
|
|
3836
|
-
},
|
|
3836
|
+
}, dt = {
|
|
3837
3837
|
order: ["home", "topics", "partners", "account"],
|
|
3838
3838
|
home: {
|
|
3839
3839
|
href: "/home/",
|
|
@@ -3908,7 +3908,7 @@ const hs = ({
|
|
|
3908
3908
|
props: { variant: "primary" }
|
|
3909
3909
|
}
|
|
3910
3910
|
}
|
|
3911
|
-
},
|
|
3911
|
+
}, ut = ({
|
|
3912
3912
|
id: e,
|
|
3913
3913
|
isLoggedIn: t = !1,
|
|
3914
3914
|
isDesktopVersion: n = !1,
|
|
@@ -3917,7 +3917,7 @@ const hs = ({
|
|
|
3917
3917
|
},
|
|
3918
3918
|
doTrack: i = null
|
|
3919
3919
|
}) => {
|
|
3920
|
-
const o = A(), c =
|
|
3920
|
+
const o = A(), c = On(dt, e);
|
|
3921
3921
|
if (!c || c.onlyShow && (c.onlyShow === "logged-in" && !t || c.onlyShow === "logged-out" && t))
|
|
3922
3922
|
return null;
|
|
3923
3923
|
const m = "doTrack" in c, l = i === null ? m ? c.doTrack : !0 : i, f = e.includes("buttons.");
|
|
@@ -3971,7 +3971,7 @@ const hs = ({
|
|
|
3971
3971
|
});
|
|
3972
3972
|
}
|
|
3973
3973
|
return /* @__PURE__ */ a.jsxs("li", { className: j({ [c.className]: c.className, "has-submenu": h, parent: g, active: y }), role: "none", ...k, children: [
|
|
3974
|
-
p ? F.createElement(f ?
|
|
3974
|
+
p ? F.createElement(f ? q : "a", p, o.formatMessage({ id: d })) : o.formatMessage({ id: d }),
|
|
3975
3975
|
c.order && /* @__PURE__ */ a.jsx("ul", { ...b, children: c.order.map((_) => {
|
|
3976
3976
|
if (!c[_])
|
|
3977
3977
|
return null;
|
|
@@ -3984,13 +3984,13 @@ const hs = ({
|
|
|
3984
3984
|
};
|
|
3985
3985
|
return c[_].order ? /* @__PURE__ */ a.jsxs("li", { className: j({ [c[_].className]: c[_].className }), children: [
|
|
3986
3986
|
o.formatMessage({ id: `${d}_${_}` }),
|
|
3987
|
-
/* @__PURE__ */ a.jsx("ul", { children: c[_].order.map((w) => /* @__PURE__ */ a.jsx(
|
|
3988
|
-
] }, _) : /* @__PURE__ */ a.jsx(
|
|
3987
|
+
/* @__PURE__ */ a.jsx("ul", { children: c[_].order.map((w) => /* @__PURE__ */ a.jsx(ut, { id: `${e}.${_}.${w}`, ...v }, w)) })
|
|
3988
|
+
] }, _) : /* @__PURE__ */ a.jsx(ut, { id: `${e}.${_}`, ...v }, _);
|
|
3989
3989
|
}) })
|
|
3990
3990
|
] }, e);
|
|
3991
3991
|
};
|
|
3992
|
-
const gs = { height: 67, height_desktop: 83 },
|
|
3993
|
-
const t = A(), n = _e(we), r =
|
|
3992
|
+
const gs = { height: 67, height_desktop: 83 }, ca = ({ showNavigation: e = !0 }) => {
|
|
3993
|
+
const t = A(), n = _e(we), r = We(!0, !0), s = n && typeof n.id == "string", i = ht(
|
|
3994
3994
|
() => z.getIsDesktopVersion(s, r),
|
|
3995
3995
|
[s, r]
|
|
3996
3996
|
), [o, c] = Oa(vr, {
|
|
@@ -4015,7 +4015,7 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
4015
4015
|
const d = (h, g) => {
|
|
4016
4016
|
z.handleMenus({ id: h, value: g, menus: l, dispatch: c });
|
|
4017
4017
|
}, p = ae(null);
|
|
4018
|
-
return
|
|
4018
|
+
return Fe(() => {
|
|
4019
4019
|
l.navigation && z.autoFocus({
|
|
4020
4020
|
menu: "navigation",
|
|
4021
4021
|
navigationRef: p,
|
|
@@ -4023,7 +4023,7 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
4023
4023
|
focusElements: f,
|
|
4024
4024
|
dispatch: c
|
|
4025
4025
|
});
|
|
4026
|
-
}, [l.navigation]),
|
|
4026
|
+
}, [l.navigation]), Fe(() => {
|
|
4027
4027
|
l.account && z.autoFocus({
|
|
4028
4028
|
menu: "account",
|
|
4029
4029
|
navigationRef: p,
|
|
@@ -4050,7 +4050,7 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
4050
4050
|
children: t.formatMessage({ id: "header_skip" })
|
|
4051
4051
|
}
|
|
4052
4052
|
),
|
|
4053
|
-
/* @__PURE__ */ a.jsx(
|
|
4053
|
+
/* @__PURE__ */ a.jsx(aa, {}),
|
|
4054
4054
|
e && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4055
4055
|
!i.navigation && /* @__PURE__ */ a.jsx(
|
|
4056
4056
|
"button",
|
|
@@ -4077,8 +4077,8 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
4077
4077
|
hidden: i.navigation || l.account ? !1 : !l.navigation,
|
|
4078
4078
|
role: "menu",
|
|
4079
4079
|
"data-showing": !i.navigation && l.account ? "account" : "default",
|
|
4080
|
-
children:
|
|
4081
|
-
|
|
4080
|
+
children: dt.order.map((h) => /* @__PURE__ */ a.jsx(
|
|
4081
|
+
ut,
|
|
4082
4082
|
{
|
|
4083
4083
|
id: h,
|
|
4084
4084
|
isLoggedIn: s,
|
|
@@ -4141,7 +4141,7 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
4141
4141
|
id: `header_account_${l.account ? "hide" : "show"}`
|
|
4142
4142
|
}) }),
|
|
4143
4143
|
/* @__PURE__ */ a.jsx(
|
|
4144
|
-
|
|
4144
|
+
Ve,
|
|
4145
4145
|
{
|
|
4146
4146
|
name: n && n.name || "",
|
|
4147
4147
|
src: n && n.image && n.image.thumbnail || ""
|
|
@@ -4149,7 +4149,7 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
4149
4149
|
)
|
|
4150
4150
|
]
|
|
4151
4151
|
}
|
|
4152
|
-
) : /* @__PURE__ */ a.jsx("ul", { className: "sign-in-buttons", children:
|
|
4152
|
+
) : /* @__PURE__ */ a.jsx("ul", { className: "sign-in-buttons", children: dt.buttons.order.map((h) => /* @__PURE__ */ a.jsx(ut, { id: `buttons.${h}` }, h)) })
|
|
4153
4153
|
] })
|
|
4154
4154
|
]
|
|
4155
4155
|
}
|
|
@@ -4165,7 +4165,7 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
4165
4165
|
)
|
|
4166
4166
|
] });
|
|
4167
4167
|
};
|
|
4168
|
-
const
|
|
4168
|
+
const la = ({ element: e = "section", children: t, className: n, ...r }) => F.createElement(
|
|
4169
4169
|
e,
|
|
4170
4170
|
{
|
|
4171
4171
|
className: j("modal", n),
|
|
@@ -4173,7 +4173,7 @@ const ca = ({ element: e = "section", children: t, className: n, ...r }) => F.cr
|
|
|
4173
4173
|
...r
|
|
4174
4174
|
}
|
|
4175
4175
|
);
|
|
4176
|
-
const
|
|
4176
|
+
const da = ({
|
|
4177
4177
|
id: e = "content-overlay",
|
|
4178
4178
|
isOpen: t = !1,
|
|
4179
4179
|
showDivider: n = !0,
|
|
@@ -4188,7 +4188,7 @@ const la = ({
|
|
|
4188
4188
|
className: f = "",
|
|
4189
4189
|
gtmContext: d = "Modal"
|
|
4190
4190
|
}) => {
|
|
4191
|
-
const p = A(), [h, g] =
|
|
4191
|
+
const p = A(), [h, g] = D(t), y = (b) => {
|
|
4192
4192
|
g(b), b ? (s(), document.body.classList.add("has-overlay")) : (i(), document.body.classList.remove("has-overlay"));
|
|
4193
4193
|
};
|
|
4194
4194
|
G(() => {
|
|
@@ -4196,7 +4196,7 @@ const la = ({
|
|
|
4196
4196
|
}, [t]);
|
|
4197
4197
|
const k = r ? { "--max-width": `${r / 16}rem` } : {};
|
|
4198
4198
|
return /* @__PURE__ */ a.jsx("div", { className: j("overlay", { open: h }), children: /* @__PURE__ */ a.jsx(
|
|
4199
|
-
|
|
4199
|
+
la,
|
|
4200
4200
|
{
|
|
4201
4201
|
id: e,
|
|
4202
4202
|
className: j("overlay-modal", f, { "has-max-width": r }),
|
|
@@ -4206,7 +4206,7 @@ const la = ({
|
|
|
4206
4206
|
/* @__PURE__ */ a.jsxs("div", { className: "top", children: [
|
|
4207
4207
|
c && /* @__PURE__ */ a.jsx("h2", { className: "modal-title", children: c }),
|
|
4208
4208
|
/* @__PURE__ */ a.jsx(
|
|
4209
|
-
|
|
4209
|
+
q,
|
|
4210
4210
|
{
|
|
4211
4211
|
variant: "tertiary",
|
|
4212
4212
|
size: "medium",
|
|
@@ -4219,13 +4219,13 @@ const la = ({
|
|
|
4219
4219
|
}
|
|
4220
4220
|
)
|
|
4221
4221
|
] }),
|
|
4222
|
-
n && /* @__PURE__ */ a.jsx(
|
|
4222
|
+
n && /* @__PURE__ */ a.jsx(Ee, {}),
|
|
4223
4223
|
m,
|
|
4224
4224
|
l && /* @__PURE__ */ a.jsxs("div", { className: "bottom", children: [
|
|
4225
|
-
/* @__PURE__ */ a.jsx(
|
|
4226
|
-
/* @__PURE__ */ a.jsx(
|
|
4225
|
+
/* @__PURE__ */ a.jsx(Ee, {}),
|
|
4226
|
+
/* @__PURE__ */ a.jsx(_t, { buttons: l })
|
|
4227
4227
|
] }),
|
|
4228
|
-
o && /* @__PURE__ */ a.jsx(
|
|
4228
|
+
o && /* @__PURE__ */ a.jsx(Gt, { className: "error", children: o })
|
|
4229
4229
|
] })
|
|
4230
4230
|
}
|
|
4231
4231
|
) });
|
|
@@ -4247,7 +4247,7 @@ const zi = ({
|
|
|
4247
4247
|
},
|
|
4248
4248
|
sendInvites: l
|
|
4249
4249
|
}) => /* @__PURE__ */ a.jsx(
|
|
4250
|
-
|
|
4250
|
+
da,
|
|
4251
4251
|
{
|
|
4252
4252
|
title: n,
|
|
4253
4253
|
isOpen: t,
|
|
@@ -4271,15 +4271,15 @@ const zi = ({
|
|
|
4271
4271
|
const bs = () => {
|
|
4272
4272
|
const e = A();
|
|
4273
4273
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4274
|
-
/* @__PURE__ */ a.jsx(
|
|
4274
|
+
/* @__PURE__ */ a.jsx(ca, {}),
|
|
4275
4275
|
/* @__PURE__ */ a.jsx("div", { id: "content", children: /* @__PURE__ */ a.jsx(
|
|
4276
|
-
|
|
4276
|
+
vt,
|
|
4277
4277
|
{
|
|
4278
4278
|
variant: "error",
|
|
4279
4279
|
text: e.formatMessage({ id: "pageLayout_error" })
|
|
4280
4280
|
}
|
|
4281
4281
|
) }),
|
|
4282
|
-
/* @__PURE__ */ a.jsx(
|
|
4282
|
+
/* @__PURE__ */ a.jsx(ra, {})
|
|
4283
4283
|
] });
|
|
4284
4284
|
}, ys = ({
|
|
4285
4285
|
children: e,
|
|
@@ -4294,9 +4294,9 @@ const bs = () => {
|
|
|
4294
4294
|
G(() => {
|
|
4295
4295
|
window.scrollTo(0, 0);
|
|
4296
4296
|
}, [h]);
|
|
4297
|
-
const g =
|
|
4297
|
+
const g = it(e, { locale: c }), y = it(t, {
|
|
4298
4298
|
locale: c
|
|
4299
|
-
}), k =
|
|
4299
|
+
}), k = it(n, {
|
|
4300
4300
|
locale: c
|
|
4301
4301
|
}), b = {};
|
|
4302
4302
|
return f !== "default" && (b[f] = !0), d !== "default" && (b[d] = !0), p !== "default" && (b[p] = !0), /* @__PURE__ */ a.jsx(Ja, { onError: r, fallback: /* @__PURE__ */ a.jsx(bs, {}), children: /* @__PURE__ */ a.jsx(Ba, { fallback: null, children: /* @__PURE__ */ a.jsxs(
|
|
@@ -4305,24 +4305,24 @@ const bs = () => {
|
|
|
4305
4305
|
id: "wrapper",
|
|
4306
4306
|
className: j(o, b, { "has-footer": l }),
|
|
4307
4307
|
children: [
|
|
4308
|
-
/* @__PURE__ */ a.jsx(
|
|
4308
|
+
/* @__PURE__ */ a.jsx(ca, { showNavigation: m }),
|
|
4309
4309
|
/* @__PURE__ */ a.jsxs("section", { id: "content-wrapper", children: [
|
|
4310
4310
|
y && /* @__PURE__ */ a.jsx("div", { className: "additional-content prepended", children: y }),
|
|
4311
|
-
F.createElement(f === "bold" ?
|
|
4311
|
+
F.createElement(f === "bold" ? la : "div", {
|
|
4312
4312
|
id: "content",
|
|
4313
4313
|
children: g
|
|
4314
4314
|
})
|
|
4315
4315
|
] }),
|
|
4316
4316
|
k && /* @__PURE__ */ a.jsx("div", { className: "additional-content appended", children: k }),
|
|
4317
|
-
l && /* @__PURE__ */ a.jsx(
|
|
4317
|
+
l && /* @__PURE__ */ a.jsx(ra, {}),
|
|
4318
4318
|
/* @__PURE__ */ a.jsx(us, {})
|
|
4319
4319
|
]
|
|
4320
4320
|
}
|
|
4321
4321
|
) }) });
|
|
4322
|
-
},
|
|
4322
|
+
}, Sn = {
|
|
4323
4323
|
default: "tags_",
|
|
4324
4324
|
headerTopics: "header_topics_topics_"
|
|
4325
|
-
},
|
|
4325
|
+
}, Zt = {
|
|
4326
4326
|
topic: {
|
|
4327
4327
|
Climate: "climate",
|
|
4328
4328
|
CitiesAndLocalGovernment: "cities-and-local-government",
|
|
@@ -4341,13 +4341,13 @@ const bs = () => {
|
|
|
4341
4341
|
}, vs = {
|
|
4342
4342
|
getTagDetails: (e) => {
|
|
4343
4343
|
if (e.includes("topic_")) {
|
|
4344
|
-
if (e =
|
|
4345
|
-
const t =
|
|
4346
|
-
return t ? { id: e, href: t, text: `${
|
|
4344
|
+
if (e = Zt.topic[e.replace("topic_", "")], e) {
|
|
4345
|
+
const t = dt.topics.topics[e].href;
|
|
4346
|
+
return t ? { id: e, href: t, text: `${Sn.headerTopics}${e}` } : null;
|
|
4347
4347
|
}
|
|
4348
4348
|
return null;
|
|
4349
4349
|
}
|
|
4350
|
-
return
|
|
4350
|
+
return Zt[e] ? (e = Zt[e], { id: e, text: `${Sn.default}${e}` }) : null;
|
|
4351
4351
|
}
|
|
4352
4352
|
};
|
|
4353
4353
|
const Wi = ({
|
|
@@ -4398,11 +4398,11 @@ const Vi = ({
|
|
|
4398
4398
|
/* @__PURE__ */ a.jsx("span", { className: "count", children: t })
|
|
4399
4399
|
] }),
|
|
4400
4400
|
/* @__PURE__ */ a.jsx("ul", { children: e.map((m, l) => /* @__PURE__ */ a.jsxs("li", { children: [
|
|
4401
|
-
/* @__PURE__ */ a.jsx(
|
|
4402
|
-
m.isAdmin && /* @__PURE__ */ a.jsx(
|
|
4401
|
+
/* @__PURE__ */ a.jsx(tn, { member: m, gtmContext: s, gtmType: i }),
|
|
4402
|
+
m.isAdmin && /* @__PURE__ */ a.jsx(ot, { children: c.formatMessage({ id: "membersList_admin" }) })
|
|
4403
4403
|
] }, l)) }),
|
|
4404
4404
|
n && /* @__PURE__ */ a.jsx(
|
|
4405
|
-
|
|
4405
|
+
xt,
|
|
4406
4406
|
{
|
|
4407
4407
|
hasNextPage: n,
|
|
4408
4408
|
loadNextPage: r,
|
|
@@ -4412,8 +4412,8 @@ const Vi = ({
|
|
|
4412
4412
|
)
|
|
4413
4413
|
] });
|
|
4414
4414
|
};
|
|
4415
|
-
let
|
|
4416
|
-
const le = "discussion_form_",
|
|
4415
|
+
let at = null;
|
|
4416
|
+
const le = "discussion_form_", nn = ({
|
|
4417
4417
|
content: e = { type: "response", slugs: {} },
|
|
4418
4418
|
userHasPermissions: t = !0,
|
|
4419
4419
|
meta: n = {
|
|
@@ -4444,10 +4444,10 @@ const le = "discussion_form_", en = ({
|
|
|
4444
4444
|
},
|
|
4445
4445
|
gtmContext: m = "DiscussionForm"
|
|
4446
4446
|
}) => {
|
|
4447
|
-
var $,
|
|
4448
|
-
const l = A(), f = _e(we), [d, p] =
|
|
4447
|
+
var $, S, C;
|
|
4448
|
+
const l = A(), f = _e(we), [d, p] = D(
|
|
4449
4449
|
n.isEditing && n.isEditing.text || ""
|
|
4450
|
-
), [h, g] =
|
|
4450
|
+
), [h, g] = D(o.error || !1), [y, k] = D(!1), b = ae(null);
|
|
4451
4451
|
if (r || (r = b), n.isLoading)
|
|
4452
4452
|
return /* @__PURE__ */ a.jsx(
|
|
4453
4453
|
be,
|
|
@@ -4456,33 +4456,33 @@ const le = "discussion_form_", en = ({
|
|
|
4456
4456
|
"data-testid": "loading-placeholder"
|
|
4457
4457
|
}
|
|
4458
4458
|
);
|
|
4459
|
-
const _ = (
|
|
4460
|
-
const
|
|
4461
|
-
p(
|
|
4462
|
-
let
|
|
4463
|
-
!f || !f.id ?
|
|
4459
|
+
const _ = (U) => {
|
|
4460
|
+
const H = U.target.value;
|
|
4461
|
+
p(H);
|
|
4462
|
+
let N;
|
|
4463
|
+
!f || !f.id ? N = ye(
|
|
4464
4464
|
l.formatMessage,
|
|
4465
4465
|
`${le}error_loggedOut`,
|
|
4466
4466
|
e.type,
|
|
4467
4467
|
"action"
|
|
4468
|
-
) : t ?
|
|
4468
|
+
) : t ? H.length >= s && (N = `${le}error_tooLong`) : N = ye(
|
|
4469
4469
|
l.formatMessage,
|
|
4470
4470
|
`${le}error_noPermission`,
|
|
4471
4471
|
e.type,
|
|
4472
4472
|
"action"
|
|
4473
|
-
),
|
|
4473
|
+
), N ? g(N) : h && g(!1);
|
|
4474
4474
|
};
|
|
4475
4475
|
let v = `${e.type}-form`;
|
|
4476
4476
|
if (e.type === "response" || e.type === "reply") {
|
|
4477
|
-
const
|
|
4478
|
-
|
|
4477
|
+
const U = (($ = e.slugs) == null ? void 0 : $.reply) || ((S = e.slugs) == null ? void 0 : S.answer) || ((C = e.slugs) == null ? void 0 : C.question) || "";
|
|
4478
|
+
U && (v = `${v}-${U.slice(-15)}`);
|
|
4479
4479
|
}
|
|
4480
|
-
const w = async (
|
|
4481
|
-
var
|
|
4482
|
-
if (
|
|
4480
|
+
const w = async (U) => {
|
|
4481
|
+
var N;
|
|
4482
|
+
if (U.preventDefault(), U.stopPropagation(), !f || !f.id || !t || M)
|
|
4483
4483
|
return;
|
|
4484
|
-
|
|
4485
|
-
const
|
|
4484
|
+
at && clearTimeout(at), k("submitting");
|
|
4485
|
+
const H = window.location.pathname;
|
|
4486
4486
|
try {
|
|
4487
4487
|
let Y;
|
|
4488
4488
|
switch (e.type) {
|
|
@@ -4493,48 +4493,48 @@ const le = "discussion_form_", en = ({
|
|
|
4493
4493
|
Y = await c.create({
|
|
4494
4494
|
title: d,
|
|
4495
4495
|
authorId: f && f.id,
|
|
4496
|
-
...(
|
|
4496
|
+
...(N = c.props) == null ? void 0 : N.create
|
|
4497
4497
|
});
|
|
4498
4498
|
break;
|
|
4499
4499
|
case "response":
|
|
4500
4500
|
Y = await c.create(
|
|
4501
4501
|
{ question: e.slugs.question },
|
|
4502
|
-
{ body: d, authorId: f && f.id, contentPath:
|
|
4502
|
+
{ body: d, authorId: f && f.id, contentPath: H }
|
|
4503
4503
|
);
|
|
4504
4504
|
break;
|
|
4505
4505
|
case "reply":
|
|
4506
4506
|
Y = await c.create(
|
|
4507
4507
|
{ question: e.slugs.question, answer: e.slugs.answer },
|
|
4508
|
-
{ body: d, authorId: f && f.id, contentPath:
|
|
4508
|
+
{ body: d, authorId: f && f.id, contentPath: H }
|
|
4509
4509
|
);
|
|
4510
4510
|
break;
|
|
4511
4511
|
default:
|
|
4512
4512
|
break;
|
|
4513
4513
|
}
|
|
4514
|
-
await xr(1e3), c.callback && await c.callback(Y),
|
|
4515
|
-
p(""), k("submitted"),
|
|
4514
|
+
await xr(1e3), c.callback && await c.callback(Y), at = setTimeout(() => {
|
|
4515
|
+
p(""), k("submitted"), E();
|
|
4516
4516
|
}, 500);
|
|
4517
4517
|
} catch (Y) {
|
|
4518
4518
|
const ne = Y;
|
|
4519
|
-
let
|
|
4520
|
-
ne.message.includes("entry already exists") && (
|
|
4519
|
+
let ee = `${le}error`;
|
|
4520
|
+
ne.message.includes("entry already exists") && (ee = ye(
|
|
4521
4521
|
l.formatMessage,
|
|
4522
4522
|
`${le}error_alreadyExists`,
|
|
4523
4523
|
e.type,
|
|
4524
4524
|
"action"
|
|
4525
|
-
)), ne.message.includes("429") ?
|
|
4525
|
+
)), ne.message.includes("429") ? ee = ye(
|
|
4526
4526
|
l.formatMessage,
|
|
4527
4527
|
`${le}error_tooMany`,
|
|
4528
4528
|
e.type,
|
|
4529
4529
|
"action"
|
|
4530
|
-
) : ne.message.includes("400") && (
|
|
4530
|
+
) : ne.message.includes("400") && (ee = `${le}error`), g(ee), E();
|
|
4531
4531
|
}
|
|
4532
|
-
},
|
|
4533
|
-
|
|
4532
|
+
}, E = () => {
|
|
4533
|
+
at = setTimeout(() => {
|
|
4534
4534
|
g(!1), k(!1);
|
|
4535
4535
|
}, 5e3);
|
|
4536
|
-
}, M = !d || !yr(d),
|
|
4537
|
-
return (n.isEditing && !
|
|
4536
|
+
}, M = !d || !yr(d), L = y === "submitting", O = [];
|
|
4537
|
+
return (n.isEditing && !L || o.cancel) && O.push({
|
|
4538
4538
|
variant: "secondary",
|
|
4539
4539
|
size: { mobile: "small", 600: "medium" },
|
|
4540
4540
|
onClick: c.handleCancel,
|
|
@@ -4543,25 +4543,25 @@ const le = "discussion_form_", en = ({
|
|
|
4543
4543
|
"data-gtm-event-type": `cancel-${e.type}-click`,
|
|
4544
4544
|
disabled: !o.cancel && (!f || !f.id || !d),
|
|
4545
4545
|
children: l.formatMessage({ id: `${le}cancel` })
|
|
4546
|
-
}),
|
|
4546
|
+
}), O.push({
|
|
4547
4547
|
variant: "primary",
|
|
4548
4548
|
size: { mobile: "small", 600: "medium" },
|
|
4549
|
-
onClick: (
|
|
4549
|
+
onClick: (U) => {
|
|
4550
4550
|
if (n.isEditing) {
|
|
4551
4551
|
k("submitting"), c.handleSaveEdit && c.handleSaveEdit(
|
|
4552
4552
|
b.current && "value" in b.current ? b.current.value : ""
|
|
4553
4553
|
);
|
|
4554
4554
|
return;
|
|
4555
4555
|
}
|
|
4556
|
-
w(
|
|
4556
|
+
w(U);
|
|
4557
4557
|
},
|
|
4558
4558
|
className: "gtm-trackable",
|
|
4559
4559
|
"data-gtm-event-context": m,
|
|
4560
4560
|
"data-gtm-event-type": `${n.isEditing ? "save" : "submit"}-${e.type}-click`,
|
|
4561
4561
|
"data-testid": "save-button",
|
|
4562
|
-
disabled: !f || !f.id || !t || M ||
|
|
4562
|
+
disabled: !f || !f.id || !t || M || L || n.isEditing && d === n.isEditing.text,
|
|
4563
4563
|
children: l.formatMessage({
|
|
4564
|
-
id: `${le}${
|
|
4564
|
+
id: `${le}${L ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}`
|
|
4565
4565
|
})
|
|
4566
4566
|
}), /* @__PURE__ */ a.jsxs(
|
|
4567
4567
|
"form",
|
|
@@ -4574,7 +4574,7 @@ const le = "discussion_form_", en = ({
|
|
|
4574
4574
|
children: [
|
|
4575
4575
|
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ a.jsx("h2", { children: ye(l.formatMessage, `${le}title`, e.type, "action") }),
|
|
4576
4576
|
/* @__PURE__ */ a.jsx(
|
|
4577
|
-
|
|
4577
|
+
tn,
|
|
4578
4578
|
{
|
|
4579
4579
|
member: f || "community",
|
|
4580
4580
|
gtmContext: m,
|
|
@@ -4604,7 +4604,7 @@ const le = "discussion_form_", en = ({
|
|
|
4604
4604
|
}
|
|
4605
4605
|
),
|
|
4606
4606
|
/* @__PURE__ */ a.jsx("small", { children: ye(l.formatMessage, `${le}explainer`, e.type, "action", {
|
|
4607
|
-
a: (
|
|
4607
|
+
a: (U) => /* @__PURE__ */ a.jsx(
|
|
4608
4608
|
"a",
|
|
4609
4609
|
{
|
|
4610
4610
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
@@ -4613,13 +4613,13 @@ const le = "discussion_form_", en = ({
|
|
|
4613
4613
|
"data-gtm-event-context": m,
|
|
4614
4614
|
"data-gtm-event-type": "community-guidelines-link",
|
|
4615
4615
|
rel: "noreferrer",
|
|
4616
|
-
children:
|
|
4616
|
+
children: U
|
|
4617
4617
|
}
|
|
4618
4618
|
)
|
|
4619
4619
|
}) }),
|
|
4620
|
-
/* @__PURE__ */ a.jsx(
|
|
4621
|
-
y === "submitted" && /* @__PURE__ */ a.jsx(
|
|
4622
|
-
h && /* @__PURE__ */ a.jsx(
|
|
4620
|
+
/* @__PURE__ */ a.jsx(_t, { buttons: O }),
|
|
4621
|
+
y === "submitted" && /* @__PURE__ */ a.jsx(Gt, { className: "success", "data-testid": "success", children: ye(l.formatMessage, `${le}success`, e.type, "action") }),
|
|
4622
|
+
h && /* @__PURE__ */ a.jsx(Gt, { id: "error-message", className: "error", "data-testid": "error", children: o.error ? o.error : typeof h == "string" ? h.includes(" ") ? h : l.formatMessage(
|
|
4623
4623
|
{ id: h },
|
|
4624
4624
|
{
|
|
4625
4625
|
action: l.formatMessage({
|
|
@@ -4631,21 +4631,21 @@ const le = "discussion_form_", en = ({
|
|
|
4631
4631
|
]
|
|
4632
4632
|
}
|
|
4633
4633
|
);
|
|
4634
|
-
},
|
|
4634
|
+
}, ua = ({
|
|
4635
4635
|
contentType: e,
|
|
4636
4636
|
createPost: t,
|
|
4637
4637
|
membershipRequiredToPost: { isMember: n, required: r, join: s, leave: i, notMemberStateText: o }
|
|
4638
4638
|
}) => r && !n ? /* @__PURE__ */ a.jsx(
|
|
4639
|
-
|
|
4639
|
+
vt,
|
|
4640
4640
|
{
|
|
4641
4641
|
text: o,
|
|
4642
4642
|
button: {
|
|
4643
4643
|
breakpoints: { mobile: !0, 901: !1 },
|
|
4644
|
-
component: /* @__PURE__ */ a.jsx(
|
|
4644
|
+
component: /* @__PURE__ */ a.jsx(na, { isShort: !0, functions: { join: s, leave: i } })
|
|
4645
4645
|
}
|
|
4646
4646
|
}
|
|
4647
4647
|
) : /* @__PURE__ */ a.jsx(
|
|
4648
|
-
|
|
4648
|
+
nn,
|
|
4649
4649
|
{
|
|
4650
4650
|
content: { type: e, slugs: {} },
|
|
4651
4651
|
functions: {
|
|
@@ -4655,12 +4655,12 @@ const le = "discussion_form_", en = ({
|
|
|
4655
4655
|
), xs = {
|
|
4656
4656
|
showThread: !0,
|
|
4657
4657
|
showForm: !1
|
|
4658
|
-
},
|
|
4659
|
-
const [t, n] =
|
|
4658
|
+
}, kt = Qt(xs), ks = ({ children: e }) => {
|
|
4659
|
+
const [t, n] = D({
|
|
4660
4660
|
showThread: !0,
|
|
4661
4661
|
showForm: !1
|
|
4662
4662
|
});
|
|
4663
|
-
return /* @__PURE__ */ a.jsx(
|
|
4663
|
+
return /* @__PURE__ */ a.jsx(kt.Provider, { value: { ...t, updateConversation: n }, children: e });
|
|
4664
4664
|
}, ws = ({
|
|
4665
4665
|
question: e,
|
|
4666
4666
|
answer: t,
|
|
@@ -4670,10 +4670,10 @@ const le = "discussion_form_", en = ({
|
|
|
4670
4670
|
...t && { answerSlug: t },
|
|
4671
4671
|
...n && { replySlug: n }
|
|
4672
4672
|
}), js = (e, t = 10) => !e || e.length === 0 ? [] : e.slice(0, t);
|
|
4673
|
-
let
|
|
4674
|
-
const
|
|
4675
|
-
|
|
4676
|
-
},
|
|
4673
|
+
let He = !1;
|
|
4674
|
+
const qt = () => {
|
|
4675
|
+
He !== !1 && (clearTimeout(He), He = !1);
|
|
4676
|
+
}, Ht = 5, Ts = ({
|
|
4677
4677
|
element: e = "div",
|
|
4678
4678
|
likes: t = 0,
|
|
4679
4679
|
peopleWhoLiked: n = !1,
|
|
@@ -4689,17 +4689,17 @@ const Bt = () => {
|
|
|
4689
4689
|
G(() => {
|
|
4690
4690
|
h(s);
|
|
4691
4691
|
}, [s]);
|
|
4692
|
-
const [f, d] =
|
|
4693
|
-
if (
|
|
4694
|
-
return
|
|
4695
|
-
if (
|
|
4692
|
+
const [f, d] = D(t), [p, h] = D(s), [g, y] = D(!1), [k, b] = D(!1), _ = ht(() => js(n, Ht), [n]), v = (E) => {
|
|
4693
|
+
if (E.preventDefault(), E.stopPropagation(), b(!1), He)
|
|
4694
|
+
return qt(), !1;
|
|
4695
|
+
if (qt(), g || !o)
|
|
4696
4696
|
return !1;
|
|
4697
|
-
|
|
4697
|
+
He = setTimeout(w, 350);
|
|
4698
4698
|
}, w = async () => {
|
|
4699
|
-
if (
|
|
4699
|
+
if (qt(), g || !o)
|
|
4700
4700
|
return !1;
|
|
4701
|
-
let
|
|
4702
|
-
|
|
4701
|
+
let E = p ? f - 1 : f + 1;
|
|
4702
|
+
E < 0 && (E = 0), y(!0), d(E), h(!p);
|
|
4703
4703
|
try {
|
|
4704
4704
|
if (i && i.slugs) {
|
|
4705
4705
|
const M = ws(i.slugs);
|
|
@@ -4730,7 +4730,7 @@ const Bt = () => {
|
|
|
4730
4730
|
},
|
|
4731
4731
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4732
4732
|
/* @__PURE__ */ a.jsx(
|
|
4733
|
-
|
|
4733
|
+
q,
|
|
4734
4734
|
{
|
|
4735
4735
|
variant: "tertiary",
|
|
4736
4736
|
size: "medium",
|
|
@@ -4749,26 +4749,26 @@ const Bt = () => {
|
|
|
4749
4749
|
),
|
|
4750
4750
|
/* @__PURE__ */ a.jsx("span", { className: j("number-of-likes", { "no-likes": f === 0 }), "data-testid": "number-of-likes", children: l.formatMessage({ id: `discussion_likes${r ? "_short" : ""}` }, { number: f }) }),
|
|
4751
4751
|
n && /* @__PURE__ */ a.jsx(jr, { isOpen: k, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ a.jsxs("ul", { children: [
|
|
4752
|
-
_.map((
|
|
4753
|
-
|
|
4752
|
+
_.map((E) => typeof E == "string" || !E.name ? null : /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
4753
|
+
bt,
|
|
4754
4754
|
{
|
|
4755
|
-
href:
|
|
4755
|
+
href: E.id ? `/profiles/${E.id}` : void 0,
|
|
4756
4756
|
gtmContext: "Likes",
|
|
4757
4757
|
gtmType: "liked-name-click",
|
|
4758
4758
|
onClick: (M) => M == null ? void 0 : M.stopPropagation(),
|
|
4759
|
-
children:
|
|
4759
|
+
children: E.name
|
|
4760
4760
|
}
|
|
4761
|
-
) },
|
|
4762
|
-
n.length >
|
|
4761
|
+
) }, E.id || window.btoa(E.name))),
|
|
4762
|
+
n.length > Ht && /* @__PURE__ */ a.jsx("li", { children: l.formatMessage({ id: "discussion_likes_more" }, { number: n.length - Ht }) })
|
|
4763
4763
|
] }) })
|
|
4764
4764
|
] })
|
|
4765
4765
|
}
|
|
4766
4766
|
);
|
|
4767
|
-
},
|
|
4767
|
+
}, Mn = (e) => {
|
|
4768
4768
|
const t = {};
|
|
4769
4769
|
return Object.keys(e).forEach((n) => n.includes("Id") ? t[n] = e[n] : t[`${n}Slug`] = e[n]), t;
|
|
4770
|
-
},
|
|
4771
|
-
const xe = "discussion_", $s = 280,
|
|
4770
|
+
}, wt = (e, t) => e && !t;
|
|
4771
|
+
const xe = "discussion_", $s = 280, jt = ({
|
|
4772
4772
|
element: e = "div",
|
|
4773
4773
|
content: t,
|
|
4774
4774
|
userHasPermissions: n = !0,
|
|
@@ -4798,40 +4798,40 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
4798
4798
|
children: y,
|
|
4799
4799
|
isTruncated: k = !1
|
|
4800
4800
|
}) => {
|
|
4801
|
-
const b = A(), _ = _e(we), v = _e(
|
|
4801
|
+
const b = A(), _ = _e(we), v = _e(kt), [w, E] = D({
|
|
4802
4802
|
body: t && t.body || "",
|
|
4803
4803
|
isEditing: !1,
|
|
4804
4804
|
didEdit: t && t.isEdited || !1
|
|
4805
|
-
}), [M,
|
|
4805
|
+
}), [M, L] = D(!1), [O, $] = D("");
|
|
4806
4806
|
if (G(() => {
|
|
4807
|
-
|
|
4807
|
+
E({
|
|
4808
4808
|
...w,
|
|
4809
4809
|
body: t && t.body || "",
|
|
4810
4810
|
didEdit: t && t.isEdited || !1
|
|
4811
4811
|
});
|
|
4812
4812
|
}, [t.isEdited]), r || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
4813
4813
|
return /* @__PURE__ */ a.jsx(be, { className: "discussion-card discussion-post" });
|
|
4814
|
-
const { author:
|
|
4814
|
+
const { author: S, canLike: C, createdAt: U, id: H, likes: N = 0, userLiked: Y, comments: ne = 0 } = t, ee = k ? Ae(w.body, $s) : w.body, Q = _ && _.id && typeof S != "string" && S.id && S.id === _.id || !1, re = typeof C == "boolean" ? C : n ? !Q : !1, J = async (W) => {
|
|
4815
4815
|
W || (W = ""), $("");
|
|
4816
4816
|
try {
|
|
4817
4817
|
if (!er(W, w.body)) {
|
|
4818
4818
|
const ue = t.type === "question" ? { title: W } : { body: W };
|
|
4819
|
-
await m(
|
|
4819
|
+
await m(Mn(t.slugs), ue);
|
|
4820
4820
|
}
|
|
4821
|
-
|
|
4821
|
+
E({ body: W, isEditing: !1, didEdit: !0 });
|
|
4822
4822
|
} catch {
|
|
4823
4823
|
$(`${xe}form_error`);
|
|
4824
4824
|
}
|
|
4825
4825
|
}, se = () => {
|
|
4826
4826
|
v && v.updateConversation && v.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
|
|
4827
|
-
var
|
|
4828
|
-
const ue = `reply-form-${(t.type === "answer" ? t.slug : ((
|
|
4829
|
-
|
|
4827
|
+
var me, Z, K;
|
|
4828
|
+
const ue = `reply-form-${(t.type === "answer" ? t.slug : ((me = t.slugs) == null ? void 0 : me.reply) || ((Z = t.slugs) == null ? void 0 : Z.answer) || ((K = t.slugs) == null ? void 0 : K.question) || "").toLowerCase().slice(-15)}`, pe = document.getElementById(ue), he = document.getElementById(`${ue}-input`);
|
|
4829
|
+
he && he.focus(), pe && pe.scrollIntoView({ behavior: "smooth" });
|
|
4830
4830
|
}, 0);
|
|
4831
4831
|
}, de = () => {
|
|
4832
|
-
|
|
4832
|
+
L(!1);
|
|
4833
4833
|
try {
|
|
4834
|
-
c(
|
|
4834
|
+
c(Mn(t.slugs));
|
|
4835
4835
|
} catch {
|
|
4836
4836
|
$("delete-error");
|
|
4837
4837
|
}
|
|
@@ -4853,10 +4853,10 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
4853
4853
|
icon: "flag"
|
|
4854
4854
|
}
|
|
4855
4855
|
];
|
|
4856
|
-
return n &&
|
|
4856
|
+
return n && Q && ce.push(
|
|
4857
4857
|
{
|
|
4858
4858
|
text: b.formatMessage({ id: `${xe}moreMenu_edit` }),
|
|
4859
|
-
onClick: () =>
|
|
4859
|
+
onClick: () => E({ ...w, isEditing: !0 }),
|
|
4860
4860
|
icon: "pencil-paper",
|
|
4861
4861
|
className: "gtm-trackable",
|
|
4862
4862
|
"data-gtm-event-context": g,
|
|
@@ -4865,7 +4865,7 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
4865
4865
|
{
|
|
4866
4866
|
text: b.formatMessage({ id: `${xe}moreMenu_delete` }),
|
|
4867
4867
|
onClick: (W) => {
|
|
4868
|
-
W.preventDefault(), W.stopPropagation(),
|
|
4868
|
+
W.preventDefault(), W.stopPropagation(), L(!0);
|
|
4869
4869
|
},
|
|
4870
4870
|
icon: "trash",
|
|
4871
4871
|
className: "gtm-trackable",
|
|
@@ -4880,7 +4880,7 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
4880
4880
|
/* @__PURE__ */ a.jsxs(
|
|
4881
4881
|
"div",
|
|
4882
4882
|
{
|
|
4883
|
-
id:
|
|
4883
|
+
id: H || t.slug,
|
|
4884
4884
|
className: j("discussion-card", t.type, {
|
|
4885
4885
|
editing: w.isEditing,
|
|
4886
4886
|
"has-link": p.post && !w.isEditing
|
|
@@ -4890,17 +4890,17 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
4890
4890
|
},
|
|
4891
4891
|
children: [
|
|
4892
4892
|
!w.isEditing && /* @__PURE__ */ a.jsx(
|
|
4893
|
-
|
|
4893
|
+
tn,
|
|
4894
4894
|
{
|
|
4895
|
-
member:
|
|
4896
|
-
additionalContent: { createdAt:
|
|
4897
|
-
className: typeof
|
|
4895
|
+
member: S,
|
|
4896
|
+
additionalContent: { createdAt: U, didEdit: w.didEdit },
|
|
4897
|
+
className: typeof S != "string" && S.id === s ? "highlighted" : "",
|
|
4898
4898
|
gtmContext: g,
|
|
4899
4899
|
gtmType: "profile-click"
|
|
4900
4900
|
}
|
|
4901
4901
|
),
|
|
4902
4902
|
w.isEditing ? /* @__PURE__ */ a.jsx(
|
|
4903
|
-
|
|
4903
|
+
nn,
|
|
4904
4904
|
{
|
|
4905
4905
|
content: { type: t.type, slugs: t.slugs },
|
|
4906
4906
|
userHasPermissions: n,
|
|
@@ -4911,8 +4911,8 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
4911
4911
|
},
|
|
4912
4912
|
maxLength: t.type === "question" ? 250 : 5e4,
|
|
4913
4913
|
forceShow: {
|
|
4914
|
-
error:
|
|
4915
|
-
{ id:
|
|
4914
|
+
error: O !== "" && O !== "delete-error" ? b.formatMessage(
|
|
4915
|
+
{ id: O },
|
|
4916
4916
|
{
|
|
4917
4917
|
action: b.formatMessage({
|
|
4918
4918
|
id: `discussion_action_${t.type}`
|
|
@@ -4922,9 +4922,9 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
4922
4922
|
},
|
|
4923
4923
|
functions: {
|
|
4924
4924
|
create: o,
|
|
4925
|
-
handleSaveEdit:
|
|
4925
|
+
handleSaveEdit: J,
|
|
4926
4926
|
handleCancel: () => {
|
|
4927
|
-
$(""),
|
|
4927
|
+
$(""), E({ ...w, isEditing: !1 });
|
|
4928
4928
|
}
|
|
4929
4929
|
},
|
|
4930
4930
|
gtmContext: `${g}Form`
|
|
@@ -4936,10 +4936,10 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
4936
4936
|
className: "gtm-trackable",
|
|
4937
4937
|
"data-gtm-event-context": g,
|
|
4938
4938
|
"data-gtm-event-type": "title-click",
|
|
4939
|
-
children: /* @__PURE__ */ a.jsx(
|
|
4939
|
+
children: /* @__PURE__ */ a.jsx(jn, { options: { overrides: { a: Zr } }, children: ee })
|
|
4940
4940
|
}
|
|
4941
4941
|
) : /* @__PURE__ */ a.jsx(
|
|
4942
|
-
|
|
4942
|
+
jn,
|
|
4943
4943
|
{
|
|
4944
4944
|
options: {
|
|
4945
4945
|
wrapper: t.type === "question" ? "h1" : F.Fragment,
|
|
@@ -4947,7 +4947,7 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
4947
4947
|
forceInline: t.type === "question",
|
|
4948
4948
|
forceBlock: t.type !== "question"
|
|
4949
4949
|
},
|
|
4950
|
-
children:
|
|
4950
|
+
children: ee
|
|
4951
4951
|
}
|
|
4952
4952
|
),
|
|
4953
4953
|
!w.isEditing && /* @__PURE__ */ a.jsxs(
|
|
@@ -4960,7 +4960,7 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
4960
4960
|
Ts,
|
|
4961
4961
|
{
|
|
4962
4962
|
element: "li",
|
|
4963
|
-
likes:
|
|
4963
|
+
likes: N,
|
|
4964
4964
|
isShort: !1,
|
|
4965
4965
|
userLiked: Y,
|
|
4966
4966
|
content: { type: t.type, slugs: t.slugs },
|
|
@@ -4981,7 +4981,7 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
4981
4981
|
},
|
|
4982
4982
|
children: [
|
|
4983
4983
|
/* @__PURE__ */ a.jsx(
|
|
4984
|
-
|
|
4984
|
+
q,
|
|
4985
4985
|
{
|
|
4986
4986
|
variant: "tertiary",
|
|
4987
4987
|
size: "medium",
|
|
@@ -5006,7 +5006,7 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
5006
5006
|
}
|
|
5007
5007
|
),
|
|
5008
5008
|
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
5009
|
-
|
|
5009
|
+
q,
|
|
5010
5010
|
{
|
|
5011
5011
|
variant: "tertiary",
|
|
5012
5012
|
size: "medium",
|
|
@@ -5031,14 +5031,14 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
5031
5031
|
),
|
|
5032
5032
|
y,
|
|
5033
5033
|
/* @__PURE__ */ a.jsx(
|
|
5034
|
-
|
|
5034
|
+
da,
|
|
5035
5035
|
{
|
|
5036
5036
|
id: `delete-${t.slug}-modal`,
|
|
5037
5037
|
isOpen: M,
|
|
5038
5038
|
functions: { onOpen: () => {
|
|
5039
|
-
}, onClose: () =>
|
|
5039
|
+
}, onClose: () => L(!1) },
|
|
5040
5040
|
forceShow: {
|
|
5041
|
-
error:
|
|
5041
|
+
error: O === "delete-error" ? b.formatMessage(
|
|
5042
5042
|
{ id: "discussion_delete_error" },
|
|
5043
5043
|
{
|
|
5044
5044
|
action: b.formatMessage({
|
|
@@ -5054,7 +5054,7 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
5054
5054
|
buttons: [
|
|
5055
5055
|
{
|
|
5056
5056
|
variant: "secondary",
|
|
5057
|
-
onClick: () =>
|
|
5057
|
+
onClick: () => L(!1),
|
|
5058
5058
|
children: b.formatMessage({ id: "discussion_delete_cancel" })
|
|
5059
5059
|
},
|
|
5060
5060
|
{
|
|
@@ -5066,7 +5066,7 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
5066
5066
|
],
|
|
5067
5067
|
gtmContext: `${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,
|
|
5068
5068
|
children: /* @__PURE__ */ a.jsx(
|
|
5069
|
-
|
|
5069
|
+
Te,
|
|
5070
5070
|
{
|
|
5071
5071
|
id: "discussion_delete_text",
|
|
5072
5072
|
values: {
|
|
@@ -5082,15 +5082,15 @@ const xe = "discussion_", $s = 280, kt = ({
|
|
|
5082
5082
|
] })
|
|
5083
5083
|
});
|
|
5084
5084
|
};
|
|
5085
|
-
const
|
|
5085
|
+
const Ut = "discussion_responses_", Yi = ({ type: e = "answer", responses: t = 0 }) => {
|
|
5086
5086
|
const n = A();
|
|
5087
5087
|
return /* @__PURE__ */ a.jsxs("div", { className: "responses-heading", children: [
|
|
5088
|
-
/* @__PURE__ */ a.jsx("h3", { children: n.formatMessage({ id: `${
|
|
5089
|
-
t === 0 && /* @__PURE__ */ a.jsx("p", { children: ye(n.formatMessage, `${
|
|
5088
|
+
/* @__PURE__ */ a.jsx("h3", { children: n.formatMessage({ id: `${Ut}title` }, { action: n.formatMessage({ id: `${Ut}${e}` }), count: t }) }),
|
|
5089
|
+
t === 0 && /* @__PURE__ */ a.jsx("p", { children: ye(n.formatMessage, `${Ut}empty`, e, e) })
|
|
5090
5090
|
] });
|
|
5091
5091
|
};
|
|
5092
5092
|
const Es = ({ count: e = "", showRepliesButton: t = !0, children: n }) => {
|
|
5093
|
-
const r = A(), s = ae(null), i = _e(
|
|
5093
|
+
const r = A(), s = ae(null), i = _e(kt), [o, c] = D(
|
|
5094
5094
|
"open"
|
|
5095
5095
|
/* Open */
|
|
5096
5096
|
);
|
|
@@ -5100,7 +5100,7 @@ const Es = ({ count: e = "", showRepliesButton: t = !0, children: n }) => {
|
|
|
5100
5100
|
return d.addEventListener("transitionend", m), () => {
|
|
5101
5101
|
d.removeEventListener("transitionend", m);
|
|
5102
5102
|
};
|
|
5103
|
-
}, []),
|
|
5103
|
+
}, []), Fe(() => {
|
|
5104
5104
|
o === "closed" && !i.showThread || c(
|
|
5105
5105
|
[
|
|
5106
5106
|
"opening",
|
|
@@ -5121,12 +5121,12 @@ const Es = ({ count: e = "", showRepliesButton: t = !0, children: n }) => {
|
|
|
5121
5121
|
"opening",
|
|
5122
5122
|
"open"
|
|
5123
5123
|
/* Open */
|
|
5124
|
-
].includes(o), f =
|
|
5124
|
+
].includes(o), f = it(n, {
|
|
5125
5125
|
element: "li"
|
|
5126
5126
|
});
|
|
5127
5127
|
return /* @__PURE__ */ a.jsxs("div", { className: "thread-wrapper", children: [
|
|
5128
5128
|
t && /* @__PURE__ */ a.jsx(
|
|
5129
|
-
|
|
5129
|
+
q,
|
|
5130
5130
|
{
|
|
5131
5131
|
variant: "secondary",
|
|
5132
5132
|
size: "small",
|
|
@@ -5155,14 +5155,14 @@ const Es = ({ count: e = "", showRepliesButton: t = !0, children: n }) => {
|
|
|
5155
5155
|
}
|
|
5156
5156
|
)
|
|
5157
5157
|
] });
|
|
5158
|
-
}, Cs = "post", Ss = "reply",
|
|
5159
|
-
function
|
|
5158
|
+
}, Cs = "post", Ss = "reply", ma = "00000000-0000-0000-0000-000000000000";
|
|
5159
|
+
function an({ queryClient: e, queryKey: t }) {
|
|
5160
5160
|
function n(r, s, i) {
|
|
5161
5161
|
e.setQueryData(t, i);
|
|
5162
5162
|
}
|
|
5163
5163
|
return n;
|
|
5164
5164
|
}
|
|
5165
|
-
function
|
|
5165
|
+
function rn({ queryClient: e, queryKey: t }) {
|
|
5166
5166
|
async function n(r) {
|
|
5167
5167
|
await e.cancelQueries({ queryKey: t });
|
|
5168
5168
|
const s = e.getQueryData(t);
|
|
@@ -5202,7 +5202,7 @@ function Ns() {
|
|
|
5202
5202
|
}
|
|
5203
5203
|
};
|
|
5204
5204
|
}
|
|
5205
|
-
function
|
|
5205
|
+
function fa(e) {
|
|
5206
5206
|
const { id: t = "", name: n = "", organization: r = "", jobTitle: s = "", image: i = {} } = e, { thumbnail: o = "" } = i;
|
|
5207
5207
|
return {
|
|
5208
5208
|
id: t,
|
|
@@ -5217,19 +5217,19 @@ function ma(e) {
|
|
|
5217
5217
|
function Ps({ content: e }) {
|
|
5218
5218
|
return {
|
|
5219
5219
|
content: e,
|
|
5220
|
-
id:
|
|
5220
|
+
id: ma,
|
|
5221
5221
|
time: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5222
5222
|
verb: Cs
|
|
5223
5223
|
};
|
|
5224
5224
|
}
|
|
5225
|
-
function
|
|
5225
|
+
function Nn({ activity: e, user: t }) {
|
|
5226
5226
|
return {
|
|
5227
5227
|
...e,
|
|
5228
|
-
actor:
|
|
5228
|
+
actor: fa(t),
|
|
5229
5229
|
...Ms()
|
|
5230
5230
|
};
|
|
5231
5231
|
}
|
|
5232
|
-
function
|
|
5232
|
+
function mt({ activity: e, reaction: t }) {
|
|
5233
5233
|
var n, r, s;
|
|
5234
5234
|
t ? (e.latest_reactions = {
|
|
5235
5235
|
...e.latest_reactions || {},
|
|
@@ -5242,7 +5242,7 @@ function dt({ activity: e, reaction: t }) {
|
|
|
5242
5242
|
like: (n = e.reaction_counts) != null && n.like ? e.reaction_counts.like + 1 : 1
|
|
5243
5243
|
};
|
|
5244
5244
|
}
|
|
5245
|
-
function
|
|
5245
|
+
function pa({ activity: e, user: t }) {
|
|
5246
5246
|
var n, r, s;
|
|
5247
5247
|
e.reaction_counts = {
|
|
5248
5248
|
...e.reaction_counts || {},
|
|
@@ -5261,13 +5261,13 @@ function As({ activityId: e, replyId: t, content: n }) {
|
|
|
5261
5261
|
data: {
|
|
5262
5262
|
content: n
|
|
5263
5263
|
},
|
|
5264
|
-
id:
|
|
5264
|
+
id: ma,
|
|
5265
5265
|
kind: Ss,
|
|
5266
5266
|
parent: t || ""
|
|
5267
5267
|
};
|
|
5268
5268
|
}
|
|
5269
|
-
function
|
|
5270
|
-
const n =
|
|
5269
|
+
function Pn({ reply: e, user: t }) {
|
|
5270
|
+
const n = fa(t);
|
|
5271
5271
|
return {
|
|
5272
5272
|
...e,
|
|
5273
5273
|
user_id: n.id,
|
|
@@ -5275,7 +5275,7 @@ function Nn({ reply: e, user: t }) {
|
|
|
5275
5275
|
...Ns()
|
|
5276
5276
|
};
|
|
5277
5277
|
}
|
|
5278
|
-
function
|
|
5278
|
+
function An({ reply: e, reaction: t }) {
|
|
5279
5279
|
var n, r, s;
|
|
5280
5280
|
t ? (e.latest_children = {
|
|
5281
5281
|
...e.latest_children || {},
|
|
@@ -5301,7 +5301,7 @@ function Fs({ reply: e, user: t }) {
|
|
|
5301
5301
|
like: (((s = e.own_children) == null ? void 0 : s.like) || []).filter(({ user_id: i }) => i !== t.id)
|
|
5302
5302
|
});
|
|
5303
5303
|
}
|
|
5304
|
-
const
|
|
5304
|
+
const Le = Object.freeze({
|
|
5305
5305
|
id: "some-user-id-1",
|
|
5306
5306
|
name: "some user name 1",
|
|
5307
5307
|
organization: "some user organization 1",
|
|
@@ -5310,7 +5310,7 @@ const Ae = Object.freeze({
|
|
|
5310
5310
|
thumbnail: "https://some-user-thumbnail.com/avatar1.png"
|
|
5311
5311
|
},
|
|
5312
5312
|
isLoading: !1
|
|
5313
|
-
}),
|
|
5313
|
+
}), Ce = Object.freeze({
|
|
5314
5314
|
id: "some-user-id-2",
|
|
5315
5315
|
name: "some user name 2",
|
|
5316
5316
|
organization: "some user organization 2",
|
|
@@ -5319,8 +5319,8 @@ const Ae = Object.freeze({
|
|
|
5319
5319
|
thumbnail: "https://some-user-thumbnail.com/avatar2.png"
|
|
5320
5320
|
},
|
|
5321
5321
|
isLoading: !1
|
|
5322
|
-
}),
|
|
5323
|
-
actor: `SU:${
|
|
5322
|
+
}), ha = Object.freeze({
|
|
5323
|
+
actor: `SU:${Le.id}`,
|
|
5324
5324
|
content: "some content 1",
|
|
5325
5325
|
duration: "5.53ms",
|
|
5326
5326
|
feed_id: "some-feed-id-1",
|
|
@@ -5329,8 +5329,8 @@ const Ae = Object.freeze({
|
|
|
5329
5329
|
object: "comment",
|
|
5330
5330
|
time: "2023-11-24T17:52:36.162000",
|
|
5331
5331
|
verb: "post"
|
|
5332
|
-
}),
|
|
5333
|
-
actor: `SU:${
|
|
5332
|
+
}), Ls = Object.freeze({
|
|
5333
|
+
actor: `SU:${Ce.id}`,
|
|
5334
5334
|
content: "some content 2",
|
|
5335
5335
|
duration: "5.53ms",
|
|
5336
5336
|
feed_id: "some-feed-id-2",
|
|
@@ -5339,8 +5339,8 @@ const Ae = Object.freeze({
|
|
|
5339
5339
|
object: "comment",
|
|
5340
5340
|
time: "2023-11-24T17:54:36.162000",
|
|
5341
5341
|
verb: "post"
|
|
5342
|
-
}),
|
|
5343
|
-
actor: `SU:${
|
|
5342
|
+
}), Ds = Object.freeze({
|
|
5343
|
+
actor: `SU:${Le.id}`,
|
|
5344
5344
|
content: "some content 3",
|
|
5345
5345
|
duration: "5.53ms",
|
|
5346
5346
|
feed_id: "some-feed-id-3",
|
|
@@ -5349,8 +5349,8 @@ const Ae = Object.freeze({
|
|
|
5349
5349
|
object: "comment",
|
|
5350
5350
|
time: "2023-11-24T17:56:36.162000",
|
|
5351
5351
|
verb: "post"
|
|
5352
|
-
}),
|
|
5353
|
-
actor: `SU:${
|
|
5352
|
+
}), Rs = Object.freeze({
|
|
5353
|
+
actor: `SU:${Ce.id}`,
|
|
5354
5354
|
content: "some content 4",
|
|
5355
5355
|
duration: "5.53ms",
|
|
5356
5356
|
feed_id: "some-feed-id-4",
|
|
@@ -5362,19 +5362,19 @@ const Ae = Object.freeze({
|
|
|
5362
5362
|
});
|
|
5363
5363
|
Object.freeze({
|
|
5364
5364
|
id: "some-reaction-id-1",
|
|
5365
|
-
activity_id:
|
|
5365
|
+
activity_id: ha.id,
|
|
5366
5366
|
kind: "like",
|
|
5367
5367
|
created_at: "2023-11-24T17:58:36.162000",
|
|
5368
5368
|
data: {},
|
|
5369
5369
|
parent: "",
|
|
5370
5370
|
updated_at: "2023-11-24T17:58:36.162000",
|
|
5371
|
-
user_id:
|
|
5371
|
+
user_id: Ce.id,
|
|
5372
5372
|
children_counts: {},
|
|
5373
5373
|
latest_children: {},
|
|
5374
5374
|
latest_children_extra: {},
|
|
5375
5375
|
own_children: {},
|
|
5376
5376
|
user: {
|
|
5377
|
-
id:
|
|
5377
|
+
id: Ce.id,
|
|
5378
5378
|
data: {},
|
|
5379
5379
|
created_at: "2023-11-24T17:58:36.162000",
|
|
5380
5380
|
updated_at: "2023-11-24T17:58:36.162000"
|
|
@@ -5384,15 +5384,15 @@ Object.freeze({
|
|
|
5384
5384
|
created_at: "2023-12-03T21:53:45.999851Z",
|
|
5385
5385
|
updated_at: "2023-12-03T21:53:45.999851Z",
|
|
5386
5386
|
id: "some-reply-id-1",
|
|
5387
|
-
user_id:
|
|
5387
|
+
user_id: Ce.id,
|
|
5388
5388
|
user: {
|
|
5389
|
-
id:
|
|
5389
|
+
id: Ce.id,
|
|
5390
5390
|
data: {},
|
|
5391
5391
|
created_at: "2023-08-31T07:11:38.677184Z",
|
|
5392
5392
|
updated_at: "2023-08-31T07:11:38.677184Z"
|
|
5393
5393
|
},
|
|
5394
5394
|
kind: "reply",
|
|
5395
|
-
activity_id:
|
|
5395
|
+
activity_id: ha.id,
|
|
5396
5396
|
data: {
|
|
5397
5397
|
content: "Some content 1..."
|
|
5398
5398
|
},
|
|
@@ -5404,15 +5404,15 @@ Object.freeze({
|
|
|
5404
5404
|
created_at: "2023-12-03T21:53:45.999851Z",
|
|
5405
5405
|
updated_at: "2023-12-03T21:53:45.999851Z",
|
|
5406
5406
|
id: "some-reply-id-2",
|
|
5407
|
-
user_id:
|
|
5407
|
+
user_id: Le.id,
|
|
5408
5408
|
user: {
|
|
5409
|
-
id:
|
|
5409
|
+
id: Le.id,
|
|
5410
5410
|
data: {},
|
|
5411
5411
|
created_at: "2023-08-31T07:11:38.677184Z",
|
|
5412
5412
|
updated_at: "2023-08-31T07:11:38.677184Z"
|
|
5413
5413
|
},
|
|
5414
5414
|
kind: "reply",
|
|
5415
|
-
activity_id:
|
|
5415
|
+
activity_id: Ls.id,
|
|
5416
5416
|
data: {
|
|
5417
5417
|
content: "Some content 2..."
|
|
5418
5418
|
},
|
|
@@ -5424,15 +5424,15 @@ Object.freeze({
|
|
|
5424
5424
|
created_at: "2023-12-03T21:53:45.999851Z",
|
|
5425
5425
|
updated_at: "2023-12-03T21:53:45.999851Z",
|
|
5426
5426
|
id: "some-reply-id-3",
|
|
5427
|
-
user_id:
|
|
5427
|
+
user_id: Ce.id,
|
|
5428
5428
|
user: {
|
|
5429
|
-
id:
|
|
5429
|
+
id: Ce.id,
|
|
5430
5430
|
data: {},
|
|
5431
5431
|
created_at: "2023-08-31T07:11:38.677184Z",
|
|
5432
5432
|
updated_at: "2023-08-31T07:11:38.677184Z"
|
|
5433
5433
|
},
|
|
5434
5434
|
kind: "reply",
|
|
5435
|
-
activity_id:
|
|
5435
|
+
activity_id: Ds.id,
|
|
5436
5436
|
data: {
|
|
5437
5437
|
content: "Some content 3..."
|
|
5438
5438
|
},
|
|
@@ -5444,15 +5444,15 @@ Object.freeze({
|
|
|
5444
5444
|
created_at: "2023-12-03T21:53:45.999851Z",
|
|
5445
5445
|
updated_at: "2023-12-03T21:53:45.999851Z",
|
|
5446
5446
|
id: "some-reply-id-3",
|
|
5447
|
-
user_id:
|
|
5447
|
+
user_id: Le.id,
|
|
5448
5448
|
user: {
|
|
5449
|
-
id:
|
|
5449
|
+
id: Le.id,
|
|
5450
5450
|
data: {},
|
|
5451
5451
|
created_at: "2023-08-31T07:11:38.677184Z",
|
|
5452
5452
|
updated_at: "2023-08-31T07:11:38.677184Z"
|
|
5453
5453
|
},
|
|
5454
5454
|
kind: "reply",
|
|
5455
|
-
activity_id:
|
|
5455
|
+
activity_id: Rs.id,
|
|
5456
5456
|
data: {
|
|
5457
5457
|
content: "Some content 4..."
|
|
5458
5458
|
},
|
|
@@ -5473,13 +5473,13 @@ function Is({
|
|
|
5473
5473
|
const { mutate: o } = fe({
|
|
5474
5474
|
mutationFn: e,
|
|
5475
5475
|
onMutate: (c) => t((m) => {
|
|
5476
|
-
const l =
|
|
5477
|
-
return
|
|
5476
|
+
const l = Nn({ activity: Ps(c), user: i });
|
|
5477
|
+
return Fn(l, m);
|
|
5478
5478
|
}),
|
|
5479
5479
|
onError: n,
|
|
5480
5480
|
onSuccess: (c, m, l) => {
|
|
5481
|
-
const f =
|
|
5482
|
-
r.setQueryData(s,
|
|
5481
|
+
const f = Nn({ activity: c, user: i });
|
|
5482
|
+
r.setQueryData(s, Fn(f, l, !0));
|
|
5483
5483
|
}
|
|
5484
5484
|
});
|
|
5485
5485
|
return o;
|
|
@@ -5494,7 +5494,7 @@ function Os({
|
|
|
5494
5494
|
const { mutate: r } = fe({
|
|
5495
5495
|
mutationFn: e,
|
|
5496
5496
|
onMutate: ({ activityId: s, content: i }) => t((o) => {
|
|
5497
|
-
const c =
|
|
5497
|
+
const c = ft(s, o);
|
|
5498
5498
|
return c && (c.content = i), o;
|
|
5499
5499
|
}),
|
|
5500
5500
|
onError: n
|
|
@@ -5512,10 +5512,10 @@ function Bs({
|
|
|
5512
5512
|
},
|
|
5513
5513
|
queryKey: o
|
|
5514
5514
|
}) {
|
|
5515
|
-
const c =
|
|
5515
|
+
const c = Jt(), m = en(), l = { queryClient: c, queryKey: o }, f = {
|
|
5516
5516
|
mutationHandlers: {
|
|
5517
|
-
error:
|
|
5518
|
-
mutate:
|
|
5517
|
+
error: an(l),
|
|
5518
|
+
mutate: rn(l)
|
|
5519
5519
|
},
|
|
5520
5520
|
user: m,
|
|
5521
5521
|
...l
|
|
@@ -5545,13 +5545,13 @@ function Zs({
|
|
|
5545
5545
|
const { mutate: i } = fe({
|
|
5546
5546
|
mutationFn: e,
|
|
5547
5547
|
onMutate: ({ activityId: o }) => t((c) => {
|
|
5548
|
-
const m =
|
|
5549
|
-
return m &&
|
|
5548
|
+
const m = ft(o, c);
|
|
5549
|
+
return m && mt({ activity: m }), c;
|
|
5550
5550
|
}),
|
|
5551
5551
|
onError: n,
|
|
5552
5552
|
onSuccess: (o, { activityId: c }, m) => {
|
|
5553
|
-
const l =
|
|
5554
|
-
l &&
|
|
5553
|
+
const l = ft(c, m);
|
|
5554
|
+
l && mt({ activity: l, reaction: o }), r.setQueryData(s, m);
|
|
5555
5555
|
}
|
|
5556
5556
|
});
|
|
5557
5557
|
return i;
|
|
@@ -5563,7 +5563,7 @@ function qs({ queryFn: e, queryKey: t }) {
|
|
|
5563
5563
|
isLoading: s,
|
|
5564
5564
|
hasNextPage: i,
|
|
5565
5565
|
fetchNextPage: o
|
|
5566
|
-
} =
|
|
5566
|
+
} = In({
|
|
5567
5567
|
queryKey: t,
|
|
5568
5568
|
queryFn: e,
|
|
5569
5569
|
initialPageParam: { next: null },
|
|
@@ -5602,14 +5602,14 @@ function Us({
|
|
|
5602
5602
|
const { mutate: s } = fe({
|
|
5603
5603
|
mutationFn: e,
|
|
5604
5604
|
onMutate: ({ activityId: i }) => t((o) => {
|
|
5605
|
-
const c =
|
|
5606
|
-
return c &&
|
|
5605
|
+
const c = ft(i, o);
|
|
5606
|
+
return c && pa({ activity: c, user: r }), o;
|
|
5607
5607
|
}),
|
|
5608
5608
|
onError: n
|
|
5609
5609
|
});
|
|
5610
5610
|
return s;
|
|
5611
5611
|
}
|
|
5612
|
-
function
|
|
5612
|
+
function Fn(e, t, n = !1) {
|
|
5613
5613
|
return t ? (n ? t.pages[0].results[0] = e : t.pages[0].results = [e, ...t.pages[0].results], t) : {
|
|
5614
5614
|
pages: [{
|
|
5615
5615
|
next: "",
|
|
@@ -5618,7 +5618,7 @@ function An(e, t, n = !1) {
|
|
|
5618
5618
|
pageParams: [""]
|
|
5619
5619
|
};
|
|
5620
5620
|
}
|
|
5621
|
-
function
|
|
5621
|
+
function ft(e, t) {
|
|
5622
5622
|
if (t)
|
|
5623
5623
|
for (const { results: n } of t.pages) {
|
|
5624
5624
|
const r = n.find(({ id: s }) => s === e);
|
|
@@ -5668,9 +5668,9 @@ const Gi = ({
|
|
|
5668
5668
|
queryKey: [e, t, "activities"],
|
|
5669
5669
|
queryFns: r
|
|
5670
5670
|
});
|
|
5671
|
-
return m ? /* @__PURE__ */ a.jsx(
|
|
5671
|
+
return m ? /* @__PURE__ */ a.jsx(vt, { variant: "error", text: m.message }) : /* @__PURE__ */ a.jsxs("section", { children: [
|
|
5672
5672
|
/* @__PURE__ */ a.jsx(
|
|
5673
|
-
|
|
5673
|
+
ua,
|
|
5674
5674
|
{
|
|
5675
5675
|
contentType: "post",
|
|
5676
5676
|
createPost: p,
|
|
@@ -5684,27 +5684,27 @@ const Gi = ({
|
|
|
5684
5684
|
}
|
|
5685
5685
|
),
|
|
5686
5686
|
c == null ? void 0 : c.map((_) => {
|
|
5687
|
-
var
|
|
5687
|
+
var H, N, Y, ne, ee, Q, re;
|
|
5688
5688
|
const {
|
|
5689
5689
|
id: v,
|
|
5690
5690
|
own_reactions: w,
|
|
5691
|
-
latest_reactions:
|
|
5691
|
+
latest_reactions: E,
|
|
5692
5692
|
reaction_counts: M
|
|
5693
|
-
} = _,
|
|
5693
|
+
} = _, L = (((H = E == null ? void 0 : E.like) == null ? void 0 : H.length) || 0) > 0, O = (((N = w == null ? void 0 : w.like) == null ? void 0 : N.length) || 0) > 0, $ = O ? w == null ? void 0 : w.like[0].id : "", S = L ? (Y = E == null ? void 0 : E.like) == null ? void 0 : Y.map((J) => {
|
|
5694
5694
|
var se, de, ce;
|
|
5695
5695
|
return {
|
|
5696
|
-
id: (se =
|
|
5697
|
-
name: (ce = (de =
|
|
5696
|
+
id: (se = J == null ? void 0 : J.user) == null ? void 0 : se.id,
|
|
5697
|
+
name: (ce = (de = J == null ? void 0 : J.user) == null ? void 0 : de.data) == null ? void 0 : ce.name
|
|
5698
5698
|
};
|
|
5699
|
-
}) : !1,
|
|
5700
|
-
return /* @__PURE__ */ a.jsxs(
|
|
5699
|
+
}) : !1, C = _ == null ? void 0 : _.actor, U = (C == null ? void 0 : C.id) === (b == null ? void 0 : b.id);
|
|
5700
|
+
return /* @__PURE__ */ a.jsxs(Ue, { children: [
|
|
5701
5701
|
/* @__PURE__ */ a.jsx(
|
|
5702
|
-
|
|
5702
|
+
jt,
|
|
5703
5703
|
{
|
|
5704
5704
|
content: {
|
|
5705
5705
|
type: "post",
|
|
5706
5706
|
body: _ == null ? void 0 : _.content,
|
|
5707
|
-
canLike:
|
|
5707
|
+
canLike: wt(n, U),
|
|
5708
5708
|
createdAt: (_ == null ? void 0 : _.time) || "",
|
|
5709
5709
|
slugs: {
|
|
5710
5710
|
question: `${e}/${t}`,
|
|
@@ -5712,18 +5712,18 @@ const Gi = ({
|
|
|
5712
5712
|
},
|
|
5713
5713
|
slug: v,
|
|
5714
5714
|
author: {
|
|
5715
|
-
id:
|
|
5716
|
-
name: (ne =
|
|
5717
|
-
organization: (
|
|
5718
|
-
jobTitle: (
|
|
5715
|
+
id: C == null ? void 0 : C.id,
|
|
5716
|
+
name: (ne = C == null ? void 0 : C.data) == null ? void 0 : ne.name,
|
|
5717
|
+
organization: (ee = C == null ? void 0 : C.data) == null ? void 0 : ee.organization,
|
|
5718
|
+
jobTitle: (Q = C == null ? void 0 : C.data) == null ? void 0 : Q.jobTitle,
|
|
5719
5719
|
image: {
|
|
5720
|
-
thumbnail: ((re =
|
|
5720
|
+
thumbnail: ((re = C == null ? void 0 : C.data) == null ? void 0 : re.thumbnail) || void 0
|
|
5721
5721
|
}
|
|
5722
5722
|
},
|
|
5723
|
-
userLiked:
|
|
5723
|
+
userLiked: O,
|
|
5724
5724
|
likes: (M == null ? void 0 : M.like) || 0,
|
|
5725
5725
|
comments: (M == null ? void 0 : M.reply) || 0,
|
|
5726
|
-
peopleWhoLiked:
|
|
5726
|
+
peopleWhoLiked: S
|
|
5727
5727
|
},
|
|
5728
5728
|
links: {
|
|
5729
5729
|
post: `${e}/${t}/${v}`,
|
|
@@ -5734,7 +5734,7 @@ const Gi = ({
|
|
|
5734
5734
|
createContent: () => null,
|
|
5735
5735
|
deleteContent: () => g({ activityId: v }),
|
|
5736
5736
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5737
|
-
updateContent: (
|
|
5737
|
+
updateContent: (J, { body: se }) => h({ activityId: v, content: se })
|
|
5738
5738
|
},
|
|
5739
5739
|
likes: {
|
|
5740
5740
|
createLike: () => y({ activityId: v }),
|
|
@@ -5747,11 +5747,11 @@ const Gi = ({
|
|
|
5747
5747
|
isTruncated: !0
|
|
5748
5748
|
}
|
|
5749
5749
|
),
|
|
5750
|
-
/* @__PURE__ */ a.jsx(
|
|
5750
|
+
/* @__PURE__ */ a.jsx(Ee, {})
|
|
5751
5751
|
] }, v);
|
|
5752
5752
|
}),
|
|
5753
5753
|
!d && /* @__PURE__ */ a.jsx(
|
|
5754
|
-
|
|
5754
|
+
xt,
|
|
5755
5755
|
{
|
|
5756
5756
|
hasNextPage: f,
|
|
5757
5757
|
loadNextPage: () => l(),
|
|
@@ -6325,13 +6325,13 @@ function Vs({
|
|
|
6325
6325
|
const { mutate: o } = fe({
|
|
6326
6326
|
mutationFn: e,
|
|
6327
6327
|
onMutate: (c) => t((m) => {
|
|
6328
|
-
const l =
|
|
6329
|
-
return
|
|
6328
|
+
const l = Pn({ reply: As(c), user: i });
|
|
6329
|
+
return Ln(l, m, { replace: !1, append: (c == null ? void 0 : c.replyId) !== void 0 });
|
|
6330
6330
|
}),
|
|
6331
6331
|
onError: n,
|
|
6332
6332
|
onSuccess: (c, m, l) => {
|
|
6333
|
-
const f =
|
|
6334
|
-
r.setQueryData(s,
|
|
6333
|
+
const f = Pn({ reply: c, user: i });
|
|
6334
|
+
r.setQueryData(s, Ln(f, l, { replace: !0, append: (m == null ? void 0 : m.replyId) !== void 0 }));
|
|
6335
6335
|
}
|
|
6336
6336
|
});
|
|
6337
6337
|
return o;
|
|
@@ -6346,14 +6346,14 @@ function Ys({
|
|
|
6346
6346
|
const { mutate: r } = fe({
|
|
6347
6347
|
mutationFn: e,
|
|
6348
6348
|
onMutate: ({ replyId: s, content: i }) => t((o) => {
|
|
6349
|
-
const c =
|
|
6349
|
+
const c = pt(s, o);
|
|
6350
6350
|
return c && (c.data.content = i), o;
|
|
6351
6351
|
}),
|
|
6352
6352
|
onError: n
|
|
6353
6353
|
});
|
|
6354
6354
|
return r;
|
|
6355
6355
|
}
|
|
6356
|
-
function
|
|
6356
|
+
function ga({
|
|
6357
6357
|
queryFns: {
|
|
6358
6358
|
create: e,
|
|
6359
6359
|
edit: t,
|
|
@@ -6364,10 +6364,10 @@ function ha({
|
|
|
6364
6364
|
},
|
|
6365
6365
|
queryKey: o
|
|
6366
6366
|
}) {
|
|
6367
|
-
const c =
|
|
6367
|
+
const c = Jt(), m = en(), l = { queryClient: c, queryKey: o }, f = {
|
|
6368
6368
|
mutationHandlers: {
|
|
6369
|
-
error:
|
|
6370
|
-
mutate:
|
|
6369
|
+
error: an(l),
|
|
6370
|
+
mutate: rn(l)
|
|
6371
6371
|
},
|
|
6372
6372
|
user: m,
|
|
6373
6373
|
...l
|
|
@@ -6397,13 +6397,13 @@ function Gs({
|
|
|
6397
6397
|
const { mutate: i } = fe({
|
|
6398
6398
|
mutationFn: e,
|
|
6399
6399
|
onMutate: ({ replyId: o }) => t((c) => {
|
|
6400
|
-
const m =
|
|
6401
|
-
return m &&
|
|
6400
|
+
const m = pt(o, c);
|
|
6401
|
+
return m && An({ reply: m }), c;
|
|
6402
6402
|
}),
|
|
6403
6403
|
onError: n,
|
|
6404
6404
|
onSuccess: (o, { replyId: c }, m) => {
|
|
6405
|
-
const l =
|
|
6406
|
-
l &&
|
|
6405
|
+
const l = pt(c, m);
|
|
6406
|
+
l && An({ reply: l, reaction: o }), r.setQueryData(s, m);
|
|
6407
6407
|
}
|
|
6408
6408
|
});
|
|
6409
6409
|
return i;
|
|
@@ -6415,7 +6415,7 @@ function Ks({ queryFn: e, queryKey: t }) {
|
|
|
6415
6415
|
isLoading: s,
|
|
6416
6416
|
hasNextPage: i,
|
|
6417
6417
|
fetchNextPage: o
|
|
6418
|
-
} =
|
|
6418
|
+
} = In({
|
|
6419
6419
|
queryKey: t,
|
|
6420
6420
|
queryFn: e,
|
|
6421
6421
|
initialPageParam: { next: "" },
|
|
@@ -6455,7 +6455,7 @@ function Js({
|
|
|
6455
6455
|
const { mutate: s } = fe({
|
|
6456
6456
|
mutationFn: e,
|
|
6457
6457
|
onMutate: ({ replyId: i }) => t((o) => {
|
|
6458
|
-
const c =
|
|
6458
|
+
const c = pt(i, o);
|
|
6459
6459
|
return c && Fs({ reply: c, user: r }), o;
|
|
6460
6460
|
}),
|
|
6461
6461
|
onError: n
|
|
@@ -6478,10 +6478,10 @@ function ei(e, t, n) {
|
|
|
6478
6478
|
function ti(e, t, n) {
|
|
6479
6479
|
return n != null && n.replace ? t.pages[0].results[0] = e : t.pages[0].results = [e, ...t.pages[0].results], t;
|
|
6480
6480
|
}
|
|
6481
|
-
function
|
|
6481
|
+
function Ln(e, t, n) {
|
|
6482
6482
|
return t ? n != null && n.append ? ei(e, t, n) : ti(e, t, n) : Xs(e);
|
|
6483
6483
|
}
|
|
6484
|
-
function
|
|
6484
|
+
function pt(e, t) {
|
|
6485
6485
|
if (t)
|
|
6486
6486
|
for (const { results: n } of t.pages) {
|
|
6487
6487
|
const r = n.find(({ id: s }) => s === e);
|
|
@@ -6525,14 +6525,14 @@ const ri = ({
|
|
|
6525
6525
|
unlike: k
|
|
6526
6526
|
},
|
|
6527
6527
|
user: b
|
|
6528
|
-
} =
|
|
6528
|
+
} = ga({
|
|
6529
6529
|
queryKey: [e, t, n, r, "replies"],
|
|
6530
6530
|
queryFns: {
|
|
6531
6531
|
...i,
|
|
6532
6532
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6533
6533
|
list: (v) => i.list({ ...v, reactionId: r })
|
|
6534
6534
|
}
|
|
6535
|
-
}), _ = _e(
|
|
6535
|
+
}), _ = _e(kt);
|
|
6536
6536
|
return /* @__PURE__ */ a.jsx(
|
|
6537
6537
|
Es,
|
|
6538
6538
|
{
|
|
@@ -6540,29 +6540,29 @@ const ri = ({
|
|
|
6540
6540
|
showRepliesButton: !1,
|
|
6541
6541
|
children: /* @__PURE__ */ a.jsxs("section", { children: [
|
|
6542
6542
|
c == null ? void 0 : c.map((v) => {
|
|
6543
|
-
var Q,
|
|
6543
|
+
var Q, re, J, se, de, ce, W, ue, pe, he, me;
|
|
6544
6544
|
const {
|
|
6545
6545
|
id: w,
|
|
6546
|
-
own_children:
|
|
6546
|
+
own_children: E,
|
|
6547
6547
|
latest_children: M,
|
|
6548
|
-
children_counts:
|
|
6549
|
-
} = v,
|
|
6548
|
+
children_counts: L
|
|
6549
|
+
} = v, $ = (((Q = E == null ? void 0 : E.like) == null ? void 0 : Q.length) || 0) > 0 ? (re = E == null ? void 0 : E.like) == null ? void 0 : re.find((Z) => {
|
|
6550
6550
|
var K;
|
|
6551
|
-
return ((K =
|
|
6552
|
-
}),
|
|
6553
|
-
var K,
|
|
6551
|
+
return ((K = Z == null ? void 0 : Z.user) == null ? void 0 : K.id) === (b == null ? void 0 : b.id);
|
|
6552
|
+
}) : !1, S = $ ? $ == null ? void 0 : $.id : "", C = !!$, H = (((J = M == null ? void 0 : M.like) == null ? void 0 : J.length) || 0) > 0 ? (se = M == null ? void 0 : M.like) == null ? void 0 : se.map((Z) => {
|
|
6553
|
+
var K, Se, je;
|
|
6554
6554
|
return {
|
|
6555
|
-
id: (K =
|
|
6556
|
-
name: (
|
|
6555
|
+
id: (K = Z == null ? void 0 : Z.user) == null ? void 0 : K.id,
|
|
6556
|
+
name: (je = (Se = Z == null ? void 0 : Z.user) == null ? void 0 : Se.data) == null ? void 0 : je.name
|
|
6557
6557
|
};
|
|
6558
|
-
}) : !1, N = v == null ? void 0 : v.user,
|
|
6558
|
+
}) : !1, N = v == null ? void 0 : v.user, Y = (N == null ? void 0 : N.id) === (b == null ? void 0 : b.id), ne = wt(s, Y), ee = typeof v.data.content == "string" ? (de = v == null ? void 0 : v.data) == null ? void 0 : de.content : ((W = (ce = v == null ? void 0 : v.data) == null ? void 0 : ce.content) == null ? void 0 : W.text) || "";
|
|
6559
6559
|
return /* @__PURE__ */ a.jsx(
|
|
6560
|
-
|
|
6560
|
+
jt,
|
|
6561
6561
|
{
|
|
6562
6562
|
content: {
|
|
6563
6563
|
type: "reply",
|
|
6564
|
-
body:
|
|
6565
|
-
canLike:
|
|
6564
|
+
body: ee,
|
|
6565
|
+
canLike: ne,
|
|
6566
6566
|
createdAt: v == null ? void 0 : v.created_at,
|
|
6567
6567
|
slugs: {
|
|
6568
6568
|
question: `${e}/${t}`,
|
|
@@ -6574,27 +6574,27 @@ const ri = ({
|
|
|
6574
6574
|
slug: "",
|
|
6575
6575
|
author: {
|
|
6576
6576
|
id: N == null ? void 0 : N.id,
|
|
6577
|
-
name: (
|
|
6578
|
-
organization: (
|
|
6579
|
-
jobTitle: (
|
|
6577
|
+
name: (ue = N.data) == null ? void 0 : ue.name,
|
|
6578
|
+
organization: (pe = N.data) == null ? void 0 : pe.organization,
|
|
6579
|
+
jobTitle: (he = N.data) == null ? void 0 : he.jobTitle,
|
|
6580
6580
|
image: {
|
|
6581
|
-
thumbnail: ((
|
|
6581
|
+
thumbnail: ((me = N.data) == null ? void 0 : me.thumbnail) || void 0
|
|
6582
6582
|
}
|
|
6583
6583
|
},
|
|
6584
|
-
userLiked:
|
|
6585
|
-
likes: (
|
|
6586
|
-
peopleWhoLiked:
|
|
6584
|
+
userLiked: C,
|
|
6585
|
+
likes: (L == null ? void 0 : L.like) || 0,
|
|
6586
|
+
peopleWhoLiked: H
|
|
6587
6587
|
},
|
|
6588
6588
|
functions: {
|
|
6589
6589
|
content: {
|
|
6590
6590
|
createContent: () => null,
|
|
6591
6591
|
deleteContent: () => y({ replyId: w }),
|
|
6592
6592
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6593
|
-
updateContent: (
|
|
6593
|
+
updateContent: (Z, { body: K }) => h({ replyId: w, content: K })
|
|
6594
6594
|
},
|
|
6595
6595
|
likes: {
|
|
6596
6596
|
createLike: () => g({ replyId: w }),
|
|
6597
|
-
deleteLike: () => k({ replyId: w, reactionId:
|
|
6597
|
+
deleteLike: () => k({ replyId: w, reactionId: S })
|
|
6598
6598
|
},
|
|
6599
6599
|
comments: {}
|
|
6600
6600
|
}
|
|
@@ -6603,7 +6603,7 @@ const ri = ({
|
|
|
6603
6603
|
);
|
|
6604
6604
|
}),
|
|
6605
6605
|
!d && /* @__PURE__ */ a.jsx(
|
|
6606
|
-
|
|
6606
|
+
xt,
|
|
6607
6607
|
{
|
|
6608
6608
|
hasNextPage: f,
|
|
6609
6609
|
loadNextPage: () => l(),
|
|
@@ -6616,7 +6616,7 @@ const ri = ({
|
|
|
6616
6616
|
}
|
|
6617
6617
|
),
|
|
6618
6618
|
_.showForm && /* @__PURE__ */ a.jsx(
|
|
6619
|
-
|
|
6619
|
+
nn,
|
|
6620
6620
|
{
|
|
6621
6621
|
content: {
|
|
6622
6622
|
type: "reply",
|
|
@@ -6660,7 +6660,7 @@ const ri = ({
|
|
|
6660
6660
|
unlike: b
|
|
6661
6661
|
},
|
|
6662
6662
|
user: _
|
|
6663
|
-
} =
|
|
6663
|
+
} = ga({
|
|
6664
6664
|
queryKey: [e, t, n, "replies"],
|
|
6665
6665
|
queryFns: s
|
|
6666
6666
|
});
|
|
@@ -6672,7 +6672,7 @@ const ri = ({
|
|
|
6672
6672
|
")"
|
|
6673
6673
|
] }),
|
|
6674
6674
|
/* @__PURE__ */ a.jsx(
|
|
6675
|
-
|
|
6675
|
+
ua,
|
|
6676
6676
|
{
|
|
6677
6677
|
contentType: "reply",
|
|
6678
6678
|
createPost: (v, { body: w }) => h({ activityId: n, content: w }),
|
|
@@ -6686,29 +6686,29 @@ const ri = ({
|
|
|
6686
6686
|
}
|
|
6687
6687
|
),
|
|
6688
6688
|
m == null ? void 0 : m.map((v) => {
|
|
6689
|
-
var Q,
|
|
6689
|
+
var Q, re, J, se, de, ce, W, ue, pe, he, me;
|
|
6690
6690
|
const {
|
|
6691
6691
|
id: w,
|
|
6692
|
-
own_children:
|
|
6692
|
+
own_children: E,
|
|
6693
6693
|
latest_children: M,
|
|
6694
|
-
children_counts:
|
|
6695
|
-
} = v,
|
|
6694
|
+
children_counts: L
|
|
6695
|
+
} = v, $ = (((Q = E == null ? void 0 : E.like) == null ? void 0 : Q.length) || 0) > 0 ? (re = E == null ? void 0 : E.like) == null ? void 0 : re.find((Z) => {
|
|
6696
6696
|
var K;
|
|
6697
|
-
return ((K =
|
|
6698
|
-
}),
|
|
6699
|
-
var K,
|
|
6697
|
+
return ((K = Z == null ? void 0 : Z.user) == null ? void 0 : K.id) === (_ == null ? void 0 : _.id);
|
|
6698
|
+
}) : !1, S = $ ? $ == null ? void 0 : $.id : "", C = !!$, H = (((J = M == null ? void 0 : M.like) == null ? void 0 : J.length) || 0) > 0 ? (se = M == null ? void 0 : M.like) == null ? void 0 : se.map((Z) => {
|
|
6699
|
+
var K, Se, je;
|
|
6700
6700
|
return {
|
|
6701
|
-
id: (K =
|
|
6702
|
-
name: (
|
|
6701
|
+
id: (K = Z == null ? void 0 : Z.user) == null ? void 0 : K.id,
|
|
6702
|
+
name: (je = (Se = Z == null ? void 0 : Z.user) == null ? void 0 : Se.data) == null ? void 0 : je.name
|
|
6703
6703
|
};
|
|
6704
|
-
}) : !1, N = v == null ? void 0 : v.user,
|
|
6704
|
+
}) : !1, N = v == null ? void 0 : v.user, Y = (N == null ? void 0 : N.id) === (_ == null ? void 0 : _.id), ne = wt(r, Y), ee = typeof v.data.content == "string" ? (de = v == null ? void 0 : v.data) == null ? void 0 : de.content : ((W = (ce = v == null ? void 0 : v.data) == null ? void 0 : ce.content) == null ? void 0 : W.text) || "";
|
|
6705
6705
|
return /* @__PURE__ */ a.jsx(ks, { children: /* @__PURE__ */ a.jsx(
|
|
6706
|
-
|
|
6706
|
+
jt,
|
|
6707
6707
|
{
|
|
6708
6708
|
content: {
|
|
6709
6709
|
type: "reply",
|
|
6710
|
-
body:
|
|
6711
|
-
canLike:
|
|
6710
|
+
body: ee,
|
|
6711
|
+
canLike: ne,
|
|
6712
6712
|
createdAt: v == null ? void 0 : v.created_at,
|
|
6713
6713
|
slugs: {
|
|
6714
6714
|
question: `${e}/${t}`,
|
|
@@ -6718,27 +6718,27 @@ const ri = ({
|
|
|
6718
6718
|
slug: w,
|
|
6719
6719
|
author: {
|
|
6720
6720
|
id: N == null ? void 0 : N.id,
|
|
6721
|
-
name: (
|
|
6722
|
-
organization: (
|
|
6723
|
-
jobTitle: (
|
|
6721
|
+
name: (ue = N.data) == null ? void 0 : ue.name,
|
|
6722
|
+
organization: (pe = N.data) == null ? void 0 : pe.organization,
|
|
6723
|
+
jobTitle: (he = N.data) == null ? void 0 : he.jobTitle,
|
|
6724
6724
|
image: {
|
|
6725
|
-
thumbnail: ((
|
|
6725
|
+
thumbnail: ((me = N.data) == null ? void 0 : me.thumbnail) || void 0
|
|
6726
6726
|
}
|
|
6727
6727
|
},
|
|
6728
|
-
userLiked:
|
|
6729
|
-
likes: (
|
|
6730
|
-
peopleWhoLiked:
|
|
6728
|
+
userLiked: C,
|
|
6729
|
+
likes: (L == null ? void 0 : L.like) || 0,
|
|
6730
|
+
peopleWhoLiked: H
|
|
6731
6731
|
},
|
|
6732
6732
|
functions: {
|
|
6733
6733
|
content: {
|
|
6734
6734
|
createContent: () => null,
|
|
6735
6735
|
deleteContent: () => k({ replyId: w }),
|
|
6736
6736
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6737
|
-
updateContent: (
|
|
6737
|
+
updateContent: (Z, { body: K }) => g({ replyId: w, content: K })
|
|
6738
6738
|
},
|
|
6739
6739
|
likes: {
|
|
6740
6740
|
createLike: () => y({ replyId: w }),
|
|
6741
|
-
deleteLike: () => b({ replyId: w, reactionId:
|
|
6741
|
+
deleteLike: () => b({ replyId: w, reactionId: S })
|
|
6742
6742
|
},
|
|
6743
6743
|
comments: {}
|
|
6744
6744
|
},
|
|
@@ -6760,7 +6760,7 @@ const ri = ({
|
|
|
6760
6760
|
) }, w);
|
|
6761
6761
|
}),
|
|
6762
6762
|
!p && /* @__PURE__ */ a.jsx(
|
|
6763
|
-
|
|
6763
|
+
xt,
|
|
6764
6764
|
{
|
|
6765
6765
|
hasNextPage: d,
|
|
6766
6766
|
loadNextPage: () => f(),
|
|
@@ -6810,10 +6810,10 @@ function ci({
|
|
|
6810
6810
|
},
|
|
6811
6811
|
queryKey: s
|
|
6812
6812
|
}) {
|
|
6813
|
-
const i =
|
|
6813
|
+
const i = Jt(), o = en(), c = { queryClient: i, queryKey: s }, m = {
|
|
6814
6814
|
mutationHandlers: {
|
|
6815
|
-
error:
|
|
6816
|
-
mutate:
|
|
6815
|
+
error: an(c),
|
|
6816
|
+
mutate: rn(c)
|
|
6817
6817
|
},
|
|
6818
6818
|
user: o,
|
|
6819
6819
|
...c
|
|
@@ -6840,10 +6840,10 @@ function li({
|
|
|
6840
6840
|
}) {
|
|
6841
6841
|
const { mutate: i } = fe({
|
|
6842
6842
|
mutationFn: e,
|
|
6843
|
-
onMutate: (o) => t((c) => (c &&
|
|
6843
|
+
onMutate: (o) => t((c) => (c && mt({ activity: c }), c)),
|
|
6844
6844
|
onError: n,
|
|
6845
6845
|
onSuccess: (o, c, m) => {
|
|
6846
|
-
m &&
|
|
6846
|
+
m && mt({ activity: m, reaction: o }), r.setQueryData(s, m);
|
|
6847
6847
|
}
|
|
6848
6848
|
});
|
|
6849
6849
|
return i;
|
|
@@ -6858,7 +6858,7 @@ function di({
|
|
|
6858
6858
|
}) {
|
|
6859
6859
|
const { mutate: s } = fe({
|
|
6860
6860
|
mutationFn: e,
|
|
6861
|
-
onMutate: (i) => t((o) => (o &&
|
|
6861
|
+
onMutate: (i) => t((o) => (o && pa({ activity: o, user: r }), o)),
|
|
6862
6862
|
onError: n
|
|
6863
6863
|
});
|
|
6864
6864
|
return s;
|
|
@@ -6878,7 +6878,7 @@ const Qi = ({
|
|
|
6878
6878
|
leave: m
|
|
6879
6879
|
}
|
|
6880
6880
|
}) => {
|
|
6881
|
-
var $, C,
|
|
6881
|
+
var $, S, C, U, H, N, Y, ne, ee;
|
|
6882
6882
|
const l = A(), f = _e(we), {
|
|
6883
6883
|
activity: d,
|
|
6884
6884
|
error: p,
|
|
@@ -6896,27 +6896,27 @@ const Qi = ({
|
|
|
6896
6896
|
return /* @__PURE__ */ a.jsx(be, { style: { height: "400px" } });
|
|
6897
6897
|
if (p || !d)
|
|
6898
6898
|
return /* @__PURE__ */ a.jsx(
|
|
6899
|
-
|
|
6899
|
+
vt,
|
|
6900
6900
|
{
|
|
6901
6901
|
variant: "error",
|
|
6902
6902
|
text: l.formatMessage({ id: "activitySection_notFoundError" })
|
|
6903
6903
|
}
|
|
6904
6904
|
);
|
|
6905
|
-
const { own_reactions: b, latest_reactions: _ } = d, v = ((($ = _ == null ? void 0 : _.like) == null ? void 0 : $.length) || 0) > 0, w = (((
|
|
6906
|
-
var re,
|
|
6905
|
+
const { own_reactions: b, latest_reactions: _ } = d, v = ((($ = _ == null ? void 0 : _.like) == null ? void 0 : $.length) || 0) > 0, w = (((S = b == null ? void 0 : b.like) == null ? void 0 : S.length) || 0) > 0, E = w ? b == null ? void 0 : b.like[0].id : "", M = v ? (C = _ == null ? void 0 : _.like) == null ? void 0 : C.map((Q) => {
|
|
6906
|
+
var re, J, se;
|
|
6907
6907
|
return {
|
|
6908
|
-
id: (re =
|
|
6909
|
-
name: (se = (
|
|
6908
|
+
id: (re = Q == null ? void 0 : Q.user) == null ? void 0 : re.id,
|
|
6909
|
+
name: (se = (J = Q == null ? void 0 : Q.user) == null ? void 0 : J.data) == null ? void 0 : se.name
|
|
6910
6910
|
};
|
|
6911
|
-
}) : !1,
|
|
6911
|
+
}) : !1, L = d == null ? void 0 : d.actor, O = (L == null ? void 0 : L.id) === (f == null ? void 0 : f.id);
|
|
6912
6912
|
return /* @__PURE__ */ a.jsx(
|
|
6913
|
-
|
|
6913
|
+
jt,
|
|
6914
6914
|
{
|
|
6915
6915
|
className: "activity-section",
|
|
6916
6916
|
content: {
|
|
6917
6917
|
type: "post",
|
|
6918
6918
|
body: d == null ? void 0 : d.content,
|
|
6919
|
-
canLike:
|
|
6919
|
+
canLike: wt(r, O),
|
|
6920
6920
|
createdAt: (d == null ? void 0 : d.time) || "",
|
|
6921
6921
|
slugs: {
|
|
6922
6922
|
question: `${e}/${t}`,
|
|
@@ -6924,31 +6924,31 @@ const Qi = ({
|
|
|
6924
6924
|
},
|
|
6925
6925
|
slug: n,
|
|
6926
6926
|
author: {
|
|
6927
|
-
id:
|
|
6928
|
-
name: (
|
|
6929
|
-
organization: (
|
|
6930
|
-
jobTitle: (
|
|
6927
|
+
id: L.id,
|
|
6928
|
+
name: (U = L.data) == null ? void 0 : U.name,
|
|
6929
|
+
organization: (H = L.data) == null ? void 0 : H.organization,
|
|
6930
|
+
jobTitle: (N = L.data) == null ? void 0 : N.jobTitle,
|
|
6931
6931
|
image: {
|
|
6932
|
-
thumbnail: ((Y =
|
|
6932
|
+
thumbnail: ((Y = L.data) == null ? void 0 : Y.thumbnail) || void 0
|
|
6933
6933
|
}
|
|
6934
6934
|
},
|
|
6935
6935
|
userLiked: w,
|
|
6936
6936
|
likes: ((ne = d == null ? void 0 : d.reaction_counts) == null ? void 0 : ne.like) || 0,
|
|
6937
|
-
comments: ((
|
|
6937
|
+
comments: ((ee = d == null ? void 0 : d.reaction_counts) == null ? void 0 : ee.reply) || 0,
|
|
6938
6938
|
peopleWhoLiked: M
|
|
6939
6939
|
},
|
|
6940
|
-
originalAuthorId:
|
|
6940
|
+
originalAuthorId: L == null ? void 0 : L.id,
|
|
6941
6941
|
forceHide: { comments: !0 },
|
|
6942
6942
|
functions: {
|
|
6943
6943
|
content: {
|
|
6944
6944
|
createContent: () => null,
|
|
6945
6945
|
deleteContent: s,
|
|
6946
6946
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6947
|
-
updateContent: (
|
|
6947
|
+
updateContent: (Q, { body: re }) => g({ content: re })
|
|
6948
6948
|
},
|
|
6949
6949
|
likes: {
|
|
6950
6950
|
createLike: () => y({ activityId: n }),
|
|
6951
|
-
deleteLike: () => k({ activityId: n, reactionId:
|
|
6951
|
+
deleteLike: () => k({ activityId: n, reactionId: E })
|
|
6952
6952
|
},
|
|
6953
6953
|
comments: {
|
|
6954
6954
|
openComments: () => {
|
|
@@ -7022,16 +7022,16 @@ const Qi = ({
|
|
|
7022
7022
|
contributors: ["community"]
|
|
7023
7023
|
}
|
|
7024
7024
|
];
|
|
7025
|
-
const
|
|
7025
|
+
const rt = "notFoundError_", Xi = () => {
|
|
7026
7026
|
const e = A(), t = [];
|
|
7027
7027
|
return Dn.forEach((n, r) => {
|
|
7028
|
-
n.title = e.formatMessage({ id: `${
|
|
7028
|
+
n.title = e.formatMessage({ id: `${rt}post_${r + 1}` }), t.push("solutionArticle");
|
|
7029
7029
|
}), /* @__PURE__ */ a.jsxs(
|
|
7030
7030
|
ys,
|
|
7031
7031
|
{
|
|
7032
7032
|
styling: { background: "bold", circle: "small", variant: "alt-2" },
|
|
7033
7033
|
additionalContent: {
|
|
7034
|
-
appended: /* @__PURE__ */ a.jsxs(
|
|
7034
|
+
appended: /* @__PURE__ */ a.jsxs(yt, { children: [
|
|
7035
7035
|
/* @__PURE__ */ a.jsx(
|
|
7036
7036
|
Jr,
|
|
7037
7037
|
{
|
|
@@ -7042,94 +7042,94 @@ const nt = "notFoundError_", Xi = () => {
|
|
|
7042
7042
|
})
|
|
7043
7043
|
}
|
|
7044
7044
|
),
|
|
7045
|
-
/* @__PURE__ */ a.jsx(
|
|
7045
|
+
/* @__PURE__ */ a.jsx(q, { href: "/solution-articles/", children: e.formatMessage({ id: `${rt}cta` }) })
|
|
7046
7046
|
] })
|
|
7047
7047
|
},
|
|
7048
7048
|
reportError: () => {
|
|
7049
7049
|
},
|
|
7050
7050
|
className: "not-found-error",
|
|
7051
7051
|
children: [
|
|
7052
|
-
/* @__PURE__ */ a.jsx("h1", { children: e.formatMessage({ id: `${
|
|
7053
|
-
/* @__PURE__ */ a.jsx("p", { children: e.formatMessage({ id: `${
|
|
7052
|
+
/* @__PURE__ */ a.jsx("h1", { children: e.formatMessage({ id: `${rt}title` }) }),
|
|
7053
|
+
/* @__PURE__ */ a.jsx("p", { children: e.formatMessage({ id: `${rt}text` }) })
|
|
7054
7054
|
]
|
|
7055
7055
|
}
|
|
7056
7056
|
);
|
|
7057
7057
|
};
|
|
7058
7058
|
export {
|
|
7059
|
-
|
|
7059
|
+
ze as ASSETS_BUCKET,
|
|
7060
7060
|
Gi as ActivitiesFeed,
|
|
7061
7061
|
Qi as ActivitySection,
|
|
7062
|
-
|
|
7062
|
+
ua as AddPost,
|
|
7063
7063
|
Ci as BannerSection,
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7064
|
+
Di as Breadcrumbs,
|
|
7065
|
+
q as Button,
|
|
7066
|
+
_t as ButtonWrapper,
|
|
7067
7067
|
Er as CacheProvider,
|
|
7068
|
-
|
|
7068
|
+
ta as Card,
|
|
7069
7069
|
Jr as CardBlock,
|
|
7070
7070
|
Fi as Carousel,
|
|
7071
|
-
|
|
7071
|
+
Yn as CollapsibleSection,
|
|
7072
7072
|
ds as Columns,
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7073
|
+
Li as CommunityDetails,
|
|
7074
|
+
ea as Contributors,
|
|
7075
|
+
kt as ConversationContext,
|
|
7076
7076
|
us as CookieBanner,
|
|
7077
7077
|
ks as DiscussionConversation,
|
|
7078
|
-
|
|
7078
|
+
nn as DiscussionForm,
|
|
7079
7079
|
Ts as DiscussionLikes,
|
|
7080
|
-
|
|
7080
|
+
jt as DiscussionPost,
|
|
7081
7081
|
Es as DiscussionThread,
|
|
7082
|
-
|
|
7082
|
+
Ee as Divider,
|
|
7083
7083
|
$i as DownloadSection,
|
|
7084
|
-
|
|
7084
|
+
qe as EMAILS,
|
|
7085
7085
|
qi as EmailHelperTextBox,
|
|
7086
|
-
|
|
7087
|
-
|
|
7086
|
+
vt as EmptyStateBox,
|
|
7087
|
+
Ri as Filters,
|
|
7088
7088
|
Mr as FlagsProvider,
|
|
7089
|
-
|
|
7090
|
-
|
|
7089
|
+
ra as Footer,
|
|
7090
|
+
yt as FullWidthSection,
|
|
7091
7091
|
Mi as GlobalProviders,
|
|
7092
|
-
|
|
7092
|
+
ca as Header,
|
|
7093
7093
|
Ar as HelperTextBox,
|
|
7094
|
-
|
|
7094
|
+
Zn as HiddenFromScreenReaders,
|
|
7095
7095
|
Pi as HideShowTextBox,
|
|
7096
|
-
|
|
7096
|
+
$e as HighlightedTextBox,
|
|
7097
7097
|
Nr as IntlProvider,
|
|
7098
7098
|
hs as InviteForm,
|
|
7099
7099
|
zi as InviteModal,
|
|
7100
|
-
|
|
7100
|
+
na as JoinButton,
|
|
7101
7101
|
Ii as LanguageSwitcher,
|
|
7102
|
-
|
|
7103
|
-
|
|
7102
|
+
bt as Link,
|
|
7103
|
+
xt as LoadMore,
|
|
7104
7104
|
Ai as LoadingBlock,
|
|
7105
7105
|
be as LoadingPlaceholder,
|
|
7106
|
-
|
|
7107
|
-
|
|
7106
|
+
Qn as LoadingState,
|
|
7107
|
+
aa as Logo,
|
|
7108
7108
|
Ei as LogoSection,
|
|
7109
|
-
|
|
7109
|
+
jn as MarkdownText,
|
|
7110
7110
|
Si as MarketingBox,
|
|
7111
|
-
|
|
7111
|
+
tn as Member,
|
|
7112
7112
|
Vi as MembersList,
|
|
7113
|
-
|
|
7113
|
+
la as Modal,
|
|
7114
7114
|
as as MoreMenu,
|
|
7115
7115
|
Ni as NUMBER_OF_USERS,
|
|
7116
7116
|
is as NavigationMenu,
|
|
7117
7117
|
Xi as NotFoundError,
|
|
7118
|
-
|
|
7118
|
+
da as Overlay,
|
|
7119
7119
|
qr as PageHeading,
|
|
7120
7120
|
ys as PageLayout,
|
|
7121
7121
|
Hi as PasswordRules,
|
|
7122
|
-
|
|
7123
|
-
|
|
7122
|
+
ot as Pill,
|
|
7123
|
+
Ve as ProfilePicture,
|
|
7124
7124
|
Ur as ProgressBar,
|
|
7125
7125
|
Ui as Rating,
|
|
7126
7126
|
si as RepliesFeed,
|
|
7127
7127
|
Yi as ResponsesHeading,
|
|
7128
|
-
|
|
7128
|
+
Vn as ResponsiveImage,
|
|
7129
7129
|
ps as SearchForm,
|
|
7130
7130
|
Oi as ShareLinks,
|
|
7131
7131
|
Zr as Span,
|
|
7132
|
-
|
|
7132
|
+
Gt as StatusBanner,
|
|
7133
7133
|
Bi as Tabs,
|
|
7134
7134
|
Wi as Tags,
|
|
7135
7135
|
jr as Tooltip,
|
|
@@ -7138,15 +7138,15 @@ export {
|
|
|
7138
7138
|
Pr as UserProvider,
|
|
7139
7139
|
ie as VisuallyHidden,
|
|
7140
7140
|
_s as addAriaProps,
|
|
7141
|
-
|
|
7142
|
-
|
|
7141
|
+
Xn as getMember,
|
|
7142
|
+
dt as headerData,
|
|
7143
7143
|
Ji as mapGetStreamData,
|
|
7144
7144
|
br as pageReady,
|
|
7145
7145
|
Ki as repliesFeedMock,
|
|
7146
7146
|
or as useCurrentPath,
|
|
7147
|
-
|
|
7148
|
-
|
|
7147
|
+
Fe as useEffectAfterMount,
|
|
7148
|
+
We as useElementWidth,
|
|
7149
7149
|
lr as useScrollListener,
|
|
7150
7150
|
dr as useScrollToHash,
|
|
7151
|
-
|
|
7151
|
+
en as useUser
|
|
7152
7152
|
};
|