@apolitical/component-library 1.14.11 → 1.14.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.mjs CHANGED
@@ -7,7 +7,7 @@ import bt from "markdown-to-jsx";
7
7
  import { QueryClient as ks, QueryClientProvider as js, useQueryClient as wt, useQuery as Tn, useMutation as ie } from "@tanstack/react-query";
8
8
  import { ReactQueryDevtools as ys } from "@tanstack/react-query-devtools";
9
9
  import dt from "posthog-js";
10
- import { useCookies as Es, CookiesProvider as Ss } from "react-cookie";
10
+ import { CookiesProvider as Es, useCookies as Ss } from "react-cookie";
11
11
  import { ReactMultiEmail as $s } from "react-multi-email";
12
12
  import Mn from "lodash.get";
13
13
  import { ErrorBoundary as Ts } from "react-error-boundary";
@@ -818,12 +818,6 @@ const vt = (e = !0, t = !1, n = "window") => {
818
818
  r && (r.scrollIntoView(t ? { behavior: "smooth" } : null), n.current = !0);
819
819
  }
820
820
  }, e);
821
- }, Bs = (e, t) => {
822
- Array.isArray(t) || (t = [t]);
823
- const n = xs(e);
824
- return t.forEach(({ type: r, value: i }) => {
825
- bs(n, r, i);
826
- }), n;
827
821
  }, An = (e) => {
828
822
  const t = [];
829
823
  return e.forEach((n) => {
@@ -840,7 +834,7 @@ const vt = (e = !0, t = !1, n = "window") => {
840
834
  break;
841
835
  }
842
836
  return r;
843
- }, Qs = (e) => e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`), Hs = (e, t = "en") => new Date(e).toLocaleString(t, { day: "numeric", month: "short" }), Rn = (e, t = "en") => new Date(e).toLocaleString(t, {
837
+ }, Bs = (e) => e.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`), Qs = (e, t = "en") => new Date(e).toLocaleString(t, { day: "numeric", month: "short" }), Rn = (e, t = "en") => new Date(e).toLocaleString(t, {
844
838
  weekday: "long",
845
839
  day: "numeric",
846
840
  month: "short",
@@ -863,7 +857,7 @@ const vt = (e = !0, t = !1, n = "window") => {
863
857
  }, _n = (e) => {
864
858
  const n = (e || /* @__PURE__ */ new Date()).toUTCString();
865
859
  return new Date(n);
866
- }, Us = (e) => new Promise((t) => setTimeout(t, e)), qt = {
860
+ }, qt = {
867
861
  apolitical: "Apolitical",
868
862
  breadcrumbs_label: "Go back to:",
869
863
  breadcrumbs_currentPage: "Current page:",
@@ -1180,35 +1174,35 @@ Thank you for helping to protect the Apolitical community from abusive content.`
1180
1174
  signup_success_text: "<p>Once we've vetted your application, you'll get a secure login link to help you get started.</p><p>Please note that trust is everything to our community, so you can't login until your identity has been verified.</p>",
1181
1175
  tags_community: "From the community",
1182
1176
  tooltip_loading: "Loading..."
1183
- }, Ws = {
1177
+ }, Hs = {
1184
1178
  languageSwitcher_label: "Me gustaría leer este artículo en...",
1185
1179
  languageSwitcher_translation_original: "idioma original",
1186
1180
  languageSwitcher_translation_human: "traducido por un humano",
1187
1181
  languageSwitcher_translation_machine: "traducido por máquina",
1188
1182
  languageSwitcher_disclaimer: "Este contenido fue traducido automáticamente y ocasionalmente tendrá errores de género u otras traducciones directas. Estamos intentando resolver este problema, pero mientras tanto, si notas algún error grave, escríbenos a <link>{email}</link>"
1189
- }, zs = {
1183
+ }, Us = {
1190
1184
  collapsibleSection_summary: "En savoir plus",
1191
1185
  languageSwitcher_label: "Je voudrais lire cet article dans...",
1192
1186
  languageSwitcher_translation_original: "langue originale",
1193
1187
  languageSwitcher_translation_human: "traduit par un humain",
1194
1188
  languageSwitcher_translation_machine: "traduit par machine",
1195
1189
  languageSwitcher_disclaimer: "Ce contenu est traduit automatiquement et contiendra d’évantuelles erreurs de genre ou d’autres traductions directes. Nous essayons de résoudre ce problème, mais en attendant, si vous remarquez une erreur importante, faites-le nous savoir à <link>{email}</link>"
1196
- }, Vs = {
1190
+ }, Ws = {
1197
1191
  languageSwitcher_label: "Eu gostaria de ler este artigo em...",
1198
1192
  languageSwitcher_translation_original: "linguagem original",
1199
1193
  languageSwitcher_translation_human: "traduzido por um humano",
1200
1194
  languageSwitcher_translation_machine: "traduzido por máquina",
1201
1195
  languageSwitcher_disclaimer: "Este conteúdo foi traduzido automaticamente e, ocasionalmente, poderão ocorrer erros de linguagem de gênero ou outras traduções diretas. Estamos tentando resolver isso, porém se perceber algo errado por favor nos avise em <link>{email}</link>"
1202
- }, Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1196
+ }, zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1203
1197
  __proto__: null,
1204
1198
  en: qt,
1205
- es: Ws,
1206
- fr: zs,
1207
- pt: Vs
1199
+ es: Hs,
1200
+ fr: Us,
1201
+ pt: Ws
1208
1202
  }, Symbol.toStringTag, { value: "Module" })), Fn = (e) => e in qt, Te = (e, t, n, r, i = {}) => {
1209
1203
  let c = "";
1210
1204
  return Fn(`${t}_${n}`) ? c = e({ id: `${t}_${n}` }, i) : c = e({ id: t }, { [r]: n, ...i }), c;
1211
- }, Gs = (e, t, n) => {
1205
+ }, Vs = (e, t, n) => {
1212
1206
  if (!e || e === 0)
1213
1207
  return "0";
1214
1208
  t || (t = 0), n || (n = ["k", "m", "b", "t"]);
@@ -1222,9 +1216,20 @@ Thank you for helping to protect the Apolitical community from abusive content.`
1222
1216
  }
1223
1217
  }
1224
1218
  return r;
1225
- }, ut = (e, t) => A.Children.map(e, (n) => A.cloneElement(n, {
1219
+ }, Ys = (e = 0) => {
1220
+ setTimeout(() => {
1221
+ const t = document.querySelector(".splash-screen");
1222
+ t && t.remove(), window.prerenderReady = !0;
1223
+ }, e);
1224
+ }, Gs = (e) => e.replace(/\s+/g, "").length > 0, Js = (e, t) => {
1225
+ Array.isArray(t) || (t = [t]);
1226
+ const n = xs(e);
1227
+ return t.forEach(({ type: r, value: i }) => {
1228
+ bs(n, r, i);
1229
+ }), n;
1230
+ }, Xs = (e) => new Promise((t) => setTimeout(t, e)), ut = (e, t) => A.Children.map(e, (n) => A.cloneElement(n, {
1226
1231
  ...t
1227
- })), Js = (e) => e.replace(/\s+/g, "").length > 0, U = ({
1232
+ })), U = ({
1228
1233
  variant: e = "primary",
1229
1234
  size: t = "medium",
1230
1235
  styling: n = { muted: !1, fullWidth: !1 },
@@ -1395,17 +1400,17 @@ const Ue = ({ className: e = "", maxWidth: t = !1 }) => {
1395
1400
  ],
1396
1401
  sizes: "(min-width: 1024px) 453px, 20vw"
1397
1402
  }
1398
- }, Xs = ({
1403
+ }, Zs = ({
1399
1404
  aspect: e,
1400
1405
  range: t,
1401
1406
  sizes: n
1402
1407
  }) => {
1403
1408
  const { range: r, sizes: i } = e ? xn[e] : xn.fallback;
1404
1409
  return { range: t && t.length > 0 ? t : r, sizes: n || i };
1405
- }, Zs = ({ format: e, height: t, query: n, width: r }) => {
1410
+ }, Ks = ({ format: e, height: t, query: n, width: r }) => {
1406
1411
  let i = `w=${r}&h=${t}`;
1407
1412
  return i = e ? `${i}&fm=${e}` : i, i = n ? `${i}&${n}` : i, i;
1408
- }, Ct = ({ format: e, range: t, url: n, query: r }) => t.map(({ height: i, width: c }) => `${n}?${Zs({
1413
+ }, Ct = ({ format: e, range: t, url: n, query: r }) => t.map(({ height: i, width: c }) => `${n}?${Ks({
1409
1414
  format: e,
1410
1415
  height: i,
1411
1416
  query: r,
@@ -1422,7 +1427,7 @@ const Ln = ({ image: e, className: t, testId: n }) => {
1422
1427
  loading: o,
1423
1428
  decoding: m,
1424
1429
  fetchPriority: u
1425
- } = e, { range: h, sizes: p } = Xs(e), g = Ct({ format: "avif", query: d, range: h, url: a }), b = Ct({ format: "webp", query: d, range: h, url: a }), v = Ct({ format: "", query: d, range: h, url: a });
1430
+ } = e, { range: h, sizes: p } = Zs(e), g = Ct({ format: "avif", query: d, range: h, url: a }), b = Ct({ format: "webp", query: d, range: h, url: a }), v = Ct({ format: "", query: d, range: h, url: a });
1426
1431
  return /* @__PURE__ */ s.jsxs("picture", { className: t, children: [
1427
1432
  c !== "image/gif" && /* @__PURE__ */ s.jsx(
1428
1433
  "source",
@@ -1460,7 +1465,7 @@ const Ln = ({ image: e, className: t, testId: n }) => {
1460
1465
  ] });
1461
1466
  };
1462
1467
  let Je = !1;
1463
- const Ks = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
1468
+ const qs = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
1464
1469
  const r = D(), i = de(null), [c, d] = L("hidden");
1465
1470
  Y(() => {
1466
1471
  const l = i.current;
@@ -1544,7 +1549,7 @@ const Qa = ({ title: e = !1, logos: t = [], className: n = "" }) => {
1544
1549
  )
1545
1550
  ] });
1546
1551
  };
1547
- const qs = [
1552
+ const er = [
1548
1553
  "small",
1549
1554
  "span",
1550
1555
  "strong",
@@ -1558,7 +1563,7 @@ const qs = [
1558
1563
  "h6",
1559
1564
  "blockquote",
1560
1565
  "q"
1561
- ], er = ({
1566
+ ], tr = ({
1562
1567
  className: e = "",
1563
1568
  content: t,
1564
1569
  image: n,
@@ -1582,7 +1587,7 @@ const qs = [
1582
1587
  if (typeof t[u] == "object") {
1583
1588
  m[u] = t[u];
1584
1589
  const { text: h, element: p } = t[u];
1585
- if (p && qs.includes(p.toLowerCase()))
1590
+ if (p && er.includes(p.toLowerCase()))
1586
1591
  return;
1587
1592
  m[u] = {
1588
1593
  text: h,
@@ -1635,7 +1640,7 @@ const qs = [
1635
1640
  ] })
1636
1641
  }
1637
1642
  );
1638
- }, Ha = We(er);
1643
+ }, Ha = We(tr);
1639
1644
  const Ua = ({
1640
1645
  variant: e = "primary",
1641
1646
  button: t = null,
@@ -1702,7 +1707,7 @@ const yt = ({
1702
1707
  const Jt = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("p", { ...t, children: e }), In = { q: Jt, blockquote: Jt };
1703
1708
  for (let e = 1; e <= 6; e++)
1704
1709
  In[`h${e}`] = { component: Jt, props: { className: "title" } };
1705
- const tr = ({ type: e = "default", className: t = "", heading: n = !1, children: r }) => /* @__PURE__ */ s.jsxs("div", { className: $("helper-text-box text-small", e, t), children: [
1710
+ const nr = ({ type: e = "default", className: t = "", heading: n = !1, children: r }) => /* @__PURE__ */ s.jsxs("div", { className: $("helper-text-box text-small", e, t), children: [
1706
1711
  n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
1707
1712
  typeof r == "string" ? /* @__PURE__ */ s.jsx(
1708
1713
  bt,
@@ -1759,7 +1764,7 @@ const za = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
1759
1764
  }
1760
1765
  ) })
1761
1766
  ] });
1762
- }, nr = () => A.Fragment, sr = ({ children: e }) => /* @__PURE__ */ s.jsx(Re, { variant: "secondary", children: e }), rr = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], ar = ({ children: e }) => {
1767
+ }, sr = () => A.Fragment, rr = ({ children: e }) => /* @__PURE__ */ s.jsx(Re, { variant: "secondary", children: e }), ar = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], or = ({ children: e }) => {
1763
1768
  const t = D();
1764
1769
  if (!e)
1765
1770
  return null;
@@ -1772,7 +1777,7 @@ const za = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
1772
1777
  for (const d of zt.toArray(c.props.children))
1773
1778
  if (!(!d || typeof d == "string" || typeof d == "number") && A.isValidElement(d)) {
1774
1779
  const a = d.type;
1775
- if (rr.includes(a)) {
1780
+ if (ar.includes(a)) {
1776
1781
  for (n = d.props.children; typeof n != "string" && (Array.isArray(n) && n[0].props && n[0].props.children && n[0].props.children[0]); )
1777
1782
  n = n[0].props.children[0];
1778
1783
  break;
@@ -1790,7 +1795,7 @@ const za = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
1790
1795
  children: r.map((c) => c)
1791
1796
  }
1792
1797
  );
1793
- }, or = ({ children: e, ...t }) => {
1798
+ }, ir = ({ children: e, ...t }) => {
1794
1799
  if (t.class)
1795
1800
  switch (t.class) {
1796
1801
  case "casestudy":
@@ -1804,7 +1809,7 @@ const za = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
1804
1809
  return /* @__PURE__ */ s.jsx("div", { ...t, children: e });
1805
1810
  }
1806
1811
  return /* @__PURE__ */ s.jsx("div", { ...t, children: e });
1807
- }, ir = (e) => {
1812
+ }, cr = (e) => {
1808
1813
  const t = D(), n = Date.now().toString();
1809
1814
  let r = "default";
1810
1815
  const i = e.src;
@@ -1816,7 +1821,7 @@ const za = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
1816
1821
  }, bn = (e) => {
1817
1822
  let t = "";
1818
1823
  return e && typeof e != "string" && typeof e != "number" && typeof e != "boolean" && "type" in e && (t = e.type), t;
1819
- }, cr = ({ children: e, ...t }) => {
1824
+ }, lr = ({ children: e, ...t }) => {
1820
1825
  let n = { ...t };
1821
1826
  t.href && (t.href.includes("http:") || t.href.includes("https:")) && !t.target && (n.target = "_blank");
1822
1827
  let r = e, i = !1;
@@ -1831,30 +1836,30 @@ const za = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
1831
1836
  break;
1832
1837
  }
1833
1838
  return i ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ s.jsx("p", { className: "center", children: /* @__PURE__ */ s.jsx(U, { variant: "primary", size: "medium", ...n, children: r }) })) : /* @__PURE__ */ s.jsx("a", { ...n, children: r });
1834
- }, lr = ({ children: e }) => /* @__PURE__ */ s.jsx("span", { children: e });
1839
+ }, dr = ({ children: e }) => /* @__PURE__ */ s.jsx("span", { children: e });
1835
1840
  const wn = ({ className: e = "", options: t = {}, children: n }) => {
1836
1841
  n = n.replace(/^<br\/?>/, "");
1837
1842
  const r = {
1838
1843
  wrapper: A.Fragment,
1839
1844
  forceBlock: !0,
1840
1845
  overrides: {
1841
- a: cr,
1846
+ a: lr,
1842
1847
  // Override psuedo-code
1843
1848
  // We give the content team psuedo-code short cuts to use in Contentful
1844
1849
  CollapsibleSection: On,
1845
1850
  TextBox: Re,
1846
- CaseStudy: sr,
1851
+ CaseStudy: rr,
1847
1852
  // Override embedded HTML
1848
1853
  // Our content team previously used real HTML, which we need to tear out and replace with React components
1849
- style: nr,
1850
- details: ar,
1851
- div: or,
1852
- iframe: ir
1854
+ style: sr,
1855
+ details: or,
1856
+ div: ir,
1857
+ iframe: cr
1853
1858
  }
1854
1859
  };
1855
1860
  return /* @__PURE__ */ s.jsx("div", { className: $("markdown-text", e), children: /* @__PURE__ */ s.jsx(bt, { options: { ...r, ...t }, children: n }) });
1856
1861
  };
1857
- const dr = ({
1862
+ const ur = ({
1858
1863
  maxWidth: e = !1,
1859
1864
  title: t,
1860
1865
  subtitle: n,
@@ -1882,11 +1887,11 @@ const ft = ({
1882
1887
  ...i
1883
1888
  }) => /* @__PURE__ */ s.jsx("span", { className: $("pill", e, t, n), ...i, children: r });
1884
1889
  const Xt = ({ element: e = "p", children: t = null, className: n = "", ...r }) => A.createElement(e, { ...r, className: $("status-banner text-small", n), "aria-live": "assertive" }, t);
1885
- const ur = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
1890
+ const mr = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
1886
1891
  const r = D(), i = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, c = { "--progress": `${e}%` };
1887
1892
  return /* @__PURE__ */ s.jsx("span", { className: $(`progress-bar section-${i}`, n), style: c, children: /* @__PURE__ */ s.jsx(_e, { children: t ? `${e} ${t}` : r.formatMessage({ id: "progressBar" }, { number: e }) }) });
1888
- }, mr = We(ur);
1889
- const At = "loadingBlock_", fr = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
1893
+ }, fr = We(mr);
1894
+ const At = "loadingBlock_", hr = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
1890
1895
  const r = D();
1891
1896
  t || (t = {
1892
1897
  0: { text: r.formatMessage({ id: `${At}loading` }) },
@@ -1906,11 +1911,11 @@ const At = "loadingBlock_", fr = ({ progress: e = 0, steps: t = !1, className: n
1906
1911
  style: d,
1907
1912
  children: [
1908
1913
  i && /* @__PURE__ */ s.jsx("span", { className: "step", children: t[i].text }),
1909
- /* @__PURE__ */ s.jsx(mr, { progress: e })
1914
+ /* @__PURE__ */ s.jsx(fr, { progress: e })
1910
1915
  ]
1911
1916
  }
1912
1917
  );
1913
- }, Va = We(fr);
1918
+ }, Va = We(hr);
1914
1919
  const Se = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ s.jsx(Dn, { element: e, className: $("loading-placeholder", t), ...n });
1915
1920
  const Zt = {
1916
1921
  header: ["logo", "link", "link", "search"],
@@ -1929,7 +1934,7 @@ const Zt = {
1929
1934
  "cards-section",
1930
1935
  "footer"
1931
1936
  ]
1932
- }, Bn = (e, t) => e in Zt ? /* @__PURE__ */ s.jsx("div", { className: e, children: Zt[e].map((n, r) => Bn(n, r)) }, t) : /* @__PURE__ */ s.jsx(Se, { className: e }, t), hr = ({ layout: e = "overview-page", ...t }) => /* @__PURE__ */ s.jsx("div", { className: $("loading-state", e), ...t, children: Zt[e].map((n, r) => Bn(n, r)) }), Qn = (e) => {
1937
+ }, Bn = (e, t) => e in Zt ? /* @__PURE__ */ s.jsx("div", { className: e, children: Zt[e].map((n, r) => Bn(n, r)) }, t) : /* @__PURE__ */ s.jsx(Se, { className: e }, t), Ya = ({ layout: e = "overview-page", ...t }) => /* @__PURE__ */ s.jsx("div", { className: $("loading-state", e), ...t, children: Zt[e].map((n, r) => Bn(n, r)) }), Qn = (e) => {
1933
1938
  const t = e && e.toUpperCase().split(" ");
1934
1939
  return Array.isArray(t) && t.length > 1 && t[0] !== "" ? t[1] === "" ? t[0][0] : t[0][0] + t[t.length - 1][0] : e ? e.substr(0, 1) : "";
1935
1940
  }, st = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], pr = (e) => {
@@ -2086,7 +2091,7 @@ const kn = {
2086
2091
  className: $({ "large-number": b > 99 }),
2087
2092
  children: [
2088
2093
  "+",
2089
- Gs(b, 0)
2094
+ Vs(b, 0)
2090
2095
  ]
2091
2096
  }
2092
2097
  ), g = "number-left";
@@ -2120,7 +2125,7 @@ function br(e) {
2120
2125
  }, [n, r]);
2121
2126
  return A.createElement(xr.Provider, { value: { client: c } }, t);
2122
2127
  }
2123
- const wr = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ s.jsx(s.Fragment, {}) : process.env.REACT_APP_PUBLIC_POSTHOG_KEY ? /* @__PURE__ */ s.jsx(
2128
+ const wr = ({ children: e, user: t }) => t.isLoading ? null : process.env.REACT_APP_PUBLIC_POSTHOG_KEY ? /* @__PURE__ */ s.jsx(
2124
2129
  br,
2125
2130
  {
2126
2131
  apiKey: atob(process.env.REACT_APP_PUBLIC_POSTHOG_KEY),
@@ -2138,15 +2143,17 @@ const wr = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ s.jsx(s.F
2138
2143
  }
2139
2144
  ) : e, vr = ({ children: e, locale: t, messages: n }) => {
2140
2145
  const r = t || "en", i = {
2141
- ...Ys[r],
2146
+ ...zs[r],
2142
2147
  ...n || {}
2143
2148
  };
2144
2149
  return /* @__PURE__ */ s.jsx(ws, { locale: r, messages: i, children: e });
2145
- }, $e = Kt(null), kr = ({ children: e, user: t }) => /* @__PURE__ */ s.jsx($e.Provider, { value: t, children: e }), Ya = ({ bootstrap: e, children: t, intl: n }) => {
2150
+ }, $e = Kt(null), kr = ({ children: e, user: t }) => /* @__PURE__ */ s.jsx($e.Provider, { value: t, children: e }), Ga = ({ bootstrap: e, children: t, intl: n }) => {
2146
2151
  const [r, i] = L({ isLoading: !0 });
2147
2152
  return Y(() => {
2148
- e().then((c) => i({ ...c, isLoading: !1 })).catch(() => i({ isLoading: !1 }));
2149
- }, []), /* @__PURE__ */ s.jsx(vr, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ s.jsx(kr, { user: r, children: /* @__PURE__ */ s.jsx(_r, { children: /* @__PURE__ */ s.jsx(wr, { user: r, children: t }) }) }) });
2153
+ e().then((c) => {
2154
+ i({ ...c, isLoading: !1 }), Ys(5e3);
2155
+ }).catch(() => i({ isLoading: !1 }));
2156
+ }, []), /* @__PURE__ */ s.jsx(vr, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ s.jsx(Es, { children: /* @__PURE__ */ s.jsx(kr, { user: r, children: /* @__PURE__ */ s.jsx(_r, { children: /* @__PURE__ */ s.jsx(wr, { user: r, children: t }) }) }) }) });
2150
2157
  };
2151
2158
  const Pt = "joinCommunityButton", Wn = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: r } = { join: () => {
2152
2159
  }, leave: () => {
@@ -2173,7 +2180,7 @@ const Pt = "joinCommunityButton", Wn = ({ isMember: e = !1, isShort: t = !1, fun
2173
2180
  }
2174
2181
  );
2175
2182
  };
2176
- const Rt = "communityDetails_", Ga = ({
2183
+ const Rt = "communityDetails_", Ja = ({
2177
2184
  className: e = "",
2178
2185
  isMember: t = !1,
2179
2186
  slug: n,
@@ -2220,7 +2227,7 @@ const Rt = "communityDetails_", Ga = ({
2220
2227
  )
2221
2228
  ] });
2222
2229
  };
2223
- const Ja = ({
2230
+ const Xa = ({
2224
2231
  breadcrumbs: e,
2225
2232
  cutoff: t = 20,
2226
2233
  className: n = ""
@@ -2234,7 +2241,7 @@ const Ja = ({
2234
2241
  ] }, `${window.btoa(i)}_${a}`)) })
2235
2242
  ] });
2236
2243
  };
