@snmt-react-ui/user-select 2.5.11 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ var ue = (i, e, t) => e in i ? ge(i, e, { enumerable: !0, configurable: !0, writ
3
3
  var V1 = (i, e, t) => ue(i, typeof e != "symbol" ? e + "" : e, t);
4
4
  import "./index.css";
5
5
  import { jsx as o, Fragment as n1, jsxs as u } from "react/jsx-runtime";
6
- import { createContext as o1, forwardRef as k1, useState as j, useRef as X, useEffect as P, useCallback as D, useImperativeHandle as Ce, useContext as e1 } from "react";
6
+ import { createContext as o1, forwardRef as k1, useState as j, useRef as X, useEffect as K, useCallback as T, useImperativeHandle as Ce, useContext as e1 } from "react";
7
7
  import { Select as pe, Flex as fe, Avatar as we, Checkbox as me, Typography as ke, Tag as Le, Popover as ve } from "antd";
8
8
  import { SNMTUiContext as Ne } from "@snmt-react-ui/core";
9
9
  var xe = Object.defineProperty, Re = (i, e, t) => e in i ? xe(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, Me = (i, e, t) => Re(i, e + "", t), ye = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
@@ -41,9 +41,9 @@ const q1 = (i, e) => () => {
41
41
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
42
42
  const s = e.languages[0], n = e.options ? e.options.fallbackLng : !1, a = e.languages[e.languages.length - 1];
43
43
  if (s.toLowerCase() === "cimode") return !0;
44
- const c = (r, g) => {
45
- const d = e.services.backendConnector.state[`${r}|${g}`];
46
- return d === -1 || d === 2;
44
+ const c = (r, d) => {
45
+ const g = e.services.backendConnector.state[`${r}|${d}`];
46
+ return g === -1 || g === 2;
47
47
  };
48
48
  return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !c(e.isLanguageChangingTo, i) ? !1 : !!(e.hasResourceBundle(s, i) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || c(s, i) && (!n || c(a, i)));
49
49
  }, _e = function(i, e) {
@@ -101,10 +101,10 @@ class De {
101
101
  }
102
102
  const Te = (i, e) => {
103
103
  const t = X();
104
- return P(() => {
104
+ return K(() => {
105
105
  t.current = i;
106
106
  }, [i, e]), t.current;
107
- }, X1 = (i, e, t, s) => i.getFixedT(e, t, s), Ge = (i, e, t, s) => D(X1(i, e, t, s), [i, e, t, s]), Ke = function(i) {
107
+ }, X1 = (i, e, t, s) => i.getFixedT(e, t, s), Ge = (i, e, t, s) => T(X1(i, e, t, s), [i, e, t, s]), Ke = function(i) {
108
108
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
109
109
  const {
110
110
  i18n: t
@@ -114,7 +114,7 @@ const Te = (i, e) => {
114
114
  } = e1(je) || {}, a = t || s || We();
115
115
  if (a && !a.reportNamespaces && (a.reportNamespaces = new De()), !a) {
116
116
  M1("You will need to pass in an i18next instance by using initReactI18next");
117
- const f = (m, w) => Q(w) ? w : He(w) && Q(w.defaultValue) ? w.defaultValue : Array.isArray(m) ? m[m.length - 1] : m, R = [f, {}, !1];
117
+ const f = (b, w) => Q(w) ? w : He(w) && Q(w.defaultValue) ? w.defaultValue : Array.isArray(b) ? b[b.length - 1] : b, R = [f, {}, !1];
118
118
  return R.t = f, R.i18n = {}, R.ready = !1, R;
119
119
  }
120
120
  a.options.react && a.options.react.wait !== void 0 && M1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
@@ -124,37 +124,37 @@ const Te = (i, e) => {
124
124
  ...e
125
125
  }, {
126
126
  useSuspense: r,
127
- keyPrefix: g
127
+ keyPrefix: d
128
128
  } = c;
129
- let d = i;
130
- d = Q(d) ? [d] : d || ["translation"], a.reportNamespaces.addUsedNamespaces && a.reportNamespaces.addUsedNamespaces(d);
131
- const l = (a.isInitialized || a.initializedStoreOnce) && d.every((f) => _e(f, a, c)), h = Ge(a, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), C = () => h, p = () => X1(a, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), [L, N] = j(C);
132
- let k = d.join();
133
- e.lng && (k = `${e.lng}${k}`);
134
- const E = Te(k), b = X(!0);
135
- P(() => {
129
+ let g = i;
130
+ g = Q(g) ? [g] : g || ["translation"], a.reportNamespaces.addUsedNamespaces && a.reportNamespaces.addUsedNamespaces(g);
131
+ const l = (a.isInitialized || a.initializedStoreOnce) && g.every((f) => _e(f, a, c)), h = Ge(a, e.lng || null, c.nsMode === "fallback" ? g : g[0], d), C = () => h, p = () => X1(a, e.lng || null, c.nsMode === "fallback" ? g : g[0], d), [k, N] = j(C);
132
+ let m = g.join();
133
+ e.lng && (m = `${e.lng}${m}`);
134
+ const E = Te(m), x = X(!0);
135
+ K(() => {
136
136
  const {
137
137
  bindI18n: f,
138
138
  bindI18nStore: R
139
139
  } = c;
140
- b.current = !0, !l && !r && (e.lng ? O1(a, e.lng, d, () => {
141
- b.current && N(p);
142
- }) : S1(a, d, () => {
143
- b.current && N(p);
144
- })), l && E && E !== k && b.current && N(p);
145
- const m = () => {
146
- b.current && N(p);
140
+ x.current = !0, !l && !r && (e.lng ? O1(a, e.lng, g, () => {
141
+ x.current && N(p);
142
+ }) : S1(a, g, () => {
143
+ x.current && N(p);
144
+ })), l && E && E !== m && x.current && N(p);
145
+ const b = () => {
146
+ x.current && N(p);
147
147
  };
148
- return f && a && a.on(f, m), R && a && a.store.on(R, m), () => {
149
- b.current = !1, f && a && f.split(" ").forEach((w) => a.off(w, m)), R && a && R.split(" ").forEach((w) => a.store.off(w, m));
148
+ return f && a && a.on(f, b), R && a && a.store.on(R, b), () => {
149
+ x.current = !1, f && a && f.split(" ").forEach((w) => a.off(w, b)), R && a && R.split(" ").forEach((w) => a.store.off(w, b));
150
150
  };
151
- }, [a, k]), P(() => {
152
- b.current && l && N(C);
153
- }, [a, g, l]);
154
- const _ = [L, a, l];
155
- if (_.t = L, _.i18n = a, _.ready = l, l || !l && !r) return _;
151
+ }, [a, m]), K(() => {
152
+ x.current && l && N(C);
153
+ }, [a, d, l]);
154
+ const _ = [k, a, l];
155
+ if (_.t = k, _.i18n = a, _.ready = l, l || !l && !r) return _;
156
156
  throw new Promise((f) => {
157
- e.lng ? O1(a, e.lng, d, () => f()) : S1(a, d, () => f());
157
+ e.lng ? O1(a, e.lng, g, () => f()) : S1(a, g, () => f());
158
158
  });
159
159
  }, u1 = ({
160
160
  children: i,
@@ -206,9 +206,9 @@ const $e = ({
206
206
  disabled: n = !1,
207
207
  disableUncheck: a = !1
208
208
  }) => {
209
- const [c, r] = j(i), [g, d] = j(e);
210
- P(() => {
211
- r(i), d(e);
209
+ const [c, r] = j(i), [d, g] = j(e);
210
+ K(() => {
211
+ r(i), g(e);
212
212
  }, [i, e]);
213
213
  const { theme: l } = e1(_1);
214
214
  return /* @__PURE__ */ o(
@@ -216,9 +216,9 @@ const $e = ({
216
216
  {
217
217
  className: `snmt-checkbox snmt-checkbox-${l}`,
218
218
  checked: c,
219
- indeterminate: g,
219
+ indeterminate: d,
220
220
  onChange: (h) => {
221
- a && c || (d(!1), r(h.target.checked), s && s(h));
221
+ a && c || (g(!1), r(h.target.checked), s && s(h));
222
222
  },
223
223
  disabled: n,
224
224
  children: t
@@ -3283,13 +3283,13 @@ const Fe = ({
3283
3283
  disabled: a = !1,
3284
3284
  onClick: c
3285
3285
  }) => {
3286
- const [r, g] = j(n), { theme: d } = e1(ee), l = a ? d && d === "dark" ? M.GREY_LIGHT_4 : M.GREY_DARK_1 : s, h = a ? void 0 : c;
3287
- return P(() => {
3286
+ const [r, d] = j(n), { theme: g } = e1(ee), l = a ? g && g === "dark" ? M.GREY_LIGHT_4 : M.GREY_DARK_1 : s, h = a ? void 0 : c;
3287
+ return K(() => {
3288
3288
  if (n) {
3289
- h && !a && g(`${n} clickable`);
3289
+ h && !a && d(`${n} clickable`);
3290
3290
  return;
3291
3291
  }
3292
- h && !a && g("clickable");
3292
+ h && !a && d("clickable");
3293
3293
  }, [h, n, a]), /* @__PURE__ */ o(n1, { children: (() => {
3294
3294
  switch (i) {
3295
3295
  case "nextIcon":
@@ -3551,12 +3551,12 @@ const Fe = ({
3551
3551
  collapsed: a,
3552
3552
  whiteSpace: c = "normal"
3553
3553
  }, r) => {
3554
- const g = e === "h1" || e === "h2" || e === "h3" || e === "h4";
3555
- let d = `snmt-typography snmt-typography-${e}`;
3556
- return i && i !== "inherit" && (d += ` snmt-typography-align-${i}`), a && (d += " collapsed"), g ? /* @__PURE__ */ o(
3554
+ const d = e === "h1" || e === "h2" || e === "h3" || e === "h4";
3555
+ let g = `snmt-typography snmt-typography-${e}`;
3556
+ return i && i !== "inherit" && (g += ` snmt-typography-align-${i}`), a && (g += " collapsed"), d ? /* @__PURE__ */ o(
3557
3557
  N2,
3558
3558
  {
3559
- className: d,
3559
+ className: g,
3560
3560
  style: { color: t, whiteSpace: c },
3561
3561
  onClick: n,
3562
3562
  level: R2[e],
@@ -3566,7 +3566,7 @@ const Fe = ({
3566
3566
  ) : /* @__PURE__ */ o(
3567
3567
  x2,
3568
3568
  {
3569
- className: d,
3569
+ className: g,
3570
3570
  style: { color: t, whiteSpace: c },
3571
3571
  onClick: n,
3572
3572
  ref: r,
@@ -6633,13 +6633,13 @@ const y2 = ({
6633
6633
  disabled: a = !1,
6634
6634
  onClick: c
6635
6635
  }) => {
6636
- const [r, g] = j(n), { theme: d } = e1(te), l = a ? d && d === "dark" ? y.GREY_LIGHT_4 : y.GREY_DARK_1 : s, h = a ? void 0 : c;
6637
- return P(() => {
6636
+ const [r, d] = j(n), { theme: g } = e1(te), l = a ? g && g === "dark" ? y.GREY_LIGHT_4 : y.GREY_DARK_1 : s, h = a ? void 0 : c;
6637
+ return K(() => {
6638
6638
  if (n) {
6639
- h && !a && g(`${n} clickable`);
6639
+ h && !a && d(`${n} clickable`);
6640
6640
  return;
6641
6641
  }
6642
- h && !a && g("clickable");
6642
+ h && !a && d("clickable");
6643
6643
  }, [h, n, a]), /* @__PURE__ */ o(n1, { children: (() => {
6644
6644
  switch (i) {
6645
6645
  case "nextIcon":
@@ -6949,8 +6949,8 @@ const ie = ({
6949
6949
  trigger: "click",
6950
6950
  overlayClassName: `snmt-popover ${a ? "" : "padding"}`,
6951
6951
  open: t ?? c,
6952
- onOpenChange: (g) => {
6953
- r(g), s == null || s(g);
6952
+ onOpenChange: (d) => {
6953
+ r(d), s == null || s(d);
6954
6954
  },
6955
6955
  children: /* @__PURE__ */ o("div", { className: "wrapper", children: i })
6956
6956
  }
@@ -6976,14 +6976,14 @@ const r3 = ({
6976
6976
  options: a,
6977
6977
  extraOptions: c
6978
6978
  }) => {
6979
- const { locale: r } = e1(_1), { t: g } = Ke("common", { lng: r }), [d, l] = j(!1);
6980
- if (P(() => {
6979
+ const { locale: r } = e1(_1), { t: d } = Ke("common", { lng: r }), [g, l] = j(!1);
6980
+ if (K(() => {
6981
6981
  i.length || l(!1);
6982
6982
  }, [i]), !i.length)
6983
6983
  return null;
6984
6984
  const h = (C) => {
6985
- var p, L;
6986
- return ((p = a == null ? void 0 : a.find((N) => N.value === C)) == null ? void 0 : p.label) || ((L = c == null ? void 0 : c.find((N) => N.value === C)) == null ? void 0 : L.label) || C;
6985
+ var p, k;
6986
+ return ((p = a == null ? void 0 : a.find((N) => N.value === C)) == null ? void 0 : p.label) || ((k = c == null ? void 0 : c.find((N) => N.value === C)) == null ? void 0 : k.label) || C;
6987
6987
  };
6988
6988
  return /* @__PURE__ */ u(
6989
6989
  n3,
@@ -7002,12 +7002,12 @@ const r3 = ({
7002
7002
  )) }) })
7003
7003
  ),
7004
7004
  placement: "bottomRight",
7005
- isOpen: d,
7005
+ isOpen: g,
7006
7006
  setIsOpen: l,
7007
7007
  children: [
7008
7008
  i.length,
7009
7009
  " ",
7010
- g("more")
7010
+ d("more")
7011
7011
  ]
7012
7012
  }
7013
7013
  );
@@ -7029,105 +7029,105 @@ const r3 = ({
7029
7029
  options: a,
7030
7030
  width: c,
7031
7031
  disabled: r = !1,
7032
- required: g = !1,
7033
- clearable: d = !1,
7032
+ required: d = !1,
7033
+ clearable: g = !1,
7034
7034
  scrollThresholdValue: l = 50,
7035
7035
  onSearchChange: h,
7036
7036
  onDropdownVisibleChange: C,
7037
7037
  onScrollToEnd: p,
7038
- onPopupScroll: L,
7038
+ onPopupScroll: k,
7039
7039
  id: N,
7040
- extraOptions: k,
7040
+ extraOptions: m,
7041
7041
  dropdownRender: E,
7042
- optionRender: b,
7042
+ optionRender: x,
7043
7043
  isLoading: _,
7044
7044
  readOnly: f
7045
7045
  }, R) => {
7046
- const [m, w] = j(!1), [Z, W] = j(!1), [O, V] = j(!0), [I, G] = j(i), K = X(null);
7047
- P(() => {
7048
- G(i);
7046
+ const [b, w] = j(!1), [I, Z] = j(!1), [D, S] = j(!0), [H, P] = j(i), A = X(null);
7047
+ K(() => {
7048
+ P(i);
7049
7049
  }, [i]);
7050
- const H = (x) => {
7051
- w(x), C && C(x);
7052
- }, Y = (x, S) => {
7053
- var $;
7054
- return !!(($ = S == null ? void 0 : S.label) != null && $.toString().toLowerCase().includes(x.toLowerCase()));
7050
+ const V = (v) => {
7051
+ w(v), C && C(v);
7052
+ }, $ = (v, O) => {
7053
+ var F;
7054
+ return !!((F = O == null ? void 0 : O.label) != null && F.toString().toLowerCase().includes(v.toLowerCase()));
7055
7055
  }, t1 = () => {
7056
- W(!0);
7057
- }, B = () => {
7058
- W(!1);
7059
- }, A = D(
7060
- (x) => {
7061
- if (G(x), s) {
7062
- const $ = x;
7063
- e == null || e($);
7056
+ Z(!0);
7057
+ }, W = () => {
7058
+ Z(!1);
7059
+ }, B = T(
7060
+ (v) => {
7061
+ if (P(v), s) {
7062
+ const F = v;
7063
+ e == null || e(F);
7064
7064
  return;
7065
7065
  }
7066
- const S = x;
7067
- e == null || e(S);
7066
+ const O = v;
7067
+ e == null || e(O);
7068
7068
  },
7069
7069
  [s, e]
7070
- ), U = D(() => {
7070
+ ), U = T(() => {
7071
7071
  if (!f) {
7072
7072
  if (s) {
7073
- A([]);
7073
+ B([]);
7074
7074
  return;
7075
7075
  }
7076
- A("");
7076
+ B("");
7077
7077
  }
7078
- }, [A, s, f]), z = D(
7079
- (x) => {
7080
- const S = I.filter(($) => $ !== x);
7081
- A(S), G(S);
7078
+ }, [B, s, f]), z = T(
7079
+ (v) => {
7080
+ const O = H.filter((F) => F !== v);
7081
+ B(O), P(O);
7082
7082
  },
7083
- [A, I]
7084
- ), H1 = D(
7085
- (x) => (I == null ? void 0 : I.indexOf(x)) === 0 ? (
7083
+ [B, H]
7084
+ ), H1 = T(
7085
+ (v) => (H == null ? void 0 : H.indexOf(v)) === 0 ? (
7086
7086
  // if the search input is empty
7087
7087
  // then display the placeholder, else do not display it
7088
- /* @__PURE__ */ o("span", { className: "custom-placeholder", children: O ? t : "" })
7088
+ /* @__PURE__ */ o("span", { className: "custom-placeholder", children: D ? t : "" })
7089
7089
  ) : /* @__PURE__ */ o(n1, {}),
7090
- [O, I, t]
7091
- ), le = (x) => {
7092
- x.preventDefault(), x.stopPropagation();
7093
- }, he = async (x) => {
7094
- const { target: S } = x;
7095
- S.scrollTop + S.offsetHeight >= S.scrollHeight - l && (p == null || p(!0)), L && await L(x);
7096
- }, v1 = D(
7097
- (x) => {
7098
- var S, $;
7099
- return ((S = a.find((N1) => N1.value === x)) == null ? void 0 : S.label) || (($ = k == null ? void 0 : k.find(
7100
- (N1) => N1.value === x
7101
- )) == null ? void 0 : $.label) || x;
7090
+ [D, H, t]
7091
+ ), le = (v) => {
7092
+ v.preventDefault(), v.stopPropagation();
7093
+ }, he = async (v) => {
7094
+ const { target: O } = v;
7095
+ O.scrollTop + O.offsetHeight >= O.scrollHeight - l && (p == null || p(!0)), k && await k(v);
7096
+ }, v1 = T(
7097
+ (v) => {
7098
+ var O, F;
7099
+ return ((O = a.find((N1) => N1.value === v)) == null ? void 0 : O.label) || ((F = m == null ? void 0 : m.find(
7100
+ (N1) => N1.value === v
7101
+ )) == null ? void 0 : F.label) || v;
7102
7102
  },
7103
- [k, a]
7104
- ), ce = D(
7105
- (x) => {
7106
- var S;
7103
+ [m, a]
7104
+ ), ce = T(
7105
+ (v) => {
7106
+ var O;
7107
7107
  return /* @__PURE__ */ o(
7108
7108
  r3,
7109
7109
  {
7110
- values: x,
7110
+ values: v,
7111
7111
  onTagClose: z,
7112
- maxWidth: ((S = K.current) == null ? void 0 : S.clientWidth) || 0,
7112
+ maxWidth: ((O = A.current) == null ? void 0 : O.clientWidth) || 0,
7113
7113
  disabled: r,
7114
7114
  closable: !f,
7115
7115
  options: a,
7116
- extraOptions: k
7116
+ extraOptions: m
7117
7117
  }
7118
7118
  );
7119
7119
  },
7120
- [r, k, z, a, f]
7121
- ), de = D(
7122
- ({ label: x, value: S, mode: $ }) => $ === "filter" ? H1(S) : /* @__PURE__ */ o("div", { onMouseDown: le, className: "tag-wrapper", children: /* @__PURE__ */ o(ie, { onClose: () => z(S), disabled: r, children: typeof x == "object" ? x : v1(S) }) }),
7120
+ [r, m, z, a, f]
7121
+ ), de = T(
7122
+ ({ label: v, value: O, mode: F }) => F === "filter" ? H1(O) : /* @__PURE__ */ o("div", { onMouseDown: le, className: "tag-wrapper", children: /* @__PURE__ */ o(ie, { onClose: () => z(O), disabled: r, children: typeof v == "object" ? v : v1(O) }) }),
7123
7123
  [r, v1, z, H1]
7124
7124
  );
7125
7125
  return /* @__PURE__ */ u(
7126
7126
  "div",
7127
7127
  {
7128
- className: `snmt-select ${Z ? "snmt-select-focused" : ""}
7128
+ className: `snmt-select ${I ? "snmt-select-focused" : ""}
7129
7129
  ${s ? "" : "snmt-select-single"} ${f ? "snmt-select-read-only" : ""}`,
7130
- ref: K,
7130
+ ref: A,
7131
7131
  style: { width: c },
7132
7132
  children: [
7133
7133
  /* @__PURE__ */ o(
@@ -7138,28 +7138,28 @@ const r3 = ({
7138
7138
  id: N,
7139
7139
  ref: R,
7140
7140
  showSearch: !!n,
7141
- filterOption: n && Y,
7142
- onDropdownVisibleChange: H,
7143
- placeholder: t ? g ? `${t}*` : t : void 0,
7141
+ filterOption: n && $,
7142
+ onDropdownVisibleChange: V,
7143
+ placeholder: t ? d ? `${t}*` : t : void 0,
7144
7144
  disabled: r,
7145
- value: I || void 0,
7146
- labelRender: (x) => v1(x.value),
7145
+ value: H || void 0,
7146
+ labelRender: (v) => v1(v.value),
7147
7147
  mode: s === "filter" ? "multiple" : s,
7148
- onChange: A,
7148
+ onChange: B,
7149
7149
  onFocus: t1,
7150
- onBlur: B,
7151
- onSearch: (x) => {
7152
- V(!x), h && h(x);
7150
+ onBlur: W,
7151
+ onSearch: (v) => {
7152
+ S(!v), h && h(v);
7153
7153
  },
7154
- onSelect: () => V(!0),
7155
- onDeselect: () => V(!0),
7156
- tagRender: (x) => de({ ...x, mode: s }),
7154
+ onSelect: () => S(!0),
7155
+ onDeselect: () => S(!0),
7156
+ tagRender: (v) => de({ ...v, mode: s }),
7157
7157
  maxTagCount: "responsive",
7158
7158
  maxTagPlaceholder: ce,
7159
7159
  onPopupScroll: he,
7160
7160
  prefix: _ && /* @__PURE__ */ o(A1, { size: 15 }),
7161
7161
  suffixIcon: /* @__PURE__ */ o("div", { className: "wrapper-suffix-icon", children: s !== "filter" && /* @__PURE__ */ u(n1, { children: [
7162
- I && !!I.length && (s || d) && /* @__PURE__ */ o("div", { onClick: U, children: /* @__PURE__ */ o(
7162
+ H && !!H.length && (s || g) && /* @__PURE__ */ o("div", { onClick: U, children: /* @__PURE__ */ o(
7163
7163
  d1,
7164
7164
  {
7165
7165
  name: "cancel",
@@ -7171,27 +7171,27 @@ const r3 = ({
7171
7171
  {
7172
7172
  name: "selectArrowIcon",
7173
7173
  color: r ? J.GREY_DARK_1 : J.GREY_DARK_5,
7174
- className: m ? "select-arrow-rotated" : "select-arrow",
7175
- onClick: () => w(!m)
7174
+ className: b ? "select-arrow-rotated" : "select-arrow",
7175
+ onClick: () => w(!b)
7176
7176
  }
7177
7177
  )
7178
7178
  ] }) }),
7179
7179
  removeIcon: /* @__PURE__ */ o(d1, { name: "errorSmall", color: J.GREY_DARK_2 }),
7180
7180
  options: a,
7181
- optionRender: (x) => b ? b(x.data) : /* @__PURE__ */ u(u1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
7181
+ optionRender: (v) => x ? x(v.data) : /* @__PURE__ */ u(u1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
7182
7182
  /* @__PURE__ */ u(u1, { alignItems: "center", gap: 12, children: [
7183
7183
  s && /* @__PURE__ */ o(
7184
7184
  $e,
7185
7185
  {
7186
- checked: !!(I != null && I.includes(x.value))
7186
+ checked: !!(H != null && H.includes(v.value))
7187
7187
  }
7188
7188
  ),
7189
7189
  /* @__PURE__ */ u(u1, { alignItems: "center", gap: 8, children: [
7190
- x.data.image && /* @__PURE__ */ o(Pe, { src: x.data.image, size: 20 }),
7191
- /* @__PURE__ */ o("span", { children: x.label })
7190
+ v.data.image && /* @__PURE__ */ o(Pe, { src: v.data.image, size: 20 }),
7191
+ /* @__PURE__ */ o("span", { children: v.label })
7192
7192
  ] })
7193
7193
  ] }),
7194
- !s && I === x.value && /* @__PURE__ */ o(
7194
+ !s && H === v.value && /* @__PURE__ */ o(
7195
7195
  d1,
7196
7196
  {
7197
7197
  name: "ok",
@@ -7211,17 +7211,17 @@ const r3 = ({
7211
7211
  },
7212
7212
  children: /* @__PURE__ */ o(A1, { size: 28 })
7213
7213
  }
7214
- ) : (x) => E ? E(x) : x
7214
+ ) : (v) => E ? E(v) : v
7215
7215
  }
7216
7216
  ),
7217
7217
  /* @__PURE__ */ o(
7218
7218
  "fieldset",
7219
7219
  {
7220
- className: `${Z ? "fieldset-focused" : ""}
7220
+ className: `${I ? "fieldset-focused" : ""}
7221
7221
  ${r ? "fieldset-disabled" : ""}
7222
7222
  ${typeof i == "string" && i ? "fieldset-filled" : ""}
7223
7223
  ${typeof i == "object" && i != null && i.length ? "fieldset-filled" : ""}`,
7224
- children: /* @__PURE__ */ o("legend", { children: t ? /* @__PURE__ */ o("span", { children: g ? `${t}*` : t }) : "" })
7224
+ children: /* @__PURE__ */ o("legend", { children: t ? /* @__PURE__ */ o("span", { children: d ? `${t}*` : t }) : "" })
7225
7225
  }
7226
7226
  )
7227
7227
  ]
@@ -7231,7 +7231,7 @@ const r3 = ({
7231
7231
  );
7232
7232
  function a3(i, e = 500) {
7233
7233
  const t = X();
7234
- return P(() => () => {
7234
+ return K(() => () => {
7235
7235
  t.current && clearTimeout(t.current);
7236
7236
  }, []), (...s) => {
7237
7237
  const n = setTimeout(() => {
@@ -7253,77 +7253,77 @@ const r1 = {
7253
7253
  disabled: a,
7254
7254
  scrollThresholdValue: c,
7255
7255
  placeholder: r,
7256
- mode: g,
7257
- loadOnClosedState: d,
7256
+ mode: d,
7257
+ loadOnClosedState: g,
7258
7258
  extraOptions: l,
7259
7259
  onDropdownVisibleChange: h,
7260
7260
  optionRender: C,
7261
7261
  dropdownRender: p,
7262
- readOnly: L,
7262
+ readOnly: k,
7263
7263
  clearable: N
7264
- }, k) => {
7265
- const [E, b] = j([]), [_, f] = j(r1), [R, m] = j(!1), [w, Z] = j(null), W = D(
7266
- async (H = !1, Y) => {
7264
+ }, m) => {
7265
+ const [E, x] = j([]), [_, f] = j(r1), [R, b] = j(!1), [w, I] = j(null), Z = T(
7266
+ async (V = !1, $) => {
7267
7267
  if (!R) {
7268
- m(!0);
7268
+ b(!0);
7269
7269
  try {
7270
- const t1 = H ? { ...r1, search: Y } : _, B = await i(t1);
7271
- b(
7272
- (A) => H ? B.options : [...A, ...B.options]
7273
- ), Z(B.count), f((A) => ({
7274
- ...A,
7275
- offset: A.offset + A.limit
7270
+ const t1 = V ? { ...r1, search: $ } : _, W = await i(t1);
7271
+ x(
7272
+ (B) => V ? W.options : [...B, ...W.options]
7273
+ ), I(W.count), f((B) => ({
7274
+ ...B,
7275
+ offset: B.offset + B.limit
7276
7276
  }));
7277
7277
  } finally {
7278
- m(!1);
7278
+ b(!1);
7279
7279
  }
7280
7280
  }
7281
7281
  },
7282
7282
  [_, i, R]
7283
- ), O = a3(W), V = D(
7284
- (H) => {
7285
- H === "" || H === void 0 || H === null ? (f(r1), O(!0)) : O(!0, H);
7283
+ ), D = a3(Z), S = T(
7284
+ (V) => {
7285
+ V === "" || V === void 0 || V === null ? (f(r1), D(!0)) : D(!0, V);
7286
7286
  },
7287
- [O]
7288
- ), I = async (H) => {
7289
- H && w !== null && w > E.length && await W(!1);
7290
- }, G = D(
7291
- (H) => {
7292
- H && !d && (b([]), f(r1), W(!0)), h == null || h(H);
7287
+ [D]
7288
+ ), H = async (V) => {
7289
+ V && w !== null && w > E.length && await Z(!1);
7290
+ }, P = T(
7291
+ (V) => {
7292
+ V && !g && (x([]), f(r1), Z(!0)), h == null || h(V);
7293
7293
  },
7294
7294
  // eslint-disable-next-line
7295
- [d]
7295
+ [g]
7296
7296
  );
7297
- P(() => {
7298
- d && W(!1);
7297
+ K(() => {
7298
+ g && Z(!1);
7299
7299
  }, []);
7300
- const K = {
7300
+ const A = {
7301
7301
  id: n,
7302
7302
  width: e,
7303
7303
  options: E,
7304
7304
  onChange: t,
7305
- ref: k,
7305
+ ref: m,
7306
7306
  placeholder: r,
7307
7307
  search: !0,
7308
7308
  value: s,
7309
- onSearchChange: V,
7310
- onDropdownVisibleChange: G,
7309
+ onSearchChange: S,
7310
+ onDropdownVisibleChange: P,
7311
7311
  scrollThresholdValue: c,
7312
- onScrollToEnd: I,
7313
- loadOnClosedState: d,
7312
+ onScrollToEnd: H,
7313
+ loadOnClosedState: g,
7314
7314
  disabled: a,
7315
7315
  extraOptions: l,
7316
7316
  isLoading: R,
7317
7317
  optionRender: C,
7318
7318
  dropdownRender: p,
7319
- readOnly: L,
7319
+ readOnly: k,
7320
7320
  clearable: N
7321
7321
  };
7322
- return Ce(k, () => ({
7322
+ return Ce(m, () => ({
7323
7323
  refetchOptions: async () => {
7324
- f(r1), await W(!0);
7324
+ f(r1), await Z(!0);
7325
7325
  }
7326
- })), g ? /* @__PURE__ */ o(B1, { ...K, onChange: t, value: s, mode: g }) : /* @__PURE__ */ o("div", { className: "snmt-async-select", children: /* @__PURE__ */ o(B1, { ...K, onChange: t, value: s }) });
7326
+ })), d ? /* @__PURE__ */ o(B1, { ...A, onChange: t, value: s, mode: d }) : /* @__PURE__ */ o("div", { className: "snmt-async-select", children: /* @__PURE__ */ o(B1, { ...A, onChange: t, value: s }) });
7327
7327
  }
7328
7328
  );
7329
7329
  var C1 = /* @__PURE__ */ ((i) => (i.ACTIVE = "Active", i.ARCHIVED = "Archived", i))(C1 || {});
@@ -7370,9 +7370,9 @@ const se = (i, e) => () => {
7370
7370
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
7371
7371
  const s = e.languages[0], n = e.options ? e.options.fallbackLng : !1, a = e.languages[e.languages.length - 1];
7372
7372
  if (s.toLowerCase() === "cimode") return !0;
7373
- const c = (r, g) => {
7374
- const d = e.services.backendConnector.state[`${r}|${g}`];
7375
- return d === -1 || d === 2;
7373
+ const c = (r, d) => {
7374
+ const g = e.services.backendConnector.state[`${r}|${d}`];
7375
+ return g === -1 || g === 2;
7376
7376
  };
7377
7377
  return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !c(e.isLanguageChangingTo, i) ? !1 : !!(e.hasResourceBundle(s, i) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || c(s, i) && (!n || c(a, i)));
7378
7378
  }, d3 = function(i, e) {
@@ -7444,10 +7444,10 @@ class x3 {
7444
7444
  }
7445
7445
  const R3 = (i, e) => {
7446
7446
  const t = X();
7447
- return P(() => {
7447
+ return K(() => {
7448
7448
  t.current = i;
7449
7449
  }, [i, e]), t.current;
7450
- }, oe = (i, e, t, s) => i.getFixedT(e, t, s), M3 = (i, e, t, s) => D(oe(i, e, t, s), [i, e, t, s]), y3 = function(i) {
7450
+ }, oe = (i, e, t, s) => i.getFixedT(e, t, s), M3 = (i, e, t, s) => T(oe(i, e, t, s), [i, e, t, s]), y3 = function(i) {
7451
7451
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
7452
7452
  const {
7453
7453
  i18n: t
@@ -7457,7 +7457,7 @@ const R3 = (i, e) => {
7457
7457
  } = e1(N3) || {}, a = t || s || L3();
7458
7458
  if (a && !a.reportNamespaces && (a.reportNamespaces = new x3()), !a) {
7459
7459
  y1("You will need to pass in an i18next instance by using initReactI18next");
7460
- const f = (m, w) => q(w) ? w : g3(w) && q(w.defaultValue) ? w.defaultValue : Array.isArray(m) ? m[m.length - 1] : m, R = [f, {}, !1];
7460
+ const f = (b, w) => q(w) ? w : g3(w) && q(w.defaultValue) ? w.defaultValue : Array.isArray(b) ? b[b.length - 1] : b, R = [f, {}, !1];
7461
7461
  return R.t = f, R.i18n = {}, R.ready = !1, R;
7462
7462
  }
7463
7463
  a.options.react && a.options.react.wait !== void 0 && y1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
@@ -7467,39 +7467,39 @@ const R3 = (i, e) => {
7467
7467
  ...e
7468
7468
  }, {
7469
7469
  useSuspense: r,
7470
- keyPrefix: g
7470
+ keyPrefix: d
7471
7471
  } = c;
7472
- let d = i;
7473
- d = q(d) ? [d] : d || ["translation"], a.reportNamespaces.addUsedNamespaces && a.reportNamespaces.addUsedNamespaces(d);
7474
- const l = (a.isInitialized || a.initializedStoreOnce) && d.every((f) => d3(f, a, c)), h = M3(a, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), C = () => h, p = () => oe(a, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), [L, N] = j(C);
7475
- let k = d.join();
7476
- e.lng && (k = `${e.lng}${k}`);
7477
- const E = R3(k), b = X(!0);
7478
- P(() => {
7472
+ let g = i;
7473
+ g = q(g) ? [g] : g || ["translation"], a.reportNamespaces.addUsedNamespaces && a.reportNamespaces.addUsedNamespaces(g);
7474
+ const l = (a.isInitialized || a.initializedStoreOnce) && g.every((f) => d3(f, a, c)), h = M3(a, e.lng || null, c.nsMode === "fallback" ? g : g[0], d), C = () => h, p = () => oe(a, e.lng || null, c.nsMode === "fallback" ? g : g[0], d), [k, N] = j(C);
7475
+ let m = g.join();
7476
+ e.lng && (m = `${e.lng}${m}`);
7477
+ const E = R3(m), x = X(!0);
7478
+ K(() => {
7479
7479
  const {
7480
7480
  bindI18n: f,
7481
7481
  bindI18nStore: R
7482
7482
  } = c;
7483
- b.current = !0, !l && !r && (e.lng ? D1(a, e.lng, d, () => {
7484
- b.current && N(p);
7485
- }) : j1(a, d, () => {
7486
- b.current && N(p);
7487
- })), l && E && E !== k && b.current && N(p);
7488
- const m = () => {
7489
- b.current && N(p);
7483
+ x.current = !0, !l && !r && (e.lng ? D1(a, e.lng, g, () => {
7484
+ x.current && N(p);
7485
+ }) : j1(a, g, () => {
7486
+ x.current && N(p);
7487
+ })), l && E && E !== m && x.current && N(p);
7488
+ const b = () => {
7489
+ x.current && N(p);
7490
7490
  };
7491
- return f && a && a.on(f, m), R && a && a.store.on(R, m), () => {
7492
- b.current = !1, f && a && f.split(" ").forEach((w) => a.off(w, m)), R && a && R.split(" ").forEach((w) => a.store.off(w, m));
7491
+ return f && a && a.on(f, b), R && a && a.store.on(R, b), () => {
7492
+ x.current = !1, f && a && f.split(" ").forEach((w) => a.off(w, b)), R && a && R.split(" ").forEach((w) => a.store.off(w, b));
7493
7493
  };
7494
- }, [a, k]), P(() => {
7495
- b.current && l && N(C);
7496
- }, [a, g, l]);
7497
- const _ = [L, a, l];
7498
- if (_.t = L, _.i18n = a, _.ready = l, l || !l && !r) return _;
7494
+ }, [a, m]), K(() => {
7495
+ x.current && l && N(C);
7496
+ }, [a, d, l]);
7497
+ const _ = [k, a, l];
7498
+ if (_.t = k, _.i18n = a, _.ready = l, l || !l && !r) return _;
7499
7499
  throw new Promise((f) => {
7500
- e.lng ? D1(a, e.lng, d, () => f()) : j1(a, d, () => f());
7500
+ e.lng ? D1(a, e.lng, g, () => f()) : j1(a, g, () => f());
7501
7501
  });
7502
- }, v = (i) => typeof i == "string", a1 = () => {
7502
+ }, L = (i) => typeof i == "string", a1 = () => {
7503
7503
  let i, e;
7504
7504
  const t = new Promise((s, n) => {
7505
7505
  i = s, e = n;
@@ -7509,8 +7509,8 @@ const R3 = (i, e) => {
7509
7509
  i.forEach((s) => {
7510
7510
  e[s] && (t[s] = e[s]);
7511
7511
  });
7512
- }, E3 = /###/g, G1 = (i) => i && i.indexOf("###") > -1 ? i.replace(E3, ".") : i, K1 = (i) => !i || v(i), h1 = (i, e, t) => {
7513
- const s = v(e) ? e.split(".") : e;
7512
+ }, E3 = /###/g, G1 = (i) => i && i.indexOf("###") > -1 ? i.replace(E3, ".") : i, K1 = (i) => !i || L(i), h1 = (i, e, t) => {
7513
+ const s = L(e) ? e.split(".") : e;
7514
7514
  let n = 0;
7515
7515
  for (; n < s.length - 1; ) {
7516
7516
  if (K1(i)) return {};
@@ -7552,7 +7552,7 @@ const R3 = (i, e) => {
7552
7552
  return s !== void 0 ? s : p1(e, t);
7553
7553
  }, re = (i, e, t) => {
7554
7554
  for (const s in e)
7555
- s !== "__proto__" && s !== "constructor" && (s in i ? v(i[s]) || i[s] instanceof String || v(e[s]) || e[s] instanceof String ? t && (i[s] = e[s]) : re(i[s], e[s], t) : i[s] = e[s]);
7555
+ s !== "__proto__" && s !== "constructor" && (s in i ? L(i[s]) || i[s] instanceof String || L(e[s]) || e[s] instanceof String ? t && (i[s] = e[s]) : re(i[s], e[s], t) : i[s] = e[s]);
7556
7556
  return i;
7557
7557
  }, i1 = (i) => i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
7558
7558
  var V3 = {
@@ -7563,7 +7563,7 @@ var V3 = {
7563
7563
  "'": "&#39;",
7564
7564
  "/": "&#x2F;"
7565
7565
  };
7566
- const I3 = (i) => v(i) ? i.replace(/[&<>"'\/]/g, (e) => V3[e]) : i;
7566
+ const I3 = (i) => L(i) ? i.replace(/[&<>"'\/]/g, (e) => V3[e]) : i;
7567
7567
  class S3 {
7568
7568
  constructor(e) {
7569
7569
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
@@ -7597,11 +7597,11 @@ const O3 = [" ", ",", "?", "!", ";"], A3 = new S3(20), B3 = (i, e, t) => {
7597
7597
  if (!n || typeof n != "object")
7598
7598
  return;
7599
7599
  let c, r = "";
7600
- for (let g = a; g < s.length; ++g)
7601
- if (g !== a && (r += t), r += s[g], c = n[r], c !== void 0) {
7602
- if (["string", "number", "boolean"].indexOf(typeof c) > -1 && g < s.length - 1)
7600
+ for (let d = a; d < s.length; ++d)
7601
+ if (d !== a && (r += t), r += s[d], c = n[r], c !== void 0) {
7602
+ if (["string", "number", "boolean"].indexOf(typeof c) > -1 && d < s.length - 1)
7603
7603
  continue;
7604
- a += g - a + 1;
7604
+ a += d - a + 1;
7605
7605
  break;
7606
7606
  }
7607
7607
  n = c;
@@ -7652,7 +7652,7 @@ class w1 {
7652
7652
  return this.forward(t, "warn", "WARNING DEPRECATED: ", !0);
7653
7653
  }
7654
7654
  forward(e, t, s, n) {
7655
- return n && !this.debug ? null : (v(e[0]) && (e[0] = `${s}${this.prefix} ${e[0]}`), this.logger[t](e));
7655
+ return n && !this.debug ? null : (L(e[0]) && (e[0] = `${s}${this.prefix} ${e[0]}`), this.logger[t](e));
7656
7656
  }
7657
7657
  create(e) {
7658
7658
  return new w1(this.logger, {
@@ -7664,7 +7664,7 @@ class w1 {
7664
7664
  return e = e || this.options, e.prefix = e.prefix || this.prefix, new w1(this.logger, e);
7665
7665
  }
7666
7666
  }
7667
- var F = new w1();
7667
+ var Y = new w1();
7668
7668
  class L1 {
7669
7669
  constructor() {
7670
7670
  this.observers = {};
@@ -7689,12 +7689,12 @@ class L1 {
7689
7689
  for (var t = arguments.length, s = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
7690
7690
  s[n - 1] = arguments[n];
7691
7691
  this.observers[e] && Array.from(this.observers[e].entries()).forEach((c) => {
7692
- let [r, g] = c;
7693
- for (let d = 0; d < g; d++)
7692
+ let [r, d] = c;
7693
+ for (let g = 0; g < d; g++)
7694
7694
  r(...s);
7695
7695
  }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach((c) => {
7696
- let [r, g] = c;
7697
- for (let d = 0; d < g; d++)
7696
+ let [r, d] = c;
7697
+ for (let g = 0; g < d; g++)
7698
7698
  r.apply(r, [e, ...s]);
7699
7699
  });
7700
7700
  }
@@ -7718,9 +7718,9 @@ class $1 extends L1 {
7718
7718
  let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
7719
7719
  const a = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator, c = n.ignoreJSONStructure !== void 0 ? n.ignoreJSONStructure : this.options.ignoreJSONStructure;
7720
7720
  let r;
7721
- e.indexOf(".") > -1 ? r = e.split(".") : (r = [e, t], s && (Array.isArray(s) ? r.push(...s) : v(s) && a ? r.push(...s.split(a)) : r.push(s)));
7722
- const g = p1(this.data, r);
7723
- return !g && !t && !s && e.indexOf(".") > -1 && (e = r[0], t = r[1], s = r.slice(2).join(".")), g || !c || !v(s) ? g : E1(this.data && this.data[e] && this.data[e][t], s, a);
7721
+ e.indexOf(".") > -1 ? r = e.split(".") : (r = [e, t], s && (Array.isArray(s) ? r.push(...s) : L(s) && a ? r.push(...s.split(a)) : r.push(s)));
7722
+ const d = p1(this.data, r);
7723
+ return !d && !t && !s && e.indexOf(".") > -1 && (e = r[0], t = r[1], s = r.slice(2).join(".")), d || !c || !L(s) ? d : E1(this.data && this.data[e] && this.data[e][t], s, a);
7724
7724
  }
7725
7725
  addResource(e, t, s, n) {
7726
7726
  let a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
@@ -7735,7 +7735,7 @@ class $1 extends L1 {
7735
7735
  silent: !1
7736
7736
  };
7737
7737
  for (const a in s)
7738
- (v(s[a]) || Array.isArray(s[a])) && this.addResource(e, t, a, s[a], {
7738
+ (L(s[a]) || Array.isArray(s[a])) && this.addResource(e, t, a, s[a], {
7739
7739
  silent: !0
7740
7740
  });
7741
7741
  n.silent || this.emit("added", e, t, s);
@@ -7746,11 +7746,11 @@ class $1 extends L1 {
7746
7746
  skipCopy: !1
7747
7747
  }, r = [e, t];
7748
7748
  e.indexOf(".") > -1 && (r = e.split("."), n = s, s = t, t = r[1]), this.addNamespaces(t);
7749
- let g = p1(this.data, r) || {};
7750
- c.skipCopy || (s = JSON.parse(JSON.stringify(s))), n ? re(g, s, a) : g = {
7751
- ...g,
7749
+ let d = p1(this.data, r) || {};
7750
+ c.skipCopy || (s = JSON.parse(JSON.stringify(s))), n ? re(d, s, a) : d = {
7751
+ ...d,
7752
7752
  ...s
7753
- }, P1(this.data, r, g), c.silent || this.emit("added", e, t, s);
7753
+ }, P1(this.data, r, d), c.silent || this.emit("added", e, t, s);
7754
7754
  }
7755
7755
  removeResourceBundle(e, t) {
7756
7756
  this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
@@ -7789,7 +7789,7 @@ const F1 = {};
7789
7789
  class m1 extends L1 {
7790
7790
  constructor(e) {
7791
7791
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
7792
- super(), b3(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = F.create("translator");
7792
+ super(), b3(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = Y.create("translator");
7793
7793
  }
7794
7794
  changeLanguage(e) {
7795
7795
  e && (this.language = e);
@@ -7810,18 +7810,18 @@ class m1 extends L1 {
7810
7810
  let a = t.ns || this.options.defaultNS || [];
7811
7811
  const c = s && e.indexOf(s) > -1, r = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !B3(e, s, n);
7812
7812
  if (c && !r) {
7813
- const g = e.match(this.interpolator.nestingRegexp);
7814
- if (g && g.length > 0)
7813
+ const d = e.match(this.interpolator.nestingRegexp);
7814
+ if (d && d.length > 0)
7815
7815
  return {
7816
7816
  key: e,
7817
- namespaces: v(a) ? [a] : a
7817
+ namespaces: L(a) ? [a] : a
7818
7818
  };
7819
- const d = e.split(s);
7820
- (s !== n || s === n && this.options.ns.indexOf(d[0]) > -1) && (a = d.shift()), e = d.join(n);
7819
+ const g = e.split(s);
7820
+ (s !== n || s === n && this.options.ns.indexOf(g[0]) > -1) && (a = g.shift()), e = g.join(n);
7821
7821
  }
7822
7822
  return {
7823
7823
  key: e,
7824
- namespaces: v(a) ? [a] : a
7824
+ namespaces: L(a) ? [a] : a
7825
7825
  };
7826
7826
  }
7827
7827
  translate(e, t, s) {
@@ -7832,32 +7832,32 @@ class m1 extends L1 {
7832
7832
  const n = t.returnDetails !== void 0 ? t.returnDetails : this.options.returnDetails, a = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator, {
7833
7833
  key: c,
7834
7834
  namespaces: r
7835
- } = this.extractFromKey(e[e.length - 1], t), g = r[r.length - 1], d = t.lng || this.language, l = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
7836
- if (d && d.toLowerCase() === "cimode") {
7835
+ } = this.extractFromKey(e[e.length - 1], t), d = r[r.length - 1], g = t.lng || this.language, l = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
7836
+ if (g && g.toLowerCase() === "cimode") {
7837
7837
  if (l) {
7838
7838
  const f = t.nsSeparator || this.options.nsSeparator;
7839
7839
  return n ? {
7840
- res: `${g}${f}${c}`,
7840
+ res: `${d}${f}${c}`,
7841
7841
  usedKey: c,
7842
7842
  exactUsedKey: c,
7843
- usedLng: d,
7844
- usedNS: g,
7843
+ usedLng: g,
7844
+ usedNS: d,
7845
7845
  usedParams: this.getUsedParamsDetails(t)
7846
- } : `${g}${f}${c}`;
7846
+ } : `${d}${f}${c}`;
7847
7847
  }
7848
7848
  return n ? {
7849
7849
  res: c,
7850
7850
  usedKey: c,
7851
7851
  exactUsedKey: c,
7852
- usedLng: d,
7853
- usedNS: g,
7852
+ usedLng: g,
7853
+ usedNS: d,
7854
7854
  usedParams: this.getUsedParamsDetails(t)
7855
7855
  } : c;
7856
7856
  }
7857
7857
  const h = this.resolve(e, t);
7858
7858
  let C = h && h.res;
7859
- const p = h && h.usedKey || c, L = h && h.exactUsedKey || c, N = Object.prototype.toString.apply(C), k = ["[object Number]", "[object Function]", "[object RegExp]"], E = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, b = !this.i18nFormat || this.i18nFormat.handleAsObject, _ = !v(C) && typeof C != "boolean" && typeof C != "number";
7860
- if (b && C && _ && k.indexOf(N) < 0 && !(v(E) && Array.isArray(C))) {
7859
+ const p = h && h.usedKey || c, k = h && h.exactUsedKey || c, N = Object.prototype.toString.apply(C), m = ["[object Number]", "[object Function]", "[object RegExp]"], E = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, x = !this.i18nFormat || this.i18nFormat.handleAsObject, _ = !L(C) && typeof C != "boolean" && typeof C != "number";
7860
+ if (x && C && _ && m.indexOf(N) < 0 && !(L(E) && Array.isArray(C))) {
7861
7861
  if (!t.returnObjects && !this.options.returnObjects) {
7862
7862
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
7863
7863
  const f = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(p, C, {
@@ -7867,53 +7867,53 @@ class m1 extends L1 {
7867
7867
  return n ? (h.res = f, h.usedParams = this.getUsedParamsDetails(t), h) : f;
7868
7868
  }
7869
7869
  if (a) {
7870
- const f = Array.isArray(C), R = f ? [] : {}, m = f ? L : p;
7870
+ const f = Array.isArray(C), R = f ? [] : {}, b = f ? k : p;
7871
7871
  for (const w in C)
7872
7872
  if (Object.prototype.hasOwnProperty.call(C, w)) {
7873
- const Z = `${m}${a}${w}`;
7874
- R[w] = this.translate(Z, {
7873
+ const I = `${b}${a}${w}`;
7874
+ R[w] = this.translate(I, {
7875
7875
  ...t,
7876
7876
  joinArrays: !1,
7877
7877
  ns: r
7878
- }), R[w] === Z && (R[w] = C[w]);
7878
+ }), R[w] === I && (R[w] = C[w]);
7879
7879
  }
7880
7880
  C = R;
7881
7881
  }
7882
- } else if (b && v(E) && Array.isArray(C))
7882
+ } else if (x && L(E) && Array.isArray(C))
7883
7883
  C = C.join(E), C && (C = this.extendTranslation(C, e, t, s));
7884
7884
  else {
7885
7885
  let f = !1, R = !1;
7886
- const m = t.count !== void 0 && !v(t.count), w = m1.hasDefaultValue(t), Z = m ? this.pluralResolver.getSuffix(d, t.count, t) : "", W = t.ordinal && m ? this.pluralResolver.getSuffix(d, t.count, {
7886
+ const b = t.count !== void 0 && !L(t.count), w = m1.hasDefaultValue(t), I = b ? this.pluralResolver.getSuffix(g, t.count, t) : "", Z = t.ordinal && b ? this.pluralResolver.getSuffix(g, t.count, {
7887
7887
  ordinal: !1
7888
- }) : "", O = m && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), V = O && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${Z}`] || t[`defaultValue${W}`] || t.defaultValue;
7889
- !this.isValidLookup(C) && w && (f = !0, C = V), this.isValidLookup(C) || (R = !0, C = c);
7890
- const G = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && R ? void 0 : C, K = w && V !== C && this.options.updateMissing;
7891
- if (R || f || K) {
7892
- if (this.logger.log(K ? "updateKey" : "missingKey", d, g, c, K ? V : C), a) {
7893
- const B = this.resolve(c, {
7888
+ }) : "", D = b && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), S = D && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${I}`] || t[`defaultValue${Z}`] || t.defaultValue;
7889
+ !this.isValidLookup(C) && w && (f = !0, C = S), this.isValidLookup(C) || (R = !0, C = c);
7890
+ const P = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && R ? void 0 : C, A = w && S !== C && this.options.updateMissing;
7891
+ if (R || f || A) {
7892
+ if (this.logger.log(A ? "updateKey" : "missingKey", g, d, c, A ? S : C), a) {
7893
+ const W = this.resolve(c, {
7894
7894
  ...t,
7895
7895
  keySeparator: !1
7896
7896
  });
7897
- B && B.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.");
7898
- }
7899
- let H = [];
7900
- const Y = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
7901
- if (this.options.saveMissingTo === "fallback" && Y && Y[0])
7902
- for (let B = 0; B < Y.length; B++)
7903
- H.push(Y[B]);
7904
- else this.options.saveMissingTo === "all" ? H = this.languageUtils.toResolveHierarchy(t.lng || this.language) : H.push(t.lng || this.language);
7905
- const t1 = (B, A, U) => {
7906
- const z = w && U !== C ? U : G;
7907
- this.options.missingKeyHandler ? this.options.missingKeyHandler(B, g, A, z, K, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(B, g, A, z, K, t), this.emit("missingKey", B, g, A, C);
7897
+ W && W.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.");
7898
+ }
7899
+ let V = [];
7900
+ const $ = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
7901
+ if (this.options.saveMissingTo === "fallback" && $ && $[0])
7902
+ for (let W = 0; W < $.length; W++)
7903
+ V.push($[W]);
7904
+ else this.options.saveMissingTo === "all" ? V = this.languageUtils.toResolveHierarchy(t.lng || this.language) : V.push(t.lng || this.language);
7905
+ const t1 = (W, B, U) => {
7906
+ const z = w && U !== C ? U : P;
7907
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(W, d, B, z, A, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(W, d, B, z, A, t), this.emit("missingKey", W, d, B, C);
7908
7908
  };
7909
- this.options.saveMissing && (this.options.saveMissingPlurals && m ? H.forEach((B) => {
7910
- const A = this.pluralResolver.getSuffixes(B, t);
7911
- O && t[`defaultValue${this.options.pluralSeparator}zero`] && A.indexOf(`${this.options.pluralSeparator}zero`) < 0 && A.push(`${this.options.pluralSeparator}zero`), A.forEach((U) => {
7912
- t1([B], c + U, t[`defaultValue${U}`] || V);
7909
+ this.options.saveMissing && (this.options.saveMissingPlurals && b ? V.forEach((W) => {
7910
+ const B = this.pluralResolver.getSuffixes(W, t);
7911
+ D && t[`defaultValue${this.options.pluralSeparator}zero`] && B.indexOf(`${this.options.pluralSeparator}zero`) < 0 && B.push(`${this.options.pluralSeparator}zero`), B.forEach((U) => {
7912
+ t1([W], c + U, t[`defaultValue${U}`] || S);
7913
7913
  });
7914
- }) : t1(H, c, V));
7914
+ }) : t1(V, c, S));
7915
7915
  }
7916
- C = this.extendTranslation(C, e, t, h, s), R && C === c && this.options.appendNamespaceToMissingKey && (C = `${g}:${c}`), (R || f) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? C = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${g}:${c}` : c, f ? C : void 0) : C = this.options.parseMissingKeyHandler(C));
7916
+ C = this.extendTranslation(C, e, t, h, s), R && C === c && this.options.appendNamespaceToMissingKey && (C = `${d}:${c}`), (R || f) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? C = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${d}:${c}` : c, f ? C : void 0) : C = this.options.parseMissingKeyHandler(C));
7917
7917
  }
7918
7918
  return n ? (h.res = C, h.usedParams = this.getUsedParamsDetails(t), h) : C;
7919
7919
  }
@@ -7934,28 +7934,28 @@ class m1 extends L1 {
7934
7934
  ...s.interpolation
7935
7935
  }
7936
7936
  });
7937
- const d = v(e) && (s && s.interpolation && s.interpolation.skipOnVariables !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
7937
+ const g = L(e) && (s && s.interpolation && s.interpolation.skipOnVariables !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
7938
7938
  let l;
7939
- if (d) {
7939
+ if (g) {
7940
7940
  const C = e.match(this.interpolator.nestingRegexp);
7941
7941
  l = C && C.length;
7942
7942
  }
7943
- let h = s.replace && !v(s.replace) ? s.replace : s;
7943
+ let h = s.replace && !L(s.replace) ? s.replace : s;
7944
7944
  if (this.options.interpolation.defaultVariables && (h = {
7945
7945
  ...this.options.interpolation.defaultVariables,
7946
7946
  ...h
7947
- }), e = this.interpolator.interpolate(e, h, s.lng || this.language || n.usedLng, s), d) {
7947
+ }), e = this.interpolator.interpolate(e, h, s.lng || this.language || n.usedLng, s), g) {
7948
7948
  const C = e.match(this.interpolator.nestingRegexp), p = C && C.length;
7949
7949
  l < p && (s.nest = !1);
7950
7950
  }
7951
7951
  !s.lng && this.options.compatibilityAPI !== "v1" && n && n.res && (s.lng = this.language || n.usedLng), s.nest !== !1 && (e = this.interpolator.nest(e, function() {
7952
- for (var C = arguments.length, p = new Array(C), L = 0; L < C; L++)
7953
- p[L] = arguments[L];
7952
+ for (var C = arguments.length, p = new Array(C), k = 0; k < C; k++)
7953
+ p[k] = arguments[k];
7954
7954
  return a && a[0] === p[0] && !s.context ? (c.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`), null) : c.translate(...p, t);
7955
7955
  }, s)), s.interpolation && this.interpolator.reset();
7956
7956
  }
7957
- const r = s.postProcess || this.options.postProcess, g = v(r) ? [r] : r;
7958
- return e != null && g && g.length && s.applyPostProcessor !== !1 && (e = ae.handle(g, e, t, this.options && this.options.postProcessPassResolved ? {
7957
+ const r = s.postProcess || this.options.postProcess, d = L(r) ? [r] : r;
7958
+ return e != null && d && d.length && s.applyPostProcessor !== !1 && (e = ae.handle(d, e, t, this.options && this.options.postProcessPassResolved ? {
7959
7959
  i18nResolved: {
7960
7960
  ...n,
7961
7961
  usedParams: this.getUsedParamsDetails(s)
@@ -7965,32 +7965,32 @@ class m1 extends L1 {
7965
7965
  }
7966
7966
  resolve(e) {
7967
7967
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s, n, a, c, r;
7968
- return v(e) && (e = [e]), e.forEach((g) => {
7968
+ return L(e) && (e = [e]), e.forEach((d) => {
7969
7969
  if (this.isValidLookup(s)) return;
7970
- const d = this.extractFromKey(g, t), l = d.key;
7970
+ const g = this.extractFromKey(d, t), l = g.key;
7971
7971
  n = l;
7972
- let h = d.namespaces;
7972
+ let h = g.namespaces;
7973
7973
  this.options.fallbackNS && (h = h.concat(this.options.fallbackNS));
7974
- const C = t.count !== void 0 && !v(t.count), p = C && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), L = t.context !== void 0 && (v(t.context) || typeof t.context == "number") && t.context !== "", N = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
7975
- h.forEach((k) => {
7976
- this.isValidLookup(s) || (r = k, !F1[`${N[0]}-${k}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(r) && (F1[`${N[0]}-${k}`] = !0, this.logger.warn(`key "${n}" for languages "${N.join(", ")}" won't get resolved as namespace "${r}" 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!!!")), N.forEach((E) => {
7974
+ const C = t.count !== void 0 && !L(t.count), p = C && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), k = t.context !== void 0 && (L(t.context) || typeof t.context == "number") && t.context !== "", N = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
7975
+ h.forEach((m) => {
7976
+ this.isValidLookup(s) || (r = m, !F1[`${N[0]}-${m}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(r) && (F1[`${N[0]}-${m}`] = !0, this.logger.warn(`key "${n}" for languages "${N.join(", ")}" won't get resolved as namespace "${r}" 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!!!")), N.forEach((E) => {
7977
7977
  if (this.isValidLookup(s)) return;
7978
7978
  c = E;
7979
- const b = [l];
7979
+ const x = [l];
7980
7980
  if (this.i18nFormat && this.i18nFormat.addLookupKeys)
7981
- this.i18nFormat.addLookupKeys(b, l, E, k, t);
7981
+ this.i18nFormat.addLookupKeys(x, l, E, m, t);
7982
7982
  else {
7983
7983
  let f;
7984
7984
  C && (f = this.pluralResolver.getSuffix(E, t.count, t));
7985
- const R = `${this.options.pluralSeparator}zero`, m = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
7986
- if (C && (b.push(l + f), t.ordinal && f.indexOf(m) === 0 && b.push(l + f.replace(m, this.options.pluralSeparator)), p && b.push(l + R)), L) {
7985
+ const R = `${this.options.pluralSeparator}zero`, b = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
7986
+ if (C && (x.push(l + f), t.ordinal && f.indexOf(b) === 0 && x.push(l + f.replace(b, this.options.pluralSeparator)), p && x.push(l + R)), k) {
7987
7987
  const w = `${l}${this.options.contextSeparator}${t.context}`;
7988
- b.push(w), C && (b.push(w + f), t.ordinal && f.indexOf(m) === 0 && b.push(w + f.replace(m, this.options.pluralSeparator)), p && b.push(w + R));
7988
+ x.push(w), C && (x.push(w + f), t.ordinal && f.indexOf(b) === 0 && x.push(w + f.replace(b, this.options.pluralSeparator)), p && x.push(w + R));
7989
7989
  }
7990
7990
  }
7991
7991
  let _;
7992
- for (; _ = b.pop(); )
7993
- this.isValidLookup(s) || (a = _, s = this.getResource(E, k, _, t));
7992
+ for (; _ = x.pop(); )
7993
+ this.isValidLookup(s) || (a = _, s = this.getResource(E, m, _, t));
7994
7994
  }));
7995
7995
  });
7996
7996
  }), {
@@ -8010,7 +8010,7 @@ class m1 extends L1 {
8010
8010
  }
8011
8011
  getUsedParamsDetails() {
8012
8012
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
8013
- const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], s = e.replace && !v(e.replace);
8013
+ const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], s = e.replace && !L(e.replace);
8014
8014
  let n = s ? e.replace : e;
8015
8015
  if (s && typeof e.count < "u" && (n.count = e.count), this.options.interpolation.defaultVariables && (n = {
8016
8016
  ...this.options.interpolation.defaultVariables,
@@ -8035,7 +8035,7 @@ class m1 extends L1 {
8035
8035
  const x1 = (i) => i.charAt(0).toUpperCase() + i.slice(1);
8036
8036
  class Y1 {
8037
8037
  constructor(e) {
8038
- this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = F.create("languageUtils");
8038
+ this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = Y.create("languageUtils");
8039
8039
  }
8040
8040
  getScriptPartFromCode(e) {
8041
8041
  if (e = f1(e), !e || e.indexOf("-") < 0) return null;
@@ -8048,7 +8048,7 @@ class Y1 {
8048
8048
  return this.formatLanguageCode(t[0]);
8049
8049
  }
8050
8050
  formatLanguageCode(e) {
8051
- if (v(e) && e.indexOf("-") > -1) {
8051
+ if (L(e) && e.indexOf("-") > -1) {
8052
8052
  if (typeof Intl < "u" && typeof Intl.getCanonicalLocales < "u")
8053
8053
  try {
8054
8054
  let n = Intl.getCanonicalLocales(e)[0];
@@ -8084,7 +8084,7 @@ class Y1 {
8084
8084
  }
8085
8085
  getFallbackCodes(e, t) {
8086
8086
  if (!e) return [];
8087
- if (typeof e == "function" && (e = e(t)), v(e) && (e = [e]), Array.isArray(e)) return e;
8087
+ if (typeof e == "function" && (e = e(t)), L(e) && (e = [e]), Array.isArray(e)) return e;
8088
8088
  if (!t) return e.default || [];
8089
8089
  let s = e[t];
8090
8090
  return s || (s = e[this.getScriptPartFromCode(t)]), s || (s = e[this.formatLanguageCode(t)]), s || (s = e[this.getLanguagePartFromCode(t)]), s || (s = e.default), s || [];
@@ -8093,7 +8093,7 @@ class Y1 {
8093
8093
  const s = this.getFallbackCodes(t || this.options.fallbackLng || [], e), n = [], a = (c) => {
8094
8094
  c && (this.isSupportedCode(c) ? n.push(c) : this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`));
8095
8095
  };
8096
- return v(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && a(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && a(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && a(this.getLanguagePartFromCode(e))) : v(e) && a(this.formatLanguageCode(e)), s.forEach((c) => {
8096
+ return L(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && a(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && a(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && a(this.getLanguagePartFromCode(e))) : L(e) && a(this.formatLanguageCode(e)), s.forEach((c) => {
8097
8097
  n.indexOf(c) < 0 && a(this.formatLanguageCode(c));
8098
8098
  }), n;
8099
8099
  }
@@ -8235,7 +8235,7 @@ const D3 = ["v1", "v2", "v3"], T3 = ["v4"], U1 = {
8235
8235
  class K3 {
8236
8236
  constructor(e) {
8237
8237
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
8238
- this.languageUtils = e, this.options = t, this.logger = F.create("pluralResolver"), (!this.options.compatibilityJSON || T3.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = G3(), this.pluralRulesCache = {};
8238
+ this.languageUtils = e, this.options = t, this.logger = Y.create("pluralResolver"), (!this.options.compatibilityJSON || T3.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = G3(), this.pluralRulesCache = {};
8239
8239
  }
8240
8240
  addRule(e, t) {
8241
8241
  this.rules[e] = t;
@@ -8259,8 +8259,8 @@ class K3 {
8259
8259
  });
8260
8260
  } catch {
8261
8261
  if (!e.match(/-|_/)) return;
8262
- const g = this.languageUtils.getLanguagePartFromCode(e);
8263
- c = this.getRule(g, t);
8262
+ const d = this.languageUtils.getLanguagePartFromCode(e);
8263
+ c = this.getRule(d, t);
8264
8264
  }
8265
8265
  return this.pluralRulesCache[a] = c, c;
8266
8266
  }
@@ -8298,12 +8298,12 @@ class K3 {
8298
8298
  }
8299
8299
  const z1 = function(i, e, t) {
8300
8300
  let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = H3(i, e, t);
8301
- return !a && n && v(t) && (a = E1(i, t, s), a === void 0 && (a = E1(e, t, s))), a;
8301
+ return !a && n && L(t) && (a = E1(i, t, s), a === void 0 && (a = E1(e, t, s))), a;
8302
8302
  }, R1 = (i) => i.replace(/\$/g, "$$$$");
8303
8303
  class P3 {
8304
8304
  constructor() {
8305
8305
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
8306
- this.logger = F.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || ((t) => t), this.init(e);
8306
+ this.logger = Y.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || ((t) => t), this.init(e);
8307
8307
  }
8308
8308
  init() {
8309
8309
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -8317,19 +8317,19 @@ class P3 {
8317
8317
  prefix: a,
8318
8318
  prefixEscaped: c,
8319
8319
  suffix: r,
8320
- suffixEscaped: g,
8321
- formatSeparator: d,
8320
+ suffixEscaped: d,
8321
+ formatSeparator: g,
8322
8322
  unescapeSuffix: l,
8323
8323
  unescapePrefix: h,
8324
8324
  nestingPrefix: C,
8325
8325
  nestingPrefixEscaped: p,
8326
- nestingSuffix: L,
8326
+ nestingSuffix: k,
8327
8327
  nestingSuffixEscaped: N,
8328
- nestingOptionsSeparator: k,
8328
+ nestingOptionsSeparator: m,
8329
8329
  maxReplaces: E,
8330
- alwaysFormat: b
8330
+ alwaysFormat: x
8331
8331
  } = e.interpolation;
8332
- this.escape = t !== void 0 ? t : I3, this.escapeValue = s !== void 0 ? s : !0, this.useRawValueToEscape = n !== void 0 ? n : !1, this.prefix = a ? i1(a) : c || "{{", this.suffix = r ? i1(r) : g || "}}", this.formatSeparator = d || ",", this.unescapePrefix = l ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = C ? i1(C) : p || i1("$t("), this.nestingSuffix = L ? i1(L) : N || i1(")"), this.nestingOptionsSeparator = k || ",", this.maxReplaces = E || 1e3, this.alwaysFormat = b !== void 0 ? b : !1, this.resetRegExp();
8332
+ this.escape = t !== void 0 ? t : I3, this.escapeValue = s !== void 0 ? s : !0, this.useRawValueToEscape = n !== void 0 ? n : !1, this.prefix = a ? i1(a) : c || "{{", this.suffix = r ? i1(r) : d || "}}", this.formatSeparator = g || ",", this.unescapePrefix = l ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = C ? i1(C) : p || i1("$t("), this.nestingSuffix = k ? i1(k) : N || i1(")"), this.nestingOptionsSeparator = m || ",", this.maxReplaces = E || 1e3, this.alwaysFormat = x !== void 0 ? x : !1, this.resetRegExp();
8333
8333
  }
8334
8334
  reset() {
8335
8335
  this.options && this.init(this.options);
@@ -8340,17 +8340,17 @@ class P3 {
8340
8340
  }
8341
8341
  interpolate(e, t, s, n) {
8342
8342
  let a, c, r;
8343
- const g = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, d = (p) => {
8343
+ const d = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, g = (p) => {
8344
8344
  if (p.indexOf(this.formatSeparator) < 0) {
8345
- const E = z1(t, g, p, this.options.keySeparator, this.options.ignoreJSONStructure);
8345
+ const E = z1(t, d, p, this.options.keySeparator, this.options.ignoreJSONStructure);
8346
8346
  return this.alwaysFormat ? this.format(E, void 0, s, {
8347
8347
  ...n,
8348
8348
  ...t,
8349
8349
  interpolationkey: p
8350
8350
  }) : E;
8351
8351
  }
8352
- const L = p.split(this.formatSeparator), N = L.shift().trim(), k = L.join(this.formatSeparator).trim();
8353
- return this.format(z1(t, g, N, this.options.keySeparator, this.options.ignoreJSONStructure), k, s, {
8352
+ const k = p.split(this.formatSeparator), N = k.shift().trim(), m = k.join(this.formatSeparator).trim();
8353
+ return this.format(z1(t, d, N, this.options.keySeparator, this.options.ignoreJSONStructure), m, s, {
8354
8354
  ...n,
8355
8355
  ...t,
8356
8356
  interpolationkey: N
@@ -8366,19 +8366,19 @@ class P3 {
8366
8366
  safeValue: (p) => this.escapeValue ? R1(this.escape(p)) : R1(p)
8367
8367
  }].forEach((p) => {
8368
8368
  for (r = 0; a = p.regex.exec(e); ) {
8369
- const L = a[1].trim();
8370
- if (c = d(L), c === void 0)
8369
+ const k = a[1].trim();
8370
+ if (c = g(k), c === void 0)
8371
8371
  if (typeof l == "function") {
8372
- const k = l(e, a, n);
8373
- c = v(k) ? k : "";
8374
- } else if (n && Object.prototype.hasOwnProperty.call(n, L))
8372
+ const m = l(e, a, n);
8373
+ c = L(m) ? m : "";
8374
+ } else if (n && Object.prototype.hasOwnProperty.call(n, k))
8375
8375
  c = "";
8376
8376
  else if (h) {
8377
8377
  c = a[0];
8378
8378
  continue;
8379
8379
  } else
8380
- this.logger.warn(`missed to pass in variable ${L} for interpolating ${e}`), c = "";
8381
- else !v(c) && !this.useRawValueToEscape && (c = T1(c));
8380
+ this.logger.warn(`missed to pass in variable ${k} for interpolating ${e}`), c = "";
8381
+ else !L(c) && !this.useRawValueToEscape && (c = T1(c));
8382
8382
  const N = p.safeValue(c);
8383
8383
  if (e = e.replace(a[0], N), h ? (p.regex.lastIndex += c.length, p.regex.lastIndex -= a[0].length) : p.regex.lastIndex = 0, r++, r >= this.maxReplaces)
8384
8384
  break;
@@ -8387,36 +8387,36 @@ class P3 {
8387
8387
  }
8388
8388
  nest(e, t) {
8389
8389
  let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n, a, c;
8390
- const r = (g, d) => {
8390
+ const r = (d, g) => {
8391
8391
  const l = this.nestingOptionsSeparator;
8392
- if (g.indexOf(l) < 0) return g;
8393
- const h = g.split(new RegExp(`${l}[ ]*{`));
8392
+ if (d.indexOf(l) < 0) return d;
8393
+ const h = d.split(new RegExp(`${l}[ ]*{`));
8394
8394
  let C = `{${h[1]}`;
8395
- g = h[0], C = this.interpolate(C, c);
8396
- const p = C.match(/'/g), L = C.match(/"/g);
8397
- (p && p.length % 2 === 0 && !L || L.length % 2 !== 0) && (C = C.replace(/'/g, '"'));
8395
+ d = h[0], C = this.interpolate(C, c);
8396
+ const p = C.match(/'/g), k = C.match(/"/g);
8397
+ (p && p.length % 2 === 0 && !k || k.length % 2 !== 0) && (C = C.replace(/'/g, '"'));
8398
8398
  try {
8399
- c = JSON.parse(C), d && (c = {
8400
- ...d,
8399
+ c = JSON.parse(C), g && (c = {
8400
+ ...g,
8401
8401
  ...c
8402
8402
  });
8403
8403
  } catch (N) {
8404
- return this.logger.warn(`failed parsing options string in nesting for key ${g}`, N), `${g}${l}${C}`;
8404
+ return this.logger.warn(`failed parsing options string in nesting for key ${d}`, N), `${d}${l}${C}`;
8405
8405
  }
8406
- return c.defaultValue && c.defaultValue.indexOf(this.prefix) > -1 && delete c.defaultValue, g;
8406
+ return c.defaultValue && c.defaultValue.indexOf(this.prefix) > -1 && delete c.defaultValue, d;
8407
8407
  };
8408
8408
  for (; n = this.nestingRegexp.exec(e); ) {
8409
- let g = [];
8409
+ let d = [];
8410
8410
  c = {
8411
8411
  ...s
8412
- }, c = c.replace && !v(c.replace) ? c.replace : c, c.applyPostProcessor = !1, delete c.defaultValue;
8413
- let d = !1;
8412
+ }, c = c.replace && !L(c.replace) ? c.replace : c, c.applyPostProcessor = !1, delete c.defaultValue;
8413
+ let g = !1;
8414
8414
  if (n[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(n[1])) {
8415
8415
  const l = n[1].split(this.formatSeparator).map((h) => h.trim());
8416
- n[1] = l.shift(), g = l, d = !0;
8416
+ n[1] = l.shift(), d = l, g = !0;
8417
8417
  }
8418
- if (a = t(r.call(this, n[1].trim(), c), c), a && n[0] === e && !v(a)) return a;
8419
- v(a) || (a = T1(a)), a || (this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`), a = ""), d && (a = g.reduce((l, h) => this.format(l, h, s.lng, {
8418
+ if (a = t(r.call(this, n[1].trim(), c), c), a && n[0] === e && !L(a)) return a;
8419
+ L(a) || (a = T1(a)), a || (this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`), a = ""), g && (a = d.reduce((l, h) => this.format(l, h, s.lng, {
8420
8420
  ...s,
8421
8421
  interpolationkey: n[1].trim()
8422
8422
  }), a.trim())), e = e.replace(n[0], a), this.regexp.lastIndex = 0;
@@ -8433,8 +8433,8 @@ const $3 = (i) => {
8433
8433
  const n = s[1].substring(0, s[1].length - 1);
8434
8434
  e === "currency" && n.indexOf(":") < 0 ? t.currency || (t.currency = n.trim()) : e === "relativetime" && n.indexOf(":") < 0 ? t.range || (t.range = n.trim()) : n.split(";").forEach((c) => {
8435
8435
  if (c) {
8436
- const [r, ...g] = c.split(":"), d = g.join(":").trim().replace(/^'+|'+$/g, ""), l = r.trim();
8437
- t[l] || (t[l] = d), d === "false" && (t[l] = !1), d === "true" && (t[l] = !0), isNaN(d) || (t[l] = parseInt(d, 10));
8436
+ const [r, ...d] = c.split(":"), g = d.join(":").trim().replace(/^'+|'+$/g, ""), l = r.trim();
8437
+ t[l] || (t[l] = g), g === "false" && (t[l] = !1), g === "true" && (t[l] = !0), isNaN(g) || (t[l] = parseInt(g, 10));
8438
8438
  }
8439
8439
  });
8440
8440
  }
@@ -8458,7 +8458,7 @@ const $3 = (i) => {
8458
8458
  class F3 {
8459
8459
  constructor() {
8460
8460
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
8461
- this.logger = F.create("formatter"), this.options = e, this.formats = {
8461
+ this.logger = Y.create("formatter"), this.options = e, this.formats = {
8462
8462
  number: s1((t, s) => {
8463
8463
  const n = new Intl.NumberFormat(t, {
8464
8464
  ...s
@@ -8508,19 +8508,19 @@ class F3 {
8508
8508
  let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
8509
8509
  const a = t.split(this.formatSeparator);
8510
8510
  if (a.length > 1 && a[0].indexOf("(") > 1 && a[0].indexOf(")") < 0 && a.find((r) => r.indexOf(")") > -1)) {
8511
- const r = a.findIndex((g) => g.indexOf(")") > -1);
8511
+ const r = a.findIndex((d) => d.indexOf(")") > -1);
8512
8512
  a[0] = [a[0], ...a.splice(1, r)].join(this.formatSeparator);
8513
8513
  }
8514
- return a.reduce((r, g) => {
8514
+ return a.reduce((r, d) => {
8515
8515
  const {
8516
- formatName: d,
8516
+ formatName: g,
8517
8517
  formatOptions: l
8518
- } = $3(g);
8519
- if (this.formats[d]) {
8518
+ } = $3(d);
8519
+ if (this.formats[g]) {
8520
8520
  let h = r;
8521
8521
  try {
8522
8522
  const C = n && n.formatParams && n.formatParams[n.interpolationkey] || {}, p = C.locale || C.lng || n.locale || n.lng || s;
8523
- h = this.formats[d](r, p, {
8523
+ h = this.formats[g](r, p, {
8524
8524
  ...l,
8525
8525
  ...n,
8526
8526
  ...C
@@ -8530,7 +8530,7 @@ class F3 {
8530
8530
  }
8531
8531
  return h;
8532
8532
  } else
8533
- this.logger.warn(`there was no format function for ${d}`);
8533
+ this.logger.warn(`there was no format function for ${g}`);
8534
8534
  return r;
8535
8535
  }, e);
8536
8536
  }
@@ -8541,16 +8541,16 @@ const Y3 = (i, e) => {
8541
8541
  class U3 extends L1 {
8542
8542
  constructor(e, t, s) {
8543
8543
  let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
8544
- super(), this.backend = e, this.store = t, this.services = s, this.languageUtils = s.languageUtils, this.options = n, this.logger = F.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = n.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = n.maxRetries >= 0 ? n.maxRetries : 5, this.retryTimeout = n.retryTimeout >= 1 ? n.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(s, n.backend, n);
8544
+ super(), this.backend = e, this.store = t, this.services = s, this.languageUtils = s.languageUtils, this.options = n, this.logger = Y.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = n.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = n.maxRetries >= 0 ? n.maxRetries : 5, this.retryTimeout = n.retryTimeout >= 1 ? n.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(s, n.backend, n);
8545
8545
  }
8546
8546
  queueLoad(e, t, s, n) {
8547
- const a = {}, c = {}, r = {}, g = {};
8548
- return e.forEach((d) => {
8547
+ const a = {}, c = {}, r = {}, d = {};
8548
+ return e.forEach((g) => {
8549
8549
  let l = !0;
8550
8550
  t.forEach((h) => {
8551
- const C = `${d}|${h}`;
8552
- !s.reload && this.store.hasResourceBundle(d, h) ? this.state[C] = 2 : this.state[C] < 0 || (this.state[C] === 1 ? c[C] === void 0 && (c[C] = !0) : (this.state[C] = 1, l = !1, c[C] === void 0 && (c[C] = !0), a[C] === void 0 && (a[C] = !0), g[h] === void 0 && (g[h] = !0)));
8553
- }), l || (r[d] = !0);
8551
+ const C = `${g}|${h}`;
8552
+ !s.reload && this.store.hasResourceBundle(g, h) ? this.state[C] = 2 : this.state[C] < 0 || (this.state[C] === 1 ? c[C] === void 0 && (c[C] = !0) : (this.state[C] = 1, l = !1, c[C] === void 0 && (c[C] = !0), a[C] === void 0 && (a[C] = !0), d[h] === void 0 && (d[h] = !0)));
8553
+ }), l || (r[g] = !0);
8554
8554
  }), (Object.keys(a).length || Object.keys(c).length) && this.queue.push({
8555
8555
  pending: c,
8556
8556
  pendingCount: Object.keys(c).length,
@@ -8561,7 +8561,7 @@ class U3 extends L1 {
8561
8561
  toLoad: Object.keys(a),
8562
8562
  pending: Object.keys(c),
8563
8563
  toLoadLanguages: Object.keys(r),
8564
- toLoadNamespaces: Object.keys(g)
8564
+ toLoadNamespaces: Object.keys(d)
8565
8565
  };
8566
8566
  }
8567
8567
  loaded(e, t, s) {
@@ -8570,15 +8570,15 @@ class U3 extends L1 {
8570
8570
  skipCopy: !0
8571
8571
  }), this.state[e] = t ? -1 : 2, t && s && (this.state[e] = 0);
8572
8572
  const r = {};
8573
- this.queue.forEach((g) => {
8574
- _3(g.loaded, [a], c), Y3(g, e), t && g.errors.push(t), g.pendingCount === 0 && !g.done && (Object.keys(g.loaded).forEach((d) => {
8575
- r[d] || (r[d] = {});
8576
- const l = g.loaded[d];
8573
+ this.queue.forEach((d) => {
8574
+ _3(d.loaded, [a], c), Y3(d, e), t && d.errors.push(t), d.pendingCount === 0 && !d.done && (Object.keys(d.loaded).forEach((g) => {
8575
+ r[g] || (r[g] = {});
8576
+ const l = d.loaded[g];
8577
8577
  l.length && l.forEach((h) => {
8578
- r[d][h] === void 0 && (r[d][h] = !0);
8578
+ r[g][h] === void 0 && (r[g][h] = !0);
8579
8579
  });
8580
- }), g.done = !0, g.errors.length ? g.callback(g.errors) : g.callback());
8581
- }), this.emit("loaded", r), this.queue = this.queue.filter((g) => !g.done);
8580
+ }), d.done = !0, d.errors.length ? d.callback(d.errors) : d.callback());
8581
+ }), this.emit("loaded", r), this.queue = this.queue.filter((d) => !d.done);
8582
8582
  }
8583
8583
  read(e, t, s) {
8584
8584
  let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, c = arguments.length > 5 ? arguments[5] : void 0;
@@ -8595,35 +8595,35 @@ class U3 extends L1 {
8595
8595
  return;
8596
8596
  }
8597
8597
  this.readingCalls++;
8598
- const r = (d, l) => {
8598
+ const r = (g, l) => {
8599
8599
  if (this.readingCalls--, this.waitingReads.length > 0) {
8600
8600
  const h = this.waitingReads.shift();
8601
8601
  this.read(h.lng, h.ns, h.fcName, h.tried, h.wait, h.callback);
8602
8602
  }
8603
- if (d && l && n < this.maxRetries) {
8603
+ if (g && l && n < this.maxRetries) {
8604
8604
  setTimeout(() => {
8605
8605
  this.read.call(this, e, t, s, n + 1, a * 2, c);
8606
8606
  }, a);
8607
8607
  return;
8608
8608
  }
8609
- c(d, l);
8610
- }, g = this.backend[s].bind(this.backend);
8611
- if (g.length === 2) {
8609
+ c(g, l);
8610
+ }, d = this.backend[s].bind(this.backend);
8611
+ if (d.length === 2) {
8612
8612
  try {
8613
- const d = g(e, t);
8614
- d && typeof d.then == "function" ? d.then((l) => r(null, l)).catch(r) : r(null, d);
8615
- } catch (d) {
8616
- r(d);
8613
+ const g = d(e, t);
8614
+ g && typeof g.then == "function" ? g.then((l) => r(null, l)).catch(r) : r(null, g);
8615
+ } catch (g) {
8616
+ r(g);
8617
8617
  }
8618
8618
  return;
8619
8619
  }
8620
- return g(e, t, r);
8620
+ return d(e, t, r);
8621
8621
  }
8622
8622
  prepareLoading(e, t) {
8623
8623
  let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = arguments.length > 3 ? arguments[3] : void 0;
8624
8624
  if (!this.backend)
8625
8625
  return this.logger.warn("No backend was added via i18next.use. Will not load resources."), n && n();
8626
- v(e) && (e = this.languageUtils.toResolveHierarchy(e)), v(t) && (t = [t]);
8626
+ L(e) && (e = this.languageUtils.toResolveHierarchy(e)), L(t) && (t = [t]);
8627
8627
  const a = this.queueLoad(e, t, s, n);
8628
8628
  if (!a.toLoad.length)
8629
8629
  return a.pending.length || n(), null;
@@ -8655,19 +8655,19 @@ class U3 extends L1 {
8655
8655
  }
8656
8656
  if (!(s == null || s === "")) {
8657
8657
  if (this.backend && this.backend.create) {
8658
- const g = {
8658
+ const d = {
8659
8659
  ...c,
8660
8660
  isUpdate: a
8661
- }, d = this.backend.create.bind(this.backend);
8662
- if (d.length < 6)
8661
+ }, g = this.backend.create.bind(this.backend);
8662
+ if (g.length < 6)
8663
8663
  try {
8664
8664
  let l;
8665
- d.length === 5 ? l = d(e, t, s, n, g) : l = d(e, t, s, n), l && typeof l.then == "function" ? l.then((h) => r(null, h)).catch(r) : r(null, l);
8665
+ g.length === 5 ? l = g(e, t, s, n, d) : l = g(e, t, s, n), l && typeof l.then == "function" ? l.then((h) => r(null, h)).catch(r) : r(null, l);
8666
8666
  } catch (l) {
8667
8667
  r(l);
8668
8668
  }
8669
8669
  else
8670
- d(e, t, s, n, r, g);
8670
+ g(e, t, s, n, r, d);
8671
8671
  }
8672
8672
  !e || !e[0] || this.store.addResource(e[0], t, s, n);
8673
8673
  }
@@ -8708,7 +8708,7 @@ const J1 = () => ({
8708
8708
  appendNamespaceToCIMode: !1,
8709
8709
  overloadTranslationOptionHandler: (i) => {
8710
8710
  let e = {};
8711
- if (typeof i[1] == "object" && (e = i[1]), v(i[1]) && (e.defaultValue = i[1]), v(i[2]) && (e.tDescription = i[2]), typeof i[2] == "object" || typeof i[3] == "object") {
8711
+ if (typeof i[1] == "object" && (e = i[1]), L(i[1]) && (e.defaultValue = i[1]), L(i[2]) && (e.tDescription = i[2]), typeof i[2] == "object" || typeof i[3] == "object") {
8712
8712
  const t = i[3] || i[2];
8713
8713
  Object.keys(t).forEach((s) => {
8714
8714
  e[s] = t[s];
@@ -8729,7 +8729,7 @@ const J1 = () => ({
8729
8729
  maxReplaces: 1e3,
8730
8730
  skipOnVariables: !0
8731
8731
  }
8732
- }), Q1 = (i) => (v(i.ns) && (i.ns = [i.ns]), v(i.fallbackLng) && (i.fallbackLng = [i.fallbackLng]), v(i.fallbackNS) && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i), g1 = () => {
8732
+ }), Q1 = (i) => (L(i.ns) && (i.ns = [i.ns]), L(i.fallbackLng) && (i.fallbackLng = [i.fallbackLng]), L(i.fallbackNS) && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i), g1 = () => {
8733
8733
  }, z3 = (i) => {
8734
8734
  Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach((t) => {
8735
8735
  typeof i[t] == "function" && (i[t] = i[t].bind(i));
@@ -8738,7 +8738,7 @@ const J1 = () => ({
8738
8738
  class c1 extends L1 {
8739
8739
  constructor() {
8740
8740
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
8741
- if (super(), this.options = Q1(e), this.services = {}, this.logger = F, this.modules = {
8741
+ if (super(), this.options = Q1(e), this.services = {}, this.logger = Y, this.modules = {
8742
8742
  external: []
8743
8743
  }, z3(this), t && !this.isInitialized && !e.isClone) {
8744
8744
  if (!this.options.initImmediate)
@@ -8751,7 +8751,7 @@ class c1 extends L1 {
8751
8751
  init() {
8752
8752
  var e = this;
8753
8753
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, s = arguments.length > 1 ? arguments[1] : void 0;
8754
- this.isInitializing = !0, typeof t == "function" && (s = t, t = {}), !t.defaultNS && t.defaultNS !== !1 && t.ns && (v(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
8754
+ this.isInitializing = !0, typeof t == "function" && (s = t, t = {}), !t.defaultNS && t.defaultNS !== !1 && t.ns && (L(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
8755
8755
  const n = J1();
8756
8756
  this.options = {
8757
8757
  ...n,
@@ -8763,25 +8763,25 @@ class c1 extends L1 {
8763
8763
  }), t.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = t.keySeparator), t.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = t.nsSeparator);
8764
8764
  const a = (l) => l ? typeof l == "function" ? new l() : l : null;
8765
8765
  if (!this.options.isClone) {
8766
- this.modules.logger ? F.init(a(this.modules.logger), this.options) : F.init(null, this.options);
8766
+ this.modules.logger ? Y.init(a(this.modules.logger), this.options) : Y.init(null, this.options);
8767
8767
  let l;
8768
8768
  this.modules.formatter ? l = this.modules.formatter : typeof Intl < "u" && (l = F3);
8769
8769
  const h = new Y1(this.options);
8770
8770
  this.store = new $1(this.options.resources, this.options);
8771
8771
  const C = this.services;
8772
- C.logger = F, C.resourceStore = this.store, C.languageUtils = h, C.pluralResolver = new K3(h, {
8772
+ C.logger = Y, C.resourceStore = this.store, C.languageUtils = h, C.pluralResolver = new K3(h, {
8773
8773
  prepend: this.options.pluralSeparator,
8774
8774
  compatibilityJSON: this.options.compatibilityJSON,
8775
8775
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
8776
8776
  }), l && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (C.formatter = a(l), C.formatter.init(C, this.options), this.options.interpolation.format = C.formatter.format.bind(C.formatter)), C.interpolator = new P3(this.options), C.utils = {
8777
8777
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
8778
8778
  }, C.backendConnector = new U3(a(this.modules.backend), C.resourceStore, C, this.options), C.backendConnector.on("*", function(p) {
8779
- for (var L = arguments.length, N = new Array(L > 1 ? L - 1 : 0), k = 1; k < L; k++)
8780
- N[k - 1] = arguments[k];
8779
+ for (var k = arguments.length, N = new Array(k > 1 ? k - 1 : 0), m = 1; m < k; m++)
8780
+ N[m - 1] = arguments[m];
8781
8781
  e.emit(p, ...N);
8782
8782
  }), this.modules.languageDetector && (C.languageDetector = a(this.modules.languageDetector), C.languageDetector.init && C.languageDetector.init(C, this.options.detection, this.options)), this.modules.i18nFormat && (C.i18nFormat = a(this.modules.i18nFormat), C.i18nFormat.init && C.i18nFormat.init(this)), this.translator = new m1(this.services, this.options), this.translator.on("*", function(p) {
8783
- for (var L = arguments.length, N = new Array(L > 1 ? L - 1 : 0), k = 1; k < L; k++)
8784
- N[k - 1] = arguments[k];
8783
+ for (var k = arguments.length, N = new Array(k > 1 ? k - 1 : 0), m = 1; m < k; m++)
8784
+ N[m - 1] = arguments[m];
8785
8785
  e.emit(p, ...N);
8786
8786
  }), this.modules.external.forEach((p) => {
8787
8787
  p.init && p.init(this);
@@ -8800,27 +8800,27 @@ class c1 extends L1 {
8800
8800
  return e.store[l](...arguments), e;
8801
8801
  };
8802
8802
  });
8803
- const g = a1(), d = () => {
8803
+ const d = a1(), g = () => {
8804
8804
  const l = (h, C) => {
8805
- 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), g.resolve(C), s(h, C);
8805
+ 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), d.resolve(C), s(h, C);
8806
8806
  };
8807
8807
  if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized) return l(null, this.t.bind(this));
8808
8808
  this.changeLanguage(this.options.lng, l);
8809
8809
  };
8810
- return this.options.resources || !this.options.initImmediate ? d() : setTimeout(d, 0), g;
8810
+ return this.options.resources || !this.options.initImmediate ? g() : setTimeout(g, 0), d;
8811
8811
  }
8812
8812
  loadResources(e) {
8813
8813
  let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : g1;
8814
- const n = v(e) ? e : this.language;
8814
+ const n = L(e) ? e : this.language;
8815
8815
  if (typeof e == "function" && (s = e), !this.options.resources || this.options.partialBundledLanguages) {
8816
8816
  if (n && n.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return s();
8817
8817
  const a = [], c = (r) => {
8818
8818
  if (!r || r === "cimode") return;
8819
- this.services.languageUtils.toResolveHierarchy(r).forEach((d) => {
8820
- d !== "cimode" && a.indexOf(d) < 0 && a.push(d);
8819
+ this.services.languageUtils.toResolveHierarchy(r).forEach((g) => {
8820
+ g !== "cimode" && a.indexOf(g) < 0 && a.push(g);
8821
8821
  });
8822
8822
  };
8823
- n ? c(n) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((g) => c(g)), this.options.preload && this.options.preload.forEach((r) => c(r)), this.services.backendConnector.load(a, this.options.ns, (r) => {
8823
+ n ? c(n) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((d) => c(d)), this.options.preload && this.options.preload.forEach((r) => c(r)), this.services.backendConnector.load(a, this.options.ns, (r) => {
8824
8824
  !r && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), s(r);
8825
8825
  });
8826
8826
  } else
@@ -8852,19 +8852,19 @@ class c1 extends L1 {
8852
8852
  this.isLanguageChangingTo = e;
8853
8853
  const n = a1();
8854
8854
  this.emit("languageChanging", e);
8855
- const a = (g) => {
8856
- this.language = g, this.languages = this.services.languageUtils.toResolveHierarchy(g), this.resolvedLanguage = void 0, this.setResolvedLanguage(g);
8857
- }, c = (g, d) => {
8858
- d ? (a(d), this.translator.changeLanguage(d), this.isLanguageChangingTo = void 0, this.emit("languageChanged", d), this.logger.log("languageChanged", d)) : this.isLanguageChangingTo = void 0, n.resolve(function() {
8855
+ const a = (d) => {
8856
+ this.language = d, this.languages = this.services.languageUtils.toResolveHierarchy(d), this.resolvedLanguage = void 0, this.setResolvedLanguage(d);
8857
+ }, c = (d, g) => {
8858
+ g ? (a(g), this.translator.changeLanguage(g), this.isLanguageChangingTo = void 0, this.emit("languageChanged", g), this.logger.log("languageChanged", g)) : this.isLanguageChangingTo = void 0, n.resolve(function() {
8859
8859
  return s.t(...arguments);
8860
- }), t && t(g, function() {
8860
+ }), t && t(d, function() {
8861
8861
  return s.t(...arguments);
8862
8862
  });
8863
- }, r = (g) => {
8864
- !e && !g && this.services.languageDetector && (g = []);
8865
- const d = v(g) ? g : this.services.languageUtils.getBestMatchFromCodes(g);
8866
- d && (this.language || a(d), this.translator.language || this.translator.changeLanguage(d), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(d)), this.loadResources(d, (l) => {
8867
- c(l, d);
8863
+ }, r = (d) => {
8864
+ !e && !d && this.services.languageDetector && (d = []);
8865
+ const g = L(d) ? d : this.services.languageUtils.getBestMatchFromCodes(d);
8866
+ g && (this.language || a(g), this.translator.language || this.translator.changeLanguage(g), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(g)), this.loadResources(g, (l) => {
8867
+ c(l, g);
8868
8868
  });
8869
8869
  };
8870
8870
  return !e && this.services.languageDetector && !this.services.languageDetector.async ? r(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(r) : this.services.languageDetector.detect(r) : r(e), n;
@@ -8872,21 +8872,21 @@ class c1 extends L1 {
8872
8872
  getFixedT(e, t, s) {
8873
8873
  var n = this;
8874
8874
  const a = function(c, r) {
8875
- let g;
8875
+ let d;
8876
8876
  if (typeof r != "object") {
8877
- for (var d = arguments.length, l = new Array(d > 2 ? d - 2 : 0), h = 2; h < d; h++)
8877
+ for (var g = arguments.length, l = new Array(g > 2 ? g - 2 : 0), h = 2; h < g; h++)
8878
8878
  l[h - 2] = arguments[h];
8879
- g = n.options.overloadTranslationOptionHandler([c, r].concat(l));
8879
+ d = n.options.overloadTranslationOptionHandler([c, r].concat(l));
8880
8880
  } else
8881
- g = {
8881
+ d = {
8882
8882
  ...r
8883
8883
  };
8884
- g.lng = g.lng || a.lng, g.lngs = g.lngs || a.lngs, g.ns = g.ns || a.ns, g.keyPrefix !== "" && (g.keyPrefix = g.keyPrefix || s || a.keyPrefix);
8884
+ d.lng = d.lng || a.lng, d.lngs = d.lngs || a.lngs, d.ns = d.ns || a.ns, d.keyPrefix !== "" && (d.keyPrefix = d.keyPrefix || s || a.keyPrefix);
8885
8885
  const C = n.options.keySeparator || ".";
8886
8886
  let p;
8887
- return g.keyPrefix && Array.isArray(c) ? p = c.map((L) => `${g.keyPrefix}${C}${L}`) : p = g.keyPrefix ? `${g.keyPrefix}${C}${c}` : c, n.t(p, g);
8887
+ return d.keyPrefix && Array.isArray(c) ? p = c.map((k) => `${d.keyPrefix}${C}${k}`) : p = d.keyPrefix ? `${d.keyPrefix}${C}${c}` : c, n.t(p, d);
8888
8888
  };
8889
- return v(e) ? a.lng = e : a.lngs = e, a.ns = t, a.keyPrefix = s, a;
8889
+ return L(e) ? a.lng = e : a.lngs = e, a.ns = t, a.keyPrefix = s, a;
8890
8890
  }
8891
8891
  t() {
8892
8892
  return this.translator && this.translator.translate(...arguments);
@@ -8905,9 +8905,9 @@ class c1 extends L1 {
8905
8905
  return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
8906
8906
  const s = t.lng || this.resolvedLanguage || this.languages[0], n = this.options ? this.options.fallbackLng : !1, a = this.languages[this.languages.length - 1];
8907
8907
  if (s.toLowerCase() === "cimode") return !0;
8908
- const c = (r, g) => {
8909
- const d = this.services.backendConnector.state[`${r}|${g}`];
8910
- return d === -1 || d === 0 || d === 2;
8908
+ const c = (r, d) => {
8909
+ const g = this.services.backendConnector.state[`${r}|${d}`];
8910
+ return g === -1 || g === 0 || g === 2;
8911
8911
  };
8912
8912
  if (t.precheck) {
8913
8913
  const r = t.precheck(this, c);
@@ -8917,7 +8917,7 @@ class c1 extends L1 {
8917
8917
  }
8918
8918
  loadNamespaces(e, t) {
8919
8919
  const s = a1();
8920
- return this.options.ns ? (v(e) && (e = [e]), e.forEach((n) => {
8920
+ return this.options.ns ? (L(e) && (e = [e]), e.forEach((n) => {
8921
8921
  this.options.ns.indexOf(n) < 0 && this.options.ns.push(n);
8922
8922
  }), this.loadResources((n) => {
8923
8923
  s.resolve(), t && t(n);
@@ -8925,7 +8925,7 @@ class c1 extends L1 {
8925
8925
  }
8926
8926
  loadLanguages(e, t) {
8927
8927
  const s = a1();
8928
- v(e) && (e = [e]);
8928
+ L(e) && (e = [e]);
8929
8929
  const n = this.options.preload || [], a = e.filter((c) => n.indexOf(c) < 0 && this.services.languageUtils.isSupportedCode(c));
8930
8930
  return a.length ? (this.options.preload = n.concat(a), this.loadResources((c) => {
8931
8931
  s.resolve(), t && t(c);
@@ -8956,9 +8956,9 @@ class c1 extends L1 {
8956
8956
  }, a.services.utils = {
8957
8957
  hasLoadedNamespace: a.hasLoadedNamespace.bind(a)
8958
8958
  }, s && (a.store = new $1(this.store.data, n), a.services.resourceStore = a.store), a.translator = new m1(a.services, n), a.translator.on("*", function(r) {
8959
- for (var g = arguments.length, d = new Array(g > 1 ? g - 1 : 0), l = 1; l < g; l++)
8960
- d[l - 1] = arguments[l];
8961
- a.emit(r, ...d);
8959
+ for (var d = arguments.length, g = new Array(d > 1 ? d - 1 : 0), l = 1; l < d; l++)
8960
+ g[l - 1] = arguments[l];
8961
+ a.emit(r, ...g);
8962
8962
  }), a.init(n, t), a.translator.options = n, a.translator.backendConnector.services.utils = {
8963
8963
  hasLoadedNamespace: a.hasLoadedNamespace.bind(a)
8964
8964
  }, a;
@@ -8973,22 +8973,22 @@ class c1 extends L1 {
8973
8973
  };
8974
8974
  }
8975
8975
  }
8976
- const T = c1.createInstance();
8977
- T.createInstance = c1.createInstance;
8978
- T.createInstance;
8979
- T.dir;
8980
- T.init;
8981
- T.loadResources;
8982
- T.reloadResources;
8983
- T.use;
8984
- T.changeLanguage;
8985
- T.getFixedT;
8986
- T.t;
8987
- T.exists;
8988
- T.setDefaultNamespace;
8989
- T.hasLoadedNamespace;
8990
- T.loadNamespaces;
8991
- T.loadLanguages;
8976
+ const G = c1.createInstance();
8977
+ G.createInstance = c1.createInstance;
8978
+ G.createInstance;
8979
+ G.dir;
8980
+ G.init;
8981
+ G.loadResources;
8982
+ G.reloadResources;
8983
+ G.use;
8984
+ G.changeLanguage;
8985
+ G.getFixedT;
8986
+ G.t;
8987
+ G.exists;
8988
+ G.setDefaultNamespace;
8989
+ G.hasLoadedNamespace;
8990
+ G.loadNamespaces;
8991
+ G.loadLanguages;
8992
8992
  const J3 = "Archived", Q3 = "Deleted", q3 = {
8993
8993
  archived: J3,
8994
8994
  deleted: Q3
@@ -8996,7 +8996,7 @@ const J3 = "Archived", Q3 = "Deleted", q3 = {
8996
8996
  archived: X3,
8997
8997
  deleted: e0
8998
8998
  };
8999
- T.use(v3).init({
8999
+ G.use(v3).init({
9000
9000
  defaultNS: "common",
9001
9001
  lng: "en",
9002
9002
  resources: {
@@ -9017,116 +9017,119 @@ const l0 = k1(
9017
9017
  value: n,
9018
9018
  onChange: a,
9019
9019
  onError: c,
9020
- allowEmpty: r = !1
9020
+ allowEmpty: r = !1,
9021
+ showAvatar: d = !1
9021
9022
  }, g) => {
9022
- const { axiosPeople: d, locale: l } = e1(Ne), { t: h } = y3("common", { lng: l }), [C, p] = j([]), [L, N] = j(!0), k = X(C);
9023
- if (!d)
9023
+ const { axiosPeople: l, locale: h } = e1(Ne), { t: C } = y3("common", { lng: h }), [p, k] = j([]), [N, m] = j(!0), E = X(p);
9024
+ if (!l)
9024
9025
  throw new Error(
9025
9026
  `UserSelect requires "axiosPeople" to fetch users.
9026
9027
  Please provide it via SNMTUiContext.`
9027
9028
  );
9028
- const E = D(
9029
- (m) => {
9030
- let w = "";
9031
- return m.deletedAt && (w += `[${h("deleted")}] `), m.status === C1.ARCHIVED && (w += `[${h("archived")}] `), `${w}${m.firstName} ${m.lastName}`;
9029
+ const x = T(
9030
+ (w) => {
9031
+ let I = "";
9032
+ return w.deletedAt && (I += `[${C("deleted")}] `), w.status === C1.ARCHIVED && (I += `[${C("archived")}] `), `${I}${w.firstName} ${w.lastName}`;
9032
9033
  },
9033
- [h]
9034
- ), b = D(
9034
+ [C]
9035
+ ), _ = T(
9035
9036
  async ({
9036
- offset: m,
9037
- limit: w,
9037
+ offset: w,
9038
+ limit: I,
9038
9039
  search: Z
9039
9040
  }) => {
9040
- var W, O, V;
9041
+ var D, S, H;
9041
9042
  try {
9042
- const I = await d.post("v1/users/search", {
9043
- offset: m,
9044
- limit: w,
9043
+ const P = await l.post("v1/users/search", {
9044
+ offset: w,
9045
+ limit: I,
9045
9046
  search: Z,
9046
9047
  ...i,
9047
9048
  includeCount: !0
9048
- }), { data: G, metadata: K } = I.data;
9049
+ }), { data: A, metadata: V } = P.data;
9049
9050
  return {
9050
- options: G.map((H) => ({
9051
- value: H.id,
9052
- label: E(H)
9051
+ options: A.map(($) => ({
9052
+ value: $.id,
9053
+ label: x($),
9054
+ image: d ? $.avatarUrl : void 0
9053
9055
  })),
9054
- count: K.count
9056
+ count: V.count
9055
9057
  };
9056
- } catch (I) {
9058
+ } catch (P) {
9057
9059
  return c && c({
9058
- status: ((W = I.response) == null ? void 0 : W.status) ?? 500,
9059
- message: ((V = (O = I.response) == null ? void 0 : O.data) == null ? void 0 : V.message) ?? "Error while fetching options"
9060
+ status: ((D = P.response) == null ? void 0 : D.status) ?? 500,
9061
+ message: ((H = (S = P.response) == null ? void 0 : S.data) == null ? void 0 : H.message) ?? "Error while fetching options"
9060
9062
  }), {
9061
9063
  options: [],
9062
9064
  count: 0
9063
9065
  };
9064
9066
  }
9065
9067
  },
9066
- [d, i, c, E]
9067
- ), _ = D(
9068
- async (m) => {
9069
- var w, Z, W;
9068
+ [l, i, x, d, c]
9069
+ ), f = T(
9070
+ async (w) => {
9071
+ var I, Z, D;
9070
9072
  try {
9071
- const O = m.filter(
9072
- (G) => !k.current.some((K) => K.value === G)
9073
+ const S = w.filter(
9074
+ (A) => !E.current.some((V) => V.value === A)
9073
9075
  );
9074
- let V = [];
9075
- O.length && (V = (await d.post("v1/users/search", {
9076
+ let H = [];
9077
+ S.length && (H = (await l.post("v1/users/search", {
9076
9078
  filters: {
9077
- id: O,
9079
+ id: S,
9078
9080
  status: [C1.ACTIVE, C1.ARCHIVED]
9079
9081
  }
9080
9082
  })).data.data);
9081
- const I = V.map((G) => ({
9082
- value: G.id,
9083
- label: E(G)
9083
+ const P = H.map((A) => ({
9084
+ value: A.id,
9085
+ label: x(A),
9086
+ image: d ? A.avatarUrl : void 0
9084
9087
  }));
9085
- return [...k.current, ...I];
9086
- } catch (O) {
9088
+ return [...E.current, ...P];
9089
+ } catch (S) {
9087
9090
  return c && c({
9088
- status: ((w = O.response) == null ? void 0 : w.status) ?? 500,
9089
- message: ((W = (Z = O.response) == null ? void 0 : Z.data) == null ? void 0 : W.message) ?? "Error while fetching selected items"
9091
+ status: ((I = S.response) == null ? void 0 : I.status) ?? 500,
9092
+ message: ((D = (Z = S.response) == null ? void 0 : Z.data) == null ? void 0 : D.message) ?? "Error while fetching selected items"
9090
9093
  }), [];
9091
9094
  }
9092
9095
  },
9093
- [d, E, c]
9096
+ [l, x, c, d]
9094
9097
  );
9095
- P(() => {
9096
- k.current = C;
9097
- }, [C]), P(() => {
9098
+ K(() => {
9099
+ E.current = p;
9100
+ }, [p]), K(() => {
9098
9101
  if (!n) {
9099
- N(!1);
9102
+ m(!1);
9100
9103
  return;
9101
9104
  }
9102
9105
  (async () => {
9103
- const w = Array.isArray(n) ? n : [n], Z = await _(w);
9104
- p(Z), N(!1);
9106
+ const I = Array.isArray(n) ? n : [n], Z = await f(I);
9107
+ k(Z), m(!1);
9105
9108
  })();
9106
- }, [_, n]);
9107
- const f = D(
9109
+ }, [f, n]);
9110
+ const R = T(
9108
9111
  async ({
9109
- limit: m,
9110
- offset: w,
9112
+ limit: w,
9113
+ offset: I,
9111
9114
  search: Z
9112
9115
  }) => {
9113
- const { count: W, ...O } = await b({
9114
- offset: w,
9115
- limit: m,
9116
+ const { count: D, ...S } = await _({
9117
+ offset: I,
9118
+ limit: w,
9116
9119
  search: Z
9117
9120
  });
9118
- let V = O.options;
9119
- return r && w === 0 && (V = [{ value: null, label: "None" }, ...V]), {
9120
- options: V,
9121
- count: W,
9122
- limit: m
9121
+ let H = S.options;
9122
+ return r && I === 0 && (H = [{ value: null, label: "None" }, ...H]), {
9123
+ options: H,
9124
+ count: D,
9125
+ limit: w
9123
9126
  };
9124
9127
  },
9125
- [r, b]
9128
+ [r, _]
9126
9129
  );
9127
- if (L)
9130
+ if (N)
9128
9131
  return /* @__PURE__ */ o(l3, {});
9129
- const R = {
9132
+ const b = {
9130
9133
  ref: g,
9131
9134
  placeholder: t,
9132
9135
  disabled: s
@@ -9134,24 +9137,24 @@ const l0 = k1(
9134
9137
  return e ? /* @__PURE__ */ o(
9135
9138
  Z1,
9136
9139
  {
9137
- ...R,
9140
+ ...b,
9138
9141
  mode: e,
9139
9142
  value: n,
9140
9143
  onChange: a,
9141
- loadOptions: f,
9144
+ loadOptions: R,
9142
9145
  loadOnClosedState: !0,
9143
- extraOptions: C
9146
+ extraOptions: p
9144
9147
  }
9145
9148
  ) : /* @__PURE__ */ o(
9146
9149
  Z1,
9147
9150
  {
9148
- ...R,
9151
+ ...b,
9149
9152
  value: n,
9150
9153
  mode: void 0,
9151
9154
  onChange: a,
9152
- loadOptions: f,
9155
+ loadOptions: R,
9153
9156
  loadOnClosedState: !0,
9154
- extraOptions: C
9157
+ extraOptions: p
9155
9158
  }
9156
9159
  );
9157
9160
  }