@myxtra/authentication-green 1.2.0-alpha.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { r as d, j as n, g as wt, u as Q, a as Qe, b as _t, E as Rt } from "./index-919d6dee.mjs";
1
+ import { r as d, j as n, g as wt, u as Q, a as Qe, b as _t, E as Rt } from "./index-964ee255.mjs";
2
2
  class H {
3
3
  constructor() {
4
4
  this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
@@ -2470,7 +2470,7 @@ var Es = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__h
2470
2470
  children: o
2471
2471
  })
2472
2472
  );
2473
- }, tr = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__image", children: t }), sr = ({ children: t, className: e }) => /* @__PURE__ */ n.jsx("div", { className: O("card__body__item", e), children: t }), rr = ({ icon: t, children: e }) => /* @__PURE__ */ n.jsxs("div", { className: "card__header__title", children: [
2473
+ }, tr = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__image", children: t }), sr = ({ children: t, className: e }) => /* @__PURE__ */ n.jsx("div", { className: O("card__body__item", e), children: t }), rr = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "card__body__subtitle", children: t }), nr = ({ icon: t, children: e }) => /* @__PURE__ */ n.jsxs("div", { className: "card__header__title", children: [
2474
2474
  t && /* @__PURE__ */ n.jsx("span", { className: "card__header__title__icon", children: t }),
2475
2475
  e
2476
2476
  ] }), ut = d.forwardRef(
@@ -2495,30 +2495,31 @@ ut.displayName = "Card";
2495
2495
  Object.assign(ut, {
2496
2496
  Header: er,
2497
2497
  Action: Es,
2498
- Title: rr,
2498
+ Title: nr,
2499
+ Subtitle: rr,
2499
2500
  Body: Os,
2500
2501
  Image: tr,
2501
2502
  Item: sr,
2502
2503
  Footer: Xs,
2503
2504
  EmptyState: Js
2504
2505
  });
2505
- var nr = (t) => {
2506
+ var ir = (t) => {
2506
2507
  var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2507
2508
  return /* @__PURE__ */ n.jsx("div", E(x({ className: O("checkbox__content", s) }, i), { children: r }));
2508
- }, ir = (t) => {
2509
+ }, or = (t) => {
2509
2510
  var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2510
2511
  return /* @__PURE__ */ n.jsx("span", E(x({ className: O("checkbox__error", s) }, i), { children: r }));
2511
- }, or = (t) => {
2512
+ }, ar = (t) => {
2512
2513
  var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2513
2514
  return /* @__PURE__ */ n.jsx("span", E(x({ className: O("checkbox__hint", s) }, i), { children: r }));
2514
- }, lt = d.createContext(void 0), ar = ({ id: t, name: e, children: s }) => /* @__PURE__ */ n.jsx(lt.Provider, { value: { id: t, name: e }, children: s }), ur = () => {
2515
+ }, lt = d.createContext(void 0), ur = ({ id: t, name: e, children: s }) => /* @__PURE__ */ n.jsx(lt.Provider, { value: { id: t, name: e }, children: s }), lr = () => {
2515
2516
  const t = d.useContext(lt);
2516
2517
  if (!t)
2517
2518
  throw new Error("Checkbox compound components can not be rendered outside of Checkbox");
2518
2519
  return t;
2519
- }, lr = (t) => {
2520
+ }, cr = (t) => {
2520
2521
  var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2521
- const { id: o } = ur();
2522
+ const { id: o } = lr();
2522
2523
  return /* @__PURE__ */ n.jsx("label", E(x({ htmlFor: o, className: O("checkbox__label", s) }, i), { children: r }));
2523
2524
  }, U = (t) => {
2524
2525
  var e = t, {
@@ -2557,25 +2558,25 @@ var nr = (t) => {
2557
2558
  }, h)
2558
2559
  ),
2559
2560
  i ? /* @__PURE__ */ n.jsx($s, { className: "checkbox__spinner", "aria-hidden": !0 }) : /* @__PURE__ */ n.jsx(Qs, { className: "checkbox__check", "aria-hidden": !0, strokeDasharray: "75" }),
2560
- /* @__PURE__ */ n.jsx(ar, { id: s, name: r, children: l })
2561
+ /* @__PURE__ */ n.jsx(ur, { id: s, name: r, children: l })
2561
2562
  ]
2562
2563
  }
2563
2564
  );
2564
2565
  };
