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