@mp-front/components 0.0.1-next-9 → 0.0.1-next-10

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,7 +1,7 @@
1
- import { j as n, m as _ } from "./proxy-uRb7Bek8.js";
1
+ import { j as n, m as k } from "./proxy-uRb7Bek8.js";
2
2
  import { c as p, a as Gr } from "./classNames-BiTpavcN.js";
3
- import { P as T, u as I, c as P, a as $, b as L, d as q, R as ct, e as fe, A as Ie, f as te, h as Hr, g as zr, i as Ur, F as Kr, D as dt, C as ut, j as ft, k as $r, l as Ne, m as gt, I as xt, n as ge, o as Ae, p as Me, q as qr, r as ht, s as Yr, t as Wr, v as Xr, w as Zr, x as Qr, T as Jr, y as en, z as Q, B as tn, E as Fe, S as rn, G as nn, H as on, J as sn, K as an, N as ln, L as cn, Q as dn, M as un, O as fn, V as gn, U as xn, W as hn, X as mn, Y as pn, Z as vn, _ as bn, $ as yn, a0 as Cn, a1 as wn } from "./toggle-group.component-Cs7zS-s6.js";
4
- import { a2 as nl, a3 as ol, a4 as sl, a5 as al, a6 as il, a7 as ll, a8 as cl, a9 as dl } from "./toggle-group.component-Cs7zS-s6.js";
3
+ import { P as T, u as I, c as P, a as $, b as L, d as q, R as ct, e as fe, A as Ie, f as te, h as Hr, g as zr, i as Ur, F as Kr, D as dt, C as ut, j as ft, k as $r, l as Ne, m as gt, I as xt, n as ge, o as Ae, p as Me, q as qr, r as ht, s as Yr, t as Wr, v as Xr, w as Zr, x as Qr, T as Jr, y as en, z as Q, B as tn, E as Fe, S as rn, G as nn, H as on, J as sn, K as an, N as ln, L as cn, Q as dn, M as un, O as fn, V as gn, U as xn, W as hn, X as mn, Y as pn, Z as vn, _ as bn, $ as yn, a0 as Cn, a1 as wn } from "./toggle-group.component-D2gEDqha.js";
4
+ import { a2 as nl, a3 as ol, a4 as sl, a5 as al, a6 as il, a7 as ll, a8 as cl, a9 as dl } from "./toggle-group.component-D2gEDqha.js";
5
5
  import * as d from "react";
6
6
  import { useEffect as D, cloneElement as jn, useState as F, useMemo as xe, useCallback as Sn, useId as Rn, useRef as De } from "react";
7
7
  import { S as Oe, a as tt, b as En } from "./indeterminate-CSEeEKiJ.js";
@@ -82,7 +82,7 @@ var [Le] = L("Form"), Ve = "Form", [Ln, re] = Le(Ve), [Vn, jt] = Le(Ve), St = d.
82
82
  ...R,
83
83
  [S]: { ...R[S] ?? {}, ...E }
84
84
  }));
85
- }, []), [k, A] = d.useState({}), M = d.useCallback((S, E) => {
85
+ }, []), [_, A] = d.useState({}), M = d.useCallback((S, E) => {
86
86
  A((R) => {
87
87
  const N = new Set(R[S]).add(E);
88
88
  return { ...R, [S]: N };
@@ -93,8 +93,8 @@ var [Le] = L("Form"), Ve = "Form", [Ln, re] = Le(Ve), [Vn, jt] = Le(Ve), St = d.
93
93
  return N.delete(E), { ...R, [S]: N };
94
94
  });
95
95
  }, []), z = d.useCallback(
96
- (S) => Array.from(k[S] ?? []).join(" ") || void 0,
97
- [k]
96
+ (S) => Array.from(_[S] ?? []).join(" ") || void 0,
97
+ [_]
98
98
  );
