@sito/dashboard-app 0.0.3 → 0.0.4
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/Dialog/DialogActions.d.ts +18 -0
- package/dist/components/Dialog/index.d.ts +1 -0
- package/dist/dashboard-app.cjs +1 -1
- package/dist/dashboard-app.js +1098 -1079
- package/dist/hooks/dialogs/types.d.ts +3 -3
- package/dist/hooks/dialogs/useImportDialog.d.ts +1 -2
- package/dist/lib/entities/ImportDto.d.ts +1 -0
- package/package.json +1 -1
package/dist/dashboard-app.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var ue = (e, t, s) =>
|
|
1
|
+
var ys = Object.defineProperty;
|
|
2
|
+
var gs = (e, t, s) => t in e ? ys(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
+
var ue = (e, t, s) => gs(e, typeof t != "symbol" ? t + "" : t, s);
|
|
4
4
|
import "./main.css";
|
|
5
|
-
import { jsxs as
|
|
5
|
+
import { jsxs as k, jsx as m, Fragment as Te } from "react/jsx-runtime";
|
|
6
6
|
import { FontAwesomeIcon as X } from "@fortawesome/react-fontawesome";
|
|
7
|
-
import { useTranslation as
|
|
8
|
-
import { faClose as
|
|
9
|
-
import te, { useRef as
|
|
10
|
-
import { createPortal as
|
|
11
|
-
import { css as
|
|
12
|
-
import { QueryClient as
|
|
13
|
-
import { faSadTear as
|
|
14
|
-
const
|
|
7
|
+
import { useTranslation as T, State as bs, inputStateClassName as ps, labelStateClassName as ws, helperTextStateClassName as vs, TextInput as xs, FileInput as Cs, useTableOptions as _s, Badge as Ns, Loading as Ss } from "@sito/dashboard";
|
|
8
|
+
import { faClose as et, faTrash as ks, faRotateLeft as Mt, faPencil as As, faCircleNotch as tt, faCloudArrowDown as Es, faCloudUpload as $s, faArrowUp as Fs, faEllipsisV as Ls, faEyeSlash as Ts, faEye as Ds, faArrowLeft as Vs, faAdd as wt, faFilter as Ps, faBars as Ms, faSearch as Is, faCircleCheck as Os, faWarning as Us } from "@fortawesome/free-solid-svg-icons";
|
|
9
|
+
import te, { useRef as It, useCallback as $, useEffect as se, useReducer as Rs, createContext as qe, useContext as Be, useState as Z, forwardRef as Ot, useMemo as De } from "react";
|
|
10
|
+
import { createPortal as Ut } from "react-dom";
|
|
11
|
+
import { css as qs } from "@emotion/css";
|
|
12
|
+
import { QueryClient as Bs, QueryClientProvider as js, useMutation as je, useQuery as Hs } from "@tanstack/react-query";
|
|
13
|
+
import { faSadTear as Qs } from "@fortawesome/free-regular-svg-icons";
|
|
14
|
+
const Ks = (e) => {
|
|
15
15
|
const {
|
|
16
16
|
text: t,
|
|
17
17
|
children: s,
|
|
@@ -19,17 +19,17 @@ const Qs = (e) => {
|
|
|
19
19
|
variant: i = "primary",
|
|
20
20
|
className: n = "",
|
|
21
21
|
iconClassName: c = "text-primary",
|
|
22
|
-
...
|
|
22
|
+
...o
|
|
23
23
|
} = e;
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
r ? /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ k("div", { className: `chip ${i} ${n}`, ...o, children: [
|
|
25
|
+
r ? /* @__PURE__ */ m(X, { icon: r, className: c }) : null,
|
|
26
26
|
t ?? s
|
|
27
27
|
] });
|
|
28
|
-
},
|
|
29
|
-
const { t } =
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
28
|
+
}, Wr = (e) => {
|
|
29
|
+
const { t } = T(), { onDelete: s, text: r, ...i } = e;
|
|
30
|
+
return /* @__PURE__ */ k(Ks, { ...i, className: "!pr-1", children: [
|
|
31
|
+
/* @__PURE__ */ m("p", { children: r }),
|
|
32
|
+
/* @__PURE__ */ m(
|
|
33
33
|
me,
|
|
34
34
|
{
|
|
35
35
|
name: t("_accessibility:buttons.deleteChip", { value: r }),
|
|
@@ -38,12 +38,12 @@ const Qs = (e) => {
|
|
|
38
38
|
}),
|
|
39
39
|
className: "hover:text-red-300",
|
|
40
40
|
onClick: s,
|
|
41
|
-
icon:
|
|
41
|
+
icon: et
|
|
42
42
|
}
|
|
43
43
|
)
|
|
44
44
|
] });
|
|
45
45
|
};
|
|
46
|
-
function
|
|
46
|
+
function Rt(e) {
|
|
47
47
|
const {
|
|
48
48
|
id: t,
|
|
49
49
|
icon: s,
|
|
@@ -51,38 +51,38 @@ function Ut(e) {
|
|
|
51
51
|
onClick: i,
|
|
52
52
|
children: n,
|
|
53
53
|
hidden: c = !1,
|
|
54
|
-
disabled:
|
|
55
|
-
showText:
|
|
54
|
+
disabled: o = !1,
|
|
55
|
+
showText: h = !1,
|
|
56
56
|
showTooltips: y = !0
|
|
57
57
|
} = e;
|
|
58
|
-
return c ? null : /* @__PURE__ */
|
|
58
|
+
return c ? null : /* @__PURE__ */ k(
|
|
59
59
|
"button",
|
|
60
60
|
{
|
|
61
61
|
id: t,
|
|
62
|
-
className: `action ${
|
|
63
|
-
disabled:
|
|
62
|
+
className: `action ${h ? "text-action" : "icon-action"}`,
|
|
63
|
+
disabled: o,
|
|
64
64
|
onClick: () => i(),
|
|
65
|
-
"aria-disabled":
|
|
65
|
+
"aria-disabled": o,
|
|
66
66
|
"data-tooltip-id": "tooltip",
|
|
67
67
|
"data-tooltip-content": y ? r : "",
|
|
68
68
|
children: [
|
|
69
69
|
s,
|
|
70
70
|
" ",
|
|
71
|
-
|
|
71
|
+
h && r,
|
|
72
72
|
n
|
|
73
73
|
]
|
|
74
74
|
}
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function qt(e) {
|
|
78
78
|
const {
|
|
79
79
|
actions: t = [],
|
|
80
80
|
className: s = "",
|
|
81
81
|
showTooltips: r = !0,
|
|
82
82
|
showActionTexts: i = !1
|
|
83
83
|
} = e;
|
|
84
|
-
return /* @__PURE__ */
|
|
85
|
-
|
|
84
|
+
return /* @__PURE__ */ m("ul", { className: `actions-container ${s}`, children: t == null ? void 0 : t.map((n) => /* @__PURE__ */ m("li", { children: /* @__PURE__ */ m(
|
|
85
|
+
Rt,
|
|
86
86
|
{
|
|
87
87
|
showTooltips: r,
|
|
88
88
|
showText: i,
|
|
@@ -91,28 +91,28 @@ function Rt(e) {
|
|
|
91
91
|
}
|
|
92
92
|
) }, n.id)) });
|
|
93
93
|
}
|
|
94
|
-
const
|
|
95
|
-
const { children: t, open: s, onClose: r } = e, i =
|
|
96
|
-
(
|
|
97
|
-
const
|
|
98
|
-
!s || !
|
|
94
|
+
const Ws = (e) => {
|
|
95
|
+
const { children: t, open: s, onClose: r } = e, i = It(null), n = $(
|
|
96
|
+
(o) => {
|
|
97
|
+
const h = i.current;
|
|
98
|
+
!s || !h || h.contains(o.target) || r();
|
|
99
99
|
},
|
|
100
100
|
[s, r]
|
|
101
101
|
), c = $(
|
|
102
|
-
(
|
|
103
|
-
s &&
|
|
102
|
+
(o) => {
|
|
103
|
+
s && o.key === "Escape" && r();
|
|
104
104
|
},
|
|
105
105
|
[s, r]
|
|
106
106
|
);
|
|
107
107
|
return se(() => {
|
|
108
108
|
if (s)
|
|
109
109
|
return setTimeout(() => {
|
|
110
|
-
var
|
|
111
|
-
return (
|
|
110
|
+
var o;
|
|
111
|
+
return (o = i.current) == null ? void 0 : o.focus();
|
|
112
112
|
}, 0), document.addEventListener("mousedown", n), document.addEventListener("keydown", c), () => {
|
|
113
113
|
document.removeEventListener("mousedown", n), document.removeEventListener("keydown", c);
|
|
114
114
|
};
|
|
115
|
-
}, [s, n, c]), /* @__PURE__ */
|
|
115
|
+
}, [s, n, c]), /* @__PURE__ */ m(
|
|
116
116
|
"div",
|
|
117
117
|
{
|
|
118
118
|
ref: i,
|
|
@@ -120,7 +120,7 @@ const Ks = (e) => {
|
|
|
120
120
|
"aria-hidden": !s,
|
|
121
121
|
tabIndex: -1,
|
|
122
122
|
className: `dropdown-main ${s ? "opened" : "closed"}`,
|
|
123
|
-
onClick: (
|
|
123
|
+
onClick: (o) => o.stopPropagation(),
|
|
124
124
|
children: t
|
|
125
125
|
}
|
|
126
126
|
);
|
|
@@ -132,22 +132,22 @@ const Ks = (e) => {
|
|
|
132
132
|
className: i = "",
|
|
133
133
|
variant: n = "text",
|
|
134
134
|
color: c = "default",
|
|
135
|
-
iconClassName:
|
|
136
|
-
...
|
|
135
|
+
iconClassName: o = "",
|
|
136
|
+
...h
|
|
137
137
|
} = e;
|
|
138
|
-
return /* @__PURE__ */
|
|
138
|
+
return /* @__PURE__ */ k(
|
|
139
139
|
"button",
|
|
140
140
|
{
|
|
141
141
|
type: r,
|
|
142
142
|
className: `icon-button ${i} ${n} ${c}`,
|
|
143
|
-
...
|
|
143
|
+
...h,
|
|
144
144
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ m(X, { icon: s, className: `!w-auto ${o}` }),
|
|
146
146
|
t
|
|
147
147
|
]
|
|
148
148
|
}
|
|
149
149
|
);
|
|
150
|
-
},
|
|
150
|
+
}, pe = (e) => {
|
|
151
151
|
const {
|
|
152
152
|
children: t,
|
|
153
153
|
type: s = "button",
|
|
@@ -156,70 +156,70 @@ const Ks = (e) => {
|
|
|
156
156
|
className: n = "",
|
|
157
157
|
...c
|
|
158
158
|
} = e;
|
|
159
|
-
return /* @__PURE__ */
|
|
159
|
+
return /* @__PURE__ */ m("button", { type: s, className: `button ${r} ${i} ${n}`, ...c, children: t });
|
|
160
160
|
};
|
|
161
|
-
var
|
|
162
|
-
function
|
|
163
|
-
if (
|
|
164
|
-
|
|
165
|
-
const e = (
|
|
166
|
-
if (
|
|
167
|
-
if (localStorage.getItem(
|
|
168
|
-
return y === void 0 || y !== void 0 && localStorage.getItem(
|
|
169
|
-
} else if (
|
|
170
|
-
return y === void 0 || y !== void 0 && sessionStorage.getItem(
|
|
161
|
+
var Ye, vt;
|
|
162
|
+
function zs() {
|
|
163
|
+
if (vt) return Ye;
|
|
164
|
+
vt = 1;
|
|
165
|
+
const e = (o, h = "local", y = void 0) => {
|
|
166
|
+
if (h === "local") {
|
|
167
|
+
if (localStorage.getItem(o) !== void 0 && localStorage.getItem(o) !== "undefined" && localStorage.getItem(o) !== null)
|
|
168
|
+
return y === void 0 || y !== void 0 && localStorage.getItem(o) === y;
|
|
169
|
+
} else if (h === "session" && sessionStorage.getItem(o) !== void 0 && sessionStorage.getItem(o) !== "undefined" && sessionStorage.getItem(o) !== null)
|
|
170
|
+
return y === void 0 || y !== void 0 && sessionStorage.getItem(o) === y;
|
|
171
171
|
return !1;
|
|
172
|
-
}, t = (
|
|
173
|
-
const
|
|
174
|
-
return
|
|
175
|
-
const [g,
|
|
176
|
-
|
|
177
|
-
}),
|
|
178
|
-
}, s = (
|
|
179
|
-
if (n(
|
|
172
|
+
}, t = (o) => {
|
|
173
|
+
const h = {};
|
|
174
|
+
return o.substring(1).split("&").forEach((d) => {
|
|
175
|
+
const [g, f] = d.split("=");
|
|
176
|
+
h[g] = f;
|
|
177
|
+
}), h;
|
|
178
|
+
}, s = (o = "") => {
|
|
179
|
+
if (n(o) && o.length) return n(o);
|
|
180
180
|
{
|
|
181
|
-
let
|
|
182
|
-
if (
|
|
183
|
-
return
|
|
181
|
+
let h = navigator.language || navigator.userLanguage;
|
|
182
|
+
if (h.indexOf("en") < 0 && h.indexOf("es") < 0 && (h = "en-US"), h = h.split("-")[0], h)
|
|
183
|
+
return o.length && i(o, 730, h), h;
|
|
184
184
|
}
|
|
185
185
|
return "en";
|
|
186
|
-
}, r = (
|
|
187
|
-
top:
|
|
188
|
-
left:
|
|
189
|
-
behavior:
|
|
190
|
-
}), i = (
|
|
191
|
-
var
|
|
192
|
-
|
|
193
|
-
const x = "; expires=" +
|
|
194
|
-
document.cookie = `${
|
|
195
|
-
}, n = (
|
|
196
|
-
const
|
|
197
|
-
for (let g = 0; g <
|
|
198
|
-
let
|
|
199
|
-
for (;
|
|
200
|
-
|
|
201
|
-
if (
|
|
202
|
-
return
|
|
186
|
+
}, r = (o = 0, h = 0, y = window, d = "smooth") => y.scroll({
|
|
187
|
+
top: o,
|
|
188
|
+
left: h,
|
|
189
|
+
behavior: d
|
|
190
|
+
}), i = (o, h, y, d = "/", g = "Lax") => {
|
|
191
|
+
var f = /* @__PURE__ */ new Date();
|
|
192
|
+
f.setTime(f.getTime() + h * 24 * 60 * 60 * 1e3);
|
|
193
|
+
const x = "; expires=" + f.toUTCString();
|
|
194
|
+
document.cookie = `${o}=${y || ""}${x};path=${d};SameSite=${g}`;
|
|
195
|
+
}, n = (o) => {
|
|
196
|
+
const h = `${o}=`, d = decodeURIComponent(document.cookie).split(";");
|
|
197
|
+
for (let g = 0; g < d.length; g += 1) {
|
|
198
|
+
let f = d[g];
|
|
199
|
+
for (; f.charAt(0) === " "; )
|
|
200
|
+
f = f.substring(1);
|
|
201
|
+
if (f.indexOf(h) === 0)
|
|
202
|
+
return f.substring(h.length, f.length);
|
|
203
203
|
}
|
|
204
204
|
return "";
|
|
205
205
|
};
|
|
206
|
-
return
|
|
206
|
+
return Ye = {
|
|
207
207
|
getCookie: n,
|
|
208
208
|
createCookie: i,
|
|
209
|
-
deleteCookie: (
|
|
209
|
+
deleteCookie: (o) => document.cookie = `${o}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`,
|
|
210
210
|
getUserLanguage: s,
|
|
211
211
|
scrollTo: r,
|
|
212
212
|
parseQueries: t,
|
|
213
213
|
validation: e
|
|
214
|
-
},
|
|
214
|
+
}, Ye;
|
|
215
215
|
}
|
|
216
|
-
var
|
|
217
|
-
function
|
|
218
|
-
const { t: e, language: t } =
|
|
216
|
+
var Gs = zs();
|
|
217
|
+
function zr() {
|
|
218
|
+
const { t: e, language: t } = T();
|
|
219
219
|
return { timeAge: $(
|
|
220
220
|
(r) => {
|
|
221
|
-
const n = /* @__PURE__ */ new Date() - r, c = Math.floor(n / (1e3 * 60)),
|
|
222
|
-
return n < 1e3 * 60 ?
|
|
221
|
+
const n = /* @__PURE__ */ new Date() - r, c = Math.floor(n / (1e3 * 60)), o = Math.floor(c / 60), h = t === "es", y = e("_accessibility:labels.ago"), d = e("_accessibility:labels.minute"), g = e("_accessibility:labels.minutes"), f = e("_accessibility:labels.hour"), x = e("_accessibility:labels.hours"), _ = e("_accessibility:labels.yesterday"), N = e("_accessibility:labels.justNow");
|
|
222
|
+
return n < 1e3 * 60 ? N : c < 60 ? `${h ? y : ""} ${c} ${c === 1 ? d : g} ${h ? "" : y}` : o < 24 ? `${h ? y : ""} ${o} ${o === 1 ? f : x} ${h ? "" : y}` : o < 48 ? _ : r.toLocaleDateString(navigator.language || "es-ES", {
|
|
223
223
|
day: "2-digit",
|
|
224
224
|
month: "2-digit",
|
|
225
225
|
year: "numeric"
|
|
@@ -229,7 +229,7 @@ function Wr() {
|
|
|
229
229
|
) };
|
|
230
230
|
}
|
|
231
231
|
var j = /* @__PURE__ */ ((e) => (e[e.success = 0] = "success", e[e.error = 1] = "error", e[e.warning = 2] = "warning", e[e.info = 3] = "info", e))(j || {});
|
|
232
|
-
const
|
|
232
|
+
const Js = (e) => e < 200 || e > 299;
|
|
233
233
|
var Y = /* @__PURE__ */ ((e) => (e.GET = "GET", e.POST = "POST", e.PUT = "PUT", e.PATCH = "PATCH", e.DELETE = "DELETE", e))(Y || {});
|
|
234
234
|
async function Ae(e, t = "GET", s, r) {
|
|
235
235
|
var c;
|
|
@@ -242,32 +242,32 @@ async function Ae(e, t = "GET", s, r) {
|
|
|
242
242
|
...s ? { body: JSON.stringify(s) } : {}
|
|
243
243
|
};
|
|
244
244
|
try {
|
|
245
|
-
const
|
|
246
|
-
let
|
|
247
|
-
if (!
|
|
248
|
-
const g = await
|
|
249
|
-
g && (
|
|
250
|
-
status:
|
|
245
|
+
const o = await fetch(e, n), y = ((c = o.headers.get("content-type")) == null ? void 0 : c.includes("application/json")) ? await o.json() : null;
|
|
246
|
+
let d = null;
|
|
247
|
+
if (!o.ok || Js(o.status)) {
|
|
248
|
+
const g = await o.text();
|
|
249
|
+
g && (d = {
|
|
250
|
+
status: o.status,
|
|
251
251
|
message: g
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
254
|
return {
|
|
255
|
-
data:
|
|
256
|
-
status:
|
|
257
|
-
error:
|
|
255
|
+
data: o.ok && o.status !== 204 ? y : null,
|
|
256
|
+
status: o.status,
|
|
257
|
+
error: d
|
|
258
258
|
};
|
|
259
|
-
} catch (
|
|
259
|
+
} catch (o) {
|
|
260
260
|
return {
|
|
261
261
|
data: null,
|
|
262
262
|
status: 500,
|
|
263
263
|
error: {
|
|
264
264
|
status: 500,
|
|
265
|
-
message:
|
|
265
|
+
message: o.message || "Unknown error occurred"
|
|
266
266
|
}
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Ys(e, t) {
|
|
271
271
|
if (t) {
|
|
272
272
|
const s = Object.entries(t).filter(([, r]) => r != null).map(
|
|
273
273
|
([r, i]) => `${encodeURIComponent(r)}=${encodeURIComponent(String(i))}`
|
|
@@ -276,15 +276,15 @@ function Js(e, t) {
|
|
|
276
276
|
}
|
|
277
277
|
return e;
|
|
278
278
|
}
|
|
279
|
-
const
|
|
279
|
+
const Bt = (e, t, s) => {
|
|
280
280
|
const r = [];
|
|
281
281
|
if (t) {
|
|
282
|
-
const { sortingBy: i, sortingOrder: n, currentPage: c, pageSize:
|
|
282
|
+
const { sortingBy: i, sortingOrder: n, currentPage: c, pageSize: o } = t;
|
|
283
283
|
r.push(
|
|
284
284
|
`sort=${String(i)}`,
|
|
285
285
|
`order=${n}`,
|
|
286
286
|
`page=${c}`,
|
|
287
|
-
`pageSize=${
|
|
287
|
+
`pageSize=${o}`
|
|
288
288
|
);
|
|
289
289
|
}
|
|
290
290
|
if (s) {
|
|
@@ -292,10 +292,10 @@ const qt = (e, t, s) => {
|
|
|
292
292
|
([, n]) => n != null && n !== ""
|
|
293
293
|
).flatMap(([n, c]) => {
|
|
294
294
|
if (Array.isArray(c))
|
|
295
|
-
return c.map((
|
|
295
|
+
return c.map((o) => `${n}==${encodeURIComponent((o == null ? void 0 : o.id) ?? o)}`);
|
|
296
296
|
if (typeof c == "object" && c !== null && "start" in c && "end" in c) {
|
|
297
|
-
const
|
|
298
|
-
return c.start != null && c.start !== "" &&
|
|
297
|
+
const o = [];
|
|
298
|
+
return c.start != null && c.start !== "" && o.push(`${n}>=${encodeURIComponent(c.start)}`), c.end != null && c.end !== "" && o.push(`${n}<=${encodeURIComponent(c.end)}`), o;
|
|
299
299
|
}
|
|
300
300
|
return typeof c == "object" && c !== null ? `${n}==${encodeURIComponent(c.id ?? "")}` : `${n}==${encodeURIComponent(c)}`;
|
|
301
301
|
});
|
|
@@ -303,7 +303,7 @@ const qt = (e, t, s) => {
|
|
|
303
303
|
}
|
|
304
304
|
return r.length ? `${e}?${r.join("&")}` : e;
|
|
305
305
|
};
|
|
306
|
-
class
|
|
306
|
+
class jt {
|
|
307
307
|
/**
|
|
308
308
|
* @param baseUrl the base url of the server
|
|
309
309
|
* @param userKey the local storage user key
|
|
@@ -319,12 +319,12 @@ class Bt {
|
|
|
319
319
|
}
|
|
320
320
|
defaultTokenAcquirer(t) {
|
|
321
321
|
if (t) return { credentials: "include" };
|
|
322
|
-
const s =
|
|
322
|
+
const s = Ht(this.userKey);
|
|
323
323
|
if (s && s.length)
|
|
324
324
|
return { Authorization: `Bearer ${s}` };
|
|
325
325
|
}
|
|
326
326
|
async doQuery(t, s = Y.GET, r, i) {
|
|
327
|
-
const n = this.secured ? this.defaultTokenAcquirer() : {}, { data: c, status:
|
|
327
|
+
const n = this.secured ? this.defaultTokenAcquirer() : {}, { data: c, status: o } = await Ae(
|
|
328
328
|
`${this.baseUrl}${t}`,
|
|
329
329
|
s,
|
|
330
330
|
r,
|
|
@@ -333,7 +333,7 @@ class Bt {
|
|
|
333
333
|
...i ?? {}
|
|
334
334
|
}
|
|
335
335
|
);
|
|
336
|
-
if (
|
|
336
|
+
if (o !== 200 && o !== 204) throw new Error(String(o));
|
|
337
337
|
return c;
|
|
338
338
|
}
|
|
339
339
|
/**
|
|
@@ -343,13 +343,13 @@ class Bt {
|
|
|
343
343
|
* @returns Result list
|
|
344
344
|
*/
|
|
345
345
|
async get(t, s, r) {
|
|
346
|
-
const i =
|
|
346
|
+
const i = Bt(t, s, r), n = this.secured ? this.defaultTokenAcquirer() : void 0, { data: c, error: o } = await Ae(
|
|
347
347
|
`${this.baseUrl}${i}`,
|
|
348
348
|
Y.GET,
|
|
349
349
|
null,
|
|
350
350
|
n
|
|
351
351
|
);
|
|
352
|
-
if (
|
|
352
|
+
if (o) throw new Error(`${o.status} ${o.message}`);
|
|
353
353
|
return c;
|
|
354
354
|
}
|
|
355
355
|
/**
|
|
@@ -401,10 +401,10 @@ class Bt {
|
|
|
401
401
|
return n;
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
class
|
|
404
|
+
class Xs {
|
|
405
405
|
constructor(t, s = "user") {
|
|
406
406
|
ue(this, "api");
|
|
407
|
-
this.api = new
|
|
407
|
+
this.api = new jt(t, s, !1);
|
|
408
408
|
}
|
|
409
409
|
async login(t) {
|
|
410
410
|
const s = "auth/sign-in", r = t;
|
|
@@ -430,10 +430,10 @@ class Ys {
|
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
class
|
|
433
|
+
class Gr {
|
|
434
434
|
constructor(t, s) {
|
|
435
435
|
ue(this, "auth");
|
|
436
|
-
this.auth = new
|
|
436
|
+
this.auth = new Xs(t, s);
|
|
437
437
|
}
|
|
438
438
|
/**
|
|
439
439
|
* @returns auth
|
|
@@ -442,7 +442,7 @@ class zr {
|
|
|
442
442
|
return this.auth;
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
|
-
class
|
|
445
|
+
class Jr {
|
|
446
446
|
/**
|
|
447
447
|
*
|
|
448
448
|
* @param table
|
|
@@ -452,7 +452,7 @@ class Gr {
|
|
|
452
452
|
ue(this, "table");
|
|
453
453
|
ue(this, "secured");
|
|
454
454
|
ue(this, "api");
|
|
455
|
-
this.table = t, this.secured = i, this.api = new
|
|
455
|
+
this.table = t, this.secured = i, this.api = new jt(s, r, i);
|
|
456
456
|
}
|
|
457
457
|
/**
|
|
458
458
|
*
|
|
@@ -500,7 +500,7 @@ class Gr {
|
|
|
500
500
|
* @returns - List of elements
|
|
501
501
|
*/
|
|
502
502
|
async export(t) {
|
|
503
|
-
const s =
|
|
503
|
+
const s = Bt(
|
|
504
504
|
`${this.table}/export`,
|
|
505
505
|
void 0,
|
|
506
506
|
t
|
|
@@ -526,7 +526,7 @@ class Gr {
|
|
|
526
526
|
*/
|
|
527
527
|
async commonGet(t) {
|
|
528
528
|
return await this.api.doQuery(
|
|
529
|
-
|
|
529
|
+
Ys(`${this.table}/common`, t),
|
|
530
530
|
Y.GET
|
|
531
531
|
);
|
|
532
532
|
}
|
|
@@ -545,13 +545,13 @@ class Gr {
|
|
|
545
545
|
return await this.api.patch(`${this.table}/restore`, t);
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function Yr(e) {
|
|
549
549
|
return Object.keys(e).filter((t) => isNaN(Number(t))).map((t) => ({
|
|
550
550
|
key: t,
|
|
551
551
|
value: e[t]
|
|
552
552
|
}));
|
|
553
553
|
}
|
|
554
|
-
const
|
|
554
|
+
const Ht = (e, t = "") => {
|
|
555
555
|
const s = localStorage.getItem(e) ?? void 0;
|
|
556
556
|
if (s && t.length)
|
|
557
557
|
switch (t) {
|
|
@@ -565,10 +565,10 @@ const jt = (e, t = "") => {
|
|
|
565
565
|
return s;
|
|
566
566
|
}
|
|
567
567
|
return s;
|
|
568
|
-
},
|
|
568
|
+
}, xt = (e, t) => localStorage.setItem(
|
|
569
569
|
e,
|
|
570
570
|
typeof t == "object" ? JSON.stringify(t) : t
|
|
571
|
-
),
|
|
571
|
+
), Ct = (e) => localStorage.removeItem(e);
|
|
572
572
|
function _t(e) {
|
|
573
573
|
const t = e ? new Date(e) : /* @__PURE__ */ new Date(), s = {
|
|
574
574
|
weekday: "long",
|
|
@@ -591,27 +591,27 @@ function _t(e) {
|
|
|
591
591
|
s
|
|
592
592
|
);
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function Xr(e) {
|
|
595
595
|
const t = e ? new Date(e) : /* @__PURE__ */ new Date(), s = t.getFullYear(), r = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0"), n = String(t.getHours()).padStart(2, "0"), c = String(t.getMinutes()).padStart(2, "0");
|
|
596
596
|
return `${s}-${r}-${i}T${n}:${c}`;
|
|
597
597
|
}
|
|
598
|
-
const
|
|
598
|
+
const Zs = () => {
|
|
599
599
|
var s;
|
|
600
600
|
const e = navigator, t = ((s = e == null ? void 0 : e.userAgentData) == null ? void 0 : s.platform) || (e == null ? void 0 : e.platform) || "";
|
|
601
601
|
return /Mac|iPhone|iPod|iPad/i.test(t);
|
|
602
|
-
},
|
|
603
|
-
function
|
|
604
|
-
const { children: t } = e, [s, r] =
|
|
605
|
-
(y,
|
|
606
|
-
const { type: g, items:
|
|
602
|
+
}, Qt = qe({});
|
|
603
|
+
function Zr(e) {
|
|
604
|
+
const { children: t } = e, [s, r] = Rs(
|
|
605
|
+
(y, d) => {
|
|
606
|
+
const { type: g, items: f, index: x } = d;
|
|
607
607
|
switch (g) {
|
|
608
608
|
case "set":
|
|
609
|
-
return (
|
|
610
|
-
...
|
|
611
|
-
id:
|
|
609
|
+
return (f == null ? void 0 : f.map((_, N) => ({
|
|
610
|
+
..._,
|
|
611
|
+
id: N
|
|
612
612
|
}))) ?? [];
|
|
613
613
|
case "remove":
|
|
614
|
-
return x !== void 0 ? y.filter((
|
|
614
|
+
return x !== void 0 ? y.filter((_, N) => N !== x) : [];
|
|
615
615
|
}
|
|
616
616
|
return y;
|
|
617
617
|
},
|
|
@@ -623,31 +623,31 @@ function Xr(e) {
|
|
|
623
623
|
}), n = (y) => r({
|
|
624
624
|
type: "set",
|
|
625
625
|
items: [{ ...y }]
|
|
626
|
-
}), c = (y) => r({ type: "set", items: y }),
|
|
626
|
+
}), c = (y) => r({ type: "set", items: y }), o = (y) => r({
|
|
627
627
|
type: "set",
|
|
628
628
|
items: [{ ...y, type: j.success }]
|
|
629
|
-
}),
|
|
630
|
-
return /* @__PURE__ */
|
|
631
|
-
|
|
629
|
+
}), h = (y) => r({ type: "remove", index: y });
|
|
630
|
+
return /* @__PURE__ */ m(
|
|
631
|
+
Qt.Provider,
|
|
632
632
|
{
|
|
633
633
|
value: {
|
|
634
634
|
notification: s,
|
|
635
|
-
removeNotification:
|
|
635
|
+
removeNotification: h,
|
|
636
636
|
showErrorNotification: i,
|
|
637
637
|
showNotification: n,
|
|
638
|
-
showSuccessNotification:
|
|
638
|
+
showSuccessNotification: o,
|
|
639
639
|
showStackNotifications: c
|
|
640
640
|
},
|
|
641
641
|
children: t
|
|
642
642
|
}
|
|
643
643
|
);
|
|
644
644
|
}
|
|
645
|
-
const
|
|
646
|
-
const e =
|
|
645
|
+
const Se = () => {
|
|
646
|
+
const e = Be(Qt);
|
|
647
647
|
if (e === void 0)
|
|
648
648
|
throw new Error("NotificationContext must be used within a Provider");
|
|
649
649
|
return e;
|
|
650
|
-
},
|
|
650
|
+
}, Ne = new Bs({
|
|
651
651
|
defaultOptions: {
|
|
652
652
|
queries: {
|
|
653
653
|
refetchInterval: !1,
|
|
@@ -659,96 +659,96 @@ const Ne = () => {
|
|
|
659
659
|
// default: true
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
}),
|
|
662
|
+
}), Kt = qe({}), en = (e) => {
|
|
663
663
|
const { children: t, manager: s } = e;
|
|
664
|
-
return /* @__PURE__ */
|
|
665
|
-
},
|
|
666
|
-
const e =
|
|
664
|
+
return /* @__PURE__ */ m(Kt.Provider, { value: { client: s }, children: /* @__PURE__ */ m(js, { client: Ne, children: t }) });
|
|
665
|
+
}, er = () => {
|
|
666
|
+
const e = Be(Kt);
|
|
667
667
|
if (e === void 0)
|
|
668
668
|
throw new Error("managerContext must be used within a Provider");
|
|
669
669
|
return e.client;
|
|
670
|
-
},
|
|
671
|
-
const { children: t, guestMode: s = "guest_mode", user: r = "user" } = e, i =
|
|
672
|
-
|
|
670
|
+
}, Wt = qe({}), tn = (e) => {
|
|
671
|
+
const { children: t, guestMode: s = "guest_mode", user: r = "user" } = e, i = er(), [n, c] = Z({}), o = $(() => !!Ht(s, "boolean") && n.token === void 0, [n.token]), h = $((x) => {
|
|
672
|
+
xt(s, x);
|
|
673
673
|
}, []), y = $((x) => {
|
|
674
|
-
x && (c(x),
|
|
675
|
-
}, []),
|
|
674
|
+
x && (c(x), Ct(s), xt(r, x.token));
|
|
675
|
+
}, []), d = $(async () => {
|
|
676
676
|
try {
|
|
677
677
|
await i.Auth.logout();
|
|
678
678
|
} catch (x) {
|
|
679
679
|
console.error(x);
|
|
680
680
|
}
|
|
681
|
-
c({}),
|
|
681
|
+
c({}), Ct(r);
|
|
682
682
|
}, [i.Auth]), g = $(async () => {
|
|
683
683
|
try {
|
|
684
684
|
const x = await i.Auth.getSession();
|
|
685
685
|
y(x);
|
|
686
686
|
} catch (x) {
|
|
687
|
-
console.error(x),
|
|
687
|
+
console.error(x), d();
|
|
688
688
|
}
|
|
689
|
-
}, [y,
|
|
689
|
+
}, [y, d, i.Auth]), f = {
|
|
690
690
|
account: n,
|
|
691
691
|
logUser: y,
|
|
692
|
-
logoutUser:
|
|
692
|
+
logoutUser: d,
|
|
693
693
|
logUserFromLocal: g,
|
|
694
|
-
isInGuestMode:
|
|
695
|
-
setGuestMode:
|
|
694
|
+
isInGuestMode: o,
|
|
695
|
+
setGuestMode: h
|
|
696
696
|
};
|
|
697
|
-
return /* @__PURE__ */
|
|
698
|
-
},
|
|
699
|
-
const e =
|
|
697
|
+
return /* @__PURE__ */ m(Wt.Provider, { value: f, children: t });
|
|
698
|
+
}, zt = () => {
|
|
699
|
+
const e = Be(Wt);
|
|
700
700
|
if (e === void 0)
|
|
701
701
|
throw new Error("authContext must be used within a Provider");
|
|
702
702
|
return e;
|
|
703
|
-
},
|
|
703
|
+
}, Gt = qe({}), sn = (e) => {
|
|
704
704
|
const { children: t, location: s, navigate: r, linkComponent: i, searchComponent: n } = e;
|
|
705
|
-
return /* @__PURE__ */
|
|
706
|
-
|
|
705
|
+
return /* @__PURE__ */ m(
|
|
706
|
+
Gt.Provider,
|
|
707
707
|
{
|
|
708
708
|
value: { location: s, navigate: r, linkComponent: i, searchComponent: n },
|
|
709
709
|
children: t
|
|
710
710
|
}
|
|
711
711
|
);
|
|
712
|
-
},
|
|
713
|
-
const e =
|
|
712
|
+
}, He = () => {
|
|
713
|
+
const e = Be(Gt);
|
|
714
714
|
if (e === void 0 || Object.keys(e).length === 0)
|
|
715
715
|
throw new Error(
|
|
716
716
|
"Config provider has not been set. This step is required and cannot be skipped."
|
|
717
717
|
);
|
|
718
718
|
return e;
|
|
719
|
-
},
|
|
720
|
-
const { showSuccessNotification: t } =
|
|
721
|
-
y(),
|
|
722
|
-
},
|
|
723
|
-
|
|
724
|
-
}, x =
|
|
719
|
+
}, Jt = (e) => {
|
|
720
|
+
const { showSuccessNotification: t } = Se(), { mutationFn: s, onError: r, onSuccess: i, onSuccessMessage: n } = e, [c, o] = Z([]), { open: h, handleClose: y, handleOpen: d } = is(), g = () => {
|
|
721
|
+
y(), o([]);
|
|
722
|
+
}, f = async (_) => {
|
|
723
|
+
o(_), d();
|
|
724
|
+
}, x = je({
|
|
725
725
|
mutationFn: () => s(
|
|
726
726
|
Array.isArray(c) ? c : [c]
|
|
727
727
|
),
|
|
728
|
-
onError: (
|
|
729
|
-
console.error(
|
|
728
|
+
onError: (_) => {
|
|
729
|
+
console.error(_), r && r(_), g();
|
|
730
730
|
},
|
|
731
|
-
onSuccess: async (
|
|
732
|
-
i && i(
|
|
731
|
+
onSuccess: async (_) => {
|
|
732
|
+
i && i(_), t({
|
|
733
733
|
message: n
|
|
734
734
|
}), g();
|
|
735
735
|
}
|
|
736
736
|
});
|
|
737
|
-
return { open:
|
|
737
|
+
return { open: h, onClick: f, close: g, dialogFn: x, isLoading: x.isPending };
|
|
738
738
|
};
|
|
739
|
-
var Ve = (e) => e.type === "checkbox",
|
|
740
|
-
const
|
|
741
|
-
var O = (e) => !z(e) && !Array.isArray(e) &&
|
|
739
|
+
var Ve = (e) => e.type === "checkbox", _e = (e) => e instanceof Date, z = (e) => e == null;
|
|
740
|
+
const Yt = (e) => typeof e == "object";
|
|
741
|
+
var O = (e) => !z(e) && !Array.isArray(e) && Yt(e) && !_e(e), tr = (e) => O(e) && e.target ? Ve(e.target) ? e.target.checked : e.target.value : e, sr = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, rr = (e, t) => e.has(sr(t)), nr = (e) => {
|
|
742
742
|
const t = e.constructor && e.constructor.prototype;
|
|
743
743
|
return O(t) && t.hasOwnProperty("isPrototypeOf");
|
|
744
|
-
},
|
|
744
|
+
}, st = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
745
745
|
function Q(e) {
|
|
746
746
|
let t;
|
|
747
747
|
const s = Array.isArray(e), r = typeof FileList < "u" ? e instanceof FileList : !1;
|
|
748
748
|
if (e instanceof Date)
|
|
749
749
|
t = new Date(e);
|
|
750
|
-
else if (!(
|
|
751
|
-
if (t = s ? [] : {}, !s && !
|
|
750
|
+
else if (!(st && (e instanceof Blob || r)) && (s || O(e)))
|
|
751
|
+
if (t = s ? [] : {}, !s && !nr(e))
|
|
752
752
|
t = e;
|
|
753
753
|
else
|
|
754
754
|
for (const i in e)
|
|
@@ -757,27 +757,27 @@ function Q(e) {
|
|
|
757
757
|
return e;
|
|
758
758
|
return t;
|
|
759
759
|
}
|
|
760
|
-
var
|
|
760
|
+
var Qe = (e) => /^\w*$/.test(e), R = (e) => e === void 0, rt = (e) => Array.isArray(e) ? e.filter(Boolean) : [], nt = (e) => rt(e.replace(/["|']|\]/g, "").split(/\.|\[/)), v = (e, t, s) => {
|
|
761
761
|
if (!t || !O(e))
|
|
762
762
|
return s;
|
|
763
|
-
const r = (
|
|
763
|
+
const r = (Qe(t) ? [t] : nt(t)).reduce((i, n) => z(i) ? i : i[n], e);
|
|
764
764
|
return R(r) || r === e ? R(e[t]) ? s : e[t] : r;
|
|
765
765
|
}, de = (e) => typeof e == "boolean", M = (e, t, s) => {
|
|
766
766
|
let r = -1;
|
|
767
|
-
const i =
|
|
767
|
+
const i = Qe(t) ? [t] : nt(t), n = i.length, c = n - 1;
|
|
768
768
|
for (; ++r < n; ) {
|
|
769
|
-
const
|
|
770
|
-
let
|
|
769
|
+
const o = i[r];
|
|
770
|
+
let h = s;
|
|
771
771
|
if (r !== c) {
|
|
772
|
-
const y = e[
|
|
773
|
-
|
|
772
|
+
const y = e[o];
|
|
773
|
+
h = O(y) || Array.isArray(y) ? y : isNaN(+i[r + 1]) ? {} : [];
|
|
774
774
|
}
|
|
775
|
-
if (
|
|
775
|
+
if (o === "__proto__" || o === "constructor" || o === "prototype")
|
|
776
776
|
return;
|
|
777
|
-
e[
|
|
777
|
+
e[o] = h, e = e[o];
|
|
778
778
|
}
|
|
779
779
|
};
|
|
780
|
-
const
|
|
780
|
+
const Nt = {
|
|
781
781
|
BLUR: "blur",
|
|
782
782
|
FOCUS_OUT: "focusout"
|
|
783
783
|
}, ce = {
|
|
@@ -786,7 +786,7 @@ const Ct = {
|
|
|
786
786
|
onSubmit: "onSubmit",
|
|
787
787
|
onTouched: "onTouched",
|
|
788
788
|
all: "all"
|
|
789
|
-
},
|
|
789
|
+
}, he = {
|
|
790
790
|
max: "max",
|
|
791
791
|
min: "min",
|
|
792
792
|
maxLength: "maxLength",
|
|
@@ -794,9 +794,9 @@ const Ct = {
|
|
|
794
794
|
pattern: "pattern",
|
|
795
795
|
required: "required",
|
|
796
796
|
validate: "validate"
|
|
797
|
-
},
|
|
798
|
-
|
|
799
|
-
var
|
|
797
|
+
}, ir = te.createContext(null);
|
|
798
|
+
ir.displayName = "HookFormContext";
|
|
799
|
+
var or = (e, t, s, r = !0) => {
|
|
800
800
|
const i = {
|
|
801
801
|
defaultValues: t._defaultValues
|
|
802
802
|
};
|
|
@@ -809,12 +809,12 @@ var ir = (e, t, s, r = !0) => {
|
|
|
809
809
|
});
|
|
810
810
|
return i;
|
|
811
811
|
};
|
|
812
|
-
const
|
|
813
|
-
var
|
|
814
|
-
function
|
|
815
|
-
if (
|
|
812
|
+
const ar = typeof window < "u" ? te.useLayoutEffect : te.useEffect;
|
|
813
|
+
var fe = (e) => typeof e == "string", cr = (e, t, s, r, i) => fe(e) ? (r && t.watch.add(e), v(s, e, i)) : Array.isArray(e) ? e.map((n) => (r && t.watch.add(n), v(s, n))) : (r && (t.watchAll = !0), s), Ze = (e) => z(e) || !Yt(e);
|
|
814
|
+
function be(e, t, s = /* @__PURE__ */ new WeakSet()) {
|
|
815
|
+
if (Ze(e) || Ze(t))
|
|
816
816
|
return e === t;
|
|
817
|
-
if (
|
|
817
|
+
if (_e(e) && _e(t))
|
|
818
818
|
return e.getTime() === t.getTime();
|
|
819
819
|
const r = Object.keys(e), i = Object.keys(t);
|
|
820
820
|
if (r.length !== i.length)
|
|
@@ -827,14 +827,14 @@ function pe(e, t, s = /* @__PURE__ */ new WeakSet()) {
|
|
|
827
827
|
if (!i.includes(n))
|
|
828
828
|
return !1;
|
|
829
829
|
if (n !== "ref") {
|
|
830
|
-
const
|
|
831
|
-
if (
|
|
830
|
+
const o = t[n];
|
|
831
|
+
if (_e(c) && _e(o) || O(c) && O(o) || Array.isArray(c) && Array.isArray(o) ? !be(c, o, s) : c !== o)
|
|
832
832
|
return !1;
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
835
|
return !0;
|
|
836
836
|
}
|
|
837
|
-
var
|
|
837
|
+
var lr = (e, t, s, r, i) => t ? {
|
|
838
838
|
...s[e],
|
|
839
839
|
types: {
|
|
840
840
|
...s[e] && s[e].types ? s[e].types : {},
|
|
@@ -859,55 +859,55 @@ var cr = (e, t, s, r, i) => t ? {
|
|
|
859
859
|
e = [];
|
|
860
860
|
}
|
|
861
861
|
};
|
|
862
|
-
}, J = (e) => O(e) && !Object.keys(e).length,
|
|
863
|
-
if (!
|
|
862
|
+
}, J = (e) => O(e) && !Object.keys(e).length, it = (e) => e.type === "file", le = (e) => typeof e == "function", Oe = (e) => {
|
|
863
|
+
if (!st)
|
|
864
864
|
return !1;
|
|
865
865
|
const t = e ? e.ownerDocument : 0;
|
|
866
866
|
return e instanceof (t && t.defaultView ? t.defaultView.HTMLElement : HTMLElement);
|
|
867
|
-
},
|
|
868
|
-
function
|
|
867
|
+
}, Xt = (e) => e.type === "select-multiple", ot = (e) => e.type === "radio", ur = (e) => ot(e) || Ve(e), Xe = (e) => Oe(e) && e.isConnected;
|
|
868
|
+
function dr(e, t) {
|
|
869
869
|
const s = t.slice(0, -1).length;
|
|
870
870
|
let r = 0;
|
|
871
871
|
for (; r < s; )
|
|
872
872
|
e = R(e) ? r++ : e[t[r++]];
|
|
873
873
|
return e;
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function fr(e) {
|
|
876
876
|
for (const t in e)
|
|
877
877
|
if (e.hasOwnProperty(t) && !R(e[t]))
|
|
878
878
|
return !1;
|
|
879
879
|
return !0;
|
|
880
880
|
}
|
|
881
881
|
function U(e, t) {
|
|
882
|
-
const s = Array.isArray(t) ? t :
|
|
883
|
-
return r && delete r[n], i !== 0 && (O(r) && J(r) || Array.isArray(r) &&
|
|
882
|
+
const s = Array.isArray(t) ? t : Qe(t) ? [t] : nt(t), r = s.length === 1 ? e : dr(e, s), i = s.length - 1, n = s[i];
|
|
883
|
+
return r && delete r[n], i !== 0 && (O(r) && J(r) || Array.isArray(r) && fr(r)) && U(e, s.slice(0, -1)), e;
|
|
884
884
|
}
|
|
885
|
-
var
|
|
885
|
+
var Zt = (e) => {
|
|
886
886
|
for (const t in e)
|
|
887
887
|
if (le(e[t]))
|
|
888
888
|
return !0;
|
|
889
889
|
return !1;
|
|
890
890
|
};
|
|
891
|
-
function
|
|
891
|
+
function Ue(e, t = {}) {
|
|
892
892
|
const s = Array.isArray(e);
|
|
893
893
|
if (O(e) || s)
|
|
894
894
|
for (const r in e)
|
|
895
|
-
Array.isArray(e[r]) || O(e[r]) && !
|
|
895
|
+
Array.isArray(e[r]) || O(e[r]) && !Zt(e[r]) ? (t[r] = Array.isArray(e[r]) ? [] : {}, Ue(e[r], t[r])) : z(e[r]) || (t[r] = !0);
|
|
896
896
|
return t;
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function es(e, t, s) {
|
|
899
899
|
const r = Array.isArray(e);
|
|
900
900
|
if (O(e) || r)
|
|
901
901
|
for (const i in e)
|
|
902
|
-
Array.isArray(e[i]) || O(e[i]) && !
|
|
902
|
+
Array.isArray(e[i]) || O(e[i]) && !Zt(e[i]) ? R(t) || Ze(s[i]) ? s[i] = Array.isArray(e[i]) ? Ue(e[i], []) : { ...Ue(e[i]) } : es(e[i], z(t) ? {} : t[i], s[i]) : s[i] = !be(e[i], t[i]);
|
|
903
903
|
return s;
|
|
904
904
|
}
|
|
905
|
-
var Ee = (e, t) =>
|
|
906
|
-
const
|
|
905
|
+
var Ee = (e, t) => es(e, t, Ue(t));
|
|
906
|
+
const kt = {
|
|
907
907
|
value: !1,
|
|
908
908
|
isValid: !1
|
|
909
|
-
},
|
|
910
|
-
var
|
|
909
|
+
}, At = { value: !0, isValid: !0 };
|
|
910
|
+
var ts = (e) => {
|
|
911
911
|
if (Array.isArray(e)) {
|
|
912
912
|
if (e.length > 1) {
|
|
913
913
|
const t = e.filter((s) => s && s.checked && !s.disabled).map((s) => s.value);
|
|
@@ -915,24 +915,24 @@ var es = (e) => {
|
|
|
915
915
|
}
|
|
916
916
|
return e[0].checked && !e[0].disabled ? (
|
|
917
917
|
// @ts-expect-error expected to work in the browser
|
|
918
|
-
e[0].attributes && !R(e[0].attributes.value) ? R(e[0].value) || e[0].value === "" ?
|
|
919
|
-
) :
|
|
918
|
+
e[0].attributes && !R(e[0].attributes.value) ? R(e[0].value) || e[0].value === "" ? At : { value: e[0].value, isValid: !0 } : At
|
|
919
|
+
) : kt;
|
|
920
920
|
}
|
|
921
|
-
return
|
|
922
|
-
},
|
|
923
|
-
const
|
|
921
|
+
return kt;
|
|
922
|
+
}, ss = (e, { valueAsNumber: t, valueAsDate: s, setValueAs: r }) => R(e) ? e : t ? e === "" ? NaN : e && +e : s && fe(e) ? new Date(e) : r ? r(e) : e;
|
|
923
|
+
const Et = {
|
|
924
924
|
isValid: !1,
|
|
925
925
|
value: null
|
|
926
926
|
};
|
|
927
|
-
var
|
|
927
|
+
var rs = (e) => Array.isArray(e) ? e.reduce((t, s) => s && s.checked && !s.disabled ? {
|
|
928
928
|
isValid: !0,
|
|
929
929
|
value: s.value
|
|
930
|
-
} : t,
|
|
931
|
-
function
|
|
930
|
+
} : t, Et) : Et;
|
|
931
|
+
function $t(e) {
|
|
932
932
|
const t = e.ref;
|
|
933
|
-
return
|
|
933
|
+
return it(t) ? t.files : ot(t) ? rs(e.refs).value : Xt(t) ? [...t.selectedOptions].map(({ value: s }) => s) : Ve(t) ? ts(e.refs).value : ss(R(t.value) ? e.ref.value : t.value, e);
|
|
934
934
|
}
|
|
935
|
-
var
|
|
935
|
+
var mr = (e, t, s, r) => {
|
|
936
936
|
const i = {};
|
|
937
937
|
for (const n of e) {
|
|
938
938
|
const c = v(t, n);
|
|
@@ -944,53 +944,53 @@ var fr = (e, t, s, r) => {
|
|
|
944
944
|
fields: i,
|
|
945
945
|
shouldUseNativeValidation: r
|
|
946
946
|
};
|
|
947
|
-
},
|
|
947
|
+
}, Re = (e) => e instanceof RegExp, $e = (e) => R(e) ? e : Re(e) ? e.source : O(e) ? Re(e.value) ? e.value.source : e.value : e, Ft = (e) => ({
|
|
948
948
|
isOnSubmit: !e || e === ce.onSubmit,
|
|
949
949
|
isOnBlur: e === ce.onBlur,
|
|
950
950
|
isOnChange: e === ce.onChange,
|
|
951
951
|
isOnAll: e === ce.all,
|
|
952
952
|
isOnTouch: e === ce.onTouched
|
|
953
953
|
});
|
|
954
|
-
const
|
|
955
|
-
var hr = (e) => !!e && !!e.validate && !!(le(e.validate) && e.validate.constructor.name ===
|
|
954
|
+
const Lt = "AsyncFunction";
|
|
955
|
+
var hr = (e) => !!e && !!e.validate && !!(le(e.validate) && e.validate.constructor.name === Lt || O(e.validate) && Object.values(e.validate).find((t) => t.constructor.name === Lt)), yr = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), Tt = (e, t, s) => !s && (t.watchAll || t.watch.has(e) || [...t.watch].some((r) => e.startsWith(r) && /^\.\w+/.test(e.slice(r.length))));
|
|
956
956
|
const Le = (e, t, s, r) => {
|
|
957
957
|
for (const i of s || Object.keys(e)) {
|
|
958
958
|
const n = v(e, i);
|
|
959
959
|
if (n) {
|
|
960
|
-
const { _f: c, ...
|
|
960
|
+
const { _f: c, ...o } = n;
|
|
961
961
|
if (c) {
|
|
962
962
|
if (c.refs && c.refs[0] && t(c.refs[0], i) && !r)
|
|
963
963
|
return !0;
|
|
964
964
|
if (c.ref && t(c.ref, c.name) && !r)
|
|
965
965
|
return !0;
|
|
966
|
-
if (Le(
|
|
966
|
+
if (Le(o, t))
|
|
967
967
|
break;
|
|
968
|
-
} else if (O(
|
|
968
|
+
} else if (O(o) && Le(o, t))
|
|
969
969
|
break;
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
972
|
};
|
|
973
973
|
function Dt(e, t, s) {
|
|
974
974
|
const r = v(e, s);
|
|
975
|
-
if (r ||
|
|
975
|
+
if (r || Qe(s))
|
|
976
976
|
return {
|
|
977
977
|
error: r,
|
|
978
978
|
name: s
|
|
979
979
|
};
|
|
980
980
|
const i = s.split(".");
|
|
981
981
|
for (; i.length; ) {
|
|
982
|
-
const n = i.join("."), c = v(t, n),
|
|
982
|
+
const n = i.join("."), c = v(t, n), o = v(e, n);
|
|
983
983
|
if (c && !Array.isArray(c) && s !== n)
|
|
984
984
|
return { name: s };
|
|
985
|
-
if (
|
|
985
|
+
if (o && o.type)
|
|
986
986
|
return {
|
|
987
987
|
name: n,
|
|
988
|
-
error:
|
|
988
|
+
error: o
|
|
989
989
|
};
|
|
990
|
-
if (
|
|
990
|
+
if (o && o.root && o.root.type)
|
|
991
991
|
return {
|
|
992
992
|
name: `${n}.root`,
|
|
993
|
-
error:
|
|
993
|
+
error: o.root
|
|
994
994
|
};
|
|
995
995
|
i.pop();
|
|
996
996
|
}
|
|
@@ -998,114 +998,114 @@ function Dt(e, t, s) {
|
|
|
998
998
|
name: s
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
|
-
var
|
|
1001
|
+
var gr = (e, t, s, r) => {
|
|
1002
1002
|
s(e);
|
|
1003
1003
|
const { name: i, ...n } = e;
|
|
1004
1004
|
return J(n) || Object.keys(n).length >= Object.keys(t).length || Object.keys(n).find((c) => t[c] === (!r || ce.all));
|
|
1005
|
-
},
|
|
1005
|
+
}, br = (e, t, s) => !e || !t || e === t || Fe(e).some((r) => r && (s ? r === t : r.startsWith(t) || t.startsWith(r))), pr = (e, t, s, r, i) => i.isOnAll ? !1 : !s && i.isOnTouch ? !(t || e) : (s ? r.isOnBlur : i.isOnBlur) ? !e : (s ? r.isOnChange : i.isOnChange) ? e : !0, wr = (e, t) => !rt(v(e, t)).length && U(e, t), vr = (e, t, s) => {
|
|
1006
1006
|
const r = Fe(v(e, s));
|
|
1007
1007
|
return M(r, "root", t[s]), M(e, s, r), e;
|
|
1008
|
-
},
|
|
1009
|
-
function
|
|
1010
|
-
if (
|
|
1008
|
+
}, Ie = (e) => fe(e);
|
|
1009
|
+
function Vt(e, t, s = "validate") {
|
|
1010
|
+
if (Ie(e) || Array.isArray(e) && e.every(Ie) || de(e) && !e)
|
|
1011
1011
|
return {
|
|
1012
1012
|
type: s,
|
|
1013
|
-
message:
|
|
1013
|
+
message: Ie(e) ? e : "",
|
|
1014
1014
|
ref: t
|
|
1015
1015
|
};
|
|
1016
1016
|
}
|
|
1017
|
-
var ke = (e) => O(e) && !
|
|
1017
|
+
var ke = (e) => O(e) && !Re(e) ? e : {
|
|
1018
1018
|
value: e,
|
|
1019
1019
|
message: ""
|
|
1020
|
-
},
|
|
1021
|
-
const { ref: c, refs:
|
|
1022
|
-
if (!
|
|
1020
|
+
}, Pt = async (e, t, s, r, i, n) => {
|
|
1021
|
+
const { ref: c, refs: o, required: h, maxLength: y, minLength: d, min: g, max: f, pattern: x, validate: _, name: N, valueAsNumber: q, mount: ye } = e._f, S = v(s, N);
|
|
1022
|
+
if (!ye || t.has(N))
|
|
1023
1023
|
return {};
|
|
1024
|
-
const W =
|
|
1024
|
+
const W = o ? o[0] : c, D = (A) => {
|
|
1025
1025
|
i && W.reportValidity && (W.setCustomValidity(de(A) ? "" : A || ""), W.reportValidity());
|
|
1026
|
-
}, L = {}, G =
|
|
1026
|
+
}, L = {}, G = ot(c), ee = Ve(c), ve = G || ee, B = (q || it(c)) && R(c.value) && R(S) || Oe(c) && c.value === "" || S === "" || Array.isArray(S) && !S.length, oe = lr.bind(null, N, r, L), re = (A, E, I, H = he.maxLength, K = he.minLength) => {
|
|
1027
1027
|
const V = A ? E : I;
|
|
1028
|
-
L[
|
|
1028
|
+
L[N] = {
|
|
1029
1029
|
type: A ? H : K,
|
|
1030
1030
|
message: V,
|
|
1031
1031
|
ref: c,
|
|
1032
1032
|
...oe(A ? H : K, V)
|
|
1033
1033
|
};
|
|
1034
1034
|
};
|
|
1035
|
-
if (n ? !Array.isArray(
|
|
1036
|
-
const { value: A, message: E } =
|
|
1037
|
-
if (A && (L[
|
|
1038
|
-
type:
|
|
1035
|
+
if (n ? !Array.isArray(S) || !S.length : h && (!ve && (B || z(S)) || de(S) && !S || ee && !ts(o).isValid || G && !rs(o).isValid)) {
|
|
1036
|
+
const { value: A, message: E } = Ie(h) ? { value: !!h, message: h } : ke(h);
|
|
1037
|
+
if (A && (L[N] = {
|
|
1038
|
+
type: he.required,
|
|
1039
1039
|
message: E,
|
|
1040
1040
|
ref: W,
|
|
1041
|
-
...oe(
|
|
1041
|
+
...oe(he.required, E)
|
|
1042
1042
|
}, !r))
|
|
1043
|
-
return
|
|
1043
|
+
return D(E), L;
|
|
1044
1044
|
}
|
|
1045
|
-
if (!B && (!z(g) || !z(
|
|
1045
|
+
if (!B && (!z(g) || !z(f))) {
|
|
1046
1046
|
let A, E;
|
|
1047
|
-
const I = ke(
|
|
1048
|
-
if (!z(
|
|
1049
|
-
const K = c.valueAsNumber ||
|
|
1047
|
+
const I = ke(f), H = ke(g);
|
|
1048
|
+
if (!z(S) && !isNaN(S)) {
|
|
1049
|
+
const K = c.valueAsNumber || S && +S;
|
|
1050
1050
|
z(I.value) || (A = K > I.value), z(H.value) || (E = K < H.value);
|
|
1051
1051
|
} else {
|
|
1052
|
-
const K = c.valueAsDate || new Date(
|
|
1053
|
-
|
|
1052
|
+
const K = c.valueAsDate || new Date(S), V = (xe) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + xe), ne = c.type == "time", ae = c.type == "week";
|
|
1053
|
+
fe(I.value) && S && (A = ne ? V(S) > V(I.value) : ae ? S > I.value : K > new Date(I.value)), fe(H.value) && S && (E = ne ? V(S) < V(H.value) : ae ? S < H.value : K < new Date(H.value));
|
|
1054
1054
|
}
|
|
1055
|
-
if ((A || E) && (re(!!A, I.message, H.message,
|
|
1056
|
-
return
|
|
1055
|
+
if ((A || E) && (re(!!A, I.message, H.message, he.max, he.min), !r))
|
|
1056
|
+
return D(L[N].message), L;
|
|
1057
1057
|
}
|
|
1058
|
-
if ((y ||
|
|
1059
|
-
const A = ke(y), E = ke(
|
|
1058
|
+
if ((y || d) && !B && (fe(S) || n && Array.isArray(S))) {
|
|
1059
|
+
const A = ke(y), E = ke(d), I = !z(A.value) && S.length > +A.value, H = !z(E.value) && S.length < +E.value;
|
|
1060
1060
|
if ((I || H) && (re(I, A.message, E.message), !r))
|
|
1061
|
-
return
|
|
1061
|
+
return D(L[N].message), L;
|
|
1062
1062
|
}
|
|
1063
|
-
if (x && !B &&
|
|
1063
|
+
if (x && !B && fe(S)) {
|
|
1064
1064
|
const { value: A, message: E } = ke(x);
|
|
1065
|
-
if (
|
|
1066
|
-
type:
|
|
1065
|
+
if (Re(A) && !S.match(A) && (L[N] = {
|
|
1066
|
+
type: he.pattern,
|
|
1067
1067
|
message: E,
|
|
1068
1068
|
ref: c,
|
|
1069
|
-
...oe(
|
|
1069
|
+
...oe(he.pattern, E)
|
|
1070
1070
|
}, !r))
|
|
1071
|
-
return
|
|
1071
|
+
return D(E), L;
|
|
1072
1072
|
}
|
|
1073
|
-
if (
|
|
1074
|
-
if (le(
|
|
1075
|
-
const A = await S
|
|
1076
|
-
if (E && (L[
|
|
1073
|
+
if (_) {
|
|
1074
|
+
if (le(_)) {
|
|
1075
|
+
const A = await _(S, s), E = Vt(A, W);
|
|
1076
|
+
if (E && (L[N] = {
|
|
1077
1077
|
...E,
|
|
1078
|
-
...oe(
|
|
1078
|
+
...oe(he.validate, E.message)
|
|
1079
1079
|
}, !r))
|
|
1080
|
-
return
|
|
1081
|
-
} else if (O(
|
|
1080
|
+
return D(E.message), L;
|
|
1081
|
+
} else if (O(_)) {
|
|
1082
1082
|
let A = {};
|
|
1083
|
-
for (const E in
|
|
1083
|
+
for (const E in _) {
|
|
1084
1084
|
if (!J(A) && !r)
|
|
1085
1085
|
break;
|
|
1086
|
-
const I =
|
|
1086
|
+
const I = Vt(await _[E](S, s), W, E);
|
|
1087
1087
|
I && (A = {
|
|
1088
1088
|
...I,
|
|
1089
1089
|
...oe(E, I.message)
|
|
1090
|
-
},
|
|
1090
|
+
}, D(I.message), r && (L[N] = A));
|
|
1091
1091
|
}
|
|
1092
|
-
if (!J(A) && (L[
|
|
1092
|
+
if (!J(A) && (L[N] = {
|
|
1093
1093
|
ref: W,
|
|
1094
1094
|
...A
|
|
1095
1095
|
}, !r))
|
|
1096
1096
|
return L;
|
|
1097
1097
|
}
|
|
1098
1098
|
}
|
|
1099
|
-
return
|
|
1099
|
+
return D(!0), L;
|
|
1100
1100
|
};
|
|
1101
|
-
const
|
|
1101
|
+
const xr = {
|
|
1102
1102
|
mode: ce.onSubmit,
|
|
1103
1103
|
reValidateMode: ce.onChange,
|
|
1104
1104
|
shouldFocusError: !0
|
|
1105
1105
|
};
|
|
1106
|
-
function
|
|
1106
|
+
function Cr(e = {}) {
|
|
1107
1107
|
let t = {
|
|
1108
|
-
...
|
|
1108
|
+
...xr,
|
|
1109
1109
|
...e
|
|
1110
1110
|
}, s = {
|
|
1111
1111
|
submitCount: 0,
|
|
@@ -1126,14 +1126,14 @@ function xr(e = {}) {
|
|
|
1126
1126
|
action: !1,
|
|
1127
1127
|
mount: !1,
|
|
1128
1128
|
watch: !1
|
|
1129
|
-
},
|
|
1129
|
+
}, o = {
|
|
1130
1130
|
mount: /* @__PURE__ */ new Set(),
|
|
1131
1131
|
disabled: /* @__PURE__ */ new Set(),
|
|
1132
1132
|
unMount: /* @__PURE__ */ new Set(),
|
|
1133
1133
|
array: /* @__PURE__ */ new Set(),
|
|
1134
1134
|
watch: /* @__PURE__ */ new Set()
|
|
1135
|
-
},
|
|
1136
|
-
const
|
|
1135
|
+
}, h, y = 0;
|
|
1136
|
+
const d = {
|
|
1137
1137
|
isDirty: !1,
|
|
1138
1138
|
dirtyFields: !1,
|
|
1139
1139
|
validatingFields: !1,
|
|
@@ -1143,286 +1143,286 @@ function xr(e = {}) {
|
|
|
1143
1143
|
errors: !1
|
|
1144
1144
|
};
|
|
1145
1145
|
let g = {
|
|
1146
|
-
...
|
|
1146
|
+
...d
|
|
1147
1147
|
};
|
|
1148
|
-
const
|
|
1148
|
+
const f = {
|
|
1149
1149
|
array: St(),
|
|
1150
1150
|
state: St()
|
|
1151
|
-
}, x = t.criteriaMode === ce.all,
|
|
1152
|
-
clearTimeout(y), y = setTimeout(
|
|
1153
|
-
},
|
|
1154
|
-
if (!t.disabled && (
|
|
1151
|
+
}, x = t.criteriaMode === ce.all, _ = (a) => (l) => {
|
|
1152
|
+
clearTimeout(y), y = setTimeout(a, l);
|
|
1153
|
+
}, N = async (a) => {
|
|
1154
|
+
if (!t.disabled && (d.isValid || g.isValid || a)) {
|
|
1155
1155
|
const l = t.resolver ? J((await ee()).errors) : await B(r, !0);
|
|
1156
|
-
l !== s.isValid &&
|
|
1156
|
+
l !== s.isValid && f.state.next({
|
|
1157
1157
|
isValid: l
|
|
1158
1158
|
});
|
|
1159
1159
|
}
|
|
1160
|
-
}, q = (
|
|
1161
|
-
!t.disabled && (
|
|
1160
|
+
}, q = (a, l) => {
|
|
1161
|
+
!t.disabled && (d.isValidating || d.validatingFields || g.isValidating || g.validatingFields) && ((a || Array.from(o.mount)).forEach((u) => {
|
|
1162
1162
|
u && (l ? M(s.validatingFields, u, l) : U(s.validatingFields, u));
|
|
1163
|
-
}),
|
|
1163
|
+
}), f.state.next({
|
|
1164
1164
|
validatingFields: s.validatingFields,
|
|
1165
1165
|
isValidating: !J(s.validatingFields)
|
|
1166
1166
|
}));
|
|
1167
|
-
},
|
|
1167
|
+
}, ye = (a, l = [], u, w, p = !0, b = !0) => {
|
|
1168
1168
|
if (w && u && !t.disabled) {
|
|
1169
|
-
if (c.action = !0, b && Array.isArray(v(r,
|
|
1170
|
-
const
|
|
1171
|
-
p && M(r,
|
|
1169
|
+
if (c.action = !0, b && Array.isArray(v(r, a))) {
|
|
1170
|
+
const C = u(v(r, a), w.argA, w.argB);
|
|
1171
|
+
p && M(r, a, C);
|
|
1172
1172
|
}
|
|
1173
|
-
if (b && Array.isArray(v(s.errors,
|
|
1174
|
-
const
|
|
1175
|
-
p && M(s.errors,
|
|
1173
|
+
if (b && Array.isArray(v(s.errors, a))) {
|
|
1174
|
+
const C = u(v(s.errors, a), w.argA, w.argB);
|
|
1175
|
+
p && M(s.errors, a, C), wr(s.errors, a);
|
|
1176
1176
|
}
|
|
1177
|
-
if ((
|
|
1178
|
-
const
|
|
1179
|
-
p && M(s.touchedFields,
|
|
1177
|
+
if ((d.touchedFields || g.touchedFields) && b && Array.isArray(v(s.touchedFields, a))) {
|
|
1178
|
+
const C = u(v(s.touchedFields, a), w.argA, w.argB);
|
|
1179
|
+
p && M(s.touchedFields, a, C);
|
|
1180
1180
|
}
|
|
1181
|
-
(
|
|
1182
|
-
name:
|
|
1183
|
-
isDirty: re(
|
|
1181
|
+
(d.dirtyFields || g.dirtyFields) && (s.dirtyFields = Ee(i, n)), f.state.next({
|
|
1182
|
+
name: a,
|
|
1183
|
+
isDirty: re(a, l),
|
|
1184
1184
|
dirtyFields: s.dirtyFields,
|
|
1185
1185
|
errors: s.errors,
|
|
1186
1186
|
isValid: s.isValid
|
|
1187
1187
|
});
|
|
1188
1188
|
} else
|
|
1189
|
-
M(n,
|
|
1190
|
-
},
|
|
1191
|
-
M(s.errors,
|
|
1189
|
+
M(n, a, l);
|
|
1190
|
+
}, S = (a, l) => {
|
|
1191
|
+
M(s.errors, a, l), f.state.next({
|
|
1192
1192
|
errors: s.errors
|
|
1193
1193
|
});
|
|
1194
|
-
}, W = (
|
|
1195
|
-
s.errors =
|
|
1194
|
+
}, W = (a) => {
|
|
1195
|
+
s.errors = a, f.state.next({
|
|
1196
1196
|
errors: s.errors,
|
|
1197
1197
|
isValid: !1
|
|
1198
1198
|
});
|
|
1199
|
-
},
|
|
1200
|
-
const p = v(r,
|
|
1199
|
+
}, D = (a, l, u, w) => {
|
|
1200
|
+
const p = v(r, a);
|
|
1201
1201
|
if (p) {
|
|
1202
|
-
const b = v(n,
|
|
1203
|
-
R(b) || w && w.defaultChecked || l ? M(n,
|
|
1202
|
+
const b = v(n, a, R(u) ? v(i, a) : u);
|
|
1203
|
+
R(b) || w && w.defaultChecked || l ? M(n, a, l ? b : $t(p._f)) : I(a, b), c.mount && N();
|
|
1204
1204
|
}
|
|
1205
|
-
}, L = (
|
|
1206
|
-
let b = !1,
|
|
1205
|
+
}, L = (a, l, u, w, p) => {
|
|
1206
|
+
let b = !1, C = !1;
|
|
1207
1207
|
const F = {
|
|
1208
|
-
name:
|
|
1208
|
+
name: a
|
|
1209
1209
|
};
|
|
1210
1210
|
if (!t.disabled) {
|
|
1211
1211
|
if (!u || w) {
|
|
1212
|
-
(
|
|
1213
|
-
const P =
|
|
1214
|
-
|
|
1212
|
+
(d.isDirty || g.isDirty) && (C = s.isDirty, s.isDirty = F.isDirty = re(), b = C !== F.isDirty);
|
|
1213
|
+
const P = be(v(i, a), l);
|
|
1214
|
+
C = !!v(s.dirtyFields, a), P ? U(s.dirtyFields, a) : M(s.dirtyFields, a, !0), F.dirtyFields = s.dirtyFields, b = b || (d.dirtyFields || g.dirtyFields) && C !== !P;
|
|
1215
1215
|
}
|
|
1216
1216
|
if (u) {
|
|
1217
|
-
const P = v(s.touchedFields,
|
|
1218
|
-
P || (M(s.touchedFields,
|
|
1217
|
+
const P = v(s.touchedFields, a);
|
|
1218
|
+
P || (M(s.touchedFields, a, u), F.touchedFields = s.touchedFields, b = b || (d.touchedFields || g.touchedFields) && P !== u);
|
|
1219
1219
|
}
|
|
1220
|
-
b && p &&
|
|
1220
|
+
b && p && f.state.next(F);
|
|
1221
1221
|
}
|
|
1222
1222
|
return b ? F : {};
|
|
1223
|
-
}, G = (
|
|
1224
|
-
const p = v(s.errors,
|
|
1225
|
-
if (t.delayError && u ? (
|
|
1226
|
-
const
|
|
1223
|
+
}, G = (a, l, u, w) => {
|
|
1224
|
+
const p = v(s.errors, a), b = (d.isValid || g.isValid) && de(l) && s.isValid !== l;
|
|
1225
|
+
if (t.delayError && u ? (h = _(() => S(a, u)), h(t.delayError)) : (clearTimeout(y), h = null, u ? M(s.errors, a, u) : U(s.errors, a)), (u ? !be(p, u) : p) || !J(w) || b) {
|
|
1226
|
+
const C = {
|
|
1227
1227
|
...w,
|
|
1228
1228
|
...b && de(l) ? { isValid: l } : {},
|
|
1229
1229
|
errors: s.errors,
|
|
1230
|
-
name:
|
|
1230
|
+
name: a
|
|
1231
1231
|
};
|
|
1232
1232
|
s = {
|
|
1233
1233
|
...s,
|
|
1234
|
-
...
|
|
1235
|
-
},
|
|
1234
|
+
...C
|
|
1235
|
+
}, f.state.next(C);
|
|
1236
1236
|
}
|
|
1237
|
-
}, ee = async (
|
|
1238
|
-
q(
|
|
1239
|
-
const l = await t.resolver(n, t.context,
|
|
1240
|
-
return q(
|
|
1241
|
-
}, ve = async (
|
|
1242
|
-
const { errors: l } = await ee(
|
|
1243
|
-
if (
|
|
1244
|
-
for (const u of
|
|
1237
|
+
}, ee = async (a) => {
|
|
1238
|
+
q(a, !0);
|
|
1239
|
+
const l = await t.resolver(n, t.context, mr(a || o.mount, r, t.criteriaMode, t.shouldUseNativeValidation));
|
|
1240
|
+
return q(a), l;
|
|
1241
|
+
}, ve = async (a) => {
|
|
1242
|
+
const { errors: l } = await ee(a);
|
|
1243
|
+
if (a)
|
|
1244
|
+
for (const u of a) {
|
|
1245
1245
|
const w = v(l, u);
|
|
1246
1246
|
w ? M(s.errors, u, w) : U(s.errors, u);
|
|
1247
1247
|
}
|
|
1248
1248
|
else
|
|
1249
1249
|
s.errors = l;
|
|
1250
1250
|
return l;
|
|
1251
|
-
}, B = async (
|
|
1251
|
+
}, B = async (a, l, u = {
|
|
1252
1252
|
valid: !0
|
|
1253
1253
|
}) => {
|
|
1254
|
-
for (const w in
|
|
1255
|
-
const p =
|
|
1254
|
+
for (const w in a) {
|
|
1255
|
+
const p = a[w];
|
|
1256
1256
|
if (p) {
|
|
1257
|
-
const { _f: b, ...
|
|
1257
|
+
const { _f: b, ...C } = p;
|
|
1258
1258
|
if (b) {
|
|
1259
|
-
const F =
|
|
1260
|
-
P &&
|
|
1261
|
-
const ie = await
|
|
1262
|
-
if (P &&
|
|
1259
|
+
const F = o.array.has(b.name), P = p._f && hr(p._f);
|
|
1260
|
+
P && d.validatingFields && q([w], !0);
|
|
1261
|
+
const ie = await Pt(p, o.disabled, n, x, t.shouldUseNativeValidation && !l, F);
|
|
1262
|
+
if (P && d.validatingFields && q([w]), ie[b.name] && (u.valid = !1, l))
|
|
1263
1263
|
break;
|
|
1264
|
-
!l && (v(ie, b.name) ? F ?
|
|
1264
|
+
!l && (v(ie, b.name) ? F ? vr(s.errors, ie, b.name) : M(s.errors, b.name, ie[b.name]) : U(s.errors, b.name));
|
|
1265
1265
|
}
|
|
1266
|
-
!J(
|
|
1266
|
+
!J(C) && await B(C, l, u);
|
|
1267
1267
|
}
|
|
1268
1268
|
}
|
|
1269
1269
|
return u.valid;
|
|
1270
1270
|
}, oe = () => {
|
|
1271
|
-
for (const
|
|
1272
|
-
const l = v(r,
|
|
1273
|
-
l && (l._f.refs ? l._f.refs.every((u) => !
|
|
1271
|
+
for (const a of o.unMount) {
|
|
1272
|
+
const l = v(r, a);
|
|
1273
|
+
l && (l._f.refs ? l._f.refs.every((u) => !Xe(u)) : !Xe(l._f.ref)) && Ke(a);
|
|
1274
1274
|
}
|
|
1275
|
-
|
|
1276
|
-
}, re = (
|
|
1277
|
-
...c.mount ? n : R(l) ? i :
|
|
1278
|
-
}, u, l), E = (
|
|
1279
|
-
const w = v(r,
|
|
1275
|
+
o.unMount = /* @__PURE__ */ new Set();
|
|
1276
|
+
}, re = (a, l) => !t.disabled && (a && l && M(n, a, l), !be(xe(), i)), A = (a, l, u) => cr(a, o, {
|
|
1277
|
+
...c.mount ? n : R(l) ? i : fe(a) ? { [a]: l } : l
|
|
1278
|
+
}, u, l), E = (a) => rt(v(c.mount ? n : i, a, t.shouldUnregister ? v(i, a, []) : [])), I = (a, l, u = {}) => {
|
|
1279
|
+
const w = v(r, a);
|
|
1280
1280
|
let p = l;
|
|
1281
1281
|
if (w) {
|
|
1282
1282
|
const b = w._f;
|
|
1283
|
-
b && (!b.disabled && M(n,
|
|
1284
|
-
(!
|
|
1285
|
-
}) : b.refs.forEach((
|
|
1286
|
-
name:
|
|
1283
|
+
b && (!b.disabled && M(n, a, ss(l, b)), p = Oe(b.ref) && z(l) ? "" : l, Xt(b.ref) ? [...b.ref.options].forEach((C) => C.selected = p.includes(C.value)) : b.refs ? Ve(b.ref) ? b.refs.forEach((C) => {
|
|
1284
|
+
(!C.defaultChecked || !C.disabled) && (Array.isArray(p) ? C.checked = !!p.find((F) => F === C.value) : C.checked = p === C.value || !!p);
|
|
1285
|
+
}) : b.refs.forEach((C) => C.checked = C.value === p) : it(b.ref) ? b.ref.value = "" : (b.ref.value = p, b.ref.type || f.state.next({
|
|
1286
|
+
name: a,
|
|
1287
1287
|
values: Q(n)
|
|
1288
1288
|
})));
|
|
1289
1289
|
}
|
|
1290
|
-
(u.shouldDirty || u.shouldTouch) && L(
|
|
1291
|
-
}, H = (
|
|
1290
|
+
(u.shouldDirty || u.shouldTouch) && L(a, p, u.shouldTouch, u.shouldDirty, !0), u.shouldValidate && ae(a);
|
|
1291
|
+
}, H = (a, l, u) => {
|
|
1292
1292
|
for (const w in l) {
|
|
1293
1293
|
if (!l.hasOwnProperty(w))
|
|
1294
1294
|
return;
|
|
1295
|
-
const p = l[w], b =
|
|
1296
|
-
(
|
|
1295
|
+
const p = l[w], b = a + "." + w, C = v(r, b);
|
|
1296
|
+
(o.array.has(a) || O(p) || C && !C._f) && !_e(p) ? H(b, p, u) : I(b, p, u);
|
|
1297
1297
|
}
|
|
1298
|
-
}, K = (
|
|
1299
|
-
const w = v(r,
|
|
1300
|
-
M(n,
|
|
1301
|
-
name:
|
|
1298
|
+
}, K = (a, l, u = {}) => {
|
|
1299
|
+
const w = v(r, a), p = o.array.has(a), b = Q(l);
|
|
1300
|
+
M(n, a, b), p ? (f.array.next({
|
|
1301
|
+
name: a,
|
|
1302
1302
|
values: Q(n)
|
|
1303
|
-
}), (
|
|
1304
|
-
name:
|
|
1303
|
+
}), (d.isDirty || d.dirtyFields || g.isDirty || g.dirtyFields) && u.shouldDirty && f.state.next({
|
|
1304
|
+
name: a,
|
|
1305
1305
|
dirtyFields: Ee(i, n),
|
|
1306
|
-
isDirty: re(
|
|
1307
|
-
})) : w && !w._f && !z(b) ? H(
|
|
1308
|
-
name: c.mount ?
|
|
1306
|
+
isDirty: re(a, b)
|
|
1307
|
+
})) : w && !w._f && !z(b) ? H(a, b, u) : I(a, b, u), Tt(a, o) && f.state.next({ ...s, name: a }), f.state.next({
|
|
1308
|
+
name: c.mount ? a : void 0,
|
|
1309
1309
|
values: Q(n)
|
|
1310
1310
|
});
|
|
1311
|
-
}, V = async (
|
|
1311
|
+
}, V = async (a) => {
|
|
1312
1312
|
c.mount = !0;
|
|
1313
|
-
const l =
|
|
1313
|
+
const l = a.target;
|
|
1314
1314
|
let u = l.name, w = !0;
|
|
1315
1315
|
const p = v(r, u), b = (P) => {
|
|
1316
|
-
w = Number.isNaN(P) ||
|
|
1317
|
-
},
|
|
1316
|
+
w = Number.isNaN(P) || _e(P) && isNaN(P.getTime()) || be(P, v(n, u, P));
|
|
1317
|
+
}, C = Ft(t.mode), F = Ft(t.reValidateMode);
|
|
1318
1318
|
if (p) {
|
|
1319
1319
|
let P, ie;
|
|
1320
|
-
const
|
|
1321
|
-
M(n, u,
|
|
1322
|
-
const
|
|
1323
|
-
if (!
|
|
1320
|
+
const Me = l.type ? $t(p._f) : tr(a), ge = a.type === Nt.BLUR || a.type === Nt.FOCUS_OUT, fs = !yr(p._f) && !t.resolver && !v(s.errors, u) && !p._f.deps || pr(ge, v(s.touchedFields, u), s.isSubmitted, F, C), Ge = Tt(u, o, ge);
|
|
1321
|
+
M(n, u, Me), ge ? (p._f.onBlur && p._f.onBlur(a), h && h(0)) : p._f.onChange && p._f.onChange(a);
|
|
1322
|
+
const Je = L(u, Me, ge), ms = !J(Je) || Ge;
|
|
1323
|
+
if (!ge && f.state.next({
|
|
1324
1324
|
name: u,
|
|
1325
|
-
type:
|
|
1325
|
+
type: a.type,
|
|
1326
1326
|
values: Q(n)
|
|
1327
|
-
}),
|
|
1328
|
-
return (
|
|
1329
|
-
if (!
|
|
1330
|
-
const { errors:
|
|
1331
|
-
if (b(
|
|
1332
|
-
const hs = Dt(s.errors, r, u),
|
|
1333
|
-
P =
|
|
1327
|
+
}), fs)
|
|
1328
|
+
return (d.isValid || g.isValid) && (t.mode === "onBlur" ? ge && N() : ge || N()), ms && f.state.next({ name: u, ...Ge ? {} : Je });
|
|
1329
|
+
if (!ge && Ge && f.state.next({ ...s }), t.resolver) {
|
|
1330
|
+
const { errors: bt } = await ee([u]);
|
|
1331
|
+
if (b(Me), w) {
|
|
1332
|
+
const hs = Dt(s.errors, r, u), pt = Dt(bt, r, hs.name || u);
|
|
1333
|
+
P = pt.error, u = pt.name, ie = J(bt);
|
|
1334
1334
|
}
|
|
1335
1335
|
} else
|
|
1336
|
-
q([u], !0), P = (await
|
|
1337
|
-
w && (p._f.deps && ae(p._f.deps), G(u, ie, P,
|
|
1336
|
+
q([u], !0), P = (await Pt(p, o.disabled, n, x, t.shouldUseNativeValidation))[u], q([u]), b(Me), w && (P ? ie = !1 : (d.isValid || g.isValid) && (ie = await B(r, !0)));
|
|
1337
|
+
w && (p._f.deps && ae(p._f.deps), G(u, ie, P, Je));
|
|
1338
1338
|
}
|
|
1339
|
-
}, ne = (
|
|
1340
|
-
if (v(s.errors, l) &&
|
|
1341
|
-
return
|
|
1342
|
-
}, ae = async (
|
|
1339
|
+
}, ne = (a, l) => {
|
|
1340
|
+
if (v(s.errors, l) && a.focus)
|
|
1341
|
+
return a.focus(), 1;
|
|
1342
|
+
}, ae = async (a, l = {}) => {
|
|
1343
1343
|
let u, w;
|
|
1344
|
-
const p = Fe(
|
|
1344
|
+
const p = Fe(a);
|
|
1345
1345
|
if (t.resolver) {
|
|
1346
|
-
const b = await ve(R(
|
|
1347
|
-
u = J(b), w =
|
|
1348
|
-
} else
|
|
1349
|
-
const
|
|
1350
|
-
return await B(
|
|
1351
|
-
}))).every(Boolean), !(!w && !s.isValid) &&
|
|
1352
|
-
return
|
|
1353
|
-
...!
|
|
1354
|
-
...t.resolver || !
|
|
1346
|
+
const b = await ve(R(a) ? a : p);
|
|
1347
|
+
u = J(b), w = a ? !p.some((C) => v(b, C)) : u;
|
|
1348
|
+
} else a ? (w = (await Promise.all(p.map(async (b) => {
|
|
1349
|
+
const C = v(r, b);
|
|
1350
|
+
return await B(C && C._f ? { [b]: C } : C);
|
|
1351
|
+
}))).every(Boolean), !(!w && !s.isValid) && N()) : w = u = await B(r);
|
|
1352
|
+
return f.state.next({
|
|
1353
|
+
...!fe(a) || (d.isValid || g.isValid) && u !== s.isValid ? {} : { name: a },
|
|
1354
|
+
...t.resolver || !a ? { isValid: u } : {},
|
|
1355
1355
|
errors: s.errors
|
|
1356
|
-
}), l.shouldFocus && !w && Le(r, ne,
|
|
1357
|
-
}, xe = (
|
|
1356
|
+
}), l.shouldFocus && !w && Le(r, ne, a ? p : o.mount), w;
|
|
1357
|
+
}, xe = (a) => {
|
|
1358
1358
|
const l = {
|
|
1359
1359
|
...c.mount ? n : i
|
|
1360
1360
|
};
|
|
1361
|
-
return R(
|
|
1362
|
-
},
|
|
1363
|
-
invalid: !!v((l || s).errors,
|
|
1364
|
-
isDirty: !!v((l || s).dirtyFields,
|
|
1365
|
-
error: v((l || s).errors,
|
|
1366
|
-
isValidating: !!v(s.validatingFields,
|
|
1367
|
-
isTouched: !!v((l || s).touchedFields,
|
|
1368
|
-
}),
|
|
1369
|
-
|
|
1370
|
-
errors:
|
|
1361
|
+
return R(a) ? l : fe(a) ? v(l, a) : a.map((u) => v(l, u));
|
|
1362
|
+
}, Pe = (a, l) => ({
|
|
1363
|
+
invalid: !!v((l || s).errors, a),
|
|
1364
|
+
isDirty: !!v((l || s).dirtyFields, a),
|
|
1365
|
+
error: v((l || s).errors, a),
|
|
1366
|
+
isValidating: !!v(s.validatingFields, a),
|
|
1367
|
+
isTouched: !!v((l || s).touchedFields, a)
|
|
1368
|
+
}), Ce = (a) => {
|
|
1369
|
+
a && Fe(a).forEach((l) => U(s.errors, l)), f.state.next({
|
|
1370
|
+
errors: a ? s.errors : {}
|
|
1371
1371
|
});
|
|
1372
|
-
},
|
|
1373
|
-
const w = (v(r,
|
|
1374
|
-
M(s.errors,
|
|
1372
|
+
}, ut = (a, l, u) => {
|
|
1373
|
+
const w = (v(r, a, { _f: {} })._f || {}).ref, p = v(s.errors, a) || {}, { ref: b, message: C, type: F, ...P } = p;
|
|
1374
|
+
M(s.errors, a, {
|
|
1375
1375
|
...P,
|
|
1376
1376
|
...l,
|
|
1377
1377
|
ref: w
|
|
1378
|
-
}),
|
|
1379
|
-
name:
|
|
1378
|
+
}), f.state.next({
|
|
1379
|
+
name: a,
|
|
1380
1380
|
errors: s.errors,
|
|
1381
1381
|
isValid: !1
|
|
1382
1382
|
}), u && u.shouldFocus && w && w.focus && w.focus();
|
|
1383
|
-
},
|
|
1384
|
-
next: (u) => "values" in u &&
|
|
1385
|
-
}) : A(
|
|
1383
|
+
}, os = (a, l) => le(a) ? f.state.subscribe({
|
|
1384
|
+
next: (u) => "values" in u && a(A(void 0, l), u)
|
|
1385
|
+
}) : A(a, l, !0), dt = (a) => f.state.subscribe({
|
|
1386
1386
|
next: (l) => {
|
|
1387
|
-
|
|
1387
|
+
br(a.name, l.name, a.exact) && gr(l, a.formState || d, ds, a.reRenderRoot) && a.callback({
|
|
1388
1388
|
values: { ...n },
|
|
1389
1389
|
...s,
|
|
1390
1390
|
...l,
|
|
1391
1391
|
defaultValues: i
|
|
1392
1392
|
});
|
|
1393
1393
|
}
|
|
1394
|
-
}).unsubscribe,
|
|
1394
|
+
}).unsubscribe, as = (a) => (c.mount = !0, g = {
|
|
1395
1395
|
...g,
|
|
1396
|
-
...
|
|
1397
|
-
},
|
|
1398
|
-
...
|
|
1396
|
+
...a.formState
|
|
1397
|
+
}, dt({
|
|
1398
|
+
...a,
|
|
1399
1399
|
formState: g
|
|
1400
|
-
})),
|
|
1401
|
-
for (const u of
|
|
1402
|
-
|
|
1403
|
-
|
|
1400
|
+
})), Ke = (a, l = {}) => {
|
|
1401
|
+
for (const u of a ? Fe(a) : o.mount)
|
|
1402
|
+
o.mount.delete(u), o.array.delete(u), l.keepValue || (U(r, u), U(n, u)), !l.keepError && U(s.errors, u), !l.keepDirty && U(s.dirtyFields, u), !l.keepTouched && U(s.touchedFields, u), !l.keepIsValidating && U(s.validatingFields, u), !t.shouldUnregister && !l.keepDefaultValue && U(i, u);
|
|
1403
|
+
f.state.next({
|
|
1404
1404
|
values: Q(n)
|
|
1405
|
-
}),
|
|
1405
|
+
}), f.state.next({
|
|
1406
1406
|
...s,
|
|
1407
1407
|
...l.keepDirty ? { isDirty: re() } : {}
|
|
1408
|
-
}), !l.keepIsValid &&
|
|
1409
|
-
},
|
|
1410
|
-
(de(
|
|
1411
|
-
},
|
|
1412
|
-
let u = v(r,
|
|
1408
|
+
}), !l.keepIsValid && N();
|
|
1409
|
+
}, ft = ({ disabled: a, name: l }) => {
|
|
1410
|
+
(de(a) && c.mount || a || o.disabled.has(l)) && (a ? o.disabled.add(l) : o.disabled.delete(l));
|
|
1411
|
+
}, We = (a, l = {}) => {
|
|
1412
|
+
let u = v(r, a);
|
|
1413
1413
|
const w = de(l.disabled) || de(t.disabled);
|
|
1414
|
-
return M(r,
|
|
1414
|
+
return M(r, a, {
|
|
1415
1415
|
...u || {},
|
|
1416
1416
|
_f: {
|
|
1417
|
-
...u && u._f ? u._f : { ref: { name:
|
|
1418
|
-
name:
|
|
1417
|
+
...u && u._f ? u._f : { ref: { name: a } },
|
|
1418
|
+
name: a,
|
|
1419
1419
|
mount: !0,
|
|
1420
1420
|
...l
|
|
1421
1421
|
}
|
|
1422
|
-
}),
|
|
1422
|
+
}), o.mount.add(a), u ? ft({
|
|
1423
1423
|
disabled: de(l.disabled) ? l.disabled : t.disabled,
|
|
1424
|
-
name:
|
|
1425
|
-
}) :
|
|
1424
|
+
name: a
|
|
1425
|
+
}) : D(a, !0, l.value), {
|
|
1426
1426
|
...w ? { disabled: l.disabled || t.disabled } : {},
|
|
1427
1427
|
...t.progressive ? {
|
|
1428
1428
|
required: !!l.required,
|
|
@@ -1432,65 +1432,65 @@ function xr(e = {}) {
|
|
|
1432
1432
|
maxLength: $e(l.maxLength),
|
|
1433
1433
|
pattern: $e(l.pattern)
|
|
1434
1434
|
} : {},
|
|
1435
|
-
name:
|
|
1435
|
+
name: a,
|
|
1436
1436
|
onChange: V,
|
|
1437
1437
|
onBlur: V,
|
|
1438
1438
|
ref: (p) => {
|
|
1439
1439
|
if (p) {
|
|
1440
|
-
|
|
1441
|
-
const b = R(p.value) && p.querySelectorAll && p.querySelectorAll("input,select,textarea")[0] || p,
|
|
1442
|
-
if (
|
|
1440
|
+
We(a, l), u = v(r, a);
|
|
1441
|
+
const b = R(p.value) && p.querySelectorAll && p.querySelectorAll("input,select,textarea")[0] || p, C = ur(b), F = u._f.refs || [];
|
|
1442
|
+
if (C ? F.find((P) => P === b) : b === u._f.ref)
|
|
1443
1443
|
return;
|
|
1444
|
-
M(r,
|
|
1444
|
+
M(r, a, {
|
|
1445
1445
|
_f: {
|
|
1446
1446
|
...u._f,
|
|
1447
|
-
...
|
|
1447
|
+
...C ? {
|
|
1448
1448
|
refs: [
|
|
1449
|
-
...F.filter(
|
|
1449
|
+
...F.filter(Xe),
|
|
1450
1450
|
b,
|
|
1451
|
-
...Array.isArray(v(i,
|
|
1451
|
+
...Array.isArray(v(i, a)) ? [{}] : []
|
|
1452
1452
|
],
|
|
1453
|
-
ref: { type: b.type, name:
|
|
1453
|
+
ref: { type: b.type, name: a }
|
|
1454
1454
|
} : { ref: b }
|
|
1455
1455
|
}
|
|
1456
|
-
}),
|
|
1456
|
+
}), D(a, !1, void 0, b);
|
|
1457
1457
|
} else
|
|
1458
|
-
u = v(r,
|
|
1458
|
+
u = v(r, a, {}), u._f && (u._f.mount = !1), (t.shouldUnregister || l.shouldUnregister) && !(rr(o.array, a) && c.action) && o.unMount.add(a);
|
|
1459
1459
|
}
|
|
1460
1460
|
};
|
|
1461
|
-
},
|
|
1462
|
-
de(
|
|
1461
|
+
}, ze = () => t.shouldFocusError && Le(r, ne, o.mount), cs = (a) => {
|
|
1462
|
+
de(a) && (f.state.next({ disabled: a }), Le(r, (l, u) => {
|
|
1463
1463
|
const w = v(r, u);
|
|
1464
|
-
w && (l.disabled = w._f.disabled ||
|
|
1465
|
-
p.disabled = w._f.disabled ||
|
|
1464
|
+
w && (l.disabled = w._f.disabled || a, Array.isArray(w._f.refs) && w._f.refs.forEach((p) => {
|
|
1465
|
+
p.disabled = w._f.disabled || a;
|
|
1466
1466
|
}));
|
|
1467
1467
|
}, 0, !1));
|
|
1468
|
-
},
|
|
1468
|
+
}, mt = (a, l) => async (u) => {
|
|
1469
1469
|
let w;
|
|
1470
1470
|
u && (u.preventDefault && u.preventDefault(), u.persist && u.persist());
|
|
1471
1471
|
let p = Q(n);
|
|
1472
|
-
if (
|
|
1472
|
+
if (f.state.next({
|
|
1473
1473
|
isSubmitting: !0
|
|
1474
1474
|
}), t.resolver) {
|
|
1475
|
-
const { errors: b, values:
|
|
1476
|
-
s.errors = b, p = Q(
|
|
1475
|
+
const { errors: b, values: C } = await ee();
|
|
1476
|
+
s.errors = b, p = Q(C);
|
|
1477
1477
|
} else
|
|
1478
1478
|
await B(r);
|
|
1479
|
-
if (
|
|
1480
|
-
for (const b of
|
|
1479
|
+
if (o.disabled.size)
|
|
1480
|
+
for (const b of o.disabled)
|
|
1481
1481
|
U(p, b);
|
|
1482
1482
|
if (U(s.errors, "root"), J(s.errors)) {
|
|
1483
|
-
|
|
1483
|
+
f.state.next({
|
|
1484
1484
|
errors: {}
|
|
1485
1485
|
});
|
|
1486
1486
|
try {
|
|
1487
|
-
await
|
|
1487
|
+
await a(p, u);
|
|
1488
1488
|
} catch (b) {
|
|
1489
1489
|
w = b;
|
|
1490
1490
|
}
|
|
1491
1491
|
} else
|
|
1492
|
-
l && await l({ ...s.errors }, u),
|
|
1493
|
-
if (
|
|
1492
|
+
l && await l({ ...s.errors }, u), ze(), setTimeout(ze);
|
|
1493
|
+
if (f.state.next({
|
|
1494
1494
|
isSubmitted: !0,
|
|
1495
1495
|
isSubmitting: !1,
|
|
1496
1496
|
isSubmitSuccessful: J(s.errors) && !w,
|
|
@@ -1498,25 +1498,25 @@ function xr(e = {}) {
|
|
|
1498
1498
|
errors: s.errors
|
|
1499
1499
|
}), w)
|
|
1500
1500
|
throw w;
|
|
1501
|
-
},
|
|
1502
|
-
v(r,
|
|
1503
|
-
}, ht = (
|
|
1504
|
-
const u =
|
|
1501
|
+
}, ls = (a, l = {}) => {
|
|
1502
|
+
v(r, a) && (R(l.defaultValue) ? K(a, Q(v(i, a))) : (K(a, l.defaultValue), M(i, a, Q(l.defaultValue))), l.keepTouched || U(s.touchedFields, a), l.keepDirty || (U(s.dirtyFields, a), s.isDirty = l.defaultValue ? re(a, Q(v(i, a))) : re()), l.keepError || (U(s.errors, a), d.isValid && N()), f.state.next({ ...s }));
|
|
1503
|
+
}, ht = (a, l = {}) => {
|
|
1504
|
+
const u = a ? Q(a) : i, w = Q(u), p = J(a), b = p ? i : w;
|
|
1505
1505
|
if (l.keepDefaultValues || (i = u), !l.keepValues) {
|
|
1506
1506
|
if (l.keepDirtyValues) {
|
|
1507
|
-
const
|
|
1508
|
-
...
|
|
1507
|
+
const C = /* @__PURE__ */ new Set([
|
|
1508
|
+
...o.mount,
|
|
1509
1509
|
...Object.keys(Ee(i, n))
|
|
1510
1510
|
]);
|
|
1511
|
-
for (const F of Array.from(
|
|
1511
|
+
for (const F of Array.from(C))
|
|
1512
1512
|
v(s.dirtyFields, F) ? M(b, F, v(n, F)) : K(F, v(b, F));
|
|
1513
1513
|
} else {
|
|
1514
|
-
if (
|
|
1515
|
-
for (const
|
|
1516
|
-
const F = v(r,
|
|
1514
|
+
if (st && R(a))
|
|
1515
|
+
for (const C of o.mount) {
|
|
1516
|
+
const F = v(r, C);
|
|
1517
1517
|
if (F && F._f) {
|
|
1518
1518
|
const P = Array.isArray(F._f.refs) ? F._f.refs[0] : F._f.ref;
|
|
1519
|
-
if (
|
|
1519
|
+
if (Oe(P)) {
|
|
1520
1520
|
const ie = P.closest("form");
|
|
1521
1521
|
if (ie) {
|
|
1522
1522
|
ie.reset();
|
|
@@ -1526,73 +1526,73 @@ function xr(e = {}) {
|
|
|
1526
1526
|
}
|
|
1527
1527
|
}
|
|
1528
1528
|
if (l.keepFieldsRef)
|
|
1529
|
-
for (const
|
|
1530
|
-
K(
|
|
1529
|
+
for (const C of o.mount)
|
|
1530
|
+
K(C, v(b, C));
|
|
1531
1531
|
else
|
|
1532
1532
|
r = {};
|
|
1533
1533
|
}
|
|
1534
|
-
n = t.shouldUnregister ? l.keepDefaultValues ? Q(i) : {} : Q(b),
|
|
1534
|
+
n = t.shouldUnregister ? l.keepDefaultValues ? Q(i) : {} : Q(b), f.array.next({
|
|
1535
1535
|
values: { ...b }
|
|
1536
|
-
}),
|
|
1536
|
+
}), f.state.next({
|
|
1537
1537
|
values: { ...b }
|
|
1538
1538
|
});
|
|
1539
1539
|
}
|
|
1540
|
-
|
|
1541
|
-
mount: l.keepDirtyValues ?
|
|
1540
|
+
o = {
|
|
1541
|
+
mount: l.keepDirtyValues ? o.mount : /* @__PURE__ */ new Set(),
|
|
1542
1542
|
unMount: /* @__PURE__ */ new Set(),
|
|
1543
1543
|
array: /* @__PURE__ */ new Set(),
|
|
1544
1544
|
disabled: /* @__PURE__ */ new Set(),
|
|
1545
1545
|
watch: /* @__PURE__ */ new Set(),
|
|
1546
1546
|
watchAll: !1,
|
|
1547
1547
|
focus: ""
|
|
1548
|
-
}, c.mount = !
|
|
1548
|
+
}, c.mount = !d.isValid || !!l.keepIsValid || !!l.keepDirtyValues, c.watch = !!t.shouldUnregister, f.state.next({
|
|
1549
1549
|
submitCount: l.keepSubmitCount ? s.submitCount : 0,
|
|
1550
|
-
isDirty: p ? !1 : l.keepDirty ? s.isDirty : !!(l.keepDefaultValues && !
|
|
1550
|
+
isDirty: p ? !1 : l.keepDirty ? s.isDirty : !!(l.keepDefaultValues && !be(a, i)),
|
|
1551
1551
|
isSubmitted: l.keepIsSubmitted ? s.isSubmitted : !1,
|
|
1552
|
-
dirtyFields: p ? {} : l.keepDirtyValues ? l.keepDefaultValues && n ? Ee(i, n) : s.dirtyFields : l.keepDefaultValues &&
|
|
1552
|
+
dirtyFields: p ? {} : l.keepDirtyValues ? l.keepDefaultValues && n ? Ee(i, n) : s.dirtyFields : l.keepDefaultValues && a ? Ee(i, a) : l.keepDirty ? s.dirtyFields : {},
|
|
1553
1553
|
touchedFields: l.keepTouched ? s.touchedFields : {},
|
|
1554
1554
|
errors: l.keepErrors ? s.errors : {},
|
|
1555
1555
|
isSubmitSuccessful: l.keepIsSubmitSuccessful ? s.isSubmitSuccessful : !1,
|
|
1556
1556
|
isSubmitting: !1
|
|
1557
1557
|
});
|
|
1558
|
-
},
|
|
1559
|
-
const u = v(r,
|
|
1558
|
+
}, yt = (a, l) => ht(le(a) ? a(n) : a, l), us = (a, l = {}) => {
|
|
1559
|
+
const u = v(r, a), w = u && u._f;
|
|
1560
1560
|
if (w) {
|
|
1561
1561
|
const p = w.refs ? w.refs[0] : w.ref;
|
|
1562
1562
|
p.focus && (p.focus(), l.shouldSelect && le(p.select) && p.select());
|
|
1563
1563
|
}
|
|
1564
|
-
},
|
|
1564
|
+
}, ds = (a) => {
|
|
1565
1565
|
s = {
|
|
1566
1566
|
...s,
|
|
1567
|
-
...
|
|
1567
|
+
...a
|
|
1568
1568
|
};
|
|
1569
|
-
},
|
|
1569
|
+
}, gt = {
|
|
1570
1570
|
control: {
|
|
1571
|
-
register:
|
|
1572
|
-
unregister:
|
|
1573
|
-
getFieldState:
|
|
1574
|
-
handleSubmit:
|
|
1575
|
-
setError:
|
|
1576
|
-
_subscribe:
|
|
1571
|
+
register: We,
|
|
1572
|
+
unregister: Ke,
|
|
1573
|
+
getFieldState: Pe,
|
|
1574
|
+
handleSubmit: mt,
|
|
1575
|
+
setError: ut,
|
|
1576
|
+
_subscribe: dt,
|
|
1577
1577
|
_runSchema: ee,
|
|
1578
|
-
_focusError:
|
|
1578
|
+
_focusError: ze,
|
|
1579
1579
|
_getWatch: A,
|
|
1580
1580
|
_getDirty: re,
|
|
1581
|
-
_setValid:
|
|
1582
|
-
_setFieldArray:
|
|
1583
|
-
_setDisabledField:
|
|
1581
|
+
_setValid: N,
|
|
1582
|
+
_setFieldArray: ye,
|
|
1583
|
+
_setDisabledField: ft,
|
|
1584
1584
|
_setErrors: W,
|
|
1585
1585
|
_getFieldArray: E,
|
|
1586
1586
|
_reset: ht,
|
|
1587
|
-
_resetDefaultValues: () => le(t.defaultValues) && t.defaultValues().then((
|
|
1588
|
-
|
|
1587
|
+
_resetDefaultValues: () => le(t.defaultValues) && t.defaultValues().then((a) => {
|
|
1588
|
+
yt(a, t.resetOptions), f.state.next({
|
|
1589
1589
|
isLoading: !1
|
|
1590
1590
|
});
|
|
1591
1591
|
}),
|
|
1592
1592
|
_removeUnmounted: oe,
|
|
1593
|
-
_disableForm:
|
|
1594
|
-
_subjects:
|
|
1595
|
-
_proxyFormState:
|
|
1593
|
+
_disableForm: cs,
|
|
1594
|
+
_subjects: f,
|
|
1595
|
+
_proxyFormState: d,
|
|
1596
1596
|
get _fields() {
|
|
1597
1597
|
return r;
|
|
1598
1598
|
},
|
|
@@ -1602,17 +1602,17 @@ function xr(e = {}) {
|
|
|
1602
1602
|
get _state() {
|
|
1603
1603
|
return c;
|
|
1604
1604
|
},
|
|
1605
|
-
set _state(
|
|
1606
|
-
c =
|
|
1605
|
+
set _state(a) {
|
|
1606
|
+
c = a;
|
|
1607
1607
|
},
|
|
1608
1608
|
get _defaultValues() {
|
|
1609
1609
|
return i;
|
|
1610
1610
|
},
|
|
1611
1611
|
get _names() {
|
|
1612
|
-
return
|
|
1612
|
+
return o;
|
|
1613
1613
|
},
|
|
1614
|
-
set _names(
|
|
1615
|
-
|
|
1614
|
+
set _names(a) {
|
|
1615
|
+
o = a;
|
|
1616
1616
|
},
|
|
1617
1617
|
get _formState() {
|
|
1618
1618
|
return s;
|
|
@@ -1620,34 +1620,34 @@ function xr(e = {}) {
|
|
|
1620
1620
|
get _options() {
|
|
1621
1621
|
return t;
|
|
1622
1622
|
},
|
|
1623
|
-
set _options(
|
|
1623
|
+
set _options(a) {
|
|
1624
1624
|
t = {
|
|
1625
1625
|
...t,
|
|
1626
|
-
...
|
|
1626
|
+
...a
|
|
1627
1627
|
};
|
|
1628
1628
|
}
|
|
1629
1629
|
},
|
|
1630
|
-
subscribe:
|
|
1630
|
+
subscribe: as,
|
|
1631
1631
|
trigger: ae,
|
|
1632
|
-
register:
|
|
1633
|
-
handleSubmit:
|
|
1634
|
-
watch:
|
|
1632
|
+
register: We,
|
|
1633
|
+
handleSubmit: mt,
|
|
1634
|
+
watch: os,
|
|
1635
1635
|
setValue: K,
|
|
1636
1636
|
getValues: xe,
|
|
1637
|
-
reset:
|
|
1638
|
-
resetField:
|
|
1639
|
-
clearErrors:
|
|
1640
|
-
unregister:
|
|
1641
|
-
setError:
|
|
1642
|
-
setFocus:
|
|
1643
|
-
getFieldState:
|
|
1637
|
+
reset: yt,
|
|
1638
|
+
resetField: ls,
|
|
1639
|
+
clearErrors: Ce,
|
|
1640
|
+
unregister: Ke,
|
|
1641
|
+
setError: ut,
|
|
1642
|
+
setFocus: us,
|
|
1643
|
+
getFieldState: Pe
|
|
1644
1644
|
};
|
|
1645
1645
|
return {
|
|
1646
|
-
...
|
|
1647
|
-
formControl:
|
|
1646
|
+
...gt,
|
|
1647
|
+
formControl: gt
|
|
1648
1648
|
};
|
|
1649
1649
|
}
|
|
1650
|
-
function
|
|
1650
|
+
function ns(e = {}) {
|
|
1651
1651
|
const t = te.useRef(void 0), s = te.useRef(void 0), [r, i] = te.useState({
|
|
1652
1652
|
isDirty: !1,
|
|
1653
1653
|
isValidating: !1,
|
|
@@ -1672,21 +1672,21 @@ function rs(e = {}) {
|
|
|
1672
1672
|
formState: r
|
|
1673
1673
|
}, e.defaultValues && !le(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
|
|
1674
1674
|
else {
|
|
1675
|
-
const { formControl: c, ...
|
|
1675
|
+
const { formControl: c, ...o } = Cr(e);
|
|
1676
1676
|
t.current = {
|
|
1677
|
-
...
|
|
1677
|
+
...o,
|
|
1678
1678
|
formState: r
|
|
1679
1679
|
};
|
|
1680
1680
|
}
|
|
1681
1681
|
const n = t.current.control;
|
|
1682
|
-
return n._options = e,
|
|
1682
|
+
return n._options = e, ar(() => {
|
|
1683
1683
|
const c = n._subscribe({
|
|
1684
1684
|
formState: n._proxyFormState,
|
|
1685
1685
|
callback: () => i({ ...n._formState }),
|
|
1686
1686
|
reRenderRoot: !0
|
|
1687
1687
|
});
|
|
1688
|
-
return i((
|
|
1689
|
-
...
|
|
1688
|
+
return i((o) => ({
|
|
1689
|
+
...o,
|
|
1690
1690
|
isReady: !0
|
|
1691
1691
|
})), n._formState.isReady = !0, c;
|
|
1692
1692
|
}, [n]), te.useEffect(() => n._disableForm(e.disabled), [n, e.disabled]), te.useEffect(() => {
|
|
@@ -1705,44 +1705,44 @@ function rs(e = {}) {
|
|
|
1705
1705
|
});
|
|
1706
1706
|
}
|
|
1707
1707
|
}, [n, r.isDirty]), te.useEffect(() => {
|
|
1708
|
-
e.values && !
|
|
1708
|
+
e.values && !be(e.values, s.current) ? (n._reset(e.values, {
|
|
1709
1709
|
keepFieldsRef: !0,
|
|
1710
1710
|
...n._options.resetOptions
|
|
1711
1711
|
}), s.current = e.values, i((c) => ({ ...c }))) : n._resetDefaultValues();
|
|
1712
1712
|
}, [n, e.values]), te.useEffect(() => {
|
|
1713
1713
|
n._state.mount || (n._setValid(), n._state.mount = !0), n._state.watch && (n._state.watch = !1, n._subjects.state.next({ ...n._formState })), n._removeUnmounted();
|
|
1714
|
-
}), t.current.formState =
|
|
1714
|
+
}), t.current.formState = or(r, n), t.current;
|
|
1715
1715
|
}
|
|
1716
1716
|
const _r = (e) => {
|
|
1717
|
-
const { t } =
|
|
1717
|
+
const { t } = T(), { showStackNotifications: s, showSuccessNotification: r } = Se(), {
|
|
1718
1718
|
defaultValues: i,
|
|
1719
1719
|
mutationFn: n,
|
|
1720
1720
|
formToDto: c,
|
|
1721
|
-
onError:
|
|
1722
|
-
onSuccess:
|
|
1721
|
+
onError: o,
|
|
1722
|
+
onSuccess: h,
|
|
1723
1723
|
queryKey: y,
|
|
1724
|
-
onSuccessMessage:
|
|
1725
|
-
} = e, { control: g, handleSubmit:
|
|
1724
|
+
onSuccessMessage: d
|
|
1725
|
+
} = e, { control: g, handleSubmit: f, reset: x, setError: _, getValues: N, setValue: q } = ns({
|
|
1726
1726
|
defaultValues: i
|
|
1727
|
-
}),
|
|
1728
|
-
(
|
|
1729
|
-
const L =
|
|
1727
|
+
}), ye = $(
|
|
1728
|
+
(D) => {
|
|
1729
|
+
const L = D == null ? void 0 : D.errors, G = [];
|
|
1730
1730
|
return L && L.forEach(([ee, ve]) => {
|
|
1731
1731
|
const B = document.querySelector(`[name="${ee}"]`);
|
|
1732
1732
|
(B instanceof HTMLInputElement || B instanceof HTMLTextAreaElement || B instanceof HTMLSelectElement) && (B.focus(), B.classList.add("error"), G.push(t(`_entities:${y}.${ee}.${ve}`)));
|
|
1733
1733
|
}), G;
|
|
1734
1734
|
},
|
|
1735
1735
|
[t, y]
|
|
1736
|
-
),
|
|
1736
|
+
), S = $(() => {
|
|
1737
1737
|
document.querySelectorAll("input, textarea, select").forEach((L) => {
|
|
1738
1738
|
L.classList.remove("error");
|
|
1739
1739
|
});
|
|
1740
|
-
}, []), W =
|
|
1740
|
+
}, []), W = je(
|
|
1741
1741
|
{
|
|
1742
1742
|
mutationFn: n,
|
|
1743
|
-
onError: (
|
|
1744
|
-
if (console.error(
|
|
1745
|
-
const L =
|
|
1743
|
+
onError: (D) => {
|
|
1744
|
+
if (console.error(D), D.errors) {
|
|
1745
|
+
const L = ye(D);
|
|
1746
1746
|
s(
|
|
1747
1747
|
L.map(
|
|
1748
1748
|
(G) => ({
|
|
@@ -1752,38 +1752,38 @@ const _r = (e) => {
|
|
|
1752
1752
|
)
|
|
1753
1753
|
);
|
|
1754
1754
|
}
|
|
1755
|
-
|
|
1755
|
+
o && o(D);
|
|
1756
1756
|
},
|
|
1757
|
-
onSuccess: async (
|
|
1758
|
-
|
|
1759
|
-
message:
|
|
1757
|
+
onSuccess: async (D) => {
|
|
1758
|
+
Ne && await Ne.invalidateQueries({ queryKey: y }), h && h(D), d && r({
|
|
1759
|
+
message: d
|
|
1760
1760
|
});
|
|
1761
1761
|
}
|
|
1762
1762
|
}
|
|
1763
1763
|
);
|
|
1764
1764
|
return {
|
|
1765
1765
|
control: g,
|
|
1766
|
-
getValues:
|
|
1766
|
+
getValues: N,
|
|
1767
1767
|
setValue: q,
|
|
1768
|
-
handleSubmit:
|
|
1769
|
-
onSubmit: (
|
|
1770
|
-
c ? c(
|
|
1768
|
+
handleSubmit: f,
|
|
1769
|
+
onSubmit: (D) => W.mutate(
|
|
1770
|
+
c ? c(D) : D
|
|
1771
1771
|
),
|
|
1772
1772
|
reset: x,
|
|
1773
|
-
setError:
|
|
1774
|
-
parseFormError:
|
|
1775
|
-
releaseFormError:
|
|
1773
|
+
setError: _,
|
|
1774
|
+
parseFormError: ye,
|
|
1775
|
+
releaseFormError: S,
|
|
1776
1776
|
isLoading: W.isPending
|
|
1777
1777
|
};
|
|
1778
|
-
},
|
|
1779
|
-
const { t } =
|
|
1778
|
+
}, Nr = (e) => {
|
|
1779
|
+
const { t } = T(), { onClick: s, hidden: r = !1, disabled: i = !1 } = e;
|
|
1780
1780
|
return {
|
|
1781
1781
|
action: $(
|
|
1782
1782
|
(c) => ({
|
|
1783
1783
|
id: we.Delete,
|
|
1784
1784
|
hidden: c.deleted || r,
|
|
1785
1785
|
disabled: c.deleted || i,
|
|
1786
|
-
icon: /* @__PURE__ */
|
|
1786
|
+
icon: /* @__PURE__ */ m(X, { className: "text-red-500", icon: ks }),
|
|
1787
1787
|
tooltip: t("_pages:common.actions.delete.text"),
|
|
1788
1788
|
onClick: () => s([c == null ? void 0 : c.id])
|
|
1789
1789
|
}),
|
|
@@ -1791,29 +1791,29 @@ const _r = (e) => {
|
|
|
1791
1791
|
)
|
|
1792
1792
|
};
|
|
1793
1793
|
}, Sr = (e) => {
|
|
1794
|
-
const { t } =
|
|
1794
|
+
const { t } = T(), { onClick: s, hidden: r = !1 } = e;
|
|
1795
1795
|
return {
|
|
1796
1796
|
action: $(
|
|
1797
1797
|
(n) => ({
|
|
1798
1798
|
id: we.Restore,
|
|
1799
1799
|
hidden: !n.deleted || r,
|
|
1800
1800
|
disabled: !n.deleted,
|
|
1801
|
-
icon: /* @__PURE__ */
|
|
1801
|
+
icon: /* @__PURE__ */ m(X, { className: "text-red-500", icon: Mt }),
|
|
1802
1802
|
tooltip: t("_pages:common.actions.restore.text"),
|
|
1803
1803
|
onClick: () => s([n == null ? void 0 : n.id])
|
|
1804
1804
|
}),
|
|
1805
1805
|
[r, s, t]
|
|
1806
1806
|
)
|
|
1807
1807
|
};
|
|
1808
|
-
},
|
|
1809
|
-
const { t } =
|
|
1808
|
+
}, rn = (e) => {
|
|
1809
|
+
const { t } = T(), { onClick: s, hidden: r = !1 } = e;
|
|
1810
1810
|
return {
|
|
1811
1811
|
action: $(
|
|
1812
1812
|
(n) => ({
|
|
1813
1813
|
id: we.Edit,
|
|
1814
1814
|
hidden: n.deleted || r,
|
|
1815
1815
|
disabled: n.deleted,
|
|
1816
|
-
icon: /* @__PURE__ */
|
|
1816
|
+
icon: /* @__PURE__ */ m(X, { className: "primary", icon: As }),
|
|
1817
1817
|
tooltip: t("_pages:common.actions.edit.text"),
|
|
1818
1818
|
onClick: () => s(n == null ? void 0 : n.id)
|
|
1819
1819
|
}),
|
|
@@ -1822,34 +1822,34 @@ const _r = (e) => {
|
|
|
1822
1822
|
};
|
|
1823
1823
|
};
|
|
1824
1824
|
var we = /* @__PURE__ */ ((e) => (e.Add = "add", e.Edit = "edit", e.Delete = "delete", e.Restore = "restore", e.Refresh = "refresh", e.Export = "export", e.Import = "import", e))(we || {});
|
|
1825
|
-
const
|
|
1826
|
-
const { t } =
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1825
|
+
const kr = (e) => {
|
|
1826
|
+
const { t } = T(), {
|
|
1827
|
+
onClick: s,
|
|
1828
|
+
hidden: r = !1,
|
|
1829
|
+
disabled: i = !1,
|
|
1830
|
+
isLoading: n = !1
|
|
1831
1831
|
} = e;
|
|
1832
1832
|
return {
|
|
1833
1833
|
action: $(
|
|
1834
1834
|
() => ({
|
|
1835
1835
|
id: we.Export,
|
|
1836
|
-
hidden:
|
|
1837
|
-
disabled:
|
|
1838
|
-
icon: /* @__PURE__ */
|
|
1836
|
+
hidden: r,
|
|
1837
|
+
disabled: i,
|
|
1838
|
+
icon: /* @__PURE__ */ m(
|
|
1839
1839
|
X,
|
|
1840
1840
|
{
|
|
1841
|
-
|
|
1842
|
-
|
|
1841
|
+
className: `${n ? "rotate" : ""}`,
|
|
1842
|
+
icon: n ? tt : Es
|
|
1843
1843
|
}
|
|
1844
1844
|
),
|
|
1845
1845
|
tooltip: t("_pages:common.actions.export.text"),
|
|
1846
|
-
onClick:
|
|
1846
|
+
onClick: s
|
|
1847
1847
|
}),
|
|
1848
|
-
[
|
|
1848
|
+
[i, r, n, s, t]
|
|
1849
1849
|
)
|
|
1850
1850
|
};
|
|
1851
|
-
},
|
|
1852
|
-
const { t } =
|
|
1851
|
+
}, Ar = (e) => {
|
|
1852
|
+
const { t } = T(), {
|
|
1853
1853
|
onClick: s,
|
|
1854
1854
|
hidden: r = !1,
|
|
1855
1855
|
disabled: i = !1,
|
|
@@ -1861,11 +1861,11 @@ const Nr = (e) => {
|
|
|
1861
1861
|
id: we.Import,
|
|
1862
1862
|
hidden: r,
|
|
1863
1863
|
disabled: i,
|
|
1864
|
-
icon: /* @__PURE__ */
|
|
1864
|
+
icon: /* @__PURE__ */ m(
|
|
1865
1865
|
X,
|
|
1866
1866
|
{
|
|
1867
|
-
className: "
|
|
1868
|
-
icon: n ?
|
|
1867
|
+
className: `${n ? "rotate" : ""}`,
|
|
1868
|
+
icon: n ? tt : $s
|
|
1869
1869
|
}
|
|
1870
1870
|
),
|
|
1871
1871
|
tooltip: t("_pages:common.actions.import.text"),
|
|
@@ -1874,58 +1874,58 @@ const Nr = (e) => {
|
|
|
1874
1874
|
[i, r, n, s, t]
|
|
1875
1875
|
)
|
|
1876
1876
|
};
|
|
1877
|
-
},
|
|
1878
|
-
const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: i } =
|
|
1877
|
+
}, nn = (e) => {
|
|
1878
|
+
const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: i } = Se(), { t: n } = T(), { open: c, onClick: o, close: h, dialogFn: y, isLoading: d } = Jt({
|
|
1879
1879
|
onSuccessMessage: n("_pages:common.actions.delete.successMessage"),
|
|
1880
|
-
onError: (
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
([x,
|
|
1884
|
-
message: n(`_pages:${x}.errors.${
|
|
1880
|
+
onError: (f) => {
|
|
1881
|
+
f.errors && i(
|
|
1882
|
+
f.errors.map(
|
|
1883
|
+
([x, _]) => ({
|
|
1884
|
+
message: n(`_pages:${x}.errors.${_}`),
|
|
1885
1885
|
type: j.error
|
|
1886
1886
|
})
|
|
1887
1887
|
)
|
|
1888
1888
|
);
|
|
1889
1889
|
},
|
|
1890
|
-
onSuccess: async (
|
|
1891
|
-
await
|
|
1890
|
+
onSuccess: async (f) => {
|
|
1891
|
+
await Ne.invalidateQueries({ queryKey: t }), s && s(f);
|
|
1892
1892
|
},
|
|
1893
1893
|
...r
|
|
1894
|
-
}), { action: g } =
|
|
1894
|
+
}), { action: g } = Nr({ onClick: o });
|
|
1895
1895
|
return {
|
|
1896
|
-
onClick:
|
|
1896
|
+
onClick: o,
|
|
1897
1897
|
title: n("_pages:common.actions.delete.dialog.title"),
|
|
1898
1898
|
open: c,
|
|
1899
|
-
isLoading:
|
|
1899
|
+
isLoading: d,
|
|
1900
1900
|
handleSubmit: () => y.mutate(),
|
|
1901
|
-
handleClose:
|
|
1901
|
+
handleClose: h,
|
|
1902
1902
|
action: g
|
|
1903
1903
|
};
|
|
1904
|
-
},
|
|
1904
|
+
}, is = () => {
|
|
1905
1905
|
const [e, t] = Z(!1);
|
|
1906
1906
|
return { open: e, setOpen: t, handleClose: () => t(!1), handleOpen: () => t(!0) };
|
|
1907
|
-
},
|
|
1908
|
-
const { t } =
|
|
1907
|
+
}, on = (e) => {
|
|
1908
|
+
const { t } = T(), {
|
|
1909
1909
|
showErrorNotification: s,
|
|
1910
1910
|
showStackNotifications: r,
|
|
1911
1911
|
showSuccessNotification: i
|
|
1912
|
-
} =
|
|
1912
|
+
} = Se(), {
|
|
1913
1913
|
defaultValues: n,
|
|
1914
1914
|
getFunction: c,
|
|
1915
|
-
mutationFn:
|
|
1916
|
-
formToDto:
|
|
1915
|
+
mutationFn: o,
|
|
1916
|
+
formToDto: h,
|
|
1917
1917
|
dtoToForm: y,
|
|
1918
|
-
onError:
|
|
1918
|
+
onError: d,
|
|
1919
1919
|
onSuccess: g,
|
|
1920
|
-
queryKey:
|
|
1920
|
+
queryKey: f,
|
|
1921
1921
|
onSuccessMessage: x,
|
|
1922
|
-
title:
|
|
1923
|
-
} = e, [
|
|
1922
|
+
title: _
|
|
1923
|
+
} = e, [N, q] = Z(0), { open: ye, handleClose: S, handleOpen: W } = is(), { control: D, handleSubmit: L, reset: G, setError: ee, getValues: ve, setValue: B } = ns({
|
|
1924
1924
|
defaultValues: n
|
|
1925
|
-
}), { data: oe, isLoading: re } =
|
|
1926
|
-
queryFn: () => c == null ? void 0 : c(
|
|
1927
|
-
queryKey: [...
|
|
1928
|
-
enabled: !!c && !!
|
|
1925
|
+
}), { data: oe, isLoading: re } = Hs({
|
|
1926
|
+
queryFn: () => c == null ? void 0 : c(N),
|
|
1927
|
+
queryKey: [...f, N],
|
|
1928
|
+
enabled: !!c && !!f && !!N
|
|
1929
1929
|
});
|
|
1930
1930
|
se(() => {
|
|
1931
1931
|
oe && y && G({ ...y(oe) });
|
|
@@ -1933,12 +1933,12 @@ const Nr = (e) => {
|
|
|
1933
1933
|
const A = $(
|
|
1934
1934
|
(V) => {
|
|
1935
1935
|
const ne = V == null ? void 0 : V.errors, ae = [];
|
|
1936
|
-
return ne && ne.forEach(([xe,
|
|
1937
|
-
const
|
|
1938
|
-
(
|
|
1936
|
+
return ne && ne.forEach(([xe, Pe]) => {
|
|
1937
|
+
const Ce = document.querySelector(`[name="${xe}"]`);
|
|
1938
|
+
(Ce instanceof HTMLInputElement || Ce instanceof HTMLTextAreaElement || Ce instanceof HTMLSelectElement) && (Ce.focus(), Ce.classList.add("error"), ae.push(t(`_entities:${f}.${xe}.${Pe}`)));
|
|
1939
1939
|
}), ae;
|
|
1940
1940
|
},
|
|
1941
|
-
[t,
|
|
1941
|
+
[t, f]
|
|
1942
1942
|
), E = $(() => {
|
|
1943
1943
|
document.querySelectorAll("input, textarea, select").forEach((ne) => {
|
|
1944
1944
|
ne.classList.remove("error");
|
|
@@ -1949,9 +1949,9 @@ const Nr = (e) => {
|
|
|
1949
1949
|
},
|
|
1950
1950
|
[W]
|
|
1951
1951
|
), H = $(() => {
|
|
1952
|
-
E(),
|
|
1953
|
-
}, [G, E,
|
|
1954
|
-
mutationFn:
|
|
1952
|
+
E(), S(), G();
|
|
1953
|
+
}, [G, E, S]), K = je({
|
|
1954
|
+
mutationFn: o,
|
|
1955
1955
|
onError: (V) => {
|
|
1956
1956
|
if (console.error(V), V.errors) {
|
|
1957
1957
|
const ne = A(V);
|
|
@@ -1963,105 +1963,105 @@ const Nr = (e) => {
|
|
|
1963
1963
|
})
|
|
1964
1964
|
)
|
|
1965
1965
|
);
|
|
1966
|
-
} else
|
|
1966
|
+
} else d ? d(V) : s({ message: t("_accessibility:errors.500") });
|
|
1967
1967
|
},
|
|
1968
1968
|
onSuccess: async (V) => {
|
|
1969
|
-
await
|
|
1969
|
+
await Ne.invalidateQueries({ queryKey: f }), g && g(V), i({
|
|
1970
1970
|
message: x
|
|
1971
1971
|
}), H();
|
|
1972
1972
|
}
|
|
1973
1973
|
});
|
|
1974
1974
|
return {
|
|
1975
|
-
open:
|
|
1975
|
+
open: ye,
|
|
1976
1976
|
openDialog: I,
|
|
1977
1977
|
handleClose: H,
|
|
1978
|
-
control:
|
|
1978
|
+
control: D,
|
|
1979
1979
|
getValues: ve,
|
|
1980
1980
|
setValue: B,
|
|
1981
1981
|
handleSubmit: L,
|
|
1982
|
-
onSubmit: (V) => K.mutate(
|
|
1982
|
+
onSubmit: (V) => K.mutate(h(V)),
|
|
1983
1983
|
reset: G,
|
|
1984
1984
|
setError: ee,
|
|
1985
1985
|
parseFormError: A,
|
|
1986
1986
|
releaseFormError: E,
|
|
1987
|
-
title:
|
|
1987
|
+
title: _,
|
|
1988
1988
|
isLoading: re || K.isPending
|
|
1989
1989
|
};
|
|
1990
|
-
},
|
|
1991
|
-
const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: i } =
|
|
1990
|
+
}, an = (e) => {
|
|
1991
|
+
const { queryKey: t, onSuccess: s, ...r } = e, { showStackNotifications: i } = Se(), { t: n } = T(), { open: c, onClick: o, close: h, dialogFn: y, isLoading: d } = Jt({
|
|
1992
1992
|
onSuccessMessage: n("_pages:common.actions.restore.successMessage"),
|
|
1993
|
-
onError: (
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
([x,
|
|
1997
|
-
message: n(`_pages:${x}.errors.${
|
|
1993
|
+
onError: (f) => {
|
|
1994
|
+
f.errors && i(
|
|
1995
|
+
f.errors.map(
|
|
1996
|
+
([x, _]) => ({
|
|
1997
|
+
message: n(`_pages:${x}.errors.${_}`),
|
|
1998
1998
|
type: j.error
|
|
1999
1999
|
})
|
|
2000
2000
|
)
|
|
2001
2001
|
);
|
|
2002
2002
|
},
|
|
2003
|
-
onSuccess: async (
|
|
2004
|
-
await
|
|
2003
|
+
onSuccess: async (f) => {
|
|
2004
|
+
await Ne.invalidateQueries({ queryKey: t }), s && s(f);
|
|
2005
2005
|
},
|
|
2006
2006
|
...r
|
|
2007
|
-
}), { action: g } = Sr({ onClick:
|
|
2007
|
+
}), { action: g } = Sr({ onClick: o });
|
|
2008
2008
|
return {
|
|
2009
|
-
onClick:
|
|
2009
|
+
onClick: o,
|
|
2010
2010
|
title: n("_pages:common.actions.restore.dialog.title"),
|
|
2011
2011
|
open: c,
|
|
2012
|
-
isLoading:
|
|
2012
|
+
isLoading: d,
|
|
2013
2013
|
handleSubmit: () => y.mutate(),
|
|
2014
|
-
handleClose:
|
|
2014
|
+
handleClose: h,
|
|
2015
2015
|
action: g
|
|
2016
2016
|
};
|
|
2017
2017
|
};
|
|
2018
|
-
function
|
|
2019
|
-
const { t } =
|
|
2018
|
+
function cn(e) {
|
|
2019
|
+
const { t } = T(), { queryKey: s, mutationFn: r, entity: i } = e, [n, c] = Z(!1), o = _r({
|
|
2020
2020
|
mutationFn: r,
|
|
2021
2021
|
onSuccessMessage: t("_pages:common.actions.import.successMessage"),
|
|
2022
2022
|
queryKey: s
|
|
2023
|
-
}), { action:
|
|
2023
|
+
}), { action: h } = Ar({
|
|
2024
2024
|
onClick: () => c(!0)
|
|
2025
2025
|
});
|
|
2026
2026
|
return {
|
|
2027
|
-
...
|
|
2027
|
+
...o,
|
|
2028
2028
|
open: n,
|
|
2029
2029
|
title: t("_pages:common.actions.import.dialog.title", {
|
|
2030
2030
|
entity: t(`_pages:${i}.title`)
|
|
2031
2031
|
}),
|
|
2032
2032
|
handleClose: () => c(!1),
|
|
2033
|
-
action:
|
|
2033
|
+
action: h
|
|
2034
2034
|
};
|
|
2035
2035
|
}
|
|
2036
|
-
const
|
|
2037
|
-
const { showSuccessNotification: t } =
|
|
2036
|
+
const ln = (e) => {
|
|
2037
|
+
const { showSuccessNotification: t } = Se(), { t: s } = T(), {
|
|
2038
2038
|
entity: r,
|
|
2039
2039
|
mutationFn: i,
|
|
2040
2040
|
onError: n,
|
|
2041
2041
|
onSuccess: c,
|
|
2042
|
-
onSuccessMessage:
|
|
2043
|
-
} = e,
|
|
2042
|
+
onSuccessMessage: o = s("_pages:common.actions.export.successMessage")
|
|
2043
|
+
} = e, h = je({
|
|
2044
2044
|
mutationFn: () => i(),
|
|
2045
2045
|
onError: (g) => {
|
|
2046
2046
|
console.error(g), n && n(g);
|
|
2047
2047
|
},
|
|
2048
2048
|
onSuccess: async (g) => {
|
|
2049
|
-
const
|
|
2050
|
-
|
|
2051
|
-
message:
|
|
2049
|
+
const f = JSON.stringify(g, null, 2), x = new Blob([f], { type: "application/json" }), _ = URL.createObjectURL(x), N = document.createElement("a");
|
|
2050
|
+
N.href = _, N.download = `${r}.json`, N.click(), URL.revokeObjectURL(_), c && c(g), t({
|
|
2051
|
+
message: o
|
|
2052
2052
|
});
|
|
2053
2053
|
}
|
|
2054
2054
|
}), y = $(() => {
|
|
2055
|
-
|
|
2056
|
-
}, [
|
|
2055
|
+
h.mutate();
|
|
2056
|
+
}, [h]), { action: d } = kr({
|
|
2057
2057
|
onClick: y,
|
|
2058
|
-
isLoading:
|
|
2058
|
+
isLoading: h.isPending
|
|
2059
2059
|
});
|
|
2060
2060
|
return {
|
|
2061
|
-
action:
|
|
2061
|
+
action: d
|
|
2062
2062
|
};
|
|
2063
2063
|
};
|
|
2064
|
-
function
|
|
2064
|
+
function Er(e) {
|
|
2065
2065
|
const [t, s] = Z(!1), r = $(() => {
|
|
2066
2066
|
const i = window.scrollY > e;
|
|
2067
2067
|
s(i);
|
|
@@ -2070,32 +2070,32 @@ function Ar(e) {
|
|
|
2070
2070
|
window.removeEventListener("scroll", r);
|
|
2071
2071
|
}), [r]), t;
|
|
2072
2072
|
}
|
|
2073
|
-
const
|
|
2074
|
-
const { t: e } =
|
|
2075
|
-
return /* @__PURE__ */
|
|
2073
|
+
const un = () => {
|
|
2074
|
+
const { t: e } = T(), t = Er(200);
|
|
2075
|
+
return /* @__PURE__ */ m(
|
|
2076
2076
|
me,
|
|
2077
2077
|
{
|
|
2078
|
-
icon:
|
|
2079
|
-
onClick: () =>
|
|
2078
|
+
icon: Fs,
|
|
2079
|
+
onClick: () => Gs.scrollTo(0, 0),
|
|
2080
2080
|
"data-tooltip-id": "tooltip",
|
|
2081
2081
|
"data-tooltip-content": e("_accessibility:buttons.toTop"),
|
|
2082
2082
|
className: `submit primary to-top ${t ? "show" : "hide"}`
|
|
2083
2083
|
}
|
|
2084
2084
|
);
|
|
2085
|
-
},
|
|
2086
|
-
const { actions: t = [], className: s = "" } = e, { t: r } =
|
|
2087
|
-
return /* @__PURE__ */
|
|
2088
|
-
/* @__PURE__ */
|
|
2085
|
+
}, $r = (e) => {
|
|
2086
|
+
const { actions: t = [], className: s = "" } = e, { t: r } = T(), [i, n] = Z(!1);
|
|
2087
|
+
return /* @__PURE__ */ k("div", { className: `actions-dropdown ${s}`, children: [
|
|
2088
|
+
/* @__PURE__ */ m(
|
|
2089
2089
|
me,
|
|
2090
2090
|
{
|
|
2091
|
-
icon:
|
|
2091
|
+
icon: Ls,
|
|
2092
2092
|
onClick: () => n(!0),
|
|
2093
2093
|
"data-tooltip-id": "tooltip",
|
|
2094
2094
|
"data-tooltip-content": r("_accessibility:buttons.openActions")
|
|
2095
2095
|
}
|
|
2096
2096
|
),
|
|
2097
|
-
/* @__PURE__ */
|
|
2098
|
-
|
|
2097
|
+
/* @__PURE__ */ m(Ws, { open: i, onClose: () => n(!1), children: /* @__PURE__ */ m(
|
|
2098
|
+
qt,
|
|
2099
2099
|
{
|
|
2100
2100
|
showActionTexts: !0,
|
|
2101
2101
|
actions: t,
|
|
@@ -2104,79 +2104,79 @@ const ln = () => {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
) })
|
|
2106
2106
|
] });
|
|
2107
|
-
},
|
|
2107
|
+
}, dn = Ot(function(e, t) {
|
|
2108
2108
|
const {
|
|
2109
2109
|
value: s,
|
|
2110
2110
|
onChange: r,
|
|
2111
|
-
state: i =
|
|
2111
|
+
state: i = bs.default,
|
|
2112
2112
|
name: n = "",
|
|
2113
2113
|
id: c = "",
|
|
2114
|
-
label:
|
|
2115
|
-
disabled:
|
|
2114
|
+
label: o = "",
|
|
2115
|
+
disabled: h = !1,
|
|
2116
2116
|
required: y = !1,
|
|
2117
|
-
placeholder:
|
|
2117
|
+
placeholder: d = "",
|
|
2118
2118
|
containerClassName: g = "",
|
|
2119
|
-
inputClassName:
|
|
2119
|
+
inputClassName: f = "",
|
|
2120
2120
|
labelClassName: x = "",
|
|
2121
|
-
helperText:
|
|
2122
|
-
helperTextClassName:
|
|
2121
|
+
helperText: _ = "",
|
|
2122
|
+
helperTextClassName: N = "",
|
|
2123
2123
|
...q
|
|
2124
2124
|
} = e;
|
|
2125
|
-
return /* @__PURE__ */
|
|
2125
|
+
return /* @__PURE__ */ k(
|
|
2126
2126
|
"div",
|
|
2127
2127
|
{
|
|
2128
2128
|
className: `relative z-0 w-full mb-5 group ${g}`,
|
|
2129
2129
|
children: [
|
|
2130
|
-
/* @__PURE__ */
|
|
2130
|
+
/* @__PURE__ */ m(
|
|
2131
2131
|
"textarea",
|
|
2132
2132
|
{
|
|
2133
2133
|
ref: t,
|
|
2134
2134
|
name: n,
|
|
2135
2135
|
id: c,
|
|
2136
|
-
className: `text-input text-area ${
|
|
2136
|
+
className: `text-input text-area ${ps(i)} ${f} peer`,
|
|
2137
2137
|
placeholder: "",
|
|
2138
2138
|
required: y,
|
|
2139
2139
|
value: s,
|
|
2140
2140
|
onChange: r,
|
|
2141
|
-
disabled:
|
|
2141
|
+
disabled: h,
|
|
2142
2142
|
...q
|
|
2143
2143
|
}
|
|
2144
2144
|
),
|
|
2145
|
-
/* @__PURE__ */
|
|
2145
|
+
/* @__PURE__ */ k(
|
|
2146
2146
|
"label",
|
|
2147
2147
|
{
|
|
2148
2148
|
htmlFor: n,
|
|
2149
|
-
className: `text-input-label ${
|
|
2149
|
+
className: `text-input-label ${ws(i)} ${x}`,
|
|
2150
2150
|
children: [
|
|
2151
|
-
|
|
2151
|
+
o,
|
|
2152
2152
|
y ? " *" : ""
|
|
2153
2153
|
]
|
|
2154
2154
|
}
|
|
2155
2155
|
),
|
|
2156
|
-
/* @__PURE__ */
|
|
2156
|
+
/* @__PURE__ */ m(
|
|
2157
2157
|
"p",
|
|
2158
2158
|
{
|
|
2159
|
-
className: `text-input-helper-text ${
|
|
2160
|
-
children: i !== "error" && i !== "good" ?
|
|
2159
|
+
className: `text-input-helper-text ${vs(i)} ${N}`,
|
|
2160
|
+
children: i !== "error" && i !== "good" ? d : _
|
|
2161
2161
|
}
|
|
2162
2162
|
)
|
|
2163
2163
|
]
|
|
2164
2164
|
}
|
|
2165
2165
|
);
|
|
2166
|
-
}),
|
|
2167
|
-
const { t } =
|
|
2166
|
+
}), fn = (e) => {
|
|
2167
|
+
const { t } = T(), {
|
|
2168
2168
|
children: s,
|
|
2169
2169
|
handleSubmit: r,
|
|
2170
2170
|
onSubmit: i,
|
|
2171
2171
|
isLoading: n = !1,
|
|
2172
2172
|
buttonEnd: c = !0,
|
|
2173
|
-
reset:
|
|
2173
|
+
reset: o
|
|
2174
2174
|
} = e;
|
|
2175
|
-
return /* @__PURE__ */
|
|
2175
|
+
return /* @__PURE__ */ k("form", { className: "form-container", onSubmit: r(i), children: [
|
|
2176
2176
|
s,
|
|
2177
|
-
/* @__PURE__ */
|
|
2178
|
-
/* @__PURE__ */
|
|
2179
|
-
|
|
2177
|
+
/* @__PURE__ */ k("div", { className: `flex gap-2 mt-5 ${c ? "justify-end" : ""}`, children: [
|
|
2178
|
+
/* @__PURE__ */ k(
|
|
2179
|
+
pe,
|
|
2180
2180
|
{
|
|
2181
2181
|
type: "submit",
|
|
2182
2182
|
color: "primary",
|
|
@@ -2185,17 +2185,17 @@ const ln = () => {
|
|
|
2185
2185
|
name: t("_accessibility:buttons.submit"),
|
|
2186
2186
|
"aria-label": t("_accessibility:ariaLabels.submit"),
|
|
2187
2187
|
children: [
|
|
2188
|
-
n ? /* @__PURE__ */
|
|
2188
|
+
n ? /* @__PURE__ */ m(lt, { color: "text-dark", className: "mt-1" }) : null,
|
|
2189
2189
|
t("_accessibility:buttons.submit")
|
|
2190
2190
|
]
|
|
2191
2191
|
}
|
|
2192
2192
|
),
|
|
2193
|
-
/* @__PURE__ */
|
|
2194
|
-
|
|
2193
|
+
/* @__PURE__ */ m(
|
|
2194
|
+
pe,
|
|
2195
2195
|
{
|
|
2196
2196
|
type: "button",
|
|
2197
2197
|
variant: "outlined",
|
|
2198
|
-
onClick: () =>
|
|
2198
|
+
onClick: () => o == null ? void 0 : o(),
|
|
2199
2199
|
name: t("_accessibility:buttons.cancel"),
|
|
2200
2200
|
"aria-label": t("_accessibility:ariaLabels.cancel"),
|
|
2201
2201
|
children: t("_accessibility:buttons.cancel")
|
|
@@ -2203,75 +2203,75 @@ const ln = () => {
|
|
|
2203
2203
|
)
|
|
2204
2204
|
] })
|
|
2205
2205
|
] });
|
|
2206
|
-
},
|
|
2206
|
+
}, mn = Ot(function(e, t) {
|
|
2207
2207
|
const [s, r] = Z(!1);
|
|
2208
|
-
return /* @__PURE__ */
|
|
2208
|
+
return /* @__PURE__ */ m(xs, { ...e, type: s ? "text" : "password", ref: t, children: /* @__PURE__ */ m(
|
|
2209
2209
|
me,
|
|
2210
2210
|
{
|
|
2211
2211
|
type: "button",
|
|
2212
2212
|
tabIndex: -1,
|
|
2213
2213
|
className: "absolute right-2 password-icon",
|
|
2214
2214
|
onClick: () => r(!s),
|
|
2215
|
-
icon: s ?
|
|
2215
|
+
icon: s ? Ts : Ds
|
|
2216
2216
|
}
|
|
2217
2217
|
) });
|
|
2218
|
-
}),
|
|
2219
|
-
const { t } =
|
|
2218
|
+
}), at = (e) => {
|
|
2219
|
+
const { t } = T(), {
|
|
2220
2220
|
title: s,
|
|
2221
2221
|
children: r,
|
|
2222
2222
|
handleClose: i,
|
|
2223
2223
|
open: n = !1,
|
|
2224
2224
|
containerClassName: c = "",
|
|
2225
|
-
className:
|
|
2226
|
-
animationClass:
|
|
2227
|
-
} = e, [y,
|
|
2228
|
-
(
|
|
2229
|
-
|
|
2225
|
+
className: o = "",
|
|
2226
|
+
animationClass: h = "appear"
|
|
2227
|
+
} = e, [y, d] = Z(window.innerWidth), g = $(
|
|
2228
|
+
(N) => {
|
|
2229
|
+
N.key === "Escape" && n && i();
|
|
2230
2230
|
},
|
|
2231
2231
|
[n, i]
|
|
2232
2232
|
);
|
|
2233
2233
|
se(() => (window.addEventListener("keydown", g), () => {
|
|
2234
2234
|
window.removeEventListener("keydown", g);
|
|
2235
2235
|
}), [g]);
|
|
2236
|
-
const
|
|
2237
|
-
|
|
2236
|
+
const f = $(() => {
|
|
2237
|
+
d(window.innerWidth);
|
|
2238
2238
|
}, []);
|
|
2239
|
-
se(() => (window.addEventListener("resize",
|
|
2240
|
-
window.removeEventListener("resize",
|
|
2241
|
-
}), [
|
|
2242
|
-
const x =
|
|
2243
|
-
(
|
|
2239
|
+
se(() => (window.addEventListener("resize", f), () => {
|
|
2240
|
+
window.removeEventListener("resize", f);
|
|
2241
|
+
}), [f]);
|
|
2242
|
+
const x = De(() => qs({ width: `${y}px` }), [y]), _ = $(
|
|
2243
|
+
(N) => {
|
|
2244
2244
|
var q;
|
|
2245
|
-
((q =
|
|
2245
|
+
((q = N == null ? void 0 : N.currentTarget) == null ? void 0 : q.getAttribute("name")) === t("_accessibility:buttons.closeDialog") && i();
|
|
2246
2246
|
},
|
|
2247
2247
|
[t, i]
|
|
2248
2248
|
);
|
|
2249
2249
|
return se(() => {
|
|
2250
|
-
const
|
|
2250
|
+
const N = (q) => {
|
|
2251
2251
|
q ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
|
|
2252
2252
|
};
|
|
2253
|
-
return
|
|
2254
|
-
|
|
2253
|
+
return N(n), () => {
|
|
2254
|
+
N(n);
|
|
2255
2255
|
};
|
|
2256
|
-
}, [n]),
|
|
2257
|
-
/* @__PURE__ */
|
|
2256
|
+
}, [n]), Ut(
|
|
2257
|
+
/* @__PURE__ */ m(
|
|
2258
2258
|
"div",
|
|
2259
2259
|
{
|
|
2260
2260
|
"aria-label": t("_accessibility:ariaLabels.closeDialog"),
|
|
2261
2261
|
"aria-disabled": !n,
|
|
2262
|
-
onClick:
|
|
2263
|
-
className: `dialog-backdrop animated ${n ? `opened ${
|
|
2264
|
-
children: /* @__PURE__ */
|
|
2262
|
+
onClick: _,
|
|
2263
|
+
className: `dialog-backdrop animated ${n ? `opened ${h}` : "closed"} ${x} h-screen ${n ? "bg-base/20 backdrop-blur-xl" : "pointer-events-none"} ${c}`,
|
|
2264
|
+
children: /* @__PURE__ */ k(
|
|
2265
2265
|
"div",
|
|
2266
2266
|
{
|
|
2267
|
-
className: `dialog elevated animated ${n ? `opened ${
|
|
2267
|
+
className: `dialog elevated animated ${n ? `opened ${h}` : "closed"} ${o}`,
|
|
2268
2268
|
children: [
|
|
2269
|
-
/* @__PURE__ */
|
|
2270
|
-
/* @__PURE__ */
|
|
2271
|
-
/* @__PURE__ */
|
|
2269
|
+
/* @__PURE__ */ k("div", { className: "dialog-header", children: [
|
|
2270
|
+
/* @__PURE__ */ m("h3", { className: "text-text text-xl", children: s }),
|
|
2271
|
+
/* @__PURE__ */ m(
|
|
2272
2272
|
me,
|
|
2273
2273
|
{
|
|
2274
|
-
icon:
|
|
2274
|
+
icon: et,
|
|
2275
2275
|
disabled: !n,
|
|
2276
2276
|
"aria-disabled": !n,
|
|
2277
2277
|
onClick: i,
|
|
@@ -2289,179 +2289,197 @@ const ln = () => {
|
|
|
2289
2289
|
),
|
|
2290
2290
|
document.body
|
|
2291
2291
|
);
|
|
2292
|
+
}, ct = (e) => {
|
|
2293
|
+
const {
|
|
2294
|
+
primaryText: t,
|
|
2295
|
+
cancelText: s,
|
|
2296
|
+
onPrimaryClick: r,
|
|
2297
|
+
onCancel: i,
|
|
2298
|
+
isLoading: n = !1,
|
|
2299
|
+
disabled: c = !1,
|
|
2300
|
+
primaryType: o = "button",
|
|
2301
|
+
containerClassName: h = "",
|
|
2302
|
+
primaryClassName: y = "",
|
|
2303
|
+
alignEnd: d = !1,
|
|
2304
|
+
primaryName: g,
|
|
2305
|
+
primaryAriaLabel: f,
|
|
2306
|
+
cancelName: x,
|
|
2307
|
+
cancelAriaLabel: _
|
|
2308
|
+
} = e;
|
|
2309
|
+
return /* @__PURE__ */ k(
|
|
2310
|
+
"div",
|
|
2311
|
+
{
|
|
2312
|
+
className: `flex gap-2 mt-2 ${d ? "justify-end" : ""} ${h}`,
|
|
2313
|
+
children: [
|
|
2314
|
+
/* @__PURE__ */ k(
|
|
2315
|
+
pe,
|
|
2316
|
+
{
|
|
2317
|
+
type: o,
|
|
2318
|
+
color: "primary",
|
|
2319
|
+
variant: "submit",
|
|
2320
|
+
className: y,
|
|
2321
|
+
disabled: c,
|
|
2322
|
+
onClick: o === "button" ? r : void 0,
|
|
2323
|
+
name: g,
|
|
2324
|
+
"aria-label": f,
|
|
2325
|
+
children: [
|
|
2326
|
+
n ? /* @__PURE__ */ m(lt, { color: "text-dark", className: "mt-1" }) : null,
|
|
2327
|
+
t
|
|
2328
|
+
]
|
|
2329
|
+
}
|
|
2330
|
+
),
|
|
2331
|
+
/* @__PURE__ */ m(
|
|
2332
|
+
pe,
|
|
2333
|
+
{
|
|
2334
|
+
type: "button",
|
|
2335
|
+
variant: "outlined",
|
|
2336
|
+
disabled: c,
|
|
2337
|
+
onClick: i,
|
|
2338
|
+
name: x,
|
|
2339
|
+
"aria-label": _,
|
|
2340
|
+
children: s
|
|
2341
|
+
}
|
|
2342
|
+
)
|
|
2343
|
+
]
|
|
2344
|
+
}
|
|
2345
|
+
);
|
|
2292
2346
|
}, hn = (e) => {
|
|
2293
|
-
const { t } =
|
|
2347
|
+
const { t } = T(), {
|
|
2294
2348
|
children: s,
|
|
2295
2349
|
handleSubmit: r,
|
|
2296
2350
|
onSubmit: i,
|
|
2297
2351
|
handleClose: n,
|
|
2298
2352
|
isLoading: c = !1,
|
|
2299
|
-
buttonEnd:
|
|
2300
|
-
...
|
|
2353
|
+
buttonEnd: o = !0,
|
|
2354
|
+
...h
|
|
2301
2355
|
} = e;
|
|
2302
|
-
return /* @__PURE__ */
|
|
2303
|
-
/* @__PURE__ */
|
|
2304
|
-
/* @__PURE__ */
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
/* @__PURE__ */ d(
|
|
2322
|
-
fe,
|
|
2323
|
-
{
|
|
2324
|
-
type: "button",
|
|
2325
|
-
variant: "outlined",
|
|
2326
|
-
disabled: c,
|
|
2327
|
-
onClick: n,
|
|
2328
|
-
name: t("_accessibility:buttons.cancel"),
|
|
2329
|
-
"aria-label": t("_accessibility:ariaLabels.cancel"),
|
|
2330
|
-
children: t("_accessibility:buttons.cancel")
|
|
2331
|
-
}
|
|
2332
|
-
)
|
|
2333
|
-
] })
|
|
2356
|
+
return /* @__PURE__ */ m(at, { ...h, handleClose: n, children: /* @__PURE__ */ k("form", { onSubmit: r(i), children: [
|
|
2357
|
+
/* @__PURE__ */ m("div", { className: "form-container", children: s }),
|
|
2358
|
+
/* @__PURE__ */ m(
|
|
2359
|
+
ct,
|
|
2360
|
+
{
|
|
2361
|
+
primaryType: "submit",
|
|
2362
|
+
primaryText: t("_accessibility:buttons.submit"),
|
|
2363
|
+
cancelText: t("_accessibility:buttons.cancel"),
|
|
2364
|
+
onCancel: n,
|
|
2365
|
+
isLoading: c,
|
|
2366
|
+
disabled: c,
|
|
2367
|
+
primaryClassName: "!px-6",
|
|
2368
|
+
alignEnd: o,
|
|
2369
|
+
primaryName: t("_accessibility:buttons.submit"),
|
|
2370
|
+
primaryAriaLabel: t("_accessibility:ariaLabels.submit"),
|
|
2371
|
+
cancelName: t("_accessibility:buttons.cancel"),
|
|
2372
|
+
cancelAriaLabel: t("_accessibility:ariaLabels.cancel")
|
|
2373
|
+
}
|
|
2374
|
+
)
|
|
2334
2375
|
] }) });
|
|
2335
|
-
},
|
|
2336
|
-
const { t } =
|
|
2376
|
+
}, yn = (e) => {
|
|
2377
|
+
const { t } = T(), {
|
|
2337
2378
|
children: s,
|
|
2338
2379
|
handleSubmit: r,
|
|
2339
2380
|
handleClose: i,
|
|
2340
2381
|
isLoading: n = !1,
|
|
2341
2382
|
...c
|
|
2342
2383
|
} = e;
|
|
2343
|
-
return /* @__PURE__ */
|
|
2384
|
+
return /* @__PURE__ */ k(at, { ...c, handleClose: i, children: [
|
|
2344
2385
|
s,
|
|
2345
|
-
/* @__PURE__ */
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
fe,
|
|
2363
|
-
{
|
|
2364
|
-
type: "button",
|
|
2365
|
-
variant: "outlined",
|
|
2366
|
-
disabled: n,
|
|
2367
|
-
onClick: i,
|
|
2368
|
-
name: t("_accessibility:buttons.cancel"),
|
|
2369
|
-
"aria-label": t("_accessibility:ariaLabels.cancel"),
|
|
2370
|
-
children: t("_accessibility:buttons.cancel")
|
|
2371
|
-
}
|
|
2372
|
-
)
|
|
2373
|
-
] })
|
|
2386
|
+
/* @__PURE__ */ m(
|
|
2387
|
+
ct,
|
|
2388
|
+
{
|
|
2389
|
+
primaryText: t("_accessibility:buttons.ok"),
|
|
2390
|
+
cancelText: t("_accessibility:buttons.cancel"),
|
|
2391
|
+
onPrimaryClick: r,
|
|
2392
|
+
onCancel: i,
|
|
2393
|
+
isLoading: n,
|
|
2394
|
+
disabled: n,
|
|
2395
|
+
primaryType: "button",
|
|
2396
|
+
containerClassName: "mt-5",
|
|
2397
|
+
primaryName: t("_accessibility:buttons.ok"),
|
|
2398
|
+
primaryAriaLabel: t("_accessibility:ariaLabels.ok"),
|
|
2399
|
+
cancelName: t("_accessibility:buttons.cancel"),
|
|
2400
|
+
cancelAriaLabel: t("_accessibility:ariaLabels.cancel")
|
|
2401
|
+
}
|
|
2402
|
+
)
|
|
2374
2403
|
] });
|
|
2375
|
-
},
|
|
2376
|
-
const { t } =
|
|
2404
|
+
}, gn = (e) => {
|
|
2405
|
+
const { t } = T(), {
|
|
2377
2406
|
children: s,
|
|
2378
2407
|
handleSubmit: r,
|
|
2379
2408
|
handleClose: i,
|
|
2380
2409
|
isLoading: n = !1,
|
|
2381
2410
|
...c
|
|
2382
2411
|
} = e;
|
|
2383
|
-
return /* @__PURE__ */
|
|
2384
|
-
/* @__PURE__ */
|
|
2385
|
-
|
|
2412
|
+
return /* @__PURE__ */ k(at, { ...c, handleClose: i, children: [
|
|
2413
|
+
/* @__PURE__ */ m(
|
|
2414
|
+
Cs,
|
|
2386
2415
|
{
|
|
2387
2416
|
label: t("_pages:common.actions.import.form.inputs.file.label")
|
|
2388
2417
|
}
|
|
2389
2418
|
),
|
|
2390
2419
|
s,
|
|
2391
|
-
/* @__PURE__ */
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
{
|
|
2409
|
-
type: "button",
|
|
2410
|
-
disabled: n,
|
|
2411
|
-
onClick: i,
|
|
2412
|
-
className: "button outlined",
|
|
2413
|
-
name: t("_accessibility:buttons.cancel"),
|
|
2414
|
-
"aria-label": t("_accessibility:ariaLabels.cancel"),
|
|
2415
|
-
children: t("_accessibility:buttons.cancel")
|
|
2416
|
-
}
|
|
2417
|
-
)
|
|
2418
|
-
] })
|
|
2420
|
+
/* @__PURE__ */ m(
|
|
2421
|
+
ct,
|
|
2422
|
+
{
|
|
2423
|
+
primaryText: t("_accessibility:buttons.ok"),
|
|
2424
|
+
cancelText: t("_accessibility:buttons.cancel"),
|
|
2425
|
+
onPrimaryClick: r,
|
|
2426
|
+
onCancel: i,
|
|
2427
|
+
isLoading: n,
|
|
2428
|
+
disabled: n,
|
|
2429
|
+
primaryType: "button",
|
|
2430
|
+
containerClassName: "mt-5",
|
|
2431
|
+
primaryName: t("_accessibility:buttons.ok"),
|
|
2432
|
+
primaryAriaLabel: t("_accessibility:ariaLabels.ok"),
|
|
2433
|
+
cancelName: t("_accessibility:buttons.cancel"),
|
|
2434
|
+
cancelAriaLabel: t("_accessibility:ariaLabels.cancel")
|
|
2435
|
+
}
|
|
2436
|
+
)
|
|
2419
2437
|
] });
|
|
2420
2438
|
};
|
|
2421
|
-
function
|
|
2422
|
-
const { t } =
|
|
2423
|
-
const g =
|
|
2424
|
-
return g == null || g &&
|
|
2439
|
+
function bn(e) {
|
|
2440
|
+
const { t } = T(), { open: s, onClose: r, menuMap: i } = e, { account: n } = zt(), { linkComponent: c } = He(), o = c, h = De(() => i.filter((d) => {
|
|
2441
|
+
const g = d.auth, f = !!(n != null && n.email);
|
|
2442
|
+
return g == null || g && f || !g && !f;
|
|
2425
2443
|
}), [n]), y = $(
|
|
2426
|
-
(
|
|
2427
|
-
|
|
2444
|
+
(d) => {
|
|
2445
|
+
d.key === "Escape" && s && r();
|
|
2428
2446
|
},
|
|
2429
2447
|
[r, s]
|
|
2430
2448
|
);
|
|
2431
2449
|
return se(() => (document.addEventListener("keydown", y), () => {
|
|
2432
2450
|
document.removeEventListener("keydown", y);
|
|
2433
|
-
}), [y]), /* @__PURE__ */
|
|
2451
|
+
}), [y]), /* @__PURE__ */ m(
|
|
2434
2452
|
"div",
|
|
2435
2453
|
{
|
|
2436
2454
|
"aria-label": t("_accessibility:ariaLabels.closeMenu"),
|
|
2437
2455
|
"aria-disabled": !s,
|
|
2438
2456
|
className: `${s ? "opened" : "closed"} drawer-backdrop`,
|
|
2439
2457
|
onClick: () => r(),
|
|
2440
|
-
children: /* @__PURE__ */
|
|
2458
|
+
children: /* @__PURE__ */ k(
|
|
2441
2459
|
"aside",
|
|
2442
2460
|
{
|
|
2443
2461
|
className: `${s ? "opened" : "closed"} bg-base drawer animated`,
|
|
2444
2462
|
children: [
|
|
2445
|
-
/* @__PURE__ */
|
|
2446
|
-
/* @__PURE__ */
|
|
2463
|
+
/* @__PURE__ */ m("h2", { className: "text-xl text-text px-5 pb-5 font-bold poppins", children: t("_pages:home.appName") }),
|
|
2464
|
+
/* @__PURE__ */ m("ul", { className: "flex flex-col", children: h.map((d, g) => /* @__PURE__ */ m(
|
|
2447
2465
|
"li",
|
|
2448
2466
|
{
|
|
2449
|
-
className: `w-full flex hover:bg-base-light ${
|
|
2450
|
-
children:
|
|
2451
|
-
|
|
2467
|
+
className: `w-full flex hover:bg-base-light ${d.path === location.pathname ? "bg-base-light" : ""} animated`,
|
|
2468
|
+
children: d.type !== "divider" && o ? /* @__PURE__ */ k(
|
|
2469
|
+
o,
|
|
2452
2470
|
{
|
|
2453
2471
|
"aria-disabled": !s,
|
|
2454
|
-
to:
|
|
2455
|
-
"aria-label": t(`_accessibility:ariaLabels.${
|
|
2472
|
+
to: d.path ?? `/${d.path}`,
|
|
2473
|
+
"aria-label": t(`_accessibility:ariaLabels.${d.path}`),
|
|
2456
2474
|
className: "text-lg text-text-muted w-full py-2 px-5 flex items-center justify-start gap-2",
|
|
2457
2475
|
children: [
|
|
2458
|
-
|
|
2459
|
-
t(`_pages:${
|
|
2476
|
+
d.icon,
|
|
2477
|
+
t(`_pages:${d.page}.title`)
|
|
2460
2478
|
]
|
|
2461
2479
|
}
|
|
2462
|
-
) : /* @__PURE__ */
|
|
2480
|
+
) : /* @__PURE__ */ m("hr", { className: "border-border border-spacing-x-0.5 w-full" })
|
|
2463
2481
|
},
|
|
2464
|
-
`${
|
|
2482
|
+
`${d.page ?? g}`
|
|
2465
2483
|
)) })
|
|
2466
2484
|
]
|
|
2467
2485
|
}
|
|
@@ -2469,35 +2487,35 @@ function gn(e) {
|
|
|
2469
2487
|
}
|
|
2470
2488
|
);
|
|
2471
2489
|
}
|
|
2472
|
-
function
|
|
2473
|
-
const { error: t } = e, { t: s } =
|
|
2474
|
-
return /* @__PURE__ */
|
|
2475
|
-
/* @__PURE__ */
|
|
2476
|
-
/* @__PURE__ */
|
|
2490
|
+
function pn(e) {
|
|
2491
|
+
const { error: t } = e, { t: s } = T();
|
|
2492
|
+
return /* @__PURE__ */ k("div", { className: "flex flex-col items-center justify-center pt-10 gap-5", children: [
|
|
2493
|
+
/* @__PURE__ */ m(X, { icon: Qs, className: "text-red-300 text-4xl" }),
|
|
2494
|
+
/* @__PURE__ */ m("p", { className: "text-text text-center", children: (t == null ? void 0 : t.message) ?? s("_accessibility:errors.unknownError") })
|
|
2477
2495
|
] });
|
|
2478
2496
|
}
|
|
2479
|
-
const
|
|
2480
|
-
const { showBackButton: t, title: s, actions: r } = e, { t: i } =
|
|
2481
|
-
return /* @__PURE__ */
|
|
2482
|
-
/* @__PURE__ */
|
|
2483
|
-
t && /* @__PURE__ */
|
|
2497
|
+
const Fr = (e) => {
|
|
2498
|
+
const { showBackButton: t, title: s, actions: r } = e, { t: i } = T(), { navigate: n } = He();
|
|
2499
|
+
return /* @__PURE__ */ k("div", { className: "page-header", children: [
|
|
2500
|
+
/* @__PURE__ */ k("div", { className: "flex gap-2 items-center justify-start", children: [
|
|
2501
|
+
t && /* @__PURE__ */ m(
|
|
2484
2502
|
me,
|
|
2485
2503
|
{
|
|
2486
|
-
icon:
|
|
2504
|
+
icon: Vs,
|
|
2487
2505
|
onClick: () => n(-1),
|
|
2488
2506
|
name: i("_accessibility:buttons.back"),
|
|
2489
2507
|
"data-tooltip-id": "tooltip",
|
|
2490
2508
|
"data-tooltip-content": i("_accessibility:buttons.back")
|
|
2491
2509
|
}
|
|
2492
2510
|
),
|
|
2493
|
-
/* @__PURE__ */
|
|
2511
|
+
/* @__PURE__ */ m("h2", { className: "text-3xl font-bold", children: s })
|
|
2494
2512
|
] }),
|
|
2495
|
-
/* @__PURE__ */
|
|
2496
|
-
/* @__PURE__ */
|
|
2497
|
-
/* @__PURE__ */
|
|
2513
|
+
/* @__PURE__ */ k("div", { children: [
|
|
2514
|
+
/* @__PURE__ */ m(qt, { className: "max-xs:!hidden", actions: r ?? [] }),
|
|
2515
|
+
/* @__PURE__ */ m($r, { className: "min-xs:hidden", actions: r ?? [] })
|
|
2498
2516
|
] })
|
|
2499
2517
|
] });
|
|
2500
|
-
},
|
|
2518
|
+
}, wn = (e) => {
|
|
2501
2519
|
const {
|
|
2502
2520
|
title: t,
|
|
2503
2521
|
children: s,
|
|
@@ -2505,61 +2523,61 @@ const $r = (e) => {
|
|
|
2505
2523
|
filterOptions: i,
|
|
2506
2524
|
actions: n,
|
|
2507
2525
|
queryKey: c,
|
|
2508
|
-
isLoading:
|
|
2509
|
-
isAnimated:
|
|
2526
|
+
isLoading: o = !1,
|
|
2527
|
+
isAnimated: h = !0,
|
|
2510
2528
|
showBackButton: y = !1
|
|
2511
|
-
} = e, { t:
|
|
2529
|
+
} = e, { t: d } = T(), { countOfFilters: g } = _s(), f = De(() => {
|
|
2512
2530
|
const x = Array.isArray(n) ? [...n] : [];
|
|
2513
2531
|
if (c) {
|
|
2514
|
-
const
|
|
2532
|
+
const _ = {
|
|
2515
2533
|
id: we.Refresh,
|
|
2516
|
-
onClick: () =>
|
|
2517
|
-
icon: /* @__PURE__ */
|
|
2518
|
-
tooltip:
|
|
2534
|
+
onClick: () => Ne.invalidateQueries({ queryKey: c }),
|
|
2535
|
+
icon: /* @__PURE__ */ m(X, { icon: Mt }),
|
|
2536
|
+
tooltip: d("_pages:common.actions.refresh.text")
|
|
2519
2537
|
};
|
|
2520
|
-
x.unshift(
|
|
2538
|
+
x.unshift(_);
|
|
2521
2539
|
}
|
|
2522
2540
|
if (r) {
|
|
2523
|
-
const
|
|
2541
|
+
const _ = {
|
|
2524
2542
|
...r,
|
|
2525
2543
|
id: we.Add,
|
|
2526
|
-
icon: /* @__PURE__ */
|
|
2544
|
+
icon: /* @__PURE__ */ m(X, { icon: wt })
|
|
2527
2545
|
};
|
|
2528
|
-
x.unshift(
|
|
2546
|
+
x.unshift(_);
|
|
2529
2547
|
}
|
|
2530
2548
|
if (i) {
|
|
2531
|
-
const
|
|
2549
|
+
const _ = {
|
|
2532
2550
|
...i,
|
|
2533
2551
|
id: "filter",
|
|
2534
|
-
icon: /* @__PURE__ */
|
|
2535
|
-
children: /* @__PURE__ */
|
|
2536
|
-
|
|
2552
|
+
icon: /* @__PURE__ */ m(X, { icon: Ps }),
|
|
2553
|
+
children: /* @__PURE__ */ m(
|
|
2554
|
+
Ns,
|
|
2537
2555
|
{
|
|
2538
2556
|
className: `${g > 0 ? "show" : "hide"} `,
|
|
2539
2557
|
count: g
|
|
2540
2558
|
}
|
|
2541
2559
|
)
|
|
2542
2560
|
};
|
|
2543
|
-
x.push(
|
|
2561
|
+
x.push(_);
|
|
2544
2562
|
}
|
|
2545
2563
|
return x;
|
|
2546
|
-
}, [n, r, g, i, c,
|
|
2547
|
-
return /* @__PURE__ */
|
|
2548
|
-
/* @__PURE__ */
|
|
2549
|
-
/* @__PURE__ */
|
|
2550
|
-
|
|
2564
|
+
}, [n, r, g, i, c, d]);
|
|
2565
|
+
return /* @__PURE__ */ k("main", { className: "", children: [
|
|
2566
|
+
/* @__PURE__ */ k("div", { className: "flex flex-col", children: [
|
|
2567
|
+
/* @__PURE__ */ m(
|
|
2568
|
+
Fr,
|
|
2551
2569
|
{
|
|
2552
2570
|
showBackButton: y,
|
|
2553
|
-
actions:
|
|
2571
|
+
actions: f,
|
|
2554
2572
|
title: t
|
|
2555
2573
|
}
|
|
2556
2574
|
),
|
|
2557
|
-
/* @__PURE__ */
|
|
2575
|
+
/* @__PURE__ */ m("div", { className: `px-5 py-3 h-useConfigfull ${h ? "appear" : ""}`, children: o ? /* @__PURE__ */ m(lt, { containerClassName: "flex justify-center items-center h-50" }) : s })
|
|
2558
2576
|
] }),
|
|
2559
|
-
/* @__PURE__ */
|
|
2577
|
+
/* @__PURE__ */ m(
|
|
2560
2578
|
me,
|
|
2561
2579
|
{
|
|
2562
|
-
icon:
|
|
2580
|
+
icon: wt,
|
|
2563
2581
|
color: "primary",
|
|
2564
2582
|
variant: "submit",
|
|
2565
2583
|
onClick: () => {
|
|
@@ -2570,88 +2588,88 @@ const $r = (e) => {
|
|
|
2570
2588
|
}
|
|
2571
2589
|
)
|
|
2572
2590
|
] });
|
|
2573
|
-
},
|
|
2574
|
-
const { t } =
|
|
2591
|
+
}, vn = (e) => {
|
|
2592
|
+
const { t } = T(), {
|
|
2575
2593
|
loading: s = !1,
|
|
2576
2594
|
emptyComponent: r = null,
|
|
2577
2595
|
emptyMessage: i = t("_accessibility:messages.empty"),
|
|
2578
2596
|
renderComponent: n,
|
|
2579
2597
|
data: c = []
|
|
2580
2598
|
} = e;
|
|
2581
|
-
return /* @__PURE__ */
|
|
2582
|
-
},
|
|
2599
|
+
return /* @__PURE__ */ m(Te, { children: c != null && c.length ? /* @__PURE__ */ m("ul", { className: "pretty-grid-main", children: c == null ? void 0 : c.map((o) => /* @__PURE__ */ m("li", { className: "pretty-grid-item", children: n(o) }, o.id)) }) : /* @__PURE__ */ m(Te, { children: r || /* @__PURE__ */ m("p", { className: "text-center mt-5", children: i }) }) });
|
|
2600
|
+
}, Lr = () => {
|
|
2583
2601
|
const [e, t] = Z(_t());
|
|
2584
2602
|
return se(() => {
|
|
2585
2603
|
const s = setInterval(() => {
|
|
2586
2604
|
t(_t());
|
|
2587
2605
|
}, 1e3);
|
|
2588
2606
|
return () => clearInterval(s);
|
|
2589
|
-
}, []), /* @__PURE__ */
|
|
2607
|
+
}, []), /* @__PURE__ */ m("p", { className: "capitalize max-xs:hidden", children: e });
|
|
2590
2608
|
};
|
|
2591
|
-
function
|
|
2592
|
-
const { t } =
|
|
2593
|
-
(
|
|
2609
|
+
function xn(e) {
|
|
2610
|
+
const { t } = T(), { openDrawer: s } = e, { searchComponent: r } = He(), [i, n] = Z(!1), c = $((h) => {
|
|
2611
|
+
(Zs() ? h.metaKey : h.ctrlKey) && h.shiftKey && h.key.toLowerCase() === "f" && (n(!0), h.preventDefault());
|
|
2594
2612
|
}, []);
|
|
2595
2613
|
se(() => (window.addEventListener("keydown", c), () => {
|
|
2596
2614
|
window.removeEventListener("keydown", c);
|
|
2597
2615
|
}), [c]);
|
|
2598
|
-
const
|
|
2599
|
-
return /* @__PURE__ */
|
|
2600
|
-
location.pathname !== "/" && !!
|
|
2601
|
-
|
|
2616
|
+
const o = r;
|
|
2617
|
+
return /* @__PURE__ */ k(Te, { children: [
|
|
2618
|
+
location.pathname !== "/" && !!o && /* @__PURE__ */ m(
|
|
2619
|
+
o,
|
|
2602
2620
|
{
|
|
2603
2621
|
open: i,
|
|
2604
2622
|
onClose: () => n(!1)
|
|
2605
2623
|
}
|
|
2606
2624
|
),
|
|
2607
|
-
/* @__PURE__ */
|
|
2608
|
-
/* @__PURE__ */
|
|
2609
|
-
/* @__PURE__ */
|
|
2625
|
+
/* @__PURE__ */ k("header", { id: "header", className: "header", children: [
|
|
2626
|
+
/* @__PURE__ */ k("div", { className: "flex gap-2 items-center", children: [
|
|
2627
|
+
/* @__PURE__ */ m(
|
|
2610
2628
|
me,
|
|
2611
2629
|
{
|
|
2612
2630
|
type: "button",
|
|
2613
|
-
icon:
|
|
2631
|
+
icon: Ms,
|
|
2614
2632
|
onClick: s,
|
|
2615
2633
|
name: t("_accessibility:buttons.openMenu"),
|
|
2616
2634
|
"aria-label": t("_accessibility:ariaLabels.openMenu"),
|
|
2617
2635
|
className: "menu animated"
|
|
2618
2636
|
}
|
|
2619
2637
|
),
|
|
2620
|
-
/* @__PURE__ */
|
|
2638
|
+
/* @__PURE__ */ m("h1", { className: "text-lg text-text pointer-events-none poppins font-bold", children: t("_pages:home.appName") })
|
|
2621
2639
|
] }),
|
|
2622
|
-
/* @__PURE__ */
|
|
2623
|
-
/* @__PURE__ */
|
|
2640
|
+
/* @__PURE__ */ k("div", { className: "flex items-center justify-end gap-2", children: [
|
|
2641
|
+
/* @__PURE__ */ m(
|
|
2624
2642
|
me,
|
|
2625
2643
|
{
|
|
2626
|
-
icon:
|
|
2644
|
+
icon: Is,
|
|
2627
2645
|
className: "min-xs:!hidden",
|
|
2628
2646
|
onClick: () => n(!0)
|
|
2629
2647
|
}
|
|
2630
2648
|
),
|
|
2631
|
-
/* @__PURE__ */
|
|
2649
|
+
/* @__PURE__ */ m(Lr, {})
|
|
2632
2650
|
] })
|
|
2633
2651
|
] })
|
|
2634
2652
|
] });
|
|
2635
2653
|
}
|
|
2636
|
-
function
|
|
2637
|
-
const { t: e } =
|
|
2638
|
-
(
|
|
2639
|
-
if (
|
|
2640
|
-
const g = new Set(t.map((
|
|
2654
|
+
function Cn() {
|
|
2655
|
+
const { t: e } = T(), { notification: t, removeNotification: s } = Se(), [r, i] = Z(/* @__PURE__ */ new Set()), n = $(
|
|
2656
|
+
(d) => {
|
|
2657
|
+
if (d === void 0) {
|
|
2658
|
+
const g = new Set(t.map((f, x) => x));
|
|
2641
2659
|
i(g), window.setTimeout(() => s(), 300);
|
|
2642
2660
|
} else
|
|
2643
|
-
i((g) => new Set(g).add(
|
|
2661
|
+
i((g) => new Set(g).add(d)), window.setTimeout(() => s(d), 300);
|
|
2644
2662
|
},
|
|
2645
2663
|
[t, s]
|
|
2646
|
-
), c = $((
|
|
2647
|
-
switch (
|
|
2664
|
+
), c = $((d) => {
|
|
2665
|
+
switch (d) {
|
|
2648
2666
|
case j.error:
|
|
2649
|
-
return
|
|
2667
|
+
return Us;
|
|
2650
2668
|
default:
|
|
2651
|
-
return
|
|
2669
|
+
return Os;
|
|
2652
2670
|
}
|
|
2653
|
-
}, []),
|
|
2654
|
-
switch (
|
|
2671
|
+
}, []), o = $((d) => {
|
|
2672
|
+
switch (d) {
|
|
2655
2673
|
case j.success:
|
|
2656
2674
|
return "!text-success";
|
|
2657
2675
|
case j.error:
|
|
@@ -2661,8 +2679,8 @@ function xn() {
|
|
|
2661
2679
|
default:
|
|
2662
2680
|
return "!text-info";
|
|
2663
2681
|
}
|
|
2664
|
-
}, []),
|
|
2665
|
-
switch (
|
|
2682
|
+
}, []), h = $((d) => {
|
|
2683
|
+
switch (d) {
|
|
2666
2684
|
case j.success:
|
|
2667
2685
|
return "bg-bg-success";
|
|
2668
2686
|
case j.error:
|
|
@@ -2672,62 +2690,62 @@ function xn() {
|
|
|
2672
2690
|
default:
|
|
2673
2691
|
return "bg-bg-info";
|
|
2674
2692
|
}
|
|
2675
|
-
}, []), y =
|
|
2693
|
+
}, []), y = It();
|
|
2676
2694
|
return se(() => {
|
|
2677
2695
|
y.current = () => n();
|
|
2678
2696
|
}, [n]), se(() => {
|
|
2679
2697
|
if (!(t != null && t.length)) return;
|
|
2680
|
-
const
|
|
2681
|
-
var
|
|
2682
|
-
return (
|
|
2698
|
+
const d = (g) => {
|
|
2699
|
+
var f;
|
|
2700
|
+
return (f = y.current) == null ? void 0 : f.call(y, g);
|
|
2683
2701
|
};
|
|
2684
|
-
return window.addEventListener("click",
|
|
2685
|
-
window.removeEventListener("click",
|
|
2702
|
+
return window.addEventListener("click", d), () => {
|
|
2703
|
+
window.removeEventListener("click", d);
|
|
2686
2704
|
};
|
|
2687
2705
|
}, [t == null ? void 0 : t.length]), se(() => {
|
|
2688
2706
|
i(/* @__PURE__ */ new Set());
|
|
2689
|
-
}, [t]),
|
|
2690
|
-
/* @__PURE__ */
|
|
2707
|
+
}, [t]), Ut(
|
|
2708
|
+
/* @__PURE__ */ m(
|
|
2691
2709
|
"div",
|
|
2692
2710
|
{
|
|
2693
2711
|
className: `notification-portal ${t != null && t.length ? "w-screen h-screen" : ""}`,
|
|
2694
|
-
children: t != null && t.length ? t == null ? void 0 : t.map(({ id:
|
|
2712
|
+
children: t != null && t.length ? t == null ? void 0 : t.map(({ id: d, type: g, message: f }, x) => /* @__PURE__ */ k(
|
|
2695
2713
|
"div",
|
|
2696
2714
|
{
|
|
2697
|
-
className: `notification ${r.has(x) ? "closing" : ""} ${
|
|
2715
|
+
className: `notification ${r.has(x) ? "closing" : ""} ${h(
|
|
2698
2716
|
g ?? j.error
|
|
2699
2717
|
)}`,
|
|
2700
|
-
onClick: (
|
|
2718
|
+
onClick: (_) => _.stopPropagation(),
|
|
2701
2719
|
children: [
|
|
2702
|
-
/* @__PURE__ */
|
|
2703
|
-
/* @__PURE__ */
|
|
2720
|
+
/* @__PURE__ */ k("div", { className: "flex gap-3 items-center", children: [
|
|
2721
|
+
/* @__PURE__ */ m(
|
|
2704
2722
|
X,
|
|
2705
2723
|
{
|
|
2706
2724
|
icon: c(g ?? j.error),
|
|
2707
|
-
className: `${
|
|
2725
|
+
className: `${o(g ?? j.error)}`
|
|
2708
2726
|
}
|
|
2709
2727
|
),
|
|
2710
|
-
/* @__PURE__ */
|
|
2728
|
+
/* @__PURE__ */ m(
|
|
2711
2729
|
"p",
|
|
2712
2730
|
{
|
|
2713
|
-
className: `whitespace-nowrap ${
|
|
2731
|
+
className: `whitespace-nowrap ${o(
|
|
2714
2732
|
g ?? j.error
|
|
2715
2733
|
)}`,
|
|
2716
|
-
children:
|
|
2734
|
+
children: f
|
|
2717
2735
|
}
|
|
2718
2736
|
)
|
|
2719
2737
|
] }),
|
|
2720
|
-
/* @__PURE__ */
|
|
2738
|
+
/* @__PURE__ */ m(
|
|
2721
2739
|
me,
|
|
2722
2740
|
{
|
|
2723
2741
|
type: "button",
|
|
2724
|
-
icon:
|
|
2742
|
+
icon: et,
|
|
2725
2743
|
color: "error",
|
|
2726
2744
|
className: "group",
|
|
2727
|
-
onClick: (
|
|
2728
|
-
|
|
2745
|
+
onClick: (_) => {
|
|
2746
|
+
_.stopPropagation(), n(x);
|
|
2729
2747
|
},
|
|
2730
|
-
iconClassName: `${
|
|
2748
|
+
iconClassName: `${o(
|
|
2731
2749
|
g ?? j.error
|
|
2732
2750
|
)} group-hover:!text-red-400 cursor-pointer`,
|
|
2733
2751
|
name: e("_accessibility:buttons.closeNotification"),
|
|
@@ -2736,34 +2754,34 @@ function xn() {
|
|
|
2736
2754
|
)
|
|
2737
2755
|
]
|
|
2738
2756
|
},
|
|
2739
|
-
|
|
2757
|
+
d
|
|
2740
2758
|
)) : null
|
|
2741
2759
|
}
|
|
2742
2760
|
),
|
|
2743
2761
|
document.body
|
|
2744
2762
|
);
|
|
2745
2763
|
}
|
|
2746
|
-
function
|
|
2764
|
+
function lt(e) {
|
|
2747
2765
|
const {
|
|
2748
2766
|
color: t = "text-primary",
|
|
2749
2767
|
size: s = "text-xl",
|
|
2750
2768
|
className: r = "",
|
|
2751
2769
|
containerClassName: i = ""
|
|
2752
2770
|
} = e;
|
|
2753
|
-
return /* @__PURE__ */
|
|
2771
|
+
return /* @__PURE__ */ m("div", { className: i, children: /* @__PURE__ */ m(
|
|
2754
2772
|
X,
|
|
2755
2773
|
{
|
|
2756
2774
|
className: `rotate ${t} ${s} ${r}`,
|
|
2757
|
-
icon:
|
|
2775
|
+
icon: tt
|
|
2758
2776
|
}
|
|
2759
2777
|
) });
|
|
2760
2778
|
}
|
|
2761
2779
|
function _n() {
|
|
2762
|
-
return /* @__PURE__ */
|
|
2780
|
+
return /* @__PURE__ */ m("div", { className: "w-screen h-screen flex items-center justify-center overflow-hidden", children: /* @__PURE__ */ m(Ss, { className: "blur-appear" }) });
|
|
2763
2781
|
}
|
|
2764
|
-
const
|
|
2765
|
-
const { id: t, active: s, onClick: r, children: i, to: n } = e, { linkComponent: c } =
|
|
2766
|
-
return /* @__PURE__ */
|
|
2782
|
+
const Tr = (e) => {
|
|
2783
|
+
const { id: t, active: s, onClick: r, children: i, to: n } = e, { linkComponent: c } = He();
|
|
2784
|
+
return /* @__PURE__ */ m(
|
|
2767
2785
|
c,
|
|
2768
2786
|
{
|
|
2769
2787
|
to: n ?? `#${t}`,
|
|
@@ -2773,26 +2791,26 @@ const Lr = (e) => {
|
|
|
2773
2791
|
}
|
|
2774
2792
|
);
|
|
2775
2793
|
}, Dr = (e) => {
|
|
2776
|
-
var
|
|
2794
|
+
var h;
|
|
2777
2795
|
const {
|
|
2778
2796
|
tabs: t = [],
|
|
2779
2797
|
defaultTab: s,
|
|
2780
2798
|
className: r = "",
|
|
2781
2799
|
tabsContainerClassName: i = ""
|
|
2782
|
-
} = e, [n, c] = Z((
|
|
2800
|
+
} = e, [n, c] = Z((h = t[0]) == null ? void 0 : h.id), o = De(() => t.find((y) => y.id === n), [t, n]);
|
|
2783
2801
|
return se(() => {
|
|
2784
2802
|
s && c(s);
|
|
2785
|
-
}, [s]), /* @__PURE__ */
|
|
2786
|
-
/* @__PURE__ */
|
|
2803
|
+
}, [s]), /* @__PURE__ */ k("div", { className: `tabs-layout-main ${r}`, children: [
|
|
2804
|
+
/* @__PURE__ */ m(
|
|
2787
2805
|
"ul",
|
|
2788
2806
|
{
|
|
2789
2807
|
className: `horizontal tabs tabs-container ${i}`,
|
|
2790
|
-
children: t.map(({ id: y, to:
|
|
2791
|
-
|
|
2808
|
+
children: t.map(({ id: y, to: d, label: g }) => /* @__PURE__ */ m("li", { children: /* @__PURE__ */ m(
|
|
2809
|
+
Tr,
|
|
2792
2810
|
{
|
|
2793
2811
|
onClick: () => c(y),
|
|
2794
2812
|
id: y,
|
|
2795
|
-
to:
|
|
2813
|
+
to: d ?? "",
|
|
2796
2814
|
siblings: t.length > 1,
|
|
2797
2815
|
active: n === y,
|
|
2798
2816
|
children: g
|
|
@@ -2800,23 +2818,23 @@ const Lr = (e) => {
|
|
|
2800
2818
|
) }, y))
|
|
2801
2819
|
}
|
|
2802
2820
|
),
|
|
2803
|
-
|
|
2821
|
+
o == null ? void 0 : o.content
|
|
2804
2822
|
] });
|
|
2805
|
-
},
|
|
2823
|
+
}, Vr = (e) => {
|
|
2806
2824
|
const {
|
|
2807
2825
|
translation: t,
|
|
2808
2826
|
onClickNext: s,
|
|
2809
2827
|
image: r = "",
|
|
2810
2828
|
alt: i = "",
|
|
2811
2829
|
final: n = !1
|
|
2812
|
-
} = e, { setGuestMode: c } =
|
|
2813
|
-
return /* @__PURE__ */
|
|
2814
|
-
/* @__PURE__ */
|
|
2815
|
-
/* @__PURE__ */
|
|
2816
|
-
/* @__PURE__ */
|
|
2817
|
-
/* @__PURE__ */
|
|
2818
|
-
/* @__PURE__ */
|
|
2819
|
-
|
|
2830
|
+
} = e, { setGuestMode: c } = zt(), { t: o } = T();
|
|
2831
|
+
return /* @__PURE__ */ k("div", { className: "big-appear w-md flex flex-col gap-20", children: [
|
|
2832
|
+
/* @__PURE__ */ m("img", { src: r, alt: i }),
|
|
2833
|
+
/* @__PURE__ */ m("h2", { className: "text-5xl text-center leading-16", children: o(`_pages:onboarding.${t}.title`) }),
|
|
2834
|
+
/* @__PURE__ */ m("p", { className: "text-center !text-lg", children: o(`_pages:onboarding.${t}.body`) }),
|
|
2835
|
+
/* @__PURE__ */ m("div", { className: "flex gap-5 items-center justify-center", children: n ? /* @__PURE__ */ k(Te, { children: [
|
|
2836
|
+
/* @__PURE__ */ m(
|
|
2837
|
+
pe,
|
|
2820
2838
|
{
|
|
2821
2839
|
color: "primary",
|
|
2822
2840
|
className: "!px-8",
|
|
@@ -2824,52 +2842,52 @@ const Lr = (e) => {
|
|
|
2824
2842
|
onClick: () => {
|
|
2825
2843
|
c(!0), window.location.href = "/";
|
|
2826
2844
|
},
|
|
2827
|
-
"aria-label":
|
|
2828
|
-
children:
|
|
2845
|
+
"aria-label": o("_accessibility:ariaLabels.start"),
|
|
2846
|
+
children: o("_accessibility:buttons.startAsGuest")
|
|
2829
2847
|
}
|
|
2830
2848
|
),
|
|
2831
|
-
/* @__PURE__ */
|
|
2832
|
-
|
|
2849
|
+
/* @__PURE__ */ m(
|
|
2850
|
+
pe,
|
|
2833
2851
|
{
|
|
2834
2852
|
color: "primary",
|
|
2835
2853
|
variant: "submit",
|
|
2836
2854
|
className: "!px-8",
|
|
2837
|
-
"aria-label":
|
|
2855
|
+
"aria-label": o("_accessibility:ariaLabels.start"),
|
|
2838
2856
|
onClick: () => window.location.href = "/auth/sign-in",
|
|
2839
|
-
children:
|
|
2857
|
+
children: o("_accessibility:buttons.signIn")
|
|
2840
2858
|
}
|
|
2841
2859
|
)
|
|
2842
|
-
] }) : /* @__PURE__ */
|
|
2843
|
-
/* @__PURE__ */
|
|
2844
|
-
|
|
2860
|
+
] }) : /* @__PURE__ */ k(Te, { children: [
|
|
2861
|
+
/* @__PURE__ */ m(
|
|
2862
|
+
pe,
|
|
2845
2863
|
{
|
|
2846
2864
|
color: "primary",
|
|
2847
2865
|
className: "!px-8",
|
|
2848
2866
|
variant: "outlined",
|
|
2849
2867
|
onClick: () => window.location.href = "/auth/sign-in",
|
|
2850
|
-
"aria-label":
|
|
2851
|
-
children:
|
|
2868
|
+
"aria-label": o("_accessibility:ariaLabels.skip"),
|
|
2869
|
+
children: o("_accessibility:buttons.skip")
|
|
2852
2870
|
}
|
|
2853
2871
|
),
|
|
2854
|
-
/* @__PURE__ */
|
|
2855
|
-
|
|
2872
|
+
/* @__PURE__ */ m(
|
|
2873
|
+
pe,
|
|
2856
2874
|
{
|
|
2857
2875
|
color: "primary",
|
|
2858
2876
|
className: "!px-8",
|
|
2859
2877
|
variant: "outlined",
|
|
2860
2878
|
onClick: () => s(),
|
|
2861
|
-
"aria-label":
|
|
2862
|
-
children:
|
|
2879
|
+
"aria-label": o("_accessibility:ariaLabels.next"),
|
|
2880
|
+
children: o("_accessibility:buttons.next")
|
|
2863
2881
|
}
|
|
2864
2882
|
)
|
|
2865
2883
|
] }) })
|
|
2866
2884
|
] });
|
|
2867
|
-
},
|
|
2868
|
-
const { steps: t } = e, [s, r] = Z(1), i =
|
|
2885
|
+
}, Nn = (e) => {
|
|
2886
|
+
const { steps: t } = e, [s, r] = Z(1), i = De(() => t.map((n, c) => ({
|
|
2869
2887
|
id: c + 1,
|
|
2870
2888
|
label: "",
|
|
2871
|
-
content: /* @__PURE__ */
|
|
2872
|
-
|
|
2889
|
+
content: /* @__PURE__ */ m(
|
|
2890
|
+
Vr,
|
|
2873
2891
|
{
|
|
2874
2892
|
translation: n,
|
|
2875
2893
|
final: c === t.length - 1,
|
|
@@ -2877,7 +2895,7 @@ const Lr = (e) => {
|
|
|
2877
2895
|
}
|
|
2878
2896
|
)
|
|
2879
2897
|
})), [s]);
|
|
2880
|
-
return /* @__PURE__ */
|
|
2898
|
+
return /* @__PURE__ */ m("div", { className: "onboarding-main", children: /* @__PURE__ */ m(Dr, { defaultTab: s, tabs: i }) });
|
|
2881
2899
|
}, Sn = (e) => {
|
|
2882
2900
|
const {
|
|
2883
2901
|
message: t,
|
|
@@ -2885,81 +2903,82 @@ const Lr = (e) => {
|
|
|
2885
2903
|
action: r,
|
|
2886
2904
|
iconProps: i
|
|
2887
2905
|
} = e;
|
|
2888
|
-
return /* @__PURE__ */
|
|
2889
|
-
i && /* @__PURE__ */
|
|
2890
|
-
/* @__PURE__ */
|
|
2891
|
-
r && /* @__PURE__ */
|
|
2906
|
+
return /* @__PURE__ */ k("div", { className: "flex flex-col items-center justify-center gap-5 pt-5", children: [
|
|
2907
|
+
i && /* @__PURE__ */ m(X, { ...i ?? {} }),
|
|
2908
|
+
/* @__PURE__ */ m("p", { ...s ?? {}, children: t }),
|
|
2909
|
+
r && /* @__PURE__ */ m(Rt, { showTooltips: !1, showText: !0, ...r })
|
|
2892
2910
|
] });
|
|
2893
2911
|
};
|
|
2894
2912
|
export {
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2913
|
+
jt as APIClient,
|
|
2914
|
+
Rt as Action,
|
|
2915
|
+
qt as Actions,
|
|
2916
|
+
$r as ActionsDropdown,
|
|
2917
|
+
Xs as AuthClient,
|
|
2918
|
+
tn as AuthProvider,
|
|
2919
|
+
Jr as BaseClient,
|
|
2920
|
+
pe as Button,
|
|
2921
|
+
Ks as Chip,
|
|
2922
|
+
sn as ConfigProvider,
|
|
2923
|
+
yn as ConfirmationDialog,
|
|
2924
|
+
Wr as DeletableChip,
|
|
2925
|
+
at as Dialog,
|
|
2926
|
+
ct as DialogActions,
|
|
2927
|
+
bn as Drawer,
|
|
2928
|
+
Ws as Dropdown,
|
|
2910
2929
|
Sn as Empty,
|
|
2911
|
-
|
|
2912
|
-
|
|
2930
|
+
pn as Error,
|
|
2931
|
+
fn as FormContainer,
|
|
2913
2932
|
hn as FormDialog,
|
|
2914
2933
|
we as GlobalActions,
|
|
2915
|
-
|
|
2934
|
+
Gr as IManager,
|
|
2916
2935
|
me as IconButton,
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2936
|
+
gn as ImportDialog,
|
|
2937
|
+
lt as Loading,
|
|
2938
|
+
en as ManagerProvider,
|
|
2920
2939
|
Y as Methods,
|
|
2921
|
-
|
|
2922
|
-
|
|
2940
|
+
xn as Navbar,
|
|
2941
|
+
Cn as Notification,
|
|
2923
2942
|
j as NotificationEnumType,
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2943
|
+
Zr as NotificationProvider,
|
|
2944
|
+
Nn as Onboarding,
|
|
2945
|
+
wn as Page,
|
|
2946
|
+
dn as ParagraphInput,
|
|
2947
|
+
mn as PasswordInput,
|
|
2948
|
+
vn as PrettyGrid,
|
|
2930
2949
|
_n as SplashScreen,
|
|
2931
|
-
|
|
2932
|
-
|
|
2950
|
+
Vr as Step,
|
|
2951
|
+
Tr as Tab,
|
|
2933
2952
|
Dr as TabsLayout,
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2953
|
+
un as ToTop,
|
|
2954
|
+
Ys as buildQueryUrl,
|
|
2955
|
+
Yr as enumToKeyValueArray,
|
|
2956
|
+
Xr as formatForDatetimeLocal,
|
|
2957
|
+
Ht as fromLocal,
|
|
2939
2958
|
_t as getFormattedDateTime,
|
|
2940
|
-
|
|
2959
|
+
Zs as isMac,
|
|
2941
2960
|
Ae as makeRequest,
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2961
|
+
Bt as parseQueries,
|
|
2962
|
+
Ne as queryClient,
|
|
2963
|
+
Ct as removeFromLocal,
|
|
2964
|
+
xt as toLocal,
|
|
2965
|
+
zt as useAuth,
|
|
2966
|
+
He as useConfig,
|
|
2967
|
+
Jt as useConfirmationForm,
|
|
2968
|
+
Nr as useDeleteAction,
|
|
2969
|
+
nn as useDeleteDialog,
|
|
2970
|
+
is as useDialog,
|
|
2971
|
+
rn as useEditAction,
|
|
2972
|
+
kr as useExportAction,
|
|
2973
|
+
ln as useExportActionMutate,
|
|
2974
|
+
on as useFormDialog,
|
|
2975
|
+
Ar as useImportAction,
|
|
2976
|
+
cn as useImportDialog,
|
|
2977
|
+
er as useManager,
|
|
2978
|
+
Se as useNotification,
|
|
2960
2979
|
_r as usePostForm,
|
|
2961
2980
|
Sr as useRestoreAction,
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2981
|
+
an as useRestoreDialog,
|
|
2982
|
+
Er as useScrollTrigger,
|
|
2983
|
+
zr as useTimeAge
|
|
2965
2984
|
};
|