2237
- const Xa = ({
2244
+ const Za = ({
2238
2245
  options: e,
2239
2246
  allOption: t = !1,
2240
2247
  allowMultiple: n = !0,
@@ -2270,7 +2277,7 @@ const Xa = ({
2270
2277
  c === "before-lang" ? r += `/${i}` : (r.includes(`/${n}/`) || (r += `/${n}`), r += `/${i}`);
2271
2278
  }), r.includes(`/${n}/`) || (r += `/${n}`), r;
2272
2279
  };
2273
- const Ft = { en: "English", es: "Español", fr: "Français", pt: "Português" }, rt = "languageSwitcher_", Za = ({
2280
+ const Ft = { en: "English", es: "Español", fr: "Français", pt: "Português" }, rt = "languageSwitcher_", Ka = ({
2274
2281
  currentLanguage: e,
2275
2282
  isOriginalLanguage: t = !1,
2276
2283
  isHumanTranslation: n = !1,
@@ -2519,7 +2526,7 @@ ${Xe(t, "mailto", n)}&src=email`
2519
2526
  onClick: (r, i) => (r.preventDefault(), r.stopPropagation(), navigator.clipboard.writeText(i))
2520
2527
  }
2521
2528
  ];
2522
- const Nr = "shareLinks_", Ka = ({
2529
+ const Nr = "shareLinks_", qa = ({
2523
2530
  title: e,
2524
2531
  link: t,
2525
2532
  referrer: n,
@@ -2567,12 +2574,12 @@ const Dr = {
2567
2574
  const i = vt(!0);
2568
2575
  let c = r;
2569
2576
  return A.Children.count(r) === 1 && (c = A.Children.toArray(r)[0], c.props && (c = c.props.children)), /* @__PURE__ */ s.jsx("section", { className: $("columns", `layout-${e}`, n), children: A.Children.map(c, (d, a) => t !== !1 && a === t && i && i < Dr[e] ? null : d) });
2570
- }, qa = ({ activeLink: e, ...t }) => /* @__PURE__ */ s.jsx(Cr, { layout: "1-3", children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
2577
+ }, eo = ({ activeLink: e, ...t }) => /* @__PURE__ */ s.jsx(Cr, { layout: "1-3", children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
2571
2578
  /* @__PURE__ */ s.jsx(Tr, { activeLink: e }),
2572
- /* @__PURE__ */ s.jsx(dr, { ...t })
2579
+ /* @__PURE__ */ s.jsx(ur, { ...t })
2573
2580
  ] }) });
2574
2581
  const Ot = "cookieBanner_", It = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], Bt = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), Ar = () => {
2575
- const e = D(), [t, n, r] = Es(It), [i, c] = L(!t["apol-cookie-banner"]), d = () => {
2582
+ const e = D(), [t, n, r] = Ss(It), [i, c] = L(!t["apol-cookie-banner"]), d = () => {
2576
2583
  It.forEach((m) => {
2577
2584
  n(m, !0, {
2578
2585
  path: "/",
@@ -2785,7 +2792,7 @@ const Be = "footer_", ht = "SiteFooter", jn = ({ group: e }) => {
2785
2792
  /* @__PURE__ */ s.jsx("small", { children: /* @__PURE__ */ s.jsx(Pe, { id: `${Be}copyright`, values: { currentYear: (/* @__PURE__ */ new Date()).getFullYear() } }) })
2786
2793
  ] })
2787
2794
  ] }) });
2788
- const ot = "emailHelperTextBox_", eo = ({ type: e, email: t, redirectPath: n, resendVerificationCode: r }) => {
2795
+ const ot = "emailHelperTextBox_", to = ({ type: e, email: t, redirectPath: n, resendVerificationCode: r }) => {
2789
2796
  const i = D(), [c, d] = L({ path: `${ot}default`, type: "default", link: {}, mail: {}, error: "" }), [a, l] = L(!1), o = Me(
2790
2797
  (p) => {
2791
2798
  p.preventDefault(), p.stopPropagation();
@@ -2885,7 +2892,7 @@ const ot = "emailHelperTextBox_", eo = ({ type: e, email: t, redirectPath: n, re
2885
2892
  const m = {};
2886
2893
  return ["link", "mail"].forEach((p) => {
2887
2894
  m[p] = Object.keys(c[p]).length ? (g) => /* @__PURE__ */ s.jsx("a", { ...c[p], children: g }) : (g) => g;
2888
- }), /* @__PURE__ */ s.jsx(tr, { type: c.type, heading: a ? !1 : i.formatMessage({ id: `${c.path}_title` }), children: a ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
2895
+ }), /* @__PURE__ */ s.jsx(nr, { type: c.type, heading: a ? !1 : i.formatMessage({ id: `${c.path}_title` }), children: a ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
2889
2896
  /* @__PURE__ */ s.jsx(Se, { element: "span" }),
2890
2897
  /* @__PURE__ */ s.jsx(Se, { element: "span" })
2891
2898
  ] }) : (
@@ -2928,8 +2935,8 @@ const it = "passwordRules_", Yn = "isMoreThanEightCharacters", Gn = "includesNum
2928
2935
  ] })
2929
2936
  ] }, `rule-${r}`)) })
2930
2937
  ] });
2931
- }, to = We(Rr);
2932
- const no = ({
2938
+ }, no = We(Rr);
2939
+ const so = ({
2933
2940
  text: e = {},
2934
2941
  topRating: t = 5,
2935
2942
  functions: { createRating: n = () => null, updateRating: r = () => {
@@ -3395,7 +3402,7 @@ const Or = { height: 67, height_desktop: 83 }, Xn = ({ showNavigation: e = !0 })
3395
3402
  const t = D(), n = je($e), r = vt(!0, !0), i = n && typeof n.id == "string", c = xt(
3396
3403
  () => H.getIsDesktopVersion(i, r),
3397
3404
  [i, r]
3398
- ), [d, a] = gs(Bs, {
3405
+ ), [d, a] = gs(Js, {
3399
3406
  headerIsVisible: !0,
3400
3407
  menus: { navigation: !1, search: !1, account: !1 },
3401
3408
  focusElements: {
@@ -3636,7 +3643,7 @@ const Kn = ({
3636
3643
  "aria-expanded": t,
3637
3644
  "aria-controls": e
3638
3645
  });
3639
- const so = ({
3646
+ const ro = ({
3640
3647
  className: e,
3641
3648
  showModal: t = !0,
3642
3649
  title: n,
@@ -3701,12 +3708,12 @@ const Br = () => {
3701
3708
  }), v = ut(n, {
3702
3709
  locale: a
3703
3710
  }), E = {};
3704
- return m !== "default" && (E[m] = !0), u !== "default" && (E[u] = !0), h !== "default" && (E[h] = !0), /* @__PURE__ */ s.jsx(Ts, { onError: r, fallback: /* @__PURE__ */ s.jsx(Br, {}), children: /* @__PURE__ */ s.jsx(_s, { fallback: /* @__PURE__ */ s.jsx(hr, { layout: "overview-page" }), children: /* @__PURE__ */ s.jsx(
3711
+ return m !== "default" && (E[m] = !0), u !== "default" && (E[u] = !0), h !== "default" && (E[h] = !0), /* @__PURE__ */ s.jsx(Ts, { onError: r, fallback: /* @__PURE__ */ s.jsx(Br, {}), children: /* @__PURE__ */ s.jsx(_s, { fallback: null, children: /* @__PURE__ */ s.jsxs(
3705
3712
  "div",
3706
3713
  {
3707
3714
  id: "wrapper",
3708
3715
  className: $(d, E, { "has-footer": o }),
3709
- children: /* @__PURE__ */ s.jsxs(Ss, { children: [
3716
+ children: [
3710
3717
  /* @__PURE__ */ s.jsx(Xn, { showNavigation: l }),
3711
3718
  /* @__PURE__ */ s.jsxs("section", { id: "content-wrapper", children: [
3712
3719
  b && /* @__PURE__ */ s.jsx("div", { className: "additional-content prepended", children: b }),
@@ -3718,7 +3725,7 @@ const Br = () => {
3718
3725
  v && /* @__PURE__ */ s.jsx("div", { className: "additional-content appended", children: v }),
3719
3726
  o && /* @__PURE__ */ s.jsx(Vn, {}),
3720
3727
  /* @__PURE__ */ s.jsx(Ar, {})
3721
- ] })
3728
+ ]
3722
3729
  }
3723
3730
  ) }) });
3724
3731
  }, yn = {
@@ -3752,7 +3759,7 @@ const Br = () => {
3752
3759
  return Qt[e] ? (e = Qt[e], { id: e, text: `${yn.default}${e}` }) : null;
3753
3760
  }
3754
3761
  };
3755
- const ro = ({
3762
+ const ao = ({
3756
3763
  tags: e = [],
3757
3764
  color: t = "default",
3758
3765
  forceOneLine: n = !1,
@@ -3784,7 +3791,7 @@ const ro = ({
3784
3791
  ) : m }, o.id);
3785
3792
  }) });
3786
3793
  };
3787
- const ao = ({
3794
+ const oo = ({
3788
3795
  members: { total: e, data: t = [] },
3789
3796
  pagination: n,
3790
3797
  gtmContext: r = "member",
@@ -3910,7 +3917,7 @@ const ve = "discussion_form_", qn = ({
3910
3917
  default:
3911
3918
  break;
3912
3919
  }
3913
- await Us(1e3), a.callback && await a.callback(w), ct = setTimeout(() => {
3920
+ await Xs(1e3), a.callback && await a.callback(w), ct = setTimeout(() => {
3914
3921
  h(""), v("submitted"), C();
3915
3922
  }, 500);
3916
3923
  } catch (w) {
@@ -3932,7 +3939,7 @@ const ve = "discussion_form_", qn = ({
3932
3939
  ct = setTimeout(() => {
3933
3940
  g(!1), v(!1);
3934
3941
  }, 5e3);
3935
- }, R = !u || !Js(u), V = b === "submitting", N = [];
3942
+ }, R = !u || !Gs(u), V = b === "submitting", N = [];
3936
3943
  return (n.isEditing && !V || d.cancel) && N.push({
3937
3944
  variant: "secondary",
3938
3945
  size: { mobile: "small", 600: "medium" },
@@ -4147,7 +4154,7 @@ const Ht = () => {
4147
4154
  }
4148
4155
  ),
4149
4156
  /* @__PURE__ */ s.jsx("span", { className: $("number-of-likes", { "no-likes": m === 0 }), "data-testid": "number-of-likes", children: o.formatMessage({ id: `discussion_likes${r ? "_short" : ""}` }, { number: m }) }),
4150
- n && /* @__PURE__ */ s.jsx(Ks, { isOpen: v, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ s.jsxs("ul", { children: [
4157
+ n && /* @__PURE__ */ s.jsx(qs, { isOpen: v, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ s.jsxs("ul", { children: [
4151
4158
  k.map((C) => typeof C == "string" || !C.name ? null : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
4152
4159
  jt,
4153
4160
  {
@@ -4331,7 +4338,7 @@ const De = "discussion_", Gr = 280, St = ({
4331
4338
  className: "gtm-trackable",
4332
4339
  "data-gtm-event-context": p,
4333
4340
  "data-gtm-event-type": "title-click",
4334
- children: /* @__PURE__ */ s.jsx(wn, { options: { overrides: { a: lr } }, children: X })
4341
+ children: /* @__PURE__ */ s.jsx(wn, { options: { overrides: { a: dr } }, children: X })
4335
4342
  }
4336
4343
  ) : /* @__PURE__ */ s.jsx(
4337
4344
  wn,
@@ -4477,7 +4484,7 @@ const De = "discussion_", Gr = 280, St = ({
4477
4484
  ] })
4478
4485
  });
4479
4486
  };
4480
- const Wt = "discussion_responses_", oo = ({ type: e = "answer", responses: t = 0 }) => {
4487
+ const Wt = "discussion_responses_", io = ({ type: e = "answer", responses: t = 0 }) => {
4481
4488
  const n = D();
4482
4489
  return /* @__PURE__ */ s.jsxs("div", { className: "responses-heading", children: [
4483
4490
  /* @__PURE__ */ s.jsx("h3", { children: n.formatMessage({ id: `${Wt}title` }, { action: n.formatMessage({ id: `${Wt}${e}` }), count: t }) }),
@@ -4682,7 +4689,7 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4682
4689
  e.invalidateQueries({
4683
4690
  queryKey: [...t, m.activityId]
4684
4691
  });
4685
- } }), io = ({
4692
+ } }), co = ({
4686
4693
  basePath: e,
4687
4694
  parentId: t,
4688
4695
  isMember: n,
@@ -5451,7 +5458,7 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
5451
5458
  }, onSettled: () => {
5452
5459
  e.invalidateQueries({ queryKey: t });
5453
5460
  } });
5454
- const co = ({
5461
+ const lo = ({
5455
5462
  basePath: e,
5456
5463
  parentId: t,
5457
5464
  activityId: n,
@@ -5608,7 +5615,7 @@ const co = ({
5608
5615
  },
5609
5616
  n
5610
5617
  );
5611
- }, lo = ({ id: e, data: { jobTitle: t, name: n, organization: r, thumbnail: i } }) => ({
5618
+ }, uo = ({ id: e, data: { jobTitle: t, name: n, organization: r, thumbnail: i } }) => ({
5612
5619
  id: e,
5613
5620
  name: n,
5614
5621
  jobTitle: t,
@@ -5878,7 +5885,7 @@ const va = {
5878
5885
  size: "small",
5879
5886
  variant: u.dateHasPassed ? "default" : "information",
5880
5887
  "data-testid": "date",
5881
- children: u.dateHasPassed ? d.formatMessage({ id: "card_ended" }) : Hs(u.startDate)
5888
+ children: u.dateHasPassed ? d.formatMessage({ id: "card_ended" }) : Qs(u.startDate)
5882
5889
  }
5883
5890
  ),
5884
5891
  u.banner ? /* @__PURE__ */ s.jsxs("p", { className: "img", children: [
@@ -5910,7 +5917,7 @@ const va = {
5910
5917
  const P = u[N];
5911
5918
  if (!P)
5912
5919
  return null;
5913
- const G = Qs(N);
5920
+ const G = Bs(N);
5914
5921
  return /* @__PURE__ */ s.jsx("p", { className: G, "data-testid": G, children: Qe(P, C[N]) }, N);
5915
5922
  }),
5916
5923
  /* @__PURE__ */ s.jsx(xa, { type: v || "", data: u }),
@@ -5976,7 +5983,7 @@ const $n = [
5976
5983
  contributors: ["community"]
5977
5984
  }
5978
5985
  ];
5979
- const lt = "notFoundError_", uo = () => {
5986
+ const lt = "notFoundError_", mo = () => {
5980
5987
  const e = D(), t = [];
5981
5988
  return $n.forEach((n, r) => {
5982
5989
  n.title = e.formatMessage({ id: `${lt}post_${r + 1}` }), t.push("solutionArticle");
@@ -6011,17 +6018,17 @@ const lt = "notFoundError_", uo = () => {
6011
6018
  };
6012
6019
  export {
6013
6020
  mt as ASSETS_BUCKET,
6014
- io as ActivitiesFeed,
6015
- co as ActivitySection,
6021
+ co as ActivitiesFeed,
6022
+ lo as ActivitySection,
6016
6023
  nn as AddPost,
6017
6024
  Ha as BannerSection,
6018
- Ja as Breadcrumbs,
6025
+ Xa as Breadcrumbs,
6019
6026
  U as Button,
6020
6027
  kt as ButtonWrapper,
6021
6028
  _r as CacheProvider,
6022
6029
  On as CollapsibleSection,
6023
6030
  Cr as Columns,
6024
- Ga as CommunityDetails,
6031
+ Ja as CommunityDetails,
6025
6032
  Un as Contributors,
6026
6033
  Et as ConversationContext,
6027
6034
  Ar as CookieBanner,
@@ -6033,64 +6040,65 @@ export {
6033
6040
  Ue as Divider,
6034
6041
  Ba as DownloadSection,
6035
6042
  Ze as EMAILS,
6036
- eo as EmailHelperTextBox,
6043
+ to as EmailHelperTextBox,
6037
6044
  yt as EmptyStateBox,
6038
- Xa as Filters,
6045
+ Za as Filters,
6039
6046
  wr as FlagsProvider,
6040
6047
  Vn as Footer,
6041
6048
  en as FullWidthSection,
6042
- Ya as GlobalProviders,
6049
+ Ga as GlobalProviders,
6043
6050
  Xn as Header,
6044
- tr as HelperTextBox,
6051
+ nr as HelperTextBox,
6045
6052
  Dn as HiddenFromScreenReaders,
6046
6053
  za as HideShowTextBox,
6047
6054
  Re as HighlightedTextBox,
6048
6055
  vr as IntlProvider,
6049
6056
  Lr as InviteForm,
6050
- so as InviteModal,
6057
+ ro as InviteModal,
6051
6058
  Wn as JoinButton,
6052
- Za as LanguageSwitcher,
6059
+ Ka as LanguageSwitcher,
6053
6060
  jt as Link,
6054
6061
  yr as LoadMore,
6055
6062
  Va as LoadingBlock,
6056
6063
  Se as LoadingPlaceholder,
6057
- hr as LoadingState,
6064
+ Ya as LoadingState,
6058
6065
  zn as Logo,
6059
6066
  Qa as LogoSection,
6060
6067
  wn as MarkdownText,
6061
6068
  Ua as MarketingBox,
6062
6069
  tn as Member,
6063
- ao as MembersList,
6070
+ oo as MembersList,
6064
6071
  Zn as Modal,
6065
6072
  Er as MoreMenu,
6066
6073
  Wa as NUMBER_OF_USERS,
6067
6074
  Tr as NavigationMenu,
6068
- uo as NotFoundError,
6075
+ mo as NotFoundError,
6069
6076
  Kn as Overlay,
6070
- dr as PageHeading,
6077
+ ur as PageHeading,
6071
6078
  Qr as PageLayout,
6072
- to as PasswordRules,
6079
+ no as PasswordRules,
6073
6080
  ft as Pill,
6074
6081
  qe as ProfilePicture,
6075
- mr as ProgressBar,
6076
- no as Rating,
6082
+ fr as ProgressBar,
6083
+ so as Rating,
6077
6084
  fa as RepliesFeed,
6078
- oo as ResponsesHeading,
6085
+ io as ResponsesHeading,
6079
6086
  Ln as ResponsiveImage,
6080
6087
  Fr as SearchForm,
6081
- Ka as ShareLinks,
6082
- lr as Span,
6088
+ qa as ShareLinks,
6089
+ dr as Span,
6083
6090
  Xt as StatusBanner,
6084
- ro as Tags,
6085
- Ks as Tooltip,
6086
- qa as TopLevelPage,
6091
+ ao as Tags,
6092
+ qs as Tooltip,
6093
+ eo as TopLevelPage,
6087
6094
  $e as UserContext,
6088
6095
  kr as UserProvider,
6089
6096
  _e as VisuallyHidden,
6090
6097
  Ir as addAriaProps,
6091
6098
  Hn as getMember,
6092
6099
  pt as headerData,
6093
- lo as mapGetStreamData,
6100
+ uo as mapGetStreamData,
6101
+ Ys as pageReady,
6094
6102
  Ls as useCurrentPath,
6095
6103
  He as useEffectAfterMount,
6096
6104
  vt as useElementWidth,