@apolitical/component-library 4.3.0-4520.3 → 4.3.0-4520.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +21 -21
  2. package/index.mjs +578 -580
  3. package/package.json +1 -1
package/index.mjs CHANGED
@@ -132,13 +132,13 @@ var Ao;
132
132
  function lh() {
133
133
  return Ao || (Ao = 1, process.env.NODE_ENV !== "production" && function() {
134
134
  var e = re, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), o = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), g = Symbol.iterator, f = "@@iterator";
135
- function D(O) {
135
+ function y(O) {
136
136
  if (O === null || typeof O != "object")
137
137
  return null;
138
138
  var ae = g && O[g] || O[f];
139
139
  return typeof ae == "function" ? ae : null;
140
140
  }
141
- var y = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
141
+ var D = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
142
142
  function x(O) {
143
143
  {
144
144
  for (var ae = arguments.length, ue = new Array(ae > 1 ? ae - 1 : 0), we = 1; we < ae; we++)
@@ -148,7 +148,7 @@ function lh() {
148
148
  }
149
149
  function B(O, ae, ue) {
150
150
  {
151
- var we = y.ReactDebugCurrentFrame, Ne = we.getStackAddendum();
151
+ var we = D.ReactDebugCurrentFrame, Ne = we.getStackAddendum();
152
152
  Ne !== "" && (ae += "%s", ue = ue.concat([Ne]));
153
153
  var Le = ue.map(function(je) {
154
154
  return String(je);
@@ -282,7 +282,7 @@ function lh() {
282
282
  S < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
283
283
  }
284
284
  }
285
- var I = y.ReactCurrentDispatcher, H;
285
+ var I = D.ReactCurrentDispatcher, H;
286
286
  function ee(O, ae, ue) {
287
287
  {
288
288
  if (H === void 0)
@@ -408,7 +408,7 @@ function lh() {
408
408
  }
409
409
  return "";
410
410
  }
411
- var Ee = Object.prototype.hasOwnProperty, Fe = {}, Ze = y.ReactDebugCurrentFrame;
411
+ var Ee = Object.prototype.hasOwnProperty, Fe = {}, Ze = D.ReactDebugCurrentFrame;
412
412
  function He(O) {
413
413
  if (O) {
414
414
  var ae = O._owner, ue = Ae(O.type, O._source, ae ? ae.type : null);
@@ -459,7 +459,7 @@ function lh() {
459
459
  if (We(O))
460
460
  return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Oe(O)), V(O);
461
461
  }
462
- var ge = y.ReactCurrentOwner, ye = {
462
+ var ge = D.ReactCurrentOwner, ye = {
463
463
  key: !0,
464
464
  ref: !0,
465
465
  __self: !0,
@@ -557,7 +557,7 @@ function lh() {
557
557
  return Dt(O, Te, ut, Ne, we, ge.current, je);
558
558
  }
559
559
  }
560
- var or = y.ReactCurrentOwner, qr = y.ReactDebugCurrentFrame;
560
+ var or = D.ReactCurrentOwner, qr = D.ReactDebugCurrentFrame;
561
561
  function On(O) {
562
562
  if (O) {
563
563
  var ae = O._owner, ue = Ae(O.type, O._source, ae ? ae.type : null);
@@ -631,7 +631,7 @@ Check the top-level render call using <` + ue + ">.");
631
631
  else if (ai(O))
632
632
  O._store && (O._store.validated = !0);
633
633
  else if (O) {
634
- var Ne = D(O);
634
+ var Ne = y(O);
635
635
  if (typeof Ne == "function" && Ne !== O.entries)
636
636
  for (var Le = Ne.call(O), je; !(je = Le.next()).done; )
637
637
  ai(je.value) && Co(je.value, ae);
@@ -738,7 +738,7 @@ function yc(e, t, n) {
738
738
  if (typeof e != "function")
739
739
  throw new TypeError("Expected a function");
740
740
  t = +t || 0;
741
- var g = !!(n = n || {}).leading, f = !("trailing" in n) || !!n.trailing, D = "maxWait" in n, y = "debounceOnServer" in n && !!n.debounceOnServer, x = D ? Math.max(+n.maxWait || 0, t) : null;
741
+ var g = !!(n = n || {}).leading, f = !("trailing" in n) || !!n.trailing, y = "maxWait" in n, D = "debounceOnServer" in n && !!n.debounceOnServer, x = y ? Math.max(+n.maxWait || 0, t) : null;
742
742
  he(function() {
743
743
  return h.current = !0, function() {
744
744
  h.current = !1;
@@ -754,7 +754,7 @@ function yc(e, t, n) {
754
754
  if (!h.current)
755
755
  return !1;
756
756
  var R = M - a.current;
757
- return !a.current || R >= t || R < 0 || D && M - i.current >= x;
757
+ return !a.current || R >= t || R < 0 || y && M - i.current >= x;
758
758
  }, T = function(M) {
759
759
  return s.current = null, f && o.current ? k(M) : (o.current = l.current = null, u.current);
760
760
  }, $ = function M() {
@@ -762,16 +762,16 @@ function yc(e, t, n) {
762
762
  if (A(R))
763
763
  return T(R);
764
764
  if (h.current) {
765
- var w = t - (R - a.current), E = D ? Math.min(w, x - (R - i.current)) : w;
765
+ var w = t - (R - a.current), E = y ? Math.min(w, x - (R - i.current)) : w;
766
766
  C(M, E);
767
767
  }
768
768
  }, N = function() {
769
- if (p || y) {
769
+ if (p || D) {
770
770
  var M = Date.now(), R = A(M);
771
771
  if (o.current = [].slice.call(arguments), l.current = r, a.current = M, R) {
772
772
  if (!s.current && h.current)
773
773
  return i.current = a.current, C($, t), g ? k(a.current) : u.current;
774
- if (D)
774
+ if (y)
775
775
  return C($, t), k(a.current);
776
776
  }
777
777
  return s.current || C($, t), u.current;
@@ -784,7 +784,7 @@ function yc(e, t, n) {
784
784
  }, N.flush = function() {
785
785
  return s.current ? T(Date.now()) : u.current;
786
786
  }, N;
787
- }, [g, D, t, x, f, m, p, y]);
787
+ }, [g, y, t, x, f, m, p, D]);
788
788
  return B;
789
789
  }
790
790
  function Dc(e, t, n) {
@@ -890,7 +890,7 @@ const Fo = {}, nr = Ps(
890
890
  callbacks: o = {},
891
891
  ...l
892
892
  }, u) => {
893
- const c = ce(), h = ke(null), p = u || h, [m, g] = de(n ? "open" : "hidden"), { extraPadding: f = !0, hasPointer: D = !1, hasForm: y = !1 } = t, { onOpen: x = () => {
893
+ const c = ce(), h = ke(null), p = u || h, [m, g] = de(n ? "open" : "hidden"), { extraPadding: f = !0, hasPointer: y = !1, hasForm: D = !1 } = t, { onOpen: x = () => {
894
894
  }, onClose: B = () => {
895
895
  } } = o;
896
896
  e || (e = Date.now().toString());
@@ -922,9 +922,9 @@ const Fo = {}, nr = Ps(
922
922
  className: Z("tooltip text-medium", m, i, {
923
923
  loading: r,
924
924
  "extra-padding": f,
925
- "has-pointer": D,
926
- bottom: D === "bottom",
927
- "has-form": y
925
+ "has-pointer": y,
926
+ bottom: y === "bottom",
927
+ "has-form": D
928
928
  }),
929
929
  ...T,
930
930
  children: /* @__PURE__ */ d.jsx("div", { className: "content", hidden: m === "hidden", children: r ? /* @__PURE__ */ d.jsx("p", { children: c.formatMessage({ id: "tooltip_loading" }) }) : typeof a == "string" ? /* @__PURE__ */ d.jsx("p", { children: a }) : a })
@@ -1602,17 +1602,17 @@ const Se = ({
1602
1602
  children: h = !1,
1603
1603
  ...p
1604
1604
  }) => {
1605
- const g = Mr(typeof t == "object"), { showTooltip: f, tooltipProps: D } = wc(!!u);
1605
+ const g = Mr(typeof t == "object"), { showTooltip: f, tooltipProps: y } = wc(!!u);
1606
1606
  if (typeof t == "object" && typeof g == "number") {
1607
1607
  const k = Object.assign({}, t), C = Cc(Object.keys(k));
1608
1608
  t = Ec(g, C, k);
1609
1609
  }
1610
1610
  !l && u && (u = "");
1611
- const y = [];
1612
- typeof t == "string" && y.push(t), r && (y.push("icon"), typeof r == "object" ? (y.push(r.icon), r.position ? y.push(r.position) : y.push("left"), r.hover && y.push(`hover_${r.hover}`), r.animate && (y.push("animate"), typeof r.animate == "string" && y.push(r.animate))) : (y.push(r), !r.includes("right") && !r.includes("left") && y.push("left"))), n.muted && y.push("muted"), n.fullWidth && y.push("full-width");
1611
+ const D = [];
1612
+ typeof t == "string" && D.push(t), r && (D.push("icon"), typeof r == "object" ? (D.push(r.icon), r.position ? D.push(r.position) : D.push("left"), r.hover && D.push(`hover_${r.hover}`), r.animate && (D.push("animate"), typeof r.animate == "string" && D.push(r.animate))) : (D.push(r), !r.includes("right") && !r.includes("left") && D.push("left"))), n.muted && D.push("muted"), n.fullWidth && D.push("full-width");
1613
1613
  const x = {
1614
1614
  ...p,
1615
- className: Z(e, o, y, {
1615
+ className: Z(e, o, D, {
1616
1616
  "no-text": !h,
1617
1617
  disabled: l,
1618
1618
  button: a
@@ -1628,7 +1628,7 @@ const Se = ({
1628
1628
  x,
1629
1629
  h || (c ? /* @__PURE__ */ d.jsx(qe, { showOnFocus: !1, children: c }) : null)
1630
1630
  );
1631
- return l && u ? /* @__PURE__ */ d.jsxs("span", { className: "button-container", ...D, children: [
1631
+ return l && u ? /* @__PURE__ */ d.jsxs("span", { className: "button-container", ...y, children: [
1632
1632
  /* @__PURE__ */ d.jsx(nr, { isOpen: f, children: u }),
1633
1633
  B
1634
1634
  ] }) : B;
@@ -1768,51 +1768,50 @@ const Cn = ({ className: e = "", maxWidth: t = !1 }) => {
1768
1768
  const $r = ({ image: e, className: t, testId: n }) => {
1769
1769
  const {
1770
1770
  description: r,
1771
- alt: a,
1772
- height: i,
1773
- type: s,
1774
- query: o,
1775
- url: l,
1776
- width: u,
1777
- loading: c,
1778
- decoding: h,
1779
- fetchPriority: p
1780
- } = e, { range: m, sizes: g } = Sh(e), f = si({ format: "avif", query: o, range: m, url: l }), D = si({ format: "webp", query: o, range: m, url: l }), y = si({ format: "", query: o, range: m, url: l });
1781
- return s && s.includes("svg") ? /* @__PURE__ */ d.jsx("picture", { className: t, children: /* @__PURE__ */ d.jsx(
1771
+ height: a,
1772
+ type: i,
1773
+ query: s,
1774
+ url: o,
1775
+ width: l,
1776
+ loading: u,
1777
+ decoding: c,
1778
+ fetchPriority: h
1779
+ } = e, { range: p, sizes: m } = Sh(e), g = si({ format: "avif", query: s, range: p, url: o }), f = si({ format: "webp", query: s, range: p, url: o }), y = si({ format: "", query: s, range: p, url: o });
1780
+ return i && i.includes("svg") ? /* @__PURE__ */ d.jsx("picture", { className: t, children: /* @__PURE__ */ d.jsx(
1782
1781
  "img",
1783
1782
  {
1784
- src: l,
1783
+ src: o,
1785
1784
  alt: r,
1786
- loading: c || "lazy",
1787
- decoding: h || "async",
1788
- fetchpriority: p || "auto",
1789
- width: u,
1790
- height: i,
1785
+ loading: u || "lazy",
1786
+ decoding: c || "async",
1787
+ fetchpriority: h || "auto",
1788
+ width: l,
1789
+ height: a,
1791
1790
  "data-testid": n || "image"
1792
1791
  }
1793
1792
  ) }) : /* @__PURE__ */ d.jsxs("picture", { className: t, children: [
1794
- s !== "image/gif" && /* @__PURE__ */ d.jsx(
1793
+ i !== "image/gif" && /* @__PURE__ */ d.jsx(
1795
1794
  "source",
1796
1795
  {
1797
1796
  type: "image/avif",
1798
- srcSet: f,
1799
- sizes: g,
1797
+ srcSet: g,
1798
+ sizes: m,
1800
1799
  "data-testid": "source"
1801
1800
  }
1802
1801
  ),
1803
- /* @__PURE__ */ d.jsx("source", { type: "image/webp", srcSet: D, sizes: g, "data-testid": "source" }),
1802
+ /* @__PURE__ */ d.jsx("source", { type: "image/webp", srcSet: f, sizes: m, "data-testid": "source" }),
1804
1803
  /* @__PURE__ */ d.jsx(
1805
1804
  "img",
1806
1805
  {
1807
1806
  srcSet: y,
1808
- sizes: g,
1809
- src: l,
1810
- alt: a || r,
1811
- loading: c || "lazy",
1812
- decoding: h || "async",
1813
- fetchpriority: p || "auto",
1814
- width: u,
1815
- height: i,
1807
+ sizes: m,
1808
+ src: o,
1809
+ alt: r,
1810
+ loading: u || "lazy",
1811
+ decoding: c || "async",
1812
+ fetchpriority: h || "auto",
1813
+ width: l,
1814
+ height: a,
1816
1815
  "data-testid": n || "image"
1817
1816
  }
1818
1817
  )
@@ -2136,7 +2135,7 @@ const $h = ({
2136
2135
  h === "ready-to-close" && p("closing");
2137
2136
  }, [h]);
2138
2137
  const m = ({ propertyName: f }) => {
2139
- f === "max-height" && p((D) => D === "opening" ? "open" : D === "closing" ? "closed" : D);
2138
+ f === "max-height" && p((y) => y === "opening" ? "open" : y === "closing" ? "closed" : y);
2140
2139
  };
2141
2140
  if (!a)
2142
2141
  return null;
@@ -2554,9 +2553,8 @@ const Lo = 256, Tn = ({
2554
2553
  height: i = Lo,
2555
2554
  ...s
2556
2555
  }) => {
2557
- const [o, l] = de(!1), u = ke(null);
2558
- let c = r;
2559
- c === "" ? c = "" : r == null && (c = n), he(() => {
2556
+ const [o, l] = de(!1), u = ke(null), c = r ?? n;
2557
+ he(() => {
2560
2558
  const p = u.current;
2561
2559
  if (!p)
2562
2560
  return;
@@ -2628,7 +2626,7 @@ const Ir = ({
2628
2626
  const { name: p, image: m } = h;
2629
2627
  let { url: g } = h;
2630
2628
  t.link !== void 0 && (t.link === !1 ? g = void 0 : g = t.link);
2631
- const f = Qh(h), D = n && n.createdAt ? ss(n.createdAt) : !1, y = n && n.createdAt ? kc(n.createdAt) : "";
2629
+ const f = Qh(h), y = n && n.createdAt ? ss(n.createdAt) : !1, D = n && n.createdAt ? kc(n.createdAt) : "";
2632
2630
  return re.createElement(e, {
2633
2631
  className: Z("member text-medium", c, o),
2634
2632
  ...a,
@@ -2647,9 +2645,9 @@ const Ir = ({
2647
2645
  /* @__PURE__ */ d.jsxs("strong", { children: [
2648
2646
  p,
2649
2647
  n && /* @__PURE__ */ d.jsxs("span", { className: "additional-content", children: [
2650
- n.createdAt && D && /* @__PURE__ */ d.jsx("span", { className: "date", title: y, "aria-label": y, children: u.formatMessage(
2651
- { id: `dates_${D.path}` },
2652
- { number: D.number }
2648
+ n.createdAt && y && /* @__PURE__ */ d.jsx("span", { className: "date", title: D, "aria-label": D, children: u.formatMessage(
2649
+ { id: `dates_${y.path}` },
2650
+ { number: y.number }
2653
2651
  ) }),
2654
2652
  n.didEdit && /* @__PURE__ */ d.jsx("em", { children: u.formatMessage({ id: "discussion_edited" }) })
2655
2653
  ] })
@@ -2686,27 +2684,27 @@ const zo = {
2686
2684
  /* @__PURE__ */ d.jsx("ul", { children: n.map((p, m) => {
2687
2685
  let g, f = "";
2688
2686
  if (m < o) {
2689
- const { name: D = "", image: y = "" } = Pc(p);
2687
+ const { name: y = "", image: D = "" } = Pc(p);
2690
2688
  if (s)
2691
2689
  return /* @__PURE__ */ d.jsx(Pt, { element: "li", className: "contributor" }, m);
2692
2690
  g = /* @__PURE__ */ d.jsx(
2693
2691
  Tn,
2694
2692
  {
2695
- name: D,
2696
- src: y,
2693
+ name: y,
2694
+ src: D,
2697
2695
  width: zo[a || "medium"],
2698
2696
  height: zo[a || "medium"]
2699
2697
  }
2700
2698
  );
2701
2699
  } else if (m === o) {
2702
- const D = (t || n.length) - o;
2700
+ const y = (t || n.length) - o;
2703
2701
  g = /* @__PURE__ */ d.jsxs(
2704
2702
  "small",
2705
2703
  {
2706
- className: Z({ "large-number": D > 99 }),
2704
+ className: Z({ "large-number": y > 99 }),
2707
2705
  children: [
2708
2706
  "+",
2709
- Bh(D, 0)
2707
+ Bh(y, 0)
2710
2708
  ]
2711
2709
  }
2712
2710
  ), f = "number-left";
@@ -2773,7 +2771,7 @@ const Vr = "emailHelperTextBox_", Xh = ({
2773
2771
  "data-gtm-event-context": "VerifyEmailBox",
2774
2772
  "data-gtm-event-type": "SendEmailClick",
2775
2773
  className: "gtm-trackable",
2776
- onClick: (D) => u(D),
2774
+ onClick: (y) => u(y),
2777
2775
  href: "#",
2778
2776
  "data-testid": "send-verify-email-click"
2779
2777
  },
@@ -2803,7 +2801,7 @@ const Vr = "emailHelperTextBox_", Xh = ({
2803
2801
  );
2804
2802
  he(
2805
2803
  () => {
2806
- let m = Vr, g = "default", f = {}, D = {};
2804
+ let m = Vr, g = "default", f = {}, y = {};
2807
2805
  switch (e) {
2808
2806
  case "gov":
2809
2807
  m += "autoApproved", g = "success";
@@ -2816,7 +2814,7 @@ const Vr = "emailHelperTextBox_", Xh = ({
2816
2814
  };
2817
2815
  break;
2818
2816
  case "pending":
2819
- m += "pendingApproval", g = "error", D = {
2817
+ m += "pendingApproval", g = "error", y = {
2820
2818
  href: "mailto:concierge@apolitical.co",
2821
2819
  className: "gtm-trackable",
2822
2820
  "data-gtm-event-context": "EmailExistsBox",
@@ -2829,7 +2827,7 @@ const Vr = "emailHelperTextBox_", Xh = ({
2829
2827
  "data-gtm-event-context": "VerifyEmailBox",
2830
2828
  "data-gtm-event-type": "SendEmailClick",
2831
2829
  className: "gtm-trackable",
2832
- onClick: (y) => u(y),
2830
+ onClick: (D) => u(D),
2833
2831
  "data-testid": "send-verify-email-click"
2834
2832
  };
2835
2833
  break;
@@ -2838,7 +2836,7 @@ const Vr = "emailHelperTextBox_", Xh = ({
2838
2836
  href: "/user-onboarding/login",
2839
2837
  "data-gtm-event-context": "EmailExistsBox",
2840
2838
  "data-gtm-event-type": "login-click"
2841
- }, D = {
2839
+ }, y = {
2842
2840
  href: "mailto:concierge@apolitical.co",
2843
2841
  className: "gtm-trackable",
2844
2842
  "data-gtm-event-context": "EmailExistsBox",
@@ -2853,7 +2851,7 @@ const Vr = "emailHelperTextBox_", Xh = ({
2853
2851
  };
2854
2852
  break;
2855
2853
  }
2856
- s({ ...i, path: m, type: g, link: f, mail: D });
2854
+ s({ ...i, path: m, type: g, link: f, mail: y });
2857
2855
  },
2858
2856
  /* eslint-disable react-hooks/exhaustive-deps */
2859
2857
  [e]
@@ -2951,8 +2949,8 @@ const Nn = {
2951
2949
  predictions: [],
2952
2950
  activePredictionIndex: -1,
2953
2951
  isPredictionSelected: !!n
2954
- }), { formatMessage: D } = ce();
2955
- r || (r = D({ id: "inputAutocomplete_placeholder" })), he(() => {
2952
+ }), { formatMessage: y } = ce();
2953
+ r || (r = y({ id: "inputAutocomplete_placeholder" })), he(() => {
2956
2954
  const k = setTimeout(() => {
2957
2955
  g || h((C) => ({ ...C, debouncedInput: l }));
2958
2956
  }, em);
@@ -2977,7 +2975,7 @@ const Nn = {
2977
2975
  displayInput: p[m].description
2978
2976
  }));
2979
2977
  }, [m, p]);
2980
- const y = (k) => {
2978
+ const D = (k) => {
2981
2979
  [Nn.DOWN, Nn.UP, Nn.ENTER].includes(k.key) && (k.preventDefault(), k.key === Nn.DOWN && m < p.length - 1 ? f((C) => ({
2982
2980
  ...C,
2983
2981
  activePredictionIndex: m + 1
@@ -3020,7 +3018,7 @@ const Nn = {
3020
3018
  type: "text",
3021
3019
  value: u,
3022
3020
  onChange: x,
3023
- onKeyDown: y,
3021
+ onKeyDown: D,
3024
3022
  placeholder: r,
3025
3023
  name: t,
3026
3024
  id: e,
@@ -3061,7 +3059,7 @@ const Mc = ({
3061
3059
  }) => {
3062
3060
  const p = ce(), { onChange: m, ...g } = r, f = () => {
3063
3061
  t || m(c ? null : l);
3064
- }, D = /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
3062
+ }, y = /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
3065
3063
  /* @__PURE__ */ d.jsx(
3066
3064
  "input",
3067
3065
  {
@@ -3071,8 +3069,8 @@ const Mc = ({
3071
3069
  type: u,
3072
3070
  value: l,
3073
3071
  checked: c,
3074
- onKeyDown: (y) => {
3075
- (y.key === "Enter" || y.code === "Space") && (y.preventDefault(), y.stopPropagation(), f());
3072
+ onKeyDown: (D) => {
3073
+ (D.key === "Enter" || D.code === "Space") && (D.preventDefault(), D.stopPropagation(), f());
3076
3074
  },
3077
3075
  readOnly: !0,
3078
3076
  disabled: t
@@ -3086,15 +3084,15 @@ const Mc = ({
3086
3084
  return re.createElement(
3087
3085
  n,
3088
3086
  {
3089
- onClick: (y) => {
3090
- const x = y.target;
3091
- x.nodeName.toLowerCase() === "a" || x.parentNode && x.parentNode.nodeName.toLowerCase() === "a" || (y.preventDefault(), y.stopPropagation(), f());
3087
+ onClick: (D) => {
3088
+ const x = D.target;
3089
+ x.nodeName.toLowerCase() === "a" || x.parentNode && x.parentNode.nodeName.toLowerCase() === "a" || (D.preventDefault(), D.stopPropagation(), f());
3092
3090
  },
3093
3091
  className: Z("checkbox-wrapper", e),
3094
3092
  ...h,
3095
3093
  ...g
3096
3094
  },
3097
- D
3095
+ y
3098
3096
  );
3099
3097
  };
3100
3098
  const nm = Wt(function({
@@ -3121,23 +3119,23 @@ const rm = ({
3121
3119
  multiSelectOptions: l,
3122
3120
  id: u
3123
3121
  }) => {
3124
- const c = ce(), [h, p] = de(!1), m = r || n, g = Array.isArray(m) ? [...m] : m ? [m] : [], [f, D] = de(g);
3125
- let y;
3126
- Array.isArray(f) && f.length === 1 && typeof f[0] == "string" ? y = t && f ? t.find((T) => T.id === f[0]) : t ? t[0] : { id: "", label: "" } : Array.isArray(f) && f.length === 1 && typeof f[0] != "string" ? y = f[0] : y = { id: "", label: "" }, he(() => {
3127
- D(g);
3122
+ const c = ce(), [h, p] = de(!1), m = r || n, g = Array.isArray(m) ? [...m] : m ? [m] : [], [f, y] = de(g);
3123
+ let D;
3124
+ Array.isArray(f) && f.length === 1 && typeof f[0] == "string" ? D = t && f ? t.find((T) => T.id === f[0]) : t ? t[0] : { id: "", label: "" } : Array.isArray(f) && f.length === 1 && typeof f[0] != "string" ? D = f[0] : D = { id: "", label: "" }, he(() => {
3125
+ y(g);
3128
3126
  }, [r, n]);
3129
3127
  const { onChange: x, onMultiSelectSubmit: B, ...k } = a, C = (T) => {
3130
3128
  if (o) {
3131
3129
  let $ = [];
3132
- f != null && f.includes(T.id) ? $ = f.filter((N) => N !== T.id) : $ = [...f, T.id], D([...$]), x && x([...$]);
3130
+ f != null && f.includes(T.id) ? $ = f.filter((N) => N !== T.id) : $ = [...f, T.id], y([...$]), x && x([...$]);
3133
3131
  } else
3134
- D([T]), x && x(T.id), p(!1);
3132
+ y([T]), x && x(T.id), p(!1);
3135
3133
  }, A = (T) => {
3136
3134
  if (T === "all") {
3137
3135
  const $ = (t == null ? void 0 : t.map((N) => N.id)) || [];
3138
- D($), x && x($);
3136
+ y($), x && x($);
3139
3137
  } else
3140
- D([]), x && x([]);
3138
+ y([]), x && x([]);
3141
3139
  };
3142
3140
  return /* @__PURE__ */ d.jsxs("div", { className: Z("dropdown-wrapper", e), children: [
3143
3141
  /* @__PURE__ */ d.jsxs(
@@ -3153,7 +3151,7 @@ const rm = ({
3153
3151
  "data-testid": "dropdown-selector",
3154
3152
  ...k,
3155
3153
  children: [
3156
- o ? `${s} · ${f.length}` : y.label,
3154
+ o ? `${s} · ${f.length}` : D.label,
3157
3155
  /* @__PURE__ */ d.jsx(nm, { direction: h ? "up" : "down" })
3158
3156
  ]
3159
3157
  }
@@ -3161,7 +3159,7 @@ const rm = ({
3161
3159
  /* @__PURE__ */ d.jsx(
3162
3160
  "select",
3163
3161
  {
3164
- defaultValue: y.id,
3162
+ defaultValue: D.id,
3165
3163
  onChange: (T) => {
3166
3164
  T.preventDefault(), T.stopPropagation();
3167
3165
  const $ = t && t.find((N) => N.id === T.target.value);
@@ -3206,7 +3204,7 @@ const rm = ({
3206
3204
  ] })
3207
3205
  ] }),
3208
3206
  /* @__PURE__ */ d.jsx("ul", { children: t == null ? void 0 : t.map((T) => {
3209
- const $ = T.id === y.id || (f == null ? void 0 : f.includes(T)) || (f == null ? void 0 : f.includes(T.id));
3207
+ const $ = T.id === D.id || (f == null ? void 0 : f.includes(T)) || (f == null ? void 0 : f.includes(T.id));
3210
3208
  return /* @__PURE__ */ d.jsx("li", { "data-testid": "dropdown-options", children: /* @__PURE__ */ d.jsxs(
3211
3209
  "button",
3212
3210
  {
@@ -3277,8 +3275,8 @@ const am = ({
3277
3275
  children: o == null ? void 0 : o.map(
3278
3276
  ({
3279
3277
  id: f,
3280
- label: D = !1,
3281
- value: y = f,
3278
+ label: y = !1,
3279
+ value: D = f,
3282
3280
  disabled: x = !1
3283
3281
  }) => {
3284
3282
  const B = `${r}_${f}`, k = () => {
@@ -3286,10 +3284,10 @@ const am = ({
3286
3284
  return;
3287
3285
  let C;
3288
3286
  if (i) {
3289
- const A = m == null ? void 0 : m.indexOf(y);
3290
- Array.isArray(m) && A >= 0 ? (C = m, C.splice(A, 1)) : (!m || m.length === 0 ? C = [] : C = m, C.push(y));
3287
+ const A = m == null ? void 0 : m.indexOf(D);
3288
+ Array.isArray(m) && A >= 0 ? (C = m, C.splice(A, 1)) : (!m || m.length === 0 ? C = [] : C = m, C.push(D));
3291
3289
  } else
3292
- C = g === y ? void 0 : y;
3290
+ C = g === D ? void 0 : D;
3293
3291
  t.onChange(C);
3294
3292
  };
3295
3293
  return /* @__PURE__ */ d.jsx(
@@ -3298,14 +3296,14 @@ const am = ({
3298
3296
  element: "li",
3299
3297
  id: B,
3300
3298
  type: u === "checkboxes" ? "checkbox" : "radio",
3301
- shownValue: y,
3302
- value: i ? m == null ? void 0 : m.includes(y) : g === y,
3299
+ shownValue: D,
3300
+ value: i ? m == null ? void 0 : m.includes(D) : g === D,
3303
3301
  functions: {
3304
3302
  ...t,
3305
3303
  onChange: k
3306
3304
  },
3307
3305
  intlPath: n,
3308
- label: D || p.formatMessage({
3306
+ label: y || p.formatMessage({
3309
3307
  id: n ? `${n}_${f}` : f
3310
3308
  }),
3311
3309
  disabled: x
@@ -3374,9 +3372,9 @@ const Rn = {
3374
3372
  submitOnEnter: c,
3375
3373
  ...h
3376
3374
  }) => {
3377
- const p = ce(), m = l && l.some(({ condition: C }) => C === "required"), g = Is(u), f = o && Rn[o] && Rn[o].component ? Rn[o].component : zn, D = {};
3378
- o && ["checkboxes"].includes(o) ? D.element = "span" : D.htmlFor = e;
3379
- let y = {
3375
+ const p = ce(), m = l && l.some(({ condition: C }) => C === "required"), g = Is(u), f = o && Rn[o] && Rn[o].component ? Rn[o].component : zn, y = {};
3376
+ o && ["checkboxes"].includes(o) ? y.element = "span" : y.htmlFor = e;
3377
+ let D = {
3380
3378
  ...h,
3381
3379
  id: e,
3382
3380
  name: e,
@@ -3389,15 +3387,15 @@ const Rn = {
3389
3387
  };
3390
3388
  if (i > 0) {
3391
3389
  const C = Jh(i, a.onChange);
3392
- y = {
3393
- ...y,
3390
+ D = {
3391
+ ...D,
3394
3392
  ...C
3395
- }, C.functions && typeof C.functions == "object" && (y.functions = {
3396
- ...y.functions,
3393
+ }, C.functions && typeof C.functions == "object" && (D.functions = {
3394
+ ...D.functions,
3397
3395
  ...C.functions
3398
3396
  });
3399
3397
  }
3400
- o && Rn[o] && Rn[o].props && (y = { ...y, ...Rn[o].props }), o && ["checkboxes"].includes(o) && (y.intlPath = `${t}_${e}`), r && (y["aria-invalid"] = !0, y["aria-describedby"] = `error-${e}`);
3398
+ o && Rn[o] && Rn[o].props && (D = { ...D, ...Rn[o].props }), o && ["checkboxes"].includes(o) && (D.intlPath = `${t}_${e}`), r && (D["aria-invalid"] = !0, D["aria-describedby"] = `error-${e}`);
3401
3399
  const x = h.label || p.formatMessage({ id: t ? `${t}_${e}` : e }), B = ({ ...C }) => r ? re.createElement(
3402
3400
  C.as || "dd",
3403
3401
  {
@@ -3414,7 +3412,7 @@ const Rn = {
3414
3412
  /* @__PURE__ */ d.jsx(
3415
3413
  f,
3416
3414
  {
3417
- ...y,
3415
+ ...D,
3418
3416
  label: x,
3419
3417
  className: Z("field-wrapper", n)
3420
3418
  }
@@ -3427,7 +3425,7 @@ const Rn = {
3427
3425
  "data-testid": `label-${e}`
3428
3426
  });
3429
3427
  return /* @__PURE__ */ d.jsxs("dl", { className: Z("field-wrapper text-medium", n), children: [
3430
- /* @__PURE__ */ d.jsx("dt", { children: /* @__PURE__ */ d.jsxs(k, { ...D, children: [
3428
+ /* @__PURE__ */ d.jsx("dt", { children: /* @__PURE__ */ d.jsxs(k, { ...y, children: [
3431
3429
  x,
3432
3430
  m && s && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
3433
3431
  " ",
@@ -3439,7 +3437,7 @@ const Rn = {
3439
3437
  ] })
3440
3438
  ] }) }),
3441
3439
  /* @__PURE__ */ d.jsxs("dd", { children: [
3442
- /* @__PURE__ */ d.jsx(f, { ...y }),
3440
+ /* @__PURE__ */ d.jsx(f, { ...D }),
3443
3441
  /* @__PURE__ */ d.jsx(Rc, { limit: i, valueLength: g })
3444
3442
  ] }),
3445
3443
  /* @__PURE__ */ d.jsx(B, {})
@@ -3486,36 +3484,36 @@ const Rn = {
3486
3484
  if (p.validation)
3487
3485
  for (let m = 0; m < p.validation.length; m++) {
3488
3486
  const { condition: g = "required", error: f = !1 } = p.validation[m];
3489
- let D = !1;
3487
+ let y = !1;
3490
3488
  if (typeof g == "function") {
3491
- const y = g(i);
3492
- y && (D = f || y);
3489
+ const D = g(i);
3490
+ D && (y = f || D);
3493
3491
  } else {
3494
- const y = i[p.id];
3492
+ const D = i[p.id];
3495
3493
  switch (g) {
3496
3494
  case "required":
3497
- (!y || typeof y == "string" && y.trim().length === 0) && (D = f || (c == null ? void 0 : c.formatMessage({ id: "form_error_required" })));
3495
+ (!D || typeof D == "string" && D.trim().length === 0) && (y = f || (c == null ? void 0 : c.formatMessage({ id: "form_error_required" })));
3498
3496
  break;
3499
3497
  case "no-numbers": {
3500
- y && !/^([^0-9]*)$/.test(y) && (D = f || (c == null ? void 0 : c.formatMessage({ id: "form_error_numbers" })));
3498
+ D && !/^([^0-9]*)$/.test(D) && (y = f || (c == null ? void 0 : c.formatMessage({ id: "form_error_numbers" })));
3501
3499
  break;
3502
3500
  }
3503
3501
  case "valid-email": {
3504
- y && !/^(([^<>()[\]\\.,;:\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(y) && (D = f || (c == null ? void 0 : c.formatMessage({ id: "form_error_email" })));
3502
+ D && !/^(([^<>()[\]\\.,;:\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(D) && (y = f || (c == null ? void 0 : c.formatMessage({ id: "form_error_email" })));
3505
3503
  break;
3506
3504
  }
3507
3505
  case "valid-url": {
3508
- y && !/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(y) && (D = f || (c == null ? void 0 : c.formatMessage({ id: "form_error_url" })));
3506
+ D && !/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(D) && (y = f || (c == null ? void 0 : c.formatMessage({ id: "form_error_url" })));
3509
3507
  break;
3510
3508
  }
3511
3509
  default:
3512
3510
  console.warn("WARNING! No field validation condition has been set");
3513
3511
  }
3514
3512
  }
3515
- if (D) {
3513
+ if (y) {
3516
3514
  o({
3517
3515
  type: "addError",
3518
- payload: { key: p.id, value: D }
3516
+ payload: { key: p.id, value: y }
3519
3517
  }), h.push(p.id);
3520
3518
  break;
3521
3519
  }
@@ -3582,7 +3580,7 @@ const Lr = ({
3582
3580
  },
3583
3581
  ...g
3584
3582
  }) => {
3585
- const { customOnSubmit: f, hideButton: D, ...y } = s, x = 40, {
3583
+ const { customOnSubmit: f, hideButton: y, ...D } = s, x = 40, {
3586
3584
  shouldShowCancelButton: B = !1,
3587
3585
  shouldReset: k = !0,
3588
3586
  showRequiredLabels: C = !0,
@@ -3668,7 +3666,7 @@ const Lr = ({
3668
3666
  }
3669
3667
  }, J = [
3670
3668
  {
3671
- ...y,
3669
+ ...D,
3672
3670
  icon: E ? { icon: "tick", position: "left" } : !1,
3673
3671
  className: "gtm-trackable",
3674
3672
  onClick: (v) => {
@@ -3747,7 +3745,7 @@ const Lr = ({
3747
3745
  X
3748
3746
  );
3749
3747
  }),
3750
- D ? null : (w || E) && f ? f : /* @__PURE__ */ d.jsx(
3748
+ y ? null : (w || E) && f ? f : /* @__PURE__ */ d.jsx(
3751
3749
  ar,
3752
3750
  {
3753
3751
  className: Z("cta", {
@@ -3819,15 +3817,15 @@ const ME = ({
3819
3817
  disabled: !0
3820
3818
  }), c = async () => {
3821
3819
  try {
3822
- const y = await n();
3820
+ const D = await n();
3823
3821
  u((x) => ({
3824
3822
  ...x,
3825
3823
  setUp: !0,
3826
- id: y && y.id,
3824
+ id: D && D.id,
3827
3825
  disabled: !1
3828
3826
  }));
3829
- } catch (y) {
3830
- u((x) => ({ ...x, setUp: !0, disabled: !0 })), a(y);
3827
+ } catch (D) {
3828
+ u((x) => ({ ...x, setUp: !0, disabled: !0 })), a(D);
3831
3829
  }
3832
3830
  };
3833
3831
  if (he(() => {
@@ -3840,10 +3838,10 @@ const ME = ({
3840
3838
  high: o.formatMessage({ id: `${g}high` }),
3841
3839
  success: o.formatMessage({ id: `${g}success` }),
3842
3840
  ...e
3843
- }, D = async (y) => {
3841
+ }, y = async (D) => {
3844
3842
  if (!(!h || m))
3845
3843
  try {
3846
- u((x) => ({ ...x, rating: y, disabled: !0 })), await r({ id: h, value: y });
3844
+ u((x) => ({ ...x, rating: D, disabled: !0 })), await r({ id: h, value: D });
3847
3845
  } catch (x) {
3848
3846
  u((B) => ({ ...B, rating: null })), a(x);
3849
3847
  } finally {
@@ -3852,8 +3850,8 @@ const ME = ({
3852
3850
  };
3853
3851
  return /* @__PURE__ */ d.jsxs("div", { className: Z("rating", i), children: [
3854
3852
  /* @__PURE__ */ d.jsx("span", { className: "label", children: f[p ? "success" : "text"] }),
3855
- /* @__PURE__ */ d.jsx("ol", { children: Array.from(new Array(t).keys()).map((y) => {
3856
- const x = y + 1;
3853
+ /* @__PURE__ */ d.jsx("ol", { children: Array.from(new Array(t).keys()).map((D) => {
3854
+ const x = D + 1;
3857
3855
  return /* @__PURE__ */ d.jsx(
3858
3856
  "li",
3859
3857
  {
@@ -3873,7 +3871,7 @@ const ME = ({
3873
3871
  { number: x, total: t }
3874
3872
  )}${x === 1 || x === t ? ` - ${f[x === 1 ? "low" : "high"]}` : ""}`,
3875
3873
  onClick: (B) => {
3876
- B.preventDefault(), B.stopPropagation(), D(x);
3874
+ B.preventDefault(), B.stopPropagation(), y(x);
3877
3875
  },
3878
3876
  disabled: m
3879
3877
  }
@@ -5303,20 +5301,20 @@ var Jm = (e, t, n) => {
5303
5301
  break;
5304
5302
  var p = oe.leaf(e, u), m = p.text.slice(0, c), g = p.text.slice(c);
5305
5303
  if (p.text = m + h + g, t)
5306
- for (var [f, D] of U.points(t))
5307
- t[D] = Be.transform(f, n);
5304
+ for (var [f, y] of U.points(t))
5305
+ t[y] = Be.transform(f, n);
5308
5306
  break;
5309
5307
  }
5310
5308
  case "merge_node": {
5311
5309
  var {
5312
- path: y
5313
- } = n, x = oe.get(e, y), B = P.previous(y), k = oe.get(e, B), C = oe.parent(e, y), A = y[y.length - 1];
5310
+ path: D
5311
+ } = n, x = oe.get(e, D), B = P.previous(D), k = oe.get(e, B), C = oe.parent(e, D), A = D[D.length - 1];
5314
5312
  if (fe.isText(x) && fe.isText(k))
5315
5313
  k.text += x.text;
5316
5314
  else if (!fe.isText(x) && !fe.isText(k))
5317
5315
  k.children.push(...x.children);
5318
5316
  else
5319
- throw new Error('Cannot apply a "merge_node" operation at path ['.concat(y, "] to nodes of different interfaces: ").concat(nt.stringify(x), " ").concat(nt.stringify(k)));
5317
+ throw new Error('Cannot apply a "merge_node" operation at path ['.concat(D, "] to nodes of different interfaces: ").concat(nt.stringify(x), " ").concat(nt.stringify(k)));
5320
5318
  if (C.children.splice(A, 1), t)
5321
5319
  for (var [T, $] of U.points(t))
5322
5320
  t[$] = Be.transform(T, n);
@@ -6376,13 +6374,13 @@ var fe = {
6376
6374
  o.push(h);
6377
6375
  continue;
6378
6376
  }
6379
- var g = h, f = void 0, D = void 0;
6377
+ var g = h, f = void 0, y = void 0;
6380
6378
  if (c < l) {
6381
- var y = c - m;
6382
- D = Vt(Vt({}, g), {}, {
6383
- text: g.text.slice(y)
6379
+ var D = c - m;
6380
+ y = Vt(Vt({}, g), {}, {
6381
+ text: g.text.slice(D)
6384
6382
  }), g = Vt(Vt({}, g), {}, {
6385
- text: g.text.slice(0, y)
6383
+ text: g.text.slice(0, D)
6386
6384
  });
6387
6385
  }
6388
6386
  if (u > m) {
@@ -6393,7 +6391,7 @@ var fe = {
6393
6391
  text: g.text.slice(x)
6394
6392
  });
6395
6393
  }
6396
- Object.assign(g, a), f && o.push(f), o.push(g), D && o.push(D);
6394
+ Object.assign(g, a), f && o.push(f), o.push(g), y && o.push(y);
6397
6395
  }
6398
6396
  n = o;
6399
6397
  }
@@ -6651,9 +6649,9 @@ var Mp = (e, t) => {
6651
6649
  var f = P.transform(g, t);
6652
6650
  p.push(f);
6653
6651
  }
6654
- for (var D of P.ancestors(h)) {
6655
- var y = P.transform(D, t);
6656
- m.push(y);
6652
+ for (var y of P.ancestors(h)) {
6653
+ var D = P.transform(y, t);
6654
+ m.push(D);
6657
6655
  }
6658
6656
  var x = m[m.length - 1], B = h[h.length - 1], k = x.concat(B);
6659
6657
  return [...p, ...m, k];
@@ -7130,8 +7128,8 @@ var yg = ["text"], Dg = ["text"], xg = function(t) {
7130
7128
  match: (k) => le.isElement(k) && b.isBlock(t, k)
7131
7129
  });
7132
7130
  if (m && f) {
7133
- var [D, y] = m, [, x] = f;
7134
- P.isAncestor(x, y) && (p = D);
7131
+ var [y, D] = m, [, x] = f;
7132
+ P.isAncestor(x, D) && (p = y);
7135
7133
  }
7136
7134
  }
7137
7135
  }
@@ -7206,21 +7204,21 @@ function Eg(e) {
7206
7204
  return le.isElement(C) ? !!(!s && (b.isVoid(e, C) || b.isElementReadOnly(e, C)) || o && !b.isSelectable(e, C)) : !1;
7207
7205
  }
7208
7206
  }), g = [], f;
7209
- for (var [D, y] of m)
7210
- if (!(o && le.isElement(D) && !b.isSelectable(e, D))) {
7211
- var x = f && P.compare(y, f[1]) === 0;
7207
+ for (var [y, D] of m)
7208
+ if (!(o && le.isElement(y) && !b.isSelectable(e, y))) {
7209
+ var x = f && P.compare(D, f[1]) === 0;
7212
7210
  if (!(r === "highest" && x)) {
7213
- if (!l(D, y)) {
7214
- if (a && !x && fe.isText(D))
7211
+ if (!l(y, D)) {
7212
+ if (a && !x && fe.isText(y))
7215
7213
  return;
7216
7214
  continue;
7217
7215
  }
7218
7216
  if (r === "lowest" && x) {
7219
- f = [D, y];
7217
+ f = [y, D];
7220
7218
  continue;
7221
7219
  }
7222
- var B = r === "lowest" ? f : [D, y];
7223
- B && (a ? g.push(B) : yield B), f = [D, y];
7220
+ var B = r === "lowest" ? f : [y, D];
7221
+ B && (a ? g.push(B) : yield B), f = [y, D];
7224
7222
  }
7225
7223
  }
7226
7224
  r === "lowest" && f && (a ? g.push(f) : yield f), a && (yield* g);
@@ -7251,22 +7249,22 @@ var kg = function(t) {
7251
7249
  operation: a
7252
7250
  });
7253
7251
  }
7254
- for (var g = i(t), f = g.length, D = 0; g.length !== 0; ) {
7252
+ for (var g = i(t), f = g.length, y = 0; g.length !== 0; ) {
7255
7253
  if (!t.shouldNormalize({
7256
7254
  dirtyPaths: g,
7257
- iteration: D,
7255
+ iteration: y,
7258
7256
  initialDirtyPathsLength: f,
7259
7257
  operation: a
7260
7258
  }))
7261
7259
  return;
7262
- var y = o(t);
7263
- if (oe.has(t, y)) {
7264
- var x = b.node(t, y);
7260
+ var D = o(t);
7261
+ if (oe.has(t, D)) {
7262
+ var x = b.node(t, D);
7265
7263
  t.normalizeNode(x, {
7266
7264
  operation: a
7267
7265
  });
7268
7266
  }
7269
- D++, g = i(t);
7267
+ y++, g = i(t);
7270
7268
  }
7271
7269
  });
7272
7270
  }
@@ -7362,21 +7360,21 @@ function Og(e) {
7362
7360
  if (!n)
7363
7361
  return;
7364
7362
  var o = b.range(e, n), [l, u] = U.edges(o), c = a ? u : l, h = !1, p = "", m = 0, g = 0, f = 0;
7365
- for (var [D, y] of b.nodes(e, {
7363
+ for (var [y, D] of b.nodes(e, {
7366
7364
  at: n,
7367
7365
  reverse: a,
7368
7366
  voids: i,
7369
7367
  ignoreNonSelectable: s
7370
7368
  })) {
7371
- if (le.isElement(D)) {
7372
- if (!i && (e.isVoid(D) || e.isElementReadOnly(D))) {
7373
- yield b.start(e, y);
7369
+ if (le.isElement(y)) {
7370
+ if (!i && (e.isVoid(y) || e.isElementReadOnly(y))) {
7371
+ yield b.start(e, D);
7374
7372
  continue;
7375
7373
  }
7376
- if (e.isInline(D))
7374
+ if (e.isInline(y))
7377
7375
  continue;
7378
- if (b.hasInlines(e, D)) {
7379
- var x = P.isAncestor(y, u.path) ? u : b.end(e, y), B = P.isAncestor(y, l.path) ? l : b.start(e, y);
7376
+ if (b.hasInlines(e, y)) {
7377
+ var x = P.isAncestor(D, u.path) ? u : b.end(e, D), B = P.isAncestor(D, l.path) ? l : b.start(e, D);
7380
7378
  p = b.string(e, {
7381
7379
  anchor: B,
7382
7380
  focus: x
@@ -7385,10 +7383,10 @@ function Og(e) {
7385
7383
  }), h = !0;
7386
7384
  }
7387
7385
  }
7388
- if (fe.isText(D)) {
7389
- var k = P.equals(y, c.path);
7390
- for (k ? (g = a ? c.offset : D.text.length - c.offset, f = c.offset) : (g = D.text.length, f = a ? g : 0), (k || h || r === "offset") && (yield {
7391
- path: y,
7386
+ if (fe.isText(y)) {
7387
+ var k = P.equals(D, c.path);
7388
+ for (k ? (g = a ? c.offset : y.text.length - c.offset, f = c.offset) : (g = y.text.length, f = a ? g : 0), (k || h || r === "offset") && (yield {
7389
+ path: D,
7392
7390
  offset: f
7393
7391
  }, h = !1); ; ) {
7394
7392
  if (m === 0) {
@@ -7401,7 +7399,7 @@ function Og(e) {
7401
7399
  break;
7402
7400
  }
7403
7401
  m = 0, yield {
7404
- path: y,
7402
+ path: D,
7405
7403
  offset: f
7406
7404
  };
7407
7405
  }
@@ -7624,8 +7622,8 @@ var Ig = (e, t) => {
7624
7622
  }
7625
7623
  if (!U.isCollapsed(u)) {
7626
7624
  if (!c) {
7627
- var [, D] = U.edges(u), y = b.end(t, []);
7628
- Be.equals(D, y) || (u = b.unhangRange(t, u, {
7625
+ var [, y] = U.edges(u), D = b.end(t, []);
7626
+ Be.equals(y, D) || (u = b.unhangRange(t, u, {
7629
7627
  voids: l
7630
7628
  }));
7631
7629
  }
@@ -7759,7 +7757,7 @@ var Ig = (e, t) => {
7759
7757
  match: (q) => le.isElement(q) && b.isBlock(t, q),
7760
7758
  at: s,
7761
7759
  voids: i
7762
- }), [, f] = g, D = b.isStart(t, s, f), y = b.isEnd(t, s, f), x = D && y, B = !D || D && y, k = !y, [, C] = oe.first({
7760
+ }), [, f] = g, y = b.isStart(t, s, f), D = b.isEnd(t, s, f), x = y && D, B = !y || y && D, k = !D, [, C] = oe.first({
7763
7761
  children: n
7764
7762
  }, []), [, A] = oe.last({
7765
7763
  children: n
@@ -7781,12 +7779,12 @@ var Ig = (e, t) => {
7781
7779
  match: (q) => fe.isText(q) || b.isInline(t, q),
7782
7780
  mode: "highest",
7783
7781
  voids: i
7784
- }), [, L] = z, ne = b.isStart(t, s, L), J = b.isEnd(t, s, L), v = b.pathRef(t, y && !w.length ? P.next(f) : f), W = b.pathRef(t, J ? P.next(L) : L);
7782
+ }), [, L] = z, ne = b.isStart(t, s, L), J = b.isEnd(t, s, L), v = b.pathRef(t, D && !w.length ? P.next(f) : f), W = b.pathRef(t, J ? P.next(L) : L);
7785
7783
  Y.splitNodes(t, {
7786
7784
  at: s,
7787
7785
  match: (q) => j ? le.isElement(q) && b.isBlock(t, q) : fe.isText(q) || b.isInline(t, q),
7788
7786
  mode: j ? "lowest" : "highest",
7789
- always: j && (!D || M.length > 0) && (!y || w.length > 0),
7787
+ always: j && (!y || M.length > 0) && (!D || w.length > 0),
7790
7788
  voids: i
7791
7789
  });
7792
7790
  var X = b.pathRef(t, !ne || ne && J ? P.next(L) : L);
@@ -7982,15 +7980,15 @@ var Qg = function(t, n) {
7982
7980
  voids: i
7983
7981
  });
7984
7982
  if (g) {
7985
- var [, f] = g, D = b.pathRef(t, f), y = b.isEnd(t, l, f);
7983
+ var [, f] = g, y = b.pathRef(t, f), D = b.isEnd(t, l, f);
7986
7984
  Y.splitNodes(t, {
7987
7985
  at: l,
7988
7986
  match: u,
7989
7987
  mode: s,
7990
7988
  voids: i
7991
7989
  });
7992
- var x = D.unref();
7993
- l = y ? P.next(x) : x;
7990
+ var x = y.unref();
7991
+ l = D ? P.next(x) : x;
7994
7992
  } else
7995
7993
  return;
7996
7994
  }
@@ -8069,10 +8067,10 @@ var Qg = function(t, n) {
8069
8067
  length: f
8070
8068
  } = p.children;
8071
8069
  if (f === 1) {
8072
- var D = P.next(m);
8070
+ var y = P.next(m);
8073
8071
  Y.moveNodes(t, {
8074
8072
  at: c,
8075
- to: D,
8073
+ to: y,
8076
8074
  voids: i
8077
8075
  }), Y.removeNodes(t, {
8078
8076
  at: m,
@@ -8085,10 +8083,10 @@ var Qg = function(t, n) {
8085
8083
  voids: i
8086
8084
  });
8087
8085
  else if (g === f - 1) {
8088
- var y = P.next(m);
8086
+ var D = P.next(m);
8089
8087
  Y.moveNodes(t, {
8090
8088
  at: c,
8091
- to: y,
8089
+ to: D,
8092
8090
  voids: i
8093
8091
  });
8094
8092
  } else {
@@ -8152,9 +8150,9 @@ var Qg = function(t, n) {
8152
8150
  mode: o
8153
8151
  });
8154
8152
  if (!(!h || !p)) {
8155
- var [m, g] = h, [f, D] = p;
8156
- if (!(g.length === 0 || D.length === 0)) {
8157
- var y = P.next(D), x = P.common(g, D), B = P.isSibling(g, D), k = Array.from(b.levels(t, {
8153
+ var [m, g] = h, [f, y] = p;
8154
+ if (!(g.length === 0 || y.length === 0)) {
8155
+ var D = P.next(y), x = P.common(g, y), B = P.isSibling(g, y), k = Array.from(b.levels(t, {
8158
8156
  at: g
8159
8157
  }), (M) => {
8160
8158
  var [R] = M;
@@ -8174,17 +8172,17 @@ var Qg = function(t, n) {
8174
8172
  throw new Error("Cannot merge the node at path [".concat(g, "] with the previous sibling because it is not the same kind: ").concat(nt.stringify(m), " ").concat(nt.stringify(f)));
8175
8173
  B || Y.moveNodes(t, {
8176
8174
  at: g,
8177
- to: y,
8175
+ to: D,
8178
8176
  voids: s
8179
8177
  }), A && Y.removeNodes(t, {
8180
8178
  at: A.current,
8181
8179
  voids: s
8182
- }), le.isElement(f) && b.isEmpty(t, f) || fe.isText(f) && f.text === "" && D[D.length - 1] !== 0 ? Y.removeNodes(t, {
8183
- at: D,
8180
+ }), le.isElement(f) && b.isEmpty(t, f) || fe.isText(f) && f.text === "" && y[y.length - 1] !== 0 ? Y.removeNodes(t, {
8181
+ at: y,
8184
8182
  voids: s
8185
8183
  }) : t.apply({
8186
8184
  type: "merge_node",
8187
- path: y,
8185
+ path: D,
8188
8186
  position: $,
8189
8187
  properties: T
8190
8188
  }), A && A.unref();
@@ -8283,21 +8281,21 @@ var Qg = function(t, n) {
8283
8281
  return;
8284
8282
  var p = b.rangeRef(t, i, {
8285
8283
  affinity: "inward"
8286
- }), [m, g] = U.edges(i), f = u === "lowest" ? "lowest" : "highest", D = b.isEnd(t, g, g.path);
8284
+ }), [m, g] = U.edges(i), f = u === "lowest" ? "lowest" : "highest", y = b.isEnd(t, g, g.path);
8287
8285
  Y.splitNodes(t, {
8288
8286
  at: g,
8289
8287
  match: a,
8290
8288
  mode: f,
8291
8289
  voids: h,
8292
- always: !D
8290
+ always: !y
8293
8291
  });
8294
- var y = b.isStart(t, m, m.path);
8292
+ var D = b.isStart(t, m, m.path);
8295
8293
  Y.splitNodes(t, {
8296
8294
  at: m,
8297
8295
  match: a,
8298
8296
  mode: f,
8299
8297
  voids: h,
8300
- always: !y
8298
+ always: !D
8301
8299
  }), i = p.unref(), r.at == null && Y.select(t, i);
8302
8300
  }
8303
8301
  s || (s = ($, N) => $ !== N);
@@ -8361,10 +8359,10 @@ var Qg = function(t, n) {
8361
8359
  var f = b.void(t, {
8362
8360
  at: s,
8363
8361
  mode: "highest"
8364
- }), D = 0;
8362
+ }), y = 0;
8365
8363
  if (!a && f) {
8366
- var [y, x] = f;
8367
- if (le.isElement(y) && t.isInline(y)) {
8364
+ var [D, x] = f;
8365
+ if (le.isElement(D) && t.isInline(D)) {
8368
8366
  var B = b.after(t, x);
8369
8367
  if (!B) {
8370
8368
  var k = {
@@ -8381,7 +8379,7 @@ var Qg = function(t, n) {
8381
8379
  o = A + 1, l = !0;
8382
8380
  }
8383
8381
  m = b.pointRef(t, s);
8384
- var T = s.path.length - o, [, $] = g, N = s.path.slice(0, T), M = o === 0 ? s.offset : s.path[T] + D;
8382
+ var T = s.path.length - o, [, $] = g, N = s.path.slice(0, T), M = o === 0 ? s.offset : s.path[T] + y;
8385
8383
  for (var [R, w] of b.levels(t, {
8386
8384
  at: N,
8387
8385
  reverse: !0,
@@ -8448,10 +8446,10 @@ var Qg = function(t, n) {
8448
8446
  // If we do not reverse the order and call it from top to the bottom, it will remove all blocks
8449
8447
  // that wrap target node. So we reverse the order.
8450
8448
  ).reverse(), h = function() {
8451
- var g = p.unref(), [f] = b.node(t, g), D = b.range(t, g);
8452
- a && l && (D = U.intersection(l.current, D)), Y.liftNodes(t, {
8453
- at: D,
8454
- match: (y) => le.isAncestor(f) && f.children.includes(y),
8449
+ var g = p.unref(), [f] = b.node(t, g), y = b.range(t, g);
8450
+ a && l && (y = U.intersection(l.current, y)), Y.liftNodes(t, {
8451
+ at: y,
8452
+ match: (D) => le.isAncestor(f) && f.children.includes(D),
8455
8453
  voids: i
8456
8454
  });
8457
8455
  };
@@ -8494,7 +8492,7 @@ var dv = function(t, n) {
8494
8492
  at: l = t.selection
8495
8493
  } = r;
8496
8494
  if (l) {
8497
- if (o == null && (P.isPath(l) ? o = sr(t, l) : t.isInline(n) ? o = (D) => le.isElement(D) && b.isInline(t, D) || fe.isText(D) : o = (D) => le.isElement(D) && b.isBlock(t, D)), i && U.isRange(l)) {
8495
+ if (o == null && (P.isPath(l) ? o = sr(t, l) : t.isInline(n) ? o = (y) => le.isElement(y) && b.isInline(t, y) || fe.isText(y) : o = (y) => le.isElement(y) && b.isBlock(t, y)), i && U.isRange(l)) {
8498
8496
  var [u, c] = U.edges(l), h = b.rangeRef(t, l, {
8499
8497
  affinity: "inward"
8500
8498
  });
@@ -8510,15 +8508,15 @@ var dv = function(t, n) {
8510
8508
  }
8511
8509
  var p = Array.from(b.nodes(t, {
8512
8510
  at: l,
8513
- match: t.isInline(n) ? (D) => le.isElement(D) && b.isBlock(t, D) : (D) => b.isEditor(D),
8511
+ match: t.isInline(n) ? (y) => le.isElement(y) && b.isBlock(t, y) : (y) => b.isEditor(y),
8514
8512
  mode: "lowest",
8515
8513
  voids: s
8516
8514
  })), m = function() {
8517
- var y = U.isRange(l) ? U.intersection(l, b.range(t, f)) : l;
8518
- if (!y)
8515
+ var D = U.isRange(l) ? U.intersection(l, b.range(t, f)) : l;
8516
+ if (!D)
8519
8517
  return 0;
8520
8518
  var x = Array.from(b.nodes(t, {
8521
- at: y,
8519
+ at: D,
8522
8520
  match: o,
8523
8521
  mode: a,
8524
8522
  voids: s
@@ -9136,21 +9134,21 @@ function b0(e, t, n) {
9136
9134
  return r = a = void 0, u = A, s = e.apply($, T), s;
9137
9135
  }
9138
9136
  function g(A) {
9139
- return u = A, o = setTimeout(y, t), c ? m(A) : s;
9137
+ return u = A, o = setTimeout(D, t), c ? m(A) : s;
9140
9138
  }
9141
9139
  function f(A) {
9142
9140
  var T = A - l, $ = A - u, N = t - T;
9143
9141
  return h ? v0(N, i - $) : N;
9144
9142
  }
9145
- function D(A) {
9143
+ function y(A) {
9146
9144
  var T = A - l, $ = A - u;
9147
9145
  return l === void 0 || T >= t || T < 0 || h && $ >= i;
9148
9146
  }
9149
- function y() {
9147
+ function D() {
9150
9148
  var A = gi();
9151
- if (D(A))
9149
+ if (y(A))
9152
9150
  return x(A);
9153
- o = setTimeout(y, f(A));
9151
+ o = setTimeout(D, f(A));
9154
9152
  }
9155
9153
  function x(A) {
9156
9154
  return o = void 0, p && r ? m(A) : (r = a = void 0, s);
@@ -9162,14 +9160,14 @@ function b0(e, t, n) {
9162
9160
  return o === void 0 ? s : x(gi());
9163
9161
  }
9164
9162
  function C() {
9165
- var A = gi(), T = D(A);
9163
+ var A = gi(), T = y(A);
9166
9164
  if (r = arguments, a = this, l = A, T) {
9167
9165
  if (o === void 0)
9168
9166
  return g(l);
9169
9167
  if (h)
9170
- return clearTimeout(o), o = setTimeout(y, t), m(l);
9168
+ return clearTimeout(o), o = setTimeout(D, t), m(l);
9171
9169
  }
9172
- return o === void 0 && (o = setTimeout(y, t)), s;
9170
+ return o === void 0 && (o = setTimeout(D, t)), s;
9173
9171
  }
9174
9172
  return C.cancel = B, C.flush = k, C;
9175
9173
  }
@@ -9223,7 +9221,7 @@ const k0 = /* @__PURE__ */ An(E0), Nu = (e) => typeof e == "object" && e != null
9223
9221
  }
9224
9222
  g != null && g === document.body && vi(g) && !vi(document.documentElement) || g != null && vi(g, c) && m.push(g);
9225
9223
  }
9226
- const f = (r = (n = window.visualViewport) == null ? void 0 : n.width) != null ? r : innerWidth, D = (i = (a = window.visualViewport) == null ? void 0 : a.height) != null ? i : innerHeight, { scrollX: y, scrollY: x } = window, { height: B, width: k, top: C, right: A, bottom: T, left: $ } = e.getBoundingClientRect(), { top: N, right: M, bottom: R, left: w } = ((z) => {
9224
+ const f = (r = (n = window.visualViewport) == null ? void 0 : n.width) != null ? r : innerWidth, y = (i = (a = window.visualViewport) == null ? void 0 : a.height) != null ? i : innerHeight, { scrollX: D, scrollY: x } = window, { height: B, width: k, top: C, right: A, bottom: T, left: $ } = e.getBoundingClientRect(), { top: N, right: M, bottom: R, left: w } = ((z) => {
9227
9225
  const L = window.getComputedStyle(z);
9228
9226
  return { top: parseFloat(L.scrollMarginTop) || 0, right: parseFloat(L.scrollMarginRight) || 0, bottom: parseFloat(L.scrollMarginBottom) || 0, left: parseFloat(L.scrollMarginLeft) || 0 };
9229
9227
  })(e);
@@ -9231,13 +9229,13 @@ const k0 = /* @__PURE__ */ An(E0), Nu = (e) => typeof e == "object" && e != null
9231
9229
  const S = [];
9232
9230
  for (let z = 0; z < m.length; z++) {
9233
9231
  const L = m[z], { height: ne, width: J, top: v, right: W, bottom: X, left: _ } = L.getBoundingClientRect();
9234
- if (s === "if-needed" && C >= 0 && $ >= 0 && T <= D && A <= f && C >= v && T <= X && $ >= _ && A <= W)
9232
+ if (s === "if-needed" && C >= 0 && $ >= 0 && T <= y && A <= f && C >= v && T <= X && $ >= _ && A <= W)
9235
9233
  return S;
9236
9234
  const F = getComputedStyle(L), q = parseInt(F.borderLeftWidth, 10), I = parseInt(F.borderTopWidth, 10), H = parseInt(F.borderRightWidth, 10), ee = parseInt(F.borderBottomWidth, 10);
9237
9235
  let te = 0, ie = 0;
9238
9236
  const me = "offsetWidth" in L ? L.offsetWidth - L.clientWidth - q - H : 0, G = "offsetHeight" in L ? L.offsetHeight - L.clientHeight - I - ee : 0, ve = "offsetWidth" in L ? L.offsetWidth === 0 ? 0 : J / L.offsetWidth : 0, be = "offsetHeight" in L ? L.offsetHeight === 0 ? 0 : ne / L.offsetHeight : 0;
9239
9237
  if (p === L)
9240
- te = o === "start" ? E : o === "end" ? E - D : o === "nearest" ? Yr(x, x + D, D, I, ee, x + E, x + E + B, B) : E - D / 2, ie = l === "start" ? j : l === "center" ? j - f / 2 : l === "end" ? j - f : Yr(y, y + f, f, q, H, y + j, y + j + k, k), te = Math.max(0, te + x), ie = Math.max(0, ie + y);
9238
+ te = o === "start" ? E : o === "end" ? E - y : o === "nearest" ? Yr(x, x + y, y, I, ee, x + E, x + E + B, B) : E - y / 2, ie = l === "start" ? j : l === "center" ? j - f / 2 : l === "end" ? j - f : Yr(D, D + f, f, q, H, D + j, D + j + k, k), te = Math.max(0, te + x), ie = Math.max(0, ie + D);
9241
9239
  else {
9242
9240
  te = o === "start" ? E - v - I : o === "end" ? E - X + ee + G : o === "nearest" ? Yr(v, X, ne, I, ee + G, E, E + B, B) : E - (v + ne / 2) + G / 2, ie = l === "start" ? j - _ - q : l === "center" ? j - (_ + J / 2) + me / 2 : l === "end" ? j - W + H + me : Yr(_, W, J, q, H + me, j, j + k, k);
9243
9241
  const { scrollLeft: Ae, scrollTop: Ee } = L;
@@ -9348,7 +9346,7 @@ var xn = function(e) {
9348
9346
  return Gr.get(e);
9349
9347
  if (fd(e))
9350
9348
  return Gr.set(e, zu), zu;
9351
- var n = getComputedStyle(e), r = Gs(e) && e.ownerSVGElement && e.getBBox(), a = !N0 && n.boxSizing === "border-box", i = P0.test(n.writingMode || ""), s = !r && Lu.test(n.overflowY || ""), o = !r && Lu.test(n.overflowX || ""), l = r ? 0 : Rt(n.paddingTop), u = r ? 0 : Rt(n.paddingRight), c = r ? 0 : Rt(n.paddingBottom), h = r ? 0 : Rt(n.paddingLeft), p = r ? 0 : Rt(n.borderTopWidth), m = r ? 0 : Rt(n.borderRightWidth), g = r ? 0 : Rt(n.borderBottomWidth), f = r ? 0 : Rt(n.borderLeftWidth), D = h + u, y = l + c, x = f + m, B = p + g, k = o ? e.offsetHeight - B - e.clientHeight : 0, C = s ? e.offsetWidth - x - e.clientWidth : 0, A = a ? D + x : 0, T = a ? y + B : 0, $ = r ? r.width : Rt(n.width) - A - C, N = r ? r.height : Rt(n.height) - T - k, M = $ + D + C + x, R = N + y + k + B, w = xn({
9349
+ var n = getComputedStyle(e), r = Gs(e) && e.ownerSVGElement && e.getBBox(), a = !N0 && n.boxSizing === "border-box", i = P0.test(n.writingMode || ""), s = !r && Lu.test(n.overflowY || ""), o = !r && Lu.test(n.overflowX || ""), l = r ? 0 : Rt(n.paddingTop), u = r ? 0 : Rt(n.paddingRight), c = r ? 0 : Rt(n.paddingBottom), h = r ? 0 : Rt(n.paddingLeft), p = r ? 0 : Rt(n.borderTopWidth), m = r ? 0 : Rt(n.borderRightWidth), g = r ? 0 : Rt(n.borderBottomWidth), f = r ? 0 : Rt(n.borderLeftWidth), y = h + u, D = l + c, x = f + m, B = p + g, k = o ? e.offsetHeight - B - e.clientHeight : 0, C = s ? e.offsetWidth - x - e.clientWidth : 0, A = a ? y + x : 0, T = a ? D + B : 0, $ = r ? r.width : Rt(n.width) - A - C, N = r ? r.height : Rt(n.height) - T - k, M = $ + y + C + x, R = N + D + k + B, w = xn({
9352
9350
  devicePixelContentBoxSize: Kn(Math.round($ * devicePixelRatio), Math.round(N * devicePixelRatio), i),
9353
9351
  borderBoxSize: Kn(M, R, i),
9354
9352
  contentBoxSize: Kn($, N, i),
@@ -9654,8 +9652,8 @@ function bd(e, t) {
9654
9652
  throw new TypeError('Unknown modifier: "' + p + '"');
9655
9653
  (i === 1 || !f) && (n ? r.key = g : r.which = Dd(p)), f && (r[f] = m ? null : !0);
9656
9654
  }
9657
- } catch (D) {
9658
- l = !0, u = D;
9655
+ } catch (y) {
9656
+ l = !0, u = y;
9659
9657
  } finally {
9660
9658
  try {
9661
9659
  !o && c.return && c.return();
@@ -10006,15 +10004,15 @@ var Q = {
10006
10004
  length: h
10007
10005
  } = c.textContent, p = u.getAttribute("data-slate-length"), m = p == null ? h : parseInt(p, 10), g = o + m, f = s[l + 1];
10008
10006
  if (t.offset === g && f !== null && f !== void 0 && f.hasAttribute("data-slate-mark-placeholder")) {
10009
- var D, y = f.childNodes[0];
10007
+ var y, D = f.childNodes[0];
10010
10008
  a = [
10011
10009
  // COMPAT: If we don't explicity set the dom point to be on the actual
10012
10010
  // dom text element, chrome will put the selection behind the actual dom
10013
10011
  // text element, causing domRange.getBoundingClientRect() calls on a collapsed
10014
10012
  // selection to return incorrect zero values (https://bugs.chromium.org/p/chromium/issues/detail?id=435438)
10015
10013
  // which will cause issues when scrolling to it.
10016
- y instanceof cb ? y : f,
10017
- (D = f.textContent) !== null && D !== void 0 && D.startsWith("\uFEFF") ? 1 : 0
10014
+ D instanceof cb ? D : f,
10015
+ (y = f.textContent) !== null && y !== void 0 && y.startsWith("\uFEFF") ? 1 : 0
10018
10016
  ];
10019
10017
  break;
10020
10018
  }
@@ -10034,8 +10032,8 @@ var Q = {
10034
10032
  var {
10035
10033
  anchor: n,
10036
10034
  focus: r
10037
- } = t, a = U.isBackward(t), i = Q.toDOMPoint(e, n), s = U.isCollapsed(t) ? i : Q.toDOMPoint(e, r), o = Q.getWindow(e), l = o.document.createRange(), [u, c] = a ? s : i, [h, p] = a ? i : s, m = At(u) ? u : u.parentElement, g = !!m.getAttribute("data-slate-zero-width"), f = At(h) ? h : h.parentElement, D = !!f.getAttribute("data-slate-zero-width");
10038
- return l.setStart(u, g ? 1 : c), l.setEnd(h, D ? 1 : p), l;
10035
+ } = t, a = U.isBackward(t), i = Q.toDOMPoint(e, n), s = U.isCollapsed(t) ? i : Q.toDOMPoint(e, r), o = Q.getWindow(e), l = o.document.createRange(), [u, c] = a ? s : i, [h, p] = a ? i : s, m = At(u) ? u : u.parentElement, g = !!m.getAttribute("data-slate-zero-width"), f = At(h) ? h : h.parentElement, y = !!f.getAttribute("data-slate-zero-width");
10036
+ return l.setStart(u, g ? 1 : c), l.setEnd(h, y ? 1 : p), l;
10039
10037
  },
10040
10038
  toSlateNode: (e, t) => {
10041
10039
  var n = At(t) ? t : t.parentElement;
@@ -10051,10 +10049,10 @@ var Q = {
10051
10049
  suppressThrow: a
10052
10050
  } = n, [i, s] = r ? t : hb(t), o = i.parentNode, l = null, u = 0;
10053
10051
  if (o) {
10054
- var c, h, p = Q.toDOMNode(e, e), m = o.closest('[data-slate-void="true"]'), g = m && p.contains(m) ? m : null, f = o.closest("[data-slate-leaf]"), D = null;
10052
+ var c, h, p = Q.toDOMNode(e, e), m = o.closest('[data-slate-void="true"]'), g = m && p.contains(m) ? m : null, f = o.closest("[data-slate-leaf]"), y = null;
10055
10053
  if (f) {
10056
10054
  if (l = f.closest('[data-slate-node="text"]'), l) {
10057
- var y = Q.getWindow(e), x = y.document.createRange();
10055
+ var D = Q.getWindow(e), x = D.document.createRange();
10058
10056
  x.setStart(l, 0), x.setEnd(i, s);
10059
10057
  var B = x.cloneContents(), k = [...Array.prototype.slice.call(B.querySelectorAll("[data-slate-zero-width]")), ...Array.prototype.slice.call(B.querySelectorAll("[contenteditable=false]"))];
10060
10058
  k.forEach((j) => {
@@ -10063,7 +10061,7 @@ var Q = {
10063
10061
  return;
10064
10062
  }
10065
10063
  j.parentNode.removeChild(j);
10066
- }), u = B.textContent.length, D = l;
10064
+ }), u = B.textContent.length, y = l;
10067
10065
  }
10068
10066
  } else if (g) {
10069
10067
  for (var C = g.querySelectorAll("[data-slate-leaf]"), A = 0; A < C.length; A++) {
@@ -10073,13 +10071,13 @@ var Q = {
10073
10071
  break;
10074
10072
  }
10075
10073
  }
10076
- f ? (l = f.closest('[data-slate-node="text"]'), D = f, u = D.textContent.length, D.querySelectorAll("[data-slate-zero-width]").forEach((j) => {
10074
+ f ? (l = f.closest('[data-slate-node="text"]'), y = f, u = y.textContent.length, y.querySelectorAll("[data-slate-zero-width]").forEach((j) => {
10077
10075
  u -= j.textContent.length;
10078
10076
  })) : u = 1;
10079
10077
  }
10080
- D && u === D.textContent.length && // COMPAT: Android IMEs might remove the zero width space while composing,
10078
+ y && u === y.textContent.length && // COMPAT: Android IMEs might remove the zero width space while composing,
10081
10079
  // and we don't add it for line-breaks.
10082
- ft && D.getAttribute("data-slate-zero-width") === "z" && (c = D.textContent) !== null && c !== void 0 && c.startsWith("\uFEFF") && // COMPAT: If the parent node is a Slate zero-width space, editor is
10080
+ ft && y.getAttribute("data-slate-zero-width") === "z" && (c = y.textContent) !== null && c !== void 0 && c.startsWith("\uFEFF") && // COMPAT: If the parent node is a Slate zero-width space, editor is
10083
10081
  // because the text node should have no characters. However, during IME
10084
10082
  // composition the ASCII characters will be prepended to the zero-width
10085
10083
  // space, so subtract 1 from the offset to account for the zero-width
@@ -10087,7 +10085,7 @@ var Q = {
10087
10085
  (o.hasAttribute("data-slate-zero-width") || // COMPAT: In Firefox, `range.cloneContents()` returns an extra trailing '\n'
10088
10086
  // when the document ends with a new-line character. This results in the offset
10089
10087
  // length being off by one, so we need to subtract one to account for this.
10090
- Hn && (h = D.textContent) !== null && h !== void 0 && h.endsWith(`
10088
+ Hn && (h = y.textContent) !== null && h !== void 0 && h.endsWith(`
10091
10089
 
10092
10090
  `)) && u--;
10093
10091
  }
@@ -10131,8 +10129,8 @@ var Q = {
10131
10129
  let A = function(T) {
10132
10130
  return T.childElementCount > 0 ? A(T.children[0]) : T;
10133
10131
  };
10134
- var g = p.startContainer, f = m.startContainer, D = A(g.children[p.startOffset]), y = A(f.children[m.startOffset]);
10135
- c = 0, y.childNodes.length > 0 ? o = y.childNodes[0] : o = y, D.childNodes.length > 0 ? u = D.childNodes[0] : u = D, y instanceof HTMLElement ? l = y.innerHTML.length : l = 0;
10132
+ var g = p.startContainer, f = m.startContainer, y = A(g.children[p.startOffset]), D = A(f.children[m.startOffset]);
10133
+ c = 0, D.childNodes.length > 0 ? o = D.childNodes[0] : o = D, y.childNodes.length > 0 ? u = y.childNodes[0] : u = y, D instanceof HTMLElement ? l = D.innerHTML.length : l = 0;
10136
10134
  } else
10137
10135
  p.startContainer === u ? (o = m.endContainer, l = m.endOffset, c = p.startOffset) : (o = p.startContainer, l = p.endOffset, c = m.startOffset);
10138
10136
  } else
@@ -10523,7 +10521,7 @@ function Tb(e) {
10523
10521
  }
10524
10522
  j.style.removeProperty("display");
10525
10523
  }
10526
- }, D = (w, E) => {
10524
+ }, y = (w, E) => {
10527
10525
  var j, S = (j = pt.get(t)) !== null && j !== void 0 ? j : [];
10528
10526
  pt.set(t, S);
10529
10527
  var z = oe.leaf(t, w), L = S.findIndex((v) => P.equals(v.path, w));
@@ -10544,7 +10542,7 @@ function Tb(e) {
10544
10542
  S[L] = ea(ea({}, S[L]), {}, {
10545
10543
  diff: J
10546
10544
  });
10547
- }, y = function(E) {
10545
+ }, D = function(E) {
10548
10546
  var {
10549
10547
  at: j
10550
10548
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -10595,13 +10593,13 @@ function Tb(e) {
10595
10593
  path: S.anchor.path,
10596
10594
  offset: I.offset
10597
10595
  }, Ee = b.range(t, Ae, Ae);
10598
- return T(Ee), D(S.anchor.path, {
10596
+ return T(Ee), y(S.anchor.path, {
10599
10597
  text: "",
10600
10598
  end: H.offset,
10601
10599
  start: I.offset
10602
10600
  });
10603
10601
  }
10604
- return y(() => b.deleteFragment(t, {
10602
+ return D(() => b.deleteFragment(t, {
10605
10603
  direction: q
10606
10604
  }), {
10607
10605
  at: S
@@ -10612,7 +10610,7 @@ function Tb(e) {
10612
10610
  case "deleteByComposition":
10613
10611
  case "deleteByCut":
10614
10612
  case "deleteByDrag":
10615
- return y(() => b.deleteFragment(t), {
10613
+ return D(() => b.deleteFragment(t), {
10616
10614
  at: S
10617
10615
  });
10618
10616
  case "deleteContent":
@@ -10623,13 +10621,13 @@ function Tb(e) {
10623
10621
  if (v && U.isCollapsed(S)) {
10624
10622
  var Ze = oe.leaf(t, Fe.path);
10625
10623
  if (Fe.offset < Ze.text.length)
10626
- return D(Fe.path, {
10624
+ return y(Fe.path, {
10627
10625
  text: "",
10628
10626
  start: Fe.offset,
10629
10627
  end: Fe.offset + 1
10630
10628
  });
10631
10629
  }
10632
- return y(() => b.deleteForward(t), {
10630
+ return D(() => b.deleteForward(t), {
10633
10631
  at: S
10634
10632
  });
10635
10633
  }
@@ -10637,16 +10635,16 @@ function Tb(e) {
10637
10635
  var He, {
10638
10636
  anchor: Ge
10639
10637
  } = S, tt = Ds(L) ? L.isCollapsed : !!((He = L) !== null && He !== void 0 && He.collapsed);
10640
- return v && tt && U.isCollapsed(S) && Ge.offset > 0 ? D(Ge.path, {
10638
+ return v && tt && U.isCollapsed(S) && Ge.offset > 0 ? y(Ge.path, {
10641
10639
  text: "",
10642
10640
  start: Ge.offset - 1,
10643
10641
  end: Ge.offset
10644
- }) : y(() => b.deleteBackward(t), {
10642
+ }) : D(() => b.deleteBackward(t), {
10645
10643
  at: S
10646
10644
  });
10647
10645
  }
10648
10646
  case "deleteEntireSoftLine":
10649
- return y(() => {
10647
+ return D(() => {
10650
10648
  b.deleteBackward(t, {
10651
10649
  unit: "line"
10652
10650
  }), b.deleteForward(t, {
@@ -10656,47 +10654,47 @@ function Tb(e) {
10656
10654
  at: S
10657
10655
  });
10658
10656
  case "deleteHardLineBackward":
10659
- return y(() => b.deleteBackward(t, {
10657
+ return D(() => b.deleteBackward(t, {
10660
10658
  unit: "block"
10661
10659
  }), {
10662
10660
  at: S
10663
10661
  });
10664
10662
  case "deleteSoftLineBackward":
10665
- return y(() => b.deleteBackward(t, {
10663
+ return D(() => b.deleteBackward(t, {
10666
10664
  unit: "line"
10667
10665
  }), {
10668
10666
  at: S
10669
10667
  });
10670
10668
  case "deleteHardLineForward":
10671
- return y(() => b.deleteForward(t, {
10669
+ return D(() => b.deleteForward(t, {
10672
10670
  unit: "block"
10673
10671
  }), {
10674
10672
  at: S
10675
10673
  });
10676
10674
  case "deleteSoftLineForward":
10677
- return y(() => b.deleteForward(t, {
10675
+ return D(() => b.deleteForward(t, {
10678
10676
  unit: "line"
10679
10677
  }), {
10680
10678
  at: S
10681
10679
  });
10682
10680
  case "deleteWordBackward":
10683
- return y(() => b.deleteBackward(t, {
10681
+ return D(() => b.deleteBackward(t, {
10684
10682
  unit: "word"
10685
10683
  }), {
10686
10684
  at: S
10687
10685
  });
10688
10686
  case "deleteWordForward":
10689
- return y(() => b.deleteForward(t, {
10687
+ return D(() => b.deleteForward(t, {
10690
10688
  unit: "word"
10691
10689
  }), {
10692
10690
  at: S
10693
10691
  });
10694
10692
  case "insertLineBreak":
10695
- return y(() => b.insertSoftBreak(t), {
10693
+ return D(() => b.insertSoftBreak(t), {
10696
10694
  at: S
10697
10695
  });
10698
10696
  case "insertParagraph":
10699
- return y(() => b.insertBreak(t), {
10697
+ return D(() => b.insertBreak(t), {
10700
10698
  at: S
10701
10699
  });
10702
10700
  case "insertCompositionText":
@@ -10708,13 +10706,13 @@ function Tb(e) {
10708
10706
  case "insertReplacementText":
10709
10707
  case "insertText": {
10710
10708
  if (Fb(z))
10711
- return y(() => Q.insertData(t, z), {
10709
+ return D(() => Q.insertData(t, z), {
10712
10710
  at: S
10713
10711
  });
10714
10712
  var pe = z ?? "";
10715
10713
  if (jt.get(t) && (pe = pe.replace("\uFEFF", "")), j === "insertText" && /.*\n.*\n$/.test(pe) && (pe = pe.slice(0, -1)), pe.includes(`
10716
10714
  `))
10717
- return y(() => {
10715
+ return D(() => {
10718
10716
  var ye = pe.split(`
10719
10717
  `);
10720
10718
  ye.forEach((_e, Xe) => {
@@ -10737,11 +10735,11 @@ function Tb(e) {
10737
10735
  text: u.text + pe
10738
10736
  }) : u = !1 : u = !1;
10739
10737
  if (v) {
10740
- D(Oe.path, V);
10738
+ y(Oe.path, V);
10741
10739
  return;
10742
10740
  }
10743
10741
  }
10744
- return y(() => b.insertText(t, pe), {
10742
+ return D(() => b.insertText(t, pe), {
10745
10743
  at: S
10746
10744
  });
10747
10745
  }
@@ -10989,7 +10987,7 @@ var Kb = (e) => {
10989
10987
  if (he(() => (f ? p.current || (p.current = setTimeout(() => {
10990
10988
  h(!0), p.current = null;
10991
10989
  }, Ub)) : (tl(p), h(!1)), () => tl(p)), [f, h]), f && c) {
10992
- var D = {
10990
+ var y = {
10993
10991
  children: t.placeholder,
10994
10992
  attributes: {
10995
10993
  "data-slate-placeholder": !0,
@@ -11010,13 +11008,13 @@ var Kb = (e) => {
11010
11008
  ref: m
11011
11009
  }
11012
11010
  };
11013
- g = /* @__PURE__ */ re.createElement(re.Fragment, null, i(D), g);
11011
+ g = /* @__PURE__ */ re.createElement(re.Fragment, null, i(y), g);
11014
11012
  }
11015
- var y = {
11013
+ var D = {
11016
11014
  "data-slate-leaf": !0
11017
11015
  };
11018
11016
  return s({
11019
- attributes: y,
11017
+ attributes: D,
11020
11018
  children: g,
11021
11019
  leaf: t,
11022
11020
  text: r
@@ -11048,8 +11046,8 @@ var Kb = (e) => {
11048
11046
  }));
11049
11047
  }
11050
11048
  var g = Pe((f) => {
11051
- var D = Ga.get(o);
11052
- f ? (D == null || D.set(c, f), wn.set(s, f), Nr.set(f, s)) : (D == null || D.delete(c), wn.delete(s), l.current && Nr.delete(l.current)), l.current = f;
11049
+ var y = Ga.get(o);
11050
+ f ? (y == null || y.set(c, f), wn.set(s, f), Nr.set(f, s)) : (y == null || y.delete(c), wn.delete(s), l.current && Nr.delete(l.current)), l.current = f;
11053
11051
  }, [l, o, c, s]);
11054
11052
  return /* @__PURE__ */ re.createElement("span", {
11055
11053
  "data-slate-node": "text",
@@ -11105,8 +11103,8 @@ var Qb = (e) => {
11105
11103
  }
11106
11104
  if (b.isVoid(o, n)) {
11107
11105
  m["data-slate-void"] = !0, !l && u && (m.contentEditable = !1);
11108
- var D = u ? "span" : "div", [[y]] = oe.texts(n);
11109
- p = /* @__PURE__ */ re.createElement(D, {
11106
+ var y = u ? "span" : "div", [[D]] = oe.texts(n);
11107
+ p = /* @__PURE__ */ re.createElement(y, {
11110
11108
  "data-slate-spacer": !0,
11111
11109
  style: {
11112
11110
  height: "0",
@@ -11119,8 +11117,8 @@ var Qb = (e) => {
11119
11117
  decorations: [],
11120
11118
  isLast: !1,
11121
11119
  parent: n,
11122
- text: y
11123
- })), eo.set(y, 0), to.set(y, n);
11120
+ text: D
11121
+ })), eo.set(D, 0), to.set(D, n);
11124
11122
  }
11125
11123
  return r({
11126
11124
  attributes: m,
@@ -11147,14 +11145,14 @@ var Qb = (e) => {
11147
11145
  renderLeaf: i,
11148
11146
  selection: s
11149
11147
  } = e, o = ey(), l = hn(), u = Q.findPath(l, n), c = [], h = le.isElement(n) && !l.isInline(n) && b.hasInlines(l, n), p = 0; p < n.children.length; p++) {
11150
- var m = u.concat(p), g = n.children[p], f = Q.findKey(l, g), D = b.range(l, m), y = s && U.intersection(D, s), x = o([g, m]);
11148
+ var m = u.concat(p), g = n.children[p], f = Q.findKey(l, g), y = b.range(l, m), D = s && U.intersection(y, s), x = o([g, m]);
11151
11149
  for (var B of t) {
11152
- var k = U.intersection(B, D);
11150
+ var k = U.intersection(B, y);
11153
11151
  k && x.push(k);
11154
11152
  }
11155
11153
  le.isElement(g) ? c.push(/* @__PURE__ */ re.createElement(ty.Provider, {
11156
11154
  key: "provider-".concat(f.id),
11157
- value: !!y
11155
+ value: !!D
11158
11156
  }, /* @__PURE__ */ re.createElement(Jb, {
11159
11157
  decorations: x,
11160
11158
  element: g,
@@ -11162,7 +11160,7 @@ var Qb = (e) => {
11162
11160
  renderElement: r,
11163
11161
  renderPlaceholder: a,
11164
11162
  renderLeaf: i,
11165
- selection: y
11163
+ selection: D
11166
11164
  }))) : c.push(/* @__PURE__ */ re.createElement(Od, {
11167
11165
  decorations: x,
11168
11166
  key: f.id,
@@ -11369,7 +11367,7 @@ var hy = (e) => /* @__PURE__ */ re.createElement(re.Fragment, null, Nd(e)), my =
11369
11367
  style: h = {},
11370
11368
  as: p = "div",
11371
11369
  disableDefaultStyles: m = !1
11372
- } = e, g = Qn(e, dy), f = Sn(), [D, y] = de(!1), x = ke(null), B = ke([]), [k, C] = de(), {
11370
+ } = e, g = Qn(e, dy), f = Sn(), [y, D] = de(!1), x = ke(null), B = ke([]), [k, C] = de(), {
11373
11371
  onUserInput: A,
11374
11372
  receivedUserInput: T
11375
11373
  } = ry(), [, $] = tr((F) => F + 1, 0);
@@ -11612,7 +11610,7 @@ var hy = (e) => /* @__PURE__ */ re.createElement(re.Fragment, null, Nd(e)), my =
11612
11610
  case "insertFromYank":
11613
11611
  case "insertReplacementText":
11614
11612
  case "insertText": {
11615
- H === "insertFromComposition" && Q.isComposing(f) && (y(!1), bn.set(f, !1)), (ee == null ? void 0 : ee.constructor.name) === "DataTransfer" ? Q.insertData(f, ee) : typeof ee == "string" && (ie ? B.current.push(() => b.insertText(f, ee)) : b.insertText(f, ee));
11613
+ H === "insertFromComposition" && Q.isComposing(f) && (D(!1), bn.set(f, !1)), (ee == null ? void 0 : ee.constructor.name) === "DataTransfer" ? Q.insertData(f, ee) : typeof ee == "string" && (ie ? B.current.push(() => b.insertText(f, ee)) : b.insertText(f, ee));
11616
11614
  break;
11617
11615
  }
11618
11616
  }
@@ -11628,7 +11626,7 @@ var hy = (e) => /* @__PURE__ */ re.createElement(re.Fragment, null, Nd(e)), my =
11628
11626
  F.document.removeEventListener("selectionchange", w);
11629
11627
  };
11630
11628
  }, [w]);
11631
- var S = r([f, []]), z = i && f.children.length === 1 && Array.from(oe.texts(f)).length === 1 && oe.string(f) === "" && !D, L = Pe((F) => {
11629
+ var S = r([f, []]), z = i && f.children.length === 1 && Array.from(oe.texts(f)).length === 1 && oe.string(f) === "" && !y, L = Pe((F) => {
11632
11630
  if (F && z) {
11633
11631
  var q;
11634
11632
  C((q = F.getBoundingClientRect()) === null || q === void 0 ? void 0 : q.height);
@@ -11796,7 +11794,7 @@ var hy = (e) => /* @__PURE__ */ re.createElement(re.Fragment, null, Nd(e)), my =
11796
11794
  if (Q.hasSelectableTarget(f, F.target)) {
11797
11795
  var q;
11798
11796
  if (Q.isComposing(f) && Promise.resolve().then(() => {
11799
- y(!1), bn.set(f, !1);
11797
+ D(!1), bn.set(f, !1);
11800
11798
  }), (q = M.current) === null || q === void 0 || q.handleCompositionEnd(F), lt(F, g.onCompositionEnd) || ft)
11801
11799
  return;
11802
11800
  if (!vr && !ob && !rb && !lb && !ub && F.data) {
@@ -11808,14 +11806,14 @@ var hy = (e) => /* @__PURE__ */ re.createElement(re.Fragment, null, Nd(e)), my =
11808
11806
  }
11809
11807
  }, [g.onCompositionEnd, f]),
11810
11808
  onCompositionUpdate: Pe((F) => {
11811
- Q.hasSelectableTarget(f, F.target) && !lt(F, g.onCompositionUpdate) && (Q.isComposing(f) || (y(!0), bn.set(f, !0)));
11809
+ Q.hasSelectableTarget(f, F.target) && !lt(F, g.onCompositionUpdate) && (Q.isComposing(f) || (D(!0), bn.set(f, !0)));
11812
11810
  }, [g.onCompositionUpdate, f]),
11813
11811
  onCompositionStart: Pe((F) => {
11814
11812
  if (Q.hasSelectableTarget(f, F.target)) {
11815
11813
  var q;
11816
11814
  if ((q = M.current) === null || q === void 0 || q.handleCompositionStart(F), lt(F, g.onCompositionStart) || ft)
11817
11815
  return;
11818
- y(!0);
11816
+ D(!0);
11819
11817
  var {
11820
11818
  selection: I
11821
11819
  } = f;
@@ -11895,7 +11893,7 @@ var hy = (e) => /* @__PURE__ */ re.createElement(re.Fragment, null, Nd(e)), my =
11895
11893
  var {
11896
11894
  nativeEvent: I
11897
11895
  } = F;
11898
- if (Q.isComposing(f) && I.isComposing === !1 && (bn.set(f, !1), y(!1)), lt(F, g.onKeyDown) || Q.isComposing(f))
11896
+ if (Q.isComposing(f) && I.isComposing === !1 && (bn.set(f, !1), D(!1)), lt(F, g.onKeyDown) || Q.isComposing(f))
11899
11897
  return;
11900
11898
  var {
11901
11899
  selection: H
@@ -12120,16 +12118,16 @@ var wy = ["editor", "children", "onChange", "onSelectionChange", "onValueChange"
12120
12118
  selectorContext: c,
12121
12119
  onChange: h
12122
12120
  } = xy(t), p = Pe((f) => {
12123
- var D;
12124
- switch (r && r(t.children), f == null || (D = f.operation) === null || D === void 0 ? void 0 : D.type) {
12121
+ var y;
12122
+ switch (r && r(t.children), f == null || (y = f.operation) === null || y === void 0 ? void 0 : y.type) {
12125
12123
  case "set_selection":
12126
12124
  a == null || a(t.selection);
12127
12125
  break;
12128
12126
  default:
12129
12127
  i == null || i(t.children);
12130
12128
  }
12131
- u((y) => ({
12132
- v: y.v + 1,
12129
+ u((D) => ({
12130
+ v: D.v + 1,
12133
12131
  editor: t
12134
12132
  })), h(t);
12135
12133
  }, [t, h, r, a, i]);
@@ -12234,9 +12232,9 @@ var ky = function(t) {
12234
12232
  g && sn.set(r, Yu(r, g, u));
12235
12233
  var f = an.get(r);
12236
12234
  if (f != null && f.at) {
12237
- var D = Be.isPoint(f == null ? void 0 : f.at) ? ws(r, f.at, u) : Yu(r, f.at, u);
12238
- an.set(r, D ? ul(ul({}, f), {}, {
12239
- at: D
12235
+ var y = Be.isPoint(f == null ? void 0 : f.at) ? ws(r, f.at, u) : Yu(r, f.at, u);
12236
+ an.set(r, y ? ul(ul({}, f), {}, {
12237
+ at: y
12240
12238
  }) : null);
12241
12239
  }
12242
12240
  switch (u.type) {
@@ -12248,8 +12246,8 @@ var ky = function(t) {
12248
12246
  break;
12249
12247
  }
12250
12248
  case "set_selection": {
12251
- var y;
12252
- (y = xr.get(r)) === null || y === void 0 || y.unref(), xr.delete(r);
12249
+ var D;
12250
+ (D = xr.get(r)) === null || D === void 0 || D.unref(), xr.delete(r);
12253
12251
  break;
12254
12252
  }
12255
12253
  case "insert_node":
@@ -12293,25 +12291,25 @@ var ky = function(t) {
12293
12291
  at: p.path
12294
12292
  });
12295
12293
  if (!(U.isCollapsed(c) && !m)) {
12296
- var f = Q.toDOMRange(r, c), D = f.cloneContents(), y = D.childNodes[0];
12297
- if (D.childNodes.forEach((M) => {
12298
- M.textContent && M.textContent.trim() !== "" && (y = M);
12294
+ var f = Q.toDOMRange(r, c), y = f.cloneContents(), D = y.childNodes[0];
12295
+ if (y.childNodes.forEach((M) => {
12296
+ M.textContent && M.textContent.trim() !== "" && (D = M);
12299
12297
  }), g) {
12300
12298
  var [x] = g, B = f.cloneRange(), k = Q.toDOMNode(r, x);
12301
- B.setEndAfter(k), D = B.cloneContents();
12299
+ B.setEndAfter(k), y = B.cloneContents();
12302
12300
  }
12303
- if (m && (y = D.querySelector("[data-slate-spacer]")), Array.from(D.querySelectorAll("[data-slate-zero-width]")).forEach((M) => {
12301
+ if (m && (D = y.querySelector("[data-slate-spacer]")), Array.from(y.querySelectorAll("[data-slate-zero-width]")).forEach((M) => {
12304
12302
  var R = M.getAttribute("data-slate-zero-width") === "n";
12305
12303
  M.textContent = R ? `
12306
12304
  ` : "";
12307
- }), _d(y)) {
12308
- var C = y.ownerDocument.createElement("span");
12309
- C.style.whiteSpace = "pre", C.appendChild(y), D.appendChild(C), y = C;
12305
+ }), _d(D)) {
12306
+ var C = D.ownerDocument.createElement("span");
12307
+ C.style.whiteSpace = "pre", C.appendChild(D), y.appendChild(C), D = C;
12310
12308
  }
12311
12309
  var A = r.getFragment(), T = JSON.stringify(A), $ = window.btoa(encodeURIComponent(T));
12312
- y.setAttribute("data-slate-fragment", $), u.setData("application/".concat(n), $);
12313
- var N = D.ownerDocument.createElement("div");
12314
- return N.appendChild(D), N.setAttribute("hidden", "true"), D.ownerDocument.body.appendChild(N), u.setData("text/html", N.innerHTML), u.setData("text/plain", Ad(N)), D.ownerDocument.body.removeChild(N), u;
12310
+ D.setAttribute("data-slate-fragment", $), u.setData("application/".concat(n), $);
12311
+ var N = y.ownerDocument.createElement("div");
12312
+ return N.appendChild(y), N.setAttribute("hidden", "true"), y.ownerDocument.body.appendChild(N), u.setData("text/html", N.innerHTML), u.setData("text/plain", Ad(N)), y.ownerDocument.body.removeChild(N), u;
12315
12313
  }
12316
12314
  }
12317
12315
  }, r.insertData = (u) => {
@@ -12420,13 +12418,13 @@ const By = ({
12420
12418
  return;
12421
12419
  let u, c = 0;
12422
12420
  if (t === "mention-popover") {
12423
- const { position: f } = i, D = (B) => {
12421
+ const { position: f } = i, y = (B) => {
12424
12422
  if (!b.hasPath(e, B.path))
12425
12423
  return !1;
12426
12424
  const k = oe.get(e, B.path);
12427
12425
  return b.isEditor(k) || le.isElement(k) ? B.offset <= k.children.length : fe.isText(k) ? B.offset <= k.text.length : !1;
12428
12426
  };
12429
- if (f && (!D(f == null ? void 0 : f.anchor) || !D(f == null ? void 0 : f.focus)))
12427
+ if (f && (!y(f == null ? void 0 : f.anchor) || !y(f == null ? void 0 : f.focus)))
12430
12428
  return;
12431
12429
  u = Q.toDOMRange(
12432
12430
  e,
@@ -13993,7 +13991,7 @@ function d1(e) {
13993
13991
  A = t.events[C][1].end;
13994
13992
  break;
13995
13993
  }
13996
- y(r);
13994
+ D(r);
13997
13995
  let T = k;
13998
13996
  for (; T < t.events.length; )
13999
13997
  t.events[T][1].end = Object.assign({}, A), T++;
@@ -14021,7 +14019,7 @@ function d1(e) {
14021
14019
  )(B);
14022
14020
  }
14023
14021
  function c(B) {
14024
- return a && x(), y(r), p(B);
14022
+ return a && x(), D(r), p(B);
14025
14023
  }
14026
14024
  function h(B) {
14027
14025
  return t.parser.lazy[t.now().line] = r !== n.length, s = t.now().offset, g(B);
@@ -14038,7 +14036,7 @@ function d1(e) {
14038
14036
  }
14039
14037
  function g(B) {
14040
14038
  if (B === null) {
14041
- a && x(), y(0), e.consume(B);
14039
+ a && x(), D(0), e.consume(B);
14042
14040
  return;
14043
14041
  }
14044
14042
  return a = a || t.parser.flow(t.now()), e.enter("chunkFlow", {
@@ -14049,12 +14047,12 @@ function d1(e) {
14049
14047
  }
14050
14048
  function f(B) {
14051
14049
  if (B === null) {
14052
- D(e.exit("chunkFlow"), !0), y(0), e.consume(B);
14050
+ y(e.exit("chunkFlow"), !0), D(0), e.consume(B);
14053
14051
  return;
14054
14052
  }
14055
- return xe(B) ? (e.consume(B), D(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, o) : (e.consume(B), f);
14053
+ return xe(B) ? (e.consume(B), y(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, o) : (e.consume(B), f);
14056
14054
  }
14057
- function D(B, k) {
14055
+ function y(B, k) {
14058
14056
  const C = t.sliceStream(B);
14059
14057
  if (k && C.push(null), B.previous = i, i && (i.next = B), i = B, a.defineSkip(B.start), a.write(C), t.parser.lazy[B.start.line]) {
14060
14058
  let A = a.events.length;
@@ -14076,7 +14074,7 @@ function d1(e) {
14076
14074
  }
14077
14075
  N = !0;
14078
14076
  }
14079
- for (y(r), A = T; A < t.events.length; )
14077
+ for (D(r), A = T; A < t.events.length; )
14080
14078
  t.events[A][1].end = Object.assign({}, M), A++;
14081
14079
  qt(
14082
14080
  t.events,
@@ -14086,7 +14084,7 @@ function d1(e) {
14086
14084
  ), t.events.length = A;
14087
14085
  }
14088
14086
  }
14089
- function y(B) {
14087
+ function D(B) {
14090
14088
  let k = n.length;
14091
14089
  for (; k-- > B; ) {
14092
14090
  const C = n[k];
@@ -14375,12 +14373,12 @@ function C1(e, t, n) {
14375
14373
  return A === null || xe(A) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), h(A)) : A === 96 && A === o ? n(A) : (e.consume(A), g);
14376
14374
  }
14377
14375
  function f(A) {
14378
- return e.attempt(a, k, D)(A);
14379
- }
14380
- function D(A) {
14381
- return e.enter("lineEnding"), e.consume(A), e.exit("lineEnding"), y;
14376
+ return e.attempt(a, k, y)(A);
14382
14377
  }
14383
14378
  function y(A) {
14379
+ return e.enter("lineEnding"), e.consume(A), e.exit("lineEnding"), D;
14380
+ }
14381
+ function D(A) {
14384
14382
  return i > 0 && Re(A) ? ze(
14385
14383
  e,
14386
14384
  x,
@@ -14535,7 +14533,7 @@ function j1(e, t) {
14535
14533
  let a = t - 1;
14536
14534
  const i = [], s = n._tokenizer || r.parser[n.contentType](n.start), o = s.events, l = [], u = {};
14537
14535
  let c, h, p = -1, m = n, g = 0, f = 0;
14538
- const D = [f];
14536
+ const y = [f];
14539
14537
  for (; m; ) {
14540
14538
  for (; e[++a][1] !== m; )
14541
14539
  ;
@@ -14543,10 +14541,10 @@ function j1(e, t) {
14543
14541
  }
14544
14542
  for (m = n; ++p < o.length; )
14545
14543
  // Find a void token that includes a break.
14546
- o[p][0] === "exit" && o[p - 1][0] === "enter" && o[p][1].type === o[p - 1][1].type && o[p][1].start.line !== o[p][1].end.line && (f = p + 1, D.push(f), m._tokenizer = void 0, m.previous = void 0, m = m.next);
14547
- for (s.events = [], m ? (m._tokenizer = void 0, m.previous = void 0) : D.pop(), p = D.length; p--; ) {
14548
- const y = o.slice(D[p], D[p + 1]), x = i.pop();
14549
- l.unshift([x, x + y.length - 1]), qt(e, x, 2, y);
14544
+ o[p][0] === "exit" && o[p - 1][0] === "enter" && o[p][1].type === o[p - 1][1].type && o[p][1].start.line !== o[p][1].end.line && (f = p + 1, y.push(f), m._tokenizer = void 0, m.previous = void 0, m = m.next);
14545
+ for (s.events = [], m ? (m._tokenizer = void 0, m.previous = void 0) : y.pop(), p = y.length; p--; ) {
14546
+ const D = o.slice(y[p], y[p + 1]), x = i.pop();
14547
+ l.unshift([x, x + D.length - 1]), qt(e, x, 2, D);
14550
14548
  }
14551
14549
  for (p = -1; ++p < l.length; )
14552
14550
  u[g + l[p][0]] = g + l[p][1], g += l[p][1] - l[p][0] - 1;
@@ -14604,27 +14602,27 @@ function Zd(e, t, n, r, a, i, s, o, l) {
14604
14602
  const u = l || Number.POSITIVE_INFINITY;
14605
14603
  let c = 0;
14606
14604
  return h;
14607
- function h(y) {
14608
- return y === 60 ? (e.enter(r), e.enter(a), e.enter(i), e.consume(y), e.exit(i), p) : y === null || y === 32 || y === 41 || As(y) ? n(y) : (e.enter(r), e.enter(s), e.enter(o), e.enter("chunkString", {
14605
+ function h(D) {
14606
+ return D === 60 ? (e.enter(r), e.enter(a), e.enter(i), e.consume(D), e.exit(i), p) : D === null || D === 32 || D === 41 || As(D) ? n(D) : (e.enter(r), e.enter(s), e.enter(o), e.enter("chunkString", {
14609
14607
  contentType: "string"
14610
- }), f(y));
14608
+ }), f(D));
14611
14609
  }
14612
- function p(y) {
14613
- return y === 62 ? (e.enter(i), e.consume(y), e.exit(i), e.exit(a), e.exit(r), t) : (e.enter(o), e.enter("chunkString", {
14610
+ function p(D) {
14611
+ return D === 62 ? (e.enter(i), e.consume(D), e.exit(i), e.exit(a), e.exit(r), t) : (e.enter(o), e.enter("chunkString", {
14614
14612
  contentType: "string"
14615
- }), m(y));
14613
+ }), m(D));
14616
14614
  }
14617
- function m(y) {
14618
- return y === 62 ? (e.exit("chunkString"), e.exit(o), p(y)) : y === null || y === 60 || xe(y) ? n(y) : (e.consume(y), y === 92 ? g : m);
14615
+ function m(D) {
14616
+ return D === 62 ? (e.exit("chunkString"), e.exit(o), p(D)) : D === null || D === 60 || xe(D) ? n(D) : (e.consume(D), D === 92 ? g : m);
14619
14617
  }
14620
- function g(y) {
14621
- return y === 60 || y === 62 || y === 92 ? (e.consume(y), m) : m(y);
14618
+ function g(D) {
14619
+ return D === 60 || D === 62 || D === 92 ? (e.consume(D), m) : m(D);
14622
14620
  }
14623
- function f(y) {
14624
- return !c && (y === null || y === 41 || vt(y)) ? (e.exit("chunkString"), e.exit(o), e.exit(s), e.exit(r), t(y)) : c < u && y === 40 ? (e.consume(y), c++, f) : y === 41 ? (e.consume(y), c--, f) : y === null || y === 32 || y === 40 || As(y) ? n(y) : (e.consume(y), y === 92 ? D : f);
14621
+ function f(D) {
14622
+ return !c && (D === null || D === 41 || vt(D)) ? (e.exit("chunkString"), e.exit(o), e.exit(s), e.exit(r), t(D)) : c < u && D === 40 ? (e.consume(D), c++, f) : D === 41 ? (e.consume(D), c--, f) : D === null || D === 32 || D === 40 || As(D) ? n(D) : (e.consume(D), D === 92 ? y : f);
14625
14623
  }
14626
- function D(y) {
14627
- return y === 40 || y === 41 || y === 92 ? (e.consume(y), f) : f(y);
14624
+ function y(D) {
14625
+ return D === 40 || D === 41 || D === 92 ? (e.consume(D), f) : f(D);
14628
14626
  }
14629
14627
  }
14630
14628
  function Yd(e, t, n, r, a, i) {
@@ -14912,7 +14910,7 @@ function J1(e, t, n) {
14912
14910
  return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(_), h;
14913
14911
  }
14914
14912
  function h(_) {
14915
- return _ === 33 ? (e.consume(_), p) : _ === 47 ? (e.consume(_), i = !0, f) : _ === 63 ? (e.consume(_), a = 3, r.interrupt ? t : v) : It(_) ? (e.consume(_), s = String.fromCharCode(_), D) : n(_);
14913
+ return _ === 33 ? (e.consume(_), p) : _ === 47 ? (e.consume(_), i = !0, f) : _ === 63 ? (e.consume(_), a = 3, r.interrupt ? t : v) : It(_) ? (e.consume(_), s = String.fromCharCode(_), y) : n(_);
14916
14914
  }
14917
14915
  function p(_) {
14918
14916
  return _ === 45 ? (e.consume(_), a = 2, m) : _ === 91 ? (e.consume(_), a = 5, o = 0, g) : It(_) ? (e.consume(_), a = 4, r.interrupt ? t : v) : n(_);
@@ -14925,16 +14923,16 @@ function J1(e, t, n) {
14925
14923
  return _ === F.charCodeAt(o++) ? (e.consume(_), o === F.length ? r.interrupt ? t : w : g) : n(_);
14926
14924
  }
14927
14925
  function f(_) {
14928
- return It(_) ? (e.consume(_), s = String.fromCharCode(_), D) : n(_);
14926
+ return It(_) ? (e.consume(_), s = String.fromCharCode(_), y) : n(_);
14929
14927
  }
14930
- function D(_) {
14928
+ function y(_) {
14931
14929
  if (_ === null || _ === 47 || _ === 62 || vt(_)) {
14932
14930
  const F = _ === 47, q = s.toLowerCase();
14933
- return !F && !i && Tl.includes(q) ? (a = 1, r.interrupt ? t(_) : w(_)) : K1.includes(s.toLowerCase()) ? (a = 6, F ? (e.consume(_), y) : r.interrupt ? t(_) : w(_)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(_) : i ? x(_) : B(_));
14931
+ return !F && !i && Tl.includes(q) ? (a = 1, r.interrupt ? t(_) : w(_)) : K1.includes(s.toLowerCase()) ? (a = 6, F ? (e.consume(_), D) : r.interrupt ? t(_) : w(_)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(_) : i ? x(_) : B(_));
14934
14932
  }
14935
- return _ === 45 || Ot(_) ? (e.consume(_), s += String.fromCharCode(_), D) : n(_);
14933
+ return _ === 45 || Ot(_) ? (e.consume(_), s += String.fromCharCode(_), y) : n(_);
14936
14934
  }
14937
- function y(_) {
14935
+ function D(_) {
14938
14936
  return _ === 62 ? (e.consume(_), r.interrupt ? t : w) : n(_);
14939
14937
  }
14940
14938
  function x(_) {
@@ -15063,13 +15061,13 @@ function nD(e, t, n) {
15063
15061
  return v === W.charCodeAt(i++) ? (e.consume(v), i === W.length ? f : g) : n(v);
15064
15062
  }
15065
15063
  function f(v) {
15066
- return v === null ? n(v) : v === 93 ? (e.consume(v), D) : xe(v) ? (s = f, L(v)) : (e.consume(v), f);
15067
- }
15068
- function D(v) {
15069
- return v === 93 ? (e.consume(v), y) : f(v);
15064
+ return v === null ? n(v) : v === 93 ? (e.consume(v), y) : xe(v) ? (s = f, L(v)) : (e.consume(v), f);
15070
15065
  }
15071
15066
  function y(v) {
15072
- return v === 62 ? z(v) : v === 93 ? (e.consume(v), y) : f(v);
15067
+ return v === 93 ? (e.consume(v), D) : f(v);
15068
+ }
15069
+ function D(v) {
15070
+ return v === 62 ? z(v) : v === 93 ? (e.consume(v), D) : f(v);
15073
15071
  }
15074
15072
  function x(v) {
15075
15073
  return v === null || v === 62 ? z(v) : xe(v) ? (s = x, L(v)) : (e.consume(v), x);
@@ -15704,7 +15702,7 @@ function OD(e, t, n) {
15704
15702
  let c = t.tokenize.call(u, l);
15705
15703
  return t.resolveAll && i.push(t), u;
15706
15704
  function h(R) {
15707
- return s = Bt(s, R), D(), s[s.length - 1] !== null ? [] : ($(t, 0), u.events = oo(i, u.events, u), u.events);
15705
+ return s = Bt(s, R), y(), s[s.length - 1] !== null ? [] : ($(t, 0), u.events = oo(i, u.events, u), u.events);
15708
15706
  }
15709
15707
  function p(R, w) {
15710
15708
  return ND(m(R), w);
@@ -15725,18 +15723,18 @@ function OD(e, t, n) {
15725
15723
  function f(R) {
15726
15724
  a[R.line] = R.column, M();
15727
15725
  }
15728
- function D() {
15726
+ function y() {
15729
15727
  let R;
15730
15728
  for (; r._index < s.length; ) {
15731
15729
  const w = s[r._index];
15732
15730
  if (typeof w == "string")
15733
15731
  for (R = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === R && r._bufferIndex < w.length; )
15734
- y(w.charCodeAt(r._bufferIndex));
15732
+ D(w.charCodeAt(r._bufferIndex));
15735
15733
  else
15736
- y(w);
15734
+ D(w);
15737
15735
  }
15738
15736
  }
15739
- function y(R) {
15737
+ function D(R) {
15740
15738
  c = c(R);
15741
15739
  }
15742
15740
  function x(R) {
@@ -16086,12 +16084,12 @@ function XD(e) {
16086
16084
  characterReferenceMarkerHexadecimal: q,
16087
16085
  characterReferenceMarkerNumeric: q,
16088
16086
  characterReferenceValue: I,
16089
- codeFenced: l(D),
16087
+ codeFenced: l(y),
16090
16088
  codeFencedFence: f,
16091
16089
  codeFencedFenceInfo: m,
16092
16090
  codeFencedFenceMeta: g,
16093
16091
  codeFlowValue: M,
16094
- codeIndented: l(y),
16092
+ codeIndented: l(D),
16095
16093
  codeText: l(S),
16096
16094
  codeTextData: M,
16097
16095
  data: M,
@@ -16304,11 +16302,11 @@ function XD(e) {
16304
16302
  function f() {
16305
16303
  this.data.flowCodeInside || (this.buffer(), this.data.flowCodeInside = !0);
16306
16304
  }
16307
- function D() {
16305
+ function y() {
16308
16306
  const V = this.resume(), se = this.stack[this.stack.length - 1];
16309
16307
  se.value = V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), this.data.flowCodeInside = void 0;
16310
16308
  }
16311
- function y() {
16309
+ function D() {
16312
16310
  const V = this.resume(), se = this.stack[this.stack.length - 1];
16313
16311
  se.value = V.replace(/(\r?\n|\r)$/g, "");
16314
16312
  }
@@ -17042,13 +17040,13 @@ const lx = () => {
17042
17040
  },
17043
17041
  onBlur: (f) => {
17044
17042
  f.stopPropagation();
17045
- const D = [
17043
+ const y = [
17046
17044
  { type: "openTooltip", value: null }
17047
17045
  ];
17048
- l.selection && D.push({
17046
+ l.selection && y.push({
17049
17047
  type: "lastAnchor",
17050
17048
  value: l.selection.anchor
17051
- }), m(D);
17049
+ }), m(y);
17052
17050
  },
17053
17051
  contentEditable: !1,
17054
17052
  children: [
@@ -17065,7 +17063,7 @@ const lx = () => {
17065
17063
  f.stopPropagation(), f.preventDefault(), r();
17066
17064
  },
17067
17065
  onKeyDown: (f) => {
17068
- var D, y, x, B;
17066
+ var y, D, x, B;
17069
17067
  if (f.key !== "Tab")
17070
17068
  switch (f.key) {
17071
17069
  case "Enter":
@@ -17078,9 +17076,9 @@ const lx = () => {
17078
17076
  let C = k == null ? void 0 : k.nextElementSibling;
17079
17077
  if (f.key === "ArrowLeft") {
17080
17078
  const $ = k == null ? void 0 : k.previousElementSibling;
17081
- $ ? C = $ : C = (D = k == null ? void 0 : k.parentElement) == null ? void 0 : D.lastElementChild;
17079
+ $ ? C = $ : C = (y = k == null ? void 0 : k.parentElement) == null ? void 0 : y.lastElementChild;
17082
17080
  } else
17083
- C || (C = (y = k == null ? void 0 : k.parentElement) == null ? void 0 : y.firstElementChild);
17081
+ C || (C = (D = k == null ? void 0 : k.parentElement) == null ? void 0 : D.firstElementChild);
17084
17082
  const A = C == null ? void 0 : C.className.split(" ")[0];
17085
17083
  A && (h(A), (x = C == null ? void 0 : C.querySelector("button")) == null || x.focus());
17086
17084
  break;
@@ -17240,38 +17238,38 @@ let Pi = null;
17240
17238
  const mx = () => {
17241
17239
  const e = ce(), t = "richTextEditor_link_", { id: n, showLinkEditor: r, dispatch: a, reportError: i } = Ke(en), s = Sn(), o = Fy(s), l = (o == null ? void 0 : o.text) || ax(s), [u, c] = de(Er(s)), h = Ld(s, "link-editor", `${n}-link`), p = ke(null);
17242
17240
  he(() => {
17243
- var D;
17244
- !u && r && ((D = p.current) == null || D.focus());
17241
+ var y;
17242
+ !u && r && ((y = p.current) == null || y.focus());
17245
17243
  }, [u]), he(() => {
17246
17244
  Pi && clearTimeout(Pi), Pi = setTimeout(() => {
17247
17245
  c(Er(s));
17248
17246
  }, 500);
17249
17247
  }, [s.selection]);
17250
- const m = [], g = ["open", "edit", "remove"].map((D) => {
17251
- const y = {
17248
+ const m = [], g = ["open", "edit", "remove"].map((y) => {
17249
+ const D = {
17252
17250
  variant: "tertiary",
17253
17251
  size: "small",
17254
17252
  children: e.formatMessage(
17255
- { id: `${t}${D}` },
17253
+ { id: `${t}${y}` },
17256
17254
  { link: o == null ? void 0 : o.pretty }
17257
17255
  )
17258
17256
  };
17259
- switch (m.push({ className: D }), D) {
17257
+ switch (m.push({ className: y }), y) {
17260
17258
  case "open":
17261
- y.href = (o == null ? void 0 : o.full) || "", y.onClick = (x) => {
17259
+ D.href = (o == null ? void 0 : o.full) || "", D.onClick = (x) => {
17262
17260
  x.preventDefault(), x.stopPropagation(), window.open((o == null ? void 0 : o.full) || "", "_blank"), a([{ type: "showLinkEditor", value: !1 }]);
17263
- }, y.children = /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
17264
- y.children,
17265
- /* @__PURE__ */ d.jsx(qe, { children: e.formatMessage({ id: `${t}${D}_text` }) })
17261
+ }, D.children = /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
17262
+ D.children,
17263
+ /* @__PURE__ */ d.jsx(qe, { children: e.formatMessage({ id: `${t}${y}_text` }) })
17266
17264
  ] });
17267
17265
  break;
17268
17266
  case "edit":
17269
- y.onClick = () => {
17267
+ D.onClick = () => {
17270
17268
  c(!1);
17271
17269
  };
17272
17270
  break;
17273
17271
  case "remove":
17274
- y.onClick = () => {
17272
+ D.onClick = () => {
17275
17273
  const x = [
17276
17274
  { type: "showLinkEditor", value: !1 }
17277
17275
  ];
@@ -17279,7 +17277,7 @@ const mx = () => {
17279
17277
  };
17280
17278
  break;
17281
17279
  }
17282
- return y;
17280
+ return D;
17283
17281
  }), f = [
17284
17282
  {
17285
17283
  id: "url",
@@ -17320,8 +17318,8 @@ const mx = () => {
17320
17318
  callbacks: {
17321
17319
  onOpen: () => {
17322
17320
  setTimeout(() => {
17323
- var D;
17324
- return (D = p.current) == null ? void 0 : D.focus();
17321
+ var y;
17322
+ return (y = p.current) == null ? void 0 : y.focus();
17325
17323
  });
17326
17324
  }
17327
17325
  },
@@ -17333,16 +17331,16 @@ const mx = () => {
17333
17331
  className: Z({ "show-labels": l }),
17334
17332
  meta: { shouldReset: !0, showRequiredLabels: !1 },
17335
17333
  functions: {
17336
- onSuccess: async (D) => {
17334
+ onSuccess: async (y) => {
17337
17335
  setTimeout(() => {
17338
- const y = [
17336
+ const D = [
17339
17337
  { type: "showLinkEditor", value: !1 }
17340
17338
  ];
17341
- if (D.url) {
17342
- const { full: x } = Bc(D.url);
17343
- o != null && o.full ? hx(s, x, n, i) : fx(s, x, n, i), y.push({ type: "lastAnchor", value: null });
17339
+ if (y.url) {
17340
+ const { full: x } = Bc(y.url);
17341
+ o != null && o.full ? hx(s, x, n, i) : fx(s, x, n, i), D.push({ type: "lastAnchor", value: null });
17344
17342
  }
17345
- a(y);
17343
+ a(D);
17346
17344
  });
17347
17345
  }
17348
17346
  },
@@ -17507,8 +17505,8 @@ const Fx = ({
17507
17505
  lastKey: null,
17508
17506
  hasInteracted: !1,
17509
17507
  hasLoaded: !1
17510
- }, [f, D] = tr(Ha, g), {
17511
- originalValue: y,
17508
+ }, [f, y] = tr(Ha, g), {
17509
+ originalValue: D,
17512
17510
  initialValue: x,
17513
17511
  stringValue: B,
17514
17512
  lastAnchor: k,
@@ -17518,7 +17516,7 @@ const Fx = ({
17518
17516
  mentionPopover: $
17519
17517
  } = f, N = (S) => {
17520
17518
  const z = S || Ta[0];
17521
- S && D([{ type: "tabbableOption", value: z }]);
17519
+ S && y([{ type: "tabbableOption", value: z }]);
17522
17520
  }, M = `rte-${e}`, R = Pe(
17523
17521
  (S) => /* @__PURE__ */ d.jsx(By, { ...S }),
17524
17522
  []
@@ -17542,33 +17540,33 @@ const Fx = ({
17542
17540
  mentions: s.mentions,
17543
17541
  listMembers: c || (() => Promise.resolve([]))
17544
17542
  })), rx(z, (L) => {
17545
- D([{ type: "initialValue", value: L }]), setTimeout(() => {
17546
- D([{ type: "stringValue", value: Pl(E) }]);
17543
+ y([{ type: "initialValue", value: L }]), setTimeout(() => {
17544
+ y([{ type: "stringValue", value: Pl(E) }]);
17547
17545
  }, 150);
17548
17546
  });
17549
17547
  })();
17550
17548
  }, []), he(() => {
17551
17549
  if (E.children.length > 0 && !T) {
17552
- if (D([{ type: "hasLoaded", value: !0 }]), !i)
17550
+ if (y([{ type: "hasLoaded", value: !0 }]), !i)
17553
17551
  return;
17554
17552
  const S = b.end(E, []);
17555
17553
  Y.select(E, S), Q.focus(E);
17556
17554
  }
17557
17555
  }, [E.children.length]), he(() => {
17558
- t !== "" || !E || pc(y, t) && !A || (b.withoutNormalizing(E, () => {
17556
+ t !== "" || !E || pc(D, t) && !A || (b.withoutNormalizing(E, () => {
17559
17557
  Y.delete(E, {
17560
17558
  at: {
17561
17559
  anchor: b.start(E, []),
17562
17560
  focus: b.end(E, [])
17563
17561
  }
17564
17562
  }), Y.deselect(E), E.children.length !== 0 && Y.unwrapNodes(E, { at: [0] }), Y.insertNodes(E, m, { at: [0] });
17565
- }), D([
17563
+ }), y([
17566
17564
  { type: "initialValue", value: m },
17567
17565
  { type: "lastAnchor", value: null }
17568
17566
  ]));
17569
17567
  }, [t]);
17570
17568
  const j = yc(() => {
17571
- sx(E, $.show, c, D);
17569
+ sx(E, $.show, c, y);
17572
17570
  }, 100);
17573
17571
  return x ? /* @__PURE__ */ d.jsx("div", { id: M, className: "rich-text-editor", children: /* @__PURE__ */ d.jsxs(
17574
17572
  en.Provider,
@@ -17577,7 +17575,7 @@ const Fx = ({
17577
17575
  ...f,
17578
17576
  id: M,
17579
17577
  setFocus: N,
17580
- dispatch: D,
17578
+ dispatch: y,
17581
17579
  reportError: p
17582
17580
  },
17583
17581
  children: [
@@ -17589,7 +17587,7 @@ const Fx = ({
17589
17587
  onChange: (S) => {
17590
17588
  if (E.operations.some((L) => L.type !== "set_selection")) {
17591
17589
  const L = ux(S);
17592
- h(L), D([{ type: "stringValue", value: Pl(E) }]), A || D([{ type: "hasInteracted", value: !0 }]), j(), u && console.log({ serialized: L, json: S });
17590
+ h(L), y([{ type: "stringValue", value: Pl(E) }]), A || y([{ type: "hasInteracted", value: !0 }]), j(), u && console.log({ serialized: L, json: S });
17593
17591
  }
17594
17592
  },
17595
17593
  ...o,
@@ -17605,7 +17603,7 @@ const Fx = ({
17605
17603
  tabIndex: 0,
17606
17604
  onKeyDown: (S) => {
17607
17605
  if (S.key === "Enter") {
17608
- $.show && (S.preventDefault(), S.stopPropagation(), nf(E, $, D, M));
17606
+ $.show && (S.preventDefault(), S.stopPropagation(), nf(E, $, y, M));
17609
17607
  const { selection: z } = E;
17610
17608
  if (z) {
17611
17609
  const L = U.isCollapsed(z), [ne, J] = b.node(E, z, { depth: 1 });
@@ -17634,7 +17632,7 @@ const Fx = ({
17634
17632
  }
17635
17633
  } else if (S.key === "Escape") {
17636
17634
  if ($.show) {
17637
- S.preventDefault(), S.stopPropagation(), D([
17635
+ S.preventDefault(), S.stopPropagation(), y([
17638
17636
  { type: "mentionPopover", value: { ...$, show: !1 } }
17639
17637
  ]);
17640
17638
  return;
@@ -17643,17 +17641,17 @@ const Fx = ({
17643
17641
  S.preventDefault(), S.stopPropagation();
17644
17642
  const { selectedUser: z, possibleUsers: L } = $;
17645
17643
  let ne = S.key === "ArrowUp" ? z - 1 : z + 1;
17646
- ne < 0 && (ne = L.length - 1), ne >= L.length && (ne = 0), D([
17644
+ ne < 0 && (ne = L.length - 1), ne >= L.length && (ne = 0), y([
17647
17645
  {
17648
17646
  type: "mentionPopover",
17649
17647
  value: { ...$, selectedUser: ne }
17650
17648
  }
17651
17649
  ]);
17652
17650
  }
17653
- D([{ type: "lastKey", value: S.key }]), ix(S, E, D, p);
17651
+ y([{ type: "lastKey", value: S.key }]), ix(S, E, y, p);
17654
17652
  },
17655
17653
  onBlur: () => {
17656
- E.selection && D([{ type: "lastAnchor", value: E.selection.anchor }]);
17654
+ E.selection && y([{ type: "lastAnchor", value: E.selection.anchor }]);
17657
17655
  },
17658
17656
  onFocus: () => {
17659
17657
  if (k) {
@@ -17857,7 +17855,7 @@ const Sx = ({
17857
17855
  initialFormStatus: u = "NOT_SUBMITTED"
17858
17856
  /* NOT_SUBMITTED */
17859
17857
  }) => {
17860
- const [c, h] = de([]), [p, m] = de(!0), [g, f] = de(u), { formatMessage: D } = ce(), y = async (k) => {
17858
+ const [c, h] = de([]), [p, m] = de(!0), [g, f] = de(u), { formatMessage: y } = ce(), D = async (k) => {
17861
17859
  k.preventDefault();
17862
17860
  try {
17863
17861
  await l(c), h([]), f(
@@ -17882,20 +17880,20 @@ const Sx = ({
17882
17880
  );
17883
17881
  };
17884
17882
  return g === "CLOSED" ? null : g === "ERROR" || g === "SUCCESS" ? /* @__PURE__ */ d.jsxs("div", { className: "invite-form-wrapper", children: [
17885
- /* @__PURE__ */ d.jsx("div", { className: "content centred", children: g === "SUCCESS" ? /* @__PURE__ */ d.jsx("h2", { className: "success-title", children: D({ id: "inviteForm_success" }) }) : /* @__PURE__ */ d.jsxs("h2", { className: "error-title", children: [
17883
+ /* @__PURE__ */ d.jsx("div", { className: "content centred", children: g === "SUCCESS" ? /* @__PURE__ */ d.jsx("h2", { className: "success-title", children: y({ id: "inviteForm_success" }) }) : /* @__PURE__ */ d.jsxs("h2", { className: "error-title", children: [
17886
17884
  " ",
17887
- D({ id: "inviteForm_error" })
17885
+ y({ id: "inviteForm_error" })
17888
17886
  ] }) }),
17889
17887
  /* @__PURE__ */ d.jsx(Cn, {}),
17890
17888
  /* @__PURE__ */ d.jsx("div", { className: "footer", children: g === "SUCCESS" ? /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
17891
- /* @__PURE__ */ d.jsx(Se, { variant: "secondary", onClick: x, children: D({ id: "inviteForm_ctaSendMoreInvites" }) }),
17892
- /* @__PURE__ */ d.jsx(Se, { onClick: B, children: D({ id: "inviteForm_ctaDone" }) })
17893
- ] }) : /* @__PURE__ */ d.jsx(Se, { onClick: x, children: D({ id: "inviteForm_ctaTryAgain" }) }) })
17889
+ /* @__PURE__ */ d.jsx(Se, { variant: "secondary", onClick: x, children: y({ id: "inviteForm_ctaSendMoreInvites" }) }),
17890
+ /* @__PURE__ */ d.jsx(Se, { onClick: B, children: y({ id: "inviteForm_ctaDone" }) })
17891
+ ] }) : /* @__PURE__ */ d.jsx(Se, { onClick: x, children: y({ id: "inviteForm_ctaTryAgain" }) }) })
17894
17892
  ] }) : /* @__PURE__ */ d.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ d.jsxs(
17895
17893
  "form",
17896
17894
  {
17897
17895
  style: { backgroundColor: i },
17898
- onSubmit: y,
17896
+ onSubmit: D,
17899
17897
  className: Z("invite-form gtm-trackable"),
17900
17898
  children: [
17901
17899
  /* @__PURE__ */ d.jsxs("fieldset", { className: "content", children: [
@@ -17906,7 +17904,7 @@ const Sx = ({
17906
17904
  {
17907
17905
  id: "email-input",
17908
17906
  inputClassName: "email-input input",
17909
- placeholder: D({ id: "inviteForm_email_placeholder" }),
17907
+ placeholder: y({ id: "inviteForm_email_placeholder" }),
17910
17908
  emails: c,
17911
17909
  onChange: (k) => {
17912
17910
  h(k), m(!k.length);
@@ -17924,7 +17922,7 @@ const Sx = ({
17924
17922
  A(C), m(!c.length);
17925
17923
  },
17926
17924
  className: "remove-email-button",
17927
- screenreaderText: D({ id: "overlay_close" })
17925
+ screenreaderText: y({ id: "overlay_close" })
17928
17926
  }
17929
17927
  )
17930
17928
  ] }, C)
@@ -18363,8 +18361,8 @@ const Mx = {
18363
18361
  url: h,
18364
18362
  logInButton: p,
18365
18363
  successMessage: m
18366
- }, [f, D] = tr(Ha, Mx), {
18367
- validFields: y,
18364
+ }, [f, y] = tr(Ha, Mx), {
18365
+ validFields: D,
18368
18366
  emailDetails: x,
18369
18367
  shouldManuallyApprove: B,
18370
18368
  shouldDisableButton: k,
@@ -18385,7 +18383,7 @@ const Mx = {
18385
18383
  he(() => {
18386
18384
  B === !0 && N.jobTitle.current && N.jobTitle.current.focus();
18387
18385
  }, [B]), he(() => {
18388
- T["signup-this-session"] && D([{ type: "showSuccessMessage", value: !0 }]);
18386
+ T["signup-this-session"] && y([{ type: "showSuccessMessage", value: !0 }]);
18389
18387
  }, [T]), he(() => {
18390
18388
  C && T["functional-cookie-consent"] && $("signup-this-session", "true", {
18391
18389
  path: "/",
@@ -18399,10 +18397,10 @@ const Mx = {
18399
18397
  functions: r,
18400
18398
  refs: N,
18401
18399
  state: f,
18402
- dispatch: D,
18400
+ dispatch: y,
18403
18401
  dataToSubmit: s,
18404
18402
  intl: l
18405
- }), [s, r, l, N, g, f]), R = k ? !0 : B ? !Object.values(y).every((w) => w === !0) : !y.name || !y.email || ["exists", "pending", "verify"].includes(x.boxType);
18403
+ }), [s, r, l, N, g, f]), R = k ? !0 : B ? !Object.values(D).every((w) => w === !0) : !D.name || !D.email || ["exists", "pending", "verify"].includes(x.boxType);
18406
18404
  return g.successMessage && C ? /* @__PURE__ */ d.jsx(Rx, { className: e }) : /* @__PURE__ */ d.jsxs(
18407
18405
  "fieldset",
18408
18406
  {
@@ -18459,12 +18457,12 @@ const Mx = {
18459
18457
  dataToSubmit: s,
18460
18458
  createAccount: r.createAccount,
18461
18459
  onSuccess: r.onSuccess,
18462
- dispatch: D,
18460
+ dispatch: y,
18463
18461
  state: f
18464
18462
  });
18465
18463
  },
18466
18464
  onCatch: (w) => {
18467
- r.handleError(w), D([
18465
+ r.handleError(w), y([
18468
18466
  { type: "showSuccessMessage", value: !1 },
18469
18467
  { type: "showError", value: !0 }
18470
18468
  ]);
@@ -18491,7 +18489,7 @@ function $x() {
18491
18489
  if (Ll)
18492
18490
  return Me;
18493
18491
  Ll = 1;
18494
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, c = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, p = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, D = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, x = e ? Symbol.for("react.scope") : 60119;
18492
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, c = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, p = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, y = e ? Symbol.for("react.fundamental") : 60117, D = e ? Symbol.for("react.responder") : 60118, x = e ? Symbol.for("react.scope") : 60119;
18495
18493
  function B(C) {
18496
18494
  if (typeof C == "object" && C !== null) {
18497
18495
  var A = C.$$typeof;
@@ -18550,7 +18548,7 @@ function $x() {
18550
18548
  }, Me.isSuspense = function(C) {
18551
18549
  return B(C) === h;
18552
18550
  }, Me.isValidElementType = function(C) {
18553
- return typeof C == "string" || typeof C == "function" || C === r || C === u || C === i || C === a || C === h || C === p || typeof C == "object" && C !== null && (C.$$typeof === g || C.$$typeof === m || C.$$typeof === s || C.$$typeof === o || C.$$typeof === c || C.$$typeof === D || C.$$typeof === y || C.$$typeof === x || C.$$typeof === f);
18551
+ return typeof C == "string" || typeof C == "function" || C === r || C === u || C === i || C === a || C === h || C === p || typeof C == "object" && C !== null && (C.$$typeof === g || C.$$typeof === m || C.$$typeof === s || C.$$typeof === o || C.$$typeof === c || C.$$typeof === y || C.$$typeof === D || C.$$typeof === x || C.$$typeof === f);
18554
18552
  }, Me.typeOf = B, Me;
18555
18553
  }
18556
18554
  var $e = {};
@@ -18565,10 +18563,10 @@ var $e = {};
18565
18563
  var zl;
18566
18564
  function Ix() {
18567
18565
  return zl || (zl = 1, process.env.NODE_ENV !== "production" && function() {
18568
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, c = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, p = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, D = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, x = e ? Symbol.for("react.scope") : 60119;
18566
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, c = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, p = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, y = e ? Symbol.for("react.fundamental") : 60117, D = e ? Symbol.for("react.responder") : 60118, x = e ? Symbol.for("react.scope") : 60119;
18569
18567
  function B(G) {
18570
18568
  return typeof G == "string" || typeof G == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
18571
- G === r || G === u || G === i || G === a || G === h || G === p || typeof G == "object" && G !== null && (G.$$typeof === g || G.$$typeof === m || G.$$typeof === s || G.$$typeof === o || G.$$typeof === c || G.$$typeof === D || G.$$typeof === y || G.$$typeof === x || G.$$typeof === f);
18569
+ G === r || G === u || G === i || G === a || G === h || G === p || typeof G == "object" && G !== null && (G.$$typeof === g || G.$$typeof === m || G.$$typeof === s || G.$$typeof === o || G.$$typeof === c || G.$$typeof === y || G.$$typeof === D || G.$$typeof === x || G.$$typeof === f);
18572
18570
  }
18573
18571
  function k(G) {
18574
18572
  if (typeof G == "object" && G !== null) {
@@ -18789,14 +18787,14 @@ function qx() {
18789
18787
  return W;
18790
18788
  }
18791
18789
  var p = "<<anonymous>>", m = {
18792
- array: y("array"),
18793
- bigint: y("bigint"),
18794
- bool: y("boolean"),
18795
- func: y("function"),
18796
- number: y("number"),
18797
- object: y("object"),
18798
- string: y("string"),
18799
- symbol: y("symbol"),
18790
+ array: D("array"),
18791
+ bigint: D("bigint"),
18792
+ bool: D("boolean"),
18793
+ func: D("function"),
18794
+ number: D("number"),
18795
+ object: D("object"),
18796
+ string: D("string"),
18797
+ symbol: D("symbol"),
18800
18798
  any: x(),
18801
18799
  arrayOf: B,
18802
18800
  element: k(),
@@ -18816,7 +18814,7 @@ function qx() {
18816
18814
  this.message = v, this.data = W && typeof W == "object" ? W : {}, this.stack = "";
18817
18815
  }
18818
18816
  f.prototype = Error.prototype;
18819
- function D(v) {
18817
+ function y(v) {
18820
18818
  if (process.env.NODE_ENV !== "production")
18821
18819
  var W = {}, X = 0;
18822
18820
  function _(q, I, H, ee, te, ie, me) {
@@ -18839,7 +18837,7 @@ function qx() {
18839
18837
  var F = _.bind(null, !1);
18840
18838
  return F.isRequired = _.bind(null, !0), F;
18841
18839
  }
18842
- function y(v) {
18840
+ function D(v) {
18843
18841
  function W(X, _, F, q, I, H) {
18844
18842
  var ee = X[_], te = z(ee);
18845
18843
  if (te !== v) {
@@ -18851,10 +18849,10 @@ function qx() {
18851
18849
  }
18852
18850
  return null;
18853
18851
  }
18854
- return D(W);
18852
+ return y(W);
18855
18853
  }
18856
18854
  function x() {
18857
- return D(s);
18855
+ return y(s);
18858
18856
  }
18859
18857
  function B(v) {
18860
18858
  function W(X, _, F, q, I) {
@@ -18872,7 +18870,7 @@ function qx() {
18872
18870
  }
18873
18871
  return null;
18874
18872
  }
18875
- return D(W);
18873
+ return y(W);
18876
18874
  }
18877
18875
  function k() {
18878
18876
  function v(W, X, _, F, q) {
@@ -18883,7 +18881,7 @@ function qx() {
18883
18881
  }
18884
18882
  return null;
18885
18883
  }
18886
- return D(v);
18884
+ return y(v);
18887
18885
  }
18888
18886
  function C() {
18889
18887
  function v(W, X, _, F, q) {
@@ -18894,7 +18892,7 @@ function qx() {
18894
18892
  }
18895
18893
  return null;
18896
18894
  }
18897
- return D(v);
18895
+ return y(v);
18898
18896
  }
18899
18897
  function A(v) {
18900
18898
  function W(X, _, F, q, I) {
@@ -18904,7 +18902,7 @@ function qx() {
18904
18902
  }
18905
18903
  return null;
18906
18904
  }
18907
- return D(W);
18905
+ return y(W);
18908
18906
  }
18909
18907
  function T(v) {
18910
18908
  if (!Array.isArray(v))
@@ -18921,7 +18919,7 @@ function qx() {
18921
18919
  });
18922
18920
  return new f("Invalid " + q + " `" + I + "` of value `" + String(H) + "` " + ("supplied to `" + F + "`, expected one of " + te + "."));
18923
18921
  }
18924
- return D(W);
18922
+ return y(W);
18925
18923
  }
18926
18924
  function $(v) {
18927
18925
  function W(X, _, F, q, I) {
@@ -18938,7 +18936,7 @@ function qx() {
18938
18936
  }
18939
18937
  return null;
18940
18938
  }
18941
- return D(W);
18939
+ return y(W);
18942
18940
  }
18943
18941
  function N(v) {
18944
18942
  if (!Array.isArray(v))
@@ -18960,13 +18958,13 @@ function qx() {
18960
18958
  var ve = te.length > 0 ? ", expected one of type [" + te.join(", ") + "]" : "";
18961
18959
  return new f("Invalid " + H + " `" + ee + "` supplied to " + ("`" + I + "`" + ve + "."));
18962
18960
  }
18963
- return D(_);
18961
+ return y(_);
18964
18962
  }
18965
18963
  function M() {
18966
18964
  function v(W, X, _, F, q) {
18967
18965
  return j(W[X]) ? null : new f("Invalid " + F + " `" + q + "` supplied to " + ("`" + _ + "`, expected a ReactNode."));
18968
18966
  }
18969
- return D(v);
18967
+ return y(v);
18970
18968
  }
18971
18969
  function R(v, W, X, _, F) {
18972
18970
  return new f(
@@ -18988,7 +18986,7 @@ function qx() {
18988
18986
  }
18989
18987
  return null;
18990
18988
  }
18991
- return D(W);
18989
+ return y(W);
18992
18990
  }
18993
18991
  function E(v) {
18994
18992
  function W(X, _, F, q, I) {
@@ -19011,7 +19009,7 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
19011
19009
  }
19012
19010
  return null;
19013
19011
  }
19014
- return D(W);
19012
+ return y(W);
19015
19013
  }
19016
19014
  function j(v) {
19017
19015
  switch (typeof v) {
@@ -19587,7 +19585,7 @@ var Jl = {
19587
19585
  }, f = function(w) {
19588
19586
  var E = c("setReturnFocus", w);
19589
19587
  return E || (E === !1 ? !1 : w);
19590
- }, D = function(w) {
19588
+ }, y = function(w) {
19591
19589
  var E = w.target, j = w.event, S = w.isBackward, z = S === void 0 ? !1 : S;
19592
19590
  E = E || aa(j), p();
19593
19591
  var L = null;
@@ -19619,7 +19617,7 @@ var Jl = {
19619
19617
  } else
19620
19618
  L = c("fallbackFocus");
19621
19619
  return L;
19622
- }, y = function(w) {
19620
+ }, D = function(w) {
19623
19621
  var E = aa(w);
19624
19622
  if (!(u(E, w) >= 0)) {
19625
19623
  if (fr(i.clickOutsideDeactivates, w)) {
@@ -19660,7 +19658,7 @@ var Jl = {
19660
19658
  }) || (z = !1);
19661
19659
  else
19662
19660
  z = !1;
19663
- z && (S = D({
19661
+ z && (S = y({
19664
19662
  // move FROM the MRU node, not event-related node (which will be the node that is
19665
19663
  // outside the trap causing the focus escape we're trying to fix)
19666
19664
  target: s.mostRecentlyFocusedNode,
@@ -19671,7 +19669,7 @@ var Jl = {
19671
19669
  }, B = function(w) {
19672
19670
  var E = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
19673
19671
  s.recentNavEvent = w;
19674
- var j = D({
19672
+ var j = y({
19675
19673
  event: w,
19676
19674
  isBackward: E
19677
19675
  });
@@ -19689,10 +19687,10 @@ var Jl = {
19689
19687
  if (s.active)
19690
19688
  return Jl.activateTrap(a, o), s.delayInitialFocusTimer = i.delayInitialFocus ? Xl(function() {
19691
19689
  g(h());
19692
- }) : g(h()), r.addEventListener("focusin", x, !0), r.addEventListener("mousedown", y, {
19690
+ }) : g(h()), r.addEventListener("focusin", x, !0), r.addEventListener("mousedown", D, {
19693
19691
  capture: !0,
19694
19692
  passive: !1
19695
- }), r.addEventListener("touchstart", y, {
19693
+ }), r.addEventListener("touchstart", D, {
19696
19694
  capture: !0,
19697
19695
  passive: !1
19698
19696
  }), r.addEventListener("click", C, {
@@ -19704,7 +19702,7 @@ var Jl = {
19704
19702
  }), o;
19705
19703
  }, T = function() {
19706
19704
  if (s.active)
19707
- return r.removeEventListener("focusin", x, !0), r.removeEventListener("mousedown", y, !0), r.removeEventListener("touchstart", y, !0), r.removeEventListener("click", C, !0), r.removeEventListener("keydown", k, !0), o;
19705
+ return r.removeEventListener("focusin", x, !0), r.removeEventListener("mousedown", D, !0), r.removeEventListener("touchstart", D, !0), r.removeEventListener("click", C, !0), r.removeEventListener("keydown", k, !0), o;
19708
19706
  }, $ = function(w) {
19709
19707
  var E = w.some(function(j) {
19710
19708
  var S = Array.from(j.removedNodes);
@@ -20227,14 +20225,14 @@ const Ja = ({
20227
20225
  className: c = "",
20228
20226
  gtmContext: h = "Modal"
20229
20227
  }) => {
20230
- const p = ce(), { registerOverlay: m, unregisterOverlay: g } = zw(), [f, D] = de(t), y = (k) => {
20228
+ const p = ce(), { registerOverlay: m, unregisterOverlay: g } = zw(), [f, y] = de(t), D = (k) => {
20231
20229
  k.key === "Escape" && x(!1);
20232
20230
  };
20233
- he(() => (window.addEventListener("keyup", y), () => {
20234
- window.removeEventListener("keyup", y);
20231
+ he(() => (window.addEventListener("keyup", D), () => {
20232
+ window.removeEventListener("keyup", D);
20235
20233
  }));
20236
20234
  const x = (k) => {
20237
- D(k), k ? (a(), m(e)) : (i(), g(e));
20235
+ y(k), k ? (a(), m(e)) : (i(), g(e));
20238
20236
  };
20239
20237
  he(() => (x(t), () => {
20240
20238
  f && g(e);
@@ -20660,34 +20658,34 @@ const Vw = [
20660
20658
  };
20661
20659
  r || (r = u.imageFullWidth ? "default" : "light");
20662
20660
  const c = ["eyebrow", "title", "text"], h = { eyebrow: "small", title: "h1", text: "p" }, p = {};
20663
- c.forEach((D) => {
20664
- if (!t[D]) {
20665
- p[D] = !1;
20661
+ c.forEach((y) => {
20662
+ if (!t[y]) {
20663
+ p[y] = !1;
20666
20664
  return;
20667
20665
  }
20668
- if (!s[D]) {
20669
- if (typeof t[D] == "object") {
20670
- p[D] = t[D];
20671
- const { text: y, element: x } = t[D];
20666
+ if (!s[y]) {
20667
+ if (typeof t[y] == "object") {
20668
+ p[y] = t[y];
20669
+ const { text: D, element: x } = t[y];
20672
20670
  if (x && Vw.includes(x.toLowerCase()))
20673
20671
  return;
20674
- p[D] = {
20675
- text: y,
20676
- element: h[D]
20672
+ p[y] = {
20673
+ text: D,
20674
+ element: h[y]
20677
20675
  };
20678
20676
  return;
20679
20677
  }
20680
- p[D] = {
20681
- text: t[D],
20682
- element: h[D]
20678
+ p[y] = {
20679
+ text: t[y],
20680
+ element: h[y]
20683
20681
  };
20684
20682
  }
20685
20683
  });
20686
20684
  const m = o && o.text && o.link;
20687
- return m && o.link[0] === "#" && (o.props || (o.props = {}), o.props.onClick = (D) => {
20688
- D.preventDefault(), D.stopPropagation();
20689
- const y = document.getElementById(o.link.substring(1));
20690
- y && y.scrollIntoView({ behavior: "smooth" });
20685
+ return m && o.link[0] === "#" && (o.props || (o.props = {}), o.props.onClick = (y) => {
20686
+ y.preventDefault(), y.stopPropagation();
20687
+ const D = document.getElementById(o.link.substring(1));
20688
+ D && D.scrollIntoView({ behavior: "smooth" });
20691
20689
  }), /* @__PURE__ */ d.jsx(
20692
20690
  jn,
20693
20691
  {
@@ -20700,10 +20698,10 @@ const Vw = [
20700
20698
  }),
20701
20699
  children: /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
20702
20700
  /* @__PURE__ */ d.jsxs("div", { className: "content-wrapper", children: [
20703
- c.map((D) => {
20704
- if (p[D] && typeof p[D] == "object") {
20705
- const { text: y, element: x = "" } = p[D];
20706
- return D === "text" ? /* @__PURE__ */ d.jsx(Fr, { overrideType: "text-only", className: "text", children: y }, D) : re.createElement(x, { key: D, className: D }, y);
20701
+ c.map((y) => {
20702
+ if (p[y] && typeof p[y] == "object") {
20703
+ const { text: D, element: x = "" } = p[y];
20704
+ return y === "text" ? /* @__PURE__ */ d.jsx(Fr, { overrideType: "text-only", className: "text", children: D }, y) : re.createElement(x, { key: y, className: y }, D);
20707
20705
  }
20708
20706
  return null;
20709
20707
  }),
@@ -20941,13 +20939,13 @@ const ek = ({
20941
20939
  gtmEvent: "learning-hub"
20942
20940
  }
20943
20941
  }, Gw = ({ data: e, cta: t, link: n, gtmContext: r }) => {
20944
- var f, D;
20942
+ var f, y;
20945
20943
  const a = ce(), [i, s] = de({
20946
20944
  loading: !1,
20947
20945
  registered: e.registered || !1
20948
20946
  });
20949
20947
  he(() => {
20950
- e.registered && s((y) => ({ ...y, registered: !0 }));
20948
+ e.registered && s((D) => ({ ...D, registered: !0 }));
20951
20949
  }, [e.registered]);
20952
20950
  const { customLinkText: o, startDate: l, dateHasPassed: u, pill: c, slug: h } = e, p = e.contentType;
20953
20951
  let m = "";
@@ -20977,8 +20975,8 @@ const ek = ({
20977
20975
  ) : null;
20978
20976
  const g = ["communityPage", "microcourse", "event"];
20979
20977
  if (t && t.onClick && g.includes(p) && c !== "premium") {
20980
- const y = i.loading || i.registered || ((D = e == null ? void 0 : e.members) == null ? void 0 : D.isMember), x = async (B) => {
20981
- if (B.preventDefault(), B.stopPropagation(), !(y || !t || !t.onClick)) {
20978
+ const D = i.loading || i.registered || ((y = e == null ? void 0 : e.members) == null ? void 0 : y.isMember), x = async (B) => {
20979
+ if (B.preventDefault(), B.stopPropagation(), !(D || !t || !t.onClick)) {
20982
20980
  s((k) => ({ ...k, loading: !0 }));
20983
20981
  try {
20984
20982
  const k = await t.onClick(e);
@@ -21001,12 +20999,12 @@ const ek = ({
21001
20999
  className: "gtm-trackable",
21002
21000
  size: "small",
21003
21001
  styling: { fullWidth: !0 },
21004
- disabled: y,
21002
+ disabled: D,
21005
21003
  "data-gtm-event-context": `${r}Page-${p}: ${h}`,
21006
21004
  "data-gtm-event-type": `${r}-${p}-register-click`,
21007
21005
  "data-testid": "in-card-button",
21008
21006
  children: o || a.formatMessage({
21009
- id: `card_cta_${p}${y ? `_${i.loading ? "loading" : "done"}` : ""}`
21007
+ id: `card_cta_${p}${D ? `_${i.loading ? "loading" : "done"}` : ""}`
21010
21008
  })
21011
21009
  }
21012
21010
  )
@@ -21034,13 +21032,13 @@ const Qw = {
21034
21032
  const l = ce(), u = Ke(tn), c = u && typeof u.id == "string", h = re.useRef(null), [p, m] = de({
21035
21033
  data: null,
21036
21034
  isLoading: !0
21037
- }), { data: g, isLoading: f } = p, D = Pe(() => {
21035
+ }), { data: g, isLoading: f } = p, y = Pe(() => {
21038
21036
  n(t, c).then((z) => {
21039
21037
  m(() => ({ data: z, isLoading: !1 }));
21040
21038
  }).catch(() => m((z) => ({ ...z, isLoading: !1 })));
21041
21039
  }, [e]);
21042
21040
  if (he(() => {
21043
- D();
21041
+ y();
21044
21042
  }, []), f || !g)
21045
21043
  return /* @__PURE__ */ d.jsx(
21046
21044
  Pt,
@@ -21054,15 +21052,15 @@ const Qw = {
21054
21052
  text: l.formatMessage({ id: `card_cta_${t.contentType}` }),
21055
21053
  onClick: s
21056
21054
  });
21057
- const { contentType: y } = g;
21058
- if (!y || !Ra[y])
21055
+ const { contentType: D } = g;
21056
+ if (!D || !Ra[D])
21059
21057
  return /* @__PURE__ */ d.jsx(Pt, { element: "li", className: "card-wrapper" });
21060
21058
  const {
21061
21059
  basePath: x = "",
21062
21060
  className: B,
21063
21061
  length: k,
21064
21062
  gtmEvent: C
21065
- } = Ra[y];
21063
+ } = Ra[D];
21066
21064
  let A = g.slug ? `${x}${g.slug}` : !1;
21067
21065
  g.slug && (g.slug.slice(0, 4) === "http" || g.slug.slice(0, 2) === "//" || g.slug.slice(0, 6) === "mailto" || g.slug.slice(0, 3) === "tel") && (A = g.slug);
21068
21066
  const T = (z) => {
@@ -21091,18 +21089,18 @@ const Qw = {
21091
21089
  "no-link": !A,
21092
21090
  "has-image": g.banner
21093
21091
  }),
21094
- "data-testid": `${y}-card`,
21092
+ "data-testid": `${D}-card`,
21095
21093
  children: /* @__PURE__ */ d.jsxs("div", { ...N, ref: h, children: [
21096
21094
  /* @__PURE__ */ d.jsx(
21097
21095
  Rh,
21098
21096
  {
21099
21097
  className: "card-label",
21100
- contentType: y,
21098
+ contentType: D,
21101
21099
  customIcon: g.isPrivate ? "lock-locked" : g.customIcon,
21102
21100
  customLabel: g.customLabel
21103
21101
  }
21104
21102
  ),
21105
- y === "communityPage" && (g == null ? void 0 : g.createdAt) && Dh(g == null ? void 0 : g.createdAt, 60) && /* @__PURE__ */ d.jsx(Ln, { size: "small", variant: "information", "data-testid": "new-community", children: l.formatMessage({ id: "card_new" }) }),
21103
+ D === "communityPage" && (g == null ? void 0 : g.createdAt) && Dh(g == null ? void 0 : g.createdAt, 60) && /* @__PURE__ */ d.jsx(Ln, { size: "small", variant: "information", "data-testid": "new-community", children: l.formatMessage({ id: "card_new" }) }),
21106
21104
  g.startDate && !g.isOngoingEvent && /* @__PURE__ */ d.jsx(
21107
21105
  Ln,
21108
21106
  {
@@ -21132,7 +21130,7 @@ const Qw = {
21132
21130
  showGap: B !== "question",
21133
21131
  showText: !0
21134
21132
  },
21135
- multipleText: ["event", "solutionArticle"].includes(y) ? l.formatMessage({ id: `card_contributors_${y}` }) : void 0,
21133
+ multipleText: ["event", "solutionArticle"].includes(D) ? l.formatMessage({ id: `card_contributors_${D}` }) : void 0,
21136
21134
  "data-testid": "contributors"
21137
21135
  }
21138
21136
  ),
@@ -21244,7 +21242,7 @@ const tC = ({
21244
21242
  }), { cardsPerPage: h, isLoading: p } = u, [m, g] = de({
21245
21243
  currentPage: 0,
21246
21244
  loadedPages: [0]
21247
- }), { currentPage: f, loadedPages: D } = m, [y, x] = de(""), B = t.length, k = Math.ceil(B / h), C = ke(null), A = Mr(!0, !0, C == null ? void 0 : C.current);
21245
+ }), { currentPage: f, loadedPages: y } = m, [D, x] = de(""), B = t.length, k = Math.ceil(B / h), C = ke(null), A = Mr(!0, !0, C == null ? void 0 : C.current);
21248
21246
  he(() => {
21249
21247
  let w = 1;
21250
21248
  A && (A >= Wi.fourCards ? w = 4 : A >= Wi.threeCards ? w = 3 : A >= Wi.twoCards && (w = 2), w > B && (w = B)), c((E) => ({
@@ -21270,7 +21268,7 @@ const tC = ({
21270
21268
  g((S) => ({
21271
21269
  ...S,
21272
21270
  currentPage: E,
21273
- loadedPages: [.../* @__PURE__ */ new Set([...D, E])]
21271
+ loadedPages: [.../* @__PURE__ */ new Set([...y, E])]
21274
21272
  }));
21275
21273
  const j = () => {
21276
21274
  const S = E * u.cardsPerPage, z = S + u.cardsPerPage;
@@ -21325,7 +21323,7 @@ const tC = ({
21325
21323
  "data-testid": "carousel-list",
21326
21324
  children: t.map((w, E) => {
21327
21325
  let j = R(w, E);
21328
- return j && Xw(E, h, f, D) ? /* @__PURE__ */ d.jsx(
21326
+ return j && Xw(E, h, f, y) ? /* @__PURE__ */ d.jsx(
21329
21327
  kf,
21330
21328
  {
21331
21329
  id: j,
@@ -21400,7 +21398,7 @@ const tC = ({
21400
21398
  }
21401
21399
  ) })
21402
21400
  ] }),
21403
- /* @__PURE__ */ d.jsx(qe, { "aria-live": "polite", showOnFocus: !1, children: y })
21401
+ /* @__PURE__ */ d.jsx(qe, { "aria-live": "polite", showOnFocus: !1, children: D })
21404
21402
  ] })
21405
21403
  ]
21406
21404
  }
@@ -21459,11 +21457,11 @@ const mr = "joinCommunityButton", _f = ({
21459
21457
  styling: { fullWidth: !0 },
21460
21458
  icon: c && p !== "leaving" ? { icon: "tick", position: "left" } : !1,
21461
21459
  tooltip: !t && !c ? s.formatMessage({ id: `${mr}_closed_tooltip` }) : "",
21462
- onClick: async (D) => {
21460
+ onClick: async (y) => {
21463
21461
  if (u)
21464
21462
  return;
21465
- D.currentTarget.blur(), m(c ? "leaving" : "joining");
21466
- const y = new CustomEvent("ariaLive", {
21463
+ y.currentTarget.blur(), m(c ? "leaving" : "joining");
21464
+ const D = new CustomEvent("ariaLive", {
21467
21465
  detail: {
21468
21466
  message: s.formatMessage(
21469
21467
  { id: `${mr}_aria_live` },
@@ -21471,7 +21469,7 @@ const mr = "joinCommunityButton", _f = ({
21471
21469
  )
21472
21470
  }
21473
21471
  });
21474
- document.dispatchEvent(y);
21472
+ document.dispatchEvent(D);
21475
21473
  const x = c ? i : a;
21476
21474
  typeof x == "function" && setTimeout(async () => {
21477
21475
  await x();
@@ -21635,38 +21633,38 @@ const oa = "languageSwitcher_", ik = ({
21635
21633
  if (he(() => {
21636
21634
  e !== h && p(e);
21637
21635
  }, [e]), !r || !Object.values(r).some(
21638
- (D) => D && D.post_name
21636
+ (y) => y && y.post_name
21639
21637
  ))
21640
21638
  return null;
21641
21639
  const g = Object.keys(r), f = h !== e;
21642
21640
  return /* @__PURE__ */ d.jsxs("div", { className: Z("language-switcher text-small", s, l), children: [
21643
21641
  /* @__PURE__ */ d.jsxs("nav", { children: [
21644
21642
  s !== "short" && /* @__PURE__ */ d.jsx("p", { children: o || u.formatMessage({ id: `${oa}label` }) }),
21645
- /* @__PURE__ */ d.jsx("ul", { children: g.map((D) => {
21643
+ /* @__PURE__ */ d.jsx("ul", { children: g.map((y) => {
21646
21644
  var B;
21647
- if (!qi[D])
21645
+ if (!qi[y])
21648
21646
  return null;
21649
- const y = (B = r[D]) == null ? void 0 : B.post_name;
21650
- let x = { className: D };
21651
- if (h === D)
21647
+ const D = (B = r[y]) == null ? void 0 : B.post_name;
21648
+ let x = { className: y };
21649
+ if (h === y)
21652
21650
  x["aria-label"] = u.formatMessage(
21653
21651
  { id: `${oa}selected` },
21654
- { language: qi[D] }
21652
+ { language: qi[y] }
21655
21653
  );
21656
21654
  else {
21657
- const k = nC(D, y, i);
21655
+ const k = nC(y, D, i);
21658
21656
  x = {
21659
21657
  ...x,
21660
21658
  href: typeof k == "string" ? k : k.url,
21661
21659
  onClick: (C) => {
21662
- p(D), c(D), typeof a < "u" && (C.preventDefault(), C.stopPropagation(), a(
21663
- D,
21660
+ p(y), c(y), typeof a < "u" && (C.preventDefault(), C.stopPropagation(), a(
21661
+ y,
21664
21662
  typeof k == "string" ? k : k.urlForRouter
21665
21663
  ));
21666
21664
  }
21667
21665
  };
21668
21666
  }
21669
- return /* @__PURE__ */ d.jsx("li", { children: /* @__PURE__ */ d.jsx(ir, { ...x, fallbackElement: "span", children: qi[D] }) }, D);
21667
+ return /* @__PURE__ */ d.jsx("li", { children: /* @__PURE__ */ d.jsx(ir, { ...x, fallbackElement: "span", children: qi[y] }) }, y);
21670
21668
  }) }),
21671
21669
  s !== "short" && !f && /* @__PURE__ */ d.jsx("p", { children: u.formatMessage({
21672
21670
  id: `${oa}translation_${t ? "original" : n ? "human" : "machine"}`
@@ -21680,9 +21678,9 @@ const oa = "languageSwitcher_", ik = ({
21680
21678
  { id: `${oa}disclaimer` },
21681
21679
  {
21682
21680
  email: gr.support,
21683
- link: (D) => {
21684
- const y = `mailto:${D}`;
21685
- return /* @__PURE__ */ d.jsx("a", { href: y, children: D });
21681
+ link: (y) => {
21682
+ const D = `mailto:${y}`;
21683
+ return /* @__PURE__ */ d.jsx("a", { href: D, children: y });
21686
21684
  }
21687
21685
  }
21688
21686
  )
@@ -21780,8 +21778,8 @@ const rC = ({
21780
21778
  /* @__PURE__ */ d.jsx("ul", { id: t, hidden: !s, children: n.map(({ href: u, onClick: c, text: h, icon: p, ...m }, g) => {
21781
21779
  const f = {
21782
21780
  ...m,
21783
- onClick: (D) => {
21784
- o(!1), typeof c == "function" && c(D);
21781
+ onClick: (y) => {
21782
+ o(!1), typeof c == "function" && c(y);
21785
21783
  },
21786
21784
  onFocus: () => {
21787
21785
  ua && (clearTimeout(ua), ua = !1);
@@ -21966,8 +21964,8 @@ const ok = ({ tabs: e, className: t = "", preventLocationChange: n }) => {
21966
21964
  m.preventDefault();
21967
21965
  let f = g;
21968
21966
  m.key === "ArrowLeft" ? g > 0 ? f = g - 1 : f = e.length - 1 : m.key === "ArrowRight" && (g < e.length - 1 ? f = g + 1 : f = 0);
21969
- const D = r(e[f].id, e[f].text, f), y = document.getElementById(`tab-${D}`);
21970
- y == null || y.focus(), l(D);
21967
+ const y = r(e[f].id, e[f].text, f), D = document.getElementById(`tab-${y}`);
21968
+ D == null || D.focus(), l(y);
21971
21969
  break;
21972
21970
  }
21973
21971
  case "Enter":
@@ -21984,10 +21982,10 @@ const ok = ({ tabs: e, className: t = "", preventLocationChange: n }) => {
21984
21982
  }
21985
21983
  }, [i]);
21986
21984
  const c = [], h = [];
21987
- return e.forEach(({ id: m, text: g, content: f, href: D, hasCarousel: y }, x) => {
21985
+ return e.forEach(({ id: m, text: g, content: f, href: y, hasCarousel: D }, x) => {
21988
21986
  m = r(m, g, x);
21989
21987
  const B = i === m, k = {};
21990
- D || (k["aria-controls"] = m, k.onClick = (C) => {
21988
+ y || (k["aria-controls"] = m, k.onClick = (C) => {
21991
21989
  C.preventDefault(), C.stopPropagation(), s(m), !n && (window.location.hash = `#${m}`);
21992
21990
  }, h.push(
21993
21991
  /* @__PURE__ */ d.jsx(
@@ -22006,7 +22004,7 @@ const ok = ({ tabs: e, className: t = "", preventLocationChange: n }) => {
22006
22004
  /* @__PURE__ */ d.jsx("li", { "data-testid": "navigation-tab", children: /* @__PURE__ */ d.jsx(
22007
22005
  "a",
22008
22006
  {
22009
- href: D || `#${m}`,
22007
+ href: y || `#${m}`,
22010
22008
  id: `tab-${m}`,
22011
22009
  "aria-controls": m,
22012
22010
  className: Z({ selected: B }),
@@ -22570,8 +22568,8 @@ const Vn = "footer_", Ma = "SiteFooter", nc = ({ group: e }) => {
22570
22568
  });
22571
22569
  }
22572
22570
  const m = o.order && o.order[0] && o[o.order[0]], g = m && o[o.order[0]].order, f = p && window.location.pathname === o.href;
22573
- let D = {}, y = {};
22574
- if (f && (D = { ...D, "aria-current": "page" }), m) {
22571
+ let y = {}, D = {};
22572
+ if (f && (y = { ...y, "aria-current": "page" }), m) {
22575
22573
  const x = o.menuId || e, B = {
22576
22574
  onClick: (k) => Ie.events.onClick(k, { id: x, callback: a, isOpen: r[x] }),
22577
22575
  onFocus: () => Ie.events.onFocus({ id: x }),
@@ -22579,7 +22577,7 @@ const Vn = "footer_", Ma = "SiteFooter", nc = ({ group: e }) => {
22579
22577
  onMouseLeave: () => Ie.events.onBlur({ id: x, callback: a }),
22580
22578
  onMouseEnter: () => Ie.events.onMouseEnter({ id: x, callback: a })
22581
22579
  };
22582
- n && (g && (D = {
22580
+ n && (g && (y = {
22583
22581
  ...B,
22584
22582
  onKeyPress: (k) => {
22585
22583
  k.key === "Enter" && Ie.events.onClick(k, { id: x, callback: a, isOpen: r[x] });
@@ -22589,8 +22587,8 @@ const Vn = "footer_", Ma = "SiteFooter", nc = ({ group: e }) => {
22589
22587
  "aria-haspopup": !0,
22590
22588
  "aria-expanded": r[x],
22591
22589
  "aria-controls": x
22592
- }), y = { hidden: x in r ? !r[x] : !0 }), g || (y = {
22593
- ...y,
22590
+ }), D = { hidden: x in r ? !r[x] : !0 }), g || (D = {
22591
+ ...D,
22594
22592
  ...B
22595
22593
  });
22596
22594
  }
@@ -22603,14 +22601,14 @@ const Vn = "footer_", Ma = "SiteFooter", nc = ({ group: e }) => {
22603
22601
  parent: g,
22604
22602
  active: f
22605
22603
  }),
22606
- ...D,
22604
+ ...y,
22607
22605
  children: [
22608
22606
  p ? re.createElement(
22609
22607
  c ? Se : "a",
22610
22608
  p,
22611
22609
  s.formatMessage({ id: h })
22612
22610
  ) : s.formatMessage({ id: h }),
22613
- o.order && /* @__PURE__ */ d.jsx("ul", { ...y, children: o.order.map((x) => {
22611
+ o.order && /* @__PURE__ */ d.jsx("ul", { ...D, children: o.order.map((x) => {
22614
22612
  if (!o[x])
22615
22613
  return null;
22616
22614
  const B = {
@@ -22680,18 +22678,18 @@ const fC = { height: 67, height_desktop: 83 }, Ff = ({ showNavigation: e = !0 })
22680
22678
  }
22681
22679
  }
22682
22680
  });
22683
- const p = (f, D, y = !1) => {
22684
- Ie.handleMenus({ id: f, value: D, menus: h.current.menus, dispatch: o, forceHandle: y });
22681
+ const p = (f, y, D = !1) => {
22682
+ Ie.handleMenus({ id: f, value: y, menus: h.current.menus, dispatch: o, forceHandle: D });
22685
22683
  }, m = ke(null), g = (f) => {
22686
- f.key === "Escape" && ["navigation", "search", "account"].forEach((D) => {
22687
- h.current.menus[D] && p(D, !1, !0);
22684
+ f.key === "Escape" && ["navigation", "search", "account"].forEach((y) => {
22685
+ h.current.menus[y] && p(y, !1, !0);
22688
22686
  });
22689
22687
  };
22690
22688
  return he(() => {
22691
22689
  var f;
22692
22690
  return (f = document.getElementById("header")) == null || f.addEventListener("keydown", g), () => {
22693
- var D;
22694
- (D = document.getElementById("header")) == null || D.removeEventListener("keydown", g);
22691
+ var y;
22692
+ (y = document.getElementById("header")) == null || y.removeEventListener("keydown", g);
22695
22693
  };
22696
22694
  }, []), Ar(() => {
22697
22695
  u.navigation && Ie.autoFocus({
@@ -22869,14 +22867,14 @@ const hC = () => {
22869
22867
  variant: h = "default",
22870
22868
  circle: p = "default",
22871
22869
  modal: m = "default"
22872
- } = i, g = ch(), [f, D] = de(""), y = (A) => {
22870
+ } = i, g = ch(), [f, y] = de(""), D = (A) => {
22873
22871
  const {
22874
22872
  detail: { message: T }
22875
22873
  } = A;
22876
- D(T);
22874
+ y(T);
22877
22875
  };
22878
- he(() => (window.scrollTo(0, 0), document.addEventListener("ariaLive", y), () => {
22879
- document.removeEventListener("ariaLive", y);
22876
+ he(() => (window.scrollTo(0, 0), document.addEventListener("ariaLive", D), () => {
22877
+ document.removeEventListener("ariaLive", D);
22880
22878
  }), [g]);
22881
22879
  const x = fa(e, { locale: o }), B = fa(t, {
22882
22880
  locale: o
@@ -23144,8 +23142,8 @@ const hk = ({
23144
23142
  ({
23145
23143
  completed: g,
23146
23144
  completionTime: f,
23147
- contentType: D,
23148
- icon: y,
23145
+ contentType: y,
23146
+ icon: D,
23149
23147
  image: x,
23150
23148
  isIntroduction: B,
23151
23149
  optional: k,
@@ -23159,10 +23157,10 @@ const hk = ({
23159
23157
  "li",
23160
23158
  {
23161
23159
  className: Z({
23162
- article: D === Hr.ARTICLE,
23163
- discussion: D === Hr.DISCUSSION,
23164
- quiz: D === Hr.QUIZ,
23165
- completed: g && D === Hr.ARTICLE,
23160
+ article: y === Hr.ARTICLE,
23161
+ discussion: y === Hr.DISCUSSION,
23162
+ quiz: y === Hr.QUIZ,
23163
+ completed: g && y === Hr.ARTICLE,
23166
23164
  locked: !N
23167
23165
  }),
23168
23166
  ...M,
@@ -23189,7 +23187,7 @@ const hk = ({
23189
23187
  vC,
23190
23188
  {
23191
23189
  completionTime: f,
23192
- icon: y,
23190
+ icon: D,
23193
23191
  optional: k,
23194
23192
  type: $,
23195
23193
  children: c && c[C] && /* @__PURE__ */ d.jsx("span", { className: "quiz-score", children: `${c[C]}%` })
@@ -23270,7 +23268,7 @@ const ct = "discussion_form_", vo = ({
23270
23268
  var R, w, E;
23271
23269
  const c = ce(), h = Ke(tn), [p, m] = de(""), [g, f] = de(
23272
23270
  r.isEditing && r.isEditing.text || ""
23273
- ), [D, y] = de(s.error || !1), [x, B] = de(!1);
23271
+ ), [y, D] = de(s.error || !1), [x, B] = de(!1);
23274
23272
  if (r.isLoading)
23275
23273
  return /* @__PURE__ */ d.jsx(
23276
23274
  Pt,
@@ -23292,7 +23290,7 @@ const ct = "discussion_form_", vo = ({
23292
23290
  `${ct}error_noPermission`,
23293
23291
  t.type,
23294
23292
  "action"
23295
- ), S ? y(S) : D && y(!1);
23293
+ ), S ? D(S) : y && D(!1);
23296
23294
  };
23297
23295
  let C = `${t.type}-form`;
23298
23296
  if (t.type === "response" || t.type === "reply") {
@@ -23354,11 +23352,11 @@ const ct = "discussion_form_", vo = ({
23354
23352
  `${ct}error_tooMany`,
23355
23353
  t.type,
23356
23354
  "action"
23357
- ) : ne != null && ne.message.includes("400") && (J = `${ct}error`), y(J), T();
23355
+ ) : ne != null && ne.message.includes("400") && (J = `${ct}error`), D(J), T();
23358
23356
  }
23359
23357
  }, T = () => {
23360
23358
  la = setTimeout(() => {
23361
- y(!1), B(!1), m("");
23359
+ D(!1), B(!1), m("");
23362
23360
  }, 5e3);
23363
23361
  }, $ = !g || !Th(g), N = x === "submitting", M = [];
23364
23362
  return (r.isEditing && !N || s.cancel) && M.push({
@@ -23412,7 +23410,7 @@ const ct = "discussion_form_", vo = ({
23412
23410
  Fx,
23413
23411
  {
23414
23412
  id: `${C}-input`,
23415
- value: x === "submitting" && !D ? "" : g,
23413
+ value: x === "submitting" && !y ? "" : g,
23416
23414
  placeholder: a || St(
23417
23415
  c.formatMessage,
23418
23416
  `${ct}placeholder`,
@@ -23423,7 +23421,7 @@ const ct = "discussion_form_", vo = ({
23423
23421
  functions: { onChange: k, listMembers: o.listMembers },
23424
23422
  data: l,
23425
23423
  autoFocus: !!r.isEditing,
23426
- "aria-invalid": !!D,
23424
+ "aria-invalid": !!y,
23427
23425
  "aria-errormessage": "error-message"
23428
23426
  }
23429
23427
  ),
@@ -23454,15 +23452,15 @@ const ct = "discussion_form_", vo = ({
23454
23452
  t.type,
23455
23453
  "action"
23456
23454
  ) }),
23457
- D && /* @__PURE__ */ d.jsx(xa, { id: "error-message", className: "error", "data-testid": "error", children: s.error ? s.error : typeof D == "string" ? D.includes(" ") ? D : c.formatMessage(
23458
- { id: D },
23455
+ y && /* @__PURE__ */ d.jsx(xa, { id: "error-message", className: "error", "data-testid": "error", children: s.error ? s.error : typeof y == "string" ? y.includes(" ") ? y : c.formatMessage(
23456
+ { id: y },
23459
23457
  {
23460
23458
  action: c.formatMessage({
23461
23459
  id: `discussion_action_${t.type}`
23462
23460
  }),
23463
23461
  maxLength: i
23464
23462
  }
23465
- ) : D })
23463
+ ) : y })
23466
23464
  ]
23467
23465
  }
23468
23466
  ),
@@ -23542,8 +23540,8 @@ const wC = ({
23542
23540
  numberOfLikes: m,
23543
23541
  userLikedContent: g,
23544
23542
  ignoreInteractions: f,
23545
- showLikers: D,
23546
- tabbableLink: y
23543
+ showLikers: y,
23544
+ tabbableLink: D
23547
23545
  } = h;
23548
23546
  he(() => {
23549
23547
  p([{ type: "userLikedContent", value: a }]);
@@ -23665,7 +23663,7 @@ const wC = ({
23665
23663
  onKeyDown: (T) => {
23666
23664
  T.key === "Escape" && (T.preventDefault(), T.stopPropagation(), C());
23667
23665
  },
23668
- "aria-expanded": D,
23666
+ "aria-expanded": y,
23669
23667
  "aria-controls": `likes-tooltip-${i.slug}`,
23670
23668
  children: /* @__PURE__ */ d.jsx(qe, { showOnFocus: !1, children: u.formatMessage(
23671
23669
  { id: "discussion_likes_show" },
@@ -23677,14 +23675,14 @@ const wC = ({
23677
23675
  nr,
23678
23676
  {
23679
23677
  id: `likes-tooltip-${i.slug}`,
23680
- isOpen: D,
23678
+ isOpen: y,
23681
23679
  isLoading: n.length === 0,
23682
23680
  children: n.length && /* @__PURE__ */ d.jsxs("ul", { children: [
23683
23681
  x.map((T, $) => {
23684
23682
  if (typeof T == "string" || !T.name)
23685
23683
  return null;
23686
23684
  const N = {};
23687
- return y !== $ && (N.tabIndex = -1), /* @__PURE__ */ d.jsx("li", { "data-index": $, children: /* @__PURE__ */ d.jsx(
23685
+ return D !== $ && (N.tabIndex = -1), /* @__PURE__ */ d.jsx("li", { "data-index": $, children: /* @__PURE__ */ d.jsx(
23688
23686
  ir,
23689
23687
  {
23690
23688
  href: T.id ? `/profiles/${T.id}` : void 0,
@@ -23807,8 +23805,8 @@ const kC = 3e3, _C = ({ url: e }) => {
23807
23805
  setFocus: m = !1
23808
23806
  }) => {
23809
23807
  var be, Ae, Ee, Fe, Ze, He, Ge, tt;
23810
- const g = ce(), f = Ke(tn), D = Ke(bo), {
23811
- createContent: y = async () => {
23808
+ const g = ce(), f = Ke(tn), y = Ke(bo), {
23809
+ createContent: D = async () => {
23812
23810
  },
23813
23811
  deleteContent: x = async () => {
23814
23812
  },
@@ -23882,7 +23880,7 @@ const kC = 3e3, _C = ({ url: e }) => {
23882
23880
  H(`${Kt}form_error`);
23883
23881
  }
23884
23882
  }, me = () => {
23885
- D && D.updateConversation && D.updateConversation({ showForm: !0 }), setTimeout(() => {
23883
+ y && y.updateConversation && y.updateConversation({ showForm: !0 }), setTimeout(() => {
23886
23884
  var se, ge, ye;
23887
23885
  const Oe = `reply-form-${(t.type === "answer" ? t.slug : ((se = t.slugs) == null ? void 0 : se.reply) || ((ge = t.slugs) == null ? void 0 : ge.answer) || ((ye = t.slugs) == null ? void 0 : ye.question) || "").toLowerCase().slice(-15)}`, We = document.getElementById(Oe), V = document.getElementById(`${Oe}-input`);
23888
23886
  V && V.focus(), We && We.scrollIntoView({ behavior: "smooth" });
@@ -23990,7 +23988,7 @@ const kC = 3e3, _C = ({ url: e }) => {
23990
23988
  ) : !1
23991
23989
  },
23992
23990
  functions: {
23993
- create: y,
23991
+ create: D,
23994
23992
  handleSaveEdit: ie,
23995
23993
  handleCancel: () => {
23996
23994
  H(""), W({ ...v, isEditing: !1 });
@@ -24599,9 +24597,9 @@ function qC({
24599
24597
  },
24600
24598
  user: l,
24601
24599
  ...u
24602
- }, h = LC({ ...c, mutationFn: e }), p = zC({ ...c, mutationFn: t }), m = WC({ ...c, mutationFn: n }), g = UC({ ...c, mutationFn: a }), f = VC({ ...c, mutationFn: i }), { activities: D, ...y } = HC({ queryKey: s, queryFn: r });
24600
+ }, h = LC({ ...c, mutationFn: e }), p = zC({ ...c, mutationFn: t }), m = WC({ ...c, mutationFn: n }), g = UC({ ...c, mutationFn: a }), f = VC({ ...c, mutationFn: i }), { activities: y, ...D } = HC({ queryKey: s, queryFn: r });
24603
24601
  return {
24604
- activities: D,
24602
+ activities: y,
24605
24603
  mutations: {
24606
24604
  create: h,
24607
24605
  edit: p,
@@ -24610,7 +24608,7 @@ function qC({
24610
24608
  unlike: f
24611
24609
  },
24612
24610
  user: l,
24613
- ...y
24611
+ ...D
24614
24612
  };
24615
24613
  }
24616
24614
  function WC({
@@ -24732,7 +24730,7 @@ const pk = ({
24732
24730
  fetchNextPage: c,
24733
24731
  hasNextPage: h,
24734
24732
  isLoading: p,
24735
- mutations: { create: m, edit: g, remove: f, like: D, unlike: y },
24733
+ mutations: { create: m, edit: g, remove: f, like: y, unlike: D },
24736
24734
  user: x
24737
24735
  } = qC({
24738
24736
  queryKey: [e, t, "activities"],
@@ -24819,8 +24817,8 @@ const pk = ({
24819
24817
  updateContent: (H, { body: ee }) => g({ activityId: $, content: ee })
24820
24818
  },
24821
24819
  likes: {
24822
- createLike: () => D({ activityId: $ }),
24823
- deleteLike: () => y({ activityId: $, reactionId: S })
24820
+ createLike: () => y({ activityId: $ }),
24821
+ deleteLike: () => D({ activityId: $, reactionId: S })
24824
24822
  },
24825
24823
  comments: {
24826
24824
  openComments: () => null
@@ -25455,9 +25453,9 @@ function Mf({
25455
25453
  },
25456
25454
  user: l,
25457
25455
  ...u
25458
- }, h = YC({ ...c, mutationFn: e }), p = GC({ ...c, mutationFn: t }), m = QC({ ...c, mutationFn: n }), g = XC({ ...c, mutationFn: a }), f = eE({ ...c, mutationFn: i }), { replies: D, ...y } = JC({ queryKey: s, queryFn: r });
25456
+ }, h = YC({ ...c, mutationFn: e }), p = GC({ ...c, mutationFn: t }), m = QC({ ...c, mutationFn: n }), g = XC({ ...c, mutationFn: a }), f = eE({ ...c, mutationFn: i }), { replies: y, ...D } = JC({ queryKey: s, queryFn: r });
25459
25457
  return {
25460
- replies: D,
25458
+ replies: y,
25461
25459
  mutations: {
25462
25460
  create: h,
25463
25461
  edit: p,
@@ -25466,7 +25464,7 @@ function Mf({
25466
25464
  unlike: f
25467
25465
  },
25468
25466
  user: l,
25469
- ...y
25467
+ ...D
25470
25468
  };
25471
25469
  }
25472
25470
  function QC({
@@ -25600,8 +25598,8 @@ const sE = ({
25600
25598
  fetchNextPage: u,
25601
25599
  hasNextPage: c,
25602
25600
  isLoading: h,
25603
- mutations: { create: p, edit: m, like: g, remove: f, unlike: D },
25604
- user: y
25601
+ mutations: { create: p, edit: m, like: g, remove: f, unlike: y },
25602
+ user: D
25605
25603
  } = Mf({
25606
25604
  queryKey: [e, t, n, r, "replies"],
25607
25605
  queryFns: {
@@ -25662,14 +25660,14 @@ const sE = ({
25662
25660
  data: { mentioned_users: N }
25663
25661
  } = k, R = (((v = A == null ? void 0 : A.like) == null ? void 0 : v.length) || 0) > 0 ? (W = A == null ? void 0 : A.like) == null ? void 0 : W.find((G) => {
25664
25662
  var ve;
25665
- return ((ve = G == null ? void 0 : G.user) == null ? void 0 : ve.id) === (y == null ? void 0 : y.id);
25663
+ return ((ve = G == null ? void 0 : G.user) == null ? void 0 : ve.id) === (D == null ? void 0 : D.id);
25666
25664
  }) : !1, w = R ? R == null ? void 0 : R.id : "", E = !!R, S = (((X = T == null ? void 0 : T.like) == null ? void 0 : X.length) || 0) > 0 ? (_ = T == null ? void 0 : T.like) == null ? void 0 : _.map((G) => {
25667
25665
  var ve, be, Ae;
25668
25666
  return {
25669
25667
  id: (ve = G == null ? void 0 : G.user) == null ? void 0 : ve.id,
25670
25668
  name: (Ae = (be = G == null ? void 0 : G.user) == null ? void 0 : be.data) == null ? void 0 : Ae.name
25671
25669
  };
25672
- }) : !1, z = k == null ? void 0 : k.user, L = (z == null ? void 0 : z.id) === (y == null ? void 0 : y.id), ne = ei(a, L), J = typeof k.data.content == "string" ? (F = k == null ? void 0 : k.data) == null ? void 0 : F.content : (
25670
+ }) : !1, z = k == null ? void 0 : k.user, L = (z == null ? void 0 : z.id) === (D == null ? void 0 : D.id), ne = ei(a, L), J = typeof k.data.content == "string" ? (F = k == null ? void 0 : k.data) == null ? void 0 : F.content : (
25673
25671
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
25674
25672
  ((I = (q = k == null ? void 0 : k.data) == null ? void 0 : q.content) == null ? void 0 : I.text) || ""
25675
25673
  );
@@ -25714,7 +25712,7 @@ const sE = ({
25714
25712
  },
25715
25713
  likes: {
25716
25714
  createLike: () => g({ replyId: C }),
25717
- deleteLike: () => D({ replyId: C, reactionId: w })
25715
+ deleteLike: () => y({ replyId: C, reactionId: w })
25718
25716
  },
25719
25717
  comments: {},
25720
25718
  mentions: {
@@ -25743,7 +25741,7 @@ const oE = ({
25743
25741
  fetchNextPage: h,
25744
25742
  hasNextPage: p,
25745
25743
  isLoading: m,
25746
- mutations: { create: g, edit: f, like: D, remove: y, unlike: x },
25744
+ mutations: { create: g, edit: f, like: y, remove: D, unlike: x },
25747
25745
  user: B
25748
25746
  } = Mf({
25749
25747
  queryKey: [e, t, n, "replies"],
@@ -25829,12 +25827,12 @@ const oE = ({
25829
25827
  functions: {
25830
25828
  content: {
25831
25829
  createContent: () => null,
25832
- deleteContent: () => y({ replyId: N }),
25830
+ deleteContent: () => D({ replyId: N }),
25833
25831
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
25834
25832
  updateContent: (Ee, { body: Fe }) => f({ replyId: N, content: Fe })
25835
25833
  },
25836
25834
  likes: {
25837
- createLike: () => D({ replyId: N }),
25835
+ createLike: () => y({ replyId: N }),
25838
25836
  deleteLike: () => x({ replyId: N, reactionId: z })
25839
25837
  },
25840
25838
  comments: {},
@@ -25985,7 +25983,7 @@ const vk = ({
25985
25983
  activity: p,
25986
25984
  error: m,
25987
25985
  isLoading: g,
25988
- mutations: { edit: f, like: D, unlike: y }
25986
+ mutations: { edit: f, like: y, unlike: D }
25989
25987
  } = cE({
25990
25988
  queryFns: i,
25991
25989
  queryKey: [e, t, n]
@@ -26049,8 +26047,8 @@ const vk = ({
26049
26047
  updateContent: (W, { body: X }) => f({ content: X })
26050
26048
  },
26051
26049
  likes: {
26052
- createLike: () => D({ activityId: n }),
26053
- deleteLike: () => y({ activityId: n, reactionId: T })
26050
+ createLike: () => y({ activityId: n }),
26051
+ deleteLike: () => D({ activityId: n, reactionId: T })
26054
26052
  },
26055
26053
  comments: {
26056
26054
  openComments: () => {