@apolitical/component-library 2.1.7 → 3.0.0-4126.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cards/cards.types.d.ts +1 -1
- package/discussion/components/likes/likes.d.ts +1 -1
- package/index.js +12 -12
- package/index.mjs +741 -745
- package/package.json +1 -1
- package/style.css +1 -1
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Sr from "react";
|
|
2
|
-
import K, { memo as Ae, useState as ne, useEffect as se, useRef as pe, useMemo as bt, createContext as Qn, useContext as
|
|
2
|
+
import K, { memo as Ae, useState as ne, useEffect as se, useRef as pe, useMemo as bt, createContext as Qn, useContext as $e, Children as Ln, useCallback as fa, useReducer as Jn, forwardRef as $i, createElement as Cr, Component as Pi, Fragment as gt, Suspense as Ri } from "react";
|
|
3
3
|
import ft from "lodash.clonedeep";
|
|
4
4
|
import Mi from "lodash.set";
|
|
5
5
|
import { useIntl as Q, IntlProvider as Oi, FormattedMessage as je, createIntl as Fi } from "react-intl";
|
|
@@ -75,14 +75,14 @@ var va = { exports: {} };
|
|
|
75
75
|
})();
|
|
76
76
|
})(va);
|
|
77
77
|
var Wi = va.exports;
|
|
78
|
-
const
|
|
78
|
+
const C = /* @__PURE__ */ en(Wi), Hi = ({
|
|
79
79
|
element: t = "span",
|
|
80
80
|
showOnFocus: e = !0,
|
|
81
81
|
children: n,
|
|
82
82
|
...r
|
|
83
83
|
}) => K.createElement(t, {
|
|
84
84
|
...r,
|
|
85
|
-
className:
|
|
85
|
+
className: C("hidden", { "show-on-focus": e }),
|
|
86
86
|
children: n
|
|
87
87
|
}), be = Ae(Hi), Vi = ({
|
|
88
88
|
element: t = "span",
|
|
@@ -99,11 +99,11 @@ var In = { exports: {} }, at = {};
|
|
|
99
99
|
* This source code is licensed under the MIT license found in the
|
|
100
100
|
* LICENSE file in the root directory of this source tree.
|
|
101
101
|
*/
|
|
102
|
-
var
|
|
102
|
+
var Nr;
|
|
103
103
|
function Yi() {
|
|
104
|
-
if (
|
|
104
|
+
if (Nr)
|
|
105
105
|
return at;
|
|
106
|
-
|
|
106
|
+
Nr = 1;
|
|
107
107
|
var t = K, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, a = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
108
108
|
function o(c, u, l) {
|
|
109
109
|
var f, d = {}, m = null, p = null;
|
|
@@ -127,9 +127,9 @@ var it = {};
|
|
|
127
127
|
* This source code is licensed under the MIT license found in the
|
|
128
128
|
* LICENSE file in the root directory of this source tree.
|
|
129
129
|
*/
|
|
130
|
-
var
|
|
130
|
+
var $r;
|
|
131
131
|
function Ki() {
|
|
132
|
-
return
|
|
132
|
+
return $r || ($r = 1, process.env.NODE_ENV !== "production" && function() {
|
|
133
133
|
var t = K, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator, v = "@@iterator";
|
|
134
134
|
function b(h) {
|
|
135
135
|
if (h === null || typeof h != "object")
|
|
@@ -155,16 +155,16 @@ function Ki() {
|
|
|
155
155
|
me.unshift("Warning: " + P), Function.prototype.apply.call(console[h], console, me);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
var k = !1, w = !1, U = !1,
|
|
159
|
-
|
|
160
|
-
function
|
|
161
|
-
return !!(typeof h == "string" || typeof h == "function" || h === r || h === s ||
|
|
158
|
+
var k = !1, w = !1, U = !1, R = !1, N = !1, B;
|
|
159
|
+
B = Symbol.for("react.module.reference");
|
|
160
|
+
function L(h) {
|
|
161
|
+
return !!(typeof h == "string" || typeof h == "function" || h === r || h === s || N || h === a || h === l || h === f || R || h === p || k || w || U || typeof h == "object" && h !== null && (h.$$typeof === m || h.$$typeof === d || h.$$typeof === o || h.$$typeof === c || h.$$typeof === u || // This needs to include all possible module reference object
|
|
162
162
|
// types supported by any Flight configuration anywhere since
|
|
163
163
|
// we don't know which Flight build this will end up being used
|
|
164
164
|
// with.
|
|
165
|
-
h.$$typeof ===
|
|
165
|
+
h.$$typeof === B || h.getModuleId !== void 0));
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function M(h, P, q) {
|
|
168
168
|
var te = h.displayName;
|
|
169
169
|
if (te)
|
|
170
170
|
return te;
|
|
@@ -204,7 +204,7 @@ function Ki() {
|
|
|
204
204
|
var q = h;
|
|
205
205
|
return T(q._context) + ".Provider";
|
|
206
206
|
case u:
|
|
207
|
-
return
|
|
207
|
+
return M(h, h.render, "ForwardRef");
|
|
208
208
|
case d:
|
|
209
209
|
var te = h.displayName || null;
|
|
210
210
|
return te !== null ? te : x(h.type) || "Memo";
|
|
@@ -219,14 +219,14 @@ function Ki() {
|
|
|
219
219
|
}
|
|
220
220
|
return null;
|
|
221
221
|
}
|
|
222
|
-
var
|
|
222
|
+
var S = Object.assign, I = 0, O, D, V, ee, j, $, Z;
|
|
223
223
|
function z() {
|
|
224
224
|
}
|
|
225
225
|
z.__reactDisabledLog = !0;
|
|
226
226
|
function W() {
|
|
227
227
|
{
|
|
228
|
-
if (
|
|
229
|
-
|
|
228
|
+
if (I === 0) {
|
|
229
|
+
O = console.log, D = console.info, V = console.warn, ee = console.error, j = console.group, $ = console.groupCollapsed, Z = console.groupEnd;
|
|
230
230
|
var h = {
|
|
231
231
|
configurable: !0,
|
|
232
232
|
enumerable: !0,
|
|
@@ -243,42 +243,42 @@ function Ki() {
|
|
|
243
243
|
groupEnd: h
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
|
|
246
|
+
I++;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
function X() {
|
|
250
250
|
{
|
|
251
|
-
if (
|
|
251
|
+
if (I--, I === 0) {
|
|
252
252
|
var h = {
|
|
253
253
|
configurable: !0,
|
|
254
254
|
enumerable: !0,
|
|
255
255
|
writable: !0
|
|
256
256
|
};
|
|
257
257
|
Object.defineProperties(console, {
|
|
258
|
-
log:
|
|
259
|
-
value:
|
|
258
|
+
log: S({}, h, {
|
|
259
|
+
value: O
|
|
260
260
|
}),
|
|
261
|
-
info:
|
|
262
|
-
value:
|
|
261
|
+
info: S({}, h, {
|
|
262
|
+
value: D
|
|
263
263
|
}),
|
|
264
|
-
warn:
|
|
264
|
+
warn: S({}, h, {
|
|
265
265
|
value: V
|
|
266
266
|
}),
|
|
267
|
-
error:
|
|
267
|
+
error: S({}, h, {
|
|
268
268
|
value: ee
|
|
269
269
|
}),
|
|
270
|
-
group:
|
|
270
|
+
group: S({}, h, {
|
|
271
271
|
value: j
|
|
272
272
|
}),
|
|
273
|
-
groupCollapsed:
|
|
274
|
-
value:
|
|
273
|
+
groupCollapsed: S({}, h, {
|
|
274
|
+
value: $
|
|
275
275
|
}),
|
|
276
|
-
groupEnd:
|
|
276
|
+
groupEnd: S({}, h, {
|
|
277
277
|
value: Z
|
|
278
278
|
})
|
|
279
279
|
});
|
|
280
280
|
}
|
|
281
|
-
|
|
281
|
+
I < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
var Y = y.ReactCurrentDispatcher, H;
|
|
@@ -295,16 +295,16 @@ function Ki() {
|
|
|
295
295
|
` + H + h;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
var re = !1,
|
|
298
|
+
var re = !1, F;
|
|
299
299
|
{
|
|
300
300
|
var oe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
301
|
-
|
|
301
|
+
F = new oe();
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function A(h, P) {
|
|
304
304
|
if (!h || re)
|
|
305
305
|
return "";
|
|
306
306
|
{
|
|
307
|
-
var q =
|
|
307
|
+
var q = F.get(h);
|
|
308
308
|
if (q !== void 0)
|
|
309
309
|
return q;
|
|
310
310
|
}
|
|
@@ -359,7 +359,7 @@ function Ki() {
|
|
|
359
359
|
if (he--, ge--, ge < 0 || ie[he] !== _e[ge]) {
|
|
360
360
|
var Te = `
|
|
361
361
|
` + ie[he].replace(" at new ", " at ");
|
|
362
|
-
return h.displayName && Te.includes("<anonymous>") && (Te = Te.replace("<anonymous>", h.displayName)), typeof h == "function" &&
|
|
362
|
+
return h.displayName && Te.includes("<anonymous>") && (Te = Te.replace("<anonymous>", h.displayName)), typeof h == "function" && F.set(h, Te), Te;
|
|
363
363
|
}
|
|
364
364
|
while (he >= 1 && ge >= 0);
|
|
365
365
|
break;
|
|
@@ -369,10 +369,10 @@ function Ki() {
|
|
|
369
369
|
re = !1, Y.current = me, X(), Error.prepareStackTrace = le;
|
|
370
370
|
}
|
|
371
371
|
var He = h ? h.displayName || h.name : "", Er = He ? J(He) : "";
|
|
372
|
-
return typeof h == "function" &&
|
|
372
|
+
return typeof h == "function" && F.set(h, Er), Er;
|
|
373
373
|
}
|
|
374
374
|
function ve(h, P, q) {
|
|
375
|
-
return
|
|
375
|
+
return A(h, !1);
|
|
376
376
|
}
|
|
377
377
|
function Pe(h) {
|
|
378
378
|
var P = h.prototype;
|
|
@@ -382,7 +382,7 @@ function Ki() {
|
|
|
382
382
|
if (h == null)
|
|
383
383
|
return "";
|
|
384
384
|
if (typeof h == "function")
|
|
385
|
-
return
|
|
385
|
+
return A(h, Pe(h));
|
|
386
386
|
if (typeof h == "string")
|
|
387
387
|
return J(h);
|
|
388
388
|
switch (h) {
|
|
@@ -676,7 +676,7 @@ Check the top-level render call using <` + q + ">.");
|
|
|
676
676
|
}
|
|
677
677
|
function Tr(h, P, q, te, le, me) {
|
|
678
678
|
{
|
|
679
|
-
var ce =
|
|
679
|
+
var ce = L(h);
|
|
680
680
|
if (!ce) {
|
|
681
681
|
var ie = "";
|
|
682
682
|
(h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (ie += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
@@ -710,8 +710,8 @@ Check the top-level render call using <` + q + ">.");
|
|
|
710
710
|
function Si(h, P, q) {
|
|
711
711
|
return Tr(h, P, q, !1);
|
|
712
712
|
}
|
|
713
|
-
var Ci = Si,
|
|
714
|
-
it.Fragment = r, it.jsx = Ci, it.jsxs =
|
|
713
|
+
var Ci = Si, Ni = Ei;
|
|
714
|
+
it.Fragment = r, it.jsx = Ci, it.jsxs = Ni;
|
|
715
715
|
}()), it;
|
|
716
716
|
}
|
|
717
717
|
process.env.NODE_ENV === "production" ? In.exports = Yi() : In.exports = Ki();
|
|
@@ -744,45 +744,45 @@ function Qi(t, e, n) {
|
|
|
744
744
|
};
|
|
745
745
|
}, []);
|
|
746
746
|
var E = bt(function() {
|
|
747
|
-
var k = function(
|
|
748
|
-
var
|
|
749
|
-
return c.current = u.current = null, s.current =
|
|
750
|
-
}, w = function(
|
|
751
|
-
p && cancelAnimationFrame(o.current), o.current = p ? requestAnimationFrame(
|
|
752
|
-
}, U = function(
|
|
747
|
+
var k = function(L) {
|
|
748
|
+
var M = c.current, T = u.current;
|
|
749
|
+
return c.current = u.current = null, s.current = L, l.current = f.current.apply(T, M);
|
|
750
|
+
}, w = function(L, M) {
|
|
751
|
+
p && cancelAnimationFrame(o.current), o.current = p ? requestAnimationFrame(L) : setTimeout(L, M);
|
|
752
|
+
}, U = function(L) {
|
|
753
753
|
if (!d.current)
|
|
754
754
|
return !1;
|
|
755
|
-
var
|
|
756
|
-
return !a.current ||
|
|
757
|
-
},
|
|
758
|
-
return o.current = null, v && c.current ? k(
|
|
759
|
-
},
|
|
760
|
-
var
|
|
761
|
-
if (U(
|
|
762
|
-
return M
|
|
755
|
+
var M = L - a.current;
|
|
756
|
+
return !a.current || M >= e || M < 0 || b && L - s.current >= _;
|
|
757
|
+
}, R = function(L) {
|
|
758
|
+
return o.current = null, v && c.current ? k(L) : (c.current = u.current = null, l.current);
|
|
759
|
+
}, N = function L() {
|
|
760
|
+
var M = Date.now();
|
|
761
|
+
if (U(M))
|
|
762
|
+
return R(M);
|
|
763
763
|
if (d.current) {
|
|
764
|
-
var T = e - (
|
|
765
|
-
w(
|
|
764
|
+
var T = e - (M - a.current), x = b ? Math.min(T, _ - (M - s.current)) : T;
|
|
765
|
+
w(L, x);
|
|
766
766
|
}
|
|
767
|
-
},
|
|
767
|
+
}, B = function() {
|
|
768
768
|
if (m || y) {
|
|
769
|
-
var
|
|
770
|
-
if (c.current = [].slice.call(arguments), u.current = r, a.current =
|
|
769
|
+
var L = Date.now(), M = U(L);
|
|
770
|
+
if (c.current = [].slice.call(arguments), u.current = r, a.current = L, M) {
|
|
771
771
|
if (!o.current && d.current)
|
|
772
|
-
return s.current = a.current, w(
|
|
772
|
+
return s.current = a.current, w(N, e), g ? k(a.current) : l.current;
|
|
773
773
|
if (b)
|
|
774
|
-
return w(
|
|
774
|
+
return w(N, e), k(a.current);
|
|
775
775
|
}
|
|
776
|
-
return o.current || w(
|
|
776
|
+
return o.current || w(N, e), l.current;
|
|
777
777
|
}
|
|
778
778
|
};
|
|
779
|
-
return
|
|
779
|
+
return B.cancel = function() {
|
|
780
780
|
o.current && (p ? cancelAnimationFrame(o.current) : clearTimeout(o.current)), s.current = 0, c.current = a.current = u.current = o.current = null;
|
|
781
|
-
},
|
|
781
|
+
}, B.isPending = function() {
|
|
782
782
|
return !!o.current;
|
|
783
|
-
},
|
|
784
|
-
return o.current ?
|
|
785
|
-
},
|
|
783
|
+
}, B.flush = function() {
|
|
784
|
+
return o.current ? R(Date.now()) : l.current;
|
|
785
|
+
}, B;
|
|
786
786
|
}, [g, b, e, _, v, p, m, y]);
|
|
787
787
|
return E;
|
|
788
788
|
}
|
|
@@ -1320,7 +1320,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1320
1320
|
es: is,
|
|
1321
1321
|
fr: ss,
|
|
1322
1322
|
pt: os
|
|
1323
|
-
}, Symbol.toStringTag, { value: "Module" })), ja = (t) => t in tr,
|
|
1323
|
+
}, Symbol.toStringTag, { value: "Module" })), ja = (t) => t in tr, Ne = (t, e, n, r, a = {}) => {
|
|
1324
1324
|
let s = "";
|
|
1325
1325
|
return ja(`${e}_${n}`) ? s = t({ id: `${e}_${n}` }, a) : s = t({ id: e }, { [r]: n, ...a }), s;
|
|
1326
1326
|
}, ls = (t, e, n) => {
|
|
@@ -1377,7 +1377,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1377
1377
|
typeof e == "string" && g.push(e), 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");
|
|
1378
1378
|
const v = {
|
|
1379
1379
|
...d,
|
|
1380
|
-
className:
|
|
1380
|
+
className: C(t, c, g, {
|
|
1381
1381
|
"no-text": !f,
|
|
1382
1382
|
disabled: u,
|
|
1383
1383
|
button: a
|
|
@@ -1395,14 +1395,14 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1395
1395
|
}, tn = ({ buttons: t, className: e = "", ...n }) => {
|
|
1396
1396
|
const r = t.length > 1 ? "ul" : "p", a = t.map((s, o) => r === "p" ? /* @__PURE__ */ i.jsx(ae, { ...s }, o) : /* @__PURE__ */ i.jsx("li", { children: /* @__PURE__ */ i.jsx(ae, { ...s }) }, o));
|
|
1397
1397
|
return K.createElement(r, {
|
|
1398
|
-
className:
|
|
1398
|
+
className: C("button-wrapper", e),
|
|
1399
1399
|
...n,
|
|
1400
1400
|
children: a
|
|
1401
1401
|
});
|
|
1402
1402
|
};
|
|
1403
1403
|
const Fe = ({ className: t = "", maxWidth: e = !1 }) => {
|
|
1404
1404
|
const n = e ? { "--max-width": `${e / 16}rem` } : {};
|
|
1405
|
-
return /* @__PURE__ */ i.jsx("hr", { className:
|
|
1405
|
+
return /* @__PURE__ */ i.jsx("hr", { className: C(t, { "has-max-width": e }), style: n });
|
|
1406
1406
|
}, Pr = {
|
|
1407
1407
|
card: {
|
|
1408
1408
|
range: [
|
|
@@ -1581,7 +1581,7 @@ const Gl = ({ image: t, className: e, testId: n }) => /* @__PURE__ */ i.jsx(
|
|
|
1581
1581
|
}) => {
|
|
1582
1582
|
if (t) {
|
|
1583
1583
|
const u = { ...c };
|
|
1584
|
-
return a && (u.onClick = a), s && (u["data-gtm-event-context"] = s), o && (u["data-gtm-event-type"] = o), /* @__PURE__ */ i.jsx("a", { href: t, className:
|
|
1584
|
+
return a && (u.onClick = a), s && (u["data-gtm-event-context"] = s), o && (u["data-gtm-event-type"] = o), /* @__PURE__ */ i.jsx("a", { href: t, className: C("gtm-trackable", r), ...u, children: e });
|
|
1585
1585
|
}
|
|
1586
1586
|
return n ? K.createElement(n, { children: e, className: r, ...c }) : e;
|
|
1587
1587
|
};
|
|
@@ -1630,7 +1630,7 @@ const ps = ({ isOpen: t = !1, isLoading: e = !1, children: n }) => {
|
|
|
1630
1630
|
"aside",
|
|
1631
1631
|
{
|
|
1632
1632
|
ref: a,
|
|
1633
|
-
className:
|
|
1633
|
+
className: C("tooltip text-medium", s, { loading: e }),
|
|
1634
1634
|
hidden: s === "hidden",
|
|
1635
1635
|
children: e ? /* @__PURE__ */ i.jsx("p", { children: r.formatMessage({ id: "tooltip_loading" }) }) : typeof n == "string" ? /* @__PURE__ */ i.jsx("p", { children: n }) : n
|
|
1636
1636
|
}
|
|
@@ -1649,7 +1649,7 @@ const Jl = ({ className: t = "", image: e, ...n }) => e ? (typeof e == "string"
|
|
|
1649
1649
|
_t,
|
|
1650
1650
|
{
|
|
1651
1651
|
...n,
|
|
1652
|
-
className:
|
|
1652
|
+
className: C("banner", t),
|
|
1653
1653
|
image: { ...e, aspect: "banner" }
|
|
1654
1654
|
}
|
|
1655
1655
|
)) : null;
|
|
@@ -1663,7 +1663,7 @@ const et = ({
|
|
|
1663
1663
|
return /* @__PURE__ */ i.jsx(
|
|
1664
1664
|
"section",
|
|
1665
1665
|
{
|
|
1666
|
-
className:
|
|
1666
|
+
className: C("full-width-section", e, {
|
|
1667
1667
|
[a]: a !== "default"
|
|
1668
1668
|
}),
|
|
1669
1669
|
...r,
|
|
@@ -1684,7 +1684,7 @@ const Xl = ({ text: t, buttons: e, className: n = "" }) => {
|
|
|
1684
1684
|
target: "_blank",
|
|
1685
1685
|
children: a.text
|
|
1686
1686
|
});
|
|
1687
|
-
}), /* @__PURE__ */ i.jsx(et, { className:
|
|
1687
|
+
}), /* @__PURE__ */ i.jsx(et, { className: C("download-section", n), children: /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
1688
1688
|
K.createElement(
|
|
1689
1689
|
typeof t == "string" ? "h2" : t.element,
|
|
1690
1690
|
{ className: "text" },
|
|
@@ -1698,7 +1698,7 @@ function ka({ href: t, setShowModal: e }) {
|
|
|
1698
1698
|
}
|
|
1699
1699
|
const hs = ({ icon: t, description: e, ctaMessage: n, href: r, showEditButton: a, setShowModal: s }) => {
|
|
1700
1700
|
const { formatMessage: o } = Q();
|
|
1701
|
-
return /* @__PURE__ */ i.jsxs("div", { className:
|
|
1701
|
+
return /* @__PURE__ */ i.jsxs("div", { className: C("edit-section-placeholder", { "has-icon": !!t }), style: ts(t), children: [
|
|
1702
1702
|
/* @__PURE__ */ i.jsx("p", { children: e || o({ id: "edit_section_placeholder_description" }) }),
|
|
1703
1703
|
a && /* @__PURE__ */ i.jsx(ae, { href: r, variant: "secondary", size: "small", onClick: () => ka({ href: r, setShowModal: s }), children: n || o({ id: "edit_section_placeholder_cta" }) })
|
|
1704
1704
|
] });
|
|
@@ -1713,7 +1713,7 @@ const hs = ({ icon: t, description: e, ctaMessage: n, href: r, showEditButton: a
|
|
|
1713
1713
|
showDivider: c = !0
|
|
1714
1714
|
}) => {
|
|
1715
1715
|
const [u, l] = K.useState(!1), f = typeof r == "string" || !!n, d = () => l(!1);
|
|
1716
|
-
return /* @__PURE__ */ i.jsxs("section", { className:
|
|
1716
|
+
return /* @__PURE__ */ i.jsxs("section", { className: C("edit-section", e), children: [
|
|
1717
1717
|
n && /* @__PURE__ */ i.jsx(
|
|
1718
1718
|
nn,
|
|
1719
1719
|
{
|
|
@@ -1722,7 +1722,7 @@ const hs = ({ icon: t, description: e, ctaMessage: n, href: r, showEditButton: a
|
|
|
1722
1722
|
showDivider: !1,
|
|
1723
1723
|
showIcon: !1,
|
|
1724
1724
|
functions: { onClose: d },
|
|
1725
|
-
className:
|
|
1725
|
+
className: C("edit-section-modal"),
|
|
1726
1726
|
children: /* @__PURE__ */ i.jsx(or, { ...n, fields: n.fields, meta: {
|
|
1727
1727
|
...n == null ? void 0 : n.meta,
|
|
1728
1728
|
shouldShowCancelButton: !0
|
|
@@ -1752,12 +1752,12 @@ const td = ({
|
|
|
1752
1752
|
element: typeof t == "object" ? t.element : "h2",
|
|
1753
1753
|
text: typeof t == "string" ? t : typeof t == "object" ? t.text : ""
|
|
1754
1754
|
};
|
|
1755
|
-
return /* @__PURE__ */ i.jsxs("div", { className:
|
|
1755
|
+
return /* @__PURE__ */ i.jsxs("div", { className: C("logos", n), children: [
|
|
1756
1756
|
t && K.createElement(a.element, { className: "title" }, a.text),
|
|
1757
1757
|
/* @__PURE__ */ i.jsx(
|
|
1758
1758
|
"ul",
|
|
1759
1759
|
{
|
|
1760
|
-
className:
|
|
1760
|
+
className: C({
|
|
1761
1761
|
"two-col": r === 2 || r === 4,
|
|
1762
1762
|
"three-col": r === 5 || r <= 10 && r % 3 === 0
|
|
1763
1763
|
}),
|
|
@@ -1840,7 +1840,7 @@ const gs = [
|
|
|
1840
1840
|
}), /* @__PURE__ */ i.jsx(
|
|
1841
1841
|
et,
|
|
1842
1842
|
{
|
|
1843
|
-
className:
|
|
1843
|
+
className: C("banner-section", r, a, t, {
|
|
1844
1844
|
"has-image": n,
|
|
1845
1845
|
"has-extra-spacing": a === "normal" && f.eyebrow && f.title
|
|
1846
1846
|
}),
|
|
@@ -1877,11 +1877,11 @@ const bs = ({
|
|
|
1877
1877
|
image: r
|
|
1878
1878
|
}) => {
|
|
1879
1879
|
const a = () => typeof n == "string" ? /* @__PURE__ */ i.jsx(Xe, { children: n }) : n;
|
|
1880
|
-
return /* @__PURE__ */ i.jsxs(et, { className:
|
|
1880
|
+
return /* @__PURE__ */ i.jsxs(et, { className: C("highlight-section", e), children: [
|
|
1881
1881
|
r && /* @__PURE__ */ i.jsx(
|
|
1882
1882
|
"div",
|
|
1883
1883
|
{
|
|
1884
|
-
className:
|
|
1884
|
+
className: C("highlight-container highlight-image", {
|
|
1885
1885
|
[`highlight-image-${t}`]: t === "right"
|
|
1886
1886
|
}),
|
|
1887
1887
|
children: /* @__PURE__ */ i.jsx(_t, { image: r })
|
|
@@ -1890,13 +1890,13 @@ const bs = ({
|
|
|
1890
1890
|
/* @__PURE__ */ i.jsx(
|
|
1891
1891
|
"div",
|
|
1892
1892
|
{
|
|
1893
|
-
className:
|
|
1893
|
+
className: C("highlight-container highlight-content-wrapper", {
|
|
1894
1894
|
"no-image": !r
|
|
1895
1895
|
}),
|
|
1896
1896
|
children: /* @__PURE__ */ i.jsx(
|
|
1897
1897
|
"div",
|
|
1898
1898
|
{
|
|
1899
|
-
className:
|
|
1899
|
+
className: C("highlight-content", {
|
|
1900
1900
|
"highlight-content-right": t === "left"
|
|
1901
1901
|
}),
|
|
1902
1902
|
children: a()
|
|
@@ -1912,7 +1912,7 @@ const ad = ({
|
|
|
1912
1912
|
title: n,
|
|
1913
1913
|
text: r,
|
|
1914
1914
|
gtmContext: a
|
|
1915
|
-
}) => !n && !r ? null : /* @__PURE__ */ i.jsxs("aside", { className:
|
|
1915
|
+
}) => !n && !r ? null : /* @__PURE__ */ i.jsxs("aside", { className: C("marketing-block", t), children: [
|
|
1916
1916
|
n && /* @__PURE__ */ i.jsx("p", { className: "title", children: n }),
|
|
1917
1917
|
r && /* @__PURE__ */ i.jsx("p", { children: r }),
|
|
1918
1918
|
e && /* @__PURE__ */ i.jsx(
|
|
@@ -1978,7 +1978,7 @@ const ws = ({ children: t, user: e }) => e.isLoading ? null : process.env.REACT_
|
|
|
1978
1978
|
return /* @__PURE__ */ i.jsx(Oi, { locale: r, messages: a, children: t });
|
|
1979
1979
|
}, De = Qn({ isLoading: !0 });
|
|
1980
1980
|
function nr() {
|
|
1981
|
-
return
|
|
1981
|
+
return $e(De);
|
|
1982
1982
|
}
|
|
1983
1983
|
const ks = ({ children: t, user: e }) => /* @__PURE__ */ i.jsx(De.Provider, { value: e, children: t }), id = ({ bootstrap: t, children: e, intl: n, showDevTools: r }) => {
|
|
1984
1984
|
const [a, s] = ne({ isLoading: !0 });
|
|
@@ -1990,7 +1990,7 @@ const ks = ({ children: t, user: e }) => /* @__PURE__ */ i.jsx(De.Provider, { va
|
|
|
1990
1990
|
};
|
|
1991
1991
|
const Ta = ({ label: t = !1, className: e = "", children: n }) => {
|
|
1992
1992
|
const r = Q();
|
|
1993
|
-
return /* @__PURE__ */ i.jsxs("details", { className:
|
|
1993
|
+
return /* @__PURE__ */ i.jsxs("details", { className: C("collapsible-section", e), children: [
|
|
1994
1994
|
/* @__PURE__ */ i.jsx("summary", { children: t || r.formatMessage({ id: "collapsibleSection_summary" }) }),
|
|
1995
1995
|
/* @__PURE__ */ i.jsx("div", { className: "content", children: n })
|
|
1996
1996
|
] });
|
|
@@ -2006,7 +2006,7 @@ const Ie = ({
|
|
|
2006
2006
|
return /* @__PURE__ */ i.jsx(
|
|
2007
2007
|
"div",
|
|
2008
2008
|
{
|
|
2009
|
-
className:
|
|
2009
|
+
className: C("highlighted-text-box", t, n, {
|
|
2010
2010
|
"has-icon": e
|
|
2011
2011
|
}),
|
|
2012
2012
|
style: s,
|
|
@@ -2037,7 +2037,7 @@ const tt = ({
|
|
|
2037
2037
|
Ie,
|
|
2038
2038
|
{
|
|
2039
2039
|
variant: "subtle",
|
|
2040
|
-
className:
|
|
2040
|
+
className: C("empty-state-box", t, r),
|
|
2041
2041
|
children: /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
2042
2042
|
e && /* @__PURE__ */ i.jsx(Xe, { options: { forceBlock: !0 }, children: e }),
|
|
2043
2043
|
a && typeof n == "object" && (l || /* @__PURE__ */ i.jsx(
|
|
@@ -2060,7 +2060,7 @@ const Ts = ({
|
|
|
2060
2060
|
className: e = "",
|
|
2061
2061
|
heading: n = !1,
|
|
2062
2062
|
children: r
|
|
2063
|
-
}) => /* @__PURE__ */ i.jsxs("div", { className:
|
|
2063
|
+
}) => /* @__PURE__ */ i.jsxs("div", { className: C("helper-text-box text-small", t, e), children: [
|
|
2064
2064
|
n && /* @__PURE__ */ i.jsx("p", { className: "title", children: n }),
|
|
2065
2065
|
typeof r == "string" ? /* @__PURE__ */ i.jsx(
|
|
2066
2066
|
Xe,
|
|
@@ -2110,9 +2110,9 @@ const sd = ({
|
|
|
2110
2110
|
Ie,
|
|
2111
2111
|
{
|
|
2112
2112
|
variant: "subtle",
|
|
2113
|
-
className:
|
|
2113
|
+
className: C("hide-show-text-box", t),
|
|
2114
2114
|
children: [
|
|
2115
|
-
/* @__PURE__ */ i.jsxs("div", { ref: o, className:
|
|
2115
|
+
/* @__PURE__ */ i.jsxs("div", { ref: o, className: C("content", l), children: [
|
|
2116
2116
|
/* @__PURE__ */ i.jsx(Xe, { options: { forceBlock: !0 }, children: l === "closed" ? c : r }),
|
|
2117
2117
|
l !== "closed" && a
|
|
2118
2118
|
] }),
|
|
@@ -2122,7 +2122,7 @@ const sd = ({
|
|
|
2122
2122
|
variant: "tertiary",
|
|
2123
2123
|
icon: { icon: "navigation_arrow", position: "left", animate: !0 },
|
|
2124
2124
|
styling: { muted: !0 },
|
|
2125
|
-
className:
|
|
2125
|
+
className: C({ "rotate-180": m }),
|
|
2126
2126
|
onClick: () => {
|
|
2127
2127
|
f(m ? "ready-to-close" : "opening");
|
|
2128
2128
|
},
|
|
@@ -2165,7 +2165,7 @@ const sd = ({
|
|
|
2165
2165
|
children: r.map((s) => s)
|
|
2166
2166
|
}
|
|
2167
2167
|
);
|
|
2168
|
-
},
|
|
2168
|
+
}, Ns = ({
|
|
2169
2169
|
children: t,
|
|
2170
2170
|
...e
|
|
2171
2171
|
}) => {
|
|
@@ -2182,7 +2182,7 @@ const sd = ({
|
|
|
2182
2182
|
return /* @__PURE__ */ i.jsx("div", { ...e, children: t });
|
|
2183
2183
|
}
|
|
2184
2184
|
return /* @__PURE__ */ i.jsx("div", { ...e, children: t });
|
|
2185
|
-
},
|
|
2185
|
+
}, $s = (t) => {
|
|
2186
2186
|
const e = Q(), n = Date.now().toString();
|
|
2187
2187
|
let r = "default";
|
|
2188
2188
|
const a = t.src;
|
|
@@ -2235,8 +2235,8 @@ const Ms = {
|
|
|
2235
2235
|
// Our content team previously used real HTML, which we need to tear out and replace with React components
|
|
2236
2236
|
style: ye,
|
|
2237
2237
|
details: Cs,
|
|
2238
|
-
div:
|
|
2239
|
-
iframe:
|
|
2238
|
+
div: Ns,
|
|
2239
|
+
iframe: $s
|
|
2240
2240
|
},
|
|
2241
2241
|
"text-only": {
|
|
2242
2242
|
h1: ye,
|
|
@@ -2267,7 +2267,7 @@ const Ms = {
|
|
|
2267
2267
|
forceBlock: !0,
|
|
2268
2268
|
overrides: Ms[r]
|
|
2269
2269
|
};
|
|
2270
|
-
return /* @__PURE__ */ i.jsx("div", { className:
|
|
2270
|
+
return /* @__PURE__ */ i.jsx("div", { className: C("markdown-text", t), children: /* @__PURE__ */ i.jsx(Xe, { options: { ...a, ...e }, children: n }) });
|
|
2271
2271
|
};
|
|
2272
2272
|
const Os = ({
|
|
2273
2273
|
maxWidth: t = !1,
|
|
@@ -2277,8 +2277,8 @@ const Os = ({
|
|
|
2277
2277
|
className: a = ""
|
|
2278
2278
|
}) => {
|
|
2279
2279
|
const s = t ? { "--max-width": `${t / 16}rem` } : {};
|
|
2280
|
-
return /* @__PURE__ */ i.jsxs("section", { className:
|
|
2281
|
-
/* @__PURE__ */ i.jsxs("div", { className:
|
|
2280
|
+
return /* @__PURE__ */ i.jsxs("section", { className: C("page-heading", a), children: [
|
|
2281
|
+
/* @__PURE__ */ i.jsxs("div", { className: C("content", { "has-max-width": t }), style: s, children: [
|
|
2282
2282
|
e && e.text && K.createElement(e.element || "h1", { className: "title" }, e.text),
|
|
2283
2283
|
n && n.text && K.createElement(
|
|
2284
2284
|
n.element || "h2",
|
|
@@ -2295,7 +2295,7 @@ const Bt = ({
|
|
|
2295
2295
|
className: n = "",
|
|
2296
2296
|
children: r,
|
|
2297
2297
|
...a
|
|
2298
|
-
}) => /* @__PURE__ */ i.jsx("span", { className:
|
|
2298
|
+
}) => /* @__PURE__ */ i.jsx("span", { className: C("pill", t, e, n), ...a, children: r });
|
|
2299
2299
|
const qt = ({
|
|
2300
2300
|
element: t = "p",
|
|
2301
2301
|
children: e = null,
|
|
@@ -2305,7 +2305,7 @@ const qt = ({
|
|
|
2305
2305
|
t,
|
|
2306
2306
|
{
|
|
2307
2307
|
...r,
|
|
2308
|
-
className:
|
|
2308
|
+
className: C("status-banner text-small", n),
|
|
2309
2309
|
"aria-live": "assertive"
|
|
2310
2310
|
},
|
|
2311
2311
|
e
|
|
@@ -2320,7 +2320,7 @@ const As = ({ progress: t = 0, text: e = !1, className: n = "" }) => {
|
|
|
2320
2320
|
return /* @__PURE__ */ i.jsx(
|
|
2321
2321
|
"span",
|
|
2322
2322
|
{
|
|
2323
|
-
className:
|
|
2323
|
+
className: C(`progress-bar section-${a}`, n),
|
|
2324
2324
|
style: s,
|
|
2325
2325
|
children: /* @__PURE__ */ i.jsx(be, { children: e ? `${t} ${e}` : r.formatMessage({ id: "progressBar" }, { number: t }) })
|
|
2326
2326
|
}
|
|
@@ -2343,7 +2343,7 @@ const hn = "loadingBlock_", Ls = ({ progress: t = 0, steps: e = !1, className: n
|
|
|
2343
2343
|
return /* @__PURE__ */ i.jsxs(
|
|
2344
2344
|
Ie,
|
|
2345
2345
|
{
|
|
2346
|
-
className:
|
|
2346
|
+
className: C("loading-block", n, {
|
|
2347
2347
|
"has-icon": a && e[a].icon
|
|
2348
2348
|
}),
|
|
2349
2349
|
variant: "subtle",
|
|
@@ -2359,7 +2359,7 @@ const Se = ({ element: t = "div", className: e = "", ...n }) => /* @__PURE__ */
|
|
|
2359
2359
|
er,
|
|
2360
2360
|
{
|
|
2361
2361
|
element: t,
|
|
2362
|
-
className:
|
|
2362
|
+
className: C("loading-placeholder", e),
|
|
2363
2363
|
...n
|
|
2364
2364
|
}
|
|
2365
2365
|
);
|
|
@@ -2398,11 +2398,11 @@ const Un = {
|
|
|
2398
2398
|
"cards-section",
|
|
2399
2399
|
"footer"
|
|
2400
2400
|
]
|
|
2401
|
-
}, Sa = (t, e) => t in Un ? /* @__PURE__ */ i.jsx("div", { className: t, children: Un[t].map((n, r) => Sa(n, r)) }, e) : /* @__PURE__ */ i.jsx(Se, { className: t }, e), Ca = ({ layout: t = "overview-page", ...e }) => /* @__PURE__ */ i.jsx("div", { className:
|
|
2401
|
+
}, Sa = (t, e) => t in Un ? /* @__PURE__ */ i.jsx("div", { className: t, children: Un[t].map((n, r) => Sa(n, r)) }, e) : /* @__PURE__ */ i.jsx(Se, { className: t }, e), Ca = ({ layout: t = "overview-page", ...e }) => /* @__PURE__ */ i.jsx("div", { className: C("loading-state", t), ...e, children: Un[t].map((n, r) => Sa(n, r)) }), Na = (t) => {
|
|
2402
2402
|
const e = t && t.toUpperCase().split(" ");
|
|
2403
2403
|
return Array.isArray(e) && e.length > 1 && e[0] !== "" ? e[1] === "" ? e[0][0] : e[0][0] + e[e.length - 1][0] : t ? t.substr(0, 1) : "";
|
|
2404
2404
|
}, jt = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], Is = (t) => {
|
|
2405
|
-
const e = Math.ceil(26 / jt.length), n =
|
|
2405
|
+
const e = Math.ceil(26 / jt.length), n = Na(t).toLowerCase();
|
|
2406
2406
|
if (n === "")
|
|
2407
2407
|
return jt[0];
|
|
2408
2408
|
const r = n.charCodeAt(0) - 96;
|
|
@@ -2428,13 +2428,13 @@ const Mr = 256, nt = ({
|
|
|
2428
2428
|
if (!m)
|
|
2429
2429
|
return;
|
|
2430
2430
|
const p = a, g = s;
|
|
2431
|
-
typeof window < "u" && window.devicePixelRatio && (d.width = p * window.devicePixelRatio, d.height = g * window.devicePixelRatio, m.scale(window.devicePixelRatio, window.devicePixelRatio)), m.fillStyle = Is(n), m.fillRect(0, 0, p, g), m.font = `${p / 3}px Arial`, m.textAlign = "center", m.fillStyle = "white", m.fillText(
|
|
2431
|
+
typeof window < "u" && window.devicePixelRatio && (d.width = p * window.devicePixelRatio, d.height = g * window.devicePixelRatio, m.scale(window.devicePixelRatio, window.devicePixelRatio)), m.fillStyle = Is(n), m.fillRect(0, 0, p, g), m.font = `${p / 3}px Arial`, m.textAlign = "center", m.fillStyle = "white", m.fillText(Na(n), p / 2, g / 1.6);
|
|
2432
2432
|
}, [n]);
|
|
2433
2433
|
let f = !1;
|
|
2434
2434
|
return e && e !== "" && !c && (e.includes("http") || e.includes("//")) && (f = !0), /* @__PURE__ */ i.jsx(
|
|
2435
2435
|
"figure",
|
|
2436
2436
|
{
|
|
2437
|
-
className:
|
|
2437
|
+
className: C("profile-picture", t, { error: c }),
|
|
2438
2438
|
...o,
|
|
2439
2439
|
children: f ? /* @__PURE__ */ i.jsx(
|
|
2440
2440
|
"img",
|
|
@@ -2450,7 +2450,7 @@ const Mr = 256, nt = ({
|
|
|
2450
2450
|
) : /* @__PURE__ */ i.jsx("canvas", { ref: l })
|
|
2451
2451
|
}
|
|
2452
2452
|
);
|
|
2453
|
-
},
|
|
2453
|
+
}, $a = (t) => t === "apolitical" ? {
|
|
2454
2454
|
image: `${Ge}logos/member_apolitical.svg`
|
|
2455
2455
|
} : t === "community" || typeof t == "object" && !t.name ? {
|
|
2456
2456
|
image: `${Ge}logos/member_community.svg`
|
|
@@ -2482,13 +2482,13 @@ const rr = ({
|
|
|
2482
2482
|
gtmType: a = "member-click",
|
|
2483
2483
|
className: s = ""
|
|
2484
2484
|
}) => {
|
|
2485
|
-
const o = Q(), c =
|
|
2485
|
+
const o = Q(), c = $a(e);
|
|
2486
2486
|
c.name || (c.name = o.formatMessage({
|
|
2487
2487
|
id: `member_${typeof e == "string" ? e : "community"}`
|
|
2488
2488
|
}));
|
|
2489
2489
|
const { name: u, url: l, image: f } = c, d = Bs(c), m = n && n.createdAt ? Bn(n.createdAt) : !1, p = n && n.createdAt ? wa(n.createdAt) : "";
|
|
2490
2490
|
return K.createElement(t, {
|
|
2491
|
-
className:
|
|
2491
|
+
className: C("member text-medium", s),
|
|
2492
2492
|
children: /* @__PURE__ */ i.jsxs(
|
|
2493
2493
|
xt,
|
|
2494
2494
|
{
|
|
@@ -2535,12 +2535,12 @@ const Or = {
|
|
|
2535
2535
|
const f = Q();
|
|
2536
2536
|
return !n || n.length === 0 ? null : K.createElement(t, {
|
|
2537
2537
|
...l,
|
|
2538
|
-
className:
|
|
2538
|
+
className: C("contributors", u, a, { "has-gap": s }),
|
|
2539
2539
|
children: /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
2540
2540
|
/* @__PURE__ */ i.jsx("ul", { children: n.map((d, m) => {
|
|
2541
2541
|
let p, g = "";
|
|
2542
2542
|
if (m < c) {
|
|
2543
|
-
const { name: v = "", image: b = "" } =
|
|
2543
|
+
const { name: v = "", image: b = "" } = $a(d);
|
|
2544
2544
|
if (o)
|
|
2545
2545
|
return /* @__PURE__ */ i.jsx(Se, { element: "li", className: "contributor" }, m);
|
|
2546
2546
|
p = /* @__PURE__ */ i.jsx(
|
|
@@ -2557,7 +2557,7 @@ const Or = {
|
|
|
2557
2557
|
p = /* @__PURE__ */ i.jsxs(
|
|
2558
2558
|
"small",
|
|
2559
2559
|
{
|
|
2560
|
-
className:
|
|
2560
|
+
className: C({ "large-number": v > 99 }),
|
|
2561
2561
|
children: [
|
|
2562
2562
|
"+",
|
|
2563
2563
|
ls(v, 0)
|
|
@@ -2565,7 +2565,7 @@ const Or = {
|
|
|
2565
2565
|
}
|
|
2566
2566
|
), g = "number-left";
|
|
2567
2567
|
}
|
|
2568
|
-
return p ? /* @__PURE__ */ i.jsx("li", { className:
|
|
2568
|
+
return p ? /* @__PURE__ */ i.jsx("li", { className: C("contributor", g), children: p }, m) : null;
|
|
2569
2569
|
}) }),
|
|
2570
2570
|
r && /* @__PURE__ */ i.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? f.formatMessage({ id: `member_${n[0]}` }) : Ke(n[0].name || "", 20) : null })
|
|
2571
2571
|
] })
|
|
@@ -2660,16 +2660,16 @@ var Ar;
|
|
|
2660
2660
|
function Us() {
|
|
2661
2661
|
return Ar || (Ar = 1, process.env.NODE_ENV !== "production" && function() {
|
|
2662
2662
|
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, s = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, u = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, f = t ? Symbol.for("react.forward_ref") : 60112, d = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, g = t ? Symbol.for("react.lazy") : 60116, v = t ? Symbol.for("react.block") : 60121, b = t ? Symbol.for("react.fundamental") : 60117, y = t ? Symbol.for("react.responder") : 60118, _ = t ? Symbol.for("react.scope") : 60119;
|
|
2663
|
-
function E(
|
|
2664
|
-
return typeof
|
|
2665
|
-
|
|
2663
|
+
function E(A) {
|
|
2664
|
+
return typeof A == "string" || typeof A == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
2665
|
+
A === r || A === l || A === s || A === a || A === d || A === m || typeof A == "object" && A !== null && (A.$$typeof === g || A.$$typeof === p || A.$$typeof === o || A.$$typeof === c || A.$$typeof === f || A.$$typeof === b || A.$$typeof === y || A.$$typeof === _ || A.$$typeof === v);
|
|
2666
2666
|
}
|
|
2667
|
-
function k(
|
|
2668
|
-
if (typeof
|
|
2669
|
-
var ve =
|
|
2667
|
+
function k(A) {
|
|
2668
|
+
if (typeof A == "object" && A !== null) {
|
|
2669
|
+
var ve = A.$$typeof;
|
|
2670
2670
|
switch (ve) {
|
|
2671
2671
|
case e:
|
|
2672
|
-
var Pe =
|
|
2672
|
+
var Pe = A.type;
|
|
2673
2673
|
switch (Pe) {
|
|
2674
2674
|
case u:
|
|
2675
2675
|
case l:
|
|
@@ -2696,47 +2696,47 @@ function Us() {
|
|
|
2696
2696
|
}
|
|
2697
2697
|
}
|
|
2698
2698
|
}
|
|
2699
|
-
var w = u, U = l,
|
|
2700
|
-
function ee(
|
|
2701
|
-
return V || (V = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), j(
|
|
2699
|
+
var w = u, U = l, R = c, N = o, B = e, L = f, M = r, T = g, x = p, S = n, I = s, O = a, D = d, V = !1;
|
|
2700
|
+
function ee(A) {
|
|
2701
|
+
return V || (V = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), j(A) || k(A) === u;
|
|
2702
2702
|
}
|
|
2703
|
-
function j(
|
|
2704
|
-
return k(
|
|
2703
|
+
function j(A) {
|
|
2704
|
+
return k(A) === l;
|
|
2705
2705
|
}
|
|
2706
|
-
function
|
|
2707
|
-
return k(
|
|
2706
|
+
function $(A) {
|
|
2707
|
+
return k(A) === c;
|
|
2708
2708
|
}
|
|
2709
|
-
function Z(
|
|
2710
|
-
return k(
|
|
2709
|
+
function Z(A) {
|
|
2710
|
+
return k(A) === o;
|
|
2711
2711
|
}
|
|
2712
|
-
function z(
|
|
2713
|
-
return typeof
|
|
2712
|
+
function z(A) {
|
|
2713
|
+
return typeof A == "object" && A !== null && A.$$typeof === e;
|
|
2714
2714
|
}
|
|
2715
|
-
function W(
|
|
2716
|
-
return k(
|
|
2715
|
+
function W(A) {
|
|
2716
|
+
return k(A) === f;
|
|
2717
2717
|
}
|
|
2718
|
-
function X(
|
|
2719
|
-
return k(
|
|
2718
|
+
function X(A) {
|
|
2719
|
+
return k(A) === r;
|
|
2720
2720
|
}
|
|
2721
|
-
function Y(
|
|
2722
|
-
return k(
|
|
2721
|
+
function Y(A) {
|
|
2722
|
+
return k(A) === g;
|
|
2723
2723
|
}
|
|
2724
|
-
function H(
|
|
2725
|
-
return k(
|
|
2724
|
+
function H(A) {
|
|
2725
|
+
return k(A) === p;
|
|
2726
2726
|
}
|
|
2727
|
-
function J(
|
|
2728
|
-
return k(
|
|
2727
|
+
function J(A) {
|
|
2728
|
+
return k(A) === n;
|
|
2729
2729
|
}
|
|
2730
|
-
function re(
|
|
2731
|
-
return k(
|
|
2730
|
+
function re(A) {
|
|
2731
|
+
return k(A) === s;
|
|
2732
2732
|
}
|
|
2733
|
-
function A
|
|
2734
|
-
return k(
|
|
2733
|
+
function F(A) {
|
|
2734
|
+
return k(A) === a;
|
|
2735
2735
|
}
|
|
2736
|
-
function oe(
|
|
2737
|
-
return k(
|
|
2736
|
+
function oe(A) {
|
|
2737
|
+
return k(A) === d;
|
|
2738
2738
|
}
|
|
2739
|
-
ue.AsyncMode = w, ue.ConcurrentMode = U, ue.ContextConsumer =
|
|
2739
|
+
ue.AsyncMode = w, ue.ConcurrentMode = U, ue.ContextConsumer = R, ue.ContextProvider = N, ue.Element = B, ue.ForwardRef = L, ue.Fragment = M, ue.Lazy = T, ue.Memo = x, ue.Portal = S, ue.Profiler = I, ue.StrictMode = O, ue.Suspense = D, ue.isAsyncMode = ee, ue.isConcurrentMode = j, ue.isContextConsumer = $, ue.isContextProvider = Z, ue.isElement = z, ue.isForwardRef = W, ue.isFragment = X, ue.isLazy = Y, ue.isMemo = H, ue.isPortal = J, ue.isProfiler = re, ue.isStrictMode = F, ue.isSuspense = oe, ue.isValidElementType = E, ue.typeOf = k;
|
|
2740
2740
|
}()), ue;
|
|
2741
2741
|
}
|
|
2742
2742
|
var Dr;
|
|
@@ -2878,9 +2878,9 @@ function Ws() {
|
|
|
2878
2878
|
return _n = function(c, u) {
|
|
2879
2879
|
var l = typeof Symbol == "function" && Symbol.iterator, f = "@@iterator";
|
|
2880
2880
|
function d(j) {
|
|
2881
|
-
var
|
|
2882
|
-
if (typeof
|
|
2883
|
-
return
|
|
2881
|
+
var $ = j && (l && j[l] || j[f]);
|
|
2882
|
+
if (typeof $ == "function")
|
|
2883
|
+
return $;
|
|
2884
2884
|
}
|
|
2885
2885
|
var m = "<<anonymous>>", p = {
|
|
2886
2886
|
array: y("array"),
|
|
@@ -2896,83 +2896,83 @@ function Ws() {
|
|
|
2896
2896
|
element: k(),
|
|
2897
2897
|
elementType: w(),
|
|
2898
2898
|
instanceOf: U,
|
|
2899
|
-
node:
|
|
2900
|
-
objectOf:
|
|
2901
|
-
oneOf:
|
|
2902
|
-
oneOfType:
|
|
2899
|
+
node: L(),
|
|
2900
|
+
objectOf: N,
|
|
2901
|
+
oneOf: R,
|
|
2902
|
+
oneOfType: B,
|
|
2903
2903
|
shape: T,
|
|
2904
2904
|
exact: x
|
|
2905
2905
|
};
|
|
2906
|
-
function g(j,
|
|
2907
|
-
return j ===
|
|
2906
|
+
function g(j, $) {
|
|
2907
|
+
return j === $ ? j !== 0 || 1 / j === 1 / $ : j !== j && $ !== $;
|
|
2908
2908
|
}
|
|
2909
|
-
function v(j,
|
|
2910
|
-
this.message = j, this.data =
|
|
2909
|
+
function v(j, $) {
|
|
2910
|
+
this.message = j, this.data = $ && typeof $ == "object" ? $ : {}, this.stack = "";
|
|
2911
2911
|
}
|
|
2912
2912
|
v.prototype = Error.prototype;
|
|
2913
2913
|
function b(j) {
|
|
2914
2914
|
if (process.env.NODE_ENV !== "production")
|
|
2915
|
-
var
|
|
2916
|
-
function z(X, Y, H, J, re,
|
|
2917
|
-
if (J = J || m,
|
|
2915
|
+
var $ = {}, Z = 0;
|
|
2916
|
+
function z(X, Y, H, J, re, F, oe) {
|
|
2917
|
+
if (J = J || m, F = F || H, oe !== n) {
|
|
2918
2918
|
if (u) {
|
|
2919
|
-
var
|
|
2919
|
+
var A = new Error(
|
|
2920
2920
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
2921
2921
|
);
|
|
2922
|
-
throw
|
|
2922
|
+
throw A.name = "Invariant Violation", A;
|
|
2923
2923
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
2924
2924
|
var ve = J + ":" + H;
|
|
2925
|
-
|
|
2925
|
+
!$[ve] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
2926
2926
|
Z < 3 && (s(
|
|
2927
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
2928
|
-
),
|
|
2927
|
+
"You are manually calling a React.PropTypes validation function for the `" + F + "` prop on `" + J + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
2928
|
+
), $[ve] = !0, Z++);
|
|
2929
2929
|
}
|
|
2930
2930
|
}
|
|
2931
|
-
return Y[H] == null ? X ? Y[H] === null ? new v("The " + re + " `" +
|
|
2931
|
+
return Y[H] == null ? X ? Y[H] === null ? new v("The " + re + " `" + F + "` is marked as required " + ("in `" + J + "`, but its value is `null`.")) : new v("The " + re + " `" + F + "` is marked as required in " + ("`" + J + "`, but its value is `undefined`.")) : null : j(Y, H, J, re, F);
|
|
2932
2932
|
}
|
|
2933
2933
|
var W = z.bind(null, !1);
|
|
2934
2934
|
return W.isRequired = z.bind(null, !0), W;
|
|
2935
2935
|
}
|
|
2936
2936
|
function y(j) {
|
|
2937
|
-
function
|
|
2938
|
-
var J = Z[z], re =
|
|
2937
|
+
function $(Z, z, W, X, Y, H) {
|
|
2938
|
+
var J = Z[z], re = O(J);
|
|
2939
2939
|
if (re !== j) {
|
|
2940
|
-
var
|
|
2940
|
+
var F = D(J);
|
|
2941
2941
|
return new v(
|
|
2942
|
-
"Invalid " + X + " `" + Y + "` of type " + ("`" +
|
|
2942
|
+
"Invalid " + X + " `" + Y + "` of type " + ("`" + F + "` supplied to `" + W + "`, expected ") + ("`" + j + "`."),
|
|
2943
2943
|
{ expectedType: j }
|
|
2944
2944
|
);
|
|
2945
2945
|
}
|
|
2946
2946
|
return null;
|
|
2947
2947
|
}
|
|
2948
|
-
return b(
|
|
2948
|
+
return b($);
|
|
2949
2949
|
}
|
|
2950
2950
|
function _() {
|
|
2951
2951
|
return b(o);
|
|
2952
2952
|
}
|
|
2953
2953
|
function E(j) {
|
|
2954
|
-
function
|
|
2954
|
+
function $(Z, z, W, X, Y) {
|
|
2955
2955
|
if (typeof j != "function")
|
|
2956
2956
|
return new v("Property `" + Y + "` of component `" + W + "` has invalid PropType notation inside arrayOf.");
|
|
2957
2957
|
var H = Z[z];
|
|
2958
2958
|
if (!Array.isArray(H)) {
|
|
2959
|
-
var J =
|
|
2959
|
+
var J = O(H);
|
|
2960
2960
|
return new v("Invalid " + X + " `" + Y + "` of type " + ("`" + J + "` supplied to `" + W + "`, expected an array."));
|
|
2961
2961
|
}
|
|
2962
2962
|
for (var re = 0; re < H.length; re++) {
|
|
2963
|
-
var
|
|
2964
|
-
if (
|
|
2965
|
-
return
|
|
2963
|
+
var F = j(H, re, W, X, Y + "[" + re + "]", n);
|
|
2964
|
+
if (F instanceof Error)
|
|
2965
|
+
return F;
|
|
2966
2966
|
}
|
|
2967
2967
|
return null;
|
|
2968
2968
|
}
|
|
2969
|
-
return b(
|
|
2969
|
+
return b($);
|
|
2970
2970
|
}
|
|
2971
2971
|
function k() {
|
|
2972
|
-
function j(
|
|
2973
|
-
var Y =
|
|
2972
|
+
function j($, Z, z, W, X) {
|
|
2973
|
+
var Y = $[Z];
|
|
2974
2974
|
if (!c(Y)) {
|
|
2975
|
-
var H =
|
|
2975
|
+
var H = O(Y);
|
|
2976
2976
|
return new v("Invalid " + W + " `" + X + "` of type " + ("`" + H + "` supplied to `" + z + "`, expected a single ReactElement."));
|
|
2977
2977
|
}
|
|
2978
2978
|
return null;
|
|
@@ -2980,10 +2980,10 @@ function Ws() {
|
|
|
2980
2980
|
return b(j);
|
|
2981
2981
|
}
|
|
2982
2982
|
function w() {
|
|
2983
|
-
function j(
|
|
2984
|
-
var Y =
|
|
2983
|
+
function j($, Z, z, W, X) {
|
|
2984
|
+
var Y = $[Z];
|
|
2985
2985
|
if (!t.isValidElementType(Y)) {
|
|
2986
|
-
var H =
|
|
2986
|
+
var H = O(Y);
|
|
2987
2987
|
return new v("Invalid " + W + " `" + X + "` of type " + ("`" + H + "` supplied to `" + z + "`, expected a single ReactElement type."));
|
|
2988
2988
|
}
|
|
2989
2989
|
return null;
|
|
@@ -2991,123 +2991,123 @@ function Ws() {
|
|
|
2991
2991
|
return b(j);
|
|
2992
2992
|
}
|
|
2993
2993
|
function U(j) {
|
|
2994
|
-
function
|
|
2994
|
+
function $(Z, z, W, X, Y) {
|
|
2995
2995
|
if (!(Z[z] instanceof j)) {
|
|
2996
2996
|
var H = j.name || m, J = ee(Z[z]);
|
|
2997
2997
|
return new v("Invalid " + X + " `" + Y + "` of type " + ("`" + J + "` supplied to `" + W + "`, expected ") + ("instance of `" + H + "`."));
|
|
2998
2998
|
}
|
|
2999
2999
|
return null;
|
|
3000
3000
|
}
|
|
3001
|
-
return b(
|
|
3001
|
+
return b($);
|
|
3002
3002
|
}
|
|
3003
|
-
function
|
|
3003
|
+
function R(j) {
|
|
3004
3004
|
if (!Array.isArray(j))
|
|
3005
3005
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s(
|
|
3006
3006
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
3007
3007
|
) : s("Invalid argument supplied to oneOf, expected an array.")), o;
|
|
3008
|
-
function
|
|
3008
|
+
function $(Z, z, W, X, Y) {
|
|
3009
3009
|
for (var H = Z[z], J = 0; J < j.length; J++)
|
|
3010
3010
|
if (g(H, j[J]))
|
|
3011
3011
|
return null;
|
|
3012
|
-
var re = JSON.stringify(j, function(oe,
|
|
3013
|
-
var ve =
|
|
3014
|
-
return ve === "symbol" ? String(
|
|
3012
|
+
var re = JSON.stringify(j, function(oe, A) {
|
|
3013
|
+
var ve = D(A);
|
|
3014
|
+
return ve === "symbol" ? String(A) : A;
|
|
3015
3015
|
});
|
|
3016
3016
|
return new v("Invalid " + X + " `" + Y + "` of value `" + String(H) + "` " + ("supplied to `" + W + "`, expected one of " + re + "."));
|
|
3017
3017
|
}
|
|
3018
|
-
return b(
|
|
3018
|
+
return b($);
|
|
3019
3019
|
}
|
|
3020
|
-
function
|
|
3021
|
-
function
|
|
3020
|
+
function N(j) {
|
|
3021
|
+
function $(Z, z, W, X, Y) {
|
|
3022
3022
|
if (typeof j != "function")
|
|
3023
3023
|
return new v("Property `" + Y + "` of component `" + W + "` has invalid PropType notation inside objectOf.");
|
|
3024
|
-
var H = Z[z], J =
|
|
3024
|
+
var H = Z[z], J = O(H);
|
|
3025
3025
|
if (J !== "object")
|
|
3026
3026
|
return new v("Invalid " + X + " `" + Y + "` of type " + ("`" + J + "` supplied to `" + W + "`, expected an object."));
|
|
3027
3027
|
for (var re in H)
|
|
3028
3028
|
if (r(H, re)) {
|
|
3029
|
-
var
|
|
3030
|
-
if (
|
|
3031
|
-
return
|
|
3029
|
+
var F = j(H, re, W, X, Y + "." + re, n);
|
|
3030
|
+
if (F instanceof Error)
|
|
3031
|
+
return F;
|
|
3032
3032
|
}
|
|
3033
3033
|
return null;
|
|
3034
3034
|
}
|
|
3035
|
-
return b(
|
|
3035
|
+
return b($);
|
|
3036
3036
|
}
|
|
3037
|
-
function
|
|
3037
|
+
function B(j) {
|
|
3038
3038
|
if (!Array.isArray(j))
|
|
3039
3039
|
return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), o;
|
|
3040
|
-
for (var
|
|
3041
|
-
var Z = j[
|
|
3040
|
+
for (var $ = 0; $ < j.length; $++) {
|
|
3041
|
+
var Z = j[$];
|
|
3042
3042
|
if (typeof Z != "function")
|
|
3043
3043
|
return s(
|
|
3044
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + V(Z) + " at index " +
|
|
3044
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + V(Z) + " at index " + $ + "."
|
|
3045
3045
|
), o;
|
|
3046
3046
|
}
|
|
3047
3047
|
function z(W, X, Y, H, J) {
|
|
3048
|
-
for (var re = [],
|
|
3049
|
-
var oe = j[
|
|
3050
|
-
if (
|
|
3048
|
+
for (var re = [], F = 0; F < j.length; F++) {
|
|
3049
|
+
var oe = j[F], A = oe(W, X, Y, H, J, n);
|
|
3050
|
+
if (A == null)
|
|
3051
3051
|
return null;
|
|
3052
|
-
|
|
3052
|
+
A.data && r(A.data, "expectedType") && re.push(A.data.expectedType);
|
|
3053
3053
|
}
|
|
3054
3054
|
var ve = re.length > 0 ? ", expected one of type [" + re.join(", ") + "]" : "";
|
|
3055
3055
|
return new v("Invalid " + H + " `" + J + "` supplied to " + ("`" + Y + "`" + ve + "."));
|
|
3056
3056
|
}
|
|
3057
3057
|
return b(z);
|
|
3058
3058
|
}
|
|
3059
|
-
function
|
|
3060
|
-
function j(
|
|
3061
|
-
return
|
|
3059
|
+
function L() {
|
|
3060
|
+
function j($, Z, z, W, X) {
|
|
3061
|
+
return S($[Z]) ? null : new v("Invalid " + W + " `" + X + "` supplied to " + ("`" + z + "`, expected a ReactNode."));
|
|
3062
3062
|
}
|
|
3063
3063
|
return b(j);
|
|
3064
3064
|
}
|
|
3065
|
-
function
|
|
3065
|
+
function M(j, $, Z, z, W) {
|
|
3066
3066
|
return new v(
|
|
3067
|
-
(j || "React class") + ": " +
|
|
3067
|
+
(j || "React class") + ": " + $ + " type `" + Z + "." + z + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + W + "`."
|
|
3068
3068
|
);
|
|
3069
3069
|
}
|
|
3070
3070
|
function T(j) {
|
|
3071
|
-
function
|
|
3072
|
-
var H = Z[z], J =
|
|
3071
|
+
function $(Z, z, W, X, Y) {
|
|
3072
|
+
var H = Z[z], J = O(H);
|
|
3073
3073
|
if (J !== "object")
|
|
3074
3074
|
return new v("Invalid " + X + " `" + Y + "` of type `" + J + "` " + ("supplied to `" + W + "`, expected `object`."));
|
|
3075
3075
|
for (var re in j) {
|
|
3076
|
-
var
|
|
3077
|
-
if (typeof
|
|
3078
|
-
return
|
|
3079
|
-
var oe =
|
|
3076
|
+
var F = j[re];
|
|
3077
|
+
if (typeof F != "function")
|
|
3078
|
+
return M(W, X, Y, re, D(F));
|
|
3079
|
+
var oe = F(H, re, W, X, Y + "." + re, n);
|
|
3080
3080
|
if (oe)
|
|
3081
3081
|
return oe;
|
|
3082
3082
|
}
|
|
3083
3083
|
return null;
|
|
3084
3084
|
}
|
|
3085
|
-
return b(
|
|
3085
|
+
return b($);
|
|
3086
3086
|
}
|
|
3087
3087
|
function x(j) {
|
|
3088
|
-
function
|
|
3089
|
-
var H = Z[z], J =
|
|
3088
|
+
function $(Z, z, W, X, Y) {
|
|
3089
|
+
var H = Z[z], J = O(H);
|
|
3090
3090
|
if (J !== "object")
|
|
3091
3091
|
return new v("Invalid " + X + " `" + Y + "` of type `" + J + "` " + ("supplied to `" + W + "`, expected `object`."));
|
|
3092
3092
|
var re = e({}, Z[z], j);
|
|
3093
|
-
for (var
|
|
3094
|
-
var oe = j[
|
|
3095
|
-
if (r(j,
|
|
3096
|
-
return
|
|
3093
|
+
for (var F in re) {
|
|
3094
|
+
var oe = j[F];
|
|
3095
|
+
if (r(j, F) && typeof oe != "function")
|
|
3096
|
+
return M(W, X, Y, F, D(oe));
|
|
3097
3097
|
if (!oe)
|
|
3098
3098
|
return new v(
|
|
3099
|
-
"Invalid " + X + " `" + Y + "` key `" +
|
|
3099
|
+
"Invalid " + X + " `" + Y + "` key `" + F + "` supplied to `" + W + "`.\nBad object: " + JSON.stringify(Z[z], null, " ") + `
|
|
3100
3100
|
Valid keys: ` + JSON.stringify(Object.keys(j), null, " ")
|
|
3101
3101
|
);
|
|
3102
|
-
var
|
|
3103
|
-
if (
|
|
3104
|
-
return
|
|
3102
|
+
var A = oe(H, F, W, X, Y + "." + F, n);
|
|
3103
|
+
if (A)
|
|
3104
|
+
return A;
|
|
3105
3105
|
}
|
|
3106
3106
|
return null;
|
|
3107
3107
|
}
|
|
3108
|
-
return b(
|
|
3108
|
+
return b($);
|
|
3109
3109
|
}
|
|
3110
|
-
function
|
|
3110
|
+
function S(j) {
|
|
3111
3111
|
switch (typeof j) {
|
|
3112
3112
|
case "number":
|
|
3113
3113
|
case "string":
|
|
@@ -3117,20 +3117,20 @@ Valid keys: ` + JSON.stringify(Object.keys(j), null, " ")
|
|
|
3117
3117
|
return !j;
|
|
3118
3118
|
case "object":
|
|
3119
3119
|
if (Array.isArray(j))
|
|
3120
|
-
return j.every(
|
|
3120
|
+
return j.every(S);
|
|
3121
3121
|
if (j === null || c(j))
|
|
3122
3122
|
return !0;
|
|
3123
|
-
var
|
|
3124
|
-
if (
|
|
3125
|
-
var Z =
|
|
3126
|
-
if (
|
|
3123
|
+
var $ = d(j);
|
|
3124
|
+
if ($) {
|
|
3125
|
+
var Z = $.call(j), z;
|
|
3126
|
+
if ($ !== j.entries) {
|
|
3127
3127
|
for (; !(z = Z.next()).done; )
|
|
3128
|
-
if (!
|
|
3128
|
+
if (!S(z.value))
|
|
3129
3129
|
return !1;
|
|
3130
3130
|
} else
|
|
3131
3131
|
for (; !(z = Z.next()).done; ) {
|
|
3132
3132
|
var W = z.value;
|
|
3133
|
-
if (W && !
|
|
3133
|
+
if (W && !S(W[1]))
|
|
3134
3134
|
return !1;
|
|
3135
3135
|
}
|
|
3136
3136
|
} else
|
|
@@ -3140,37 +3140,37 @@ Valid keys: ` + JSON.stringify(Object.keys(j), null, " ")
|
|
|
3140
3140
|
return !1;
|
|
3141
3141
|
}
|
|
3142
3142
|
}
|
|
3143
|
-
function
|
|
3144
|
-
return j === "symbol" ? !0 :
|
|
3143
|
+
function I(j, $) {
|
|
3144
|
+
return j === "symbol" ? !0 : $ ? $["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && $ instanceof Symbol : !1;
|
|
3145
3145
|
}
|
|
3146
|
-
function
|
|
3147
|
-
var
|
|
3148
|
-
return Array.isArray(j) ? "array" : j instanceof RegExp ? "object" :
|
|
3146
|
+
function O(j) {
|
|
3147
|
+
var $ = typeof j;
|
|
3148
|
+
return Array.isArray(j) ? "array" : j instanceof RegExp ? "object" : I($, j) ? "symbol" : $;
|
|
3149
3149
|
}
|
|
3150
|
-
function
|
|
3150
|
+
function D(j) {
|
|
3151
3151
|
if (typeof j > "u" || j === null)
|
|
3152
3152
|
return "" + j;
|
|
3153
|
-
var
|
|
3154
|
-
if (
|
|
3153
|
+
var $ = O(j);
|
|
3154
|
+
if ($ === "object") {
|
|
3155
3155
|
if (j instanceof Date)
|
|
3156
3156
|
return "date";
|
|
3157
3157
|
if (j instanceof RegExp)
|
|
3158
3158
|
return "regexp";
|
|
3159
3159
|
}
|
|
3160
|
-
return
|
|
3160
|
+
return $;
|
|
3161
3161
|
}
|
|
3162
3162
|
function V(j) {
|
|
3163
|
-
var
|
|
3164
|
-
switch (
|
|
3163
|
+
var $ = D(j);
|
|
3164
|
+
switch ($) {
|
|
3165
3165
|
case "array":
|
|
3166
3166
|
case "object":
|
|
3167
|
-
return "an " +
|
|
3167
|
+
return "an " + $;
|
|
3168
3168
|
case "boolean":
|
|
3169
3169
|
case "date":
|
|
3170
3170
|
case "regexp":
|
|
3171
|
-
return "a " +
|
|
3171
|
+
return "a " + $;
|
|
3172
3172
|
default:
|
|
3173
|
-
return
|
|
3173
|
+
return $;
|
|
3174
3174
|
}
|
|
3175
3175
|
}
|
|
3176
3176
|
function ee(j) {
|
|
@@ -3566,36 +3566,36 @@ var Vr = {
|
|
|
3566
3566
|
delayInitialFocusTimer: void 0,
|
|
3567
3567
|
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
3568
3568
|
recentNavEvent: void 0
|
|
3569
|
-
}, c, u = function(T, x,
|
|
3570
|
-
return T && T[x] !== void 0 ? T[x] : s[
|
|
3569
|
+
}, c, u = function(T, x, S) {
|
|
3570
|
+
return T && T[x] !== void 0 ? T[x] : s[S || x];
|
|
3571
3571
|
}, l = function(T, x) {
|
|
3572
|
-
var
|
|
3573
|
-
return o.containerGroups.findIndex(function(
|
|
3574
|
-
var
|
|
3575
|
-
return
|
|
3572
|
+
var S = typeof (x == null ? void 0 : x.composedPath) == "function" ? x.composedPath() : void 0;
|
|
3573
|
+
return o.containerGroups.findIndex(function(I) {
|
|
3574
|
+
var O = I.container, D = I.tabbableNodes;
|
|
3575
|
+
return O.contains(T) || // fall back to explicit tabbable search which will take into consideration any
|
|
3576
3576
|
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
3577
3577
|
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
3578
3578
|
// look inside web components even if open)
|
|
3579
|
-
(
|
|
3579
|
+
(S == null ? void 0 : S.includes(O)) || D.find(function(V) {
|
|
3580
3580
|
return V === T;
|
|
3581
3581
|
});
|
|
3582
3582
|
});
|
|
3583
3583
|
}, f = function(T) {
|
|
3584
3584
|
var x = s[T];
|
|
3585
3585
|
if (typeof x == "function") {
|
|
3586
|
-
for (var
|
|
3587
|
-
|
|
3588
|
-
x = x.apply(void 0,
|
|
3586
|
+
for (var S = arguments.length, I = new Array(S > 1 ? S - 1 : 0), O = 1; O < S; O++)
|
|
3587
|
+
I[O - 1] = arguments[O];
|
|
3588
|
+
x = x.apply(void 0, I);
|
|
3589
3589
|
}
|
|
3590
3590
|
if (x === !0 && (x = void 0), !x) {
|
|
3591
3591
|
if (x === void 0 || x === !1)
|
|
3592
3592
|
return x;
|
|
3593
3593
|
throw new Error("`".concat(T, "` was specified but was not a node, or did not return a node"));
|
|
3594
3594
|
}
|
|
3595
|
-
var
|
|
3596
|
-
if (typeof x == "string" && (
|
|
3595
|
+
var D = x;
|
|
3596
|
+
if (typeof x == "string" && (D = r.querySelector(x), !D))
|
|
3597
3597
|
throw new Error("`".concat(T, "` as selector refers to no known node"));
|
|
3598
|
-
return
|
|
3598
|
+
return D;
|
|
3599
3599
|
}, d = function() {
|
|
3600
3600
|
var T = f("initialFocus");
|
|
3601
3601
|
if (T === !1)
|
|
@@ -3604,17 +3604,17 @@ var Vr = {
|
|
|
3604
3604
|
if (l(r.activeElement) >= 0)
|
|
3605
3605
|
T = r.activeElement;
|
|
3606
3606
|
else {
|
|
3607
|
-
var x = o.tabbableGroups[0],
|
|
3608
|
-
T =
|
|
3607
|
+
var x = o.tabbableGroups[0], S = x && x.firstTabbableNode;
|
|
3608
|
+
T = S || f("fallbackFocus");
|
|
3609
3609
|
}
|
|
3610
3610
|
if (!T)
|
|
3611
3611
|
throw new Error("Your focus-trap needs to have at least one focusable element");
|
|
3612
3612
|
return T;
|
|
3613
3613
|
}, m = function() {
|
|
3614
3614
|
if (o.containerGroups = o.containers.map(function(T) {
|
|
3615
|
-
var x = Ba(T, s.tabbableOptions),
|
|
3615
|
+
var x = Ba(T, s.tabbableOptions), S = qa(T, s.tabbableOptions), I = x.length > 0 ? x[0] : void 0, O = x.length > 0 ? x[x.length - 1] : void 0, D = S.find(function(j) {
|
|
3616
3616
|
return Ue(j);
|
|
3617
|
-
}), V =
|
|
3617
|
+
}), V = S.slice().reverse().find(function(j) {
|
|
3618
3618
|
return Ue(j);
|
|
3619
3619
|
}), ee = !!x.find(function(j) {
|
|
3620
3620
|
return Le(j) > 0;
|
|
@@ -3622,13 +3622,13 @@ var Vr = {
|
|
|
3622
3622
|
return {
|
|
3623
3623
|
container: T,
|
|
3624
3624
|
tabbableNodes: x,
|
|
3625
|
-
focusableNodes:
|
|
3625
|
+
focusableNodes: S,
|
|
3626
3626
|
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
3627
3627
|
posTabIndexesFound: ee,
|
|
3628
3628
|
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
3629
|
-
firstTabbableNode:
|
|
3629
|
+
firstTabbableNode: I,
|
|
3630
3630
|
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
3631
|
-
lastTabbableNode:
|
|
3631
|
+
lastTabbableNode: O,
|
|
3632
3632
|
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
3633
3633
|
// would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
|
|
3634
3634
|
// because that API doesn't work with Shadow DOM as well as it should (@see
|
|
@@ -3637,7 +3637,7 @@ var Vr = {
|
|
|
3637
3637
|
// "close enough most of the time" alternative for positive tabindexes which should generally
|
|
3638
3638
|
// be avoided anyway...
|
|
3639
3639
|
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
3640
|
-
firstDomTabbableNode:
|
|
3640
|
+
firstDomTabbableNode: D,
|
|
3641
3641
|
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
3642
3642
|
lastDomTabbableNode: V,
|
|
3643
3643
|
/**
|
|
@@ -3648,11 +3648,11 @@ var Vr = {
|
|
|
3648
3648
|
* in reverse.
|
|
3649
3649
|
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
3650
3650
|
*/
|
|
3651
|
-
nextTabbableNode: function(
|
|
3652
|
-
var Z = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, z = x.indexOf(
|
|
3653
|
-
return z < 0 ? Z ?
|
|
3651
|
+
nextTabbableNode: function($) {
|
|
3652
|
+
var Z = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, z = x.indexOf($);
|
|
3653
|
+
return z < 0 ? Z ? S.slice(S.indexOf($) + 1).find(function(W) {
|
|
3654
3654
|
return Ue(W);
|
|
3655
|
-
}) :
|
|
3655
|
+
}) : S.slice(0, S.indexOf($)).reverse().find(function(W) {
|
|
3656
3656
|
return Ue(W);
|
|
3657
3657
|
}) : x[z + (Z ? 1 : -1)];
|
|
3658
3658
|
}
|
|
@@ -3665,14 +3665,14 @@ var Vr = {
|
|
|
3665
3665
|
return T.posTabIndexesFound;
|
|
3666
3666
|
}) && o.containerGroups.length > 1)
|
|
3667
3667
|
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
3668
|
-
}, p = function
|
|
3668
|
+
}, p = function M(T) {
|
|
3669
3669
|
var x = T.activeElement;
|
|
3670
3670
|
if (x)
|
|
3671
|
-
return x.shadowRoot && x.shadowRoot.activeElement !== null ?
|
|
3672
|
-
}, g = function
|
|
3671
|
+
return x.shadowRoot && x.shadowRoot.activeElement !== null ? M(x.shadowRoot) : x;
|
|
3672
|
+
}, g = function M(T) {
|
|
3673
3673
|
if (T !== !1 && T !== p(document)) {
|
|
3674
3674
|
if (!T || !T.focus) {
|
|
3675
|
-
|
|
3675
|
+
M(d());
|
|
3676
3676
|
return;
|
|
3677
3677
|
}
|
|
3678
3678
|
T.focus({
|
|
@@ -3683,23 +3683,23 @@ var Vr = {
|
|
|
3683
3683
|
var x = f("setReturnFocus", T);
|
|
3684
3684
|
return x || (x === !1 ? !1 : T);
|
|
3685
3685
|
}, b = function(T) {
|
|
3686
|
-
var x = T.target,
|
|
3687
|
-
x = x || Tt(
|
|
3688
|
-
var
|
|
3686
|
+
var x = T.target, S = T.event, I = T.isBackward, O = I === void 0 ? !1 : I;
|
|
3687
|
+
x = x || Tt(S), m();
|
|
3688
|
+
var D = null;
|
|
3689
3689
|
if (o.tabbableGroups.length > 0) {
|
|
3690
|
-
var V = l(x,
|
|
3690
|
+
var V = l(x, S), ee = V >= 0 ? o.containerGroups[V] : void 0;
|
|
3691
3691
|
if (V < 0)
|
|
3692
|
-
|
|
3693
|
-
else if (
|
|
3692
|
+
O ? D = o.tabbableGroups[o.tabbableGroups.length - 1].lastTabbableNode : D = o.tabbableGroups[0].firstTabbableNode;
|
|
3693
|
+
else if (O) {
|
|
3694
3694
|
var j = Kr(o.tabbableGroups, function(Y) {
|
|
3695
3695
|
var H = Y.firstTabbableNode;
|
|
3696
3696
|
return x === H;
|
|
3697
3697
|
});
|
|
3698
3698
|
if (j < 0 && (ee.container === x || Dt(x, s.tabbableOptions) && !Ue(x, s.tabbableOptions) && !ee.nextTabbableNode(x, !1)) && (j = V), j >= 0) {
|
|
3699
|
-
var
|
|
3700
|
-
|
|
3699
|
+
var $ = j === 0 ? o.tabbableGroups.length - 1 : j - 1, Z = o.tabbableGroups[$];
|
|
3700
|
+
D = Le(x) >= 0 ? Z.lastTabbableNode : Z.lastDomTabbableNode;
|
|
3701
3701
|
} else
|
|
3702
|
-
mt(
|
|
3702
|
+
mt(S) || (D = ee.nextTabbableNode(x, !1));
|
|
3703
3703
|
} else {
|
|
3704
3704
|
var z = Kr(o.tabbableGroups, function(Y) {
|
|
3705
3705
|
var H = Y.lastTabbableNode;
|
|
@@ -3707,13 +3707,13 @@ var Vr = {
|
|
|
3707
3707
|
});
|
|
3708
3708
|
if (z < 0 && (ee.container === x || Dt(x, s.tabbableOptions) && !Ue(x, s.tabbableOptions) && !ee.nextTabbableNode(x)) && (z = V), z >= 0) {
|
|
3709
3709
|
var W = z === o.tabbableGroups.length - 1 ? 0 : z + 1, X = o.tabbableGroups[W];
|
|
3710
|
-
|
|
3710
|
+
D = Le(x) >= 0 ? X.firstTabbableNode : X.firstDomTabbableNode;
|
|
3711
3711
|
} else
|
|
3712
|
-
mt(
|
|
3712
|
+
mt(S) || (D = ee.nextTabbableNode(x));
|
|
3713
3713
|
}
|
|
3714
3714
|
} else
|
|
3715
|
-
|
|
3716
|
-
return
|
|
3715
|
+
D = f("fallbackFocus");
|
|
3716
|
+
return D;
|
|
3717
3717
|
}, y = function(T) {
|
|
3718
3718
|
var x = Tt(T);
|
|
3719
3719
|
if (!(l(x, T) >= 0)) {
|
|
@@ -3732,45 +3732,45 @@ var Vr = {
|
|
|
3732
3732
|
ot(s.allowOutsideClick, T) || T.preventDefault();
|
|
3733
3733
|
}
|
|
3734
3734
|
}, _ = function(T) {
|
|
3735
|
-
var x = Tt(T),
|
|
3736
|
-
if (
|
|
3737
|
-
|
|
3735
|
+
var x = Tt(T), S = l(x, T) >= 0;
|
|
3736
|
+
if (S || x instanceof Document)
|
|
3737
|
+
S && (o.mostRecentlyFocusedNode = x);
|
|
3738
3738
|
else {
|
|
3739
3739
|
T.stopImmediatePropagation();
|
|
3740
|
-
var
|
|
3740
|
+
var I, O = !0;
|
|
3741
3741
|
if (o.mostRecentlyFocusedNode)
|
|
3742
3742
|
if (Le(o.mostRecentlyFocusedNode) > 0) {
|
|
3743
|
-
var
|
|
3743
|
+
var D = l(o.mostRecentlyFocusedNode), V = o.containerGroups[D].tabbableNodes;
|
|
3744
3744
|
if (V.length > 0) {
|
|
3745
3745
|
var ee = V.findIndex(function(j) {
|
|
3746
3746
|
return j === o.mostRecentlyFocusedNode;
|
|
3747
3747
|
});
|
|
3748
|
-
ee >= 0 && (s.isKeyForward(o.recentNavEvent) ? ee + 1 < V.length && (
|
|
3748
|
+
ee >= 0 && (s.isKeyForward(o.recentNavEvent) ? ee + 1 < V.length && (I = V[ee + 1], O = !1) : ee - 1 >= 0 && (I = V[ee - 1], O = !1));
|
|
3749
3749
|
}
|
|
3750
3750
|
} else
|
|
3751
3751
|
o.containerGroups.some(function(j) {
|
|
3752
|
-
return j.tabbableNodes.some(function(
|
|
3753
|
-
return Le(
|
|
3752
|
+
return j.tabbableNodes.some(function($) {
|
|
3753
|
+
return Le($) > 0;
|
|
3754
3754
|
});
|
|
3755
|
-
}) || (
|
|
3755
|
+
}) || (O = !1);
|
|
3756
3756
|
else
|
|
3757
|
-
|
|
3758
|
-
|
|
3757
|
+
O = !1;
|
|
3758
|
+
O && (I = b({
|
|
3759
3759
|
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
3760
3760
|
// outside the trap causing the focus escape we're trying to fix)
|
|
3761
3761
|
target: o.mostRecentlyFocusedNode,
|
|
3762
3762
|
isBackward: s.isKeyBackward(o.recentNavEvent)
|
|
3763
|
-
})), g(
|
|
3763
|
+
})), g(I || o.mostRecentlyFocusedNode || d());
|
|
3764
3764
|
}
|
|
3765
3765
|
o.recentNavEvent = void 0;
|
|
3766
3766
|
}, E = function(T) {
|
|
3767
3767
|
var x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
3768
3768
|
o.recentNavEvent = T;
|
|
3769
|
-
var
|
|
3769
|
+
var S = b({
|
|
3770
3770
|
event: T,
|
|
3771
3771
|
isBackward: x
|
|
3772
3772
|
});
|
|
3773
|
-
|
|
3773
|
+
S && (mt(T) && T.preventDefault(), g(S));
|
|
3774
3774
|
}, k = function(T) {
|
|
3775
3775
|
if (go(T) && ot(s.escapeDeactivates, T) !== !1) {
|
|
3776
3776
|
T.preventDefault(), c.deactivate();
|
|
@@ -3797,20 +3797,20 @@ var Vr = {
|
|
|
3797
3797
|
capture: !0,
|
|
3798
3798
|
passive: !1
|
|
3799
3799
|
}), c;
|
|
3800
|
-
},
|
|
3800
|
+
}, R = function() {
|
|
3801
3801
|
if (o.active)
|
|
3802
3802
|
return r.removeEventListener("focusin", _, !0), r.removeEventListener("mousedown", y, !0), r.removeEventListener("touchstart", y, !0), r.removeEventListener("click", w, !0), r.removeEventListener("keydown", k, !0), c;
|
|
3803
|
-
},
|
|
3804
|
-
var x = T.some(function(
|
|
3805
|
-
var
|
|
3806
|
-
return
|
|
3807
|
-
return
|
|
3803
|
+
}, N = function(T) {
|
|
3804
|
+
var x = T.some(function(S) {
|
|
3805
|
+
var I = Array.from(S.removedNodes);
|
|
3806
|
+
return I.some(function(O) {
|
|
3807
|
+
return O === o.mostRecentlyFocusedNode;
|
|
3808
3808
|
});
|
|
3809
3809
|
});
|
|
3810
3810
|
x && g(d());
|
|
3811
|
-
},
|
|
3812
|
-
|
|
3813
|
-
|
|
3811
|
+
}, B = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(N) : void 0, L = function() {
|
|
3812
|
+
B && (B.disconnect(), o.active && !o.paused && o.containers.map(function(T) {
|
|
3813
|
+
B.observe(T, {
|
|
3814
3814
|
subtree: !0,
|
|
3815
3815
|
childList: !0
|
|
3816
3816
|
});
|
|
@@ -3826,12 +3826,12 @@ var Vr = {
|
|
|
3826
3826
|
activate: function(T) {
|
|
3827
3827
|
if (o.active)
|
|
3828
3828
|
return this;
|
|
3829
|
-
var x = u(T, "onActivate"),
|
|
3830
|
-
|
|
3831
|
-
var
|
|
3832
|
-
|
|
3829
|
+
var x = u(T, "onActivate"), S = u(T, "onPostActivate"), I = u(T, "checkCanFocusTrap");
|
|
3830
|
+
I || m(), o.active = !0, o.paused = !1, o.nodeFocusedBeforeActivation = r.activeElement, x == null || x();
|
|
3831
|
+
var O = function() {
|
|
3832
|
+
I && m(), U(), L(), S == null || S();
|
|
3833
3833
|
};
|
|
3834
|
-
return
|
|
3834
|
+
return I ? (I(o.containers.concat()).then(O, O), this) : (O(), this);
|
|
3835
3835
|
},
|
|
3836
3836
|
deactivate: function(T) {
|
|
3837
3837
|
if (!o.active)
|
|
@@ -3841,33 +3841,33 @@ var Vr = {
|
|
|
3841
3841
|
onPostDeactivate: s.onPostDeactivate,
|
|
3842
3842
|
checkCanReturnFocus: s.checkCanReturnFocus
|
|
3843
3843
|
}, T);
|
|
3844
|
-
clearTimeout(o.delayInitialFocusTimer), o.delayInitialFocusTimer = void 0,
|
|
3845
|
-
var
|
|
3846
|
-
|
|
3844
|
+
clearTimeout(o.delayInitialFocusTimer), o.delayInitialFocusTimer = void 0, R(), o.active = !1, o.paused = !1, L(), Vr.deactivateTrap(a, c);
|
|
3845
|
+
var S = u(x, "onDeactivate"), I = u(x, "onPostDeactivate"), O = u(x, "checkCanReturnFocus"), D = u(x, "returnFocus", "returnFocusOnDeactivate");
|
|
3846
|
+
S == null || S();
|
|
3847
3847
|
var V = function() {
|
|
3848
3848
|
Yr(function() {
|
|
3849
|
-
|
|
3849
|
+
D && g(v(o.nodeFocusedBeforeActivation)), I == null || I();
|
|
3850
3850
|
});
|
|
3851
3851
|
};
|
|
3852
|
-
return
|
|
3852
|
+
return D && O ? (O(v(o.nodeFocusedBeforeActivation)).then(V, V), this) : (V(), this);
|
|
3853
3853
|
},
|
|
3854
3854
|
pause: function(T) {
|
|
3855
3855
|
if (o.paused || !o.active)
|
|
3856
3856
|
return this;
|
|
3857
|
-
var x = u(T, "onPause"),
|
|
3858
|
-
return o.paused = !0, x == null || x(),
|
|
3857
|
+
var x = u(T, "onPause"), S = u(T, "onPostPause");
|
|
3858
|
+
return o.paused = !0, x == null || x(), R(), L(), S == null || S(), this;
|
|
3859
3859
|
},
|
|
3860
3860
|
unpause: function(T) {
|
|
3861
3861
|
if (!o.paused || !o.active)
|
|
3862
3862
|
return this;
|
|
3863
|
-
var x = u(T, "onUnpause"),
|
|
3864
|
-
return o.paused = !1, x == null || x(), m(), U(),
|
|
3863
|
+
var x = u(T, "onUnpause"), S = u(T, "onPostUnpause");
|
|
3864
|
+
return o.paused = !1, x == null || x(), m(), U(), L(), S == null || S(), this;
|
|
3865
3865
|
},
|
|
3866
3866
|
updateContainerElements: function(T) {
|
|
3867
3867
|
var x = [].concat(T).filter(Boolean);
|
|
3868
|
-
return o.containers = x.map(function(
|
|
3869
|
-
return typeof
|
|
3870
|
-
}), o.active && m(),
|
|
3868
|
+
return o.containers = x.map(function(S) {
|
|
3869
|
+
return typeof S == "string" ? r.querySelector(S) : S;
|
|
3870
|
+
}), o.active && m(), L(), this;
|
|
3871
3871
|
}
|
|
3872
3872
|
}, c.updateContainerElements(e), c;
|
|
3873
3873
|
};
|
|
@@ -3907,7 +3907,7 @@ function Wn(t, e) {
|
|
|
3907
3907
|
}, Wn(t, e);
|
|
3908
3908
|
}
|
|
3909
3909
|
function So(t) {
|
|
3910
|
-
var e =
|
|
3910
|
+
var e = No();
|
|
3911
3911
|
return function() {
|
|
3912
3912
|
var r = Ht(t), a;
|
|
3913
3913
|
if (e) {
|
|
@@ -3930,7 +3930,7 @@ function ut(t) {
|
|
|
3930
3930
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3931
3931
|
return t;
|
|
3932
3932
|
}
|
|
3933
|
-
function
|
|
3933
|
+
function No() {
|
|
3934
3934
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
3935
3935
|
return !1;
|
|
3936
3936
|
if (typeof Proxy == "function")
|
|
@@ -3947,7 +3947,7 @@ function Ht(t) {
|
|
|
3947
3947
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
3948
3948
|
}, Ht(t);
|
|
3949
3949
|
}
|
|
3950
|
-
function
|
|
3950
|
+
function $o(t, e, n) {
|
|
3951
3951
|
return e = Ua(e), e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
|
|
3952
3952
|
}
|
|
3953
3953
|
function Ua(t) {
|
|
@@ -3971,7 +3971,7 @@ var Et = K, G = Ma, Ro = wo, Mo = Ro.createFocusTrap, Oo = jo, Fo = Oo.isFocusab
|
|
|
3971
3971
|
var e = So(n);
|
|
3972
3972
|
function n(r) {
|
|
3973
3973
|
var a;
|
|
3974
|
-
ko(this, n), a = e.call(this, r),
|
|
3974
|
+
ko(this, n), a = e.call(this, r), $o(ut(a), "getNodeForOption", function(c) {
|
|
3975
3975
|
var u, l = (u = this.internalOptions[c]) !== null && u !== void 0 ? u : this.originalOptions[c];
|
|
3976
3976
|
if (typeof l == "function") {
|
|
3977
3977
|
for (var f = arguments.length, d = new Array(f > 1 ? f - 1 : 0), m = 1; m < f; m++)
|
|
@@ -4211,7 +4211,7 @@ sr.defaultProps = {
|
|
|
4211
4211
|
var Ao = sr;
|
|
4212
4212
|
const Do = /* @__PURE__ */ en(Ao);
|
|
4213
4213
|
const za = ({ element: t = "section", children: e, className: n, ...r }) => K.createElement(t, {
|
|
4214
|
-
className:
|
|
4214
|
+
className: C("modal", n),
|
|
4215
4215
|
children: typeof e == "string" ? /* @__PURE__ */ i.jsx("p", { children: e }) : e,
|
|
4216
4216
|
...r
|
|
4217
4217
|
});
|
|
@@ -4243,11 +4243,11 @@ const nn = ({
|
|
|
4243
4243
|
b(e);
|
|
4244
4244
|
}, [e]);
|
|
4245
4245
|
const y = r ? { "--max-width": `${r / 16}rem` } : {};
|
|
4246
|
-
return /* @__PURE__ */ i.jsx("div", { className:
|
|
4246
|
+
return /* @__PURE__ */ i.jsx("div", { className: C("overlay", { open: p }), role: "dialog", children: /* @__PURE__ */ i.jsx(
|
|
4247
4247
|
za,
|
|
4248
4248
|
{
|
|
4249
4249
|
id: t,
|
|
4250
|
-
className:
|
|
4250
|
+
className: C("overlay-modal", f, {
|
|
4251
4251
|
"has-max-width": r
|
|
4252
4252
|
}),
|
|
4253
4253
|
hidden: !p,
|
|
@@ -4443,7 +4443,7 @@ const St = "emailHelperTextBox_", Io = ({
|
|
|
4443
4443
|
type: c,
|
|
4444
4444
|
id: n,
|
|
4445
4445
|
name: s,
|
|
4446
|
-
className:
|
|
4446
|
+
className: C(t, e, {
|
|
4447
4447
|
"has-scrollbar": c === "textarea" && d.current && d.current.clientHeight < d.current.scrollHeight
|
|
4448
4448
|
}),
|
|
4449
4449
|
value: u,
|
|
@@ -4501,7 +4501,7 @@ const Za = ({
|
|
|
4501
4501
|
const _ = y.target;
|
|
4502
4502
|
_.nodeName.toLowerCase() === "a" || _.parentNode && _.parentNode.nodeName.toLowerCase() === "a" || (y.preventDefault(), y.stopPropagation(), v());
|
|
4503
4503
|
},
|
|
4504
|
-
className:
|
|
4504
|
+
className: C("checkbox-wrapper", t),
|
|
4505
4505
|
...d,
|
|
4506
4506
|
...g
|
|
4507
4507
|
},
|
|
@@ -4514,7 +4514,7 @@ const Bo = Ae(function({
|
|
|
4514
4514
|
return /* @__PURE__ */ i.jsx(
|
|
4515
4515
|
er,
|
|
4516
4516
|
{
|
|
4517
|
-
className:
|
|
4517
|
+
className: C("rotating-chevron", `direction-${e}`)
|
|
4518
4518
|
}
|
|
4519
4519
|
);
|
|
4520
4520
|
});
|
|
@@ -4534,23 +4534,23 @@ const qo = ({
|
|
|
4534
4534
|
}) => {
|
|
4535
4535
|
const f = Q(), [d, m] = ne(!1), p = r || n, g = Array.isArray(p) ? [...p] : p ? [p] : [], [v, b] = ne(g);
|
|
4536
4536
|
let y;
|
|
4537
|
-
Array.isArray(v) && v.length === 1 && typeof v[0] == "string" ? y = e && v ? e.find((
|
|
4537
|
+
Array.isArray(v) && v.length === 1 && typeof v[0] == "string" ? y = e && v ? e.find((R) => R.id === v[0]) : e ? e[0] : { id: "", label: "" } : Array.isArray(v) && v.length === 1 && typeof v[0] != "string" ? y = v[0] : y = { id: "", label: "" }, se(() => {
|
|
4538
4538
|
b(g);
|
|
4539
4539
|
}, [r, n]);
|
|
4540
|
-
const { onChange: _, onMultiSelectSubmit: E, ...k } = a, w = (
|
|
4540
|
+
const { onChange: _, onMultiSelectSubmit: E, ...k } = a, w = (R) => {
|
|
4541
4541
|
if (c) {
|
|
4542
|
-
let
|
|
4543
|
-
v != null && v.includes(
|
|
4542
|
+
let N = [];
|
|
4543
|
+
v != null && v.includes(R.id) ? N = v.filter((B) => B !== R.id) : N = [...v, R.id], b([...N]), _ && _([...N]);
|
|
4544
4544
|
} else
|
|
4545
|
-
b([
|
|
4546
|
-
}, U = (
|
|
4547
|
-
if (
|
|
4548
|
-
const
|
|
4549
|
-
b(
|
|
4545
|
+
b([R]), _ && _(R.id), m(!1);
|
|
4546
|
+
}, U = (R) => {
|
|
4547
|
+
if (R === "all") {
|
|
4548
|
+
const N = (e == null ? void 0 : e.map((B) => B.id)) || [];
|
|
4549
|
+
b(N), _ && _(N);
|
|
4550
4550
|
} else
|
|
4551
4551
|
b([]), _ && _([]);
|
|
4552
4552
|
};
|
|
4553
|
-
return /* @__PURE__ */ i.jsxs("div", { className:
|
|
4553
|
+
return /* @__PURE__ */ i.jsxs("div", { className: C("dropdown-wrapper", t), children: [
|
|
4554
4554
|
/* @__PURE__ */ i.jsxs(
|
|
4555
4555
|
"button",
|
|
4556
4556
|
{
|
|
@@ -4558,8 +4558,8 @@ const qo = ({
|
|
|
4558
4558
|
"aria-expanded": d,
|
|
4559
4559
|
"aria-haspopup": "listbox",
|
|
4560
4560
|
"aria-controls": "dropdown-list",
|
|
4561
|
-
onClick: (
|
|
4562
|
-
|
|
4561
|
+
onClick: (R) => {
|
|
4562
|
+
R.preventDefault(), R.stopPropagation(), m(!d);
|
|
4563
4563
|
},
|
|
4564
4564
|
"data-testid": "dropdown-selector",
|
|
4565
4565
|
...k,
|
|
@@ -4573,14 +4573,14 @@ const qo = ({
|
|
|
4573
4573
|
"select",
|
|
4574
4574
|
{
|
|
4575
4575
|
defaultValue: y.id,
|
|
4576
|
-
onChange: (
|
|
4577
|
-
|
|
4578
|
-
const
|
|
4579
|
-
w(
|
|
4576
|
+
onChange: (R) => {
|
|
4577
|
+
R.preventDefault(), R.stopPropagation();
|
|
4578
|
+
const N = e && e.find((B) => B.id === R.target.value);
|
|
4579
|
+
w(N);
|
|
4580
4580
|
},
|
|
4581
4581
|
hidden: !d,
|
|
4582
4582
|
...k,
|
|
4583
|
-
children: e == null ? void 0 : e.map((
|
|
4583
|
+
children: e == null ? void 0 : e.map((R) => /* @__PURE__ */ i.jsx("option", { value: R.id, children: R.label }, R.id))
|
|
4584
4584
|
}
|
|
4585
4585
|
),
|
|
4586
4586
|
/* @__PURE__ */ i.jsxs(
|
|
@@ -4616,29 +4616,29 @@ const qo = ({
|
|
|
4616
4616
|
) })
|
|
4617
4617
|
] })
|
|
4618
4618
|
] }),
|
|
4619
|
-
/* @__PURE__ */ i.jsx("ul", { children: e == null ? void 0 : e.map((
|
|
4620
|
-
const
|
|
4619
|
+
/* @__PURE__ */ i.jsx("ul", { children: e == null ? void 0 : e.map((R) => {
|
|
4620
|
+
const N = R.id === y.id || (v == null ? void 0 : v.includes(R)) || (v == null ? void 0 : v.includes(R.id));
|
|
4621
4621
|
return /* @__PURE__ */ i.jsx("li", { "data-testid": "dropdown-options", children: /* @__PURE__ */ i.jsxs(
|
|
4622
4622
|
"button",
|
|
4623
4623
|
{
|
|
4624
|
-
className:
|
|
4625
|
-
selected:
|
|
4626
|
-
"selected-single":
|
|
4624
|
+
className: C("gtm-trackable", {
|
|
4625
|
+
selected: N,
|
|
4626
|
+
"selected-single": N && !c
|
|
4627
4627
|
}),
|
|
4628
|
-
"data-gtm-event-type": `${
|
|
4628
|
+
"data-gtm-event-type": `${R}-click`,
|
|
4629
4629
|
"data-gtm-event-context": s,
|
|
4630
|
-
onClick: (
|
|
4631
|
-
|
|
4630
|
+
onClick: (B) => {
|
|
4631
|
+
B.preventDefault(), B.stopPropagation(), w(R);
|
|
4632
4632
|
},
|
|
4633
4633
|
role: "menuitem",
|
|
4634
|
-
"aria-current":
|
|
4635
|
-
"data-testid":
|
|
4634
|
+
"aria-current": N,
|
|
4635
|
+
"data-testid": N ? "current-selection" : "",
|
|
4636
4636
|
children: [
|
|
4637
4637
|
c && /* @__PURE__ */ i.jsx("span", { className: "pretty-checkbox", "data-testid": "pretty-checkbox" }),
|
|
4638
|
-
/* @__PURE__ */ i.jsx("span", { className:
|
|
4638
|
+
/* @__PURE__ */ i.jsx("span", { className: C({ "menu-option-label": c }), children: R.label })
|
|
4639
4639
|
]
|
|
4640
4640
|
}
|
|
4641
|
-
) },
|
|
4641
|
+
) }, R.id);
|
|
4642
4642
|
}) })
|
|
4643
4643
|
] }),
|
|
4644
4644
|
(u == null ? void 0 : u.submitSection) && /* @__PURE__ */ i.jsx("p", { className: "submit", children: /* @__PURE__ */ i.jsx(
|
|
@@ -4683,7 +4683,7 @@ const Uo = ({
|
|
|
4683
4683
|
"ul",
|
|
4684
4684
|
{
|
|
4685
4685
|
...d,
|
|
4686
|
-
className:
|
|
4686
|
+
className: C("options-wrapper", t),
|
|
4687
4687
|
"data-testid": `ul-${r}`,
|
|
4688
4688
|
children: c == null ? void 0 : c.map(
|
|
4689
4689
|
({
|
|
@@ -4743,7 +4743,7 @@ const zo = ({
|
|
|
4743
4743
|
"button",
|
|
4744
4744
|
{
|
|
4745
4745
|
type: "button",
|
|
4746
|
-
className:
|
|
4746
|
+
className: C("show-password gtm-trackable", {
|
|
4747
4747
|
"password-visible": c
|
|
4748
4748
|
}),
|
|
4749
4749
|
"data-gtm-event-context": n,
|
|
@@ -4816,7 +4816,7 @@ const Ve = {
|
|
|
4816
4816
|
{
|
|
4817
4817
|
...b,
|
|
4818
4818
|
label: y,
|
|
4819
|
-
className:
|
|
4819
|
+
className: C("field-wrapper", n)
|
|
4820
4820
|
}
|
|
4821
4821
|
),
|
|
4822
4822
|
/* @__PURE__ */ i.jsx(_, { as: "p" })
|
|
@@ -4826,7 +4826,7 @@ const Ve = {
|
|
|
4826
4826
|
className: "checkboxes-label text-small",
|
|
4827
4827
|
"data-testid": `label-${t}`
|
|
4828
4828
|
});
|
|
4829
|
-
return /* @__PURE__ */ i.jsxs("dl", { className:
|
|
4829
|
+
return /* @__PURE__ */ i.jsxs("dl", { className: C("field-wrapper text-medium", n), children: [
|
|
4830
4830
|
/* @__PURE__ */ i.jsx("dt", { children: /* @__PURE__ */ i.jsxs(E, { ...v, children: [
|
|
4831
4831
|
y,
|
|
4832
4832
|
m && o && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
@@ -4843,7 +4843,7 @@ const Ve = {
|
|
|
4843
4843
|
s > 0 ? /* @__PURE__ */ i.jsxs(
|
|
4844
4844
|
"small",
|
|
4845
4845
|
{
|
|
4846
|
-
className:
|
|
4846
|
+
className: C("character-limit", {
|
|
4847
4847
|
"near-limit": p >= 0.99 * s,
|
|
4848
4848
|
"approaching-limit": p >= 0.9 * s && p < 0.99 * s
|
|
4849
4849
|
}),
|
|
@@ -4996,81 +4996,81 @@ const or = ({
|
|
|
4996
4996
|
...b
|
|
4997
4997
|
}) => {
|
|
4998
4998
|
const { customOnSubmit: y, hideButton: _, ...E } = s, k = 40, w = Q(), U = {};
|
|
4999
|
-
t.length && t.forEach((
|
|
5000
|
-
const
|
|
5001
|
-
|
|
4999
|
+
t.length && t.forEach((O) => {
|
|
5000
|
+
const D = O.id || O.name;
|
|
5001
|
+
D && (U[D] = O.value || "");
|
|
5002
5002
|
});
|
|
5003
|
-
const [
|
|
5003
|
+
const [R, N] = Jn(Wo, {
|
|
5004
5004
|
isSubmitting: !1,
|
|
5005
5005
|
formSubmitted: !1,
|
|
5006
5006
|
errors: {},
|
|
5007
5007
|
values: U
|
|
5008
|
-
}), { errors:
|
|
5008
|
+
}), { errors: B, isSubmitting: L, formSubmitted: M, values: T } = R;
|
|
5009
5009
|
se(() => {
|
|
5010
|
-
u &&
|
|
5011
|
-
|
|
5010
|
+
u && M && (wn = setTimeout(() => {
|
|
5011
|
+
N({
|
|
5012
5012
|
type: "updateValue",
|
|
5013
5013
|
payload: { key: "formSubmitted", value: !1 }
|
|
5014
5014
|
});
|
|
5015
5015
|
}, 3e3));
|
|
5016
|
-
}, [
|
|
5016
|
+
}, [M]), se(() => () => {
|
|
5017
5017
|
wn && clearTimeout(wn);
|
|
5018
5018
|
}, []), se(() => {
|
|
5019
|
-
const
|
|
5020
|
-
|
|
5019
|
+
const O = (D) => {
|
|
5020
|
+
N({
|
|
5021
5021
|
type: "updateValue",
|
|
5022
|
-
payload: { key:
|
|
5022
|
+
payload: { key: D.detail.id, value: D.detail.value }
|
|
5023
5023
|
});
|
|
5024
5024
|
};
|
|
5025
5025
|
return document.addEventListener(
|
|
5026
5026
|
"dropdownMultiSelectSubmit",
|
|
5027
|
-
|
|
5027
|
+
O
|
|
5028
5028
|
), () => {
|
|
5029
5029
|
document.removeEventListener(
|
|
5030
5030
|
"dropdownMultiSelectSubmit",
|
|
5031
|
-
|
|
5031
|
+
O
|
|
5032
5032
|
);
|
|
5033
5033
|
};
|
|
5034
5034
|
}, []);
|
|
5035
|
-
const x = pe(null),
|
|
5035
|
+
const x = pe(null), S = r || x;
|
|
5036
5036
|
if (!t.length)
|
|
5037
5037
|
return null;
|
|
5038
5038
|
s.text || (s.text = w.formatMessage({ id: "form_submit" }));
|
|
5039
|
-
const
|
|
5039
|
+
const I = (O) => {
|
|
5040
5040
|
var ee;
|
|
5041
|
-
if (
|
|
5041
|
+
if (O.preventDefault(), O.stopPropagation(), L)
|
|
5042
5042
|
return;
|
|
5043
|
-
let
|
|
5044
|
-
if ((ee =
|
|
5045
|
-
const j = document.getElementById(
|
|
5046
|
-
j && (
|
|
5043
|
+
let D = 0;
|
|
5044
|
+
if ((ee = S == null ? void 0 : S.current) != null && ee.id) {
|
|
5045
|
+
const j = document.getElementById(S.current.id);
|
|
5046
|
+
j && (D = j.getBoundingClientRect().top + window.scrollY);
|
|
5047
5047
|
}
|
|
5048
5048
|
const V = document.getElementById("header");
|
|
5049
|
-
if (V && (
|
|
5050
|
-
typeof s.disabled == "object" && s.disabled.isClickable &&
|
|
5049
|
+
if (V && (D = D - V.offsetHeight - k), D < 0 && (D = 0), window.scrollTo({ top: D, behavior: "smooth" }), N({ type: "toggleSubmitting" }), s.disabled) {
|
|
5050
|
+
typeof s.disabled == "object" && s.disabled.isClickable && N({
|
|
5051
5051
|
type: "submitForm",
|
|
5052
5052
|
payload: {
|
|
5053
5053
|
fields: t,
|
|
5054
|
-
dispatch:
|
|
5054
|
+
dispatch: N,
|
|
5055
5055
|
intl: w
|
|
5056
5056
|
}
|
|
5057
5057
|
});
|
|
5058
5058
|
return;
|
|
5059
5059
|
}
|
|
5060
|
-
|
|
5060
|
+
N({
|
|
5061
5061
|
type: "submitForm",
|
|
5062
5062
|
payload: {
|
|
5063
5063
|
fields: t,
|
|
5064
|
-
dispatch:
|
|
5064
|
+
dispatch: N,
|
|
5065
5065
|
onSuccess: async (j) => {
|
|
5066
5066
|
try {
|
|
5067
|
-
await m(j),
|
|
5068
|
-
} catch (
|
|
5069
|
-
g(
|
|
5067
|
+
await m(j), N({ type: u ? "formSubmittedAndReset" : "formSubmitted" });
|
|
5068
|
+
} catch ($) {
|
|
5069
|
+
g($), N({ type: "updateValue", payload: { key: "isSubmitting", value: !1 } });
|
|
5070
5070
|
}
|
|
5071
5071
|
},
|
|
5072
|
-
onFailure: (j,
|
|
5073
|
-
v(j,
|
|
5072
|
+
onFailure: (j, $) => {
|
|
5073
|
+
v(j, $), N({ type: "updateValue", payload: { key: "isSubmitting", value: !1 } });
|
|
5074
5074
|
},
|
|
5075
5075
|
intl: w
|
|
5076
5076
|
}
|
|
@@ -5082,45 +5082,45 @@ const or = ({
|
|
|
5082
5082
|
{
|
|
5083
5083
|
...b,
|
|
5084
5084
|
id: n,
|
|
5085
|
-
className:
|
|
5086
|
-
ref:
|
|
5085
|
+
className: C("form", e),
|
|
5086
|
+
ref: S,
|
|
5087
5087
|
children: [
|
|
5088
|
-
|
|
5088
|
+
B != null && B.general ? /* @__PURE__ */ i.jsx(
|
|
5089
5089
|
tt,
|
|
5090
5090
|
{
|
|
5091
5091
|
variant: "error",
|
|
5092
5092
|
text: w.formatMessage({ id: "form_error_generalError" })
|
|
5093
5093
|
}
|
|
5094
5094
|
) : null,
|
|
5095
|
-
(!
|
|
5095
|
+
(!L && !M || y) && t.map((O, D) => {
|
|
5096
5096
|
const {
|
|
5097
|
-
id: V =
|
|
5097
|
+
id: V = O.name || D,
|
|
5098
5098
|
component: ee,
|
|
5099
5099
|
functions: j = { onChange: () => {
|
|
5100
5100
|
} }
|
|
5101
|
-
} =
|
|
5101
|
+
} = O;
|
|
5102
5102
|
if (ee)
|
|
5103
|
-
return /* @__PURE__ */ i.jsx(ee, { ...
|
|
5104
|
-
const
|
|
5103
|
+
return /* @__PURE__ */ i.jsx(ee, { ...O.props || {} }, `component-${V}-${D}`);
|
|
5104
|
+
const $ = T ? T[V] : "";
|
|
5105
5105
|
return /* @__PURE__ */ i.jsx(
|
|
5106
5106
|
Zo,
|
|
5107
5107
|
{
|
|
5108
5108
|
intlPath: a,
|
|
5109
|
-
...
|
|
5109
|
+
...O,
|
|
5110
5110
|
showRequiredLabels: l,
|
|
5111
|
-
value:
|
|
5112
|
-
error:
|
|
5111
|
+
value: $,
|
|
5112
|
+
error: B == null ? void 0 : B[V],
|
|
5113
5113
|
functions: {
|
|
5114
5114
|
...j,
|
|
5115
5115
|
onChange: (Z) => {
|
|
5116
|
-
|
|
5116
|
+
N({ type: "updateValue", payload: { key: V, value: Z } }), j.onChange(Z && Z.toString(), N);
|
|
5117
5117
|
}
|
|
5118
5118
|
}
|
|
5119
5119
|
},
|
|
5120
5120
|
V
|
|
5121
5121
|
);
|
|
5122
5122
|
}),
|
|
5123
|
-
_ ? null : (
|
|
5123
|
+
_ ? null : (L || M) && y ? /* @__PURE__ */ i.jsxs("div", { className: "form-buttons", children: [
|
|
5124
5124
|
c && /* @__PURE__ */ i.jsx(
|
|
5125
5125
|
ae,
|
|
5126
5126
|
{
|
|
@@ -5128,7 +5128,7 @@ const or = ({
|
|
|
5128
5128
|
className: "gtm-trackable",
|
|
5129
5129
|
"data-gtm-event-context": d.context,
|
|
5130
5130
|
"data-gtm-event-type": d.event,
|
|
5131
|
-
disabled:
|
|
5131
|
+
disabled: L || M,
|
|
5132
5132
|
onClick: p,
|
|
5133
5133
|
children: o.text || w.formatMessage({ id: "form_cancel" })
|
|
5134
5134
|
}
|
|
@@ -5137,7 +5137,7 @@ const or = ({
|
|
|
5137
5137
|
] }) : /* @__PURE__ */ i.jsx(
|
|
5138
5138
|
"p",
|
|
5139
5139
|
{
|
|
5140
|
-
className: `cta ${
|
|
5140
|
+
className: `cta ${L || M ? "center" : ""} ${M ? "submitted" : ""}`,
|
|
5141
5141
|
children: /* @__PURE__ */ i.jsxs("div", { className: "form-buttons", children: [
|
|
5142
5142
|
c && /* @__PURE__ */ i.jsx(
|
|
5143
5143
|
ae,
|
|
@@ -5146,7 +5146,7 @@ const or = ({
|
|
|
5146
5146
|
className: "gtm-trackable",
|
|
5147
5147
|
"data-gtm-event-context": d.context,
|
|
5148
5148
|
"data-gtm-event-type": d.event,
|
|
5149
|
-
disabled:
|
|
5149
|
+
disabled: L || M,
|
|
5150
5150
|
onClick: p,
|
|
5151
5151
|
children: o.text || w.formatMessage({ id: "form_cancel" })
|
|
5152
5152
|
}
|
|
@@ -5155,14 +5155,14 @@ const or = ({
|
|
|
5155
5155
|
ae,
|
|
5156
5156
|
{
|
|
5157
5157
|
...E,
|
|
5158
|
-
icon:
|
|
5158
|
+
icon: M ? { icon: "tick", position: "left" } : !1,
|
|
5159
5159
|
className: "gtm-trackable",
|
|
5160
|
-
onClick:
|
|
5161
|
-
disabled:
|
|
5160
|
+
onClick: I,
|
|
5161
|
+
disabled: L || M || s.disabled,
|
|
5162
5162
|
"data-gtm-event-context": d.context,
|
|
5163
5163
|
"data-gtm-event-type": d.event,
|
|
5164
|
-
children:
|
|
5165
|
-
id: `form_${
|
|
5164
|
+
children: L || M ? w.formatMessage({
|
|
5165
|
+
id: `form_${L ? "submitting" : "submitted"}`
|
|
5166
5166
|
}) : s.text
|
|
5167
5167
|
}
|
|
5168
5168
|
)
|
|
@@ -5172,7 +5172,7 @@ const or = ({
|
|
|
5172
5172
|
]
|
|
5173
5173
|
}
|
|
5174
5174
|
),
|
|
5175
|
-
f &&
|
|
5175
|
+
f && M && /* @__PURE__ */ i.jsx(qt, { className: "success", children: typeof f == "string" ? f : w.formatMessage({ id: "form_success" }) })
|
|
5176
5176
|
] });
|
|
5177
5177
|
};
|
|
5178
5178
|
const Ct = "passwordRules_", Wa = "isMoreThanEightCharacters", Ha = "includesNumberAndSymbol", Va = "includesLowerAndUppercase", Ho = {
|
|
@@ -5188,13 +5188,13 @@ const Ct = "passwordRules_", Wa = "isMoreThanEightCharacters", Ha = "includesNum
|
|
|
5188
5188
|
className: e = ""
|
|
5189
5189
|
}) => {
|
|
5190
5190
|
const n = Q();
|
|
5191
|
-
return /* @__PURE__ */ i.jsxs("aside", { className:
|
|
5191
|
+
return /* @__PURE__ */ i.jsxs("aside", { className: C("password-rules", e), children: [
|
|
5192
5192
|
/* @__PURE__ */ i.jsx("small", { children: n.formatMessage({ id: `${Ct}intro` }) }),
|
|
5193
5193
|
/* @__PURE__ */ i.jsx("ul", { children: [Wa, Ha, Va].map(
|
|
5194
5194
|
(r) => /* @__PURE__ */ i.jsxs(
|
|
5195
5195
|
"li",
|
|
5196
5196
|
{
|
|
5197
|
-
className:
|
|
5197
|
+
className: C({ matches: t[r] }),
|
|
5198
5198
|
children: [
|
|
5199
5199
|
/* @__PURE__ */ i.jsxs(be, { children: [
|
|
5200
5200
|
n.formatMessage({ id: `${Ct}rule_label` }),
|
|
@@ -5263,14 +5263,14 @@ const dd = ({
|
|
|
5263
5263
|
l((_) => ({ ..._, disabled: !1 }));
|
|
5264
5264
|
}
|
|
5265
5265
|
};
|
|
5266
|
-
return /* @__PURE__ */ i.jsxs("div", { className:
|
|
5266
|
+
return /* @__PURE__ */ i.jsxs("div", { className: C("rating", s), children: [
|
|
5267
5267
|
/* @__PURE__ */ i.jsx("span", { className: "label", children: v[m ? "success" : "text"] }),
|
|
5268
5268
|
/* @__PURE__ */ i.jsx("ol", { children: Array.from(new Array(e).keys()).map((y) => {
|
|
5269
5269
|
const _ = y + 1;
|
|
5270
5270
|
return /* @__PURE__ */ i.jsx(
|
|
5271
5271
|
"li",
|
|
5272
5272
|
{
|
|
5273
|
-
className:
|
|
5273
|
+
className: C({ selected: m && _ <= m }),
|
|
5274
5274
|
children: /* @__PURE__ */ i.jsx(
|
|
5275
5275
|
ae,
|
|
5276
5276
|
{
|
|
@@ -5319,7 +5319,7 @@ const ud = ({
|
|
|
5319
5319
|
return /* @__PURE__ */ i.jsxs(
|
|
5320
5320
|
"div",
|
|
5321
5321
|
{
|
|
5322
|
-
className:
|
|
5322
|
+
className: C("toggle", o),
|
|
5323
5323
|
onClick: (f) => {
|
|
5324
5324
|
f.preventDefault(), f.stopPropagation(), l(c === n[0].value ? n[1].value : n[0].value);
|
|
5325
5325
|
},
|
|
@@ -5328,7 +5328,7 @@ const ud = ({
|
|
|
5328
5328
|
/* @__PURE__ */ i.jsx(
|
|
5329
5329
|
"ul",
|
|
5330
5330
|
{
|
|
5331
|
-
className:
|
|
5331
|
+
className: C("toggle-options", {
|
|
5332
5332
|
disabled: s,
|
|
5333
5333
|
on: c === n[1].value
|
|
5334
5334
|
}),
|
|
@@ -5455,7 +5455,7 @@ const Ko = ({
|
|
|
5455
5455
|
{
|
|
5456
5456
|
style: { backgroundColor: s },
|
|
5457
5457
|
onSubmit: y,
|
|
5458
|
-
className:
|
|
5458
|
+
className: C("invite-form gtm-trackable"),
|
|
5459
5459
|
children: [
|
|
5460
5460
|
/* @__PURE__ */ i.jsxs("fieldset", { className: "content", children: [
|
|
5461
5461
|
/* @__PURE__ */ i.jsx("h2", { className: "title", style: { color: r }, children: t }),
|
|
@@ -5515,7 +5515,7 @@ const Go = ({
|
|
|
5515
5515
|
"form",
|
|
5516
5516
|
{
|
|
5517
5517
|
onSubmit: f,
|
|
5518
|
-
className:
|
|
5518
|
+
className: C("search-form gtm-trackable", e),
|
|
5519
5519
|
"data-gtm-event-context": a,
|
|
5520
5520
|
"data-gtm-event-type": s,
|
|
5521
5521
|
children: /* @__PURE__ */ i.jsx(
|
|
@@ -5664,7 +5664,7 @@ function Xo(t, e) {
|
|
|
5664
5664
|
a = r[s], !(e.indexOf(a) >= 0) && (n[a] = t[a]);
|
|
5665
5665
|
return n;
|
|
5666
5666
|
}
|
|
5667
|
-
function
|
|
5667
|
+
function Nt(t) {
|
|
5668
5668
|
if (t === void 0)
|
|
5669
5669
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
5670
5670
|
return t;
|
|
@@ -5681,7 +5681,7 @@ var rn = /* @__PURE__ */ function(t) {
|
|
|
5681
5681
|
ec(e, t);
|
|
5682
5682
|
function e() {
|
|
5683
5683
|
var r;
|
|
5684
|
-
return r = t.call(this) || this, r.handleExpired = r.handleExpired.bind(
|
|
5684
|
+
return r = t.call(this) || this, r.handleExpired = r.handleExpired.bind(Nt(r)), r.handleErrored = r.handleErrored.bind(Nt(r)), r.handleChange = r.handleChange.bind(Nt(r)), r.handleRecaptchaRef = r.handleRecaptchaRef.bind(Nt(r)), r;
|
|
5685
5685
|
}
|
|
5686
5686
|
var n = e.prototype;
|
|
5687
5687
|
return n.getCaptchaFunction = function(a) {
|
|
@@ -5894,14 +5894,14 @@ function mc(t, e) {
|
|
|
5894
5894
|
this.asyncScriptLoaderHandleLoad(_);
|
|
5895
5895
|
return;
|
|
5896
5896
|
}
|
|
5897
|
-
_.observers[p] = function(
|
|
5898
|
-
return d.asyncScriptLoaderHandleLoad(
|
|
5897
|
+
_.observers[p] = function(R) {
|
|
5898
|
+
return d.asyncScriptLoaderHandleLoad(R);
|
|
5899
5899
|
};
|
|
5900
5900
|
return;
|
|
5901
5901
|
}
|
|
5902
5902
|
var E = {};
|
|
5903
|
-
E[p] = function(
|
|
5904
|
-
return d.asyncScriptLoaderHandleLoad(
|
|
5903
|
+
E[p] = function(R) {
|
|
5904
|
+
return d.asyncScriptLoaderHandleLoad(R);
|
|
5905
5905
|
}, Ee[m] = {
|
|
5906
5906
|
loaded: !1,
|
|
5907
5907
|
observers: E
|
|
@@ -5911,24 +5911,24 @@ function mc(t, e) {
|
|
|
5911
5911
|
for (var w in e.attributes)
|
|
5912
5912
|
k.setAttribute(w, e.attributes[w]);
|
|
5913
5913
|
y && (k.id = y);
|
|
5914
|
-
var U = function(
|
|
5914
|
+
var U = function(N) {
|
|
5915
5915
|
if (Ee[m]) {
|
|
5916
|
-
var
|
|
5917
|
-
for (var
|
|
5918
|
-
|
|
5916
|
+
var B = Ee[m], L = B.observers;
|
|
5917
|
+
for (var M in L)
|
|
5918
|
+
N(L[M]) && delete L[M];
|
|
5919
5919
|
}
|
|
5920
5920
|
};
|
|
5921
5921
|
b && typeof window < "u" && (window[b] = function() {
|
|
5922
5922
|
return d.asyncScriptLoaderTriggerOnScriptLoaded();
|
|
5923
5923
|
}), k.onload = function() {
|
|
5924
|
-
var
|
|
5925
|
-
|
|
5926
|
-
return b ? !1 : (
|
|
5924
|
+
var R = Ee[m];
|
|
5925
|
+
R && (R.loaded = !0, U(function(N) {
|
|
5926
|
+
return b ? !1 : (N(R), !0);
|
|
5927
5927
|
}));
|
|
5928
5928
|
}, k.onerror = function() {
|
|
5929
|
-
var
|
|
5930
|
-
|
|
5931
|
-
return
|
|
5929
|
+
var R = Ee[m];
|
|
5930
|
+
R && (R.errored = !0, U(function(N) {
|
|
5931
|
+
return N(R), !0;
|
|
5932
5932
|
}));
|
|
5933
5933
|
}, document.body.appendChild(k);
|
|
5934
5934
|
}, l.componentWillUnmount = function() {
|
|
@@ -5944,7 +5944,7 @@ function mc(t, e) {
|
|
|
5944
5944
|
var p = m.forwardedRef, g = dc(m, ["asyncScriptOnLoad", "forwardedRef"]);
|
|
5945
5945
|
return d && typeof window < "u" && (g[d] = typeof window[d] < "u" ? window[d] : void 0), g.ref = p, Cr(r, g);
|
|
5946
5946
|
}, u;
|
|
5947
|
-
}(Pi), o =
|
|
5947
|
+
}(Pi), o = $i(function(c, u) {
|
|
5948
5948
|
return Cr(s, Yn({}, c, {
|
|
5949
5949
|
forwardedRef: u
|
|
5950
5950
|
}));
|
|
@@ -6154,7 +6154,7 @@ const gc = mc(hc, {
|
|
|
6154
6154
|
const bc = ({ className: t = "" }) => /* @__PURE__ */ i.jsxs(
|
|
6155
6155
|
"div",
|
|
6156
6156
|
{
|
|
6157
|
-
className:
|
|
6157
|
+
className: C("success-message", t),
|
|
6158
6158
|
"data-testid": "success-message",
|
|
6159
6159
|
children: [
|
|
6160
6160
|
/* @__PURE__ */ i.jsx("p", { className: "success-title", children: /* @__PURE__ */ i.jsx(je, { id: "signup_success_title" }) }),
|
|
@@ -6247,7 +6247,7 @@ const yc = {
|
|
|
6247
6247
|
return n.successMessage && m ? /* @__PURE__ */ i.jsx(bc, { className: t }) : /* @__PURE__ */ i.jsxs(
|
|
6248
6248
|
"fieldset",
|
|
6249
6249
|
{
|
|
6250
|
-
className:
|
|
6250
|
+
className: C("signup-form-fieldset", t),
|
|
6251
6251
|
"data-testid": "signup-form",
|
|
6252
6252
|
children: [
|
|
6253
6253
|
n.title && /* @__PURE__ */ i.jsx("p", { className: "signup-title", children: /* @__PURE__ */ i.jsx(je, { id: "signup_title" }) }),
|
|
@@ -6340,7 +6340,7 @@ const md = ({
|
|
|
6340
6340
|
showDivider: !1,
|
|
6341
6341
|
showIcon: o,
|
|
6342
6342
|
functions: { onClose: c },
|
|
6343
|
-
className:
|
|
6343
|
+
className: C("invite-modal", t, { success: !!n }),
|
|
6344
6344
|
children: /* @__PURE__ */ i.jsx(
|
|
6345
6345
|
Ko,
|
|
6346
6346
|
{
|
|
@@ -6598,13 +6598,13 @@ const jc = {
|
|
|
6598
6598
|
gtmContext: a = "Carousel",
|
|
6599
6599
|
className: s = ""
|
|
6600
6600
|
}) => {
|
|
6601
|
-
const o = Q(), c =
|
|
6601
|
+
const o = Q(), c = $e(De), u = c && typeof c.id == "string", [l, f] = ne({
|
|
6602
6602
|
data: null,
|
|
6603
6603
|
isLoading: !0
|
|
6604
6604
|
}), { data: d, isLoading: m } = l, p = fa(() => {
|
|
6605
|
-
n(e, u).then((
|
|
6606
|
-
f(() => ({ data:
|
|
6607
|
-
}).catch(() => f((
|
|
6605
|
+
n(e, u).then((N) => {
|
|
6606
|
+
f(() => ({ data: N, isLoading: !1 }));
|
|
6607
|
+
}).catch(() => f((N) => ({ ...N, isLoading: !1 })));
|
|
6608
6608
|
}, [t]);
|
|
6609
6609
|
if (se(() => {
|
|
6610
6610
|
p();
|
|
@@ -6634,23 +6634,23 @@ const jc = {
|
|
|
6634
6634
|
"data-gtm-event-type": `${_}-click`,
|
|
6635
6635
|
"data-testid": "link"
|
|
6636
6636
|
}, d.openInNewTab && (U.target = "_blank"));
|
|
6637
|
-
const
|
|
6637
|
+
const R = d.customIcon ? { "--custom-icon": wc(d.customIcon) } : {};
|
|
6638
6638
|
return /* @__PURE__ */ i.jsx(
|
|
6639
6639
|
"li",
|
|
6640
6640
|
{
|
|
6641
|
-
className:
|
|
6641
|
+
className: C("card-wrapper text-medium", b, s, {
|
|
6642
6642
|
"has-link": k,
|
|
6643
6643
|
"no-link": !k,
|
|
6644
6644
|
"has-custom-icon": d.customIcon,
|
|
6645
6645
|
"has-image": d.banner
|
|
6646
6646
|
}),
|
|
6647
|
-
style:
|
|
6647
|
+
style: R,
|
|
6648
6648
|
"data-testid": `${g}-card`,
|
|
6649
6649
|
children: K.createElement(
|
|
6650
6650
|
k ? "a" : "div",
|
|
6651
6651
|
U,
|
|
6652
6652
|
/* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
6653
|
-
(d.customLabel || E) && /* @__PURE__ */ i.jsx("small", { className:
|
|
6653
|
+
(d.customLabel || E) && /* @__PURE__ */ i.jsx("small", { className: C("card-label text-small", b), children: d.customLabel || E }),
|
|
6654
6654
|
d.startDate && !d.isOngoingEvent && /* @__PURE__ */ i.jsx(
|
|
6655
6655
|
Bt,
|
|
6656
6656
|
{
|
|
@@ -6685,12 +6685,12 @@ const jc = {
|
|
|
6685
6685
|
),
|
|
6686
6686
|
d.partner && /* @__PURE__ */ i.jsx("p", { className: "partners", "data-testid": "partners", children: Ke(d.partner.title, w.partner) }),
|
|
6687
6687
|
/* Text */
|
|
6688
|
-
["title", "text", "secondaryText"].map((
|
|
6689
|
-
const
|
|
6690
|
-
if (!
|
|
6688
|
+
["title", "text", "secondaryText"].map((N) => {
|
|
6689
|
+
const B = d[N];
|
|
6690
|
+
if (!B)
|
|
6691
6691
|
return null;
|
|
6692
|
-
const
|
|
6693
|
-
return /* @__PURE__ */ i.jsx("p", { className:
|
|
6692
|
+
const L = es(N);
|
|
6693
|
+
return /* @__PURE__ */ i.jsx("p", { className: L, "data-testid": L, children: Ke(B, w[N]) }, N);
|
|
6694
6694
|
}),
|
|
6695
6695
|
/* @__PURE__ */ i.jsx(_c, { type: b || "", data: d }),
|
|
6696
6696
|
/* @__PURE__ */ i.jsx(xc, { data: d, cta: r, link: k || "", gtmContext: a })
|
|
@@ -6699,7 +6699,7 @@ const jc = {
|
|
|
6699
6699
|
}
|
|
6700
6700
|
);
|
|
6701
6701
|
};
|
|
6702
|
-
const kc = ({ cards: t, cardTypes: e, className: n = "", ...r }) => /* @__PURE__ */ i.jsx("ul", { className:
|
|
6702
|
+
const kc = ({ cards: t, cardTypes: e, className: n = "", ...r }) => /* @__PURE__ */ i.jsx("ul", { className: C("card-block", n), children: t.map((a, s) => {
|
|
6703
6703
|
const o = a.slug ? `${a.slug}-${e[s]}` : `${e[s]}-${s}`;
|
|
6704
6704
|
return /* @__PURE__ */ i.jsx(
|
|
6705
6705
|
Qa,
|
|
@@ -6719,7 +6719,7 @@ const kc = ({ cards: t, cardTypes: e, className: n = "", ...r }) => /* @__PURE__
|
|
|
6719
6719
|
return null;
|
|
6720
6720
|
const { text: r, element: a = "h2", variant: s = "default", size: o = "medium", link: c } = e;
|
|
6721
6721
|
return K.createElement(a, {
|
|
6722
|
-
className:
|
|
6722
|
+
className: C("title", s, o, {
|
|
6723
6723
|
"highlighted-title": s === "highlighted"
|
|
6724
6724
|
}),
|
|
6725
6725
|
children: /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
@@ -6742,7 +6742,7 @@ const jn = {
|
|
|
6742
6742
|
threeCards: 769,
|
|
6743
6743
|
twoCards: 480
|
|
6744
6744
|
};
|
|
6745
|
-
let
|
|
6745
|
+
let $t = null;
|
|
6746
6746
|
const Sc = ({
|
|
6747
6747
|
id: t,
|
|
6748
6748
|
cards: e,
|
|
@@ -6760,57 +6760,50 @@ const Sc = ({
|
|
|
6760
6760
|
loadedPages: [0]
|
|
6761
6761
|
}), { currentPage: g, loadedPages: v } = m, b = e.length, y = Math.ceil(b / f), _ = pe(null), E = yt(!0, !0, _ == null ? void 0 : _.current);
|
|
6762
6762
|
se(() => {
|
|
6763
|
-
let
|
|
6764
|
-
E && (E >= jn.fourCards ?
|
|
6765
|
-
...
|
|
6766
|
-
cardsPerPage:
|
|
6763
|
+
let N = 1;
|
|
6764
|
+
E && (E >= jn.fourCards ? N = 4 : E >= jn.threeCards ? N = 3 : E >= jn.twoCards && (N = 2), N > b && (N = b)), l((B) => ({
|
|
6765
|
+
...B,
|
|
6766
|
+
cardsPerPage: N,
|
|
6767
6767
|
isLoading: !1
|
|
6768
6768
|
}));
|
|
6769
6769
|
}, [E, b]);
|
|
6770
|
-
const k = (
|
|
6771
|
-
let
|
|
6772
|
-
if (typeof
|
|
6773
|
-
if (
|
|
6770
|
+
const k = (N = "next") => {
|
|
6771
|
+
let B = g;
|
|
6772
|
+
if (typeof N == "string")
|
|
6773
|
+
if (N === "next")
|
|
6774
6774
|
if (g < y - 1)
|
|
6775
|
-
|
|
6775
|
+
B = g + 1;
|
|
6776
6776
|
else
|
|
6777
6777
|
return;
|
|
6778
6778
|
else if (g > 0)
|
|
6779
|
-
|
|
6779
|
+
B = g - 1;
|
|
6780
6780
|
else
|
|
6781
6781
|
return;
|
|
6782
6782
|
else
|
|
6783
|
-
|
|
6784
|
-
p((
|
|
6785
|
-
...
|
|
6786
|
-
currentPage:
|
|
6787
|
-
loadedPages: [.../* @__PURE__ */ new Set([...v,
|
|
6783
|
+
B = N;
|
|
6784
|
+
p((L) => ({
|
|
6785
|
+
...L,
|
|
6786
|
+
currentPage: B,
|
|
6787
|
+
loadedPages: [.../* @__PURE__ */ new Set([...v, B])]
|
|
6788
6788
|
}));
|
|
6789
|
-
}, w = (
|
|
6790
|
-
|
|
6791
|
-
}, U = (
|
|
6792
|
-
if (
|
|
6789
|
+
}, w = (N) => {
|
|
6790
|
+
$t = N.touches[0].clientX;
|
|
6791
|
+
}, U = (N) => {
|
|
6792
|
+
if ($t === null)
|
|
6793
6793
|
return;
|
|
6794
|
-
const
|
|
6795
|
-
|
|
6796
|
-
},
|
|
6794
|
+
const B = N.touches[0].clientX, L = $t - B;
|
|
6795
|
+
L > 5 ? k("next") : L < -5 && k("previous"), $t = null;
|
|
6796
|
+
}, R = {
|
|
6797
6797
|
"--width": `${E || 0}px`,
|
|
6798
6798
|
"--total-cards": b,
|
|
6799
6799
|
"--cards-per-page": f,
|
|
6800
6800
|
"--page": g
|
|
6801
6801
|
};
|
|
6802
|
-
|
|
6803
|
-
return /* @__PURE__ */ i.jsx(Ca, { layout: `carousel${a ? "-with-title" : ""}` });
|
|
6804
|
-
const I = (R, O) => {
|
|
6805
|
-
var T;
|
|
6806
|
-
let S = null;
|
|
6807
|
-
return (T = R == null ? void 0 : R.sys) != null && T.id ? S = `card-${R.sys.id}` : R != null && R.slug ? S = `card-${R.slug}` : [n[O], R.contentType].includes("customCard") && (S = `card-${window.btoa(`${R.title} ${R.createdAt}`)}-${O}`), S;
|
|
6808
|
-
};
|
|
6809
|
-
return /* @__PURE__ */ i.jsxs(
|
|
6802
|
+
return d ? /* @__PURE__ */ i.jsx(Ca, { layout: `carousel${a ? "-with-title" : ""}` }) : /* @__PURE__ */ i.jsxs(
|
|
6810
6803
|
"section",
|
|
6811
6804
|
{
|
|
6812
6805
|
ref: _,
|
|
6813
|
-
className:
|
|
6806
|
+
className: C("carousel-wrapper", s),
|
|
6814
6807
|
"data-testid": "carousel",
|
|
6815
6808
|
children: [
|
|
6816
6809
|
/* @__PURE__ */ i.jsx(Ec, { id: t, title: a }),
|
|
@@ -6820,27 +6813,27 @@ const Sc = ({
|
|
|
6820
6813
|
className: "carousel",
|
|
6821
6814
|
onTouchStart: w,
|
|
6822
6815
|
onTouchMove: U,
|
|
6823
|
-
style:
|
|
6816
|
+
style: R,
|
|
6824
6817
|
"data-testid": "carousel-list",
|
|
6825
|
-
children: e.map((
|
|
6826
|
-
let
|
|
6827
|
-
return
|
|
6818
|
+
children: e.map((N, B) => {
|
|
6819
|
+
let L = N && N.sys && N.sys.id ? `${t}-card-${N.sys.id}` : null;
|
|
6820
|
+
return L && Tc(B, f, g, v) ? /* @__PURE__ */ i.jsx(
|
|
6828
6821
|
Qa,
|
|
6829
6822
|
{
|
|
6830
|
-
id:
|
|
6831
|
-
card: { ...
|
|
6823
|
+
id: L,
|
|
6824
|
+
card: { ...N, contentType: n[B] },
|
|
6832
6825
|
buildCardData: r,
|
|
6833
6826
|
gtmContext: o
|
|
6834
6827
|
},
|
|
6835
|
-
|
|
6836
|
-
) : (
|
|
6828
|
+
L
|
|
6829
|
+
) : (L = L || `${t}-card-${B}`, /* @__PURE__ */ i.jsx(
|
|
6837
6830
|
Se,
|
|
6838
6831
|
{
|
|
6839
6832
|
element: "li",
|
|
6840
6833
|
className: "card-wrapper",
|
|
6841
6834
|
"data-testid": "card-placeholder"
|
|
6842
6835
|
},
|
|
6843
|
-
|
|
6836
|
+
L
|
|
6844
6837
|
));
|
|
6845
6838
|
})
|
|
6846
6839
|
}
|
|
@@ -6852,8 +6845,8 @@ const Sc = ({
|
|
|
6852
6845
|
variant: "secondary",
|
|
6853
6846
|
size: "large",
|
|
6854
6847
|
icon: { icon: "chevron_left" },
|
|
6855
|
-
onClick: (
|
|
6856
|
-
|
|
6848
|
+
onClick: (N) => {
|
|
6849
|
+
N.preventDefault(), N.stopPropagation(), k("previous");
|
|
6857
6850
|
},
|
|
6858
6851
|
screenreaderText: c.formatMessage({
|
|
6859
6852
|
id: "carousel_pagination_previous"
|
|
@@ -6861,29 +6854,29 @@ const Sc = ({
|
|
|
6861
6854
|
disabled: g <= 0
|
|
6862
6855
|
}
|
|
6863
6856
|
) }),
|
|
6864
|
-
[...Array(y)].map((
|
|
6857
|
+
[...Array(y)].map((N, B) => /* @__PURE__ */ i.jsx("li", { "data-testid": "carousel-controls-button", children: /* @__PURE__ */ i.jsx(
|
|
6865
6858
|
"button",
|
|
6866
6859
|
{
|
|
6867
|
-
className:
|
|
6868
|
-
selected:
|
|
6860
|
+
className: C("page-indicator", {
|
|
6861
|
+
selected: B === g
|
|
6869
6862
|
}),
|
|
6870
|
-
onClick: (
|
|
6871
|
-
|
|
6863
|
+
onClick: (L) => {
|
|
6864
|
+
L.preventDefault(), L.stopPropagation(), k(B);
|
|
6872
6865
|
},
|
|
6873
6866
|
children: /* @__PURE__ */ i.jsx(be, { showOnFocus: !1, children: c.formatMessage(
|
|
6874
6867
|
{ id: "carousel_pagination_page" },
|
|
6875
|
-
{ number:
|
|
6868
|
+
{ number: B + 1, total: y }
|
|
6876
6869
|
) })
|
|
6877
6870
|
}
|
|
6878
|
-
) }, `page-indicator-${
|
|
6871
|
+
) }, `page-indicator-${B}`)),
|
|
6879
6872
|
/* @__PURE__ */ i.jsx("li", { className: "arrow next", children: /* @__PURE__ */ i.jsx(
|
|
6880
6873
|
ae,
|
|
6881
6874
|
{
|
|
6882
6875
|
variant: "secondary",
|
|
6883
6876
|
size: "large",
|
|
6884
6877
|
icon: { icon: "chevron_right" },
|
|
6885
|
-
onClick: (
|
|
6886
|
-
|
|
6878
|
+
onClick: (N) => {
|
|
6879
|
+
N.preventDefault(), N.stopPropagation(), k("next");
|
|
6887
6880
|
},
|
|
6888
6881
|
screenreaderText: c.formatMessage({ id: "carousel_pagination_next" }),
|
|
6889
6882
|
disabled: g >= y - 1
|
|
@@ -6932,7 +6925,7 @@ const kn = "joinCommunityButton", Ja = ({
|
|
|
6932
6925
|
}, leave: () => {
|
|
6933
6926
|
} }
|
|
6934
6927
|
}) => {
|
|
6935
|
-
const a = Q(), s =
|
|
6928
|
+
const a = Q(), s = $e(De), o = s && typeof s.id == "string", [c, u] = ne(t), [l, f] = ne(t ? "joined" : "notJoined");
|
|
6936
6929
|
se(() => {
|
|
6937
6930
|
l === "joining" ? f("joined") : l === "leaving" && f("notJoined");
|
|
6938
6931
|
}, [c]);
|
|
@@ -6947,7 +6940,7 @@ const kn = "joinCommunityButton", Ja = ({
|
|
|
6947
6940
|
onClick: async (p) => {
|
|
6948
6941
|
o && (p.currentTarget.blur(), c ? (f("leaving"), typeof r == "function" && await r()) : (f("joining"), typeof n == "function" && await n()), u(!c));
|
|
6949
6942
|
},
|
|
6950
|
-
className:
|
|
6943
|
+
className: C("join-community-button", l, {
|
|
6951
6944
|
active: l === "joining"
|
|
6952
6945
|
}),
|
|
6953
6946
|
disabled: !o,
|
|
@@ -6966,7 +6959,7 @@ const Tn = "communityDetails_", gd = ({
|
|
|
6966
6959
|
functions: { invite: s, ...o }
|
|
6967
6960
|
}) => {
|
|
6968
6961
|
const c = Q(), u = 5, l = r || a.length, f = a.length ? a : Array(u).fill({}), d = `/communities/${n}/members` === window.location.pathname;
|
|
6969
|
-
return /* @__PURE__ */ i.jsxs("div", { className:
|
|
6962
|
+
return /* @__PURE__ */ i.jsxs("div", { className: C("community-details", t), children: [
|
|
6970
6963
|
/* @__PURE__ */ i.jsx(Fe, {}),
|
|
6971
6964
|
/* @__PURE__ */ i.jsxs("div", { className: "member-details", children: [
|
|
6972
6965
|
/* @__PURE__ */ i.jsxs("div", { className: "top", children: [
|
|
@@ -7015,7 +7008,7 @@ const vd = ({ breadcrumbs: t, cutoff: e = 20, className: n = "" }) => {
|
|
|
7015
7008
|
children: r.formatMessage({ id: "breadcrumbs_label" })
|
|
7016
7009
|
}
|
|
7017
7010
|
),
|
|
7018
|
-
/* @__PURE__ */ i.jsx("ul", { className:
|
|
7011
|
+
/* @__PURE__ */ i.jsx("ul", { className: C("breadcrumbs text-small", n), children: t.map(
|
|
7019
7012
|
({ text: a, href: s, current: o = !1 }, c) => /* @__PURE__ */ i.jsxs("li", { children: [
|
|
7020
7013
|
o && /* @__PURE__ */ i.jsx(
|
|
7021
7014
|
be,
|
|
@@ -7047,7 +7040,7 @@ const bd = ({
|
|
|
7047
7040
|
let m = [];
|
|
7048
7041
|
c.includes(f) ? m = c.filter((p) => p !== f) : f === "all" ? m = ["all"] : n ? m = [...c.filter((p) => p !== "all"), f] : m = [f], u((p) => (r && typeof r == "function" && r({ current: m, previous: p }), m)), d && typeof d == "function" && d();
|
|
7049
7042
|
};
|
|
7050
|
-
return /* @__PURE__ */ i.jsx("ul", { className:
|
|
7043
|
+
return /* @__PURE__ */ i.jsx("ul", { className: C("filters", a), children: o.map(({ id: f, text: d, disabled: m = !1, callback: p = () => {
|
|
7051
7044
|
} }) => {
|
|
7052
7045
|
let g = {};
|
|
7053
7046
|
return m && (g = {
|
|
@@ -7056,7 +7049,7 @@ const bd = ({
|
|
|
7056
7049
|
}), /* @__PURE__ */ i.jsx("li", { children: /* @__PURE__ */ i.jsx(
|
|
7057
7050
|
"button",
|
|
7058
7051
|
{
|
|
7059
|
-
className:
|
|
7052
|
+
className: C(f, { selected: c.includes(f) }),
|
|
7060
7053
|
onClick: (v) => {
|
|
7061
7054
|
v.preventDefault(), v.stopPropagation(), l(f, p);
|
|
7062
7055
|
},
|
|
@@ -7099,7 +7092,7 @@ const En = {
|
|
|
7099
7092
|
))
|
|
7100
7093
|
return null;
|
|
7101
7094
|
const p = Object.keys(r), g = f !== t;
|
|
7102
|
-
return /* @__PURE__ */ i.jsxs("div", { className:
|
|
7095
|
+
return /* @__PURE__ */ i.jsxs("div", { className: C("language-switcher text-small", o, u), children: [
|
|
7103
7096
|
/* @__PURE__ */ i.jsxs("nav", { children: [
|
|
7104
7097
|
o !== "short" && /* @__PURE__ */ i.jsx("p", { children: c || l.formatMessage({ id: `${Pt}label` }) }),
|
|
7105
7098
|
/* @__PURE__ */ i.jsx("ul", { children: p.map((v) => {
|
|
@@ -7161,7 +7154,7 @@ const Sn = Fi({ locale: "en", messages: tr }), an = ({
|
|
|
7161
7154
|
p instanceof Error ? f(p.message) : f("Unknown error");
|
|
7162
7155
|
}
|
|
7163
7156
|
};
|
|
7164
|
-
return !l && !t && !o.endOfFeed ? null : /* @__PURE__ */ i.jsx("footer", { className:
|
|
7157
|
+
return !l && !t && !o.endOfFeed ? null : /* @__PURE__ */ i.jsx("footer", { className: C("load-more", c), children: !l && t ? /* @__PURE__ */ i.jsx(
|
|
7165
7158
|
ae,
|
|
7166
7159
|
{
|
|
7167
7160
|
variant: n,
|
|
@@ -7186,13 +7179,13 @@ const Xa = ({
|
|
|
7186
7179
|
"a",
|
|
7187
7180
|
{
|
|
7188
7181
|
href: "/home/",
|
|
7189
|
-
className:
|
|
7182
|
+
className: C("logo", t, e, n),
|
|
7190
7183
|
...r,
|
|
7191
7184
|
children: /* @__PURE__ */ i.jsx(be, { children: /* @__PURE__ */ i.jsx(je, { id: "apolitical" }) })
|
|
7192
7185
|
}
|
|
7193
7186
|
) });
|
|
7194
7187
|
let Rt = !1;
|
|
7195
|
-
const
|
|
7188
|
+
const Nc = ({
|
|
7196
7189
|
element: t = "div",
|
|
7197
7190
|
id: e = "more-menu",
|
|
7198
7191
|
options: n,
|
|
@@ -7207,7 +7200,7 @@ const $c = ({
|
|
|
7207
7200
|
document.removeEventListener("click", u, !0);
|
|
7208
7201
|
})), K.createElement(t, {
|
|
7209
7202
|
ref: s,
|
|
7210
|
-
className:
|
|
7203
|
+
className: C("more-menu text-medium", r),
|
|
7211
7204
|
children: /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
7212
7205
|
/* @__PURE__ */ i.jsx(
|
|
7213
7206
|
ae,
|
|
@@ -7250,7 +7243,7 @@ const $c = ({
|
|
|
7250
7243
|
}) })
|
|
7251
7244
|
] })
|
|
7252
7245
|
});
|
|
7253
|
-
},
|
|
7246
|
+
}, $c = (t, e = !1) => e ? t.replaceAll("/", "") === e : typeof window < "u" && window.location && window.location.pathname === t;
|
|
7254
7247
|
const Pc = [
|
|
7255
7248
|
{
|
|
7256
7249
|
key: "homepage",
|
|
@@ -7269,12 +7262,12 @@ const Pc = [
|
|
|
7269
7262
|
href: "/solution-articles/"
|
|
7270
7263
|
}
|
|
7271
7264
|
], Rc = ({ activeLink: t }) => {
|
|
7272
|
-
const e = Q(), n =
|
|
7265
|
+
const e = Q(), n = $e(De), r = n && typeof n.id == "string";
|
|
7273
7266
|
return /* @__PURE__ */ i.jsxs("ul", { id: "navigation-menu", className: "text-medium", children: [
|
|
7274
7267
|
Pc.map(({ key: a, href: s }) => /* @__PURE__ */ i.jsx(
|
|
7275
7268
|
"li",
|
|
7276
7269
|
{
|
|
7277
|
-
className:
|
|
7270
|
+
className: C(a, { active: $c(s, t) }),
|
|
7278
7271
|
children: /* @__PURE__ */ i.jsx(
|
|
7279
7272
|
"a",
|
|
7280
7273
|
{
|
|
@@ -7361,7 +7354,7 @@ const Oc = "shareLinks_", _d = ({
|
|
|
7361
7354
|
className: o = ""
|
|
7362
7355
|
}) => {
|
|
7363
7356
|
const c = Q(), u = Mc({ title: t, link: e, referrer: n });
|
|
7364
|
-
return /* @__PURE__ */ i.jsxs("aside", { className:
|
|
7357
|
+
return /* @__PURE__ */ i.jsxs("aside", { className: C("share-links", a, s, o), children: [
|
|
7365
7358
|
/* @__PURE__ */ i.jsx("p", { className: "text-small", children: c.formatMessage({ id: "shareLinks_label" }) }),
|
|
7366
7359
|
/* @__PURE__ */ i.jsx("ul", { children: u.map(({ key: l, icon: f, url: d, shouldRender: m = !0, onClick: p }) => {
|
|
7367
7360
|
if (typeof m == "function" && !m())
|
|
@@ -7437,7 +7430,7 @@ const xd = ({ tabs: t, className: e = "" }) => {
|
|
|
7437
7430
|
{
|
|
7438
7431
|
href: m || `#${l}`,
|
|
7439
7432
|
id: `tab-${l}`,
|
|
7440
|
-
className:
|
|
7433
|
+
className: C({ selected: v }),
|
|
7441
7434
|
role: "tab",
|
|
7442
7435
|
"aria-selected": v,
|
|
7443
7436
|
...b,
|
|
@@ -7445,7 +7438,7 @@ const xd = ({ tabs: t, className: e = "" }) => {
|
|
|
7445
7438
|
}
|
|
7446
7439
|
) }, `tab-${l}`)
|
|
7447
7440
|
);
|
|
7448
|
-
}), /* @__PURE__ */ i.jsxs("div", { className:
|
|
7441
|
+
}), /* @__PURE__ */ i.jsxs("div", { className: C("tabs-wrapper", e), children: [
|
|
7449
7442
|
/* @__PURE__ */ i.jsx("ul", { className: "tabs", role: "tablist", children: o }),
|
|
7450
7443
|
/* @__PURE__ */ i.jsx("div", { className: "tab-content", children: c })
|
|
7451
7444
|
] });
|
|
@@ -7462,10 +7455,10 @@ const Fc = {
|
|
|
7462
7455
|
}) => {
|
|
7463
7456
|
const a = yt(!0);
|
|
7464
7457
|
let s = r;
|
|
7465
|
-
return K.Children.count(r) === 1 && (s = K.Children.toArray(r)[0], s.props && (s = s.props.children)), /* @__PURE__ */ i.jsx("section", { className:
|
|
7458
|
+
return K.Children.count(r) === 1 && (s = K.Children.toArray(r)[0], s.props && (s = s.props.children)), /* @__PURE__ */ i.jsx("section", { className: C("columns", `layout-${t}`, n), children: K.Children.map(s, (o, c) => e !== !1 && c === e && a && a < Fc[t] ? null : o) });
|
|
7466
7459
|
};
|
|
7467
7460
|
let Cn;
|
|
7468
|
-
const
|
|
7461
|
+
const Nn = "contactFooter_", wd = ({ onSuccess: t = async () => {
|
|
7469
7462
|
}, onFailure: e = () => {
|
|
7470
7463
|
} }) => {
|
|
7471
7464
|
const n = pe(null), [r, a] = K.useState(0), [s, o] = K.useState(!1), c = () => {
|
|
@@ -7478,7 +7471,7 @@ const $n = "contactFooter_", wd = ({ onSuccess: t = async () => {
|
|
|
7478
7471
|
return se(() => (c(), window.addEventListener("resize", u), () => {
|
|
7479
7472
|
clearTimeout(Cn), window.removeEventListener("resize", u);
|
|
7480
7473
|
}), []), /* @__PURE__ */ i.jsx(et, { id: "contactForm", className: "contact-footer", children: /* @__PURE__ */ i.jsxs("div", { className: "inner-wrapper", children: [
|
|
7481
|
-
/* @__PURE__ */ i.jsx("h2", { children: /* @__PURE__ */ i.jsx(je, { id: `${
|
|
7474
|
+
/* @__PURE__ */ i.jsx("h2", { children: /* @__PURE__ */ i.jsx(je, { id: `${Nn}title` }) }),
|
|
7482
7475
|
/* @__PURE__ */ i.jsxs(
|
|
7483
7476
|
"div",
|
|
7484
7477
|
{
|
|
@@ -7488,8 +7481,8 @@ const $n = "contactFooter_", wd = ({ onSuccess: t = async () => {
|
|
|
7488
7481
|
style: s ? {} : { minHeight: r },
|
|
7489
7482
|
children: [
|
|
7490
7483
|
/* @__PURE__ */ i.jsxs("aside", { children: [
|
|
7491
|
-
/* @__PURE__ */ i.jsx("p", { children: /* @__PURE__ */ i.jsx(je, { id: `${
|
|
7492
|
-
/* @__PURE__ */ i.jsx(xt, { className: "mailto-link", href: "mailto:hello@apolitical.co", children: /* @__PURE__ */ i.jsx(je, { id: `${
|
|
7484
|
+
/* @__PURE__ */ i.jsx("p", { children: /* @__PURE__ */ i.jsx(je, { id: `${Nn}text` }) }),
|
|
7485
|
+
/* @__PURE__ */ i.jsx(xt, { className: "mailto-link", href: "mailto:hello@apolitical.co", children: /* @__PURE__ */ i.jsx(je, { id: `${Nn}email` }) })
|
|
7493
7486
|
] }),
|
|
7494
7487
|
/* @__PURE__ */ i.jsx(
|
|
7495
7488
|
Yo,
|
|
@@ -7506,7 +7499,7 @@ const $n = "contactFooter_", wd = ({ onSuccess: t = async () => {
|
|
|
7506
7499
|
/* @__PURE__ */ i.jsx(Rc, { activeLink: t }),
|
|
7507
7500
|
/* @__PURE__ */ i.jsx(Os, { ...e })
|
|
7508
7501
|
] }) }) });
|
|
7509
|
-
const
|
|
7502
|
+
const $n = "cookieBanner_", Pn = [
|
|
7510
7503
|
"apol-cookie-banner",
|
|
7511
7504
|
"apolitical-performance-cookie-consent",
|
|
7512
7505
|
"functional-cookie-consent"
|
|
@@ -7551,11 +7544,11 @@ const Nn = "cookieBanner_", Pn = [
|
|
|
7551
7544
|
className: "gtm-trackable",
|
|
7552
7545
|
"data-gtm-event-context": "cookie-banner",
|
|
7553
7546
|
"data-gtm-event-type": `cookie-${f.gtmType}-click`,
|
|
7554
|
-
children: t.formatMessage({ id: `${
|
|
7547
|
+
children: t.formatMessage({ id: `${$n}buttons_${f.id}` })
|
|
7555
7548
|
});
|
|
7556
7549
|
}), /* @__PURE__ */ i.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
7557
|
-
/* @__PURE__ */ i.jsx("h6", { children: t.formatMessage({ id: `${
|
|
7558
|
-
/* @__PURE__ */ i.jsx("p", { children: t.formatMessage({ id: `${
|
|
7550
|
+
/* @__PURE__ */ i.jsx("h6", { children: t.formatMessage({ id: `${$n}title` }) }),
|
|
7551
|
+
/* @__PURE__ */ i.jsx("p", { children: t.formatMessage({ id: `${$n}text` }) }),
|
|
7559
7552
|
/* @__PURE__ */ i.jsx(tn, { buttons: l })
|
|
7560
7553
|
] });
|
|
7561
7554
|
}, Oe = {
|
|
@@ -7980,7 +7973,7 @@ const Ye = "footer_", Yt = "SiteFooter", na = ({ group: t }) => {
|
|
|
7980
7973
|
return /* @__PURE__ */ i.jsxs(
|
|
7981
7974
|
"li",
|
|
7982
7975
|
{
|
|
7983
|
-
className:
|
|
7976
|
+
className: C({
|
|
7984
7977
|
[c.className]: c.className,
|
|
7985
7978
|
"has-submenu": p,
|
|
7986
7979
|
parent: g,
|
|
@@ -8007,7 +8000,7 @@ const Ye = "footer_", Yt = "SiteFooter", na = ({ group: t }) => {
|
|
|
8007
8000
|
return c[_].order ? /* @__PURE__ */ i.jsxs(
|
|
8008
8001
|
"li",
|
|
8009
8002
|
{
|
|
8010
|
-
className:
|
|
8003
|
+
className: C({
|
|
8011
8004
|
[c[_].className]: c[_].className
|
|
8012
8005
|
}),
|
|
8013
8006
|
children: [
|
|
@@ -8038,7 +8031,7 @@ const Ye = "footer_", Yt = "SiteFooter", na = ({ group: t }) => {
|
|
|
8038
8031
|
);
|
|
8039
8032
|
};
|
|
8040
8033
|
const Lc = { height: 67, height_desktop: 83 }, ti = ({ showNavigation: t = !0 }) => {
|
|
8041
|
-
const e = Q(), n =
|
|
8034
|
+
const e = Q(), n = $e(De), r = yt(!0, !0), a = n && typeof n.id == "string", s = bt(
|
|
8042
8035
|
() => fe.getIsDesktopVersion(a, r),
|
|
8043
8036
|
[a, r]
|
|
8044
8037
|
), [o, c] = Jn(ya, {
|
|
@@ -8084,7 +8077,7 @@ const Lc = { height: 67, height_desktop: 83 }, ti = ({ showNavigation: t = !0 })
|
|
|
8084
8077
|
"nav",
|
|
8085
8078
|
{
|
|
8086
8079
|
id: "header",
|
|
8087
|
-
className:
|
|
8080
|
+
className: C({
|
|
8088
8081
|
"logged-in": a,
|
|
8089
8082
|
"logged-out": !a,
|
|
8090
8083
|
visible: u
|
|
@@ -8206,7 +8199,7 @@ const Lc = { height: 67, height_desktop: 83 }, ti = ({ showNavigation: t = !0 })
|
|
|
8206
8199
|
/* @__PURE__ */ i.jsx(
|
|
8207
8200
|
"div",
|
|
8208
8201
|
{
|
|
8209
|
-
className:
|
|
8202
|
+
className: C("overlay", {
|
|
8210
8203
|
open: l.navigation || l.account || !s.search && l.search
|
|
8211
8204
|
})
|
|
8212
8205
|
}
|
|
@@ -8248,7 +8241,7 @@ const Ic = () => {
|
|
|
8248
8241
|
"div",
|
|
8249
8242
|
{
|
|
8250
8243
|
id: "wrapper",
|
|
8251
|
-
className:
|
|
8244
|
+
className: C(o, y, { "has-footer": l }),
|
|
8252
8245
|
children: [
|
|
8253
8246
|
/* @__PURE__ */ i.jsx(ti, { showNavigation: u }),
|
|
8254
8247
|
/* @__PURE__ */ i.jsxs("section", { id: "content-wrapper", children: [
|
|
@@ -8316,7 +8309,7 @@ const kd = ({
|
|
|
8316
8309
|
}), u.length < 1 ? null : /* @__PURE__ */ i.jsx(
|
|
8317
8310
|
"ul",
|
|
8318
8311
|
{
|
|
8319
|
-
className:
|
|
8312
|
+
className: C("tags text-small", e, a, {
|
|
8320
8313
|
"one-line": n
|
|
8321
8314
|
}),
|
|
8322
8315
|
children: u.map((l) => {
|
|
@@ -8345,7 +8338,7 @@ const Td = ({
|
|
|
8345
8338
|
className: o = ""
|
|
8346
8339
|
}) => {
|
|
8347
8340
|
const c = Q();
|
|
8348
|
-
return t.length === 0 ? null : /* @__PURE__ */ i.jsxs("div", { className:
|
|
8341
|
+
return t.length === 0 ? null : /* @__PURE__ */ i.jsxs("div", { className: C("members-list", o), children: [
|
|
8349
8342
|
/* @__PURE__ */ i.jsxs("h1", { children: [
|
|
8350
8343
|
c.formatMessage({ id: "membersList" }),
|
|
8351
8344
|
/* @__PURE__ */ i.jsx("span", { className: "count", children: e })
|
|
@@ -8399,8 +8392,8 @@ const xe = "discussion_form_", dr = ({
|
|
|
8399
8392
|
},
|
|
8400
8393
|
gtmContext: l = "DiscussionForm"
|
|
8401
8394
|
}) => {
|
|
8402
|
-
var
|
|
8403
|
-
const f = Q(), d =
|
|
8395
|
+
var L, M, T;
|
|
8396
|
+
const f = Q(), d = $e(De), [m, p] = ne(
|
|
8404
8397
|
n.isEditing && n.isEditing.text || ""
|
|
8405
8398
|
), [g, v] = ne(c.error || !1), [b, y] = ne(!1), _ = pe(null);
|
|
8406
8399
|
if (r || (r = _), n.isLoading)
|
|
@@ -8412,86 +8405,86 @@ const xe = "discussion_form_", dr = ({
|
|
|
8412
8405
|
}
|
|
8413
8406
|
);
|
|
8414
8407
|
const E = (x) => {
|
|
8415
|
-
const
|
|
8416
|
-
p(
|
|
8417
|
-
let
|
|
8418
|
-
!d || !d.id ?
|
|
8408
|
+
const S = x.target.value;
|
|
8409
|
+
p(S);
|
|
8410
|
+
let I;
|
|
8411
|
+
!d || !d.id ? I = Ne(
|
|
8419
8412
|
f.formatMessage,
|
|
8420
8413
|
`${xe}error_loggedOut`,
|
|
8421
8414
|
t.type,
|
|
8422
8415
|
"action"
|
|
8423
|
-
) : e ?
|
|
8416
|
+
) : e ? S.length >= s && (I = `${xe}error_tooLong`) : I = Ne(
|
|
8424
8417
|
f.formatMessage,
|
|
8425
8418
|
`${xe}error_noPermission`,
|
|
8426
8419
|
t.type,
|
|
8427
8420
|
"action"
|
|
8428
|
-
),
|
|
8421
|
+
), I ? v(I) : g && v(!1);
|
|
8429
8422
|
};
|
|
8430
8423
|
let k = `${t.type}-form`;
|
|
8431
8424
|
if (t.type === "response" || t.type === "reply") {
|
|
8432
|
-
const x = ((
|
|
8425
|
+
const x = ((L = t.slugs) == null ? void 0 : L.reply) || ((M = t.slugs) == null ? void 0 : M.answer) || ((T = t.slugs) == null ? void 0 : T.question) || "";
|
|
8433
8426
|
x && (k = `${k}-${x.slice(-15)}`);
|
|
8434
8427
|
}
|
|
8435
8428
|
const w = async (x) => {
|
|
8436
|
-
var
|
|
8437
|
-
if (x.preventDefault(), x.stopPropagation(), !d || !d.id || !e ||
|
|
8429
|
+
var I;
|
|
8430
|
+
if (x.preventDefault(), x.stopPropagation(), !d || !d.id || !e || R)
|
|
8438
8431
|
return;
|
|
8439
8432
|
Mt && clearTimeout(Mt), y("submitting");
|
|
8440
|
-
const
|
|
8433
|
+
const S = window.location.pathname;
|
|
8441
8434
|
try {
|
|
8442
|
-
let
|
|
8435
|
+
let O;
|
|
8443
8436
|
switch (t.type) {
|
|
8444
8437
|
case "post":
|
|
8445
|
-
|
|
8438
|
+
O = await u.create({ content: m });
|
|
8446
8439
|
break;
|
|
8447
8440
|
case "question":
|
|
8448
|
-
|
|
8441
|
+
O = await u.create({
|
|
8449
8442
|
title: m,
|
|
8450
8443
|
authorId: d && d.id,
|
|
8451
|
-
...(
|
|
8444
|
+
...(I = u.props) == null ? void 0 : I.create
|
|
8452
8445
|
});
|
|
8453
8446
|
break;
|
|
8454
8447
|
case "response":
|
|
8455
|
-
|
|
8456
|
-
{
|
|
8457
|
-
{ body: m, authorId: d && d.id, contentPath:
|
|
8448
|
+
O = await u.create(
|
|
8449
|
+
{ questionSlug: t.slugs.question },
|
|
8450
|
+
{ body: m, authorId: d && d.id, contentPath: S }
|
|
8458
8451
|
);
|
|
8459
8452
|
break;
|
|
8460
8453
|
case "reply":
|
|
8461
|
-
|
|
8462
|
-
{
|
|
8463
|
-
{ body: m, authorId: d && d.id, contentPath:
|
|
8454
|
+
O = await u.create(
|
|
8455
|
+
{ questionSlug: t.slugs.question, answerSlug: t.slugs.answer },
|
|
8456
|
+
{ body: m, authorId: d && d.id, contentPath: S }
|
|
8464
8457
|
);
|
|
8465
8458
|
break;
|
|
8466
8459
|
default:
|
|
8467
8460
|
break;
|
|
8468
8461
|
}
|
|
8469
|
-
await as(1e3), u.callback && await u.callback(
|
|
8462
|
+
await as(1e3), u.callback && await u.callback(O), Mt = setTimeout(() => {
|
|
8470
8463
|
p(""), y("submitted");
|
|
8471
|
-
const
|
|
8472
|
-
document.dispatchEvent(
|
|
8464
|
+
const D = new Event("discussionFormSubmitted");
|
|
8465
|
+
document.dispatchEvent(D), U();
|
|
8473
8466
|
}, 500);
|
|
8474
|
-
} catch (
|
|
8475
|
-
const
|
|
8467
|
+
} catch (O) {
|
|
8468
|
+
const D = O;
|
|
8476
8469
|
let V = `${xe}error`;
|
|
8477
|
-
|
|
8470
|
+
D != null && D.message.includes("entry already exists") && (V = Ne(
|
|
8478
8471
|
f.formatMessage,
|
|
8479
8472
|
`${xe}error_alreadyExists`,
|
|
8480
8473
|
t.type,
|
|
8481
8474
|
"action"
|
|
8482
|
-
)),
|
|
8475
|
+
)), D != null && D.message.includes("429") ? V = Ne(
|
|
8483
8476
|
f.formatMessage,
|
|
8484
8477
|
`${xe}error_tooMany`,
|
|
8485
8478
|
t.type,
|
|
8486
8479
|
"action"
|
|
8487
|
-
) :
|
|
8480
|
+
) : D != null && D.message.includes("400") && (V = `${xe}error`), v(V), U();
|
|
8488
8481
|
}
|
|
8489
8482
|
}, U = () => {
|
|
8490
8483
|
Mt = setTimeout(() => {
|
|
8491
8484
|
v(!1), y(!1);
|
|
8492
8485
|
}, 5e3);
|
|
8493
|
-
},
|
|
8494
|
-
return (n.isEditing && !
|
|
8486
|
+
}, R = !m || !us(m), N = b === "submitting", B = [];
|
|
8487
|
+
return (n.isEditing && !N || c.cancel) && B.push({
|
|
8495
8488
|
variant: "secondary",
|
|
8496
8489
|
size: { mobile: "small", 600: "medium" },
|
|
8497
8490
|
onClick: u.handleCancel,
|
|
@@ -8500,7 +8493,7 @@ const xe = "discussion_form_", dr = ({
|
|
|
8500
8493
|
"data-gtm-event-type": `cancel-${t.type}-click`,
|
|
8501
8494
|
disabled: !c.cancel && (!d || !d.id || !m),
|
|
8502
8495
|
children: f.formatMessage({ id: `${xe}cancel` })
|
|
8503
|
-
}),
|
|
8496
|
+
}), B.push({
|
|
8504
8497
|
variant: "primary",
|
|
8505
8498
|
size: { mobile: "small", 600: "medium" },
|
|
8506
8499
|
onClick: (x) => {
|
|
@@ -8516,20 +8509,20 @@ const xe = "discussion_form_", dr = ({
|
|
|
8516
8509
|
"data-gtm-event-context": l,
|
|
8517
8510
|
"data-gtm-event-type": `${n.isEditing ? "save" : "submit"}-${t.type}-click`,
|
|
8518
8511
|
"data-testid": "save-button",
|
|
8519
|
-
disabled: !d || !d.id || !e ||
|
|
8512
|
+
disabled: !d || !d.id || !e || R || N || n.isEditing && m === n.isEditing.text,
|
|
8520
8513
|
children: f.formatMessage({
|
|
8521
|
-
id: `${xe}${
|
|
8514
|
+
id: `${xe}${N ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}`
|
|
8522
8515
|
})
|
|
8523
8516
|
}), /* @__PURE__ */ i.jsxs(
|
|
8524
8517
|
"form",
|
|
8525
8518
|
{
|
|
8526
8519
|
id: k,
|
|
8527
|
-
className:
|
|
8520
|
+
className: C("discussion-card discussion-form", {
|
|
8528
8521
|
"no-styling": n.isInWrapper && n.isEditing
|
|
8529
8522
|
}),
|
|
8530
8523
|
"data-testid": `discussion-${t.type}-form`,
|
|
8531
8524
|
children: [
|
|
8532
|
-
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(t.type) && /* @__PURE__ */ i.jsx("h2", { children:
|
|
8525
|
+
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(t.type) && /* @__PURE__ */ i.jsx("h2", { children: Ne(f.formatMessage, `${xe}title`, t.type, "action") }),
|
|
8533
8526
|
/* @__PURE__ */ i.jsx(
|
|
8534
8527
|
rr,
|
|
8535
8528
|
{
|
|
@@ -8538,14 +8531,14 @@ const xe = "discussion_form_", dr = ({
|
|
|
8538
8531
|
gtmType: "profile-click"
|
|
8539
8532
|
}
|
|
8540
8533
|
),
|
|
8541
|
-
/* @__PURE__ */ i.jsx(be, { element: "label", showOnFocus: !1, htmlFor: `${k}-input`, children:
|
|
8534
|
+
/* @__PURE__ */ i.jsx(be, { element: "label", showOnFocus: !1, htmlFor: `${k}-input`, children: Ne(f.formatMessage, `${xe}label`, t.type, "action") }),
|
|
8542
8535
|
/* @__PURE__ */ i.jsx(
|
|
8543
8536
|
zi,
|
|
8544
8537
|
{
|
|
8545
8538
|
ref: r,
|
|
8546
8539
|
id: `${k}-input`,
|
|
8547
8540
|
name: t.type,
|
|
8548
|
-
placeholder: a ||
|
|
8541
|
+
placeholder: a || Ne(
|
|
8549
8542
|
f.formatMessage,
|
|
8550
8543
|
`${xe}placeholder`,
|
|
8551
8544
|
t.type,
|
|
@@ -8560,7 +8553,7 @@ const xe = "discussion_form_", dr = ({
|
|
|
8560
8553
|
autoFocus: !!n.isEditing
|
|
8561
8554
|
}
|
|
8562
8555
|
),
|
|
8563
|
-
/* @__PURE__ */ i.jsx("small", { children:
|
|
8556
|
+
/* @__PURE__ */ i.jsx("small", { children: Ne(f.formatMessage, `${xe}explainer`, t.type, "action", {
|
|
8564
8557
|
a: (x) => /* @__PURE__ */ i.jsx(
|
|
8565
8558
|
"a",
|
|
8566
8559
|
{
|
|
@@ -8574,8 +8567,8 @@ const xe = "discussion_form_", dr = ({
|
|
|
8574
8567
|
}
|
|
8575
8568
|
)
|
|
8576
8569
|
}) }),
|
|
8577
|
-
/* @__PURE__ */ i.jsx(tn, { buttons:
|
|
8578
|
-
b === "submitted" && n.showSuccessMessage && /* @__PURE__ */ i.jsx(qt, { className: "success", "data-testid": "success", children:
|
|
8570
|
+
/* @__PURE__ */ i.jsx(tn, { buttons: B }),
|
|
8571
|
+
b === "submitted" && n.showSuccessMessage && /* @__PURE__ */ i.jsx(qt, { className: "success", "data-testid": "success", children: Ne(f.formatMessage, `${xe}success`, t.type, "action") }),
|
|
8579
8572
|
g && /* @__PURE__ */ i.jsx(qt, { id: "error-message", className: "error", "data-testid": "error", children: c.error ? c.error : typeof g == "string" ? g.includes(" ") ? g : f.formatMessage(
|
|
8580
8573
|
{ id: g },
|
|
8581
8574
|
{
|
|
@@ -8666,7 +8659,10 @@ const On = () => {
|
|
|
8666
8659
|
try {
|
|
8667
8660
|
if (s && s.slugs) {
|
|
8668
8661
|
const U = Zc(s.slugs);
|
|
8669
|
-
m ? await u(U) : await c(
|
|
8662
|
+
m ? await u(U) : await c({
|
|
8663
|
+
...U,
|
|
8664
|
+
payload: { contentPath: window.location.pathname }
|
|
8665
|
+
});
|
|
8670
8666
|
}
|
|
8671
8667
|
} catch {
|
|
8672
8668
|
d(e), p(a);
|
|
@@ -8675,7 +8671,7 @@ const On = () => {
|
|
|
8675
8671
|
}
|
|
8676
8672
|
};
|
|
8677
8673
|
return K.createElement(t, {
|
|
8678
|
-
className:
|
|
8674
|
+
className: C("likes-wrapper text-medium action-button", {
|
|
8679
8675
|
"show-spinner": g,
|
|
8680
8676
|
"is-liked": m,
|
|
8681
8677
|
disabled: !o
|
|
@@ -8700,7 +8696,7 @@ const On = () => {
|
|
|
8700
8696
|
variant: "tertiary",
|
|
8701
8697
|
size: "medium",
|
|
8702
8698
|
icon: { icon: m ? "heart" : "heart_empty", animate: "bounce" },
|
|
8703
|
-
className:
|
|
8699
|
+
className: C({ "do-animation": m && !a }),
|
|
8704
8700
|
screenreaderText: o ? l.formatMessage(
|
|
8705
8701
|
{
|
|
8706
8702
|
id: `discussion_likes_${m ? "unlike" : "like"}`
|
|
@@ -8722,7 +8718,7 @@ const On = () => {
|
|
|
8722
8718
|
/* @__PURE__ */ i.jsx(
|
|
8723
8719
|
"span",
|
|
8724
8720
|
{
|
|
8725
|
-
className:
|
|
8721
|
+
className: C("number-of-likes", { "no-likes": f === 0 }),
|
|
8726
8722
|
"data-testid": "number-of-likes",
|
|
8727
8723
|
children: l.formatMessage(
|
|
8728
8724
|
{ id: `discussion_likes${r ? "_short" : ""}` },
|
|
@@ -8763,11 +8759,11 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8763
8759
|
},
|
|
8764
8760
|
functions: {
|
|
8765
8761
|
content: { createContent: o, deleteContent: c, updateContent: u } = {
|
|
8766
|
-
createContent: () => {
|
|
8762
|
+
createContent: async () => {
|
|
8767
8763
|
},
|
|
8768
|
-
deleteContent: () => {
|
|
8764
|
+
deleteContent: async () => {
|
|
8769
8765
|
},
|
|
8770
|
-
updateContent: () => {
|
|
8766
|
+
updateContent: async () => {
|
|
8771
8767
|
}
|
|
8772
8768
|
},
|
|
8773
8769
|
likes: { createLike: l, deleteLike: f } = { createLike: () => {
|
|
@@ -8782,23 +8778,23 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8782
8778
|
children: v,
|
|
8783
8779
|
isTruncated: b = !1
|
|
8784
8780
|
}) => {
|
|
8785
|
-
const y = Q(), _ =
|
|
8781
|
+
const y = Q(), _ = $e(De), E = $e(ur), { author: k, canLike: w, createdAt: U, id: R, likes: N = 0, userLiked: B, comments: L = 0 } = e, M = _ && _.id && typeof k != "string" && k.id && k.id === _.id || !1, T = typeof w == "boolean" ? w : n ? !M : !1, x = M && (!e.createdAt || rs(e.createdAt, 10, "seconds")), S = pe(null), [I, O] = ne({
|
|
8786
8782
|
body: e && e.body || "",
|
|
8787
8783
|
isEditing: !1,
|
|
8788
8784
|
didEdit: e && e.isEdited || !1
|
|
8789
|
-
}), [
|
|
8785
|
+
}), [D, V] = ne(!1), [ee, j] = ne(
|
|
8790
8786
|
x ? "highlighted" : "default"
|
|
8791
8787
|
/* Default */
|
|
8792
|
-
), [
|
|
8788
|
+
), [$, Z] = ne("");
|
|
8793
8789
|
se(() => {
|
|
8794
|
-
const
|
|
8795
|
-
if (!(!
|
|
8796
|
-
return document.addEventListener("discussionFormSubmitted", z),
|
|
8797
|
-
document.removeEventListener("discussionFormSubmitted", z),
|
|
8790
|
+
const F = S.current;
|
|
8791
|
+
if (!(!F || ee === "default"))
|
|
8792
|
+
return document.addEventListener("discussionFormSubmitted", z), F.addEventListener("transitionend", W), () => {
|
|
8793
|
+
document.removeEventListener("discussionFormSubmitted", z), F.removeEventListener("transitionend", W);
|
|
8798
8794
|
};
|
|
8799
8795
|
}, []), se(() => {
|
|
8800
|
-
|
|
8801
|
-
...
|
|
8796
|
+
O({
|
|
8797
|
+
...I,
|
|
8802
8798
|
body: e && e.body || "",
|
|
8803
8799
|
didEdit: e && e.isEdited || !1
|
|
8804
8800
|
});
|
|
@@ -8810,40 +8806,40 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8810
8806
|
/* Fading */
|
|
8811
8807
|
);
|
|
8812
8808
|
}, 1e3);
|
|
8813
|
-
}, W = ({ propertyName:
|
|
8814
|
-
|
|
8809
|
+
}, W = ({ propertyName: F }) => {
|
|
8810
|
+
F === "background-color" && j((oe) => (oe === "default" && (document.removeEventListener("discussionFormSubmitted", z), S.current && S.current.removeEventListener("transitionend", W)), oe === "fading" ? "default" : oe));
|
|
8815
8811
|
};
|
|
8816
8812
|
if (r || !e || e.type === "answer" && (!e.slugs || !e.slugs.question))
|
|
8817
8813
|
return /* @__PURE__ */ i.jsx(Se, { className: "discussion-card discussion-post" });
|
|
8818
|
-
const X = b ? Ke(
|
|
8819
|
-
|
|
8814
|
+
const X = b ? Ke(I.body, Vc) : I.body, Y = async (F) => {
|
|
8815
|
+
F || (F = ""), Z("");
|
|
8820
8816
|
try {
|
|
8821
|
-
if (!Zi(
|
|
8822
|
-
const oe = e.type === "question" ? { title:
|
|
8817
|
+
if (!Zi(F, I.body)) {
|
|
8818
|
+
const oe = e.type === "question" ? { title: F } : { body: F };
|
|
8823
8819
|
await u(aa(e.slugs), oe);
|
|
8824
8820
|
}
|
|
8825
|
-
|
|
8821
|
+
O({ body: F, isEditing: !1, didEdit: !0 });
|
|
8826
8822
|
} catch {
|
|
8827
8823
|
Z(`${Me}form_error`);
|
|
8828
8824
|
}
|
|
8829
8825
|
}, H = () => {
|
|
8830
8826
|
E && E.updateConversation && E.updateConversation({ showForm: !0 }), setTimeout(() => {
|
|
8831
8827
|
var Pe, Ce, qe;
|
|
8832
|
-
const oe = `reply-form-${(e.type === "answer" ? e.slug : ((Pe = e.slugs) == null ? void 0 : Pe.reply) || ((Ce = e.slugs) == null ? void 0 : Ce.answer) || ((qe = e.slugs) == null ? void 0 : qe.question) || "").toLowerCase().slice(-15)}`,
|
|
8833
|
-
ve && ve.focus(),
|
|
8828
|
+
const oe = `reply-form-${(e.type === "answer" ? e.slug : ((Pe = e.slugs) == null ? void 0 : Pe.reply) || ((Ce = e.slugs) == null ? void 0 : Ce.answer) || ((qe = e.slugs) == null ? void 0 : qe.question) || "").toLowerCase().slice(-15)}`, A = document.getElementById(oe), ve = document.getElementById(`${oe}-input`);
|
|
8829
|
+
ve && ve.focus(), A && A.scrollIntoView({ behavior: "smooth" });
|
|
8834
8830
|
}, 0);
|
|
8835
|
-
}, J = () => {
|
|
8831
|
+
}, J = async () => {
|
|
8836
8832
|
V(!1);
|
|
8837
8833
|
try {
|
|
8838
|
-
c(aa(e.slugs));
|
|
8834
|
+
await c(aa(e.slugs));
|
|
8839
8835
|
} catch {
|
|
8840
8836
|
Z("delete-error");
|
|
8841
8837
|
}
|
|
8842
8838
|
}, re = [
|
|
8843
8839
|
{
|
|
8844
8840
|
text: y.formatMessage({ id: `${Me}moreMenu_report` }),
|
|
8845
|
-
onClick: (
|
|
8846
|
-
|
|
8841
|
+
onClick: (F) => {
|
|
8842
|
+
F.stopPropagation();
|
|
8847
8843
|
},
|
|
8848
8844
|
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
8849
8845
|
y.formatMessage({ id: `${Me}report_subject` })
|
|
@@ -8860,10 +8856,10 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8860
8856
|
icon: "flag"
|
|
8861
8857
|
}
|
|
8862
8858
|
];
|
|
8863
|
-
return n &&
|
|
8859
|
+
return n && M && re.push(
|
|
8864
8860
|
{
|
|
8865
8861
|
text: y.formatMessage({ id: `${Me}moreMenu_edit` }),
|
|
8866
|
-
onClick: () =>
|
|
8862
|
+
onClick: () => O({ ...I, isEditing: !0 }),
|
|
8867
8863
|
icon: "pencil-paper",
|
|
8868
8864
|
className: "gtm-trackable",
|
|
8869
8865
|
"data-gtm-event-context": g,
|
|
@@ -8871,45 +8867,45 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8871
8867
|
},
|
|
8872
8868
|
{
|
|
8873
8869
|
text: y.formatMessage({ id: `${Me}moreMenu_delete` }),
|
|
8874
|
-
onClick: (
|
|
8875
|
-
|
|
8870
|
+
onClick: (F) => {
|
|
8871
|
+
F.preventDefault(), F.stopPropagation(), V(!0);
|
|
8876
8872
|
},
|
|
8877
8873
|
icon: "trash",
|
|
8878
8874
|
className: "gtm-trackable",
|
|
8879
8875
|
"data-gtm-event-context": g,
|
|
8880
8876
|
"data-gtm-event-type": `delete-${e.type}-click`,
|
|
8881
|
-
...Lo(`delete-${e.slug}-modal`,
|
|
8877
|
+
...Lo(`delete-${e.slug}-modal`, D)
|
|
8882
8878
|
}
|
|
8883
8879
|
), K.createElement(t, {
|
|
8884
|
-
className:
|
|
8880
|
+
className: C("discussion-post", p, {
|
|
8885
8881
|
[ee]: !p || !p.includes("highlighted-text-box")
|
|
8886
8882
|
}),
|
|
8887
|
-
ref:
|
|
8883
|
+
ref: S,
|
|
8888
8884
|
"data-testid": `discussion-${e.type}-thread`,
|
|
8889
8885
|
children: /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
8890
8886
|
/* @__PURE__ */ i.jsxs(
|
|
8891
8887
|
"div",
|
|
8892
8888
|
{
|
|
8893
|
-
id:
|
|
8894
|
-
className:
|
|
8895
|
-
editing:
|
|
8896
|
-
"has-link": m.post && !
|
|
8889
|
+
id: R || e.slug,
|
|
8890
|
+
className: C("discussion-card", e.type, {
|
|
8891
|
+
editing: I.isEditing,
|
|
8892
|
+
"has-link": m.post && !I.isEditing
|
|
8897
8893
|
}),
|
|
8898
|
-
onClick: (
|
|
8899
|
-
!m.post ||
|
|
8894
|
+
onClick: (F) => {
|
|
8895
|
+
!m.post || I.isEditing || (F.preventDefault(), F.stopPropagation(), window.location.href = m.post);
|
|
8900
8896
|
},
|
|
8901
8897
|
children: [
|
|
8902
|
-
!
|
|
8898
|
+
!I.isEditing && /* @__PURE__ */ i.jsx(
|
|
8903
8899
|
rr,
|
|
8904
8900
|
{
|
|
8905
8901
|
member: k,
|
|
8906
|
-
additionalContent: { createdAt: U, didEdit:
|
|
8902
|
+
additionalContent: { createdAt: U, didEdit: I.didEdit },
|
|
8907
8903
|
className: typeof k != "string" && k.id === a ? "highlighted" : "",
|
|
8908
8904
|
gtmContext: g,
|
|
8909
8905
|
gtmType: "profile-click"
|
|
8910
8906
|
}
|
|
8911
8907
|
),
|
|
8912
|
-
|
|
8908
|
+
I.isEditing ? /* @__PURE__ */ i.jsx(
|
|
8913
8909
|
dr,
|
|
8914
8910
|
{
|
|
8915
8911
|
content: { type: e.type, slugs: e.slugs },
|
|
@@ -8917,12 +8913,12 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8917
8913
|
meta: {
|
|
8918
8914
|
isLoading: r,
|
|
8919
8915
|
isInWrapper: !0,
|
|
8920
|
-
isEditing: { text:
|
|
8916
|
+
isEditing: { text: I.body }
|
|
8921
8917
|
},
|
|
8922
8918
|
maxLength: e.type === "question" ? 250 : 5e4,
|
|
8923
8919
|
forceShow: {
|
|
8924
|
-
error:
|
|
8925
|
-
{ id:
|
|
8920
|
+
error: $ !== "" && $ !== "delete-error" ? y.formatMessage(
|
|
8921
|
+
{ id: $ },
|
|
8926
8922
|
{
|
|
8927
8923
|
action: y.formatMessage({
|
|
8928
8924
|
id: `discussion_action_${e.type}`
|
|
@@ -8934,7 +8930,7 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8934
8930
|
create: o,
|
|
8935
8931
|
handleSaveEdit: Y,
|
|
8936
8932
|
handleCancel: () => {
|
|
8937
|
-
Z(""),
|
|
8933
|
+
Z(""), O({ ...I, isEditing: !1 });
|
|
8938
8934
|
}
|
|
8939
8935
|
},
|
|
8940
8936
|
gtmContext: `${g}Form`
|
|
@@ -8960,19 +8956,19 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8960
8956
|
children: X
|
|
8961
8957
|
}
|
|
8962
8958
|
),
|
|
8963
|
-
!
|
|
8959
|
+
!I.isEditing && /* @__PURE__ */ i.jsxs(
|
|
8964
8960
|
"ul",
|
|
8965
8961
|
{
|
|
8966
|
-
className:
|
|
8962
|
+
className: C("actions text-medium", e.type),
|
|
8967
8963
|
"data-testid": `${e.type}-actions`,
|
|
8968
8964
|
children: [
|
|
8969
8965
|
/* @__PURE__ */ i.jsx(
|
|
8970
8966
|
Hc,
|
|
8971
8967
|
{
|
|
8972
8968
|
element: "li",
|
|
8973
|
-
likes:
|
|
8969
|
+
likes: N,
|
|
8974
8970
|
isShort: !1,
|
|
8975
|
-
userLiked:
|
|
8971
|
+
userLiked: B,
|
|
8976
8972
|
content: { type: e.type, slugs: e.slugs },
|
|
8977
8973
|
canLike: T,
|
|
8978
8974
|
peopleWhoLiked: e.peopleWhoLiked,
|
|
@@ -8986,8 +8982,8 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8986
8982
|
"li",
|
|
8987
8983
|
{
|
|
8988
8984
|
className: "action-button",
|
|
8989
|
-
onClick: (
|
|
8990
|
-
|
|
8985
|
+
onClick: (F) => {
|
|
8986
|
+
F.preventDefault(), F.stopPropagation(), m.comments && (window.location.href = m.comments), typeof d == "function" && d();
|
|
8991
8987
|
},
|
|
8992
8988
|
children: [
|
|
8993
8989
|
/* @__PURE__ */ i.jsx(
|
|
@@ -9004,13 +9000,13 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
9004
9000
|
"data-gtm-event-type": `answer-${e.type}-click`,
|
|
9005
9001
|
screenreaderText: y.formatMessage(
|
|
9006
9002
|
{ id: `${Me}comments_screenReader` },
|
|
9007
|
-
{ count:
|
|
9003
|
+
{ count: L }
|
|
9008
9004
|
)
|
|
9009
9005
|
}
|
|
9010
9006
|
),
|
|
9011
9007
|
/* @__PURE__ */ i.jsx("span", { children: y.formatMessage(
|
|
9012
9008
|
{ id: `${Me}comments` },
|
|
9013
|
-
{ count:
|
|
9009
|
+
{ count: L }
|
|
9014
9010
|
) })
|
|
9015
9011
|
]
|
|
9016
9012
|
}
|
|
@@ -9026,7 +9022,7 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
9026
9022
|
}
|
|
9027
9023
|
) }),
|
|
9028
9024
|
/* @__PURE__ */ i.jsx(
|
|
9029
|
-
|
|
9025
|
+
Nc,
|
|
9030
9026
|
{
|
|
9031
9027
|
element: "li",
|
|
9032
9028
|
id: `more-${e.slug}`,
|
|
@@ -9044,11 +9040,11 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
9044
9040
|
nn,
|
|
9045
9041
|
{
|
|
9046
9042
|
id: `delete-${e.slug}-modal`,
|
|
9047
|
-
isOpen:
|
|
9043
|
+
isOpen: D,
|
|
9048
9044
|
functions: { onOpen: () => {
|
|
9049
9045
|
}, onClose: () => V(!1) },
|
|
9050
9046
|
forceShow: {
|
|
9051
|
-
error:
|
|
9047
|
+
error: $ === "delete-error" ? y.formatMessage(
|
|
9052
9048
|
{ id: "discussion_delete_error" },
|
|
9053
9049
|
{
|
|
9054
9050
|
action: y.formatMessage({
|
|
@@ -9080,7 +9076,7 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
9080
9076
|
{
|
|
9081
9077
|
id: "discussion_delete_text",
|
|
9082
9078
|
values: {
|
|
9083
|
-
p: (
|
|
9079
|
+
p: (F) => /* @__PURE__ */ i.jsx("p", { children: F }),
|
|
9084
9080
|
action: y.formatMessage({
|
|
9085
9081
|
id: `discussion_action_${e.type}`
|
|
9086
9082
|
})
|
|
@@ -9099,7 +9095,7 @@ const An = "discussion_responses_", Yc = ({ type: t = "answer", responses: e = 0
|
|
|
9099
9095
|
{ id: `${An}title` },
|
|
9100
9096
|
{ action: n.formatMessage({ id: `${An}${t}` }), count: e }
|
|
9101
9097
|
) }),
|
|
9102
|
-
e === 0 && /* @__PURE__ */ i.jsx("p", { children:
|
|
9098
|
+
e === 0 && /* @__PURE__ */ i.jsx("p", { children: Ne(n.formatMessage, `${An}empty`, t, t) })
|
|
9103
9099
|
] });
|
|
9104
9100
|
};
|
|
9105
9101
|
const Kc = ({
|
|
@@ -9112,7 +9108,7 @@ const Kc = ({
|
|
|
9112
9108
|
form: r,
|
|
9113
9109
|
children: a
|
|
9114
9110
|
}) => {
|
|
9115
|
-
const s = Q(), o =
|
|
9111
|
+
const s = Q(), o = $e(ur), c = At(a, {
|
|
9116
9112
|
element: "li"
|
|
9117
9113
|
});
|
|
9118
9114
|
return /* @__PURE__ */ i.jsxs("div", { className: "thread-wrapper", children: [
|
|
@@ -9685,19 +9681,19 @@ const Ed = ({
|
|
|
9685
9681
|
}
|
|
9686
9682
|
),
|
|
9687
9683
|
c == null ? void 0 : c.map((E, k) => {
|
|
9688
|
-
var
|
|
9684
|
+
var I, O, D, V, ee, j, $, Z;
|
|
9689
9685
|
const {
|
|
9690
9686
|
id: w,
|
|
9691
9687
|
own_reactions: U,
|
|
9692
|
-
latest_reactions:
|
|
9693
|
-
reaction_counts:
|
|
9694
|
-
} = E,
|
|
9688
|
+
latest_reactions: R,
|
|
9689
|
+
reaction_counts: N
|
|
9690
|
+
} = E, B = (((I = R == null ? void 0 : R.like) == null ? void 0 : I.length) || 0) > 0, L = (((O = U == null ? void 0 : U.like) == null ? void 0 : O.length) || 0) > 0, M = L ? U == null ? void 0 : U.like[0].id : "", T = B ? (D = R == null ? void 0 : R.like) == null ? void 0 : D.map((z) => {
|
|
9695
9691
|
var W, X, Y;
|
|
9696
9692
|
return {
|
|
9697
9693
|
id: (W = z == null ? void 0 : z.user) == null ? void 0 : W.id,
|
|
9698
9694
|
name: (Y = (X = z == null ? void 0 : z.user) == null ? void 0 : X.data) == null ? void 0 : Y.name
|
|
9699
9695
|
};
|
|
9700
|
-
}) : !1, x = E == null ? void 0 : E.actor,
|
|
9696
|
+
}) : !1, x = E == null ? void 0 : E.actor, S = (x == null ? void 0 : x.id) === (y == null ? void 0 : y.id);
|
|
9701
9697
|
return /* @__PURE__ */ i.jsxs(gt, { children: [
|
|
9702
9698
|
/* @__PURE__ */ i.jsx(
|
|
9703
9699
|
on,
|
|
@@ -9705,7 +9701,7 @@ const Ed = ({
|
|
|
9705
9701
|
content: {
|
|
9706
9702
|
type: "post",
|
|
9707
9703
|
body: E == null ? void 0 : E.content,
|
|
9708
|
-
canLike: sn(n,
|
|
9704
|
+
canLike: sn(n, S),
|
|
9709
9705
|
createdAt: (E == null ? void 0 : E.time) || "",
|
|
9710
9706
|
slugs: {
|
|
9711
9707
|
question: `${t}/${e}`,
|
|
@@ -9717,14 +9713,14 @@ const Ed = ({
|
|
|
9717
9713
|
name: (V = x == null ? void 0 : x.data) == null ? void 0 : V.name,
|
|
9718
9714
|
organization: (ee = x == null ? void 0 : x.data) == null ? void 0 : ee.organization,
|
|
9719
9715
|
jobTitle: (j = x == null ? void 0 : x.data) == null ? void 0 : j.jobTitle,
|
|
9720
|
-
location: (
|
|
9716
|
+
location: ($ = x == null ? void 0 : x.data) == null ? void 0 : $.location,
|
|
9721
9717
|
image: {
|
|
9722
9718
|
thumbnail: ((Z = x == null ? void 0 : x.data) == null ? void 0 : Z.thumbnail) || void 0
|
|
9723
9719
|
}
|
|
9724
9720
|
},
|
|
9725
|
-
userLiked:
|
|
9726
|
-
likes: (
|
|
9727
|
-
comments: (
|
|
9721
|
+
userLiked: L,
|
|
9722
|
+
likes: (N == null ? void 0 : N.like) || 0,
|
|
9723
|
+
comments: (N == null ? void 0 : N.reply) || 0,
|
|
9728
9724
|
peopleWhoLiked: T
|
|
9729
9725
|
},
|
|
9730
9726
|
links: {
|
|
@@ -9740,7 +9736,7 @@ const Ed = ({
|
|
|
9740
9736
|
},
|
|
9741
9737
|
likes: {
|
|
9742
9738
|
createLike: () => v({ activityId: w }),
|
|
9743
|
-
deleteLike: () => b({ activityId: w, reactionId:
|
|
9739
|
+
deleteLike: () => b({ activityId: w, reactionId: M })
|
|
9744
9740
|
},
|
|
9745
9741
|
comments: {
|
|
9746
9742
|
openComments: () => null
|
|
@@ -10556,24 +10552,24 @@ const El = ({
|
|
|
10556
10552
|
meta: { isEditing: !1, showSuccessMessage: !1 }
|
|
10557
10553
|
},
|
|
10558
10554
|
children: o && o.length > 0 ? o == null ? void 0 : o.map((b) => {
|
|
10559
|
-
var
|
|
10555
|
+
var I, O, D, V, ee, j, $, Z, z, W, X, Y;
|
|
10560
10556
|
const {
|
|
10561
10557
|
id: y,
|
|
10562
10558
|
own_children: _,
|
|
10563
10559
|
latest_children: E,
|
|
10564
10560
|
children_counts: k
|
|
10565
|
-
} = b, U = (((
|
|
10561
|
+
} = b, U = (((I = _ == null ? void 0 : _.like) == null ? void 0 : I.length) || 0) > 0 ? (O = _ == null ? void 0 : _.like) == null ? void 0 : O.find((H) => {
|
|
10566
10562
|
var J;
|
|
10567
10563
|
return ((J = H == null ? void 0 : H.user) == null ? void 0 : J.id) === (v == null ? void 0 : v.id);
|
|
10568
|
-
}) : !1,
|
|
10569
|
-
var J, re,
|
|
10564
|
+
}) : !1, R = U ? U == null ? void 0 : U.id : "", N = !!U, L = (((D = E == null ? void 0 : E.like) == null ? void 0 : D.length) || 0) > 0 ? (V = E == null ? void 0 : E.like) == null ? void 0 : V.map((H) => {
|
|
10565
|
+
var J, re, F;
|
|
10570
10566
|
return {
|
|
10571
10567
|
id: (J = H == null ? void 0 : H.user) == null ? void 0 : J.id,
|
|
10572
|
-
name: (
|
|
10568
|
+
name: (F = (re = H == null ? void 0 : H.user) == null ? void 0 : re.data) == null ? void 0 : F.name
|
|
10573
10569
|
};
|
|
10574
|
-
}) : !1,
|
|
10570
|
+
}) : !1, M = b == null ? void 0 : b.user, T = (M == null ? void 0 : M.id) === (v == null ? void 0 : v.id), x = sn(a, T), S = typeof b.data.content == "string" ? (ee = b == null ? void 0 : b.data) == null ? void 0 : ee.content : (
|
|
10575
10571
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10576
|
-
((
|
|
10572
|
+
(($ = (j = b == null ? void 0 : b.data) == null ? void 0 : j.content) == null ? void 0 : $.text) || ""
|
|
10577
10573
|
);
|
|
10578
10574
|
return /* @__PURE__ */ i.jsx(
|
|
10579
10575
|
on,
|
|
@@ -10581,7 +10577,7 @@ const El = ({
|
|
|
10581
10577
|
content: {
|
|
10582
10578
|
id: y,
|
|
10583
10579
|
type: "reply",
|
|
10584
|
-
body:
|
|
10580
|
+
body: S,
|
|
10585
10581
|
canLike: x,
|
|
10586
10582
|
createdAt: b == null ? void 0 : b.created_at,
|
|
10587
10583
|
slugs: {
|
|
@@ -10593,18 +10589,18 @@ const El = ({
|
|
|
10593
10589
|
},
|
|
10594
10590
|
slug: "",
|
|
10595
10591
|
author: {
|
|
10596
|
-
id:
|
|
10597
|
-
name: (Z =
|
|
10598
|
-
organization: (z =
|
|
10599
|
-
jobTitle: (W =
|
|
10600
|
-
location: (X =
|
|
10592
|
+
id: M == null ? void 0 : M.id,
|
|
10593
|
+
name: (Z = M.data) == null ? void 0 : Z.name,
|
|
10594
|
+
organization: (z = M.data) == null ? void 0 : z.organization,
|
|
10595
|
+
jobTitle: (W = M.data) == null ? void 0 : W.jobTitle,
|
|
10596
|
+
location: (X = M.data) == null ? void 0 : X.location,
|
|
10601
10597
|
image: {
|
|
10602
|
-
thumbnail: ((Y =
|
|
10598
|
+
thumbnail: ((Y = M.data) == null ? void 0 : Y.thumbnail) || void 0
|
|
10603
10599
|
}
|
|
10604
10600
|
},
|
|
10605
|
-
userLiked:
|
|
10601
|
+
userLiked: N,
|
|
10606
10602
|
likes: (k == null ? void 0 : k.like) || 0,
|
|
10607
|
-
peopleWhoLiked:
|
|
10603
|
+
peopleWhoLiked: L
|
|
10608
10604
|
},
|
|
10609
10605
|
functions: {
|
|
10610
10606
|
content: {
|
|
@@ -10615,7 +10611,7 @@ const El = ({
|
|
|
10615
10611
|
},
|
|
10616
10612
|
likes: {
|
|
10617
10613
|
createLike: () => m({ replyId: y }),
|
|
10618
|
-
deleteLike: () => g({ replyId: y, reactionId:
|
|
10614
|
+
deleteLike: () => g({ replyId: y, reactionId: R })
|
|
10619
10615
|
},
|
|
10620
10616
|
comments: {}
|
|
10621
10617
|
}
|
|
@@ -10668,17 +10664,17 @@ const El = ({
|
|
|
10668
10664
|
}
|
|
10669
10665
|
),
|
|
10670
10666
|
u == null ? void 0 : u.map((E) => {
|
|
10671
|
-
var V, ee, j,
|
|
10672
|
-
const { id: k, own_children: w, latest_children: U, children_counts:
|
|
10667
|
+
var V, ee, j, $, Z, z, W, X, Y, H, J, re;
|
|
10668
|
+
const { id: k, own_children: w, latest_children: U, children_counts: R } = E, B = (((V = w == null ? void 0 : w.like) == null ? void 0 : V.length) || 0) > 0 ? (ee = w == null ? void 0 : w.like) == null ? void 0 : ee.find((F) => {
|
|
10673
10669
|
var oe;
|
|
10674
|
-
return ((oe =
|
|
10675
|
-
}) : !1,
|
|
10676
|
-
var oe,
|
|
10670
|
+
return ((oe = F == null ? void 0 : F.user) == null ? void 0 : oe.id) === (_ == null ? void 0 : _.id);
|
|
10671
|
+
}) : !1, L = B ? B == null ? void 0 : B.id : "", M = !!B, x = (((j = U == null ? void 0 : U.like) == null ? void 0 : j.length) || 0) > 0 ? ($ = U == null ? void 0 : U.like) == null ? void 0 : $.map((F) => {
|
|
10672
|
+
var oe, A, ve;
|
|
10677
10673
|
return {
|
|
10678
|
-
id: (oe =
|
|
10679
|
-
name: (ve = (
|
|
10674
|
+
id: (oe = F == null ? void 0 : F.user) == null ? void 0 : oe.id,
|
|
10675
|
+
name: (ve = (A = F == null ? void 0 : F.user) == null ? void 0 : A.data) == null ? void 0 : ve.name
|
|
10680
10676
|
};
|
|
10681
|
-
}) : !1,
|
|
10677
|
+
}) : !1, S = E == null ? void 0 : E.user, I = (S == null ? void 0 : S.id) === (_ == null ? void 0 : _.id), O = sn(r, I), D = typeof E.data.content == "string" ? (Z = E == null ? void 0 : E.data) == null ? void 0 : Z.content : (
|
|
10682
10678
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10683
10679
|
((W = (z = E == null ? void 0 : E.data) == null ? void 0 : z.content) == null ? void 0 : W.text) || ""
|
|
10684
10680
|
);
|
|
@@ -10688,8 +10684,8 @@ const El = ({
|
|
|
10688
10684
|
content: {
|
|
10689
10685
|
id: k,
|
|
10690
10686
|
type: "reply",
|
|
10691
|
-
body:
|
|
10692
|
-
canLike:
|
|
10687
|
+
body: D,
|
|
10688
|
+
canLike: O,
|
|
10693
10689
|
createdAt: E == null ? void 0 : E.created_at,
|
|
10694
10690
|
slugs: {
|
|
10695
10691
|
question: `${t}/${e}`,
|
|
@@ -10698,17 +10694,17 @@ const El = ({
|
|
|
10698
10694
|
},
|
|
10699
10695
|
slug: k,
|
|
10700
10696
|
author: {
|
|
10701
|
-
id:
|
|
10702
|
-
name: (X =
|
|
10703
|
-
organization: (Y =
|
|
10704
|
-
jobTitle: (H =
|
|
10705
|
-
location: (J =
|
|
10697
|
+
id: S == null ? void 0 : S.id,
|
|
10698
|
+
name: (X = S.data) == null ? void 0 : X.name,
|
|
10699
|
+
organization: (Y = S.data) == null ? void 0 : Y.organization,
|
|
10700
|
+
jobTitle: (H = S.data) == null ? void 0 : H.jobTitle,
|
|
10701
|
+
location: (J = S.data) == null ? void 0 : J.location,
|
|
10706
10702
|
image: {
|
|
10707
|
-
thumbnail: ((re =
|
|
10703
|
+
thumbnail: ((re = S.data) == null ? void 0 : re.thumbnail) || void 0
|
|
10708
10704
|
}
|
|
10709
10705
|
},
|
|
10710
|
-
userLiked:
|
|
10711
|
-
likes: (
|
|
10706
|
+
userLiked: M,
|
|
10707
|
+
likes: (R == null ? void 0 : R.like) || 0,
|
|
10712
10708
|
peopleWhoLiked: x
|
|
10713
10709
|
},
|
|
10714
10710
|
functions: {
|
|
@@ -10716,11 +10712,11 @@ const El = ({
|
|
|
10716
10712
|
createContent: () => null,
|
|
10717
10713
|
deleteContent: () => b({ replyId: k }),
|
|
10718
10714
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10719
|
-
updateContent: (
|
|
10715
|
+
updateContent: (F, { body: oe }) => g({ replyId: k, content: oe })
|
|
10720
10716
|
},
|
|
10721
10717
|
likes: {
|
|
10722
10718
|
createLike: () => v({ replyId: k }),
|
|
10723
|
-
deleteLike: () => y({ replyId: k, reactionId:
|
|
10719
|
+
deleteLike: () => y({ replyId: k, reactionId: L })
|
|
10724
10720
|
},
|
|
10725
10721
|
comments: {}
|
|
10726
10722
|
},
|
|
@@ -10769,7 +10765,7 @@ function Cl({
|
|
|
10769
10765
|
});
|
|
10770
10766
|
return r;
|
|
10771
10767
|
}
|
|
10772
|
-
function
|
|
10768
|
+
function Nl({ queryFn: t, queryKey: e }) {
|
|
10773
10769
|
const {
|
|
10774
10770
|
data: n,
|
|
10775
10771
|
error: r,
|
|
@@ -10786,7 +10782,7 @@ function $l({ queryFn: t, queryKey: e }) {
|
|
|
10786
10782
|
isFetching: s
|
|
10787
10783
|
};
|
|
10788
10784
|
}
|
|
10789
|
-
function
|
|
10785
|
+
function $l({
|
|
10790
10786
|
queryFns: {
|
|
10791
10787
|
read: t,
|
|
10792
10788
|
edit: e,
|
|
@@ -10802,7 +10798,7 @@ function Nl({
|
|
|
10802
10798
|
},
|
|
10803
10799
|
user: o,
|
|
10804
10800
|
...c
|
|
10805
|
-
}, l = Cl({ ...u, mutationFn: e }), f = Pl({ ...u, mutationFn: n }), d = Rl({ ...u, mutationFn: r }), { activity: m, ...p } =
|
|
10801
|
+
}, l = Cl({ ...u, mutationFn: e }), f = Pl({ ...u, mutationFn: n }), d = Rl({ ...u, mutationFn: r }), { activity: m, ...p } = Nl({ queryKey: a, queryFn: t });
|
|
10806
10802
|
return {
|
|
10807
10803
|
activity: m,
|
|
10808
10804
|
mutations: {
|
|
@@ -10860,13 +10856,13 @@ const Cd = ({
|
|
|
10860
10856
|
leave: u
|
|
10861
10857
|
}
|
|
10862
10858
|
}) => {
|
|
10863
|
-
var
|
|
10864
|
-
const l = Q(), f =
|
|
10859
|
+
var B, L, M, T, x, S, I, O, D, V;
|
|
10860
|
+
const l = Q(), f = $e(De), {
|
|
10865
10861
|
activity: d,
|
|
10866
10862
|
error: m,
|
|
10867
10863
|
isLoading: p,
|
|
10868
10864
|
mutations: { edit: g, like: v, unlike: b }
|
|
10869
|
-
} =
|
|
10865
|
+
} = $l({
|
|
10870
10866
|
queryFns: s,
|
|
10871
10867
|
queryKey: [t, e, n]
|
|
10872
10868
|
});
|
|
@@ -10880,13 +10876,13 @@ const Cd = ({
|
|
|
10880
10876
|
text: l.formatMessage({ id: "activitySection_notFoundError" })
|
|
10881
10877
|
}
|
|
10882
10878
|
);
|
|
10883
|
-
const { own_reactions: y, latest_reactions: _ } = d, E = (((
|
|
10884
|
-
var j,
|
|
10879
|
+
const { own_reactions: y, latest_reactions: _ } = d, E = (((B = _ == null ? void 0 : _.like) == null ? void 0 : B.length) || 0) > 0, k = (((L = y == null ? void 0 : y.like) == null ? void 0 : L.length) || 0) > 0, w = k ? y == null ? void 0 : y.like[0].id : "", U = E ? (M = _ == null ? void 0 : _.like) == null ? void 0 : M.map((ee) => {
|
|
10880
|
+
var j, $, Z;
|
|
10885
10881
|
return {
|
|
10886
10882
|
id: (j = ee == null ? void 0 : ee.user) == null ? void 0 : j.id,
|
|
10887
|
-
name: (Z = (
|
|
10883
|
+
name: (Z = ($ = ee == null ? void 0 : ee.user) == null ? void 0 : $.data) == null ? void 0 : Z.name
|
|
10888
10884
|
};
|
|
10889
|
-
}) : !1,
|
|
10885
|
+
}) : !1, R = d == null ? void 0 : d.actor, N = (R == null ? void 0 : R.id) === (f == null ? void 0 : f.id);
|
|
10890
10886
|
return /* @__PURE__ */ i.jsxs("section", { className: "activity-section", children: [
|
|
10891
10887
|
/* @__PURE__ */ i.jsx(
|
|
10892
10888
|
on,
|
|
@@ -10896,7 +10892,7 @@ const Cd = ({
|
|
|
10896
10892
|
id: n,
|
|
10897
10893
|
type: "post",
|
|
10898
10894
|
body: d == null ? void 0 : d.content,
|
|
10899
|
-
canLike: sn(r,
|
|
10895
|
+
canLike: sn(r, N),
|
|
10900
10896
|
createdAt: (d == null ? void 0 : d.time) || "",
|
|
10901
10897
|
slugs: {
|
|
10902
10898
|
question: `${t}/${e}`,
|
|
@@ -10904,21 +10900,21 @@ const Cd = ({
|
|
|
10904
10900
|
},
|
|
10905
10901
|
slug: n,
|
|
10906
10902
|
author: {
|
|
10907
|
-
id:
|
|
10908
|
-
name: (T =
|
|
10909
|
-
organization: (x =
|
|
10910
|
-
jobTitle: (
|
|
10911
|
-
location: (
|
|
10903
|
+
id: R.id,
|
|
10904
|
+
name: (T = R.data) == null ? void 0 : T.name,
|
|
10905
|
+
organization: (x = R.data) == null ? void 0 : x.organization,
|
|
10906
|
+
jobTitle: (S = R.data) == null ? void 0 : S.jobTitle,
|
|
10907
|
+
location: (I = R.data) == null ? void 0 : I.location,
|
|
10912
10908
|
image: {
|
|
10913
|
-
thumbnail: ((
|
|
10909
|
+
thumbnail: ((O = R.data) == null ? void 0 : O.thumbnail) || void 0
|
|
10914
10910
|
}
|
|
10915
10911
|
},
|
|
10916
10912
|
userLiked: k,
|
|
10917
|
-
likes: ((
|
|
10913
|
+
likes: ((D = d == null ? void 0 : d.reaction_counts) == null ? void 0 : D.like) || 0,
|
|
10918
10914
|
comments: ((V = d == null ? void 0 : d.reaction_counts) == null ? void 0 : V.reply) || 0,
|
|
10919
10915
|
peopleWhoLiked: U
|
|
10920
10916
|
},
|
|
10921
|
-
originalAuthorId:
|
|
10917
|
+
originalAuthorId: R == null ? void 0 : R.id,
|
|
10922
10918
|
forceHide: { comments: !0 },
|
|
10923
10919
|
functions: {
|
|
10924
10920
|
content: {
|
|
@@ -10954,7 +10950,7 @@ const Cd = ({
|
|
|
10954
10950
|
}
|
|
10955
10951
|
)
|
|
10956
10952
|
] });
|
|
10957
|
-
},
|
|
10953
|
+
}, Nd = ({
|
|
10958
10954
|
id: t,
|
|
10959
10955
|
data: { jobTitle: e, name: n, organization: r, thumbnail: a }
|
|
10960
10956
|
}) => ({
|
|
@@ -11007,7 +11003,7 @@ const Cd = ({
|
|
|
11007
11003
|
contributors: ["community"]
|
|
11008
11004
|
}
|
|
11009
11005
|
];
|
|
11010
|
-
const Ot = "notFoundError_",
|
|
11006
|
+
const Ot = "notFoundError_", $d = () => {
|
|
11011
11007
|
const t = Q(), e = [];
|
|
11012
11008
|
return ua.forEach((n, r) => {
|
|
11013
11009
|
n.title = t.formatMessage({ id: `${Ot}post_${r + 1}` }), e.push("solutionArticle");
|
|
@@ -11104,10 +11100,10 @@ export {
|
|
|
11104
11100
|
rr as Member,
|
|
11105
11101
|
Td as MembersList,
|
|
11106
11102
|
za as Modal,
|
|
11107
|
-
|
|
11103
|
+
Nc as MoreMenu,
|
|
11108
11104
|
Yl as NUMBER_OF_USERS,
|
|
11109
11105
|
Rc as NavigationMenu,
|
|
11110
|
-
|
|
11106
|
+
$d as NotFoundError,
|
|
11111
11107
|
nn as Overlay,
|
|
11112
11108
|
Os as PageHeading,
|
|
11113
11109
|
Bc as PageLayout,
|
|
@@ -11135,9 +11131,9 @@ export {
|
|
|
11135
11131
|
ks as UserProvider,
|
|
11136
11132
|
be as VisuallyHidden,
|
|
11137
11133
|
Lo as addAriaProps,
|
|
11138
|
-
|
|
11134
|
+
$a as getMember,
|
|
11139
11135
|
Kt as headerData,
|
|
11140
|
-
|
|
11136
|
+
Nd as mapGetStreamData,
|
|
11141
11137
|
ds as pageReady,
|
|
11142
11138
|
Kl as passwordValidator,
|
|
11143
11139
|
Sd as repliesFeedMock,
|