@sito/dashboard-app 0.0.30 → 0.0.32

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