2565
- U.Content = nr;
2566
- U.Label = lr;
2567
- U.Hint = or;
2568
- U.Error = ir;
2569
- var cr = (t) => {
2566
+ U.Content = ir;
2567
+ U.Label = cr;
2568
+ U.Hint = ar;
2569
+ U.Error = or;
2570
+ var dr = (t) => {
2570
2571
  var e = t, { type: s = "div", className: r, children: i } = e, o = A(e, ["type", "className", "children"]);
2571
2572
  return d.createElement(s, x({ className: O("dialog__body", r) }, o), i);
2572
- }, ye = () => document.body.style.removeProperty("overflow"), Ie = (t) => t.preventDefault(), dr = 'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])', hr = (t) => {
2573
+ }, ye = () => document.body.style.removeProperty("overflow"), Ie = (t) => t.preventDefault(), hr = 'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])', fr = (t) => {
2573
2574
  var e = t, { className: s, children: r, shouldAnimate: i = !0 } = e, o = A(e, ["className", "children", "shouldAnimate"]);
2574
2575
  const { ref: a, defaultOpen: u, isModal: l, onClose: h } = X();
2575
2576
  return d.useEffect(() => {
2576
2577
  const c = a == null ? void 0 : a.current;
2577
2578
  if (c != null && c.open) {
2578
- const p = c.querySelectorAll(dr), v = p[0], f = p[p.length - 1], y = (g) => {
2579
+ const p = c.querySelectorAll(hr), v = p[0], f = p[p.length - 1], y = (g) => {
2579
2580
  if (!(g.key === "Tab"))
2580
2581
  return;
2581
2582
  g.shiftKey ? document.activeElement === v && (f.focus(), g.preventDefault()) : document.activeElement === f && (v.focus(), g.preventDefault());
@@ -2609,7 +2610,7 @@ var cr = (t) => {
2609
2610
  children: r
2610
2611
  })
2611
2612
  );
2612
- }, ct = d.createContext(void 0), fr = ({ defaultOpen: t, onClose: e, isModal: s, children: r }) => {
2613
+ }, ct = d.createContext(void 0), pr = ({ defaultOpen: t, onClose: e, isModal: s, children: r }) => {
2613
2614
  const i = d.useRef(null), o = d.useRef(e), a = d.useCallback(() => {
2614
2615
  var u;
2615
2616
  ye(), (u = i.current) == null || u.close(), o.current && (o == null || o.current());
@@ -2620,7 +2621,7 @@ var cr = (t) => {
2620
2621
  if (!t)
2621
2622
  throw new Error("Dialog compound components can not be rendered outside of Dialog");
2622
2623
  return t;
2623
- }, pr = (t) => {
2624
+ }, vr = (t) => {
2624
2625
  var e = t, { children: s } = e, r = A(e, ["children"]);
2625
2626
  const { onClose: i } = X();
2626
2627
  return /* @__PURE__ */ n.jsx(V, E(x({ onClick: i }, r), { children: s }));
@@ -2641,10 +2642,10 @@ var cr = (t) => {
2641
2642
  );
2642
2643
  });
2643
2644
  dt.displayName = "Close";
2644
- var vr = (t) => {
2645
+ var mr = (t) => {
2645
2646
  var e = t, { className: s, children: r } = e, i = A(e, ["className", "children"]);
2646
2647
  return /* @__PURE__ */ n.jsx("div", E(x({ className: O("dialog__footer", s) }, i), { children: r }));
2647
- }, mr = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "dialog__header", children: t }), yr = (t) => {
2648
+ }, yr = ({ children: t }) => /* @__PURE__ */ n.jsx("div", { className: "dialog__header", children: t }), Cr = (t) => {
2648
2649
  var e = t, { icon: s, children: r, className: i } = e, o = A(e, ["icon", "children", "className"]);
2649
2650
  const { ref: a } = X(), u = d.useRef(null);
2650
2651
  return d.useEffect(() => {
@@ -2662,23 +2663,23 @@ var vr = (t) => {
2662
2663
  ]
2663
2664
  })
2664
2665
  );
2665
- }, Cr = (t) => {
2666
+ }, xr = (t) => {
2666
2667
  var e = t, { children: s } = e, r = A(e, ["children"]);
2667
2668
  const { ref: i } = X();
2668
2669
  return /* @__PURE__ */ n.jsx(V, E(x({ onClick: () => {
2669
2670
  var o;
2670
2671
  return (o = i == null ? void 0 : i.current) == null ? void 0 : o.showModal();
2671
2672
  } }, r), { children: s }));
2672
- }, M = ({ defaultOpen: t, isModal: e, children: s, onClose: r }) => /* @__PURE__ */ n.jsx(fr, { defaultOpen: !!t, isModal: e, onClose: r, children: s });
2673
- M.Trigger = Cr;
2674
- M.Root = hr;
2675
- M.Title = yr;
2676
- M.Header = mr;
2677
- M.Body = cr;
2678
- M.Footer = vr;
2679
- M.Button = pr;
2673
+ }, M = ({ defaultOpen: t, isModal: e, children: s, onClose: r }) => /* @__PURE__ */ n.jsx(pr, { defaultOpen: !!t, isModal: e, onClose: r, children: s });
2674
+ M.Trigger = xr;
2675
+ M.Root = fr;
2676
+ M.Title = Cr;
2677
+ M.Header = yr;
2678
+ M.Body = dr;
2679
+ M.Footer = mr;
2680
+ M.Button = vr;
2680
2681
  M.Close = dt;
2681
- var ht = d.createContext(void 0), xr = ({
2682
+ var ht = d.createContext(void 0), gr = ({
2682
2683
  id: t,
2683
2684
  position: e,
2684
2685
  isOpen: s,
@@ -2710,7 +2711,7 @@ var ht = d.createContext(void 0), xr = ({
2710
2711
  if (t === void 0)
2711
2712
  throw new Error("useMenu must be used within a MenuProvider");
2712
2713
  return t;
2713
- }, gr = ({ as: t, children: e }) => {
2714
+ }, br = ({ as: t, children: e }) => {
2714
2715
  const {
2715
2716
  id: s,
2716
2717
  position: r,
@@ -2765,7 +2766,7 @@ var ht = d.createContext(void 0), xr = ({
2765
2766
  }
2766
2767
  )
2767
2768
  );
2768
- }, br = (t) => {
2769
+ }, jr = (t) => {
2769
2770
  var e = t, { children: s, className: r } = e, i = A(e, ["children", "className"]);
2770
2771
  return /* @__PURE__ */ n.jsx("li", E(x({}, i), { className: O("menu__list-item", r), children: s }));
2771
2772
  }, pt = ({ children: t, className: e }) => {
@@ -2800,7 +2801,7 @@ var L = (t) => {
2800
2801
  ((S = l.current) == null ? void 0 : S.contains(j.relatedTarget)) || (C(), v(!1));
2801
2802
  };
2802
2803
  return /* @__PURE__ */ n.jsx(
2803
- xr,
2804
+ gr,
2804
2805
  {
2805
2806
  id: r,
2806
2807
  position: i,
@@ -2825,11 +2826,11 @@ var L = (t) => {
2825
2826
  );
2826
2827
  };
2827
2828
  L.Trigger = pt;
2828
- L.Content = gr;
2829
- L.Item = br;
2829
+ L.Content = br;
2830
+ L.Item = jr;
2830
2831
  d.createContext(void 0);
2831
- var jr = (/* @__PURE__ */ new Map()).set("BE", "32").set("FR", "33").set("NL", "31").set("LU", "352").set("DE", "49").set("CA", "1").set("PR", "1").set("TC", "1").set("US", "1").set("BS", "1242").set("BB", "1246").set("AI", "1264").set("AG", "1268").set("KY", "1345").set("BM", "1441").set("GD", "1473").set("MS", "1664").set("GU", "1671").set("LC", "1758").set("DM", "1767").set("VC", "1784").set("DO", "1809").set("TT", "1868").set("KN", "1869").set("JM", "1876").set("EG", "20").set("SS", "211").set("MA", "212").set("DZ", "213").set("TN", "216").set("LY", "218").set("GM", "220").set("SN", "221").set("MR", "222").set("ML", "223").set("GN", "224").set("CI", "225").set("BF", "226").set("NE", "227").set("TG", "228").set("BJ", "229").set("MU", "230").set("LR", "231").set("SL", "232").set("GH", "233").set("NG", "234").set("TD", "235").set("CF", "236").set("CM", "237").set("CV", "238").set("ST", "239").set("GQ", "240").set("GA", "241").set("CG", "242").set("CD", "243").set("AO", "244").set("GW", "245").set("SC", "248").set("SD", "249").set("RW", "250").set("ET", "251").set("SO", "252").set("DJ", "253").set("KE", "254").set("TZ", "255").set("UG", "256").set("BI", "257").set("MZ", "258").set("ZM", "260").set("MG", "261").set("RE", "262").set("ZW", "263").set("NA", "264").set("MW", "265").set("LS", "266").set("BW", "267").set("SZ", "268").set("KM", "269").set("ZA", "27").set("VG", "284").set("ER", "291").set("AW", "297").set("FO", "298").set("GL", "299").set("GR", "30").set("ES", "34").set("GI", "350").set("PT", "351").set("IE", "353").set("IS", "354").set("AL", "355").set("MT", "356").set("CY", "357").set("FI", "358").set("BG", "359").set("HU", "36").set("LT", "370").set("LV", "371").set("EE", "372").set("MD", "373").set("AM", "374").set("BY", "375").set("AD", "376").set("MC", "377").set("SM", "378").set("UA", "380").set("RS", "381").set("ME", "382").set("HR", "385").set("SI", "386").set("BA", "387").set("MK", "389").set("IT", "39").set("RO", "40").set("CH", "41").set("CZ", "420").set("SK", "421").set("LI", "423").set("AT", "43").set("GB", "44").set("DK", "45").set("SE", "46").set("NO", "47").set("PL", "48").set("FK", "500").set("BZ", "501").set("GT", "502").set("SV", "503").set("HN", "504").set("NI", "505").set("CR", "506").set("PA", "507").set("PM", "508").set("HT", "509").set("PE", "51").set("MX", "52").set("CU", "53").set("AR", "54").set("BR", "55").set("CL", "56").set("CO", "57").set("VE", "58").set("GP", "590").set("BO", "591").set("GY", "592").set("EC", "593").set("FG", "594").set("PY", "595").set("MQ", "596").set("SR", "597").set("UY", "598").set("CW", "599").set("AN", "599").set("MY", "60").set("AU", "61").set("ID", "62").set("PH", "63").set("NZ", "64").set("SG", "65").set("TH", "66").set("TP", "670").set("BN", "673").set("PG", "675").set("TO", "676").set("SB", "677").set("VU", "678").set("FJ", "679").set("PW", "680").set("CK", "682").set("NU", "683").set("AS", "684").set("WS", "685").set("KI", "686").set("NC", "687").set("TV", "688").set("PF", "689").set("FM", "691").set("KZ", "7").set("RU", "7").set("JP", "81").set("KR", "82").set("VN", "84").set("KP", "850").set("HK", "852").set("MO", "853").set("KH", "855").set("LA", "856").set("CN", "86").set("BD", "880").set("TW", "886").set("TR", "90").set("IN", "91").set("PK", "92").set("AF", "93").set("LK", "94").set("MM", "95").set("MV", "960").set("LB", "961").set("JO", "962").set("SY", "963").set("IQ", "964").set("KW", "965").set("SA", "966").set("YE", "967").set("OM", "968").set("PS", "970").set("AE", "971").set("IL", "972").set("BH", "973").set("QA", "974").set("BT", "975").set("MN", "976").set("NP", "977").set("IR", "98").set("TK", "992").set("TM", "993").set("AZ", "994").set("GE", "995").set("KG", "996").set("UZ", "998");
2832
- [...new Set(jr.values())].map((t) => ({
2832
+ var wr = (/* @__PURE__ */ new Map()).set("BE", "32").set("FR", "33").set("NL", "31").set("LU", "352").set("DE", "49").set("CA", "1").set("PR", "1").set("TC", "1").set("US", "1").set("BS", "1242").set("BB", "1246").set("AI", "1264").set("AG", "1268").set("KY", "1345").set("BM", "1441").set("GD", "1473").set("MS", "1664").set("GU", "1671").set("LC", "1758").set("DM", "1767").set("VC", "1784").set("DO", "1809").set("TT", "1868").set("KN", "1869").set("JM", "1876").set("EG", "20").set("SS", "211").set("MA", "212").set("DZ", "213").set("TN", "216").set("LY", "218").set("GM", "220").set("SN", "221").set("MR", "222").set("ML", "223").set("GN", "224").set("CI", "225").set("BF", "226").set("NE", "227").set("TG", "228").set("BJ", "229").set("MU", "230").set("LR", "231").set("SL", "232").set("GH", "233").set("NG", "234").set("TD", "235").set("CF", "236").set("CM", "237").set("CV", "238").set("ST", "239").set("GQ", "240").set("GA", "241").set("CG", "242").set("CD", "243").set("AO", "244").set("GW", "245").set("SC", "248").set("SD", "249").set("RW", "250").set("ET", "251").set("SO", "252").set("DJ", "253").set("KE", "254").set("TZ", "255").set("UG", "256").set("BI", "257").set("MZ", "258").set("ZM", "260").set("MG", "261").set("RE", "262").set("ZW", "263").set("NA", "264").set("MW", "265").set("LS", "266").set("BW", "267").set("SZ", "268").set("KM", "269").set("ZA", "27").set("VG", "284").set("ER", "291").set("AW", "297").set("FO", "298").set("GL", "299").set("GR", "30").set("ES", "34").set("GI", "350").set("PT", "351").set("IE", "353").set("IS", "354").set("AL", "355").set("MT", "356").set("CY", "357").set("FI", "358").set("BG", "359").set("HU", "36").set("LT", "370").set("LV", "371").set("EE", "372").set("MD", "373").set("AM", "374").set("BY", "375").set("AD", "376").set("MC", "377").set("SM", "378").set("UA", "380").set("RS", "381").set("ME", "382").set("HR", "385").set("SI", "386").set("BA", "387").set("MK", "389").set("IT", "39").set("RO", "40").set("CH", "41").set("CZ", "420").set("SK", "421").set("LI", "423").set("AT", "43").set("GB", "44").set("DK", "45").set("SE", "46").set("NO", "47").set("PL", "48").set("FK", "500").set("BZ", "501").set("GT", "502").set("SV", "503").set("HN", "504").set("NI", "505").set("CR", "506").set("PA", "507").set("PM", "508").set("HT", "509").set("PE", "51").set("MX", "52").set("CU", "53").set("AR", "54").set("BR", "55").set("CL", "56").set("CO", "57").set("VE", "58").set("GP", "590").set("BO", "591").set("GY", "592").set("EC", "593").set("FG", "594").set("PY", "595").set("MQ", "596").set("SR", "597").set("UY", "598").set("CW", "599").set("AN", "599").set("MY", "60").set("AU", "61").set("ID", "62").set("PH", "63").set("NZ", "64").set("SG", "65").set("TH", "66").set("TP", "670").set("BN", "673").set("PG", "675").set("TO", "676").set("SB", "677").set("VU", "678").set("FJ", "679").set("PW", "680").set("CK", "682").set("NU", "683").set("AS", "684").set("WS", "685").set("KI", "686").set("NC", "687").set("TV", "688").set("PF", "689").set("FM", "691").set("KZ", "7").set("RU", "7").set("JP", "81").set("KR", "82").set("VN", "84").set("KP", "850").set("HK", "852").set("MO", "853").set("KH", "855").set("LA", "856").set("CN", "86").set("BD", "880").set("TW", "886").set("TR", "90").set("IN", "91").set("PK", "92").set("AF", "93").set("LK", "94").set("MM", "95").set("MV", "960").set("LB", "961").set("JO", "962").set("SY", "963").set("IQ", "964").set("KW", "965").set("SA", "966").set("YE", "967").set("OM", "968").set("PS", "970").set("AE", "971").set("IL", "972").set("BH", "973").set("QA", "974").set("BT", "975").set("MN", "976").set("NP", "977").set("IR", "98").set("TK", "992").set("TM", "993").set("AZ", "994").set("GE", "995").set("KG", "996").set("UZ", "998");
2833
+ [...new Set(wr.values())].map((t) => ({
2833
2834
  label: `+${t}`,
2834
2835
  value: t
2835
2836
  }));
@@ -2850,7 +2851,7 @@ const B = ({
2850
2851
  i,
2851
2852
  e
2852
2853
  ] })
2853
- ] }), vt = d.createContext(void 0), wr = ({
2854
+ ] }), vt = d.createContext(void 0), _r = ({
2854
2855
  position: t,
2855
2856
  bouMenuItems: e,
2856
2857
  authenticationStatus: s,
@@ -2861,7 +2862,7 @@ const B = ({
2861
2862
  if (!t)
2862
2863
  throw new Error("Authentication context can not be rendered outside of Authentication");
2863
2864
  return t;
2864
- }, mt = d.createContext(void 0), _r = ({ apiUrl: t, redirectUrl: e, children: s }) => /* @__PURE__ */ n.jsx(mt.Provider, { value: { apiUrl: t, redirectUrl: e }, children: s }), yt = () => {
2865
+ }, mt = d.createContext(void 0), Rr = ({ apiUrl: t, redirectUrl: e, children: s }) => /* @__PURE__ */ n.jsx(mt.Provider, { value: { apiUrl: t, redirectUrl: e }, children: s }), yt = () => {
2865
2866
  const t = d.useContext(mt);
2866
2867
  if (!t)
2867
2868
  throw new Error("Api context can not be rendered outside of Api");
@@ -2875,7 +2876,7 @@ const B = ({
2875
2876
  getTermsAndConditionsEndpoint: o,
2876
2877
  postTermsAndConditionsEndpoint: a
2877
2878
  };
2878
- }, Rr = (t) => t ? /* @__PURE__ */ n.jsx("ul", { className: "bou-menu__list", children: t == null ? void 0 : t.map(({ label: e, icon: s, url: r }, i) => /* @__PURE__ */ n.jsx(
2879
+ }, Er = (t) => t ? /* @__PURE__ */ n.jsx("ul", { className: "bou-menu__list", children: t == null ? void 0 : t.map(({ label: e, icon: s, url: r }, i) => /* @__PURE__ */ n.jsx(
2879
2880
  B,
2880
2881
  {
2881
2882
  className: "bou-menu-item",
@@ -2885,7 +2886,7 @@ const B = ({
2885
2886
  label: e
2886
2887
  },
2887
2888
  i
2888
- )) }) : null, Er = () => {
2889
+ )) }) : null, Or = () => {
2889
2890
  const { t } = Q(), e = Qe(), { position: s, profile: r, bouMenuItems: i } = Re(), { logoutUrl: o } = $(), a = (r == null ? void 0 : r.firstName) ?? "", u = (r == null ? void 0 : r.lastName) ?? "";
2890
2891
  return /* @__PURE__ */ n.jsxs(L, { type: "nav", id: "xtra-menu", position: s, children: [
2891
2892
  /* @__PURE__ */ n.jsx(
@@ -2905,7 +2906,7 @@ const B = ({
2905
2906
  }
2906
2907
  ),
2907
2908
  /* @__PURE__ */ n.jsxs(L.Content, { as: "div", children: [
2908
- Rr(i),
2909
+ Er(i),
2909
2910
  /* @__PURE__ */ n.jsxs("ul", { children: [
2910
2911
  /* @__PURE__ */ n.jsx(
2911
2912
  B,
@@ -2949,7 +2950,7 @@ const B = ({
2949
2950
  ] })
2950
2951
  ] })
2951
2952
  ] });
2952
- }, Or = () => {
2953
+ }, Sr = () => {
2953
2954
  const { t } = Q();
2954
2955
  return /* @__PURE__ */ n.jsxs("button", { className: O("button", "button--neutral", "button--authentication"), children: [
2955
2956
  /* @__PURE__ */ n.jsx("div", { className: "button__icon", children: /* @__PURE__ */ n.jsx("i", { className: "spinner" }) }),
@@ -2958,7 +2959,7 @@ const B = ({
2958
2959
  "..."
2959
2960
  ] })
2960
2961
  ] });
2961
- }, Sr = ({ className: t }) => {
2962
+ }, Pr = ({ className: t }) => {
2962
2963
  const { t: e } = Q(), { loginUrl: s } = $();
2963
2964
  return /* @__PURE__ */ n.jsxs(
2964
2965
  "a",
@@ -2979,7 +2980,7 @@ const B = ({
2979
2980
  }
2980
2981
  );
2981
2982
  };
2982
- const Pr = () => {
2983
+ const Ar = () => {
2983
2984
  const { t } = Q(), { loginUrl: e } = $(), s = Qe(), { position: r } = Re();
2984
2985
  return /* @__PURE__ */ n.jsxs(L, { type: "nav", id: "xtra-menu", position: r, className: "menu--unauthenticated", children: [
2985
2986
  /* @__PURE__ */ n.jsx(L.Trigger, { className: O("button", "button--neutral", "button--authentication"), children: /* @__PURE__ */ n.jsxs("button", { children: [
@@ -2999,12 +3000,12 @@ const Pr = () => {
2999
3000
  ] });
3000
3001
  };
3001
3002
  var D = /* @__PURE__ */ ((t) => (t.Authenticated = "authenticated", t.NotAuthenticated = "notAuthenticated", t.Pending = "pending", t))(D || {});
3002
- const Ar = () => {
3003
+ const Nr = () => {
3003
3004
  const { authenticationStatus: t } = Re();
3004
3005
  return t === D.NotAuthenticated ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
3005
- /* @__PURE__ */ n.jsx(Sr, {}),
3006
- /* @__PURE__ */ n.jsx(Pr, {})
3007
- ] }) : t === D.Pending ? /* @__PURE__ */ n.jsx(Or, {}) : /* @__PURE__ */ n.jsx(Er, {});
3006
+ /* @__PURE__ */ n.jsx(Pr, {}),
3007
+ /* @__PURE__ */ n.jsx(Ar, {})
3008
+ ] }) : t === D.Pending ? /* @__PURE__ */ n.jsx(Sr, {}) : /* @__PURE__ */ n.jsx(Or, {});
3008
3009
  };
3009
3010
  /*! js-cookie v3.0.5 | MIT */
3010
3011
  function ee(t) {
@@ -3015,7 +3016,7 @@ function ee(t) {
3015
3016
  }
3016
3017
  return t;
3017
3018
  }
3018
- var Nr = {
3019
+ var Mr = {
3019
3020
  read: function(t) {
3020
3021
  return t[0] === '"' && (t = t.slice(1, -1)), t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
3021
3022
  },
@@ -3076,13 +3077,13 @@ function Ce(t, e) {
3076
3077
  }
3077
3078
  );
3078
3079
  }
3079
- var xe = Ce(Nr, { path: "/" });
3080
+ var xe = Ce(Mr, { path: "/" });
3080
3081
  class Te extends Error {
3081
3082
  constructor(e) {
3082
3083
  super(e), this.name = "UnauthorizedError";
3083
3084
  }
3084
3085
  }
3085
- const Mr = () => {
3086
+ const Fr = () => {
3086
3087
  const { i18n: t } = Q(), { profileEndpoint: e } = $();
3087
3088
  return nt({
3088
3089
  // @ts-expect-error queryKey is the right type
@@ -3106,7 +3107,7 @@ const Mr = () => {
3106
3107
  e ? D.Authenticated : D.Pending
3107
3108
  ), [i, o] = d.useState(
3108
3109
  e ? JSON.parse(t) : void 0
3109
- ), a = Mr();
3110
+ ), a = Fr();
3110
3111
  return d.useEffect(() => {
3111
3112
  if (a.isError && e && (xe.remove("profile"), r(D.NotAuthenticated)), a.isError && !e && r(D.NotAuthenticated), a.isSuccess) {
3112
3113
  r(D.Authenticated);
@@ -3126,27 +3127,27 @@ const Mr = () => {
3126
3127
  a.isLoading,
3127
3128
  a.isSuccess
3128
3129
  ]), { authenticationStatus: s, profile: i };
3129
- }, Fr = ({ position: t, bouMenuItems: e }) => {
3130
+ }, kr = ({ position: t, bouMenuItems: e }) => {
3130
3131
  const { authenticationStatus: s, profile: r } = Ct();
3131
3132
  return /* @__PURE__ */ n.jsx(
3132
- wr,
3133
+ _r,
3133
3134
  {
3134
3135
  bouMenuItems: e,
3135
3136
  authenticationStatus: s,
3136
3137
  position: t,
3137
3138
  profile: r,
3138
- children: /* @__PURE__ */ n.jsx(Ar, {})
3139
+ children: /* @__PURE__ */ n.jsx(Nr, {})
3139
3140
  }
3140
3141
  );
3141
3142
  };
3142
- var kr = Object.defineProperty, Lr = Object.defineProperties, Dr = Object.getOwnPropertyDescriptors, ae = Object.getOwnPropertySymbols, xt = Object.prototype.hasOwnProperty, gt = Object.prototype.propertyIsEnumerable, Ue = (t, e, s) => e in t ? kr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, q = (t, e) => {
3143
+ var Lr = Object.defineProperty, Dr = Object.defineProperties, Ir = Object.getOwnPropertyDescriptors, ae = Object.getOwnPropertySymbols, xt = Object.prototype.hasOwnProperty, gt = Object.prototype.propertyIsEnumerable, Ue = (t, e, s) => e in t ? Lr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s, q = (t, e) => {
3143
3144
  for (var s in e || (e = {}))
3144
3145
  xt.call(e, s) && Ue(t, s, e[s]);
3145
3146
  if (ae)
3146
3147
  for (var s of ae(e))
3147
3148
  gt.call(e, s) && Ue(t, s, e[s]);
3148
3149
  return t;
3149
- }, G = (t, e) => Lr(t, Dr(e)), Z = (t, e) => {
3150
+ }, G = (t, e) => Dr(t, Ir(e)), Z = (t, e) => {
3150
3151
  var s = {};
3151
3152
  for (var r in t)
3152
3153
  xt.call(t, r) && e.indexOf(r) < 0 && (s[r] = t[r]);
@@ -3154,7 +3155,7 @@ var kr = Object.defineProperty, Lr = Object.defineProperties, Dr = Object.getOwn
3154
3155
  for (var r of ae(t))
3155
3156
  e.indexOf(r) < 0 && gt.call(t, r) && (s[r] = t[r]);
3156
3157
  return s;
3157
- }, Ir = d.forwardRef((t, e) => {
3158
+ }, Tr = d.forwardRef((t, e) => {
3158
3159
  const s = t, { isAuthenticated: r, className: i } = s, o = Z(s, ["isAuthenticated", "className"]);
3159
3160
  return /* @__PURE__ */ n.jsx(
3160
3161
  V,
@@ -3170,8 +3171,8 @@ var kr = Object.defineProperty, Lr = Object.defineProperties, Dr = Object.getOwn
3170
3171
  }, o)
3171
3172
  );
3172
3173
  });
3173
- Ir.displayName = "AuthenticationButton";
3174
- var Tr = (t) => {
3174
+ Tr.displayName = "AuthenticationButton";
3175
+ var Ur = (t) => {
3175
3176
  var e = t, {
3176
3177
  children: s
3177
3178
  } = e, r = Z(e, [
@@ -3185,14 +3186,14 @@ var Tr = (t) => {
3185
3186
  }
3186
3187
  );
3187
3188
  bt.displayName = "TermsAndConditionsForm";
3188
- var Ur = (t) => {
3189
+ var Qr = (t) => {
3189
3190
  var e = t, {
3190
3191
  children: s
3191
3192
  } = e, r = Z(e, [
3192
3193
  "children"
3193
3194
  ]);
3194
3195
  return /* @__PURE__ */ n.jsx("p", G(q({ className: "form--tc__description" }, r), { children: s }));
3195
- }, Qr = (t) => {
3196
+ }, qr = (t) => {
3196
3197
  var e = t, { children: s } = e, r = Z(e, ["children"]);
3197
3198
  return /* @__PURE__ */ n.jsx(
3198
3199
  "a",
@@ -3206,15 +3207,15 @@ var Ur = (t) => {
3206
3207
  children: s
3207
3208
  })
3208
3209
  );
3209
- }, qr = ({ children: t }) => /* @__PURE__ */ n.jsx("h1", { className: "form--tc__title", children: t }), Br = d.forwardRef(
3210
+ }, Br = ({ children: t }) => /* @__PURE__ */ n.jsx("h1", { className: "form--tc__title", children: t }), Kr = d.forwardRef(
3210
3211
  (t, e) => /* @__PURE__ */ n.jsx(M.Close, G(q({ className: "hidden" }, t), { ref: e }))
3211
3212
  );
3212
- Br.displayName = "TermsAndConditionsClose";
3213
- var Kr = (t) => {
3213
+ Kr.displayName = "TermsAndConditionsClose";
3214
+ var Hr = (t) => {
3214
3215
  var e = t, { children: s } = e, r = Z(e, ["children"]);
3215
3216
  return /* @__PURE__ */ n.jsx("span", G(q({ className: "form--tc__error", role: "alert" }, r), { children: s }));
3216
3217
  };
3217
- const Hr = () => {
3218
+ const Vr = () => {
3218
3219
  const { postTermsAndConditionsEndpoint: t } = $(), e = new We();
3219
3220
  return fs({
3220
3221
  mutationFn: async (r) => {
@@ -3232,7 +3233,7 @@ const Hr = () => {
3232
3233
  await e.invalidateQueries({ queryKey: ["gdpr"] });
3233
3234
  }
3234
3235
  });
3235
- }, Vr = () => {
3236
+ }, $r = () => {
3236
3237
  const { i18n: t } = Q(), { getTermsAndConditionsEndpoint: e } = $(), { authenticationStatus: s } = Ct(), r = xe.get("hasAcceptedLatestTermsAndConditions"), i = [], o = r === "true", a = s === D.Authenticated;
3237
3238
  return nt({
3238
3239
  queryKey: ["gdpr"],
@@ -3249,8 +3250,8 @@ const Hr = () => {
3249
3250
  enabled: a && !o,
3250
3251
  initialData: i
3251
3252
  });
3252
- }, $r = ({ redirectUrl: t }) => {
3253
- const { t: e } = Q(), { apiUrl: s } = yt(), r = d.useRef(null), [i, o] = d.useState(0), [a, u] = d.useState({}), { mutate: l, isError: h } = Hr(), { AccessibleFormMessage: c, formRef: p } = _t({ submitCount: i, errors: a }), { data: v } = Vr(), f = !!(v != null && v.length), y = e("termsAndConditions.error.required"), g = () => {
3253
+ }, Gr = ({ redirectUrl: t }) => {
3254
+ const { t: e } = Q(), { apiUrl: s } = yt(), r = d.useRef(null), [i, o] = d.useState(0), [a, u] = d.useState({}), { mutate: l, isError: h } = Vr(), { AccessibleFormMessage: c, formRef: p } = _t({ submitCount: i, errors: a }), { data: v } = $r(), f = !!(v != null && v.length), y = e("termsAndConditions.error.required"), g = () => {
3254
3255
  var C;
3255
3256
  (C = r == null ? void 0 : r.current) == null || C.click(), document.body.style.removeProperty("overflow");
3256
3257
  };
@@ -3271,11 +3272,11 @@ const Hr = () => {
3271
3272
  return f ? /* @__PURE__ */ n.jsxs(M, { defaultOpen: f, isModal: !0, children: [
3272
3273
  c,
3273
3274
  /* @__PURE__ */ n.jsxs(M.Root, { children: [
3274
- /* @__PURE__ */ n.jsx(M.Header, { children: /* @__PURE__ */ n.jsx(M.Title, { icon: /* @__PURE__ */ n.jsx(_e, { role: "presentation" }), children: /* @__PURE__ */ n.jsx(qr, { children: e("termsAndConditions.title") }) }) }),
3275
+ /* @__PURE__ */ n.jsx(M.Header, { children: /* @__PURE__ */ n.jsx(M.Title, { icon: /* @__PURE__ */ n.jsx(_e, { role: "presentation" }), children: /* @__PURE__ */ n.jsx(Br, { children: e("termsAndConditions.title") }) }) }),
3275
3276
  /* @__PURE__ */ n.jsx(M.Body, { children: /* @__PURE__ */ n.jsxs(bt, { ref: p, id: "tc-form", onSubmit: m, children: [
3276
- /* @__PURE__ */ n.jsxs(Ur, { children: [
3277
+ /* @__PURE__ */ n.jsxs(Qr, { children: [
3277
3278
  e("termsAndConditions.description"),
3278
- a.acceptedTC && /* @__PURE__ */ n.jsx(Kr, { children: y })
3279
+ a.acceptedTC && /* @__PURE__ */ n.jsx(Hr, { children: y })
3279
3280
  ] }),
3280
3281
  v.map(({ tcCode: C, title: _, URL: j }) => /* @__PURE__ */ n.jsx(
3281
3282
  U,
@@ -3285,8 +3286,8 @@ const Hr = () => {
3285
3286
  name: "acceptedTC",
3286
3287
  variant: "primary",
3287
3288
  children: /* @__PURE__ */ n.jsxs(U.Content, { children: [
3288
- /* @__PURE__ */ n.jsx(Tr, { children: _ }),
3289
- /* @__PURE__ */ n.jsx(Qr, { href: j, children: e("termsAndConditions.action", { title: _ }) })
3289
+ /* @__PURE__ */ n.jsx(Ur, { children: _ }),
3290
+ /* @__PURE__ */ n.jsx(qr, { href: j, children: e("termsAndConditions.action", { title: _ }) })
3290
3291
  ] })
3291
3292
  },
3292
3293
  C
@@ -3305,12 +3306,12 @@ const Hr = () => {
3305
3306
  ] })
3306
3307
  ] })
3307
3308
  ] }) : /* @__PURE__ */ n.jsx(n.Fragment, {});
3308
- }, Gr = d.forwardRef(({ children: t, ...e }, s) => /* @__PURE__ */ n.jsx("form", { className: "form--tc", ref: s, ...e, children: t }));
3309
- Gr.displayName = "TermsAndConditionsForm";
3310
- const Zr = new We(), zr = ({ environment: t, redirectUrl: e, apiUrl: s, position: r, bouMenuItems: i }) => /* @__PURE__ */ n.jsx(Rt, { environment: t, children: /* @__PURE__ */ n.jsx(_r, { apiUrl: s, redirectUrl: e, children: /* @__PURE__ */ n.jsxs(es, { client: Zr, children: [
3311
- /* @__PURE__ */ n.jsx(Fr, { position: r, bouMenuItems: i }),
3312
- /* @__PURE__ */ n.jsx($r, { redirectUrl: e })
3309
+ }, Zr = d.forwardRef(({ children: t, ...e }, s) => /* @__PURE__ */ n.jsx("form", { className: "form--tc", ref: s, ...e, children: t }));
3310
+ Zr.displayName = "TermsAndConditionsForm";
3311
+ const Wr = new We(), Jr = ({ environment: t, redirectUrl: e, apiUrl: s, position: r, bouMenuItems: i }) => /* @__PURE__ */ n.jsx(Rt, { environment: t, children: /* @__PURE__ */ n.jsx(Rr, { apiUrl: s, redirectUrl: e, children: /* @__PURE__ */ n.jsxs(es, { client: Wr, children: [
3312
+ /* @__PURE__ */ n.jsx(kr, { position: r, bouMenuItems: i }),
3313
+ /* @__PURE__ */ n.jsx(Gr, { redirectUrl: e })
3313
3314
  ] }) }) });
3314
3315
  export {
3315
- zr as default
3316
+ Jr as default
3316
3317
  };