@apolitical/component-library 3.0.3-ac.0 → 3.0.3-ac.22
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/index.js +4 -4
- package/index.mjs +565 -554
- package/layout/page-layout/components/header/header.data.d.ts +14 -6
- package/package.json +1 -1
- package/style.css +1 -1
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import K, { memo as Fe, useState as te, useEffect as ae, useRef as pe, useMemo as bt, createContext as Un, useContext as Ce, Children as Fn, useCallback as Kr, useReducer as zn, Fragment as gt, Suspense as
|
|
2
|
-
import
|
|
1
|
+
import K, { memo as Fe, useState as te, useEffect as ae, useRef as pe, useMemo as bt, createContext as Un, useContext as Ce, Children as Fn, useCallback as Kr, useReducer as zn, Fragment as gt, Suspense as di } from "react";
|
|
2
|
+
import dt from "lodash.clonedeep";
|
|
3
3
|
import fi from "lodash.set";
|
|
4
4
|
import { useIntl as G, IntlProvider as mi, FormattedMessage as _e, createIntl as pi } from "react-intl";
|
|
5
5
|
import Ke from "truncate";
|
|
@@ -104,14 +104,14 @@ function Si() {
|
|
|
104
104
|
return rt;
|
|
105
105
|
hr = 1;
|
|
106
106
|
var t = K, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
107
|
-
function o(c, f,
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
for (
|
|
111
|
-
r.call(f,
|
|
107
|
+
function o(c, f, u) {
|
|
108
|
+
var d, l = {}, m = null, p = null;
|
|
109
|
+
u !== void 0 && (m = "" + u), f.key !== void 0 && (m = "" + f.key), f.ref !== void 0 && (p = f.ref);
|
|
110
|
+
for (d in f)
|
|
111
|
+
r.call(f, d) && !s.hasOwnProperty(d) && (l[d] = f[d]);
|
|
112
112
|
if (c && c.defaultProps)
|
|
113
|
-
for (
|
|
114
|
-
l[
|
|
113
|
+
for (d in f = c.defaultProps, f)
|
|
114
|
+
l[d] === void 0 && (l[d] = f[d]);
|
|
115
115
|
return { $$typeof: e, type: c, key: m, ref: p, props: l, _owner: i.current };
|
|
116
116
|
}
|
|
117
117
|
return rt.Fragment = n, rt.jsx = o, rt.jsxs = o, rt;
|
|
@@ -129,7 +129,7 @@ var at = {};
|
|
|
129
129
|
var gr;
|
|
130
130
|
function Ci() {
|
|
131
131
|
return gr || (gr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
132
|
-
var t = K, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"),
|
|
132
|
+
var t = K, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), l = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), v = Symbol.iterator, y = "@@iterator";
|
|
133
133
|
function _(h) {
|
|
134
134
|
if (h === null || typeof h != "object")
|
|
135
135
|
return null;
|
|
@@ -157,7 +157,7 @@ function Ci() {
|
|
|
157
157
|
var j = !1, w = !1, U = !1, F = !1, H = !1, M;
|
|
158
158
|
M = Symbol.for("react.module.reference");
|
|
159
159
|
function O(h) {
|
|
160
|
-
return !!(typeof h == "string" || typeof h == "function" || h === r || h === s || H || h === i || h ===
|
|
160
|
+
return !!(typeof h == "string" || typeof h == "function" || h === r || h === s || H || h === i || h === u || h === d || F || h === p || j || w || U || typeof h == "object" && h !== null && (h.$$typeof === m || h.$$typeof === l || h.$$typeof === o || h.$$typeof === c || h.$$typeof === f || // This needs to include all possible module reference object
|
|
161
161
|
// types supported by any Flight configuration anywhere since
|
|
162
162
|
// we don't know which Flight build this will end up being used
|
|
163
163
|
// with.
|
|
@@ -189,9 +189,9 @@ function Ci() {
|
|
|
189
189
|
return "Profiler";
|
|
190
190
|
case i:
|
|
191
191
|
return "StrictMode";
|
|
192
|
-
case d:
|
|
193
|
-
return "Suspense";
|
|
194
192
|
case u:
|
|
193
|
+
return "Suspense";
|
|
194
|
+
case d:
|
|
195
195
|
return "SuspenseList";
|
|
196
196
|
}
|
|
197
197
|
if (typeof h == "object")
|
|
@@ -385,9 +385,9 @@ function Ci() {
|
|
|
385
385
|
if (typeof h == "string")
|
|
386
386
|
return X(h);
|
|
387
387
|
switch (h) {
|
|
388
|
-
case d:
|
|
389
|
-
return X("Suspense");
|
|
390
388
|
case u:
|
|
389
|
+
return X("Suspense");
|
|
390
|
+
case d:
|
|
391
391
|
return X("SuspenseList");
|
|
392
392
|
}
|
|
393
393
|
if (typeof h == "object")
|
|
@@ -591,7 +591,7 @@ Check your code at ` + P + ":" + L + ".";
|
|
|
591
591
|
return "";
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
|
-
var
|
|
594
|
+
var ur = {};
|
|
595
595
|
function ai(h) {
|
|
596
596
|
{
|
|
597
597
|
var P = lr();
|
|
@@ -604,15 +604,15 @@ Check the top-level render call using <` + L + ">.");
|
|
|
604
604
|
return P;
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function dr(h, P) {
|
|
608
608
|
{
|
|
609
609
|
if (!h._store || h._store.validated || h.key != null)
|
|
610
610
|
return;
|
|
611
611
|
h._store.validated = !0;
|
|
612
612
|
var L = ai(P);
|
|
613
|
-
if (
|
|
613
|
+
if (ur[L])
|
|
614
614
|
return;
|
|
615
|
-
|
|
615
|
+
ur[L] = !0;
|
|
616
616
|
var ne = "";
|
|
617
617
|
h && h._owner && h._owner !== sn.current && (ne = " It was passed a child from " + x(h._owner.type) + "."), Ze(h), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', L, ne), Ze(null);
|
|
618
618
|
}
|
|
@@ -624,7 +624,7 @@ Check the top-level render call using <` + L + ">.");
|
|
|
624
624
|
if (rn(h))
|
|
625
625
|
for (var L = 0; L < h.length; L++) {
|
|
626
626
|
var ne = h[L];
|
|
627
|
-
cn(ne) &&
|
|
627
|
+
cn(ne) && dr(ne, P);
|
|
628
628
|
}
|
|
629
629
|
else if (cn(h))
|
|
630
630
|
h._store && (h._store.validated = !0);
|
|
@@ -632,7 +632,7 @@ Check the top-level render call using <` + L + ">.");
|
|
|
632
632
|
var le = _(h);
|
|
633
633
|
if (typeof le == "function" && le !== h.entries)
|
|
634
634
|
for (var me = le.call(h), ce; !(ce = me.next()).done; )
|
|
635
|
-
cn(ce.value) &&
|
|
635
|
+
cn(ce.value) && dr(ce.value, P);
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
}
|
|
@@ -709,8 +709,8 @@ Check the top-level render call using <` + L + ">.");
|
|
|
709
709
|
function ci(h, P, L) {
|
|
710
710
|
return mr(h, P, L, !1);
|
|
711
711
|
}
|
|
712
|
-
var li = ci,
|
|
713
|
-
at.Fragment = r, at.jsx = li, at.jsxs =
|
|
712
|
+
var li = ci, ui = oi;
|
|
713
|
+
at.Fragment = r, at.jsx = li, at.jsxs = ui;
|
|
714
714
|
}()), at;
|
|
715
715
|
}
|
|
716
716
|
process.env.NODE_ENV === "production" ? On.exports = Si() : On.exports = Ci();
|
|
@@ -730,8 +730,8 @@ const $i = () => {
|
|
|
730
730
|
}, e);
|
|
731
731
|
};
|
|
732
732
|
function Ni(t, e, n) {
|
|
733
|
-
var r = this, i = pe(null), s = pe(0), o = pe(null), c = pe([]), f = pe(),
|
|
734
|
-
|
|
733
|
+
var r = this, i = pe(null), s = pe(0), o = pe(null), c = pe([]), f = pe(), u = pe(), d = pe(t), l = pe(!0);
|
|
734
|
+
d.current = t;
|
|
735
735
|
var m = typeof window < "u", p = !e && e !== 0 && m;
|
|
736
736
|
if (typeof t != "function")
|
|
737
737
|
throw new TypeError("Expected a function");
|
|
@@ -745,7 +745,7 @@ function Ni(t, e, n) {
|
|
|
745
745
|
var E = bt(function() {
|
|
746
746
|
var j = function(O) {
|
|
747
747
|
var S = c.current, T = f.current;
|
|
748
|
-
return c.current = f.current = null, s.current = O,
|
|
748
|
+
return c.current = f.current = null, s.current = O, u.current = d.current.apply(T, S);
|
|
749
749
|
}, w = function(O, S) {
|
|
750
750
|
p && cancelAnimationFrame(o.current), o.current = p ? requestAnimationFrame(O) : setTimeout(O, S);
|
|
751
751
|
}, U = function(O) {
|
|
@@ -754,7 +754,7 @@ function Ni(t, e, n) {
|
|
|
754
754
|
var S = O - i.current;
|
|
755
755
|
return !i.current || S >= e || S < 0 || _ && O - s.current >= b;
|
|
756
756
|
}, F = function(O) {
|
|
757
|
-
return o.current = null, y && c.current ? j(O) : (c.current = f.current = null,
|
|
757
|
+
return o.current = null, y && c.current ? j(O) : (c.current = f.current = null, u.current);
|
|
758
758
|
}, H = function O() {
|
|
759
759
|
var S = Date.now();
|
|
760
760
|
if (U(S))
|
|
@@ -768,11 +768,11 @@ function Ni(t, e, n) {
|
|
|
768
768
|
var O = Date.now(), S = U(O);
|
|
769
769
|
if (c.current = [].slice.call(arguments), f.current = r, i.current = O, S) {
|
|
770
770
|
if (!o.current && l.current)
|
|
771
|
-
return s.current = i.current, w(H, e), v ? j(i.current) :
|
|
771
|
+
return s.current = i.current, w(H, e), v ? j(i.current) : u.current;
|
|
772
772
|
if (_)
|
|
773
773
|
return w(H, e), j(i.current);
|
|
774
774
|
}
|
|
775
|
-
return o.current || w(H, e),
|
|
775
|
+
return o.current || w(H, e), u.current;
|
|
776
776
|
}
|
|
777
777
|
};
|
|
778
778
|
return M.cancel = function() {
|
|
@@ -780,7 +780,7 @@ function Ni(t, e, n) {
|
|
|
780
780
|
}, M.isPending = function() {
|
|
781
781
|
return !!o.current;
|
|
782
782
|
}, M.flush = function() {
|
|
783
|
-
return o.current ? F(Date.now()) :
|
|
783
|
+
return o.current ? F(Date.now()) : u.current;
|
|
784
784
|
}, M;
|
|
785
785
|
}, [v, _, e, b, y, p, m, g]);
|
|
786
786
|
return E;
|
|
@@ -795,18 +795,18 @@ const yt = (t = !0, e = !1, n = "window") => {
|
|
|
795
795
|
return;
|
|
796
796
|
const [r, i] = K.useState(0) || [!1, () => {
|
|
797
797
|
}];
|
|
798
|
-
ae(() => (c(), window.addEventListener("resize",
|
|
799
|
-
clearTimeout(ln),
|
|
798
|
+
ae(() => (c(), window.addEventListener("resize", u), window.addEventListener("hashchange", u), window.addEventListener("hiddenSectionVisible", f), () => {
|
|
799
|
+
clearTimeout(ln), u.flush(), window.removeEventListener("resize", u), window.removeEventListener("hashchange", u), window.removeEventListener("hiddenSectionVisible", f);
|
|
800
800
|
}), n === "window" ? [] : [n]);
|
|
801
801
|
const o = () => {
|
|
802
802
|
if (n)
|
|
803
803
|
return n === "window" ? window.innerWidth : n.offsetWidth;
|
|
804
804
|
}, c = () => {
|
|
805
805
|
i(o());
|
|
806
|
-
}, f = ({ detail:
|
|
807
|
-
const { id: l } =
|
|
806
|
+
}, f = ({ detail: d }) => {
|
|
807
|
+
const { id: l } = d;
|
|
808
808
|
n === "window" || !n.closest(`#${l}`) || o() === r || c();
|
|
809
|
-
},
|
|
809
|
+
}, u = na(
|
|
810
810
|
() => {
|
|
811
811
|
o() !== r && (e && (clearTimeout(ln), document.body.classList.add("is-resizing"), ln = setTimeout(() => {
|
|
812
812
|
document.body.classList.remove("is-resizing");
|
|
@@ -836,17 +836,17 @@ const yt = (t = !0, e = !1, n = "window") => {
|
|
|
836
836
|
scrollUp: !1
|
|
837
837
|
}) || [!1, () => {
|
|
838
838
|
}];
|
|
839
|
-
ae(() => (f(), window.addEventListener("scroll",
|
|
840
|
-
|
|
839
|
+
ae(() => (f(), window.addEventListener("scroll", u), () => {
|
|
840
|
+
u.flush(), window.removeEventListener("scroll", u);
|
|
841
841
|
}), []);
|
|
842
842
|
const f = () => {
|
|
843
|
-
const
|
|
844
|
-
if (s({ current:
|
|
845
|
-
|
|
843
|
+
const d = window.scrollY, l = i.current, m = d - l, p = m > 0 ? "down" : "up";
|
|
844
|
+
if (s({ current: d, past: l }), p === "down") {
|
|
845
|
+
d >= t + e.down && !o.scrollDown && (!o.scrollUp || m > e.up) && (n(), c({ scrollUp: !1, scrollDown: !0 }));
|
|
846
846
|
return;
|
|
847
847
|
}
|
|
848
848
|
Math.abs(m) >= e.up && !o.scrollUp && (r(), c({ scrollUp: !0, scrollDown: !1 }));
|
|
849
|
-
},
|
|
849
|
+
}, u = na(() => {
|
|
850
850
|
f();
|
|
851
851
|
}, 250);
|
|
852
852
|
return i;
|
|
@@ -863,7 +863,7 @@ const yt = (t = !0, e = !1, n = "window") => {
|
|
|
863
863
|
}, t);
|
|
864
864
|
}, ra = (t, e) => {
|
|
865
865
|
Array.isArray(e) || (e = [e]);
|
|
866
|
-
const n =
|
|
866
|
+
const n = dt(t);
|
|
867
867
|
return e.forEach(({ type: r, value: i }) => {
|
|
868
868
|
fi(n, r, i);
|
|
869
869
|
}), n;
|
|
@@ -957,7 +957,7 @@ const qe = {
|
|
|
957
957
|
dates_years: "{number}y",
|
|
958
958
|
/* Cards */
|
|
959
959
|
card_carousel_viewAll: "View all",
|
|
960
|
-
|
|
960
|
+
card_label_communityPage: "Community",
|
|
961
961
|
card_label_event: "Event",
|
|
962
962
|
card_label_learningHub: "Programme",
|
|
963
963
|
card_label_listPage: "List",
|
|
@@ -1214,6 +1214,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1214
1214
|
header_topics_explore_courses: "Courses",
|
|
1215
1215
|
"header_topics_explore_q-and-a": "Q&A",
|
|
1216
1216
|
header_topics_explore_articles: "Articles",
|
|
1217
|
+
header_topics_explore_communities: "Communities",
|
|
1217
1218
|
header_topics_topics: "Topics",
|
|
1218
1219
|
header_topics_topics_climate: "Climate",
|
|
1219
1220
|
"header_topics_topics_cities-and-local-government": "Cities and local government",
|
|
@@ -1265,6 +1266,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1265
1266
|
navigationMenu_links_microcourses: "Courses",
|
|
1266
1267
|
"navigationMenu_links_q-and-a": "Q&A",
|
|
1267
1268
|
navigationMenu_links_articles: "Articles",
|
|
1269
|
+
navigationMenu_links_communities: "Communities",
|
|
1268
1270
|
navigationMenu_profile: "My profile",
|
|
1269
1271
|
shareLinks_label: "Share",
|
|
1270
1272
|
shareLinks_link_linkedin: "Share on LinkedIn",
|
|
@@ -1369,8 +1371,8 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1369
1371
|
onClick: o = !1,
|
|
1370
1372
|
className: c = "",
|
|
1371
1373
|
disabled: f = !1,
|
|
1372
|
-
screenreaderText:
|
|
1373
|
-
children:
|
|
1374
|
+
screenreaderText: u = !1,
|
|
1375
|
+
children: d = !1,
|
|
1374
1376
|
...l
|
|
1375
1377
|
}) => {
|
|
1376
1378
|
const p = yt(typeof e == "object");
|
|
@@ -1383,7 +1385,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1383
1385
|
const y = {
|
|
1384
1386
|
...l,
|
|
1385
1387
|
className: C(t, c, v, {
|
|
1386
|
-
"no-text": !
|
|
1388
|
+
"no-text": !d,
|
|
1387
1389
|
disabled: f,
|
|
1388
1390
|
button: i
|
|
1389
1391
|
}),
|
|
@@ -1395,7 +1397,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1395
1397
|
return i && (s = "a", y.href = i), K.createElement(
|
|
1396
1398
|
s,
|
|
1397
1399
|
y,
|
|
1398
|
-
|
|
1400
|
+
d || (u ? /* @__PURE__ */ a.jsx(be, { showOnFocus: !1, children: u }) : null)
|
|
1399
1401
|
);
|
|
1400
1402
|
}, _t = ({ buttons: t, className: e = "", ...n }) => {
|
|
1401
1403
|
const r = t.length > 1 ? "ul" : "p", i = t.map((s, o) => r === "p" ? /* @__PURE__ */ a.jsx(ie, { ...s }, o) : /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(ie, { ...s }) }, o));
|
|
@@ -1521,7 +1523,7 @@ const Re = ({ className: t = "", maxWidth: e = !1 }) => {
|
|
|
1521
1523
|
}, Hi = ({ format: t, height: e, query: n, width: r }) => {
|
|
1522
1524
|
let i = `w=${r}&h=${e}`;
|
|
1523
1525
|
return i = t ? `${i}&fm=${t}` : i, i = n ? `${i}&${n}` : i, i;
|
|
1524
|
-
},
|
|
1526
|
+
}, un = ({ format: t, range: e, url: n, query: r }) => e.map(({ height: i, width: s }) => `${n}?${Hi({
|
|
1525
1527
|
format: t,
|
|
1526
1528
|
height: i,
|
|
1527
1529
|
query: r,
|
|
@@ -1535,10 +1537,10 @@ const xt = ({ image: t, className: e, testId: n }) => {
|
|
|
1535
1537
|
query: o,
|
|
1536
1538
|
url: c,
|
|
1537
1539
|
width: f,
|
|
1538
|
-
loading:
|
|
1539
|
-
decoding:
|
|
1540
|
+
loading: u,
|
|
1541
|
+
decoding: d,
|
|
1540
1542
|
fetchPriority: l
|
|
1541
|
-
} = t, { range: m, sizes: p } = Wi(t), v =
|
|
1543
|
+
} = t, { range: m, sizes: p } = Wi(t), v = un({ format: "avif", query: o, range: m, url: c }), y = un({ format: "webp", query: o, range: m, url: c }), _ = un({ format: "", query: o, range: m, url: c });
|
|
1542
1544
|
return /* @__PURE__ */ a.jsxs("picture", { className: e, children: [
|
|
1543
1545
|
s !== "image/gif" && /* @__PURE__ */ a.jsx(
|
|
1544
1546
|
"source",
|
|
@@ -1557,8 +1559,8 @@ const xt = ({ image: t, className: e, testId: n }) => {
|
|
|
1557
1559
|
sizes: p,
|
|
1558
1560
|
src: c,
|
|
1559
1561
|
alt: r,
|
|
1560
|
-
loading:
|
|
1561
|
-
decoding:
|
|
1562
|
+
loading: u || "lazy",
|
|
1563
|
+
decoding: d || "async",
|
|
1562
1564
|
fetchpriority: l || "auto",
|
|
1563
1565
|
width: f,
|
|
1564
1566
|
height: i,
|
|
@@ -1623,7 +1625,7 @@ const Vi = ({ isOpen: t = !1, isLoading: e = !1, children: n }) => {
|
|
|
1623
1625
|
};
|
|
1624
1626
|
}, []);
|
|
1625
1627
|
const c = ({ propertyName: f }) => {
|
|
1626
|
-
f === "opacity" && (it !== !1 && clearTimeout(it), o((
|
|
1628
|
+
f === "opacity" && (it !== !1 && clearTimeout(it), o((u) => u === "opening" ? "open" : u === "closing" ? "closed" : u === "closed" ? "hidden" : u));
|
|
1627
1629
|
};
|
|
1628
1630
|
return vt(() => {
|
|
1629
1631
|
it !== !1 && clearTimeout(it);
|
|
@@ -1717,7 +1719,7 @@ const Yi = ({ icon: t, description: e, ctaMessage: n, href: r, showEditButton: i
|
|
|
1717
1719
|
placeholder: o,
|
|
1718
1720
|
showDivider: c = !0
|
|
1719
1721
|
}) => {
|
|
1720
|
-
const [f,
|
|
1722
|
+
const [f, u] = K.useState(!1), d = typeof r == "string" || !!n, l = () => u(!1);
|
|
1721
1723
|
return /* @__PURE__ */ a.jsxs("section", { className: C("edit-section", e), children: [
|
|
1722
1724
|
n && /* @__PURE__ */ a.jsx(
|
|
1723
1725
|
Xt,
|
|
@@ -1737,7 +1739,7 @@ const Yi = ({ icon: t, description: e, ctaMessage: n, href: r, showEditButton: i
|
|
|
1737
1739
|
...n == null ? void 0 : n.functions,
|
|
1738
1740
|
onSuccess: async (m) => {
|
|
1739
1741
|
var p, v;
|
|
1740
|
-
(p = n == null ? void 0 : n.functions) != null && p.onSuccess && await ((v = n == null ? void 0 : n.functions) == null ? void 0 : v.onSuccess(m)),
|
|
1742
|
+
(p = n == null ? void 0 : n.functions) != null && p.onSuccess && await ((v = n == null ? void 0 : n.functions) == null ? void 0 : v.onSuccess(m)), u(!1);
|
|
1741
1743
|
},
|
|
1742
1744
|
onCancel: l
|
|
1743
1745
|
} })
|
|
@@ -1745,9 +1747,9 @@ const Yi = ({ icon: t, description: e, ctaMessage: n, href: r, showEditButton: i
|
|
|
1745
1747
|
),
|
|
1746
1748
|
/* @__PURE__ */ a.jsxs("div", { className: "edit-section-header", children: [
|
|
1747
1749
|
/* @__PURE__ */ a.jsx("h2", { className: "edit-section-header-title", children: i }),
|
|
1748
|
-
|
|
1750
|
+
d && /* @__PURE__ */ a.jsx(ie, { href: r, variant: "tertiary", size: "small", icon: "pencil", onClick: () => ca({ href: r, setShowModal: u }), children: "Edit" })
|
|
1749
1751
|
] }),
|
|
1750
|
-
t || /* @__PURE__ */ a.jsx(Yi, { ...o, href: r, setShowModal:
|
|
1752
|
+
t || /* @__PURE__ */ a.jsx(Yi, { ...o, href: r, setShowModal: u, showEditButton: d }),
|
|
1751
1753
|
c && /* @__PURE__ */ a.jsx(Re, {})
|
|
1752
1754
|
] });
|
|
1753
1755
|
};
|
|
@@ -1772,10 +1774,10 @@ const yl = ({
|
|
|
1772
1774
|
"two-col": r === 2 || r === 4,
|
|
1773
1775
|
"three-col": r === 5 || r <= 10 && r % 3 === 0
|
|
1774
1776
|
}),
|
|
1775
|
-
children: e.map(({ logo: s, nameOfBusiness: o, link: c = !1, description: f = !1 },
|
|
1777
|
+
children: e.map(({ logo: s, nameOfBusiness: o, link: c = !1, description: f = !1 }, u) => {
|
|
1776
1778
|
if (!s || !s.url)
|
|
1777
1779
|
return null;
|
|
1778
|
-
const
|
|
1780
|
+
const d = /* @__PURE__ */ a.jsx(
|
|
1779
1781
|
"img",
|
|
1780
1782
|
{
|
|
1781
1783
|
src: s.url,
|
|
@@ -1785,9 +1787,9 @@ const yl = ({
|
|
|
1785
1787
|
}
|
|
1786
1788
|
);
|
|
1787
1789
|
return /* @__PURE__ */ a.jsxs("li", { children: [
|
|
1788
|
-
/* @__PURE__ */ a.jsx("p", { className: "img-wrapper", children: c ? /* @__PURE__ */ a.jsx("a", { href: c, target: "_blank", rel: "nofollow noreferrer noopener", children:
|
|
1790
|
+
/* @__PURE__ */ a.jsx("p", { className: "img-wrapper", children: c ? /* @__PURE__ */ a.jsx("a", { href: c, target: "_blank", rel: "nofollow noreferrer noopener", children: d }) : d }),
|
|
1789
1791
|
f && /* @__PURE__ */ a.jsx("small", { children: f })
|
|
1790
|
-
] }, window.btoa(`${s.url}_${
|
|
1792
|
+
] }, window.btoa(`${s.url}_${u}`));
|
|
1791
1793
|
})
|
|
1792
1794
|
}
|
|
1793
1795
|
)
|
|
@@ -1821,27 +1823,27 @@ const Ki = [
|
|
|
1821
1823
|
cta: o,
|
|
1822
1824
|
children: c
|
|
1823
1825
|
}) => {
|
|
1824
|
-
const f = ["eyebrow", "title", "text"],
|
|
1826
|
+
const f = ["eyebrow", "title", "text"], u = { eyebrow: "small", title: "h1", text: "p" }, d = {};
|
|
1825
1827
|
return f.forEach((l) => {
|
|
1826
1828
|
if (!e[l]) {
|
|
1827
|
-
|
|
1829
|
+
d[l] = !1;
|
|
1828
1830
|
return;
|
|
1829
1831
|
}
|
|
1830
1832
|
if (!s[l]) {
|
|
1831
1833
|
if (typeof e[l] == "object") {
|
|
1832
|
-
|
|
1834
|
+
d[l] = e[l];
|
|
1833
1835
|
const { text: m, element: p } = e[l];
|
|
1834
1836
|
if (p && Ki.includes(p.toLowerCase()))
|
|
1835
1837
|
return;
|
|
1836
|
-
|
|
1838
|
+
d[l] = {
|
|
1837
1839
|
text: m,
|
|
1838
|
-
element:
|
|
1840
|
+
element: u[l]
|
|
1839
1841
|
};
|
|
1840
1842
|
return;
|
|
1841
1843
|
}
|
|
1842
|
-
|
|
1844
|
+
d[l] = {
|
|
1843
1845
|
text: e[l],
|
|
1844
|
-
element:
|
|
1846
|
+
element: u[l]
|
|
1845
1847
|
};
|
|
1846
1848
|
}
|
|
1847
1849
|
}), o && o.link && o.link[0] === "#" && (o.props || (o.props = {}), o.props.onClick = (l) => {
|
|
@@ -1853,13 +1855,13 @@ const Ki = [
|
|
|
1853
1855
|
{
|
|
1854
1856
|
className: C("banner-section", r, i, t, {
|
|
1855
1857
|
"has-image": n,
|
|
1856
|
-
"has-extra-spacing": i === "normal" &&
|
|
1858
|
+
"has-extra-spacing": i === "normal" && d.eyebrow && d.title
|
|
1857
1859
|
}),
|
|
1858
1860
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1859
1861
|
/* @__PURE__ */ a.jsxs("div", { className: "content-wrapper", children: [
|
|
1860
1862
|
f.map((l) => {
|
|
1861
|
-
if (
|
|
1862
|
-
const { text: m, element: p = "" } =
|
|
1863
|
+
if (d[l] && typeof d[l] == "object") {
|
|
1864
|
+
const { text: m, element: p = "" } = d[l];
|
|
1863
1865
|
return l === "text" ? /* @__PURE__ */ a.jsx(Lt, { overrideType: "text-only", className: "text", children: m }, l) : K.createElement(p, { key: l, className: l }, m);
|
|
1864
1866
|
}
|
|
1865
1867
|
return null;
|
|
@@ -2041,8 +2043,8 @@ const tt = ({
|
|
|
2041
2043
|
const {
|
|
2042
2044
|
breakpoints: c,
|
|
2043
2045
|
text: f = "",
|
|
2044
|
-
component:
|
|
2045
|
-
...
|
|
2046
|
+
component: u,
|
|
2047
|
+
...d
|
|
2046
2048
|
} = n;
|
|
2047
2049
|
return /* @__PURE__ */ a.jsx(
|
|
2048
2050
|
Ae,
|
|
@@ -2051,10 +2053,10 @@ const tt = ({
|
|
|
2051
2053
|
className: C("empty-state-box", t, r),
|
|
2052
2054
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2053
2055
|
e && typeof e == "string" ? /* @__PURE__ */ a.jsx(Xe, { options: { forceBlock: !0 }, children: e }) : e,
|
|
2054
|
-
i && typeof n == "object" && (
|
|
2056
|
+
i && typeof n == "object" && (u || /* @__PURE__ */ a.jsx(
|
|
2055
2057
|
ie,
|
|
2056
2058
|
{
|
|
2057
|
-
...
|
|
2059
|
+
...d,
|
|
2058
2060
|
variant: n.variant ? n.variant : "secondary",
|
|
2059
2061
|
children: f
|
|
2060
2062
|
}
|
|
@@ -2063,9 +2065,9 @@ const tt = ({
|
|
|
2063
2065
|
}
|
|
2064
2066
|
);
|
|
2065
2067
|
};
|
|
2066
|
-
const An = ({ children: t, ...e }) => /* @__PURE__ */ a.jsx("p", { ...e, children: t }),
|
|
2068
|
+
const An = ({ children: t, ...e }) => /* @__PURE__ */ a.jsx("p", { ...e, children: t }), ua = { q: An, blockquote: An };
|
|
2067
2069
|
for (let t = 1; t <= 6; t++)
|
|
2068
|
-
|
|
2070
|
+
ua[`h${t}`] = { component: An, props: { className: "title" } };
|
|
2069
2071
|
const as = ({
|
|
2070
2072
|
type: t = "default",
|
|
2071
2073
|
className: e = "",
|
|
@@ -2079,7 +2081,7 @@ const as = ({
|
|
|
2079
2081
|
options: {
|
|
2080
2082
|
wrapper: K.Fragment,
|
|
2081
2083
|
forceBlock: !0,
|
|
2082
|
-
overrides:
|
|
2084
|
+
overrides: ua
|
|
2083
2085
|
},
|
|
2084
2086
|
children: r
|
|
2085
2087
|
}
|
|
@@ -2092,7 +2094,7 @@ const jl = ({
|
|
|
2092
2094
|
text: r,
|
|
2093
2095
|
children: i
|
|
2094
2096
|
}) => {
|
|
2095
|
-
const s = G(), o = pe(null), [c, f] = te(""), [
|
|
2097
|
+
const s = G(), o = pe(null), [c, f] = te(""), [u, d] = te("closed");
|
|
2096
2098
|
ae(() => {
|
|
2097
2099
|
const p = o.current;
|
|
2098
2100
|
if (p)
|
|
@@ -2109,23 +2111,23 @@ const jl = ({
|
|
|
2109
2111
|
`)
|
|
2110
2112
|
);
|
|
2111
2113
|
}, [r]), ae(() => {
|
|
2112
|
-
|
|
2113
|
-
}, [
|
|
2114
|
+
u === "ready-to-close" && d("closing");
|
|
2115
|
+
}, [u]);
|
|
2114
2116
|
const l = ({ propertyName: p }) => {
|
|
2115
|
-
p === "max-height" &&
|
|
2117
|
+
p === "max-height" && d((v) => v === "opening" ? "open" : v === "closing" ? "closed" : v);
|
|
2116
2118
|
};
|
|
2117
2119
|
if (!r)
|
|
2118
2120
|
return null;
|
|
2119
|
-
const m = ["opening", "open"].includes(
|
|
2121
|
+
const m = ["opening", "open"].includes(u);
|
|
2120
2122
|
return /* @__PURE__ */ a.jsxs(
|
|
2121
2123
|
Ae,
|
|
2122
2124
|
{
|
|
2123
2125
|
variant: "subtle",
|
|
2124
2126
|
className: C("hide-show-text-box", t),
|
|
2125
2127
|
children: [
|
|
2126
|
-
/* @__PURE__ */ a.jsxs("div", { ref: o, className: C("content",
|
|
2127
|
-
/* @__PURE__ */ a.jsx(Xe, { options: { forceBlock: !0 }, children:
|
|
2128
|
-
|
|
2128
|
+
/* @__PURE__ */ a.jsxs("div", { ref: o, className: C("content", u), children: [
|
|
2129
|
+
/* @__PURE__ */ a.jsx(Xe, { options: { forceBlock: !0 }, children: u === "closed" ? c : r }),
|
|
2130
|
+
u !== "closed" && i
|
|
2129
2131
|
] }),
|
|
2130
2132
|
/* @__PURE__ */ a.jsx("p", { className: "cta", children: /* @__PURE__ */ a.jsx(
|
|
2131
2133
|
ie,
|
|
@@ -2135,7 +2137,7 @@ const jl = ({
|
|
|
2135
2137
|
styling: { muted: !0 },
|
|
2136
2138
|
className: C({ "rotate-180": m }),
|
|
2137
2139
|
onClick: () => {
|
|
2138
|
-
|
|
2140
|
+
d(m ? "ready-to-close" : "opening");
|
|
2139
2141
|
},
|
|
2140
2142
|
children: m ? n || s.formatMessage({ id: "hideShowTextBox_hide" }) : e || s.formatMessage({ id: "hideShowTextBox_show" })
|
|
2141
2143
|
}
|
|
@@ -2215,7 +2217,7 @@ const jl = ({
|
|
|
2215
2217
|
}, br = (t) => {
|
|
2216
2218
|
let e = "";
|
|
2217
2219
|
return t && typeof t != "string" && typeof t != "number" && typeof t != "boolean" && "type" in t && (e = t.type), e;
|
|
2218
|
-
},
|
|
2220
|
+
}, us = ({
|
|
2219
2221
|
children: t,
|
|
2220
2222
|
...e
|
|
2221
2223
|
}) => {
|
|
@@ -2233,10 +2235,10 @@ const jl = ({
|
|
|
2233
2235
|
break;
|
|
2234
2236
|
}
|
|
2235
2237
|
return i ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ a.jsx("p", { className: "center", children: /* @__PURE__ */ a.jsx(ie, { variant: "primary", size: "medium", ...n, children: r }) })) : /* @__PURE__ */ a.jsx("a", { ...n, children: r });
|
|
2236
|
-
},
|
|
2238
|
+
}, ds = ({ children: t }) => /* @__PURE__ */ a.jsx("span", { children: t });
|
|
2237
2239
|
const fs = {
|
|
2238
2240
|
default: {
|
|
2239
|
-
a:
|
|
2241
|
+
a: us,
|
|
2240
2242
|
// Override psuedo-code
|
|
2241
2243
|
// We give the content team psuedo-code short cuts to use in Contentful
|
|
2242
2244
|
CollapsibleSection: la,
|
|
@@ -2337,12 +2339,12 @@ const hs = ({ progress: t = 0, text: e = !1, className: n = "" }) => {
|
|
|
2337
2339
|
}
|
|
2338
2340
|
);
|
|
2339
2341
|
}, gs = Fe(hs);
|
|
2340
|
-
const
|
|
2342
|
+
const dn = "loadingBlock_", vs = ({ progress: t = 0, steps: e = !1, className: n = "" }) => {
|
|
2341
2343
|
const r = G();
|
|
2342
2344
|
e || (e = {
|
|
2343
|
-
0: { text: r.formatMessage({ id: `${
|
|
2344
|
-
75: { text: r.formatMessage({ id: `${
|
|
2345
|
-
100: { text: r.formatMessage({ id: `${
|
|
2345
|
+
0: { text: r.formatMessage({ id: `${dn}loading` }) },
|
|
2346
|
+
75: { text: r.formatMessage({ id: `${dn}almostDone` }) },
|
|
2347
|
+
100: { text: r.formatMessage({ id: `${dn}complete` }) }
|
|
2346
2348
|
});
|
|
2347
2349
|
let i = null;
|
|
2348
2350
|
const s = Object.keys(e);
|
|
@@ -2409,7 +2411,7 @@ const In = {
|
|
|
2409
2411
|
"cards-section",
|
|
2410
2412
|
"footer"
|
|
2411
2413
|
]
|
|
2412
|
-
},
|
|
2414
|
+
}, da = (t, e) => t in In ? /* @__PURE__ */ a.jsx("div", { className: t, children: In[t].map((n, r) => da(n, r)) }, e) : /* @__PURE__ */ a.jsx(Te, { className: t }, e), fa = ({ layout: t = "overview-page", ...e }) => /* @__PURE__ */ a.jsx("div", { className: C("loading-state", t), ...e, children: In[t].map((n, r) => da(n, r)) }), ma = (t) => {
|
|
2413
2415
|
const e = t && t.toUpperCase().split(" ");
|
|
2414
2416
|
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) : "";
|
|
2415
2417
|
}, jt = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], bs = (t) => {
|
|
@@ -2430,9 +2432,9 @@ const yr = 256, ze = ({
|
|
|
2430
2432
|
height: s = yr,
|
|
2431
2433
|
...o
|
|
2432
2434
|
}) => {
|
|
2433
|
-
const [c, f] = te(!1),
|
|
2435
|
+
const [c, f] = te(!1), u = pe(null);
|
|
2434
2436
|
ae(() => {
|
|
2435
|
-
const l =
|
|
2437
|
+
const l = u.current;
|
|
2436
2438
|
if (!l)
|
|
2437
2439
|
return;
|
|
2438
2440
|
const m = l.getContext("2d");
|
|
@@ -2441,13 +2443,13 @@ const yr = 256, ze = ({
|
|
|
2441
2443
|
const p = i, v = s;
|
|
2442
2444
|
typeof window < "u" && window.devicePixelRatio && (l.width = p * window.devicePixelRatio, l.height = v * window.devicePixelRatio, m.scale(window.devicePixelRatio, window.devicePixelRatio)), m.fillStyle = bs(n), m.fillRect(0, 0, p, v), m.font = `${p / 3}px Arial`, m.textAlign = "center", m.fillStyle = "white", m.fillText(ma(n), p / 2, v / 1.6);
|
|
2443
2445
|
}, [n]);
|
|
2444
|
-
let
|
|
2445
|
-
return e && e !== "" && !c && (e.includes("http") || e.includes("//")) && (
|
|
2446
|
+
let d = !1;
|
|
2447
|
+
return e && e !== "" && !c && (e.includes("http") || e.includes("//")) && (d = !0), /* @__PURE__ */ a.jsx(
|
|
2446
2448
|
"figure",
|
|
2447
2449
|
{
|
|
2448
2450
|
className: C("profile-picture", t, { error: c }),
|
|
2449
2451
|
...o,
|
|
2450
|
-
children:
|
|
2452
|
+
children: d ? /* @__PURE__ */ a.jsx(
|
|
2451
2453
|
"img",
|
|
2452
2454
|
{
|
|
2453
2455
|
src: e,
|
|
@@ -2458,7 +2460,7 @@ const yr = 256, ze = ({
|
|
|
2458
2460
|
width: i,
|
|
2459
2461
|
height: s
|
|
2460
2462
|
}
|
|
2461
|
-
) : /* @__PURE__ */ a.jsx("canvas", { ref:
|
|
2463
|
+
) : /* @__PURE__ */ a.jsx("canvas", { ref: u })
|
|
2462
2464
|
}
|
|
2463
2465
|
);
|
|
2464
2466
|
}, pa = (t) => t === "apolitical" ? {
|
|
@@ -2497,20 +2499,20 @@ const Yn = ({
|
|
|
2497
2499
|
c.name || (c.name = o.formatMessage({
|
|
2498
2500
|
id: `member_${typeof e == "string" ? e : "community"}`
|
|
2499
2501
|
}));
|
|
2500
|
-
const { name: f, url:
|
|
2502
|
+
const { name: f, url: u, image: d } = c, l = ys(c), m = n && n.createdAt ? Dn(n.createdAt) : !1, p = n && n.createdAt ? sa(n.createdAt) : "";
|
|
2501
2503
|
return K.createElement(t, {
|
|
2502
2504
|
className: C("member text-medium", s),
|
|
2503
2505
|
children: /* @__PURE__ */ a.jsxs(
|
|
2504
2506
|
wt,
|
|
2505
2507
|
{
|
|
2506
|
-
href:
|
|
2508
|
+
href: u,
|
|
2507
2509
|
gtmType: i,
|
|
2508
2510
|
gtmContext: r,
|
|
2509
2511
|
onClick: (v) => {
|
|
2510
2512
|
v == null || v.stopPropagation();
|
|
2511
2513
|
},
|
|
2512
2514
|
children: [
|
|
2513
|
-
/* @__PURE__ */ a.jsx(ze, { name: f, src:
|
|
2515
|
+
/* @__PURE__ */ a.jsx(ze, { name: f, src: d }),
|
|
2514
2516
|
/* @__PURE__ */ a.jsxs("p", { className: "details", children: [
|
|
2515
2517
|
/* @__PURE__ */ a.jsx("strong", { children: f }),
|
|
2516
2518
|
n && /* @__PURE__ */ a.jsxs("span", { className: "additional-content", children: [
|
|
@@ -2541,11 +2543,11 @@ const _r = {
|
|
|
2541
2543
|
},
|
|
2542
2544
|
cutoff: c = 2,
|
|
2543
2545
|
className: f = "",
|
|
2544
|
-
...
|
|
2546
|
+
...u
|
|
2545
2547
|
}) => {
|
|
2546
|
-
const
|
|
2548
|
+
const d = G();
|
|
2547
2549
|
return !n || n.length === 0 ? null : K.createElement(t, {
|
|
2548
|
-
...
|
|
2550
|
+
...u,
|
|
2549
2551
|
className: C("contributors", f, i, { "has-gap": s }),
|
|
2550
2552
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2551
2553
|
/* @__PURE__ */ a.jsx("ul", { children: n.map((l, m) => {
|
|
@@ -2578,11 +2580,11 @@ const _r = {
|
|
|
2578
2580
|
}
|
|
2579
2581
|
return p ? /* @__PURE__ */ a.jsx("li", { className: C("contributor", v), children: p }, m) : null;
|
|
2580
2582
|
}) }),
|
|
2581
|
-
r && /* @__PURE__ */ a.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ?
|
|
2583
|
+
r && /* @__PURE__ */ a.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? d.formatMessage({ id: `member_${n[0]}` }) : Ke(n[0].name || "", 20) : null })
|
|
2582
2584
|
] })
|
|
2583
2585
|
});
|
|
2584
2586
|
};
|
|
2585
|
-
var Ln = { exports: {} }, Tt = { exports: {} },
|
|
2587
|
+
var Ln = { exports: {} }, Tt = { exports: {} }, ue = {};
|
|
2586
2588
|
/** @license React v16.13.1
|
|
2587
2589
|
* react-is.production.min.js
|
|
2588
2590
|
*
|
|
@@ -2594,9 +2596,9 @@ var Ln = { exports: {} }, Tt = { exports: {} }, de = {};
|
|
|
2594
2596
|
var xr;
|
|
2595
2597
|
function _s() {
|
|
2596
2598
|
if (xr)
|
|
2597
|
-
return
|
|
2599
|
+
return ue;
|
|
2598
2600
|
xr = 1;
|
|
2599
|
-
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, i = 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, f = t ? Symbol.for("react.async_mode") : 60111,
|
|
2601
|
+
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, i = 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, f = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, l = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, v = t ? Symbol.for("react.lazy") : 60116, y = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, g = t ? Symbol.for("react.responder") : 60118, b = t ? Symbol.for("react.scope") : 60119;
|
|
2600
2602
|
function E(w) {
|
|
2601
2603
|
if (typeof w == "object" && w !== null) {
|
|
2602
2604
|
var U = w.$$typeof;
|
|
@@ -2604,7 +2606,7 @@ function _s() {
|
|
|
2604
2606
|
case e:
|
|
2605
2607
|
switch (w = w.type, w) {
|
|
2606
2608
|
case f:
|
|
2607
|
-
case
|
|
2609
|
+
case u:
|
|
2608
2610
|
case r:
|
|
2609
2611
|
case s:
|
|
2610
2612
|
case i:
|
|
@@ -2613,7 +2615,7 @@ function _s() {
|
|
|
2613
2615
|
default:
|
|
2614
2616
|
switch (w = w && w.$$typeof, w) {
|
|
2615
2617
|
case c:
|
|
2616
|
-
case
|
|
2618
|
+
case d:
|
|
2617
2619
|
case v:
|
|
2618
2620
|
case p:
|
|
2619
2621
|
case o:
|
|
@@ -2628,37 +2630,37 @@ function _s() {
|
|
|
2628
2630
|
}
|
|
2629
2631
|
}
|
|
2630
2632
|
function j(w) {
|
|
2631
|
-
return E(w) ===
|
|
2633
|
+
return E(w) === u;
|
|
2632
2634
|
}
|
|
2633
|
-
return
|
|
2635
|
+
return ue.AsyncMode = f, ue.ConcurrentMode = u, ue.ContextConsumer = c, ue.ContextProvider = o, ue.Element = e, ue.ForwardRef = d, ue.Fragment = r, ue.Lazy = v, ue.Memo = p, ue.Portal = n, ue.Profiler = s, ue.StrictMode = i, ue.Suspense = l, ue.isAsyncMode = function(w) {
|
|
2634
2636
|
return j(w) || E(w) === f;
|
|
2635
|
-
},
|
|
2637
|
+
}, ue.isConcurrentMode = j, ue.isContextConsumer = function(w) {
|
|
2636
2638
|
return E(w) === c;
|
|
2637
|
-
},
|
|
2639
|
+
}, ue.isContextProvider = function(w) {
|
|
2638
2640
|
return E(w) === o;
|
|
2639
|
-
},
|
|
2641
|
+
}, ue.isElement = function(w) {
|
|
2640
2642
|
return typeof w == "object" && w !== null && w.$$typeof === e;
|
|
2641
|
-
},
|
|
2642
|
-
return E(w) ===
|
|
2643
|
-
},
|
|
2643
|
+
}, ue.isForwardRef = function(w) {
|
|
2644
|
+
return E(w) === d;
|
|
2645
|
+
}, ue.isFragment = function(w) {
|
|
2644
2646
|
return E(w) === r;
|
|
2645
|
-
},
|
|
2647
|
+
}, ue.isLazy = function(w) {
|
|
2646
2648
|
return E(w) === v;
|
|
2647
|
-
},
|
|
2649
|
+
}, ue.isMemo = function(w) {
|
|
2648
2650
|
return E(w) === p;
|
|
2649
|
-
},
|
|
2651
|
+
}, ue.isPortal = function(w) {
|
|
2650
2652
|
return E(w) === n;
|
|
2651
|
-
},
|
|
2653
|
+
}, ue.isProfiler = function(w) {
|
|
2652
2654
|
return E(w) === s;
|
|
2653
|
-
},
|
|
2655
|
+
}, ue.isStrictMode = function(w) {
|
|
2654
2656
|
return E(w) === i;
|
|
2655
|
-
},
|
|
2657
|
+
}, ue.isSuspense = function(w) {
|
|
2656
2658
|
return E(w) === l;
|
|
2657
|
-
},
|
|
2658
|
-
return typeof w == "string" || typeof w == "function" || w === r || w ===
|
|
2659
|
-
},
|
|
2659
|
+
}, ue.isValidElementType = function(w) {
|
|
2660
|
+
return typeof w == "string" || typeof w == "function" || w === r || w === u || w === s || w === i || w === l || w === m || typeof w == "object" && w !== null && (w.$$typeof === v || w.$$typeof === p || w.$$typeof === o || w.$$typeof === c || w.$$typeof === d || w.$$typeof === _ || w.$$typeof === g || w.$$typeof === b || w.$$typeof === y);
|
|
2661
|
+
}, ue.typeOf = E, ue;
|
|
2660
2662
|
}
|
|
2661
|
-
var
|
|
2663
|
+
var de = {};
|
|
2662
2664
|
/** @license React v16.13.1
|
|
2663
2665
|
* react-is.development.js
|
|
2664
2666
|
*
|
|
@@ -2670,10 +2672,10 @@ var ue = {};
|
|
|
2670
2672
|
var wr;
|
|
2671
2673
|
function xs() {
|
|
2672
2674
|
return wr || (wr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
2673
|
-
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, i = 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, f = t ? Symbol.for("react.async_mode") : 60111,
|
|
2675
|
+
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, i = 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, f = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, l = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, v = t ? Symbol.for("react.lazy") : 60116, y = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, g = t ? Symbol.for("react.responder") : 60118, b = t ? Symbol.for("react.scope") : 60119;
|
|
2674
2676
|
function E(D) {
|
|
2675
2677
|
return typeof D == "string" || typeof D == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
2676
|
-
D === r || D ===
|
|
2678
|
+
D === r || D === u || D === s || D === i || D === l || D === m || typeof D == "object" && D !== null && (D.$$typeof === v || D.$$typeof === p || D.$$typeof === o || D.$$typeof === c || D.$$typeof === d || D.$$typeof === _ || D.$$typeof === g || D.$$typeof === b || D.$$typeof === y);
|
|
2677
2679
|
}
|
|
2678
2680
|
function j(D) {
|
|
2679
2681
|
if (typeof D == "object" && D !== null) {
|
|
@@ -2683,7 +2685,7 @@ function xs() {
|
|
|
2683
2685
|
var $e = D.type;
|
|
2684
2686
|
switch ($e) {
|
|
2685
2687
|
case f:
|
|
2686
|
-
case
|
|
2688
|
+
case u:
|
|
2687
2689
|
case r:
|
|
2688
2690
|
case s:
|
|
2689
2691
|
case i:
|
|
@@ -2693,7 +2695,7 @@ function xs() {
|
|
|
2693
2695
|
var Ee = $e && $e.$$typeof;
|
|
2694
2696
|
switch (Ee) {
|
|
2695
2697
|
case c:
|
|
2696
|
-
case
|
|
2698
|
+
case d:
|
|
2697
2699
|
case v:
|
|
2698
2700
|
case p:
|
|
2699
2701
|
case o:
|
|
@@ -2707,12 +2709,12 @@ function xs() {
|
|
|
2707
2709
|
}
|
|
2708
2710
|
}
|
|
2709
2711
|
}
|
|
2710
|
-
var w = f, U =
|
|
2712
|
+
var w = f, U = u, F = c, H = o, M = e, O = d, S = r, T = v, x = p, $ = n, I = s, q = i, A = l, Z = !1;
|
|
2711
2713
|
function J(D) {
|
|
2712
2714
|
return Z || (Z = !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.")), k(D) || j(D) === f;
|
|
2713
2715
|
}
|
|
2714
2716
|
function k(D) {
|
|
2715
|
-
return j(D) ===
|
|
2717
|
+
return j(D) === u;
|
|
2716
2718
|
}
|
|
2717
2719
|
function N(D) {
|
|
2718
2720
|
return j(D) === c;
|
|
@@ -2724,7 +2726,7 @@ function xs() {
|
|
|
2724
2726
|
return typeof D == "object" && D !== null && D.$$typeof === e;
|
|
2725
2727
|
}
|
|
2726
2728
|
function W(D) {
|
|
2727
|
-
return j(D) ===
|
|
2729
|
+
return j(D) === d;
|
|
2728
2730
|
}
|
|
2729
2731
|
function ee(D) {
|
|
2730
2732
|
return j(D) === r;
|
|
@@ -2747,8 +2749,8 @@ function xs() {
|
|
|
2747
2749
|
function oe(D) {
|
|
2748
2750
|
return j(D) === l;
|
|
2749
2751
|
}
|
|
2750
|
-
|
|
2751
|
-
}()),
|
|
2752
|
+
de.AsyncMode = w, de.ConcurrentMode = U, de.ContextConsumer = F, de.ContextProvider = H, de.Element = M, de.ForwardRef = O, de.Fragment = S, de.Lazy = T, de.Memo = x, de.Portal = $, de.Profiler = I, de.StrictMode = q, de.Suspense = A, de.isAsyncMode = J, de.isConcurrentMode = k, de.isContextConsumer = N, de.isContextProvider = z, de.isElement = B, de.isForwardRef = W, de.isFragment = ee, de.isLazy = Y, de.isMemo = V, de.isPortal = X, de.isProfiler = re, de.isStrictMode = R, de.isSuspense = oe, de.isValidElementType = E, de.typeOf = j;
|
|
2753
|
+
}()), de;
|
|
2752
2754
|
}
|
|
2753
2755
|
var kr;
|
|
2754
2756
|
function ga() {
|
|
@@ -2779,28 +2781,28 @@ function ws() {
|
|
|
2779
2781
|
return !1;
|
|
2780
2782
|
for (var o = {}, c = 0; c < 10; c++)
|
|
2781
2783
|
o["_" + String.fromCharCode(c)] = c;
|
|
2782
|
-
var f = Object.getOwnPropertyNames(o).map(function(
|
|
2783
|
-
return o[
|
|
2784
|
+
var f = Object.getOwnPropertyNames(o).map(function(d) {
|
|
2785
|
+
return o[d];
|
|
2784
2786
|
});
|
|
2785
2787
|
if (f.join("") !== "0123456789")
|
|
2786
2788
|
return !1;
|
|
2787
|
-
var
|
|
2788
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
2789
|
-
d
|
|
2790
|
-
}), Object.keys(Object.assign({},
|
|
2789
|
+
var u = {};
|
|
2790
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(d) {
|
|
2791
|
+
u[d] = d;
|
|
2792
|
+
}), Object.keys(Object.assign({}, u)).join("") === "abcdefghijklmnopqrst";
|
|
2791
2793
|
} catch {
|
|
2792
2794
|
return !1;
|
|
2793
2795
|
}
|
|
2794
2796
|
}
|
|
2795
2797
|
return fn = i() ? Object.assign : function(s, o) {
|
|
2796
|
-
for (var c, f = r(s),
|
|
2797
|
-
c = Object(arguments[
|
|
2798
|
+
for (var c, f = r(s), u, d = 1; d < arguments.length; d++) {
|
|
2799
|
+
c = Object(arguments[d]);
|
|
2798
2800
|
for (var l in c)
|
|
2799
2801
|
e.call(c, l) && (f[l] = c[l]);
|
|
2800
2802
|
if (t) {
|
|
2801
|
-
|
|
2802
|
-
for (var m = 0; m <
|
|
2803
|
-
n.call(c,
|
|
2803
|
+
u = t(c);
|
|
2804
|
+
for (var m = 0; m < u.length; m++)
|
|
2805
|
+
n.call(c, u[m]) && (f[u[m]] = c[u[m]]);
|
|
2804
2806
|
}
|
|
2805
2807
|
}
|
|
2806
2808
|
return f;
|
|
@@ -2836,27 +2838,27 @@ function ks() {
|
|
|
2836
2838
|
}
|
|
2837
2839
|
};
|
|
2838
2840
|
}
|
|
2839
|
-
function i(s, o, c, f,
|
|
2841
|
+
function i(s, o, c, f, u) {
|
|
2840
2842
|
if (process.env.NODE_ENV !== "production") {
|
|
2841
|
-
for (var
|
|
2842
|
-
if (r(s,
|
|
2843
|
+
for (var d in s)
|
|
2844
|
+
if (r(s, d)) {
|
|
2843
2845
|
var l;
|
|
2844
2846
|
try {
|
|
2845
|
-
if (typeof s[
|
|
2847
|
+
if (typeof s[d] != "function") {
|
|
2846
2848
|
var m = Error(
|
|
2847
|
-
(f || "React class") + ": " + c + " type `" +
|
|
2849
|
+
(f || "React class") + ": " + c + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
2848
2850
|
);
|
|
2849
2851
|
throw m.name = "Invariant Violation", m;
|
|
2850
2852
|
}
|
|
2851
|
-
l = s[
|
|
2853
|
+
l = s[d](o, d, f, c, null, e);
|
|
2852
2854
|
} catch (v) {
|
|
2853
2855
|
l = v;
|
|
2854
2856
|
}
|
|
2855
2857
|
if (l && !(l instanceof Error) && t(
|
|
2856
|
-
(f || "React class") + ": type specification of " + c + " `" +
|
|
2858
|
+
(f || "React class") + ": type specification of " + c + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof l + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
2857
2859
|
), l instanceof Error && !(l.message in n)) {
|
|
2858
2860
|
n[l.message] = !0;
|
|
2859
|
-
var p =
|
|
2861
|
+
var p = u ? u() : "";
|
|
2860
2862
|
t(
|
|
2861
2863
|
"Failed " + c + " type: " + l.message + (p ?? "")
|
|
2862
2864
|
);
|
|
@@ -2887,9 +2889,9 @@ function js() {
|
|
|
2887
2889
|
return null;
|
|
2888
2890
|
}
|
|
2889
2891
|
return gn = function(c, f) {
|
|
2890
|
-
var
|
|
2892
|
+
var u = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator";
|
|
2891
2893
|
function l(k) {
|
|
2892
|
-
var N = k && (
|
|
2894
|
+
var N = k && (u && k[u] || k[d]);
|
|
2893
2895
|
if (typeof N == "function")
|
|
2894
2896
|
return N;
|
|
2895
2897
|
}
|
|
@@ -3201,7 +3203,7 @@ function Ts() {
|
|
|
3201
3203
|
function n() {
|
|
3202
3204
|
}
|
|
3203
3205
|
return n.resetWarningCache = e, vn = function() {
|
|
3204
|
-
function r(o, c, f,
|
|
3206
|
+
function r(o, c, f, u, d, l) {
|
|
3205
3207
|
if (l !== t) {
|
|
3206
3208
|
var m = new Error(
|
|
3207
3209
|
"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"
|
|
@@ -3273,14 +3275,14 @@ var ba = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
3273
3275
|
var o = s.shift();
|
|
3274
3276
|
if (!zt(o, !1))
|
|
3275
3277
|
if (o.tagName === "SLOT") {
|
|
3276
|
-
var c = o.assignedElements(), f = c.length ? c : o.children,
|
|
3277
|
-
r.flatten ? i.push.apply(i,
|
|
3278
|
+
var c = o.assignedElements(), f = c.length ? c : o.children, u = t(f, !0, r);
|
|
3279
|
+
r.flatten ? i.push.apply(i, u) : i.push({
|
|
3278
3280
|
scopeParent: o,
|
|
3279
|
-
candidates:
|
|
3281
|
+
candidates: u
|
|
3280
3282
|
});
|
|
3281
3283
|
} else {
|
|
3282
|
-
var
|
|
3283
|
-
|
|
3284
|
+
var d = Ue.call(o, qt);
|
|
3285
|
+
d && r.filter(o) && (n || !e.includes(o)) && i.push(o);
|
|
3284
3286
|
var l = o.shadowRoot || // check for an undisclosed shadow
|
|
3285
3287
|
typeof r.getShadowRoot == "function" && r.getShadowRoot(o), m = !zt(l, !1) && (!r.shadowRootFilter || r.shadowRootFilter(o));
|
|
3286
3288
|
if (l && m) {
|
|
@@ -3343,8 +3345,8 @@ var ba = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
3343
3345
|
if (r && r !== e) {
|
|
3344
3346
|
var o, c, f;
|
|
3345
3347
|
for (s = !!((o = i) !== null && o !== void 0 && (c = o.ownerDocument) !== null && c !== void 0 && c.contains(i) || e != null && (f = e.ownerDocument) !== null && f !== void 0 && f.contains(e)); !s && i; ) {
|
|
3346
|
-
var
|
|
3347
|
-
r = Ut(i), i = (
|
|
3348
|
+
var u, d, l;
|
|
3349
|
+
r = Ut(i), i = (u = r) === null || u === void 0 ? void 0 : u.host, s = !!((d = i) !== null && d !== void 0 && (l = d.ownerDocument) !== null && l !== void 0 && l.contains(i));
|
|
3348
3350
|
}
|
|
3349
3351
|
}
|
|
3350
3352
|
return s;
|
|
@@ -3361,10 +3363,10 @@ var ba = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
3361
3363
|
if (!r || r === "full" || r === "legacy-full") {
|
|
3362
3364
|
if (typeof i == "function") {
|
|
3363
3365
|
for (var c = e; e; ) {
|
|
3364
|
-
var f = e.parentElement,
|
|
3366
|
+
var f = e.parentElement, u = Ut(e);
|
|
3365
3367
|
if (f && !f.shadowRoot && i(f) === !0)
|
|
3366
3368
|
return Nr(e);
|
|
3367
|
-
e.assignedSlot ? e = e.assignedSlot : !f &&
|
|
3369
|
+
e.assignedSlot ? e = e.assignedSlot : !f && u !== e.ownerDocument ? e = u.host : e = f;
|
|
3368
3370
|
}
|
|
3369
3371
|
e = c;
|
|
3370
3372
|
}
|
|
@@ -3403,13 +3405,13 @@ var ba = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
3403
3405
|
}, Us = function t(e) {
|
|
3404
3406
|
var n = [], r = [];
|
|
3405
3407
|
return e.forEach(function(i, s) {
|
|
3406
|
-
var o = !!i.scopeParent, c = o ? i.scopeParent : i, f = Ns(c, o),
|
|
3407
|
-
f === 0 ? o ? n.push.apply(n,
|
|
3408
|
+
var o = !!i.scopeParent, c = o ? i.scopeParent : i, f = Ns(c, o), u = o ? t(i.candidates) : c;
|
|
3409
|
+
f === 0 ? o ? n.push.apply(n, u) : n.push(c) : r.push({
|
|
3408
3410
|
documentOrder: s,
|
|
3409
3411
|
tabIndex: f,
|
|
3410
3412
|
item: i,
|
|
3411
3413
|
isScope: o,
|
|
3412
|
-
content:
|
|
3414
|
+
content: u
|
|
3413
3415
|
});
|
|
3414
3416
|
}), r.sort(Ps).reduce(function(i, s) {
|
|
3415
3417
|
return s.isScope ? i.push.apply(i, s.content) : i.push(s.content), i;
|
|
@@ -3578,7 +3580,7 @@ var Rr = {
|
|
|
3578
3580
|
recentNavEvent: void 0
|
|
3579
3581
|
}, c, f = function(T, x, $) {
|
|
3580
3582
|
return T && T[x] !== void 0 ? T[x] : s[$ || x];
|
|
3581
|
-
},
|
|
3583
|
+
}, u = function(T, x) {
|
|
3582
3584
|
var $ = typeof (x == null ? void 0 : x.composedPath) == "function" ? x.composedPath() : void 0;
|
|
3583
3585
|
return o.containerGroups.findIndex(function(I) {
|
|
3584
3586
|
var q = I.container, A = I.tabbableNodes;
|
|
@@ -3590,7 +3592,7 @@ var Rr = {
|
|
|
3590
3592
|
return Z === T;
|
|
3591
3593
|
});
|
|
3592
3594
|
});
|
|
3593
|
-
},
|
|
3595
|
+
}, d = function(T) {
|
|
3594
3596
|
var x = s[T];
|
|
3595
3597
|
if (typeof x == "function") {
|
|
3596
3598
|
for (var $ = arguments.length, I = new Array($ > 1 ? $ - 1 : 0), q = 1; q < $; q++)
|
|
@@ -3607,15 +3609,15 @@ var Rr = {
|
|
|
3607
3609
|
throw new Error("`".concat(T, "` as selector refers to no known node"));
|
|
3608
3610
|
return A;
|
|
3609
3611
|
}, l = function() {
|
|
3610
|
-
var T =
|
|
3612
|
+
var T = d("initialFocus");
|
|
3611
3613
|
if (T === !1)
|
|
3612
3614
|
return !1;
|
|
3613
3615
|
if (T === void 0 || !At(T, s.tabbableOptions))
|
|
3614
|
-
if (
|
|
3616
|
+
if (u(r.activeElement) >= 0)
|
|
3615
3617
|
T = r.activeElement;
|
|
3616
3618
|
else {
|
|
3617
3619
|
var x = o.tabbableGroups[0], $ = x && x.firstTabbableNode;
|
|
3618
|
-
T = $ ||
|
|
3620
|
+
T = $ || d("fallbackFocus");
|
|
3619
3621
|
}
|
|
3620
3622
|
if (!T)
|
|
3621
3623
|
throw new Error("Your focus-trap needs to have at least one focusable element");
|
|
@@ -3669,7 +3671,7 @@ var Rr = {
|
|
|
3669
3671
|
};
|
|
3670
3672
|
}), o.tabbableGroups = o.containerGroups.filter(function(T) {
|
|
3671
3673
|
return T.tabbableNodes.length > 0;
|
|
3672
|
-
}), o.tabbableGroups.length <= 0 && !
|
|
3674
|
+
}), o.tabbableGroups.length <= 0 && !d("fallbackFocus"))
|
|
3673
3675
|
throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
|
|
3674
3676
|
if (o.containerGroups.find(function(T) {
|
|
3675
3677
|
return T.posTabIndexesFound;
|
|
@@ -3690,14 +3692,14 @@ var Rr = {
|
|
|
3690
3692
|
}), o.mostRecentlyFocusedNode = T, Ys(T) && T.select();
|
|
3691
3693
|
}
|
|
3692
3694
|
}, y = function(T) {
|
|
3693
|
-
var x =
|
|
3695
|
+
var x = d("setReturnFocus", T);
|
|
3694
3696
|
return x || (x === !1 ? !1 : T);
|
|
3695
3697
|
}, _ = function(T) {
|
|
3696
3698
|
var x = T.target, $ = T.event, I = T.isBackward, q = I === void 0 ? !1 : I;
|
|
3697
3699
|
x = x || Et($), m();
|
|
3698
3700
|
var A = null;
|
|
3699
3701
|
if (o.tabbableGroups.length > 0) {
|
|
3700
|
-
var Z =
|
|
3702
|
+
var Z = u(x, $), J = Z >= 0 ? o.containerGroups[Z] : void 0;
|
|
3701
3703
|
if (Z < 0)
|
|
3702
3704
|
q ? A = o.tabbableGroups[o.tabbableGroups.length - 1].lastTabbableNode : A = o.tabbableGroups[0].firstTabbableNode;
|
|
3703
3705
|
else if (q) {
|
|
@@ -3722,11 +3724,11 @@ var Rr = {
|
|
|
3722
3724
|
mt($) || (A = J.nextTabbableNode(x));
|
|
3723
3725
|
}
|
|
3724
3726
|
} else
|
|
3725
|
-
A =
|
|
3727
|
+
A = d("fallbackFocus");
|
|
3726
3728
|
return A;
|
|
3727
3729
|
}, g = function(T) {
|
|
3728
3730
|
var x = Et(T);
|
|
3729
|
-
if (!(
|
|
3731
|
+
if (!(u(x, T) >= 0)) {
|
|
3730
3732
|
if (st(s.clickOutsideDeactivates, T)) {
|
|
3731
3733
|
c.deactivate({
|
|
3732
3734
|
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
@@ -3742,7 +3744,7 @@ var Rr = {
|
|
|
3742
3744
|
st(s.allowOutsideClick, T) || T.preventDefault();
|
|
3743
3745
|
}
|
|
3744
3746
|
}, b = function(T) {
|
|
3745
|
-
var x = Et(T), $ =
|
|
3747
|
+
var x = Et(T), $ = u(x, T) >= 0;
|
|
3746
3748
|
if ($ || x instanceof Document)
|
|
3747
3749
|
$ && (o.mostRecentlyFocusedNode = x);
|
|
3748
3750
|
else {
|
|
@@ -3750,7 +3752,7 @@ var Rr = {
|
|
|
3750
3752
|
var I, q = !0;
|
|
3751
3753
|
if (o.mostRecentlyFocusedNode)
|
|
3752
3754
|
if (De(o.mostRecentlyFocusedNode) > 0) {
|
|
3753
|
-
var A =
|
|
3755
|
+
var A = u(o.mostRecentlyFocusedNode), Z = o.containerGroups[A].tabbableNodes;
|
|
3754
3756
|
if (Z.length > 0) {
|
|
3755
3757
|
var J = Z.findIndex(function(k) {
|
|
3756
3758
|
return k === o.mostRecentlyFocusedNode;
|
|
@@ -3789,7 +3791,7 @@ var Rr = {
|
|
|
3789
3791
|
(s.isKeyForward(T) || s.isKeyBackward(T)) && E(T, s.isKeyBackward(T));
|
|
3790
3792
|
}, w = function(T) {
|
|
3791
3793
|
var x = Et(T);
|
|
3792
|
-
|
|
3794
|
+
u(x, T) >= 0 || st(s.clickOutsideDeactivates, T) || st(s.allowOutsideClick, T) || (T.preventDefault(), T.stopImmediatePropagation());
|
|
3793
3795
|
}, U = function() {
|
|
3794
3796
|
if (o.active)
|
|
3795
3797
|
return Rr.activateTrap(i, c), o.delayInitialFocusTimer = s.delayInitialFocus ? Fr(function() {
|
|
@@ -3933,9 +3935,9 @@ function oo(t, e) {
|
|
|
3933
3935
|
return e;
|
|
3934
3936
|
if (e !== void 0)
|
|
3935
3937
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
3936
|
-
return
|
|
3938
|
+
return ut(t);
|
|
3937
3939
|
}
|
|
3938
|
-
function
|
|
3940
|
+
function ut(t) {
|
|
3939
3941
|
if (t === void 0)
|
|
3940
3942
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3941
3943
|
return t;
|
|
@@ -3981,26 +3983,26 @@ var St = K, Q = Cs, fo = to, mo = fo.createFocusTrap, po = no, ho = po.isFocusab
|
|
|
3981
3983
|
var e = so(n);
|
|
3982
3984
|
function n(r) {
|
|
3983
3985
|
var i;
|
|
3984
|
-
ro(this, n), i = e.call(this, r), lo(
|
|
3985
|
-
var f,
|
|
3986
|
-
if (typeof
|
|
3987
|
-
for (var
|
|
3986
|
+
ro(this, n), i = e.call(this, r), lo(ut(i), "getNodeForOption", function(c) {
|
|
3987
|
+
var f, u = (f = this.internalOptions[c]) !== null && f !== void 0 ? f : this.originalOptions[c];
|
|
3988
|
+
if (typeof u == "function") {
|
|
3989
|
+
for (var d = arguments.length, l = new Array(d > 1 ? d - 1 : 0), m = 1; m < d; m++)
|
|
3988
3990
|
l[m - 1] = arguments[m];
|
|
3989
|
-
|
|
3991
|
+
u = u.apply(void 0, l);
|
|
3990
3992
|
}
|
|
3991
|
-
if (
|
|
3992
|
-
if (
|
|
3993
|
-
return
|
|
3993
|
+
if (u === !0 && (u = void 0), !u) {
|
|
3994
|
+
if (u === void 0 || u === !1)
|
|
3995
|
+
return u;
|
|
3994
3996
|
throw new Error("`".concat(c, "` was specified but was not a node, or did not return a node"));
|
|
3995
3997
|
}
|
|
3996
|
-
var p =
|
|
3997
|
-
if (typeof
|
|
3998
|
+
var p = u;
|
|
3999
|
+
if (typeof u == "string") {
|
|
3998
4000
|
var v;
|
|
3999
|
-
if (p = (v = this.getDocument()) === null || v === void 0 ? void 0 : v.querySelector(
|
|
4001
|
+
if (p = (v = this.getDocument()) === null || v === void 0 ? void 0 : v.querySelector(u), !p)
|
|
4000
4002
|
throw new Error("`".concat(c, "` as selector refers to no known node"));
|
|
4001
4003
|
}
|
|
4002
4004
|
return p;
|
|
4003
|
-
}), i.handleDeactivate = i.handleDeactivate.bind(
|
|
4005
|
+
}), i.handleDeactivate = i.handleDeactivate.bind(ut(i)), i.handlePostDeactivate = i.handlePostDeactivate.bind(ut(i)), i.handleClickOutsideDeactivates = i.handleClickOutsideDeactivates.bind(ut(i)), i.internalOptions = {
|
|
4004
4006
|
// We need to hijack the returnFocusOnDeactivate option,
|
|
4005
4007
|
// because React can move focus into the element before we arrived at
|
|
4006
4008
|
// this lifecycle hook (e.g. with autoFocus inputs). So the component
|
|
@@ -4104,9 +4106,9 @@ var St = K, Q = Cs, fo = to, mo = fo.createFocusTrap, po = no, ho = po.isFocusab
|
|
|
4104
4106
|
i.outsideClick.allowDeactivation && // is the outside node NOT focusable (implying that it did NOT receive focus
|
|
4105
4107
|
// as a result of the click-through) -- in which case do NOT restore focus
|
|
4106
4108
|
// to `returnFocusNode` because focus should remain on the outside node
|
|
4107
|
-
!ho(i.outsideClick.target, i.internalOptions.tabbableOptions))),
|
|
4109
|
+
!ho(i.outsideClick.target, i.internalOptions.tabbableOptions))), u = i.internalOptions.preventScroll, d = u === void 0 ? !1 : u;
|
|
4108
4110
|
f && c.focus({
|
|
4109
|
-
preventScroll:
|
|
4111
|
+
preventScroll: d
|
|
4110
4112
|
}), i.originalOptions.onPostDeactivate && i.originalOptions.onPostDeactivate.call(null), i.outsideClick = null;
|
|
4111
4113
|
};
|
|
4112
4114
|
this.originalOptions.checkCanReturnFocus ? this.originalOptions.checkCanReturnFocus.call(null, this.getReturnFocusNode()).then(s, s) : s();
|
|
@@ -4152,9 +4154,9 @@ var St = K, Q = Cs, fo = to, mo = fo.createFocusTrap, po = no, ho = po.isFocusab
|
|
|
4152
4154
|
if (s) {
|
|
4153
4155
|
if (s.type && s.type === St.Fragment)
|
|
4154
4156
|
throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");
|
|
4155
|
-
var o = function(
|
|
4156
|
-
var
|
|
4157
|
-
s && (typeof s.ref == "function" ? s.ref(
|
|
4157
|
+
var o = function(u) {
|
|
4158
|
+
var d = i.props.containerElements;
|
|
4159
|
+
s && (typeof s.ref == "function" ? s.ref(u) : s.ref && (s.ref.current = u)), i.focusTrapElements = d || [u];
|
|
4158
4160
|
}, c = St.cloneElement(s, {
|
|
4159
4161
|
ref: o
|
|
4160
4162
|
});
|
|
@@ -4236,8 +4238,8 @@ const Xt = ({
|
|
|
4236
4238
|
forceShow: { error: o = !1 } = {},
|
|
4237
4239
|
title: c,
|
|
4238
4240
|
children: f,
|
|
4239
|
-
buttons:
|
|
4240
|
-
className:
|
|
4241
|
+
buttons: u,
|
|
4242
|
+
className: d = "",
|
|
4241
4243
|
gtmContext: l = "Modal"
|
|
4242
4244
|
}) => {
|
|
4243
4245
|
const m = G(), [p, v] = te(e), y = (b) => {
|
|
@@ -4257,7 +4259,7 @@ const Xt = ({
|
|
|
4257
4259
|
Sa,
|
|
4258
4260
|
{
|
|
4259
4261
|
id: t,
|
|
4260
|
-
className: C("overlay-modal",
|
|
4262
|
+
className: C("overlay-modal", d, {
|
|
4261
4263
|
"has-max-width": r
|
|
4262
4264
|
}),
|
|
4263
4265
|
hidden: !p,
|
|
@@ -4281,9 +4283,9 @@ const Xt = ({
|
|
|
4281
4283
|
] }),
|
|
4282
4284
|
n && /* @__PURE__ */ a.jsx(Re, {}),
|
|
4283
4285
|
f,
|
|
4284
|
-
|
|
4286
|
+
u && /* @__PURE__ */ a.jsxs("div", { className: "bottom", children: [
|
|
4285
4287
|
/* @__PURE__ */ a.jsx(Re, {}),
|
|
4286
|
-
/* @__PURE__ */ a.jsx(_t, { buttons:
|
|
4288
|
+
/* @__PURE__ */ a.jsx(_t, { buttons: u })
|
|
4287
4289
|
] }),
|
|
4288
4290
|
o && /* @__PURE__ */ a.jsx(Bt, { className: "error", children: o })
|
|
4289
4291
|
] }) })
|
|
@@ -4306,7 +4308,7 @@ const Ct = "emailHelperTextBox_", yo = ({
|
|
|
4306
4308
|
link: {},
|
|
4307
4309
|
mail: {},
|
|
4308
4310
|
error: ""
|
|
4309
|
-
}), [c, f] = te(!1),
|
|
4311
|
+
}), [c, f] = te(!1), u = Kr(
|
|
4310
4312
|
(p) => {
|
|
4311
4313
|
p.preventDefault(), p.stopPropagation();
|
|
4312
4314
|
const v = (y) => {
|
|
@@ -4317,7 +4319,7 @@ const Ct = "emailHelperTextBox_", yo = ({
|
|
|
4317
4319
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
4318
4320
|
"data-gtm-event-type": "SendEmailClick",
|
|
4319
4321
|
className: "gtm-trackable",
|
|
4320
|
-
onClick: (_) =>
|
|
4322
|
+
onClick: (_) => u(_),
|
|
4321
4323
|
href: "#",
|
|
4322
4324
|
"data-testid": "send-verify-email-click"
|
|
4323
4325
|
},
|
|
@@ -4373,7 +4375,7 @@ const Ct = "emailHelperTextBox_", yo = ({
|
|
|
4373
4375
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
4374
4376
|
"data-gtm-event-type": "SendEmailClick",
|
|
4375
4377
|
className: "gtm-trackable",
|
|
4376
|
-
onClick: (g) =>
|
|
4378
|
+
onClick: (g) => u(g),
|
|
4377
4379
|
"data-testid": "send-verify-email-click"
|
|
4378
4380
|
};
|
|
4379
4381
|
break;
|
|
@@ -4402,9 +4404,9 @@ const Ct = "emailHelperTextBox_", yo = ({
|
|
|
4402
4404
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
4403
4405
|
[t]
|
|
4404
4406
|
);
|
|
4405
|
-
const
|
|
4407
|
+
const d = {};
|
|
4406
4408
|
return ["link", "mail"].forEach((p) => {
|
|
4407
|
-
|
|
4409
|
+
d[p] = Object.keys(s[p]).length ? (v) => /* @__PURE__ */ a.jsx("a", { ...s[p], children: v }) : (v) => v;
|
|
4408
4410
|
}), /* @__PURE__ */ a.jsx(
|
|
4409
4411
|
as,
|
|
4410
4412
|
{
|
|
@@ -4420,7 +4422,7 @@ const Ct = "emailHelperTextBox_", yo = ({
|
|
|
4420
4422
|
i.formatMessage(
|
|
4421
4423
|
{ id: `${s.path}_text` },
|
|
4422
4424
|
{
|
|
4423
|
-
...
|
|
4425
|
+
...d,
|
|
4424
4426
|
strong: (p) => /* @__PURE__ */ a.jsx("strong", { children: p }),
|
|
4425
4427
|
em: (p) => /* @__PURE__ */ a.jsx("em", { children: p }),
|
|
4426
4428
|
br: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -4444,12 +4446,12 @@ const Ct = "emailHelperTextBox_", yo = ({
|
|
|
4444
4446
|
placeholder: o,
|
|
4445
4447
|
type: c = "text",
|
|
4446
4448
|
value: f,
|
|
4447
|
-
...
|
|
4449
|
+
...u
|
|
4448
4450
|
}) => {
|
|
4449
|
-
const
|
|
4451
|
+
const d = pe(), l = r || d;
|
|
4450
4452
|
return K.createElement(e, {
|
|
4451
4453
|
ref: l,
|
|
4452
|
-
...
|
|
4454
|
+
...u,
|
|
4453
4455
|
type: c,
|
|
4454
4456
|
id: n,
|
|
4455
4457
|
name: s,
|
|
@@ -4485,7 +4487,7 @@ const He = {
|
|
|
4485
4487
|
input: t,
|
|
4486
4488
|
displayInput: t,
|
|
4487
4489
|
debouncedInput: t
|
|
4488
|
-
}), [{ predictions:
|
|
4490
|
+
}), [{ predictions: u, activePredictionIndex: d, isPredictionSelected: l }, m] = te({
|
|
4489
4491
|
predictions: [],
|
|
4490
4492
|
activePredictionIndex: -1,
|
|
4491
4493
|
isPredictionSelected: !!t
|
|
@@ -4507,10 +4509,10 @@ const He = {
|
|
|
4507
4509
|
}
|
|
4508
4510
|
})() : m((g) => ({ ...g, predictions: [] }));
|
|
4509
4511
|
}, [c, l]), ae(() => {
|
|
4510
|
-
|
|
4511
|
-
}, [
|
|
4512
|
+
d >= 0 && u[d] && f((g) => ({ ...g, displayInput: u[d].description }));
|
|
4513
|
+
}, [d, u]);
|
|
4512
4514
|
const v = (g) => {
|
|
4513
|
-
[He.DOWN, He.UP, He.ENTER].includes(g.key) && (g.preventDefault(), g.key === He.DOWN &&
|
|
4515
|
+
[He.DOWN, He.UP, He.ENTER].includes(g.key) && (g.preventDefault(), g.key === He.DOWN && d < u.length - 1 ? m((b) => ({ ...b, activePredictionIndex: d + 1 })) : g.key === He.UP && d > 0 ? m((b) => ({ ...b, activePredictionIndex: d - 1 })) : g.key === He.ENTER && d > -1 && (r(u[d].description), f((b) => ({ ...b, input: u[d].description })), m((b) => ({ ...b, predictions: [], isPredictionSelected: !0 }))));
|
|
4514
4516
|
}, y = (g) => {
|
|
4515
4517
|
r(g.target.value), f((b) => ({ ...b, input: g.target.value, displayInput: g.target.value })), m((b) => ({ ...b, activePredictionIndex: -1, isPredictionSelected: !1 }));
|
|
4516
4518
|
}, _ = (g) => {
|
|
@@ -4527,12 +4529,12 @@ const He = {
|
|
|
4527
4529
|
placeholder: e
|
|
4528
4530
|
}
|
|
4529
4531
|
),
|
|
4530
|
-
/* @__PURE__ */ a.jsx("ul", { className: "predictions-list", children:
|
|
4532
|
+
/* @__PURE__ */ a.jsx("ul", { className: "predictions-list", children: u.map((g, b) => /* @__PURE__ */ a.jsx(
|
|
4531
4533
|
"li",
|
|
4532
4534
|
{
|
|
4533
4535
|
onClick: () => _(g),
|
|
4534
4536
|
onMouseEnter: () => m((E) => ({ ...E, activePredictionIndex: b })),
|
|
4535
|
-
className: C("predictions-list-item", { active: b ===
|
|
4537
|
+
className: C("predictions-list-item", { active: b === d }),
|
|
4536
4538
|
children: g.description
|
|
4537
4539
|
},
|
|
4538
4540
|
b
|
|
@@ -4550,12 +4552,12 @@ const Ca = ({
|
|
|
4550
4552
|
intlPath: o = !1,
|
|
4551
4553
|
label: c,
|
|
4552
4554
|
shownValue: f = !0,
|
|
4553
|
-
type:
|
|
4554
|
-
value:
|
|
4555
|
+
type: u = "checkbox",
|
|
4556
|
+
value: d,
|
|
4555
4557
|
...l
|
|
4556
4558
|
}) => {
|
|
4557
4559
|
const m = G(), { onChange: p, ...v } = r, y = () => {
|
|
4558
|
-
e || p(
|
|
4560
|
+
e || p(d ? null : f);
|
|
4559
4561
|
}, _ = /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4560
4562
|
/* @__PURE__ */ a.jsx(
|
|
4561
4563
|
"input",
|
|
@@ -4563,9 +4565,9 @@ const Ca = ({
|
|
|
4563
4565
|
ref: s,
|
|
4564
4566
|
id: i,
|
|
4565
4567
|
name: i,
|
|
4566
|
-
type:
|
|
4568
|
+
type: u,
|
|
4567
4569
|
value: f,
|
|
4568
|
-
checked:
|
|
4570
|
+
checked: d,
|
|
4569
4571
|
onKeyDown: (g) => {
|
|
4570
4572
|
(g.key === "Enter" || g.code === "Space") && (g.preventDefault(), g.stopPropagation(), y());
|
|
4571
4573
|
},
|
|
@@ -4614,9 +4616,9 @@ const ko = ({
|
|
|
4614
4616
|
placeholder: o,
|
|
4615
4617
|
multiSelect: c,
|
|
4616
4618
|
multiSelectOptions: f,
|
|
4617
|
-
id:
|
|
4619
|
+
id: u
|
|
4618
4620
|
}) => {
|
|
4619
|
-
const
|
|
4621
|
+
const d = G(), [l, m] = te(!1), p = r || n, v = Array.isArray(p) ? [...p] : p ? [p] : [], [y, _] = te(v);
|
|
4620
4622
|
let g;
|
|
4621
4623
|
Array.isArray(y) && y.length === 1 && typeof y[0] == "string" ? g = e && y ? e.find((F) => F.id === y[0]) : e ? e[0] : { id: "", label: "" } : Array.isArray(y) && y.length === 1 && typeof y[0] != "string" ? g = y[0] : g = { id: "", label: "" }, ae(() => {
|
|
4622
4624
|
_(v);
|
|
@@ -4685,7 +4687,7 @@ const ko = ({
|
|
|
4685
4687
|
size: "small",
|
|
4686
4688
|
onClick: () => U("all"),
|
|
4687
4689
|
className: "gtm-trackable",
|
|
4688
|
-
children:
|
|
4690
|
+
children: d.formatMessage({ id: "dropdown_menu_multiselect_all" })
|
|
4689
4691
|
}
|
|
4690
4692
|
) }),
|
|
4691
4693
|
/* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
@@ -4695,7 +4697,7 @@ const ko = ({
|
|
|
4695
4697
|
size: "small",
|
|
4696
4698
|
onClick: () => U("none"),
|
|
4697
4699
|
className: "gtm-trackable",
|
|
4698
|
-
children:
|
|
4700
|
+
children: d.formatMessage({ id: "dropdown_menu_multiselect_none" })
|
|
4699
4701
|
}
|
|
4700
4702
|
) })
|
|
4701
4703
|
] })
|
|
@@ -4733,13 +4735,13 @@ const ko = ({
|
|
|
4733
4735
|
E && E(y), document.dispatchEvent(
|
|
4734
4736
|
new CustomEvent("dropdownMultiSelectSubmit", {
|
|
4735
4737
|
detail: {
|
|
4736
|
-
id:
|
|
4738
|
+
id: u || "dropdown-multi-select",
|
|
4737
4739
|
value: y
|
|
4738
4740
|
}
|
|
4739
4741
|
})
|
|
4740
4742
|
), m(!1);
|
|
4741
4743
|
},
|
|
4742
|
-
children:
|
|
4744
|
+
children: d.formatMessage({ id: "form_submit" })
|
|
4743
4745
|
}
|
|
4744
4746
|
) })
|
|
4745
4747
|
]
|
|
@@ -4758,11 +4760,11 @@ const jo = ({
|
|
|
4758
4760
|
name: o,
|
|
4759
4761
|
options: c,
|
|
4760
4762
|
required: f,
|
|
4761
|
-
type:
|
|
4762
|
-
value:
|
|
4763
|
+
type: u = "checkboxes",
|
|
4764
|
+
value: d,
|
|
4763
4765
|
...l
|
|
4764
4766
|
}) => {
|
|
4765
|
-
const m = G(), p = s ?
|
|
4767
|
+
const m = G(), p = s ? d : [], v = d;
|
|
4766
4768
|
return /* @__PURE__ */ a.jsx(
|
|
4767
4769
|
"ul",
|
|
4768
4770
|
{
|
|
@@ -4792,7 +4794,7 @@ const jo = ({
|
|
|
4792
4794
|
{
|
|
4793
4795
|
element: "li",
|
|
4794
4796
|
id: E,
|
|
4795
|
-
type:
|
|
4797
|
+
type: u === "checkboxes" ? "checkbox" : "radio",
|
|
4796
4798
|
shownValue: g,
|
|
4797
4799
|
value: s ? p == null ? void 0 : p.includes(g) : v === g,
|
|
4798
4800
|
functions: {
|
|
@@ -4818,9 +4820,9 @@ const To = ({
|
|
|
4818
4820
|
gtm: { context: n } = { context: void 0 },
|
|
4819
4821
|
...r
|
|
4820
4822
|
}) => {
|
|
4821
|
-
const i = G(), s = pe(), o = t || s, [c, f] = te(!1), [
|
|
4823
|
+
const i = G(), s = pe(), o = t || s, [c, f] = te(!1), [u, d] = te(e), l = () => {
|
|
4822
4824
|
var m;
|
|
4823
|
-
f(!c),
|
|
4825
|
+
f(!c), d(c ? "password" : "text"), (m = o.current) == null || m.focus();
|
|
4824
4826
|
};
|
|
4825
4827
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4826
4828
|
/* @__PURE__ */ a.jsx(
|
|
@@ -4841,7 +4843,7 @@ const To = ({
|
|
|
4841
4843
|
})
|
|
4842
4844
|
}
|
|
4843
4845
|
),
|
|
4844
|
-
/* @__PURE__ */ a.jsx(pt, { inputRef: o, type:
|
|
4846
|
+
/* @__PURE__ */ a.jsx(pt, { inputRef: o, type: u, ...r })
|
|
4845
4847
|
] });
|
|
4846
4848
|
};
|
|
4847
4849
|
const Ve = {
|
|
@@ -4864,26 +4866,26 @@ const Ve = {
|
|
|
4864
4866
|
showRequiredLabels: o = !0,
|
|
4865
4867
|
type: c,
|
|
4866
4868
|
validation: f,
|
|
4867
|
-
value:
|
|
4868
|
-
...
|
|
4869
|
+
value: u,
|
|
4870
|
+
...d
|
|
4869
4871
|
}) => {
|
|
4870
|
-
const l = G(), m = f && f.some(({ condition: j }) => j === "required"), p = (
|
|
4872
|
+
const l = G(), m = f && f.some(({ condition: j }) => j === "required"), p = (u == null ? void 0 : u.toString().length) || 0, v = c && Ve[c] && Ve[c].component ? Ve[c].component : pt, y = {};
|
|
4871
4873
|
c && ["checkboxes"].includes(c) ? y.element = "span" : y.htmlFor = t;
|
|
4872
4874
|
let _ = {
|
|
4873
|
-
...
|
|
4875
|
+
...d,
|
|
4874
4876
|
id: t,
|
|
4875
4877
|
name: t,
|
|
4876
4878
|
className: r ? "error" : "",
|
|
4877
4879
|
type: c,
|
|
4878
4880
|
required: m,
|
|
4879
4881
|
"aria-required": m,
|
|
4880
|
-
functions:
|
|
4881
|
-
value:
|
|
4882
|
+
functions: dt(i),
|
|
4883
|
+
value: u
|
|
4882
4884
|
};
|
|
4883
4885
|
s > 0 && (_["data-character-limit"] = s, _.functions && (_.functions.onChange = (j) => {
|
|
4884
4886
|
((j == null ? void 0 : j.toString().length) || 0) > s && (j = j == null ? void 0 : j.toString().slice(0, s)), i.onChange(j);
|
|
4885
4887
|
})), c && Ve[c] && Ve[c].props && (_ = { ..._, ...Ve[c].props }), c && ["checkboxes"].includes(c) && (_.intlPath = `${e}_${t}`), r && (_["aria-invalid"] = !0, _["aria-describedby"] = `error-${t}`);
|
|
4886
|
-
const g =
|
|
4888
|
+
const g = d.label || l.formatMessage({ id: e ? `${e}_${t}` : t }), b = ({ ...j }) => r ? K.createElement(
|
|
4887
4889
|
j.as || "dd",
|
|
4888
4890
|
{
|
|
4889
4891
|
id: `error-${t}`,
|
|
@@ -4944,7 +4946,7 @@ const Ve = {
|
|
|
4944
4946
|
/* @__PURE__ */ a.jsx(b, {})
|
|
4945
4947
|
] });
|
|
4946
4948
|
}, So = (t, e) => {
|
|
4947
|
-
const { type: n, payload: r } = e, i = t.errors ?
|
|
4949
|
+
const { type: n, payload: r } = e, i = t.errors ? dt(t.errors) : {}, s = t.values ? dt(t.values) : {};
|
|
4948
4950
|
switch (n) {
|
|
4949
4951
|
case "toggleSubmitting":
|
|
4950
4952
|
return {
|
|
@@ -4977,10 +4979,10 @@ const Ve = {
|
|
|
4977
4979
|
},
|
|
4978
4980
|
onSuccess: f = () => {
|
|
4979
4981
|
},
|
|
4980
|
-
onFailure:
|
|
4982
|
+
onFailure: u = () => {
|
|
4981
4983
|
},
|
|
4982
|
-
intl:
|
|
4983
|
-
} = r, l =
|
|
4984
|
+
intl: d
|
|
4985
|
+
} = r, l = dt(Object.keys(i));
|
|
4984
4986
|
for (const m of o)
|
|
4985
4987
|
if (m.validation)
|
|
4986
4988
|
for (let p = 0; p < m.validation.length; p++) {
|
|
@@ -4993,18 +4995,18 @@ const Ve = {
|
|
|
4993
4995
|
const g = s[m.id];
|
|
4994
4996
|
switch (v) {
|
|
4995
4997
|
case "required":
|
|
4996
|
-
(!g || typeof g == "string" && g.trim().length === 0) && (_ = y || (
|
|
4998
|
+
(!g || typeof g == "string" && g.trim().length === 0) && (_ = y || (d == null ? void 0 : d.formatMessage({ id: "form_error_required" })));
|
|
4997
4999
|
break;
|
|
4998
5000
|
case "no-numbers": {
|
|
4999
|
-
g && !/^([^0-9]*)$/.test(g) && (_ = y || (
|
|
5001
|
+
g && !/^([^0-9]*)$/.test(g) && (_ = y || (d == null ? void 0 : d.formatMessage({ id: "form_error_numbers" })));
|
|
5000
5002
|
break;
|
|
5001
5003
|
}
|
|
5002
5004
|
case "valid-email": {
|
|
5003
|
-
g && !/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(g) && (_ = y || (
|
|
5005
|
+
g && !/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(g) && (_ = y || (d == null ? void 0 : d.formatMessage({ id: "form_error_email" })));
|
|
5004
5006
|
break;
|
|
5005
5007
|
}
|
|
5006
5008
|
case "valid-url": {
|
|
5007
|
-
g && !/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(g) && (_ = y || (
|
|
5009
|
+
g && !/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(g) && (_ = y || (d == null ? void 0 : d.formatMessage({ id: "form_error_url" })));
|
|
5008
5010
|
break;
|
|
5009
5011
|
}
|
|
5010
5012
|
default:
|
|
@@ -5019,7 +5021,7 @@ const Ve = {
|
|
|
5019
5021
|
break;
|
|
5020
5022
|
}
|
|
5021
5023
|
}
|
|
5022
|
-
return l.length === 0 ? f(s) :
|
|
5024
|
+
return l.length === 0 ? f(s) : u(s, l), {
|
|
5023
5025
|
...t,
|
|
5024
5026
|
isSubmitting: !1
|
|
5025
5027
|
};
|
|
@@ -5060,8 +5062,8 @@ const Qn = ({
|
|
|
5060
5062
|
meta: {
|
|
5061
5063
|
shouldShowCancelButton: c = !1,
|
|
5062
5064
|
shouldReset: f = !0,
|
|
5063
|
-
showRequiredLabels:
|
|
5064
|
-
showSuccessMessage:
|
|
5065
|
+
showRequiredLabels: u = !0,
|
|
5066
|
+
showSuccessMessage: d = !1
|
|
5065
5067
|
} = {
|
|
5066
5068
|
shouldShowCancelButton: !1,
|
|
5067
5069
|
shouldReset: !0,
|
|
@@ -5229,7 +5231,7 @@ const Qn = ({
|
|
|
5229
5231
|
{
|
|
5230
5232
|
intlPath: i,
|
|
5231
5233
|
...A,
|
|
5232
|
-
showRequiredLabels:
|
|
5234
|
+
showRequiredLabels: u,
|
|
5233
5235
|
value: z,
|
|
5234
5236
|
error: M == null ? void 0 : M[J],
|
|
5235
5237
|
functions: {
|
|
@@ -5255,7 +5257,7 @@ const Qn = ({
|
|
|
5255
5257
|
]
|
|
5256
5258
|
}
|
|
5257
5259
|
),
|
|
5258
|
-
|
|
5260
|
+
d && S && /* @__PURE__ */ a.jsx(Bt, { className: "success", children: typeof d == "string" ? d : w.formatMessage({ id: "form_success" }) })
|
|
5259
5261
|
] });
|
|
5260
5262
|
};
|
|
5261
5263
|
const $t = "passwordRules_", $a = "isMoreThanEightCharacters", Na = "includesNumberAndSymbol", Pa = "includesLowerAndUppercase", Co = {
|
|
@@ -5308,26 +5310,26 @@ const Cl = ({
|
|
|
5308
5310
|
className: s = "",
|
|
5309
5311
|
hasLoaded: o = !1
|
|
5310
5312
|
}) => {
|
|
5311
|
-
const c = G(), [f,
|
|
5313
|
+
const c = G(), [f, u] = te({
|
|
5312
5314
|
setUp: !1,
|
|
5313
5315
|
id: null,
|
|
5314
5316
|
rating: null,
|
|
5315
5317
|
disabled: !0
|
|
5316
|
-
}),
|
|
5318
|
+
}), d = async () => {
|
|
5317
5319
|
try {
|
|
5318
5320
|
const g = await n();
|
|
5319
|
-
|
|
5321
|
+
u((b) => ({
|
|
5320
5322
|
...b,
|
|
5321
5323
|
setUp: !0,
|
|
5322
5324
|
id: g && g.id,
|
|
5323
5325
|
disabled: !1
|
|
5324
5326
|
}));
|
|
5325
5327
|
} catch (g) {
|
|
5326
|
-
|
|
5328
|
+
u((b) => ({ ...b, setUp: !0, disabled: !0 })), i(g);
|
|
5327
5329
|
}
|
|
5328
5330
|
};
|
|
5329
5331
|
if (ae(() => {
|
|
5330
|
-
o && !f.setUp &&
|
|
5332
|
+
o && !f.setUp && d();
|
|
5331
5333
|
}, [o]), !o)
|
|
5332
5334
|
return /* @__PURE__ */ a.jsx(Te, { className: "rating-placeholder" });
|
|
5333
5335
|
const { id: l, rating: m, disabled: p } = f, v = "ratings_", y = {
|
|
@@ -5339,11 +5341,11 @@ const Cl = ({
|
|
|
5339
5341
|
}, _ = async (g) => {
|
|
5340
5342
|
if (!(!l || p))
|
|
5341
5343
|
try {
|
|
5342
|
-
|
|
5344
|
+
u((b) => ({ ...b, rating: g, disabled: !0 })), await r({ id: l, value: g });
|
|
5343
5345
|
} catch (b) {
|
|
5344
|
-
|
|
5346
|
+
u((E) => ({ ...E, rating: null })), i(b);
|
|
5345
5347
|
} finally {
|
|
5346
|
-
|
|
5348
|
+
u((b) => ({ ...b, disabled: !1 }));
|
|
5347
5349
|
}
|
|
5348
5350
|
};
|
|
5349
5351
|
return /* @__PURE__ */ a.jsxs("div", { className: C("rating", s), children: [
|
|
@@ -5396,15 +5398,15 @@ const $l = ({
|
|
|
5396
5398
|
ae(() => {
|
|
5397
5399
|
r && f(r);
|
|
5398
5400
|
}, [r]);
|
|
5399
|
-
const
|
|
5400
|
-
s || (f(
|
|
5401
|
+
const u = (d) => {
|
|
5402
|
+
s || (f(d), i(d));
|
|
5401
5403
|
};
|
|
5402
5404
|
return /* @__PURE__ */ a.jsxs(
|
|
5403
5405
|
"div",
|
|
5404
5406
|
{
|
|
5405
5407
|
className: C("toggle", o),
|
|
5406
|
-
onClick: (
|
|
5407
|
-
|
|
5408
|
+
onClick: (d) => {
|
|
5409
|
+
d.preventDefault(), d.stopPropagation(), u(c === n[0].value ? n[1].value : n[0].value);
|
|
5408
5410
|
},
|
|
5409
5411
|
children: [
|
|
5410
5412
|
/* @__PURE__ */ a.jsx("p", { children: e }),
|
|
@@ -5415,8 +5417,8 @@ const $l = ({
|
|
|
5415
5417
|
disabled: s,
|
|
5416
5418
|
on: c === n[1].value
|
|
5417
5419
|
}),
|
|
5418
|
-
children: n.map((
|
|
5419
|
-
const l = `${t}-${
|
|
5420
|
+
children: n.map((d) => {
|
|
5421
|
+
const l = `${t}-${d.value}`;
|
|
5420
5422
|
return /* @__PURE__ */ a.jsxs("li", { className: "hidden", children: [
|
|
5421
5423
|
/* @__PURE__ */ a.jsx(
|
|
5422
5424
|
"input",
|
|
@@ -5424,13 +5426,13 @@ const $l = ({
|
|
|
5424
5426
|
type: "radio",
|
|
5425
5427
|
id: l,
|
|
5426
5428
|
name: t,
|
|
5427
|
-
value:
|
|
5428
|
-
checked: c ===
|
|
5429
|
-
onChange: () => d
|
|
5429
|
+
value: d.value,
|
|
5430
|
+
checked: c === d.value,
|
|
5431
|
+
onChange: () => u(d.value),
|
|
5430
5432
|
disabled: s
|
|
5431
5433
|
}
|
|
5432
5434
|
),
|
|
5433
|
-
/* @__PURE__ */ a.jsx("label", { htmlFor: l, children:
|
|
5435
|
+
/* @__PURE__ */ a.jsx("label", { htmlFor: l, children: d.label })
|
|
5434
5436
|
] }, l);
|
|
5435
5437
|
})
|
|
5436
5438
|
}
|
|
@@ -5440,8 +5442,8 @@ const $l = ({
|
|
|
5440
5442
|
);
|
|
5441
5443
|
};
|
|
5442
5444
|
function Nl({ className: t = "", userId: e, userName: n, src: r, setUserImage: i, uploadImage: s }) {
|
|
5443
|
-
const [o, c] = te(!1), [f,
|
|
5444
|
-
c(!0),
|
|
5445
|
+
const [o, c] = te(!1), [f, u] = te(!1), d = pe(null), l = async (m) => {
|
|
5446
|
+
c(!0), u(!1);
|
|
5445
5447
|
try {
|
|
5446
5448
|
const p = m.target.files && m.target.files[0];
|
|
5447
5449
|
if (!p || !e)
|
|
@@ -5455,7 +5457,7 @@ function Nl({ className: t = "", userId: e, userName: n, src: r, setUserImage: i
|
|
|
5455
5457
|
}
|
|
5456
5458
|
}));
|
|
5457
5459
|
} catch {
|
|
5458
|
-
|
|
5460
|
+
u(!0);
|
|
5459
5461
|
} finally {
|
|
5460
5462
|
c(!1);
|
|
5461
5463
|
}
|
|
@@ -5470,7 +5472,7 @@ function Nl({ className: t = "", userId: e, userName: n, src: r, setUserImage: i
|
|
|
5470
5472
|
id: "file",
|
|
5471
5473
|
type: "file",
|
|
5472
5474
|
accept: "image/*",
|
|
5473
|
-
ref:
|
|
5475
|
+
ref: d,
|
|
5474
5476
|
onChange: l,
|
|
5475
5477
|
hidden: !0,
|
|
5476
5478
|
"data-testid": "file-input"
|
|
@@ -5479,7 +5481,7 @@ function Nl({ className: t = "", userId: e, userName: n, src: r, setUserImage: i
|
|
|
5479
5481
|
/* @__PURE__ */ a.jsx(
|
|
5480
5482
|
ie,
|
|
5481
5483
|
{
|
|
5482
|
-
onClick: () =>
|
|
5484
|
+
onClick: () => d.current && d.current.click(),
|
|
5483
5485
|
variant: "secondary",
|
|
5484
5486
|
"data-gtm-event-context": "ImageField",
|
|
5485
5487
|
"data-gtm-event-type": `${r ? "change-photo" : "add-photo"}-click`,
|
|
@@ -5548,13 +5550,13 @@ const Po = ({
|
|
|
5548
5550
|
onClose: o,
|
|
5549
5551
|
reportError: c,
|
|
5550
5552
|
sendInvites: f,
|
|
5551
|
-
initialFormStatus:
|
|
5553
|
+
initialFormStatus: u = "NOT_SUBMITTED"
|
|
5552
5554
|
/* NOT_SUBMITTED */
|
|
5553
5555
|
}) => {
|
|
5554
|
-
const [
|
|
5556
|
+
const [d, l] = te([]), [m, p] = te(!0), [v, y] = te(u), { formatMessage: _ } = G(), g = async (j) => {
|
|
5555
5557
|
j.preventDefault();
|
|
5556
5558
|
try {
|
|
5557
|
-
await f(
|
|
5559
|
+
await f(d), l([]), y(
|
|
5558
5560
|
"SUCCESS"
|
|
5559
5561
|
/* SUCCESS */
|
|
5560
5562
|
);
|
|
@@ -5601,7 +5603,7 @@ const Po = ({
|
|
|
5601
5603
|
id: "email-input",
|
|
5602
5604
|
inputClassName: "email-input input",
|
|
5603
5605
|
placeholder: _({ id: "inviteForm_email_placeholder" }),
|
|
5604
|
-
emails:
|
|
5606
|
+
emails: d,
|
|
5605
5607
|
onChange: (j) => {
|
|
5606
5608
|
l(j), p(!j.length);
|
|
5607
5609
|
},
|
|
@@ -5615,7 +5617,7 @@ const Po = ({
|
|
|
5615
5617
|
size: "small",
|
|
5616
5618
|
icon: { icon: "close" },
|
|
5617
5619
|
onClick: () => {
|
|
5618
|
-
U(w), p(!
|
|
5620
|
+
U(w), p(!d.length);
|
|
5619
5621
|
},
|
|
5620
5622
|
className: "remove-email-button",
|
|
5621
5623
|
screenreaderText: _({ id: "overlay_close" })
|
|
@@ -5639,17 +5641,17 @@ const Mo = ({
|
|
|
5639
5641
|
gtmContext: i = "search-bar",
|
|
5640
5642
|
gtmEvent: s = "form-submission"
|
|
5641
5643
|
}) => {
|
|
5642
|
-
const { searchIsOpen: o = !0, isDesktopVersion: c = !1 } = n || {}, f = G(),
|
|
5644
|
+
const { searchIsOpen: o = !0, isDesktopVersion: c = !1 } = n || {}, f = G(), u = pe(null);
|
|
5643
5645
|
vt(() => {
|
|
5644
|
-
!n || c || !o ||
|
|
5646
|
+
!n || c || !o || u.current && u.current.focus();
|
|
5645
5647
|
}, [o]);
|
|
5646
|
-
const
|
|
5647
|
-
l.preventDefault(), l.stopPropagation(), !(!
|
|
5648
|
+
const d = (l) => {
|
|
5649
|
+
l.preventDefault(), l.stopPropagation(), !(!u.current || !u.current.value || u.current.value.length < 1) && (window.location.href = `/search?search=${encodeURIComponent(u.current.value)}`);
|
|
5648
5650
|
};
|
|
5649
5651
|
return /* @__PURE__ */ a.jsx(
|
|
5650
5652
|
"form",
|
|
5651
5653
|
{
|
|
5652
|
-
onSubmit:
|
|
5654
|
+
onSubmit: d,
|
|
5653
5655
|
className: C("search-form gtm-trackable", e),
|
|
5654
5656
|
"data-gtm-event-context": i,
|
|
5655
5657
|
"data-gtm-event-type": s,
|
|
@@ -5671,14 +5673,14 @@ const Mo = ({
|
|
|
5671
5673
|
/* @__PURE__ */ a.jsx(
|
|
5672
5674
|
"input",
|
|
5673
5675
|
{
|
|
5674
|
-
ref:
|
|
5676
|
+
ref: u,
|
|
5675
5677
|
type: "search",
|
|
5676
5678
|
id: t,
|
|
5677
5679
|
name: t,
|
|
5678
5680
|
defaultValue: r,
|
|
5679
5681
|
placeholder: f.formatMessage({ id: "search_placeholder" }),
|
|
5680
5682
|
onKeyDown: (l) => {
|
|
5681
|
-
l.key === "Enter" &&
|
|
5683
|
+
l.key === "Enter" && d(l);
|
|
5682
5684
|
}
|
|
5683
5685
|
}
|
|
5684
5686
|
),
|
|
@@ -5687,12 +5689,12 @@ const Mo = ({
|
|
|
5687
5689
|
{
|
|
5688
5690
|
className: "clear",
|
|
5689
5691
|
onClick: (l) => {
|
|
5690
|
-
l.preventDefault(), l.stopPropagation(),
|
|
5692
|
+
l.preventDefault(), l.stopPropagation(), u.current && u.current.value && (u.current.value = "");
|
|
5691
5693
|
},
|
|
5692
5694
|
children: /* @__PURE__ */ a.jsx(be, { children: f.formatMessage({ id: "search_clear" }) })
|
|
5693
5695
|
}
|
|
5694
5696
|
),
|
|
5695
|
-
/* @__PURE__ */ a.jsx("button", { className: "search", onClick:
|
|
5697
|
+
/* @__PURE__ */ a.jsx("button", { className: "search", onClick: d, children: /* @__PURE__ */ a.jsx(be, { children: f.formatMessage({ id: "search_cta" }) }) })
|
|
5696
5698
|
] })
|
|
5697
5699
|
}
|
|
5698
5700
|
)
|
|
@@ -5729,15 +5731,15 @@ const Mo = ({
|
|
|
5729
5731
|
{ type: "validFields.email", value: !1 }
|
|
5730
5732
|
]);
|
|
5731
5733
|
}
|
|
5732
|
-
const { valid: c = !1, autoApproved: f = !1, exists:
|
|
5733
|
-
let
|
|
5734
|
-
return c ?
|
|
5734
|
+
const { valid: c = !1, autoApproved: f = !1, exists: u } = o;
|
|
5735
|
+
let d = "";
|
|
5736
|
+
return c ? d = f ? "gov" : "nonGov" : u.registration ? u.engagement && !u.user ? d = u.auth ? "verify" : "pending" : d = "exists" : u.auth && (d = "exists"), n([
|
|
5735
5737
|
{ type: "shouldManuallyApprove", value: !f },
|
|
5736
5738
|
{
|
|
5737
5739
|
type: "emailDetails",
|
|
5738
5740
|
value: {
|
|
5739
5741
|
email: i,
|
|
5740
|
-
boxType:
|
|
5742
|
+
boxType: d,
|
|
5741
5743
|
isEnd2End: /testing\+[0-9]+@apolitical.co$/.test(i)
|
|
5742
5744
|
}
|
|
5743
5745
|
},
|
|
@@ -5785,16 +5787,16 @@ const Mo = ({
|
|
|
5785
5787
|
intl: c
|
|
5786
5788
|
// We need to pass `intl` in as it's being used in a hook
|
|
5787
5789
|
}) => {
|
|
5788
|
-
const { emailDetails: f } = i,
|
|
5790
|
+
const { emailDetails: f } = i, u = (l, m) => {
|
|
5789
5791
|
l.current && i.validFields[m] !== l.current.validity.valid && s([{ type: `validFields.${m}`, value: l.current.validity.valid }]);
|
|
5790
|
-
},
|
|
5792
|
+
}, d = [
|
|
5791
5793
|
{
|
|
5792
5794
|
id: "full_name",
|
|
5793
5795
|
type: "text",
|
|
5794
5796
|
inputRef: r.name,
|
|
5795
5797
|
placeholder: c.formatMessage({ id: "signup_full_name_placeholder" }),
|
|
5796
5798
|
functions: {
|
|
5797
|
-
onChange: () =>
|
|
5799
|
+
onChange: () => u(r.name, "name"),
|
|
5798
5800
|
onFocus: () => s([{ type: "loadRecaptcha", value: !0 }])
|
|
5799
5801
|
},
|
|
5800
5802
|
autoComplete: "name",
|
|
@@ -5833,14 +5835,14 @@ const Mo = ({
|
|
|
5833
5835
|
}
|
|
5834
5836
|
}
|
|
5835
5837
|
];
|
|
5836
|
-
return i.shouldManuallyApprove && (
|
|
5838
|
+
return i.shouldManuallyApprove && (d.push(
|
|
5837
5839
|
{
|
|
5838
5840
|
id: "job_title",
|
|
5839
5841
|
type: "text",
|
|
5840
5842
|
inputRef: r.jobTitle,
|
|
5841
5843
|
placeholder: c.formatMessage({ id: "signup_job_title_placeholder" }),
|
|
5842
5844
|
functions: {
|
|
5843
|
-
onChange: () =>
|
|
5845
|
+
onChange: () => u(r.jobTitle, "jobTitle")
|
|
5844
5846
|
},
|
|
5845
5847
|
validation: [{ condition: "required" }],
|
|
5846
5848
|
"data-testid": "signup-job-input"
|
|
@@ -5854,13 +5856,13 @@ const Mo = ({
|
|
|
5854
5856
|
}),
|
|
5855
5857
|
functions: {
|
|
5856
5858
|
onChange: () => {
|
|
5857
|
-
|
|
5859
|
+
u(r.organisation, "organisation");
|
|
5858
5860
|
}
|
|
5859
5861
|
},
|
|
5860
5862
|
validation: [{ condition: "required" }],
|
|
5861
5863
|
"data-testid": "signup-org-input"
|
|
5862
5864
|
}
|
|
5863
|
-
), t.url &&
|
|
5865
|
+
), t.url && d.push({
|
|
5864
5866
|
id: "url",
|
|
5865
5867
|
type: "text",
|
|
5866
5868
|
label: c.formatMessage(
|
|
@@ -5872,7 +5874,7 @@ const Mo = ({
|
|
|
5872
5874
|
placeholder: c.formatMessage({ id: "signup_url_placeholder" }),
|
|
5873
5875
|
validation: [{ condition: "valid-url" }],
|
|
5874
5876
|
"data-testid": "signup-url-input"
|
|
5875
|
-
})), t.expectation &&
|
|
5877
|
+
})), t.expectation && d.push({
|
|
5876
5878
|
id: "expectation",
|
|
5877
5879
|
className: "expectation",
|
|
5878
5880
|
type: "text",
|
|
@@ -5884,7 +5886,7 @@ const Mo = ({
|
|
|
5884
5886
|
),
|
|
5885
5887
|
placeholder: c.formatMessage({ id: "signup_expectation_placeholder" }),
|
|
5886
5888
|
"data-testid": "signup-events-question"
|
|
5887
|
-
}),
|
|
5889
|
+
}), d.push({
|
|
5888
5890
|
id: "terms",
|
|
5889
5891
|
className: "text-small",
|
|
5890
5892
|
type: "checkbox",
|
|
@@ -5930,7 +5932,7 @@ const Mo = ({
|
|
|
5930
5932
|
},
|
|
5931
5933
|
validation: [{ condition: "required" }],
|
|
5932
5934
|
"data-testid": "signup-terms-checkbox"
|
|
5933
|
-
}),
|
|
5935
|
+
}), d;
|
|
5934
5936
|
};
|
|
5935
5937
|
const Do = ({ className: t = "" }) => /* @__PURE__ */ a.jsxs(
|
|
5936
5938
|
"div",
|
|
@@ -5985,8 +5987,8 @@ const Ao = {
|
|
|
5985
5987
|
...s
|
|
5986
5988
|
}) => {
|
|
5987
5989
|
const o = G(), [c, f] = zn(ra, Ao), {
|
|
5988
|
-
validFields:
|
|
5989
|
-
emailDetails:
|
|
5990
|
+
validFields: u,
|
|
5991
|
+
emailDetails: d,
|
|
5990
5992
|
shouldManuallyApprove: l,
|
|
5991
5993
|
showSuccessMessage: m,
|
|
5992
5994
|
showError: p
|
|
@@ -6023,7 +6025,7 @@ const Ao = {
|
|
|
6023
6025
|
dispatch: f,
|
|
6024
6026
|
dataToSubmit: i,
|
|
6025
6027
|
intl: o
|
|
6026
|
-
}), [i, e, o, _, n, c]), b = l ? !Object.values(
|
|
6028
|
+
}), [i, e, o, _, n, c]), b = l ? !Object.values(u).every((E) => E === !0) : !u.name || !u.email || ["exists", "pending", "verify"].includes(d.boxType);
|
|
6027
6029
|
return n.successMessage && m ? /* @__PURE__ */ a.jsx(Do, { className: t }) : /* @__PURE__ */ a.jsxs(
|
|
6028
6030
|
"fieldset",
|
|
6029
6031
|
{
|
|
@@ -6111,7 +6113,7 @@ const Ml = ({
|
|
|
6111
6113
|
onClose: c,
|
|
6112
6114
|
reportError: f = () => {
|
|
6113
6115
|
},
|
|
6114
|
-
sendInvites:
|
|
6116
|
+
sendInvites: u
|
|
6115
6117
|
}) => /* @__PURE__ */ a.jsx(
|
|
6116
6118
|
Xt,
|
|
6117
6119
|
{
|
|
@@ -6128,7 +6130,7 @@ const Ml = ({
|
|
|
6128
6130
|
label: i,
|
|
6129
6131
|
ctaMessage: s,
|
|
6130
6132
|
onClose: c,
|
|
6131
|
-
sendInvites:
|
|
6133
|
+
sendInvites: u,
|
|
6132
6134
|
reportError: f
|
|
6133
6135
|
}
|
|
6134
6136
|
)
|
|
@@ -6181,8 +6183,8 @@ const Rl = ({ members: t }) => {
|
|
|
6181
6183
|
isOngoingEvent: o,
|
|
6182
6184
|
pill: c,
|
|
6183
6185
|
readingTime: f,
|
|
6184
|
-
publishedDate:
|
|
6185
|
-
startDate:
|
|
6186
|
+
publishedDate: u,
|
|
6187
|
+
startDate: d
|
|
6186
6188
|
} = e;
|
|
6187
6189
|
if (t === "question") {
|
|
6188
6190
|
const l = i && Dn(i);
|
|
@@ -6204,8 +6206,8 @@ const Rl = ({ members: t }) => {
|
|
|
6204
6206
|
] })
|
|
6205
6207
|
] });
|
|
6206
6208
|
}
|
|
6207
|
-
if (
|
|
6208
|
-
return /* @__PURE__ */ a.jsx("p", { className: "details", children: o ? n.formatMessage({ id: "card_bootcamp" }) : sa(
|
|
6209
|
+
if (d && !s || o)
|
|
6210
|
+
return /* @__PURE__ */ a.jsx("p", { className: "details", children: o ? n.formatMessage({ id: "card_bootcamp" }) : sa(d) });
|
|
6209
6211
|
if (c)
|
|
6210
6212
|
return /* @__PURE__ */ a.jsx(
|
|
6211
6213
|
ft,
|
|
@@ -6216,11 +6218,11 @@ const Rl = ({ members: t }) => {
|
|
|
6216
6218
|
children: c
|
|
6217
6219
|
}
|
|
6218
6220
|
);
|
|
6219
|
-
if (f ||
|
|
6220
|
-
const l =
|
|
6221
|
+
if (f || u) {
|
|
6222
|
+
const l = u && Dn(u);
|
|
6221
6223
|
return /* @__PURE__ */ a.jsxs("ul", { className: "details", children: [
|
|
6222
6224
|
f && /* @__PURE__ */ a.jsx("li", { "data-testid": "reading-time", children: n.formatMessage({ id: "card_time_read" }, { time: f }) }),
|
|
6223
|
-
|
|
6225
|
+
u && /* @__PURE__ */ a.jsx("li", { "data-testid": "published-date", children: n.formatMessage(
|
|
6224
6226
|
{ id: "card_time_ago" },
|
|
6225
6227
|
{
|
|
6226
6228
|
time: l ? n.formatMessage(
|
|
@@ -6233,8 +6235,8 @@ const Rl = ({ members: t }) => {
|
|
|
6233
6235
|
}
|
|
6234
6236
|
return null;
|
|
6235
6237
|
}, Ht = {
|
|
6236
|
-
|
|
6237
|
-
basePath: "/
|
|
6238
|
+
communityPage: {
|
|
6239
|
+
basePath: "/communities/",
|
|
6238
6240
|
className: "community",
|
|
6239
6241
|
gtmEvent: "community"
|
|
6240
6242
|
},
|
|
@@ -6303,7 +6305,7 @@ const Rl = ({ members: t }) => {
|
|
|
6303
6305
|
ae(() => {
|
|
6304
6306
|
t.registered && o((y) => ({ ...y, registered: !0 }));
|
|
6305
6307
|
}, [t.registered]);
|
|
6306
|
-
const { startDate: c, dateHasPassed: f, pill:
|
|
6308
|
+
const { startDate: c, dateHasPassed: f, pill: u, slug: d } = t, l = t.contentType;
|
|
6307
6309
|
let m = "";
|
|
6308
6310
|
if ((v = Ht[l]) != null && v.gtmEvent && (m = Ht[l].gtmEvent), c && f)
|
|
6309
6311
|
return /* @__PURE__ */ a.jsx(
|
|
@@ -6330,7 +6332,7 @@ const Rl = ({ members: t }) => {
|
|
|
6330
6332
|
}
|
|
6331
6333
|
);
|
|
6332
6334
|
const p = ["microcourse", "event"];
|
|
6333
|
-
if (e && e.onClick && p.includes(l) &&
|
|
6335
|
+
if (e && e.onClick && p.includes(l) && u !== "premium") {
|
|
6334
6336
|
const y = s.loading || s.registered, _ = async (g) => {
|
|
6335
6337
|
if (g.preventDefault(), g.stopPropagation(), !(y || !e || !e.onClick)) {
|
|
6336
6338
|
o((b) => ({ ...b, loading: !0 }));
|
|
@@ -6350,7 +6352,7 @@ const Rl = ({ members: t }) => {
|
|
|
6350
6352
|
size: "small",
|
|
6351
6353
|
styling: { fullWidth: !0 },
|
|
6352
6354
|
disabled: y,
|
|
6353
|
-
"data-gtm-event-context": `${r}Page-${l}: ${
|
|
6355
|
+
"data-gtm-event-context": `${r}Page-${l}: ${d}`,
|
|
6354
6356
|
"data-gtm-event-type": `${r}-${l}-register-click`,
|
|
6355
6357
|
"data-testid": "in-card-button",
|
|
6356
6358
|
children: i.formatMessage({
|
|
@@ -6384,13 +6386,13 @@ const qo = {
|
|
|
6384
6386
|
className: s = ""
|
|
6385
6387
|
}) => {
|
|
6386
6388
|
var H;
|
|
6387
|
-
const o = G(), c = Ce(Oe), f = c && typeof c.id == "string", [
|
|
6389
|
+
const o = G(), c = Ce(Oe), f = c && typeof c.id == "string", [u, d] = te({
|
|
6388
6390
|
data: null,
|
|
6389
6391
|
isLoading: !0
|
|
6390
|
-
}), { data: l, isLoading: m } =
|
|
6392
|
+
}), { data: l, isLoading: m } = u, p = Kr(() => {
|
|
6391
6393
|
n(e, f).then((M) => {
|
|
6392
|
-
|
|
6393
|
-
}).catch(() =>
|
|
6394
|
+
d(() => ({ data: M, isLoading: !1 }));
|
|
6395
|
+
}).catch(() => d((M) => ({ ...M, isLoading: !1 })));
|
|
6394
6396
|
}, [t]);
|
|
6395
6397
|
if (ae(() => {
|
|
6396
6398
|
p();
|
|
@@ -6543,16 +6545,16 @@ const Wo = ({
|
|
|
6543
6545
|
className: s,
|
|
6544
6546
|
gtmContext: o
|
|
6545
6547
|
}) => {
|
|
6546
|
-
const c = G(), [f,
|
|
6548
|
+
const c = G(), [f, u] = te({
|
|
6547
6549
|
cardsPerPage: 4,
|
|
6548
6550
|
isLoading: !0
|
|
6549
|
-
}), { cardsPerPage:
|
|
6551
|
+
}), { cardsPerPage: d, isLoading: l } = f, [m, p] = te({
|
|
6550
6552
|
currentPage: 0,
|
|
6551
6553
|
loadedPages: [0]
|
|
6552
|
-
}), { currentPage: v, loadedPages: y } = m, _ = e.length, g = Math.ceil(_ /
|
|
6554
|
+
}), { currentPage: v, loadedPages: y } = m, _ = e.length, g = Math.ceil(_ / d), b = pe(null), E = yt(!0, !0, b == null ? void 0 : b.current);
|
|
6553
6555
|
ae(() => {
|
|
6554
6556
|
let M = 1;
|
|
6555
|
-
E && (E >= yn.fourCards ? M = 4 : E >= yn.threeCards ? M = 3 : E >= yn.twoCards && (M = 2), M > _ && (M = _)),
|
|
6557
|
+
E && (E >= yn.fourCards ? M = 4 : E >= yn.threeCards ? M = 3 : E >= yn.twoCards && (M = 2), M > _ && (M = _)), u((O) => ({
|
|
6556
6558
|
...O,
|
|
6557
6559
|
cardsPerPage: M,
|
|
6558
6560
|
isLoading: !1
|
|
@@ -6587,7 +6589,7 @@ const Wo = ({
|
|
|
6587
6589
|
}, F = {
|
|
6588
6590
|
"--width": `${E || 0}px`,
|
|
6589
6591
|
"--total-cards": _,
|
|
6590
|
-
"--cards-per-page":
|
|
6592
|
+
"--cards-per-page": d,
|
|
6591
6593
|
"--page": v
|
|
6592
6594
|
};
|
|
6593
6595
|
if (l)
|
|
@@ -6615,7 +6617,7 @@ const Wo = ({
|
|
|
6615
6617
|
"data-testid": "carousel-list",
|
|
6616
6618
|
children: e.map((M, O) => {
|
|
6617
6619
|
let S = H(M, O);
|
|
6618
|
-
return S && zo(O,
|
|
6620
|
+
return S && zo(O, d, v, y) ? /* @__PURE__ */ a.jsx(
|
|
6619
6621
|
Ma,
|
|
6620
6622
|
{
|
|
6621
6623
|
id: S,
|
|
@@ -6691,8 +6693,8 @@ const Wo = ({
|
|
|
6691
6693
|
className: r = "",
|
|
6692
6694
|
...i
|
|
6693
6695
|
}) => !t || !t.length ? null : t.map(
|
|
6694
|
-
({ title: s, viewAllUrl: o, cards: c, cardsTypes: f },
|
|
6695
|
-
const
|
|
6696
|
+
({ title: s, viewAllUrl: o, cards: c, cardsTypes: f }, u) => {
|
|
6697
|
+
const d = s ? window.btoa(s) : `carousel-${u}`, l = u === t.length - 1;
|
|
6696
6698
|
return e ? /* @__PURE__ */ a.jsxs(gt, { children: [
|
|
6697
6699
|
/* @__PURE__ */ a.jsx(
|
|
6698
6700
|
fa,
|
|
@@ -6702,7 +6704,7 @@ const Wo = ({
|
|
|
6702
6704
|
}
|
|
6703
6705
|
),
|
|
6704
6706
|
l ? null : /* @__PURE__ */ a.jsx(Re, {})
|
|
6705
|
-
] }, `placeholder-${
|
|
6707
|
+
] }, `placeholder-${d}`) : /* @__PURE__ */ a.jsxs(gt, { children: [
|
|
6706
6708
|
/* @__PURE__ */ a.jsx(
|
|
6707
6709
|
Wo,
|
|
6708
6710
|
{
|
|
@@ -6713,7 +6715,7 @@ const Wo = ({
|
|
|
6713
6715
|
}
|
|
6714
6716
|
),
|
|
6715
6717
|
l ? null : /* @__PURE__ */ a.jsx(Re, {})
|
|
6716
|
-
] }, `carousel-${
|
|
6718
|
+
] }, `carousel-${d}`);
|
|
6717
6719
|
}
|
|
6718
6720
|
);
|
|
6719
6721
|
const _n = "joinCommunityButton", Ra = ({
|
|
@@ -6723,28 +6725,28 @@ const _n = "joinCommunityButton", Ra = ({
|
|
|
6723
6725
|
}, leave: () => {
|
|
6724
6726
|
} }
|
|
6725
6727
|
}) => {
|
|
6726
|
-
const i = G(), s = Ce(Oe), o = s && typeof s.id == "string", [c, f] = te(t), [
|
|
6728
|
+
const i = G(), s = Ce(Oe), o = s && typeof s.id == "string", [c, f] = te(t), [u, d] = te(t ? "joined" : "notJoined");
|
|
6727
6729
|
ae(() => {
|
|
6728
|
-
|
|
6730
|
+
u === "joining" ? d("joined") : u === "leaving" && d("notJoined");
|
|
6729
6731
|
}, [c]);
|
|
6730
6732
|
const l = {}, m = {};
|
|
6731
|
-
return c &&
|
|
6733
|
+
return c && u !== "leaving" && (l["data-hover-text"] = i.formatMessage({ id: `${_n}_leave` }), l["aria-label"] = i.formatMessage({ id: `${_n}_member_aria` }), m["aria-hidden"] = "true"), /* @__PURE__ */ a.jsx(
|
|
6732
6734
|
ie,
|
|
6733
6735
|
{
|
|
6734
6736
|
variant: c ? "secondary" : "primary",
|
|
6735
6737
|
size: "medium",
|
|
6736
6738
|
styling: { fullWidth: !0 },
|
|
6737
|
-
icon: c &&
|
|
6739
|
+
icon: c && u !== "leaving" ? { icon: "tick", position: "left" } : !1,
|
|
6738
6740
|
onClick: async (p) => {
|
|
6739
|
-
o && (p.currentTarget.blur(), c ? (
|
|
6741
|
+
o && (p.currentTarget.blur(), c ? (d("leaving"), typeof r == "function" && await r()) : (d("joining"), typeof n == "function" && await n()), f(!c));
|
|
6740
6742
|
},
|
|
6741
|
-
className: C("join-community-button",
|
|
6742
|
-
active:
|
|
6743
|
+
className: C("join-community-button", u, {
|
|
6744
|
+
active: u === "joining"
|
|
6743
6745
|
}),
|
|
6744
6746
|
disabled: !o,
|
|
6745
6747
|
...l,
|
|
6746
6748
|
children: /* @__PURE__ */ a.jsx("span", { className: "text", ...m, children: i.formatMessage({
|
|
6747
|
-
id: `${_n}${["joining", "leaving"].includes(
|
|
6749
|
+
id: `${_n}${["joining", "leaving"].includes(u) ? `_${u}` : c ? "_member" : e ? "_short" : ""}`
|
|
6748
6750
|
}) })
|
|
6749
6751
|
}
|
|
6750
6752
|
);
|
|
@@ -6756,14 +6758,14 @@ const xn = "communityDetails_", Ol = ({
|
|
|
6756
6758
|
members: { number: r = 0, data: i = [] } = { number: 0, data: [] },
|
|
6757
6759
|
functions: { invite: s, ...o }
|
|
6758
6760
|
}) => {
|
|
6759
|
-
const c = G(), f = 5,
|
|
6761
|
+
const c = G(), f = 5, u = r || i.length, d = i.length ? i : Array(f).fill({}), l = `/communities/${n}/members` === window.location.pathname;
|
|
6760
6762
|
return /* @__PURE__ */ a.jsxs("div", { className: C("community-details", t), children: [
|
|
6761
6763
|
/* @__PURE__ */ a.jsx(Re, {}),
|
|
6762
6764
|
/* @__PURE__ */ a.jsxs("div", { className: "member-details", children: [
|
|
6763
6765
|
/* @__PURE__ */ a.jsxs("div", { className: "top", children: [
|
|
6764
6766
|
/* @__PURE__ */ a.jsxs("h4", { children: [
|
|
6765
6767
|
c.formatMessage({ id: `${xn}members` }),
|
|
6766
|
-
/* @__PURE__ */ a.jsx("span", { className: "count", children:
|
|
6768
|
+
/* @__PURE__ */ a.jsx("span", { className: "count", children: u })
|
|
6767
6769
|
] }),
|
|
6768
6770
|
!l && /* @__PURE__ */ a.jsx("p", { className: "text-small", children: /* @__PURE__ */ a.jsx("a", { href: `/communities/${n}/members`, children: c.formatMessage({ id: `${xn}viewAll` }) }) })
|
|
6769
6771
|
] }),
|
|
@@ -6772,12 +6774,12 @@ const xn = "communityDetails_", Ol = ({
|
|
|
6772
6774
|
{
|
|
6773
6775
|
contributors: {
|
|
6774
6776
|
total: r,
|
|
6775
|
-
data:
|
|
6777
|
+
data: d
|
|
6776
6778
|
},
|
|
6777
6779
|
styling: {
|
|
6778
6780
|
size: "medium",
|
|
6779
6781
|
showGap: !0,
|
|
6780
|
-
showPlaceholders:
|
|
6782
|
+
showPlaceholders: u === 0
|
|
6781
6783
|
},
|
|
6782
6784
|
cutoff: f
|
|
6783
6785
|
}
|
|
@@ -6834,11 +6836,11 @@ const Al = ({
|
|
|
6834
6836
|
text: typeof e != "boolean" && e.text || s.formatMessage({ id: "filters_all" })
|
|
6835
6837
|
},
|
|
6836
6838
|
...t
|
|
6837
|
-
] : t, [c, f] = te(e ? ["all"] : []),
|
|
6839
|
+
] : t, [c, f] = te(e ? ["all"] : []), u = (d, l) => {
|
|
6838
6840
|
let m = [];
|
|
6839
|
-
c.includes(
|
|
6841
|
+
c.includes(d) ? m = c.filter((p) => p !== d) : d === "all" ? m = ["all"] : n ? m = [...c.filter((p) => p !== "all"), d] : m = [d], f((p) => (r && typeof r == "function" && r({ current: m, previous: p }), m)), l && typeof l == "function" && l();
|
|
6840
6842
|
};
|
|
6841
|
-
return /* @__PURE__ */ a.jsx("ul", { className: C("filters", i), children: o.map(({ id:
|
|
6843
|
+
return /* @__PURE__ */ a.jsx("ul", { className: C("filters", i), children: o.map(({ id: d, text: l, disabled: m = !1, callback: p = () => {
|
|
6842
6844
|
} }) => {
|
|
6843
6845
|
let v = {};
|
|
6844
6846
|
return m && (v = {
|
|
@@ -6847,14 +6849,14 @@ const Al = ({
|
|
|
6847
6849
|
}), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
6848
6850
|
"button",
|
|
6849
6851
|
{
|
|
6850
|
-
className: C(
|
|
6852
|
+
className: C(d, { selected: c.includes(d) }),
|
|
6851
6853
|
onClick: (y) => {
|
|
6852
|
-
y.preventDefault(), y.stopPropagation(), d
|
|
6854
|
+
y.preventDefault(), y.stopPropagation(), u(d, p);
|
|
6853
6855
|
},
|
|
6854
6856
|
...v,
|
|
6855
6857
|
children: l
|
|
6856
6858
|
}
|
|
6857
|
-
) },
|
|
6859
|
+
) }, d);
|
|
6858
6860
|
}) });
|
|
6859
6861
|
}, Ho = (t, e) => {
|
|
6860
6862
|
const n = String(t);
|
|
@@ -6882,22 +6884,22 @@ const wn = {
|
|
|
6882
6884
|
label: c,
|
|
6883
6885
|
className: f = ""
|
|
6884
6886
|
}) => {
|
|
6885
|
-
const
|
|
6887
|
+
const u = G(), [d, l] = te(t);
|
|
6886
6888
|
if (ae(() => {
|
|
6887
|
-
t !==
|
|
6889
|
+
t !== d && l(t);
|
|
6888
6890
|
}, [t]), !r || !Object.values(r).some(
|
|
6889
6891
|
(y) => y && y.post_name
|
|
6890
6892
|
))
|
|
6891
6893
|
return null;
|
|
6892
|
-
const p = Object.keys(r), v =
|
|
6894
|
+
const p = Object.keys(r), v = d !== t;
|
|
6893
6895
|
return /* @__PURE__ */ a.jsxs("div", { className: C("language-switcher text-small", o, f), children: [
|
|
6894
6896
|
/* @__PURE__ */ a.jsxs("nav", { children: [
|
|
6895
|
-
o !== "short" && /* @__PURE__ */ a.jsx("p", { children: c ||
|
|
6897
|
+
o !== "short" && /* @__PURE__ */ a.jsx("p", { children: c || u.formatMessage({ id: `${Pt}label` }) }),
|
|
6896
6898
|
/* @__PURE__ */ a.jsx("ul", { children: p.map((y) => {
|
|
6897
6899
|
if (!wn[y])
|
|
6898
6900
|
return null;
|
|
6899
6901
|
let _ = { className: y };
|
|
6900
|
-
return
|
|
6902
|
+
return d === y ? _["aria-label"] = u.formatMessage(
|
|
6901
6903
|
{ id: `${Pt}selected` },
|
|
6902
6904
|
{ language: wn[y] }
|
|
6903
6905
|
) : _ = {
|
|
@@ -6908,7 +6910,7 @@ const wn = {
|
|
|
6908
6910
|
}
|
|
6909
6911
|
}, /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(wt, { ..._, fallbackElement: "span", children: wn[y] }) }, y);
|
|
6910
6912
|
}) }),
|
|
6911
|
-
o !== "short" && !v && /* @__PURE__ */ a.jsx("p", { children:
|
|
6913
|
+
o !== "short" && !v && /* @__PURE__ */ a.jsx("p", { children: u.formatMessage({
|
|
6912
6914
|
id: `${Pt}translation_${e ? "original" : n ? "human" : "machine"}`
|
|
6913
6915
|
}) })
|
|
6914
6916
|
] }),
|
|
@@ -6916,7 +6918,7 @@ const wn = {
|
|
|
6916
6918
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
6917
6919
|
// @ts-ignore
|
|
6918
6920
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
6919
|
-
children:
|
|
6921
|
+
children: u.formatMessage(
|
|
6920
6922
|
{ id: `${Pt}disclaimer` },
|
|
6921
6923
|
{
|
|
6922
6924
|
email: lt.support,
|
|
@@ -6945,14 +6947,14 @@ const kn = pi({ locale: "en", messages: Hn }), en = ({
|
|
|
6945
6947
|
className: c = "",
|
|
6946
6948
|
gtmContext: f = "LoadMore"
|
|
6947
6949
|
}) => {
|
|
6948
|
-
const [
|
|
6950
|
+
const [u, d] = te(""), l = async (m) => {
|
|
6949
6951
|
try {
|
|
6950
6952
|
await e(m);
|
|
6951
6953
|
} catch (p) {
|
|
6952
|
-
p instanceof Error ?
|
|
6954
|
+
p instanceof Error ? d(p.message) : d("Unknown error");
|
|
6953
6955
|
}
|
|
6954
6956
|
};
|
|
6955
|
-
return !
|
|
6957
|
+
return !u && !t && !o.endOfFeed ? null : /* @__PURE__ */ a.jsx("footer", { className: C("load-more", c), children: !u && t ? /* @__PURE__ */ a.jsx(
|
|
6956
6958
|
ie,
|
|
6957
6959
|
{
|
|
6958
6960
|
variant: n,
|
|
@@ -6966,7 +6968,7 @@ const kn = pi({ locale: "en", messages: Hn }), en = ({
|
|
|
6966
6968
|
"data-testid": "load-more-button",
|
|
6967
6969
|
children: o.button
|
|
6968
6970
|
}
|
|
6969
|
-
) : o.endOfFeed && (!
|
|
6971
|
+
) : o.endOfFeed && (!u || u != null && u.includes("Cannot read items")) ? /* @__PURE__ */ a.jsx("p", { children: o.endOfFeed }) : u && /* @__PURE__ */ a.jsx("p", { className: "error", children: o.error }) });
|
|
6970
6972
|
};
|
|
6971
6973
|
const Fa = ({
|
|
6972
6974
|
variant: t = "default",
|
|
@@ -6991,8 +6993,8 @@ const Vo = ({
|
|
|
6991
6993
|
}) => {
|
|
6992
6994
|
const i = G(), s = pe(
|
|
6993
6995
|
null
|
|
6994
|
-
), [o, c] = te(!1), f = (
|
|
6995
|
-
s.current &&
|
|
6996
|
+
), [o, c] = te(!1), f = (u) => {
|
|
6997
|
+
s.current && u.target instanceof HTMLElement && !s.current.contains(u.target) && c(!1);
|
|
6996
6998
|
};
|
|
6997
6999
|
return ae(() => (document.addEventListener("click", f, !0), () => {
|
|
6998
7000
|
document.removeEventListener("click", f, !0);
|
|
@@ -7013,11 +7015,11 @@ const Vo = ({
|
|
|
7013
7015
|
screenreaderText: i.formatMessage({ id: "moreMenu" })
|
|
7014
7016
|
}
|
|
7015
7017
|
),
|
|
7016
|
-
/* @__PURE__ */ a.jsx("ul", { id: e, hidden: !o, children: n.map(({ href:
|
|
7018
|
+
/* @__PURE__ */ a.jsx("ul", { id: e, hidden: !o, children: n.map(({ href: u, onClick: d, text: l, icon: m, ...p }, v) => {
|
|
7017
7019
|
const y = {
|
|
7018
7020
|
...p,
|
|
7019
7021
|
onClick: (_) => {
|
|
7020
|
-
c(!1), typeof
|
|
7022
|
+
c(!1), typeof d == "function" && d(_);
|
|
7021
7023
|
},
|
|
7022
7024
|
onFocus: () => {
|
|
7023
7025
|
Mt && (clearTimeout(Mt), Mt = !1);
|
|
@@ -7028,7 +7030,7 @@ const Vo = ({
|
|
|
7028
7030
|
}, 100);
|
|
7029
7031
|
}
|
|
7030
7032
|
};
|
|
7031
|
-
return
|
|
7033
|
+
return u && (y.href = u), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
7032
7034
|
ie,
|
|
7033
7035
|
{
|
|
7034
7036
|
variant: "tertiary",
|
|
@@ -7058,6 +7060,10 @@ const Ko = [
|
|
|
7058
7060
|
{
|
|
7059
7061
|
key: "articles",
|
|
7060
7062
|
href: "/solution-articles/"
|
|
7063
|
+
},
|
|
7064
|
+
{
|
|
7065
|
+
key: "communities",
|
|
7066
|
+
href: "/communities/"
|
|
7061
7067
|
}
|
|
7062
7068
|
], Go = ({ activeLink: t }) => {
|
|
7063
7069
|
const e = G(), n = Ce(Oe), r = n && typeof n.id == "string";
|
|
@@ -7154,7 +7160,7 @@ const Jo = "shareLinks_", Ll = ({
|
|
|
7154
7160
|
const c = G(), f = Qo({ title: t, link: e, referrer: n });
|
|
7155
7161
|
return /* @__PURE__ */ a.jsxs("aside", { className: C("share-links", i, s, o), children: [
|
|
7156
7162
|
/* @__PURE__ */ a.jsx("p", { className: "text-small", children: c.formatMessage({ id: "shareLinks_label" }) }),
|
|
7157
|
-
/* @__PURE__ */ a.jsx("ul", { children: f.map(({ key:
|
|
7163
|
+
/* @__PURE__ */ a.jsx("ul", { children: f.map(({ key: u, icon: d, url: l, shouldRender: m = !0, onClick: p }) => {
|
|
7158
7164
|
if (typeof m == "function" && !m())
|
|
7159
7165
|
return null;
|
|
7160
7166
|
const v = {};
|
|
@@ -7163,78 +7169,78 @@ const Jo = "shareLinks_", Ll = ({
|
|
|
7163
7169
|
{
|
|
7164
7170
|
size: i,
|
|
7165
7171
|
variant: "tertiary",
|
|
7166
|
-
icon: { icon:
|
|
7172
|
+
icon: { icon: d || u },
|
|
7167
7173
|
href: l,
|
|
7168
7174
|
target: "_blank",
|
|
7169
7175
|
rel: "noopener noreferrer",
|
|
7170
7176
|
className: "gtm-trackable",
|
|
7171
7177
|
"data-gtm-event-context": `${r}-SocialButtons`,
|
|
7172
|
-
"data-gtm-event-type": `${
|
|
7178
|
+
"data-gtm-event-type": `${u}-click`,
|
|
7173
7179
|
"data-testid": "link",
|
|
7174
|
-
screenreaderText: c.formatMessage({ id: `${Jo}link_${
|
|
7180
|
+
screenreaderText: c.formatMessage({ id: `${Jo}link_${u}` }),
|
|
7175
7181
|
...v
|
|
7176
7182
|
}
|
|
7177
|
-
) },
|
|
7183
|
+
) }, u);
|
|
7178
7184
|
}) })
|
|
7179
7185
|
] });
|
|
7180
7186
|
};
|
|
7181
7187
|
const Bl = ({ tabs: t, className: e = "", preventLocationChange: n }) => {
|
|
7182
|
-
var
|
|
7183
|
-
const r = (
|
|
7184
|
-
let i = t.findIndex((
|
|
7188
|
+
var u;
|
|
7189
|
+
const r = (d, l, m) => (d || (d = `panel-${window.btoa(l)}-${m}`), d);
|
|
7190
|
+
let i = t.findIndex((d) => d.current === !0);
|
|
7185
7191
|
if (i < 0 && (i = 0), window.location.hash) {
|
|
7186
|
-
const
|
|
7187
|
-
if (t.find((m) => m.id ===
|
|
7192
|
+
const d = window.location.hash.replace("#", "");
|
|
7193
|
+
if (t.find((m) => m.id === d)) {
|
|
7188
7194
|
for (let m = 0; m < t.length; m++)
|
|
7189
|
-
if (r(t[m].id, t[m].text, m) ===
|
|
7195
|
+
if (r(t[m].id, t[m].text, m) === d) {
|
|
7190
7196
|
i = m;
|
|
7191
7197
|
break;
|
|
7192
7198
|
}
|
|
7193
7199
|
}
|
|
7194
7200
|
}
|
|
7195
7201
|
const [s, o] = te(
|
|
7196
|
-
(
|
|
7202
|
+
(u = t[i]) != null && u.id ? t[i].id : r(t[i].id, t[i].text, i)
|
|
7197
7203
|
);
|
|
7198
7204
|
ae(() => {
|
|
7199
7205
|
if (t[i].hasCarousel) {
|
|
7200
|
-
const
|
|
7206
|
+
const d = new CustomEvent("hiddenSectionVisible", {
|
|
7201
7207
|
detail: { id: s }
|
|
7202
7208
|
});
|
|
7203
|
-
window.dispatchEvent(
|
|
7209
|
+
window.dispatchEvent(d);
|
|
7204
7210
|
}
|
|
7205
7211
|
}, [s]);
|
|
7206
7212
|
const c = [], f = [];
|
|
7207
|
-
return t.forEach(({ id:
|
|
7208
|
-
|
|
7209
|
-
const _ = s ===
|
|
7210
|
-
p || (g["aria-controls"] =
|
|
7211
|
-
b.preventDefault(), b.stopPropagation(), o(
|
|
7213
|
+
return t.forEach(({ id: d, text: l, content: m, href: p, hasCarousel: v }, y) => {
|
|
7214
|
+
d = r(d, l, y);
|
|
7215
|
+
const _ = s === d, g = {};
|
|
7216
|
+
p || (g["aria-controls"] = d, g.onClick = (b) => {
|
|
7217
|
+
b.preventDefault(), b.stopPropagation(), o(d), !n && (window.location.hash = `#${d}`);
|
|
7212
7218
|
}, f.push(
|
|
7213
7219
|
/* @__PURE__ */ a.jsx(
|
|
7214
7220
|
"section",
|
|
7215
7221
|
{
|
|
7216
|
-
id:
|
|
7222
|
+
id: d,
|
|
7217
7223
|
hidden: !_,
|
|
7218
7224
|
role: "tabpanel",
|
|
7219
|
-
"aria-labelledby": `tab-${
|
|
7225
|
+
"aria-labelledby": `tab-${d}`,
|
|
7220
7226
|
"aria-live": _ ? "assertive" : "off",
|
|
7221
7227
|
children: typeof m == "string" ? /* @__PURE__ */ a.jsx("p", { children: m }) : m
|
|
7222
7228
|
},
|
|
7223
|
-
`section-${
|
|
7229
|
+
`section-${d}`
|
|
7224
7230
|
)
|
|
7225
7231
|
)), c.push(
|
|
7226
7232
|
/* @__PURE__ */ a.jsx("li", { "data-testid": "navigation-tab", children: /* @__PURE__ */ a.jsx(
|
|
7227
7233
|
"a",
|
|
7228
7234
|
{
|
|
7229
|
-
href: p || `#${
|
|
7230
|
-
id: `tab-${
|
|
7235
|
+
href: p || `#${d}`,
|
|
7236
|
+
id: `tab-${d}`,
|
|
7231
7237
|
className: C({ selected: _ }),
|
|
7232
7238
|
role: "tab",
|
|
7233
7239
|
"aria-selected": _,
|
|
7234
7240
|
...g,
|
|
7235
7241
|
children: l
|
|
7236
7242
|
}
|
|
7237
|
-
) }, `tab-${
|
|
7243
|
+
) }, `tab-${d}`)
|
|
7238
7244
|
);
|
|
7239
7245
|
}), /* @__PURE__ */ a.jsxs("div", { className: C("tabs-wrapper", e), children: [
|
|
7240
7246
|
/* @__PURE__ */ a.jsx("ul", { className: "tabs", role: "tablist", children: c }),
|
|
@@ -7305,26 +7311,26 @@ const En = "cookieBanner_", Sn = [
|
|
|
7305
7311
|
const t = G(), [e, n, r] = Qr(Sn), [i, s] = te(
|
|
7306
7312
|
!e["apol-cookie-banner"]
|
|
7307
7313
|
), o = () => {
|
|
7308
|
-
Sn.forEach((
|
|
7309
|
-
n(
|
|
7314
|
+
Sn.forEach((d) => {
|
|
7315
|
+
n(d, !0, {
|
|
7310
7316
|
path: "/",
|
|
7311
7317
|
expires: Cn,
|
|
7312
|
-
domain:
|
|
7318
|
+
domain: d === "apolitical-performance-cookie-consent" ? ".apolitical.co" : void 0
|
|
7313
7319
|
});
|
|
7314
7320
|
}), s(!1), window.location.reload();
|
|
7315
7321
|
}, c = () => {
|
|
7316
7322
|
n("apol-cookie-banner", !0, {
|
|
7317
7323
|
path: "/",
|
|
7318
7324
|
expires: Cn
|
|
7319
|
-
}), Sn.forEach((
|
|
7320
|
-
if (
|
|
7321
|
-
n(
|
|
7325
|
+
}), Sn.forEach((d) => {
|
|
7326
|
+
if (d === "apol-cookie-banner") {
|
|
7327
|
+
n(d, !0, {
|
|
7322
7328
|
path: "/",
|
|
7323
7329
|
expires: Cn
|
|
7324
7330
|
});
|
|
7325
7331
|
return;
|
|
7326
7332
|
}
|
|
7327
|
-
r(
|
|
7333
|
+
r(d);
|
|
7328
7334
|
}), s(!1);
|
|
7329
7335
|
};
|
|
7330
7336
|
if (!i)
|
|
@@ -7333,21 +7339,21 @@ const En = "cookieBanner_", Sn = [
|
|
|
7333
7339
|
{ id: "settings", href: "/pages/cookie-policy", gtmType: "policy-page" },
|
|
7334
7340
|
{ id: "reject", onClick: c, gtmType: "reject-all" },
|
|
7335
7341
|
{ id: "accept", onClick: o, gtmType: "accepted-all" }
|
|
7336
|
-
],
|
|
7337
|
-
return f.forEach((
|
|
7338
|
-
|
|
7339
|
-
variant:
|
|
7340
|
-
href:
|
|
7341
|
-
onClick:
|
|
7342
|
+
], u = [];
|
|
7343
|
+
return f.forEach((d) => {
|
|
7344
|
+
u.push({
|
|
7345
|
+
variant: d.href ? "tertiary" : "primary",
|
|
7346
|
+
href: d.href,
|
|
7347
|
+
onClick: d.onClick,
|
|
7342
7348
|
className: "gtm-trackable",
|
|
7343
7349
|
"data-gtm-event-context": "cookie-banner",
|
|
7344
|
-
"data-gtm-event-type": `cookie-${
|
|
7345
|
-
children: t.formatMessage({ id: `${En}buttons_${
|
|
7350
|
+
"data-gtm-event-type": `cookie-${d.gtmType}-click`,
|
|
7351
|
+
children: t.formatMessage({ id: `${En}buttons_${d.id}` })
|
|
7346
7352
|
});
|
|
7347
7353
|
}), /* @__PURE__ */ a.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
7348
7354
|
/* @__PURE__ */ a.jsx("h6", { children: t.formatMessage({ id: `${En}title` }) }),
|
|
7349
7355
|
/* @__PURE__ */ a.jsx("p", { children: t.formatMessage({ id: `${En}text` }) }),
|
|
7350
|
-
/* @__PURE__ */ a.jsx(_t, { buttons:
|
|
7356
|
+
/* @__PURE__ */ a.jsx(_t, { buttons: u })
|
|
7351
7357
|
] });
|
|
7352
7358
|
}, Me = {
|
|
7353
7359
|
platform: {
|
|
@@ -7642,7 +7648,7 @@ const Ye = "footer_", Vt = "SiteFooter", Lr = ({ group: t }) => {
|
|
|
7642
7648
|
order: ["explore", "topics"],
|
|
7643
7649
|
menuId: "navigation",
|
|
7644
7650
|
explore: {
|
|
7645
|
-
order: ["events", "courses", "articles"],
|
|
7651
|
+
order: ["events", "courses", "articles", "communities"],
|
|
7646
7652
|
events: { href: "/events/", className: "icon events" },
|
|
7647
7653
|
courses: {
|
|
7648
7654
|
href: "/microcourses/",
|
|
@@ -7653,6 +7659,11 @@ const Ye = "footer_", Vt = "SiteFooter", Lr = ({ group: t }) => {
|
|
|
7653
7659
|
href: "/solution-articles/",
|
|
7654
7660
|
gtmType: "articles-click",
|
|
7655
7661
|
className: "icon articles"
|
|
7662
|
+
},
|
|
7663
|
+
communities: {
|
|
7664
|
+
href: "/communities/",
|
|
7665
|
+
gtmType: "communities-click",
|
|
7666
|
+
className: "icon communities"
|
|
7656
7667
|
}
|
|
7657
7668
|
},
|
|
7658
7669
|
topics: {
|
|
@@ -7718,7 +7729,7 @@ const Ye = "footer_", Vt = "SiteFooter", Lr = ({ group: t }) => {
|
|
|
7718
7729
|
const o = G(), c = Jr(Yt, t);
|
|
7719
7730
|
if (!c || c.onlyShow && (c.onlyShow === "logged-in" && !e || c.onlyShow === "logged-out" && e))
|
|
7720
7731
|
return null;
|
|
7721
|
-
const f = "doTrack" in c,
|
|
7732
|
+
const f = "doTrack" in c, u = s === null ? f ? c.doTrack : !0 : s, d = t.includes("buttons.");
|
|
7722
7733
|
let l = `header_${t.replaceAll(".", "_")}`;
|
|
7723
7734
|
c.hasVariantText && (l += `_logged${e ? "In" : "Out"}`);
|
|
7724
7735
|
let m = !1;
|
|
@@ -7731,12 +7742,12 @@ const Ye = "footer_", Vt = "SiteFooter", Lr = ({ group: t }) => {
|
|
|
7731
7742
|
m = {
|
|
7732
7743
|
href: c.href,
|
|
7733
7744
|
role: "menuitem"
|
|
7734
|
-
},
|
|
7745
|
+
}, u && (m = {
|
|
7735
7746
|
...m,
|
|
7736
7747
|
className: "gtm-trackable",
|
|
7737
7748
|
"data-gtm-event-type": b,
|
|
7738
7749
|
"data-gtm-event-context": "HeaderButtons"
|
|
7739
|
-
}),
|
|
7750
|
+
}), d && (m = {
|
|
7740
7751
|
...m,
|
|
7741
7752
|
variant: "secondary",
|
|
7742
7753
|
size: { mobile: "small", 881: "large" },
|
|
@@ -7781,7 +7792,7 @@ const Ye = "footer_", Vt = "SiteFooter", Lr = ({ group: t }) => {
|
|
|
7781
7792
|
..._,
|
|
7782
7793
|
children: [
|
|
7783
7794
|
m ? K.createElement(
|
|
7784
|
-
|
|
7795
|
+
d ? ie : "a",
|
|
7785
7796
|
m,
|
|
7786
7797
|
o.formatMessage({ id: l })
|
|
7787
7798
|
) : o.formatMessage({ id: l }),
|
|
@@ -7793,7 +7804,7 @@ const Ye = "footer_", Vt = "SiteFooter", Lr = ({ group: t }) => {
|
|
|
7793
7804
|
isDesktopVersion: n,
|
|
7794
7805
|
menus: r,
|
|
7795
7806
|
callback: i,
|
|
7796
|
-
doTrack: f ?
|
|
7807
|
+
doTrack: f ? u : null
|
|
7797
7808
|
};
|
|
7798
7809
|
return c[b].order ? /* @__PURE__ */ a.jsxs(
|
|
7799
7810
|
"li",
|
|
@@ -7839,38 +7850,38 @@ const nc = { height: 67, height_desktop: 83 }, Da = ({ showNavigation: t = !0 })
|
|
|
7839
7850
|
navigation: { desktop: !1, default: !1 },
|
|
7840
7851
|
account: { desktop: !1, default: !1 }
|
|
7841
7852
|
}
|
|
7842
|
-
}), { headerIsVisible: f, menus:
|
|
7853
|
+
}), { headerIsVisible: f, menus: u, focusElements: d } = o;
|
|
7843
7854
|
Pi({
|
|
7844
7855
|
scrollPosition: nc[`height${s.navigation ? "_desktop" : ""}`],
|
|
7845
7856
|
callbacks: {
|
|
7846
7857
|
scrollUp: () => {
|
|
7847
|
-
!s &&
|
|
7858
|
+
!s && u.navigation || fe.shouldChangeHeaderIsVisible(!0, u, c);
|
|
7848
7859
|
},
|
|
7849
7860
|
scrollDown: () => {
|
|
7850
|
-
!s &&
|
|
7861
|
+
!s && u.navigation || fe.shouldChangeHeaderIsVisible(!1, u, c);
|
|
7851
7862
|
}
|
|
7852
7863
|
}
|
|
7853
7864
|
});
|
|
7854
7865
|
const l = (p, v) => {
|
|
7855
|
-
fe.handleMenus({ id: p, value: v, menus:
|
|
7866
|
+
fe.handleMenus({ id: p, value: v, menus: u, dispatch: c });
|
|
7856
7867
|
}, m = pe(null);
|
|
7857
7868
|
return vt(() => {
|
|
7858
|
-
|
|
7869
|
+
u.navigation && fe.autoFocus({
|
|
7859
7870
|
menu: "navigation",
|
|
7860
7871
|
navigationRef: m,
|
|
7861
7872
|
isDesktopVersion: s.navigation,
|
|
7862
|
-
focusElements:
|
|
7873
|
+
focusElements: d,
|
|
7863
7874
|
dispatch: c
|
|
7864
7875
|
});
|
|
7865
|
-
}, [
|
|
7866
|
-
|
|
7876
|
+
}, [u.navigation]), vt(() => {
|
|
7877
|
+
u.account && fe.autoFocus({
|
|
7867
7878
|
menu: "account",
|
|
7868
7879
|
navigationRef: m,
|
|
7869
7880
|
isDesktopVersion: s.navigation,
|
|
7870
|
-
focusElements:
|
|
7881
|
+
focusElements: d,
|
|
7871
7882
|
dispatch: c
|
|
7872
7883
|
});
|
|
7873
|
-
}, [
|
|
7884
|
+
}, [u.account]), n && n.isLoading ? null : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7874
7885
|
/* @__PURE__ */ a.jsxs(
|
|
7875
7886
|
"nav",
|
|
7876
7887
|
{
|
|
@@ -7896,15 +7907,15 @@ const nc = { height: 67, height_desktop: 83 }, Da = ({ showNavigation: t = !0 })
|
|
|
7896
7907
|
{
|
|
7897
7908
|
className: "menu-button gtm-trackable",
|
|
7898
7909
|
onClick: (p) => {
|
|
7899
|
-
p.preventDefault(), p.stopPropagation(), l("navigation", !
|
|
7910
|
+
p.preventDefault(), p.stopPropagation(), l("navigation", !u.navigation);
|
|
7900
7911
|
},
|
|
7901
7912
|
"data-gtm-event-type": "open-tab-menu-click",
|
|
7902
7913
|
"data-gtm-event-context": "HeaderLeft-Chevron",
|
|
7903
7914
|
"aria-haspopup": "true",
|
|
7904
|
-
"aria-expanded":
|
|
7915
|
+
"aria-expanded": u.navigation,
|
|
7905
7916
|
"aria-controls": "navigation",
|
|
7906
7917
|
children: /* @__PURE__ */ a.jsx(be, { children: e.formatMessage({
|
|
7907
|
-
id: `header_menu_${
|
|
7918
|
+
id: `header_menu_${u.navigation ? "hide" : "show"}`
|
|
7908
7919
|
}) })
|
|
7909
7920
|
}
|
|
7910
7921
|
),
|
|
@@ -7913,16 +7924,16 @@ const nc = { height: 67, height_desktop: 83 }, Da = ({ showNavigation: t = !0 })
|
|
|
7913
7924
|
{
|
|
7914
7925
|
ref: m,
|
|
7915
7926
|
id: "navigation",
|
|
7916
|
-
hidden: s.navigation ||
|
|
7927
|
+
hidden: s.navigation || u.account ? !1 : !u.navigation,
|
|
7917
7928
|
role: "menu",
|
|
7918
|
-
"data-showing": !s.navigation &&
|
|
7929
|
+
"data-showing": !s.navigation && u.account ? "account" : "default",
|
|
7919
7930
|
children: Yt.order.map((p) => /* @__PURE__ */ a.jsx(
|
|
7920
7931
|
Kt,
|
|
7921
7932
|
{
|
|
7922
7933
|
id: p,
|
|
7923
7934
|
isLoggedIn: i,
|
|
7924
7935
|
isDesktopVersion: s.navigation,
|
|
7925
|
-
menus: { navigation:
|
|
7936
|
+
menus: { navigation: u.navigation, account: u.account },
|
|
7926
7937
|
callback: l
|
|
7927
7938
|
},
|
|
7928
7939
|
p
|
|
@@ -7934,16 +7945,16 @@ const nc = { height: 67, height_desktop: 83 }, Da = ({ showNavigation: t = !0 })
|
|
|
7934
7945
|
{
|
|
7935
7946
|
className: "search toggle-search-button",
|
|
7936
7947
|
onClick: (p) => {
|
|
7937
|
-
p.preventDefault(), p.stopPropagation(), l("search", !
|
|
7948
|
+
p.preventDefault(), p.stopPropagation(), l("search", !u.search);
|
|
7938
7949
|
},
|
|
7939
7950
|
"aria-haspopup": "true",
|
|
7940
|
-
"aria-expanded":
|
|
7951
|
+
"aria-expanded": u.search,
|
|
7941
7952
|
"aria-controls": "search-form",
|
|
7942
7953
|
children: /* @__PURE__ */ a.jsx(
|
|
7943
7954
|
be,
|
|
7944
7955
|
{
|
|
7945
7956
|
children: e.formatMessage({
|
|
7946
|
-
id: `header_search_${
|
|
7957
|
+
id: `header_search_${u.search ? "hide" : "show"}`
|
|
7947
7958
|
})
|
|
7948
7959
|
}
|
|
7949
7960
|
)
|
|
@@ -7954,7 +7965,7 @@ const nc = { height: 67, height_desktop: 83 }, Da = ({ showNavigation: t = !0 })
|
|
|
7954
7965
|
{
|
|
7955
7966
|
id: "global-search",
|
|
7956
7967
|
handleToggle: {
|
|
7957
|
-
searchIsOpen:
|
|
7968
|
+
searchIsOpen: u.search,
|
|
7958
7969
|
isDesktopVersion: s.search
|
|
7959
7970
|
},
|
|
7960
7971
|
gtmContext: "search-bar-header",
|
|
@@ -7968,16 +7979,16 @@ const nc = { height: 67, height_desktop: 83 }, Da = ({ showNavigation: t = !0 })
|
|
|
7968
7979
|
onClick: (p) => fe.events.onClick(p, {
|
|
7969
7980
|
id: "account",
|
|
7970
7981
|
callback: l,
|
|
7971
|
-
isOpen:
|
|
7982
|
+
isOpen: u.account
|
|
7972
7983
|
}),
|
|
7973
7984
|
onMouseEnter: () => fe.events.onMouseEnter({ id: "account", callback: l }),
|
|
7974
7985
|
onMouseLeave: () => fe.events.onBlur({ id: "account", callback: l }),
|
|
7975
7986
|
"aria-haspopup": "true",
|
|
7976
|
-
"aria-expanded":
|
|
7987
|
+
"aria-expanded": u.account,
|
|
7977
7988
|
"aria-controls": "navigation",
|
|
7978
7989
|
children: [
|
|
7979
7990
|
/* @__PURE__ */ a.jsx(be, { children: e.formatMessage({
|
|
7980
|
-
id: `header_account_${
|
|
7991
|
+
id: `header_account_${u.account ? "hide" : "show"}`
|
|
7981
7992
|
}) }),
|
|
7982
7993
|
/* @__PURE__ */ a.jsx(
|
|
7983
7994
|
ze,
|
|
@@ -7998,7 +8009,7 @@ const nc = { height: 67, height_desktop: 83 }, Da = ({ showNavigation: t = !0 })
|
|
|
7998
8009
|
"div",
|
|
7999
8010
|
{
|
|
8000
8011
|
className: C("overlay", {
|
|
8001
|
-
open:
|
|
8012
|
+
open: u.navigation || u.account || !s.search && u.search
|
|
8002
8013
|
})
|
|
8003
8014
|
}
|
|
8004
8015
|
)
|
|
@@ -8026,7 +8037,7 @@ const rc = () => {
|
|
|
8026
8037
|
className: o = "",
|
|
8027
8038
|
locale: c = "en"
|
|
8028
8039
|
}) => {
|
|
8029
|
-
const { navigation: f = !0, footer:
|
|
8040
|
+
const { navigation: f = !0, footer: u = !0 } = i, { background: d = "default", variant: l = "default", circle: m = "default" } = s, p = $i();
|
|
8030
8041
|
ae(() => {
|
|
8031
8042
|
window.scrollTo(0, 0);
|
|
8032
8043
|
}, [p]);
|
|
@@ -8035,22 +8046,22 @@ const rc = () => {
|
|
|
8035
8046
|
}), _ = Dt(n, {
|
|
8036
8047
|
locale: c
|
|
8037
8048
|
}), g = {};
|
|
8038
|
-
return
|
|
8049
|
+
return d !== "default" && (g[d] = !0), l !== "default" && (g[l] = !0), m !== "default" && (g[m] = !0), /* @__PURE__ */ a.jsx(xi, { onError: r, fallback: /* @__PURE__ */ a.jsx(rc, {}), children: /* @__PURE__ */ a.jsx(di, { fallback: null, children: /* @__PURE__ */ a.jsxs(
|
|
8039
8050
|
"div",
|
|
8040
8051
|
{
|
|
8041
8052
|
id: "wrapper",
|
|
8042
|
-
className: C(o, g, { "has-footer":
|
|
8053
|
+
className: C(o, g, { "has-footer": u }),
|
|
8043
8054
|
children: [
|
|
8044
8055
|
/* @__PURE__ */ a.jsx(Da, { showNavigation: f }),
|
|
8045
8056
|
/* @__PURE__ */ a.jsxs("section", { id: "content-wrapper", children: [
|
|
8046
8057
|
y && /* @__PURE__ */ a.jsx("div", { className: "additional-content prepended", children: y }),
|
|
8047
|
-
K.createElement(
|
|
8058
|
+
K.createElement(d === "bold" ? Sa : "div", {
|
|
8048
8059
|
id: "content",
|
|
8049
8060
|
children: v
|
|
8050
8061
|
})
|
|
8051
8062
|
] }),
|
|
8052
8063
|
_ && /* @__PURE__ */ a.jsx("div", { className: "additional-content appended", children: _ }),
|
|
8053
|
-
|
|
8064
|
+
u && /* @__PURE__ */ a.jsx(Oa, {}),
|
|
8054
8065
|
/* @__PURE__ */ a.jsx(tc, {})
|
|
8055
8066
|
]
|
|
8056
8067
|
}
|
|
@@ -8099,29 +8110,29 @@ const zl = ({
|
|
|
8099
8110
|
if (!t || t.length < 1)
|
|
8100
8111
|
return null;
|
|
8101
8112
|
const f = [];
|
|
8102
|
-
return t.forEach((
|
|
8103
|
-
if (!
|
|
8113
|
+
return t.forEach((u) => {
|
|
8114
|
+
if (!u)
|
|
8104
8115
|
return;
|
|
8105
|
-
const
|
|
8106
|
-
|
|
8116
|
+
const d = ic.getTagDetails(u);
|
|
8117
|
+
d && f.push(d);
|
|
8107
8118
|
}), f.length < 1 ? null : /* @__PURE__ */ a.jsx(
|
|
8108
8119
|
"ul",
|
|
8109
8120
|
{
|
|
8110
8121
|
className: C("tags text-small", e, i, {
|
|
8111
8122
|
"one-line": n
|
|
8112
8123
|
}),
|
|
8113
|
-
children: f.map((
|
|
8114
|
-
const
|
|
8115
|
-
return /* @__PURE__ */ a.jsx("li", { children:
|
|
8124
|
+
children: f.map((u) => {
|
|
8125
|
+
const d = c.formatMessage({ id: u.text });
|
|
8126
|
+
return /* @__PURE__ */ a.jsx("li", { children: u.href && r ? /* @__PURE__ */ a.jsx(
|
|
8116
8127
|
"a",
|
|
8117
8128
|
{
|
|
8118
|
-
href:
|
|
8129
|
+
href: u.href,
|
|
8119
8130
|
className: "gtm-trackable",
|
|
8120
8131
|
"data-gtm-event-type": s,
|
|
8121
8132
|
"data-gtm-event-context": o,
|
|
8122
|
-
children:
|
|
8133
|
+
children: d
|
|
8123
8134
|
}
|
|
8124
|
-
) :
|
|
8135
|
+
) : d }, u.id);
|
|
8125
8136
|
})
|
|
8126
8137
|
}
|
|
8127
8138
|
);
|
|
@@ -8141,10 +8152,10 @@ const Zl = ({
|
|
|
8141
8152
|
c.formatMessage({ id: "membersList" }),
|
|
8142
8153
|
/* @__PURE__ */ a.jsx("span", { className: "count", children: e })
|
|
8143
8154
|
] }),
|
|
8144
|
-
/* @__PURE__ */ a.jsx("ul", { children: t.map((f,
|
|
8155
|
+
/* @__PURE__ */ a.jsx("ul", { children: t.map((f, u) => /* @__PURE__ */ a.jsxs("li", { children: [
|
|
8145
8156
|
/* @__PURE__ */ a.jsx(Yn, { member: f, gtmContext: i, gtmType: s }),
|
|
8146
8157
|
f.isAdmin && /* @__PURE__ */ a.jsx(ft, { children: c.formatMessage({ id: "membersList_admin" }) })
|
|
8147
|
-
] },
|
|
8158
|
+
] }, u)) }),
|
|
8148
8159
|
n && /* @__PURE__ */ a.jsx(
|
|
8149
8160
|
en,
|
|
8150
8161
|
{
|
|
@@ -8188,10 +8199,10 @@ const we = "discussion_form_", Jn = ({
|
|
|
8188
8199
|
create: { projectNames: ["questions-answers"] }
|
|
8189
8200
|
}
|
|
8190
8201
|
},
|
|
8191
|
-
gtmContext:
|
|
8202
|
+
gtmContext: u = "DiscussionForm"
|
|
8192
8203
|
}) => {
|
|
8193
8204
|
var O, S, T;
|
|
8194
|
-
const
|
|
8205
|
+
const d = G(), l = Ce(Oe), [m, p] = te(
|
|
8195
8206
|
n.isEditing && n.isEditing.text || ""
|
|
8196
8207
|
), [v, y] = te(c.error || !1), [_, g] = te(!1), b = pe(null);
|
|
8197
8208
|
if (r || (r = b), n.isLoading)
|
|
@@ -8207,12 +8218,12 @@ const we = "discussion_form_", Jn = ({
|
|
|
8207
8218
|
p($);
|
|
8208
8219
|
let I;
|
|
8209
8220
|
!l || !l.id ? I = Se(
|
|
8210
|
-
|
|
8221
|
+
d.formatMessage,
|
|
8211
8222
|
`${we}error_loggedOut`,
|
|
8212
8223
|
t.type,
|
|
8213
8224
|
"action"
|
|
8214
8225
|
) : e ? $.length >= s && (I = `${we}error_tooLong`) : I = Se(
|
|
8215
|
-
|
|
8226
|
+
d.formatMessage,
|
|
8216
8227
|
`${we}error_noPermission`,
|
|
8217
8228
|
t.type,
|
|
8218
8229
|
"action"
|
|
@@ -8266,12 +8277,12 @@ const we = "discussion_form_", Jn = ({
|
|
|
8266
8277
|
const A = q;
|
|
8267
8278
|
let Z = `${we}error`;
|
|
8268
8279
|
A != null && A.message.includes("entry already exists") && (Z = Se(
|
|
8269
|
-
|
|
8280
|
+
d.formatMessage,
|
|
8270
8281
|
`${we}error_alreadyExists`,
|
|
8271
8282
|
t.type,
|
|
8272
8283
|
"action"
|
|
8273
8284
|
)), A != null && A.message.includes("429") ? Z = Se(
|
|
8274
|
-
|
|
8285
|
+
d.formatMessage,
|
|
8275
8286
|
`${we}error_tooMany`,
|
|
8276
8287
|
t.type,
|
|
8277
8288
|
"action"
|
|
@@ -8287,10 +8298,10 @@ const we = "discussion_form_", Jn = ({
|
|
|
8287
8298
|
size: { mobile: "small", 600: "medium" },
|
|
8288
8299
|
onClick: f.handleCancel,
|
|
8289
8300
|
className: "gtm-trackable",
|
|
8290
|
-
"data-gtm-event-context":
|
|
8301
|
+
"data-gtm-event-context": u,
|
|
8291
8302
|
"data-gtm-event-type": `cancel-${t.type}-click`,
|
|
8292
8303
|
disabled: !c.cancel && (!l || !l.id || !m),
|
|
8293
|
-
children:
|
|
8304
|
+
children: d.formatMessage({ id: `${we}cancel` })
|
|
8294
8305
|
}), M.push({
|
|
8295
8306
|
variant: "primary",
|
|
8296
8307
|
size: { mobile: "small", 600: "medium" },
|
|
@@ -8304,11 +8315,11 @@ const we = "discussion_form_", Jn = ({
|
|
|
8304
8315
|
w(x);
|
|
8305
8316
|
},
|
|
8306
8317
|
className: "gtm-trackable",
|
|
8307
|
-
"data-gtm-event-context":
|
|
8318
|
+
"data-gtm-event-context": u,
|
|
8308
8319
|
"data-gtm-event-type": `${n.isEditing ? "save" : "submit"}-${t.type}-click`,
|
|
8309
8320
|
"data-testid": "save-button",
|
|
8310
8321
|
disabled: !l || !l.id || !e || F || H || n.isEditing && m === n.isEditing.text,
|
|
8311
|
-
children:
|
|
8322
|
+
children: d.formatMessage({
|
|
8312
8323
|
id: `${we}${H ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}`
|
|
8313
8324
|
})
|
|
8314
8325
|
}), /* @__PURE__ */ a.jsxs(
|
|
@@ -8320,16 +8331,16 @@ const we = "discussion_form_", Jn = ({
|
|
|
8320
8331
|
}),
|
|
8321
8332
|
"data-testid": `discussion-${t.type}-form`,
|
|
8322
8333
|
children: [
|
|
8323
|
-
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(t.type) && /* @__PURE__ */ a.jsx("h2", { children: Se(
|
|
8334
|
+
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(t.type) && /* @__PURE__ */ a.jsx("h2", { children: Se(d.formatMessage, `${we}title`, t.type, "action") }),
|
|
8324
8335
|
/* @__PURE__ */ a.jsx(
|
|
8325
8336
|
Yn,
|
|
8326
8337
|
{
|
|
8327
8338
|
member: l || "community",
|
|
8328
|
-
gtmContext:
|
|
8339
|
+
gtmContext: u,
|
|
8329
8340
|
gtmType: "profile-click"
|
|
8330
8341
|
}
|
|
8331
8342
|
),
|
|
8332
|
-
/* @__PURE__ */ a.jsx(be, { element: "label", showOnFocus: !1, htmlFor: `${j}-input`, children: Se(
|
|
8343
|
+
/* @__PURE__ */ a.jsx(be, { element: "label", showOnFocus: !1, htmlFor: `${j}-input`, children: Se(d.formatMessage, `${we}label`, t.type, "action") }),
|
|
8333
8344
|
/* @__PURE__ */ a.jsx(
|
|
8334
8345
|
wi,
|
|
8335
8346
|
{
|
|
@@ -8337,7 +8348,7 @@ const we = "discussion_form_", Jn = ({
|
|
|
8337
8348
|
id: `${j}-input`,
|
|
8338
8349
|
name: t.type,
|
|
8339
8350
|
placeholder: i || Se(
|
|
8340
|
-
|
|
8351
|
+
d.formatMessage,
|
|
8341
8352
|
`${we}placeholder`,
|
|
8342
8353
|
t.type,
|
|
8343
8354
|
"action"
|
|
@@ -8351,14 +8362,14 @@ const we = "discussion_form_", Jn = ({
|
|
|
8351
8362
|
autoFocus: !!n.isEditing
|
|
8352
8363
|
}
|
|
8353
8364
|
),
|
|
8354
|
-
/* @__PURE__ */ a.jsx("small", { children: Se(
|
|
8365
|
+
/* @__PURE__ */ a.jsx("small", { children: Se(d.formatMessage, `${we}explainer`, t.type, "action", {
|
|
8355
8366
|
a: (x) => /* @__PURE__ */ a.jsx(
|
|
8356
8367
|
"a",
|
|
8357
8368
|
{
|
|
8358
8369
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
8359
8370
|
target: "_blank",
|
|
8360
8371
|
className: "gtm-trackable",
|
|
8361
|
-
"data-gtm-event-context":
|
|
8372
|
+
"data-gtm-event-context": u,
|
|
8362
8373
|
"data-gtm-event-type": "community-guidelines-link",
|
|
8363
8374
|
rel: "noreferrer",
|
|
8364
8375
|
children: x
|
|
@@ -8366,11 +8377,11 @@ const we = "discussion_form_", Jn = ({
|
|
|
8366
8377
|
)
|
|
8367
8378
|
}) }),
|
|
8368
8379
|
/* @__PURE__ */ a.jsx(_t, { buttons: M }),
|
|
8369
|
-
_ === "submitted" && n.showSuccessMessage && /* @__PURE__ */ a.jsx(Bt, { className: "success", "data-testid": "success", children: Se(
|
|
8370
|
-
v && /* @__PURE__ */ a.jsx(Bt, { id: "error-message", className: "error", "data-testid": "error", children: c.error ? c.error : typeof v == "string" ? v.includes(" ") ? v :
|
|
8380
|
+
_ === "submitted" && n.showSuccessMessage && /* @__PURE__ */ a.jsx(Bt, { className: "success", "data-testid": "success", children: Se(d.formatMessage, `${we}success`, t.type, "action") }),
|
|
8381
|
+
v && /* @__PURE__ */ a.jsx(Bt, { id: "error-message", className: "error", "data-testid": "error", children: c.error ? c.error : typeof v == "string" ? v.includes(" ") ? v : d.formatMessage(
|
|
8371
8382
|
{ id: v },
|
|
8372
8383
|
{
|
|
8373
|
-
action:
|
|
8384
|
+
action: d.formatMessage({
|
|
8374
8385
|
id: `discussion_action_${t.type}`
|
|
8375
8386
|
}),
|
|
8376
8387
|
maxLength: s
|
|
@@ -8394,7 +8405,7 @@ const we = "discussion_form_", Jn = ({
|
|
|
8394
8405
|
}
|
|
8395
8406
|
}
|
|
8396
8407
|
);
|
|
8397
|
-
const { content: o, functions: c, meta: f, ...
|
|
8408
|
+
const { content: o, functions: c, meta: f, ...u } = t;
|
|
8398
8409
|
return /* @__PURE__ */ a.jsx(
|
|
8399
8410
|
Jn,
|
|
8400
8411
|
{
|
|
@@ -8402,7 +8413,7 @@ const we = "discussion_form_", Jn = ({
|
|
|
8402
8413
|
functions: { ...c, create: (c == null ? void 0 : c.create) || (() => {
|
|
8403
8414
|
}) },
|
|
8404
8415
|
meta: { ...f, isEditing: (f == null ? void 0 : f.isEditing) || !1, showSuccessMessage: !1 },
|
|
8405
|
-
...
|
|
8416
|
+
...u
|
|
8406
8417
|
}
|
|
8407
8418
|
);
|
|
8408
8419
|
}, sc = {
|
|
@@ -8424,7 +8435,7 @@ const we = "discussion_form_", Jn = ({
|
|
|
8424
8435
|
let ht = !1;
|
|
8425
8436
|
const Nn = () => {
|
|
8426
8437
|
ht !== !1 && (clearTimeout(ht), ht = !1);
|
|
8427
|
-
}, Pn = 5,
|
|
8438
|
+
}, Pn = 5, uc = ({
|
|
8428
8439
|
element: t = "div",
|
|
8429
8440
|
likes: e = 0,
|
|
8430
8441
|
peopleWhoLiked: n = !1,
|
|
@@ -8436,11 +8447,11 @@ const Nn = () => {
|
|
|
8436
8447
|
}, deleteLike: f = () => {
|
|
8437
8448
|
} } = {}
|
|
8438
8449
|
}) => {
|
|
8439
|
-
const
|
|
8450
|
+
const u = G();
|
|
8440
8451
|
ae(() => {
|
|
8441
8452
|
p(i);
|
|
8442
8453
|
}, [i]);
|
|
8443
|
-
const [
|
|
8454
|
+
const [d, l] = te(e), [m, p] = te(i), [v, y] = te(!1), [_, g] = te(!1), b = bt(
|
|
8444
8455
|
() => lc(n, Pn),
|
|
8445
8456
|
[n]
|
|
8446
8457
|
), E = (w) => {
|
|
@@ -8452,7 +8463,7 @@ const Nn = () => {
|
|
|
8452
8463
|
}, j = async () => {
|
|
8453
8464
|
if (Nn(), v || !o)
|
|
8454
8465
|
return !1;
|
|
8455
|
-
let w = m ?
|
|
8466
|
+
let w = m ? d - 1 : d + 1;
|
|
8456
8467
|
w < 0 && (w = 0), y(!0), l(w), p(!m);
|
|
8457
8468
|
try {
|
|
8458
8469
|
if (s && s.slugs) {
|
|
@@ -8495,12 +8506,12 @@ const Nn = () => {
|
|
|
8495
8506
|
size: "medium",
|
|
8496
8507
|
icon: { icon: m ? "heart" : "heart_empty", animate: "bounce" },
|
|
8497
8508
|
className: C({ "do-animation": m && !i }),
|
|
8498
|
-
screenreaderText: o ?
|
|
8509
|
+
screenreaderText: o ? u.formatMessage(
|
|
8499
8510
|
{
|
|
8500
8511
|
id: `discussion_likes_${m ? "unlike" : "like"}`
|
|
8501
8512
|
},
|
|
8502
8513
|
{
|
|
8503
|
-
action:
|
|
8514
|
+
action: u.formatMessage({
|
|
8504
8515
|
id: `discussion_action_${s.type}`
|
|
8505
8516
|
})
|
|
8506
8517
|
}
|
|
@@ -8516,11 +8527,11 @@ const Nn = () => {
|
|
|
8516
8527
|
/* @__PURE__ */ a.jsx(
|
|
8517
8528
|
"span",
|
|
8518
8529
|
{
|
|
8519
|
-
className: C("number-of-likes", { "no-likes":
|
|
8530
|
+
className: C("number-of-likes", { "no-likes": d === 0 }),
|
|
8520
8531
|
"data-testid": "number-of-likes",
|
|
8521
|
-
children:
|
|
8532
|
+
children: u.formatMessage(
|
|
8522
8533
|
{ id: `discussion_likes${r ? "_short" : ""}` },
|
|
8523
|
-
{ number:
|
|
8534
|
+
{ number: d }
|
|
8524
8535
|
)
|
|
8525
8536
|
}
|
|
8526
8537
|
),
|
|
@@ -8535,7 +8546,7 @@ const Nn = () => {
|
|
|
8535
8546
|
children: w.name
|
|
8536
8547
|
}
|
|
8537
8548
|
) }, w.id || window.btoa(w.name))),
|
|
8538
|
-
e > Pn && /* @__PURE__ */ a.jsx("li", { children:
|
|
8549
|
+
e > Pn && /* @__PURE__ */ a.jsx("li", { children: u.formatMessage(
|
|
8539
8550
|
{ id: "discussion_likes_more" },
|
|
8540
8551
|
{ number: e - Pn }
|
|
8541
8552
|
) })
|
|
@@ -8546,7 +8557,7 @@ const Nn = () => {
|
|
|
8546
8557
|
const e = {};
|
|
8547
8558
|
return Object.keys(t).forEach((n) => n.includes("Id") ? e[n] = t[n] : e[`${n}Slug`] = t[n]), e;
|
|
8548
8559
|
}, tn = (t, e) => t && !e;
|
|
8549
|
-
const Pe = "discussion_",
|
|
8560
|
+
const Pe = "discussion_", dc = 280, nn = ({
|
|
8550
8561
|
element: t = "div",
|
|
8551
8562
|
content: e,
|
|
8552
8563
|
userHasPermissions: n = !0,
|
|
@@ -8565,7 +8576,7 @@ const Pe = "discussion_", uc = 280, nn = ({
|
|
|
8565
8576
|
updateContent: async () => {
|
|
8566
8577
|
}
|
|
8567
8578
|
},
|
|
8568
|
-
likes: { createLike:
|
|
8579
|
+
likes: { createLike: u, deleteLike: d } = { createLike: () => {
|
|
8569
8580
|
}, deleteLike: () => {
|
|
8570
8581
|
} },
|
|
8571
8582
|
comments: { openComments: l } = { openComments: () => {
|
|
@@ -8610,7 +8621,7 @@ const Pe = "discussion_", uc = 280, nn = ({
|
|
|
8610
8621
|
};
|
|
8611
8622
|
if (r || !e || e.type === "answer" && (!e.slugs || !e.slugs.question))
|
|
8612
8623
|
return /* @__PURE__ */ a.jsx(Te, { className: "discussion-card discussion-post" });
|
|
8613
|
-
const ee = _ ? Ke(I.body,
|
|
8624
|
+
const ee = _ ? Ke(I.body, dc) : I.body, Y = async (R) => {
|
|
8614
8625
|
R || (R = ""), z("");
|
|
8615
8626
|
try {
|
|
8616
8627
|
if (!ki(R, I.body)) {
|
|
@@ -8741,7 +8752,7 @@ const Pe = "discussion_", uc = 280, nn = ({
|
|
|
8741
8752
|
className: "gtm-trackable",
|
|
8742
8753
|
"data-gtm-event-context": v,
|
|
8743
8754
|
"data-gtm-event-type": "title-click",
|
|
8744
|
-
children: /* @__PURE__ */ a.jsx(Lt, { options: { overrides: { a:
|
|
8755
|
+
children: /* @__PURE__ */ a.jsx(Lt, { options: { overrides: { a: ds } }, children: ee })
|
|
8745
8756
|
}
|
|
8746
8757
|
) : /* @__PURE__ */ a.jsx(
|
|
8747
8758
|
Lt,
|
|
@@ -8762,7 +8773,7 @@ const Pe = "discussion_", uc = 280, nn = ({
|
|
|
8762
8773
|
"data-testid": `${e.type}-actions`,
|
|
8763
8774
|
children: [
|
|
8764
8775
|
!s.likes && /* @__PURE__ */ a.jsx(
|
|
8765
|
-
|
|
8776
|
+
uc,
|
|
8766
8777
|
{
|
|
8767
8778
|
element: "li",
|
|
8768
8779
|
likes: H,
|
|
@@ -8772,8 +8783,8 @@ const Pe = "discussion_", uc = 280, nn = ({
|
|
|
8772
8783
|
canLike: T,
|
|
8773
8784
|
peopleWhoLiked: e.peopleWhoLiked,
|
|
8774
8785
|
functions: {
|
|
8775
|
-
createLike:
|
|
8776
|
-
deleteLike:
|
|
8786
|
+
createLike: u,
|
|
8787
|
+
deleteLike: d
|
|
8777
8788
|
}
|
|
8778
8789
|
}
|
|
8779
8790
|
),
|
|
@@ -9271,14 +9282,14 @@ function jc({
|
|
|
9271
9282
|
const { mutate: o } = ke({
|
|
9272
9283
|
mutationFn: t,
|
|
9273
9284
|
onMutate: (c) => e((f) => {
|
|
9274
|
-
const
|
|
9275
|
-
return Hr(
|
|
9285
|
+
const u = Ur({ activity: bc(c), user: s });
|
|
9286
|
+
return Hr(u, f);
|
|
9276
9287
|
}),
|
|
9277
9288
|
onError: n,
|
|
9278
|
-
onSuccess: (c, f,
|
|
9279
|
-
const
|
|
9280
|
-
r.setQueryData(i, Hr(
|
|
9281
|
-
qa(
|
|
9289
|
+
onSuccess: (c, f, u) => {
|
|
9290
|
+
const d = Ur({ activity: c, user: s });
|
|
9291
|
+
r.setQueryData(i, Hr(d, u, !0)), setTimeout(() => {
|
|
9292
|
+
qa(d.id);
|
|
9282
9293
|
}, 0);
|
|
9283
9294
|
}
|
|
9284
9295
|
});
|
|
@@ -9312,14 +9323,14 @@ function Ec({
|
|
|
9312
9323
|
},
|
|
9313
9324
|
queryKey: o
|
|
9314
9325
|
}) {
|
|
9315
|
-
const c = Zn(), f = Vn(),
|
|
9326
|
+
const c = Zn(), f = Vn(), u = { queryClient: c, queryKey: o }, d = {
|
|
9316
9327
|
mutationHandlers: {
|
|
9317
|
-
error: er(
|
|
9318
|
-
mutate: tr(
|
|
9328
|
+
error: er(u),
|
|
9329
|
+
mutate: tr(u)
|
|
9319
9330
|
},
|
|
9320
9331
|
user: f,
|
|
9321
|
-
...
|
|
9322
|
-
}, l = jc({ ...
|
|
9332
|
+
...u
|
|
9333
|
+
}, l = jc({ ...d, mutationFn: t }), m = Tc({ ...d, mutationFn: e }), p = Sc({ ...d, mutationFn: n }), v = $c({ ...d, mutationFn: i }), y = Nc({ ...d, mutationFn: s }), { activities: _, ...g } = Cc({ queryKey: o, queryFn: r });
|
|
9323
9334
|
return {
|
|
9324
9335
|
activities: _,
|
|
9325
9336
|
mutations: {
|
|
@@ -9350,8 +9361,8 @@ function Sc({
|
|
|
9350
9361
|
}),
|
|
9351
9362
|
onError: n,
|
|
9352
9363
|
onSuccess: (o, { activityId: c }, f) => {
|
|
9353
|
-
const
|
|
9354
|
-
|
|
9364
|
+
const u = Qt(c, f);
|
|
9365
|
+
u && Gt({ activity: u, reaction: o }), r.setQueryData(i, f);
|
|
9355
9366
|
}
|
|
9356
9367
|
});
|
|
9357
9368
|
return s;
|
|
@@ -9449,8 +9460,8 @@ const Wl = ({
|
|
|
9449
9460
|
const o = G(), {
|
|
9450
9461
|
activities: c,
|
|
9451
9462
|
error: f,
|
|
9452
|
-
fetchNextPage:
|
|
9453
|
-
hasNextPage:
|
|
9463
|
+
fetchNextPage: u,
|
|
9464
|
+
hasNextPage: d,
|
|
9454
9465
|
isLoading: l,
|
|
9455
9466
|
mutations: { create: m, edit: p, remove: v, like: y, unlike: _ },
|
|
9456
9467
|
user: g
|
|
@@ -9550,8 +9561,8 @@ const Wl = ({
|
|
|
9550
9561
|
!l && /* @__PURE__ */ a.jsx(
|
|
9551
9562
|
en,
|
|
9552
9563
|
{
|
|
9553
|
-
hasNextPage:
|
|
9554
|
-
loadNextPage: () =>
|
|
9564
|
+
hasNextPage: d,
|
|
9565
|
+
loadNextPage: () => u(),
|
|
9555
9566
|
icon: { icon: "arrow-down", position: "right" },
|
|
9556
9567
|
messages: {
|
|
9557
9568
|
button: o.formatMessage({ id: "loadMore_button" }),
|
|
@@ -10122,20 +10133,20 @@ function Rc({
|
|
|
10122
10133
|
const { mutate: o } = ke({
|
|
10123
10134
|
mutationFn: t,
|
|
10124
10135
|
onMutate: (c) => e((f) => {
|
|
10125
|
-
const
|
|
10126
|
-
return Vr(
|
|
10136
|
+
const u = zr({ reply: yc(c), user: s });
|
|
10137
|
+
return Vr(u, f, {
|
|
10127
10138
|
replace: !1,
|
|
10128
10139
|
append: (c == null ? void 0 : c.replyId) !== void 0
|
|
10129
10140
|
});
|
|
10130
10141
|
}),
|
|
10131
10142
|
onError: n,
|
|
10132
|
-
onSuccess: (c, f,
|
|
10133
|
-
const
|
|
10143
|
+
onSuccess: (c, f, u) => {
|
|
10144
|
+
const d = zr({ reply: c, user: s });
|
|
10134
10145
|
r.setQueryData(
|
|
10135
10146
|
i,
|
|
10136
|
-
Vr(
|
|
10147
|
+
Vr(d, u, { replace: !0, append: (f == null ? void 0 : f.replyId) !== void 0 })
|
|
10137
10148
|
), setTimeout(() => {
|
|
10138
|
-
qa(
|
|
10149
|
+
qa(d.id);
|
|
10139
10150
|
}, 0);
|
|
10140
10151
|
}
|
|
10141
10152
|
});
|
|
@@ -10169,14 +10180,14 @@ function Za({
|
|
|
10169
10180
|
},
|
|
10170
10181
|
queryKey: o
|
|
10171
10182
|
}) {
|
|
10172
|
-
const c = Zn(), f = Vn(),
|
|
10183
|
+
const c = Zn(), f = Vn(), u = { queryClient: c, queryKey: o }, d = {
|
|
10173
10184
|
mutationHandlers: {
|
|
10174
|
-
error: er(
|
|
10175
|
-
mutate: tr(
|
|
10185
|
+
error: er(u),
|
|
10186
|
+
mutate: tr(u)
|
|
10176
10187
|
},
|
|
10177
10188
|
user: f,
|
|
10178
|
-
...
|
|
10179
|
-
}, l = Rc({ ...
|
|
10189
|
+
...u
|
|
10190
|
+
}, l = Rc({ ...d, mutationFn: t }), m = Fc({ ...d, mutationFn: e }), p = Oc({ ...d, mutationFn: n }), v = Ac({ ...d, mutationFn: i }), y = Ic({ ...d, mutationFn: s }), { replies: _, ...g } = Dc({ queryKey: o, queryFn: r });
|
|
10180
10191
|
return {
|
|
10181
10192
|
replies: _,
|
|
10182
10193
|
mutations: {
|
|
@@ -10207,8 +10218,8 @@ function Oc({
|
|
|
10207
10218
|
}),
|
|
10208
10219
|
onError: n,
|
|
10209
10220
|
onSuccess: (o, { replyId: c }, f) => {
|
|
10210
|
-
const
|
|
10211
|
-
|
|
10221
|
+
const u = Jt(c, f);
|
|
10222
|
+
u && Zr({ reply: u, reaction: o }), r.setQueryData(i, f);
|
|
10212
10223
|
}
|
|
10213
10224
|
});
|
|
10214
10225
|
return s;
|
|
@@ -10224,7 +10235,7 @@ function Dc({ queryFn: t, queryKey: e }) {
|
|
|
10224
10235
|
queryKey: e,
|
|
10225
10236
|
queryFn: t,
|
|
10226
10237
|
initialPageParam: { next: "" },
|
|
10227
|
-
getNextPageParam: (
|
|
10238
|
+
getNextPageParam: (u) => (u == null ? void 0 : u.next) || null
|
|
10228
10239
|
}), c = zc(n), f = `${c.length || 0}${s ? "+" : ""}`;
|
|
10229
10240
|
return {
|
|
10230
10241
|
replies: c,
|
|
@@ -10320,8 +10331,8 @@ const Zc = ({
|
|
|
10320
10331
|
replies: o,
|
|
10321
10332
|
fetchNextPage: c,
|
|
10322
10333
|
hasNextPage: f,
|
|
10323
|
-
isLoading:
|
|
10324
|
-
mutations: { create:
|
|
10334
|
+
isLoading: u,
|
|
10335
|
+
mutations: { create: d, edit: l, like: m, remove: p, unlike: v },
|
|
10325
10336
|
user: y
|
|
10326
10337
|
} = Za({
|
|
10327
10338
|
queryKey: [t, e, n, r, "replies"],
|
|
@@ -10334,7 +10345,7 @@ const Zc = ({
|
|
|
10334
10345
|
return /* @__PURE__ */ a.jsx(
|
|
10335
10346
|
mc,
|
|
10336
10347
|
{
|
|
10337
|
-
loadMore: { isLoading:
|
|
10348
|
+
loadMore: { isLoading: u, hasNextPage: f, loadNextPage: () => c() },
|
|
10338
10349
|
form: {
|
|
10339
10350
|
content: {
|
|
10340
10351
|
type: "reply",
|
|
@@ -10346,7 +10357,7 @@ const Zc = ({
|
|
|
10346
10357
|
},
|
|
10347
10358
|
functions: {
|
|
10348
10359
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10349
|
-
create: (_, { body: g }) =>
|
|
10360
|
+
create: (_, { body: g }) => d({ activityId: n, replyId: r, content: g })
|
|
10350
10361
|
},
|
|
10351
10362
|
meta: { isEditing: !1, showSuccessMessage: !1 }
|
|
10352
10363
|
},
|
|
@@ -10429,8 +10440,8 @@ const Zc = ({
|
|
|
10429
10440
|
}) => {
|
|
10430
10441
|
const c = G(), {
|
|
10431
10442
|
replies: f,
|
|
10432
|
-
repliesCount:
|
|
10433
|
-
fetchNextPage:
|
|
10443
|
+
repliesCount: u,
|
|
10444
|
+
fetchNextPage: d,
|
|
10434
10445
|
hasNextPage: l,
|
|
10435
10446
|
isLoading: m,
|
|
10436
10447
|
mutations: { create: p, edit: v, like: y, remove: _, unlike: g },
|
|
@@ -10440,7 +10451,7 @@ const Zc = ({
|
|
|
10440
10451
|
queryFns: i
|
|
10441
10452
|
});
|
|
10442
10453
|
return Mi(), Ua(), /* @__PURE__ */ a.jsxs("section", { children: [
|
|
10443
|
-
/* @__PURE__ */ a.jsx(fc, { type: "comment", responses:
|
|
10454
|
+
/* @__PURE__ */ a.jsx(fc, { type: "comment", responses: u }),
|
|
10444
10455
|
/* @__PURE__ */ a.jsx(
|
|
10445
10456
|
Aa,
|
|
10446
10457
|
{
|
|
@@ -10540,7 +10551,7 @@ const Zc = ({
|
|
|
10540
10551
|
en,
|
|
10541
10552
|
{
|
|
10542
10553
|
hasNextPage: l,
|
|
10543
|
-
loadNextPage: () =>
|
|
10554
|
+
loadNextPage: () => d(),
|
|
10544
10555
|
icon: { icon: "arrow-down", position: "right" },
|
|
10545
10556
|
messages: {
|
|
10546
10557
|
button: c.formatMessage({ id: "loadMore_button" }),
|
|
@@ -10597,12 +10608,12 @@ function Yc({
|
|
|
10597
10608
|
},
|
|
10598
10609
|
user: o,
|
|
10599
10610
|
...c
|
|
10600
|
-
},
|
|
10611
|
+
}, u = Hc({ ...f, mutationFn: e }), d = Kc({ ...f, mutationFn: n }), l = Gc({ ...f, mutationFn: r }), { activity: m, ...p } = Vc({ queryKey: i, queryFn: t });
|
|
10601
10612
|
return {
|
|
10602
10613
|
activity: m,
|
|
10603
10614
|
mutations: {
|
|
10604
|
-
edit:
|
|
10605
|
-
like:
|
|
10615
|
+
edit: u,
|
|
10616
|
+
like: d,
|
|
10606
10617
|
unlike: l
|
|
10607
10618
|
},
|
|
10608
10619
|
user: o,
|
|
@@ -10656,7 +10667,7 @@ const Vl = ({
|
|
|
10656
10667
|
}
|
|
10657
10668
|
}) => {
|
|
10658
10669
|
var M, O, S, T, x, $, I, q, A, Z;
|
|
10659
|
-
const
|
|
10670
|
+
const u = G(), d = Ce(Oe), {
|
|
10660
10671
|
activity: l,
|
|
10661
10672
|
error: m,
|
|
10662
10673
|
isLoading: p,
|
|
@@ -10672,7 +10683,7 @@ const Vl = ({
|
|
|
10672
10683
|
tt,
|
|
10673
10684
|
{
|
|
10674
10685
|
variant: "error",
|
|
10675
|
-
text:
|
|
10686
|
+
text: u.formatMessage({ id: "activitySection_notFoundError" })
|
|
10676
10687
|
}
|
|
10677
10688
|
);
|
|
10678
10689
|
const { own_reactions: g, latest_reactions: b } = l, E = (((M = b == null ? void 0 : b.like) == null ? void 0 : M.length) || 0) > 0, j = (((O = g == null ? void 0 : g.like) == null ? void 0 : O.length) || 0) > 0, w = j ? g == null ? void 0 : g.like[0].id : "", U = E ? (S = b == null ? void 0 : b.like) == null ? void 0 : S.map((J) => {
|
|
@@ -10681,7 +10692,7 @@ const Vl = ({
|
|
|
10681
10692
|
id: (k = J == null ? void 0 : J.user) == null ? void 0 : k.id,
|
|
10682
10693
|
name: (z = (N = J == null ? void 0 : J.user) == null ? void 0 : N.data) == null ? void 0 : z.name
|
|
10683
10694
|
};
|
|
10684
|
-
}) : !1, F = l == null ? void 0 : l.actor, H = (F == null ? void 0 : F.id) === (
|
|
10695
|
+
}) : !1, F = l == null ? void 0 : l.actor, H = (F == null ? void 0 : F.id) === (d == null ? void 0 : d.id);
|
|
10685
10696
|
return /* @__PURE__ */ a.jsxs("section", { className: "activity-section", children: [
|
|
10686
10697
|
/* @__PURE__ */ a.jsx(
|
|
10687
10698
|
nn,
|
|
@@ -10860,7 +10871,7 @@ export {
|
|
|
10860
10871
|
Rl as Directory,
|
|
10861
10872
|
oc as DiscussionConversation,
|
|
10862
10873
|
Jn as DiscussionForm,
|
|
10863
|
-
|
|
10874
|
+
uc as DiscussionLikes,
|
|
10864
10875
|
nn as DiscussionPost,
|
|
10865
10876
|
mc as DiscussionThread,
|
|
10866
10877
|
Re as Divider,
|
|
@@ -10919,7 +10930,7 @@ export {
|
|
|
10919
10930
|
Mo as SearchForm,
|
|
10920
10931
|
Ll as ShareLinks,
|
|
10921
10932
|
Pl as SignupForm,
|
|
10922
|
-
|
|
10933
|
+
ds as Span,
|
|
10923
10934
|
Bt as StatusBanner,
|
|
10924
10935
|
Bl as Tabs,
|
|
10925
10936
|
zl as Tags,
|