@apolitical/component-library 1.18.0-4247.55 → 1.18.0-4247.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import A, { memo as Fe, useState as R, useEffect as G, useRef as
|
|
1
|
+
import A, { memo as Fe, useState as R, useEffect as G, useRef as te, useMemo as ft, createContext as Gt, useContext as ge, Children as Ht, useCallback as Dn, Fragment as qe, useReducer as Oa, Suspense as Ba } from "react";
|
|
2
2
|
import Za from "lodash.clonedeep";
|
|
3
3
|
import qa from "lodash.set";
|
|
4
4
|
import { useIntl as P, IntlProvider as Ha, createIntl as Ua, FormattedMessage as je } from "react-intl";
|
|
@@ -95,54 +95,54 @@ var Le = {};
|
|
|
95
95
|
var yn;
|
|
96
96
|
function ir() {
|
|
97
97
|
return yn || (yn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
|
-
var e = A, 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"),
|
|
98
|
+
var e = A, 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")
|
|
101
101
|
return null;
|
|
102
|
-
var x =
|
|
102
|
+
var x = g && u[g] || u[y];
|
|
103
103
|
return typeof x == "function" ? x : null;
|
|
104
104
|
}
|
|
105
105
|
var v = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
106
|
-
function
|
|
106
|
+
function _(u) {
|
|
107
107
|
{
|
|
108
|
-
for (var x = arguments.length,
|
|
109
|
-
|
|
110
|
-
b("error", u,
|
|
108
|
+
for (var x = arguments.length, $ = new Array(x > 1 ? x - 1 : 0), N = 1; N < x; N++)
|
|
109
|
+
$[N - 1] = arguments[N];
|
|
110
|
+
b("error", u, $);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function b(u, x,
|
|
113
|
+
function b(u, x, $) {
|
|
114
114
|
{
|
|
115
|
-
var N = v.ReactDebugCurrentFrame,
|
|
116
|
-
|
|
117
|
-
var
|
|
115
|
+
var N = v.ReactDebugCurrentFrame, B = N.getStackAddendum();
|
|
116
|
+
B !== "" && (x += "%s", $ = $.concat([B]));
|
|
117
|
+
var Y = $.map(function(L) {
|
|
118
118
|
return String(L);
|
|
119
119
|
});
|
|
120
|
-
|
|
120
|
+
Y.unshift("Warning: " + x), Function.prototype.apply.call(console[u], console, Y);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var j = !1, C = !1, S = !1,
|
|
124
|
-
|
|
125
|
-
function
|
|
126
|
-
return !!(typeof u == "string" || typeof u == "function" || u === r || u === i || F || u === s || u === l || u === f ||
|
|
123
|
+
var j = !1, C = !1, S = !1, I = !1, F = !1, M;
|
|
124
|
+
M = Symbol.for("react.module.reference");
|
|
125
|
+
function T(u) {
|
|
126
|
+
return !!(typeof u == "string" || typeof u == "function" || u === r || u === i || F || u === s || u === l || u === f || I || u === h || j || C || S || 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
|
-
u.$$typeof ===
|
|
130
|
+
u.$$typeof === M || u.getModuleId !== void 0));
|
|
131
131
|
}
|
|
132
|
-
function E(u, x,
|
|
132
|
+
function E(u, x, $) {
|
|
133
133
|
var N = u.displayName;
|
|
134
134
|
if (N)
|
|
135
135
|
return N;
|
|
136
|
-
var
|
|
137
|
-
return
|
|
136
|
+
var B = x.displayName || x.name || "";
|
|
137
|
+
return B !== "" ? $ + "(" + B + ")" : $;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function O(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
|
-
if (typeof u.tag == "number" &&
|
|
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")
|
|
146
146
|
return u.displayName || u.name || null;
|
|
147
147
|
if (typeof u == "string")
|
|
148
148
|
return u;
|
|
@@ -164,19 +164,19 @@ function ir() {
|
|
|
164
164
|
switch (u.$$typeof) {
|
|
165
165
|
case c:
|
|
166
166
|
var x = u;
|
|
167
|
-
return
|
|
167
|
+
return O(x) + ".Consumer";
|
|
168
168
|
case o:
|
|
169
|
-
var
|
|
170
|
-
return
|
|
169
|
+
var $ = u;
|
|
170
|
+
return O($._context) + ".Provider";
|
|
171
171
|
case m:
|
|
172
172
|
return E(u, u.render, "ForwardRef");
|
|
173
173
|
case d:
|
|
174
174
|
var N = u.displayName || null;
|
|
175
|
-
return N !== null ? N :
|
|
175
|
+
return N !== null ? N : H(u.type) || "Memo";
|
|
176
176
|
case p: {
|
|
177
|
-
var
|
|
177
|
+
var B = u, Y = B._payload, L = B._init;
|
|
178
178
|
try {
|
|
179
|
-
return
|
|
179
|
+
return H(L(Y));
|
|
180
180
|
} catch {
|
|
181
181
|
return null;
|
|
182
182
|
}
|
|
@@ -184,18 +184,18 @@ function ir() {
|
|
|
184
184
|
}
|
|
185
185
|
return null;
|
|
186
186
|
}
|
|
187
|
-
var
|
|
188
|
-
function
|
|
187
|
+
var U = Object.assign, V = 0, Q, z, ee, re, se, ne, oe;
|
|
188
|
+
function le() {
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
function
|
|
190
|
+
le.__reactDisabledLog = !0;
|
|
191
|
+
function Z() {
|
|
192
192
|
{
|
|
193
|
-
if (
|
|
194
|
-
|
|
193
|
+
if (V === 0) {
|
|
194
|
+
Q = console.log, z = console.info, ee = console.warn, re = console.error, se = console.group, ne = console.groupCollapsed, oe = console.groupEnd;
|
|
195
195
|
var u = {
|
|
196
196
|
configurable: !0,
|
|
197
197
|
enumerable: !0,
|
|
198
|
-
value:
|
|
198
|
+
value: le,
|
|
199
199
|
writable: !0
|
|
200
200
|
};
|
|
201
201
|
Object.defineProperties(console, {
|
|
@@ -208,56 +208,56 @@ function ir() {
|
|
|
208
208
|
groupEnd: u
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
|
-
|
|
211
|
+
V++;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
function ue() {
|
|
215
215
|
{
|
|
216
|
-
if (
|
|
216
|
+
if (V--, V === 0) {
|
|
217
217
|
var u = {
|
|
218
218
|
configurable: !0,
|
|
219
219
|
enumerable: !0,
|
|
220
220
|
writable: !0
|
|
221
221
|
};
|
|
222
222
|
Object.defineProperties(console, {
|
|
223
|
-
log:
|
|
224
|
-
value:
|
|
223
|
+
log: U({}, u, {
|
|
224
|
+
value: Q
|
|
225
225
|
}),
|
|
226
|
-
info:
|
|
227
|
-
value:
|
|
226
|
+
info: U({}, u, {
|
|
227
|
+
value: z
|
|
228
228
|
}),
|
|
229
|
-
warn:
|
|
230
|
-
value:
|
|
229
|
+
warn: U({}, u, {
|
|
230
|
+
value: ee
|
|
231
231
|
}),
|
|
232
|
-
error:
|
|
232
|
+
error: U({}, u, {
|
|
233
233
|
value: re
|
|
234
234
|
}),
|
|
235
|
-
group:
|
|
236
|
-
value:
|
|
235
|
+
group: U({}, u, {
|
|
236
|
+
value: se
|
|
237
237
|
}),
|
|
238
|
-
groupCollapsed:
|
|
239
|
-
value:
|
|
238
|
+
groupCollapsed: U({}, u, {
|
|
239
|
+
value: ne
|
|
240
240
|
}),
|
|
241
|
-
groupEnd:
|
|
242
|
-
value:
|
|
241
|
+
groupEnd: U({}, u, {
|
|
242
|
+
value: oe
|
|
243
243
|
})
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
|
|
246
|
+
V < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
var
|
|
250
|
-
function me(u, x,
|
|
249
|
+
var K = v.ReactCurrentDispatcher, ie;
|
|
250
|
+
function me(u, x, $) {
|
|
251
251
|
{
|
|
252
|
-
if (
|
|
252
|
+
if (ie === void 0)
|
|
253
253
|
try {
|
|
254
254
|
throw Error();
|
|
255
|
-
} catch (
|
|
256
|
-
var N =
|
|
257
|
-
|
|
255
|
+
} catch (B) {
|
|
256
|
+
var N = B.stack.trim().match(/\n( *(at )?)/);
|
|
257
|
+
ie = N && N[1] || "";
|
|
258
258
|
}
|
|
259
259
|
return `
|
|
260
|
-
` +
|
|
260
|
+
` + ie + u;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
var pe = !1, Ee;
|
|
@@ -269,16 +269,16 @@ function ir() {
|
|
|
269
269
|
if (!u || pe)
|
|
270
270
|
return "";
|
|
271
271
|
{
|
|
272
|
-
var
|
|
273
|
-
if (
|
|
274
|
-
return
|
|
272
|
+
var $ = Ee.get(u);
|
|
273
|
+
if ($ !== void 0)
|
|
274
|
+
return $;
|
|
275
275
|
}
|
|
276
276
|
var N;
|
|
277
277
|
pe = !0;
|
|
278
|
-
var
|
|
278
|
+
var B = Error.prepareStackTrace;
|
|
279
279
|
Error.prepareStackTrace = void 0;
|
|
280
|
-
var
|
|
281
|
-
|
|
280
|
+
var Y;
|
|
281
|
+
Y = K.current, K.current = null, Z();
|
|
282
282
|
try {
|
|
283
283
|
if (x) {
|
|
284
284
|
var L = function() {
|
|
@@ -314,36 +314,36 @@ function ir() {
|
|
|
314
314
|
} catch (ye) {
|
|
315
315
|
if (ye && N && typeof ye.stack == "string") {
|
|
316
316
|
for (var D = ye.stack.split(`
|
|
317
|
-
`),
|
|
318
|
-
`),
|
|
319
|
-
|
|
320
|
-
for (;
|
|
321
|
-
if (D[
|
|
322
|
-
if (
|
|
317
|
+
`), ce = N.stack.split(`
|
|
318
|
+
`), J = D.length - 1, X = ce.length - 1; J >= 1 && X >= 0 && D[J] !== ce[X]; )
|
|
319
|
+
X--;
|
|
320
|
+
for (; J >= 1 && X >= 0; J--, X--)
|
|
321
|
+
if (D[J] !== ce[X]) {
|
|
322
|
+
if (J !== 1 || X !== 1)
|
|
323
323
|
do
|
|
324
|
-
if (
|
|
324
|
+
if (J--, X--, X < 0 || D[J] !== ce[X]) {
|
|
325
325
|
var he = `
|
|
326
|
-
` + D[
|
|
326
|
+
` + D[J].replace(" at new ", " at ");
|
|
327
327
|
return u.displayName && he.includes("<anonymous>") && (he = he.replace("<anonymous>", u.displayName)), typeof u == "function" && Ee.set(u, he), he;
|
|
328
328
|
}
|
|
329
|
-
while (
|
|
329
|
+
while (J >= 1 && X >= 0);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
} finally {
|
|
334
|
-
pe = !1,
|
|
334
|
+
pe = !1, K.current = Y, ue(), Error.prepareStackTrace = B;
|
|
335
335
|
}
|
|
336
336
|
var Se = u ? u.displayName || u.name : "", _n = Se ? me(Se) : "";
|
|
337
337
|
return typeof u == "function" && Ee.set(u, _n), _n;
|
|
338
338
|
}
|
|
339
|
-
function _a(u, x,
|
|
339
|
+
function _a(u, x, $) {
|
|
340
340
|
return an(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 ze(u, x,
|
|
346
|
+
function ze(u, x, $) {
|
|
347
347
|
if (u == null)
|
|
348
348
|
return "";
|
|
349
349
|
if (typeof u == "function")
|
|
@@ -361,11 +361,11 @@ function ir() {
|
|
|
361
361
|
case m:
|
|
362
362
|
return _a(u.render);
|
|
363
363
|
case d:
|
|
364
|
-
return ze(u.type, x,
|
|
364
|
+
return ze(u.type, x, $);
|
|
365
365
|
case p: {
|
|
366
|
-
var N = u,
|
|
366
|
+
var N = u, B = N._payload, Y = N._init;
|
|
367
367
|
try {
|
|
368
|
-
return ze(
|
|
368
|
+
return ze(Y(B), x, $);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
@@ -375,27 +375,27 @@ function ir() {
|
|
|
375
375
|
var We = Object.prototype.hasOwnProperty, rn = {}, sn = v.ReactDebugCurrentFrame;
|
|
376
376
|
function Ve(u) {
|
|
377
377
|
if (u) {
|
|
378
|
-
var x = u._owner,
|
|
379
|
-
sn.setExtraStackFrame(
|
|
378
|
+
var x = u._owner, $ = ze(u.type, u._source, x ? x.type : null);
|
|
379
|
+
sn.setExtraStackFrame($);
|
|
380
380
|
} else
|
|
381
381
|
sn.setExtraStackFrame(null);
|
|
382
382
|
}
|
|
383
|
-
function ya(u, x,
|
|
383
|
+
function ya(u, x, $, N, B) {
|
|
384
384
|
{
|
|
385
|
-
var
|
|
385
|
+
var Y = Function.call.bind(We);
|
|
386
386
|
for (var L in u)
|
|
387
|
-
if (
|
|
387
|
+
if (Y(u, L)) {
|
|
388
388
|
var D = void 0;
|
|
389
389
|
try {
|
|
390
390
|
if (typeof u[L] != "function") {
|
|
391
|
-
var
|
|
392
|
-
throw
|
|
391
|
+
var ce = Error((N || "React class") + ": " + $ + " type `" + L + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof u[L] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
392
|
+
throw ce.name = "Invariant Violation", ce;
|
|
393
393
|
}
|
|
394
|
-
D = u[L](x, L, N,
|
|
395
|
-
} catch (
|
|
396
|
-
D =
|
|
394
|
+
D = u[L](x, L, N, $, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
|
+
} catch (J) {
|
|
396
|
+
D = J;
|
|
397
397
|
}
|
|
398
|
-
D && !(D instanceof Error) && (Ve(
|
|
398
|
+
D && !(D instanceof Error) && (Ve(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).", N || "React class", $, L, typeof D), Ve(null)), D instanceof Error && !(D.message in rn) && (rn[D.message] = !0, Ve(B), _("Failed %s type: %s", $, D.message), Ve(null));
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
@@ -405,8 +405,8 @@ function ir() {
|
|
|
405
405
|
}
|
|
406
406
|
function xa(u) {
|
|
407
407
|
{
|
|
408
|
-
var x = typeof Symbol == "function" && Symbol.toStringTag,
|
|
409
|
-
return
|
|
408
|
+
var x = typeof Symbol == "function" && Symbol.toStringTag, $ = x && u[Symbol.toStringTag] || u.constructor.name || "Object";
|
|
409
|
+
return $;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
function ka(u) {
|
|
@@ -421,7 +421,7 @@ function ir() {
|
|
|
421
421
|
}
|
|
422
422
|
function cn(u) {
|
|
423
423
|
if (ka(u))
|
|
424
|
-
return
|
|
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)), on(u);
|
|
425
425
|
}
|
|
426
426
|
var Re = v.ReactCurrentOwner, ja = {
|
|
427
427
|
key: !0,
|
|
@@ -448,43 +448,43 @@ function ir() {
|
|
|
448
448
|
}
|
|
449
449
|
function $a(u, x) {
|
|
450
450
|
if (typeof u.ref == "string" && Re.current && x && Re.current.stateNode !== x) {
|
|
451
|
-
var
|
|
452
|
-
wt[
|
|
451
|
+
var $ = H(Re.current.type);
|
|
452
|
+
wt[$] || (_('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), wt[$] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
function Ea(u, x) {
|
|
456
456
|
{
|
|
457
|
-
var
|
|
458
|
-
ln || (ln = !0,
|
|
457
|
+
var $ = function() {
|
|
458
|
+
ln || (ln = !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
|
-
|
|
461
|
-
get:
|
|
460
|
+
$.isReactWarning = !0, Object.defineProperty(u, "key", {
|
|
461
|
+
get: $,
|
|
462
462
|
configurable: !0
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
function Ca(u, x) {
|
|
467
467
|
{
|
|
468
|
-
var
|
|
469
|
-
dn || (dn = !0,
|
|
468
|
+
var $ = function() {
|
|
469
|
+
dn || (dn = !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
|
-
|
|
472
|
-
get:
|
|
471
|
+
$.isReactWarning = !0, Object.defineProperty(u, "ref", {
|
|
472
|
+
get: $,
|
|
473
473
|
configurable: !0
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var Sa = function(u, x,
|
|
477
|
+
var Sa = function(u, x, $, N, B, Y, L) {
|
|
478
478
|
var D = {
|
|
479
479
|
// This tag allows us to uniquely identify this as a React Element
|
|
480
480
|
$$typeof: t,
|
|
481
481
|
// Built-in properties that belong on the element
|
|
482
482
|
type: u,
|
|
483
483
|
key: x,
|
|
484
|
-
ref:
|
|
484
|
+
ref: $,
|
|
485
485
|
props: L,
|
|
486
486
|
// Record the component responsible for creating this element.
|
|
487
|
-
_owner:
|
|
487
|
+
_owner: Y
|
|
488
488
|
};
|
|
489
489
|
return D._store = {}, Object.defineProperty(D._store, "validated", {
|
|
490
490
|
configurable: !1,
|
|
@@ -500,32 +500,32 @@ function ir() {
|
|
|
500
500
|
configurable: !1,
|
|
501
501
|
enumerable: !1,
|
|
502
502
|
writable: !1,
|
|
503
|
-
value:
|
|
503
|
+
value: B
|
|
504
504
|
}), Object.freeze && (Object.freeze(D.props), Object.freeze(D)), D;
|
|
505
505
|
};
|
|
506
|
-
function Ma(u, x,
|
|
506
|
+
function Ma(u, x, $, N, B) {
|
|
507
507
|
{
|
|
508
|
-
var
|
|
509
|
-
|
|
510
|
-
for (
|
|
511
|
-
We.call(x,
|
|
508
|
+
var Y, L = {}, D = null, ce = null;
|
|
509
|
+
$ !== void 0 && (cn($), D = "" + $), Ta(x) && (cn(x.key), D = "" + x.key), wa(x) && (ce = x.ref, $a(x, B));
|
|
510
|
+
for (Y in x)
|
|
511
|
+
We.call(x, Y) && !ja.hasOwnProperty(Y) && (L[Y] = x[Y]);
|
|
512
512
|
if (u && u.defaultProps) {
|
|
513
|
-
var
|
|
514
|
-
for (
|
|
515
|
-
L[
|
|
513
|
+
var J = u.defaultProps;
|
|
514
|
+
for (Y in J)
|
|
515
|
+
L[Y] === void 0 && (L[Y] = J[Y]);
|
|
516
516
|
}
|
|
517
|
-
if (D ||
|
|
518
|
-
var
|
|
519
|
-
D && Ea(L,
|
|
517
|
+
if (D || ce) {
|
|
518
|
+
var X = typeof u == "function" ? u.displayName || u.name || "Unknown" : u;
|
|
519
|
+
D && Ea(L, X), ce && Ca(L, X);
|
|
520
520
|
}
|
|
521
|
-
return Sa(u, D,
|
|
521
|
+
return Sa(u, D, ce, B, N, Re.current, L);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
var Tt = v.ReactCurrentOwner, un = v.ReactDebugCurrentFrame;
|
|
525
525
|
function Ce(u) {
|
|
526
526
|
if (u) {
|
|
527
|
-
var x = u._owner,
|
|
528
|
-
un.setExtraStackFrame(
|
|
527
|
+
var x = u._owner, $ = ze(u.type, u._source, x ? x.type : null);
|
|
528
|
+
un.setExtraStackFrame($);
|
|
529
529
|
} else
|
|
530
530
|
un.setExtraStackFrame(null);
|
|
531
531
|
}
|
|
@@ -537,7 +537,7 @@ function ir() {
|
|
|
537
537
|
function mn() {
|
|
538
538
|
{
|
|
539
539
|
if (Tt.current) {
|
|
540
|
-
var u =
|
|
540
|
+
var u = H(Tt.current.type);
|
|
541
541
|
if (u)
|
|
542
542
|
return `
|
|
543
543
|
|
|
@@ -549,10 +549,10 @@ Check the render method of \`` + u + "`.";
|
|
|
549
549
|
function Na(u) {
|
|
550
550
|
{
|
|
551
551
|
if (u !== void 0) {
|
|
552
|
-
var x = u.fileName.replace(/^.*[\\\/]/, ""),
|
|
552
|
+
var x = u.fileName.replace(/^.*[\\\/]/, ""), $ = u.lineNumber;
|
|
553
553
|
return `
|
|
554
554
|
|
|
555
|
-
Check your code at ` + x + ":" +
|
|
555
|
+
Check your code at ` + x + ":" + $ + ".";
|
|
556
556
|
}
|
|
557
557
|
return "";
|
|
558
558
|
}
|
|
@@ -562,10 +562,10 @@ Check your code at ` + x + ":" + T + ".";
|
|
|
562
562
|
{
|
|
563
563
|
var x = mn();
|
|
564
564
|
if (!x) {
|
|
565
|
-
var
|
|
566
|
-
|
|
565
|
+
var $ = typeof u == "string" ? u : u.displayName || u.name;
|
|
566
|
+
$ && (x = `
|
|
567
567
|
|
|
568
|
-
Check the top-level render call using <` +
|
|
568
|
+
Check the top-level render call using <` + $ + ">.");
|
|
569
569
|
}
|
|
570
570
|
return x;
|
|
571
571
|
}
|
|
@@ -575,12 +575,12 @@ Check the top-level render call using <` + T + ">.");
|
|
|
575
575
|
if (!u._store || u._store.validated || u.key != null)
|
|
576
576
|
return;
|
|
577
577
|
u._store.validated = !0;
|
|
578
|
-
var
|
|
579
|
-
if (fn[
|
|
578
|
+
var $ = Pa(x);
|
|
579
|
+
if (fn[$])
|
|
580
580
|
return;
|
|
581
|
-
fn[
|
|
581
|
+
fn[$] = !0;
|
|
582
582
|
var N = "";
|
|
583
|
-
u && u._owner && u._owner !== Tt.current && (N = " It was passed a child from " +
|
|
583
|
+
u && u._owner && u._owner !== Tt.current && (N = " It was passed a child from " + H(u._owner.type) + "."), Ce(u), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', $, N), Ce(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
function hn(u, x) {
|
|
@@ -588,16 +588,16 @@ Check the top-level render call using <` + T + ">.");
|
|
|
588
588
|
if (typeof u != "object")
|
|
589
589
|
return;
|
|
590
590
|
if (jt(u))
|
|
591
|
-
for (var
|
|
592
|
-
var N = u[
|
|
591
|
+
for (var $ = 0; $ < u.length; $++) {
|
|
592
|
+
var N = u[$];
|
|
593
593
|
Et(N) && pn(N, x);
|
|
594
594
|
}
|
|
595
595
|
else if (Et(u))
|
|
596
596
|
u._store && (u._store.validated = !0);
|
|
597
597
|
else if (u) {
|
|
598
|
-
var
|
|
599
|
-
if (typeof
|
|
600
|
-
for (var
|
|
598
|
+
var B = k(u);
|
|
599
|
+
if (typeof B == "function" && B !== u.entries)
|
|
600
|
+
for (var Y = B.call(u), L; !(L = Y.next()).done; )
|
|
601
601
|
Et(L.value) && pn(L.value, x);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
@@ -607,52 +607,52 @@ Check the top-level render call using <` + T + ">.");
|
|
|
607
607
|
var x = u.type;
|
|
608
608
|
if (x == null || typeof x == "string")
|
|
609
609
|
return;
|
|
610
|
-
var
|
|
610
|
+
var $;
|
|
611
611
|
if (typeof x == "function")
|
|
612
|
-
|
|
612
|
+
$ = x.propTypes;
|
|
613
613
|
else if (typeof x == "object" && (x.$$typeof === m || // Note: Memo only checks outer props here.
|
|
614
614
|
// Inner props are checked in the reconciler.
|
|
615
615
|
x.$$typeof === d))
|
|
616
|
-
|
|
616
|
+
$ = x.propTypes;
|
|
617
617
|
else
|
|
618
618
|
return;
|
|
619
|
-
if (
|
|
620
|
-
var N =
|
|
621
|
-
ya(
|
|
619
|
+
if ($) {
|
|
620
|
+
var N = H(x);
|
|
621
|
+
ya($, u.props, "prop", N, u);
|
|
622
622
|
} else if (x.PropTypes !== void 0 && !$t) {
|
|
623
623
|
$t = !0;
|
|
624
|
-
var
|
|
625
|
-
|
|
624
|
+
var B = H(x);
|
|
625
|
+
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", B || "Unknown");
|
|
626
626
|
}
|
|
627
|
-
typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved &&
|
|
627
|
+
typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
function Fa(u) {
|
|
631
631
|
{
|
|
632
|
-
for (var x = Object.keys(u.props),
|
|
633
|
-
var N = x[
|
|
632
|
+
for (var x = Object.keys(u.props), $ = 0; $ < x.length; $++) {
|
|
633
|
+
var N = x[$];
|
|
634
634
|
if (N !== "children" && N !== "key") {
|
|
635
|
-
Ce(u),
|
|
635
|
+
Ce(u), _("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", N), Ce(null);
|
|
636
636
|
break;
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
u.ref !== null && (Ce(u),
|
|
639
|
+
u.ref !== null && (Ce(u), _("Invalid attribute `ref` supplied to `React.Fragment`."), Ce(null));
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function gn(u, x,
|
|
642
|
+
function gn(u, x, $, N, B, Y) {
|
|
643
643
|
{
|
|
644
|
-
var L =
|
|
644
|
+
var L = T(u);
|
|
645
645
|
if (!L) {
|
|
646
646
|
var D = "";
|
|
647
647
|
(u === void 0 || typeof u == "object" && u !== null && Object.keys(u).length === 0) && (D += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
648
|
-
var
|
|
649
|
-
|
|
650
|
-
var
|
|
651
|
-
u === null ?
|
|
648
|
+
var ce = Na(B);
|
|
649
|
+
ce ? D += ce : D += mn();
|
|
650
|
+
var J;
|
|
651
|
+
u === null ? J = "null" : jt(u) ? J = "array" : u !== void 0 && u.$$typeof === t ? (J = "<" + (H(u.type) || "Unknown") + " />", D = " Did you accidentally export a JSX literal instead of a component?") : J = 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", J, D);
|
|
652
652
|
}
|
|
653
|
-
var
|
|
654
|
-
if (
|
|
655
|
-
return
|
|
653
|
+
var X = Ma(u, x, $, B, Y);
|
|
654
|
+
if (X == null)
|
|
655
|
+
return X;
|
|
656
656
|
if (L) {
|
|
657
657
|
var he = x.children;
|
|
658
658
|
if (he !== void 0)
|
|
@@ -662,18 +662,18 @@ Check the top-level render call using <` + T + ">.");
|
|
|
662
662
|
hn(he[Se], u);
|
|
663
663
|
Object.freeze && Object.freeze(he);
|
|
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
|
hn(he, u);
|
|
668
668
|
}
|
|
669
|
-
return u === r ? Fa(
|
|
669
|
+
return u === r ? Fa(X) : Aa(X), X;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
function Ra(u, x,
|
|
673
|
-
return gn(u, x,
|
|
672
|
+
function Ra(u, x, $) {
|
|
673
|
+
return gn(u, x, $, !0);
|
|
674
674
|
}
|
|
675
|
-
function Da(u, x,
|
|
676
|
-
return gn(u, x,
|
|
675
|
+
function Da(u, x, $) {
|
|
676
|
+
return gn(u, x, $, !1);
|
|
677
677
|
}
|
|
678
678
|
var La = Da, Ia = Ra;
|
|
679
679
|
Le.Fragment = r, Le.jsx = La, Le.jsxs = Ia;
|
|
@@ -690,65 +690,65 @@ const or = () => {
|
|
|
690
690
|
window.removeEventListener("popstate", n);
|
|
691
691
|
}), []), e;
|
|
692
692
|
}, Pe = (e, t) => {
|
|
693
|
-
const n =
|
|
693
|
+
const n = te(!1);
|
|
694
694
|
G(() => {
|
|
695
695
|
n.current ? e() : n.current = !0;
|
|
696
696
|
}, t);
|
|
697
697
|
};
|
|
698
698
|
function cr(e, t, n) {
|
|
699
|
-
var r = this, s =
|
|
699
|
+
var r = this, s = te(null), i = te(0), o = te(null), c = te([]), m = te(), l = te(), f = te(e), d = te(!0);
|
|
700
700
|
f.current = e;
|
|
701
701
|
var p = typeof window < "u", h = !t && t !== 0 && p;
|
|
702
702
|
if (typeof e != "function")
|
|
703
703
|
throw new TypeError("Expected a function");
|
|
704
704
|
t = +t || 0;
|
|
705
|
-
var
|
|
705
|
+
var g = !!(n = n || {}).leading, y = !("trailing" in n) || !!n.trailing, k = "maxWait" in n, v = "debounceOnServer" in n && !!n.debounceOnServer, _ = k ? Math.max(+n.maxWait || 0, t) : null;
|
|
706
706
|
G(function() {
|
|
707
707
|
return d.current = !0, function() {
|
|
708
708
|
d.current = !1;
|
|
709
709
|
};
|
|
710
710
|
}, []);
|
|
711
711
|
var b = ft(function() {
|
|
712
|
-
var j = function(
|
|
713
|
-
var E = c.current,
|
|
714
|
-
return c.current = m.current = null, i.current =
|
|
715
|
-
}, C = function(
|
|
716
|
-
h && cancelAnimationFrame(o.current), o.current = h ? requestAnimationFrame(
|
|
717
|
-
}, S = function(
|
|
712
|
+
var j = function(T) {
|
|
713
|
+
var E = c.current, O = m.current;
|
|
714
|
+
return c.current = m.current = null, i.current = T, l.current = f.current.apply(O, E);
|
|
715
|
+
}, C = function(T, E) {
|
|
716
|
+
h && cancelAnimationFrame(o.current), o.current = h ? requestAnimationFrame(T) : setTimeout(T, E);
|
|
717
|
+
}, S = function(T) {
|
|
718
718
|
if (!d.current)
|
|
719
719
|
return !1;
|
|
720
|
-
var E =
|
|
721
|
-
return !s.current || E >= t || E < 0 || k &&
|
|
722
|
-
},
|
|
723
|
-
return o.current = null, y && c.current ? j(
|
|
724
|
-
}, F = function
|
|
720
|
+
var E = T - s.current;
|
|
721
|
+
return !s.current || E >= t || E < 0 || k && T - i.current >= _;
|
|
722
|
+
}, I = function(T) {
|
|
723
|
+
return o.current = null, y && c.current ? j(T) : (c.current = m.current = null, l.current);
|
|
724
|
+
}, F = function T() {
|
|
725
725
|
var E = Date.now();
|
|
726
726
|
if (S(E))
|
|
727
|
-
return
|
|
727
|
+
return I(E);
|
|
728
728
|
if (d.current) {
|
|
729
|
-
var
|
|
730
|
-
C(
|
|
729
|
+
var O = t - (E - s.current), H = k ? Math.min(O, _ - (E - i.current)) : O;
|
|
730
|
+
C(T, H);
|
|
731
731
|
}
|
|
732
|
-
},
|
|
732
|
+
}, M = function() {
|
|
733
733
|
if (p || v) {
|
|
734
|
-
var
|
|
735
|
-
if (c.current = [].slice.call(arguments), m.current = r, s.current =
|
|
734
|
+
var T = Date.now(), E = S(T);
|
|
735
|
+
if (c.current = [].slice.call(arguments), m.current = r, s.current = T, E) {
|
|
736
736
|
if (!o.current && d.current)
|
|
737
|
-
return i.current = s.current, C(F, t),
|
|
737
|
+
return i.current = s.current, C(F, t), g ? j(s.current) : l.current;
|
|
738
738
|
if (k)
|
|
739
739
|
return C(F, t), j(s.current);
|
|
740
740
|
}
|
|
741
741
|
return o.current || C(F, t), l.current;
|
|
742
742
|
}
|
|
743
743
|
};
|
|
744
|
-
return
|
|
744
|
+
return M.cancel = function() {
|
|
745
745
|
o.current && (h ? cancelAnimationFrame(o.current) : clearTimeout(o.current)), i.current = 0, c.current = s.current = m.current = o.current = null;
|
|
746
|
-
},
|
|
746
|
+
}, M.isPending = function() {
|
|
747
747
|
return !!o.current;
|
|
748
|
-
},
|
|
749
|
-
return o.current ?
|
|
750
|
-
},
|
|
751
|
-
}, [
|
|
748
|
+
}, M.flush = function() {
|
|
749
|
+
return o.current ? I(Date.now()) : l.current;
|
|
750
|
+
}, M;
|
|
751
|
+
}, [g, k, t, _, y, h, p, v]);
|
|
752
752
|
return b;
|
|
753
753
|
}
|
|
754
754
|
function Zn(e, t, n) {
|
|
@@ -809,7 +809,7 @@ const He = (e = !0, t = !1, n = "window") => {
|
|
|
809
809
|
return s;
|
|
810
810
|
}, dr = (e = [], t = !0) => {
|
|
811
811
|
e = Array.isArray(e) ? e : [e];
|
|
812
|
-
const n =
|
|
812
|
+
const n = te(!1);
|
|
813
813
|
Pe(() => {
|
|
814
814
|
if (window && window.location && window.location.hash) {
|
|
815
815
|
if (n.current)
|
|
@@ -1229,7 +1229,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1229
1229
|
}), n;
|
|
1230
1230
|
}, xr = (e) => new Promise((t) => setTimeout(t, e)), at = (e, t) => A.Children.map(e, (n) => A.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 },
|
|
@@ -1248,11 +1248,11 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1248
1248
|
const k = Object.assign({}, t), v = qn(Object.keys(k));
|
|
1249
1249
|
t = Hn(h, v, k);
|
|
1250
1250
|
}
|
|
1251
|
-
const
|
|
1252
|
-
typeof t == "string" &&
|
|
1251
|
+
const g = [];
|
|
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");
|
|
1253
1253
|
const y = {
|
|
1254
1254
|
...d,
|
|
1255
|
-
className: w(e, c,
|
|
1255
|
+
className: w(e, c, g, {
|
|
1256
1256
|
"no-text": !f,
|
|
1257
1257
|
disabled: m,
|
|
1258
1258
|
button: s
|
|
@@ -1268,7 +1268,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1268
1268
|
f || (l ? /* @__PURE__ */ a.jsx(ae, { showOnFocus: !1, children: l }) : null)
|
|
1269
1269
|
);
|
|
1270
1270
|
}, ht = ({ buttons: e, className: t = "", ...n }) => {
|
|
1271
|
-
const r = e.length > 1 ? "ul" : "p", s = e.map((i, o) => r === "p" ? /* @__PURE__ */ a.jsx(
|
|
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 A.createElement(r, { className: w("button-wrapper", t), ...n, children: s });
|
|
1273
1273
|
};
|
|
1274
1274
|
const Te = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
@@ -1427,13 +1427,13 @@ 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),
|
|
1430
|
+
} = e, { range: p, sizes: h } = kr(e), g = St({ format: "avif", query: o, range: p, url: c }), y = St({ format: "webp", query: o, range: p, url: c }), k = St({ 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",
|
|
1434
1434
|
{
|
|
1435
1435
|
type: "image/avif",
|
|
1436
|
-
srcSet:
|
|
1436
|
+
srcSet: g,
|
|
1437
1437
|
sizes: h,
|
|
1438
1438
|
"data-testid": "source"
|
|
1439
1439
|
}
|
|
@@ -1466,7 +1466,7 @@ const Wn = ({ image: e, className: t, testId: n }) => {
|
|
|
1466
1466
|
};
|
|
1467
1467
|
let Ie = !1;
|
|
1468
1468
|
const wr = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
1469
|
-
const r = P(), s =
|
|
1469
|
+
const r = P(), s = te(null), [i, o] = R("hidden");
|
|
1470
1470
|
G(() => {
|
|
1471
1471
|
const m = s.current;
|
|
1472
1472
|
if (m)
|
|
@@ -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" },
|
|
@@ -1650,7 +1650,7 @@ const Si = ({
|
|
|
1650
1650
|
}) => !n && !r ? null : /* @__PURE__ */ a.jsxs("aside", { className: w("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
|
|
@@ -1751,7 +1751,7 @@ const bt = ({
|
|
|
1751
1751
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1752
1752
|
t && /* @__PURE__ */ a.jsx(pt, { options: { forceBlock: !0 }, children: t }),
|
|
1753
1753
|
s && typeof n == "object" && (l || /* @__PURE__ */ a.jsx(
|
|
1754
|
-
|
|
1754
|
+
q,
|
|
1755
1755
|
{
|
|
1756
1756
|
...f,
|
|
1757
1757
|
variant: n.variant ? n.variant : "secondary",
|
|
@@ -1780,7 +1780,7 @@ const Ar = ({ type: e = "default", className: t = "", heading: n = !1, children:
|
|
|
1780
1780
|
) : /* @__PURE__ */ a.jsx("p", { children: r })
|
|
1781
1781
|
] });
|
|
1782
1782
|
const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children: s }) => {
|
|
1783
|
-
const i = P(), o =
|
|
1783
|
+
const i = P(), o = te(null), [c, m] = R(""), [l, f] = R("closed");
|
|
1784
1784
|
G(() => {
|
|
1785
1785
|
const h = o.current;
|
|
1786
1786
|
if (h)
|
|
@@ -1798,7 +1798,7 @@ const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1798
1798
|
l === "ready-to-close" && f("closing");
|
|
1799
1799
|
}, [l]);
|
|
1800
1800
|
const d = ({ propertyName: h }) => {
|
|
1801
|
-
h === "max-height" && f((
|
|
1801
|
+
h === "max-height" && f((g) => g === "opening" ? "open" : g === "closing" ? "closed" : g);
|
|
1802
1802
|
};
|
|
1803
1803
|
if (!r)
|
|
1804
1804
|
return null;
|
|
@@ -1809,7 +1809,7 @@ const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1809
1809
|
l !== "closed" && s
|
|
1810
1810
|
] }),
|
|
1811
1811
|
/* @__PURE__ */ a.jsx("p", { className: "cta", children: /* @__PURE__ */ a.jsx(
|
|
1812
|
-
|
|
1812
|
+
q,
|
|
1813
1813
|
{
|
|
1814
1814
|
variant: "tertiary",
|
|
1815
1815
|
icon: { icon: "navigation_arrow", position: "left", animate: !0 },
|
|
@@ -1893,7 +1893,7 @@ const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1893
1893
|
else
|
|
1894
1894
|
break;
|
|
1895
1895
|
}
|
|
1896
|
-
return s ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ a.jsx("p", { className: "center", children: /* @__PURE__ */ a.jsx(
|
|
1896
|
+
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 });
|
|
1897
1897
|
}, Zr = ({ children: e }) => /* @__PURE__ */ a.jsx("span", { children: e });
|
|
1898
1898
|
const jn = ({ className: e = "", options: t = {}, children: n }) => {
|
|
1899
1899
|
n = n.replace(/^<br\/?>/, "");
|
|
@@ -2013,7 +2013,7 @@ const wn = 256, Ue = ({
|
|
|
2013
2013
|
height: i = wn,
|
|
2014
2014
|
...o
|
|
2015
2015
|
}) => {
|
|
2016
|
-
const [c, m] = R(!1), l =
|
|
2016
|
+
const [c, m] = R(!1), l = te(null);
|
|
2017
2017
|
G(() => {
|
|
2018
2018
|
const d = l.current;
|
|
2019
2019
|
if (!d)
|
|
@@ -2021,8 +2021,8 @@ const wn = 256, Ue = ({
|
|
|
2021
2021
|
const p = d.getContext("2d");
|
|
2022
2022
|
if (!p)
|
|
2023
2023
|
return;
|
|
2024
|
-
const h = s,
|
|
2025
|
-
typeof window < "u" && window.devicePixelRatio && (d.width = h * window.devicePixelRatio, d.height =
|
|
2024
|
+
const h = s, g = i;
|
|
2025
|
+
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(Qn(n), h / 2, g / 1.6);
|
|
2026
2026
|
}, [n]);
|
|
2027
2027
|
let f = !1;
|
|
2028
2028
|
return t && t !== "" && !c && (t.includes("http") || t.includes("//")) && (f = !0), /* @__PURE__ */ a.jsx(
|
|
@@ -2087,8 +2087,8 @@ const Xt = ({
|
|
|
2087
2087
|
href: l,
|
|
2088
2088
|
gtmType: s,
|
|
2089
2089
|
gtmContext: r,
|
|
2090
|
-
onClick: (
|
|
2091
|
-
|
|
2090
|
+
onClick: (g) => {
|
|
2091
|
+
g == null || g.stopPropagation();
|
|
2092
2092
|
},
|
|
2093
2093
|
children: [
|
|
2094
2094
|
/* @__PURE__ */ a.jsx(Ue, { name: m, src: f }),
|
|
@@ -2127,7 +2127,7 @@ const Tn = {
|
|
|
2127
2127
|
className: w("contributors", m, s, { "has-gap": i }),
|
|
2128
2128
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2129
2129
|
/* @__PURE__ */ a.jsx("ul", { children: n.map((d, p) => {
|
|
2130
|
-
let h,
|
|
2130
|
+
let h, g = "";
|
|
2131
2131
|
if (p < c) {
|
|
2132
2132
|
const { name: y = "", image: k = "" } = Jn(d);
|
|
2133
2133
|
if (o)
|
|
@@ -2152,9 +2152,9 @@ const Tn = {
|
|
|
2152
2152
|
_r(y, 0)
|
|
2153
2153
|
]
|
|
2154
2154
|
}
|
|
2155
|
-
),
|
|
2155
|
+
), g = "number-left";
|
|
2156
2156
|
}
|
|
2157
|
-
return h ? /* @__PURE__ */ a.jsx("li", { className: w("contributor",
|
|
2157
|
+
return h ? /* @__PURE__ */ a.jsx("li", { className: w("contributor", g), children: h }, p) : null;
|
|
2158
2158
|
}) }),
|
|
2159
2159
|
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]}` }) : Ne(n[0].name || "", 20) : null })
|
|
2160
2160
|
] })
|
|
@@ -2276,7 +2276,7 @@ const Tn = {
|
|
|
2276
2276
|
gtmEvent: "learning-hub"
|
|
2277
2277
|
}
|
|
2278
2278
|
}, Gr = ({ data: e, cta: t, link: n, gtmContext: r }) => {
|
|
2279
|
-
var
|
|
2279
|
+
var g;
|
|
2280
2280
|
const s = P(), [i, o] = R({
|
|
2281
2281
|
loading: !1,
|
|
2282
2282
|
registered: e.registered || !1
|
|
@@ -2286,7 +2286,7 @@ const Tn = {
|
|
|
2286
2286
|
}, [e.registered]);
|
|
2287
2287
|
const { startDate: c, dateHasPassed: m, pill: l, slug: f } = e, d = e.contentType;
|
|
2288
2288
|
let p = "";
|
|
2289
|
-
if ((
|
|
2289
|
+
if ((g = it[d]) != null && g.gtmEvent && (p = it[d].gtmEvent), c && m)
|
|
2290
2290
|
return /* @__PURE__ */ a.jsx(
|
|
2291
2291
|
"a",
|
|
2292
2292
|
{
|
|
@@ -2299,7 +2299,7 @@ const Tn = {
|
|
|
2299
2299
|
);
|
|
2300
2300
|
if (d === "people")
|
|
2301
2301
|
return /* @__PURE__ */ a.jsx(
|
|
2302
|
-
|
|
2302
|
+
q,
|
|
2303
2303
|
{
|
|
2304
2304
|
variant: "tertiary",
|
|
2305
2305
|
size: "small",
|
|
@@ -2314,17 +2314,17 @@ const Tn = {
|
|
|
2314
2314
|
if (t && t.onClick && h.includes(d) && l !== "premium") {
|
|
2315
2315
|
const y = i.loading || i.registered, k = async (v) => {
|
|
2316
2316
|
if (v.preventDefault(), v.stopPropagation(), !(y || !t || !t.onClick)) {
|
|
2317
|
-
o((
|
|
2317
|
+
o((_) => ({ ..._, loading: !0 }));
|
|
2318
2318
|
try {
|
|
2319
|
-
const
|
|
2320
|
-
o(
|
|
2319
|
+
const _ = await t.onClick(e);
|
|
2320
|
+
o(_ === "success" ? () => ({ registered: !0, loading: !1 }) : (b) => ({ ...b, loading: !1 }));
|
|
2321
2321
|
} catch {
|
|
2322
2322
|
o((b) => ({ ...b, loading: !1 }));
|
|
2323
2323
|
}
|
|
2324
2324
|
}
|
|
2325
2325
|
};
|
|
2326
2326
|
return /* @__PURE__ */ a.jsx(
|
|
2327
|
-
|
|
2327
|
+
q,
|
|
2328
2328
|
{
|
|
2329
2329
|
onClick: k,
|
|
2330
2330
|
className: "gtm-trackable",
|
|
@@ -2383,24 +2383,24 @@ const Qr = {
|
|
|
2383
2383
|
"data-testid": "card-placeholder"
|
|
2384
2384
|
}
|
|
2385
2385
|
);
|
|
2386
|
-
const { contentType:
|
|
2387
|
-
if (!
|
|
2386
|
+
const { contentType: g } = d;
|
|
2387
|
+
if (!g || !it[g])
|
|
2388
2388
|
return /* @__PURE__ */ a.jsx(_e, { element: "li", className: "card-wrapper" });
|
|
2389
2389
|
const {
|
|
2390
2390
|
basePath: y = "",
|
|
2391
2391
|
className: k,
|
|
2392
2392
|
length: v,
|
|
2393
|
-
gtmEvent:
|
|
2394
|
-
} = it[
|
|
2393
|
+
gtmEvent: _
|
|
2394
|
+
} = it[g], b = zn(`card_label_${g}`) ? o.formatMessage({ id: `card_label_${g}` }) : !1, j = d.slug ? `${y}${d.slug}` : !1, C = { ...Qr, ...v };
|
|
2395
2395
|
let S = { className: "card" };
|
|
2396
2396
|
j && (S = {
|
|
2397
2397
|
href: j,
|
|
2398
2398
|
className: "card gtm-trackable",
|
|
2399
2399
|
"data-gtm-event-context": `${s}-CarouselCard`,
|
|
2400
|
-
"data-gtm-event-type": `${
|
|
2400
|
+
"data-gtm-event-type": `${_}-click`,
|
|
2401
2401
|
"data-testid": "link"
|
|
2402
2402
|
}, d.openInNewTab && (S.target = "_blank"));
|
|
2403
|
-
const
|
|
2403
|
+
const I = d.customIcon ? { "--custom-icon": Kr(d.customIcon) } : {};
|
|
2404
2404
|
return /* @__PURE__ */ a.jsx(
|
|
2405
2405
|
"li",
|
|
2406
2406
|
{
|
|
@@ -2410,8 +2410,8 @@ const Qr = {
|
|
|
2410
2410
|
"has-custom-icon": d.customIcon,
|
|
2411
2411
|
"has-image": d.banner
|
|
2412
2412
|
}),
|
|
2413
|
-
style:
|
|
2414
|
-
"data-testid": `${
|
|
2413
|
+
style: I,
|
|
2414
|
+
"data-testid": `${g}-card`,
|
|
2415
2415
|
children: A.createElement(
|
|
2416
2416
|
j ? "a" : "div",
|
|
2417
2417
|
S,
|
|
@@ -2452,11 +2452,11 @@ const Qr = {
|
|
|
2452
2452
|
d.partner && /* @__PURE__ */ a.jsx("p", { className: "partners", "data-testid": "partners", children: Ne(d.partner.title, C.partner) }),
|
|
2453
2453
|
/* Text */
|
|
2454
2454
|
["title", "text", "secondaryText"].map((F) => {
|
|
2455
|
-
const
|
|
2456
|
-
if (
|
|
2455
|
+
const M = d[F];
|
|
2456
|
+
if (!M)
|
|
2457
2457
|
return null;
|
|
2458
|
-
const
|
|
2459
|
-
return /* @__PURE__ */ a.jsx("p", { className:
|
|
2458
|
+
const T = ur(F);
|
|
2459
|
+
return /* @__PURE__ */ a.jsx("p", { className: T, "data-testid": T, children: Ne(M, C[F]) }, F);
|
|
2460
2460
|
}),
|
|
2461
2461
|
/* @__PURE__ */ a.jsx(Yr, { type: k || "", data: d }),
|
|
2462
2462
|
/* @__PURE__ */ a.jsx(Gr, { data: d, cta: r, link: j || "", gtmContext: s })
|
|
@@ -2525,51 +2525,51 @@ const ts = ({
|
|
|
2525
2525
|
}), { cardsPerPage: f, isLoading: d } = m, [p, h] = R({
|
|
2526
2526
|
currentPage: 0,
|
|
2527
2527
|
loadedPages: [0]
|
|
2528
|
-
}), { currentPage:
|
|
2528
|
+
}), { currentPage: g, loadedPages: y } = p, k = t.length, v = Math.ceil(k / f), _ = te(null), b = He(!0, !0, _ == null ? void 0 : _.current);
|
|
2529
2529
|
G(() => {
|
|
2530
|
-
let
|
|
2531
|
-
b && (b >= Nt.fourCards ?
|
|
2532
|
-
...
|
|
2533
|
-
cardsPerPage:
|
|
2530
|
+
let M = 1;
|
|
2531
|
+
b && (b >= Nt.fourCards ? M = 4 : b >= Nt.threeCards ? M = 3 : b >= Nt.twoCards && (M = 2), M > k && (M = k)), l((T) => ({
|
|
2532
|
+
...T,
|
|
2533
|
+
cardsPerPage: M,
|
|
2534
2534
|
isLoading: !1
|
|
2535
2535
|
}));
|
|
2536
2536
|
}, [b, k]);
|
|
2537
|
-
const j = (
|
|
2538
|
-
let
|
|
2539
|
-
if (typeof
|
|
2540
|
-
if (
|
|
2541
|
-
if (
|
|
2542
|
-
|
|
2537
|
+
const j = (M = "next") => {
|
|
2538
|
+
let T = g;
|
|
2539
|
+
if (typeof M == "string")
|
|
2540
|
+
if (M === "next")
|
|
2541
|
+
if (g < v - 1)
|
|
2542
|
+
T = g + 1;
|
|
2543
2543
|
else
|
|
2544
2544
|
return;
|
|
2545
|
-
else if (
|
|
2546
|
-
|
|
2545
|
+
else if (g > 0)
|
|
2546
|
+
T = g - 1;
|
|
2547
2547
|
else
|
|
2548
2548
|
return;
|
|
2549
2549
|
else
|
|
2550
|
-
|
|
2550
|
+
T = M;
|
|
2551
2551
|
h((E) => ({
|
|
2552
2552
|
...E,
|
|
2553
|
-
currentPage:
|
|
2554
|
-
loadedPages: [.../* @__PURE__ */ new Set([...y,
|
|
2553
|
+
currentPage: T,
|
|
2554
|
+
loadedPages: [.../* @__PURE__ */ new Set([...y, T])]
|
|
2555
2555
|
}));
|
|
2556
|
-
}, C = (
|
|
2557
|
-
Ge =
|
|
2558
|
-
}, S = (
|
|
2556
|
+
}, C = (M) => {
|
|
2557
|
+
Ge = M.touches[0].clientX;
|
|
2558
|
+
}, S = (M) => {
|
|
2559
2559
|
if (Ge === null)
|
|
2560
2560
|
return;
|
|
2561
|
-
const
|
|
2561
|
+
const T = M.touches[0].clientX, E = Ge - T;
|
|
2562
2562
|
E > 5 ? j("next") : E < -5 && j("previous"), Ge = null;
|
|
2563
|
-
},
|
|
2564
|
-
"--width": `${((F =
|
|
2563
|
+
}, I = {
|
|
2564
|
+
"--width": `${((F = _ == null ? void 0 : _.current) == null ? void 0 : F.offsetWidth) || 0}px`,
|
|
2565
2565
|
"--total-cards": k,
|
|
2566
2566
|
"--cards-per-page": f,
|
|
2567
|
-
"--page":
|
|
2567
|
+
"--page": g
|
|
2568
2568
|
};
|
|
2569
2569
|
return d ? /* @__PURE__ */ a.jsx(Kn, { layout: `carousel${s ? "-with-title" : ""}` }) : /* @__PURE__ */ a.jsxs(
|
|
2570
2570
|
"section",
|
|
2571
2571
|
{
|
|
2572
|
-
ref:
|
|
2572
|
+
ref: _,
|
|
2573
2573
|
className: w("carousel-wrapper", i),
|
|
2574
2574
|
"data-testid": "carousel",
|
|
2575
2575
|
children: [
|
|
@@ -2580,20 +2580,20 @@ const ts = ({
|
|
|
2580
2580
|
className: "carousel",
|
|
2581
2581
|
onTouchStart: C,
|
|
2582
2582
|
onTouchMove: S,
|
|
2583
|
-
style:
|
|
2583
|
+
style: I,
|
|
2584
2584
|
"data-testid": "carousel-list",
|
|
2585
|
-
children: t.map((
|
|
2586
|
-
let E =
|
|
2587
|
-
return E && Xr(
|
|
2585
|
+
children: t.map((M, T) => {
|
|
2586
|
+
let E = M && M.sys && M.sys.id ? `${e}-card-${M.sys.id}` : null;
|
|
2587
|
+
return E && Xr(T, f, g, y) ? /* @__PURE__ */ a.jsx(
|
|
2588
2588
|
ea,
|
|
2589
2589
|
{
|
|
2590
2590
|
id: E,
|
|
2591
|
-
card: {
|
|
2591
|
+
card: { ...M, contentType: n[T] },
|
|
2592
2592
|
buildCardData: r,
|
|
2593
2593
|
gtmContext: o
|
|
2594
2594
|
},
|
|
2595
2595
|
E
|
|
2596
|
-
) : (E = E || `${e}-card-${
|
|
2596
|
+
) : (E = E || `${e}-card-${T}`, /* @__PURE__ */ a.jsx(
|
|
2597
2597
|
_e,
|
|
2598
2598
|
{
|
|
2599
2599
|
element: "li",
|
|
@@ -2607,46 +2607,46 @@ const ts = ({
|
|
|
2607
2607
|
),
|
|
2608
2608
|
v <= 1 ? null : /* @__PURE__ */ a.jsxs("ul", { className: "controls", "data-testid": "carousel-controls", children: [
|
|
2609
2609
|
/* @__PURE__ */ a.jsx("li", { className: "arrow previous", children: /* @__PURE__ */ a.jsx(
|
|
2610
|
-
|
|
2610
|
+
q,
|
|
2611
2611
|
{
|
|
2612
2612
|
variant: "secondary",
|
|
2613
2613
|
size: "large",
|
|
2614
2614
|
icon: { icon: "chevron_left" },
|
|
2615
|
-
onClick: (
|
|
2616
|
-
|
|
2615
|
+
onClick: (M) => {
|
|
2616
|
+
M.preventDefault(), M.stopPropagation(), j("previous");
|
|
2617
2617
|
},
|
|
2618
2618
|
screenreaderText: c.formatMessage({
|
|
2619
2619
|
id: "carousel_pagination_previous"
|
|
2620
2620
|
}),
|
|
2621
|
-
disabled:
|
|
2621
|
+
disabled: g <= 0
|
|
2622
2622
|
}
|
|
2623
2623
|
) }),
|
|
2624
|
-
[...Array(v)].map((
|
|
2624
|
+
[...Array(v)].map((M, T) => /* @__PURE__ */ a.jsx("li", { "data-testid": "carousel-controls-button", children: /* @__PURE__ */ a.jsx(
|
|
2625
2625
|
"button",
|
|
2626
2626
|
{
|
|
2627
2627
|
className: w("page-indicator", {
|
|
2628
|
-
selected:
|
|
2628
|
+
selected: T === g
|
|
2629
2629
|
}),
|
|
2630
2630
|
onClick: (E) => {
|
|
2631
|
-
E.preventDefault(), E.stopPropagation(), j(
|
|
2631
|
+
E.preventDefault(), E.stopPropagation(), j(T);
|
|
2632
2632
|
},
|
|
2633
2633
|
children: /* @__PURE__ */ a.jsx(ae, { showOnFocus: !1, children: c.formatMessage(
|
|
2634
2634
|
{ id: "carousel_pagination_page" },
|
|
2635
|
-
{ number:
|
|
2635
|
+
{ number: T + 1, total: v }
|
|
2636
2636
|
) })
|
|
2637
2637
|
}
|
|
2638
|
-
) }, `page-indicator-${
|
|
2638
|
+
) }, `page-indicator-${T}`)),
|
|
2639
2639
|
/* @__PURE__ */ a.jsx("li", { className: "arrow next", children: /* @__PURE__ */ a.jsx(
|
|
2640
|
-
|
|
2640
|
+
q,
|
|
2641
2641
|
{
|
|
2642
2642
|
variant: "secondary",
|
|
2643
2643
|
size: "large",
|
|
2644
2644
|
icon: { icon: "chevron_right" },
|
|
2645
|
-
onClick: (
|
|
2646
|
-
|
|
2645
|
+
onClick: (M) => {
|
|
2646
|
+
M.preventDefault(), M.stopPropagation(), j("next");
|
|
2647
2647
|
},
|
|
2648
2648
|
screenreaderText: c.formatMessage({ id: "carousel_pagination_next" }),
|
|
2649
|
-
disabled:
|
|
2649
|
+
disabled: g >= v - 1
|
|
2650
2650
|
}
|
|
2651
2651
|
) })
|
|
2652
2652
|
] })
|
|
@@ -2694,7 +2694,7 @@ const Pt = "joinCommunityButton", ta = ({ isMember: e = !1, isShort: t = !1, fun
|
|
|
2694
2694
|
}, [c]);
|
|
2695
2695
|
const d = {}, p = {};
|
|
2696
2696
|
return c && l !== "leaving" && (d["data-hover-text"] = s.formatMessage({ id: `${Pt}_leave` }), d["aria-label"] = s.formatMessage({ id: `${Pt}_member_aria` }), p["aria-hidden"] = "true"), /* @__PURE__ */ a.jsx(
|
|
2697
|
-
|
|
2697
|
+
q,
|
|
2698
2698
|
{
|
|
2699
2699
|
variant: c ? "secondary" : "primary",
|
|
2700
2700
|
size: "medium",
|
|
@@ -2746,7 +2746,7 @@ const At = "communityDetails_", Ri = ({
|
|
|
2746
2746
|
] }),
|
|
2747
2747
|
/* @__PURE__ */ a.jsx(ta, { isMember: t, functions: { ...o } }),
|
|
2748
2748
|
t && /* @__PURE__ */ a.jsx(
|
|
2749
|
-
|
|
2749
|
+
q,
|
|
2750
2750
|
{
|
|
2751
2751
|
variant: "primary",
|
|
2752
2752
|
onClick: i,
|
|
@@ -2785,15 +2785,15 @@ const Li = ({
|
|
|
2785
2785
|
};
|
|
2786
2786
|
return /* @__PURE__ */ a.jsx("ul", { className: w("filters", s), children: o.map(({ id: f, text: d, disabled: p = !1, callback: h = () => {
|
|
2787
2787
|
} }) => {
|
|
2788
|
-
let
|
|
2789
|
-
return p && (
|
|
2788
|
+
let g = {};
|
|
2789
|
+
return p && (g = { disabled: !0, "aria-label": i.formatMessage({ id: "filters_disabled" }, { name: d }) }), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
2790
2790
|
"button",
|
|
2791
2791
|
{
|
|
2792
2792
|
className: w(f, { selected: c.includes(f) }),
|
|
2793
2793
|
onClick: (y) => {
|
|
2794
2794
|
y.preventDefault(), y.stopPropagation(), l(f, h);
|
|
2795
2795
|
},
|
|
2796
|
-
...
|
|
2796
|
+
...g,
|
|
2797
2797
|
children: d
|
|
2798
2798
|
}
|
|
2799
2799
|
) }, f);
|
|
@@ -2824,7 +2824,7 @@ const Ft = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2824
2824
|
e !== f && d(e);
|
|
2825
2825
|
}, [e]), !r || !Object.values(r).some((y) => y && y.post_name))
|
|
2826
2826
|
return null;
|
|
2827
|
-
const h = Object.keys(r),
|
|
2827
|
+
const h = Object.keys(r), g = f !== e;
|
|
2828
2828
|
return /* @__PURE__ */ a.jsxs("div", { className: w("language-switcher text-small", o, m), children: [
|
|
2829
2829
|
/* @__PURE__ */ a.jsxs("nav", { children: [
|
|
2830
2830
|
o !== "short" && /* @__PURE__ */ a.jsx("p", { children: c || l.formatMessage({ id: `${Ke}label` }) }),
|
|
@@ -2840,9 +2840,9 @@ const Ft = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2840
2840
|
}
|
|
2841
2841
|
}, /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(gt, { ...k, fallbackElement: "span", children: Ft[y] }) }, y);
|
|
2842
2842
|
}) }),
|
|
2843
|
-
o !== "short" && !
|
|
2843
|
+
o !== "short" && !g && /* @__PURE__ */ a.jsx("p", { children: l.formatMessage({ id: `${Ke}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2844
2844
|
] }),
|
|
2845
|
-
o !== "short" && !
|
|
2845
|
+
o !== "short" && !g && !t && !n && /* @__PURE__ */ a.jsx("small", {
|
|
2846
2846
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2847
2847
|
// @ts-ignore
|
|
2848
2848
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
@@ -2877,7 +2877,7 @@ const Rt = Ua({ locale: "en", messages: Qt }), yt = ({
|
|
|
2877
2877
|
}
|
|
2878
2878
|
};
|
|
2879
2879
|
return /* @__PURE__ */ a.jsx("footer", { className: w("load-more", s), children: !o && e ? /* @__PURE__ */ a.jsx(
|
|
2880
|
-
|
|
2880
|
+
q,
|
|
2881
2881
|
{
|
|
2882
2882
|
variant: "secondary",
|
|
2883
2883
|
icon: n,
|
|
@@ -2893,7 +2893,7 @@ const Rt = Ua({ locale: "en", messages: Qt }), yt = ({
|
|
|
2893
2893
|
const na = ({ variant: e = "default", version: t = "default", className: n = "", ...r }) => /* @__PURE__ */ a.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ a.jsx("a", { href: "/home/", className: w("logo", e, t, n), ...r, children: /* @__PURE__ */ a.jsx(ae, { children: /* @__PURE__ */ a.jsx(je, { id: "apolitical" }) }) }) });
|
|
2894
2894
|
let Qe = !1;
|
|
2895
2895
|
const as = ({ element: e = "div", id: t = "more-menu", options: n, className: r = "" }) => {
|
|
2896
|
-
const s = P(), i =
|
|
2896
|
+
const s = P(), i = te(null), [o, c] = R(!1), m = (l) => {
|
|
2897
2897
|
i.current && l.target instanceof HTMLElement && !i.current.contains(l.target) && c(!1);
|
|
2898
2898
|
};
|
|
2899
2899
|
return G(() => (document.addEventListener("click", m, !0), () => {
|
|
@@ -2903,7 +2903,7 @@ const as = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2903
2903
|
className: w("more-menu text-medium", r),
|
|
2904
2904
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2905
2905
|
/* @__PURE__ */ a.jsx(
|
|
2906
|
-
|
|
2906
|
+
q,
|
|
2907
2907
|
{
|
|
2908
2908
|
variant: "tertiary",
|
|
2909
2909
|
size: "medium",
|
|
@@ -2915,7 +2915,7 @@ const as = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2915
2915
|
screenreaderText: s.formatMessage({ id: "moreMenu" })
|
|
2916
2916
|
}
|
|
2917
2917
|
),
|
|
2918
|
-
/* @__PURE__ */ a.jsx("ul", { id: t, hidden: !o, children: n.map(({ href: l, onClick: f, text: d, icon: p, ...h },
|
|
2918
|
+
/* @__PURE__ */ a.jsx("ul", { id: t, hidden: !o, children: n.map(({ href: l, onClick: f, text: d, icon: p, ...h }, g) => {
|
|
2919
2919
|
const y = {
|
|
2920
2920
|
...h,
|
|
2921
2921
|
onClick: (k) => {
|
|
@@ -2931,7 +2931,7 @@ const as = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2931
2931
|
}
|
|
2932
2932
|
};
|
|
2933
2933
|
return l && (y.href = l), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
2934
|
-
|
|
2934
|
+
q,
|
|
2935
2935
|
{
|
|
2936
2936
|
variant: "tertiary",
|
|
2937
2937
|
size: "medium",
|
|
@@ -2939,7 +2939,7 @@ const as = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2939
2939
|
...y,
|
|
2940
2940
|
children: d
|
|
2941
2941
|
}
|
|
2942
|
-
) }, `${window.btoa(d)}_${
|
|
2942
|
+
) }, `${window.btoa(d)}_${g}`);
|
|
2943
2943
|
}) })
|
|
2944
2944
|
] })
|
|
2945
2945
|
});
|
|
@@ -3059,9 +3059,9 @@ const cs = "shareLinks_", Oi = ({
|
|
|
3059
3059
|
/* @__PURE__ */ a.jsx("ul", { children: m.map(({ key: l, icon: f, url: d, shouldRender: p = !0, onClick: h }) => {
|
|
3060
3060
|
if (typeof p == "function" && !p())
|
|
3061
3061
|
return null;
|
|
3062
|
-
const
|
|
3063
|
-
return h && (
|
|
3064
|
-
|
|
3062
|
+
const g = {};
|
|
3063
|
+
return h && (g.onClick = (y) => h(y, d)), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
3064
|
+
q,
|
|
3065
3065
|
{
|
|
3066
3066
|
size: s,
|
|
3067
3067
|
variant: "tertiary",
|
|
@@ -3074,7 +3074,7 @@ const cs = "shareLinks_", Oi = ({
|
|
|
3074
3074
|
"data-gtm-event-type": `${l}-click`,
|
|
3075
3075
|
"data-testid": "link",
|
|
3076
3076
|
screenreaderText: c.formatMessage({ id: `${cs}link_${l}` }),
|
|
3077
|
-
...
|
|
3077
|
+
...g
|
|
3078
3078
|
}
|
|
3079
3079
|
) }, l);
|
|
3080
3080
|
}) })
|
|
@@ -3099,7 +3099,7 @@ const Bi = ({ tabs: e, className: t = "" }) => {
|
|
|
3099
3099
|
), o = [], c = [];
|
|
3100
3100
|
return e.forEach(({ id: l, text: f, content: d, href: p }, h) => {
|
|
3101
3101
|
l = n(l, f, h);
|
|
3102
|
-
const
|
|
3102
|
+
const g = s === l, y = {};
|
|
3103
3103
|
p || (y["aria-controls"] = l, y.onClick = (k) => {
|
|
3104
3104
|
k.preventDefault(), k.stopPropagation(), i(l), window.location.hash = `#${l}`;
|
|
3105
3105
|
}, c.push(
|
|
@@ -3107,10 +3107,10 @@ const Bi = ({ tabs: e, className: t = "" }) => {
|
|
|
3107
3107
|
"section",
|
|
3108
3108
|
{
|
|
3109
3109
|
id: l,
|
|
3110
|
-
hidden: !
|
|
3110
|
+
hidden: !g,
|
|
3111
3111
|
role: "tabpanel",
|
|
3112
3112
|
"aria-labelledby": `tab-${l}`,
|
|
3113
|
-
"aria-live":
|
|
3113
|
+
"aria-live": g ? "assertive" : "off",
|
|
3114
3114
|
children: typeof d == "string" ? /* @__PURE__ */ a.jsx("p", { children: d }) : d
|
|
3115
3115
|
},
|
|
3116
3116
|
`section-${l}`
|
|
@@ -3121,9 +3121,9 @@ const Bi = ({ tabs: e, className: t = "" }) => {
|
|
|
3121
3121
|
{
|
|
3122
3122
|
href: p || `#${l}`,
|
|
3123
3123
|
id: `tab-${l}`,
|
|
3124
|
-
className: w({ selected:
|
|
3124
|
+
className: w({ selected: g }),
|
|
3125
3125
|
role: "tab",
|
|
3126
|
-
"aria-selected":
|
|
3126
|
+
"aria-selected": g,
|
|
3127
3127
|
...y,
|
|
3128
3128
|
children: f
|
|
3129
3129
|
}
|
|
@@ -3367,7 +3367,7 @@ const Je = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3367
3367
|
const s = P(), [i, o] = R({ path: `${Je}default`, type: "default", link: {}, mail: {}, error: "" }), [c, m] = R(!1), l = Dn(
|
|
3368
3368
|
(h) => {
|
|
3369
3369
|
h.preventDefault(), h.stopPropagation();
|
|
3370
|
-
const
|
|
3370
|
+
const g = (y) => {
|
|
3371
3371
|
o({
|
|
3372
3372
|
path: `${Je}error_verificationFailedToSend`,
|
|
3373
3373
|
type: "error",
|
|
@@ -3389,13 +3389,13 @@ const Je = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3389
3389
|
});
|
|
3390
3390
|
};
|
|
3391
3391
|
if (typeof r != "function") {
|
|
3392
|
-
|
|
3392
|
+
g(s.formatMessage({ id: `${Je}error_noFunction` }));
|
|
3393
3393
|
return;
|
|
3394
3394
|
}
|
|
3395
3395
|
m(!0), r(t).then(() => {
|
|
3396
3396
|
localStorage.setItem("email", t), window.location.href = n || "/signup/verify-email";
|
|
3397
3397
|
}).catch((y) => {
|
|
3398
|
-
|
|
3398
|
+
g(y.message);
|
|
3399
3399
|
}).finally(() => {
|
|
3400
3400
|
m(!1);
|
|
3401
3401
|
});
|
|
@@ -3405,20 +3405,20 @@ const Je = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3405
3405
|
);
|
|
3406
3406
|
G(
|
|
3407
3407
|
() => {
|
|
3408
|
-
let h = Je,
|
|
3408
|
+
let h = Je, g = "default", y = {}, k = {};
|
|
3409
3409
|
switch (e) {
|
|
3410
3410
|
case "gov":
|
|
3411
|
-
h += "autoApproved",
|
|
3411
|
+
h += "autoApproved", g = "success";
|
|
3412
3412
|
break;
|
|
3413
3413
|
case "nonGov":
|
|
3414
|
-
h += "unrecognisedEmail",
|
|
3414
|
+
h += "unrecognisedEmail", g = "error", y = {
|
|
3415
3415
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
3416
3416
|
"data-gtm-event-context": "NonGovEmailHelperTextBox",
|
|
3417
3417
|
"data-gtm-event-type": "LearnMoreClick"
|
|
3418
3418
|
};
|
|
3419
3419
|
break;
|
|
3420
3420
|
case "pending":
|
|
3421
|
-
h += "pendingApproval",
|
|
3421
|
+
h += "pendingApproval", g = "error", k = {
|
|
3422
3422
|
href: "mailto:concierge@apolitical.co",
|
|
3423
3423
|
className: "gtm-trackable",
|
|
3424
3424
|
"data-gtm-event-context": "EmailExistsBox",
|
|
@@ -3426,7 +3426,7 @@ const Je = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3426
3426
|
};
|
|
3427
3427
|
break;
|
|
3428
3428
|
case "verify":
|
|
3429
|
-
h += "emailUnverified",
|
|
3429
|
+
h += "emailUnverified", g = "error", y = {
|
|
3430
3430
|
href: "#",
|
|
3431
3431
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
3432
3432
|
"data-gtm-event-type": "SendEmailClick",
|
|
@@ -3436,7 +3436,7 @@ const Je = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3436
3436
|
};
|
|
3437
3437
|
break;
|
|
3438
3438
|
case "exists":
|
|
3439
|
-
h += "emailAlreadyExists",
|
|
3439
|
+
h += "emailAlreadyExists", g = "error", y = {
|
|
3440
3440
|
href: "/user-onboarding/login",
|
|
3441
3441
|
"data-gtm-event-context": "EmailExistsBox",
|
|
3442
3442
|
"data-gtm-event-type": "login-click"
|
|
@@ -3455,14 +3455,14 @@ const Je = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3455
3455
|
};
|
|
3456
3456
|
break;
|
|
3457
3457
|
}
|
|
3458
|
-
o({ ...i, path: h, type:
|
|
3458
|
+
o({ ...i, path: h, type: g, link: y, mail: k });
|
|
3459
3459
|
},
|
|
3460
3460
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
3461
3461
|
[e]
|
|
3462
3462
|
);
|
|
3463
3463
|
const f = {};
|
|
3464
3464
|
return ["link", "mail"].forEach((h) => {
|
|
3465
|
-
f[h] = Object.keys(i[h]).length ? (
|
|
3465
|
+
f[h] = Object.keys(i[h]).length ? (g) => /* @__PURE__ */ a.jsx("a", { ...i[h], children: g }) : (g) => g;
|
|
3466
3466
|
}), /* @__PURE__ */ a.jsx(Ar, { type: i.type, heading: c ? !1 : s.formatMessage({ id: `${i.path}_title` }), children: c ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3467
3467
|
/* @__PURE__ */ a.jsx(_e, { element: "span" }),
|
|
3468
3468
|
/* @__PURE__ */ a.jsx(_e, { element: "span" })
|
|
@@ -3519,51 +3519,51 @@ const Ui = ({
|
|
|
3519
3519
|
const c = P(), [m, l] = R({ setUp: !1, id: null, rating: null, disabled: !0 }), f = async () => {
|
|
3520
3520
|
try {
|
|
3521
3521
|
const v = await n();
|
|
3522
|
-
l((
|
|
3522
|
+
l((_) => ({ ..._, setUp: !0, id: v && v.id, disabled: !1 }));
|
|
3523
3523
|
} catch (v) {
|
|
3524
|
-
l((
|
|
3524
|
+
l((_) => ({ ..._, setUp: !0, disabled: !0 })), s(v);
|
|
3525
3525
|
}
|
|
3526
3526
|
};
|
|
3527
3527
|
if (G(() => {
|
|
3528
3528
|
o && !m.setUp && f();
|
|
3529
3529
|
}, [o]), !o)
|
|
3530
3530
|
return /* @__PURE__ */ a.jsx(_e, { className: "rating-placeholder" });
|
|
3531
|
-
const { id: d, rating: p, disabled: h } = m,
|
|
3532
|
-
text: c.formatMessage({ id: `${
|
|
3533
|
-
low: c.formatMessage({ id: `${
|
|
3534
|
-
high: c.formatMessage({ id: `${
|
|
3535
|
-
success: c.formatMessage({ id: `${
|
|
3531
|
+
const { id: d, rating: p, disabled: h } = m, g = "ratings_", y = {
|
|
3532
|
+
text: c.formatMessage({ id: `${g}text` }),
|
|
3533
|
+
low: c.formatMessage({ id: `${g}low` }),
|
|
3534
|
+
high: c.formatMessage({ id: `${g}high` }),
|
|
3535
|
+
success: c.formatMessage({ id: `${g}success` }),
|
|
3536
3536
|
...e
|
|
3537
3537
|
}, k = async (v) => {
|
|
3538
3538
|
if (!(!d || h))
|
|
3539
3539
|
try {
|
|
3540
|
-
l((
|
|
3541
|
-
} catch (
|
|
3542
|
-
l((b) => ({ ...b, rating: null })), s(
|
|
3540
|
+
l((_) => ({ ..._, rating: v, disabled: !0 })), await r({ id: d, value: v });
|
|
3541
|
+
} catch (_) {
|
|
3542
|
+
l((b) => ({ ...b, rating: null })), s(_);
|
|
3543
3543
|
} finally {
|
|
3544
|
-
l((
|
|
3544
|
+
l((_) => ({ ..._, disabled: !1 }));
|
|
3545
3545
|
}
|
|
3546
3546
|
};
|
|
3547
3547
|
return /* @__PURE__ */ a.jsxs("div", { className: w("rating", i), children: [
|
|
3548
3548
|
/* @__PURE__ */ a.jsx("span", { className: "label", children: y[p ? "success" : "text"] }),
|
|
3549
3549
|
/* @__PURE__ */ a.jsx("ol", { children: Array.from(new Array(t).keys()).map((v) => {
|
|
3550
|
-
const
|
|
3551
|
-
return /* @__PURE__ */ a.jsx("li", { className: w({ selected: p &&
|
|
3552
|
-
|
|
3550
|
+
const _ = v + 1;
|
|
3551
|
+
return /* @__PURE__ */ a.jsx("li", { className: w({ selected: p && _ <= p }), children: /* @__PURE__ */ a.jsx(
|
|
3552
|
+
q,
|
|
3553
3553
|
{
|
|
3554
3554
|
variant: "tertiary",
|
|
3555
3555
|
size: "small",
|
|
3556
|
-
icon: { icon: `star${!p ||
|
|
3556
|
+
icon: { icon: `star${!p || _ > p ? "_empty" : ""}`, position: "left", hover: "star" },
|
|
3557
3557
|
screenreaderText: `${c.formatMessage(
|
|
3558
|
-
{ id: `${
|
|
3559
|
-
{ number:
|
|
3560
|
-
)}${
|
|
3558
|
+
{ id: `${g}stars` },
|
|
3559
|
+
{ number: _, total: t }
|
|
3560
|
+
)}${_ === 1 || _ === t ? ` - ${y[_ === 1 ? "low" : "high"]}` : ""}`,
|
|
3561
3561
|
onClick: (b) => {
|
|
3562
|
-
b.preventDefault(), b.stopPropagation(), k(
|
|
3562
|
+
b.preventDefault(), b.stopPropagation(), k(_);
|
|
3563
3563
|
},
|
|
3564
3564
|
disabled: h
|
|
3565
3565
|
}
|
|
3566
|
-
) }, `rating-${
|
|
3566
|
+
) }, `rating-${_}`);
|
|
3567
3567
|
}) })
|
|
3568
3568
|
] });
|
|
3569
3569
|
};
|
|
@@ -3575,7 +3575,7 @@ const ps = ({
|
|
|
3575
3575
|
gtmContext: s = "search-bar",
|
|
3576
3576
|
gtmEvent: i = "form-submission"
|
|
3577
3577
|
}) => {
|
|
3578
|
-
const { searchIsOpen: o = !0, isDesktopVersion: c = !1 } = n || {}, m = P(), l =
|
|
3578
|
+
const { searchIsOpen: o = !0, isDesktopVersion: c = !1 } = n || {}, m = P(), l = te(null);
|
|
3579
3579
|
Pe(() => {
|
|
3580
3580
|
!n || c || !o || l.current && l.current.focus();
|
|
3581
3581
|
}, [o]);
|
|
@@ -3633,7 +3633,7 @@ const hs = ({
|
|
|
3633
3633
|
initialFormStatus: l = "NOT_SUBMITTED"
|
|
3634
3634
|
/* NOT_SUBMITTED */
|
|
3635
3635
|
}) => {
|
|
3636
|
-
const [f, d] = R([]), [p, h] = R(!0), [
|
|
3636
|
+
const [f, d] = R([]), [p, h] = R(!0), [g, y] = R(l), { formatMessage: k } = P(), v = async (j) => {
|
|
3637
3637
|
j.preventDefault();
|
|
3638
3638
|
try {
|
|
3639
3639
|
await m(f), d([]), y(
|
|
@@ -3646,7 +3646,7 @@ const hs = ({
|
|
|
3646
3646
|
/* ERROR */
|
|
3647
3647
|
), c(C);
|
|
3648
3648
|
}
|
|
3649
|
-
},
|
|
3649
|
+
}, _ = (j) => {
|
|
3650
3650
|
j.preventDefault(), y(
|
|
3651
3651
|
"NOT_SUBMITTED"
|
|
3652
3652
|
/* NOT_SUBMITTED */
|
|
@@ -3657,16 +3657,16 @@ const hs = ({
|
|
|
3657
3657
|
/* CLOSED */
|
|
3658
3658
|
);
|
|
3659
3659
|
};
|
|
3660
|
-
return
|
|
3661
|
-
/* @__PURE__ */ a.jsx("div", { className: "content centred", children:
|
|
3660
|
+
return g === "CLOSED" ? null : g === "ERROR" || g === "SUCCESS" ? /* @__PURE__ */ a.jsxs("div", { className: "invite-form-wrapper", children: [
|
|
3661
|
+
/* @__PURE__ */ a.jsx("div", { className: "content centred", children: g === "SUCCESS" ? /* @__PURE__ */ a.jsx("h2", { className: "success-title", children: k({ id: "inviteForm_success" }) }) : /* @__PURE__ */ a.jsxs("h2", { className: "error-title", children: [
|
|
3662
3662
|
" ",
|
|
3663
3663
|
k({ id: "inviteForm_error" })
|
|
3664
3664
|
] }) }),
|
|
3665
3665
|
/* @__PURE__ */ a.jsx(Te, {}),
|
|
3666
|
-
/* @__PURE__ */ a.jsx("div", { className: "footer", children:
|
|
3667
|
-
/* @__PURE__ */ a.jsx(
|
|
3668
|
-
/* @__PURE__ */ a.jsx(
|
|
3669
|
-
] }) : /* @__PURE__ */ a.jsx(
|
|
3666
|
+
/* @__PURE__ */ a.jsx("div", { className: "footer", children: g === "SUCCESS" ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3667
|
+
/* @__PURE__ */ a.jsx(q, { variant: "secondary", onClick: _, children: k({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
3668
|
+
/* @__PURE__ */ a.jsx(q, { onClick: b, children: k({ id: "inviteForm_ctaDone" }) })
|
|
3669
|
+
] }) : /* @__PURE__ */ a.jsx(q, { onClick: _, children: k({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
3670
3670
|
] }) : /* @__PURE__ */ a.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ a.jsxs(
|
|
3671
3671
|
"form",
|
|
3672
3672
|
{
|
|
@@ -3691,7 +3691,7 @@ const hs = ({
|
|
|
3691
3691
|
getLabel: (j, C, S) => /* @__PURE__ */ a.jsxs("div", { className: "email text-medium", children: [
|
|
3692
3692
|
/* @__PURE__ */ a.jsx("div", { "data-tag-item": !0, children: j }),
|
|
3693
3693
|
/* @__PURE__ */ a.jsx(
|
|
3694
|
-
|
|
3694
|
+
q,
|
|
3695
3695
|
{
|
|
3696
3696
|
variant: "tertiary",
|
|
3697
3697
|
size: "small",
|
|
@@ -3708,11 +3708,11 @@ const hs = ({
|
|
|
3708
3708
|
)
|
|
3709
3709
|
] }),
|
|
3710
3710
|
/* @__PURE__ */ a.jsx(Te, {}),
|
|
3711
|
-
/* @__PURE__ */ a.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ a.jsx(
|
|
3711
|
+
/* @__PURE__ */ a.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ a.jsx(q, { className: "sendEmailsButton", disabled: p, children: n }) })
|
|
3712
3712
|
]
|
|
3713
3713
|
}
|
|
3714
3714
|
) });
|
|
3715
|
-
},
|
|
3715
|
+
}, W = {
|
|
3716
3716
|
timeouts: {},
|
|
3717
3717
|
handlerCalled: {},
|
|
3718
3718
|
getIsDesktopVersion: (e, t) => {
|
|
@@ -3735,9 +3735,9 @@ const hs = ({
|
|
|
3735
3735
|
if (n[e] === t || e === "account" && t === !1 && n.navigation === !0)
|
|
3736
3736
|
return;
|
|
3737
3737
|
const s = Date.now();
|
|
3738
|
-
if (!t &&
|
|
3738
|
+
if (!t && W.handlerCalled[e] && s - W.handlerCalled[e] < 500)
|
|
3739
3739
|
return;
|
|
3740
|
-
|
|
3740
|
+
W.handlerCalled[e] = s;
|
|
3741
3741
|
let i = [{ type: `menus.${e}`, value: t }];
|
|
3742
3742
|
t === !0 && Object.keys(n).forEach((o) => {
|
|
3743
3743
|
o === e || n[o] === !1 || i.push({ type: `menus.${o}`, value: !1 });
|
|
@@ -3762,7 +3762,7 @@ const hs = ({
|
|
|
3762
3762
|
if (!(typeof s > "u") && (!n || s[t] && s[t].includes(n) || s.value && s.value.includes(n) || s.toString().includes(n)))
|
|
3763
3763
|
return e[r];
|
|
3764
3764
|
}
|
|
3765
|
-
return e[0].children ?
|
|
3765
|
+
return e[0].children ? W.findFirstChild(e[0].children, t, n) : !1;
|
|
3766
3766
|
},
|
|
3767
3767
|
autoFocus: ({ menu: e, navigationRef: t, isDesktopVersion: n, focusElements: r, dispatch: s }) => {
|
|
3768
3768
|
if (!t.current || !t.current.children)
|
|
@@ -3776,20 +3776,20 @@ const hs = ({
|
|
|
3776
3776
|
switch (e) {
|
|
3777
3777
|
case "navigation":
|
|
3778
3778
|
if (n) {
|
|
3779
|
-
const m =
|
|
3779
|
+
const m = W.findFirstChild(
|
|
3780
3780
|
t.current.children,
|
|
3781
3781
|
"attributes.aria-controls",
|
|
3782
3782
|
"navigation"
|
|
3783
3783
|
);
|
|
3784
|
-
o =
|
|
3784
|
+
o = W.findFirstChild(m.children, "href");
|
|
3785
3785
|
} else
|
|
3786
|
-
o =
|
|
3786
|
+
o = W.findFirstChild(t.current.children, "href");
|
|
3787
3787
|
o || (o = t.current);
|
|
3788
3788
|
break;
|
|
3789
3789
|
case "account":
|
|
3790
|
-
if (c =
|
|
3790
|
+
if (c = W.findFirstChild(t.current.children, "className", "account"), !c || !c.children)
|
|
3791
3791
|
return;
|
|
3792
|
-
o =
|
|
3792
|
+
o = W.findFirstChild(c.children, "href");
|
|
3793
3793
|
break;
|
|
3794
3794
|
default:
|
|
3795
3795
|
return;
|
|
@@ -3798,16 +3798,16 @@ const hs = ({
|
|
|
3798
3798
|
},
|
|
3799
3799
|
events: {
|
|
3800
3800
|
onClick: (e, { id: t, callback: n, isOpen: r }) => {
|
|
3801
|
-
e.target && e.target.attributes && e.target.attributes.href || (e.preventDefault(), e.stopPropagation(), clearTimeout(
|
|
3801
|
+
e.target && e.target.attributes && e.target.attributes.href || (e.preventDefault(), e.stopPropagation(), clearTimeout(W.timeouts[t]), n(t, !r));
|
|
3802
3802
|
},
|
|
3803
3803
|
onFocus: ({ id: e }) => {
|
|
3804
|
-
clearTimeout(
|
|
3804
|
+
clearTimeout(W.timeouts[e]);
|
|
3805
3805
|
},
|
|
3806
3806
|
onMouseEnter: ({ id: e, callback: t }) => {
|
|
3807
|
-
clearTimeout(
|
|
3807
|
+
clearTimeout(W.timeouts[e]), t(e, !0);
|
|
3808
3808
|
},
|
|
3809
3809
|
onBlur: ({ id: e, callback: t }) => {
|
|
3810
|
-
|
|
3810
|
+
W.timeouts[e] = setTimeout(() => {
|
|
3811
3811
|
t(e, !1);
|
|
3812
3812
|
}, 250);
|
|
3813
3813
|
}
|
|
@@ -3904,10 +3904,10 @@ const hs = ({
|
|
|
3904
3904
|
c.hasVariantText && (d += `_logged${t ? "In" : "Out"}`);
|
|
3905
3905
|
let p = !1;
|
|
3906
3906
|
if (c.href) {
|
|
3907
|
-
let
|
|
3908
|
-
if (
|
|
3909
|
-
const b =
|
|
3910
|
-
|
|
3907
|
+
let _ = c.gtmType || `${e}-click`;
|
|
3908
|
+
if (_.includes(".")) {
|
|
3909
|
+
const b = _.split("."), j = b[b.length - 2];
|
|
3910
|
+
_ = `${j === "topics" ? `${j}-` : ""}${b[b.length - 1]}`;
|
|
3911
3911
|
}
|
|
3912
3912
|
p = {
|
|
3913
3913
|
href: c.href,
|
|
@@ -3915,7 +3915,7 @@ const hs = ({
|
|
|
3915
3915
|
}, l && (p = {
|
|
3916
3916
|
...p,
|
|
3917
3917
|
className: "gtm-trackable",
|
|
3918
|
-
"data-gtm-event-type":
|
|
3918
|
+
"data-gtm-event-type": _,
|
|
3919
3919
|
"data-gtm-event-context": "HeaderButtons"
|
|
3920
3920
|
}), f && (p = {
|
|
3921
3921
|
...p,
|
|
@@ -3924,35 +3924,35 @@ const hs = ({
|
|
|
3924
3924
|
...c.props || {}
|
|
3925
3925
|
});
|
|
3926
3926
|
}
|
|
3927
|
-
const h = c.order && c.order[0] && c[c.order[0]],
|
|
3927
|
+
const h = c.order && c.order[0] && c[c.order[0]], g = h && c[c.order[0]].order, y = p && window.location.pathname === c.href;
|
|
3928
3928
|
let k = {}, v = {};
|
|
3929
3929
|
if (h) {
|
|
3930
|
-
const
|
|
3931
|
-
onClick: (j) =>
|
|
3932
|
-
onFocus: () =>
|
|
3933
|
-
onBlur: () =>
|
|
3934
|
-
onMouseLeave: () =>
|
|
3935
|
-
onMouseEnter: () =>
|
|
3930
|
+
const _ = c.menuId || e, b = {
|
|
3931
|
+
onClick: (j) => W.events.onClick(j, { id: _, callback: s, isOpen: r[_] }),
|
|
3932
|
+
onFocus: () => W.events.onFocus({ id: _ }),
|
|
3933
|
+
onBlur: () => W.events.onBlur({ id: _, callback: s }),
|
|
3934
|
+
onMouseLeave: () => W.events.onBlur({ id: _, callback: s }),
|
|
3935
|
+
onMouseEnter: () => W.events.onMouseEnter({ id: _, callback: s })
|
|
3936
3936
|
};
|
|
3937
|
-
n && (
|
|
3937
|
+
n && (g && (k = {
|
|
3938
3938
|
...b,
|
|
3939
3939
|
onKeyPress: (j) => {
|
|
3940
|
-
j.key === "Enter" &&
|
|
3940
|
+
j.key === "Enter" && W.events.onClick(j, { id: _, callback: s, isOpen: r[_] });
|
|
3941
3941
|
},
|
|
3942
3942
|
tabIndex: "0",
|
|
3943
3943
|
// Add a `tabIndex` so keyboard users can focus on the `li`
|
|
3944
3944
|
"aria-haspopup": !0,
|
|
3945
|
-
"aria-expanded": r[
|
|
3946
|
-
"aria-controls":
|
|
3947
|
-
}), v = { hidden:
|
|
3945
|
+
"aria-expanded": r[_],
|
|
3946
|
+
"aria-controls": _
|
|
3947
|
+
}), v = { hidden: _ in r ? !r[_] : !0 }), g || (v = {
|
|
3948
3948
|
...v,
|
|
3949
3949
|
...b
|
|
3950
3950
|
});
|
|
3951
3951
|
}
|
|
3952
|
-
return /* @__PURE__ */ a.jsxs("li", { className: w({ [c.className]: c.className, "has-submenu": h, parent:
|
|
3953
|
-
p ? A.createElement(f ?
|
|
3954
|
-
c.order && /* @__PURE__ */ a.jsx("ul", { ...v, children: c.order.map((
|
|
3955
|
-
if (!c[
|
|
3952
|
+
return /* @__PURE__ */ a.jsxs("li", { className: w({ [c.className]: c.className, "has-submenu": h, parent: g, active: y }), role: "none", ...k, children: [
|
|
3953
|
+
p ? A.createElement(f ? q : "a", p, o.formatMessage({ id: d })) : o.formatMessage({ id: d }),
|
|
3954
|
+
c.order && /* @__PURE__ */ a.jsx("ul", { ...v, children: c.order.map((_) => {
|
|
3955
|
+
if (!c[_])
|
|
3956
3956
|
return null;
|
|
3957
3957
|
const b = {
|
|
3958
3958
|
isLoggedIn: t,
|
|
@@ -3961,16 +3961,16 @@ const hs = ({
|
|
|
3961
3961
|
callback: s,
|
|
3962
3962
|
doTrack: m ? l : null
|
|
3963
3963
|
};
|
|
3964
|
-
return c[
|
|
3965
|
-
o.formatMessage({ id: `${d}_${
|
|
3966
|
-
/* @__PURE__ */ a.jsx("ul", { children: c[
|
|
3967
|
-
] },
|
|
3964
|
+
return c[_].order ? /* @__PURE__ */ a.jsxs("li", { className: w({ [c[_].className]: c[_].className }), children: [
|
|
3965
|
+
o.formatMessage({ id: `${d}_${_}` }),
|
|
3966
|
+
/* @__PURE__ */ a.jsx("ul", { children: c[_].order.map((j) => /* @__PURE__ */ a.jsx(lt, { id: `${e}.${_}.${j}`, ...b }, j)) })
|
|
3967
|
+
] }, _) : /* @__PURE__ */ a.jsx(lt, { id: `${e}.${_}`, ...b }, _);
|
|
3968
3968
|
}) })
|
|
3969
3969
|
] }, e);
|
|
3970
3970
|
};
|
|
3971
3971
|
const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 }) => {
|
|
3972
3972
|
const t = P(), n = ge(ke), r = He(!0, !0), s = n && typeof n.id == "string", i = ft(
|
|
3973
|
-
() =>
|
|
3973
|
+
() => W.getIsDesktopVersion(s, r),
|
|
3974
3974
|
[s, r]
|
|
3975
3975
|
), [o, c] = Oa(vr, {
|
|
3976
3976
|
headerIsVisible: !0,
|
|
@@ -3984,18 +3984,18 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
3984
3984
|
scrollPosition: gs[`height${i.navigation ? "_desktop" : ""}`],
|
|
3985
3985
|
callbacks: {
|
|
3986
3986
|
scrollUp: () => {
|
|
3987
|
-
!i && l.navigation ||
|
|
3987
|
+
!i && l.navigation || W.shouldChangeHeaderIsVisible(!0, l, c);
|
|
3988
3988
|
},
|
|
3989
3989
|
scrollDown: () => {
|
|
3990
|
-
!i && l.navigation ||
|
|
3990
|
+
!i && l.navigation || W.shouldChangeHeaderIsVisible(!1, l, c);
|
|
3991
3991
|
}
|
|
3992
3992
|
}
|
|
3993
3993
|
});
|
|
3994
|
-
const d = (h,
|
|
3995
|
-
|
|
3996
|
-
}, p =
|
|
3994
|
+
const d = (h, g) => {
|
|
3995
|
+
W.handleMenus({ id: h, value: g, menus: l, dispatch: c });
|
|
3996
|
+
}, p = te(null);
|
|
3997
3997
|
return Pe(() => {
|
|
3998
|
-
l.navigation &&
|
|
3998
|
+
l.navigation && W.autoFocus({
|
|
3999
3999
|
menu: "navigation",
|
|
4000
4000
|
navigationRef: p,
|
|
4001
4001
|
isDesktopVersion: i.navigation,
|
|
@@ -4003,7 +4003,7 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
4003
4003
|
dispatch: c
|
|
4004
4004
|
});
|
|
4005
4005
|
}, [l.navigation]), Pe(() => {
|
|
4006
|
-
l.account &&
|
|
4006
|
+
l.account && W.autoFocus({
|
|
4007
4007
|
menu: "account",
|
|
4008
4008
|
navigationRef: p,
|
|
4009
4009
|
isDesktopVersion: i.navigation,
|
|
@@ -4105,13 +4105,13 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
4105
4105
|
"button",
|
|
4106
4106
|
{
|
|
4107
4107
|
className: "account-button",
|
|
4108
|
-
onClick: (h) =>
|
|
4108
|
+
onClick: (h) => W.events.onClick(h, {
|
|
4109
4109
|
id: "account",
|
|
4110
4110
|
callback: d,
|
|
4111
4111
|
isOpen: l.account
|
|
4112
4112
|
}),
|
|
4113
|
-
onMouseEnter: () =>
|
|
4114
|
-
onMouseLeave: () =>
|
|
4113
|
+
onMouseEnter: () => W.events.onMouseEnter({ id: "account", callback: d }),
|
|
4114
|
+
onMouseLeave: () => W.events.onBlur({ id: "account", callback: d }),
|
|
4115
4115
|
"aria-haspopup": "true",
|
|
4116
4116
|
"aria-expanded": l.account,
|
|
4117
4117
|
"aria-controls": "navigation",
|
|
@@ -4167,8 +4167,8 @@ const la = ({
|
|
|
4167
4167
|
className: f = "",
|
|
4168
4168
|
gtmContext: d = "Modal"
|
|
4169
4169
|
}) => {
|
|
4170
|
-
const p = P(), [h,
|
|
4171
|
-
|
|
4170
|
+
const p = P(), [h, g] = R(t), y = (v) => {
|
|
4171
|
+
g(v), v ? (s(), document.body.classList.add("has-overlay")) : (i(), document.body.classList.remove("has-overlay"));
|
|
4172
4172
|
};
|
|
4173
4173
|
G(() => {
|
|
4174
4174
|
y(t);
|
|
@@ -4185,7 +4185,7 @@ const la = ({
|
|
|
4185
4185
|
/* @__PURE__ */ a.jsxs("div", { className: "top", children: [
|
|
4186
4186
|
c && /* @__PURE__ */ a.jsx("h2", { className: "modal-title", children: c }),
|
|
4187
4187
|
/* @__PURE__ */ a.jsx(
|
|
4188
|
-
|
|
4188
|
+
q,
|
|
4189
4189
|
{
|
|
4190
4190
|
variant: "tertiary",
|
|
4191
4191
|
size: "medium",
|
|
@@ -4273,7 +4273,7 @@ const bs = () => {
|
|
|
4273
4273
|
G(() => {
|
|
4274
4274
|
window.scrollTo(0, 0);
|
|
4275
4275
|
}, [h]);
|
|
4276
|
-
const
|
|
4276
|
+
const g = at(e, { locale: c }), y = at(t, {
|
|
4277
4277
|
locale: c
|
|
4278
4278
|
}), k = at(n, {
|
|
4279
4279
|
locale: c
|
|
@@ -4289,7 +4289,7 @@ const bs = () => {
|
|
|
4289
4289
|
y && /* @__PURE__ */ a.jsx("div", { className: "additional-content prepended", children: y }),
|
|
4290
4290
|
A.createElement(f === "bold" ? ca : "div", {
|
|
4291
4291
|
id: "content",
|
|
4292
|
-
children:
|
|
4292
|
+
children: g
|
|
4293
4293
|
})
|
|
4294
4294
|
] }),
|
|
4295
4295
|
k && /* @__PURE__ */ a.jsx("div", { className: "additional-content appended", children: k }),
|
|
@@ -4392,7 +4392,7 @@ const Vi = ({
|
|
|
4392
4392
|
] });
|
|
4393
4393
|
};
|
|
4394
4394
|
let et = null;
|
|
4395
|
-
const
|
|
4395
|
+
const de = "discussion_form_", en = ({
|
|
4396
4396
|
content: e = { type: "response", slugs: {} },
|
|
4397
4397
|
userHasPermissions: t = !0,
|
|
4398
4398
|
meta: n = {
|
|
@@ -4423,10 +4423,10 @@ const le = "discussion_form_", en = ({
|
|
|
4423
4423
|
},
|
|
4424
4424
|
gtmContext: m = "DiscussionForm"
|
|
4425
4425
|
}) => {
|
|
4426
|
-
var
|
|
4426
|
+
var M, T, E;
|
|
4427
4427
|
const l = P(), f = ge(ke), [d, p] = R(
|
|
4428
4428
|
n.isEditing && n.isEditing.text || ""
|
|
4429
|
-
), [h,
|
|
4429
|
+
), [h, g] = R(o.error || !1), [y, k] = R(!1), v = te(null);
|
|
4430
4430
|
if (r || (r = v), n.isLoading)
|
|
4431
4431
|
return /* @__PURE__ */ a.jsx(
|
|
4432
4432
|
_e,
|
|
@@ -4435,85 +4435,85 @@ const le = "discussion_form_", en = ({
|
|
|
4435
4435
|
"data-testid": "loading-placeholder"
|
|
4436
4436
|
}
|
|
4437
4437
|
);
|
|
4438
|
-
const
|
|
4439
|
-
const
|
|
4440
|
-
p(
|
|
4441
|
-
let
|
|
4442
|
-
!f || !f.id ?
|
|
4438
|
+
const _ = (O) => {
|
|
4439
|
+
const H = O.target.value;
|
|
4440
|
+
p(H);
|
|
4441
|
+
let U;
|
|
4442
|
+
!f || !f.id ? U = be(
|
|
4443
4443
|
l.formatMessage,
|
|
4444
|
-
`${
|
|
4444
|
+
`${de}error_loggedOut`,
|
|
4445
4445
|
e.type,
|
|
4446
4446
|
"action"
|
|
4447
|
-
) : t ?
|
|
4447
|
+
) : t ? H.length >= s && (U = `${de}error_tooLong`) : U = be(
|
|
4448
4448
|
l.formatMessage,
|
|
4449
|
-
`${
|
|
4449
|
+
`${de}error_noPermission`,
|
|
4450
4450
|
e.type,
|
|
4451
4451
|
"action"
|
|
4452
|
-
),
|
|
4452
|
+
), U ? g(U) : h && g(!1);
|
|
4453
4453
|
};
|
|
4454
4454
|
let b = `${e.type}-form`;
|
|
4455
4455
|
if (e.type === "response" || e.type === "reply") {
|
|
4456
|
-
const
|
|
4457
|
-
|
|
4456
|
+
const O = ((M = e.slugs) == null ? void 0 : M.reply) || ((T = e.slugs) == null ? void 0 : T.answer) || ((E = e.slugs) == null ? void 0 : E.question) || "";
|
|
4457
|
+
O && (b = `${b}-${O.slice(-15)}`);
|
|
4458
4458
|
}
|
|
4459
|
-
const j = async (
|
|
4460
|
-
var
|
|
4461
|
-
if (
|
|
4459
|
+
const j = async (O) => {
|
|
4460
|
+
var U;
|
|
4461
|
+
if (O.preventDefault(), O.stopPropagation(), !f || !f.id || !t || S)
|
|
4462
4462
|
return;
|
|
4463
4463
|
et && clearTimeout(et), k("submitting");
|
|
4464
|
-
const
|
|
4464
|
+
const H = window.location.pathname;
|
|
4465
4465
|
try {
|
|
4466
|
-
let
|
|
4466
|
+
let V;
|
|
4467
4467
|
switch (e.type) {
|
|
4468
4468
|
case "post":
|
|
4469
|
-
|
|
4469
|
+
V = await c.create({ content: d });
|
|
4470
4470
|
break;
|
|
4471
4471
|
case "question":
|
|
4472
|
-
|
|
4472
|
+
V = await c.create({
|
|
4473
4473
|
title: d,
|
|
4474
4474
|
authorId: f && f.id,
|
|
4475
|
-
...(
|
|
4475
|
+
...(U = c.props) == null ? void 0 : U.create
|
|
4476
4476
|
});
|
|
4477
4477
|
break;
|
|
4478
4478
|
case "response":
|
|
4479
|
-
|
|
4479
|
+
V = await c.create(
|
|
4480
4480
|
{ question: e.slugs.question },
|
|
4481
|
-
{ body: d, authorId: f && f.id, contentPath:
|
|
4481
|
+
{ body: d, authorId: f && f.id, contentPath: H }
|
|
4482
4482
|
);
|
|
4483
4483
|
break;
|
|
4484
4484
|
case "reply":
|
|
4485
|
-
|
|
4485
|
+
V = await c.create(
|
|
4486
4486
|
{ question: e.slugs.question, answer: e.slugs.answer },
|
|
4487
|
-
{ body: d, authorId: f && f.id, contentPath:
|
|
4487
|
+
{ body: d, authorId: f && f.id, contentPath: H }
|
|
4488
4488
|
);
|
|
4489
4489
|
break;
|
|
4490
4490
|
default:
|
|
4491
4491
|
break;
|
|
4492
4492
|
}
|
|
4493
|
-
await xr(1e3), c.callback && await c.callback(
|
|
4493
|
+
await xr(1e3), c.callback && await c.callback(V), et = setTimeout(() => {
|
|
4494
4494
|
p(""), k("submitted"), C();
|
|
4495
4495
|
}, 500);
|
|
4496
|
-
} catch (
|
|
4497
|
-
const
|
|
4498
|
-
let
|
|
4499
|
-
|
|
4496
|
+
} catch (V) {
|
|
4497
|
+
const Q = V;
|
|
4498
|
+
let z = `${de}error`;
|
|
4499
|
+
Q.message.includes("entry already exists") && (z = be(
|
|
4500
4500
|
l.formatMessage,
|
|
4501
|
-
`${
|
|
4501
|
+
`${de}error_alreadyExists`,
|
|
4502
4502
|
e.type,
|
|
4503
4503
|
"action"
|
|
4504
|
-
)),
|
|
4504
|
+
)), Q.message.includes("429") ? z = be(
|
|
4505
4505
|
l.formatMessage,
|
|
4506
|
-
`${
|
|
4506
|
+
`${de}error_tooMany`,
|
|
4507
4507
|
e.type,
|
|
4508
4508
|
"action"
|
|
4509
|
-
) :
|
|
4509
|
+
) : Q.message.includes("400") && (z = `${de}error`), g(z), C();
|
|
4510
4510
|
}
|
|
4511
4511
|
}, C = () => {
|
|
4512
4512
|
et = setTimeout(() => {
|
|
4513
|
-
|
|
4513
|
+
g(!1), k(!1);
|
|
4514
4514
|
}, 5e3);
|
|
4515
|
-
}, S = !d || !yr(d),
|
|
4516
|
-
return (n.isEditing && !
|
|
4515
|
+
}, S = !d || !yr(d), I = y === "submitting", F = [];
|
|
4516
|
+
return (n.isEditing && !I || o.cancel) && F.push({
|
|
4517
4517
|
variant: "secondary",
|
|
4518
4518
|
size: { mobile: "small", 600: "medium" },
|
|
4519
4519
|
onClick: c.handleCancel,
|
|
@@ -4521,26 +4521,26 @@ const le = "discussion_form_", en = ({
|
|
|
4521
4521
|
"data-gtm-event-context": m,
|
|
4522
4522
|
"data-gtm-event-type": `cancel-${e.type}-click`,
|
|
4523
4523
|
disabled: !o.cancel && (!f || !f.id || !d),
|
|
4524
|
-
children: l.formatMessage({ id: `${
|
|
4524
|
+
children: l.formatMessage({ id: `${de}cancel` })
|
|
4525
4525
|
}), F.push({
|
|
4526
4526
|
variant: "primary",
|
|
4527
4527
|
size: { mobile: "small", 600: "medium" },
|
|
4528
|
-
onClick: (
|
|
4528
|
+
onClick: (O) => {
|
|
4529
4529
|
if (n.isEditing) {
|
|
4530
4530
|
k("submitting"), c.handleSaveEdit && c.handleSaveEdit(
|
|
4531
4531
|
v.current && "value" in v.current ? v.current.value : ""
|
|
4532
4532
|
);
|
|
4533
4533
|
return;
|
|
4534
4534
|
}
|
|
4535
|
-
j(
|
|
4535
|
+
j(O);
|
|
4536
4536
|
},
|
|
4537
4537
|
className: "gtm-trackable",
|
|
4538
4538
|
"data-gtm-event-context": m,
|
|
4539
4539
|
"data-gtm-event-type": `${n.isEditing ? "save" : "submit"}-${e.type}-click`,
|
|
4540
4540
|
"data-testid": "save-button",
|
|
4541
|
-
disabled: !f || !f.id || !t || S ||
|
|
4541
|
+
disabled: !f || !f.id || !t || S || I || n.isEditing && d === n.isEditing.text,
|
|
4542
4542
|
children: l.formatMessage({
|
|
4543
|
-
id: `${
|
|
4543
|
+
id: `${de}${I ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}`
|
|
4544
4544
|
})
|
|
4545
4545
|
}), /* @__PURE__ */ a.jsxs(
|
|
4546
4546
|
"form",
|
|
@@ -4551,7 +4551,7 @@ const le = "discussion_form_", en = ({
|
|
|
4551
4551
|
}),
|
|
4552
4552
|
"data-testid": `discussion-${e.type}-form`,
|
|
4553
4553
|
children: [
|
|
4554
|
-
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ a.jsx("h2", { children: be(l.formatMessage, `${
|
|
4554
|
+
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ a.jsx("h2", { children: be(l.formatMessage, `${de}title`, e.type, "action") }),
|
|
4555
4555
|
/* @__PURE__ */ a.jsx(
|
|
4556
4556
|
Xt,
|
|
4557
4557
|
{
|
|
@@ -4560,7 +4560,7 @@ const le = "discussion_form_", en = ({
|
|
|
4560
4560
|
gtmType: "profile-click"
|
|
4561
4561
|
}
|
|
4562
4562
|
),
|
|
4563
|
-
/* @__PURE__ */ a.jsx(ae, { element: "label", showOnFocus: !1, htmlFor: `${b}-input`, children: be(l.formatMessage, `${
|
|
4563
|
+
/* @__PURE__ */ a.jsx(ae, { element: "label", showOnFocus: !1, htmlFor: `${b}-input`, children: be(l.formatMessage, `${de}label`, e.type, "action") }),
|
|
4564
4564
|
/* @__PURE__ */ a.jsx(
|
|
4565
4565
|
Xa,
|
|
4566
4566
|
{
|
|
@@ -4569,11 +4569,11 @@ const le = "discussion_form_", en = ({
|
|
|
4569
4569
|
name: e.type,
|
|
4570
4570
|
placeholder: be(
|
|
4571
4571
|
l.formatMessage,
|
|
4572
|
-
`${
|
|
4572
|
+
`${de}placeholder`,
|
|
4573
4573
|
e.type,
|
|
4574
4574
|
"action"
|
|
4575
4575
|
),
|
|
4576
|
-
onChange:
|
|
4576
|
+
onChange: _,
|
|
4577
4577
|
value: d,
|
|
4578
4578
|
maxLength: s,
|
|
4579
4579
|
"aria-invalid": !!h,
|
|
@@ -4582,8 +4582,8 @@ const le = "discussion_form_", en = ({
|
|
|
4582
4582
|
autoFocus: !!n.isEditing
|
|
4583
4583
|
}
|
|
4584
4584
|
),
|
|
4585
|
-
/* @__PURE__ */ a.jsx("small", { children: be(l.formatMessage, `${
|
|
4586
|
-
a: (
|
|
4585
|
+
/* @__PURE__ */ a.jsx("small", { children: be(l.formatMessage, `${de}explainer`, e.type, "action", {
|
|
4586
|
+
a: (O) => /* @__PURE__ */ a.jsx(
|
|
4587
4587
|
"a",
|
|
4588
4588
|
{
|
|
4589
4589
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
@@ -4592,12 +4592,12 @@ const le = "discussion_form_", en = ({
|
|
|
4592
4592
|
"data-gtm-event-context": m,
|
|
4593
4593
|
"data-gtm-event-type": "community-guidelines-link",
|
|
4594
4594
|
rel: "noreferrer",
|
|
4595
|
-
children:
|
|
4595
|
+
children: O
|
|
4596
4596
|
}
|
|
4597
4597
|
)
|
|
4598
4598
|
}) }),
|
|
4599
4599
|
/* @__PURE__ */ a.jsx(ht, { buttons: F }),
|
|
4600
|
-
y === "submitted" && /* @__PURE__ */ a.jsx(Vt, { className: "success", "data-testid": "success", children: be(l.formatMessage, `${
|
|
4600
|
+
y === "submitted" && /* @__PURE__ */ a.jsx(Vt, { className: "success", "data-testid": "success", children: be(l.formatMessage, `${de}success`, e.type, "action") }),
|
|
4601
4601
|
h && /* @__PURE__ */ a.jsx(Vt, { id: "error-message", className: "error", "data-testid": "error", children: o.error ? o.error : typeof h == "string" ? h.includes(" ") ? h : l.formatMessage(
|
|
4602
4602
|
{ id: h },
|
|
4603
4603
|
{
|
|
@@ -4668,14 +4668,14 @@ const Bt = () => {
|
|
|
4668
4668
|
G(() => {
|
|
4669
4669
|
h(s);
|
|
4670
4670
|
}, [s]);
|
|
4671
|
-
const [f, d] = R(t), [p, h] = R(s), [
|
|
4671
|
+
const [f, d] = R(t), [p, h] = R(s), [g, y] = R(!1), [k, v] = R(!1), _ = ft(() => ws(n, Zt), [n]), b = (C) => {
|
|
4672
4672
|
if (C.preventDefault(), C.stopPropagation(), v(!1), Ze)
|
|
4673
4673
|
return Bt(), !1;
|
|
4674
|
-
if (Bt(),
|
|
4674
|
+
if (Bt(), g || !o)
|
|
4675
4675
|
return !1;
|
|
4676
4676
|
Ze = setTimeout(j, 350);
|
|
4677
4677
|
}, j = async () => {
|
|
4678
|
-
if (Bt(),
|
|
4678
|
+
if (Bt(), g || !o)
|
|
4679
4679
|
return !1;
|
|
4680
4680
|
let C = p ? f - 1 : f + 1;
|
|
4681
4681
|
C < 0 && (C = 0), y(!0), d(C), h(!p);
|
|
@@ -4693,7 +4693,7 @@ const Bt = () => {
|
|
|
4693
4693
|
return A.createElement(
|
|
4694
4694
|
e,
|
|
4695
4695
|
{
|
|
4696
|
-
className: w("likes-wrapper text-medium action-button", { "show-spinner":
|
|
4696
|
+
className: w("likes-wrapper text-medium action-button", { "show-spinner": g, "is-liked": p, disabled: !o }),
|
|
4697
4697
|
onClick: b,
|
|
4698
4698
|
onMouseEnter: () => {
|
|
4699
4699
|
v(!0);
|
|
@@ -4709,7 +4709,7 @@ const Bt = () => {
|
|
|
4709
4709
|
},
|
|
4710
4710
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4711
4711
|
/* @__PURE__ */ a.jsx(
|
|
4712
|
-
|
|
4712
|
+
q,
|
|
4713
4713
|
{
|
|
4714
4714
|
variant: "tertiary",
|
|
4715
4715
|
size: "medium",
|
|
@@ -4728,7 +4728,7 @@ const Bt = () => {
|
|
|
4728
4728
|
),
|
|
4729
4729
|
/* @__PURE__ */ a.jsx("span", { className: w("number-of-likes", { "no-likes": f === 0 }), "data-testid": "number-of-likes", children: l.formatMessage({ id: `discussion_likes${r ? "_short" : ""}` }, { number: f }) }),
|
|
4730
4730
|
n && /* @__PURE__ */ a.jsx(wr, { isOpen: k, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ a.jsxs("ul", { children: [
|
|
4731
|
-
|
|
4731
|
+
_.map((C) => typeof C == "string" || !C.name ? null : /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
4732
4732
|
gt,
|
|
4733
4733
|
{
|
|
4734
4734
|
href: C.id ? `/profiles/${C.id}` : void 0,
|
|
@@ -4773,15 +4773,15 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4773
4773
|
},
|
|
4774
4774
|
links: p = {},
|
|
4775
4775
|
className: h,
|
|
4776
|
-
gtmContext:
|
|
4776
|
+
gtmContext: g = "DiscussionAnswer",
|
|
4777
4777
|
children: y,
|
|
4778
4778
|
isTruncated: k = !1
|
|
4779
4779
|
}) => {
|
|
4780
|
-
const v = P(),
|
|
4780
|
+
const v = P(), _ = ge(ke), b = ge(vt), [j, C] = R({
|
|
4781
4781
|
body: t && t.body || "",
|
|
4782
4782
|
isEditing: !1,
|
|
4783
4783
|
didEdit: t && t.isEdited || !1
|
|
4784
|
-
}), [S,
|
|
4784
|
+
}), [S, I] = R(!1), [F, M] = R("");
|
|
4785
4785
|
if (G(() => {
|
|
4786
4786
|
C({
|
|
4787
4787
|
...j,
|
|
@@ -4790,31 +4790,31 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4790
4790
|
});
|
|
4791
4791
|
}, [t.isEdited]), r || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
4792
4792
|
return /* @__PURE__ */ a.jsx(_e, { className: "discussion-card discussion-post" });
|
|
4793
|
-
const { author:
|
|
4794
|
-
|
|
4793
|
+
const { author: T, canLike: E, createdAt: O, id: H, likes: U = 0, userLiked: V, comments: Q = 0 } = t, z = k ? Ne(j.body, $s) : j.body, ee = _ && _.id && typeof T != "string" && T.id && T.id === _.id || !1, re = typeof E == "boolean" ? E : n ? !ee : !1, se = async (Z) => {
|
|
4794
|
+
Z || (Z = ""), M("");
|
|
4795
4795
|
try {
|
|
4796
|
-
if (!er(
|
|
4797
|
-
const ue = t.type === "question" ? { title:
|
|
4796
|
+
if (!er(Z, j.body)) {
|
|
4797
|
+
const ue = t.type === "question" ? { title: Z } : { body: Z };
|
|
4798
4798
|
await m(Sn(t.slugs), ue);
|
|
4799
4799
|
}
|
|
4800
|
-
C({ body:
|
|
4800
|
+
C({ body: Z, isEditing: !1, didEdit: !0 });
|
|
4801
4801
|
} catch {
|
|
4802
|
-
|
|
4802
|
+
M(`${ve}form_error`);
|
|
4803
4803
|
}
|
|
4804
|
-
},
|
|
4804
|
+
}, ne = () => {
|
|
4805
4805
|
b && b.updateConversation && b.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
|
|
4806
4806
|
var me, pe, Ee;
|
|
4807
|
-
const ue = `reply-form-${(t.type === "answer" ? t.slug : ((me = t.slugs) == null ? void 0 : me.reply) || ((pe = t.slugs) == null ? void 0 : pe.answer) || ((Ee = t.slugs) == null ? void 0 : Ee.question) || "").toLowerCase().slice(-15)}`,
|
|
4808
|
-
|
|
4807
|
+
const ue = `reply-form-${(t.type === "answer" ? t.slug : ((me = t.slugs) == null ? void 0 : me.reply) || ((pe = t.slugs) == null ? void 0 : pe.answer) || ((Ee = t.slugs) == null ? void 0 : Ee.question) || "").toLowerCase().slice(-15)}`, K = document.getElementById(ue), ie = document.getElementById(`${ue}-input`);
|
|
4808
|
+
ie && ie.focus(), K && K.scrollIntoView({ behavior: "smooth" });
|
|
4809
4809
|
}, 0);
|
|
4810
|
-
},
|
|
4811
|
-
|
|
4810
|
+
}, oe = () => {
|
|
4811
|
+
I(!1);
|
|
4812
4812
|
try {
|
|
4813
4813
|
c(Sn(t.slugs));
|
|
4814
4814
|
} catch {
|
|
4815
|
-
|
|
4815
|
+
M("delete-error");
|
|
4816
4816
|
}
|
|
4817
|
-
},
|
|
4817
|
+
}, le = [
|
|
4818
4818
|
{
|
|
4819
4819
|
text: v.formatMessage({ id: `${ve}moreMenu_report` }),
|
|
4820
4820
|
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
@@ -4832,23 +4832,23 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4832
4832
|
icon: "flag"
|
|
4833
4833
|
}
|
|
4834
4834
|
];
|
|
4835
|
-
return n &&
|
|
4835
|
+
return n && ee && le.push(
|
|
4836
4836
|
{
|
|
4837
4837
|
text: v.formatMessage({ id: `${ve}moreMenu_edit` }),
|
|
4838
4838
|
onClick: () => C({ ...j, isEditing: !0 }),
|
|
4839
4839
|
icon: "pencil-paper",
|
|
4840
4840
|
className: "gtm-trackable",
|
|
4841
|
-
"data-gtm-event-context":
|
|
4841
|
+
"data-gtm-event-context": g,
|
|
4842
4842
|
"data-gtm-event-type": `edit-${t.type}-click`
|
|
4843
4843
|
},
|
|
4844
4844
|
{
|
|
4845
4845
|
text: v.formatMessage({ id: `${ve}moreMenu_delete` }),
|
|
4846
|
-
onClick: (
|
|
4847
|
-
|
|
4846
|
+
onClick: (Z) => {
|
|
4847
|
+
Z.preventDefault(), Z.stopPropagation(), I(!0);
|
|
4848
4848
|
},
|
|
4849
4849
|
icon: "trash",
|
|
4850
4850
|
className: "gtm-trackable",
|
|
4851
|
-
"data-gtm-event-context":
|
|
4851
|
+
"data-gtm-event-context": g,
|
|
4852
4852
|
"data-gtm-event-type": `delete-${t.type}-click`,
|
|
4853
4853
|
..._s(`delete-${t.slug}-modal`, S)
|
|
4854
4854
|
}
|
|
@@ -4859,22 +4859,22 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4859
4859
|
/* @__PURE__ */ a.jsxs(
|
|
4860
4860
|
"div",
|
|
4861
4861
|
{
|
|
4862
|
-
id:
|
|
4862
|
+
id: H || t.slug,
|
|
4863
4863
|
className: w("discussion-card", t.type, {
|
|
4864
4864
|
editing: j.isEditing,
|
|
4865
4865
|
"has-link": p.post && !j.isEditing
|
|
4866
4866
|
}),
|
|
4867
|
-
onClick: (
|
|
4868
|
-
!p.post || j.isEditing || (
|
|
4867
|
+
onClick: (Z) => {
|
|
4868
|
+
!p.post || j.isEditing || (Z.preventDefault(), Z.stopPropagation(), window.location.href = p.post);
|
|
4869
4869
|
},
|
|
4870
4870
|
children: [
|
|
4871
4871
|
!j.isEditing && /* @__PURE__ */ a.jsx(
|
|
4872
4872
|
Xt,
|
|
4873
4873
|
{
|
|
4874
|
-
member:
|
|
4875
|
-
additionalContent: { createdAt:
|
|
4876
|
-
className: typeof
|
|
4877
|
-
gtmContext:
|
|
4874
|
+
member: T,
|
|
4875
|
+
additionalContent: { createdAt: O, didEdit: j.didEdit },
|
|
4876
|
+
className: typeof T != "string" && T.id === s ? "highlighted" : "",
|
|
4877
|
+
gtmContext: g,
|
|
4878
4878
|
gtmType: "profile-click"
|
|
4879
4879
|
}
|
|
4880
4880
|
),
|
|
@@ -4901,21 +4901,21 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4901
4901
|
},
|
|
4902
4902
|
functions: {
|
|
4903
4903
|
create: o,
|
|
4904
|
-
handleSaveEdit:
|
|
4904
|
+
handleSaveEdit: se,
|
|
4905
4905
|
handleCancel: () => {
|
|
4906
|
-
|
|
4906
|
+
M(""), C({ ...j, isEditing: !1 });
|
|
4907
4907
|
}
|
|
4908
4908
|
},
|
|
4909
|
-
gtmContext: `${
|
|
4909
|
+
gtmContext: `${g}Form`
|
|
4910
4910
|
}
|
|
4911
4911
|
) : p.post ? /* @__PURE__ */ a.jsx(
|
|
4912
4912
|
"a",
|
|
4913
4913
|
{
|
|
4914
4914
|
href: p.post,
|
|
4915
4915
|
className: "gtm-trackable",
|
|
4916
|
-
"data-gtm-event-context":
|
|
4916
|
+
"data-gtm-event-context": g,
|
|
4917
4917
|
"data-gtm-event-type": "title-click",
|
|
4918
|
-
children: /* @__PURE__ */ a.jsx(jn, { options: { overrides: { a: Zr } }, children:
|
|
4918
|
+
children: /* @__PURE__ */ a.jsx(jn, { options: { overrides: { a: Zr } }, children: z })
|
|
4919
4919
|
}
|
|
4920
4920
|
) : /* @__PURE__ */ a.jsx(
|
|
4921
4921
|
jn,
|
|
@@ -4926,7 +4926,7 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4926
4926
|
forceInline: t.type === "question",
|
|
4927
4927
|
forceBlock: t.type !== "question"
|
|
4928
4928
|
},
|
|
4929
|
-
children:
|
|
4929
|
+
children: z
|
|
4930
4930
|
}
|
|
4931
4931
|
),
|
|
4932
4932
|
!j.isEditing && /* @__PURE__ */ a.jsxs(
|
|
@@ -4939,9 +4939,9 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4939
4939
|
Ts,
|
|
4940
4940
|
{
|
|
4941
4941
|
element: "li",
|
|
4942
|
-
likes:
|
|
4942
|
+
likes: U,
|
|
4943
4943
|
isShort: !1,
|
|
4944
|
-
userLiked:
|
|
4944
|
+
userLiked: V,
|
|
4945
4945
|
content: { type: t.type, slugs: t.slugs },
|
|
4946
4946
|
canLike: re,
|
|
4947
4947
|
peopleWhoLiked: t.peopleWhoLiked,
|
|
@@ -4955,12 +4955,12 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4955
4955
|
"li",
|
|
4956
4956
|
{
|
|
4957
4957
|
className: "action-button",
|
|
4958
|
-
onClick: (
|
|
4959
|
-
|
|
4958
|
+
onClick: (Z) => {
|
|
4959
|
+
Z.preventDefault(), Z.stopPropagation(), p.comments && (window.location.href = p.comments), typeof d == "function" && d();
|
|
4960
4960
|
},
|
|
4961
4961
|
children: [
|
|
4962
4962
|
/* @__PURE__ */ a.jsx(
|
|
4963
|
-
|
|
4963
|
+
q,
|
|
4964
4964
|
{
|
|
4965
4965
|
variant: "tertiary",
|
|
4966
4966
|
size: "medium",
|
|
@@ -4969,28 +4969,28 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4969
4969
|
href: p.comments ? p.comments : !1,
|
|
4970
4970
|
onClick: p.comments || typeof d != "function" ? !1 : d,
|
|
4971
4971
|
className: "gtm-trackable",
|
|
4972
|
-
"data-gtm-event-context":
|
|
4972
|
+
"data-gtm-event-context": g,
|
|
4973
4973
|
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
4974
4974
|
screenreaderText: v.formatMessage(
|
|
4975
4975
|
{ id: `${ve}comments_screenReader` },
|
|
4976
|
-
{ count:
|
|
4976
|
+
{ count: Q }
|
|
4977
4977
|
)
|
|
4978
4978
|
}
|
|
4979
4979
|
),
|
|
4980
4980
|
/* @__PURE__ */ a.jsx("span", { children: v.formatMessage(
|
|
4981
4981
|
{ id: `${ve}comments` },
|
|
4982
|
-
{ count:
|
|
4982
|
+
{ count: Q }
|
|
4983
4983
|
) })
|
|
4984
4984
|
]
|
|
4985
4985
|
}
|
|
4986
4986
|
),
|
|
4987
4987
|
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
4988
|
-
|
|
4988
|
+
q,
|
|
4989
4989
|
{
|
|
4990
4990
|
variant: "tertiary",
|
|
4991
4991
|
size: "medium",
|
|
4992
4992
|
styling: { muted: !0 },
|
|
4993
|
-
onClick:
|
|
4993
|
+
onClick: ne,
|
|
4994
4994
|
children: v.formatMessage({ id: `${ve}reply` })
|
|
4995
4995
|
}
|
|
4996
4996
|
) }),
|
|
@@ -4999,7 +4999,7 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4999
4999
|
{
|
|
5000
5000
|
element: "li",
|
|
5001
5001
|
id: `more-${t.slug}`,
|
|
5002
|
-
options:
|
|
5002
|
+
options: le
|
|
5003
5003
|
}
|
|
5004
5004
|
)
|
|
5005
5005
|
]
|
|
@@ -5015,7 +5015,7 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
5015
5015
|
id: `delete-${t.slug}-modal`,
|
|
5016
5016
|
isOpen: S,
|
|
5017
5017
|
functions: { onOpen: () => {
|
|
5018
|
-
}, onClose: () =>
|
|
5018
|
+
}, onClose: () => I(!1) },
|
|
5019
5019
|
forceShow: {
|
|
5020
5020
|
error: F === "delete-error" ? v.formatMessage(
|
|
5021
5021
|
{ id: "discussion_delete_error" },
|
|
@@ -5033,13 +5033,13 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
5033
5033
|
buttons: [
|
|
5034
5034
|
{
|
|
5035
5035
|
variant: "secondary",
|
|
5036
|
-
onClick: () =>
|
|
5036
|
+
onClick: () => I(!1),
|
|
5037
5037
|
children: v.formatMessage({ id: "discussion_delete_cancel" })
|
|
5038
5038
|
},
|
|
5039
5039
|
{
|
|
5040
5040
|
variant: "primary",
|
|
5041
5041
|
className: "destructive",
|
|
5042
|
-
onClick:
|
|
5042
|
+
onClick: oe,
|
|
5043
5043
|
children: v.formatMessage({ id: "discussion_delete_delete" })
|
|
5044
5044
|
}
|
|
5045
5045
|
],
|
|
@@ -5049,7 +5049,7 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
5049
5049
|
{
|
|
5050
5050
|
id: "discussion_delete_text",
|
|
5051
5051
|
values: {
|
|
5052
|
-
p: (
|
|
5052
|
+
p: (Z) => /* @__PURE__ */ a.jsx("p", { children: Z }),
|
|
5053
5053
|
action: v.formatMessage({
|
|
5054
5054
|
id: `discussion_action_${t.type}`
|
|
5055
5055
|
})
|
|
@@ -5069,7 +5069,7 @@ const qt = "discussion_responses_", Yi = ({ type: e = "answer", responses: t = 0
|
|
|
5069
5069
|
] });
|
|
5070
5070
|
};
|
|
5071
5071
|
const Es = ({ count: e = "", showRepliesButton: t = !0, children: n }) => {
|
|
5072
|
-
const r = P(), s =
|
|
5072
|
+
const r = P(), s = te(null), i = ge(vt), [o, c] = R(
|
|
5073
5073
|
"closed"
|
|
5074
5074
|
/* Closed */
|
|
5075
5075
|
);
|
|
@@ -5105,7 +5105,7 @@ const Es = ({ count: e = "", showRepliesButton: t = !0, children: n }) => {
|
|
|
5105
5105
|
});
|
|
5106
5106
|
return /* @__PURE__ */ a.jsxs("div", { className: "thread-wrapper", children: [
|
|
5107
5107
|
t && /* @__PURE__ */ a.jsx(
|
|
5108
|
-
|
|
5108
|
+
q,
|
|
5109
5109
|
{
|
|
5110
5110
|
variant: "secondary",
|
|
5111
5111
|
size: "small",
|
|
@@ -5436,7 +5436,7 @@ function Os({
|
|
|
5436
5436
|
}) {
|
|
5437
5437
|
const { mutate: r } = fe({
|
|
5438
5438
|
mutationFn: e,
|
|
5439
|
-
onMutate: ({ activityId: s,
|
|
5439
|
+
onMutate: ({ activityId: s, content: i }) => t((o) => {
|
|
5440
5440
|
const c = ut(s, o);
|
|
5441
5441
|
return c && (c.content = i), o;
|
|
5442
5442
|
}),
|
|
@@ -5462,13 +5462,13 @@ function Bs({
|
|
|
5462
5462
|
},
|
|
5463
5463
|
user: m,
|
|
5464
5464
|
...l
|
|
5465
|
-
}, d = Is({ ...f, mutationFn: e }), p = Os({ ...f, mutationFn: t }), h = Zs({ ...f, mutationFn: n }),
|
|
5465
|
+
}, d = Is({ ...f, mutationFn: e }), p = Os({ ...f, mutationFn: t }), h = Zs({ ...f, mutationFn: n }), g = Hs({ ...f, mutationFn: s }), y = Us({ ...f, mutationFn: i }), { activities: k, ...v } = qs({ queryKey: o, queryFn: r });
|
|
5466
5466
|
return {
|
|
5467
5467
|
activities: k,
|
|
5468
5468
|
mutations: {
|
|
5469
5469
|
create: d,
|
|
5470
5470
|
edit: p,
|
|
5471
|
-
remove:
|
|
5471
|
+
remove: g,
|
|
5472
5472
|
like: h,
|
|
5473
5473
|
unlike: y
|
|
5474
5474
|
},
|
|
@@ -5587,7 +5587,11 @@ const Gi = ({
|
|
|
5587
5587
|
basePath: e,
|
|
5588
5588
|
parentId: t,
|
|
5589
5589
|
isMember: n,
|
|
5590
|
-
functions: {
|
|
5590
|
+
functions: {
|
|
5591
|
+
activities: r,
|
|
5592
|
+
join: s,
|
|
5593
|
+
leave: i
|
|
5594
|
+
}
|
|
5591
5595
|
}) => {
|
|
5592
5596
|
const o = P(), {
|
|
5593
5597
|
activities: c,
|
|
@@ -5598,14 +5602,14 @@ const Gi = ({
|
|
|
5598
5602
|
mutations: {
|
|
5599
5603
|
create: p,
|
|
5600
5604
|
edit: h,
|
|
5601
|
-
remove:
|
|
5605
|
+
remove: g,
|
|
5602
5606
|
like: y,
|
|
5603
5607
|
unlike: k
|
|
5604
5608
|
},
|
|
5605
5609
|
user: v
|
|
5606
5610
|
} = Bs({
|
|
5607
5611
|
queryKey: [e, t, "activities"],
|
|
5608
|
-
queryFns:
|
|
5612
|
+
queryFns: r
|
|
5609
5613
|
});
|
|
5610
5614
|
return m ? /* @__PURE__ */ a.jsx(bt, { variant: "error", text: m.message }) : /* @__PURE__ */ a.jsxs("section", { children: [
|
|
5611
5615
|
/* @__PURE__ */ a.jsx(
|
|
@@ -5616,64 +5620,63 @@ const Gi = ({
|
|
|
5616
5620
|
membershipRequiredToPost: {
|
|
5617
5621
|
isMember: n,
|
|
5618
5622
|
required: !0,
|
|
5619
|
-
join:
|
|
5620
|
-
leave:
|
|
5623
|
+
join: s,
|
|
5624
|
+
leave: i,
|
|
5621
5625
|
notMemberStateText: o.formatMessage({ id: "community_joinToPost" })
|
|
5622
5626
|
}
|
|
5623
5627
|
}
|
|
5624
5628
|
),
|
|
5625
|
-
c == null ? void 0 : c.map((
|
|
5626
|
-
var
|
|
5627
|
-
const { own_reactions: b, latest_reactions: j } =
|
|
5628
|
-
var
|
|
5629
|
+
c == null ? void 0 : c.map((_) => {
|
|
5630
|
+
var O, H, U, V, Q, z, ee, re, se;
|
|
5631
|
+
const { own_reactions: b, latest_reactions: j } = _, C = (((O = j == null ? void 0 : j.like) == null ? void 0 : O.length) || 0) > 0, S = (((H = b == null ? void 0 : b.like) == null ? void 0 : H.length) || 0) > 0, I = _ == null ? void 0 : _.id, F = S ? b == null ? void 0 : b.like[0].id : null, M = C ? (U = j == null ? void 0 : j.like) == null ? void 0 : U.map((ne) => {
|
|
5632
|
+
var oe, le, Z;
|
|
5629
5633
|
return {
|
|
5630
|
-
id: (
|
|
5631
|
-
name: (
|
|
5634
|
+
id: (oe = ne == null ? void 0 : ne.user) == null ? void 0 : oe.id,
|
|
5635
|
+
name: (Z = (le = ne == null ? void 0 : ne.user) == null ? void 0 : le.data) == null ? void 0 : Z.name
|
|
5632
5636
|
};
|
|
5633
|
-
}) : !1,
|
|
5637
|
+
}) : !1, T = _ == null ? void 0 : _.actor, E = (T == null ? void 0 : T.id) === (v == null ? void 0 : v.id);
|
|
5634
5638
|
return /* @__PURE__ */ a.jsxs(qe, { children: [
|
|
5635
5639
|
/* @__PURE__ */ a.jsx(
|
|
5636
5640
|
kt,
|
|
5637
5641
|
{
|
|
5638
5642
|
content: {
|
|
5639
5643
|
type: "post",
|
|
5640
|
-
body:
|
|
5641
|
-
canLike: xt(n,
|
|
5642
|
-
createdAt: (
|
|
5644
|
+
body: _ == null ? void 0 : _.content,
|
|
5645
|
+
canLike: xt(n, E),
|
|
5646
|
+
createdAt: (_ == null ? void 0 : _.time) || "",
|
|
5643
5647
|
slugs: {
|
|
5644
5648
|
question: `${e}/${t}`,
|
|
5645
|
-
answer:
|
|
5649
|
+
answer: I
|
|
5646
5650
|
},
|
|
5647
|
-
slug:
|
|
5651
|
+
slug: I,
|
|
5648
5652
|
author: {
|
|
5649
|
-
id:
|
|
5650
|
-
name: (
|
|
5651
|
-
organization: (
|
|
5652
|
-
jobTitle: (
|
|
5653
|
+
id: T == null ? void 0 : T.id,
|
|
5654
|
+
name: (V = T == null ? void 0 : T.data) == null ? void 0 : V.name,
|
|
5655
|
+
organization: (Q = T == null ? void 0 : T.data) == null ? void 0 : Q.organization,
|
|
5656
|
+
jobTitle: (z = T == null ? void 0 : T.data) == null ? void 0 : z.jobTitle,
|
|
5653
5657
|
image: {
|
|
5654
|
-
thumbnail: ((
|
|
5658
|
+
thumbnail: ((ee = T == null ? void 0 : T.data) == null ? void 0 : ee.thumbnail) || void 0
|
|
5655
5659
|
}
|
|
5656
5660
|
},
|
|
5657
5661
|
userLiked: S,
|
|
5658
|
-
likes: ((
|
|
5659
|
-
comments: ((
|
|
5660
|
-
peopleWhoLiked:
|
|
5662
|
+
likes: ((re = _ == null ? void 0 : _.reaction_counts) == null ? void 0 : re.like) || 0,
|
|
5663
|
+
comments: ((se = _ == null ? void 0 : _.reaction_counts) == null ? void 0 : se.reply) || 0,
|
|
5664
|
+
peopleWhoLiked: M
|
|
5661
5665
|
},
|
|
5662
5666
|
links: {
|
|
5663
|
-
post: `${e}/${t}/${
|
|
5664
|
-
comments: `${e}/${t}/${
|
|
5667
|
+
post: `${e}/${t}/${I}`,
|
|
5668
|
+
comments: `${e}/${t}/${I}`
|
|
5665
5669
|
},
|
|
5666
5670
|
functions: {
|
|
5667
5671
|
content: {
|
|
5668
5672
|
createContent: () => null,
|
|
5673
|
+
deleteContent: () => g({ activityId: I }),
|
|
5669
5674
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5670
|
-
|
|
5671
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5672
|
-
updateContent: (K, ie) => h({ ...K, ...ie })
|
|
5675
|
+
updateContent: (ne, { body: oe }) => h({ activityId: I, content: oe })
|
|
5673
5676
|
},
|
|
5674
5677
|
likes: {
|
|
5675
|
-
createLike: () => y({ activityId:
|
|
5676
|
-
deleteLike: () => k({ activityId:
|
|
5678
|
+
createLike: () => y({ activityId: I }),
|
|
5679
|
+
deleteLike: () => k({ activityId: I, reactionId: F })
|
|
5677
5680
|
},
|
|
5678
5681
|
comments: {
|
|
5679
5682
|
openComments: () => null
|
|
@@ -5683,7 +5686,7 @@ const Gi = ({
|
|
|
5683
5686
|
}
|
|
5684
5687
|
),
|
|
5685
5688
|
/* @__PURE__ */ a.jsx(Te, {})
|
|
5686
|
-
] },
|
|
5689
|
+
] }, I);
|
|
5687
5690
|
}),
|
|
5688
5691
|
!d && /* @__PURE__ */ a.jsx(
|
|
5689
5692
|
yt,
|
|
@@ -6306,13 +6309,13 @@ function ha({
|
|
|
6306
6309
|
},
|
|
6307
6310
|
user: m,
|
|
6308
6311
|
...l
|
|
6309
|
-
}, d = Vs({ ...f, mutationFn: e }), p = Ys({ ...f, mutationFn: t }), h = Gs({ ...f, mutationFn: n }),
|
|
6312
|
+
}, d = Vs({ ...f, mutationFn: e }), p = Ys({ ...f, mutationFn: t }), h = Gs({ ...f, mutationFn: n }), g = Qs({ ...f, mutationFn: s }), y = Js({ ...f, mutationFn: i }), { replies: k, ...v } = Ks({ queryKey: o, queryFn: r });
|
|
6310
6313
|
return {
|
|
6311
6314
|
replies: k,
|
|
6312
6315
|
mutations: {
|
|
6313
6316
|
create: d,
|
|
6314
6317
|
edit: p,
|
|
6315
|
-
remove:
|
|
6318
|
+
remove: g,
|
|
6316
6319
|
like: h,
|
|
6317
6320
|
unlike: y
|
|
6318
6321
|
},
|
|
@@ -6455,7 +6458,7 @@ const ri = ({
|
|
|
6455
6458
|
mutations: {
|
|
6456
6459
|
create: p,
|
|
6457
6460
|
edit: h,
|
|
6458
|
-
like:
|
|
6461
|
+
like: g,
|
|
6459
6462
|
remove: y,
|
|
6460
6463
|
unlike: k
|
|
6461
6464
|
},
|
|
@@ -6467,7 +6470,7 @@ const ri = ({
|
|
|
6467
6470
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6468
6471
|
list: (b) => i.list({ ...b, reactionId: r })
|
|
6469
6472
|
}
|
|
6470
|
-
}),
|
|
6473
|
+
}), _ = ge(vt);
|
|
6471
6474
|
return /* @__PURE__ */ a.jsx(
|
|
6472
6475
|
Es,
|
|
6473
6476
|
{
|
|
@@ -6475,21 +6478,21 @@ const ri = ({
|
|
|
6475
6478
|
showRepliesButton: !1,
|
|
6476
6479
|
children: /* @__PURE__ */ a.jsxs("section", { children: [
|
|
6477
6480
|
c == null ? void 0 : c.map((b) => {
|
|
6478
|
-
var
|
|
6479
|
-
const { own_children: j, latest_children: C } = b, S = b == null ? void 0 : b.id,
|
|
6480
|
-
var
|
|
6481
|
+
var V, Q, z, ee, re, se, ne, oe, le, Z, ue;
|
|
6482
|
+
const { own_children: j, latest_children: C } = b, S = b == null ? void 0 : b.id, I = (((V = C == null ? void 0 : C.like) == null ? void 0 : V.length) || 0) > 0, F = (((Q = j == null ? void 0 : j.like) == null ? void 0 : Q.length) || 0) > 0, M = F ? j == null ? void 0 : j.like[0].id : null, T = I ? (z = C == null ? void 0 : C.like) == null ? void 0 : z.map((K) => {
|
|
6483
|
+
var ie, me, pe;
|
|
6481
6484
|
return {
|
|
6482
|
-
id: (
|
|
6483
|
-
name: (pe = (me =
|
|
6485
|
+
id: (ie = K == null ? void 0 : K.user) == null ? void 0 : ie.id,
|
|
6486
|
+
name: (pe = (me = K == null ? void 0 : K.user) == null ? void 0 : me.data) == null ? void 0 : pe.name
|
|
6484
6487
|
};
|
|
6485
|
-
}) : !1, E = b == null ? void 0 : b.user,
|
|
6488
|
+
}) : !1, E = b == null ? void 0 : b.user, O = (E == null ? void 0 : E.id) === (v == null ? void 0 : v.id), H = xt(s, O), U = typeof b.data.content == "string" ? (ee = b == null ? void 0 : b.data) == null ? void 0 : ee.content : ((se = (re = b == null ? void 0 : b.data) == null ? void 0 : re.content) == null ? void 0 : se.text) || "";
|
|
6486
6489
|
return /* @__PURE__ */ a.jsx(
|
|
6487
6490
|
kt,
|
|
6488
6491
|
{
|
|
6489
6492
|
content: {
|
|
6490
6493
|
type: "reply",
|
|
6491
|
-
body:
|
|
6492
|
-
canLike:
|
|
6494
|
+
body: U,
|
|
6495
|
+
canLike: H,
|
|
6493
6496
|
createdAt: b == null ? void 0 : b.created_at,
|
|
6494
6497
|
slugs: {
|
|
6495
6498
|
question: `${e}/${t}`,
|
|
@@ -6501,27 +6504,27 @@ const ri = ({
|
|
|
6501
6504
|
slug: "",
|
|
6502
6505
|
author: {
|
|
6503
6506
|
id: E == null ? void 0 : E.id,
|
|
6504
|
-
name: (
|
|
6505
|
-
organization: (
|
|
6506
|
-
jobTitle: (
|
|
6507
|
+
name: (ne = E.data) == null ? void 0 : ne.name,
|
|
6508
|
+
organization: (oe = E.data) == null ? void 0 : oe.organization,
|
|
6509
|
+
jobTitle: (le = E.data) == null ? void 0 : le.jobTitle,
|
|
6507
6510
|
image: {
|
|
6508
|
-
thumbnail: ((
|
|
6511
|
+
thumbnail: ((Z = E.data) == null ? void 0 : Z.thumbnail) || void 0
|
|
6509
6512
|
}
|
|
6510
6513
|
},
|
|
6511
6514
|
userLiked: F,
|
|
6512
6515
|
likes: ((ue = b == null ? void 0 : b.children_counts) == null ? void 0 : ue.like) || 0,
|
|
6513
|
-
peopleWhoLiked:
|
|
6516
|
+
peopleWhoLiked: T
|
|
6514
6517
|
},
|
|
6515
6518
|
functions: {
|
|
6516
6519
|
content: {
|
|
6517
6520
|
createContent: () => null,
|
|
6518
6521
|
deleteContent: () => y({ replyId: S }),
|
|
6519
6522
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6520
|
-
updateContent: (
|
|
6523
|
+
updateContent: (K, { body: ie }) => h({ replyId: S, content: ie })
|
|
6521
6524
|
},
|
|
6522
6525
|
likes: {
|
|
6523
|
-
createLike: () =>
|
|
6524
|
-
deleteLike: () => k({ replyId: S, reactionId:
|
|
6526
|
+
createLike: () => g({ replyId: S }),
|
|
6527
|
+
deleteLike: () => k({ replyId: S, reactionId: M })
|
|
6525
6528
|
},
|
|
6526
6529
|
comments: {}
|
|
6527
6530
|
}
|
|
@@ -6542,7 +6545,7 @@ const ri = ({
|
|
|
6542
6545
|
}
|
|
6543
6546
|
}
|
|
6544
6547
|
),
|
|
6545
|
-
|
|
6548
|
+
_.showForm && /* @__PURE__ */ a.jsx(
|
|
6546
6549
|
en,
|
|
6547
6550
|
{
|
|
6548
6551
|
content: {
|
|
@@ -6581,12 +6584,12 @@ const ri = ({
|
|
|
6581
6584
|
isLoading: p,
|
|
6582
6585
|
mutations: {
|
|
6583
6586
|
create: h,
|
|
6584
|
-
edit:
|
|
6587
|
+
edit: g,
|
|
6585
6588
|
like: y,
|
|
6586
6589
|
remove: k,
|
|
6587
6590
|
unlike: v
|
|
6588
6591
|
},
|
|
6589
|
-
user:
|
|
6592
|
+
user: _
|
|
6590
6593
|
} = ha({
|
|
6591
6594
|
queryKey: [e, t, n, "replies"],
|
|
6592
6595
|
queryFns: s
|
|
@@ -6613,21 +6616,21 @@ const ri = ({
|
|
|
6613
6616
|
}
|
|
6614
6617
|
),
|
|
6615
6618
|
m == null ? void 0 : m.map((b) => {
|
|
6616
|
-
var
|
|
6617
|
-
const { own_children: j, latest_children: C } = b, S = b == null ? void 0 : b.id,
|
|
6618
|
-
var
|
|
6619
|
+
var V, Q, z, ee, re, se, ne, oe, le, Z, ue;
|
|
6620
|
+
const { own_children: j, latest_children: C } = b, S = b == null ? void 0 : b.id, I = (((V = C == null ? void 0 : C.like) == null ? void 0 : V.length) || 0) > 0, F = (((Q = j == null ? void 0 : j.like) == null ? void 0 : Q.length) || 0) > 0, M = F ? j == null ? void 0 : j.like[0].id : null, T = I ? (z = C == null ? void 0 : C.like) == null ? void 0 : z.map((K) => {
|
|
6621
|
+
var ie, me, pe;
|
|
6619
6622
|
return {
|
|
6620
|
-
id: (
|
|
6621
|
-
name: (pe = (me =
|
|
6623
|
+
id: (ie = K == null ? void 0 : K.user) == null ? void 0 : ie.id,
|
|
6624
|
+
name: (pe = (me = K == null ? void 0 : K.user) == null ? void 0 : me.data) == null ? void 0 : pe.name
|
|
6622
6625
|
};
|
|
6623
|
-
}) : !1, E = b == null ? void 0 : b.user,
|
|
6626
|
+
}) : !1, E = b == null ? void 0 : b.user, O = (E == null ? void 0 : E.id) === (_ == null ? void 0 : _.id), H = xt(r, O), U = typeof b.data.content == "string" ? (ee = b == null ? void 0 : b.data) == null ? void 0 : ee.content : ((se = (re = b == null ? void 0 : b.data) == null ? void 0 : re.content) == null ? void 0 : se.text) || "";
|
|
6624
6627
|
return /* @__PURE__ */ a.jsx(ks, { children: /* @__PURE__ */ a.jsx(
|
|
6625
6628
|
kt,
|
|
6626
6629
|
{
|
|
6627
6630
|
content: {
|
|
6628
6631
|
type: "reply",
|
|
6629
|
-
body:
|
|
6630
|
-
canLike:
|
|
6632
|
+
body: U,
|
|
6633
|
+
canLike: H,
|
|
6631
6634
|
createdAt: b == null ? void 0 : b.created_at,
|
|
6632
6635
|
slugs: {
|
|
6633
6636
|
question: `${e}/${t}`,
|
|
@@ -6637,27 +6640,27 @@ const ri = ({
|
|
|
6637
6640
|
slug: S,
|
|
6638
6641
|
author: {
|
|
6639
6642
|
id: E == null ? void 0 : E.id,
|
|
6640
|
-
name: (
|
|
6641
|
-
organization: (
|
|
6642
|
-
jobTitle: (
|
|
6643
|
+
name: (ne = E.data) == null ? void 0 : ne.name,
|
|
6644
|
+
organization: (oe = E.data) == null ? void 0 : oe.organization,
|
|
6645
|
+
jobTitle: (le = E.data) == null ? void 0 : le.jobTitle,
|
|
6643
6646
|
image: {
|
|
6644
|
-
thumbnail: ((
|
|
6647
|
+
thumbnail: ((Z = E.data) == null ? void 0 : Z.thumbnail) || void 0
|
|
6645
6648
|
}
|
|
6646
6649
|
},
|
|
6647
6650
|
userLiked: F,
|
|
6648
6651
|
likes: ((ue = b == null ? void 0 : b.children_counts) == null ? void 0 : ue.like) || 0,
|
|
6649
|
-
peopleWhoLiked:
|
|
6652
|
+
peopleWhoLiked: T
|
|
6650
6653
|
},
|
|
6651
6654
|
functions: {
|
|
6652
6655
|
content: {
|
|
6653
6656
|
createContent: () => null,
|
|
6654
6657
|
deleteContent: () => k({ replyId: S }),
|
|
6655
6658
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6656
|
-
updateContent: (
|
|
6659
|
+
updateContent: (K, { body: ie }) => g({ replyId: S, content: ie })
|
|
6657
6660
|
},
|
|
6658
6661
|
likes: {
|
|
6659
6662
|
createLike: () => y({ replyId: S }),
|
|
6660
|
-
deleteLike: () => v({ replyId: S, reactionId:
|
|
6663
|
+
deleteLike: () => v({ replyId: S, reactionId: M })
|
|
6661
6664
|
},
|
|
6662
6665
|
comments: {}
|
|
6663
6666
|
},
|
|
@@ -6797,13 +6800,13 @@ const Qi = ({
|
|
|
6797
6800
|
leave: m
|
|
6798
6801
|
}
|
|
6799
6802
|
}) => {
|
|
6800
|
-
var F,
|
|
6803
|
+
var F, M, T, E, O, H, U, V, Q;
|
|
6801
6804
|
const l = P(), f = ge(ke), {
|
|
6802
6805
|
activity: d,
|
|
6803
6806
|
error: p,
|
|
6804
6807
|
isLoading: h,
|
|
6805
6808
|
mutations: {
|
|
6806
|
-
edit:
|
|
6809
|
+
edit: g,
|
|
6807
6810
|
like: y,
|
|
6808
6811
|
unlike: k
|
|
6809
6812
|
}
|
|
@@ -6822,13 +6825,13 @@ const Qi = ({
|
|
|
6822
6825
|
}
|
|
6823
6826
|
);
|
|
6824
6827
|
console.log(d);
|
|
6825
|
-
const { own_reactions: v, latest_reactions:
|
|
6826
|
-
var
|
|
6828
|
+
const { own_reactions: v, latest_reactions: _ } = d, b = (((F = _ == null ? void 0 : _.like) == null ? void 0 : F.length) || 0) > 0, j = (((M = v == null ? void 0 : v.like) == null ? void 0 : M.length) || 0) > 0, C = b ? (T = _ == null ? void 0 : _.like) == null ? void 0 : T.map((z) => {
|
|
6829
|
+
var ee, re, se;
|
|
6827
6830
|
return {
|
|
6828
|
-
id: (
|
|
6829
|
-
name: (
|
|
6831
|
+
id: (ee = z == null ? void 0 : z.user) == null ? void 0 : ee.id,
|
|
6832
|
+
name: (se = (re = z == null ? void 0 : z.user) == null ? void 0 : re.data) == null ? void 0 : se.name
|
|
6830
6833
|
};
|
|
6831
|
-
}) : !1, S = d == null ? void 0 : d.actor,
|
|
6834
|
+
}) : !1, S = d == null ? void 0 : d.actor, I = (S == null ? void 0 : S.id) === (f == null ? void 0 : f.id);
|
|
6832
6835
|
return /* @__PURE__ */ a.jsx(
|
|
6833
6836
|
kt,
|
|
6834
6837
|
{
|
|
@@ -6836,7 +6839,7 @@ const Qi = ({
|
|
|
6836
6839
|
content: {
|
|
6837
6840
|
type: "post",
|
|
6838
6841
|
body: d == null ? void 0 : d.content,
|
|
6839
|
-
canLike: xt(r,
|
|
6842
|
+
canLike: xt(r, I),
|
|
6840
6843
|
createdAt: (d == null ? void 0 : d.time) || "",
|
|
6841
6844
|
slugs: {
|
|
6842
6845
|
question: `${e}/${t}`,
|
|
@@ -6846,15 +6849,15 @@ const Qi = ({
|
|
|
6846
6849
|
author: {
|
|
6847
6850
|
id: S.id,
|
|
6848
6851
|
name: (E = S.data) == null ? void 0 : E.name,
|
|
6849
|
-
organization: (
|
|
6850
|
-
jobTitle: (
|
|
6852
|
+
organization: (O = S.data) == null ? void 0 : O.organization,
|
|
6853
|
+
jobTitle: (H = S.data) == null ? void 0 : H.jobTitle,
|
|
6851
6854
|
image: {
|
|
6852
|
-
thumbnail: ((
|
|
6855
|
+
thumbnail: ((U = S.data) == null ? void 0 : U.thumbnail) || void 0
|
|
6853
6856
|
}
|
|
6854
6857
|
},
|
|
6855
6858
|
userLiked: j,
|
|
6856
|
-
likes: ((
|
|
6857
|
-
comments: ((
|
|
6859
|
+
likes: ((V = d == null ? void 0 : d.reaction_counts) == null ? void 0 : V.like) || 0,
|
|
6860
|
+
comments: ((Q = d == null ? void 0 : d.reaction_counts) == null ? void 0 : Q.reply) || 0,
|
|
6858
6861
|
peopleWhoLiked: C
|
|
6859
6862
|
},
|
|
6860
6863
|
originalAuthorId: S == null ? void 0 : S.id,
|
|
@@ -6864,7 +6867,7 @@ const Qi = ({
|
|
|
6864
6867
|
createContent: () => console.log("create"),
|
|
6865
6868
|
deleteContent: s,
|
|
6866
6869
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6867
|
-
updateContent: (
|
|
6870
|
+
updateContent: (z, ee) => g({ ...z, ...ee })
|
|
6868
6871
|
},
|
|
6869
6872
|
likes: {
|
|
6870
6873
|
createLike: () => y({ activityId: n }),
|
|
@@ -6962,7 +6965,7 @@ const tt = "notFoundError_", Xi = () => {
|
|
|
6962
6965
|
})
|
|
6963
6966
|
}
|
|
6964
6967
|
),
|
|
6965
|
-
/* @__PURE__ */ a.jsx(
|
|
6968
|
+
/* @__PURE__ */ a.jsx(q, { href: "/solution-articles/", children: e.formatMessage({ id: `${tt}cta` }) })
|
|
6966
6969
|
] })
|
|
6967
6970
|
},
|
|
6968
6971
|
reportError: () => {
|
|
@@ -6982,7 +6985,7 @@ export {
|
|
|
6982
6985
|
da as AddPost,
|
|
6983
6986
|
Ci as BannerSection,
|
|
6984
6987
|
Di as Breadcrumbs,
|
|
6985
|
-
|
|
6988
|
+
q as Button,
|
|
6986
6989
|
ht as ButtonWrapper,
|
|
6987
6990
|
Er as CacheProvider,
|
|
6988
6991
|
ea as Card,
|