affiliate-front-shared 1.3.27 → 1.3.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export { TableViewOptions, SortDirections, FilterSelectTypes } from './modules/G
10
10
  export { default as ModalHost } from './components/modal-host/ModalHost';
11
11
  export { default as PopupMFA } from './components/popup-mfa/PopupMFA';
12
12
  export { default as MFAModalManager, MFA_STEP } from './components/popup-mfa/mfa-all-popups';
13
+ export type { ConfirmTwoFactorParam } from './components/popup-mfa/mfa-all-popups';
13
14
  export { default as PageBreadcrumb } from './components/page-breadcrumb';
14
15
  export { default as TwoFactorPopup } from './components/two-factor-popup/TwoFactorPopup';
15
16
  export { default as EnterBackupCode } from './components/two-factor-popup/EnterBackupCodes';
package/dist/index.mjs CHANGED
@@ -4,9 +4,9 @@ var lt = (r, e, t) => Mn(r, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { jsx as s, Fragment as oe, jsxs as v } from "react/jsx-runtime";
5
5
  import * as $ from "react";
6
6
  import ft, { createContext as At, useContext as xt, useEffect as K, useState as M, useRef as wt, useMemo as we } from "react";
7
- import { Menu as Fr, DatePicker as jr, Table as Vt, Dropdown as Me, Select as Ft, Button as Oe, Input as _e, Modal as Br, notification as ht, Form as Ae, Checkbox as Pn, Skeleton as zn, Pagination as Hn, Spin as Ct, Breadcrumb as Rn, Empty as _r, Tabs as Ur, Tooltip as Nn, Upload as An } from "antd";
7
+ import { Menu as Fr, DatePicker as jr, Table as Vt, Dropdown as Me, Select as Ft, Button as Oe, Input as Be, Modal as Br, notification as ht, Form as Ne, Checkbox as Pn, Skeleton as zn, Pagination as Hn, Spin as Ct, Breadcrumb as Rn, Empty as _r, Tabs as Ur, Tooltip as Nn, Upload as An } from "antd";
8
8
  import m, { keyframes as Vn } from "styled-components";
9
- import { useNavigate as Pe, useLocation as Ue, useSearchParams as Fn, useParams as jn, UNSAFE_NavigationContext as Bn } from "react-router";
9
+ import { useNavigate as Pe, useLocation as _e, useSearchParams as Fn, useParams as jn, UNSAFE_NavigationContext as Bn } from "react-router";
10
10
  import { create as Gr, useStore as _n } from "zustand";
11
11
  import { useTranslation as Un, initReactI18next as Gn } from "react-i18next";
12
12
  import * as Wn from "echarts";
@@ -22,14 +22,14 @@ function Cl({
22
22
  }) {
23
23
  return /* @__PURE__ */ s(Wr.Provider, { value: r, children: e });
24
24
  }
25
- function ze() {
25
+ function Ue() {
26
26
  return xt(Wr);
27
27
  }
28
28
  let Ce = (r) => r;
29
29
  function tr(r) {
30
30
  Ce = r;
31
31
  }
32
- const j = (r, e) => Ce(`general.${r}`, e), J = (r, e) => Ce(`actions.${r}`, e), G = (r, e) => Ce(`authentication.${r}`, e), de = (r, e) => Ce(`months.${r}`, e), Re = (r, e) => Ce(`date.${r}`, e), Ee = (r, e) => Ce(`weekDays.${r}`, e), Jn = (r, e) => Ce(`noData.${r}`, e), rr = (r, e) => Ce(`comingSoon.${r}`, e);
32
+ const j = (r, e) => Ce(`general.${r}`, e), J = (r, e) => Ce(`actions.${r}`, e), G = (r, e) => Ce(`authentication.${r}`, e), de = (r, e) => Ce(`months.${r}`, e), He = (r, e) => Ce(`date.${r}`, e), Ee = (r, e) => Ce(`weekDays.${r}`, e), Jn = (r, e) => Ce(`noData.${r}`, e), rr = (r, e) => Ce(`comingSoon.${r}`, e);
33
33
  function Sl({ t: r, children: e }) {
34
34
  return tr(r), K(() => {
35
35
  tr(r);
@@ -171,7 +171,7 @@ const jt = (r) => /* @__PURE__ */ $.createElement("svg", { width: 16, height: 16
171
171
  fetchData: u,
172
172
  listItems: i
173
173
  };
174
- }, He = Gr((r, e) => ({
174
+ }, ze = Gr((r, e) => ({
175
175
  user: localStorage.getItem("userData") ? JSON.parse(localStorage.getItem("userData")) : null,
176
176
  prefersDark: !1,
177
177
  storedThemeMode: null,
@@ -272,7 +272,7 @@ const jt = (r) => /* @__PURE__ */ $.createElement("svg", { width: 16, height: 16
272
272
  position: absolute !important;
273
273
  z-index: 10000;
274
274
  `, si = ({ closeProfileDropdown: r }) => {
275
- const e = Pe(), { getCustomers: t, postSelectedCustomer: n } = ze(), { storedThemeMode: i, logout: o, setThemeMode: a, user: l } = He(), { i18n: d } = Un();
275
+ const e = Pe(), { getCustomers: t, postSelectedCustomer: n } = Ue(), { storedThemeMode: i, logout: o, setThemeMode: a, user: l } = ze(), { i18n: d } = Un();
276
276
  function c() {
277
277
  o(), e("/authorization/login");
278
278
  }
@@ -329,7 +329,7 @@ const jt = (r) => /* @__PURE__ */ $.createElement("svg", { width: 16, height: 16
329
329
  "10"
330
330
  ) });
331
331
  }, Bt = ({ items: r, topLogoPrimaryUrl: e, shortName: t }) => {
332
- const n = Ue(), [i, o] = M(!1), a = wt(null), l = () => o((d) => !d);
332
+ const n = _e(), [i, o] = M(!1), a = wt(null), l = () => o((d) => !d);
333
333
  return K(() => {
334
334
  function d(c) {
335
335
  a.current && !a.current.contains(c.target) && o(!1);
@@ -657,7 +657,7 @@ const Di = m.span`
657
657
  /* @__PURE__ */ s(vi, { backgroundcolor: i, children: /* @__PURE__ */ s("img", { src: t, alt: "logo" }) })
658
658
  ] });
659
659
  };
660
- var Le = /* @__PURE__ */ ((r) => (r[r.TABLE = 0] = "TABLE", r[r.LIST = 1] = "LIST", r[r.BOARD = 2] = "BOARD", r))(Le || {}), se = /* @__PURE__ */ ((r) => (r[r.ASC = 0] = "ASC", r[r.DESC = 1] = "DESC", r))(se || {}), Ve = /* @__PURE__ */ ((r) => (r[r.NONE = 0] = "NONE", r[r.COLUMN = 1] = "COLUMN", r[r.TYPE = 2] = "TYPE", r[r.VALUE = 3] = "VALUE", r))(Ve || {}), be = /* @__PURE__ */ ((r) => (r[r.INPUT = 0] = "INPUT", r[r.SELECT = 1] = "SELECT", r[r.TwoComponentSelect = 2] = "TwoComponentSelect", r[r.DATEPICKER = 3] = "DATEPICKER", r[r.MULTISELECT = 4] = "MULTISELECT", r))(be || {});
660
+ var Le = /* @__PURE__ */ ((r) => (r[r.TABLE = 0] = "TABLE", r[r.LIST = 1] = "LIST", r[r.BOARD = 2] = "BOARD", r))(Le || {}), se = /* @__PURE__ */ ((r) => (r[r.ASC = 0] = "ASC", r[r.DESC = 1] = "DESC", r))(se || {}), Ae = /* @__PURE__ */ ((r) => (r[r.NONE = 0] = "NONE", r[r.COLUMN = 1] = "COLUMN", r[r.TYPE = 2] = "TYPE", r[r.VALUE = 3] = "VALUE", r))(Ae || {}), be = /* @__PURE__ */ ((r) => (r[r.INPUT = 0] = "INPUT", r[r.SELECT = 1] = "SELECT", r[r.TwoComponentSelect = 2] = "TwoComponentSelect", r[r.DATEPICKER = 3] = "DATEPICKER", r[r.MULTISELECT = 4] = "MULTISELECT", r))(be || {});
661
661
  const ir = (r) => {
662
662
  let e;
663
663
  const t = /* @__PURE__ */ new Set(), n = (c, u) => {
@@ -766,7 +766,7 @@ const ir = (r) => {
766
766
  if (!e) throw new Error("GridViewStoreProvider is missing");
767
767
  return _n(e, r);
768
768
  }, Mi = () => {
769
- const r = T((u) => u.hydrateFromStorage), e = T((u) => u.isHydrated), t = T((u) => u.filters), n = T((u) => u.filterItems), i = T((u) => u.sortItems), o = T((u) => u.hideItems), a = T((u) => u.groupByArr), l = T((u) => u.activeTableView), d = T((u) => u.selectedConfig), c = Ue();
769
+ const r = T((u) => u.hydrateFromStorage), e = T((u) => u.isHydrated), t = T((u) => u.filters), n = T((u) => u.filterItems), i = T((u) => u.sortItems), o = T((u) => u.hideItems), a = T((u) => u.groupByArr), l = T((u) => u.activeTableView), d = T((u) => u.selectedConfig), c = _e();
770
770
  K(() => (r(`grid-filters:${c.pathname}`), sessionStorage.clear()), []), K(() => {
771
771
  e && sessionStorage.setItem(
772
772
  `grid-filters:${c.pathname}`,
@@ -1297,7 +1297,7 @@ const _t = m.div`
1297
1297
  ...c,
1298
1298
  {
1299
1299
  ...f,
1300
- selectType: Ve.VALUE
1300
+ selectType: Ae.VALUE
1301
1301
  }
1302
1302
  ]), o(!1);
1303
1303
  }
@@ -1437,7 +1437,7 @@ const _t = m.div`
1437
1437
  "/tags": 13
1438
1438
  /* Tag */
1439
1439
  }, rn = () => {
1440
- const { pathname: r } = Ue(), e = Object.keys(sr).find(
1440
+ const { pathname: r } = _e(), e = Object.keys(sr).find(
1441
1441
  (t) => r === t || r.startsWith(t + "/")
1442
1442
  );
1443
1443
  return e ? sr[e] : void 0;
@@ -1464,7 +1464,7 @@ const Zi = ({
1464
1464
  } catch {
1465
1465
  return !1;
1466
1466
  }
1467
- }), [P, S] = M(!1), { open: E } = $e(), [k, H] = M(!1), { getMyFilters: U } = ze(), Y = rn(), [B, F] = M([]), R = T((x) => x.selectedConfig), b = T((x) => x.setSelectedConfig), N = T((x) => x.configsVersion);
1467
+ }), [P, S] = M(!1), { open: E } = $e(), [k, H] = M(!1), { getMyFilters: U } = Ue(), Y = rn(), [B, F] = M([]), R = T((x) => x.selectedConfig), b = T((x) => x.setSelectedConfig), N = T((x) => x.configsVersion);
1468
1468
  K(() => {
1469
1469
  Y == null || !U || U(String(Y)).then((x) => F(x.data ?? []));
1470
1470
  }, [Y, N, U]);
@@ -2085,7 +2085,7 @@ const Qi = (r) => /* @__PURE__ */ $.createElement("svg", { width: 16, height: 16
2085
2085
  color: var(--color-text-inverse-primary, #fff) !important;
2086
2086
  background: var(--color-bg-status-error, #fd7f60) !important;
2087
2087
  }
2088
- `, qt = m(_e)`
2088
+ `, qt = m(Be)`
2089
2089
  input[type='number'] {
2090
2090
  &::-webkit-outer-spin-button,
2091
2091
  &::-webkit-inner-spin-button {
@@ -2198,7 +2198,7 @@ const oo = ({
2198
2198
  postMyFilter: i,
2199
2199
  putMyFilter: o
2200
2200
  }) => {
2201
- const [a] = Ae.useForm(), l = $e((c) => c.setOnOk), d = $e((c) => c.close);
2201
+ const [a] = Ne.useForm(), l = $e((c) => c.setOnOk), d = $e((c) => c.close);
2202
2202
  return K(() => {
2203
2203
  t && a.setFieldsValue({ name: t.name });
2204
2204
  }, [t, a]), K(() => {
@@ -2216,9 +2216,9 @@ const oo = ({
2216
2216
  a.setFields(u);
2217
2217
  }
2218
2218
  });
2219
- }, [r, e, t, n, a, l, d]), /* @__PURE__ */ v(Ae, { form: a, children: [
2219
+ }, [r, e, t, n, a, l, d]), /* @__PURE__ */ v(Ne, { form: a, children: [
2220
2220
  /* @__PURE__ */ s(pe, { children: j("ConfigurationName") }),
2221
- /* @__PURE__ */ s(Ae.Item, { name: "name", children: /* @__PURE__ */ s(qt, {}) })
2221
+ /* @__PURE__ */ s(Ne.Item, { name: "name", children: /* @__PURE__ */ s(qt, {}) })
2222
2222
  ] });
2223
2223
  }, ao = (r) => /* @__PURE__ */ $.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...r }, /* @__PURE__ */ $.createElement("path", { d: "M11.6666 4.65485L10.4881 5.83336L13.8215 9.16669H3.33331V10.8334H13.8215L10.4881 14.1667L11.6666 15.3452L17.0118 10L11.6666 4.65485Z", fill: "currentColor" })), ce = m(ao)`
2224
2224
  cursor: pointer;
@@ -2257,7 +2257,7 @@ const oo = ({
2257
2257
  }
2258
2258
  `, co = ({ item: r }) => {
2259
2259
  var S, E, k, H, U, Y, B, F, R;
2260
- const e = wt(null), t = T((b) => b.filterItems), n = T((b) => b.setFilterItems), [i, o] = M(r.selectType == Ve.VALUE);
2260
+ const e = wt(null), t = T((b) => b.filterItems), n = T((b) => b.setFilterItems), [i, o] = M(r.selectType == Ae.VALUE);
2261
2261
  function a() {
2262
2262
  var b;
2263
2263
  (b = e == null ? void 0 : e.current) == null || b.focus();
@@ -2302,7 +2302,7 @@ const oo = ({
2302
2302
  function f(b) {
2303
2303
  n(
2304
2304
  t.map(
2305
- (N) => N.title == r.title ? { ...b, selectType: Ve.VALUE } : N
2305
+ (N) => N.title == r.title ? { ...b, selectType: Ae.VALUE } : N
2306
2306
  )
2307
2307
  );
2308
2308
  }
@@ -2316,7 +2316,7 @@ const oo = ({
2316
2316
  function g(b) {
2317
2317
  n(
2318
2318
  t.map(
2319
- (N) => N.title == r.title ? { ...N, selectType: Ve.NONE } : N
2319
+ (N) => N.title == r.title ? { ...N, selectType: Ae.NONE } : N
2320
2320
  )
2321
2321
  ), o(b);
2322
2322
  }
@@ -2440,7 +2440,7 @@ const oo = ({
2440
2440
  /* @__PURE__ */ s("span", { onClick: y, children: /* @__PURE__ */ s(Yt, {}) })
2441
2441
  ] });
2442
2442
  }, po = () => {
2443
- const r = T((g) => g.filterItems), e = T((g) => g.sortItems), t = T((g) => g.setSelectedConfig), n = T((g) => g.resetStore), i = T((g) => g.selectedConfig), { deleteMyFilter: o } = ze(), a = T((g) => g.bumpConfigsVersion), { open: l, store: d, close: c } = $e(), u = rn();
2443
+ const r = T((g) => g.filterItems), e = T((g) => g.sortItems), t = T((g) => g.setSelectedConfig), n = T((g) => g.resetStore), i = T((g) => g.selectedConfig), { deleteMyFilter: o } = Ue(), a = T((g) => g.bumpConfigsVersion), { open: l, store: d, close: c } = $e(), u = rn();
2444
2444
  async function p() {
2445
2445
  try {
2446
2446
  if (!i || !o) return;
@@ -3035,7 +3035,7 @@ function ko({ col: r }) {
3035
3035
  ...g,
3036
3036
  {
3037
3037
  ...h,
3038
- selectType: Ve.VALUE
3038
+ selectType: Ae.VALUE
3039
3039
  }
3040
3040
  ]);
3041
3041
  }
@@ -3646,10 +3646,10 @@ function jo(r) {
3646
3646
  }
3647
3647
  return e;
3648
3648
  }
3649
- function je(r) {
3649
+ function Fe(r) {
3650
3650
  return Object.entries(r).map(([e, t]) => ({ name: e.replace(/\[(\d+)\]/g, ".$1").split(".").map((i) => isNaN(i) ? jo(i) : Number(i)), errors: t }));
3651
3651
  }
3652
- m(Ae.Item)`
3652
+ m(Ne.Item)`
3653
3653
  margin-bottom: 2.5rem;
3654
3654
  padding: 0 1.5rem;
3655
3655
  display: flex;
@@ -3910,7 +3910,7 @@ const an = m.span`
3910
3910
  color: var(--color-text-inverse-primary, #131412) !important;
3911
3911
  }
3912
3912
  }
3913
- `, Wo = m(_e.Password)`
3913
+ `, Wo = m(Be.Password)`
3914
3914
  input[type='number'] {
3915
3915
  &::-webkit-outer-spin-button,
3916
3916
  &::-webkit-inner-spin-button {
@@ -4028,7 +4028,7 @@ const an = m.span`
4028
4028
  const g = await e({ confirmationToken: r, code: a, id: i });
4029
4029
  (p = g == null ? void 0 : g.data) != null && p.success && (n(!1), o((y) => !y));
4030
4030
  } catch (g) {
4031
- const y = je((h = (f = g == null ? void 0 : g.response) == null ? void 0 : f.data) == null ? void 0 : h.errors);
4031
+ const y = Fe((h = (f = g == null ? void 0 : g.response) == null ? void 0 : f.data) == null ? void 0 : h.errors);
4032
4032
  c(y), console.log(g);
4033
4033
  }
4034
4034
  }
@@ -4118,7 +4118,7 @@ const Zo = {
4118
4118
  isBlocked: o,
4119
4119
  onBlockStateClose: a
4120
4120
  }) => {
4121
- const { confirmContactInfo: l, confirmContactInfoBackup: d } = ze(), { setUser: c } = He(), [u, p] = M(""), [f, h] = M([]), [g, y] = M(!1);
4121
+ const { confirmContactInfo: l, confirmContactInfoBackup: d } = Ue(), { setUser: c } = ze(), [u, p] = M(""), [f, h] = M([]), [g, y] = M(!1);
4122
4122
  function O(k) {
4123
4123
  p(k);
4124
4124
  }
@@ -4131,7 +4131,7 @@ const Zo = {
4131
4131
  c(H.data.value), E();
4132
4132
  } catch (H) {
4133
4133
  if (console.log(H), H.status === 400) {
4134
- const U = H.response.data, Y = je(U.errors);
4134
+ const U = H.response.data, Y = Fe(U.errors);
4135
4135
  h(Y);
4136
4136
  }
4137
4137
  }
@@ -4145,7 +4145,7 @@ const Zo = {
4145
4145
  c(U.data.value);
4146
4146
  } catch (U) {
4147
4147
  if (console.log(U), U.status === 400) {
4148
- const Y = U.response.data, B = je(Y.errors);
4148
+ const Y = U.response.data, B = Fe(Y.errors);
4149
4149
  h(B);
4150
4150
  }
4151
4151
  }
@@ -4183,7 +4183,7 @@ const Zo = {
4183
4183
  {
4184
4184
  className: f.length > 0 ? "verification-error" : "",
4185
4185
  children: [
4186
- /* @__PURE__ */ s(_e.OTP, { value: u, onChange: O }),
4186
+ /* @__PURE__ */ s(Be.OTP, { value: u, onChange: O }),
4187
4187
  /* @__PURE__ */ v(Ho, { children: [
4188
4188
  G("DidnReceiveCode"),
4189
4189
  " ",
@@ -4210,7 +4210,7 @@ const Zo = {
4210
4210
  ] })
4211
4211
  ] }) });
4212
4212
  }, Qo = () => {
4213
- const { enableContactInfo: r, disableContactInfo: e } = ze(), { setUser: t } = He(), [n, i] = M(!1), [o, a] = M(null), [l, d] = M(!1), c = async () => {
4213
+ const { enableContactInfo: r, disableContactInfo: e } = Ue(), { setUser: t } = ze(), [n, i] = M(!1), [o, a] = M(null), [l, d] = M(!1), c = async () => {
4214
4214
  var f, h, g, y, O, P, S;
4215
4215
  if (r)
4216
4216
  try {
@@ -4254,7 +4254,7 @@ const Zo = {
4254
4254
  };
4255
4255
  }, Xo = ({ close: r }) => {
4256
4256
  var P;
4257
- const { user: e } = He(), t = T((S) => S.columns), n = T((S) => S.groupByArr), i = T((S) => S.hideItems), o = T((S) => S.activeTableView), a = T((S) => S.setActiveTableView), l = T((S) => S.setGroupByArr), d = T((S) => S.setHideItems), c = T((S) => S.resetStore), { handleEnableContactInfo: u, handleDisableContactInfo: p, ContactInfoModalProps: f } = Qo();
4257
+ const { user: e } = ze(), t = T((S) => S.columns), n = T((S) => S.groupByArr), i = T((S) => S.hideItems), o = T((S) => S.activeTableView), a = T((S) => S.setActiveTableView), l = T((S) => S.setGroupByArr), d = T((S) => S.setHideItems), c = T((S) => S.resetStore), { handleEnableContactInfo: u, handleDisableContactInfo: p, ContactInfoModalProps: f } = Qo();
4258
4258
  function h(S) {
4259
4259
  const E = t.find((k) => k.dataIndex == S.value);
4260
4260
  l([E]);
@@ -4383,7 +4383,7 @@ const Zo = {
4383
4383
  }
4384
4384
  }) => {
4385
4385
  var X, me, fe;
4386
- const { user: B } = He(), F = T((Z) => Z.filters), R = T((Z) => Z.filterItems), b = T((Z) => Z.sortItems), N = T((Z) => Z.hideItems), _ = T((Z) => Z.activeTableView), D = T((Z) => Z.setColumns), L = T((Z) => Z.setHasCreateBtn), w = T((Z) => Z.setHasSelect), x = T((Z) => Z.setCheckedValue), { response: C, loading: I } = Yr(
4386
+ const { user: B } = ze(), F = T((Z) => Z.filters), R = T((Z) => Z.filterItems), b = T((Z) => Z.sortItems), N = T((Z) => Z.hideItems), _ = T((Z) => Z.activeTableView), D = T((Z) => Z.setColumns), L = T((Z) => Z.setHasCreateBtn), w = T((Z) => Z.setHasSelect), x = T((Z) => Z.setCheckedValue), { response: C, loading: I } = Yr(
4387
4387
  () => e({ ...F, ...p }),
4388
4388
  [F, B, t]
4389
4389
  );
@@ -4466,7 +4466,7 @@ const Zo = {
4466
4466
  z && /* @__PURE__ */ s(Xo, { close: () => V(!1) })
4467
4467
  ] });
4468
4468
  }, Tl = (r) => /* @__PURE__ */ s(Ii, { children: /* @__PURE__ */ s(ea, { ...r }) }), $l = () => {
4469
- const r = $e((y) => y.isOpen), e = $e((y) => y.options), t = $e((y) => y.close), n = Ue();
4469
+ const r = $e((y) => y.isOpen), e = $e((y) => y.options), t = $e((y) => y.close), n = _e();
4470
4470
  if (K(() => {
4471
4471
  r && t();
4472
4472
  }, [n.pathname]), !e || !r) return null;
@@ -4546,7 +4546,7 @@ const Zo = {
4546
4546
  if (l)
4547
4547
  try {
4548
4548
  const f = await l();
4549
- (c = (d = f.data) == null ? void 0 : d.value) != null && c.isTwoFactorRequired ? (t(f.data.value.token), o(f.data.value.id), e(Be.VERIFY_EMAIL_CODE)) : ((u = f == null ? void 0 : f.data) != null && u.success && !((p = f == null ? void 0 : f.data) != null && p.value) && i((h) => !h), r());
4549
+ (c = (d = f.data) == null ? void 0 : d.value) != null && c.isTwoFactorRequired ? (t(f.data.value.token), o(f.data.value.id), e(je.VERIFY_EMAIL_CODE)) : ((u = f == null ? void 0 : f.data) != null && u.success && !((p = f == null ? void 0 : f.data) != null && p.value) && i((h) => !h), r());
4550
4550
  } catch (f) {
4551
4551
  console.error("Failed to toggle 2FA:", f);
4552
4552
  }
@@ -4560,14 +4560,20 @@ const Zo = {
4560
4560
  /* @__PURE__ */ s("span", { children: j("Email") }),
4561
4561
  /* @__PURE__ */ s(ce, {})
4562
4562
  ] }) }) }),
4563
- /* @__PURE__ */ s(ue, { onClick: () => e(Be.SELECT_AUTHENTICATOR_APP), children: /* @__PURE__ */ s(et, { children: /* @__PURE__ */ v(re, { children: [
4563
+ /* @__PURE__ */ s(ue, { onClick: () => e(je.SELECT_AUTHENTICATOR_APP), children: /* @__PURE__ */ s(et, { children: /* @__PURE__ */ v(re, { children: [
4564
4564
  /* @__PURE__ */ s("span", { children: G("AuthenticatorApp") }),
4565
4565
  /* @__PURE__ */ s(ce, {})
4566
4566
  ] }) }) }),
4567
4567
  /* @__PURE__ */ s(ue, { children: /* @__PURE__ */ s(re, { onClick: r, children: J("Cancel") }) })
4568
4568
  ] });
4569
- }, ra = ({ onClose: r, setCurrentStep: e, setBackupCodes: t, setRefetch: n }) => {
4570
- const { verifyMFA: i } = ze(), [o, a] = M(""), [l, d] = M([]);
4569
+ }, ra = ({
4570
+ onClose: r,
4571
+ setCurrentStep: e,
4572
+ setBackupCodes: t,
4573
+ setRefetch: n,
4574
+ confirmTwoFactorService: i
4575
+ }) => {
4576
+ const [o, a] = M(""), [l, d] = M([]);
4571
4577
  function c(p) {
4572
4578
  a(p);
4573
4579
  }
@@ -4577,7 +4583,7 @@ const Zo = {
4577
4583
  if (p)
4578
4584
  try {
4579
4585
  const h = await p(o);
4580
- (f = h.data) != null && f.success && (e(Be.BACKUP_CODES), t(h.data.value.recoveryCodes));
4586
+ (f = h.data) != null && f.success && (e(je.BACKUP_CODES), t(h.data.value.recoveryCodes));
4581
4587
  } catch (h) {
4582
4588
  console.log(h);
4583
4589
  } finally {
@@ -4590,7 +4596,7 @@ const Zo = {
4590
4596
  /* @__PURE__ */ s(pe, { children: G("YouMaySeeVerificationCode") })
4591
4597
  ] }),
4592
4598
  /* @__PURE__ */ v(ln, { children: [
4593
- /* @__PURE__ */ s(_e.OTP, { value: o, onChange: c }),
4599
+ /* @__PURE__ */ s(Be.OTP, { value: o, onChange: c }),
4594
4600
  l.map((p) => /* @__PURE__ */ v("span", { children: [
4595
4601
  /* @__PURE__ */ s(it, {}),
4596
4602
  p.errors[0]
@@ -4621,7 +4627,7 @@ const Zo = {
4621
4627
  t.map((n) => /* @__PURE__ */ s(
4622
4628
  ue,
4623
4629
  {
4624
- onClick: () => e(Be.CONNECT_AUTHENTICATOR),
4630
+ onClick: () => e(je.CONNECT_AUTHENTICATOR),
4625
4631
  children: /* @__PURE__ */ s(et, { children: /* @__PURE__ */ v(re, { children: [
4626
4632
  /* @__PURE__ */ s("span", { children: n }),
4627
4633
  /* @__PURE__ */ s(ce, {})
@@ -4815,7 +4821,7 @@ function Ye(r, e) {
4815
4821
  const t = e || 255;
4816
4822
  return r > t ? t : r < 0 ? 0 : r;
4817
4823
  }
4818
- class Ne {
4824
+ class Re {
4819
4825
  constructor(e) {
4820
4826
  ie(this, "isValid", !0), ie(this, "r", 0), ie(this, "g", 0), ie(this, "b", 0), ie(this, "a", 1), ie(this, "_h", void 0), ie(this, "_s", void 0), ie(this, "_l", void 0), ie(this, "_v", void 0), ie(this, "_max", void 0), ie(this, "_min", void 0), ie(this, "_brightness", void 0);
4821
4827
  function t(n) {
@@ -4827,7 +4833,7 @@ class Ne {
4827
4833
  };
4828
4834
  const n = e.trim();
4829
4835
  /^#?[A-F\d]{3,8}$/i.test(n) ? this.fromHexString(n) : i("rgb") ? this.fromRgbString(n) : i("hsl") ? this.fromHslString(n) : (i("hsv") || i("hsb")) && this.fromHsvString(n);
4830
- } else if (e instanceof Ne)
4836
+ } else if (e instanceof Re)
4831
4837
  this.r = e.r, this.g = e.g, this.b = e.b, this.a = e.a, this._h = e._h, this._s = e._s, this._l = e._l, this._v = e._v;
4832
4838
  else if (t("rgb"))
4833
4839
  this.r = Ye(e.r), this.g = Ye(e.g), this.b = Ye(e.b), this.a = typeof e.a == "number" ? Ye(e.a, 1) : 1;
@@ -5171,8 +5177,8 @@ function br(r, e, t) {
5171
5177
  return t ? n = r.v + xa * e : n = r.v - wa * e, n = Math.max(0, Math.min(1, n)), Math.round(n * 100) / 100;
5172
5178
  }
5173
5179
  function Sa(r) {
5174
- for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = [], n = new Ne(r), i = n.toHsv(), o = hn; o > 0; o -= 1) {
5175
- var a = new Ne({
5180
+ for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = [], n = new Re(r), i = n.toHsv(), o = hn; o > 0; o -= 1) {
5181
+ var a = new Re({
5176
5182
  h: vr(i, o, !0),
5177
5183
  s: yr(i, o, !0),
5178
5184
  v: br(i, o, !0)
@@ -5181,7 +5187,7 @@ function Sa(r) {
5181
5187
  }
5182
5188
  t.push(n);
5183
5189
  for (var l = 1; l <= gn; l += 1) {
5184
- var d = new Ne({
5190
+ var d = new Re({
5185
5191
  h: vr(i, l),
5186
5192
  s: yr(i, l),
5187
5193
  v: br(i, l)
@@ -5190,7 +5196,7 @@ function Sa(r) {
5190
5196
  }
5191
5197
  return e.theme === "dark" ? Ca.map(function(c) {
5192
5198
  var u = c.index, p = c.amount;
5193
- return new Ne(e.backgroundColor || "#141414").mix(t[u], p).toHexString();
5199
+ return new Re(e.backgroundColor || "#141414").mix(t[u], p).toHexString();
5194
5200
  }) : t.map(function(c) {
5195
5201
  return c.toHexString();
5196
5202
  });
@@ -5549,7 +5555,7 @@ var qa = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "fa
5549
5555
  }, kn = /* @__PURE__ */ $.forwardRef(Za);
5550
5556
  process.env.NODE_ENV !== "production" && (kn.displayName = "DownloadOutlined");
5551
5557
  const Ja = ({ onClose: r, setCurrentStep: e }) => {
5552
- const { initiateMFA: t } = ze(), [n, i] = M(null);
5558
+ const { initiateMFA: t } = Ue(), [n, i] = M(null);
5553
5559
  async function o() {
5554
5560
  if (t)
5555
5561
  try {
@@ -5580,7 +5586,7 @@ const Ja = ({ onClose: r, setCurrentStep: e }) => {
5580
5586
  /* @__PURE__ */ v(
5581
5587
  re,
5582
5588
  {
5583
- onClick: () => e(Be.VERIFY_AUTHENTICATOR_CODE),
5589
+ onClick: () => e(je.VERIFY_AUTHENTICATOR_CODE),
5584
5590
  children: [
5585
5591
  /* @__PURE__ */ s("span", { children: J("Continue") }),
5586
5592
  /* @__PURE__ */ s(ce, {})
@@ -5659,7 +5665,7 @@ const Ja = ({ onClose: r, setCurrentStep: e }) => {
5659
5665
  /* @__PURE__ */ s(pe, { children: G("BackupCodesDesc") })
5660
5666
  ] }),
5661
5667
  /* @__PURE__ */ v(ln, { children: [
5662
- /* @__PURE__ */ s(_e.OTP, { value: o, onChange: c }),
5668
+ /* @__PURE__ */ s(Be.OTP, { value: o, onChange: c }),
5663
5669
  l.map((p) => /* @__PURE__ */ v("span", { children: [
5664
5670
  /* @__PURE__ */ s(it, {}),
5665
5671
  p.errors[0]
@@ -5695,7 +5701,7 @@ const Ja = ({ onClose: r, setCurrentStep: e }) => {
5695
5701
  /* @__PURE__ */ s(ue, { children: /* @__PURE__ */ s(re, { onClick: r, children: J("Cancel") }) })
5696
5702
  ] });
5697
5703
  };
5698
- var Be = /* @__PURE__ */ ((r) => (r[r.SELECT_MFA_OPTION = 0] = "SELECT_MFA_OPTION", r[r.SELECT_AUTHENTICATOR_APP = 1] = "SELECT_AUTHENTICATOR_APP", r[r.CONNECT_AUTHENTICATOR = 2] = "CONNECT_AUTHENTICATOR", r[r.VERIFY_AUTHENTICATOR_CODE = 3] = "VERIFY_AUTHENTICATOR_CODE", r[r.VERIFY_EMAIL_CODE = 4] = "VERIFY_EMAIL_CODE", r[r.DISABLE_AUTHENTICATOR = 5] = "DISABLE_AUTHENTICATOR", r[r.BACKUP_CODES = 6] = "BACKUP_CODES", r[r.ENTER_BACKUP_CODE = 7] = "ENTER_BACKUP_CODE", r))(Be || {});
5704
+ var je = /* @__PURE__ */ ((r) => (r[r.SELECT_MFA_OPTION = 0] = "SELECT_MFA_OPTION", r[r.SELECT_AUTHENTICATOR_APP = 1] = "SELECT_AUTHENTICATOR_APP", r[r.CONNECT_AUTHENTICATOR = 2] = "CONNECT_AUTHENTICATOR", r[r.VERIFY_AUTHENTICATOR_CODE = 3] = "VERIFY_AUTHENTICATOR_CODE", r[r.VERIFY_EMAIL_CODE = 4] = "VERIFY_EMAIL_CODE", r[r.DISABLE_AUTHENTICATOR = 5] = "DISABLE_AUTHENTICATOR", r[r.BACKUP_CODES = 6] = "BACKUP_CODES", r[r.ENTER_BACKUP_CODE = 7] = "ENTER_BACKUP_CODE", r))(je || {});
5699
5705
  const Il = ({
5700
5706
  isOpen: r,
5701
5707
  setIsOpen: e,
@@ -5745,7 +5751,13 @@ const Il = ({
5745
5751
  case 2:
5746
5752
  return { onClose: y, setCurrentStep: d };
5747
5753
  case 3:
5748
- return { onClose: y, setCurrentStep: d, setBackupCodes: g, setRefetch: n };
5754
+ return {
5755
+ onClose: y,
5756
+ setCurrentStep: d,
5757
+ setBackupCodes: g,
5758
+ setRefetch: n,
5759
+ confirmTwoFactorService: a
5760
+ };
5749
5761
  case 4:
5750
5762
  return {
5751
5763
  onClose: y,
@@ -5875,7 +5887,7 @@ const as = {
5875
5887
  const b = await r({ confirmationToken: t, code: u, id: o });
5876
5888
  (B = b == null ? void 0 : b.data) != null && B.success && (d(!1), a && a((N) => !N));
5877
5889
  } catch (b) {
5878
- const N = je((R = (F = b == null ? void 0 : b.response) == null ? void 0 : F.data) == null ? void 0 : R.errors);
5890
+ const N = Fe((R = (F = b == null ? void 0 : b.response) == null ? void 0 : F.data) == null ? void 0 : R.errors);
5879
5891
  P(N), console.log("Error in Save OTP", b);
5880
5892
  }
5881
5893
  }
@@ -5920,7 +5932,7 @@ const as = {
5920
5932
  {
5921
5933
  className: O.length > 0 ? "verification-error" : "",
5922
5934
  children: [
5923
- /* @__PURE__ */ s(_e.OTP, { value: u, onChange: Y }),
5935
+ /* @__PURE__ */ s(Be.OTP, { value: u, onChange: Y }),
5924
5936
  O.map((B) => /* @__PURE__ */ v("span", { children: [
5925
5937
  /* @__PURE__ */ s(it, {}),
5926
5938
  B.errors[0]
@@ -6670,7 +6682,7 @@ function Ms() {
6670
6682
  return (o = t == null ? void 0 : t.revoke) == null || o.call(t), i === Dn ? r : (r.push(i), t = Proxy.revocable(n, e), t.proxy);
6671
6683
  }, Proxy.revocable(/* @__PURE__ */ Object.create(null), e).proxy;
6672
6684
  }
6673
- function Fe(r, e) {
6685
+ function Ve(r, e) {
6674
6686
  const {
6675
6687
  [Dn]: t
6676
6688
  } = r(Ms()), n = (e == null ? void 0 : e.keySeparator) ?? ".", i = (e == null ? void 0 : e.nsSeparator) ?? ":";
@@ -6729,10 +6741,10 @@ class bt extends kt {
6729
6741
  if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = {
6730
6742
  ...i
6731
6743
  }), i || (i = {}), e == null) return "";
6732
- typeof e == "function" && (e = Fe(e, {
6744
+ typeof e == "function" && (e = Ve(e, {
6733
6745
  ...this.options,
6734
6746
  ...i
6735
- })), Array.isArray(e) || (e = [String(e)]), e = e.map((_) => typeof _ == "function" ? Fe(_, {
6747
+ })), Array.isArray(e) || (e = [String(e)]), e = e.map((_) => typeof _ == "function" ? Ve(_, {
6736
6748
  ...this.options,
6737
6749
  ...i
6738
6750
  }) : String(_));
@@ -6874,7 +6886,7 @@ class bt extends kt {
6874
6886
  }
6875
6887
  resolve(e, t = {}) {
6876
6888
  let n, i, o, a, l;
6877
- return A(e) && (e = [e]), Array.isArray(e) && (e = e.map((d) => typeof d == "function" ? Fe(d, {
6889
+ return A(e) && (e = [e]), Array.isArray(e) && (e = e.map((d) => typeof d == "function" ? Ve(d, {
6878
6890
  ...this.options,
6879
6891
  ...t
6880
6892
  }) : d)), e.forEach((d) => {
@@ -7624,10 +7636,10 @@ class Xe extends kt {
7624
7636
  ...this.options,
7625
7637
  ...d
7626
7638
  };
7627
- typeof d.keyPrefix == "function" && (d.keyPrefix = Fe(d.keyPrefix, c));
7639
+ typeof d.keyPrefix == "function" && (d.keyPrefix = Ve(d.keyPrefix, c));
7628
7640
  const u = this.options.keySeparator || ".";
7629
7641
  let p;
7630
- return d.keyPrefix && Array.isArray(o) ? p = o.map((f) => (typeof f == "function" && (f = Fe(f, c)), `${d.keyPrefix}${u}${f}`)) : (typeof o == "function" && (o = Fe(o, c)), p = d.keyPrefix ? `${d.keyPrefix}${u}${o}` : o), this.t(p, d);
7642
+ return d.keyPrefix && Array.isArray(o) ? p = o.map((f) => (typeof f == "function" && (f = Ve(f, c)), `${d.keyPrefix}${u}${f}`)) : (typeof o == "function" && (o = Ve(o, c)), p = d.keyPrefix ? `${d.keyPrefix}${u}${o}` : o), this.t(p, d);
7631
7643
  };
7632
7644
  return A(e) ? i.lng = e : i.lngs = e, i.ns = t, i.keyPrefix = n, i;
7633
7645
  }
@@ -8307,16 +8319,16 @@ const En = /* @__PURE__ */ fn(Bs), _s = ({ setDateFilter: r, setShowRange: e, se
8307
8319
  hasAllFilter: e = !1
8308
8320
  }) => {
8309
8321
  const [t, n] = M([]), i = [
8310
- { key: "week", label: Re("7D"), ...le.getCommonDateRange("week") },
8311
- { key: "month", label: Re("30D"), ...le.getCommonDateRange("month") },
8312
- { key: "threeMonth", label: Re("3M"), ...le.getCommonDateRange("threeMonth") },
8313
- { key: "sixMonth", label: Re("6M"), ...le.getCommonDateRange("sixMonth") },
8322
+ { key: "week", label: He("7D"), ...le.getCommonDateRange("week") },
8323
+ { key: "month", label: He("30D"), ...le.getCommonDateRange("month") },
8324
+ { key: "threeMonth", label: He("3M"), ...le.getCommonDateRange("threeMonth") },
8325
+ { key: "sixMonth", label: He("6M"), ...le.getCommonDateRange("sixMonth") },
8314
8326
  {
8315
8327
  key: "twelveMonth",
8316
- label: Re("12M"),
8328
+ label: He("12M"),
8317
8329
  ...le.getCommonDateRange("twelveMonth")
8318
8330
  },
8319
- { key: "year", label: Re("YTD"), ...le.getCommonDateRange("year") },
8331
+ { key: "year", label: He("YTD"), ...le.getCommonDateRange("year") },
8320
8332
  {
8321
8333
  key: "custom",
8322
8334
  label: t.length === 2 && t[0] !== "" ? `${j("Custom")}: ${t[0]} / ${t[1]}` : j("Custom"),
@@ -8819,7 +8831,7 @@ const Ul = ({
8819
8831
  needsBreadcrumb: a,
8820
8832
  customTabFilter: l
8821
8833
  }) => {
8822
- const { hasPermission: d } = He(), { id: c } = jn(), u = Ue(), p = Pe(), f = we(() => {
8834
+ const { hasPermission: d } = ze(), { id: c } = jn(), u = _e(), p = Pe(), f = we(() => {
8823
8835
  const k = u.pathname.split("/");
8824
8836
  return k[k.length - 1] || n;
8825
8837
  }, [u.pathname, n]), [h, g] = M(null), [y, O] = M(null), P = (k) => {
@@ -8881,7 +8893,7 @@ const Ul = ({
8881
8893
  getItemById: o,
8882
8894
  onSetFormValues: a
8883
8895
  }) => {
8884
- const l = Pe(), [d] = Ae.useForm(), [c, u] = M(r == "new"), [p, f] = M(null), h = async (y) => {
8896
+ const l = Pe(), [d] = Ne.useForm(), [c, u] = M(r == "new"), [p, f] = M(null), h = async (y) => {
8885
8897
  const O = window.location.pathname, P = O.substring(0, O.lastIndexOf("/"));
8886
8898
  try {
8887
8899
  if (p) {
@@ -8893,7 +8905,7 @@ const Ul = ({
8893
8905
  }
8894
8906
  } catch (S) {
8895
8907
  if (S.status === 400) {
8896
- const E = S.response.data, k = je(E.errors);
8908
+ const E = S.response.data, k = Fe(E.errors);
8897
8909
  d.setFields(k);
8898
8910
  }
8899
8911
  }
@@ -8915,13 +8927,13 @@ const Ul = ({
8915
8927
  handleSave: h
8916
8928
  };
8917
8929
  }, Yl = ({ id: r, formItem: e, updateItem: t, addItem: n, getItemById: i }) => {
8918
- const [o] = Ae.useForm(), [a, l] = M(null), d = async (u) => {
8930
+ const [o] = Ne.useForm(), [a, l] = M(null), d = async (u) => {
8919
8931
  try {
8920
8932
  let p;
8921
8933
  return r ? p = await t({ ...u }) : p = await n(u), p;
8922
8934
  } catch (p) {
8923
8935
  if (p.status === 400) {
8924
- const f = p.response.data, h = je(f.errors);
8936
+ const f = p.response.data, h = Fe(f.errors);
8925
8937
  o.setFields(h);
8926
8938
  }
8927
8939
  throw p;
@@ -8949,7 +8961,7 @@ const Ul = ({
8949
8961
  handleSave: d
8950
8962
  };
8951
8963
  }, Kl = () => {
8952
- const r = Pe(), { setUser: e } = He(), [t, n] = M({
8964
+ const r = Pe(), { setUser: e } = ze(), [t, n] = M({
8953
8965
  visible: !1,
8954
8966
  token: ""
8955
8967
  }), i = (a) => {
@@ -8977,7 +8989,7 @@ const Ul = ({
8977
8989
  };
8978
8990
  };
8979
8991
  function ql(r) {
8980
- const { navigator: e } = xt(Bn), t = Ue();
8992
+ const { navigator: e } = xt(Bn), t = _e();
8981
8993
  K(() => {
8982
8994
  if (!r) return;
8983
8995
  const n = e.push, i = e.replace, o = (a) => (...l) => {
@@ -9090,14 +9102,14 @@ export {
9090
9102
  Bl as ExcelExportSelected,
9091
9103
  Rl as ExpandableTable,
9092
9104
  oo as FilterConfiguration,
9093
- Ve as FilterSelectTypes,
9105
+ Ae as FilterSelectTypes,
9094
9106
  qt as GeneralInput,
9095
9107
  pr as GenericModal,
9096
9108
  Gl as GenericTabsPage,
9097
9109
  Tl as GridViewPage,
9098
9110
  pe as LabelText,
9099
9111
  Il as MFAModalManager,
9100
- Be as MFA_STEP,
9112
+ je as MFA_STEP,
9101
9113
  $l as ModalHost,
9102
9114
  to as ModalHostButtonWrapper,
9103
9115
  $o as NoData,
@@ -9131,7 +9143,7 @@ export {
9131
9143
  Ql as numberFormatterWithComma,
9132
9144
  Xl as parseCommissionErrors,
9133
9145
  jo as parseErrorMessageKey,
9134
- je as parseServerErrors,
9146
+ Fe as parseServerErrors,
9135
9147
  Zl as useAutofillStartDetection,
9136
9148
  Qo as useContactInfoController,
9137
9149
  en as useDebounce,
@@ -9142,8 +9154,8 @@ export {
9142
9154
  $e as useModalStore,
9143
9155
  ql as useNavigationGuard,
9144
9156
  Yl as useNewDesignFormController,
9145
- ze as usePackageServices,
9157
+ Ue as usePackageServices,
9146
9158
  Kl as useTwoFactor,
9147
- He as useUserStore
9159
+ ze as useUserStore
9148
9160
  };
9149
9161
  //# sourceMappingURL=index.mjs.map