@sito/dashboard-app 0.0.52 → 0.0.53

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,13 +1,13 @@
1
1
  var et = Object.defineProperty;
2
2
  var tt = (n, e, t) => e in n ? et(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var L = (n, e, t) => tt(n, typeof e != "symbol" ? e + "" : e, t);
3
+ var A = (n, e, t) => tt(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  import "./main.css";
5
- import { State as st, inputStateClassName as nt, labelStateClassName as rt, helperTextStateClassName as it, useTranslation as N, Button as U, Loading as ne, TextInput as ot, FileInput as at, IconButton as ct, Actions as lt, ActionsDropdown as ut, useTableOptions as dt, Badge as mt, Action as ht } from "@sito/dashboard";
5
+ import { State as st, inputStateClassName as nt, labelStateClassName as rt, helperTextStateClassName as it, useTranslation as T, Button as q, Loading as ne, TextInput as ot, FileInput as at, IconButton as ct, Actions as lt, ActionsDropdown as ut, useTableOptions as dt, Badge as mt, Action as ht } from "@sito/dashboard";
6
6
  export * from "@sito/dashboard";
7
7
  import { Action as ln, Actions as un, ActionsDropdown as dn, Button as mn } from "@sito/dashboard";
8
8
  import { jsxs as k, jsx as f, Fragment as ae } from "react/jsx-runtime";
9
9
  import { FontAwesomeIcon as K } from "@fortawesome/react-fontawesome";
10
- import { forwardRef as Ae, useState as _, useCallback as w, useEffect as O, useReducer as Le, useRef as M, useMemo as Q, createContext as re, useContext as ie, useLayoutEffect as ft } from "react";
10
+ import { forwardRef as Ae, useState as L, useCallback as w, useEffect as O, useReducer as Le, useRef as M, useMemo as V, createContext as re, useContext as ie, useLayoutEffect as ft } from "react";
11
11
  import { faEyeSlash as pt, faEye as gt, faClose as _e, faTrash as yt, faRotateLeft as Re, faPencil as bt, faCircleNotch as Ie, faCloudArrowDown as wt, faCloudUpload as St, faArrowUp as kt, faArrowLeft as vt, faAdd as Ne, faFilter as Ct, faBars as Tt, faSearch as Nt, faCircleCheck as Et, faWarning as $t } from "@fortawesome/free-solid-svg-icons";
12
12
  import { createPortal as Fe } from "react-dom";
13
13
  import { QueryClient as xt, QueryClientProvider as At, useMutation as Z, useQueryClient as J, useQuery as Oe } from "@tanstack/react-query";
@@ -26,14 +26,14 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
26
26
  required: l = !1,
27
27
  containerClassName: d = "",
28
28
  inputClassName: m = "",
29
- labelClassName: h = "",
30
- helperText: p = "",
29
+ labelClassName: p = "",
30
+ helperText: h = "",
31
31
  helperTextClassName: y = "",
32
32
  ...g
33
- } = n, b = t !== void 0, [S, E] = _(
33
+ } = n, b = t !== void 0, [S, E] = L(
34
34
  () => Ee(s)
35
- ), v = b ? Ee(t) : S, $ = (j) => {
36
- b || E(j.currentTarget.value.length > 0), r == null || r(j);
35
+ ), x = b ? Ee(t) : S, N = (U) => {
36
+ b || E(U.currentTarget.value.length > 0), r == null || r(U);
37
37
  };
38
38
  return /* @__PURE__ */ k("div", { className: `form-paragraph-container group ${d}`, children: [
39
39
  /* @__PURE__ */ f(
@@ -42,11 +42,11 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
42
42
  ref: e,
43
43
  name: o,
44
44
  id: c,
45
- className: `text-input text-area form-paragraph-textarea peer ${nt(i)} ${v ? "has-value" : ""} ${g.placeholder ? "has-placeholder" : ""} ${m}`,
45
+ className: `text-input text-area form-paragraph-textarea peer ${nt(i)} ${x ? "has-value" : ""} ${g.placeholder ? "has-placeholder" : ""} ${m}`,
46
46
  required: l,
47
47
  defaultValue: s,
48
48
  ...b ? { value: t } : {},
49
- onChange: $,
49
+ onChange: N,
50
50
  disabled: u,
51
51
  ...g
52
52
  }
@@ -55,23 +55,23 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
55
55
  "label",
56
56
  {
57
57
  htmlFor: c,
58
- className: `text-input-label ${rt(i)} ${h}`,
58
+ className: `text-input-label ${rt(i)} ${p}`,
59
59
  children: [
60
60
  a,
61
61
  l ? " *" : ""
62
62
  ]
63
63
  }
64
64
  ),
65
- !!p && /* @__PURE__ */ f(
65
+ !!h && /* @__PURE__ */ f(
66
66
  "p",
67
67
  {
68
68
  className: `text-input-helper-text ${it(i)} ${y}`,
69
- children: p
69
+ children: h
70
70
  }
71
71
  )
72
72
  ] });
73
73
  }), ws = (n) => {
74
- const { t: e } = N(), {
74
+ const { t: e } = T(), {
75
75
  children: t,
76
76
  handleSubmit: s,
77
77
  onSubmit: r,
@@ -83,7 +83,7 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
83
83
  t,
84
84
  /* @__PURE__ */ k("div", { className: `form-actions ${o ? "end" : ""}`, children: [
85
85
  /* @__PURE__ */ k(
86
- U,
86
+ q,
87
87
  {
88
88
  type: "submit",
89
89
  color: "primary",
@@ -105,7 +105,7 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
105
105
  }
106
106
  ),
107
107
  /* @__PURE__ */ f(
108
- U,
108
+ q,
109
109
  {
110
110
  type: "button",
111
111
  variant: "outlined",
@@ -118,7 +118,7 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
118
118
  ] })
119
119
  ] });
120
120
  }, Ss = Ae(function(n, e) {
121
- const { t } = N(), [s, r] = _(!1);
121
+ const { t } = T(), [s, r] = L(!1);
122
122
  return /* @__PURE__ */ f(ot, { ...n, type: s ? "text" : "password", ref: e, children: /* @__PURE__ */ f(
123
123
  G,
124
124
  {
@@ -133,7 +133,7 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
133
133
  }
134
134
  ) });
135
135
  }), ke = (n) => {
136
- const { t: e } = N(), {
136
+ const { t: e } = T(), {
137
137
  title: t,
138
138
  children: s,
139
139
  handleClose: r,
@@ -215,8 +215,9 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
215
215
  alignEnd: l = !1,
216
216
  primaryName: d,
217
217
  primaryAriaLabel: m,
218
- cancelName: h,
219
- cancelAriaLabel: p
218
+ cancelName: p,
219
+ cancelAriaLabel: h,
220
+ extraActions: y = []
220
221
  } = n;
221
222
  return /* @__PURE__ */ k(
222
223
  "div",
@@ -224,7 +225,7 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
224
225
  className: `dialog-actions ${l ? "end" : ""} ${a}`,
225
226
  children: [
226
227
  /* @__PURE__ */ k(
227
- U,
228
+ q,
228
229
  {
229
230
  type: c,
230
231
  color: "primary",
@@ -247,15 +248,16 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
247
248
  ]
248
249
  }
249
250
  ),
251
+ y == null ? void 0 : y.map((g) => /* @__PURE__ */ f(q, { ...g }, g.id)),
250
252
  /* @__PURE__ */ f(
251
- U,
253
+ q,
252
254
  {
253
255
  type: "button",
254
256
  variant: "outlined",
255
257
  disabled: o,
256
258
  onClick: r,
257
- name: h,
258
- "aria-label": p,
259
+ name: p,
260
+ "aria-label": h,
259
261
  children: t
260
262
  }
261
263
  )
@@ -263,16 +265,17 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
263
265
  }
264
266
  );
265
267
  }, ks = (n) => {
266
- const { t: e } = N(), {
268
+ const { t: e } = T(), {
267
269
  children: t,
268
270
  handleSubmit: s,
269
271
  onSubmit: r,
270
272
  handleClose: i,
271
273
  isLoading: o = !1,
272
274
  buttonEnd: c = !0,
273
- ...a
275
+ extraActions: a = [],
276
+ ...u
274
277
  } = n;
275
- return /* @__PURE__ */ f(ke, { ...a, handleClose: i, children: /* @__PURE__ */ k("form", { onSubmit: s(r), children: [
278
+ return /* @__PURE__ */ f(ke, { ...u, handleClose: i, children: /* @__PURE__ */ k("form", { onSubmit: s(r), children: [
276
279
  /* @__PURE__ */ f("div", { className: "form-container", children: t }),
277
280
  /* @__PURE__ */ f(
278
281
  ve,
@@ -288,19 +291,21 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
288
291
  primaryName: e("_accessibility:buttons.submit"),
289
292
  primaryAriaLabel: e("_accessibility:ariaLabels.submit"),
290
293
  cancelName: e("_accessibility:buttons.cancel"),
291
- cancelAriaLabel: e("_accessibility:ariaLabels.cancel")
294
+ cancelAriaLabel: e("_accessibility:ariaLabels.cancel"),
295
+ extraActions: a
292
296
  }
293
297
  )
294
298
  ] }) });
295
299
  }, vs = (n) => {
296
- const { t: e } = N(), {
300
+ const { t: e } = T(), {
297
301
  children: t,
298
302
  handleSubmit: s,
299
303
  handleClose: r,
300
304
  isLoading: i = !1,
301
- ...o
305
+ extraActions: o = [],
306
+ ...c
302
307
  } = n;
303
- return /* @__PURE__ */ k(ke, { ...o, handleClose: r, children: [
308
+ return /* @__PURE__ */ k(ke, { ...c, handleClose: r, children: [
304
309
  t,
305
310
  /* @__PURE__ */ f(
306
311
  ve,
@@ -316,19 +321,20 @@ const Ee = (n) => n == null ? !1 : `${n}`.length > 0, bs = Ae(function(n, e) {
316
321
  primaryName: e("_accessibility:buttons.ok"),
317
322
  primaryAriaLabel: e("_accessibility:ariaLabels.ok"),
318
323
  cancelName: e("_accessibility:buttons.cancel"),
319
- cancelAriaLabel: e("_accessibility:ariaLabels.cancel")
324
+ cancelAriaLabel: e("_accessibility:ariaLabels.cancel"),
325
+ extraActions: o
320
326
  }
321
327
  )
322
328
  ] });
323
329
  };
324
330
  function _t(n) {
325
- const { message: e, className: t = "" } = n, { t: s } = N();
331
+ const { message: e, className: t = "" } = n, { t: s } = T();
326
332
  return /* @__PURE__ */ f("p", { className: `import-error-message ${t}`, children: e ?? s("_messages:errors.parseFile", {
327
333
  defaultValue: "Failed to process file"
328
334
  }) });
329
335
  }
330
336
  function Rt(n) {
331
- const { message: e, className: t = "" } = n, { t: s } = N();
337
+ const { message: e, className: t = "" } = n, { t: s } = T();
332
338
  return /* @__PURE__ */ k("div", { className: `import-loading ${t}`, children: [
333
339
  /* @__PURE__ */ f(ne, { loaderClass: "w-5 h-5", className: "!w-auto" }),
334
340
  /* @__PURE__ */ f("span", { children: e ?? s("_messages:loading.processingFile", {
@@ -337,7 +343,7 @@ function Rt(n) {
337
343
  ] });
338
344
  }
339
345
  function It(n) {
340
- const { items: e, max: t = 5, className: s = "" } = n, { t: r } = N();
346
+ const { items: e, max: t = 5, className: s = "" } = n, { t: r } = T();
341
347
  if (!e || e.length === 0) return null;
342
348
  const i = e.slice(0, t);
343
349
  return /* @__PURE__ */ k("div", { className: `import-preview ${s}`, children: [
@@ -389,7 +395,7 @@ function Ft(n, e) {
389
395
  }
390
396
  }
391
397
  const Cs = (n) => {
392
- const { t: e } = N(), {
398
+ const { t: e } = T(), {
393
399
  children: t,
394
400
  handleSubmit: s,
395
401
  handleClose: r,
@@ -399,72 +405,73 @@ const Cs = (n) => {
399
405
  renderCustomPreview: a,
400
406
  onOverrideChange: u,
401
407
  open: l,
402
- ...d
403
- } = n, [m, h] = Le(
408
+ extraActions: d = [],
409
+ ...m
410
+ } = n, [p, h] = Le(
404
411
  Ft,
405
412
  De()
406
413
  ), {
407
- file: p,
408
- previewItems: y,
409
- parseError: g,
410
- processing: b,
411
- overrideExisting: S,
412
- inputKey: E
413
- } = m, v = M(c), $ = M(o);
414
+ file: y,
415
+ previewItems: g,
416
+ parseError: b,
417
+ processing: S,
418
+ overrideExisting: E,
419
+ inputKey: x
420
+ } = p, N = M(c), U = M(o);
414
421
  O(() => {
415
- v.current = c;
422
+ N.current = c;
416
423
  }, [c]), O(() => {
417
- $.current = o;
424
+ U.current = o;
418
425
  }, [o]), O(() => {
419
426
  l || h({ type: "RESET" });
420
427
  }, [l]);
421
- const j = w(
422
- async (I, C) => {
423
- var A;
424
- if ($.current) {
428
+ const H = w(
429
+ async (v, $) => {
430
+ var _;
431
+ if (U.current) {
425
432
  h({ type: "START_PROCESSING" });
426
433
  try {
427
- const x = await $.current(I, { override: C });
428
- h({ type: "SET_PREVIEW", items: x ?? [] }), (A = v.current) == null || A.call(v, x ?? []);
429
- } catch (x) {
430
- console.error(x);
431
- const q = x instanceof Error ? x.message : "Failed to parse file";
432
- h({ type: "SET_ERROR", message: q });
434
+ const R = await U.current(v, { override: $ });
435
+ h({ type: "SET_PREVIEW", items: R ?? [] }), (_ = N.current) == null || _.call(N, R ?? []);
436
+ } catch (R) {
437
+ console.error(R);
438
+ const j = R instanceof Error ? R.message : "Failed to parse file";
439
+ h({ type: "SET_ERROR", message: j });
433
440
  }
434
441
  }
435
442
  },
436
443
  []
437
444
  );
438
- return /* @__PURE__ */ k(ke, { ...d, open: l, handleClose: r, children: [
445
+ return /* @__PURE__ */ k(ke, { ...m, open: l, handleClose: r, children: [
439
446
  /* @__PURE__ */ f(
440
447
  at,
441
448
  {
442
449
  onClear: () => {
443
- var I;
444
- h({ type: "SET_FILE", file: null }), (I = v.current) == null || I.call(v, []);
450
+ var v;
451
+ h({ type: "SET_FILE", file: null }), (v = N.current) == null || v.call(N, []);
445
452
  },
446
- onChange: (I) => {
447
- var A, x;
448
- const C = (A = I.target.files) == null ? void 0 : A[0];
449
- if (!C) {
450
- h({ type: "SET_FILE", file: null }), (x = v.current) == null || x.call(v, []);
453
+ onChange: (v) => {
454
+ var _, R;
455
+ const $ = (_ = v.target.files) == null ? void 0 : _[0];
456
+ if (!$) {
457
+ h({ type: "SET_FILE", file: null }), (R = N.current) == null || R.call(N, []);
451
458
  return;
452
459
  }
453
- h({ type: "SET_FILE", file: C }), j(C, S);
460
+ h({ type: "SET_FILE", file: $ }), H($, E);
454
461
  },
455
462
  label: e("_accessibility:labels.file")
456
463
  },
457
- E
464
+ x
458
465
  ),
459
466
  /* @__PURE__ */ k("label", { className: "import-override-label", children: [
460
467
  /* @__PURE__ */ f(
461
468
  "input",
462
469
  {
463
470
  type: "checkbox",
464
- checked: S,
465
- onChange: (I) => {
466
- const C = I.target.checked;
467
- h({ type: "SET_OVERRIDE", value: C }), u == null || u(C), p && j(p, C);
471
+ checked: E,
472
+ onChange: (v) => {
473
+ const $ = v.target.checked;
474
+ h({ type: "SET_OVERRIDE", value: $ }), u == null || u($), y && H(y, $);
468
475
  }
469
476
  }
470
477
  ),
@@ -472,9 +479,9 @@ const Cs = (n) => {
472
479
  defaultValue: "Override existing items"
473
480
  }) })
474
481
  ] }),
475
- /* @__PURE__ */ f(_t, { message: g }),
476
- b && /* @__PURE__ */ f(Rt, {}),
477
- a ? a(y) : !!y && y.length > 0 && /* @__PURE__ */ f(It, { items: y }),
482
+ /* @__PURE__ */ f(_t, { message: b }),
483
+ S && /* @__PURE__ */ f(Rt, {}),
484
+ a ? a(g) : !!g && g.length > 0 && /* @__PURE__ */ f(It, { items: g }),
478
485
  t,
479
486
  /* @__PURE__ */ f(
480
487
  ve,
@@ -482,7 +489,7 @@ const Cs = (n) => {
482
489
  primaryText: e("_accessibility:buttons.ok"),
483
490
  cancelText: e("_accessibility:buttons.cancel"),
484
491
  onPrimaryClick: () => {
485
- (!o || !!y && y.length > 0) && s();
492
+ (!o || !!g && g.length > 0) && s();
486
493
  },
487
494
  onCancel: r,
488
495
  isLoading: i,
@@ -491,12 +498,13 @@ const Cs = (n) => {
491
498
  primaryName: e("_accessibility:buttons.ok"),
492
499
  primaryAriaLabel: e("_accessibility:ariaLabels.ok"),
493
500
  cancelName: e("_accessibility:buttons.cancel"),
494
- cancelAriaLabel: e("_accessibility:ariaLabels.cancel")
501
+ cancelAriaLabel: e("_accessibility:ariaLabels.cancel"),
502
+ extraActions: d
495
503
  }
496
504
  )
497
505
  ] });
498
506
  };
499
- var R = /* @__PURE__ */ ((n) => (n[n.success = 0] = "success", n[n.error = 1] = "error", n[n.warning = 2] = "warning", n[n.info = 3] = "info", n))(R || {}), F = /* @__PURE__ */ ((n) => (n.GET = "GET", n.POST = "POST", n.PUT = "PUT", n.PATCH = "PATCH", n.DELETE = "DELETE", n))(F || {});
507
+ var I = /* @__PURE__ */ ((n) => (n[n.success = 0] = "success", n[n.error = 1] = "error", n[n.warning = 2] = "warning", n[n.info = 3] = "info", n))(I || {}), F = /* @__PURE__ */ ((n) => (n.GET = "GET", n.POST = "POST", n.PUT = "PUT", n.PATCH = "PATCH", n.DELETE = "DELETE", n))(F || {});
500
508
  const Ot = (n) => Array.isArray(n) || n instanceof Headers ? !1 : typeof n == "object" && n !== null && ("headers" in n || "credentials" in n), Mt = (n) => n ? Ot(n) ? n : { headers: n } : {}, Dt = (n) => n ? n instanceof Headers ? Object.fromEntries(n.entries()) : Array.isArray(n) ? Object.fromEntries(n) : n : {};
501
509
  async function be(n, e = "GET", t, s) {
502
510
  const r = Mt(s), i = {
@@ -581,15 +589,15 @@ const Pe = (n, e, t) => {
581
589
  * @param tokenAcquirer custom token acquirer
582
590
  */
583
591
  constructor(e, t = "user", s = !0, r, i = {}) {
584
- L(this, "baseUrl");
585
- L(this, "userKey");
586
- L(this, "rememberKey");
587
- L(this, "refreshTokenKey");
588
- L(this, "accessTokenExpiresAtKey");
589
- L(this, "refreshEndpoint");
590
- L(this, "refreshExpirySkewMs");
591
- L(this, "secured");
592
- L(this, "tokenAcquirer");
592
+ A(this, "baseUrl");
593
+ A(this, "userKey");
594
+ A(this, "rememberKey");
595
+ A(this, "refreshTokenKey");
596
+ A(this, "accessTokenExpiresAtKey");
597
+ A(this, "refreshEndpoint");
598
+ A(this, "refreshExpirySkewMs");
599
+ A(this, "secured");
600
+ A(this, "tokenAcquirer");
593
601
  this.baseUrl = e, this.secured = s, this.userKey = t, this.rememberKey = i.rememberKey ?? "remember", this.refreshTokenKey = i.refreshTokenKey ?? "refreshToken", this.accessTokenExpiresAtKey = i.accessTokenExpiresAtKey ?? "accessTokenExpiresAt", this.refreshEndpoint = i.refreshEndpoint ?? "auth/refresh", this.refreshExpirySkewMs = i.refreshExpirySkewMs ?? 5e3, this.tokenAcquirer = r ?? this.defaultTokenAcquirer;
594
602
  }
595
603
  defaultTokenAcquirer(e) {
@@ -805,11 +813,11 @@ const Pe = (n, e, t) => {
805
813
  return r;
806
814
  }
807
815
  };
808
- L(se, "refreshInFlight", /* @__PURE__ */ new Map());
816
+ A(se, "refreshInFlight", /* @__PURE__ */ new Map());
809
817
  let me = se;
810
818
  class Kt {
811
819
  constructor(e, t = "user", s = {}) {
812
- L(this, "api");
820
+ A(this, "api");
813
821
  this.api = new me(e, t, !1, void 0, s);
814
822
  }
815
823
  async login(e) {
@@ -856,7 +864,7 @@ class Kt {
856
864
  }
857
865
  class Ts {
858
866
  constructor(e, t, s = {}) {
859
- L(this, "auth");
867
+ A(this, "auth");
860
868
  this.auth = new Kt(e, t, s);
861
869
  }
862
870
  /**
@@ -873,9 +881,9 @@ class Ns {
873
881
  * @param secured to see if the api client requires jwt protection
874
882
  */
875
883
  constructor(e, t, s = "user", r = !0, i = {}) {
876
- L(this, "table");
877
- L(this, "secured");
878
- L(this, "api");
884
+ A(this, "table");
885
+ A(this, "secured");
886
+ A(this, "api");
879
887
  this.table = e, this.secured = r, this.api = new me(t, s, r, void 0, i);
880
888
  }
881
889
  /**
@@ -971,10 +979,10 @@ class Ns {
971
979
  }
972
980
  class Es {
973
981
  constructor(e, t, s = 1) {
974
- L(this, "table");
975
- L(this, "dbName");
976
- L(this, "version");
977
- L(this, "db", null);
982
+ A(this, "table");
983
+ A(this, "dbName");
984
+ A(this, "version");
985
+ A(this, "db", null);
978
986
  this.table = e, this.dbName = t, this.version = s;
979
987
  }
980
988
  close() {
@@ -1025,10 +1033,10 @@ class Es {
1025
1033
  return await this.request(i.put(r)), r;
1026
1034
  }
1027
1035
  async get(e, t) {
1028
- var h;
1029
- const s = await this.transaction("readonly"), r = await this.request(s.getAll()), i = this.applyFilter(r, t), o = (e == null ? void 0 : e.sortingBy) ?? "id", c = ((h = e == null ? void 0 : e.sortingOrder) == null ? void 0 : h.toLowerCase()) ?? "asc";
1030
- i.sort((p, y) => {
1031
- const g = p[o], b = y[o];
1036
+ var p;
1037
+ const s = await this.transaction("readonly"), r = await this.request(s.getAll()), i = this.applyFilter(r, t), o = (e == null ? void 0 : e.sortingBy) ?? "id", c = ((p = e == null ? void 0 : e.sortingOrder) == null ? void 0 : p.toLowerCase()) ?? "asc";
1038
+ i.sort((h, y) => {
1039
+ const g = h[o], b = y[o];
1032
1040
  return g < b ? c === "asc" ? -1 : 1 : g > b ? c === "asc" ? 1 : -1 : 0;
1033
1041
  });
1034
1042
  const a = (e == null ? void 0 : e.pageSize) ?? 10, u = (e == null ? void 0 : e.currentPage) ?? 0, l = i.length, d = Math.ceil(l / a), m = i.slice(
@@ -1182,9 +1190,9 @@ const Ke = re(
1182
1190
  );
1183
1191
  function Rs(n) {
1184
1192
  const { children: e } = n, t = M(0), [s, r] = Le(
1185
- (m, h) => {
1186
- const { type: p, items: y, id: g } = h;
1187
- switch (p) {
1193
+ (m, p) => {
1194
+ const { type: h, items: y, id: g } = p;
1195
+ switch (h) {
1188
1196
  case "set":
1189
1197
  return y ?? [];
1190
1198
  case "remove":
@@ -1194,10 +1202,10 @@ function Rs(n) {
1194
1202
  },
1195
1203
  [],
1196
1204
  () => []
1197
- ), i = (m) => m.map((h) => ({ ...h, id: t.current++ })), o = w(
1205
+ ), i = (m) => m.map((p) => ({ ...p, id: t.current++ })), o = w(
1198
1206
  (m) => r({
1199
1207
  type: "set",
1200
- items: i([{ ...m, type: R.error }])
1208
+ items: i([{ ...m, type: I.error }])
1201
1209
  }),
1202
1210
  []
1203
1211
  ), c = w(
@@ -1209,10 +1217,10 @@ function Rs(n) {
1209
1217
  ), u = w(
1210
1218
  (m) => r({
1211
1219
  type: "set",
1212
- items: i([{ ...m, type: R.success }])
1220
+ items: i([{ ...m, type: I.success }])
1213
1221
  }),
1214
1222
  []
1215
- ), l = (m) => r({ type: "remove", id: m }), d = Q(() => ({
1223
+ ), l = (m) => r({ type: "remove", id: m }), d = V(() => ({
1216
1224
  notification: s,
1217
1225
  removeNotification: l,
1218
1226
  showErrorNotification: o,
@@ -1248,7 +1256,7 @@ const ee = () => {
1248
1256
  }), Is = qe(), Ue = re(
1249
1257
  void 0
1250
1258
  ), Fs = (n) => {
1251
- const { children: e, manager: t, queryClient: s } = n, [r] = _(qe), i = s ?? r;
1259
+ const { children: e, manager: t, queryClient: s } = n, [r] = L(qe), i = s ?? r;
1252
1260
  return /* @__PURE__ */ f(Ue.Provider, { value: { client: t }, children: /* @__PURE__ */ f(At, { client: i, children: e }) });
1253
1261
  }, Ut = () => {
1254
1262
  const n = ie(Ue);
@@ -1265,21 +1273,21 @@ const ee = () => {
1265
1273
  remember: r = "remember",
1266
1274
  refreshTokenKey: i = "refreshToken",
1267
1275
  accessTokenExpiresAtKey: o = "accessTokenExpiresAt"
1268
- } = n, c = Ut(), [a, u] = _({}), l = w(() => {
1276
+ } = n, c = Ut(), [a, u] = L({}), l = w(() => {
1269
1277
  P(s), P(r), P(i), P(o);
1270
1278
  }, [o, i, r, s]), d = w(() => !!X(t, "boolean") && a.token === void 0, [a.token, t]), m = w(
1271
1279
  (b) => {
1272
1280
  W(t, b);
1273
1281
  },
1274
1282
  [t]
1275
- ), h = w(
1283
+ ), p = w(
1276
1284
  (b, S) => {
1277
1285
  if (!b) return;
1278
- const E = X(r, "boolean"), v = S ?? (typeof E == "boolean" ? E : !1);
1279
- u(b), P(t), W(s, b.token), W(r, v), typeof b.refreshToken == "string" && b.refreshToken.length ? W(i, b.refreshToken) : P(i), typeof b.accessTokenExpiresAt == "string" && b.accessTokenExpiresAt.length ? W(o, b.accessTokenExpiresAt) : P(o);
1286
+ const E = X(r, "boolean"), x = S ?? (typeof E == "boolean" ? E : !1);
1287
+ u(b), P(t), W(s, b.token), W(r, x), typeof b.refreshToken == "string" && b.refreshToken.length ? W(i, b.refreshToken) : P(i), typeof b.accessTokenExpiresAt == "string" && b.accessTokenExpiresAt.length ? W(o, b.accessTokenExpiresAt) : P(o);
1280
1288
  },
1281
1289
  [o, t, i, r, s]
1282
- ), p = w(async () => {
1290
+ ), h = w(async () => {
1283
1291
  const b = X(s) ?? a.token, S = X(i) ?? (typeof a.refreshToken == "string" ? a.refreshToken : void 0);
1284
1292
  try {
1285
1293
  await c.Auth.logout({
@@ -1300,21 +1308,21 @@ const ee = () => {
1300
1308
  ]), y = w(async () => {
1301
1309
  try {
1302
1310
  const b = await c.Auth.getSession();
1303
- h(b);
1311
+ p(b);
1304
1312
  } catch (b) {
1305
- console.error(b), p();
1313
+ console.error(b), h();
1306
1314
  }
1307
- }, [h, p, c.Auth]), g = Q(() => ({
1315
+ }, [p, h, c.Auth]), g = V(() => ({
1308
1316
  account: a,
1309
- logUser: h,
1310
- logoutUser: p,
1317
+ logUser: p,
1318
+ logoutUser: h,
1311
1319
  logUserFromLocal: y,
1312
1320
  isInGuestMode: d,
1313
1321
  setGuestMode: m
1314
1322
  }), [
1315
1323
  a,
1316
- h,
1317
1324
  p,
1325
+ h,
1318
1326
  y,
1319
1327
  d,
1320
1328
  m
@@ -1351,7 +1359,7 @@ const ee = () => {
1351
1359
  }, Ve = re(
1352
1360
  jt
1353
1361
  ), Ds = (n) => {
1354
- const { children: e } = n, [t, s] = _({}), r = w(
1362
+ const { children: e } = n, [t, s] = L({}), r = w(
1355
1363
  (a, u) => s((l) => ({
1356
1364
  ...l,
1357
1365
  [a]: [...l[a] ?? [], u]
@@ -1368,7 +1376,7 @@ const ee = () => {
1368
1376
  ...u,
1369
1377
  [a]: []
1370
1378
  }) : {});
1371
- }, []), c = Q(
1379
+ }, []), c = V(
1372
1380
  () => ({
1373
1381
  dynamicItems: t,
1374
1382
  addChildItem: r,
@@ -1386,7 +1394,7 @@ const ee = () => {
1386
1394
  );
1387
1395
  }, Ht = () => ie(Ve);
1388
1396
  function Ps(n) {
1389
- const { t: e } = N(), { open: t, onClose: s, menuMap: r, logo: i } = n, { account: o } = He(), { dynamicItems: c } = Ht(), { linkComponent: a, location: u } = ce(), l = a, d = Q(() => r.filter((g) => {
1397
+ const { t: e } = T(), { open: t, onClose: s, menuMap: r, logo: i } = n, { account: o } = He(), { dynamicItems: c } = Ht(), { linkComponent: a, location: u } = ce(), l = a, d = V(() => r.filter((g) => {
1390
1398
  const b = g.auth, S = !!(o != null && o.email);
1391
1399
  return b == null || b && S || !b && !S;
1392
1400
  }), [o == null ? void 0 : o.email, r]), m = w(
@@ -1398,14 +1406,14 @@ function Ps(n) {
1398
1406
  O(() => (document.addEventListener("keydown", m), () => {
1399
1407
  document.removeEventListener("keydown", m);
1400
1408
  }), [m]);
1401
- const h = w(
1409
+ const p = w(
1402
1410
  (g, b) => b ? g === `${u.pathname}${u.search}` : g === u.pathname,
1403
1411
  [u.pathname, u.search]
1404
- ), p = w(
1412
+ ), h = w(
1405
1413
  (g) => /* @__PURE__ */ f(
1406
1414
  "li",
1407
1415
  {
1408
- className: `drawer-list-item-child ${h(g.path, !0) ? "active" : ""} animated`,
1416
+ className: `drawer-list-item-child ${p(g.path, !0) ? "active" : ""} animated`,
1409
1417
  children: g.path ? /* @__PURE__ */ f(
1410
1418
  l,
1411
1419
  {
@@ -1421,12 +1429,12 @@ function Ps(n) {
1421
1429
  },
1422
1430
  g.id
1423
1431
  ),
1424
- [l, t, e, h]
1425
- ), y = Q(() => d.map((g, b) => {
1426
- const S = g.page ?? String(b), E = `drawer-list-item ${h(g.path) ? "active" : ""} animated`;
1432
+ [l, t, e, p]
1433
+ ), y = V(() => d.map((g, b) => {
1434
+ const S = g.page ?? String(b), E = `drawer-list-item ${p(g.path) ? "active" : ""} animated`;
1427
1435
  if (g.type === "divider")
1428
1436
  return /* @__PURE__ */ f("li", { className: E, children: /* @__PURE__ */ f("hr", { className: "drawer-divider" }) }, S);
1429
- const v = g.children ?? (g.page && c ? c[g.page] : null);
1437
+ const x = g.children ?? (g.page && c ? c[g.page] : null);
1430
1438
  return /* @__PURE__ */ k("li", { className: E, children: [
1431
1439
  /* @__PURE__ */ k(
1432
1440
  l,
@@ -1443,9 +1451,9 @@ function Ps(n) {
1443
1451
  ]
1444
1452
  }
1445
1453
  ),
1446
- v && /* @__PURE__ */ f("ul", { className: "drawer-children-list", children: v.map(p) })
1454
+ x && /* @__PURE__ */ f("ul", { className: "drawer-children-list", children: x.map(h) })
1447
1455
  ] }, S);
1448
- }), [l, c, h, t, d, p, e]);
1456
+ }), [l, c, p, t, d, h, e]);
1449
1457
  return /* @__PURE__ */ f(
1450
1458
  "div",
1451
1459
  {
@@ -1496,8 +1504,8 @@ function Qt() {
1496
1504
  }), r = (c, a, u, l = "/", d = "Lax") => {
1497
1505
  var m = /* @__PURE__ */ new Date();
1498
1506
  m.setTime(m.getTime() + a * 24 * 60 * 60 * 1e3);
1499
- const h = "; expires=" + m.toUTCString();
1500
- document.cookie = `${c}=${u || ""}${h};path=${l};SameSite=${d}`;
1507
+ const p = "; expires=" + m.toUTCString();
1508
+ document.cookie = `${c}=${u || ""}${p};path=${l};SameSite=${d}`;
1501
1509
  }, i = (c) => {
1502
1510
  const a = `${c}=`, l = decodeURIComponent(document.cookie).split(";");
1503
1511
  for (let d = 0; d < l.length; d += 1) {
@@ -1521,11 +1529,11 @@ function Qt() {
1521
1529
  }
1522
1530
  var Vt = Qt();
1523
1531
  function Ks() {
1524
- const { t: n, language: e } = N();
1532
+ const { t: n, language: e } = T();
1525
1533
  return { timeAge: w(
1526
1534
  (s) => {
1527
- const i = /* @__PURE__ */ new Date() - s, o = Math.floor(i / (1e3 * 60)), c = Math.floor(o / 60), a = e === "es", u = n("_accessibility:labels.ago"), l = n("_accessibility:labels.minute"), d = n("_accessibility:labels.minutes"), m = n("_accessibility:labels.hour"), h = n("_accessibility:labels.hours"), p = n("_accessibility:labels.yesterday"), y = n("_accessibility:labels.justNow");
1528
- return i < 1e3 * 60 ? y : o < 60 ? `${a ? u : ""} ${o} ${o === 1 ? l : d} ${a ? "" : u}` : c < 24 ? `${a ? u : ""} ${c} ${c === 1 ? m : h} ${a ? "" : u}` : c < 48 ? p : s.toLocaleDateString(navigator.language || "es-ES", {
1535
+ const i = /* @__PURE__ */ new Date() - s, o = Math.floor(i / (1e3 * 60)), c = Math.floor(o / 60), a = e === "es", u = n("_accessibility:labels.ago"), l = n("_accessibility:labels.minute"), d = n("_accessibility:labels.minutes"), m = n("_accessibility:labels.hour"), p = n("_accessibility:labels.hours"), h = n("_accessibility:labels.yesterday"), y = n("_accessibility:labels.justNow");
1536
+ return i < 1e3 * 60 ? y : o < 60 ? `${a ? u : ""} ${o} ${o === 1 ? l : d} ${a ? "" : u}` : c < 24 ? `${a ? u : ""} ${c} ${c === 1 ? m : p} ${a ? "" : u}` : c < 48 ? h : s.toLocaleDateString(navigator.language || "es-ES", {
1529
1537
  day: "2-digit",
1530
1538
  month: "2-digit",
1531
1539
  year: "numeric"
@@ -1535,26 +1543,26 @@ function Ks() {
1535
1543
  ) };
1536
1544
  }
1537
1545
  const Be = (n) => {
1538
- const { showSuccessNotification: e } = ee(), { mutationFn: t, onError: s, onSuccess: r, onSuccessMessage: i } = n, [o, c] = _([]), { open: a, handleClose: u, handleOpen: l } = We(), d = () => {
1546
+ const { showSuccessNotification: e } = ee(), { mutationFn: t, onError: s, onSuccess: r, onSuccessMessage: i } = n, [o, c] = L([]), { open: a, handleClose: u, handleOpen: l } = We(), d = () => {
1539
1547
  u(), c([]);
1540
- }, m = async (p) => {
1541
- c(p), l();
1542
- }, h = Z({
1548
+ }, m = async (h) => {
1549
+ c(h), l();
1550
+ }, p = Z({
1543
1551
  mutationFn: () => t(
1544
1552
  Array.isArray(o) ? o : [o]
1545
1553
  ),
1546
- onError: (p) => {
1547
- console.error(p), s && s(p), d();
1554
+ onError: (h) => {
1555
+ console.error(h), s && s(h), d();
1548
1556
  },
1549
- onSuccess: async (p) => {
1550
- r && r(p), e({
1557
+ onSuccess: async (h) => {
1558
+ r && r(h), e({
1551
1559
  message: i
1552
1560
  }), d();
1553
1561
  }
1554
1562
  });
1555
- return { open: a, onClick: m, close: d, dialogFn: h, isLoading: h.isPending };
1563
+ return { open: a, onClick: m, close: d, dialogFn: p, isLoading: p.isPending };
1556
1564
  }, qs = (n) => {
1557
- const { t: e } = N(), {
1565
+ const { t: e } = T(), {
1558
1566
  showStackNotifications: t,
1559
1567
  showSuccessNotification: s,
1560
1568
  showErrorNotification: r
@@ -1566,78 +1574,78 @@ const Be = (n) => {
1566
1574
  onSuccess: l,
1567
1575
  queryKey: d,
1568
1576
  onSuccessMessage: m
1569
- } = n, { control: h, handleSubmit: p, reset: y, setError: g, getValues: b, setValue: S } = Me({
1577
+ } = n, { control: p, handleSubmit: h, reset: y, setError: g, getValues: b, setValue: S } = Me({
1570
1578
  defaultValues: o
1571
- }), E = M(null), v = w(() => {
1572
- const C = document.activeElement;
1573
- if (!(C instanceof HTMLElement)) {
1579
+ }), E = M(null), x = w(() => {
1580
+ const v = document.activeElement;
1581
+ if (!(v instanceof HTMLElement)) {
1574
1582
  E.current = null;
1575
1583
  return;
1576
1584
  }
1577
- E.current = C.closest("form");
1578
- }, []), $ = w(
1579
- (C) => {
1580
- const A = C == null ? void 0 : C.errors, x = [], q = E.current;
1581
- if (!q) return x;
1582
- let V = !1;
1583
- return A && A.forEach(([le, ge]) => {
1584
- const B = q.querySelector(`[name="${le}"]`);
1585
- (B instanceof HTMLInputElement || B instanceof HTMLTextAreaElement || B instanceof HTMLSelectElement) && (V || (B.focus(), V = !0), B.classList.add("error"), x.push(e(`_entities:${d}.${le}.${ge}`)));
1586
- }), x;
1585
+ E.current = v.closest("form");
1586
+ }, []), N = w(
1587
+ (v) => {
1588
+ const $ = v == null ? void 0 : v.errors, _ = [], R = E.current;
1589
+ if (!R) return _;
1590
+ let j = !1;
1591
+ return $ && $.forEach(([le, ge]) => {
1592
+ const B = R.querySelector(`[name="${le}"]`);
1593
+ (B instanceof HTMLInputElement || B instanceof HTMLTextAreaElement || B instanceof HTMLSelectElement) && (j || (B.focus(), j = !0), B.classList.add("error"), _.push(e(`_entities:${d}.${le}.${ge}`)));
1594
+ }), _;
1587
1595
  },
1588
1596
  [e, d]
1589
- ), j = w(() => {
1590
- const C = E.current;
1591
- if (!C) return;
1592
- C.querySelectorAll("input, textarea, select").forEach((x) => {
1593
- x.classList.remove("error");
1597
+ ), U = w(() => {
1598
+ const v = E.current;
1599
+ if (!v) return;
1600
+ v.querySelectorAll("input, textarea, select").forEach((_) => {
1601
+ _.classList.remove("error");
1594
1602
  });
1595
- }, []), I = Z(
1603
+ }, []), H = Z(
1596
1604
  {
1597
1605
  mutationFn: c,
1598
- onError: (C) => {
1599
- console.error(C);
1600
- const A = C;
1601
- if (u) u(C);
1602
- else if (he(A)) {
1603
- const x = $(A);
1606
+ onError: (v) => {
1607
+ console.error(v);
1608
+ const $ = v;
1609
+ if (u) u(v);
1610
+ else if (he($)) {
1611
+ const _ = N($);
1604
1612
  t(
1605
- x.map(
1606
- (q) => ({
1607
- message: q,
1608
- type: R.error
1613
+ _.map(
1614
+ (R) => ({
1615
+ message: R,
1616
+ type: I.error
1609
1617
  })
1610
1618
  )
1611
1619
  );
1612
- } else if (fe(A)) {
1613
- const x = A.message || e("_accessibility:errors.500"), q = e(`_accessibility:errors.${A.status}`);
1614
- r({ message: q || x });
1620
+ } else if (fe($)) {
1621
+ const _ = $.message || e("_accessibility:errors.500"), R = e(`_accessibility:errors.${$.status}`);
1622
+ r({ message: R || _ });
1615
1623
  } else
1616
1624
  r({ message: e("_accessibility:errors.500") });
1617
1625
  },
1618
- onSuccess: async (C) => {
1619
- await i.invalidateQueries({ queryKey: d }), l && l(C), m && s({
1626
+ onSuccess: async (v) => {
1627
+ await i.invalidateQueries({ queryKey: d }), l && l(v), m && s({
1620
1628
  message: m
1621
1629
  });
1622
1630
  }
1623
1631
  }
1624
1632
  );
1625
1633
  return {
1626
- control: h,
1634
+ control: p,
1627
1635
  getValues: b,
1628
1636
  setValue: S,
1629
- handleSubmit: p,
1630
- onSubmit: (C) => {
1631
- v(), j(), I.mutate(
1632
- a ? a(C) : C
1637
+ handleSubmit: h,
1638
+ onSubmit: (v) => {
1639
+ x(), U(), H.mutate(
1640
+ a ? a(v) : v
1633
1641
  );
1634
1642
  },
1635
1643
  reset: y,
1636
1644
  setError: g,
1637
- isLoading: I.isPending
1645
+ isLoading: H.isPending
1638
1646
  };
1639
1647
  }, Bt = (n) => {
1640
- const { t: e } = N(), {
1648
+ const { t: e } = T(), {
1641
1649
  onClick: t,
1642
1650
  icon: s = yt,
1643
1651
  sticky: r = !0,
@@ -1658,13 +1666,13 @@ const Be = (n) => {
1658
1666
  hidden: !!d.deletedAt || i,
1659
1667
  disabled: !!d.deletedAt || c,
1660
1668
  icon: /* @__PURE__ */ f(K, { className: "text-bg-error", icon: s }),
1661
- onMultipleClick: (m) => t(m.map((h) => h.id))
1669
+ onMultipleClick: (m) => t(m.map((p) => p.id))
1662
1670
  }),
1663
1671
  [c, i, s, a, o, t, r, u]
1664
1672
  )
1665
1673
  };
1666
1674
  }, Wt = (n) => {
1667
- const { t: e } = N(), {
1675
+ const { t: e } = T(), {
1668
1676
  onClick: t,
1669
1677
  sticky: s = !0,
1670
1678
  hidden: r = !1,
@@ -1685,13 +1693,13 @@ const Be = (n) => {
1685
1693
  hidden: !d.deletedAt || r,
1686
1694
  disabled: !d.deletedAt || i,
1687
1695
  icon: /* @__PURE__ */ f(K, { className: "text-bg-error", icon: c }),
1688
- onMultipleClick: (m) => t(m.map((h) => h.id))
1696
+ onMultipleClick: (m) => t(m.map((p) => p.id))
1689
1697
  }),
1690
1698
  [i, r, c, a, o, t, s, u]
1691
1699
  )
1692
1700
  };
1693
1701
  }, Us = (n) => {
1694
- const { t: e } = N(), {
1702
+ const { t: e } = T(), {
1695
1703
  onClick: t,
1696
1704
  hidden: s = !1,
1697
1705
  sticky: r = !0,
@@ -1717,7 +1725,7 @@ const Be = (n) => {
1717
1725
  };
1718
1726
  var z = /* @__PURE__ */ ((n) => (n.Add = "add", n.Edit = "edit", n.Delete = "delete", n.Restore = "restore", n.Refresh = "refresh", n.Export = "export", n.Import = "import", n))(z || {});
1719
1727
  const Gt = (n) => {
1720
- const { t: e } = N(), {
1728
+ const { t: e } = T(), {
1721
1729
  onClick: t,
1722
1730
  hidden: s = !1,
1723
1731
  disabled: r = !1,
@@ -1743,7 +1751,7 @@ const Gt = (n) => {
1743
1751
  )
1744
1752
  };
1745
1753
  }, zt = (n) => {
1746
- const { t: e } = N(), {
1754
+ const { t: e } = T(), {
1747
1755
  onClick: t,
1748
1756
  hidden: s = !1,
1749
1757
  disabled: r = !1,
@@ -1769,31 +1777,31 @@ const Gt = (n) => {
1769
1777
  )
1770
1778
  };
1771
1779
  }, js = (n) => {
1772
- const { queryKey: e, onSuccess: t, ...s } = n, r = J(), { showStackNotifications: i } = ee(), { t: o } = N(), { open: c, onClick: a, close: u, dialogFn: l, isLoading: d } = Be({
1780
+ const { queryKey: e, onSuccess: t, ...s } = n, r = J(), { showStackNotifications: i } = ee(), { t: o } = T(), { open: c, onClick: a, close: u, dialogFn: l, isLoading: d } = Be({
1773
1781
  onSuccessMessage: o("_pages:common.actions.delete.successMessage"),
1774
- onError: (h) => {
1775
- const p = h;
1776
- if (he(p))
1782
+ onError: (p) => {
1783
+ const h = p;
1784
+ if (he(h))
1777
1785
  i(
1778
- p.errors.map(
1786
+ h.errors.map(
1779
1787
  ([y, g]) => ({
1780
1788
  message: o(`_pages:${y}.errors.${g}`),
1781
- type: R.error
1789
+ type: I.error
1782
1790
  })
1783
1791
  )
1784
1792
  );
1785
- else if (fe(p)) {
1786
- const y = p.message || o("_accessibility:errors.500"), g = o(`_accessibility:errors.${p.status}`);
1793
+ else if (fe(h)) {
1794
+ const y = h.message || o("_accessibility:errors.500"), g = o(`_accessibility:errors.${h.status}`);
1787
1795
  i([
1788
1796
  {
1789
1797
  message: g || y,
1790
- type: R.error
1798
+ type: I.error
1791
1799
  }
1792
1800
  ]);
1793
1801
  }
1794
1802
  },
1795
- onSuccess: async (h) => {
1796
- await r.invalidateQueries({ queryKey: e }), t && t(h);
1803
+ onSuccess: async (p) => {
1804
+ await r.invalidateQueries({ queryKey: e }), t && t(p);
1797
1805
  },
1798
1806
  ...s
1799
1807
  }), { action: m } = Bt({ onClick: a });
@@ -1807,159 +1815,159 @@ const Gt = (n) => {
1807
1815
  action: m
1808
1816
  };
1809
1817
  }, We = () => {
1810
- const [n, e] = _(!1);
1818
+ const [n, e] = L(!1);
1811
1819
  return { open: n, setOpen: e, handleClose: () => e(!1), handleOpen: () => e(!0) };
1812
1820
  }, Jt = (n) => "mutationFn" in n && "queryKey" in n, pe = (n) => {
1813
- const e = Jt(n), t = e ? n : void 0, s = e ? void 0 : n, r = e ? "entity" : (s == null ? void 0 : s.mode) ?? "state", { t: i } = N(), o = J(), {
1821
+ const e = Jt(n), t = e ? n : void 0, s = e ? void 0 : n, r = e ? "entity" : (s == null ? void 0 : s.mode) ?? "state", { t: i } = T(), o = J(), {
1814
1822
  showErrorNotification: c,
1815
1823
  showStackNotifications: a,
1816
1824
  showSuccessNotification: u
1817
- } = ee(), [l, d] = _(), [m, h] = _(!1), p = M(!1), y = M(), { open: g, handleClose: b, handleOpen: S } = We(), { control: E, handleSubmit: v, reset: $, setError: j, getValues: I, setValue: C } = Me({
1825
+ } = ee(), [l, d] = L(), [m, p] = L(!1), h = M(!1), y = M(), { open: g, handleClose: b, handleOpen: S } = We(), { control: E, handleSubmit: x, reset: N, setError: U, getValues: H, setValue: v } = Me({
1818
1826
  defaultValues: (t == null ? void 0 : t.defaultValues) || (s == null ? void 0 : s.defaultValues) || {}
1819
- }), A = M(null), x = w(() => {
1820
- const T = document.activeElement;
1821
- if (!(T instanceof HTMLElement)) {
1822
- A.current = null;
1827
+ }), $ = M(null), _ = w(() => {
1828
+ const C = document.activeElement;
1829
+ if (!(C instanceof HTMLElement)) {
1830
+ $.current = null;
1823
1831
  return;
1824
1832
  }
1825
- A.current = T.closest("form");
1826
- }, []), q = t ? [...t.queryKey, l ?? 0] : ["__legacy-form-dialog-disabled__", l ?? 0], { data: V, isLoading: le } = Oe({
1833
+ $.current = C.closest("form");
1834
+ }, []), R = t ? [...t.queryKey, l ?? 0] : ["__legacy-form-dialog-disabled__", l ?? 0], { data: j, isLoading: le } = Oe({
1827
1835
  queryFn: async () => {
1828
1836
  if (!(!(t != null && t.getFunction) || !l))
1829
1837
  return t.getFunction(l);
1830
1838
  },
1831
- queryKey: q,
1839
+ queryKey: R,
1832
1840
  enabled: !!(t != null && t.getFunction) && !!l
1833
1841
  });
1834
1842
  O(() => {
1835
- !t || !V || !t.dtoToForm || y.current !== V && ($({ ...t.dtoToForm(V) }), y.current = V);
1836
- }, [V, t, $]), O(() => {
1843
+ !t || !j || !t.dtoToForm || y.current !== j && (N({ ...t.dtoToForm(j) }), y.current = j);
1844
+ }, [j, t, N]), O(() => {
1837
1845
  if (s) {
1838
1846
  if (!g) {
1839
- p.current = !1;
1847
+ h.current = !1;
1840
1848
  return;
1841
1849
  }
1842
- if (!p.current) {
1843
- if (p.current = !0, s.reinitializeOnOpen && s.mapIn) {
1844
- $(s.mapIn());
1850
+ if (!h.current) {
1851
+ if (h.current = !0, s.reinitializeOnOpen && s.mapIn) {
1852
+ N(s.mapIn());
1845
1853
  return;
1846
1854
  }
1847
1855
  if (s.reinitializeOnOpen && s.defaultValues) {
1848
- $(s.defaultValues);
1856
+ N(s.defaultValues);
1849
1857
  return;
1850
1858
  }
1851
- s.resetOnOpen && $(s.defaultValues || {});
1859
+ s.resetOnOpen && N(s.defaultValues || {});
1852
1860
  }
1853
1861
  }
1854
- }, [s, g, $]);
1862
+ }, [s, g, N]);
1855
1863
  const ge = w(
1856
- (T) => {
1857
- const D = T == null ? void 0 : T.errors, H = [], te = A.current;
1858
- if (!te || !t) return H;
1864
+ (C) => {
1865
+ const D = C == null ? void 0 : C.errors, Q = [], te = $.current;
1866
+ if (!te || !t) return Q;
1859
1867
  let Ce = !1;
1860
1868
  return D && D.forEach(([Te, Ze]) => {
1861
1869
  const oe = te.querySelector(`[name="${Te}"]`);
1862
- (oe instanceof HTMLInputElement || oe instanceof HTMLTextAreaElement || oe instanceof HTMLSelectElement) && (Ce || (oe.focus(), Ce = !0), oe.classList.add("error"), H.push(
1870
+ (oe instanceof HTMLInputElement || oe instanceof HTMLTextAreaElement || oe instanceof HTMLSelectElement) && (Ce || (oe.focus(), Ce = !0), oe.classList.add("error"), Q.push(
1863
1871
  i(`_entities:${t.queryKey}.${Te}.${Ze}`)
1864
1872
  ));
1865
- }), H;
1873
+ }), Q;
1866
1874
  },
1867
1875
  [t, i]
1868
1876
  ), B = w(() => {
1869
- const T = A.current;
1870
- if (!T) return;
1871
- T.querySelectorAll("input, textarea, select").forEach((H) => {
1872
- H.classList.remove("error");
1877
+ const C = $.current;
1878
+ if (!C) return;
1879
+ C.querySelectorAll("input, textarea, select").forEach((Q) => {
1880
+ Q.classList.remove("error");
1873
1881
  });
1874
1882
  }, []), Y = w(() => {
1875
- B(), A.current = null, b(), $();
1876
- }, [b, B, $]), ze = w(
1877
- (T) => {
1878
- d(T), S();
1883
+ B(), $.current = null, b(), N();
1884
+ }, [b, B, N]), ze = w(
1885
+ (C) => {
1886
+ d(C), S();
1879
1887
  },
1880
1888
  [S]
1881
1889
  ), ye = Z({
1882
- mutationFn: async (T) => {
1890
+ mutationFn: async (C) => {
1883
1891
  if (t)
1884
- return t.mutationFn(T);
1892
+ return t.mutationFn(C);
1885
1893
  },
1886
- onError: (T) => {
1894
+ onError: (C) => {
1887
1895
  if (t)
1888
- if (t.onError) t.onError(T);
1896
+ if (t.onError) t.onError(C);
1889
1897
  else {
1890
- const D = T;
1898
+ const D = C;
1891
1899
  if (he(D)) {
1892
- const H = ge(D);
1900
+ const Q = ge(D);
1893
1901
  a(
1894
- H.map(
1902
+ Q.map(
1895
1903
  (te) => ({
1896
1904
  message: te,
1897
- type: R.error
1905
+ type: I.error
1898
1906
  })
1899
1907
  )
1900
1908
  );
1901
1909
  } else if (fe(D)) {
1902
- const H = D.message || i("_accessibility:errors.500"), te = i(`_accessibility:errors.${D.status}`);
1903
- c({ message: te || H });
1910
+ const Q = D.message || i("_accessibility:errors.500"), te = i(`_accessibility:errors.${D.status}`);
1911
+ c({ message: te || Q });
1904
1912
  } else
1905
1913
  c({ message: i("_accessibility:errors.500") });
1906
1914
  }
1907
1915
  },
1908
- onSuccess: async (T) => {
1909
- t && (await o.invalidateQueries({ queryKey: t.queryKey }), t.onSuccess && await t.onSuccess(T), u({
1916
+ onSuccess: async (C) => {
1917
+ t && (await o.invalidateQueries({ queryKey: t.queryKey }), t.onSuccess && await t.onSuccess(C), u({
1910
1918
  message: t.onSuccessMessage
1911
1919
  }), Y());
1912
1920
  }
1913
1921
  }), ue = w(
1914
- (T) => t ? T : s != null && s.mapOut ? s.mapOut(T, { id: l }) : T,
1922
+ (C) => t ? C : s != null && s.mapOut ? s.mapOut(C, { id: l }) : C,
1915
1923
  [s, l, t]
1916
1924
  ), Je = w(async () => {
1917
1925
  if (!(s != null && s.onApply)) return;
1918
- const T = I(), D = ue(T);
1919
- h(!0);
1926
+ const C = H(), D = ue(C);
1927
+ p(!0);
1920
1928
  try {
1921
1929
  await s.onApply(D, {
1922
1930
  close: Y,
1923
1931
  id: l,
1924
- values: T
1932
+ values: C
1925
1933
  });
1926
1934
  } finally {
1927
- h(!1);
1935
+ p(!1);
1928
1936
  }
1929
- }, [Y, s, I, l, ue]), Ye = w(async () => {
1937
+ }, [Y, s, H, l, ue]), Ye = w(async () => {
1930
1938
  if (s) {
1931
1939
  if (s.onClear) {
1932
- h(!0);
1940
+ p(!0);
1933
1941
  try {
1934
1942
  await s.onClear();
1935
1943
  } finally {
1936
- h(!1);
1944
+ p(!1);
1937
1945
  }
1938
1946
  }
1939
- $(s.defaultValues || {});
1947
+ N(s.defaultValues || {});
1940
1948
  }
1941
- }, [s, $]), Xe = w(
1942
- async (T) => {
1949
+ }, [s, N]), Xe = w(
1950
+ async (C) => {
1943
1951
  if (t) {
1944
- x(), ye.mutate(
1945
- t.formToDto ? t.formToDto(T) : T
1952
+ _(), ye.mutate(
1953
+ t.formToDto ? t.formToDto(C) : C
1946
1954
  );
1947
1955
  return;
1948
1956
  }
1949
- const D = ue(T);
1950
- h(!0);
1957
+ const D = ue(C);
1958
+ p(!0);
1951
1959
  try {
1952
1960
  s != null && s.onSubmit && await s.onSubmit(D, {
1953
1961
  close: Y,
1954
1962
  id: l,
1955
- values: T
1963
+ values: C
1956
1964
  }), ((s == null ? void 0 : s.closeOnSubmit) ?? !0) && Y();
1957
1965
  } finally {
1958
- h(!1);
1966
+ p(!1);
1959
1967
  }
1960
1968
  },
1961
1969
  [
1962
- x,
1970
+ _,
1963
1971
  Y,
1964
1972
  s,
1965
1973
  l,
@@ -1975,12 +1983,12 @@ const Gt = (n) => {
1975
1983
  openDialog: ze,
1976
1984
  handleClose: Y,
1977
1985
  control: E,
1978
- getValues: I,
1979
- setValue: C,
1980
- handleSubmit: v,
1986
+ getValues: H,
1987
+ setValue: v,
1988
+ handleSubmit: x,
1981
1989
  onSubmit: Xe,
1982
- reset: $,
1983
- setError: j,
1990
+ reset: N,
1991
+ setError: U,
1984
1992
  title: n.title,
1985
1993
  isSubmitting: m,
1986
1994
  onApply: Je,
@@ -2015,11 +2023,11 @@ const Gt = (n) => {
2015
2023
  dtoToForm: l,
2016
2024
  title: d,
2017
2025
  ...m
2018
- } = n, h = M(l);
2026
+ } = n, p = M(l);
2019
2027
  O(() => {
2020
- h.current = l;
2028
+ p.current = l;
2021
2029
  }, [l]);
2022
- const p = Z({
2030
+ const h = Z({
2023
2031
  mutationFn: r
2024
2032
  }), y = pe({
2025
2033
  ...m,
@@ -2027,10 +2035,10 @@ const Gt = (n) => {
2027
2035
  title: d,
2028
2036
  onSubmit: async (E) => {
2029
2037
  try {
2030
- const v = await p.mutateAsync(E);
2031
- i && await e.invalidateQueries({ queryKey: i }), o && await o(v);
2032
- } catch (v) {
2033
- throw c && c(v), v;
2038
+ const x = await h.mutateAsync(E);
2039
+ i && await e.invalidateQueries({ queryKey: i }), o && await o(x);
2040
+ } catch (x) {
2041
+ throw c && c(x), x;
2034
2042
  }
2035
2043
  },
2036
2044
  mapOut: (E) => a ? a(E, t.current) : E
@@ -2041,42 +2049,42 @@ const Gt = (n) => {
2041
2049
  });
2042
2050
  return O(() => {
2043
2051
  if (S.data && s.current !== S.data) {
2044
- if (t.current = S.data, s.current = S.data, h.current && g) {
2045
- g(h.current(S.data));
2052
+ if (t.current = S.data, s.current = S.data, p.current && g) {
2053
+ g(p.current(S.data));
2046
2054
  return;
2047
2055
  }
2048
2056
  g == null || g(S.data);
2049
2057
  }
2050
2058
  }, [S.data, g]), {
2051
2059
  ...y,
2052
- isLoading: y.isLoading || p.isPending || S.isFetching || S.isLoading
2060
+ isLoading: y.isLoading || h.isPending || S.isFetching || S.isLoading
2053
2061
  };
2054
2062
  }, Ws = (n) => {
2055
- const { queryKey: e, onSuccess: t, ...s } = n, r = J(), { showStackNotifications: i } = ee(), { t: o } = N(), { open: c, onClick: a, close: u, dialogFn: l, isLoading: d } = Be({
2063
+ const { queryKey: e, onSuccess: t, ...s } = n, r = J(), { showStackNotifications: i } = ee(), { t: o } = T(), { open: c, onClick: a, close: u, dialogFn: l, isLoading: d } = Be({
2056
2064
  onSuccessMessage: o("_pages:common.actions.restore.successMessage"),
2057
- onError: (h) => {
2058
- const p = h;
2059
- if (he(p))
2065
+ onError: (p) => {
2066
+ const h = p;
2067
+ if (he(h))
2060
2068
  i(
2061
- p.errors.map(
2069
+ h.errors.map(
2062
2070
  ([y, g]) => ({
2063
2071
  message: o(`_pages:${y}.errors.${g}`),
2064
- type: R.error
2072
+ type: I.error
2065
2073
  })
2066
2074
  )
2067
2075
  );
2068
- else if (fe(p)) {
2069
- const y = p.message || o("_accessibility:errors.500"), g = o(`_accessibility:errors.${p.status}`);
2076
+ else if (fe(h)) {
2077
+ const y = h.message || o("_accessibility:errors.500"), g = o(`_accessibility:errors.${h.status}`);
2070
2078
  i([
2071
2079
  {
2072
2080
  message: g || y,
2073
- type: R.error
2081
+ type: I.error
2074
2082
  }
2075
2083
  ]);
2076
2084
  }
2077
2085
  },
2078
- onSuccess: async (h) => {
2079
- await r.invalidateQueries({ queryKey: e }), t && t(h);
2086
+ onSuccess: async (p) => {
2087
+ await r.invalidateQueries({ queryKey: e }), t && t(p);
2080
2088
  },
2081
2089
  ...s
2082
2090
  }), { action: m } = Wt({ onClick: a });
@@ -2091,14 +2099,14 @@ const Gt = (n) => {
2091
2099
  };
2092
2100
  };
2093
2101
  function Gs(n) {
2094
- const { t: e } = N(), t = J(), {
2102
+ const { t: e } = T(), t = J(), {
2095
2103
  queryKey: s,
2096
2104
  mutationFn: r,
2097
2105
  entity: i,
2098
2106
  fileProcessor: o,
2099
2107
  renderCustomPreview: c,
2100
2108
  onError: a
2101
- } = n, [u, l] = _(!1), [d, m] = _(null), [h, p] = _(!1), y = Z({
2109
+ } = n, [u, l] = L(!1), [d, m] = L(null), [p, h] = L(!1), y = Z({
2102
2110
  mutationFn: r,
2103
2111
  onError: (b) => {
2104
2112
  console.error(b), a == null || a(b);
@@ -2115,8 +2123,8 @@ function Gs(n) {
2115
2123
  try {
2116
2124
  await y.mutateAsync({
2117
2125
  items: d,
2118
- override: h
2119
- }), l(!1), m(null), p(!1);
2126
+ override: p
2127
+ }), l(!1), m(null), h(!1);
2120
2128
  } catch (b) {
2121
2129
  console.error(b);
2122
2130
  }
@@ -2125,19 +2133,19 @@ function Gs(n) {
2125
2133
  fileProcessor: o,
2126
2134
  onFileProcessed: (b) => m(b),
2127
2135
  renderCustomPreview: c,
2128
- onOverrideChange: (b) => p(b),
2136
+ onOverrideChange: (b) => h(b),
2129
2137
  open: u,
2130
2138
  title: e("_pages:common.actions.import.dialog.title", {
2131
2139
  entity: e(`_pages:${i}.title`)
2132
2140
  }),
2133
2141
  handleClose: () => {
2134
- l(!1), m(null), p(!1);
2142
+ l(!1), m(null), h(!1);
2135
2143
  },
2136
2144
  action: g
2137
2145
  };
2138
2146
  }
2139
2147
  const zs = (n) => {
2140
- const { showSuccessNotification: e } = ee(), { t } = N(), {
2148
+ const { showSuccessNotification: e } = ee(), { t } = T(), {
2141
2149
  entity: s,
2142
2150
  mutationFn: r,
2143
2151
  onError: i,
@@ -2149,8 +2157,8 @@ const zs = (n) => {
2149
2157
  console.error(d), i && i(d);
2150
2158
  },
2151
2159
  onSuccess: async (d) => {
2152
- const m = JSON.stringify(d, null, 2), h = new Blob([m], { type: "application/json" }), p = URL.createObjectURL(h), y = document.createElement("a");
2153
- y.href = p, y.download = `${s}.json`, y.click(), URL.revokeObjectURL(p), o && o(d), e({
2160
+ const m = JSON.stringify(d, null, 2), p = new Blob([m], { type: "application/json" }), h = URL.createObjectURL(p), y = document.createElement("a");
2161
+ y.href = h, y.download = `${s}.json`, y.click(), URL.revokeObjectURL(h), o && o(d), e({
2154
2162
  message: c
2155
2163
  });
2156
2164
  }
@@ -2165,7 +2173,7 @@ const zs = (n) => {
2165
2173
  };
2166
2174
  }, xe = () => typeof window < "u" ? window.scrollY : 0;
2167
2175
  function Yt(n) {
2168
- const [e, t] = _(xe), s = w(() => {
2176
+ const [e, t] = L(xe), s = w(() => {
2169
2177
  t(xe());
2170
2178
  }, []);
2171
2179
  return O(() => (window.addEventListener("scroll", s), () => {
@@ -2173,7 +2181,7 @@ function Yt(n) {
2173
2181
  }), [s]), e > n;
2174
2182
  }
2175
2183
  const Js = (n) => {
2176
- const { t: e } = N(), {
2184
+ const { t: e } = T(), {
2177
2185
  icon: t = kt,
2178
2186
  threshold: s = 200,
2179
2187
  scrollTop: r = 0,
@@ -2185,7 +2193,7 @@ const Js = (n) => {
2185
2193
  variant: l = "submit",
2186
2194
  color: d = "primary",
2187
2195
  ...m
2188
- } = n, h = Yt(s);
2196
+ } = n, p = Yt(s);
2189
2197
  return /* @__PURE__ */ f(
2190
2198
  G,
2191
2199
  {
@@ -2196,17 +2204,17 @@ const Js = (n) => {
2196
2204
  onClick: () => {
2197
2205
  a == null || a(), c && Vt.scrollTo(i, r);
2198
2206
  },
2199
- className: `to-top ${h ? "show" : "hide"} ${u}`.trim(),
2207
+ className: `to-top ${p ? "show" : "hide"} ${u}`.trim(),
2200
2208
  "data-tooltip-content": o,
2201
2209
  ...m
2202
2210
  }
2203
2211
  );
2204
2212
  };
2205
2213
  function Ys(n) {
2206
- const { t: e } = N();
2214
+ const { t: e } = T();
2207
2215
  if ("children" in n) {
2208
- const { children: v, className: $ } = n;
2209
- return /* @__PURE__ */ f("div", { className: `error-container${$ ? ` ${$}` : ""}`, children: v });
2216
+ const { children: x, className: N } = n;
2217
+ return /* @__PURE__ */ f("div", { className: `error-container${N ? ` ${N}` : ""}`, children: x });
2210
2218
  }
2211
2219
  const {
2212
2220
  error: s,
@@ -2219,8 +2227,8 @@ function Ys(n) {
2219
2227
  className: l,
2220
2228
  resetErrorBoundary: d
2221
2229
  } = n, m = o ?? d, {
2222
- className: h,
2223
- children: p,
2230
+ className: p,
2231
+ children: h,
2224
2232
  onClick: y,
2225
2233
  ...g
2226
2234
  } = a ?? {}, { className: b, ...S } = u ?? {}, E = i !== null;
@@ -2242,23 +2250,23 @@ function Ys(n) {
2242
2250
  }
2243
2251
  ),
2244
2252
  m && /* @__PURE__ */ f(
2245
- U,
2253
+ q,
2246
2254
  {
2247
2255
  type: "button",
2248
2256
  variant: "submit",
2249
2257
  color: "primary",
2250
2258
  ...g,
2251
- className: `error-retry ${h ? ` ${h}` : ""}`,
2252
- onClick: (v) => {
2253
- y == null || y(v), v.defaultPrevented || m();
2259
+ className: `error-retry ${p ? ` ${p}` : ""}`,
2260
+ onClick: (x) => {
2261
+ y == null || y(x), x.defaultPrevented || m();
2254
2262
  },
2255
- children: p ?? c ?? e("_accessibility:actions.retry", { defaultValue: "Retry" })
2263
+ children: h ?? c ?? e("_accessibility:actions.retry", { defaultValue: "Retry" })
2256
2264
  }
2257
2265
  )
2258
2266
  ] });
2259
2267
  }
2260
2268
  const Xt = (n) => {
2261
- const { showBackButton: e, title: t, actions: s } = n, { t: r } = N(), { navigate: i } = ce();
2269
+ const { showBackButton: e, title: t, actions: s } = n, { t: r } = T(), { navigate: i } = ce();
2262
2270
  return /* @__PURE__ */ k("div", { className: "page-header", children: [
2263
2271
  /* @__PURE__ */ k("div", { className: "page-header-left", children: [
2264
2272
  e && /* @__PURE__ */ f(
@@ -2302,8 +2310,8 @@ const Xt = (n) => {
2302
2310
  isLoading: c = !1,
2303
2311
  isAnimated: a = !0,
2304
2312
  showBackButton: u = !1
2305
- } = n, { t: l } = N(), d = J(), { countOfFilters: m } = dt(), h = Q(() => {
2306
- const p = Array.isArray(i) ? [...i] : [];
2313
+ } = n, { t: l } = T(), d = J(), { countOfFilters: m } = dt(), p = V(() => {
2314
+ const h = Array.isArray(i) ? [...i] : [];
2307
2315
  if (o) {
2308
2316
  const y = {
2309
2317
  id: z.Refresh,
@@ -2311,7 +2319,7 @@ const Xt = (n) => {
2311
2319
  icon: /* @__PURE__ */ f(K, { icon: Re }),
2312
2320
  tooltip: l("_pages:common.actions.refresh.text")
2313
2321
  };
2314
- p.unshift(y);
2322
+ h.unshift(y);
2315
2323
  }
2316
2324
  if (s) {
2317
2325
  const y = {
@@ -2319,7 +2327,7 @@ const Xt = (n) => {
2319
2327
  id: z.Add,
2320
2328
  icon: /* @__PURE__ */ f(K, { icon: Ne })
2321
2329
  };
2322
- p.unshift(y);
2330
+ h.unshift(y);
2323
2331
  }
2324
2332
  if (r) {
2325
2333
  const y = {
@@ -2334,9 +2342,9 @@ const Xt = (n) => {
2334
2342
  }
2335
2343
  )
2336
2344
  };
2337
- p.push(y);
2345
+ h.push(y);
2338
2346
  }
2339
- return p;
2347
+ return h;
2340
2348
  }, [
2341
2349
  i,
2342
2350
  s,
@@ -2351,7 +2359,7 @@ const Xt = (n) => {
2351
2359
  Xt,
2352
2360
  {
2353
2361
  showBackButton: u,
2354
- actions: h,
2362
+ actions: p,
2355
2363
  title: e
2356
2364
  }
2357
2365
  ),
@@ -2363,15 +2371,15 @@ const Xt = (n) => {
2363
2371
  color: s.color ?? "primary",
2364
2372
  variant: s.variant ?? "submit",
2365
2373
  onClick: () => {
2366
- var p;
2367
- return (p = s.onClick) == null ? void 0 : p.call(s);
2374
+ var h;
2375
+ return (h = s.onClick) == null ? void 0 : h.call(s);
2368
2376
  },
2369
2377
  className: `button page-fab ${s.className ?? ""}`
2370
2378
  }
2371
2379
  )
2372
2380
  ] });
2373
2381
  }, Zs = (n) => {
2374
- const { t: e } = N(), {
2382
+ const { t: e } = T(), {
2375
2383
  className: t = "",
2376
2384
  itemClassName: s = "",
2377
2385
  loading: r = !1,
@@ -2383,8 +2391,8 @@ const Xt = (n) => {
2383
2391
  loadingMore: l = !1,
2384
2392
  onLoadMore: d,
2385
2393
  loadMoreComponent: m = null,
2386
- observerRootMargin: h = "0px 0px 200px 0px",
2387
- observerThreshold: p = 0
2394
+ observerRootMargin: p = "0px 0px 200px 0px",
2395
+ observerThreshold: h = 0
2388
2396
  } = n, y = M(!1), g = M(null), b = w(async () => {
2389
2397
  if (!(!u || !d) && !(l || y.current)) {
2390
2398
  y.current = !0;
@@ -2399,19 +2407,19 @@ const Xt = (n) => {
2399
2407
  if (!u || !d || !g.current || typeof IntersectionObserver > "u") return;
2400
2408
  const S = new IntersectionObserver(
2401
2409
  (E) => {
2402
- E.some((v) => v.isIntersecting) && b();
2410
+ E.some((x) => x.isIntersecting) && b();
2403
2411
  },
2404
2412
  {
2405
- rootMargin: h,
2406
- threshold: p
2413
+ rootMargin: p,
2414
+ threshold: h
2407
2415
  }
2408
2416
  );
2409
2417
  return S.observe(g.current), () => S.disconnect();
2410
2418
  }, [
2411
2419
  u,
2412
2420
  d,
2413
- h,
2414
2421
  p,
2422
+ h,
2415
2423
  b
2416
2424
  ]), r ? /* @__PURE__ */ f(ne, {}) : /* @__PURE__ */ f(ae, { children: a != null && a.length ? /* @__PURE__ */ k("ul", { className: `pretty-grid-main ${t}`, children: [
2417
2425
  a == null ? void 0 : a.map((S) => /* @__PURE__ */ f("li", { className: `pretty-grid-item ${s}`, children: c(S) }, S.id)),
@@ -2425,11 +2433,11 @@ const Xt = (n) => {
2425
2433
  setRightContent: () => {
2426
2434
  }
2427
2435
  }), en = (n) => {
2428
- const { children: e } = n, [t, s] = _(""), [r, i] = _(null), o = w((u) => {
2436
+ const { children: e } = n, [t, s] = L(""), [r, i] = L(null), o = w((u) => {
2429
2437
  s(u);
2430
2438
  }, []), c = w((u) => {
2431
2439
  i(u);
2432
- }, []), a = Q(
2440
+ }, []), a = V(
2433
2441
  () => ({
2434
2442
  title: t,
2435
2443
  setTitle: o,
@@ -2441,13 +2449,13 @@ const Xt = (n) => {
2441
2449
  return /* @__PURE__ */ f(Ge.Provider, { value: a, children: e });
2442
2450
  }, Zt = () => ie(Ge);
2443
2451
  function tn(n) {
2444
- const { t: e } = N(), { openDrawer: t, showSearch: s = !0, menuButtonProps: r } = n, { searchComponent: i, location: o } = ce(), { title: c, rightContent: a } = Zt(), [u, l] = _(!1), d = w((p) => {
2445
- (qt() ? p.metaKey : p.ctrlKey) && p.shiftKey && p.key.toLowerCase() === "f" && (l(!0), p.preventDefault());
2452
+ const { t: e } = T(), { openDrawer: t, showSearch: s = !0, menuButtonProps: r } = n, { searchComponent: i, location: o } = ce(), { title: c, rightContent: a } = Zt(), [u, l] = L(!1), d = w((h) => {
2453
+ (qt() ? h.metaKey : h.ctrlKey) && h.shiftKey && h.key.toLowerCase() === "f" && (l(!0), h.preventDefault());
2446
2454
  }, []);
2447
2455
  O(() => (window.addEventListener("keydown", d), () => {
2448
2456
  window.removeEventListener("keydown", d);
2449
2457
  }), [d]);
2450
- const m = i, h = s && !!m;
2458
+ const m = i, p = s && !!m;
2451
2459
  return /* @__PURE__ */ k(ae, { children: [
2452
2460
  o.pathname !== "/" && !!m && /* @__PURE__ */ f(m, { open: u, onClose: () => l(!1) }),
2453
2461
  /* @__PURE__ */ k("header", { id: "header", className: "header", children: [
@@ -2458,9 +2466,9 @@ function tn(n) {
2458
2466
  ...r,
2459
2467
  type: (r == null ? void 0 : r.type) ?? "button",
2460
2468
  icon: (r == null ? void 0 : r.icon) ?? Tt,
2461
- onClick: (p) => {
2469
+ onClick: (h) => {
2462
2470
  var y;
2463
- (y = r == null ? void 0 : r.onClick) == null || y.call(r, p), t();
2471
+ (y = r == null ? void 0 : r.onClick) == null || y.call(r, h), t();
2464
2472
  },
2465
2473
  name: (r == null ? void 0 : r.name) ?? e("_accessibility:buttons.openMenu"),
2466
2474
  "aria-label": (r == null ? void 0 : r["aria-label"]) ?? e("_accessibility:ariaLabels.openMenu"),
@@ -2471,7 +2479,7 @@ function tn(n) {
2471
2479
  ] }),
2472
2480
  /* @__PURE__ */ k("div", { className: "navbar-right", children: [
2473
2481
  a,
2474
- h && /* @__PURE__ */ f(
2482
+ p && /* @__PURE__ */ f(
2475
2483
  G,
2476
2484
  {
2477
2485
  icon: Nt,
@@ -2483,38 +2491,38 @@ function tn(n) {
2483
2491
  ] })
2484
2492
  ] });
2485
2493
  }
2486
- const de = 300, es = (n) => n ?? R.error, ts = (n) => {
2494
+ const de = 300, es = (n) => n ?? I.error, ts = (n) => {
2487
2495
  switch (n) {
2488
- case R.error:
2496
+ case I.error:
2489
2497
  return $t;
2490
2498
  default:
2491
2499
  return Et;
2492
2500
  }
2493
2501
  }, Se = (n) => {
2494
2502
  switch (n) {
2495
- case R.success:
2503
+ case I.success:
2496
2504
  return "!text-success";
2497
- case R.error:
2505
+ case I.error:
2498
2506
  return "!text-error";
2499
- case R.warning:
2507
+ case I.warning:
2500
2508
  return "!text-warning";
2501
2509
  default:
2502
2510
  return "!text-info";
2503
2511
  }
2504
2512
  }, ss = (n) => {
2505
2513
  switch (n) {
2506
- case R.success:
2514
+ case I.success:
2507
2515
  return "bg-bg-success";
2508
- case R.error:
2516
+ case I.error:
2509
2517
  return "bg-bg-error";
2510
- case R.warning:
2518
+ case I.warning:
2511
2519
  return "bg-bg-warning";
2512
2520
  default:
2513
2521
  return "bg-bg-info";
2514
2522
  }
2515
2523
  };
2516
2524
  function sn() {
2517
- const { t: n } = N(), { notification: e, removeNotification: t } = ee(), [s, r] = _([]), i = M(s);
2525
+ const { t: n } = T(), { notification: e, removeNotification: t } = ee(), [s, r] = L([]), i = M(s);
2518
2526
  ft(() => {
2519
2527
  i.current = s;
2520
2528
  });
@@ -2537,30 +2545,30 @@ function sn() {
2537
2545
  };
2538
2546
  if (e.length === 0)
2539
2547
  return i.current.length === 0 ? void 0 : (o.current && clearTimeout(o.current), a = setTimeout(() => {
2540
- r((h) => h.map((p) => ({ ...p, closing: !0 }))), a = null;
2548
+ r((p) => p.map((h) => ({ ...h, closing: !0 }))), a = null;
2541
2549
  }, 0), o.current = setTimeout(() => {
2542
2550
  r([]), o.current = null;
2543
2551
  }, de), u);
2544
- const l = new Set(i.current.map((h) => h.id));
2552
+ const l = new Set(i.current.map((p) => p.id));
2545
2553
  if (!e.some(
2546
- (h) => h.id !== void 0 && !l.has(h.id)
2554
+ (p) => p.id !== void 0 && !l.has(p.id)
2547
2555
  )) return;
2548
2556
  if (i.current.length === 0) {
2549
- const h = [...e];
2557
+ const p = [...e];
2550
2558
  return a = setTimeout(() => {
2551
- r(h.map((p) => ({ ...p, closing: !1 }))), a = null;
2559
+ r(p.map((h) => ({ ...h, closing: !1 }))), a = null;
2552
2560
  }, 0), () => {
2553
2561
  a && clearTimeout(a);
2554
2562
  };
2555
2563
  }
2556
2564
  o.current && clearTimeout(o.current), a = setTimeout(() => {
2557
2565
  r(
2558
- (h) => h.every((p) => p.closing) ? h : h.map((p) => ({ ...p, closing: !0 }))
2566
+ (p) => p.every((h) => h.closing) ? p : p.map((h) => ({ ...h, closing: !0 }))
2559
2567
  ), a = null;
2560
2568
  }, 0);
2561
2569
  const m = [...e];
2562
2570
  return o.current = setTimeout(() => {
2563
- r(m.map((h) => ({ ...h, closing: !1 }))), o.current = null;
2571
+ r(m.map((p) => ({ ...p, closing: !1 }))), o.current = null;
2564
2572
  }, de), u;
2565
2573
  }, [e]), O(() => {
2566
2574
  if (!s.length) return;
@@ -2580,7 +2588,7 @@ function sn() {
2580
2588
  "div",
2581
2589
  {
2582
2590
  className: `notification ${d ? "closing" : ""} ${ss(m)}`,
2583
- onClick: (h) => h.stopPropagation(),
2591
+ onClick: (p) => p.stopPropagation(),
2584
2592
  children: [
2585
2593
  /* @__PURE__ */ k("div", { className: "notification-body", children: [
2586
2594
  /* @__PURE__ */ f(
@@ -2599,8 +2607,8 @@ function sn() {
2599
2607
  icon: _e,
2600
2608
  color: "error",
2601
2609
  className: "notification-close group",
2602
- onClick: (h) => {
2603
- h.stopPropagation(), a !== void 0 && c(a);
2610
+ onClick: (p) => {
2611
+ p.stopPropagation(), a !== void 0 && c(a);
2604
2612
  },
2605
2613
  iconClassName: `${Se(m)} notification-close-icon`,
2606
2614
  name: n("_accessibility:buttons.closeNotification"),
@@ -2639,18 +2647,18 @@ const ns = (n) => {
2639
2647
  const {
2640
2648
  className: d = "",
2641
2649
  variant: m = t ? "submit" : "outlined",
2642
- color: h = t ? "primary" : "default",
2643
- ...p
2650
+ color: p = t ? "primary" : "default",
2651
+ ...h
2644
2652
  } = c ?? {};
2645
2653
  return /* @__PURE__ */ f(
2646
- U,
2654
+ q,
2647
2655
  {
2648
2656
  type: "button",
2649
2657
  variant: m,
2650
- color: h,
2658
+ color: p,
2651
2659
  className: `tab ${d}`,
2652
2660
  onClick: s,
2653
- ...p,
2661
+ ...h,
2654
2662
  children: r
2655
2663
  }
2656
2664
  );
@@ -2666,7 +2674,7 @@ const ns = (n) => {
2666
2674
  }
2667
2675
  );
2668
2676
  }, rs = (n) => {
2669
- var h;
2677
+ var p;
2670
2678
  const {
2671
2679
  tabs: e = [],
2672
2680
  defaultTab: t,
@@ -2676,27 +2684,27 @@ const ns = (n) => {
2676
2684
  tabsContainerClassName: o = "",
2677
2685
  useLinks: c = !0,
2678
2686
  tabButtonProps: a
2679
- } = n, [u, l] = _(t ?? ((h = e[0]) == null ? void 0 : h.id)), d = s ?? u, m = Q(() => e.find((p) => p.id === d), [e, d]);
2687
+ } = n, [u, l] = L(t ?? ((p = e[0]) == null ? void 0 : p.id)), d = s ?? u, m = V(() => e.find((h) => h.id === d), [e, d]);
2680
2688
  return /* @__PURE__ */ k("div", { className: `tabs-layout-main ${i}`, children: [
2681
2689
  /* @__PURE__ */ f(
2682
2690
  "ul",
2683
2691
  {
2684
2692
  className: `horizontal tabs tabs-container ${o}`,
2685
- children: e.map(({ id: p, to: y, label: g }) => /* @__PURE__ */ f("li", { children: /* @__PURE__ */ f(
2693
+ children: e.map(({ id: h, to: y, label: g }) => /* @__PURE__ */ f("li", { children: /* @__PURE__ */ f(
2686
2694
  ns,
2687
2695
  {
2688
2696
  onClick: () => {
2689
- s === void 0 && l(p), r == null || r(p);
2697
+ s === void 0 && l(h), r == null || r(h);
2690
2698
  },
2691
- id: p,
2699
+ id: h,
2692
2700
  to: y,
2693
2701
  siblings: e.length > 1,
2694
- active: d === p,
2702
+ active: d === h,
2695
2703
  useLinks: c,
2696
2704
  tabButtonProps: a,
2697
2705
  children: g
2698
2706
  }
2699
- ) }, p))
2707
+ ) }, h))
2700
2708
  }
2701
2709
  ),
2702
2710
  m == null ? void 0 : m.content
@@ -2713,7 +2721,7 @@ const ns = (n) => {
2713
2721
  image: a = "",
2714
2722
  alt: u = "",
2715
2723
  final: l = !1
2716
- } = n, { t: d } = N();
2724
+ } = n, { t: d } = T();
2717
2725
  return /* @__PURE__ */ k("div", { className: "big-appear step-container", children: [
2718
2726
  a && /* @__PURE__ */ f("img", { src: a, alt: u }),
2719
2727
  e != null && /* @__PURE__ */ f("h2", { className: "step-title", children: e }),
@@ -2721,7 +2729,7 @@ const ns = (n) => {
2721
2729
  s != null && /* @__PURE__ */ f("div", { className: "step-content", children: s }),
2722
2730
  /* @__PURE__ */ f("div", { className: "step-actions", children: l ? /* @__PURE__ */ k(ae, { children: [
2723
2731
  /* @__PURE__ */ f(
2724
- U,
2732
+ q,
2725
2733
  {
2726
2734
  color: "primary",
2727
2735
  className: "step-button",
@@ -2732,7 +2740,7 @@ const ns = (n) => {
2732
2740
  }
2733
2741
  ),
2734
2742
  /* @__PURE__ */ f(
2735
- U,
2743
+ q,
2736
2744
  {
2737
2745
  color: "primary",
2738
2746
  variant: "submit",
@@ -2744,7 +2752,7 @@ const ns = (n) => {
2744
2752
  )
2745
2753
  ] }) : /* @__PURE__ */ k(ae, { children: [
2746
2754
  /* @__PURE__ */ f(
2747
- U,
2755
+ q,
2748
2756
  {
2749
2757
  color: "primary",
2750
2758
  className: "step-button",
@@ -2755,7 +2763,7 @@ const ns = (n) => {
2755
2763
  }
2756
2764
  ),
2757
2765
  /* @__PURE__ */ f(
2758
- U,
2766
+ q,
2759
2767
  {
2760
2768
  color: "primary",
2761
2769
  className: "step-button",
@@ -2775,7 +2783,7 @@ const ns = (n) => {
2775
2783
  onSkip: r,
2776
2784
  onSignIn: i,
2777
2785
  onStartAsGuest: o
2778
- } = n, { setGuestMode: c } = He(), { navigate: a } = ce(), [u, l] = _(1), d = w(() => {
2786
+ } = n, { setGuestMode: c } = He(), { navigate: a } = ce(), [u, l] = L(1), d = w(() => {
2779
2787
  if (r) {
2780
2788
  r();
2781
2789
  return;
@@ -2787,13 +2795,13 @@ const ns = (n) => {
2787
2795
  return;
2788
2796
  }
2789
2797
  a(t);
2790
- }, [a, i, t]), h = w(() => {
2798
+ }, [a, i, t]), p = w(() => {
2791
2799
  if (o) {
2792
2800
  o();
2793
2801
  return;
2794
2802
  }
2795
2803
  c(!0), a(s);
2796
- }, [s, a, o, c]), p = Q(() => e.map((y, g) => ({
2804
+ }, [s, a, o, c]), h = V(() => e.map((y, g) => ({
2797
2805
  id: g + 1,
2798
2806
  label: "",
2799
2807
  content: /* @__PURE__ */ f(
@@ -2803,17 +2811,17 @@ const ns = (n) => {
2803
2811
  final: g === e.length - 1,
2804
2812
  onClickNext: () => l((b) => b + 1),
2805
2813
  onSkip: d,
2806
- onStartAsGuest: h,
2814
+ onStartAsGuest: p,
2807
2815
  onSignIn: m
2808
2816
  }
2809
2817
  )
2810
- })), [m, d, h, e]);
2818
+ })), [m, d, p, e]);
2811
2819
  return /* @__PURE__ */ f("div", { className: "onboarding-main", children: /* @__PURE__ */ f(
2812
2820
  rs,
2813
2821
  {
2814
2822
  currentTab: u,
2815
2823
  onTabChange: (y) => l(Number(y)),
2816
- tabs: p,
2824
+ tabs: h,
2817
2825
  useLinks: !1
2818
2826
  }
2819
2827
  ) });
@@ -2862,7 +2870,7 @@ export {
2862
2870
  Ge as NavbarContext,
2863
2871
  en as NavbarProvider,
2864
2872
  sn as Notification,
2865
- R as NotificationEnumType,
2873
+ I as NotificationEnumType,
2866
2874
  Rs as NotificationProvider,
2867
2875
  rn as Onboarding,
2868
2876
  Xs as Page,