@sito/dashboard-app 0.0.3 → 0.0.4

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