99
99
  return /* @__PURE__ */ n.jsx(
100
100
  Ln,
@@ -177,11 +177,11 @@ var de = "FormControl", Pt = d.forwardRef(
177
177
  x(u, R);
178
178
  return;
179
179
  }
180
- const w = y.form ? new FormData(y.form) : new FormData(), j = [y.value, w], k = [], A = [];
180
+ const w = y.form ? new FormData(y.form) : new FormData(), j = [y.value, w], _ = [], A = [];
181
181
  f.forEach((R) => {
182
- Wn(R, j) ? A.push(R) : Xn(R) && k.push(R);
182
+ Wn(R, j) ? A.push(R) : Xn(R) && _.push(R);
183
183
  });
184
- const M = k.map(({ id: R, match: N }) => [R, N(...j)]), H = Object.fromEntries(M), z = Object.values(H).some(Boolean), S = z;
184
+ const M = _.map(({ id: R, match: N }) => [R, N(...j)]), H = Object.fromEntries(M), z = Object.values(H).some(Boolean), S = z;
185
185
  y.setCustomValidity(S ? J : "");
186
186
  const E = we(y.validity);
187
187
  if (x(u, E), h(u, H), !z && A.length > 0) {
@@ -852,7 +852,7 @@ var Mo = Xt, Fo = Qt, Do = Jt, er = ["PageUp", "PageDown"], tr = ["ArrowUp", "Ar
852
852
  inverted: h = !1,
853
853
  form: m,
854
854
  ...b
855
- } = e, v = d.useRef(/* @__PURE__ */ new Set()), C = d.useRef(0), w = a === "horizontal" ? Bo : Go, [j = [], k] = q({
855
+ } = e, v = d.useRef(/* @__PURE__ */ new Set()), C = d.useRef(0), w = a === "horizontal" ? Bo : Go, [j = [], _] = q({
856
856
  prop: g,
857
857
  defaultProp: u,
858
858
  onChange: (E) => {
@@ -873,7 +873,7 @@ var Mo = Xt, Fo = Qt, Do = Jt, er = ["PageUp", "PageDown"], tr = ["ArrowUp", "Ar
873
873
  }
874
874
  function S(E, R, { commit: N } = { commit: !1 }) {
875
875
  const W = Xo(i), ae = Zo(Math.round((E - o) / i) * i + o, W), B = ht(ae, [o, s]);
876
- k((V = []) => {
876
+ _((V = []) => {
877
877
  const O = Uo(V, B, R);
878
878
  if (Wo(O, c * i)) {
879
879
  C.current = O.indexOf(B);
@@ -946,7 +946,7 @@ var [sr, ar] = nr(Y, {
946
946
  ...g
947
947
  } = e, [f, x] = d.useState(null), h = I(t, (w) => x(w)), m = d.useRef(void 0), b = Ne(s), v = b === "ltr", C = v && !i || !v && i;
948
948
  function y(w) {
949
- const j = m.current || f.getBoundingClientRect(), k = [0, j.width], M = Ye(k, C ? [r, o] : [o, r]);
949
+ const j = m.current || f.getBoundingClientRect(), _ = [0, j.width], M = Ye(_, C ? [r, o] : [o, r]);
950
950
  return m.current = j, M(w - j.left);
951
951
  }
952
952
  return /* @__PURE__ */ n.jsx(
@@ -980,8 +980,8 @@ var [sr, ar] = nr(Y, {
980
980
  m.current = void 0, c == null || c();
981
981
  },
982
982
  onStepKeyDown: (w) => {
983
- const k = rr[C ? "from-left" : "from-right"].includes(w.key);
984
- u == null || u({ event: w, direction: k ? -1 : 1 });
983
+ const _ = rr[C ? "from-left" : "from-right"].includes(w.key);
984
+ u == null || u({ event: w, direction: _ ? -1 : 1 });
985
985
  }
986
986
  }
987
987
  )
@@ -1554,7 +1554,7 @@ var ee = "Tooltip", [hs, se] = ye(ee), Ir = (e) => {
1554
1554
  caller: ee
1555
1555
  }), w = d.useMemo(() => C ? v.current ? "delayed-open" : "instant-open" : "closed", [C]), j = d.useCallback(() => {
1556
1556
  window.clearTimeout(h.current), h.current = 0, v.current = !1, y(!0);
1557
- }, [y]), k = d.useCallback(() => {
1557
+ }, [y]), _ = d.useCallback(() => {
1558
1558
  window.clearTimeout(h.current), h.current = 0, y(!1);
1559
1559
  }, [y]), A = d.useCallback(() => {
1560
1560
  window.clearTimeout(h.current), h.current = window.setTimeout(() => {
@@ -1576,10 +1576,10 @@ var ee = "Tooltip", [hs, se] = ye(ee), Ir = (e) => {
1576
1576
  c.isOpenDelayedRef.current ? A() : j();
1577
1577
  }, [c.isOpenDelayedRef, A, j]),
1578
1578
  onTriggerLeave: d.useCallback(() => {
1579
- m ? k() : (window.clearTimeout(h.current), h.current = 0);
1580
- }, [k, m]),
1579
+ m ? _() : (window.clearTimeout(h.current), h.current = 0);
1580
+ }, [_, m]),
1581
1581
  onOpen: j,
1582
- onClose: k,
1582
+ onClose: _,
1583
1583
  disableHoverableContent: m,
1584
1584
  children: r
1585
1585
  }
@@ -1632,8 +1632,8 @@ var K = "TooltipContent", Mr = d.forwardRef(
1632
1632
  l(null), f(!1);
1633
1633
  }, [f]), h = d.useCallback(
1634
1634
  (m, b) => {
1635
- const v = m.currentTarget, C = { x: m.clientX, y: m.clientY }, y = ws(C, v.getBoundingClientRect()), w = js(C, y), j = Ss(b.getBoundingClientRect()), k = Es([...w, ...j]);
1636
- l(k), f(!0);
1635
+ const v = m.currentTarget, C = { x: m.clientX, y: m.clientY }, y = ws(C, v.getBoundingClientRect()), w = js(C, y), j = Ss(b.getBoundingClientRect()), _ = Es([...w, ...j]);
1636
+ l(_), f(!0);
1637
1637
  },
1638
1638
  [f]
1639
1639
  );
@@ -1874,7 +1874,7 @@ const Ii = ({
1874
1874
  }) => {
1875
1875
  const u = !!t && !r && !l || !t && !!r && !l;
1876
1876
  return /* @__PURE__ */ n.jsxs(
1877
- _.div,
1877
+ k.div,
1878
1878
  {
1879
1879
  initial: { opacity: 0, y: -10 },
1880
1880
  animate: { opacity: 1, y: 0 },
@@ -1961,7 +1961,7 @@ const Ii = ({
1961
1961
  }
1962
1962
  );
1963
1963
  return /* @__PURE__ */ n.jsx(
1964
- _.div,
1964
+ k.div,
1965
1965
  {
1966
1966
  initial: { opacity: 0, scale: 0.95 },
1967
1967
  animate: { opacity: 1, scale: 1 },
@@ -2039,7 +2039,7 @@ const Ii = ({
2039
2039
  return e && document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
2040
2040
  }, [e, t]), /* @__PURE__ */ n.jsx(tn, { id: "drawer", children: /* @__PURE__ */ n.jsx(Fe, { children: e && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
2041
2041
  /* @__PURE__ */ n.jsx(
2042
- _.div,
2042
+ k.div,
2043
2043
  {
2044
2044
  className: p(X.backdrop, i.backdrop),
2045
2045
  initial: le.backdrop.initial,
@@ -2049,7 +2049,7 @@ const Ii = ({
2049
2049
  }
2050
2050
  ),
2051
2051
  /* @__PURE__ */ n.jsxs(
2052
- _.div,
2052
+ k.div,
2053
2053
  {
2054
2054
  className: p(
2055
2055
  X.drawer,
@@ -2077,7 +2077,7 @@ const Ii = ({
2077
2077
  className: t = "",
2078
2078
  icon: r = /* @__PURE__ */ n.jsx(Pn, {})
2079
2079
  }) => /* @__PURE__ */ n.jsx(rn, { children: /* @__PURE__ */ n.jsx(
2080
- _.section,
2080
+ k.section,
2081
2081
  {
2082
2082
  "data-cy": "empty-component",
2083
2083
  initial: { opacity: 0, y: 8 },
@@ -2086,7 +2086,7 @@ const Ii = ({
2086
2086
  className: p(ce.container, t),
2087
2087
  children: /* @__PURE__ */ n.jsxs("div", { className: ce.wrapper, children: [
2088
2088
  /* @__PURE__ */ n.jsx(
2089
- _.div,
2089
+ k.div,
2090
2090
  {
2091
2091
  initial: { scale: 0.9 },
2092
2092
  animate: { scale: 1 },
@@ -2101,7 +2101,7 @@ const Ii = ({
2101
2101
  }
2102
2102
  ),
2103
2103
  /* @__PURE__ */ n.jsx(
2104
- _.h1,
2104
+ k.h1,
2105
2105
  {
2106
2106
  "data-cy": "empty-text",
2107
2107
  className: ce.text,
@@ -2151,7 +2151,7 @@ const Ii = ({
2151
2151
  }
2152
2152
  ),
2153
2153
  /* @__PURE__ */ n.jsx(
2154
- _.input,
2154
+ k.input,
2155
2155
  {
2156
2156
  ...u,
2157
2157
  value: g,
@@ -2200,7 +2200,7 @@ const Ii = ({
2200
2200
  }) => {
2201
2201
  const i = e.href ? "a" : "button", a = e.href ? { href: e.href } : { onClick: e.onClick, type: "button" };
2202
2202
  return /* @__PURE__ */ n.jsx(
2203
- _.li,
2203
+ k.li,
2204
2204
  {
2205
2205
  initial: { opacity: 0, x: -10 },
2206
2206
  animate: { opacity: 1, x: 0 },
@@ -2303,7 +2303,7 @@ const Ii = ({
2303
2303
  o,
2304
2304
  s,
2305
2305
  i
2306
- ), w = Ys(e.length, i), j = Ws(r, u), k = Xs(a);
2306
+ ), w = Ys(e.length, i), j = Ws(r, u), _ = Xs(a);
2307
2307
  return /* @__PURE__ */ n.jsx(
2308
2308
  "div",
2309
2309
  {
@@ -2312,7 +2312,7 @@ const Ii = ({
2312
2312
  onAnimationIteration: v,
2313
2313
  ...C,
2314
2314
  children: /* @__PURE__ */ n.jsxs(
2315
- _.div,
2315
+ k.div,
2316
2316
  {
2317
2317
  initial: { opacity: 0, y: -10 },
2318
2318
  animate: { opacity: 1, y: 0 },
@@ -2338,7 +2338,7 @@ const Ii = ({
2338
2338
  {
2339
2339
  currentPage: s,
2340
2340
  totalPages: w,
2341
- onPageChange: k,
2341
+ onPageChange: _,
2342
2342
  size: r
2343
2343
  }
2344
2344
  )
@@ -2462,7 +2462,7 @@ const Ii = ({
2462
2462
  u
2463
2463
  );
2464
2464
  return /* @__PURE__ */ n.jsxs(
2465
- _.div,
2465
+ k.div,
2466
2466
  {
2467
2467
  layout: !0,
2468
2468
  initial: m,
@@ -2504,7 +2504,7 @@ const Ii = ({
2504
2504
  label: o,
2505
2505
  children: s
2506
2506
  }) => /* @__PURE__ */ n.jsx(
2507
- _.button,
2507
+ k.button,
2508
2508
  {
2509
2509
  whileHover: { scale: 1.05 },
2510
2510
  whileTap: { scale: 0.95 },
@@ -2527,7 +2527,7 @@ const Ii = ({
2527
2527
  onPageChange: r,
2528
2528
  size: o
2529
2529
  }) => /* @__PURE__ */ n.jsx(
2530
- _.button,
2530
+ k.button,
2531
2531
  {
2532
2532
  whileHover: { scale: t ? 1 : 1.05 },
2533
2533
  whileTap: { scale: 0.95 },
@@ -2585,7 +2585,7 @@ const Ii = ({
2585
2585
  }) => {
2586
2586
  const i = sa(e, r), a = aa(e, t, r), l = oa(e, t);
2587
2587
  return /* @__PURE__ */ n.jsxs(
2588
- _.div,
2588
+ k.div,
2589
2589
  {
2590
2590
  initial: { opacity: 0 },
2591
2591
  animate: { opacity: 1 },
@@ -2686,17 +2686,23 @@ const Ii = ({
2686
2686
  ),
2687
2687
  value: e,
2688
2688
  ...l,
2689
- children: /* @__PURE__ */ n.jsx(
2690
- So,
2689
+ children: /* @__PURE__ */ n.jsx(So, { asChild: !0, children: /* @__PURE__ */ n.jsx(
2690
+ k.div,
2691
2691
  {
2692
2692
  className: p(
2693
- "h-full transition-transform duration-300 ease-in-out",
2693
+ "size-full",
2694
2694
  o || ca[r],
2695
2695
  t == null ? void 0 : t.indicator
2696
2696
  ),
2697
- style: { transform: `translateX(-${100 - (e || 0)}%)` }
2697
+ transition: {
2698
+ duration: 3,
2699
+ delay: 0.5,
2700
+ ease: "easeInOut"
2701
+ },
2702
+ initial: { x: "-100%" },
2703
+ animate: { x: `-${100 - (e || 0)}%` }
2698
2704
  }
2699
- )
2705
+ ) })
2700
2706
  }
2701
2707
  ),
2702
2708
  i && /* @__PURE__ */ n.jsxs(
@@ -2907,7 +2913,7 @@ const Ii = ({
2907
2913
  }) => {
2908
2914
  const o = Pa[r] || "rounded-lg";
2909
2915
  return /* @__PURE__ */ n.jsx(
2910
- _.div,
2916
+ k.div,
2911
2917
  {
2912
2918
  className: p(
2913
2919
  "absolute bg-white shadow-md",
@@ -2986,7 +2992,7 @@ const Ii = ({
2986
2992
  l
2987
2993
  );
2988
2994
  return /* @__PURE__ */ n.jsxs(
2989
- _.div,
2995
+ k.div,
2990
2996
  {
2991
2997
  ref: g,
2992
2998
  id: `${u}-segmented`,
@@ -3195,7 +3201,7 @@ const Ii = ({
3195
3201
  searchValue: y,
3196
3202
  open: w,
3197
3203
  setOpen: j,
3198
- filteredItems: k,
3204
+ filteredItems: _,
3199
3205
  handleSearchChange: A,
3200
3206
  inputRef: M
3201
3207
  } = Oa({
@@ -3227,7 +3233,7 @@ const Ii = ({
3227
3233
  {
3228
3234
  width: v,
3229
3235
  allItems: i,
3230
- filteredItems: k,
3236
+ filteredItems: _,
3231
3237
  currentValue: m,
3232
3238
  emptyMessage: l,
3233
3239
  showSearch: u,
@@ -3656,7 +3662,7 @@ const Ii = ({
3656
3662
  children: [
3657
3663
  u && /* @__PURE__ */ n.jsx("div", { className: it(o, !1), children: u }),
3658
3664
  /* @__PURE__ */ n.jsx(is, { asChild: !0, children: /* @__PURE__ */ n.jsx(
3659
- _.div,
3665
+ k.div,
3660
3666
  {
3661
3667
  className: p(Z.thumb, f.thumb),
3662
3668
  layout: !0,
@@ -3765,7 +3771,7 @@ const Ii = ({
3765
3771
  if (e === "segmented") {
3766
3772
  const i = (s = t.find((a) => a.key === r)) == null ? void 0 : s.content;
3767
3773
  return /* @__PURE__ */ n.jsx(ot, { value: r, forceMount: !0, asChild: !0, children: /* @__PURE__ */ n.jsx(Fe, { mode: "wait", initial: !1, children: /* @__PURE__ */ n.jsx(
3768
- _.div,
3774
+ k.div,
3769
3775
  {
3770
3776
  className: p("min-w-full", o),
3771
3777
  variants: di,
@@ -3828,7 +3834,7 @@ const Ii = ({
3828
3834
  ),
3829
3835
  children: [
3830
3836
  e === "segmented" && i === r && /* @__PURE__ */ n.jsx(
3831
- _.div,
3837
+ k.div,
3832
3838
  {
3833
3839
  layoutId: "segmented-indicator",
3834
3840
  className: "absolute inset-0 bg-white rounded-lg z-0",
@@ -3954,7 +3960,7 @@ const Ii = ({
3954
3960
  }) => {
3955
3961
  const [u, g] = F(a);
3956
3962
  return /* @__PURE__ */ n.jsx(Qn, { children: /* @__PURE__ */ n.jsxs(
3957
- _.div,
3963
+ k.div,
3958
3964
  {
3959
3965
  initial: { opacity: 0 },
3960
3966
  animate: { opacity: 1 },
@@ -3991,7 +3997,7 @@ const Ii = ({
3991
3997
  return /* @__PURE__ */ n.jsx(Ts, { children: /* @__PURE__ */ n.jsxs(ks, { children: [
3992
3998
  /* @__PURE__ */ n.jsx(_s, { asChild: !0, children: r }),
3993
3999
  /* @__PURE__ */ n.jsx(Is, { children: /* @__PURE__ */ n.jsx(Ns, { className: e, asChild: !0, ...o, children: /* @__PURE__ */ n.jsxs(
3994
- _.div,
4000
+ k.div,
3995
4001
  {
3996
4002
  className: p({
3997
4003
  "bg-gray-800 text-white rounded shadow-lg select-none px-4 py-2 outline-none border-0": s && !e
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./proxy-2cglvzJh.cjs"),D=require("./classNames-CN12fVA7.cjs"),Y=require("react"),j=require("./toggle-group.component-DOQKWhkg.cjs"),G=require("./useTranslation-2Dz5dMlm.cjs"),Ve=require("./index-DGDeDoym.cjs");function De(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const B=De(Y);var Ae="Separator",he="horizontal",He=["horizontal","vertical"],Pe=B.forwardRef((r,e)=>{const{decorative:t,orientation:s=he,...i}=r,n=Me(s)?s:he,o=t?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return x.jsxRuntimeExports.jsx(j.Primitive.div,{"data-orientation":n,...o,...i,ref:e})});Pe.displayName=Ae;function Me(r){return He.includes(r)}var Ke=Pe;const g=r=>typeof r=="string",K=()=>{let r,e;const t=new Promise((s,i)=>{r=s,e=i});return t.resolve=r,t.reject=e,t},de=r=>r==null?"":""+r,ze=(r,e,t)=>{r.forEach(s=>{e[s]&&(t[s]=e[s])})},Ue=/###/g,pe=r=>r&&r.indexOf("###")>-1?r.replace(Ue,"."):r,ge=r=>!r||g(r),z=(r,e,t)=>{const s=g(e)?e.split("."):e;let i=0;for(;i<s.length-1;){if(ge(r))return{};const n=pe(s[i]);!r[n]&&t&&(r[n]=new t),Object.prototype.hasOwnProperty.call(r,n)?r=r[n]:r={},++i}return ge(r)?{}:{obj:r,k:pe(s[i])}},me=(r,e,t)=>{const{obj:s,k:i}=z(r,e,Object);if(s!==void 0||e.length===1){s[i]=t;return}let n=e[e.length-1],a=e.slice(0,e.length-1),o=z(r,a,Object);for(;o.obj===void 0&&a.length;)n=`${a[a.length-1]}.${n}`,a=a.slice(0,a.length-1),o=z(r,a,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${n}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${n}`]=t},Be=(r,e,t,s)=>{const{obj:i,k:n}=z(r,e,Object);i[n]=i[n]||[],i[n].push(t)},Q=(r,e)=>{const{obj:t,k:s}=z(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,s))return t[s]},Je=(r,e,t)=>{const s=Q(r,t);return s!==void 0?s:Q(e,t)},$e=(r,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in r?g(r[s])||r[s]instanceof String||g(e[s])||e[s]instanceof String?t&&(r[s]=e[s]):$e(r[s],e[s],t):r[s]=e[s]);return r},V=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Ze=r=>g(r)?r.replace(/[&<>"'\/]/g,e=>_e[e]):r;class We{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const qe=[" ",",","?","!",";"],Ye=new We(20),Ge=(r,e,t)=>{e=e||"",t=t||"";const s=qe.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(s.length===0)return!0;const i=Ye.getRegExp(`(${s.map(a=>a==="?"?"\\?":a).join("|")})`);let n=!i.test(r);if(!n){const a=r.indexOf(t);a>0&&!i.test(r.substring(0,a))&&(n=!0)}return n},ae=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const s=e.split(t);let i=r;for(let n=0;n<s.length;){if(!i||typeof i!="object")return;let a,o="";for(let u=n;u<s.length;++u)if(u!==n&&(o+=t),o+=s[u],a=i[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&u<s.length-1)continue;n+=u-n+1;break}i=a}return i},J=r=>r==null?void 0:r.replace("_","-"),Qe={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,s;(s=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||s.call(t,console,e)}};class X{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Qe,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,i){return i&&!this.debug?null:(g(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new X(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new X(this.logger,e)}}var $=new X;class te{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const i=this.observers[s].get(t)||0;this.observers[s].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,n])=>{for(let a=0;a<n;a++)i(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,n])=>{for(let a=0;a<n;a++)i.apply(i,[e,...t])})}}class xe extends te{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s,i={}){var l,f;const n=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],s&&(Array.isArray(s)?o.push(...s):g(s)&&n?o.push(...s.split(n)):o.push(s)));const u=Q(this.data,o);return!u&&!t&&!s&&e.indexOf(".")>-1&&(e=o[0],t=o[1],s=o.slice(2).join(".")),u||!a||!g(s)?u:ae((f=(l=this.data)==null?void 0:l[e])==null?void 0:f[t],s,n)}addResource(e,t,s,i,n={silent:!1}){const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=[e,t];s&&(o=o.concat(a?s.split(a):s)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),me(this.data,o,i),n.silent||this.emit("added",e,t,s,i)}addResources(e,t,s,i={silent:!1}){for(const n in s)(g(s[n])||Array.isArray(s[n]))&&this.addResource(e,t,n,s[n],{silent:!0});i.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,n,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),i=s,s=t,t=o[1]),this.addNamespaces(t);let u=Q(this.data,o)||{};a.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?$e(u,s,n):u={...u,...s},me(this.data,o,u),a.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var Ee={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,s,i){return r.forEach(n=>{var a;e=((a=this.processors[n])==null?void 0:a.process(e,t,s,i))??e}),e}};const ke=Symbol("i18next/PATH_KEY");function Xe(){const r=[],e=Object.create(null);let t;return e.get=(s,i)=>{var n;return(n=t==null?void 0:t.revoke)==null||n.call(t),i===ke?r:(r.push(i),t=Proxy.revocable(s,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function oe(r,e){const{[ke]:t}=r(Xe());return t.join((e==null?void 0:e.keySeparator)??".")}const ye={},ie=r=>!g(r)&&typeof r!="boolean"&&typeof r!="number";class ee extends te{constructor(e,t={}){super(),ze(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=$.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const s={...t};if(e==null)return!1;const i=this.resolve(e,s);if((i==null?void 0:i.res)===void 0)return!1;const n=ie(i.res);return!(s.returnObjects===!1&&n)}extractFromKey(e,t){let s=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let n=t.ns||this.options.defaultNS||[];const a=s&&e.indexOf(s)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ge(e,s,i);if(a&&!o){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:g(n)?[n]:n};const l=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(l[0])>-1)&&(n=l.shift()),e=l.join(i)}return{key:e,namespaces:g(n)?[n]:n}}translate(e,t,s){let i=typeof t=="object"?{...t}:t;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),e==null)return"";typeof e=="function"&&(e=oe(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]);const n=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:o,namespaces:u}=this.extractFromKey(e[e.length-1],i),l=u[u.length-1];let f=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const c=i.lng||this.language,p=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode")return p?n?{res:`${l}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${f}${o}`:n?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:o;const d=this.resolve(e,i);let h=d==null?void 0:d.res;const m=(d==null?void 0:d.usedKey)||o,y=(d==null?void 0:d.exactUsedKey)||o,v=["[object Number]","[object Function]","[object RegExp]"],w=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,O=i.count!==void 0&&!g(i.count),E=ee.hasDefaultValue(i),Z=O?this.pluralResolver.getSuffix(c,i.count,i):"",k=i.ordinal&&O?this.pluralResolver.getSuffix(c,i.count,{ordinal:!1}):"",A=O&&!i.ordinal&&i.count===0,L=A&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${Z}`]||i[`defaultValue${k}`]||i.defaultValue;let b=h;T&&!h&&E&&(b=L);const Te=ie(b),Ie=Object.prototype.toString.apply(b);if(T&&b&&Te&&v.indexOf(Ie)<0&&!(g(w)&&Array.isArray(b))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const N=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,b,{...i,ns:u}):`key '${o} (${this.language})' returned an object instead of string.`;return n?(d.res=N,d.usedParams=this.getUsedParamsDetails(i),d):N}if(a){const N=Array.isArray(b),R=N?[]:{},le=N?y:m;for(const P in b)if(Object.prototype.hasOwnProperty.call(b,P)){const F=`${le}${a}${P}`;E&&!h?R[P]=this.translate(F,{...i,defaultValue:ie(L)?L[P]:void 0,joinArrays:!1,ns:u}):R[P]=this.translate(F,{...i,joinArrays:!1,ns:u}),R[P]===F&&(R[P]=b[P])}h=R}}else if(T&&g(w)&&Array.isArray(h))h=h.join(w),h&&(h=this.extendTranslation(h,e,i,s));else{let N=!1,R=!1;!this.isValidLookup(h)&&E&&(N=!0,h=L),this.isValidLookup(h)||(R=!0,h=o);const P=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:h,F=E&&L!==h&&this.options.updateMissing;if(R||N||F){if(this.logger.log(F?"updateKey":"missingKey",c,l,o,F?L:h),a){const C=this.resolve(o,{...i,keySeparator:!1});C&&C.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let H=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let C=0;C<W.length;C++)H.push(W[C]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(i.lng||this.language):H.push(i.lng||this.language);const ue=(C,I,M)=>{var fe;const ce=E&&M!==h?M:P;this.options.missingKeyHandler?this.options.missingKeyHandler(C,l,I,ce,F,i):(fe=this.backendConnector)!=null&&fe.saveMissing&&this.backendConnector.saveMissing(C,l,I,ce,F,i),this.emit("missingKey",C,l,I,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?H.forEach(C=>{const I=this.pluralResolver.getSuffixes(C,i);A&&i[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(M=>{ue([C],o+M,i[`defaultValue${M}`]||L)})}):ue(H,o,L))}h=this.extendTranslation(h,e,i,d,s),R&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${l}${f}${o}`),(R||N)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${f}${o}`:o,N?h:void 0,i))}return n?(d.res=h,d.usedParams=this.getUsedParamsDetails(i),d):h}extendTranslation(e,t,s,i,n){var u,l;if((u=this.i18nFormat)!=null&&u.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const f=g(e)&&(((l=s==null?void 0:s.interpolation)==null?void 0:l.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(f){const d=e.match(this.interpolator.nestingRegexp);c=d&&d.length}let p=s.replace&&!g(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,s.lng||this.language||i.usedLng,s),f){const d=e.match(this.interpolator.nestingRegexp),h=d&&d.length;c<h&&(s.nest=!1)}!s.lng&&i&&i.res&&(s.lng=this.language||i.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,(...d)=>(n==null?void 0:n[0])===d[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`),null):this.translate(...d,t),s)),s.interpolation&&this.interpolator.reset()}const a=s.postProcess||this.options.postProcess,o=g(a)?[a]:a;return e!=null&&(o!=null&&o.length)&&s.applyPostProcessor!==!1&&(e=Ee.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,t={}){let s,i,n,a,o;return g(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(s))return;const l=this.extractFromKey(u,t),f=l.key;i=f;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const p=t.count!==void 0&&!g(t.count),d=p&&!t.ordinal&&t.count===0,h=t.context!==void 0&&(g(t.context)||typeof t.context=="number")&&t.context!=="",m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(y=>{var v,w;this.isValidLookup(s)||(o=y,!ye[`${m[0]}-${y}`]&&((v=this.utils)!=null&&v.hasLoadedNamespace)&&!((w=this.utils)!=null&&w.hasLoadedNamespace(o))&&(ye[`${m[0]}-${y}`]=!0,this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(T=>{var Z;if(this.isValidLookup(s))return;a=T;const O=[f];if((Z=this.i18nFormat)!=null&&Z.addLookupKeys)this.i18nFormat.addLookupKeys(O,f,T,y,t);else{let k;p&&(k=this.pluralResolver.getSuffix(T,t.count,t));const A=`${this.options.pluralSeparator}zero`,L=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&k.indexOf(L)===0&&O.push(f+k.replace(L,this.options.pluralSeparator)),O.push(f+k),d&&O.push(f+A)),h){const b=`${f}${this.options.contextSeparator||"_"}${t.context}`;O.push(b),p&&(t.ordinal&&k.indexOf(L)===0&&O.push(b+k.replace(L,this.options.pluralSeparator)),O.push(b+k),d&&O.push(b+A))}}let E;for(;E=O.pop();)this.isValidLookup(s)||(n=E,s=this.getResource(T,y,E,t))}))})}),{res:s,usedKey:i,exactUsedKey:n,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s,i={}){var n;return(n=this.i18nFormat)!=null&&n.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!g(e.replace);let i=s?e.replace:e;if(s&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!s){i={...i};for(const n of t)delete i[n]}return i}static hasDefaultValue(e){const t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&e[s]!==void 0)return!0;return!1}}class Se{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$.create("languageUtils")}getScriptPartFromCode(e){if(e=J(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=J(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(g(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(s=>{if(t)return;const i=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const i=this.getScriptPartFromCode(s);if(this.isSupportedCode(i))return t=i;const n=this.getLanguagePartFromCode(s);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(a=>{if(a===n)return a;if(!(a.indexOf("-")<0&&n.indexOf("-")<0)&&(a.indexOf("-")>0&&n.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===n||a.indexOf(n)===0&&n.length>1))return a})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),g(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),i=[],n=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return g(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&n(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&n(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&n(this.getLanguagePartFromCode(e))):g(e)&&n(this.formatLanguageCode(e)),s.forEach(a=>{i.indexOf(a)<0&&n(this.formatLanguageCode(a))}),i}}const be={zero:0,one:1,two:2,few:3,many:4,other:5},Oe={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class et{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=$.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const s=J(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:s,type:i});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let a;try{a=new Intl.PluralRules(s,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Oe;if(!e.match(/-|_/))return Oe;const u=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(u,t)}return this.pluralRulesCache[n]=a,a}needsPlural(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),(s==null?void 0:s.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,s={}){return this.getSuffixes(e,s).map(i=>`${t}${i}`)}getSuffixes(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?s.resolvedOptions().pluralCategories.sort((i,n)=>be[i]-be[n]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,t,s={}){const i=this.getRule(e,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}}const Le=(r,e,t,s=".",i=!0)=>{let n=Je(r,e,t);return!n&&i&&g(t)&&(n=ae(r,t,s),n===void 0&&(n=ae(e,t,s))),n},ne=r=>r.replace(/\$/g,"$$$$");class Ce{constructor(e={}){var t;this.logger=$.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(s=>s),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:i,prefix:n,prefixEscaped:a,suffix:o,suffixEscaped:u,formatSeparator:l,unescapeSuffix:f,unescapePrefix:c,nestingPrefix:p,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:v,alwaysFormat:w}=e.interpolation;this.escape=t!==void 0?t:Ze,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=n?V(n):a||"{{",this.suffix=o?V(o):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=p?V(p):d||V("$t("),this.nestingSuffix=h?V(h):m||V(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=v||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,s)=>(t==null?void 0:t.source)===s?(t.lastIndex=0,t):new RegExp(s,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,s,i){var d;let n,a,o;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=h=>{if(h.indexOf(this.formatSeparator)<0){const w=Le(t,u,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,s,{...i,...t,interpolationkey:h}):w}const m=h.split(this.formatSeparator),y=m.shift().trim(),v=m.join(this.formatSeparator).trim();return this.format(Le(t,u,y,this.options.keySeparator,this.options.ignoreJSONStructure),v,s,{...i,...t,interpolationkey:y})};this.resetRegExp();const f=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,c=((d=i==null?void 0:i.interpolation)==null?void 0:d.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>ne(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?ne(this.escape(h)):ne(h)}].forEach(h=>{for(o=0;n=h.regex.exec(e);){const m=n[1].trim();if(a=l(m),a===void 0)if(typeof f=="function"){const v=f(e,n,i);a=g(v)?v:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))a="";else if(c){a=n[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),a="";else!g(a)&&!this.useRawValueToEscape&&(a=de(a));const y=h.safeValue(a);if(e=e.replace(n[0],y),c?(h.regex.lastIndex+=a.length,h.regex.lastIndex-=n[0].length):h.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,s={}){let i,n,a;const o=(u,l)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const c=u.split(new RegExp(`${V(f)}[ ]*{`));let p=`{${c[1]}`;u=c[0],p=this.interpolate(p,a);const d=p.match(/'/g),h=p.match(/"/g);(((d==null?void 0:d.length)??0)%2===0&&!h||((h==null?void 0:h.length)??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{a=JSON.parse(p),l&&(a={...l,...a})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,m),`${u}${f}${p}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;i=this.nestingRegexp.exec(e);){let u=[];a={...s},a=a.replace&&!g(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const l=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(l!==-1&&(u=i[1].slice(l).split(this.formatSeparator).map(f=>f.trim()).filter(Boolean),i[1]=i[1].slice(0,l)),n=t(o.call(this,i[1].trim(),a),a),n&&i[0]===e&&!g(n))return n;g(n)||(n=de(n)),n||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),n=""),u.length&&(n=u.reduce((f,c)=>this.format(f,c,s.lng,{...s,interpolationkey:i[1].trim()}),n.trim())),e=e.replace(i[0],n),this.regexp.lastIndex=0}return e}}const tt=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const s=r.split("(");e=s[0].toLowerCase().trim();const i=s[1].substring(0,s[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(a=>{if(a){const[o,...u]=a.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();t[f]||(t[f]=l),l==="false"&&(t[f]=!1),l==="true"&&(t[f]=!0),isNaN(l)||(t[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:t}},we=r=>{const e={};return(t,s,i)=>{let n=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(n={...n,[i.interpolationkey]:void 0});const a=s+JSON.stringify(n);let o=e[a];return o||(o=r(J(s),i),e[a]=o),o(t)}},st=r=>(e,t,s)=>r(J(t),s)(e);class it{constructor(e={}){this.logger=$.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const s=t.cacheInBuiltFormats?we:st;this.formats={number:s((i,n)=>{const a=new Intl.NumberFormat(i,{...n});return o=>a.format(o)}),currency:s((i,n)=>{const a=new Intl.NumberFormat(i,{...n,style:"currency"});return o=>a.format(o)}),datetime:s((i,n)=>{const a=new Intl.DateTimeFormat(i,{...n});return o=>a.format(o)}),relativetime:s((i,n)=>{const a=new Intl.RelativeTimeFormat(i,{...n});return o=>a.format(o,n.range||"day")}),list:s((i,n)=>{const a=new Intl.ListFormat(i,{...n});return o=>a.format(o)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=we(t)}format(e,t,s,i={}){const n=t.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find(o=>o.indexOf(")")>-1)){const o=n.findIndex(u=>u.indexOf(")")>-1);n[0]=[n[0],...n.splice(1,o)].join(this.formatSeparator)}return n.reduce((o,u)=>{var c;const{formatName:l,formatOptions:f}=tt(u);if(this.formats[l]){let p=o;try{const d=((c=i==null?void 0:i.formatParams)==null?void 0:c[i.interpolationkey])||{},h=d.locale||d.lng||i.locale||i.lng||s;p=this.formats[l](o,h,{...f,...i,...d})}catch(d){this.logger.warn(d)}return p}else this.logger.warn(`there was no format function for ${l}`);return o},e)}}const nt=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class rt extends te{constructor(e,t,s,i={}){var n,a;super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=$.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(a=(n=this.backend)==null?void 0:n.init)==null||a.call(n,s,i.backend,i)}queueLoad(e,t,s,i){const n={},a={},o={},u={};return e.forEach(l=>{let f=!0;t.forEach(c=>{const p=`${l}|${c}`;!s.reload&&this.store.hasResourceBundle(l,c)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?a[p]===void 0&&(a[p]=!0):(this.state[p]=1,f=!1,a[p]===void 0&&(a[p]=!0),n[p]===void 0&&(n[p]=!0),u[c]===void 0&&(u[c]=!0)))}),f||(o[l]=!0)}),(Object.keys(n).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(n),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(u)}}loaded(e,t,s){const i=e.split("|"),n=i[0],a=i[1];t&&this.emit("failedLoading",n,a,t),!t&&s&&this.store.addResourceBundle(n,a,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const o={};this.queue.forEach(u=>{Be(u.loaded,[n],a),nt(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{o[l]||(o[l]={});const f=u.loaded[l];f.length&&f.forEach(c=>{o[l][c]===void 0&&(o[l][c]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(u=>!u.done)}read(e,t,s,i=0,n=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:n,callback:a});return}this.readingCalls++;const o=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(l&&f&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,s,i+1,n*2,a)},n);return}a(l,f)},u=this.backend[s].bind(this.backend);if(u.length===2){try{const l=u(e,t);l&&typeof l.then=="function"?l.then(f=>o(null,f)).catch(o):o(null,l)}catch(l){o(l)}return}return u(e,t,o)}prepareLoading(e,t,s={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();g(e)&&(e=this.languageUtils.toResolveHierarchy(e)),g(t)&&(t=[t]);const n=this.queueLoad(e,t,s,i);if(!n.toLoad.length)return n.pending.length||i(),null;n.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){const s=e.split("|"),i=s[0],n=s[1];this.read(i,n,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${n} for language ${i} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${n} for language ${i}`,o),this.loaded(e,a,o)})}saveMissing(e,t,s,i,n,a={},o=()=>{}){var u,l,f,c,p;if((l=(u=this.services)==null?void 0:u.utils)!=null&&l.hasLoadedNamespace&&!((c=(f=this.services)==null?void 0:f.utils)!=null&&c.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if((p=this.backend)!=null&&p.create){const d={...a,isUpdate:n},h=this.backend.create.bind(this.backend);if(h.length<6)try{let m;h.length===5?m=h(e,t,s,i,d):m=h(e,t,s,i),m&&typeof m.then=="function"?m.then(y=>o(null,y)).catch(o):o(null,m)}catch(m){o(m)}else h(e,t,s,i,o,d)}!e||!e[0]||this.store.addResource(e[0],t,s,i)}}}const re=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),g(r[1])&&(e.defaultValue=r[1]),g(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(s=>{e[s]=t[s]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ve=r=>{var e,t;return g(r.ns)&&(r.ns=[r.ns]),g(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),g(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},q=()=>{},at=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};let Re=!1;const ot=r=>{var e,t,s,i,n,a,o,u,l;return!!(((s=(t=(e=r==null?void 0:r.modules)==null?void 0:e.backend)==null?void 0:t.name)==null?void 0:s.indexOf("Locize"))>0||((o=(a=(n=(i=r==null?void 0:r.modules)==null?void 0:i.backend)==null?void 0:n.constructor)==null?void 0:a.name)==null?void 0:o.indexOf("Locize"))>0||(l=(u=r==null?void 0:r.options)==null?void 0:u.backend)!=null&&l.backends&&r.options.backend.backends.some(f=>{var c,p,d;return((c=f==null?void 0:f.name)==null?void 0:c.indexOf("Locize"))>0||((d=(p=f==null?void 0:f.constructor)==null?void 0:p.name)==null?void 0:d.indexOf("Locize"))>0}))};class U extends te{constructor(e={},t){if(super(),this.options=ve(e),this.services={},this.logger=$,this.modules={external:[]},at(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(g(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const s=re();this.options={...s,...this.options,...ve(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!ot(this)&&!Re&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),Re=!0);const i=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?$.init(i(this.modules.logger),this.options):$.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=it;const f=new Se(this.options);this.store=new xe(this.options.resources,this.options);const c=this.services;c.logger=$,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new et(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),l&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(c.formatter=i(l),c.formatter.init&&c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Ce(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new rt(i(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.languageDetector&&(c.languageDetector=i(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=i(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new ee(this.services,this.options),this.translator.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=q),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=(...f)=>this.store[l](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...f)=>(this.store[l](...f),this)});const o=K(),u=()=>{const l=(f,c)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(c),t(f,c)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),o}loadResources(e,t=q){var n,a;let s=t;const i=g(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const o=[],u=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};i?u(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>u(f)),(a=(n=this.options.preload)==null?void 0:n.forEach)==null||a.call(n,l=>u(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(l)})}else s(null)}reloadResources(e,t,s){const i=K();return typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=q),this.services.backendConnector.reload(e,t,n=>{i.resolve(),s(n)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Ee.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const s=this.languages[t];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const s=K();this.emit("languageChanging",e);const i=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},n=(o,u)=>{u?this.isLanguageChangingTo===e&&(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve((...l)=>this.t(...l)),t&&t(o,(...l)=>this.t(...l))},a=o=>{var f,c;!e&&!o&&this.services.languageDetector&&(o=[]);const u=g(o)?o:o&&o[0],l=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(g(o)?[o]:o);l&&(this.language||i(l),this.translator.language||this.translator.changeLanguage(l),(c=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||c.call(f,l)),this.loadResources(l,p=>{n(p,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),s}getFixedT(e,t,s){const i=(n,a,...o)=>{let u;typeof a!="object"?u=this.options.overloadTranslationOptionHandler([n,a].concat(o)):u={...a},u.lng=u.lng||i.lng,u.lngs=u.lngs||i.lngs,u.ns=u.ns||i.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||s||i.keyPrefix);const l=this.options.keySeparator||".";let f;return u.keyPrefix&&Array.isArray(n)?f=n.map(c=>(typeof c=="function"&&(c=oe(c,{...this.options,...a})),`${u.keyPrefix}${l}${c}`)):(typeof n=="function"&&(n=oe(n,{...this.options,...a})),f=u.keyPrefix?`${u.keyPrefix}${l}${n}`:n),this.t(f,u)};return g(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=s,i}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,n=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const a=(o,u)=>{const l=this.services.backendConnector.state[`${o}|${u}`];return l===-1||l===0||l===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(s,e)&&(!i||a(n,e)))}loadNamespaces(e,t){const s=K();return this.options.ns?(g(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{s.resolve(),t&&t(i)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=K();g(e)&&(e=[e]);const i=this.options.preload||[],n=e.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return n.length?(this.options.preload=i.concat(n),this.loadResources(a=>{s.resolve(),t&&t(a)}),s):(t&&t(),Promise.resolve())}dir(e){var i,n;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const a=new Intl.Locale(e);if(a&&a.getTextInfo){const o=a.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],s=((n=this.services)==null?void 0:n.languageUtils)||new Se(re());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const s=new U(e,t);return s.createInstance=U.createInstance,s}cloneInstance(e={},t=q){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},n=new U(i);if((e.debug!==void 0||e.prefix!==void 0)&&(n.logger=n.logger.clone(e)),["store","services","language"].forEach(o=>{n[o]=this[o]}),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},s){const o=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},u[l]=Object.keys(u[l]).reduce((f,c)=>(f[c]={...u[l][c]},f),u[l]),u),{});n.store=new xe(o,i),n.services.resourceStore=n.store}if(e.interpolation){const u={...re().interpolation,...this.options.interpolation,...e.interpolation},l={...i,interpolation:u};n.services.interpolator=new Ce(l)}return n.translator=new ee(n.services,i),n.translator.on("*",(o,...u)=>{n.emit(o,...u)}),n.init(i,t),n.translator.options=i,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const S=U.createInstance();S.createInstance;S.dir;S.init;S.loadResources;S.reloadResources;S.use;S.changeLanguage;S.getFixedT;S.t;S.exists;S.setDefaultNamespace;S.hasLoadedNamespace;S.loadNamespaces;S.loadLanguages;const lt={type:"3rdParty",init(r){G.setDefaults(r.options.react),G.setI18n(r)}};function ut({i18n:r,defaultNS:e,children:t}){const s=Y.useMemo(()=>({i18n:r,defaultNS:e}),[r,e]);return Y.createElement(G.I18nContext.Provider,{value:s},t)}const ct=({className:r,...e})=>x.jsxRuntimeExports.jsx("div",{className:D.cn("[&_svg]:w-40",r),...e}),ft=r=>B.createElement("svg",{height:"1em",width:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...r},B.createElement("path",{d:"M1.86879 5.11875C2.52504 3.25 4.28754 2 6.26879 2H25.7813C27.7625 2 29.525 3.25 30.1813 5.11875L31.3313 8.40625C32.0188 10.375 31.3938 12.4 30.025 13.6812V25.5063C30.025 27.9937 28.0125 30.0063 25.525 30.0063H6.52504C4.03754 30.0063 2.02504 27.9937 2.02504 25.5063V13.6812C0.656291 12.4 0.0312907 10.375 0.718791 8.40625L1.86879 5.11875ZM5.02504 14.9875V20H27.025V14.9875C26.9 14.9938 26.7813 15 26.6563 15C25.2938 15 24.0438 14.4437 23.1438 13.5437C22.2313 14.4437 20.9813 15 19.5875 15C18.2 15 16.9375 14.4375 16.025 13.5312C15.1125 14.4375 13.85 15 12.4625 15C11.0688 15 9.81879 14.4437 8.90629 13.5437C8.00629 14.45 6.76254 15 5.39379 15C5.26879 15 5.14379 14.9938 5.01879 14.9875H5.02504ZM10.8813 5L10.4063 9.73125C10.2875 10.9437 11.2375 12 12.4563 12C13.5938 12 14.5188 11.075 14.5188 9.9375V5H10.875H10.8813ZM17.525 9.9375C17.525 11.075 18.45 12 19.5875 12C20.8063 12 21.7625 10.9437 21.6375 9.73125L21.1625 5H17.5188V9.9375H17.525ZM24.7063 10.2375C24.8063 11.2375 25.65 12 26.65 12C28 12 28.9438 10.6687 28.4938 9.4L27.35 6.1125C27.1188 5.44375 26.4875 5 25.7813 5H24.1813L24.7063 10.2375ZM5.40004 12C6.40629 12 7.24379 11.2375 7.34379 10.2375L7.86879 5H6.26879C5.56254 5 4.93754 5.44375 4.70004 6.1125L3.55004 9.4C3.10629 10.675 4.05004 12 5.39379 12H5.40004ZM5.02504 25.5C5.02504 26.3312 5.69379 27 6.52504 27H25.525C26.3563 27 27.025 26.3312 27.025 25.5V23H5.02504V25.5Z"})),ht=r=>B.createElement("svg",{height:"1em",width:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...r},B.createElement("path",{d:"M14.7688 8.45C15.5563 7.80625 16.7125 7.85625 17.4438 8.5875L25.4438 16.5875C26.0188 17.1625 26.1875 18.0188 25.875 18.7688C25.5625 19.5188 24.8375 20 24.0313 20H8.03127C7.22502 20 6.49377 19.5125 6.18127 18.7625C5.86877 18.0125 6.04377 17.1563 6.61877 16.5875L14.6188 8.5875L14.7688 8.45Z"})),{Text:je}=j.Typography,dt=({className:r,children:e})=>{const{t}=G.useTranslation();return!e||e.trim()===""?null:x.jsxRuntimeExports.jsxs(j.Flex,{className:r,align:"center",gap:2,children:[x.jsxRuntimeExports.jsxs(j.Flex,{align:"center",gap:1,children:[x.jsxRuntimeExports.jsx(ft,{className:"text-primary-blue size-6"}),x.jsxRuntimeExports.jsx(je,{className:"text-primary-blue",size:"sm",weight:"semibold",children:t("layout.header.store")})]}),x.jsxRuntimeExports.jsx(je,{className:"text-grays-macropay-05",size:"sm",weight:"semibold",children:e})]})},{Text:Ne}=j.Typography,pt=({name:r,role:e,imageUrl:t,items:s=[]})=>{const{md:i}=Ve.useBreakpoint();if(!r||r.trim()==="")return null;const n=x.jsxRuntimeExports.jsxs(j.Flex,{gap:1,direction:"vertical",children:[x.jsxRuntimeExports.jsx(Ne,{className:"text-primary-blue",size:"sm",weight:"semibold",children:r}),x.jsxRuntimeExports.jsx(Ne,{className:"text-grays-macropay-05",size:"sm",weight:"semibold",children:e})]});return x.jsxRuntimeExports.jsxs(j.Flex,{align:"center",gap:2,children:[x.jsxRuntimeExports.jsx(j.Avatar,{src:t,alt:r,size:"sm"}),i&&n,x.jsxRuntimeExports.jsx(j.Dropdown,{classNames:{trigger:"size-6.5 p-0",content:"z-10 shadow-sm"},trigger:x.jsxRuntimeExports.jsx(ht,{className:"rotate-180"}),items:i?s:[{label:n,id:"user-name",type:"label"},{id:"separator-1",type:"separator"},...s]})]})},Fe=({className:r,children:e})=>{if(Array.isArray(e)&&e.length===0)return null;const t=s=>s===e.length-1;return x.jsxRuntimeExports.jsx(j.Flex,{align:"center",gap:4,className:D.cn(r),children:e.map((s,i)=>x.jsxRuntimeExports.jsxs(Y.Fragment,{children:[s,t(i)?null:x.jsxRuntimeExports.jsx(Ke,{"data-slot":"separator",orientation:"vertical",decorative:!0,className:D.cn("shrink-0 bg-grays-macropay-05 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch")})]},i))})};Fe.disPlayName="Layout.Header.RightSide";const _=({className:r,...e})=>x.jsxRuntimeExports.jsx("header",{className:D.cn("sticky top-0 flex h-17 shrink-0 items-center justify-between gap-2 border-b border-gray-200 bg-white px-4 shadow-lg z-1",r),...e});_.LeftSide=ct;_.Store=dt;_.User=pt;_.RightSide=Fe;const gt=({className:r,children:e,...t})=>x.jsxRuntimeExports.jsx("div",{className:D.cn("flex w-full flex-1 flex-col px-4 pt-5 [&>div]:flex [&>div]:items-start [&>div]:justify-center [&>div>div]:w-full [&>div>div]:max-w-243",r),...t,children:x.jsxRuntimeExports.jsx("div",{className:"flex-1 rounded-lg bg-white p-4",children:e})}),mt=({className:r,...e})=>x.jsxRuntimeExports.jsx("footer",{className:D.cn("bottom-0 w-full px-6 py-4 text-center text-xs text-grays-macropay-05",r),...e}),xt={login:{btnLabel:"Iniciar sesión"}},yt={translation:{layout:{...xt,header:{store:"Centro"}},header:{signOut:"Cerrar Sesión",store:"Tienda",cashRegister:"Caja",roleName:"Vendedor",sessionExp:"Tu sesión está por expirar",continueSessionPrefix:"La sesión se cerrará automáticamente en",continueSessionSuffix:"segundos, confirma para continuar con la sesión"},common:{yes:"Si",accept:"Aceptar",no:"No",cancel:"Cancelar",send:"Enviar",save:"Guardar",name:"Nombre",names:"Nombre(s)",lastName:"Apellido paterno",secondName:"Apellido materno",street:"Calle",extNumber:"Número exterior",colony:"Colonia",CP:"Código postal",upload:"Cargar archivo",goBack:"Regresar",goForward:"Continuar",goToLoginButton:"Ir a login",search:"Buscar",htmlTitle:"Macropay HelpDesk",themedark:"Modo Oscuro",goToMenu:"Ir a menú",closeMenu:"Cerrar",step:"Paso {{value}}",changeCenter:"Cambiar centro",closeSession:"Cerrar sesión",yesForward:"Si, continuar",blackList:{title:"Verifica para continuar",message:"¿Estás seguro que deseas continuar?"},messageChangeCenter:"Regresarás al menú principal para cambiar el centro. ¿Estás seguro que deseas realizar esta acción? Perderás el flujo actual.",messageCloseSession:"¿Estás seguro que deseas cerrar la sesión de tu cuenta?"}}};S.use(lt).init({resources:{es:yt},lng:"es",interpolation:{escapeValue:!1}});const se=({children:r,loading:e,...t})=>x.jsxRuntimeExports.jsx(ut,{i18n:S,children:x.jsxRuntimeExports.jsxs("main",{"data-slot":"sidebar-inset",className:"relative flex min-h-svh w-full flex-1 flex-col bg-grays-macropay-02",...t,children:[r,e&&x.jsxRuntimeExports.jsx(j.Root$3,{className:"position bg-opacity-50 absolute top-0 left-0 z-50 flex h-full w-full items-center justify-center"})]})});se.Header=_;se.Content=gt;se.Footer=mt;exports.RootLayout=se;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./proxy-2cglvzJh.cjs"),D=require("./classNames-CN12fVA7.cjs"),Y=require("react"),j=require("./toggle-group.component-DoOPPzV2.cjs"),G=require("./useTranslation-2Dz5dMlm.cjs"),Ve=require("./index-DGDeDoym.cjs");function De(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const B=De(Y);var Ae="Separator",he="horizontal",He=["horizontal","vertical"],Pe=B.forwardRef((r,e)=>{const{decorative:t,orientation:i=he,...s}=r,n=Me(i)?i:he,o=t?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return x.jsxRuntimeExports.jsx(j.Primitive.div,{"data-orientation":n,...o,...s,ref:e})});Pe.displayName=Ae;function Me(r){return He.includes(r)}var Ke=Pe;const g=r=>typeof r=="string",K=()=>{let r,e;const t=new Promise((i,s)=>{r=i,e=s});return t.resolve=r,t.reject=e,t},de=r=>r==null?"":""+r,ze=(r,e,t)=>{r.forEach(i=>{e[i]&&(t[i]=e[i])})},Ue=/###/g,pe=r=>r&&r.indexOf("###")>-1?r.replace(Ue,"."):r,ge=r=>!r||g(r),z=(r,e,t)=>{const i=g(e)?e.split("."):e;let s=0;for(;s<i.length-1;){if(ge(r))return{};const n=pe(i[s]);!r[n]&&t&&(r[n]=new t),Object.prototype.hasOwnProperty.call(r,n)?r=r[n]:r={},++s}return ge(r)?{}:{obj:r,k:pe(i[s])}},me=(r,e,t)=>{const{obj:i,k:s}=z(r,e,Object);if(i!==void 0||e.length===1){i[s]=t;return}let n=e[e.length-1],a=e.slice(0,e.length-1),o=z(r,a,Object);for(;o.obj===void 0&&a.length;)n=`${a[a.length-1]}.${n}`,a=a.slice(0,a.length-1),o=z(r,a,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${n}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${n}`]=t},Be=(r,e,t,i)=>{const{obj:s,k:n}=z(r,e,Object);s[n]=s[n]||[],s[n].push(t)},Q=(r,e)=>{const{obj:t,k:i}=z(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,i))return t[i]},Je=(r,e,t)=>{const i=Q(r,t);return i!==void 0?i:Q(e,t)},$e=(r,e,t)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in r?g(r[i])||r[i]instanceof String||g(e[i])||e[i]instanceof String?t&&(r[i]=e[i]):$e(r[i],e[i],t):r[i]=e[i]);return r},V=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var _e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Ze=r=>g(r)?r.replace(/[&<>"'\/]/g,e=>_e[e]):r;class We{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const qe=[" ",",","?","!",";"],Ye=new We(20),Ge=(r,e,t)=>{e=e||"",t=t||"";const i=qe.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(i.length===0)return!0;const s=Ye.getRegExp(`(${i.map(a=>a==="?"?"\\?":a).join("|")})`);let n=!s.test(r);if(!n){const a=r.indexOf(t);a>0&&!s.test(r.substring(0,a))&&(n=!0)}return n},ae=(r,e,t=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const i=e.split(t);let s=r;for(let n=0;n<i.length;){if(!s||typeof s!="object")return;let a,o="";for(let u=n;u<i.length;++u)if(u!==n&&(o+=t),o+=i[u],a=s[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&u<i.length-1)continue;n+=u-n+1;break}s=a}return s},J=r=>r==null?void 0:r.replace("_","-"),Qe={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,i;(i=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||i.call(t,console,e)}};class X{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||Qe,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,i,s){return s&&!this.debug?null:(g(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new X(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new X(this.logger,e)}}var $=new X;class te{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(t)||0;this.observers[i].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,n])=>{for(let a=0;a<n;a++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,n])=>{for(let a=0;a<n;a++)s.apply(s,[e,...t])})}}class xe extends te{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,i,s={}){var l,f;const n=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],i&&(Array.isArray(i)?o.push(...i):g(i)&&n?o.push(...i.split(n)):o.push(i)));const u=Q(this.data,o);return!u&&!t&&!i&&e.indexOf(".")>-1&&(e=o[0],t=o[1],i=o.slice(2).join(".")),u||!a||!g(i)?u:ae((f=(l=this.data)==null?void 0:l[e])==null?void 0:f[t],i,n)}addResource(e,t,i,s,n={silent:!1}){const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=[e,t];i&&(o=o.concat(a?i.split(a):i)),e.indexOf(".")>-1&&(o=e.split("."),s=t,t=o[1]),this.addNamespaces(t),me(this.data,o,s),n.silent||this.emit("added",e,t,i,s)}addResources(e,t,i,s={silent:!1}){for(const n in i)(g(i[n])||Array.isArray(i[n]))&&this.addResource(e,t,n,i[n],{silent:!0});s.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,s,n,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),s=i,i=t,t=o[1]),this.addNamespaces(t);let u=Q(this.data,o)||{};a.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?$e(u,i,n):u={...u,...i},me(this.data,o,u),a.silent||this.emit("added",e,t,i)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var Ee={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,i,s){return r.forEach(n=>{var a;e=((a=this.processors[n])==null?void 0:a.process(e,t,i,s))??e}),e}};const ke=Symbol("i18next/PATH_KEY");function Xe(){const r=[],e=Object.create(null);let t;return e.get=(i,s)=>{var n;return(n=t==null?void 0:t.revoke)==null||n.call(t),s===ke?r:(r.push(s),t=Proxy.revocable(i,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function oe(r,e){const{[ke]:t}=r(Xe());return t.join((e==null?void 0:e.keySeparator)??".")}const ye={},ie=r=>!g(r)&&typeof r!="boolean"&&typeof r!="number";class ee extends te{constructor(e,t={}){super(),ze(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=$.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const i={...t};if(e==null)return!1;const s=this.resolve(e,i);if((s==null?void 0:s.res)===void 0)return!1;const n=ie(s.res);return!(i.returnObjects===!1&&n)}extractFromKey(e,t){let i=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let n=t.ns||this.options.defaultNS||[];const a=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ge(e,i,s);if(a&&!o){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:g(n)?[n]:n};const l=e.split(i);(i!==s||i===s&&this.options.ns.indexOf(l[0])>-1)&&(n=l.shift()),e=l.join(s)}return{key:e,namespaces:g(n)?[n]:n}}translate(e,t,i){let s=typeof t=="object"?{...t}:t;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),e==null)return"";typeof e=="function"&&(e=oe(e,{...this.options,...s})),Array.isArray(e)||(e=[String(e)]);const n=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:o,namespaces:u}=this.extractFromKey(e[e.length-1],s),l=u[u.length-1];let f=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const c=s.lng||this.language,p=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode")return p?n?{res:`${l}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:`${l}${f}${o}`:n?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(s)}:o;const d=this.resolve(e,s);let h=d==null?void 0:d.res;const m=(d==null?void 0:d.usedKey)||o,y=(d==null?void 0:d.exactUsedKey)||o,v=["[object Number]","[object Function]","[object RegExp]"],w=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,O=s.count!==void 0&&!g(s.count),E=ee.hasDefaultValue(s),Z=O?this.pluralResolver.getSuffix(c,s.count,s):"",k=s.ordinal&&O?this.pluralResolver.getSuffix(c,s.count,{ordinal:!1}):"",A=O&&!s.ordinal&&s.count===0,L=A&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${Z}`]||s[`defaultValue${k}`]||s.defaultValue;let b=h;T&&!h&&E&&(b=L);const Te=ie(b),Ie=Object.prototype.toString.apply(b);if(T&&b&&Te&&v.indexOf(Ie)<0&&!(g(w)&&Array.isArray(b))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const N=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,b,{...s,ns:u}):`key '${o} (${this.language})' returned an object instead of string.`;return n?(d.res=N,d.usedParams=this.getUsedParamsDetails(s),d):N}if(a){const N=Array.isArray(b),R=N?[]:{},le=N?y:m;for(const P in b)if(Object.prototype.hasOwnProperty.call(b,P)){const F=`${le}${a}${P}`;E&&!h?R[P]=this.translate(F,{...s,defaultValue:ie(L)?L[P]:void 0,joinArrays:!1,ns:u}):R[P]=this.translate(F,{...s,joinArrays:!1,ns:u}),R[P]===F&&(R[P]=b[P])}h=R}}else if(T&&g(w)&&Array.isArray(h))h=h.join(w),h&&(h=this.extendTranslation(h,e,s,i));else{let N=!1,R=!1;!this.isValidLookup(h)&&E&&(N=!0,h=L),this.isValidLookup(h)||(R=!0,h=o);const P=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:h,F=E&&L!==h&&this.options.updateMissing;if(R||N||F){if(this.logger.log(F?"updateKey":"missingKey",c,l,o,F?L:h),a){const C=this.resolve(o,{...s,keySeparator:!1});C&&C.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let H=[];const W=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&W&&W[0])for(let C=0;C<W.length;C++)H.push(W[C]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(s.lng||this.language):H.push(s.lng||this.language);const ue=(C,I,M)=>{var fe;const ce=E&&M!==h?M:P;this.options.missingKeyHandler?this.options.missingKeyHandler(C,l,I,ce,F,s):(fe=this.backendConnector)!=null&&fe.saveMissing&&this.backendConnector.saveMissing(C,l,I,ce,F,s),this.emit("missingKey",C,l,I,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?H.forEach(C=>{const I=this.pluralResolver.getSuffixes(C,s);A&&s[`defaultValue${this.options.pluralSeparator}zero`]&&I.indexOf(`${this.options.pluralSeparator}zero`)<0&&I.push(`${this.options.pluralSeparator}zero`),I.forEach(M=>{ue([C],o+M,s[`defaultValue${M}`]||L)})}):ue(H,o,L))}h=this.extendTranslation(h,e,s,d,i),R&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${l}${f}${o}`),(R||N)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${f}${o}`:o,N?h:void 0,s))}return n?(d.res=h,d.usedParams=this.getUsedParamsDetails(s),d):h}extendTranslation(e,t,i,s,n){var u,l;if((u=this.i18nFormat)!=null&&u.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const f=g(e)&&(((l=i==null?void 0:i.interpolation)==null?void 0:l.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(f){const d=e.match(this.interpolator.nestingRegexp);c=d&&d.length}let p=i.replace&&!g(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,i.lng||this.language||s.usedLng,i),f){const d=e.match(this.interpolator.nestingRegexp),h=d&&d.length;c<h&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,(...d)=>(n==null?void 0:n[0])===d[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`),null):this.translate(...d,t),i)),i.interpolation&&this.interpolator.reset()}const a=i.postProcess||this.options.postProcess,o=g(a)?[a]:a;return e!=null&&(o!=null&&o.length)&&i.applyPostProcessor!==!1&&(e=Ee.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,t={}){let i,s,n,a,o;return g(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(i))return;const l=this.extractFromKey(u,t),f=l.key;s=f;let c=l.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const p=t.count!==void 0&&!g(t.count),d=p&&!t.ordinal&&t.count===0,h=t.context!==void 0&&(g(t.context)||typeof t.context=="number")&&t.context!=="",m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);c.forEach(y=>{var v,w;this.isValidLookup(i)||(o=y,!ye[`${m[0]}-${y}`]&&((v=this.utils)!=null&&v.hasLoadedNamespace)&&!((w=this.utils)!=null&&w.hasLoadedNamespace(o))&&(ye[`${m[0]}-${y}`]=!0,this.logger.warn(`key "${s}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(T=>{var Z;if(this.isValidLookup(i))return;a=T;const O=[f];if((Z=this.i18nFormat)!=null&&Z.addLookupKeys)this.i18nFormat.addLookupKeys(O,f,T,y,t);else{let k;p&&(k=this.pluralResolver.getSuffix(T,t.count,t));const A=`${this.options.pluralSeparator}zero`,L=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&k.indexOf(L)===0&&O.push(f+k.replace(L,this.options.pluralSeparator)),O.push(f+k),d&&O.push(f+A)),h){const b=`${f}${this.options.contextSeparator||"_"}${t.context}`;O.push(b),p&&(t.ordinal&&k.indexOf(L)===0&&O.push(b+k.replace(L,this.options.pluralSeparator)),O.push(b+k),d&&O.push(b+A))}}let E;for(;E=O.pop();)this.isValidLookup(i)||(n=E,i=this.getResource(T,y,E,t))}))})}),{res:i,usedKey:s,exactUsedKey:n,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,i,s={}){var n;return(n=this.i18nFormat)!=null&&n.getResource?this.i18nFormat.getResource(e,t,i,s):this.resourceStore.getResource(e,t,i,s)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!g(e.replace);let s=i?e.replace:e;if(i&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const n of t)delete s[n]}return s}static hasDefaultValue(e){const t="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t===i.substring(0,t.length)&&e[i]!==void 0)return!0;return!1}}class Se{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$.create("languageUtils")}getScriptPartFromCode(e){if(e=J(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=J(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(g(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(i=>{if(t)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(i=>{if(t)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return t=s;const n=this.getLanguagePartFromCode(i);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(a=>{if(a===n)return a;if(!(a.indexOf("-")<0&&n.indexOf("-")<0)&&(a.indexOf("-")>0&&n.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===n||a.indexOf(n)===0&&n.length>1))return a})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),g(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){const i=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),s=[],n=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return g(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&n(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&n(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&n(this.getLanguagePartFromCode(e))):g(e)&&n(this.formatLanguageCode(e)),i.forEach(a=>{s.indexOf(a)<0&&n(this.formatLanguageCode(a))}),s}}const be={zero:0,one:1,two:2,few:3,many:4,other:5},Oe={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class et{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=$.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const i=J(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",n=JSON.stringify({cleanedCode:i,type:s});if(n in this.pluralRulesCache)return this.pluralRulesCache[n];let a;try{a=new Intl.PluralRules(i,{type:s})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Oe;if(!e.match(/-|_/))return Oe;const u=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(u,t)}return this.pluralRulesCache[n]=a,a}needsPlural(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),(i==null?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,i={}){return this.getSuffixes(e,i).map(s=>`${t}${s}`)}getSuffixes(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?i.resolvedOptions().pluralCategories.sort((s,n)=>be[s]-be[n]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t,i={}){const s=this.getRule(e,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}}const Le=(r,e,t,i=".",s=!0)=>{let n=Je(r,e,t);return!n&&s&&g(t)&&(n=ae(r,t,i),n===void 0&&(n=ae(e,t,i))),n},ne=r=>r.replace(/\$/g,"$$$$");class Ce{constructor(e={}){var t;this.logger=$.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(i=>i),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:i,useRawValueToEscape:s,prefix:n,prefixEscaped:a,suffix:o,suffixEscaped:u,formatSeparator:l,unescapeSuffix:f,unescapePrefix:c,nestingPrefix:p,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:m,nestingOptionsSeparator:y,maxReplaces:v,alwaysFormat:w}=e.interpolation;this.escape=t!==void 0?t:Ze,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=n?V(n):a||"{{",this.suffix=o?V(o):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=p?V(p):d||V("$t("),this.nestingSuffix=h?V(h):m||V(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=v||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,i)=>(t==null?void 0:t.source)===i?(t.lastIndex=0,t):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,i,s){var d;let n,a,o;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=h=>{if(h.indexOf(this.formatSeparator)<0){const w=Le(t,u,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,i,{...s,...t,interpolationkey:h}):w}const m=h.split(this.formatSeparator),y=m.shift().trim(),v=m.join(this.formatSeparator).trim();return this.format(Le(t,u,y,this.options.keySeparator,this.options.ignoreJSONStructure),v,i,{...s,...t,interpolationkey:y})};this.resetRegExp();const f=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,c=((d=s==null?void 0:s.interpolation)==null?void 0:d.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>ne(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?ne(this.escape(h)):ne(h)}].forEach(h=>{for(o=0;n=h.regex.exec(e);){const m=n[1].trim();if(a=l(m),a===void 0)if(typeof f=="function"){const v=f(e,n,s);a=g(v)?v:""}else if(s&&Object.prototype.hasOwnProperty.call(s,m))a="";else if(c){a=n[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),a="";else!g(a)&&!this.useRawValueToEscape&&(a=de(a));const y=h.safeValue(a);if(e=e.replace(n[0],y),c?(h.regex.lastIndex+=a.length,h.regex.lastIndex-=n[0].length):h.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,i={}){let s,n,a;const o=(u,l)=>{const f=this.nestingOptionsSeparator;if(u.indexOf(f)<0)return u;const c=u.split(new RegExp(`${V(f)}[ ]*{`));let p=`{${c[1]}`;u=c[0],p=this.interpolate(p,a);const d=p.match(/'/g),h=p.match(/"/g);(((d==null?void 0:d.length)??0)%2===0&&!h||((h==null?void 0:h.length)??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{a=JSON.parse(p),l&&(a={...l,...a})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,m),`${u}${f}${p}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;s=this.nestingRegexp.exec(e);){let u=[];a={...i},a=a.replace&&!g(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const l=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(l!==-1&&(u=s[1].slice(l).split(this.formatSeparator).map(f=>f.trim()).filter(Boolean),s[1]=s[1].slice(0,l)),n=t(o.call(this,s[1].trim(),a),a),n&&s[0]===e&&!g(n))return n;g(n)||(n=de(n)),n||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),n=""),u.length&&(n=u.reduce((f,c)=>this.format(f,c,i.lng,{...i,interpolationkey:s[1].trim()}),n.trim())),e=e.replace(s[0],n),this.regexp.lastIndex=0}return e}}const tt=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const i=r.split("(");e=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(a=>{if(a){const[o,...u]=a.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();t[f]||(t[f]=l),l==="false"&&(t[f]=!1),l==="true"&&(t[f]=!0),isNaN(l)||(t[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:t}},we=r=>{const e={};return(t,i,s)=>{let n=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(n={...n,[s.interpolationkey]:void 0});const a=i+JSON.stringify(n);let o=e[a];return o||(o=r(J(i),s),e[a]=o),o(t)}},st=r=>(e,t,i)=>r(J(t),i)(e);class it{constructor(e={}){this.logger=$.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const i=t.cacheInBuiltFormats?we:st;this.formats={number:i((s,n)=>{const a=new Intl.NumberFormat(s,{...n});return o=>a.format(o)}),currency:i((s,n)=>{const a=new Intl.NumberFormat(s,{...n,style:"currency"});return o=>a.format(o)}),datetime:i((s,n)=>{const a=new Intl.DateTimeFormat(s,{...n});return o=>a.format(o)}),relativetime:i((s,n)=>{const a=new Intl.RelativeTimeFormat(s,{...n});return o=>a.format(o,n.range||"day")}),list:i((s,n)=>{const a=new Intl.ListFormat(s,{...n});return o=>a.format(o)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=we(t)}format(e,t,i,s={}){const n=t.split(this.formatSeparator);if(n.length>1&&n[0].indexOf("(")>1&&n[0].indexOf(")")<0&&n.find(o=>o.indexOf(")")>-1)){const o=n.findIndex(u=>u.indexOf(")")>-1);n[0]=[n[0],...n.splice(1,o)].join(this.formatSeparator)}return n.reduce((o,u)=>{var c;const{formatName:l,formatOptions:f}=tt(u);if(this.formats[l]){let p=o;try{const d=((c=s==null?void 0:s.formatParams)==null?void 0:c[s.interpolationkey])||{},h=d.locale||d.lng||s.locale||s.lng||i;p=this.formats[l](o,h,{...f,...s,...d})}catch(d){this.logger.warn(d)}return p}else this.logger.warn(`there was no format function for ${l}`);return o},e)}}const nt=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class rt extends te{constructor(e,t,i,s={}){var n,a;super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=$.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(a=(n=this.backend)==null?void 0:n.init)==null||a.call(n,i,s.backend,s)}queueLoad(e,t,i,s){const n={},a={},o={},u={};return e.forEach(l=>{let f=!0;t.forEach(c=>{const p=`${l}|${c}`;!i.reload&&this.store.hasResourceBundle(l,c)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?a[p]===void 0&&(a[p]=!0):(this.state[p]=1,f=!1,a[p]===void 0&&(a[p]=!0),n[p]===void 0&&(n[p]=!0),u[c]===void 0&&(u[c]=!0)))}),f||(o[l]=!0)}),(Object.keys(n).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(n),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(u)}}loaded(e,t,i){const s=e.split("|"),n=s[0],a=s[1];t&&this.emit("failedLoading",n,a,t),!t&&i&&this.store.addResourceBundle(n,a,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);const o={};this.queue.forEach(u=>{Be(u.loaded,[n],a),nt(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{o[l]||(o[l]={});const f=u.loaded[l];f.length&&f.forEach(c=>{o[l][c]===void 0&&(o[l][c]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(u=>!u.done)}read(e,t,i,s=0,n=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:i,tried:s,wait:n,callback:a});return}this.readingCalls++;const o=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(l&&f&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,i,s+1,n*2,a)},n);return}a(l,f)},u=this.backend[i].bind(this.backend);if(u.length===2){try{const l=u(e,t);l&&typeof l.then=="function"?l.then(f=>o(null,f)).catch(o):o(null,l)}catch(l){o(l)}return}return u(e,t,o)}prepareLoading(e,t,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();g(e)&&(e=this.languageUtils.toResolveHierarchy(e)),g(t)&&(t=[t]);const n=this.queueLoad(e,t,i,s);if(!n.toLoad.length)return n.pending.length||s(),null;n.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e,t=""){const i=e.split("|"),s=i[0],n=i[1];this.read(s,n,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${n} for language ${s} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${n} for language ${s}`,o),this.loaded(e,a,o)})}saveMissing(e,t,i,s,n,a={},o=()=>{}){var u,l,f,c,p;if((l=(u=this.services)==null?void 0:u.utils)!=null&&l.hasLoadedNamespace&&!((c=(f=this.services)==null?void 0:f.utils)!=null&&c.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if((p=this.backend)!=null&&p.create){const d={...a,isUpdate:n},h=this.backend.create.bind(this.backend);if(h.length<6)try{let m;h.length===5?m=h(e,t,i,s,d):m=h(e,t,i,s),m&&typeof m.then=="function"?m.then(y=>o(null,y)).catch(o):o(null,m)}catch(m){o(m)}else h(e,t,i,s,o,d)}!e||!e[0]||this.store.addResource(e[0],t,i,s)}}}const re=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),g(r[1])&&(e.defaultValue=r[1]),g(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(i=>{e[i]=t[i]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ve=r=>{var e,t;return g(r.ns)&&(r.ns=[r.ns]),g(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),g(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},q=()=>{},at=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};let Re=!1;const ot=r=>{var e,t,i,s,n,a,o,u,l;return!!(((i=(t=(e=r==null?void 0:r.modules)==null?void 0:e.backend)==null?void 0:t.name)==null?void 0:i.indexOf("Locize"))>0||((o=(a=(n=(s=r==null?void 0:r.modules)==null?void 0:s.backend)==null?void 0:n.constructor)==null?void 0:a.name)==null?void 0:o.indexOf("Locize"))>0||(l=(u=r==null?void 0:r.options)==null?void 0:u.backend)!=null&&l.backends&&r.options.backend.backends.some(f=>{var c,p,d;return((c=f==null?void 0:f.name)==null?void 0:c.indexOf("Locize"))>0||((d=(p=f==null?void 0:f.constructor)==null?void 0:p.name)==null?void 0:d.indexOf("Locize"))>0}))};class U extends te{constructor(e={},t){if(super(),this.options=ve(e),this.services={},this.logger=$,this.modules={external:[]},at(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(g(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=re();this.options={...i,...this.options,...ve(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!ot(this)&&!Re&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),Re=!0);const s=l=>l?typeof l=="function"?new l:l:null;if(!this.options.isClone){this.modules.logger?$.init(s(this.modules.logger),this.options):$.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:l=it;const f=new Se(this.options);this.store=new xe(this.options.resources,this.options);const c=this.services;c.logger=$,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new et(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),l&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(c.formatter=s(l),c.formatter.init&&c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Ce(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new rt(s(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.languageDetector&&(c.languageDetector=s(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=s(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new ee(this.services,this.options),this.translator.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=q),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=(...f)=>this.store[l](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=(...f)=>(this.store[l](...f),this)});const o=K(),u=()=>{const l=(f,c)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(c),t(f,c)};if(this.languages&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initAsync?u():setTimeout(u,0),o}loadResources(e,t=q){var n,a;let i=t;const s=g(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const o=[],u=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(c=>{c!=="cimode"&&o.indexOf(c)<0&&o.push(c)})};s?u(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>u(f)),(a=(n=this.options.preload)==null?void 0:n.forEach)==null||a.call(n,l=>u(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(l)})}else i(null)}reloadResources(e,t,i){const s=K();return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),i||(i=q),this.services.backendConnector.reload(e,t,n=>{s.resolve(),i(n)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Ee.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let t=0;t<this.languages.length;t++){const i=this.languages[t];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const i=K();this.emit("languageChanging",e);const s=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},n=(o,u)=>{u?this.isLanguageChangingTo===e&&(s(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve((...l)=>this.t(...l)),t&&t(o,(...l)=>this.t(...l))},a=o=>{var f,c;!e&&!o&&this.services.languageDetector&&(o=[]);const u=g(o)?o:o&&o[0],l=this.store.hasLanguageSomeTranslations(u)?u:this.services.languageUtils.getBestMatchFromCodes(g(o)?[o]:o);l&&(this.language||s(l),this.translator.language||this.translator.changeLanguage(l),(c=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||c.call(f,l)),this.loadResources(l,p=>{n(p,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),i}getFixedT(e,t,i){const s=(n,a,...o)=>{let u;typeof a!="object"?u=this.options.overloadTranslationOptionHandler([n,a].concat(o)):u={...a},u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||i||s.keyPrefix);const l=this.options.keySeparator||".";let f;return u.keyPrefix&&Array.isArray(n)?f=n.map(c=>(typeof c=="function"&&(c=oe(c,{...this.options,...a})),`${u.keyPrefix}${l}${c}`)):(typeof n=="function"&&(n=oe(n,{...this.options,...a})),f=u.keyPrefix?`${u.keyPrefix}${l}${n}`:n),this.t(f,u)};return g(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=i,s}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,n=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const a=(o,u)=>{const l=this.services.backendConnector.state[`${o}|${u}`];return l===-1||l===0||l===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(i,e)&&(!s||a(n,e)))}loadNamespaces(e,t){const i=K();return this.options.ns?(g(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),t&&t(s)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){const i=K();g(e)&&(e=[e]);const s=this.options.preload||[],n=e.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return n.length?(this.options.preload=s.concat(n),this.loadResources(a=>{i.resolve(),t&&t(a)}),i):(t&&t(),Promise.resolve())}dir(e){var s,n;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const a=new Intl.Locale(e);if(a&&a.getTextInfo){const o=a.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=((n=this.services)==null?void 0:n.languageUtils)||new Se(re());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const i=new U(e,t);return i.createInstance=U.createInstance,i}cloneInstance(e={},t=q){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},n=new U(s);if((e.debug!==void 0||e.prefix!==void 0)&&(n.logger=n.logger.clone(e)),["store","services","language"].forEach(o=>{n[o]=this[o]}),n.services={...this.services},n.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},i){const o=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},u[l]=Object.keys(u[l]).reduce((f,c)=>(f[c]={...u[l][c]},f),u[l]),u),{});n.store=new xe(o,s),n.services.resourceStore=n.store}if(e.interpolation){const u={...re().interpolation,...this.options.interpolation,...e.interpolation},l={...s,interpolation:u};n.services.interpolator=new Ce(l)}return n.translator=new ee(n.services,s),n.translator.on("*",(o,...u)=>{n.emit(o,...u)}),n.init(s,t),n.translator.options=s,n.translator.backendConnector.services.utils={hasLoadedNamespace:n.hasLoadedNamespace.bind(n)},n}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const S=U.createInstance();S.createInstance;S.dir;S.init;S.loadResources;S.reloadResources;S.use;S.changeLanguage;S.getFixedT;S.t;S.exists;S.setDefaultNamespace;S.hasLoadedNamespace;S.loadNamespaces;S.loadLanguages;const lt={type:"3rdParty",init(r){G.setDefaults(r.options.react),G.setI18n(r)}};function ut({i18n:r,defaultNS:e,children:t}){const i=Y.useMemo(()=>({i18n:r,defaultNS:e}),[r,e]);return Y.createElement(G.I18nContext.Provider,{value:i},t)}const ct=({className:r,...e})=>x.jsxRuntimeExports.jsx("div",{className:D.cn("[&_svg]:w-40",r),...e}),ft=r=>B.createElement("svg",{height:"1em",width:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...r},B.createElement("path",{d:"M1.86879 5.11875C2.52504 3.25 4.28754 2 6.26879 2H25.7813C27.7625 2 29.525 3.25 30.1813 5.11875L31.3313 8.40625C32.0188 10.375 31.3938 12.4 30.025 13.6812V25.5063C30.025 27.9937 28.0125 30.0063 25.525 30.0063H6.52504C4.03754 30.0063 2.02504 27.9937 2.02504 25.5063V13.6812C0.656291 12.4 0.0312907 10.375 0.718791 8.40625L1.86879 5.11875ZM5.02504 14.9875V20H27.025V14.9875C26.9 14.9938 26.7813 15 26.6563 15C25.2938 15 24.0438 14.4437 23.1438 13.5437C22.2313 14.4437 20.9813 15 19.5875 15C18.2 15 16.9375 14.4375 16.025 13.5312C15.1125 14.4375 13.85 15 12.4625 15C11.0688 15 9.81879 14.4437 8.90629 13.5437C8.00629 14.45 6.76254 15 5.39379 15C5.26879 15 5.14379 14.9938 5.01879 14.9875H5.02504ZM10.8813 5L10.4063 9.73125C10.2875 10.9437 11.2375 12 12.4563 12C13.5938 12 14.5188 11.075 14.5188 9.9375V5H10.875H10.8813ZM17.525 9.9375C17.525 11.075 18.45 12 19.5875 12C20.8063 12 21.7625 10.9437 21.6375 9.73125L21.1625 5H17.5188V9.9375H17.525ZM24.7063 10.2375C24.8063 11.2375 25.65 12 26.65 12C28 12 28.9438 10.6687 28.4938 9.4L27.35 6.1125C27.1188 5.44375 26.4875 5 25.7813 5H24.1813L24.7063 10.2375ZM5.40004 12C6.40629 12 7.24379 11.2375 7.34379 10.2375L7.86879 5H6.26879C5.56254 5 4.93754 5.44375 4.70004 6.1125L3.55004 9.4C3.10629 10.675 4.05004 12 5.39379 12H5.40004ZM5.02504 25.5C5.02504 26.3312 5.69379 27 6.52504 27H25.525C26.3563 27 27.025 26.3312 27.025 25.5V23H5.02504V25.5Z"})),ht=r=>B.createElement("svg",{height:"1em",width:"1em",fill:"currentColor",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...r},B.createElement("path",{d:"M14.7688 8.45C15.5563 7.80625 16.7125 7.85625 17.4438 8.5875L25.4438 16.5875C26.0188 17.1625 26.1875 18.0188 25.875 18.7688C25.5625 19.5188 24.8375 20 24.0313 20H8.03127C7.22502 20 6.49377 19.5125 6.18127 18.7625C5.86877 18.0125 6.04377 17.1563 6.61877 16.5875L14.6188 8.5875L14.7688 8.45Z"})),{Text:je}=j.Typography,dt=({className:r,children:e})=>{const{t}=G.useTranslation();return!e||e.trim()===""?null:x.jsxRuntimeExports.jsxs(j.Flex,{className:r,align:"center",gap:2,children:[x.jsxRuntimeExports.jsxs(j.Flex,{align:"center",gap:1,children:[x.jsxRuntimeExports.jsx(ft,{className:"text-primary-blue size-6"}),x.jsxRuntimeExports.jsx(je,{className:"text-primary-blue",size:"sm",weight:"semibold",children:t("layout.header.store")})]}),x.jsxRuntimeExports.jsx(je,{className:"text-grays-macropay-05",size:"sm",weight:"semibold",children:e})]})},{Text:Ne}=j.Typography,pt=({name:r,role:e,imageUrl:t,items:i=[]})=>{const{md:s}=Ve.useBreakpoint();if(!r||r.trim()==="")return null;const n=x.jsxRuntimeExports.jsxs(j.Flex,{gap:1,direction:"vertical",children:[x.jsxRuntimeExports.jsx(Ne,{className:"text-primary-blue",size:"sm",weight:"semibold",children:r}),x.jsxRuntimeExports.jsx(Ne,{className:"text-grays-macropay-05",size:"sm",weight:"semibold",children:e})]});return x.jsxRuntimeExports.jsxs(j.Flex,{align:"center",gap:2,children:[x.jsxRuntimeExports.jsx(j.Avatar,{src:t,alt:r,size:"sm"}),s&&n,x.jsxRuntimeExports.jsx(j.Dropdown,{classNames:{trigger:"size-6.5 p-0",content:"z-10 shadow-sm"},trigger:x.jsxRuntimeExports.jsx(ht,{className:"rotate-180"}),items:s?i:[{label:n,id:"user-name",type:"label"},{id:"separator-1",type:"separator"},...i]})]})},Fe=({className:r,children:e})=>{if(Array.isArray(e)&&e.length===0)return null;const t=e.filter(s=>s!==null),i=s=>s===t.length-1;return x.jsxRuntimeExports.jsx(j.Flex,{align:"center",gap:4,className:D.cn(r),children:t.map((s,n)=>x.jsxRuntimeExports.jsxs(Y.Fragment,{children:[s,i(n)?null:x.jsxRuntimeExports.jsx(Ke,{"data-slot":"separator",orientation:"vertical",decorative:!0,className:D.cn("shrink-0 bg-grays-macropay-05 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch")})]},n))})};Fe.disPlayName="Layout.Header.RightSide";const _=({className:r,...e})=>x.jsxRuntimeExports.jsx("header",{className:D.cn("sticky top-0 flex h-17 shrink-0 items-center justify-between gap-2 border-b border-gray-200 bg-white px-4 shadow-lg z-1",r),...e});_.LeftSide=ct;_.Store=dt;_.User=pt;_.RightSide=Fe;const gt=({className:r,children:e,...t})=>x.jsxRuntimeExports.jsx("div",{className:D.cn("flex w-full flex-1 flex-col px-0 md:px-4 pt-5 [&>div]:flex [&>div]:items-start [&>div]:justify-center [&>div>div]:w-full [&>div>div]:max-w-243",r),...t,children:x.jsxRuntimeExports.jsx("div",{className:"flex-1 rounded-lg bg-white p-4",children:e})}),mt=({className:r,...e})=>x.jsxRuntimeExports.jsx("footer",{className:D.cn("bottom-0 w-full px-6 py-4 text-center text-xs text-grays-macropay-05",r),...e}),xt={login:{btnLabel:"Iniciar sesión"}},yt={translation:{layout:{...xt,header:{store:"Centro"}},header:{signOut:"Cerrar Sesión",store:"Tienda",cashRegister:"Caja",roleName:"Vendedor",sessionExp:"Tu sesión está por expirar",continueSessionPrefix:"La sesión se cerrará automáticamente en",continueSessionSuffix:"segundos, confirma para continuar con la sesión"},common:{yes:"Si",accept:"Aceptar",no:"No",cancel:"Cancelar",send:"Enviar",save:"Guardar",name:"Nombre",names:"Nombre(s)",lastName:"Apellido paterno",secondName:"Apellido materno",street:"Calle",extNumber:"Número exterior",colony:"Colonia",CP:"Código postal",upload:"Cargar archivo",goBack:"Regresar",goForward:"Continuar",goToLoginButton:"Ir a login",search:"Buscar",htmlTitle:"Macropay HelpDesk",themedark:"Modo Oscuro",goToMenu:"Ir a menú",closeMenu:"Cerrar",step:"Paso {{value}}",changeCenter:"Cambiar centro",closeSession:"Cerrar sesión",yesForward:"Si, continuar",blackList:{title:"Verifica para continuar",message:"¿Estás seguro que deseas continuar?"},messageChangeCenter:"Regresarás al menú principal para cambiar el centro. ¿Estás seguro que deseas realizar esta acción? Perderás el flujo actual.",messageCloseSession:"¿Estás seguro que deseas cerrar la sesión de tu cuenta?"}}};S.use(lt).init({resources:{es:yt},lng:"es",interpolation:{escapeValue:!1}});const se=({children:r,loading:e,...t})=>x.jsxRuntimeExports.jsx(ut,{i18n:S,children:x.jsxRuntimeExports.jsxs("main",{"data-slot":"sidebar-inset",className:"relative flex min-h-svh w-full flex-1 flex-col bg-grays-macropay-02",...t,children:[r,e&&x.jsxRuntimeExports.jsx(j.Root$3,{className:"position bg-opacity-50 absolute top-0 left-0 z-50 flex h-full w-full items-center justify-center"})]})});se.Header=_;se.Content=gt;se.Footer=mt;exports.RootLayout=se;