affiliate-front-shared 1.3.16 → 1.3.17
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/components/two-factor-popup/TwoFactorPopup.d.ts +4 -2
- package/dist/index.cjs +49 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +973 -973
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Be = (n, e, t) =>
|
|
4
|
-
import { jsx as s, Fragment as ae, jsxs as
|
|
5
|
-
import * as
|
|
6
|
-
import Jt, { createContext as Qt, useContext as dt, useEffect as
|
|
7
|
-
import { Menu as Xt, DatePicker as er, Table as pt, Dropdown as we, Select as ut, Button as Ce, Input as tt, Modal as tr, notification as
|
|
1
|
+
var Ir = Object.defineProperty;
|
|
2
|
+
var Tr = (n, e, t) => e in n ? Ir(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var Be = (n, e, t) => Tr(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { jsx as s, Fragment as ae, jsxs as y } from "react/jsx-runtime";
|
|
5
|
+
import * as P from "react";
|
|
6
|
+
import Jt, { createContext as Qt, useContext as dt, useEffect as K, useState as V, useRef as et, useMemo as ve } from "react";
|
|
7
|
+
import { Menu as Xt, DatePicker as er, Table as pt, Dropdown as we, Select as ut, Button as Ce, Input as tt, Modal as tr, notification as _e, Form as $e, Checkbox as Pr, Skeleton as Mr, Pagination as Hr, Breadcrumb as Rr, Spin as rr, Empty as nr, Tabs as ar, Upload as Nr } from "antd";
|
|
8
8
|
import h, { keyframes as Fr } from "styled-components";
|
|
9
|
-
import { useNavigate as ke, useLocation as
|
|
9
|
+
import { useNavigate as ke, useLocation as Ie, useSearchParams as Vr, useParams as Ar, UNSAFE_NavigationContext as jr } from "react-router";
|
|
10
10
|
import { create as ir, useStore as Br } from "zustand";
|
|
11
11
|
import { useTranslation as Gr, initReactI18next as Ur } from "react-i18next";
|
|
12
|
-
import * as
|
|
13
|
-
import
|
|
12
|
+
import * as Wr from "echarts";
|
|
13
|
+
import _r from "react-dom";
|
|
14
14
|
import Yr from "i18next-browser-languagedetector";
|
|
15
15
|
import Kr from "i18next-http-backend";
|
|
16
16
|
import * as Ge from "xlsx";
|
|
@@ -22,20 +22,20 @@ function wo({
|
|
|
22
22
|
}) {
|
|
23
23
|
return /* @__PURE__ */ s(or.Provider, { value: n, children: e });
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Ve() {
|
|
26
26
|
return dt(or);
|
|
27
27
|
}
|
|
28
28
|
let ge = (n) => n;
|
|
29
29
|
function Lt(n) {
|
|
30
30
|
ge = n;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const G = (n, e) => ge(`general.${n}`, e), oe = (n, e) => ge(`actions.${n}`, e), ee = (n, e) => ge(`authentication.${n}`, e), ie = (n, e) => ge(`months.${n}`, e), Le = (n, e) => ge(`date.${n}`, e), ye = (n, e) => ge(`weekDays.${n}`, e), qr = (n, e) => ge(`noData.${n}`, e), $t = (n, e) => ge(`comingSoon.${n}`, e);
|
|
33
33
|
function Co({ t: n, children: e }) {
|
|
34
|
-
return Lt(n),
|
|
34
|
+
return Lt(n), K(() => {
|
|
35
35
|
Lt(n);
|
|
36
36
|
}, [n]), /* @__PURE__ */ s(ae, { children: e });
|
|
37
37
|
}
|
|
38
|
-
const ft = (n) => /* @__PURE__ */
|
|
38
|
+
const ft = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M5.33343 5.72363L8.0001 8.3903L10.6668 5.72363L11.6096 6.66644L8.0001 10.2759L4.39062 6.66644L5.33343 5.72363Z", fill: "currentColor", fillOpacity: 0.75 })), Jr = h(ft)`
|
|
39
39
|
color: var(--color-text-primary, #131412);
|
|
40
40
|
`, Qr = h.div`
|
|
41
41
|
background: var(--color-bg-secondary, #f5f5f5);
|
|
@@ -162,7 +162,7 @@ const ft = (n) => /* @__PURE__ */ M.createElement("svg", { width: 16, height: 16
|
|
|
162
162
|
l(!1);
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
|
-
return
|
|
165
|
+
return K(() => {
|
|
166
166
|
u();
|
|
167
167
|
}, [...e]), {
|
|
168
168
|
response: t,
|
|
@@ -204,7 +204,7 @@ const ft = (n) => /* @__PURE__ */ M.createElement("svg", { width: 16, height: 16
|
|
|
204
204
|
const r = e().user;
|
|
205
205
|
return r != null && r.permissions ? !!r.permissions[t] : !1;
|
|
206
206
|
}
|
|
207
|
-
})),
|
|
207
|
+
})), He = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M13.4715 5.13812L12.5286 4.19531L7.00005 9.72391L4.13812 6.86198L3.19531 7.80479L7.00005 11.6095L13.4715 5.13812Z", fill: "currentColor" })), rn = h(He)`
|
|
208
208
|
display: flex;
|
|
209
209
|
justify-content: center;
|
|
210
210
|
color: var(--color-text-primary, #131412) !important;
|
|
@@ -272,47 +272,47 @@ const ft = (n) => /* @__PURE__ */ M.createElement("svg", { width: 16, height: 16
|
|
|
272
272
|
position: absolute !important;
|
|
273
273
|
z-index: 10000;
|
|
274
274
|
`, sn = ({ closeProfileDropdown: n }) => {
|
|
275
|
-
const e = ke(), { getCustomers: t, postSelectedCustomer: r } =
|
|
275
|
+
const e = ke(), { getCustomers: t, postSelectedCustomer: r } = Ve(), { storedThemeMode: a, logout: i, setThemeMode: o, user: l } = Se(), { i18n: d } = Gr();
|
|
276
276
|
function c() {
|
|
277
277
|
i(), e("/authorization/login");
|
|
278
278
|
}
|
|
279
|
-
function u(
|
|
280
|
-
d.changeLanguage(
|
|
279
|
+
function u(v) {
|
|
280
|
+
d.changeLanguage(v), window.location.reload();
|
|
281
281
|
}
|
|
282
|
-
const p = (
|
|
283
|
-
/* @__PURE__ */ s(an, { children:
|
|
282
|
+
const p = (v, D) => /* @__PURE__ */ y(nn, { children: [
|
|
283
|
+
/* @__PURE__ */ s(an, { children: v }),
|
|
284
284
|
D && /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(rn, {}) })
|
|
285
285
|
] }), { response: m } = sr(t ?? (() => Promise.resolve({ data: [] })), []);
|
|
286
|
-
async function
|
|
286
|
+
async function f(v) {
|
|
287
287
|
if (!r) return;
|
|
288
|
-
const
|
|
289
|
-
localStorage.setItem("useToken",
|
|
288
|
+
const T = (await r(v)).data.value;
|
|
289
|
+
localStorage.setItem("useToken", T.token), localStorage.setItem("userData", JSON.stringify(T));
|
|
290
290
|
}
|
|
291
|
-
const
|
|
291
|
+
const g = () => {
|
|
292
292
|
(l == null ? void 0 : l.type) === "Manager" ? e(`/affiliate-manager/profile/${l.id}`) : e(`/affiliate-users/profile/${l == null ? void 0 : l.affiliateUserId}`);
|
|
293
293
|
};
|
|
294
|
-
return /* @__PURE__ */ s(on, { children: /* @__PURE__ */
|
|
294
|
+
return /* @__PURE__ */ s(on, { children: /* @__PURE__ */ y(
|
|
295
295
|
Q,
|
|
296
296
|
{
|
|
297
297
|
mode: window.innerWidth < 780 ? "inline" : "vertical",
|
|
298
|
-
getPopupContainer: (
|
|
298
|
+
getPopupContainer: (v) => v.parentElement || document.body,
|
|
299
299
|
onClick: () => n(!1),
|
|
300
300
|
children: [
|
|
301
|
-
/* @__PURE__ */ s(Q.Item, { onClick:
|
|
302
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ s(Q.Item, { onClick: g, children: "Profile" }, "10-1"),
|
|
302
|
+
/* @__PURE__ */ y(Q.Item, { children: [
|
|
303
303
|
" ",
|
|
304
304
|
"Notifications"
|
|
305
305
|
] }, "10-2"),
|
|
306
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ y(Q.Item, { children: [
|
|
307
307
|
" ",
|
|
308
308
|
"SecurityAccess"
|
|
309
309
|
] }, "10-3"),
|
|
310
310
|
/* @__PURE__ */ s(Q.Divider, {}),
|
|
311
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ y(Q.SubMenu, { title: "Language", children: [
|
|
312
312
|
/* @__PURE__ */ s(Q.Item, { onClick: () => u("en"), children: p("English", d.language === "en") }, "20-1"),
|
|
313
313
|
/* @__PURE__ */ s(Q.Item, { onClick: () => u("ka"), children: p("Georgian", d.language === "ka") }, "20-2")
|
|
314
314
|
] }, "20"),
|
|
315
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ y(Q.SubMenu, { title: "ColorTheme", children: [
|
|
316
316
|
/* @__PURE__ */ s(Q.Item, { onClick: () => o(!1), children: p("Light", a === !1) }, "30-1"),
|
|
317
317
|
/* @__PURE__ */ s(Q.Item, { onClick: () => o(!0), children: p("Dark", a === !0) }, "30-2"),
|
|
318
318
|
/* @__PURE__ */ s(Q.Item, { onClick: () => o(null), children: p(
|
|
@@ -321,7 +321,7 @@ const ft = (n) => /* @__PURE__ */ M.createElement("svg", { width: 16, height: 16
|
|
|
321
321
|
) }, "30-3")
|
|
322
322
|
] }, "30"),
|
|
323
323
|
/* @__PURE__ */ s(Q.Divider, {}),
|
|
324
|
-
/* @__PURE__ */ s(Q.SubMenu, { title: "ConnectedAccounts", children: ((m == null ? void 0 : m.data) || []).map((
|
|
324
|
+
/* @__PURE__ */ s(Q.SubMenu, { title: "ConnectedAccounts", children: ((m == null ? void 0 : m.data) || []).map((v) => /* @__PURE__ */ s(Q.Item, { onClick: () => f(v.id), children: p(v.name) }, v.id)) }, "40"),
|
|
325
325
|
/* @__PURE__ */ s(Q.Divider, {}),
|
|
326
326
|
/* @__PURE__ */ s(Q.Item, { onClick: c, children: "LogOut" }, "100")
|
|
327
327
|
]
|
|
@@ -329,15 +329,15 @@ const ft = (n) => /* @__PURE__ */ M.createElement("svg", { width: 16, height: 16
|
|
|
329
329
|
"10"
|
|
330
330
|
) });
|
|
331
331
|
}, gt = ({ items: n, topLogoPrimaryUrl: e, shortName: t }) => {
|
|
332
|
-
const r =
|
|
333
|
-
return
|
|
332
|
+
const r = Ie(), [a, i] = V(!1), o = et(null), l = () => i((d) => !d);
|
|
333
|
+
return K(() => {
|
|
334
334
|
function d(c) {
|
|
335
335
|
o.current && !o.current.contains(c.target) && i(!1);
|
|
336
336
|
}
|
|
337
337
|
return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
|
|
338
|
-
}, []), /* @__PURE__ */
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
/* @__PURE__ */
|
|
338
|
+
}, []), /* @__PURE__ */ y(Qr, { className: "sidebar-wrapper", children: [
|
|
339
|
+
/* @__PURE__ */ y(Xr, { ref: o, children: [
|
|
340
|
+
/* @__PURE__ */ y(en, { onClick: l, children: [
|
|
341
341
|
/* @__PURE__ */ s("img", { src: e, alt: "logo" }),
|
|
342
342
|
/* @__PURE__ */ s("span", { children: t }),
|
|
343
343
|
/* @__PURE__ */ s(Jr, {})
|
|
@@ -373,7 +373,7 @@ const ft = (n) => /* @__PURE__ */ M.createElement("svg", { width: 16, height: 16
|
|
|
373
373
|
max-height: 100vh;
|
|
374
374
|
`, dn = h.div`
|
|
375
375
|
background: var(--color-bg-primary, #fff);
|
|
376
|
-
`, ko = ({ children: n }) => /* @__PURE__ */
|
|
376
|
+
`, ko = ({ children: n }) => /* @__PURE__ */ y(ln, { children: [
|
|
377
377
|
/* @__PURE__ */ s(gt, {}),
|
|
378
378
|
/* @__PURE__ */ s(cn, { children: /* @__PURE__ */ s(dn, { children: n }) })
|
|
379
379
|
] }), pn = h.div`
|
|
@@ -525,7 +525,7 @@ const ft = (n) => /* @__PURE__ */ M.createElement("svg", { width: 16, height: 16
|
|
|
525
525
|
flex-direction: column;
|
|
526
526
|
align-items: start !important;
|
|
527
527
|
}
|
|
528
|
-
`, Dt = h.span``, lr = (n) => /* @__PURE__ */
|
|
528
|
+
`, Dt = h.span``, lr = (n) => /* @__PURE__ */ P.createElement("svg", { width: 12, height: 10, viewBox: "0 0 12 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M5.60945 1.66669L2.94279 4.33335H11.3333V5.66669H2.94279L5.60945 8.33335L4.66665 9.27616L0.390503 5.00002L4.66665 0.723877L5.60945 1.66669Z", fill: "currentColor" })), Cn = h(lr)`
|
|
529
529
|
cursor: pointer;
|
|
530
530
|
|
|
531
531
|
svg {
|
|
@@ -606,10 +606,10 @@ const Dn = h.span`
|
|
|
606
606
|
className: r,
|
|
607
607
|
color: a,
|
|
608
608
|
commissionStatus: i
|
|
609
|
-
}) => /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(kn, { children: /* @__PURE__ */
|
|
609
|
+
}) => /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(kn, { children: /* @__PURE__ */ y(Sn, { color: a, onClick: t, className: r, children: [
|
|
610
610
|
/* @__PURE__ */ s($n, { children: e }),
|
|
611
611
|
/* @__PURE__ */ s(Ln, { children: n }),
|
|
612
|
-
i && e ===
|
|
612
|
+
i && e === G("Commission") && /* @__PURE__ */ s(Dn, { color: a, children: i })
|
|
613
613
|
] }) }) }), So = ({
|
|
614
614
|
pageTitle: n,
|
|
615
615
|
pageDesc: e,
|
|
@@ -622,10 +622,10 @@ const Dn = h.span`
|
|
|
622
622
|
function c(u) {
|
|
623
623
|
d(u);
|
|
624
624
|
}
|
|
625
|
-
return /* @__PURE__ */
|
|
626
|
-
/* @__PURE__ */
|
|
625
|
+
return /* @__PURE__ */ y(pn, { children: [
|
|
626
|
+
/* @__PURE__ */ y(gn, { children: [
|
|
627
627
|
/* @__PURE__ */ s("header", { children: l && /* @__PURE__ */ s(fn, { onClick: () => c(l), children: /* @__PURE__ */ s(Cn, {}) }) }),
|
|
628
|
-
/* @__PURE__ */ s(mn, { children: /* @__PURE__ */
|
|
628
|
+
/* @__PURE__ */ s(mn, { children: /* @__PURE__ */ y(hn, { children: [
|
|
629
629
|
/* @__PURE__ */ s(vn, { children: n }),
|
|
630
630
|
/* @__PURE__ */ s(bn, { children: e })
|
|
631
631
|
] }) }),
|
|
@@ -637,7 +637,7 @@ const Dn = h.span`
|
|
|
637
637
|
}
|
|
638
638
|
) }),
|
|
639
639
|
i,
|
|
640
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ y(wn, { children: [
|
|
641
641
|
/* @__PURE__ */ s(
|
|
642
642
|
"img",
|
|
643
643
|
{
|
|
@@ -648,7 +648,7 @@ const Dn = h.span`
|
|
|
648
648
|
alt: "logo"
|
|
649
649
|
}
|
|
650
650
|
),
|
|
651
|
-
/* @__PURE__ */
|
|
651
|
+
/* @__PURE__ */ y("nav", { children: [
|
|
652
652
|
/* @__PURE__ */ s("a", { href: "", children: /* @__PURE__ */ s(Dt, { children: ee("TermsOfUsage") }) }),
|
|
653
653
|
/* @__PURE__ */ s("a", { href: "", children: /* @__PURE__ */ s(Dt, { children: ee("PrivacyPolicy") }) })
|
|
654
654
|
] })
|
|
@@ -664,7 +664,7 @@ const Ot = (n) => {
|
|
|
664
664
|
const p = typeof c == "function" ? c(e) : c;
|
|
665
665
|
if (!Object.is(p, e)) {
|
|
666
666
|
const m = e;
|
|
667
|
-
e = u ?? (typeof p != "object" || p === null) ? p : Object.assign({}, e, p), t.forEach((
|
|
667
|
+
e = u ?? (typeof p != "object" || p === null) ? p : Object.assign({}, e, p), t.forEach((f) => f(e, m));
|
|
668
668
|
}
|
|
669
669
|
}, a = () => e, l = { setState: r, getState: a, getInitialState: () => d, subscribe: (c) => (t.add(c), () => t.delete(c)) }, d = e = n(r, a, l);
|
|
670
670
|
return l;
|
|
@@ -678,7 +678,7 @@ const Ot = (n) => {
|
|
|
678
678
|
hideItems: {},
|
|
679
679
|
groupByArr: [],
|
|
680
680
|
activeTableView: he.TABLE
|
|
681
|
-
},
|
|
681
|
+
}, zn = () => En((n, e) => ({
|
|
682
682
|
columns: [],
|
|
683
683
|
...Et,
|
|
684
684
|
isHydrated: !1,
|
|
@@ -758,16 +758,16 @@ const Ot = (n) => {
|
|
|
758
758
|
selectedConfig: null
|
|
759
759
|
});
|
|
760
760
|
}
|
|
761
|
-
})), dr = Qt(null),
|
|
761
|
+
})), dr = Qt(null), In = ({ children: n }) => {
|
|
762
762
|
const e = et();
|
|
763
|
-
return e.current || (e.current =
|
|
763
|
+
return e.current || (e.current = zn()), /* @__PURE__ */ s(dr.Provider, { value: e.current, children: n });
|
|
764
764
|
}, E = (n) => {
|
|
765
765
|
const e = dt(dr);
|
|
766
766
|
if (!e) throw new Error("GridViewStoreProvider is missing");
|
|
767
767
|
return Br(e, n);
|
|
768
|
-
},
|
|
769
|
-
const n = E((u) => u.hydrateFromStorage), e = E((u) => u.isHydrated), t = E((u) => u.filters), r = E((u) => u.filterItems), a = E((u) => u.sortItems), i = E((u) => u.hideItems), o = E((u) => u.groupByArr), l = E((u) => u.activeTableView), d = E((u) => u.selectedConfig), c =
|
|
770
|
-
|
|
768
|
+
}, Tn = () => {
|
|
769
|
+
const n = E((u) => u.hydrateFromStorage), e = E((u) => u.isHydrated), t = E((u) => u.filters), r = E((u) => u.filterItems), a = E((u) => u.sortItems), i = E((u) => u.hideItems), o = E((u) => u.groupByArr), l = E((u) => u.activeTableView), d = E((u) => u.selectedConfig), c = Ie();
|
|
770
|
+
K(() => (n(`grid-filters:${c.pathname}`), sessionStorage.clear()), []), K(() => {
|
|
771
771
|
e && sessionStorage.setItem(
|
|
772
772
|
`grid-filters:${c.pathname}`,
|
|
773
773
|
JSON.stringify({
|
|
@@ -793,7 +793,7 @@ const Ot = (n) => {
|
|
|
793
793
|
};
|
|
794
794
|
function Pn(n) {
|
|
795
795
|
const [e, t] = V(0);
|
|
796
|
-
return
|
|
796
|
+
return K(() => {
|
|
797
797
|
if (!n.current) return;
|
|
798
798
|
const r = new ResizeObserver(([a]) => {
|
|
799
799
|
t(a.contentRect.height);
|
|
@@ -1195,12 +1195,12 @@ const mt = h.div`
|
|
|
1195
1195
|
overflow: hidden;
|
|
1196
1196
|
`, Un = h.div`
|
|
1197
1197
|
height: ${(n) => n.height || "100%"};
|
|
1198
|
-
`, Ye = (n) => /* @__PURE__ */
|
|
1199
|
-
const r =
|
|
1200
|
-
return
|
|
1198
|
+
`, Ye = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M1.33203 3.33333H14.6654V4.66667H1.33203V3.33333Z", fill: "#131412" }), /* @__PURE__ */ P.createElement("path", { d: "M3.33203 7.33333H12.6654V8.66667H3.33203V7.33333Z", fill: "#131412" }), /* @__PURE__ */ P.createElement("path", { d: "M5.33203 11.3333H10.6654V12.6667H5.33203V11.3333Z", fill: "#131412" })), ur = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.9987 2V4H1.33203V5.33333H3.9987V7.33333H7.9987V5.33333H14.6654V4H7.9987V2H3.9987ZM6.66536 3.33333H5.33203V6H6.66536V3.33333Z", fill: "currentColor" }), /* @__PURE__ */ P.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.9987 8.66667V10.6667H1.33203V12H7.9987V14H11.9987V12H14.6654V10.6667H11.9987V8.66667H7.9987ZM9.33203 10H10.6654V12.6667H9.33203V10Z", fill: "currentColor" })), fr = (n) => /* @__PURE__ */ P.createElement("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M4 12H0V8H4V12Z", fill: "white" }), /* @__PURE__ */ P.createElement("path", { d: "M12 12H8V8H12V12Z", fill: "white" }), /* @__PURE__ */ P.createElement("path", { d: "M4 4H0V0H4V4Z", fill: "white" }), /* @__PURE__ */ P.createElement("path", { d: "M12 4H8V0H12V4Z", fill: "white" })), gr = (n, e, t = []) => {
|
|
1199
|
+
const r = ve(() => Zr(n, e), t);
|
|
1200
|
+
return K(() => () => {
|
|
1201
1201
|
r.cancel();
|
|
1202
1202
|
}, [r]), r;
|
|
1203
|
-
}, ht = (n) => /* @__PURE__ */
|
|
1203
|
+
}, ht = (n) => /* @__PURE__ */ P.createElement("svg", { width: 24, height: 24, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M7.99947 2.38989L3.72266 6.6667L4.66547 7.60951L7.3328 4.94218V13.3334H8.66613V4.94218L11.3335 7.60951L12.2763 6.6667L7.99947 2.38989Z", fill: "currentColor", fillOpacity: 0.75 })), yt = (n) => /* @__PURE__ */ P.createElement("svg", { width: 24, height: 24, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M8.66613 2.66675H7.3328V11.0573L4.66547 8.38994L3.72266 9.33275L7.99947 13.6096L12.2763 9.33275L11.3335 8.38994L8.66613 11.0573V2.66675Z", fill: "currentColor", fillOpacity: 0.75 })), Wn = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M13.7337 6.67614L14.6765 5.73333L11.3337 2.39052L7.99089 5.73333L8.93369 6.67614L10.667 4.94281L10.667 13.3333H12.0004L12.0004 4.94281L13.7337 6.67614Z", fill: "#131412" }), /* @__PURE__ */ P.createElement("path", { d: "M8.00984 10.2667L4.66703 13.6095L1.32422 10.2667L2.26703 9.32385L4.00036 11.0572L4.00036 2.66666L5.33369 2.66666L5.33369 11.0572L7.06703 9.32386L8.00984 10.2667Z", fill: "#131412" })), _n = ({ children: n, overlay: e, placement: t = "bottomRight" }) => {
|
|
1204
1204
|
const [r, a] = V(!1);
|
|
1205
1205
|
return /* @__PURE__ */ s(
|
|
1206
1206
|
we,
|
|
@@ -1214,17 +1214,17 @@ const mt = h.div`
|
|
|
1214
1214
|
}
|
|
1215
1215
|
);
|
|
1216
1216
|
}, mr = ({ placement: n, children: e }) => {
|
|
1217
|
-
const t = E((
|
|
1217
|
+
const t = E((f) => f.columns), r = E((f) => f.sortItems), a = E((f) => f.setSortItems), i = r[0], [o, l] = V(""), [d, c] = V(
|
|
1218
1218
|
(i == null ? void 0 : i.direction) === re.ASC ? re.ASC : re.DESC
|
|
1219
1219
|
), u = t.filter(
|
|
1220
|
-
(
|
|
1220
|
+
(f) => f.title.toLowerCase().includes(o.toLowerCase()) && f.sortable !== !1
|
|
1221
1221
|
);
|
|
1222
|
-
function p(
|
|
1222
|
+
function p(f, g) {
|
|
1223
1223
|
a([
|
|
1224
1224
|
{
|
|
1225
|
-
title:
|
|
1226
|
-
dataIndex:
|
|
1227
|
-
direction:
|
|
1225
|
+
title: f.title,
|
|
1226
|
+
dataIndex: f.dataIndex.charAt(0).toUpperCase() + f.dataIndex.slice(1),
|
|
1227
|
+
direction: g
|
|
1228
1228
|
}
|
|
1229
1229
|
]);
|
|
1230
1230
|
}
|
|
@@ -1232,33 +1232,33 @@ const mt = h.div`
|
|
|
1232
1232
|
a([]);
|
|
1233
1233
|
}
|
|
1234
1234
|
return /* @__PURE__ */ s(
|
|
1235
|
-
|
|
1235
|
+
_n,
|
|
1236
1236
|
{
|
|
1237
|
-
overlay: (
|
|
1237
|
+
overlay: (f) => /* @__PURE__ */ y(mt, { children: [
|
|
1238
1238
|
/* @__PURE__ */ s(
|
|
1239
1239
|
"input",
|
|
1240
1240
|
{
|
|
1241
1241
|
type: "text",
|
|
1242
1242
|
placeholder: "Search...",
|
|
1243
1243
|
value: o,
|
|
1244
|
-
onChange: (
|
|
1244
|
+
onChange: (g) => l(g.target.value)
|
|
1245
1245
|
}
|
|
1246
1246
|
),
|
|
1247
|
-
/* @__PURE__ */ s("div", { children: u.map((
|
|
1247
|
+
/* @__PURE__ */ s("div", { children: u.map((g, v) => /* @__PURE__ */ y(
|
|
1248
1248
|
"button",
|
|
1249
1249
|
{
|
|
1250
1250
|
onClick: () => {
|
|
1251
|
-
|
|
1251
|
+
g.title == (i == null ? void 0 : i.title) ? m() : p(g, d);
|
|
1252
1252
|
},
|
|
1253
1253
|
children: [
|
|
1254
|
-
|
|
1255
|
-
|
|
1254
|
+
g.title,
|
|
1255
|
+
g.title == (i == null ? void 0 : i.title) && /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(He, {}) })
|
|
1256
1256
|
]
|
|
1257
1257
|
},
|
|
1258
|
-
|
|
1258
|
+
v
|
|
1259
1259
|
)) }),
|
|
1260
|
-
/* @__PURE__ */
|
|
1261
|
-
/* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ y("div", { children: [
|
|
1261
|
+
/* @__PURE__ */ y(
|
|
1262
1262
|
"button",
|
|
1263
1263
|
{
|
|
1264
1264
|
onClick: () => {
|
|
@@ -1267,11 +1267,11 @@ const mt = h.div`
|
|
|
1267
1267
|
children: [
|
|
1268
1268
|
/* @__PURE__ */ s(ht, {}),
|
|
1269
1269
|
"Ascending",
|
|
1270
|
-
d === re.ASC && /* @__PURE__ */ s(
|
|
1270
|
+
d === re.ASC && /* @__PURE__ */ s(He, {})
|
|
1271
1271
|
]
|
|
1272
1272
|
}
|
|
1273
1273
|
),
|
|
1274
|
-
/* @__PURE__ */
|
|
1274
|
+
/* @__PURE__ */ y(
|
|
1275
1275
|
"button",
|
|
1276
1276
|
{
|
|
1277
1277
|
onClick: () => {
|
|
@@ -1280,14 +1280,14 @@ const mt = h.div`
|
|
|
1280
1280
|
children: [
|
|
1281
1281
|
/* @__PURE__ */ s(yt, {}),
|
|
1282
1282
|
"Descending",
|
|
1283
|
-
d === re.DESC && /* @__PURE__ */ s(
|
|
1283
|
+
d === re.DESC && /* @__PURE__ */ s(He, {})
|
|
1284
1284
|
]
|
|
1285
1285
|
}
|
|
1286
1286
|
)
|
|
1287
1287
|
] })
|
|
1288
1288
|
] }),
|
|
1289
1289
|
placement: n || "bottomRight",
|
|
1290
|
-
children: e || /* @__PURE__ */ s(
|
|
1290
|
+
children: e || /* @__PURE__ */ s(Wn, {})
|
|
1291
1291
|
}
|
|
1292
1292
|
);
|
|
1293
1293
|
}, bt = ({ placement: n, children: e, onSelect: t, CustomFilters: r }) => {
|
|
@@ -1307,7 +1307,7 @@ const mt = h.div`
|
|
|
1307
1307
|
open: a,
|
|
1308
1308
|
onOpenChange: i,
|
|
1309
1309
|
placement: n || "bottomRight",
|
|
1310
|
-
popupRender: () => /* @__PURE__ */
|
|
1310
|
+
popupRender: () => /* @__PURE__ */ y(mt, { children: [
|
|
1311
1311
|
/* @__PURE__ */ s(
|
|
1312
1312
|
"input",
|
|
1313
1313
|
{
|
|
@@ -1317,7 +1317,7 @@ const mt = h.div`
|
|
|
1317
1317
|
onChange: (m) => l(m.target.value)
|
|
1318
1318
|
}
|
|
1319
1319
|
),
|
|
1320
|
-
/* @__PURE__ */ s("div", { children: d.filter((m) => m.filterable !== !1).filter((m) => !c.some((
|
|
1320
|
+
/* @__PURE__ */ s("div", { children: d.filter((m) => m.filterable !== !1).filter((m) => !c.some((f) => f.title == m.title)).filter((m) => m.filterable !== !1).filter((m) => m.title.toLowerCase().includes(o)).map((m, f) => /* @__PURE__ */ s("button", { onClick: () => p(m), children: m.title }, f)) }),
|
|
1321
1321
|
r && /* @__PURE__ */ s(
|
|
1322
1322
|
r,
|
|
1323
1323
|
{
|
|
@@ -1340,7 +1340,7 @@ const mt = h.div`
|
|
|
1340
1340
|
}, Kn = {
|
|
1341
1341
|
okText: "Create",
|
|
1342
1342
|
cancelText: "Cancel"
|
|
1343
|
-
},
|
|
1343
|
+
}, xe = ir((n, e) => {
|
|
1344
1344
|
const t = (r) => ({
|
|
1345
1345
|
...r,
|
|
1346
1346
|
popupOptions: { ...Yn, ...r.popupOptions },
|
|
@@ -1392,7 +1392,7 @@ const mt = h.div`
|
|
|
1392
1392
|
),
|
|
1393
1393
|
setTitle: (r) => n((a) => a.options ? { options: { ...a.options, title: r } } : a)
|
|
1394
1394
|
};
|
|
1395
|
-
}),
|
|
1395
|
+
}), zt = h(ut)`
|
|
1396
1396
|
width: 200px;
|
|
1397
1397
|
|
|
1398
1398
|
display: flex;
|
|
@@ -1419,7 +1419,7 @@ const mt = h.div`
|
|
|
1419
1419
|
line-height: var(--typo-caption-lineHeight-medium, 1.125rem); /* 128.571% */
|
|
1420
1420
|
letter-spacing: var(--typo-caption-spacing-medium, 0.00625rem);
|
|
1421
1421
|
}
|
|
1422
|
-
`,
|
|
1422
|
+
`, It = {
|
|
1423
1423
|
"/reports/activity-report": 1,
|
|
1424
1424
|
"/reports/commission-report": 2,
|
|
1425
1425
|
"/reports/deposit-report": 3,
|
|
@@ -1437,10 +1437,10 @@ const mt = h.div`
|
|
|
1437
1437
|
"/tags": 13
|
|
1438
1438
|
/* Tag */
|
|
1439
1439
|
}, hr = () => {
|
|
1440
|
-
const { pathname: n } =
|
|
1440
|
+
const { pathname: n } = Ie(), e = Object.keys(It).find(
|
|
1441
1441
|
(t) => n === t || n.startsWith(t + "/")
|
|
1442
1442
|
);
|
|
1443
|
-
return e ?
|
|
1443
|
+
return e ? It[e] : void 0;
|
|
1444
1444
|
};
|
|
1445
1445
|
function Zn(n, e) {
|
|
1446
1446
|
return e.label.toLowerCase().includes(n.toLowerCase()) || e.value == n;
|
|
@@ -1456,63 +1456,63 @@ const qn = ({
|
|
|
1456
1456
|
GridPageTopLeftComponent: l,
|
|
1457
1457
|
noNeedSidebarResponsiveButton: d
|
|
1458
1458
|
}) => {
|
|
1459
|
-
const c = ke(), u = E((
|
|
1460
|
-
var
|
|
1459
|
+
const c = ke(), u = E((x) => x.filters), p = E((x) => x.hasCreateBtn), m = E((x) => x.setFilters), f = E((x) => x.setFilterItems), g = E((x) => x.setSortItems), [v, D] = V(() => {
|
|
1460
|
+
var x, C;
|
|
1461
1461
|
try {
|
|
1462
|
-
const
|
|
1463
|
-
return
|
|
1462
|
+
const z = sessionStorage.getItem(`grid-filters:${window.location.pathname}`);
|
|
1463
|
+
return z ? !!((C = (x = JSON.parse(z)) == null ? void 0 : x.filters) != null && C.QuickSearch) : !1;
|
|
1464
1464
|
} catch {
|
|
1465
1465
|
return !1;
|
|
1466
1466
|
}
|
|
1467
|
-
}), [
|
|
1468
|
-
|
|
1469
|
-
_ == null || !
|
|
1470
|
-
}, [_,
|
|
1471
|
-
function
|
|
1472
|
-
const C =
|
|
1467
|
+
}), [T, k] = V(!1), { open: O } = xe(), [L, M] = V(!1), { getMyFilters: U } = Ve(), _ = hr(), [j, A] = V([]), H = E((x) => x.selectedConfig), b = E((x) => x.setSelectedConfig), R = E((x) => x.configsVersion);
|
|
1468
|
+
K(() => {
|
|
1469
|
+
_ == null || !U || U(String(_)).then((x) => A(x.data ?? []));
|
|
1470
|
+
}, [_, R, U]);
|
|
1471
|
+
function B(x) {
|
|
1472
|
+
const C = j.find((F) => F.id === x);
|
|
1473
1473
|
if (!C) return;
|
|
1474
|
-
const { filterItems:
|
|
1475
|
-
|
|
1474
|
+
const { filterItems: z, sortItems: I } = JSON.parse(C.value);
|
|
1475
|
+
f(z, !0), g(I), b({ id: C.id, name: C.name });
|
|
1476
1476
|
}
|
|
1477
|
-
const $ = gr((
|
|
1477
|
+
const $ = gr((x) => {
|
|
1478
1478
|
m({
|
|
1479
1479
|
...u,
|
|
1480
|
-
QuickSearch:
|
|
1480
|
+
QuickSearch: x.target.value
|
|
1481
1481
|
});
|
|
1482
1482
|
}, 500);
|
|
1483
|
-
function
|
|
1483
|
+
function S() {
|
|
1484
1484
|
n(!0);
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1486
|
+
function w() {
|
|
1487
1487
|
r ? O() : c("new");
|
|
1488
1488
|
}
|
|
1489
|
-
return /* @__PURE__ */
|
|
1490
|
-
!d && /* @__PURE__ */ s("button", { className: "icon sidebar", onClick: () =>
|
|
1489
|
+
return /* @__PURE__ */ y(Rn, { children: [
|
|
1490
|
+
!d && /* @__PURE__ */ s("button", { className: "icon sidebar", onClick: () => k(!0), children: /* @__PURE__ */ s(fr, {}) }),
|
|
1491
1491
|
l && /* @__PURE__ */ s(l, {}),
|
|
1492
|
-
/* @__PURE__ */
|
|
1493
|
-
|
|
1494
|
-
|
|
1492
|
+
/* @__PURE__ */ y("div", { className: "page-actions", children: [
|
|
1493
|
+
j.length > 0 && /* @__PURE__ */ s(
|
|
1494
|
+
zt,
|
|
1495
1495
|
{
|
|
1496
1496
|
showSearch: !0,
|
|
1497
|
-
placeholder:
|
|
1498
|
-
options:
|
|
1499
|
-
value: (
|
|
1497
|
+
placeholder: G("SavedConfiguration"),
|
|
1498
|
+
options: j.map((x) => ({ value: x.id, label: x.name })),
|
|
1499
|
+
value: (H == null ? void 0 : H.id) ?? null,
|
|
1500
1500
|
filterOption: Zn,
|
|
1501
|
-
onChange: (
|
|
1501
|
+
onChange: (x) => x != null ? B(x) : b(null)
|
|
1502
1502
|
}
|
|
1503
1503
|
),
|
|
1504
1504
|
i && o && /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(
|
|
1505
|
-
|
|
1505
|
+
zt,
|
|
1506
1506
|
{
|
|
1507
1507
|
options: o.options,
|
|
1508
1508
|
placeholder: o.placeholder,
|
|
1509
|
-
onChange: (
|
|
1510
|
-
o.onChange(
|
|
1509
|
+
onChange: (x) => {
|
|
1510
|
+
o.onChange(x ?? null);
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
1513
|
) }),
|
|
1514
|
-
t && t(L,
|
|
1515
|
-
|
|
1514
|
+
t && t(L, M),
|
|
1515
|
+
v ? /* @__PURE__ */ s(
|
|
1516
1516
|
"input",
|
|
1517
1517
|
{
|
|
1518
1518
|
type: "text",
|
|
@@ -1523,13 +1523,13 @@ const qn = ({
|
|
|
1523
1523
|
) : /* @__PURE__ */ s("button", { onClick: () => D(!0), children: oe("Search") }),
|
|
1524
1524
|
/* @__PURE__ */ s(mr, {}),
|
|
1525
1525
|
/* @__PURE__ */ s(bt, { CustomFilters: e, children: /* @__PURE__ */ s(Ye, {}) }),
|
|
1526
|
-
/* @__PURE__ */ s("button", { className: "icon", onClick:
|
|
1526
|
+
/* @__PURE__ */ s("button", { className: "icon", onClick: S, children: /* @__PURE__ */ s(ur, {}) }),
|
|
1527
1527
|
a && a,
|
|
1528
|
-
p && /* @__PURE__ */ s("button", { onClick:
|
|
1528
|
+
p && /* @__PURE__ */ s("button", { onClick: w, className: "create-btn", children: oe("Create") })
|
|
1529
1529
|
] }),
|
|
1530
|
-
|
|
1530
|
+
T && /* @__PURE__ */ s(gt, {})
|
|
1531
1531
|
] });
|
|
1532
|
-
}, Jn = (n) => /* @__PURE__ */
|
|
1532
|
+
}, Jn = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M8.66665 7.3335H12.6666V8.66683H8.66665V12.6668H7.33331V8.66683H3.33331V7.3335H7.33331V3.3335H8.66665V7.3335Z", fill: "white" })), yr = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M8 2C9.69989 2 11.2343 2.70742 12.3255 3.84245V2.42578H13.6589V6.11654H9.96875V4.7832H11.3796C10.5289 3.88969 9.32909 3.33333 8 3.33333C5.42286 3.33333 3.33333 5.42286 3.33333 8C3.33333 10.5771 5.42286 12.6667 8 12.6667C10.5771 12.6667 12.6667 10.5771 12.6667 8V7.33333H14V8C14 11.3135 11.3135 14 8 14C4.68648 14 2 11.3135 2 8C2 4.68648 4.68648 2 8 2Z", fill: "#131412" })), fe = class fe {
|
|
1533
1533
|
static equals(e, t) {
|
|
1534
1534
|
const r = e ?? null, a = t ?? null;
|
|
1535
1535
|
return r === a ? !0 : !r || !a ? !1 : r.getTime() === a.getTime();
|
|
@@ -1807,7 +1807,7 @@ Be(fe, "getCommonDateRange", (e) => {
|
|
|
1807
1807
|
}), //** Offes seconds ( offsetmin * 60sec * 1000ms) */
|
|
1808
1808
|
Be(fe, "_utcDiff", -(/* @__PURE__ */ new Date()).getTimezoneOffset() * 6e4), Be(fe, "ISO8601_DATE_REGEX", /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/);
|
|
1809
1809
|
let ne = fe;
|
|
1810
|
-
const Qn = (n) => /* @__PURE__ */
|
|
1810
|
+
const Qn = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M12.471 4.47152L8.94238 8.00016L12.471 11.5288L11.5283 12.4715L7.99967 8.94287L4.47103 12.4715L3.52832 11.5288L7.05697 8.00016L3.52832 4.47152L4.47103 3.52881L7.99967 7.05745L11.5283 3.52881L12.471 4.47152Z", fill: "currentColor", fillOpacity: 0.75 })), vt = h(Qn)`
|
|
1811
1811
|
width: 25px;
|
|
1812
1812
|
height: 25px;
|
|
1813
1813
|
cursor: pointer;
|
|
@@ -2165,13 +2165,13 @@ function na(n) {
|
|
|
2165
2165
|
}
|
|
2166
2166
|
const Oo = async (n) => {
|
|
2167
2167
|
try {
|
|
2168
|
-
await navigator.clipboard.writeText(n),
|
|
2168
|
+
await navigator.clipboard.writeText(n), _e.success({
|
|
2169
2169
|
className: "bottom-right-notification",
|
|
2170
2170
|
placement: "bottomRight",
|
|
2171
2171
|
message: "Copy To Clipboard"
|
|
2172
2172
|
});
|
|
2173
2173
|
} catch {
|
|
2174
|
-
|
|
2174
|
+
_e.error({
|
|
2175
2175
|
className: "bottom-right-notification",
|
|
2176
2176
|
placement: "bottomRight",
|
|
2177
2177
|
message: "Error",
|
|
@@ -2198,10 +2198,10 @@ const ia = ({
|
|
|
2198
2198
|
postMyFilter: a,
|
|
2199
2199
|
putMyFilter: i
|
|
2200
2200
|
}) => {
|
|
2201
|
-
const [o] = $e.useForm(), l =
|
|
2202
|
-
return
|
|
2201
|
+
const [o] = $e.useForm(), l = xe((c) => c.setOnOk), d = xe((c) => c.close);
|
|
2202
|
+
return K(() => {
|
|
2203
2203
|
t && o.setFieldsValue({ name: t.name });
|
|
2204
|
-
}, [t, o]),
|
|
2204
|
+
}, [t, o]), K(() => {
|
|
2205
2205
|
l(async () => {
|
|
2206
2206
|
try {
|
|
2207
2207
|
const c = await o.validateFields();
|
|
@@ -2216,11 +2216,11 @@ const ia = ({
|
|
|
2216
2216
|
o.setFields(u);
|
|
2217
2217
|
}
|
|
2218
2218
|
});
|
|
2219
|
-
}, [n, e, t, r, o, l, d]), /* @__PURE__ */
|
|
2220
|
-
/* @__PURE__ */ s(Ke, { children:
|
|
2219
|
+
}, [n, e, t, r, o, l, d]), /* @__PURE__ */ y($e, { form: o, children: [
|
|
2220
|
+
/* @__PURE__ */ s(Ke, { children: G("ConfigurationName") }),
|
|
2221
2221
|
/* @__PURE__ */ s($e.Item, { name: "name", children: /* @__PURE__ */ s(br, {}) })
|
|
2222
2222
|
] });
|
|
2223
|
-
}, oa = (n) => /* @__PURE__ */
|
|
2223
|
+
}, oa = (n) => /* @__PURE__ */ P.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.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" })), Ee = h(oa)`
|
|
2224
2224
|
cursor: pointer;
|
|
2225
2225
|
svg {
|
|
2226
2226
|
width: 1rem;
|
|
@@ -2230,7 +2230,7 @@ const ia = ({
|
|
|
2230
2230
|
transition: 0.1s;
|
|
2231
2231
|
}
|
|
2232
2232
|
}
|
|
2233
|
-
`, sa = () => /* @__PURE__ */ s(wt, { children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("p", { children:
|
|
2233
|
+
`, sa = () => /* @__PURE__ */ s(wt, { children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("p", { children: G("DeleteRecordQuestion") }) }) }), la = h(Pr)`
|
|
2234
2234
|
.ant-checkbox-inner {
|
|
2235
2235
|
background-color: transparent;
|
|
2236
2236
|
border: 1px solid #ccc;
|
|
@@ -2256,79 +2256,79 @@ const ia = ({
|
|
|
2256
2256
|
border-color: black;
|
|
2257
2257
|
}
|
|
2258
2258
|
`, ca = ({ item: n }) => {
|
|
2259
|
-
var
|
|
2260
|
-
const e = et(null), t = E((
|
|
2259
|
+
var k, O, L, M, U, _, j, A, H;
|
|
2260
|
+
const e = et(null), t = E((b) => b.filterItems), r = E((b) => b.setFilterItems), [a, i] = V(n.selectType == De.VALUE);
|
|
2261
2261
|
function o() {
|
|
2262
|
-
var
|
|
2263
|
-
(
|
|
2262
|
+
var b;
|
|
2263
|
+
(b = e == null ? void 0 : e.current) == null || b.focus();
|
|
2264
2264
|
}
|
|
2265
|
-
function l(
|
|
2265
|
+
function l(b) {
|
|
2266
2266
|
r(
|
|
2267
2267
|
t.map(
|
|
2268
|
-
(
|
|
2268
|
+
(R) => R.title == n.title ? { ...R, filterValue: b.id, filterLabel: b.name } : R
|
|
2269
2269
|
),
|
|
2270
2270
|
!0
|
|
2271
2271
|
), i(!1);
|
|
2272
2272
|
}
|
|
2273
|
-
function d(
|
|
2273
|
+
function d(b, R = !1) {
|
|
2274
2274
|
r(
|
|
2275
2275
|
t.map(
|
|
2276
|
-
(
|
|
2277
|
-
...
|
|
2278
|
-
filterValue:
|
|
2279
|
-
filterLabel:
|
|
2280
|
-
isCountryGroup:
|
|
2281
|
-
} :
|
|
2276
|
+
(B) => B.title == n.title ? {
|
|
2277
|
+
...B,
|
|
2278
|
+
filterValue: b.id,
|
|
2279
|
+
filterLabel: b.name,
|
|
2280
|
+
isCountryGroup: R
|
|
2281
|
+
} : B
|
|
2282
2282
|
),
|
|
2283
2283
|
!0
|
|
2284
2284
|
), i(!1);
|
|
2285
2285
|
}
|
|
2286
|
-
const [c, u] = V(n.filterValue || []), p = (
|
|
2287
|
-
var $,
|
|
2288
|
-
const
|
|
2289
|
-
u(
|
|
2290
|
-
const
|
|
2286
|
+
const [c, u] = V(n.filterValue || []), p = (b) => {
|
|
2287
|
+
var $, S;
|
|
2288
|
+
const R = c.includes(b) ? c.filter((w) => w !== b) : [...c, b];
|
|
2289
|
+
u(R);
|
|
2290
|
+
const B = (S = ($ = n == null ? void 0 : n.filters) == null ? void 0 : $.options) == null ? void 0 : S.filter((w) => R.includes(w.id)).map((w) => w.name).join(", ");
|
|
2291
2291
|
r(
|
|
2292
2292
|
t.map(
|
|
2293
|
-
(
|
|
2294
|
-
...
|
|
2295
|
-
filterValue:
|
|
2296
|
-
filterLabel:
|
|
2297
|
-
} :
|
|
2293
|
+
(w) => w.title === n.title ? {
|
|
2294
|
+
...w,
|
|
2295
|
+
filterValue: R,
|
|
2296
|
+
filterLabel: B || ""
|
|
2297
|
+
} : w
|
|
2298
2298
|
),
|
|
2299
2299
|
!0
|
|
2300
2300
|
);
|
|
2301
2301
|
};
|
|
2302
|
-
function m(
|
|
2302
|
+
function m(b) {
|
|
2303
2303
|
r(
|
|
2304
2304
|
t.map(
|
|
2305
|
-
(
|
|
2305
|
+
(R) => R.title == n.title ? { ...b, selectType: De.VALUE } : R
|
|
2306
2306
|
)
|
|
2307
2307
|
);
|
|
2308
2308
|
}
|
|
2309
|
-
const
|
|
2310
|
-
const
|
|
2309
|
+
const f = gr((b) => {
|
|
2310
|
+
const R = b.target.value;
|
|
2311
2311
|
r(
|
|
2312
|
-
t.map((
|
|
2312
|
+
t.map((B) => B.title == n.title ? { ...B, filterValue: R } : B),
|
|
2313
2313
|
!0
|
|
2314
2314
|
);
|
|
2315
2315
|
}, 500);
|
|
2316
|
-
function
|
|
2316
|
+
function g(b) {
|
|
2317
2317
|
r(
|
|
2318
2318
|
t.map(
|
|
2319
|
-
(
|
|
2319
|
+
(R) => R.title == n.title ? { ...R, selectType: De.NONE } : R
|
|
2320
2320
|
)
|
|
2321
|
-
), i(
|
|
2321
|
+
), i(b);
|
|
2322
2322
|
}
|
|
2323
|
-
function
|
|
2323
|
+
function v() {
|
|
2324
2324
|
r(
|
|
2325
|
-
t.filter((
|
|
2325
|
+
t.filter((b) => b.title != n.title),
|
|
2326
2326
|
!0
|
|
2327
2327
|
);
|
|
2328
2328
|
}
|
|
2329
|
-
|
|
2330
|
-
var
|
|
2331
|
-
a && ((
|
|
2329
|
+
K(() => {
|
|
2330
|
+
var b;
|
|
2331
|
+
a && ((b = n == null ? void 0 : n.filters) == null ? void 0 : b.type) !== ue.SELECT && setTimeout(() => {
|
|
2332
2332
|
o();
|
|
2333
2333
|
}, 0);
|
|
2334
2334
|
}, [a]);
|
|
@@ -2340,22 +2340,22 @@ const ia = ({
|
|
|
2340
2340
|
type: "text",
|
|
2341
2341
|
placeholder: "Search...",
|
|
2342
2342
|
className: "filter-item-search",
|
|
2343
|
-
onChange:
|
|
2343
|
+
onChange: f
|
|
2344
2344
|
}
|
|
2345
2345
|
),
|
|
2346
|
-
[ue.SELECT]: /* @__PURE__ */ s("div", { children: (O = (
|
|
2347
|
-
[ue.TwoComponentSelect]: /* @__PURE__ */
|
|
2346
|
+
[ue.SELECT]: /* @__PURE__ */ s("div", { children: (O = (k = n == null ? void 0 : n.filters) == null ? void 0 : k.options) == null ? void 0 : O.map((b) => /* @__PURE__ */ s("button", { onClick: () => l(b), children: b.name }, b.id)) }),
|
|
2347
|
+
[ue.TwoComponentSelect]: /* @__PURE__ */ y(ae, { children: [
|
|
2348
2348
|
/* @__PURE__ */ s(Bn, { children: (L = n == null ? void 0 : n.filters) == null ? void 0 : L.firstGroupName }),
|
|
2349
|
-
/* @__PURE__ */ s(Gn, { children: (
|
|
2349
|
+
/* @__PURE__ */ s(Gn, { children: (U = (M = n == null ? void 0 : n.filters) == null ? void 0 : M.options) == null ? void 0 : U.map((b) => /* @__PURE__ */ s(
|
|
2350
2350
|
"button",
|
|
2351
2351
|
{
|
|
2352
|
-
onClick: () => d(
|
|
2353
|
-
children:
|
|
2352
|
+
onClick: () => d(b, !1),
|
|
2353
|
+
children: b.name
|
|
2354
2354
|
},
|
|
2355
|
-
|
|
2355
|
+
b.id
|
|
2356
2356
|
)) })
|
|
2357
2357
|
] }),
|
|
2358
|
-
[ue.MULTISELECT]: /* @__PURE__ */ s("div", { children: (
|
|
2358
|
+
[ue.MULTISELECT]: /* @__PURE__ */ s("div", { children: (j = (_ = n == null ? void 0 : n.filters) == null ? void 0 : _.options) == null ? void 0 : j.map((b) => /* @__PURE__ */ s(jn, { children: /* @__PURE__ */ s(la, { onChange: () => p(b == null ? void 0 : b.id), children: /* @__PURE__ */ s(An, { children: b.name }) }) }, b.id)) }),
|
|
2359
2359
|
[ue.DATEPICKER]: /* @__PURE__ */ s(
|
|
2360
2360
|
pr,
|
|
2361
2361
|
{
|
|
@@ -2363,61 +2363,61 @@ const ia = ({
|
|
|
2363
2363
|
allowClear: !0,
|
|
2364
2364
|
format: "MMM D, YYYY",
|
|
2365
2365
|
placeholder: ["From", "To"],
|
|
2366
|
-
onChange: (
|
|
2367
|
-
if (!
|
|
2366
|
+
onChange: (b) => {
|
|
2367
|
+
if (!b)
|
|
2368
2368
|
r(
|
|
2369
2369
|
t.map(
|
|
2370
|
-
(
|
|
2371
|
-
...
|
|
2370
|
+
(R) => R.title === n.title ? {
|
|
2371
|
+
...R,
|
|
2372
2372
|
filterValue: null,
|
|
2373
2373
|
filterLabel: ""
|
|
2374
|
-
} :
|
|
2374
|
+
} : R
|
|
2375
2375
|
),
|
|
2376
2376
|
!0
|
|
2377
2377
|
);
|
|
2378
2378
|
else {
|
|
2379
|
-
const
|
|
2380
|
-
(
|
|
2381
|
-
var
|
|
2382
|
-
return
|
|
2383
|
-
|
|
2379
|
+
const R = b.map(
|
|
2380
|
+
(B, $) => {
|
|
2381
|
+
var S;
|
|
2382
|
+
return B ? (S = ne.toLocal(
|
|
2383
|
+
B,
|
|
2384
2384
|
$ === 0,
|
|
2385
|
-
$ ===
|
|
2386
|
-
)) == null ? void 0 :
|
|
2385
|
+
$ === b.length - 1
|
|
2386
|
+
)) == null ? void 0 : S.toISOString() : null;
|
|
2387
2387
|
}
|
|
2388
2388
|
);
|
|
2389
2389
|
r(
|
|
2390
2390
|
t.map(
|
|
2391
|
-
(
|
|
2392
|
-
...
|
|
2391
|
+
(B) => B.title === n.title ? {
|
|
2392
|
+
...B,
|
|
2393
2393
|
// Store the ISO strings for the API
|
|
2394
|
-
filterValue:
|
|
2394
|
+
filterValue: R,
|
|
2395
2395
|
// Keep the user-friendly label
|
|
2396
|
-
filterLabel: `${
|
|
2397
|
-
} :
|
|
2396
|
+
filterLabel: `${b[0].format("MMM D, YYYY")} → ${b[1].format("MMM D, YYYY")}`
|
|
2397
|
+
} : B
|
|
2398
2398
|
),
|
|
2399
2399
|
!0
|
|
2400
2400
|
);
|
|
2401
2401
|
}
|
|
2402
2402
|
i(!1);
|
|
2403
2403
|
},
|
|
2404
|
-
getPopupContainer: (
|
|
2405
|
-
var
|
|
2406
|
-
return ((
|
|
2404
|
+
getPopupContainer: (b) => {
|
|
2405
|
+
var R;
|
|
2406
|
+
return ((R = b == null ? void 0 : b.parentElement) == null ? void 0 : R.parentElement) ?? document.body;
|
|
2407
2407
|
}
|
|
2408
2408
|
}
|
|
2409
2409
|
)
|
|
2410
|
-
},
|
|
2410
|
+
}, T = /* @__PURE__ */ s(
|
|
2411
2411
|
mt,
|
|
2412
2412
|
{
|
|
2413
2413
|
style: {
|
|
2414
|
-
border: ((
|
|
2414
|
+
border: ((A = n == null ? void 0 : n.filters) == null ? void 0 : A.type) === ue.DATEPICKER ? "none" : "inherit"
|
|
2415
2415
|
},
|
|
2416
|
-
children: D[((
|
|
2416
|
+
children: D[((H = n == null ? void 0 : n.filters) == null ? void 0 : H.type) || ue.INPUT]
|
|
2417
2417
|
}
|
|
2418
2418
|
);
|
|
2419
|
-
return /* @__PURE__ */
|
|
2420
|
-
/* @__PURE__ */ s(bt, { placement: "bottomLeft", onSelect: m, children: /* @__PURE__ */
|
|
2419
|
+
return /* @__PURE__ */ y(st, { children: [
|
|
2420
|
+
/* @__PURE__ */ s(bt, { placement: "bottomLeft", onSelect: m, children: /* @__PURE__ */ y("span", { children: [
|
|
2421
2421
|
/* @__PURE__ */ s(ur, {}),
|
|
2422
2422
|
n.title
|
|
2423
2423
|
] }) }),
|
|
@@ -2427,26 +2427,26 @@ const ia = ({
|
|
|
2427
2427
|
overlayClassName: "debug-dropdwon",
|
|
2428
2428
|
placement: "bottomLeft",
|
|
2429
2429
|
open: a,
|
|
2430
|
-
onOpenChange:
|
|
2431
|
-
popupRender: () =>
|
|
2430
|
+
onOpenChange: g,
|
|
2431
|
+
popupRender: () => T,
|
|
2432
2432
|
trigger: ["click"],
|
|
2433
|
-
getPopupContainer: (
|
|
2434
|
-
var
|
|
2435
|
-
return ((
|
|
2433
|
+
getPopupContainer: (b) => {
|
|
2434
|
+
var R;
|
|
2435
|
+
return ((R = b == null ? void 0 : b.parentElement) == null ? void 0 : R.parentElement) ?? document.body;
|
|
2436
2436
|
},
|
|
2437
2437
|
children: /* @__PURE__ */ s("div", { children: n.filterValue ? n.filterLabel ? n.filterLabel : n.filterValue : "NotSelected" })
|
|
2438
2438
|
}
|
|
2439
2439
|
),
|
|
2440
|
-
/* @__PURE__ */ s("span", { onClick:
|
|
2440
|
+
/* @__PURE__ */ s("span", { onClick: v, children: /* @__PURE__ */ s(vt, {}) })
|
|
2441
2441
|
] });
|
|
2442
2442
|
}, da = () => {
|
|
2443
|
-
const n = E((
|
|
2443
|
+
const n = E((g) => g.filterItems), e = E((g) => g.sortItems), t = E((g) => g.setSelectedConfig), r = E((g) => g.resetStore), a = E((g) => g.selectedConfig), { deleteMyFilter: i } = Ve(), o = E((g) => g.bumpConfigsVersion), { open: l, store: d, close: c } = xe(), u = hr();
|
|
2444
2444
|
async function p() {
|
|
2445
2445
|
try {
|
|
2446
2446
|
if (!a || !i) return;
|
|
2447
2447
|
await i(a.id), t(null), o();
|
|
2448
|
-
} catch (
|
|
2449
|
-
console.log(
|
|
2448
|
+
} catch (g) {
|
|
2449
|
+
console.log(g, "Error happened deleting configuration");
|
|
2450
2450
|
}
|
|
2451
2451
|
}
|
|
2452
2452
|
function m() {
|
|
@@ -2460,7 +2460,7 @@ const ia = ({
|
|
|
2460
2460
|
onClick: () => {
|
|
2461
2461
|
p(), c(), r();
|
|
2462
2462
|
},
|
|
2463
|
-
children: /* @__PURE__ */
|
|
2463
|
+
children: /* @__PURE__ */ y("span", { className: "arrow-styled", children: [
|
|
2464
2464
|
"Delete",
|
|
2465
2465
|
/* @__PURE__ */ s(Ee, {})
|
|
2466
2466
|
] })
|
|
@@ -2470,21 +2470,21 @@ const ia = ({
|
|
|
2470
2470
|
}
|
|
2471
2471
|
}), l();
|
|
2472
2472
|
}
|
|
2473
|
-
function
|
|
2474
|
-
const
|
|
2473
|
+
function f() {
|
|
2474
|
+
const g = JSON.stringify({ filterItems: n, sortItems: e });
|
|
2475
2475
|
d({
|
|
2476
2476
|
component: ia,
|
|
2477
2477
|
componentProps: {
|
|
2478
2478
|
type: u,
|
|
2479
|
-
value:
|
|
2479
|
+
value: g,
|
|
2480
2480
|
selectedConfig: a,
|
|
2481
|
-
onSuccess: (
|
|
2482
|
-
a && t({ ...a, name:
|
|
2481
|
+
onSuccess: (v) => {
|
|
2482
|
+
a && t({ ...a, name: v }), o();
|
|
2483
2483
|
}
|
|
2484
2484
|
},
|
|
2485
2485
|
title: a ? "UpdateConfiguration" : "NameYourConfiguration",
|
|
2486
2486
|
footerOptions: {
|
|
2487
|
-
okText: /* @__PURE__ */ s(Ze, { children: /* @__PURE__ */
|
|
2487
|
+
okText: /* @__PURE__ */ s(Ze, { children: /* @__PURE__ */ y("span", { className: "arrow-styled", children: [
|
|
2488
2488
|
"Save",
|
|
2489
2489
|
/* @__PURE__ */ s(Ee, {})
|
|
2490
2490
|
] }) }),
|
|
@@ -2492,20 +2492,20 @@ const ia = ({
|
|
|
2492
2492
|
}
|
|
2493
2493
|
}), l();
|
|
2494
2494
|
}
|
|
2495
|
-
return /* @__PURE__ */
|
|
2496
|
-
e.length > 0 && /* @__PURE__ */ s(mr, { placement: "bottomLeft", children: /* @__PURE__ */ s(st, { className: "sort", children: /* @__PURE__ */
|
|
2495
|
+
return /* @__PURE__ */ y(Fn, { children: [
|
|
2496
|
+
e.length > 0 && /* @__PURE__ */ s(mr, { placement: "bottomLeft", children: /* @__PURE__ */ s(st, { className: "sort", children: /* @__PURE__ */ y("span", { children: [
|
|
2497
2497
|
e[0].title,
|
|
2498
2498
|
e[0].direction == re.ASC ? /* @__PURE__ */ s(ht, {}) : /* @__PURE__ */ s(yt, {})
|
|
2499
2499
|
] }) }) }),
|
|
2500
|
-
n.map((
|
|
2501
|
-
/* @__PURE__ */ s(bt, { placement: "bottomLeft", children: /* @__PURE__ */ s(st, { className: "add-filter", children: /* @__PURE__ */
|
|
2500
|
+
n.map((g) => /* @__PURE__ */ s(ca, { item: g }, g.title)),
|
|
2501
|
+
/* @__PURE__ */ s(bt, { placement: "bottomLeft", children: /* @__PURE__ */ s(st, { className: "add-filter", children: /* @__PURE__ */ y("span", { children: [
|
|
2502
2502
|
/* @__PURE__ */ s(Jn, {}),
|
|
2503
2503
|
"AddFilter"
|
|
2504
2504
|
] }) }) }),
|
|
2505
|
-
/* @__PURE__ */
|
|
2506
|
-
/* @__PURE__ */ s("button", { onClick:
|
|
2505
|
+
/* @__PURE__ */ y(Vn, { children: [
|
|
2506
|
+
/* @__PURE__ */ s("button", { onClick: f, children: a ? "UpdateConfiguration" : "SaveConfiguration" }),
|
|
2507
2507
|
a && /* @__PURE__ */ s("button", { onClick: m, children: "DeleteConfiguration" }),
|
|
2508
|
-
/* @__PURE__ */
|
|
2508
|
+
/* @__PURE__ */ y("button", { onClick: r, children: [
|
|
2509
2509
|
/* @__PURE__ */ s(yr, {}),
|
|
2510
2510
|
"ResetConditions"
|
|
2511
2511
|
] })
|
|
@@ -2855,7 +2855,7 @@ const ia = ({
|
|
|
2855
2855
|
}
|
|
2856
2856
|
}
|
|
2857
2857
|
`;
|
|
2858
|
-
function
|
|
2858
|
+
function Tt(n, e) {
|
|
2859
2859
|
const t = {};
|
|
2860
2860
|
return e.forEach((r) => {
|
|
2861
2861
|
const a = r[n.dataIndex];
|
|
@@ -2893,10 +2893,10 @@ function ya({ rowLength: n, columnLength: e }) {
|
|
|
2893
2893
|
return Array(n).fill(null).map((t, r) => /* @__PURE__ */ s("tr", { children: Array(e).fill(null).map((a, i) => /* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(Mr, { active: !0, title: !1, paragraph: { rows: 1, width: "100%" } }) }, `${r}-${i}`)) }, `skeleton-row-${r}`));
|
|
2894
2894
|
}
|
|
2895
2895
|
function ba({ subGroups: n, columns: e, rowKey: t, onRowClick: r }) {
|
|
2896
|
-
return /* @__PURE__ */ s(ae, { children: Object.keys(n).map((a) => /* @__PURE__ */
|
|
2897
|
-
/* @__PURE__ */
|
|
2896
|
+
return /* @__PURE__ */ s(ae, { children: Object.keys(n).map((a) => /* @__PURE__ */ y(Jt.Fragment, { children: [
|
|
2897
|
+
/* @__PURE__ */ y("tr", { className: "sub-group-header", children: [
|
|
2898
2898
|
/* @__PURE__ */ s("td", {}),
|
|
2899
|
-
/* @__PURE__ */ s("td", { colSpan: e.length, children: /* @__PURE__ */
|
|
2899
|
+
/* @__PURE__ */ s("td", { colSpan: e.length, children: /* @__PURE__ */ y("div", { children: [
|
|
2900
2900
|
a,
|
|
2901
2901
|
" ",
|
|
2902
2902
|
/* @__PURE__ */ s("span", { children: n[a].length }),
|
|
@@ -2915,9 +2915,9 @@ function ba({ subGroups: n, columns: e, rowKey: t, onRowClick: r }) {
|
|
|
2915
2915
|
] }, a)) });
|
|
2916
2916
|
}
|
|
2917
2917
|
function va({ label: n, colSpan: e, count: t }) {
|
|
2918
|
-
return /* @__PURE__ */
|
|
2918
|
+
return /* @__PURE__ */ y("tr", { className: "main-group-header", children: [
|
|
2919
2919
|
/* @__PURE__ */ s("td", {}),
|
|
2920
|
-
/* @__PURE__ */
|
|
2920
|
+
/* @__PURE__ */ y("td", { colSpan: e, children: [
|
|
2921
2921
|
n,
|
|
2922
2922
|
" ",
|
|
2923
2923
|
/* @__PURE__ */ s("span", { children: t })
|
|
@@ -2935,7 +2935,7 @@ function xa({
|
|
|
2935
2935
|
}) {
|
|
2936
2936
|
return /* @__PURE__ */ s(ae, { children: Object.keys(n).map((o) => {
|
|
2937
2937
|
var l;
|
|
2938
|
-
return /* @__PURE__ */
|
|
2938
|
+
return /* @__PURE__ */ y(Jt.Fragment, { children: [
|
|
2939
2939
|
/* @__PURE__ */ s(
|
|
2940
2940
|
va,
|
|
2941
2941
|
{
|
|
@@ -2971,7 +2971,7 @@ function wa({
|
|
|
2971
2971
|
onPaginationChange: r
|
|
2972
2972
|
}) {
|
|
2973
2973
|
const [a, i] = V(!1);
|
|
2974
|
-
return /* @__PURE__ */
|
|
2974
|
+
return /* @__PURE__ */ y(fa, { children: [
|
|
2975
2975
|
/* @__PURE__ */ s(
|
|
2976
2976
|
Hr,
|
|
2977
2977
|
{
|
|
@@ -2987,18 +2987,18 @@ function wa({
|
|
|
2987
2987
|
{
|
|
2988
2988
|
placement: "bottomRight",
|
|
2989
2989
|
popupRender: () => /* @__PURE__ */ s(ga, { children: ((n == null ? void 0 : n.items) || [
|
|
2990
|
-
{ label: `10 ${
|
|
2991
|
-
{ label: `25 ${
|
|
2992
|
-
{ label: `50 ${
|
|
2993
|
-
{ label: `100 ${
|
|
2994
|
-
]).map((o) => /* @__PURE__ */
|
|
2990
|
+
{ label: `10 ${G("Items")}`, value: 10 },
|
|
2991
|
+
{ label: `25 ${G("Items")}`, value: 25 },
|
|
2992
|
+
{ label: `50 ${G("Items")}`, value: 50 },
|
|
2993
|
+
{ label: `100 ${G("Items")}`, value: 100 }
|
|
2994
|
+
]).map((o) => /* @__PURE__ */ y(
|
|
2995
2995
|
"button",
|
|
2996
2996
|
{
|
|
2997
2997
|
onClick: () => e(o.value),
|
|
2998
2998
|
children: [
|
|
2999
2999
|
o.label,
|
|
3000
3000
|
" ",
|
|
3001
|
-
o.value == n.pageSize && /* @__PURE__ */ s(
|
|
3001
|
+
o.value == n.pageSize && /* @__PURE__ */ s(He, {})
|
|
3002
3002
|
]
|
|
3003
3003
|
},
|
|
3004
3004
|
o.value
|
|
@@ -3006,10 +3006,10 @@ function wa({
|
|
|
3006
3006
|
trigger: ["click"],
|
|
3007
3007
|
open: a,
|
|
3008
3008
|
onOpenChange: i,
|
|
3009
|
-
children: /* @__PURE__ */
|
|
3009
|
+
children: /* @__PURE__ */ y("div", { className: "page-size-select-header", children: [
|
|
3010
3010
|
n.pageSize,
|
|
3011
3011
|
" ",
|
|
3012
|
-
|
|
3012
|
+
G("ItemsPerPage"),
|
|
3013
3013
|
" ",
|
|
3014
3014
|
/* @__PURE__ */ s(ft, {})
|
|
3015
3015
|
] })
|
|
@@ -3017,36 +3017,36 @@ function wa({
|
|
|
3017
3017
|
)
|
|
3018
3018
|
] });
|
|
3019
3019
|
}
|
|
3020
|
-
const Ca = (n) => /* @__PURE__ */
|
|
3020
|
+
const Ca = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.6094 3.33333L5.1263 11.8158C5.12139 11.8211 5.11638 11.8263 5.11133 11.8314L3.33333 13.6094L2.39062 12.6667L3.66211 11.3939C2.75363 10.5112 1.95159 9.31206 1.41341 8.31706L1.24219 8L1.41341 7.68294C2.08047 6.44895 3.05011 5.21371 4.17253 4.2793C5.28611 3.35227 6.61809 2.66667 8 2.66667C9.16616 2.66667 10.294 3.10021 11.291 3.76562L12.6667 2.39062L13.6094 3.33333ZM8 4C7.05196 4 6.01458 4.48114 5.02604 5.30404C4.14063 6.04112 3.34853 7.00907 2.76562 8C3.26512 8.86691 3.9209 9.79039 4.60482 10.4512L5.63021 9.42643C4.98911 8.36284 5.12669 6.96121 6.04427 6.04362C6.96186 5.12604 8.36349 4.98846 9.42708 5.62956L10.3255 4.73047C9.55755 4.26174 8.76273 4 8 4ZM8.42513 6.63151C7.93343 6.47928 7.37623 6.59708 6.98698 6.98633C6.59773 7.37558 6.47993 7.93278 6.63216 8.42448L8.42513 6.63151Z", fill: "currentColor", fillOpacity: 0.75 }), /* @__PURE__ */ P.createElement("path", { d: "M13.2266 5.51432L13.4199 5.75651C13.8705 6.35556 14.306 7.16405 14.5866 7.68294L14.7578 8L14.5866 8.31706C13.9196 9.55061 12.9498 10.7856 11.8275 11.7201C10.714 12.6471 9.38194 13.3333 8 13.3333C7.42626 13.3333 6.86164 13.2272 6.32031 13.0423L6.08984 12.9583L5.5332 12.7422L6.5638 11.7116L6.57161 11.7148L6.75195 11.7806C7.17263 11.9243 7.59142 12 8 12C8.94792 12 9.98545 11.5189 10.974 10.696C11.8609 9.95749 12.6538 8.98668 13.237 7.99414C12.9701 7.50763 12.6616 6.96796 12.3665 6.57357L12.2122 6.38021L12.0664 6.20898L13.0124 5.26302L13.2266 5.51432Z", fill: "currentColor", fillOpacity: 0.75 }));
|
|
3021
3021
|
function ka({ col: n }) {
|
|
3022
|
-
const [e, t] = V(!1), r = E((
|
|
3023
|
-
function d(
|
|
3022
|
+
const [e, t] = V(!1), r = E((f) => f.filterItems), a = E((f) => f.hideItems), i = E((f) => f.setFilterItems), o = E((f) => f.setSortItems), l = E((f) => f.setHideItems);
|
|
3023
|
+
function d(f, g) {
|
|
3024
3024
|
o([
|
|
3025
3025
|
{
|
|
3026
|
-
title:
|
|
3027
|
-
dataIndex:
|
|
3028
|
-
direction:
|
|
3026
|
+
title: f.title,
|
|
3027
|
+
dataIndex: f.dataIndex.charAt(0).toUpperCase() + f.dataIndex.slice(1),
|
|
3028
|
+
direction: g
|
|
3029
3029
|
}
|
|
3030
3030
|
]);
|
|
3031
3031
|
}
|
|
3032
|
-
function c(
|
|
3033
|
-
const
|
|
3032
|
+
function c(f) {
|
|
3033
|
+
const g = r.filter((v) => f.title != v.title);
|
|
3034
3034
|
i([
|
|
3035
|
-
...
|
|
3035
|
+
...g,
|
|
3036
3036
|
{
|
|
3037
|
-
...
|
|
3037
|
+
...f,
|
|
3038
3038
|
selectType: De.VALUE
|
|
3039
3039
|
}
|
|
3040
3040
|
]);
|
|
3041
3041
|
}
|
|
3042
|
-
function u(
|
|
3042
|
+
function u(f, g) {
|
|
3043
3043
|
l({
|
|
3044
3044
|
...a,
|
|
3045
|
-
[
|
|
3045
|
+
[f.dataIndex]: !0
|
|
3046
3046
|
});
|
|
3047
3047
|
}
|
|
3048
3048
|
const p = () => t(!1), m = [
|
|
3049
|
-
{ icon: /* @__PURE__ */ s(Ye, {}), text:
|
|
3049
|
+
{ icon: /* @__PURE__ */ s(Ye, {}), text: G("Filter"), action: () => c(n) },
|
|
3050
3050
|
{
|
|
3051
3051
|
icon: /* @__PURE__ */ s(ht, {}),
|
|
3052
3052
|
text: oe("Ascending"),
|
|
@@ -3059,7 +3059,7 @@ function ka({ col: n }) {
|
|
|
3059
3059
|
},
|
|
3060
3060
|
{
|
|
3061
3061
|
icon: /* @__PURE__ */ s(Ca, {}),
|
|
3062
|
-
text:
|
|
3062
|
+
text: G("HideInView"),
|
|
3063
3063
|
action: () => u(n)
|
|
3064
3064
|
}
|
|
3065
3065
|
];
|
|
@@ -3067,23 +3067,23 @@ function ka({ col: n }) {
|
|
|
3067
3067
|
we,
|
|
3068
3068
|
{
|
|
3069
3069
|
placement: "bottomLeft",
|
|
3070
|
-
popupRender: () => /* @__PURE__ */ s(ua, { children: m.map(({ icon:
|
|
3070
|
+
popupRender: () => /* @__PURE__ */ s(ua, { children: m.map(({ icon: f, text: g, action: v }) => /* @__PURE__ */ y(
|
|
3071
3071
|
"button",
|
|
3072
3072
|
{
|
|
3073
3073
|
onClick: () => {
|
|
3074
|
-
|
|
3074
|
+
v(), p();
|
|
3075
3075
|
},
|
|
3076
3076
|
children: [
|
|
3077
|
-
|
|
3078
|
-
|
|
3077
|
+
f,
|
|
3078
|
+
g
|
|
3079
3079
|
]
|
|
3080
3080
|
},
|
|
3081
|
-
|
|
3081
|
+
g
|
|
3082
3082
|
)) }),
|
|
3083
3083
|
trigger: ["click"],
|
|
3084
3084
|
open: e,
|
|
3085
3085
|
onOpenChange: t,
|
|
3086
|
-
getPopupContainer: (
|
|
3086
|
+
getPopupContainer: (f) => (f == null ? void 0 : f.parentElement) ?? document.body,
|
|
3087
3087
|
children: /* @__PURE__ */ s("th", { className: e ? "active" : "", children: /* @__PURE__ */ s("span", { children: n.title }) })
|
|
3088
3088
|
}
|
|
3089
3089
|
);
|
|
@@ -3164,15 +3164,15 @@ h(Ce)`
|
|
|
3164
3164
|
line-height: var(--typo-caption-lineHeight-medium, 18px); /* 128.571% */
|
|
3165
3165
|
letter-spacing: var(--typo-caption-spacing-medium, 0.1px);
|
|
3166
3166
|
`;
|
|
3167
|
-
const Ea = ({ title: n, description: e, button: t, helpSpan: r }) => /* @__PURE__ */ s(Sa, { children: /* @__PURE__ */
|
|
3167
|
+
const Ea = ({ title: n, description: e, button: t, helpSpan: r }) => /* @__PURE__ */ s(Sa, { children: /* @__PURE__ */ y(La, { children: [
|
|
3168
3168
|
/* @__PURE__ */ s($a, { children: n }),
|
|
3169
|
-
/* @__PURE__ */
|
|
3169
|
+
/* @__PURE__ */ y(Da, { children: [
|
|
3170
3170
|
e,
|
|
3171
3171
|
" ",
|
|
3172
3172
|
r && /* @__PURE__ */ s(Oa, { children: r })
|
|
3173
3173
|
] }),
|
|
3174
3174
|
t && t
|
|
3175
|
-
] }) }),
|
|
3175
|
+
] }) }), za = ({
|
|
3176
3176
|
activeTableView: n,
|
|
3177
3177
|
columns: e,
|
|
3178
3178
|
rowKey: t,
|
|
@@ -3184,58 +3184,58 @@ const Ea = ({ title: n, description: e, button: t, helpSpan: r }) => /* @__PURE_
|
|
|
3184
3184
|
noPagination: d,
|
|
3185
3185
|
noDataProps: c
|
|
3186
3186
|
}) => {
|
|
3187
|
-
const u = E((O) => O.filters), p = E((O) => O.groupByArr), m = E((O) => O.setFilters),
|
|
3187
|
+
const u = E((O) => O.filters), p = E((O) => O.groupByArr), m = E((O) => O.setFilters), f = ve(() => p.length > 0 ? e.filter(
|
|
3188
3188
|
(O) => !p.some((L) => L.dataIndex == O.dataIndex)
|
|
3189
|
-
) : e, [e, p]), { isTableGroupped:
|
|
3189
|
+
) : e, [e, p]), { isTableGroupped: g, isTableSubGroupped: v } = ve(
|
|
3190
3190
|
() => ({
|
|
3191
3191
|
isTableGroupped: !!p[0],
|
|
3192
3192
|
isTableSubGroupped: !!p[1]
|
|
3193
3193
|
}),
|
|
3194
3194
|
[p]
|
|
3195
|
-
), D =
|
|
3195
|
+
), D = ve(() => {
|
|
3196
3196
|
if (p[0]) {
|
|
3197
|
-
const O =
|
|
3197
|
+
const O = Tt(p[0], r);
|
|
3198
3198
|
if (p[1]) {
|
|
3199
3199
|
const L = {};
|
|
3200
|
-
return Object.keys(O).forEach((
|
|
3201
|
-
L[
|
|
3200
|
+
return Object.keys(O).forEach((M) => {
|
|
3201
|
+
L[M] = Tt(p[1], O[M]);
|
|
3202
3202
|
}), L;
|
|
3203
3203
|
}
|
|
3204
3204
|
return O;
|
|
3205
3205
|
}
|
|
3206
3206
|
return r;
|
|
3207
3207
|
}, [r, p]);
|
|
3208
|
-
function
|
|
3208
|
+
function T(O) {
|
|
3209
3209
|
m({
|
|
3210
3210
|
...u,
|
|
3211
3211
|
PageSize: O,
|
|
3212
3212
|
Page: 1
|
|
3213
3213
|
});
|
|
3214
3214
|
}
|
|
3215
|
-
function
|
|
3215
|
+
function k(O) {
|
|
3216
3216
|
m({
|
|
3217
3217
|
...u,
|
|
3218
3218
|
Page: O
|
|
3219
3219
|
});
|
|
3220
3220
|
}
|
|
3221
|
-
return /* @__PURE__ */
|
|
3222
|
-
/* @__PURE__ */
|
|
3223
|
-
n != he.LIST && /* @__PURE__ */ s("thead", { children: /* @__PURE__ */
|
|
3224
|
-
|
|
3221
|
+
return /* @__PURE__ */ y(pa, { children: [
|
|
3222
|
+
/* @__PURE__ */ y("table", { children: [
|
|
3223
|
+
n != he.LIST && /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ y("tr", { children: [
|
|
3224
|
+
f.map((O) => /* @__PURE__ */ s(ka, { col: O }, O.dataIndex)),
|
|
3225
3225
|
/* @__PURE__ */ s("th", {})
|
|
3226
3226
|
] }) }),
|
|
3227
3227
|
/* @__PURE__ */ s("tbody", { children: a ? /* @__PURE__ */ s(
|
|
3228
3228
|
ya,
|
|
3229
3229
|
{
|
|
3230
3230
|
rowLength: i.pageSize,
|
|
3231
|
-
columnLength:
|
|
3231
|
+
columnLength: f.length
|
|
3232
3232
|
}
|
|
3233
|
-
) : (D == null ? void 0 : D.length) == 0 && c ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan:
|
|
3233
|
+
) : (D == null ? void 0 : D.length) == 0 && c ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ s("td", { colSpan: f.length, children: /* @__PURE__ */ s(Ea, { ...c }) }) }) : /* @__PURE__ */ s(ae, { children: g ? /* @__PURE__ */ s(
|
|
3234
3234
|
xa,
|
|
3235
3235
|
{
|
|
3236
3236
|
dataSource: D,
|
|
3237
|
-
columns:
|
|
3238
|
-
isSubGroupped:
|
|
3237
|
+
columns: f,
|
|
3238
|
+
isSubGroupped: v,
|
|
3239
3239
|
getGroupLength: ma,
|
|
3240
3240
|
rowKey: t,
|
|
3241
3241
|
onRowClick: l
|
|
@@ -3244,7 +3244,7 @@ const Ea = ({ title: n, description: e, button: t, helpSpan: r }) => /* @__PURE_
|
|
|
3244
3244
|
kt,
|
|
3245
3245
|
{
|
|
3246
3246
|
rows: D,
|
|
3247
|
-
columns:
|
|
3247
|
+
columns: f,
|
|
3248
3248
|
rowKey: t,
|
|
3249
3249
|
onRowClick: l
|
|
3250
3250
|
}
|
|
@@ -3255,12 +3255,12 @@ const Ea = ({ title: n, description: e, button: t, helpSpan: r }) => /* @__PURE_
|
|
|
3255
3255
|
{
|
|
3256
3256
|
pagination: i,
|
|
3257
3257
|
totalItemCount: o,
|
|
3258
|
-
onPerPageSelectChange:
|
|
3259
|
-
onPaginationChange:
|
|
3258
|
+
onPerPageSelectChange: T,
|
|
3259
|
+
onPaginationChange: k
|
|
3260
3260
|
}
|
|
3261
3261
|
)
|
|
3262
3262
|
] });
|
|
3263
|
-
},
|
|
3263
|
+
}, Ia = h.div`
|
|
3264
3264
|
display: flex;
|
|
3265
3265
|
flex-direction: column;
|
|
3266
3266
|
position: fixed;
|
|
@@ -3478,11 +3478,11 @@ const Ea = ({ title: n, description: e, button: t, helpSpan: r }) => /* @__PURE_
|
|
|
3478
3478
|
z-index: 9;
|
|
3479
3479
|
}
|
|
3480
3480
|
}
|
|
3481
|
-
`,
|
|
3481
|
+
`, Ta = h.div`
|
|
3482
3482
|
display: flex;
|
|
3483
3483
|
align-items: center;
|
|
3484
3484
|
gap: 8px;
|
|
3485
|
-
`, Pt = (n) => /* @__PURE__ */
|
|
3485
|
+
`, Pt = (n) => /* @__PURE__ */ P.createElement("svg", { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 2C6.47672 2 2 6.47672 2 12C2 17.5233 6.47672 22 12 22C17.5233 22 22 17.5233 22 12C22 6.47672 17.5233 2 12 2ZM4 12C4 7.58128 7.58128 4 12 4C16.4187 4 20 7.58128 20 12C20 16.4187 16.4187 20 12 20C7.58128 20 4 16.4187 4 12Z", fill: "currentColor" }), /* @__PURE__ */ P.createElement("path", { d: "M16.207 9.20703L13.4141 12L16.207 14.793L14.793 16.207L12 13.4141L9.20703 16.207L7.79297 14.793L10.5859 12L7.79297 9.20703L9.20703 7.79297L12 10.5859L14.793 7.79297L16.207 9.20703Z", fill: "currentColor" })), Mt = (n) => /* @__PURE__ */ P.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.0013 1.66675C5.39856 1.66675 1.66797 5.39734 1.66797 10.0001C1.66797 14.6028 5.39856 18.3334 10.0013 18.3334C14.604 18.3334 18.3346 14.6028 18.3346 10.0001C18.3346 5.39734 14.604 1.66675 10.0013 1.66675ZM13.9239 8.92267C14.2493 8.59723 14.2493 8.0696 13.9239 7.74416C13.5985 7.41872 13.0708 7.41872 12.7454 7.74416L9.16797 11.3216L7.25722 9.41083C6.93179 9.08539 6.40415 9.08539 6.07871 9.41083C5.75328 9.73626 5.75328 10.2639 6.07871 10.5893L8.57871 13.0893C8.90415 13.4148 9.43179 13.4148 9.75723 13.0893L13.9239 8.92267Z", fill: "currentColor" })), vr = h.div`
|
|
3486
3486
|
display: flex;
|
|
3487
3487
|
flex-direction: column;
|
|
3488
3488
|
padding-top: 1.5rem;
|
|
@@ -3636,7 +3636,7 @@ const Ea = ({ title: n, description: e, button: t, helpSpan: r }) => /* @__PURE_
|
|
|
3636
3636
|
color: var(--color-text-inverse-primary, #131412) !important;
|
|
3637
3637
|
border-top: 2px solid var(--color-bg-secondary, #f5f5f5) !important;
|
|
3638
3638
|
}
|
|
3639
|
-
`, St = (n) => /* @__PURE__ */
|
|
3639
|
+
`, St = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M7.16635 10.8358C7.16765 11.2949 7.54029 11.6667 7.99968 11.6667C8.45987 11.6667 8.83301 11.2936 8.83301 10.8334C8.83301 10.3715 8.45813 10 7.99901 10C7.54056 10 7.1643 10.372 7.16635 10.8358Z", fill: "#FD6C49" }), /* @__PURE__ */ P.createElement("path", { d: "M8.66634 9.00004V4.33338H7.33301V9.00004H8.66634Z", fill: "#FD6C49" }), /* @__PURE__ */ P.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.943 1.33337L11.1383 1.52921C12.2476 2.64117 13.3589 3.75126 14.4708 4.86166L14.6663 5.05698V10.9429L10.9425 14.6667H5.05687L1.33301 10.9429L1.33301 5.05723L5.05687 1.33338L10.943 1.33337ZM5.60915 2.66671L2.66634 5.60952L2.66634 10.3906L5.60915 13.3334H10.3902L13.333 10.3906V5.60977C12.3516 4.62959 11.37 3.64891 10.3898 2.66671L5.60915 2.66671Z", fill: "#FD6C49" }));
|
|
3640
3640
|
function Aa(n) {
|
|
3641
3641
|
if (!n) return n;
|
|
3642
3642
|
let e = n[0].toLowerCase();
|
|
@@ -3646,7 +3646,7 @@ function Aa(n) {
|
|
|
3646
3646
|
}
|
|
3647
3647
|
return e;
|
|
3648
3648
|
}
|
|
3649
|
-
function
|
|
3649
|
+
function ze(n) {
|
|
3650
3650
|
return Object.entries(n).map(([e, t]) => ({ name: e.replace(/\[(\d+)\]/g, ".$1").split(".").map((a) => isNaN(a) ? Aa(a) : Number(a)), errors: t }));
|
|
3651
3651
|
}
|
|
3652
3652
|
h($e.Item)`
|
|
@@ -4029,21 +4029,21 @@ const Sr = ({
|
|
|
4029
4029
|
}) => {
|
|
4030
4030
|
const [o, l] = V(), [d, c] = V([]);
|
|
4031
4031
|
async function u() {
|
|
4032
|
-
var p, m,
|
|
4032
|
+
var p, m, f;
|
|
4033
4033
|
try {
|
|
4034
|
-
const
|
|
4035
|
-
(p =
|
|
4036
|
-
} catch (
|
|
4037
|
-
const
|
|
4038
|
-
c(
|
|
4034
|
+
const g = await e({ confirmationToken: n, code: o, id: a });
|
|
4035
|
+
(p = g == null ? void 0 : g.data) != null && p.success && (r(!1), i((v) => !v));
|
|
4036
|
+
} catch (g) {
|
|
4037
|
+
const v = ze((f = (m = g == null ? void 0 : g.response) == null ? void 0 : m.data) == null ? void 0 : f.errors);
|
|
4038
|
+
c(v), console.log(g);
|
|
4039
4039
|
}
|
|
4040
4040
|
}
|
|
4041
|
-
return /* @__PURE__ */
|
|
4042
|
-
/* @__PURE__ */ s(wt, { children: /* @__PURE__ */
|
|
4041
|
+
return /* @__PURE__ */ y("div", { children: [
|
|
4042
|
+
/* @__PURE__ */ s(wt, { children: /* @__PURE__ */ y(kr, { children: [
|
|
4043
4043
|
ee("EnterBackupCode"),
|
|
4044
4044
|
/* @__PURE__ */ s(Ke, { children: ee("BackupCodesDesc") })
|
|
4045
4045
|
] }) }),
|
|
4046
|
-
/* @__PURE__ */
|
|
4046
|
+
/* @__PURE__ */ y(Cr, { className: d.length > 0 ? "verification-error" : "", children: [
|
|
4047
4047
|
/* @__PURE__ */ s(Ke, { children: ee("BackupCode") }),
|
|
4048
4048
|
/* @__PURE__ */ s(
|
|
4049
4049
|
br,
|
|
@@ -4053,14 +4053,14 @@ const Sr = ({
|
|
|
4053
4053
|
placeholder: "xxxx-xxxx-xxxx"
|
|
4054
4054
|
}
|
|
4055
4055
|
),
|
|
4056
|
-
d.map((p) => /* @__PURE__ */
|
|
4056
|
+
d.map((p) => /* @__PURE__ */ y("span", { children: [
|
|
4057
4057
|
/* @__PURE__ */ s(St, {}),
|
|
4058
4058
|
" ",
|
|
4059
4059
|
p.errors[0]
|
|
4060
4060
|
] }, p.name)),
|
|
4061
4061
|
/* @__PURE__ */ s(Ba, { children: ee("BackupCodeSpan") })
|
|
4062
4062
|
] }),
|
|
4063
|
-
/* @__PURE__ */
|
|
4063
|
+
/* @__PURE__ */ y(xr, { children: [
|
|
4064
4064
|
/* @__PURE__ */ s(
|
|
4065
4065
|
Ct,
|
|
4066
4066
|
{
|
|
@@ -4070,7 +4070,7 @@ const Sr = ({
|
|
|
4070
4070
|
children: oe("Back")
|
|
4071
4071
|
}
|
|
4072
4072
|
),
|
|
4073
|
-
/* @__PURE__ */ s(Ze, { onClick: u, children: /* @__PURE__ */
|
|
4073
|
+
/* @__PURE__ */ s(Ze, { onClick: u, children: /* @__PURE__ */ y("span", { className: "arrow-styled", children: [
|
|
4074
4074
|
oe("Continue"),
|
|
4075
4075
|
" ",
|
|
4076
4076
|
/* @__PURE__ */ s(Ee, {})
|
|
@@ -4088,26 +4088,26 @@ const Sr = ({
|
|
|
4088
4088
|
justify-content: center;
|
|
4089
4089
|
align-items: center;
|
|
4090
4090
|
z-index: 1000;
|
|
4091
|
-
`,
|
|
4091
|
+
`, Wa = h.div`
|
|
4092
4092
|
border-radius: var(--border-radius-025, 0.125rem);
|
|
4093
4093
|
background: var(--color-bg-quaternary, #2f2f2f);
|
|
4094
4094
|
min-width: 300px;
|
|
4095
4095
|
max-width: 500px;
|
|
4096
4096
|
position: relative;
|
|
4097
4097
|
animation: fadeIn 0.3s ease;
|
|
4098
|
-
`,
|
|
4098
|
+
`, _a = document.getElementById("modal-root") || (() => {
|
|
4099
4099
|
const n = document.createElement("div");
|
|
4100
4100
|
return n.id = "modal-root", document.body.appendChild(n), n;
|
|
4101
4101
|
})();
|
|
4102
4102
|
function Ht({ isOpen: n, onClose: e, children: t }) {
|
|
4103
|
-
return
|
|
4103
|
+
return K(() => {
|
|
4104
4104
|
const r = (a) => {
|
|
4105
4105
|
a.key === "Escape" && e();
|
|
4106
4106
|
};
|
|
4107
4107
|
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
|
4108
|
-
}, [e]), n ?
|
|
4109
|
-
/* @__PURE__ */ s(Ua, { onClick: e, children: /* @__PURE__ */ s(
|
|
4110
|
-
|
|
4108
|
+
}, [e]), n ? _r.createPortal(
|
|
4109
|
+
/* @__PURE__ */ s(Ua, { onClick: e, children: /* @__PURE__ */ s(Wa, { onClick: (r) => r.stopPropagation(), children: t }) }),
|
|
4110
|
+
_a
|
|
4111
4111
|
) : null;
|
|
4112
4112
|
}
|
|
4113
4113
|
const Ya = {
|
|
@@ -4124,88 +4124,88 @@ const Ya = {
|
|
|
4124
4124
|
isBlocked: i,
|
|
4125
4125
|
onBlockStateClose: o
|
|
4126
4126
|
}) => {
|
|
4127
|
-
const { confirmContactInfo: l, confirmContactInfoBackup: d } =
|
|
4127
|
+
const { confirmContactInfo: l, confirmContactInfoBackup: d } = Ve(), { setUser: c } = Se(), [u, p] = V(""), [m, f] = V([]), [g, v] = V(!1);
|
|
4128
4128
|
function D(L) {
|
|
4129
4129
|
p(L);
|
|
4130
4130
|
}
|
|
4131
|
-
async function
|
|
4131
|
+
async function T() {
|
|
4132
4132
|
const L = l;
|
|
4133
4133
|
if (L)
|
|
4134
4134
|
try {
|
|
4135
|
-
|
|
4136
|
-
const
|
|
4137
|
-
c(
|
|
4138
|
-
} catch (
|
|
4139
|
-
if (console.log(
|
|
4140
|
-
const
|
|
4141
|
-
|
|
4135
|
+
f([]);
|
|
4136
|
+
const M = await L(t, u, a);
|
|
4137
|
+
c(M.data.value), O();
|
|
4138
|
+
} catch (M) {
|
|
4139
|
+
if (console.log(M), M.status === 400) {
|
|
4140
|
+
const U = M.response.data, _ = ze(U.errors);
|
|
4141
|
+
f(_);
|
|
4142
4142
|
}
|
|
4143
4143
|
}
|
|
4144
4144
|
}
|
|
4145
|
-
async function
|
|
4146
|
-
const
|
|
4147
|
-
if (
|
|
4145
|
+
async function k(L) {
|
|
4146
|
+
const M = d;
|
|
4147
|
+
if (M)
|
|
4148
4148
|
try {
|
|
4149
|
-
|
|
4150
|
-
const
|
|
4151
|
-
c(
|
|
4152
|
-
} catch (
|
|
4153
|
-
if (console.log(
|
|
4154
|
-
const _ =
|
|
4155
|
-
|
|
4149
|
+
f([]);
|
|
4150
|
+
const U = await M(L);
|
|
4151
|
+
c(U.data.value);
|
|
4152
|
+
} catch (U) {
|
|
4153
|
+
if (console.log(U), U.status === 400) {
|
|
4154
|
+
const _ = U.response.data, j = ze(_.errors);
|
|
4155
|
+
f(j);
|
|
4156
4156
|
}
|
|
4157
4157
|
}
|
|
4158
4158
|
}
|
|
4159
4159
|
function O() {
|
|
4160
|
-
p(""), e(!1),
|
|
4160
|
+
p(""), e(!1), f([]);
|
|
4161
4161
|
}
|
|
4162
|
-
return i ? /* @__PURE__ */ s(Ht, { isOpen: i, onClose: o, children: /* @__PURE__ */
|
|
4163
|
-
/* @__PURE__ */
|
|
4164
|
-
/* @__PURE__ */
|
|
4165
|
-
/* @__PURE__ */ s("span", { children:
|
|
4162
|
+
return i ? /* @__PURE__ */ s(Ht, { isOpen: i, onClose: o, children: /* @__PURE__ */ y(Ha, { children: [
|
|
4163
|
+
/* @__PURE__ */ y(Ra, { children: [
|
|
4164
|
+
/* @__PURE__ */ y(Na, { children: [
|
|
4165
|
+
/* @__PURE__ */ s("span", { children: G("ContactInformationBlocked") }),
|
|
4166
4166
|
/* @__PURE__ */ s("span", { onClick: o, children: /* @__PURE__ */ s(vt, {}) })
|
|
4167
4167
|
] }),
|
|
4168
|
-
/* @__PURE__ */ s(Fa, { children:
|
|
4168
|
+
/* @__PURE__ */ s(Fa, { children: G("ContactInformationBlockedDesc") })
|
|
4169
4169
|
] }),
|
|
4170
|
-
/* @__PURE__ */
|
|
4171
|
-
|
|
4170
|
+
/* @__PURE__ */ y(Va, { children: [
|
|
4171
|
+
G("TryAgain"),
|
|
4172
4172
|
/* @__PURE__ */ s(Ee, {})
|
|
4173
4173
|
] })
|
|
4174
|
-
] }) }) : /* @__PURE__ */ s(Ht, { isOpen: n, onClose: O, children:
|
|
4174
|
+
] }) }) : /* @__PURE__ */ s(Ht, { isOpen: n, onClose: O, children: g ? /* @__PURE__ */ s(
|
|
4175
4175
|
Sr,
|
|
4176
4176
|
{
|
|
4177
|
-
setBackupActivated:
|
|
4178
|
-
backupCodeEndpoint:
|
|
4177
|
+
setBackupActivated: v,
|
|
4178
|
+
backupCodeEndpoint: k,
|
|
4179
4179
|
confirmationToken: t,
|
|
4180
4180
|
id: a,
|
|
4181
4181
|
setVisible: e
|
|
4182
4182
|
}
|
|
4183
|
-
) : /* @__PURE__ */
|
|
4183
|
+
) : /* @__PURE__ */ y(vr, { children: [
|
|
4184
4184
|
/* @__PURE__ */ s("h2", { children: ee("EnterVerificationCode") }),
|
|
4185
|
-
/* @__PURE__ */ s("p", { children: r !== void 0 ?
|
|
4186
|
-
r !== 1 && /* @__PURE__ */
|
|
4187
|
-
/* @__PURE__ */
|
|
4185
|
+
/* @__PURE__ */ s("p", { children: r !== void 0 ? G(Ya[r]) : "" }),
|
|
4186
|
+
r !== 1 && /* @__PURE__ */ y(ae, { children: [
|
|
4187
|
+
/* @__PURE__ */ y(
|
|
4188
4188
|
Pa,
|
|
4189
4189
|
{
|
|
4190
4190
|
className: m.length > 0 ? "verification-error" : "",
|
|
4191
4191
|
children: [
|
|
4192
4192
|
/* @__PURE__ */ s(tt.OTP, { value: u, onChange: D }),
|
|
4193
|
-
/* @__PURE__ */
|
|
4193
|
+
/* @__PURE__ */ y(Ma, { children: [
|
|
4194
4194
|
ee("DidnReceiveCode"),
|
|
4195
4195
|
" ",
|
|
4196
|
-
/* @__PURE__ */ s(wr, { onClick: () =>
|
|
4196
|
+
/* @__PURE__ */ s(wr, { onClick: () => v(!0), children: ee("EnterBackupCode") })
|
|
4197
4197
|
] }),
|
|
4198
|
-
m.map((L) => /* @__PURE__ */
|
|
4198
|
+
m.map((L) => /* @__PURE__ */ y("span", { children: [
|
|
4199
4199
|
/* @__PURE__ */ s(St, {}),
|
|
4200
4200
|
L.errors[0]
|
|
4201
4201
|
] }, L.name))
|
|
4202
4202
|
]
|
|
4203
4203
|
}
|
|
4204
4204
|
),
|
|
4205
|
-
/* @__PURE__ */
|
|
4205
|
+
/* @__PURE__ */ y(
|
|
4206
4206
|
"button",
|
|
4207
4207
|
{
|
|
4208
|
-
onClick:
|
|
4208
|
+
onClick: T,
|
|
4209
4209
|
disabled: u.length !== 6,
|
|
4210
4210
|
children: [
|
|
4211
4211
|
oe("ShowContactInformation"),
|
|
@@ -4216,20 +4216,20 @@ const Ya = {
|
|
|
4216
4216
|
] })
|
|
4217
4217
|
] }) });
|
|
4218
4218
|
}, Za = () => {
|
|
4219
|
-
const { enableContactInfo: n, disableContactInfo: e } =
|
|
4220
|
-
var m,
|
|
4219
|
+
const { enableContactInfo: n, disableContactInfo: e } = Ve(), { setUser: t } = Se(), [r, a] = V(!1), [i, o] = V(null), [l, d] = V(!1), c = async () => {
|
|
4220
|
+
var m, f, g, v, D, T, k;
|
|
4221
4221
|
if (n)
|
|
4222
4222
|
try {
|
|
4223
4223
|
d(!1);
|
|
4224
4224
|
const O = await n();
|
|
4225
4225
|
o({
|
|
4226
|
-
token: (
|
|
4227
|
-
id: (
|
|
4228
|
-
mfaType: (
|
|
4226
|
+
token: (f = (m = O.data) == null ? void 0 : m.value) == null ? void 0 : f.token,
|
|
4227
|
+
id: (v = (g = O.data) == null ? void 0 : g.value) == null ? void 0 : v.id,
|
|
4228
|
+
mfaType: (T = (D = O.data) == null ? void 0 : D.value) == null ? void 0 : T.mfaType
|
|
4229
4229
|
}), a(!0);
|
|
4230
4230
|
} catch (O) {
|
|
4231
|
-
const L = (
|
|
4232
|
-
(
|
|
4231
|
+
const L = (k = O.response) == null ? void 0 : k.data, M = L == null ? void 0 : L.errors;
|
|
4232
|
+
(M && Array.isArray(M[""]) && M[""][0] === "TooManyAttempts" || M[""][0] === "IsNotAllowed") && d(!0);
|
|
4233
4233
|
}
|
|
4234
4234
|
};
|
|
4235
4235
|
async function u() {
|
|
@@ -4259,102 +4259,102 @@ const Ya = {
|
|
|
4259
4259
|
}
|
|
4260
4260
|
};
|
|
4261
4261
|
}, qa = ({ close: n }) => {
|
|
4262
|
-
var
|
|
4263
|
-
const { user: e } = Se(), t = E((
|
|
4264
|
-
function
|
|
4265
|
-
const O = t.find((L) => L.dataIndex ==
|
|
4262
|
+
var T;
|
|
4263
|
+
const { user: e } = Se(), t = E((k) => k.columns), r = E((k) => k.groupByArr), a = E((k) => k.hideItems), i = E((k) => k.activeTableView), o = E((k) => k.setActiveTableView), l = E((k) => k.setGroupByArr), d = E((k) => k.setHideItems), c = E((k) => k.resetStore), { handleEnableContactInfo: u, handleDisableContactInfo: p, ContactInfoModalProps: m } = Za();
|
|
4264
|
+
function f(k) {
|
|
4265
|
+
const O = t.find((L) => L.dataIndex == k.value);
|
|
4266
4266
|
l([O]);
|
|
4267
4267
|
}
|
|
4268
|
-
function
|
|
4268
|
+
function g(k, O) {
|
|
4269
4269
|
d({
|
|
4270
4270
|
...a,
|
|
4271
|
-
[
|
|
4271
|
+
[k.dataIndex]: !!O
|
|
4272
4272
|
});
|
|
4273
4273
|
}
|
|
4274
|
-
function
|
|
4275
|
-
const L = new Date(
|
|
4276
|
-
return
|
|
4274
|
+
function v(k, O) {
|
|
4275
|
+
const L = new Date(k), M = new Date(O), U = Math.abs(M.getTime() - L.getTime()), _ = Math.floor(U / (1e3 * 60)) % 60, j = Math.floor(U / (1e3 * 60 * 60)) % 24, A = [];
|
|
4276
|
+
return j > 0 && A.push(`${j}h`), _ > 0 && A.push(`${_}m`), A.join(" ");
|
|
4277
4277
|
}
|
|
4278
4278
|
function D() {
|
|
4279
4279
|
c(), n();
|
|
4280
4280
|
}
|
|
4281
|
-
return /* @__PURE__ */
|
|
4282
|
-
/* @__PURE__ */
|
|
4283
|
-
/* @__PURE__ */ s("span", { children:
|
|
4281
|
+
return /* @__PURE__ */ y(Ia, { children: [
|
|
4282
|
+
/* @__PURE__ */ y("header", { children: [
|
|
4283
|
+
/* @__PURE__ */ s("span", { children: G("ViewOptions") }),
|
|
4284
4284
|
/* @__PURE__ */ s("button", { onClick: n, children: /* @__PURE__ */ s(Pt, {}) })
|
|
4285
4285
|
] }),
|
|
4286
|
-
/* @__PURE__ */
|
|
4287
|
-
/* @__PURE__ */
|
|
4288
|
-
/* @__PURE__ */
|
|
4286
|
+
/* @__PURE__ */ y("div", { className: "setting-sidebar-content", children: [
|
|
4287
|
+
/* @__PURE__ */ y("ul", { className: "table-view-list", children: [
|
|
4288
|
+
/* @__PURE__ */ y(
|
|
4289
4289
|
"li",
|
|
4290
4290
|
{
|
|
4291
4291
|
className: i == he.TABLE ? "active" : "",
|
|
4292
4292
|
onClick: () => o(he.TABLE),
|
|
4293
4293
|
children: [
|
|
4294
4294
|
/* @__PURE__ */ s(Mt, {}),
|
|
4295
|
-
/* @__PURE__ */ s("span", { children:
|
|
4295
|
+
/* @__PURE__ */ s("span", { children: G("Table") })
|
|
4296
4296
|
]
|
|
4297
4297
|
}
|
|
4298
4298
|
),
|
|
4299
|
-
/* @__PURE__ */
|
|
4299
|
+
/* @__PURE__ */ y(
|
|
4300
4300
|
"li",
|
|
4301
4301
|
{
|
|
4302
4302
|
className: i == he.LIST ? "active" : "",
|
|
4303
4303
|
onClick: () => o(he.LIST),
|
|
4304
4304
|
children: [
|
|
4305
4305
|
/* @__PURE__ */ s(Ye, {}),
|
|
4306
|
-
/* @__PURE__ */ s("span", { children:
|
|
4306
|
+
/* @__PURE__ */ s("span", { children: G("List") })
|
|
4307
4307
|
]
|
|
4308
4308
|
}
|
|
4309
4309
|
)
|
|
4310
4310
|
] }),
|
|
4311
|
-
/* @__PURE__ */ s("ul", { className: "grouping-list", children: /* @__PURE__ */
|
|
4312
|
-
/* @__PURE__ */ s("span", { children:
|
|
4311
|
+
/* @__PURE__ */ s("ul", { className: "grouping-list", children: /* @__PURE__ */ y("li", { children: [
|
|
4312
|
+
/* @__PURE__ */ s("span", { children: G("Grouping") }),
|
|
4313
4313
|
/* @__PURE__ */ s(
|
|
4314
4314
|
ut,
|
|
4315
4315
|
{
|
|
4316
4316
|
className: "teeest",
|
|
4317
4317
|
showSearch: !0,
|
|
4318
|
-
options: t.map((
|
|
4319
|
-
value:
|
|
4320
|
-
label:
|
|
4318
|
+
options: t.map((k) => ({
|
|
4319
|
+
value: k.dataIndex,
|
|
4320
|
+
label: k.title
|
|
4321
4321
|
})),
|
|
4322
4322
|
labelInValue: !0,
|
|
4323
|
-
placeholder: /* @__PURE__ */
|
|
4323
|
+
placeholder: /* @__PURE__ */ y(Ta, { children: [
|
|
4324
4324
|
/* @__PURE__ */ s(Ye, {}),
|
|
4325
|
-
|
|
4325
|
+
G("NoGrouping")
|
|
4326
4326
|
] }),
|
|
4327
|
-
value: ((
|
|
4328
|
-
onChange:
|
|
4327
|
+
value: ((T = r[0]) == null ? void 0 : T.dataIndex) || null,
|
|
4328
|
+
onChange: f
|
|
4329
4329
|
}
|
|
4330
4330
|
)
|
|
4331
4331
|
] }) }),
|
|
4332
|
-
/* @__PURE__ */
|
|
4333
|
-
/* @__PURE__ */ s("span", { children:
|
|
4334
|
-
/* @__PURE__ */ s("ul", { children: t.map((
|
|
4332
|
+
/* @__PURE__ */ y("div", { className: "properties-list", children: [
|
|
4333
|
+
/* @__PURE__ */ s("span", { children: G("ShowProperties") }),
|
|
4334
|
+
/* @__PURE__ */ s("ul", { children: t.map((k) => /* @__PURE__ */ s(
|
|
4335
4335
|
"li",
|
|
4336
4336
|
{
|
|
4337
|
-
className: a[
|
|
4338
|
-
onClick: () =>
|
|
4339
|
-
children:
|
|
4337
|
+
className: a[k.dataIndex] === !0 ? "hide" : "",
|
|
4338
|
+
onClick: () => g(k, a[k.dataIndex] !== !0),
|
|
4339
|
+
children: k.title
|
|
4340
4340
|
},
|
|
4341
|
-
|
|
4341
|
+
k.dataIndex
|
|
4342
4342
|
)) })
|
|
4343
4343
|
] })
|
|
4344
4344
|
] }),
|
|
4345
|
-
/* @__PURE__ */
|
|
4346
|
-
e != null && e.sensitiveDataExpiration && new Date(e == null ? void 0 : e.sensitiveDataExpiration) > /* @__PURE__ */ new Date() ? /* @__PURE__ */
|
|
4347
|
-
|
|
4345
|
+
/* @__PURE__ */ y("footer", { children: [
|
|
4346
|
+
e != null && e.sensitiveDataExpiration && new Date(e == null ? void 0 : e.sensitiveDataExpiration) > /* @__PURE__ */ new Date() ? /* @__PURE__ */ y("button", { onClick: p, children: [
|
|
4347
|
+
G("HideContactInfo"),
|
|
4348
4348
|
" •",
|
|
4349
4349
|
" ",
|
|
4350
|
-
|
|
4350
|
+
v(new Date(e == null ? void 0 : e.sensitiveDataExpiration), /* @__PURE__ */ new Date()),
|
|
4351
4351
|
/* @__PURE__ */ s(Pt, {})
|
|
4352
|
-
] }) : /* @__PURE__ */
|
|
4352
|
+
] }) : /* @__PURE__ */ y("button", { onClick: u, children: [
|
|
4353
4353
|
oe("ShowContactInformation"),
|
|
4354
4354
|
" ",
|
|
4355
4355
|
/* @__PURE__ */ s(Mt, {})
|
|
4356
4356
|
] }),
|
|
4357
|
-
/* @__PURE__ */
|
|
4357
|
+
/* @__PURE__ */ y("button", { onClick: D, children: [
|
|
4358
4358
|
oe("ResetAllOptions"),
|
|
4359
4359
|
/* @__PURE__ */ s(yr, {})
|
|
4360
4360
|
] })
|
|
@@ -4375,58 +4375,58 @@ const Ya = {
|
|
|
4375
4375
|
CustomFilters: u,
|
|
4376
4376
|
initialFilterValues: p,
|
|
4377
4377
|
tableAdditionalFields: m,
|
|
4378
|
-
createIsModal:
|
|
4379
|
-
editButton:
|
|
4380
|
-
noPagination:
|
|
4378
|
+
createIsModal: f,
|
|
4379
|
+
editButton: g,
|
|
4380
|
+
noPagination: v,
|
|
4381
4381
|
noDataProps: D,
|
|
4382
|
-
exportButton:
|
|
4383
|
-
hasSelect:
|
|
4382
|
+
exportButton: T,
|
|
4383
|
+
hasSelect: k,
|
|
4384
4384
|
selectProps: O,
|
|
4385
4385
|
TableComponent: L,
|
|
4386
|
-
tableProps:
|
|
4387
|
-
noNeedSidebarResponsiveButton:
|
|
4386
|
+
tableProps: M = {},
|
|
4387
|
+
noNeedSidebarResponsiveButton: U,
|
|
4388
4388
|
loadedData: _ = () => {
|
|
4389
4389
|
}
|
|
4390
4390
|
}) => {
|
|
4391
4391
|
var J, ce, se;
|
|
4392
|
-
const { user:
|
|
4393
|
-
() => e({ ...
|
|
4394
|
-
[
|
|
4392
|
+
const { user: j } = Se(), A = E((Z) => Z.filters), H = E((Z) => Z.filterItems), b = E((Z) => Z.sortItems), R = E((Z) => Z.hideItems), B = E((Z) => Z.activeTableView), $ = E((Z) => Z.setColumns), S = E((Z) => Z.setHasCreateBtn), w = E((Z) => Z.setHasSelect), x = E((Z) => Z.setCheckedValue), { response: C, loading: z } = sr(
|
|
4393
|
+
() => e({ ...A, ...p }),
|
|
4394
|
+
[A, j, t]
|
|
4395
4395
|
);
|
|
4396
|
-
|
|
4396
|
+
Tn(), K(() => {
|
|
4397
4397
|
C != null && C.data && _(C.data);
|
|
4398
4398
|
}, [C, _]);
|
|
4399
|
-
const [
|
|
4400
|
-
return
|
|
4401
|
-
|
|
4402
|
-
}, [
|
|
4399
|
+
const [I, F] = V(!1), W = et(null), Y = Pn(W), q = ve(() => n.filter((de) => R[de.dataIndex] !== !0), [n, R]);
|
|
4400
|
+
return K(() => {
|
|
4401
|
+
S(r || !1), w(k || !1);
|
|
4402
|
+
}, [k]), K(() => {
|
|
4403
4403
|
$(n);
|
|
4404
|
-
}, [n]),
|
|
4405
|
-
|
|
4406
|
-
}, [l]), /* @__PURE__ */
|
|
4407
|
-
/* @__PURE__ */
|
|
4404
|
+
}, [n]), K(() => {
|
|
4405
|
+
x(l);
|
|
4406
|
+
}, [l]), /* @__PURE__ */ y(Hn, { children: [
|
|
4407
|
+
/* @__PURE__ */ y(Nn, { ref: W, children: [
|
|
4408
4408
|
/* @__PURE__ */ s(
|
|
4409
4409
|
qn,
|
|
4410
4410
|
{
|
|
4411
|
-
noNeedSidebarResponsiveButton:
|
|
4412
|
-
hasSelect:
|
|
4411
|
+
noNeedSidebarResponsiveButton: U,
|
|
4412
|
+
hasSelect: k,
|
|
4413
4413
|
selectProps: O,
|
|
4414
|
-
exportButton:
|
|
4414
|
+
exportButton: T,
|
|
4415
4415
|
setisSettingPopupVisible: F,
|
|
4416
4416
|
CustomFilters: u,
|
|
4417
4417
|
tableAdditionalFields: m,
|
|
4418
|
-
createIsModal:
|
|
4418
|
+
createIsModal: f,
|
|
4419
4419
|
GridPageTopLeftComponent: a
|
|
4420
4420
|
}
|
|
4421
4421
|
),
|
|
4422
4422
|
i,
|
|
4423
|
-
(
|
|
4423
|
+
(H.length > 0 || b.length > 0) && /* @__PURE__ */ s(da, {})
|
|
4424
4424
|
] }),
|
|
4425
|
-
/* @__PURE__ */ s(Un, { height: `calc(100vh - ${`${
|
|
4425
|
+
/* @__PURE__ */ s(Un, { height: `calc(100vh - ${`${Y}px`})`, children: L ? /* @__PURE__ */ s(
|
|
4426
4426
|
L,
|
|
4427
4427
|
{
|
|
4428
4428
|
dataSource: ((J = C == null ? void 0 : C.data) == null ? void 0 : J.items) || [],
|
|
4429
|
-
...
|
|
4429
|
+
...M,
|
|
4430
4430
|
rowKey: d || "id",
|
|
4431
4431
|
columns: [
|
|
4432
4432
|
{
|
|
@@ -4435,19 +4435,19 @@ const Ya = {
|
|
|
4435
4435
|
},
|
|
4436
4436
|
...q
|
|
4437
4437
|
],
|
|
4438
|
-
loading:
|
|
4438
|
+
loading: z,
|
|
4439
4439
|
pagination: {
|
|
4440
|
-
current:
|
|
4441
|
-
pageSize:
|
|
4440
|
+
current: A.Page,
|
|
4441
|
+
pageSize: A.PageSize,
|
|
4442
4442
|
items: c == null ? void 0 : c.items
|
|
4443
4443
|
}
|
|
4444
4444
|
}
|
|
4445
4445
|
) : /* @__PURE__ */ s(
|
|
4446
|
-
|
|
4446
|
+
za,
|
|
4447
4447
|
{
|
|
4448
|
-
noPagination:
|
|
4449
|
-
editButton:
|
|
4450
|
-
createIsModal:
|
|
4448
|
+
noPagination: v,
|
|
4449
|
+
editButton: g,
|
|
4450
|
+
createIsModal: f,
|
|
4451
4451
|
rowKey: d || "id",
|
|
4452
4452
|
columns: [
|
|
4453
4453
|
{
|
|
@@ -4457,23 +4457,23 @@ const Ya = {
|
|
|
4457
4457
|
...q
|
|
4458
4458
|
],
|
|
4459
4459
|
dataSource: ((ce = C == null ? void 0 : C.data) == null ? void 0 : ce.items) || [],
|
|
4460
|
-
loading:
|
|
4460
|
+
loading: z,
|
|
4461
4461
|
pagination: {
|
|
4462
|
-
current:
|
|
4463
|
-
pageSize:
|
|
4462
|
+
current: A.Page,
|
|
4463
|
+
pageSize: A.PageSize,
|
|
4464
4464
|
items: c == null ? void 0 : c.items
|
|
4465
4465
|
},
|
|
4466
|
-
activeTableView:
|
|
4466
|
+
activeTableView: B,
|
|
4467
4467
|
totalItemCount: ((se = C == null ? void 0 : C.data) == null ? void 0 : se.totalItemCount) || 0,
|
|
4468
4468
|
onRowClick: o,
|
|
4469
4469
|
noDataProps: D || null
|
|
4470
4470
|
}
|
|
4471
4471
|
) }),
|
|
4472
|
-
|
|
4472
|
+
I && /* @__PURE__ */ s(qa, { close: () => F(!1) })
|
|
4473
4473
|
] });
|
|
4474
|
-
}, Eo = (n) => /* @__PURE__ */ s(
|
|
4475
|
-
const n =
|
|
4476
|
-
if (
|
|
4474
|
+
}, Eo = (n) => /* @__PURE__ */ s(In, { children: /* @__PURE__ */ s(Ja, { ...n }) }), zo = () => {
|
|
4475
|
+
const n = xe((v) => v.isOpen), e = xe((v) => v.options), t = xe((v) => v.close), r = Ie();
|
|
4476
|
+
if (K(() => {
|
|
4477
4477
|
n && t();
|
|
4478
4478
|
}, [r.pathname]), !e || !n) return null;
|
|
4479
4479
|
const {
|
|
@@ -4486,32 +4486,32 @@ const Ya = {
|
|
|
4486
4486
|
showCloseButton: u,
|
|
4487
4487
|
onOk: p,
|
|
4488
4488
|
onCancel: m
|
|
4489
|
-
} = e,
|
|
4489
|
+
} = e, f = () => {
|
|
4490
4490
|
m == null || m();
|
|
4491
|
-
},
|
|
4491
|
+
}, g = () => {
|
|
4492
4492
|
p == null || p();
|
|
4493
4493
|
};
|
|
4494
|
-
return /* @__PURE__ */
|
|
4494
|
+
return /* @__PURE__ */ y(
|
|
4495
4495
|
xt,
|
|
4496
4496
|
{
|
|
4497
4497
|
centered: !0,
|
|
4498
|
-
title: a || u ? /* @__PURE__ */
|
|
4498
|
+
title: a || u ? /* @__PURE__ */ y(Xn, { children: [
|
|
4499
4499
|
/* @__PURE__ */ s("span", { children: a }),
|
|
4500
4500
|
u && /* @__PURE__ */ s(ea, { onClick: t, children: /* @__PURE__ */ s(vt, {}) })
|
|
4501
4501
|
] }) : void 0,
|
|
4502
4502
|
...l,
|
|
4503
4503
|
children: [
|
|
4504
4504
|
i && /* @__PURE__ */ s(i, { ...o }),
|
|
4505
|
-
!c && /* @__PURE__ */
|
|
4506
|
-
/* @__PURE__ */ s(Ct, { onClick:
|
|
4505
|
+
!c && /* @__PURE__ */ y(ta, { children: [
|
|
4506
|
+
/* @__PURE__ */ s(Ct, { onClick: f, children: d == null ? void 0 : d.cancelText }),
|
|
4507
4507
|
/* @__PURE__ */ s(
|
|
4508
4508
|
ra,
|
|
4509
4509
|
{
|
|
4510
|
-
onClick:
|
|
4510
|
+
onClick: g,
|
|
4511
4511
|
role: "button",
|
|
4512
4512
|
tabIndex: 0,
|
|
4513
|
-
onKeyDown: (
|
|
4514
|
-
(
|
|
4513
|
+
onKeyDown: (v) => {
|
|
4514
|
+
(v.key === "Enter" || v.key === " ") && g();
|
|
4515
4515
|
},
|
|
4516
4516
|
children: d == null ? void 0 : d.okText
|
|
4517
4517
|
}
|
|
@@ -4520,7 +4520,7 @@ const Ya = {
|
|
|
4520
4520
|
]
|
|
4521
4521
|
}
|
|
4522
4522
|
);
|
|
4523
|
-
},
|
|
4523
|
+
}, Io = ({
|
|
4524
4524
|
displayAddRuleModal: n,
|
|
4525
4525
|
onClose: e,
|
|
4526
4526
|
title: t,
|
|
@@ -4613,8 +4613,8 @@ const Ya = {
|
|
|
4613
4613
|
backButton: a = /* @__PURE__ */ s(ei, {})
|
|
4614
4614
|
}) => {
|
|
4615
4615
|
const i = ke();
|
|
4616
|
-
return /* @__PURE__ */
|
|
4617
|
-
/* @__PURE__ */
|
|
4616
|
+
return /* @__PURE__ */ y(Qa, { className: r || "", children: [
|
|
4617
|
+
/* @__PURE__ */ y("div", { className: "page-starter", children: [
|
|
4618
4618
|
e ? /* @__PURE__ */ s("div", { className: "icon", children: e }) : /* @__PURE__ */ s(Xa, { className: "icon", onClick: () => i(-1), children: a }),
|
|
4619
4619
|
/* @__PURE__ */ s(ti, { items: n })
|
|
4620
4620
|
] }),
|
|
@@ -4627,100 +4627,100 @@ const ni = {
|
|
|
4627
4627
|
2: "OtpDesc",
|
|
4628
4628
|
3: "TotpDesc",
|
|
4629
4629
|
4: "TotpDesc"
|
|
4630
|
-
},
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4630
|
+
}, To = ({
|
|
4631
|
+
confirmTwoFactor: n,
|
|
4632
|
+
resendOTP: e,
|
|
4633
|
+
confirmationToken: t,
|
|
4634
|
+
updatedResponse: r,
|
|
4635
|
+
mfaType: a = 1,
|
|
4636
|
+
id: i,
|
|
4637
|
+
setRefetchData: o,
|
|
4638
|
+
backupCodeEndpoint: l,
|
|
4639
|
+
setVisible: d,
|
|
4640
|
+
visible: c
|
|
4639
4641
|
}) => {
|
|
4640
|
-
const
|
|
4641
|
-
async function
|
|
4642
|
-
var
|
|
4643
|
-
|
|
4644
|
-
if (!(!m || !y))
|
|
4642
|
+
const [u, p] = V(""), [m, f] = V(!0), [g, v] = V(60), [D, T] = V([]), [k, O] = V(!1);
|
|
4643
|
+
async function L() {
|
|
4644
|
+
var j, A, H;
|
|
4645
|
+
if (u)
|
|
4645
4646
|
try {
|
|
4646
|
-
const
|
|
4647
|
-
(
|
|
4648
|
-
} catch (
|
|
4649
|
-
const
|
|
4650
|
-
|
|
4647
|
+
const b = await n({ confirmationToken: t, code: u, id: i });
|
|
4648
|
+
(j = b == null ? void 0 : b.data) != null && j.success && (d(!1), o && o((R) => !R));
|
|
4649
|
+
} catch (b) {
|
|
4650
|
+
const R = ze((H = (A = b == null ? void 0 : b.response) == null ? void 0 : A.data) == null ? void 0 : H.errors);
|
|
4651
|
+
T(R), console.log("Error in Save OTP", b);
|
|
4651
4652
|
}
|
|
4652
4653
|
}
|
|
4653
|
-
async function
|
|
4654
|
-
|
|
4655
|
-
if (y)
|
|
4654
|
+
async function M() {
|
|
4655
|
+
if (e)
|
|
4656
4656
|
try {
|
|
4657
|
-
const
|
|
4658
|
-
|
|
4659
|
-
} catch (
|
|
4660
|
-
console.log("Error in OTP resend",
|
|
4657
|
+
const j = await e(t, i);
|
|
4658
|
+
j.data.success && (r(j), f(!0), v(60));
|
|
4659
|
+
} catch (j) {
|
|
4660
|
+
console.log("Error in OTP resend", j);
|
|
4661
4661
|
}
|
|
4662
4662
|
}
|
|
4663
|
-
function
|
|
4664
|
-
|
|
4663
|
+
function U() {
|
|
4664
|
+
d(!1);
|
|
4665
4665
|
}
|
|
4666
|
-
function
|
|
4667
|
-
|
|
4666
|
+
function _(j) {
|
|
4667
|
+
p(j);
|
|
4668
4668
|
}
|
|
4669
|
-
return
|
|
4670
|
-
if (!
|
|
4671
|
-
const
|
|
4672
|
-
|
|
4669
|
+
return K(() => {
|
|
4670
|
+
if (!m) return;
|
|
4671
|
+
const j = setInterval(() => {
|
|
4672
|
+
v((A) => A <= 1 ? (clearInterval(j), f(!1), 0) : A - 1);
|
|
4673
4673
|
}, 1e3);
|
|
4674
|
-
return () => clearInterval(
|
|
4675
|
-
}, [
|
|
4674
|
+
return () => clearInterval(j);
|
|
4675
|
+
}, [m]), /* @__PURE__ */ s(xt, { open: c, onCancel: U, footer: [null], children: t ? /* @__PURE__ */ s(ae, { children: k ? /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(
|
|
4676
4676
|
Sr,
|
|
4677
4677
|
{
|
|
4678
|
-
setBackupActivated:
|
|
4679
|
-
backupCodeEndpoint:
|
|
4680
|
-
setVisible:
|
|
4681
|
-
id:
|
|
4682
|
-
setRefetchData:
|
|
4683
|
-
confirmationToken:
|
|
4684
|
-
}
|
|
4685
|
-
) }) : /* @__PURE__ */
|
|
4686
|
-
/* @__PURE__ */ s(wt, { children: /* @__PURE__ */
|
|
4678
|
+
setBackupActivated: O,
|
|
4679
|
+
backupCodeEndpoint: l,
|
|
4680
|
+
setVisible: d,
|
|
4681
|
+
id: i,
|
|
4682
|
+
setRefetchData: o,
|
|
4683
|
+
confirmationToken: t
|
|
4684
|
+
}
|
|
4685
|
+
) }) : /* @__PURE__ */ y(ae, { children: [
|
|
4686
|
+
/* @__PURE__ */ s(wt, { children: /* @__PURE__ */ y(kr, { children: [
|
|
4687
4687
|
ee("EnterVerificationCode"),
|
|
4688
|
-
/* @__PURE__ */ s(Ke, { children: ee(ni[
|
|
4688
|
+
/* @__PURE__ */ s(Ke, { children: ee(ni[a]) })
|
|
4689
4689
|
] }) }),
|
|
4690
|
-
/* @__PURE__ */
|
|
4690
|
+
/* @__PURE__ */ y(
|
|
4691
4691
|
Cr,
|
|
4692
4692
|
{
|
|
4693
|
-
className:
|
|
4693
|
+
className: D.length > 0 ? "verification-error" : "",
|
|
4694
4694
|
children: [
|
|
4695
|
-
/* @__PURE__ */ s(tt.OTP, { value:
|
|
4696
|
-
|
|
4695
|
+
/* @__PURE__ */ s(tt.OTP, { value: u, onChange: _ }),
|
|
4696
|
+
D.map((j) => /* @__PURE__ */ y("span", { children: [
|
|
4697
4697
|
/* @__PURE__ */ s(St, {}),
|
|
4698
|
-
|
|
4699
|
-
] },
|
|
4700
|
-
/* @__PURE__ */
|
|
4698
|
+
j.errors[0]
|
|
4699
|
+
] }, j.name)),
|
|
4700
|
+
/* @__PURE__ */ y(ja, { children: [
|
|
4701
4701
|
ee("DidnReceiveCode"),
|
|
4702
4702
|
" ",
|
|
4703
|
-
/* @__PURE__ */ s(wr, { onClick: () =>
|
|
4703
|
+
/* @__PURE__ */ s(wr, { onClick: () => O(!0), children: ee("EnterBackupCode") })
|
|
4704
4704
|
] })
|
|
4705
4705
|
]
|
|
4706
4706
|
}
|
|
4707
4707
|
),
|
|
4708
|
-
/* @__PURE__ */
|
|
4709
|
-
|
|
4708
|
+
/* @__PURE__ */ y(xr, { children: [
|
|
4709
|
+
a !== lt.TOTP && /* @__PURE__ */ s(
|
|
4710
4710
|
Ct,
|
|
4711
4711
|
{
|
|
4712
|
-
disabled:
|
|
4713
|
-
onClick:
|
|
4714
|
-
children:
|
|
4712
|
+
disabled: m,
|
|
4713
|
+
onClick: M,
|
|
4714
|
+
children: m ? `${ee("ResendAvailable")} ${g} ${G("Second")}` : `${ee("Resend")}`
|
|
4715
4715
|
}
|
|
4716
4716
|
),
|
|
4717
|
-
/* @__PURE__ */
|
|
4717
|
+
/* @__PURE__ */ y(
|
|
4718
4718
|
Ze,
|
|
4719
4719
|
{
|
|
4720
|
-
onClick:
|
|
4721
|
-
disabled: (
|
|
4720
|
+
onClick: L,
|
|
4721
|
+
disabled: (u == null ? void 0 : u.length) !== 6 && a !== lt.TOTP,
|
|
4722
4722
|
children: [
|
|
4723
|
-
/* @__PURE__ */
|
|
4723
|
+
/* @__PURE__ */ y("span", { children: [
|
|
4724
4724
|
" ",
|
|
4725
4725
|
oe("Continue")
|
|
4726
4726
|
] }),
|
|
@@ -4733,8 +4733,8 @@ const ni = {
|
|
|
4733
4733
|
}, ai = h.div`
|
|
4734
4734
|
width: 100%;
|
|
4735
4735
|
height: 100%;
|
|
4736
|
-
`, Po = ({ option: n }) => (
|
|
4737
|
-
const e = document.getElementById("my-chart"), t =
|
|
4736
|
+
`, Po = ({ option: n }) => (K(() => {
|
|
4737
|
+
const e = document.getElementById("my-chart"), t = Wr.init(e);
|
|
4738
4738
|
t.setOption(n);
|
|
4739
4739
|
const r = () => t.resize();
|
|
4740
4740
|
return window.addEventListener("resize", r, { passive: !0, capture: !0 }), () => {
|
|
@@ -4862,11 +4862,11 @@ const ii = h(rr)`
|
|
|
4862
4862
|
flex-direction: column;
|
|
4863
4863
|
padding: 1rem;
|
|
4864
4864
|
margin-bottom: 2px;
|
|
4865
|
-
`, Nt = () => /* @__PURE__ */
|
|
4865
|
+
`, Nt = () => /* @__PURE__ */ y(ae, { children: [
|
|
4866
4866
|
/* @__PURE__ */ s(Rt, { width: "80%" }),
|
|
4867
4867
|
/* @__PURE__ */ s(Rt, { width: "60%" })
|
|
4868
|
-
] }), Ho = () => /* @__PURE__ */
|
|
4869
|
-
/* @__PURE__ */ s(oi, { children: /* @__PURE__ */
|
|
4868
|
+
] }), Ho = () => /* @__PURE__ */ y(ci, { children: [
|
|
4869
|
+
/* @__PURE__ */ s(oi, { children: /* @__PURE__ */ y("div", { children: [
|
|
4870
4870
|
/* @__PURE__ */ s("h2", { children: $t("ComingSoon") }),
|
|
4871
4871
|
/* @__PURE__ */ s("p", { children: $t("ComingSoonDesc") })
|
|
4872
4872
|
] }) }),
|
|
@@ -4874,10 +4874,10 @@ const ii = h(rr)`
|
|
|
4874
4874
|
/* @__PURE__ */ s(pe, {}),
|
|
4875
4875
|
/* @__PURE__ */ s(di, { children: [...Array(7)].map((n, e) => /* @__PURE__ */ s(pi, {}, e)) }),
|
|
4876
4876
|
/* @__PURE__ */ s(nt, { children: [...Array(5)].map((n, e) => /* @__PURE__ */ s(qe, { children: /* @__PURE__ */ s(Nt, {}) }, e)) }),
|
|
4877
|
-
/* @__PURE__ */
|
|
4877
|
+
/* @__PURE__ */ y(ui, { children: [
|
|
4878
4878
|
/* @__PURE__ */ s(pe, { width: "20%", height: "18px", marginbottom: "10px" }),
|
|
4879
4879
|
/* @__PURE__ */ s(pe, { width: "20%", height: "18px", marginbottom: "20px" }),
|
|
4880
|
-
/* @__PURE__ */
|
|
4880
|
+
/* @__PURE__ */ y(nt, { children: [
|
|
4881
4881
|
/* @__PURE__ */ s(pe, { width: "12%", height: "18px", marginbottom: "10" }),
|
|
4882
4882
|
/* @__PURE__ */ s(pe, { width: "12%", height: "18px", marginbottom: "10" }),
|
|
4883
4883
|
/* @__PURE__ */ s(pe, { width: "12%", height: "18px", marginbottom: "10" }),
|
|
@@ -5008,7 +5008,7 @@ const ii = h(rr)`
|
|
|
5008
5008
|
}
|
|
5009
5009
|
}
|
|
5010
5010
|
}
|
|
5011
|
-
`, gi = (n) => /* @__PURE__ */
|
|
5011
|
+
`, gi = (n) => /* @__PURE__ */ P.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ P.createElement("path", { d: "M8.0001 5.72363L11.6096 9.33311L10.6668 10.2759L8.0001 7.60925L5.33343 10.2759L4.39062 9.33311L8.0001 5.72363Z", fill: "currentColor" })), Ro = ({
|
|
5012
5012
|
rowKey: n,
|
|
5013
5013
|
CustomExpandableRow: e,
|
|
5014
5014
|
columns: t,
|
|
@@ -5021,11 +5021,11 @@ const ii = h(rr)`
|
|
|
5021
5021
|
pagination: c
|
|
5022
5022
|
}) => {
|
|
5023
5023
|
const [u, p] = V([]), m = t || r;
|
|
5024
|
-
|
|
5025
|
-
o && o.length > 0 && p((
|
|
5024
|
+
K(() => {
|
|
5025
|
+
o && o.length > 0 && p((g) => [...o, ...g]);
|
|
5026
5026
|
}, [o]);
|
|
5027
|
-
function g
|
|
5028
|
-
p(
|
|
5027
|
+
function f(g) {
|
|
5028
|
+
p(g), l && l([]);
|
|
5029
5029
|
}
|
|
5030
5030
|
return /* @__PURE__ */ s(
|
|
5031
5031
|
fi,
|
|
@@ -5039,10 +5039,10 @@ const ii = h(rr)`
|
|
|
5039
5039
|
loading: d,
|
|
5040
5040
|
columns: m,
|
|
5041
5041
|
expandedRowKeys: u,
|
|
5042
|
-
onExpandedRowsChange:
|
|
5042
|
+
onExpandedRowsChange: f,
|
|
5043
5043
|
expandable: {
|
|
5044
|
-
expandedRowRender: (
|
|
5045
|
-
expandIcon: ({ expanded:
|
|
5044
|
+
expandedRowRender: (g) => /* @__PURE__ */ s(e, { ...i, record: g }),
|
|
5045
|
+
expandIcon: ({ expanded: g }) => /* @__PURE__ */ s(ae, { children: g ? /* @__PURE__ */ s("span", { className: "arrow-svg", children: /* @__PURE__ */ s(gi, {}) }) : /* @__PURE__ */ s("span", { className: "arrow-svg", children: /* @__PURE__ */ s(ft, {}) }) }),
|
|
5046
5046
|
expandRowByClick: !0
|
|
5047
5047
|
},
|
|
5048
5048
|
dataSource: a
|
|
@@ -5160,7 +5160,7 @@ const hi = h.div`
|
|
|
5160
5160
|
left: 20px;
|
|
5161
5161
|
top: 10px;
|
|
5162
5162
|
z-index: 1000;
|
|
5163
|
-
`,
|
|
5163
|
+
`, N = (n) => typeof n == "string", Pe = () => {
|
|
5164
5164
|
let n, e;
|
|
5165
5165
|
const t = new Promise((r, a) => {
|
|
5166
5166
|
n = r, e = a;
|
|
@@ -5170,8 +5170,8 @@ const hi = h.div`
|
|
|
5170
5170
|
n.forEach((r) => {
|
|
5171
5171
|
e[r] && (t[r] = e[r]);
|
|
5172
5172
|
});
|
|
5173
|
-
}, vi = /###/g, Vt = (n) => n && n.includes("###") ? n.replace(vi, ".") : n, At = (n) => !n ||
|
|
5174
|
-
const r =
|
|
5173
|
+
}, vi = /###/g, Vt = (n) => n && n.includes("###") ? n.replace(vi, ".") : n, At = (n) => !n || N(n), Re = (n, e, t) => {
|
|
5174
|
+
const r = N(e) ? e.split(".") : e;
|
|
5175
5175
|
let a = 0;
|
|
5176
5176
|
for (; a < r.length - 1; ) {
|
|
5177
5177
|
if (At(n)) return {};
|
|
@@ -5186,26 +5186,26 @@ const hi = h.div`
|
|
|
5186
5186
|
const {
|
|
5187
5187
|
obj: r,
|
|
5188
5188
|
k: a
|
|
5189
|
-
} =
|
|
5189
|
+
} = Re(n, e, Object);
|
|
5190
5190
|
if (r !== void 0 || e.length === 1) {
|
|
5191
5191
|
r[a] = t;
|
|
5192
5192
|
return;
|
|
5193
5193
|
}
|
|
5194
|
-
let i = e[e.length - 1], o = e.slice(0, e.length - 1), l =
|
|
5194
|
+
let i = e[e.length - 1], o = e.slice(0, e.length - 1), l = Re(n, o, Object);
|
|
5195
5195
|
for (; l.obj === void 0 && o.length; )
|
|
5196
|
-
i = `${o[o.length - 1]}.${i}`, o = o.slice(0, o.length - 1), l =
|
|
5196
|
+
i = `${o[o.length - 1]}.${i}`, o = o.slice(0, o.length - 1), l = Re(n, o, Object), l != null && l.obj && typeof l.obj[`${l.k}.${i}`] < "u" && (l.obj = void 0);
|
|
5197
5197
|
l.obj[`${l.k}.${i}`] = t;
|
|
5198
5198
|
}, xi = (n, e, t, r) => {
|
|
5199
5199
|
const {
|
|
5200
5200
|
obj: a,
|
|
5201
5201
|
k: i
|
|
5202
|
-
} =
|
|
5202
|
+
} = Re(n, e, Object);
|
|
5203
5203
|
a[i] = a[i] || [], a[i].push(t);
|
|
5204
5204
|
}, Je = (n, e) => {
|
|
5205
5205
|
const {
|
|
5206
5206
|
obj: t,
|
|
5207
5207
|
k: r
|
|
5208
|
-
} =
|
|
5208
|
+
} = Re(n, e);
|
|
5209
5209
|
if (t && Object.prototype.hasOwnProperty.call(t, r))
|
|
5210
5210
|
return t[r];
|
|
5211
5211
|
}, wi = (n, e, t) => {
|
|
@@ -5213,16 +5213,16 @@ const hi = h.div`
|
|
|
5213
5213
|
return r !== void 0 ? r : Je(e, t);
|
|
5214
5214
|
}, Lr = (n, e, t) => {
|
|
5215
5215
|
for (const r in e)
|
|
5216
|
-
r !== "__proto__" && r !== "constructor" && (r in n ?
|
|
5216
|
+
r !== "__proto__" && r !== "constructor" && (r in n ? N(n[r]) || n[r] instanceof String || N(e[r]) || e[r] instanceof String ? t && (n[r] = e[r]) : Lr(n[r], e[r], t) : n[r] = e[r]);
|
|
5217
5217
|
return n;
|
|
5218
|
-
},
|
|
5218
|
+
}, be = (n) => n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), Ci = {
|
|
5219
5219
|
"&": "&",
|
|
5220
5220
|
"<": "<",
|
|
5221
5221
|
">": ">",
|
|
5222
5222
|
'"': """,
|
|
5223
5223
|
"'": "'",
|
|
5224
5224
|
"/": "/"
|
|
5225
|
-
}, ki = (n) =>
|
|
5225
|
+
}, ki = (n) => N(n) ? n.replace(/[&<>"'\/]/g, (e) => Ci[e]) : n;
|
|
5226
5226
|
class Si {
|
|
5227
5227
|
constructor(e) {
|
|
5228
5228
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
@@ -5266,7 +5266,7 @@ const Li = [" ", ",", "?", "!", ";"], $i = new Si(20), Di = (n, e, t) => {
|
|
|
5266
5266
|
a = o;
|
|
5267
5267
|
}
|
|
5268
5268
|
return a;
|
|
5269
|
-
},
|
|
5269
|
+
}, Fe = (n) => n == null ? void 0 : n.replace(/_/g, "-"), Oi = {
|
|
5270
5270
|
type: "logger",
|
|
5271
5271
|
log(n) {
|
|
5272
5272
|
this.output("log", n);
|
|
@@ -5302,7 +5302,7 @@ class Qe {
|
|
|
5302
5302
|
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
5303
5303
|
}
|
|
5304
5304
|
forward(e, t, r, a) {
|
|
5305
|
-
return a && !this.debug ? null : (
|
|
5305
|
+
return a && !this.debug ? null : (N(e[0]) && (e[0] = `${r}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
5306
5306
|
}
|
|
5307
5307
|
create(e) {
|
|
5308
5308
|
return new Qe(this.logger, {
|
|
@@ -5369,9 +5369,9 @@ class Bt extends rt {
|
|
|
5369
5369
|
var c, u;
|
|
5370
5370
|
const i = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator, o = a.ignoreJSONStructure !== void 0 ? a.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
5371
5371
|
let l;
|
|
5372
|
-
e.includes(".") ? l = e.split(".") : (l = [e, t], r && (Array.isArray(r) ? l.push(...r) :
|
|
5372
|
+
e.includes(".") ? l = e.split(".") : (l = [e, t], r && (Array.isArray(r) ? l.push(...r) : N(r) && i ? l.push(...r.split(i)) : l.push(r)));
|
|
5373
5373
|
const d = Je(this.data, l);
|
|
5374
|
-
return !d && !t && !r && e.includes(".") && (e = l[0], t = l[1], r = l.slice(2).join(".")), d || !o || !
|
|
5374
|
+
return !d && !t && !r && e.includes(".") && (e = l[0], t = l[1], r = l.slice(2).join(".")), d || !o || !N(r) ? d : ct((u = (c = this.data) == null ? void 0 : c[e]) == null ? void 0 : u[t], r, i);
|
|
5375
5375
|
}
|
|
5376
5376
|
addResource(e, t, r, a, i = {
|
|
5377
5377
|
silent: !1
|
|
@@ -5384,7 +5384,7 @@ class Bt extends rt {
|
|
|
5384
5384
|
silent: !1
|
|
5385
5385
|
}) {
|
|
5386
5386
|
for (const i in r)
|
|
5387
|
-
(
|
|
5387
|
+
(N(r[i]) || Array.isArray(r[i])) && this.addResource(e, t, i, r[i], {
|
|
5388
5388
|
silent: !0
|
|
5389
5389
|
});
|
|
5390
5390
|
a.silent || this.emit("added", e, t, r);
|
|
@@ -5453,7 +5453,7 @@ function Oe(n, e) {
|
|
|
5453
5453
|
}
|
|
5454
5454
|
return t.join(r);
|
|
5455
5455
|
}
|
|
5456
|
-
const at = (n) => !
|
|
5456
|
+
const at = (n) => !N(n) && typeof n != "boolean" && typeof n != "number";
|
|
5457
5457
|
class Xe extends rt {
|
|
5458
5458
|
constructor(e, t = {}) {
|
|
5459
5459
|
super(), bi(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = le.create("translator"), this.checkedLoadedFor = {};
|
|
@@ -5484,14 +5484,14 @@ class Xe extends rt {
|
|
|
5484
5484
|
if (d && d.length > 0)
|
|
5485
5485
|
return {
|
|
5486
5486
|
key: e,
|
|
5487
|
-
namespaces:
|
|
5487
|
+
namespaces: N(i) ? [i] : i
|
|
5488
5488
|
};
|
|
5489
5489
|
const c = e.split(r);
|
|
5490
5490
|
(r !== a || r === a && this.options.ns.includes(c[0])) && (i = c.shift()), e = c.join(a);
|
|
5491
5491
|
}
|
|
5492
5492
|
return {
|
|
5493
5493
|
key: e,
|
|
5494
|
-
namespaces:
|
|
5494
|
+
namespaces: N(i) ? [i] : i
|
|
5495
5495
|
};
|
|
5496
5496
|
}
|
|
5497
5497
|
translate(e, t, r) {
|
|
@@ -5504,10 +5504,10 @@ class Xe extends rt {
|
|
|
5504
5504
|
typeof e == "function" && (e = Oe(e, {
|
|
5505
5505
|
...this.options,
|
|
5506
5506
|
...a
|
|
5507
|
-
})), Array.isArray(e) || (e = [String(e)]), e = e.map((
|
|
5507
|
+
})), Array.isArray(e) || (e = [String(e)]), e = e.map((B) => typeof B == "function" ? Oe(B, {
|
|
5508
5508
|
...this.options,
|
|
5509
5509
|
...a
|
|
5510
|
-
}) : String(
|
|
5510
|
+
}) : String(B));
|
|
5511
5511
|
const i = a.returnDetails !== void 0 ? a.returnDetails : this.options.returnDetails, o = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator, {
|
|
5512
5512
|
key: l,
|
|
5513
5513
|
namespaces: d
|
|
@@ -5531,49 +5531,49 @@ class Xe extends rt {
|
|
|
5531
5531
|
usedNS: c,
|
|
5532
5532
|
usedParams: this.getUsedParamsDetails(a)
|
|
5533
5533
|
} : l;
|
|
5534
|
-
const
|
|
5535
|
-
let
|
|
5536
|
-
const
|
|
5534
|
+
const f = this.resolve(e, a);
|
|
5535
|
+
let g = f == null ? void 0 : f.res;
|
|
5536
|
+
const v = (f == null ? void 0 : f.usedKey) || l, D = (f == null ? void 0 : f.exactUsedKey) || l, T = ["[object Number]", "[object Function]", "[object RegExp]"], k = a.joinArrays !== void 0 ? a.joinArrays : this.options.joinArrays, O = !this.i18nFormat || this.i18nFormat.handleAsObject, L = a.count !== void 0 && !N(a.count), M = Xe.hasDefaultValue(a), U = L ? this.pluralResolver.getSuffix(p, a.count, a) : "", _ = a.ordinal && L ? this.pluralResolver.getSuffix(p, a.count, {
|
|
5537
5537
|
ordinal: !1
|
|
5538
|
-
}) : "",
|
|
5539
|
-
let
|
|
5540
|
-
O && !
|
|
5541
|
-
const
|
|
5542
|
-
if (O &&
|
|
5538
|
+
}) : "", j = L && !a.ordinal && a.count === 0, A = j && a[`defaultValue${this.options.pluralSeparator}zero`] || a[`defaultValue${U}`] || a[`defaultValue${_}`] || a.defaultValue;
|
|
5539
|
+
let H = g;
|
|
5540
|
+
O && !g && M && (H = A);
|
|
5541
|
+
const b = at(H), R = Object.prototype.toString.apply(H);
|
|
5542
|
+
if (O && H && b && !T.includes(R) && !(N(k) && Array.isArray(H))) {
|
|
5543
5543
|
if (!a.returnObjects && !this.options.returnObjects) {
|
|
5544
5544
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
5545
|
-
const
|
|
5545
|
+
const B = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(v, H, {
|
|
5546
5546
|
...a,
|
|
5547
5547
|
ns: d
|
|
5548
5548
|
}) : `key '${l} (${this.language})' returned an object instead of string.`;
|
|
5549
|
-
return i ? (
|
|
5549
|
+
return i ? (f.res = B, f.usedParams = this.getUsedParamsDetails(a), f) : B;
|
|
5550
5550
|
}
|
|
5551
5551
|
if (o) {
|
|
5552
|
-
const
|
|
5553
|
-
for (const
|
|
5554
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
5555
|
-
const
|
|
5556
|
-
|
|
5552
|
+
const B = Array.isArray(H), $ = B ? [] : {}, S = B ? D : v;
|
|
5553
|
+
for (const w in H)
|
|
5554
|
+
if (Object.prototype.hasOwnProperty.call(H, w)) {
|
|
5555
|
+
const x = `${S}${o}${w}`;
|
|
5556
|
+
M && !g ? $[w] = this.translate(x, {
|
|
5557
5557
|
...a,
|
|
5558
|
-
defaultValue: at(
|
|
5558
|
+
defaultValue: at(A) ? A[w] : void 0,
|
|
5559
5559
|
joinArrays: !1,
|
|
5560
5560
|
ns: d
|
|
5561
|
-
}) : $[
|
|
5561
|
+
}) : $[w] = this.translate(x, {
|
|
5562
5562
|
...a,
|
|
5563
5563
|
joinArrays: !1,
|
|
5564
5564
|
ns: d
|
|
5565
|
-
}), $[
|
|
5565
|
+
}), $[w] === x && ($[w] = H[w]);
|
|
5566
5566
|
}
|
|
5567
|
-
|
|
5567
|
+
g = $;
|
|
5568
5568
|
}
|
|
5569
|
-
} else if (O &&
|
|
5570
|
-
|
|
5569
|
+
} else if (O && N(k) && Array.isArray(g))
|
|
5570
|
+
g = g.join(k), g && (g = this.extendTranslation(g, e, a, r));
|
|
5571
5571
|
else {
|
|
5572
|
-
let
|
|
5573
|
-
!this.isValidLookup(
|
|
5574
|
-
const
|
|
5575
|
-
if ($ ||
|
|
5576
|
-
if (this.logger.log(
|
|
5572
|
+
let B = !1, $ = !1;
|
|
5573
|
+
!this.isValidLookup(g) && M && (B = !0, g = A), this.isValidLookup(g) || ($ = !0, g = l);
|
|
5574
|
+
const w = (a.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && $ ? void 0 : g, x = M && A !== g && this.options.updateMissing;
|
|
5575
|
+
if ($ || B || x) {
|
|
5576
|
+
if (this.logger.log(x ? "updateKey" : "missingKey", p, c, l, x ? A : g), o) {
|
|
5577
5577
|
const F = this.resolve(l, {
|
|
5578
5578
|
...a,
|
|
5579
5579
|
keySeparator: !1
|
|
@@ -5581,26 +5581,26 @@ class Xe extends rt {
|
|
|
5581
5581
|
F && F.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.");
|
|
5582
5582
|
}
|
|
5583
5583
|
let C = [];
|
|
5584
|
-
const
|
|
5585
|
-
if (this.options.saveMissingTo === "fallback" &&
|
|
5586
|
-
for (let F = 0; F <
|
|
5587
|
-
C.push(
|
|
5584
|
+
const z = this.languageUtils.getFallbackCodes(this.options.fallbackLng, a.lng || this.language);
|
|
5585
|
+
if (this.options.saveMissingTo === "fallback" && z && z[0])
|
|
5586
|
+
for (let F = 0; F < z.length; F++)
|
|
5587
|
+
C.push(z[F]);
|
|
5588
5588
|
else this.options.saveMissingTo === "all" ? C = this.languageUtils.toResolveHierarchy(a.lng || this.language) : C.push(a.lng || this.language);
|
|
5589
|
-
const
|
|
5589
|
+
const I = (F, W, Y) => {
|
|
5590
5590
|
var J;
|
|
5591
|
-
const q =
|
|
5592
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(F, c,
|
|
5591
|
+
const q = M && Y !== g ? Y : w;
|
|
5592
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(F, c, W, q, x, a) : (J = this.backendConnector) != null && J.saveMissing && this.backendConnector.saveMissing(F, c, W, q, x, a), this.emit("missingKey", F, c, W, g);
|
|
5593
5593
|
};
|
|
5594
5594
|
this.options.saveMissing && (this.options.saveMissingPlurals && L ? C.forEach((F) => {
|
|
5595
|
-
const
|
|
5596
|
-
|
|
5597
|
-
|
|
5595
|
+
const W = this.pluralResolver.getSuffixes(F, a);
|
|
5596
|
+
j && a[`defaultValue${this.options.pluralSeparator}zero`] && !W.includes(`${this.options.pluralSeparator}zero`) && W.push(`${this.options.pluralSeparator}zero`), W.forEach((Y) => {
|
|
5597
|
+
I([F], l + Y, a[`defaultValue${Y}`] || A);
|
|
5598
5598
|
});
|
|
5599
|
-
}) :
|
|
5599
|
+
}) : I(C, l, A));
|
|
5600
5600
|
}
|
|
5601
|
-
|
|
5601
|
+
g = this.extendTranslation(g, e, a, f, r), $ && g === l && this.options.appendNamespaceToMissingKey && (g = `${c}${u}${l}`), ($ || B) && this.options.parseMissingKeyHandler && (g = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}${u}${l}` : l, B ? g : void 0, a));
|
|
5602
5602
|
}
|
|
5603
|
-
return i ? (
|
|
5603
|
+
return i ? (f.res = g, f.usedParams = this.getUsedParamsDetails(a), f) : g;
|
|
5604
5604
|
}
|
|
5605
5605
|
extendTranslation(e, t, r, a, i) {
|
|
5606
5606
|
var d, c;
|
|
@@ -5619,23 +5619,23 @@ class Xe extends rt {
|
|
|
5619
5619
|
...r.interpolation
|
|
5620
5620
|
}
|
|
5621
5621
|
});
|
|
5622
|
-
const u =
|
|
5622
|
+
const u = N(e) && (((c = r == null ? void 0 : r.interpolation) == null ? void 0 : c.skipOnVariables) !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
5623
5623
|
let p;
|
|
5624
5624
|
if (u) {
|
|
5625
|
-
const
|
|
5626
|
-
p =
|
|
5625
|
+
const f = e.match(this.interpolator.nestingRegexp);
|
|
5626
|
+
p = f && f.length;
|
|
5627
5627
|
}
|
|
5628
|
-
let m = r.replace && !
|
|
5628
|
+
let m = r.replace && !N(r.replace) ? r.replace : r;
|
|
5629
5629
|
if (this.options.interpolation.defaultVariables && (m = {
|
|
5630
5630
|
...this.options.interpolation.defaultVariables,
|
|
5631
5631
|
...m
|
|
5632
5632
|
}), e = this.interpolator.interpolate(e, m, r.lng || this.language || a.usedLng, r), u) {
|
|
5633
|
-
const
|
|
5634
|
-
p <
|
|
5633
|
+
const f = e.match(this.interpolator.nestingRegexp), g = f && f.length;
|
|
5634
|
+
p < g && (r.nest = !1);
|
|
5635
5635
|
}
|
|
5636
|
-
!r.lng && a && a.res && (r.lng = this.language || a.usedLng), r.nest !== !1 && (e = this.interpolator.nest(e, (...
|
|
5636
|
+
!r.lng && a && a.res && (r.lng = this.language || a.usedLng), r.nest !== !1 && (e = this.interpolator.nest(e, (...f) => (i == null ? void 0 : i[0]) === f[0] && !r.context ? (this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${t[0]}`), null) : this.translate(...f, t), r)), r.interpolation && this.interpolator.reset();
|
|
5637
5637
|
}
|
|
5638
|
-
const o = r.postProcess || this.options.postProcess, l =
|
|
5638
|
+
const o = r.postProcess || this.options.postProcess, l = N(o) ? [o] : o;
|
|
5639
5639
|
return e != null && (l != null && l.length) && r.applyPostProcessor !== !1 && (e = $r.handle(l, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
5640
5640
|
i18nResolved: {
|
|
5641
5641
|
...a,
|
|
@@ -5646,7 +5646,7 @@ class Xe extends rt {
|
|
|
5646
5646
|
}
|
|
5647
5647
|
resolve(e, t = {}) {
|
|
5648
5648
|
let r, a, i, o, l;
|
|
5649
|
-
return
|
|
5649
|
+
return N(e) && (e = [e]), Array.isArray(e) && (e = e.map((d) => typeof d == "function" ? Oe(d, {
|
|
5650
5650
|
...this.options,
|
|
5651
5651
|
...t
|
|
5652
5652
|
}) : d)), e.forEach((d) => {
|
|
@@ -5655,28 +5655,28 @@ class Xe extends rt {
|
|
|
5655
5655
|
a = u;
|
|
5656
5656
|
let p = c.namespaces;
|
|
5657
5657
|
this.options.fallbackNS && (p = p.concat(this.options.fallbackNS));
|
|
5658
|
-
const m = t.count !== void 0 && !
|
|
5658
|
+
const m = t.count !== void 0 && !N(t.count), f = m && !t.ordinal && t.count === 0, g = t.context !== void 0 && (N(t.context) || typeof t.context == "number") && t.context !== "", v = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
5659
5659
|
p.forEach((D) => {
|
|
5660
|
-
var
|
|
5661
|
-
this.isValidLookup(r) || (l = D, !this.checkedLoadedFor[`${
|
|
5662
|
-
var
|
|
5660
|
+
var T, k;
|
|
5661
|
+
this.isValidLookup(r) || (l = D, !this.checkedLoadedFor[`${v[0]}-${D}`] && ((T = this.utils) != null && T.hasLoadedNamespace) && !((k = this.utils) != null && k.hasLoadedNamespace(l)) && (this.checkedLoadedFor[`${v[0]}-${D}`] = !0, this.logger.warn(`key "${a}" for languages "${v.join(", ")}" won't get resolved as namespace "${l}" 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!!!")), v.forEach((O) => {
|
|
5662
|
+
var U;
|
|
5663
5663
|
if (this.isValidLookup(r)) return;
|
|
5664
5664
|
o = O;
|
|
5665
5665
|
const L = [u];
|
|
5666
|
-
if ((
|
|
5666
|
+
if ((U = this.i18nFormat) != null && U.addLookupKeys)
|
|
5667
5667
|
this.i18nFormat.addLookupKeys(L, u, O, D, t);
|
|
5668
5668
|
else {
|
|
5669
5669
|
let _;
|
|
5670
5670
|
m && (_ = this.pluralResolver.getSuffix(O, t.count, t));
|
|
5671
|
-
const
|
|
5672
|
-
if (m && (t.ordinal && _.startsWith(
|
|
5673
|
-
const
|
|
5674
|
-
L.push(
|
|
5671
|
+
const j = `${this.options.pluralSeparator}zero`, A = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
5672
|
+
if (m && (t.ordinal && _.startsWith(A) && L.push(u + _.replace(A, this.options.pluralSeparator)), L.push(u + _), f && L.push(u + j)), g) {
|
|
5673
|
+
const H = `${u}${this.options.contextSeparator || "_"}${t.context}`;
|
|
5674
|
+
L.push(H), m && (t.ordinal && _.startsWith(A) && L.push(H + _.replace(A, this.options.pluralSeparator)), L.push(H + _), f && L.push(H + j));
|
|
5675
5675
|
}
|
|
5676
5676
|
}
|
|
5677
|
-
let
|
|
5678
|
-
for (;
|
|
5679
|
-
this.isValidLookup(r) || (i =
|
|
5677
|
+
let M;
|
|
5678
|
+
for (; M = L.pop(); )
|
|
5679
|
+
this.isValidLookup(r) || (i = M, r = this.getResource(O, D, M, t));
|
|
5680
5680
|
}));
|
|
5681
5681
|
});
|
|
5682
5682
|
}), {
|
|
@@ -5695,7 +5695,7 @@ class Xe extends rt {
|
|
|
5695
5695
|
return (i = this.i18nFormat) != null && i.getResource ? this.i18nFormat.getResource(e, t, r, a) : this.resourceStore.getResource(e, t, r, a);
|
|
5696
5696
|
}
|
|
5697
5697
|
getUsedParamsDetails(e = {}) {
|
|
5698
|
-
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], r = e.replace && !
|
|
5698
|
+
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], r = e.replace && !N(e.replace);
|
|
5699
5699
|
let a = r ? e.replace : e;
|
|
5700
5700
|
if (r && typeof e.count < "u" && (a.count = e.count), this.options.interpolation.defaultVariables && (a = {
|
|
5701
5701
|
...this.options.interpolation.defaultVariables,
|
|
@@ -5722,17 +5722,17 @@ class Gt {
|
|
|
5722
5722
|
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = le.create("languageUtils");
|
|
5723
5723
|
}
|
|
5724
5724
|
getScriptPartFromCode(e) {
|
|
5725
|
-
if (e =
|
|
5725
|
+
if (e = Fe(e), !e || !e.includes("-")) return null;
|
|
5726
5726
|
const t = e.split("-");
|
|
5727
5727
|
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
5728
5728
|
}
|
|
5729
5729
|
getLanguagePartFromCode(e) {
|
|
5730
|
-
if (e =
|
|
5730
|
+
if (e = Fe(e), !e || !e.includes("-")) return e;
|
|
5731
5731
|
const t = e.split("-");
|
|
5732
5732
|
return this.formatLanguageCode(t[0]);
|
|
5733
5733
|
}
|
|
5734
5734
|
formatLanguageCode(e) {
|
|
5735
|
-
if (
|
|
5735
|
+
if (N(e) && e.includes("-")) {
|
|
5736
5736
|
let t;
|
|
5737
5737
|
try {
|
|
5738
5738
|
t = Intl.getCanonicalLocales(e)[0];
|
|
@@ -5763,7 +5763,7 @@ class Gt {
|
|
|
5763
5763
|
}
|
|
5764
5764
|
getFallbackCodes(e, t) {
|
|
5765
5765
|
if (!e) return [];
|
|
5766
|
-
if (typeof e == "function" && (e = e(t)),
|
|
5766
|
+
if (typeof e == "function" && (e = e(t)), N(e) && (e = [e]), Array.isArray(e)) return e;
|
|
5767
5767
|
if (!t) return e.default || [];
|
|
5768
5768
|
let r = e[t];
|
|
5769
5769
|
return r || (r = e[this.getScriptPartFromCode(t)]), r || (r = e[this.formatLanguageCode(t)]), r || (r = e[this.getLanguagePartFromCode(t)]), r || (r = e.default), r || [];
|
|
@@ -5772,7 +5772,7 @@ class Gt {
|
|
|
5772
5772
|
const r = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), a = [], i = (o) => {
|
|
5773
5773
|
o && (this.isSupportedCode(o) ? a.push(o) : this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`));
|
|
5774
5774
|
};
|
|
5775
|
-
return
|
|
5775
|
+
return N(e) && (e.includes("-") || e.includes("_")) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(e))) : N(e) && i(this.formatLanguageCode(e)), r.forEach((o) => {
|
|
5776
5776
|
a.includes(o) || i(this.formatLanguageCode(o));
|
|
5777
5777
|
}), a;
|
|
5778
5778
|
}
|
|
@@ -5784,13 +5784,13 @@ const Ut = {
|
|
|
5784
5784
|
few: 3,
|
|
5785
5785
|
many: 4,
|
|
5786
5786
|
other: 5
|
|
5787
|
-
},
|
|
5787
|
+
}, Wt = {
|
|
5788
5788
|
select: (n) => n === 1 ? "one" : "other",
|
|
5789
5789
|
resolvedOptions: () => ({
|
|
5790
5790
|
pluralCategories: ["one", "other"]
|
|
5791
5791
|
})
|
|
5792
5792
|
};
|
|
5793
|
-
class
|
|
5793
|
+
class zi {
|
|
5794
5794
|
constructor(e, t = {}) {
|
|
5795
5795
|
this.languageUtils = e, this.options = t, this.logger = le.create("pluralResolver"), this.pluralRulesCache = {};
|
|
5796
5796
|
}
|
|
@@ -5798,7 +5798,7 @@ class Ti {
|
|
|
5798
5798
|
this.pluralRulesCache = {};
|
|
5799
5799
|
}
|
|
5800
5800
|
getRule(e, t = {}) {
|
|
5801
|
-
const r =
|
|
5801
|
+
const r = Fe(e === "dev" ? "en" : e), a = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
|
|
5802
5802
|
cleanedCode: r,
|
|
5803
5803
|
type: a
|
|
5804
5804
|
});
|
|
@@ -5811,8 +5811,8 @@ class Ti {
|
|
|
5811
5811
|
});
|
|
5812
5812
|
} catch {
|
|
5813
5813
|
if (typeof Intl > "u")
|
|
5814
|
-
return this.logger.error("No Intl support, please use an Intl polyfill!"),
|
|
5815
|
-
if (!e.match(/-|_/)) return
|
|
5814
|
+
return this.logger.error("No Intl support, please use an Intl polyfill!"), Wt;
|
|
5815
|
+
if (!e.match(/-|_/)) return Wt;
|
|
5816
5816
|
const d = this.languageUtils.getLanguagePartFromCode(e);
|
|
5817
5817
|
o = this.getRule(d, t);
|
|
5818
5818
|
}
|
|
@@ -5834,9 +5834,9 @@ class Ti {
|
|
|
5834
5834
|
return a ? `${this.options.prepend}${r.ordinal ? `ordinal${this.options.prepend}` : ""}${a.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, r));
|
|
5835
5835
|
}
|
|
5836
5836
|
}
|
|
5837
|
-
const
|
|
5837
|
+
const _t = (n, e, t, r = ".", a = !0) => {
|
|
5838
5838
|
let i = wi(n, e, t);
|
|
5839
|
-
return !i && a &&
|
|
5839
|
+
return !i && a && N(t) && (i = ct(n, t, r), i === void 0 && (i = ct(e, t, r))), i;
|
|
5840
5840
|
}, it = (n) => n.replace(/\$/g, "$$$$");
|
|
5841
5841
|
class Yt {
|
|
5842
5842
|
constructor(e = {}) {
|
|
@@ -5859,14 +5859,14 @@ class Yt {
|
|
|
5859
5859
|
unescapeSuffix: u,
|
|
5860
5860
|
unescapePrefix: p,
|
|
5861
5861
|
nestingPrefix: m,
|
|
5862
|
-
nestingPrefixEscaped:
|
|
5863
|
-
nestingSuffix:
|
|
5864
|
-
nestingSuffixEscaped:
|
|
5862
|
+
nestingPrefixEscaped: f,
|
|
5863
|
+
nestingSuffix: g,
|
|
5864
|
+
nestingSuffixEscaped: v,
|
|
5865
5865
|
nestingOptionsSeparator: D,
|
|
5866
|
-
maxReplaces:
|
|
5867
|
-
alwaysFormat:
|
|
5866
|
+
maxReplaces: T,
|
|
5867
|
+
alwaysFormat: k
|
|
5868
5868
|
} = e.interpolation;
|
|
5869
|
-
this.escape = t !== void 0 ? t : ki, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = a !== void 0 ? a : !1, this.prefix = i ?
|
|
5869
|
+
this.escape = t !== void 0 ? t : ki, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = a !== void 0 ? a : !1, this.prefix = i ? be(i) : o || "{{", this.suffix = l ? be(l) : d || "}}", this.formatSeparator = c || ",", this.unescapePrefix = u ? "" : p || "-", this.unescapeSuffix = this.unescapePrefix ? "" : u || "", this.nestingPrefix = m ? be(m) : f || be("$t("), this.nestingSuffix = g ? be(g) : v || be(")"), this.nestingOptionsSeparator = D || ",", this.maxReplaces = T || 1e3, this.alwaysFormat = k !== void 0 ? k : !1, this.resetRegExp();
|
|
5870
5870
|
}
|
|
5871
5871
|
reset() {
|
|
5872
5872
|
this.options && this.init(this.options);
|
|
@@ -5876,49 +5876,49 @@ class Yt {
|
|
|
5876
5876
|
this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
|
|
5877
5877
|
}
|
|
5878
5878
|
interpolate(e, t, r, a) {
|
|
5879
|
-
var
|
|
5879
|
+
var f;
|
|
5880
5880
|
let i, o, l;
|
|
5881
|
-
const d = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (
|
|
5882
|
-
if (!
|
|
5883
|
-
const
|
|
5884
|
-
return this.alwaysFormat ? this.format(
|
|
5881
|
+
const d = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (g) => {
|
|
5882
|
+
if (!g.includes(this.formatSeparator)) {
|
|
5883
|
+
const k = _t(t, d, g, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
5884
|
+
return this.alwaysFormat ? this.format(k, void 0, r, {
|
|
5885
5885
|
...a,
|
|
5886
5886
|
...t,
|
|
5887
|
-
interpolationkey:
|
|
5888
|
-
}) :
|
|
5887
|
+
interpolationkey: g
|
|
5888
|
+
}) : k;
|
|
5889
5889
|
}
|
|
5890
|
-
const
|
|
5891
|
-
return this.format(
|
|
5890
|
+
const v = g.split(this.formatSeparator), D = v.shift().trim(), T = v.join(this.formatSeparator).trim();
|
|
5891
|
+
return this.format(_t(t, d, D, this.options.keySeparator, this.options.ignoreJSONStructure), T, r, {
|
|
5892
5892
|
...a,
|
|
5893
5893
|
...t,
|
|
5894
5894
|
interpolationkey: D
|
|
5895
5895
|
});
|
|
5896
5896
|
};
|
|
5897
5897
|
this.resetRegExp();
|
|
5898
|
-
const u = (a == null ? void 0 : a.missingInterpolationHandler) || this.options.missingInterpolationHandler, p = ((
|
|
5898
|
+
const u = (a == null ? void 0 : a.missingInterpolationHandler) || this.options.missingInterpolationHandler, p = ((f = a == null ? void 0 : a.interpolation) == null ? void 0 : f.skipOnVariables) !== void 0 ? a.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
5899
5899
|
return [{
|
|
5900
5900
|
regex: this.regexpUnescape,
|
|
5901
|
-
safeValue: (
|
|
5901
|
+
safeValue: (g) => it(g)
|
|
5902
5902
|
}, {
|
|
5903
5903
|
regex: this.regexp,
|
|
5904
|
-
safeValue: (
|
|
5905
|
-
}].forEach((
|
|
5906
|
-
for (l = 0; i =
|
|
5907
|
-
const
|
|
5908
|
-
if (o = c(
|
|
5904
|
+
safeValue: (g) => this.escapeValue ? it(this.escape(g)) : it(g)
|
|
5905
|
+
}].forEach((g) => {
|
|
5906
|
+
for (l = 0; i = g.regex.exec(e); ) {
|
|
5907
|
+
const v = i[1].trim();
|
|
5908
|
+
if (o = c(v), o === void 0)
|
|
5909
5909
|
if (typeof u == "function") {
|
|
5910
|
-
const
|
|
5911
|
-
o =
|
|
5912
|
-
} else if (a && Object.prototype.hasOwnProperty.call(a,
|
|
5910
|
+
const T = u(e, i, a);
|
|
5911
|
+
o = N(T) ? T : "";
|
|
5912
|
+
} else if (a && Object.prototype.hasOwnProperty.call(a, v))
|
|
5913
5913
|
o = "";
|
|
5914
5914
|
else if (p) {
|
|
5915
5915
|
o = i[0];
|
|
5916
5916
|
continue;
|
|
5917
5917
|
} else
|
|
5918
|
-
this.logger.warn(`missed to pass in variable ${
|
|
5919
|
-
else !
|
|
5920
|
-
const D =
|
|
5921
|
-
if (e = e.replace(i[0], D), p ? (
|
|
5918
|
+
this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`), o = "";
|
|
5919
|
+
else !N(o) && !this.useRawValueToEscape && (o = Ft(o));
|
|
5920
|
+
const D = g.safeValue(o);
|
|
5921
|
+
if (e = e.replace(i[0], D), p ? (g.regex.lastIndex += o.length, g.regex.lastIndex -= i[0].length) : g.regex.lastIndex = 0, l++, l >= this.maxReplaces)
|
|
5922
5922
|
break;
|
|
5923
5923
|
}
|
|
5924
5924
|
}), e;
|
|
@@ -5928,18 +5928,18 @@ class Yt {
|
|
|
5928
5928
|
const l = (d, c) => {
|
|
5929
5929
|
const u = this.nestingOptionsSeparator;
|
|
5930
5930
|
if (!d.includes(u)) return d;
|
|
5931
|
-
const p = d.split(new RegExp(`${
|
|
5931
|
+
const p = d.split(new RegExp(`${be(u)}[ ]*{`));
|
|
5932
5932
|
let m = `{${p[1]}`;
|
|
5933
5933
|
d = p[0], m = this.interpolate(m, o);
|
|
5934
|
-
const
|
|
5935
|
-
(((
|
|
5934
|
+
const f = m.match(/'/g), g = m.match(/"/g);
|
|
5935
|
+
(((f == null ? void 0 : f.length) ?? 0) % 2 === 0 && !g || ((g == null ? void 0 : g.length) ?? 0) % 2 !== 0) && (m = m.replace(/'/g, '"'));
|
|
5936
5936
|
try {
|
|
5937
5937
|
o = JSON.parse(m), c && (o = {
|
|
5938
5938
|
...c,
|
|
5939
5939
|
...o
|
|
5940
5940
|
});
|
|
5941
|
-
} catch (
|
|
5942
|
-
return this.logger.warn(`failed parsing options string in nesting for key ${d}`,
|
|
5941
|
+
} catch (v) {
|
|
5942
|
+
return this.logger.warn(`failed parsing options string in nesting for key ${d}`, v), `${d}${u}${m}`;
|
|
5943
5943
|
}
|
|
5944
5944
|
return o.defaultValue && o.defaultValue.includes(this.prefix) && delete o.defaultValue, d;
|
|
5945
5945
|
};
|
|
@@ -5947,10 +5947,10 @@ class Yt {
|
|
|
5947
5947
|
let d = [];
|
|
5948
5948
|
o = {
|
|
5949
5949
|
...r
|
|
5950
|
-
}, o = o.replace && !
|
|
5950
|
+
}, o = o.replace && !N(o.replace) ? o.replace : o, o.applyPostProcessor = !1, delete o.defaultValue;
|
|
5951
5951
|
const c = /{.*}/.test(a[1]) ? a[1].lastIndexOf("}") + 1 : a[1].indexOf(this.formatSeparator);
|
|
5952
|
-
if (c !== -1 && (d = a[1].slice(c).split(this.formatSeparator).map((u) => u.trim()).filter(Boolean), a[1] = a[1].slice(0, c)), i = t(l.call(this, a[1].trim(), o), o), i && a[0] === e && !
|
|
5953
|
-
|
|
5952
|
+
if (c !== -1 && (d = a[1].slice(c).split(this.formatSeparator).map((u) => u.trim()).filter(Boolean), a[1] = a[1].slice(0, c)), i = t(l.call(this, a[1].trim(), o), o), i && a[0] === e && !N(i)) return i;
|
|
5953
|
+
N(i) || (i = Ft(i)), i || (this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`), i = ""), d.length && (i = d.reduce((u, p) => this.format(u, p, r.lng, {
|
|
5954
5954
|
...r,
|
|
5955
5955
|
interpolationkey: a[1].trim()
|
|
5956
5956
|
}), i.trim())), e = e.replace(a[0], i), this.regexp.lastIndex = 0;
|
|
@@ -5958,7 +5958,7 @@ class Yt {
|
|
|
5958
5958
|
return e;
|
|
5959
5959
|
}
|
|
5960
5960
|
}
|
|
5961
|
-
const
|
|
5961
|
+
const Ii = (n) => {
|
|
5962
5962
|
let e = n.toLowerCase().trim();
|
|
5963
5963
|
const t = {};
|
|
5964
5964
|
if (n.includes("(")) {
|
|
@@ -5986,9 +5986,9 @@ const zi = (n) => {
|
|
|
5986
5986
|
});
|
|
5987
5987
|
const o = r + JSON.stringify(i);
|
|
5988
5988
|
let l = e[o];
|
|
5989
|
-
return l || (l = n(
|
|
5989
|
+
return l || (l = n(Fe(r), a), e[o] = l), l(t);
|
|
5990
5990
|
};
|
|
5991
|
-
},
|
|
5991
|
+
}, Ti = (n) => (e, t, r) => n(Fe(t), r)(e);
|
|
5992
5992
|
class Pi {
|
|
5993
5993
|
constructor(e = {}) {
|
|
5994
5994
|
this.logger = le.create("formatter"), this.options = e, this.init(e);
|
|
@@ -5997,7 +5997,7 @@ class Pi {
|
|
|
5997
5997
|
interpolation: {}
|
|
5998
5998
|
}) {
|
|
5999
5999
|
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
6000
|
-
const r = t.cacheInBuiltFormats ? Kt :
|
|
6000
|
+
const r = t.cacheInBuiltFormats ? Kt : Ti;
|
|
6001
6001
|
this.formats = {
|
|
6002
6002
|
number: r((a, i) => {
|
|
6003
6003
|
const o = new Intl.NumberFormat(a, {
|
|
@@ -6050,18 +6050,18 @@ class Pi {
|
|
|
6050
6050
|
const {
|
|
6051
6051
|
formatName: c,
|
|
6052
6052
|
formatOptions: u
|
|
6053
|
-
} =
|
|
6053
|
+
} = Ii(d);
|
|
6054
6054
|
if (this.formats[c]) {
|
|
6055
6055
|
let m = l;
|
|
6056
6056
|
try {
|
|
6057
|
-
const
|
|
6058
|
-
m = this.formats[c](l,
|
|
6057
|
+
const f = ((p = a == null ? void 0 : a.formatParams) == null ? void 0 : p[a.interpolationkey]) || {}, g = f.locale || f.lng || a.locale || a.lng || r;
|
|
6058
|
+
m = this.formats[c](l, g, {
|
|
6059
6059
|
...u,
|
|
6060
6060
|
...a,
|
|
6061
|
-
...
|
|
6061
|
+
...f
|
|
6062
6062
|
});
|
|
6063
|
-
} catch (
|
|
6064
|
-
this.logger.warn(
|
|
6063
|
+
} catch (f) {
|
|
6064
|
+
this.logger.warn(f);
|
|
6065
6065
|
}
|
|
6066
6066
|
return m;
|
|
6067
6067
|
} else
|
|
@@ -6156,7 +6156,7 @@ class Hi extends rt {
|
|
|
6156
6156
|
prepareLoading(e, t, r = {}, a) {
|
|
6157
6157
|
if (!this.backend)
|
|
6158
6158
|
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), a && a();
|
|
6159
|
-
|
|
6159
|
+
N(e) && (e = this.languageUtils.toResolveHierarchy(e)), N(t) && (t = [t]);
|
|
6160
6160
|
const i = this.queueLoad(e, t, r, a);
|
|
6161
6161
|
if (!i.toLoad.length)
|
|
6162
6162
|
return i.pending.length || a(), null;
|
|
@@ -6187,19 +6187,19 @@ class Hi extends rt {
|
|
|
6187
6187
|
}
|
|
6188
6188
|
if (!(r == null || r === "")) {
|
|
6189
6189
|
if ((m = this.backend) != null && m.create) {
|
|
6190
|
-
const
|
|
6190
|
+
const f = {
|
|
6191
6191
|
...o,
|
|
6192
6192
|
isUpdate: i
|
|
6193
|
-
},
|
|
6194
|
-
if (
|
|
6193
|
+
}, g = this.backend.create.bind(this.backend);
|
|
6194
|
+
if (g.length < 6)
|
|
6195
6195
|
try {
|
|
6196
|
-
let
|
|
6197
|
-
|
|
6198
|
-
} catch (
|
|
6199
|
-
l(
|
|
6196
|
+
let v;
|
|
6197
|
+
g.length === 5 ? v = g(e, t, r, a, f) : v = g(e, t, r, a), v && typeof v.then == "function" ? v.then((D) => l(null, D)).catch(l) : l(null, v);
|
|
6198
|
+
} catch (v) {
|
|
6199
|
+
l(v);
|
|
6200
6200
|
}
|
|
6201
6201
|
else
|
|
6202
|
-
|
|
6202
|
+
g(e, t, r, a, l, f);
|
|
6203
6203
|
}
|
|
6204
6204
|
!e || !e[0] || this.store.addResource(e[0], t, r, a);
|
|
6205
6205
|
}
|
|
@@ -6239,7 +6239,7 @@ const ot = () => ({
|
|
|
6239
6239
|
appendNamespaceToCIMode: !1,
|
|
6240
6240
|
overloadTranslationOptionHandler: (n) => {
|
|
6241
6241
|
let e = {};
|
|
6242
|
-
if (typeof n[1] == "object" && (e = n[1]),
|
|
6242
|
+
if (typeof n[1] == "object" && (e = n[1]), N(n[1]) && (e.defaultValue = n[1]), N(n[2]) && (e.tDescription = n[2]), typeof n[2] == "object" || typeof n[3] == "object") {
|
|
6243
6243
|
const t = n[3] || n[2];
|
|
6244
6244
|
Object.keys(t).forEach((r) => {
|
|
6245
6245
|
e[r] = t[r];
|
|
@@ -6260,13 +6260,13 @@ const ot = () => ({
|
|
|
6260
6260
|
skipOnVariables: !0
|
|
6261
6261
|
},
|
|
6262
6262
|
cacheInBuiltFormats: !0
|
|
6263
|
-
}), Zt = (n) => (
|
|
6263
|
+
}), Zt = (n) => (N(n.ns) && (n.ns = [n.ns]), N(n.fallbackLng) && (n.fallbackLng = [n.fallbackLng]), N(n.fallbackNS) && (n.fallbackNS = [n.fallbackNS]), n.supportedLngs && !n.supportedLngs.includes("cimode") && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), n), Ue = () => {
|
|
6264
6264
|
}, Ri = (n) => {
|
|
6265
6265
|
Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t) => {
|
|
6266
6266
|
typeof n[t] == "function" && (n[t] = n[t].bind(n));
|
|
6267
6267
|
});
|
|
6268
6268
|
};
|
|
6269
|
-
class
|
|
6269
|
+
class Ne extends rt {
|
|
6270
6270
|
constructor(e = {}, t) {
|
|
6271
6271
|
if (super(), this.options = Zt(e), this.services = {}, this.logger = le, this.modules = {
|
|
6272
6272
|
external: []
|
|
@@ -6279,7 +6279,7 @@ class Fe extends rt {
|
|
|
6279
6279
|
}
|
|
6280
6280
|
}
|
|
6281
6281
|
init(e = {}, t) {
|
|
6282
|
-
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (
|
|
6282
|
+
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (N(e.ns) ? e.defaultNS = e.ns : e.ns.includes("translation") || (e.defaultNS = e.ns[0]));
|
|
6283
6283
|
const r = ot();
|
|
6284
6284
|
this.options = {
|
|
6285
6285
|
...r,
|
|
@@ -6297,14 +6297,14 @@ class Fe extends rt {
|
|
|
6297
6297
|
const u = new Gt(this.options);
|
|
6298
6298
|
this.store = new Bt(this.options.resources, this.options);
|
|
6299
6299
|
const p = this.services;
|
|
6300
|
-
p.logger = le, p.resourceStore = this.store, p.languageUtils = u, p.pluralResolver = new
|
|
6300
|
+
p.logger = le, p.resourceStore = this.store, p.languageUtils = u, p.pluralResolver = new zi(u, {
|
|
6301
6301
|
prepend: this.options.pluralSeparator
|
|
6302
6302
|
}), c && (p.formatter = a(c), p.formatter.init && p.formatter.init(p, this.options), this.options.interpolation.format = p.formatter.format.bind(p.formatter)), p.interpolator = new Yt(this.options), p.utils = {
|
|
6303
6303
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
6304
|
-
}, p.backendConnector = new Hi(a(this.modules.backend), p.resourceStore, p, this.options), p.backendConnector.on("*", (m, ...
|
|
6305
|
-
this.emit(m, ...
|
|
6306
|
-
}), this.modules.languageDetector && (p.languageDetector = a(this.modules.languageDetector), p.languageDetector.init && p.languageDetector.init(p, this.options.detection, this.options)), this.modules.i18nFormat && (p.i18nFormat = a(this.modules.i18nFormat), p.i18nFormat.init && p.i18nFormat.init(this)), this.translator = new Xe(this.services, this.options), this.translator.on("*", (m, ...
|
|
6307
|
-
this.emit(m, ...
|
|
6304
|
+
}, p.backendConnector = new Hi(a(this.modules.backend), p.resourceStore, p, this.options), p.backendConnector.on("*", (m, ...f) => {
|
|
6305
|
+
this.emit(m, ...f);
|
|
6306
|
+
}), this.modules.languageDetector && (p.languageDetector = a(this.modules.languageDetector), p.languageDetector.init && p.languageDetector.init(p, this.options.detection, this.options)), this.modules.i18nFormat && (p.i18nFormat = a(this.modules.i18nFormat), p.i18nFormat.init && p.i18nFormat.init(this)), this.translator = new Xe(this.services, this.options), this.translator.on("*", (m, ...f) => {
|
|
6307
|
+
this.emit(m, ...f);
|
|
6308
6308
|
}), this.modules.external.forEach((m) => {
|
|
6309
6309
|
m.init && m.init(this);
|
|
6310
6310
|
});
|
|
@@ -6318,7 +6318,7 @@ class Fe extends rt {
|
|
|
6318
6318
|
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((c) => {
|
|
6319
6319
|
this[c] = (...u) => (this.store[c](...u), this);
|
|
6320
6320
|
});
|
|
6321
|
-
const l =
|
|
6321
|
+
const l = Pe(), d = () => {
|
|
6322
6322
|
const c = (u, p) => {
|
|
6323
6323
|
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), l.resolve(p), t(u, p);
|
|
6324
6324
|
};
|
|
@@ -6330,7 +6330,7 @@ class Fe extends rt {
|
|
|
6330
6330
|
loadResources(e, t = Ue) {
|
|
6331
6331
|
var i, o;
|
|
6332
6332
|
let r = t;
|
|
6333
|
-
const a =
|
|
6333
|
+
const a = N(e) ? e : this.language;
|
|
6334
6334
|
if (typeof e == "function" && (r = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
6335
6335
|
if ((a == null ? void 0 : a.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return r();
|
|
6336
6336
|
const l = [], d = (c) => {
|
|
@@ -6346,7 +6346,7 @@ class Fe extends rt {
|
|
|
6346
6346
|
r(null);
|
|
6347
6347
|
}
|
|
6348
6348
|
reloadResources(e, t, r) {
|
|
6349
|
-
const a =
|
|
6349
|
+
const a = Pe();
|
|
6350
6350
|
return typeof e == "function" && (r = e, e = void 0), typeof t == "function" && (r = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), r || (r = Ue), this.services.backendConnector.reload(e, t, (i) => {
|
|
6351
6351
|
a.resolve(), r(i);
|
|
6352
6352
|
}), a;
|
|
@@ -6370,7 +6370,7 @@ class Fe extends rt {
|
|
|
6370
6370
|
}
|
|
6371
6371
|
changeLanguage(e, t) {
|
|
6372
6372
|
this.isLanguageChangingTo = e;
|
|
6373
|
-
const r =
|
|
6373
|
+
const r = Pe();
|
|
6374
6374
|
this.emit("languageChanging", e);
|
|
6375
6375
|
const a = (l) => {
|
|
6376
6376
|
this.language = l, this.languages = this.services.languageUtils.toResolveHierarchy(l), this.resolvedLanguage = void 0, this.setResolvedLanguage(l);
|
|
@@ -6379,7 +6379,7 @@ class Fe extends rt {
|
|
|
6379
6379
|
}, o = (l) => {
|
|
6380
6380
|
var u, p;
|
|
6381
6381
|
!e && !l && this.services.languageDetector && (l = []);
|
|
6382
|
-
const d =
|
|
6382
|
+
const d = N(l) ? l : l && l[0], c = this.store.hasLanguageSomeTranslations(d) ? d : this.services.languageUtils.getBestMatchFromCodes(N(l) ? [l] : l);
|
|
6383
6383
|
c && (this.language || a(c), this.translator.language || this.translator.changeLanguage(c), (p = (u = this.services.languageDetector) == null ? void 0 : u.cacheUserLanguage) == null || p.call(u, c)), this.loadResources(c, (m) => {
|
|
6384
6384
|
i(m, c);
|
|
6385
6385
|
});
|
|
@@ -6401,7 +6401,7 @@ class Fe extends rt {
|
|
|
6401
6401
|
let p;
|
|
6402
6402
|
return d.keyPrefix && Array.isArray(i) ? p = i.map((m) => (typeof m == "function" && (m = Oe(m, c)), `${d.keyPrefix}${u}${m}`)) : (typeof i == "function" && (i = Oe(i, c)), p = d.keyPrefix ? `${d.keyPrefix}${u}${i}` : i), this.t(p, d);
|
|
6403
6403
|
};
|
|
6404
|
-
return
|
|
6404
|
+
return N(e) ? a.lng = e : a.lngs = e, a.ns = t, a.keyPrefix = r, a;
|
|
6405
6405
|
}
|
|
6406
6406
|
t(...e) {
|
|
6407
6407
|
var t;
|
|
@@ -6432,16 +6432,16 @@ class Fe extends rt {
|
|
|
6432
6432
|
return !!(this.hasResourceBundle(r, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || o(r, e) && (!a || o(i, e)));
|
|
6433
6433
|
}
|
|
6434
6434
|
loadNamespaces(e, t) {
|
|
6435
|
-
const r =
|
|
6436
|
-
return this.options.ns ? (
|
|
6435
|
+
const r = Pe();
|
|
6436
|
+
return this.options.ns ? (N(e) && (e = [e]), e.forEach((a) => {
|
|
6437
6437
|
this.options.ns.includes(a) || this.options.ns.push(a);
|
|
6438
6438
|
}), this.loadResources((a) => {
|
|
6439
6439
|
r.resolve(), t && t(a);
|
|
6440
6440
|
}), r) : (t && t(), Promise.resolve());
|
|
6441
6441
|
}
|
|
6442
6442
|
loadLanguages(e, t) {
|
|
6443
|
-
const r =
|
|
6444
|
-
|
|
6443
|
+
const r = Pe();
|
|
6444
|
+
N(e) && (e = [e]);
|
|
6445
6445
|
const a = this.options.preload || [], i = e.filter((o) => !a.includes(o) && this.services.languageUtils.isSupportedCode(o));
|
|
6446
6446
|
return i.length ? (this.options.preload = a.concat(i), this.loadResources((o) => {
|
|
6447
6447
|
r.resolve(), t && t(o);
|
|
@@ -6462,8 +6462,8 @@ class Fe extends rt {
|
|
|
6462
6462
|
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.includes(r.getLanguagePartFromCode(e)) || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
6463
6463
|
}
|
|
6464
6464
|
static createInstance(e = {}, t) {
|
|
6465
|
-
const r = new
|
|
6466
|
-
return r.createInstance =
|
|
6465
|
+
const r = new Ne(e, t);
|
|
6466
|
+
return r.createInstance = Ne.createInstance, r;
|
|
6467
6467
|
}
|
|
6468
6468
|
cloneInstance(e = {}, t = Ue) {
|
|
6469
6469
|
const r = e.forkResourceStore;
|
|
@@ -6472,7 +6472,7 @@ class Fe extends rt {
|
|
|
6472
6472
|
...this.options,
|
|
6473
6473
|
...e,
|
|
6474
6474
|
isClone: !0
|
|
6475
|
-
}, i = new
|
|
6475
|
+
}, i = new Ne(a);
|
|
6476
6476
|
if ((e.debug !== void 0 || e.prefix !== void 0) && (i.logger = i.logger.clone(e)), ["store", "services", "language"].forEach((l) => {
|
|
6477
6477
|
i[l] = this[l];
|
|
6478
6478
|
}), i.services = {
|
|
@@ -6514,7 +6514,7 @@ class Fe extends rt {
|
|
|
6514
6514
|
};
|
|
6515
6515
|
}
|
|
6516
6516
|
}
|
|
6517
|
-
const X =
|
|
6517
|
+
const X = Ne.createInstance();
|
|
6518
6518
|
X.createInstance;
|
|
6519
6519
|
X.dir;
|
|
6520
6520
|
X.init;
|
|
@@ -6546,283 +6546,283 @@ X.use(Kr).use(Yr).use(Ur).init({
|
|
|
6546
6546
|
function Ni(n) {
|
|
6547
6547
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
6548
6548
|
}
|
|
6549
|
-
var
|
|
6549
|
+
var We = { exports: {} }, Fi = We.exports, qt;
|
|
6550
6550
|
function Vi() {
|
|
6551
6551
|
return qt || (qt = 1, (function(n, e) {
|
|
6552
6552
|
(function(t, r) {
|
|
6553
6553
|
n.exports = r();
|
|
6554
6554
|
})(Fi, (function() {
|
|
6555
|
-
var t = 1e3, r = 6e4, a = 36e5, i = "millisecond", o = "second", l = "minute", d = "hour", c = "day", u = "week", p = "month", m = "quarter",
|
|
6556
|
-
var
|
|
6557
|
-
return "[" + $ + (
|
|
6558
|
-
} }, O = function($,
|
|
6559
|
-
var
|
|
6560
|
-
return !
|
|
6555
|
+
var t = 1e3, r = 6e4, a = 36e5, i = "millisecond", o = "second", l = "minute", d = "hour", c = "day", u = "week", p = "month", m = "quarter", f = "year", g = "date", v = "Invalid Date", D = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, T = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, k = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function($) {
|
|
6556
|
+
var S = ["th", "st", "nd", "rd"], w = $ % 100;
|
|
6557
|
+
return "[" + $ + (S[(w - 20) % 10] || S[w] || S[0]) + "]";
|
|
6558
|
+
} }, O = function($, S, w) {
|
|
6559
|
+
var x = String($);
|
|
6560
|
+
return !x || x.length >= S ? $ : "" + Array(S + 1 - x.length).join(w) + $;
|
|
6561
6561
|
}, L = { s: O, z: function($) {
|
|
6562
|
-
var
|
|
6563
|
-
return (
|
|
6564
|
-
}, m: function $(
|
|
6565
|
-
if (
|
|
6566
|
-
var
|
|
6567
|
-
return +(-(
|
|
6562
|
+
var S = -$.utcOffset(), w = Math.abs(S), x = Math.floor(w / 60), C = w % 60;
|
|
6563
|
+
return (S <= 0 ? "+" : "-") + O(x, 2, "0") + ":" + O(C, 2, "0");
|
|
6564
|
+
}, m: function $(S, w) {
|
|
6565
|
+
if (S.date() < w.date()) return -$(w, S);
|
|
6566
|
+
var x = 12 * (w.year() - S.year()) + (w.month() - S.month()), C = S.clone().add(x, p), z = w - C < 0, I = S.clone().add(x + (z ? -1 : 1), p);
|
|
6567
|
+
return +(-(x + (w - C) / (z ? C - I : I - C)) || 0);
|
|
6568
6568
|
}, a: function($) {
|
|
6569
6569
|
return $ < 0 ? Math.ceil($) || 0 : Math.floor($);
|
|
6570
6570
|
}, p: function($) {
|
|
6571
|
-
return { M: p, y:
|
|
6571
|
+
return { M: p, y: f, w: u, d: c, D: g, h: d, m: l, s: o, ms: i, Q: m }[$] || String($ || "").toLowerCase().replace(/s$/, "");
|
|
6572
6572
|
}, u: function($) {
|
|
6573
6573
|
return $ === void 0;
|
|
6574
|
-
} },
|
|
6575
|
-
|
|
6576
|
-
var _ = "$isDayjsObject",
|
|
6577
|
-
return $ instanceof
|
|
6578
|
-
},
|
|
6574
|
+
} }, M = "en", U = {};
|
|
6575
|
+
U[M] = k;
|
|
6576
|
+
var _ = "$isDayjsObject", j = function($) {
|
|
6577
|
+
return $ instanceof R || !(!$ || !$[_]);
|
|
6578
|
+
}, A = function $(S, w, x) {
|
|
6579
6579
|
var C;
|
|
6580
|
-
if (!
|
|
6581
|
-
if (typeof
|
|
6582
|
-
var
|
|
6583
|
-
|
|
6584
|
-
var
|
|
6585
|
-
if (!C &&
|
|
6580
|
+
if (!S) return M;
|
|
6581
|
+
if (typeof S == "string") {
|
|
6582
|
+
var z = S.toLowerCase();
|
|
6583
|
+
U[z] && (C = z), w && (U[z] = w, C = z);
|
|
6584
|
+
var I = S.split("-");
|
|
6585
|
+
if (!C && I.length > 1) return $(I[0]);
|
|
6586
6586
|
} else {
|
|
6587
|
-
var F =
|
|
6588
|
-
|
|
6589
|
-
}
|
|
6590
|
-
return !
|
|
6591
|
-
},
|
|
6592
|
-
if (
|
|
6593
|
-
var
|
|
6594
|
-
return
|
|
6595
|
-
},
|
|
6596
|
-
|
|
6597
|
-
return
|
|
6587
|
+
var F = S.name;
|
|
6588
|
+
U[F] = S, C = F;
|
|
6589
|
+
}
|
|
6590
|
+
return !x && C && (M = C), C || !x && M;
|
|
6591
|
+
}, H = function($, S) {
|
|
6592
|
+
if (j($)) return $.clone();
|
|
6593
|
+
var w = typeof S == "object" ? S : {};
|
|
6594
|
+
return w.date = $, w.args = arguments, new R(w);
|
|
6595
|
+
}, b = L;
|
|
6596
|
+
b.l = A, b.i = j, b.w = function($, S) {
|
|
6597
|
+
return H($, { locale: S.$L, utc: S.$u, x: S.$x, $offset: S.$offset });
|
|
6598
6598
|
};
|
|
6599
|
-
var
|
|
6600
|
-
function $(
|
|
6601
|
-
this.$L =
|
|
6602
|
-
}
|
|
6603
|
-
var
|
|
6604
|
-
return
|
|
6605
|
-
this.$d = (function(
|
|
6606
|
-
var C =
|
|
6599
|
+
var R = (function() {
|
|
6600
|
+
function $(w) {
|
|
6601
|
+
this.$L = A(w.locale, null, !0), this.parse(w), this.$x = this.$x || w.x || {}, this[_] = !0;
|
|
6602
|
+
}
|
|
6603
|
+
var S = $.prototype;
|
|
6604
|
+
return S.parse = function(w) {
|
|
6605
|
+
this.$d = (function(x) {
|
|
6606
|
+
var C = x.date, z = x.utc;
|
|
6607
6607
|
if (C === null) return /* @__PURE__ */ new Date(NaN);
|
|
6608
|
-
if (
|
|
6608
|
+
if (b.u(C)) return /* @__PURE__ */ new Date();
|
|
6609
6609
|
if (C instanceof Date) return new Date(C);
|
|
6610
6610
|
if (typeof C == "string" && !/Z$/i.test(C)) {
|
|
6611
|
-
var
|
|
6612
|
-
if (
|
|
6613
|
-
var F =
|
|
6614
|
-
return
|
|
6611
|
+
var I = C.match(D);
|
|
6612
|
+
if (I) {
|
|
6613
|
+
var F = I[2] - 1 || 0, W = (I[7] || "0").substring(0, 3);
|
|
6614
|
+
return z ? new Date(Date.UTC(I[1], F, I[3] || 1, I[4] || 0, I[5] || 0, I[6] || 0, W)) : new Date(I[1], F, I[3] || 1, I[4] || 0, I[5] || 0, I[6] || 0, W);
|
|
6615
6615
|
}
|
|
6616
6616
|
}
|
|
6617
6617
|
return new Date(C);
|
|
6618
|
-
})(
|
|
6619
|
-
},
|
|
6620
|
-
var
|
|
6621
|
-
this.$y =
|
|
6622
|
-
},
|
|
6623
|
-
return
|
|
6624
|
-
},
|
|
6625
|
-
return this.$d.toString() !==
|
|
6626
|
-
},
|
|
6627
|
-
var C =
|
|
6628
|
-
return this.startOf(
|
|
6629
|
-
},
|
|
6630
|
-
return
|
|
6631
|
-
},
|
|
6632
|
-
return this.endOf(
|
|
6633
|
-
},
|
|
6634
|
-
return
|
|
6635
|
-
},
|
|
6618
|
+
})(w), this.init();
|
|
6619
|
+
}, S.init = function() {
|
|
6620
|
+
var w = this.$d;
|
|
6621
|
+
this.$y = w.getFullYear(), this.$M = w.getMonth(), this.$D = w.getDate(), this.$W = w.getDay(), this.$H = w.getHours(), this.$m = w.getMinutes(), this.$s = w.getSeconds(), this.$ms = w.getMilliseconds();
|
|
6622
|
+
}, S.$utils = function() {
|
|
6623
|
+
return b;
|
|
6624
|
+
}, S.isValid = function() {
|
|
6625
|
+
return this.$d.toString() !== v;
|
|
6626
|
+
}, S.isSame = function(w, x) {
|
|
6627
|
+
var C = H(w);
|
|
6628
|
+
return this.startOf(x) <= C && C <= this.endOf(x);
|
|
6629
|
+
}, S.isAfter = function(w, x) {
|
|
6630
|
+
return H(w) < this.startOf(x);
|
|
6631
|
+
}, S.isBefore = function(w, x) {
|
|
6632
|
+
return this.endOf(x) < H(w);
|
|
6633
|
+
}, S.$g = function(w, x, C) {
|
|
6634
|
+
return b.u(w) ? this[x] : this.set(C, w);
|
|
6635
|
+
}, S.unix = function() {
|
|
6636
6636
|
return Math.floor(this.valueOf() / 1e3);
|
|
6637
|
-
},
|
|
6637
|
+
}, S.valueOf = function() {
|
|
6638
6638
|
return this.$d.getTime();
|
|
6639
|
-
},
|
|
6640
|
-
var C = this,
|
|
6641
|
-
var me =
|
|
6642
|
-
return
|
|
6643
|
-
},
|
|
6644
|
-
return
|
|
6645
|
-
},
|
|
6646
|
-
switch (
|
|
6647
|
-
case
|
|
6648
|
-
return
|
|
6639
|
+
}, S.startOf = function(w, x) {
|
|
6640
|
+
var C = this, z = !!b.u(x) || x, I = b.p(w), F = function(de, te) {
|
|
6641
|
+
var me = b.w(C.$u ? Date.UTC(C.$y, te, de) : new Date(C.$y, te, de), C);
|
|
6642
|
+
return z ? me : me.endOf(c);
|
|
6643
|
+
}, W = function(de, te) {
|
|
6644
|
+
return b.w(C.toDate()[de].apply(C.toDate("s"), (z ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(te)), C);
|
|
6645
|
+
}, Y = this.$W, q = this.$M, J = this.$D, ce = "set" + (this.$u ? "UTC" : "");
|
|
6646
|
+
switch (I) {
|
|
6647
|
+
case f:
|
|
6648
|
+
return z ? F(1, 0) : F(31, 11);
|
|
6649
6649
|
case p:
|
|
6650
|
-
return
|
|
6650
|
+
return z ? F(1, q) : F(0, q + 1);
|
|
6651
6651
|
case u:
|
|
6652
|
-
var se = this.$locale().weekStart || 0, Z = (
|
|
6653
|
-
return F(
|
|
6652
|
+
var se = this.$locale().weekStart || 0, Z = (Y < se ? Y + 7 : Y) - se;
|
|
6653
|
+
return F(z ? J - Z : J + (6 - Z), q);
|
|
6654
6654
|
case c:
|
|
6655
|
-
case
|
|
6656
|
-
return
|
|
6655
|
+
case g:
|
|
6656
|
+
return W(ce + "Hours", 0);
|
|
6657
6657
|
case d:
|
|
6658
|
-
return
|
|
6658
|
+
return W(ce + "Minutes", 1);
|
|
6659
6659
|
case l:
|
|
6660
|
-
return
|
|
6660
|
+
return W(ce + "Seconds", 2);
|
|
6661
6661
|
case o:
|
|
6662
|
-
return
|
|
6662
|
+
return W(ce + "Milliseconds", 3);
|
|
6663
6663
|
default:
|
|
6664
6664
|
return this.clone();
|
|
6665
6665
|
}
|
|
6666
|
-
},
|
|
6667
|
-
return this.startOf(
|
|
6668
|
-
},
|
|
6669
|
-
var C,
|
|
6670
|
-
if (
|
|
6671
|
-
var
|
|
6672
|
-
|
|
6673
|
-
} else F && this.$d[F](
|
|
6666
|
+
}, S.endOf = function(w) {
|
|
6667
|
+
return this.startOf(w, !1);
|
|
6668
|
+
}, S.$set = function(w, x) {
|
|
6669
|
+
var C, z = b.p(w), I = "set" + (this.$u ? "UTC" : ""), F = (C = {}, C[c] = I + "Date", C[g] = I + "Date", C[p] = I + "Month", C[f] = I + "FullYear", C[d] = I + "Hours", C[l] = I + "Minutes", C[o] = I + "Seconds", C[i] = I + "Milliseconds", C)[z], W = z === c ? this.$D + (x - this.$W) : x;
|
|
6670
|
+
if (z === p || z === f) {
|
|
6671
|
+
var Y = this.clone().set(g, 1);
|
|
6672
|
+
Y.$d[F](W), Y.init(), this.$d = Y.set(g, Math.min(this.$D, Y.daysInMonth())).$d;
|
|
6673
|
+
} else F && this.$d[F](W);
|
|
6674
6674
|
return this.init(), this;
|
|
6675
|
-
},
|
|
6676
|
-
return this.clone().$set(
|
|
6677
|
-
},
|
|
6678
|
-
return this[
|
|
6679
|
-
},
|
|
6680
|
-
var C,
|
|
6681
|
-
|
|
6682
|
-
var
|
|
6683
|
-
var J =
|
|
6684
|
-
return
|
|
6675
|
+
}, S.set = function(w, x) {
|
|
6676
|
+
return this.clone().$set(w, x);
|
|
6677
|
+
}, S.get = function(w) {
|
|
6678
|
+
return this[b.p(w)]();
|
|
6679
|
+
}, S.add = function(w, x) {
|
|
6680
|
+
var C, z = this;
|
|
6681
|
+
w = Number(w);
|
|
6682
|
+
var I = b.p(x), F = function(q) {
|
|
6683
|
+
var J = H(z);
|
|
6684
|
+
return b.w(J.date(J.date() + Math.round(q * w)), z);
|
|
6685
6685
|
};
|
|
6686
|
-
if (
|
|
6687
|
-
if (
|
|
6688
|
-
if (
|
|
6689
|
-
if (
|
|
6690
|
-
var
|
|
6691
|
-
return
|
|
6692
|
-
},
|
|
6693
|
-
return this.add(-1 *
|
|
6694
|
-
},
|
|
6695
|
-
var
|
|
6696
|
-
if (!this.isValid()) return C.invalidDate ||
|
|
6697
|
-
var
|
|
6698
|
-
return te && (te[me] || te(
|
|
6686
|
+
if (I === p) return this.set(p, this.$M + w);
|
|
6687
|
+
if (I === f) return this.set(f, this.$y + w);
|
|
6688
|
+
if (I === c) return F(1);
|
|
6689
|
+
if (I === u) return F(7);
|
|
6690
|
+
var W = (C = {}, C[l] = r, C[d] = a, C[o] = t, C)[I] || 1, Y = this.$d.getTime() + w * W;
|
|
6691
|
+
return b.w(Y, this);
|
|
6692
|
+
}, S.subtract = function(w, x) {
|
|
6693
|
+
return this.add(-1 * w, x);
|
|
6694
|
+
}, S.format = function(w) {
|
|
6695
|
+
var x = this, C = this.$locale();
|
|
6696
|
+
if (!this.isValid()) return C.invalidDate || v;
|
|
6697
|
+
var z = w || "YYYY-MM-DDTHH:mm:ssZ", I = b.z(this), F = this.$H, W = this.$m, Y = this.$M, q = C.weekdays, J = C.months, ce = C.meridiem, se = function(te, me, Te, je) {
|
|
6698
|
+
return te && (te[me] || te(x, z)) || Te[me].slice(0, je);
|
|
6699
6699
|
}, Z = function(te) {
|
|
6700
|
-
return
|
|
6701
|
-
}, de = ce || function(te, me,
|
|
6700
|
+
return b.s(F % 12 || 12, te, "0");
|
|
6701
|
+
}, de = ce || function(te, me, Te) {
|
|
6702
6702
|
var je = te < 12 ? "AM" : "PM";
|
|
6703
|
-
return
|
|
6703
|
+
return Te ? je.toLowerCase() : je;
|
|
6704
6704
|
};
|
|
6705
|
-
return
|
|
6706
|
-
return me || (function(
|
|
6707
|
-
switch (
|
|
6705
|
+
return z.replace(T, (function(te, me) {
|
|
6706
|
+
return me || (function(Te) {
|
|
6707
|
+
switch (Te) {
|
|
6708
6708
|
case "YY":
|
|
6709
|
-
return String(
|
|
6709
|
+
return String(x.$y).slice(-2);
|
|
6710
6710
|
case "YYYY":
|
|
6711
|
-
return
|
|
6711
|
+
return b.s(x.$y, 4, "0");
|
|
6712
6712
|
case "M":
|
|
6713
|
-
return
|
|
6713
|
+
return Y + 1;
|
|
6714
6714
|
case "MM":
|
|
6715
|
-
return
|
|
6715
|
+
return b.s(Y + 1, 2, "0");
|
|
6716
6716
|
case "MMM":
|
|
6717
|
-
return se(C.monthsShort,
|
|
6717
|
+
return se(C.monthsShort, Y, J, 3);
|
|
6718
6718
|
case "MMMM":
|
|
6719
|
-
return se(J,
|
|
6719
|
+
return se(J, Y);
|
|
6720
6720
|
case "D":
|
|
6721
|
-
return
|
|
6721
|
+
return x.$D;
|
|
6722
6722
|
case "DD":
|
|
6723
|
-
return
|
|
6723
|
+
return b.s(x.$D, 2, "0");
|
|
6724
6724
|
case "d":
|
|
6725
|
-
return String(
|
|
6725
|
+
return String(x.$W);
|
|
6726
6726
|
case "dd":
|
|
6727
|
-
return se(C.weekdaysMin,
|
|
6727
|
+
return se(C.weekdaysMin, x.$W, q, 2);
|
|
6728
6728
|
case "ddd":
|
|
6729
|
-
return se(C.weekdaysShort,
|
|
6729
|
+
return se(C.weekdaysShort, x.$W, q, 3);
|
|
6730
6730
|
case "dddd":
|
|
6731
|
-
return q[
|
|
6731
|
+
return q[x.$W];
|
|
6732
6732
|
case "H":
|
|
6733
6733
|
return String(F);
|
|
6734
6734
|
case "HH":
|
|
6735
|
-
return
|
|
6735
|
+
return b.s(F, 2, "0");
|
|
6736
6736
|
case "h":
|
|
6737
6737
|
return Z(1);
|
|
6738
6738
|
case "hh":
|
|
6739
6739
|
return Z(2);
|
|
6740
6740
|
case "a":
|
|
6741
|
-
return de(F,
|
|
6741
|
+
return de(F, W, !0);
|
|
6742
6742
|
case "A":
|
|
6743
|
-
return de(F,
|
|
6743
|
+
return de(F, W, !1);
|
|
6744
6744
|
case "m":
|
|
6745
|
-
return String(
|
|
6745
|
+
return String(W);
|
|
6746
6746
|
case "mm":
|
|
6747
|
-
return
|
|
6747
|
+
return b.s(W, 2, "0");
|
|
6748
6748
|
case "s":
|
|
6749
|
-
return String(
|
|
6749
|
+
return String(x.$s);
|
|
6750
6750
|
case "ss":
|
|
6751
|
-
return
|
|
6751
|
+
return b.s(x.$s, 2, "0");
|
|
6752
6752
|
case "SSS":
|
|
6753
|
-
return
|
|
6753
|
+
return b.s(x.$ms, 3, "0");
|
|
6754
6754
|
case "Z":
|
|
6755
|
-
return
|
|
6755
|
+
return I;
|
|
6756
6756
|
}
|
|
6757
6757
|
return null;
|
|
6758
|
-
})(te) ||
|
|
6758
|
+
})(te) || I.replace(":", "");
|
|
6759
6759
|
}));
|
|
6760
|
-
},
|
|
6760
|
+
}, S.utcOffset = function() {
|
|
6761
6761
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
6762
|
-
},
|
|
6763
|
-
var
|
|
6764
|
-
return
|
|
6762
|
+
}, S.diff = function(w, x, C) {
|
|
6763
|
+
var z, I = this, F = b.p(x), W = H(w), Y = (W.utcOffset() - this.utcOffset()) * r, q = this - W, J = function() {
|
|
6764
|
+
return b.m(I, W);
|
|
6765
6765
|
};
|
|
6766
6766
|
switch (F) {
|
|
6767
|
-
case
|
|
6768
|
-
|
|
6767
|
+
case f:
|
|
6768
|
+
z = J() / 12;
|
|
6769
6769
|
break;
|
|
6770
6770
|
case p:
|
|
6771
|
-
|
|
6771
|
+
z = J();
|
|
6772
6772
|
break;
|
|
6773
6773
|
case m:
|
|
6774
|
-
|
|
6774
|
+
z = J() / 3;
|
|
6775
6775
|
break;
|
|
6776
6776
|
case u:
|
|
6777
|
-
|
|
6777
|
+
z = (q - Y) / 6048e5;
|
|
6778
6778
|
break;
|
|
6779
6779
|
case c:
|
|
6780
|
-
|
|
6780
|
+
z = (q - Y) / 864e5;
|
|
6781
6781
|
break;
|
|
6782
6782
|
case d:
|
|
6783
|
-
|
|
6783
|
+
z = q / a;
|
|
6784
6784
|
break;
|
|
6785
6785
|
case l:
|
|
6786
|
-
|
|
6786
|
+
z = q / r;
|
|
6787
6787
|
break;
|
|
6788
6788
|
case o:
|
|
6789
|
-
|
|
6789
|
+
z = q / t;
|
|
6790
6790
|
break;
|
|
6791
6791
|
default:
|
|
6792
|
-
|
|
6792
|
+
z = q;
|
|
6793
6793
|
}
|
|
6794
|
-
return C ?
|
|
6795
|
-
},
|
|
6794
|
+
return C ? z : b.a(z);
|
|
6795
|
+
}, S.daysInMonth = function() {
|
|
6796
6796
|
return this.endOf(p).$D;
|
|
6797
|
-
},
|
|
6798
|
-
return
|
|
6799
|
-
},
|
|
6800
|
-
if (!
|
|
6801
|
-
var C = this.clone(),
|
|
6802
|
-
return
|
|
6803
|
-
},
|
|
6804
|
-
return
|
|
6805
|
-
},
|
|
6797
|
+
}, S.$locale = function() {
|
|
6798
|
+
return U[this.$L];
|
|
6799
|
+
}, S.locale = function(w, x) {
|
|
6800
|
+
if (!w) return this.$L;
|
|
6801
|
+
var C = this.clone(), z = A(w, x, !0);
|
|
6802
|
+
return z && (C.$L = z), C;
|
|
6803
|
+
}, S.clone = function() {
|
|
6804
|
+
return b.w(this.$d, this);
|
|
6805
|
+
}, S.toDate = function() {
|
|
6806
6806
|
return new Date(this.valueOf());
|
|
6807
|
-
},
|
|
6807
|
+
}, S.toJSON = function() {
|
|
6808
6808
|
return this.isValid() ? this.toISOString() : null;
|
|
6809
|
-
},
|
|
6809
|
+
}, S.toISOString = function() {
|
|
6810
6810
|
return this.$d.toISOString();
|
|
6811
|
-
},
|
|
6811
|
+
}, S.toString = function() {
|
|
6812
6812
|
return this.$d.toUTCString();
|
|
6813
6813
|
}, $;
|
|
6814
|
-
})(),
|
|
6815
|
-
return
|
|
6816
|
-
|
|
6817
|
-
return this.$g(
|
|
6814
|
+
})(), B = R.prototype;
|
|
6815
|
+
return H.prototype = B, [["$ms", i], ["$s", o], ["$m", l], ["$H", d], ["$W", c], ["$M", p], ["$y", f], ["$D", g]].forEach((function($) {
|
|
6816
|
+
B[$[1]] = function(S) {
|
|
6817
|
+
return this.$g(S, $[0], $[1]);
|
|
6818
6818
|
};
|
|
6819
|
-
})),
|
|
6820
|
-
return $.$i || ($(
|
|
6821
|
-
},
|
|
6822
|
-
return
|
|
6823
|
-
},
|
|
6819
|
+
})), H.extend = function($, S) {
|
|
6820
|
+
return $.$i || ($(S, R, H), $.$i = !0), H;
|
|
6821
|
+
}, H.locale = A, H.isDayjs = j, H.unix = function($) {
|
|
6822
|
+
return H(1e3 * $);
|
|
6823
|
+
}, H.en = U[M], H.Ls = U, H.p = {}, H;
|
|
6824
6824
|
}));
|
|
6825
|
-
})(
|
|
6825
|
+
})(We)), We.exports;
|
|
6826
6826
|
}
|
|
6827
6827
|
var Ai = Vi();
|
|
6828
6828
|
const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, setDates: t }) => {
|
|
@@ -6853,13 +6853,13 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
6853
6853
|
ie("11")
|
|
6854
6854
|
],
|
|
6855
6855
|
shortWeekDays: [
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6856
|
+
ye("Sun"),
|
|
6857
|
+
ye("Mon"),
|
|
6858
|
+
ye("Tue"),
|
|
6859
|
+
ye("Wed"),
|
|
6860
|
+
ye("Thu"),
|
|
6861
|
+
ye("Fri"),
|
|
6862
|
+
ye("Sat")
|
|
6863
6863
|
]
|
|
6864
6864
|
}
|
|
6865
6865
|
};
|
|
@@ -7082,11 +7082,11 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7082
7082
|
{ key: "year", label: Le("YTD"), ...ne.getCommonDateRange("year") },
|
|
7083
7083
|
{
|
|
7084
7084
|
key: "custom",
|
|
7085
|
-
label: t.length === 2 && t[0] !== "" ? `${
|
|
7085
|
+
label: t.length === 2 && t[0] !== "" ? `${G("Custom")}: ${t[0]} / ${t[1]}` : G("Custom"),
|
|
7086
7086
|
...ne.getCommonDateRange("custom")
|
|
7087
7087
|
}
|
|
7088
|
-
], [i, o] = V(), l =
|
|
7089
|
-
{ key: "all", label:
|
|
7088
|
+
], [i, o] = V(), l = ve(() => e ? [
|
|
7089
|
+
{ key: "all", label: G("All"), ...ne.getCommonDateRange("all") },
|
|
7090
7090
|
...a
|
|
7091
7091
|
] : a, [e, t]);
|
|
7092
7092
|
function d(c) {
|
|
@@ -7103,7 +7103,7 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7103
7103
|
}
|
|
7104
7104
|
return c;
|
|
7105
7105
|
}
|
|
7106
|
-
return /* @__PURE__ */
|
|
7106
|
+
return /* @__PURE__ */ y(hi, { id: "tabs-container", children: [
|
|
7107
7107
|
/* @__PURE__ */ s(
|
|
7108
7108
|
mi,
|
|
7109
7109
|
{
|
|
@@ -7129,7 +7129,7 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7129
7129
|
{
|
|
7130
7130
|
className: "tab-select",
|
|
7131
7131
|
$width: "200px",
|
|
7132
|
-
placeholder:
|
|
7132
|
+
placeholder: G("Choose"),
|
|
7133
7133
|
getPopupContainer: (c) => c.parentElement,
|
|
7134
7134
|
onChange: d,
|
|
7135
7135
|
options: l.map((c) => ({
|
|
@@ -7139,7 +7139,7 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7139
7139
|
}
|
|
7140
7140
|
)
|
|
7141
7141
|
] });
|
|
7142
|
-
},
|
|
7142
|
+
}, zr = h.div`
|
|
7143
7143
|
.ant-dropdown-menu {
|
|
7144
7144
|
border-radius: 2px !important;
|
|
7145
7145
|
background: var(--color-bg-quaternary, #2f2f2f) !important;
|
|
@@ -7185,7 +7185,7 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7185
7185
|
font-weight: 500;
|
|
7186
7186
|
color: var(--color-text-primary, #000000ff) !important;
|
|
7187
7187
|
}
|
|
7188
|
-
`,
|
|
7188
|
+
`, Wi = h.div`
|
|
7189
7189
|
background-color: red;
|
|
7190
7190
|
padding: 5px;
|
|
7191
7191
|
background: var(--color-bg-opaque-primary, rgba(255, 255, 255, 0.05));
|
|
@@ -7202,12 +7202,12 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7202
7202
|
}, a = [
|
|
7203
7203
|
{
|
|
7204
7204
|
key: "1",
|
|
7205
|
-
label: `${
|
|
7205
|
+
label: `${G("ExportAs")} ${G("Xlsx")}`,
|
|
7206
7206
|
onClick: () => r("xlsx")
|
|
7207
7207
|
},
|
|
7208
7208
|
{
|
|
7209
7209
|
key: "2",
|
|
7210
|
-
label: `${
|
|
7210
|
+
label: `${G("ExportAs")} ${G("Csv")}`,
|
|
7211
7211
|
onClick: () => r("csv")
|
|
7212
7212
|
}
|
|
7213
7213
|
];
|
|
@@ -7218,15 +7218,15 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7218
7218
|
items: a,
|
|
7219
7219
|
className: "dropdown-menu"
|
|
7220
7220
|
},
|
|
7221
|
-
popupRender: (i) => /* @__PURE__ */ s(
|
|
7221
|
+
popupRender: (i) => /* @__PURE__ */ s(zr, { children: i }),
|
|
7222
7222
|
placement: "bottomLeft",
|
|
7223
|
-
children: /* @__PURE__ */ s(
|
|
7223
|
+
children: /* @__PURE__ */ s(Wi, { children: G("Export") })
|
|
7224
7224
|
}
|
|
7225
7225
|
);
|
|
7226
|
-
},
|
|
7226
|
+
}, _i = (n, e, t) => {
|
|
7227
7227
|
const r = n.filter((p) => e[p.id]), a = Object.keys(r[0]), i = r.map((p) => a.map((m) => {
|
|
7228
|
-
const
|
|
7229
|
-
return
|
|
7228
|
+
const f = p[m];
|
|
7229
|
+
return f == null ? "" : typeof f == "object" ? Object.values(f).find((v) => typeof v != "object") ?? "" : f;
|
|
7230
7230
|
})), o = [a, ...i].map(
|
|
7231
7231
|
(p) => p.map((m) => `"${(m || "").toString().replace(/"/g, '""')}"`).join(",")
|
|
7232
7232
|
).join(`\r
|
|
@@ -7235,14 +7235,14 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7235
7235
|
}, Yi = (n, e, t) => {
|
|
7236
7236
|
const a = n.filter((p) => e[p.id]).map((p) => {
|
|
7237
7237
|
const m = {};
|
|
7238
|
-
return Object.entries(p).forEach(([
|
|
7239
|
-
if (
|
|
7240
|
-
m[
|
|
7241
|
-
else if (typeof
|
|
7242
|
-
const
|
|
7243
|
-
m[
|
|
7238
|
+
return Object.entries(p).forEach(([f, g]) => {
|
|
7239
|
+
if (g == null)
|
|
7240
|
+
m[f] = "";
|
|
7241
|
+
else if (typeof g == "object") {
|
|
7242
|
+
const v = Object.values(g).find((D) => typeof D != "object");
|
|
7243
|
+
m[f] = v ?? "";
|
|
7244
7244
|
} else
|
|
7245
|
-
m[
|
|
7245
|
+
m[f] = g;
|
|
7246
7246
|
}), m;
|
|
7247
7247
|
}), i = Ge.utils.json_to_sheet(a), o = Ge.utils.book_new();
|
|
7248
7248
|
Ge.utils.book_append_sheet(o, i, "Data");
|
|
@@ -7271,19 +7271,19 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7271
7271
|
`, jo = ({ tableData: n, checked: e, fileName: t }) => {
|
|
7272
7272
|
const r = async (i) => {
|
|
7273
7273
|
try {
|
|
7274
|
-
i === "xlsx" ? Yi(n, e, t + ".xlsx") :
|
|
7274
|
+
i === "xlsx" ? Yi(n, e, t + ".xlsx") : _i(n, e, t + ".csv");
|
|
7275
7275
|
} catch (o) {
|
|
7276
7276
|
console.error("Export failed:", o);
|
|
7277
7277
|
}
|
|
7278
7278
|
}, a = [
|
|
7279
7279
|
{
|
|
7280
7280
|
key: "1",
|
|
7281
|
-
label: `${
|
|
7281
|
+
label: `${G("ExportAs")} ${G("Xlsx")}`,
|
|
7282
7282
|
onClick: () => r("xlsx")
|
|
7283
7283
|
},
|
|
7284
7284
|
{
|
|
7285
7285
|
key: "2",
|
|
7286
|
-
label: `${
|
|
7286
|
+
label: `${G("ExportAs")} ${G("Csv")}`,
|
|
7287
7287
|
onClick: () => r("csv")
|
|
7288
7288
|
}
|
|
7289
7289
|
];
|
|
@@ -7294,9 +7294,9 @@ const Or = /* @__PURE__ */ Ni(Ai), ji = ({ setDateFilter: n, setShowRange: e, se
|
|
|
7294
7294
|
items: a,
|
|
7295
7295
|
className: "dropdown-menu"
|
|
7296
7296
|
},
|
|
7297
|
-
popupRender: (i) => /* @__PURE__ */ s(
|
|
7297
|
+
popupRender: (i) => /* @__PURE__ */ s(zr, { children: i }),
|
|
7298
7298
|
placement: "bottomLeft",
|
|
7299
|
-
children: /* @__PURE__ */ s(Zi, { children:
|
|
7299
|
+
children: /* @__PURE__ */ s(Zi, { children: G("Export") })
|
|
7300
7300
|
}
|
|
7301
7301
|
);
|
|
7302
7302
|
}, Bo = ({ value: n, onChange: e, ...t }) => {
|
|
@@ -7397,29 +7397,29 @@ const Go = ({
|
|
|
7397
7397
|
...i
|
|
7398
7398
|
}) => {
|
|
7399
7399
|
const o = async (d) => {
|
|
7400
|
-
var
|
|
7400
|
+
var f, g;
|
|
7401
7401
|
const { file: c } = d, u = URL.createObjectURL(c), p = { name: c.name, uid: c.uid, status: "uploading", url: u }, m = [...n, p];
|
|
7402
7402
|
e(m);
|
|
7403
7403
|
try {
|
|
7404
|
-
const
|
|
7405
|
-
|
|
7406
|
-
const D = await a(
|
|
7407
|
-
if ((
|
|
7408
|
-
const
|
|
7404
|
+
const v = new FormData();
|
|
7405
|
+
v.append("files", c);
|
|
7406
|
+
const D = await a(v);
|
|
7407
|
+
if ((f = D == null ? void 0 : D.data) != null && f.success) {
|
|
7408
|
+
const T = (g = D == null ? void 0 : D.data) == null ? void 0 : g.value[0];
|
|
7409
7409
|
e(
|
|
7410
7410
|
m.map(
|
|
7411
|
-
(
|
|
7411
|
+
(k) => k.uid === c.uid ? { ...k, status: "done", ...T } : k
|
|
7412
7412
|
)
|
|
7413
7413
|
);
|
|
7414
7414
|
} else
|
|
7415
|
-
e(m.filter((
|
|
7415
|
+
e(m.filter((T) => T.uid !== c.uid)), _e.error({
|
|
7416
7416
|
className: "bottom-right-notification",
|
|
7417
7417
|
placement: "bottomRight",
|
|
7418
7418
|
message: "Error",
|
|
7419
7419
|
description: "Upload failed"
|
|
7420
7420
|
});
|
|
7421
7421
|
} catch {
|
|
7422
|
-
e(m.filter((D) => D.uid !== c.uid)),
|
|
7422
|
+
e(m.filter((D) => D.uid !== c.uid)), _e.error({
|
|
7423
7423
|
className: "bottom-right-notification",
|
|
7424
7424
|
placement: "bottomRight",
|
|
7425
7425
|
message: "Error",
|
|
@@ -7568,7 +7568,7 @@ const Go = ({
|
|
|
7568
7568
|
}
|
|
7569
7569
|
`, no = () => {
|
|
7570
7570
|
const [n, e] = V(!1);
|
|
7571
|
-
return /* @__PURE__ */
|
|
7571
|
+
return /* @__PURE__ */ y(ro, { children: [
|
|
7572
7572
|
/* @__PURE__ */ s("button", { className: "icon sidebar", onClick: () => e(!0), children: /* @__PURE__ */ s(fr, {}) }),
|
|
7573
7573
|
n && /* @__PURE__ */ s(gt, {})
|
|
7574
7574
|
] });
|
|
@@ -7582,41 +7582,41 @@ const Go = ({
|
|
|
7582
7582
|
needsBreadcrumb: o,
|
|
7583
7583
|
customTabFilter: l
|
|
7584
7584
|
}) => {
|
|
7585
|
-
const { hasPermission: d } = Se(), { id: c } = Ar(), u =
|
|
7585
|
+
const { hasPermission: d } = Se(), { id: c } = Ar(), u = Ie(), p = ke(), m = ve(() => {
|
|
7586
7586
|
const L = u.pathname.split("/");
|
|
7587
7587
|
return L[L.length - 1] || r;
|
|
7588
|
-
}, [u.pathname, r]), [
|
|
7588
|
+
}, [u.pathname, r]), [f, g] = V(null), [v, D] = V(null), T = (L) => {
|
|
7589
7589
|
p(`${n}/${c}/${L}`);
|
|
7590
|
-
},
|
|
7591
|
-
var
|
|
7592
|
-
return (
|
|
7590
|
+
}, k = () => l ? l(e) : e.filter((L) => {
|
|
7591
|
+
var M;
|
|
7592
|
+
return (M = L.permission) == null ? void 0 : M.some((U) => d(U));
|
|
7593
7593
|
}), O = () => {
|
|
7594
7594
|
const L = t[m] || t[r];
|
|
7595
7595
|
return L ? typeof L == "object" && L !== null && "type" in L ? {
|
|
7596
7596
|
...L,
|
|
7597
7597
|
props: {
|
|
7598
7598
|
...L.props,
|
|
7599
|
-
setExtraTabItem:
|
|
7599
|
+
setExtraTabItem: g,
|
|
7600
7600
|
setSecondExtraTab: D
|
|
7601
7601
|
}
|
|
7602
7602
|
} : L : null;
|
|
7603
7603
|
};
|
|
7604
|
-
return /* @__PURE__ */
|
|
7604
|
+
return /* @__PURE__ */ y(ae, { children: [
|
|
7605
7605
|
/* @__PURE__ */ s(no, {}),
|
|
7606
7606
|
o && /* @__PURE__ */ s(ri, { logo: a, breadcrumbItems: i }),
|
|
7607
7607
|
/* @__PURE__ */ s(
|
|
7608
7608
|
Qi,
|
|
7609
7609
|
{
|
|
7610
7610
|
activeKey: m,
|
|
7611
|
-
onChange:
|
|
7611
|
+
onChange: T,
|
|
7612
7612
|
tabBarExtraContent: {
|
|
7613
|
-
right: /* @__PURE__ */
|
|
7613
|
+
right: /* @__PURE__ */ y(eo, { children: [
|
|
7614
7614
|
/* @__PURE__ */ s(to, { children: /* @__PURE__ */ s(
|
|
7615
7615
|
Er,
|
|
7616
7616
|
{
|
|
7617
7617
|
className: "partner-tab-select",
|
|
7618
7618
|
placeholder: "Modules",
|
|
7619
|
-
onChange: (L) =>
|
|
7619
|
+
onChange: (L) => T(L),
|
|
7620
7620
|
value: m,
|
|
7621
7621
|
options: e.filter((L) => (L == null ? void 0 : L.label) !== "Details").map((L) => ({
|
|
7622
7622
|
value: L.key,
|
|
@@ -7624,18 +7624,18 @@ const Go = ({
|
|
|
7624
7624
|
}))
|
|
7625
7625
|
}
|
|
7626
7626
|
) }),
|
|
7627
|
-
/* @__PURE__ */
|
|
7628
|
-
|
|
7629
|
-
|
|
7627
|
+
/* @__PURE__ */ y(Xi, { children: [
|
|
7628
|
+
v,
|
|
7629
|
+
f
|
|
7630
7630
|
] })
|
|
7631
7631
|
] })
|
|
7632
7632
|
},
|
|
7633
|
-
items:
|
|
7633
|
+
items: k()
|
|
7634
7634
|
}
|
|
7635
7635
|
),
|
|
7636
7636
|
/* @__PURE__ */ s("div", { children: O() })
|
|
7637
7637
|
] });
|
|
7638
|
-
},
|
|
7638
|
+
}, Wo = ({
|
|
7639
7639
|
id: n,
|
|
7640
7640
|
refetchFormItems: e,
|
|
7641
7641
|
redirectPrevPage: t,
|
|
@@ -7644,48 +7644,48 @@ const Go = ({
|
|
|
7644
7644
|
getItemById: i,
|
|
7645
7645
|
onSetFormValues: o
|
|
7646
7646
|
}) => {
|
|
7647
|
-
const l = ke(), [d] = $e.useForm(), [c, u] = V(n == "new"), [p, m] = V(null),
|
|
7648
|
-
const D = window.location.pathname,
|
|
7647
|
+
const l = ke(), [d] = $e.useForm(), [c, u] = V(n == "new"), [p, m] = V(null), f = async (v) => {
|
|
7648
|
+
const D = window.location.pathname, T = D.substring(0, D.lastIndexOf("/"));
|
|
7649
7649
|
try {
|
|
7650
7650
|
if (p) {
|
|
7651
|
-
let
|
|
7652
|
-
return n ?
|
|
7651
|
+
let k;
|
|
7652
|
+
return n ? k = await r({ ...v, id: n }) : k = await r(v), t !== !1 && k.data.success === !0 && l(T), k;
|
|
7653
7653
|
} else {
|
|
7654
|
-
const
|
|
7655
|
-
return t !== !1 &&
|
|
7654
|
+
const k = await a(v);
|
|
7655
|
+
return t !== !1 && k.data.success === !0 && l(T), k;
|
|
7656
7656
|
}
|
|
7657
|
-
} catch (
|
|
7658
|
-
if (
|
|
7659
|
-
const O =
|
|
7657
|
+
} catch (k) {
|
|
7658
|
+
if (k.status === 400) {
|
|
7659
|
+
const O = k.response.data, L = ze(O.errors);
|
|
7660
7660
|
d.setFields(L);
|
|
7661
7661
|
}
|
|
7662
7662
|
}
|
|
7663
|
-
},
|
|
7663
|
+
}, g = async (v) => {
|
|
7664
7664
|
try {
|
|
7665
|
-
const D = await i(
|
|
7666
|
-
m(
|
|
7665
|
+
const D = await i(v), T = o ? o(D.data) : D.data;
|
|
7666
|
+
m(T), d.setFieldsValue(T);
|
|
7667
7667
|
} catch (D) {
|
|
7668
7668
|
console.log(D, "Error in Form Controller.");
|
|
7669
7669
|
}
|
|
7670
7670
|
};
|
|
7671
|
-
return
|
|
7672
|
-
u(n == "new"), n != "new" ?
|
|
7671
|
+
return K(() => {
|
|
7672
|
+
u(n == "new"), n != "new" ? g(Number(n)) : d.resetFields();
|
|
7673
7673
|
}, [n, e]), {
|
|
7674
7674
|
form: d,
|
|
7675
7675
|
item: p,
|
|
7676
7676
|
getItemById: i,
|
|
7677
7677
|
isAddingForm: c,
|
|
7678
|
-
handleSave:
|
|
7678
|
+
handleSave: f
|
|
7679
7679
|
};
|
|
7680
|
-
},
|
|
7680
|
+
}, _o = ({ id: n, formItem: e, updateItem: t, addItem: r, getItemById: a }) => {
|
|
7681
7681
|
const [i] = $e.useForm(), [o, l] = V(null), d = async (u) => {
|
|
7682
7682
|
try {
|
|
7683
7683
|
let p;
|
|
7684
7684
|
return n ? p = await t({ ...u }) : p = await r(u), p;
|
|
7685
7685
|
} catch (p) {
|
|
7686
7686
|
if (p.status === 400) {
|
|
7687
|
-
const m = p.response.data,
|
|
7688
|
-
i.setFields(
|
|
7687
|
+
const m = p.response.data, f = ze(m.errors);
|
|
7688
|
+
i.setFields(f);
|
|
7689
7689
|
}
|
|
7690
7690
|
throw p;
|
|
7691
7691
|
}
|
|
@@ -7697,14 +7697,14 @@ const Go = ({
|
|
|
7697
7697
|
console.log(p, "Error in Form Controller.");
|
|
7698
7698
|
}
|
|
7699
7699
|
};
|
|
7700
|
-
return
|
|
7700
|
+
return K(() => {
|
|
7701
7701
|
try {
|
|
7702
7702
|
if (!e) return;
|
|
7703
7703
|
l(e), i.setFieldsValue(e);
|
|
7704
7704
|
} catch (u) {
|
|
7705
7705
|
console.log(u, "Error in Form Controller.");
|
|
7706
7706
|
}
|
|
7707
|
-
}, [e]),
|
|
7707
|
+
}, [e]), K(() => {
|
|
7708
7708
|
n && c(Number(n));
|
|
7709
7709
|
}, [n]), {
|
|
7710
7710
|
form: i,
|
|
@@ -7740,8 +7740,8 @@ const Go = ({
|
|
|
7740
7740
|
};
|
|
7741
7741
|
};
|
|
7742
7742
|
function Ko(n) {
|
|
7743
|
-
const { navigator: e } = dt(jr), t =
|
|
7744
|
-
|
|
7743
|
+
const { navigator: e } = dt(jr), t = Ie();
|
|
7744
|
+
K(() => {
|
|
7745
7745
|
if (!n) return;
|
|
7746
7746
|
const r = e.push, a = e.replace, i = (o) => (...l) => {
|
|
7747
7747
|
tr.confirm({
|
|
@@ -7767,7 +7767,7 @@ function Ko(n) {
|
|
|
7767
7767
|
return e.push = i(r), e.replace = i(a), () => {
|
|
7768
7768
|
e.push = r, e.replace = a;
|
|
7769
7769
|
};
|
|
7770
|
-
}, [n, e, t]),
|
|
7770
|
+
}, [n, e, t]), K(() => {
|
|
7771
7771
|
const r = (a) => {
|
|
7772
7772
|
n && (a.preventDefault(), a.returnValue = "");
|
|
7773
7773
|
};
|
|
@@ -7777,7 +7777,7 @@ function Ko(n) {
|
|
|
7777
7777
|
}, [n]);
|
|
7778
7778
|
}
|
|
7779
7779
|
function Zo(n) {
|
|
7780
|
-
|
|
7780
|
+
K(() => {
|
|
7781
7781
|
const e = (t) => {
|
|
7782
7782
|
t.animationName === "onAutoFillStart" && n(t);
|
|
7783
7783
|
};
|
|
@@ -7800,17 +7800,17 @@ function qo(n, e) {
|
|
|
7800
7800
|
function Jo(n, e = "en-US") {
|
|
7801
7801
|
return n < 1 ? 0 : n ? n.toLocaleString(e) : "";
|
|
7802
7802
|
}
|
|
7803
|
-
const Qo = (n, e) => Array.isArray(n) ? n.filter((t) => t.type ? (Array.isArray(t.type) ? t.type : [t.type]).some((a) => e.includes(a)) : !1) : [],
|
|
7803
|
+
const Qo = (n, e) => Array.isArray(n) ? n.filter((t) => t.type ? (Array.isArray(t.type) ? t.type : [t.type]).some((a) => e.includes(a)) : !1) : [], Me = (n) => n.replace(/^[A-Z]+/, (e) => e.length === n.length ? e.toLowerCase() : e.length > 1 ? e.slice(0, -1).toLowerCase() + e.slice(-1) : e.toLowerCase()), ao = /^Commissions\[(\d+)\]\.(\w+)\.(\w+)\[(\d+)\]\.(\w+)$/, io = /^Commissions\[(\d+)\]\.(\w+)\.(\w+)$/, oo = /^Commissions\[(\d+)\]\.(\w+)\.(\w+)\.(\w+)$/, so = /^Commissions\[(\d+)\]$/;
|
|
7804
7804
|
function Xo(n) {
|
|
7805
7805
|
const { errors: e } = n.response.data, t = Object.keys(e)[0], r = e[t][0], a = t.match(ao);
|
|
7806
7806
|
if (a) {
|
|
7807
7807
|
const [, l, d, c, u, p] = a;
|
|
7808
7808
|
return {
|
|
7809
7809
|
brandIndex: Number(l),
|
|
7810
|
-
generalType:
|
|
7811
|
-
specificType:
|
|
7810
|
+
generalType: Me(d),
|
|
7811
|
+
specificType: Me(c),
|
|
7812
7812
|
itemIndex: Number(u),
|
|
7813
|
-
field:
|
|
7813
|
+
field: Me(p),
|
|
7814
7814
|
message: r
|
|
7815
7815
|
};
|
|
7816
7816
|
}
|
|
@@ -7819,8 +7819,8 @@ function Xo(n) {
|
|
|
7819
7819
|
const [, l, d, c] = i;
|
|
7820
7820
|
return {
|
|
7821
7821
|
brandIndex: Number(l),
|
|
7822
|
-
generalType:
|
|
7823
|
-
specificType:
|
|
7822
|
+
generalType: Me(d),
|
|
7823
|
+
specificType: Me(c),
|
|
7824
7824
|
message: r
|
|
7825
7825
|
};
|
|
7826
7826
|
}
|
|
@@ -7858,7 +7858,7 @@ export {
|
|
|
7858
7858
|
Uo as GenericTabsPage,
|
|
7859
7859
|
Eo as GridViewPage,
|
|
7860
7860
|
Ke as LabelText,
|
|
7861
|
-
|
|
7861
|
+
zo as ModalHost,
|
|
7862
7862
|
ra as ModalHostButtonWrapper,
|
|
7863
7863
|
Ea as NoData,
|
|
7864
7864
|
Lo as NoDataSpanForSelect,
|
|
@@ -7868,7 +7868,7 @@ export {
|
|
|
7868
7868
|
xt as Popup,
|
|
7869
7869
|
ta as PopupFooterContainer,
|
|
7870
7870
|
Xn as PopupHeader,
|
|
7871
|
-
|
|
7871
|
+
Io as PopupMFA,
|
|
7872
7872
|
$o as RejectButton,
|
|
7873
7873
|
re as SortDirections,
|
|
7874
7874
|
Mo as Spinner,
|
|
@@ -7877,10 +7877,10 @@ export {
|
|
|
7877
7877
|
Er as StyledSelect,
|
|
7878
7878
|
Fo as StyledTable,
|
|
7879
7879
|
he as TableViewOptions,
|
|
7880
|
-
|
|
7880
|
+
To as TwoFactorPopup,
|
|
7881
7881
|
Go as UploadFiles,
|
|
7882
7882
|
aa as catchErrorMessage,
|
|
7883
|
-
|
|
7883
|
+
_i as exportSelectedToCSV,
|
|
7884
7884
|
Yi as exportSelectedToXLSX,
|
|
7885
7885
|
qo as formatDate,
|
|
7886
7886
|
Do as getBase64,
|
|
@@ -7890,7 +7890,7 @@ export {
|
|
|
7890
7890
|
Jo as numberFormatterWithComma,
|
|
7891
7891
|
Xo as parseCommissionErrors,
|
|
7892
7892
|
Aa as parseErrorMessageKey,
|
|
7893
|
-
|
|
7893
|
+
ze as parseServerErrors,
|
|
7894
7894
|
Qo as showByType,
|
|
7895
7895
|
Zo as useAutofillStartDetection,
|
|
7896
7896
|
Za as useContactInfoController,
|
|
@@ -7898,11 +7898,11 @@ export {
|
|
|
7898
7898
|
Pn as useElementHeight,
|
|
7899
7899
|
sr as useFetch,
|
|
7900
7900
|
hr as useFilterDataSourceType,
|
|
7901
|
-
|
|
7902
|
-
|
|
7901
|
+
Wo as useFormController,
|
|
7902
|
+
xe as useModalStore,
|
|
7903
7903
|
Ko as useNavigationGuard,
|
|
7904
|
-
|
|
7905
|
-
|
|
7904
|
+
_o as useNewDesignFormController,
|
|
7905
|
+
Ve as usePackageServices,
|
|
7906
7906
|
Yo as useTwoFactor,
|
|
7907
7907
|
Se as useUserStore
|
|
7908
7908
|
};
|