bonsaif-ui 0.1.6 → 0.1.7

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,19 +1,19 @@
1
1
  "use client";
2
2
  import { jsx as t, jsxs as i, Fragment as we } from "react/jsx-runtime";
3
- import ge, { useRef as re, useState as T, useEffect as _, useMemo as ze, useCallback as st, useLayoutEffect as Jt, useSyncExternalStore as Zt } from "react";
4
- import { HiMagnifyingGlass as Ze, HiXMark as Ee, HiChevronLeft as je, HiChevronDown as _e, HiChevronRight as Te, HiCalendarDays as lt, HiExclamationTriangle as Kt, HiClipboardDocument as Qt, HiCheck as Dt, HiLink as er, HiChevronUp as tr, HiChevronUpDown as rr, HiLockClosed as nr, HiBars3 as ar, HiHome as Xe, HiArrowRightOnRectangle as ir, HiShieldCheck as rt, HiInbox as or, HiListBullet as ht, HiBriefcase as sr, HiCog6Tooth as bt, HiUsers as xt, HiDocumentText as lr, HiBell as cr, HiUser as dr, HiClipboardDocumentList as ur, HiBuildingOffice2 as mr, HiRectangleGroup as fr, HiTicket as pr, HiChartBar as hr } from "react-icons/hi2";
5
- import { OverlayScrollbars as vt } from "overlayscrollbars";
3
+ import ge, { useRef as re, useState as D, useEffect as _, createContext as Qt, useLayoutEffect as er, useContext as tr, isValidElement as It, Children as rr, useMemo as ze, useCallback as st, useSyncExternalStore as nr } from "react";
4
+ import { HiMagnifyingGlass as Je, HiXMark as Ee, HiChevronLeft as je, HiChevronDown as _e, HiChevronRight as Te, HiCalendarDays as lt, HiExclamationTriangle as ar, HiClipboardDocument as ir, HiCheck as Pt, HiLink as or, HiChevronUp as sr, HiChevronUpDown as lr, HiLockClosed as cr, HiBars3 as dr, HiHome as Xe, HiArrowRightOnRectangle as ur, HiShieldCheck as rt, HiInbox as mr, HiListBullet as xt, HiBriefcase as fr, HiCog6Tooth as vt, HiUsers as gt, HiDocumentText as pr, HiBell as hr, HiUser as br, HiClipboardDocumentList as xr, HiBuildingOffice2 as vr, HiRectangleGroup as gr, HiTicket as yr, HiChartBar as wr } from "react-icons/hi2";
6
5
  import { createPortal as Ke } from "react-dom";
7
- import { MdDragIndicator as br } from "react-icons/md";
8
- import { OverlayScrollbarsComponent as gt } from "overlayscrollbars-react";
9
- import { DayPicker as xr, useDayPicker as vr } from "react-day-picker";
6
+ import { OverlayScrollbars as yt } from "overlayscrollbars";
7
+ import { MdDragIndicator as Nr } from "react-icons/md";
8
+ import { OverlayScrollbarsComponent as wt } from "overlayscrollbars-react";
9
+ import { DayPicker as kr, useDayPicker as Sr } from "react-day-picker";
10
10
  import "react-day-picker/dist/style.css";
11
- import { FiSave as gr } from "react-icons/fi";
12
- import { Toaster as yr } from "sonner";
13
- function wr(...e) {
11
+ import { FiSave as Cr } from "react-icons/fi";
12
+ import { Toaster as $r } from "sonner";
13
+ function Er(...e) {
14
14
  return e.filter(Boolean).join(" ");
15
15
  }
16
- function Rn({
16
+ function Xn({
17
17
  variant: e = "primary",
18
18
  className: r,
19
19
  type: n = "button",
@@ -23,14 +23,14 @@ function Rn({
23
23
  return /* @__PURE__ */ t(
24
24
  "button",
25
25
  {
26
- className: wr("bonsaif-ui-button", `bonsaif-ui-button--${e}`, r),
26
+ className: Er("bonsaif-ui-button", `bonsaif-ui-button--${e}`, r),
27
27
  type: n,
28
28
  ...s,
29
29
  children: a
30
30
  }
31
31
  );
32
32
  }
33
- function Nr({
33
+ function Mr({
34
34
  value: e,
35
35
  onChange: r,
36
36
  placeholder: n,
@@ -41,25 +41,25 @@ function Nr({
41
41
  size: p = "default",
42
42
  inputTabIndex: d
43
43
  }) {
44
- const h = re(null), [N, k] = T(!1), v = u || N || e.trim().length > 0, m = p === "sm" ? "h-9 rounded-md" : "h-11 rounded-lg";
44
+ const h = re(null), [N, S] = D(!1), b = u || N || e.trim().length > 0, m = p === "sm" ? "h-9 rounded-md" : "h-11 rounded-lg";
45
45
  _(() => {
46
46
  var c;
47
- s && (k(!0), (c = h.current) == null || c.focus());
47
+ s && (S(!0), (c = h.current) == null || c.focus());
48
48
  }, [s]);
49
- const g = () => {
49
+ const v = () => {
50
50
  var c;
51
- k(!0), (c = h.current) == null || c.focus();
51
+ S(!0), (c = h.current) == null || c.focus();
52
52
  };
53
53
  return /* @__PURE__ */ i(
54
54
  "div",
55
55
  {
56
- className: `relative flex-shrink-0 overflow-visible transition-[width] duration-200 ease-out ${v ? a || "w-full" : "w-28"}`,
56
+ className: `relative flex-shrink-0 overflow-visible transition-[width] duration-200 ease-out ${b ? a || "w-full" : "w-28"}`,
57
57
  onMouseDown: (c) => {
58
- v || (c.preventDefault(), g());
58
+ b || (c.preventDefault(), v());
59
59
  },
60
60
  children: [
61
61
  /* @__PURE__ */ t(
62
- Ze,
62
+ Je,
63
63
  {
64
64
  className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 pointer-events-none transition-colors duration-200",
65
65
  style: { color: "var(--text-muted)" }
@@ -77,18 +77,18 @@ function Nr({
77
77
  onKeyDown: (c) => {
78
78
  c.key === "Escape" && (f == null || f());
79
79
  },
80
- placeholder: v ? n : "Buscar",
81
- className: `${m} w-full py-0 text-sm placeholder:text-[var(--text-muted)] focus:outline-none transition-all duration-200 ${v ? "pl-9 pr-9" : "cursor-pointer pl-9 pr-3"}`,
80
+ placeholder: b ? n : "Buscar",
81
+ className: `${m} w-full py-0 text-sm placeholder:text-[var(--text-muted)] focus:outline-none transition-all duration-200 ${b ? "pl-9 pr-9" : "cursor-pointer pl-9 pr-3"}`,
82
82
  style: {
83
83
  background: "var(--bg-card)",
84
84
  border: "1px solid var(--border)",
85
85
  color: "var(--text-main)"
86
86
  },
87
87
  onFocus: (c) => {
88
- k(!0), c.currentTarget.style.borderColor = "var(--primary)", c.currentTarget.style.boxShadow = "0 0 0 3px rgba(59,130,246,0.12)";
88
+ S(!0), c.currentTarget.style.borderColor = "var(--primary)", c.currentTarget.style.boxShadow = "0 0 0 3px rgba(59,130,246,0.12)";
89
89
  },
90
90
  onBlur: (c) => {
91
- k(!1), c.currentTarget.style.borderColor = "var(--border)", c.currentTarget.style.boxShadow = "none";
91
+ S(!1), c.currentTarget.style.borderColor = "var(--border)", c.currentTarget.style.boxShadow = "none";
92
92
  }
93
93
  }
94
94
  ),
@@ -107,70 +107,187 @@ function Nr({
107
107
  }
108
108
  );
109
109
  }
110
- function yt(e) {
110
+ const zt = Qt({});
111
+ function Or(e) {
112
+ var a;
113
+ const r = Array.from(
114
+ e.querySelectorAll("*")
115
+ ).filter(
116
+ (s) => {
117
+ var u;
118
+ return s.scrollWidth > s.clientWidth && !!((u = s.textContent) != null && u.trim()) && s.tagName.toLowerCase() !== "svg" && !s.closest("svg");
119
+ }
120
+ );
121
+ return (e.scrollWidth > e.clientWidth || r.length > 0) && (((a = r[0]) == null ? void 0 : a.textContent) ?? e.textContent ?? "").trim() || null;
122
+ }
123
+ function ut({
124
+ children: e,
125
+ content: r,
126
+ onlyWhenOverflow: n = !1,
127
+ className: a = "",
128
+ style: s,
129
+ as: u = "div"
130
+ }) {
131
+ const f = re(null), p = re(null), [d, h] = D(null), [N, S] = D("");
132
+ _(() => {
133
+ const v = f.current;
134
+ v && (v.querySelectorAll("[title]").forEach((c) => {
135
+ const y = c.getAttribute("title");
136
+ y && (c.getAttribute("aria-label") || c.setAttribute("aria-label", y), c.removeAttribute("title"));
137
+ }), v.querySelectorAll("svg title").forEach((c) => c.remove()));
138
+ }), er(() => {
139
+ if (!d) return;
140
+ const v = p.current;
141
+ if (!v) return;
142
+ const c = 12, y = 14, B = v.getBoundingClientRect(), R = window.innerWidth - B.width - c, A = window.innerHeight - B.height - c;
143
+ let C = d.mouseX + y, L = d.mouseY + y;
144
+ C > R && (C = d.mouseX - B.width - y), L > A && (L = d.mouseY - B.height - y), C = Math.min(Math.max(c, C), Math.max(c, R)), L = Math.min(Math.max(c, L), Math.max(c, A)), (Math.abs(C - d.x) > 0.5 || Math.abs(L - d.y) > 0.5) && h(
145
+ (M) => M && {
146
+ ...M,
147
+ x: C,
148
+ y: L
149
+ }
150
+ );
151
+ }, [d]);
152
+ const b = (v, c) => {
153
+ const y = f.current;
154
+ if (y) {
155
+ if (n) {
156
+ const B = Or(y);
157
+ if (!B) return;
158
+ S(B);
159
+ }
160
+ !n && !r || h({ mouseX: v, mouseY: c, x: v + 14, y: c + 14 });
161
+ }
162
+ }, m = n ? N : r;
163
+ return /* @__PURE__ */ i(we, { children: [
164
+ /* @__PURE__ */ t(
165
+ u,
166
+ {
167
+ ref: (v) => {
168
+ f.current = v;
169
+ },
170
+ className: a,
171
+ style: s,
172
+ onMouseEnter: (v) => b(v.clientX, v.clientY),
173
+ onMouseMove: (v) => {
174
+ d && b(v.clientX, v.clientY);
175
+ },
176
+ onMouseLeave: () => h(null),
177
+ children: e
178
+ }
179
+ ),
180
+ d && m ? Ke(
181
+ /* @__PURE__ */ t(
182
+ "div",
183
+ {
184
+ ref: p,
185
+ role: "tooltip",
186
+ style: {
187
+ position: "fixed",
188
+ top: d.y,
189
+ left: d.x,
190
+ zIndex: 9999,
191
+ background: "var(--bg-card)",
192
+ border: "1px solid var(--border)",
193
+ borderRadius: 6,
194
+ padding: "5px 10px",
195
+ fontSize: 12,
196
+ color: "var(--text-main)",
197
+ boxShadow: "0 4px 16px rgba(0,0,0,0.35)",
198
+ pointerEvents: "none",
199
+ maxWidth: "min(420px, calc(100vw - 24px))",
200
+ whiteSpace: "normal",
201
+ lineHeight: 1.6,
202
+ overflowWrap: "anywhere"
203
+ },
204
+ children: m
205
+ }
206
+ ),
207
+ document.body
208
+ ) : null
209
+ ] });
210
+ }
211
+ function Nt(e) {
111
212
  if (e !== void 0)
112
213
  return typeof e == "number" ? `${e}px` : e;
113
214
  }
114
- const kr = "inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap leading-none font-medium transition-all duration-150 focus:outline-none disabled:opacity-50 rounded-lg", Sr = {
215
+ const Br = "inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap leading-none font-medium transition-all duration-150 focus:outline-none disabled:opacity-50 rounded-lg", Tr = {
115
216
  primary: "border border-[var(--border)] text-[var(--text-main)] hover:border-[var(--border)] hover:bg-[var(--bg-input)] active:scale-[0.98] transition-colors",
116
217
  secondary: "border border-[var(--border)] text-[var(--text-main)] hover:border-[var(--border)] hover:bg-[var(--bg-input)] active:scale-[0.98] transition-colors",
117
218
  danger: "border border-[var(--border)] text-[var(--danger)] hover:border-[var(--danger)] hover:bg-[var(--danger-bg)] active:scale-[0.98] transition-colors",
118
219
  ghost: "text-[var(--text-secondary)] hover:opacity-70",
119
- icon: "h-9 w-9 text-[var(--text-muted)] hover:text-[var(--primary)] hover:bg-primary/5"
120
- }, Cr = {
220
+ icon: "text-[var(--text-muted)] hover:text-[var(--primary)] hover:bg-primary/5"
221
+ }, Lr = {
222
+ xs: "h-8 px-2.5 text-xs",
121
223
  sm: "h-9 px-3.5 text-xs",
122
224
  md: "h-11 px-4 text-sm",
123
225
  lg: "h-12 px-5 text-sm font-semibold"
124
- }, $r = {
226
+ }, Dr = {
227
+ xs: "h-8 w-8",
228
+ sm: "h-9 w-9",
229
+ md: "h-10 w-10",
230
+ lg: "h-11 w-11"
231
+ }, Ar = {
125
232
  primary: { background: "var(--bg-card)" },
126
233
  secondary: { background: "var(--bg-card)" },
127
234
  danger: { background: "var(--bg-card)" },
128
235
  ghost: {},
129
236
  icon: {}
130
237
  };
238
+ function ct(e) {
239
+ return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(ct).join(" ").trim() : It(e) ? ct(e.props.children) : "";
240
+ }
241
+ function Ir(e) {
242
+ return rr.toArray(e).find(It) ?? null;
243
+ }
131
244
  function xe({
132
245
  variant: e = "primary",
133
246
  size: r = "md",
134
247
  loading: n = !1,
135
248
  icon: a,
136
- height: s,
137
- padding: u,
138
- children: f,
139
- className: p = "",
140
- disabled: d,
141
- style: h,
142
- ...N
249
+ tooltip: s,
250
+ iconOnly: u,
251
+ height: f,
252
+ padding: p,
253
+ children: d,
254
+ className: h = "",
255
+ disabled: N,
256
+ style: S,
257
+ ...b
143
258
  }) {
144
- const k = e === "icon";
145
- return /* @__PURE__ */ i(
259
+ const m = tr(zt), v = u ?? m.iconOnly ?? e === "icon", c = m.compact ?? !1, y = c && r === "md" ? "xs" : r, B = e === "icon" || v, R = ct(d), A = s ?? b.title ?? b["aria-label"] ?? (v ? R : void 0), C = A ? void 0 : b.title, L = b["aria-label"] ?? (typeof A == "string" ? A : R || void 0), M = n ? null : a ?? (v ? Ir(d) : null), $ = /* @__PURE__ */ i(
146
260
  "button",
147
261
  {
148
- ...N,
262
+ ...b,
263
+ title: C,
264
+ "aria-label": L,
149
265
  "data-variant": e,
150
- "data-size": r,
151
- "data-icon": k ? "true" : void 0,
152
- disabled: d || n,
153
- className: `${kr} ${Sr[e]} ${k ? "" : Cr[r]} ${p}`,
266
+ "data-size": y,
267
+ "data-icon": B ? "true" : void 0,
268
+ disabled: N || n,
269
+ className: `${Br} ${Tr[e]} ${B ? Dr[y] : Lr[y]} ${c && !B ? "px-2.5" : ""} ${h}`,
154
270
  style: {
155
- ...$r[e],
156
- height: yt(s),
157
- padding: yt(u),
158
- ...h
271
+ ...Ar[e],
272
+ height: Nt(f),
273
+ padding: Nt(p),
274
+ ...S
159
275
  },
160
276
  children: [
161
- n ? /* @__PURE__ */ t("span", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : a,
162
- f
277
+ n ? /* @__PURE__ */ t("span", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : M,
278
+ !v && d
163
279
  ]
164
280
  }
165
281
  );
282
+ return A ? /* @__PURE__ */ t(ut, { as: "span", content: A, className: "inline-flex shrink-0", children: $ }) : $;
166
283
  }
167
- function Er({
284
+ function Pr({
168
285
  variant: e = "page",
169
286
  title: r = "Cargando...",
170
287
  rows: n = 6,
171
288
  children: a
172
289
  }) {
173
- return e === "table" ? /* @__PURE__ */ t(At, { rows: n }) : e === "sections" ? /* @__PURE__ */ t(Mr, { rows: n }) : e === "cards" ? /* @__PURE__ */ t(Br, { rows: n }) : /* @__PURE__ */ t("div", { className: "flex min-h-[240px] items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-6", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-center gap-3 text-center", children: [
290
+ return e === "table" ? /* @__PURE__ */ t(jt, { rows: n }) : e === "sections" ? /* @__PURE__ */ t(zr, { rows: n }) : e === "cards" ? /* @__PURE__ */ t(jr, { rows: n }) : /* @__PURE__ */ t("div", { className: "flex min-h-[240px] items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-6", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-center gap-3 text-center", children: [
174
291
  /* @__PURE__ */ t("div", { className: "h-9 w-9 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--primary)]" }),
175
292
  /* @__PURE__ */ i("div", { children: [
176
293
  /* @__PURE__ */ t("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: r }),
@@ -178,7 +295,7 @@ function Er({
178
295
  ] })
179
296
  ] }) });
180
297
  }
181
- function Mr({ rows: e }) {
298
+ function zr({ rows: e }) {
182
299
  return /* @__PURE__ */ t("div", { className: "space-y-4", children: Array.from({ length: Math.max(2, Math.min(e, 4)) }).map(
183
300
  (r, n) => /* @__PURE__ */ i(
184
301
  "section",
@@ -197,7 +314,7 @@ function Mr({ rows: e }) {
197
314
  ] })
198
315
  ] }),
199
316
  /* @__PURE__ */ t(
200
- At,
317
+ jt,
201
318
  {
202
319
  rows: n === 0 ? e : Math.max(3, e - 2),
203
320
  compact: !0
@@ -209,7 +326,7 @@ function Mr({ rows: e }) {
209
326
  )
210
327
  ) });
211
328
  }
212
- function Br({ rows: e }) {
329
+ function jr({ rows: e }) {
213
330
  return /* @__PURE__ */ t("div", { className: "grid gap-3 md:grid-cols-2 xl:grid-cols-3", children: Array.from({ length: e }).map((r, n) => /* @__PURE__ */ i(
214
331
  "div",
215
332
  {
@@ -223,7 +340,7 @@ function Br({ rows: e }) {
223
340
  n
224
341
  )) });
225
342
  }
226
- function At({
343
+ function jt({
227
344
  rows: e,
228
345
  compact: r = !1
229
346
  }) {
@@ -256,32 +373,32 @@ function At({
256
373
  ))
257
374
  ] });
258
375
  }
259
- function Pt(e) {
376
+ function _t(e) {
260
377
  const r = e.split("/").filter(Boolean);
261
378
  return (r[r.length - 1] ?? e).replace(/^lv_/, "").split(/[-_]/).filter(Boolean).map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ");
262
379
  }
263
- function wt(e) {
380
+ function kt(e) {
264
381
  return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim();
265
382
  }
266
- function Or(e) {
383
+ function _r(e) {
267
384
  return [
268
385
  e.label,
269
- Pt(e.service),
386
+ _t(e.service),
270
387
  e.description,
271
388
  e.service
272
389
  ].filter(Boolean).join(" ");
273
390
  }
274
- function Tr(e) {
391
+ function Rr(e) {
275
392
  return typeof e == "function" ? e : e.default;
276
393
  }
277
- function Lr(e, r) {
394
+ function Hr(e, r) {
278
395
  return /* @__PURE__ */ t("div", { className: "flex min-h-[220px] items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-6 text-center", children: /* @__PURE__ */ i("div", { className: "max-w-md", children: [
279
396
  /* @__PURE__ */ t("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: "No se pudo cargar este modulo" }),
280
397
  /* @__PURE__ */ t("p", { className: "mt-1 text-xs text-[var(--text-muted)]", children: e.message }),
281
398
  /* @__PURE__ */ t(xe, { className: "mt-4", height: 36, padding: "0 14px", onClick: r, children: "Reintentar" })
282
399
  ] }) });
283
400
  }
284
- function Hn({
401
+ function Vn({
285
402
  parentPanel: e,
286
403
  parentPanelComponent: r,
287
404
  renderParentPanel: n,
@@ -293,66 +410,66 @@ function Hn({
293
410
  activeService: d,
294
411
  initialService: h,
295
412
  onActiveServiceChange: N,
296
- canAccess: k,
297
- keepAlive: v = !0,
413
+ canAccess: S,
414
+ keepAlive: b = !0,
298
415
  title: m,
299
- subtitle: g,
416
+ subtitle: v,
300
417
  emptyState: c,
301
418
  loadingState: y,
302
- errorState: L = Lr,
303
- renderTabLabel: W,
304
- searchableTabs: z = "auto",
305
- tabsSearchThreshold: $ = 6,
306
- tabsSearchPlaceholder: D = "Buscar modulo...",
307
- tabsSearchValue: B,
308
- onTabsSearchChange: M,
309
- emptySearchState: R,
310
- showTabCount: E = !0,
311
- className: O = "",
419
+ errorState: B = Hr,
420
+ renderTabLabel: R,
421
+ searchableTabs: A = "auto",
422
+ tabsSearchThreshold: C = 6,
423
+ tabsSearchPlaceholder: L = "Buscar modulo...",
424
+ tabsSearchValue: M,
425
+ onTabsSearchChange: $,
426
+ emptySearchState: H,
427
+ showTabCount: O = !0,
428
+ className: T = "",
312
429
  parentClassName: P = "",
313
- contentClassName: Z = "",
314
- tabsClassName: H = ""
430
+ contentClassName: J = "",
431
+ tabsClassName: W = ""
315
432
  }) {
316
433
  var ve;
317
434
  const F = ze(
318
435
  () => u.filter(
319
- (b) => !b.hidden && ((k == null ? void 0 : k(b, s)) ?? !0)
436
+ (x) => !x.hidden && ((S == null ? void 0 : S(x, s)) ?? !0)
320
437
  ),
321
- [k, s, u]
438
+ [S, s, u]
322
439
  ), V = (ve = F.find(
323
- (b) => !b.disabled
324
- )) == null ? void 0 : ve.service, [Q, o] = T(
440
+ (x) => !x.disabled
441
+ )) == null ? void 0 : ve.service, [Q, o] = D(
325
442
  h ?? V ?? ""
326
- ), [w, U] = T({}), [Y, X] = T({}), [te, ce] = T(""), [ne, Ne] = T(!1), pe = re(Y), he = re(0), de = B ?? te, S = wt(de), j = z === !0 || z === "auto" && F.length >= $, q = j && de.trim().length > 0, ae = ze(() => S ? F.filter(
327
- (b) => wt(Or(b)).includes(S)
328
- ) : F, [S, F]), oe = d ?? Q, I = F.find((b) => b.service === oe) ?? F.find((b) => !b.disabled);
443
+ ), [w, U] = D({}), [Y, X] = D({}), [te, ce] = D(""), [ne, Ne] = D(!1), pe = re(Y), he = re(0), de = M ?? te, k = kt(de), j = A === !0 || A === "auto" && F.length >= C, q = j && de.trim().length > 0, ae = ze(() => k ? F.filter(
444
+ (x) => kt(_r(x)).includes(k)
445
+ ) : F, [k, F]), oe = d ?? Q, z = F.find((x) => x.service === oe) ?? F.find((x) => !x.disabled);
329
446
  _(() => {
330
- !I && V && o(V);
331
- }, [V, I]), _(() => {
447
+ !z && V && o(V);
448
+ }, [V, z]), _(() => {
332
449
  pe.current = Y;
333
450
  }, [Y]);
334
- const ke = (b) => {
335
- b.disabled || (d || o(b.service), N == null || N(b.service, b));
336
- }, Re = (b) => {
337
- B === void 0 && ce(b), M == null || M(b);
338
- }, Qe = (b, ee) => {
339
- const J = ae.filter((le) => !le.disabled), ye = J.findIndex(
451
+ const ke = (x) => {
452
+ x.disabled || (d || o(x.service), N == null || N(x.service, x));
453
+ }, Re = (x) => {
454
+ M === void 0 && ce(x), $ == null || $(x);
455
+ }, Qe = (x, ee) => {
456
+ const Z = ae.filter((le) => !le.disabled), ye = Z.findIndex(
340
457
  (le) => le.service === ee.service
341
458
  );
342
- ye < 0 || ((b.key === "ArrowRight" || b.key === "ArrowDown") && (b.preventDefault(), ke(J[(ye + 1) % J.length])), (b.key === "ArrowLeft" || b.key === "ArrowUp") && (b.preventDefault(), ke(
343
- J[(ye - 1 + J.length) % J.length]
344
- )), b.key === "Home" && (b.preventDefault(), ke(J[0])), b.key === "End" && (b.preventDefault(), ke(J[J.length - 1])));
459
+ ye < 0 || ((x.key === "ArrowRight" || x.key === "ArrowDown") && (x.preventDefault(), ke(Z[(ye + 1) % Z.length])), (x.key === "ArrowLeft" || x.key === "ArrowUp") && (x.preventDefault(), ke(
460
+ Z[(ye - 1 + Z.length) % Z.length]
461
+ )), x.key === "Home" && (x.preventDefault(), ke(Z[0])), x.key === "End" && (x.preventDefault(), ke(Z[Z.length - 1])));
345
462
  }, me = st(() => {
346
- if (!I) return;
347
- const b = I.service, ee = pe.current[b];
348
- if (ee != null && ee.loading || ee != null && ee.component && v) return;
349
- const J = (f == null ? void 0 : f[b]) ?? p;
350
- if (!J) {
463
+ if (!z) return;
464
+ const x = z.service, ee = pe.current[x];
465
+ if (ee != null && ee.loading || ee != null && ee.component && b) return;
466
+ const Z = (f == null ? void 0 : f[x]) ?? p;
467
+ if (!Z) {
351
468
  X((le) => ({
352
469
  ...le,
353
- [b]: {
470
+ [x]: {
354
471
  loading: !1,
355
- error: new Error(`No module loader found for service "${b}".`)
472
+ error: new Error(`No module loader found for service "${x}".`)
356
473
  }
357
474
  }));
358
475
  return;
@@ -360,32 +477,32 @@ function Hn({
360
477
  const ye = ++he.current;
361
478
  X((le) => ({
362
479
  ...le,
363
- [b]: { ...le[b], loading: !0, error: void 0 }
364
- })), J(I, s).then((le) => {
365
- if (ye !== he.current && !v) return;
366
- const De = Tr(le);
480
+ [x]: { ...le[x], loading: !0, error: void 0 }
481
+ })), Z(z, s).then((le) => {
482
+ if (ye !== he.current && !b) return;
483
+ const De = Rr(le);
367
484
  X((Ce) => ({
368
485
  ...Ce,
369
- [b]: { component: De, loading: !1 }
486
+ [x]: { component: De, loading: !1 }
370
487
  }));
371
488
  }).catch((le) => {
372
489
  const De = le instanceof Error ? le : new Error(String(le));
373
490
  X((Ce) => ({
374
491
  ...Ce,
375
- [b]: { ...Ce[b], loading: !1, error: De }
492
+ [x]: { ...Ce[x], loading: !1, error: De }
376
493
  }));
377
494
  });
378
- }, [s, v, p, f, I]);
495
+ }, [s, b, p, f, z]);
379
496
  _(me, [me]);
380
- const He = I ? w[I.service] ?? null : null, ie = I ? Y[I.service] : void 0, We = ie == null ? void 0 : ie.component, Oe = (b) => {
381
- I && U((ee) => ({
497
+ const He = z ? w[z.service] ?? null : null, ie = z ? Y[z.service] : void 0, We = ie == null ? void 0 : ie.component, Be = (x) => {
498
+ z && U((ee) => ({
382
499
  ...ee,
383
- [I.service]: b
500
+ [z.service]: x
384
501
  }));
385
502
  }, Le = () => {
386
- I && U((b) => ({
387
- ...b,
388
- [I.service]: null
503
+ z && U((x) => ({
504
+ ...x,
505
+ [z.service]: null
389
506
  }));
390
507
  }, Fe = {
391
508
  context: s,
@@ -393,18 +510,18 @@ function Hn({
393
510
  links: u,
394
511
  visibleLinks: F,
395
512
  filteredLinks: ae,
396
- selectedLink: I,
397
- selectedService: I == null ? void 0 : I.service,
513
+ selectedLink: z,
514
+ selectedService: z == null ? void 0 : z.service,
398
515
  activeItemId: He,
399
516
  tabsSearch: de,
400
517
  onSelectService: ke,
401
- onOpenDetail: Oe,
518
+ onOpenDetail: Be,
402
519
  onBackToList: Le
403
520
  }, Se = n ? n(Fe) : r ? /* @__PURE__ */ t(r, { ...Fe }) : e;
404
521
  return /* @__PURE__ */ i(
405
522
  "section",
406
523
  {
407
- className: `grid min-h-[520px] gap-4 lg:grid-cols-[minmax(260px,360px)_minmax(0,1fr)] ${O}`,
524
+ className: `grid min-h-[520px] gap-4 lg:grid-cols-[minmax(260px,360px)_minmax(0,1fr)] ${T}`,
408
525
  children: [
409
526
  /* @__PURE__ */ t(
410
527
  "aside",
@@ -416,15 +533,15 @@ function Hn({
416
533
  /* @__PURE__ */ i(
417
534
  "div",
418
535
  {
419
- className: `relative min-w-0 overflow-visible rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${Z}`,
536
+ className: `relative min-w-0 overflow-visible rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${J}`,
420
537
  children: [
421
- (m || g || j || E) && /* @__PURE__ */ t("div", { className: "relative border-b border-[var(--border)] px-4 py-3", children: /* @__PURE__ */ i("div", { className: "flex min-w-0 items-start justify-between gap-3", children: [
538
+ (m || v || j || O) && /* @__PURE__ */ t("div", { className: "relative border-b border-[var(--border)] px-4 py-3", children: /* @__PURE__ */ i("div", { className: "flex min-w-0 items-start justify-between gap-3", children: [
422
539
  /* @__PURE__ */ i("div", { className: "min-w-0", children: [
423
540
  m && /* @__PURE__ */ t("h2", { className: "truncate text-sm font-semibold text-[var(--text-main)]", children: m }),
424
- g && /* @__PURE__ */ t("p", { className: "mt-1 line-clamp-2 text-xs text-[var(--text-muted)]", children: g })
541
+ v && /* @__PURE__ */ t("p", { className: "mt-1 line-clamp-2 text-xs text-[var(--text-muted)]", children: v })
425
542
  ] }),
426
- (j || E) && /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-shrink-0 items-center justify-end gap-2", children: [
427
- E && /* @__PURE__ */ i("span", { className: "hidden text-xs font-semibold text-[var(--text-muted)] transition-opacity duration-200 sm:inline", children: [
543
+ (j || O) && /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-shrink-0 items-center justify-end gap-2", children: [
544
+ O && /* @__PURE__ */ i("span", { className: "hidden text-xs font-semibold text-[var(--text-muted)] transition-opacity duration-200 sm:inline", children: [
428
545
  ae.length,
429
546
  " / ",
430
547
  F.length
@@ -436,11 +553,11 @@ function Hn({
436
553
  className: `origin-right overflow-hidden transition-[width,opacity,transform] duration-200 ease-out ${ne ? "w-[min(20rem,44vw)] translate-x-0 opacity-100" : "w-0 translate-x-2 opacity-0"}`,
437
554
  "aria-hidden": !ne,
438
555
  children: /* @__PURE__ */ t(
439
- Nr,
556
+ Mr,
440
557
  {
441
558
  value: de,
442
559
  onChange: Re,
443
- placeholder: D,
560
+ placeholder: L,
444
561
  className: "w-full",
445
562
  autoFocus: ne,
446
563
  forceExpanded: !0,
@@ -458,10 +575,10 @@ function Hn({
458
575
  "aria-label": ne ? "Cerrar busqueda" : "Buscar tabs",
459
576
  "aria-expanded": ne,
460
577
  onClick: () => {
461
- ne && de && Re(""), Ne((b) => !b);
578
+ ne && de && Re(""), Ne((x) => !x);
462
579
  },
463
580
  className: `inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md border transition-all duration-200 hover:scale-[1.03] active:scale-95 ${ne || q ? "border-[var(--primary)] bg-[var(--bg-input)] text-[var(--text-main)] shadow-sm" : "border-[var(--border)] text-[var(--text-muted)] hover:bg-[var(--bg-input)] hover:text-[var(--text-main)]"}`,
464
- children: /* @__PURE__ */ t("span", { className: "grid h-4 w-4 place-items-center transition-transform duration-200", children: ne || q ? /* @__PURE__ */ t(Ee, { className: "h-4 w-4" }) : /* @__PURE__ */ t(Ze, { className: "h-4 w-4" }) })
581
+ children: /* @__PURE__ */ t("span", { className: "grid h-4 w-4 place-items-center transition-transform duration-200", children: ne || q ? /* @__PURE__ */ t(Ee, { className: "h-4 w-4" }) : /* @__PURE__ */ t(Je, { className: "h-4 w-4" }) })
465
582
  }
466
583
  )
467
584
  ] })
@@ -472,43 +589,43 @@ function Hn({
472
589
  {
473
590
  role: "tablist",
474
591
  "aria-label": m ?? "Modulos relacionados",
475
- className: `flex gap-1 overflow-x-auto border-b border-[var(--border)] bg-[var(--bg-input)] px-2 py-1.5 transition-colors duration-200 ${H}`,
476
- children: ae.length > 0 ? ae.map((b) => {
477
- const ee = b.service === (I == null ? void 0 : I.service);
592
+ className: `flex gap-1 overflow-x-auto border-b border-[var(--border)] bg-[var(--bg-input)] px-2 py-1.5 transition-colors duration-200 ${W}`,
593
+ children: ae.length > 0 ? ae.map((x) => {
594
+ const ee = x.service === (z == null ? void 0 : z.service);
478
595
  return /* @__PURE__ */ t(
479
596
  "button",
480
597
  {
481
598
  type: "button",
482
599
  role: "tab",
483
600
  "aria-selected": ee,
484
- disabled: b.disabled,
485
- onClick: () => ke(b),
486
- onKeyDown: (J) => Qe(J, b),
601
+ disabled: x.disabled,
602
+ onClick: () => ke(x),
603
+ onKeyDown: (Z) => Qe(Z, x),
487
604
  className: `inline-flex h-9 min-w-max items-center gap-2 rounded-md border px-3 text-xs font-semibold transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-50 ${ee ? "border-[var(--primary)] bg-[var(--bg-card)] text-[var(--text-main)] shadow-sm" : "border-transparent text-[var(--text-muted)] hover:bg-[var(--bg-card)] hover:text-[var(--text-main)]"}`,
488
- children: W ? W(b, ee) : /* @__PURE__ */ i(we, { children: [
489
- b.icon,
490
- /* @__PURE__ */ t("span", { children: b.label ?? Pt(b.service) }),
491
- b.badge && /* @__PURE__ */ t("span", { className: "rounded-full bg-[var(--bg-input)] px-1.5 py-0.5 text-[10px] text-[var(--text-muted)]", children: b.badge })
605
+ children: R ? R(x, ee) : /* @__PURE__ */ i(we, { children: [
606
+ x.icon,
607
+ /* @__PURE__ */ t("span", { children: x.label ?? _t(x.service) }),
608
+ x.badge && /* @__PURE__ */ t("span", { className: "rounded-full bg-[var(--bg-input)] px-1.5 py-0.5 text-[10px] text-[var(--text-muted)]", children: x.badge })
492
609
  ] })
493
610
  },
494
- b.service
611
+ x.service
495
612
  );
496
- }) : /* @__PURE__ */ t("div", { className: "flex min-h-9 flex-1 items-center rounded-md border border-dashed border-[var(--border)] px-3 text-xs text-[var(--text-muted)]", children: R ?? "No hay modulos que coincidan con la busqueda." })
613
+ }) : /* @__PURE__ */ t("div", { className: "flex min-h-9 flex-1 items-center rounded-md border border-dashed border-[var(--border)] px-3 text-xs text-[var(--text-muted)]", children: H ?? "No hay modulos que coincidan con la busqueda." })
497
614
  }
498
615
  ),
499
- (I == null ? void 0 : I.description) && /* @__PURE__ */ t("div", { className: "border-b border-[var(--border)] px-4 py-2 text-xs text-[var(--text-muted)]", children: I.description }),
616
+ (z == null ? void 0 : z.description) && /* @__PURE__ */ t("div", { className: "border-b border-[var(--border)] px-4 py-2 text-xs text-[var(--text-muted)]", children: z.description }),
500
617
  /* @__PURE__ */ i("div", { className: "min-h-[420px] p-4", children: [
501
- !I && (c ?? /* @__PURE__ */ t("div", { className: "flex min-h-[220px] items-center justify-center rounded-lg border border-dashed border-[var(--border)] text-sm text-[var(--text-muted)]", children: "No hay modulos disponibles." })),
502
- I && (ie == null ? void 0 : ie.loading) && (y ?? /* @__PURE__ */ t(Er, { title: "Cargando modulo..." })),
503
- I && (ie == null ? void 0 : ie.error) && L(ie.error, me),
504
- I && We && !(ie != null && ie.loading) && !(ie != null && ie.error) && /* @__PURE__ */ t(
618
+ !z && (c ?? /* @__PURE__ */ t("div", { className: "flex min-h-[220px] items-center justify-center rounded-lg border border-dashed border-[var(--border)] text-sm text-[var(--text-muted)]", children: "No hay modulos disponibles." })),
619
+ z && (ie == null ? void 0 : ie.loading) && (y ?? /* @__PURE__ */ t(Pr, { title: "Cargando modulo..." })),
620
+ z && (ie == null ? void 0 : ie.error) && B(ie.error, me),
621
+ z && We && !(ie != null && ie.loading) && !(ie != null && ie.error) && /* @__PURE__ */ t(
505
622
  We,
506
623
  {
507
624
  context: s,
508
625
  parent: a,
509
- link: I,
626
+ link: z,
510
627
  activeItemId: He,
511
- onOpenDetail: Oe,
628
+ onOpenDetail: Be,
512
629
  onBackToList: Le
513
630
  }
514
631
  )
@@ -520,7 +637,7 @@ function Hn({
520
637
  }
521
638
  );
522
639
  }
523
- const It = [
640
+ const Rt = [
524
641
  "Enero",
525
642
  "Febrero",
526
643
  "Marzo",
@@ -533,7 +650,7 @@ const It = [
533
650
  "Octubre",
534
651
  "Noviembre",
535
652
  "Diciembre"
536
- ], Dr = [
653
+ ], Wr = [
537
654
  "Ene",
538
655
  "Feb",
539
656
  "Mar",
@@ -546,37 +663,37 @@ const It = [
546
663
  "Oct",
547
664
  "Nov",
548
665
  "Dic"
549
- ], Ar = ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"], nt = 6;
550
- function ct(e, r, n) {
666
+ ], Fr = ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"], nt = 6;
667
+ function dt(e, r, n) {
551
668
  return `${e}-${String(r).padStart(2, "0")}-${String(n).padStart(2, "0")}`;
552
669
  }
553
- function Pr() {
670
+ function Ur() {
554
671
  const e = /* @__PURE__ */ new Date();
555
- return ct(e.getFullYear(), e.getMonth() + 1, e.getDate());
672
+ return dt(e.getFullYear(), e.getMonth() + 1, e.getDate());
556
673
  }
557
- function zt(e) {
674
+ function Ht(e) {
558
675
  const [r, n, a] = e.split("-").map(Number);
559
676
  return { year: r, month: n, day: a };
560
677
  }
561
- function Ir(e) {
678
+ function Yr(e) {
562
679
  if (!e) return "Seleccionar fecha";
563
- const { year: r, month: n, day: a } = zt(e);
564
- return !r || !n || !a ? "Seleccionar fecha" : `${String(a).padStart(2, "0")} ${It[n - 1]} ${r}`;
680
+ const { year: r, month: n, day: a } = Ht(e);
681
+ return !r || !n || !a ? "Seleccionar fecha" : `${String(a).padStart(2, "0")} ${Rt[n - 1]} ${r}`;
565
682
  }
566
- function Wn({
683
+ function Zn({
567
684
  value: e,
568
685
  onChange: r,
569
686
  minDate: n,
570
687
  displayMode: a = "inline"
571
688
  }) {
572
- const s = Pr(), f = zt(e || s), p = a === "popover", [d, h] = T(!1), N = re(null), [k, v] = T({
689
+ const s = Ur(), f = Ht(e || s), p = a === "popover", [d, h] = D(!1), N = re(null), [S, b] = D({
573
690
  horizontal: "left",
574
691
  vertical: "bottom"
575
- }), [m, g] = T(f.year), [c, y] = T(f.month), [L, W] = T("days"), z = 16, [$, D] = T(0), B = m - 7 + $, M = Array.from({ length: z }, (o, w) => B + w);
692
+ }), [m, v] = D(f.year), [c, y] = D(f.month), [B, R] = D("days"), A = 16, [C, L] = D(0), M = m - 7 + C, $ = Array.from({ length: A }, (o, w) => M + w);
576
693
  _(() => {
577
694
  if (!p || !d || !N.current) return;
578
695
  const o = N.current.getBoundingClientRect(), w = 8, U = 280, Y = 340, X = o.left + U > window.innerWidth - w, te = o.right - U >= w, ce = o.bottom + 8 + Y > window.innerHeight - w, ne = o.top - 8 - Y >= w;
579
- v({
696
+ b({
580
697
  horizontal: X && te ? "right" : "left",
581
698
  vertical: ce && ne ? "top" : "bottom"
582
699
  });
@@ -592,20 +709,20 @@ function Wn({
592
709
  document.removeEventListener("mousedown", o), document.removeEventListener("keydown", w);
593
710
  };
594
711
  }, [p, d]);
595
- function R() {
596
- c === 1 ? (g((o) => o - 1), y(12)) : y((o) => o - 1);
712
+ function H() {
713
+ c === 1 ? (v((o) => o - 1), y(12)) : y((o) => o - 1);
597
714
  }
598
- function E() {
599
- c === 12 ? (g((o) => o + 1), y(1)) : y((o) => o + 1);
715
+ function O() {
716
+ c === 12 ? (v((o) => o + 1), y(1)) : y((o) => o + 1);
600
717
  }
601
- const O = new Date(m, c - 1, 1).getDay(), P = new Date(m, c, 0).getDate(), Z = [
602
- ...Array(O).fill(null),
718
+ const T = new Date(m, c - 1, 1).getDay(), P = new Date(m, c, 0).getDate(), J = [
719
+ ...Array(T).fill(null),
603
720
  ...Array.from({ length: P }, (o, w) => w + 1)
604
721
  ];
605
- for (; Z.length < nt * 7; ) Z.push(null);
606
- const H = Z.slice(0, nt * 7);
722
+ for (; J.length < nt * 7; ) J.push(null);
723
+ const W = J.slice(0, nt * 7);
607
724
  function F(o) {
608
- const w = ct(m, c, o);
725
+ const w = dt(m, c, o);
609
726
  n && w < n || (r(w), p && h(!1));
610
727
  }
611
728
  const V = {
@@ -639,12 +756,12 @@ function Wn({
639
756
  padding: "10px 12px",
640
757
  borderBottom: "1px solid var(--border)"
641
758
  },
642
- children: L === "days" ? /* @__PURE__ */ i(we, { children: [
759
+ children: B === "days" ? /* @__PURE__ */ i(we, { children: [
643
760
  /* @__PURE__ */ t(
644
761
  "button",
645
762
  {
646
763
  type: "button",
647
- onClick: R,
764
+ onClick: H,
648
765
  style: V,
649
766
  title: "Mes anterior",
650
767
  children: /* @__PURE__ */ t(je, { size: 16 })
@@ -655,7 +772,7 @@ function Wn({
655
772
  {
656
773
  type: "button",
657
774
  onClick: () => {
658
- W("years"), D(0);
775
+ R("years"), L(0);
659
776
  },
660
777
  style: {
661
778
  background: "none",
@@ -671,7 +788,7 @@ function Wn({
671
788
  padding: "2px 6px"
672
789
  },
673
790
  children: [
674
- It[c - 1],
791
+ Rt[c - 1],
675
792
  " ",
676
793
  m,
677
794
  /* @__PURE__ */ t(_e, { size: 13, style: { color: "var(--text-muted)" } })
@@ -682,7 +799,7 @@ function Wn({
682
799
  "button",
683
800
  {
684
801
  type: "button",
685
- onClick: E,
802
+ onClick: O,
686
803
  style: V,
687
804
  title: "Mes siguiente",
688
805
  children: /* @__PURE__ */ t(Te, { size: 16 })
@@ -693,7 +810,7 @@ function Wn({
693
810
  "button",
694
811
  {
695
812
  type: "button",
696
- onClick: () => D((o) => o - z),
813
+ onClick: () => L((o) => o - A),
697
814
  style: V,
698
815
  children: /* @__PURE__ */ t(je, { size: 16 })
699
816
  }
@@ -702,7 +819,7 @@ function Wn({
702
819
  "button",
703
820
  {
704
821
  type: "button",
705
- onClick: () => W("days"),
822
+ onClick: () => R("days"),
706
823
  style: {
707
824
  background: "none",
708
825
  border: "none",
@@ -714,9 +831,9 @@ function Wn({
714
831
  padding: "2px 6px"
715
832
  },
716
833
  children: [
717
- M[0],
834
+ $[0],
718
835
  " – ",
719
- M[M.length - 1]
836
+ $[$.length - 1]
720
837
  ]
721
838
  }
722
839
  ),
@@ -724,7 +841,7 @@ function Wn({
724
841
  "button",
725
842
  {
726
843
  type: "button",
727
- onClick: () => D((o) => o + z),
844
+ onClick: () => L((o) => o + A),
728
845
  style: V,
729
846
  children: /* @__PURE__ */ t(Te, { size: 16 })
730
847
  }
@@ -732,7 +849,7 @@ function Wn({
732
849
  ] })
733
850
  }
734
851
  ),
735
- L === "years" && /* @__PURE__ */ i("div", { style: { padding: "8px 10px 10px" }, children: [
852
+ B === "years" && /* @__PURE__ */ i("div", { style: { padding: "8px 10px 10px" }, children: [
736
853
  /* @__PURE__ */ t(
737
854
  "div",
738
855
  {
@@ -742,7 +859,7 @@ function Wn({
742
859
  gap: 3,
743
860
  marginBottom: 8
744
861
  },
745
- children: Dr.map((o, w) => {
862
+ children: Wr.map((o, w) => {
746
863
  const U = w + 1 === c;
747
864
  return /* @__PURE__ */ t(
748
865
  "button",
@@ -780,14 +897,14 @@ function Wn({
780
897
  gridTemplateColumns: "repeat(4,1fr)",
781
898
  gap: 3
782
899
  },
783
- children: M.map((o) => {
900
+ children: $.map((o) => {
784
901
  const w = o === m;
785
902
  return /* @__PURE__ */ t(
786
903
  "button",
787
904
  {
788
905
  type: "button",
789
906
  onClick: () => {
790
- g(o), W("days");
907
+ v(o), R("days");
791
908
  },
792
909
  style: {
793
910
  border: "none",
@@ -809,7 +926,7 @@ function Wn({
809
926
  }
810
927
  )
811
928
  ] }),
812
- L === "days" && /* @__PURE__ */ i(we, { children: [
929
+ B === "days" && /* @__PURE__ */ i(we, { children: [
813
930
  /* @__PURE__ */ t(
814
931
  "div",
815
932
  {
@@ -818,7 +935,7 @@ function Wn({
818
935
  gridTemplateColumns: "repeat(7,1fr)",
819
936
  padding: "6px 8px 0"
820
937
  },
821
- children: Ar.map((o) => /* @__PURE__ */ t(
938
+ children: Fr.map((o) => /* @__PURE__ */ t(
822
939
  "div",
823
940
  {
824
941
  style: {
@@ -845,10 +962,10 @@ function Wn({
845
962
  padding: "4px 8px 10px",
846
963
  gap: 2
847
964
  },
848
- children: H.map((o, w) => {
965
+ children: W.map((o, w) => {
849
966
  if (o === null)
850
967
  return /* @__PURE__ */ t("div", { style: { aspectRatio: "1" } }, w);
851
- const U = ct(m, c, o), Y = U === e, X = U === s, te = !!(n && U < n);
968
+ const U = dt(m, c, o), Y = U === e, X = U === s, te = !!(n && U < n);
852
969
  return /* @__PURE__ */ t(
853
970
  "button",
854
971
  {
@@ -895,7 +1012,7 @@ function Wn({
895
1012
  children: [
896
1013
  /* @__PURE__ */ i("span", { className: "inline-flex items-center gap-2 min-w-0", children: [
897
1014
  /* @__PURE__ */ t(lt, { className: "w-4 h-4 text-[var(--text-muted)]" }),
898
- /* @__PURE__ */ t("span", { className: "truncate", children: Ir(e) })
1015
+ /* @__PURE__ */ t("span", { className: "truncate", children: Yr(e) })
899
1016
  ] }),
900
1017
  /* @__PURE__ */ t(
901
1018
  _e,
@@ -911,19 +1028,19 @@ function Wn({
911
1028
  {
912
1029
  className: "absolute z-50",
913
1030
  style: {
914
- ...k.horizontal === "left" ? { left: 0 } : { right: 0 },
915
- ...k.vertical === "bottom" ? { top: "calc(100% + 8px)" } : { bottom: "calc(100% + 8px)" }
1031
+ ...S.horizontal === "left" ? { left: 0 } : { right: 0 },
1032
+ ...S.vertical === "bottom" ? { top: "calc(100% + 8px)" } : { bottom: "calc(100% + 8px)" }
916
1033
  },
917
1034
  children: Q
918
1035
  }
919
1036
  )
920
1037
  ] }) : Q;
921
1038
  }
922
- function Nt(e) {
1039
+ function St(e) {
923
1040
  if (e !== void 0)
924
1041
  return typeof e == "number" ? `${e}px` : e;
925
1042
  }
926
- function jt({
1043
+ function Wt({
927
1044
  value: e,
928
1045
  onChange: r,
929
1046
  options: n,
@@ -935,18 +1052,18 @@ function jt({
935
1052
  height: d = 44,
936
1053
  padding: h = "0 12px",
937
1054
  searchable: N = !0,
938
- minOptionsForSearch: k = 6
1055
+ minOptionsForSearch: S = 6
939
1056
  }) {
940
- const [v, m] = T(!1), [g, c] = T(""), [y, L] = T(-1), [W, z] = T(!1), [$, D] = T({}), B = re(null), M = re(null), R = re(null), E = re(null), O = N && n.length >= k, P = n.find((o) => o.value === e) ?? null, Z = O && g.trim() ? n.filter(
1057
+ const [b, m] = D(!1), [v, c] = D(""), [y, B] = D(-1), [R, A] = D(!1), [C, L] = D({}), M = re(null), $ = re(null), H = re(null), O = re(null), T = N && n.length >= S, P = n.find((o) => o.value === e) ?? null, J = T && v.trim() ? n.filter(
941
1058
  (o) => {
942
1059
  var w;
943
- return o.label.toLowerCase().includes(g.toLowerCase()) || ((w = o.sublabel) == null ? void 0 : w.toLowerCase().includes(g.toLowerCase()));
1060
+ return o.label.toLowerCase().includes(v.toLowerCase()) || ((w = o.sublabel) == null ? void 0 : w.toLowerCase().includes(v.toLowerCase()));
944
1061
  }
945
- ) : n, H = st(() => {
946
- const o = B.current;
1062
+ ) : n, W = st(() => {
1063
+ const o = M.current;
947
1064
  if (!o) return;
948
- const w = o.getBoundingClientRect(), U = O ? 272 : 212, Y = window.innerHeight - w.bottom, X = Y < U && w.top > Y;
949
- D({
1065
+ const w = o.getBoundingClientRect(), U = T ? 272 : 212, Y = window.innerHeight - w.bottom, X = Y < U && w.top > Y;
1066
+ L({
950
1067
  position: "fixed",
951
1068
  left: w.left,
952
1069
  top: X ? void 0 : w.bottom + 4,
@@ -954,28 +1071,28 @@ function jt({
954
1071
  width: w.width,
955
1072
  zIndex: 9999
956
1073
  });
957
- }, [O]);
958
- _(() => z(!0), []), _(() => {
959
- if (!v) return;
1074
+ }, [T]);
1075
+ _(() => A(!0), []), _(() => {
1076
+ if (!b) return;
960
1077
  function o(w) {
961
1078
  var Y, X;
962
1079
  const U = w.target;
963
- !((Y = B.current) != null && Y.contains(U)) && !((X = M.current) != null && X.contains(U)) && (m(!1), c(""));
1080
+ !((Y = M.current) != null && Y.contains(U)) && !((X = $.current) != null && X.contains(U)) && (m(!1), c(""));
964
1081
  }
965
1082
  return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
966
- }, [v]), _(() => {
967
- v && (L(-1), H(), O && setTimeout(() => {
1083
+ }, [b]), _(() => {
1084
+ b && (B(-1), W(), T && setTimeout(() => {
968
1085
  var o;
969
- return (o = R.current) == null ? void 0 : o.focus();
1086
+ return (o = H.current) == null ? void 0 : o.focus();
970
1087
  }, 0));
971
- }, [v, O, H]), _(() => {
972
- if (v)
973
- return window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), () => {
974
- window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0);
1088
+ }, [b, T, W]), _(() => {
1089
+ if (b)
1090
+ return window.addEventListener("resize", W), window.addEventListener("scroll", W, !0), () => {
1091
+ window.removeEventListener("resize", W), window.removeEventListener("scroll", W, !0);
975
1092
  };
976
- }, [v, H]), _(() => {
977
- if (y < 0 || !E.current) return;
978
- const o = E.current.children[y];
1093
+ }, [b, W]), _(() => {
1094
+ if (y < 0 || !O.current) return;
1095
+ const o = O.current.children[y];
979
1096
  o == null || o.scrollIntoView({ block: "nearest" });
980
1097
  }, [y]);
981
1098
  const F = st(
@@ -985,31 +1102,31 @@ function jt({
985
1102
  [r]
986
1103
  );
987
1104
  function V(o) {
988
- if (!v) {
1105
+ if (!b) {
989
1106
  (o.key === "Enter" || o.key === " " || o.key === "ArrowDown") && (o.preventDefault(), m(!0));
990
1107
  return;
991
1108
  }
992
- o.key === "Escape" ? (o.preventDefault(), m(!1), c("")) : o.key === "ArrowDown" ? (o.preventDefault(), L((w) => Math.min(w + 1, Z.length - 1))) : o.key === "ArrowUp" ? (o.preventDefault(), L((w) => Math.max(w - 1, s ? -1 : 0))) : o.key === "Enter" && (o.preventDefault(), y === -1 && s ? F("") : Z[y] && F(Z[y].value));
1109
+ o.key === "Escape" ? (o.preventDefault(), m(!1), c("")) : o.key === "ArrowDown" ? (o.preventDefault(), B((w) => Math.min(w + 1, J.length - 1))) : o.key === "ArrowUp" ? (o.preventDefault(), B((w) => Math.max(w - 1, s ? -1 : 0))) : o.key === "Enter" && (o.preventDefault(), y === -1 && s ? F("") : J[y] && F(J[y].value));
993
1110
  }
994
1111
  const Q = /* @__PURE__ */ i(
995
1112
  "div",
996
1113
  {
997
- ref: M,
1114
+ ref: $,
998
1115
  className: "rounded-xl shadow-xl overflow-hidden",
999
1116
  style: {
1000
- ...$,
1117
+ ...C,
1001
1118
  background: "var(--bg-card)",
1002
1119
  border: "1px solid var(--border)"
1003
1120
  },
1004
1121
  children: [
1005
- O && /* @__PURE__ */ i(
1122
+ T && /* @__PURE__ */ i(
1006
1123
  "div",
1007
1124
  {
1008
1125
  className: "flex items-center gap-2 px-3 py-2",
1009
1126
  style: { borderBottom: "1px solid var(--border)" },
1010
1127
  children: [
1011
1128
  /* @__PURE__ */ t(
1012
- Ze,
1129
+ Je,
1013
1130
  {
1014
1131
  className: "w-3.5 h-3.5 flex-shrink-0",
1015
1132
  style: { color: "var(--text-muted)" }
@@ -1018,17 +1135,17 @@ function jt({
1018
1135
  /* @__PURE__ */ t(
1019
1136
  "input",
1020
1137
  {
1021
- ref: R,
1022
- value: g,
1138
+ ref: H,
1139
+ value: v,
1023
1140
  onChange: (o) => {
1024
- c(o.target.value), L(-1);
1141
+ c(o.target.value), B(-1);
1025
1142
  },
1026
1143
  placeholder: "Buscar…",
1027
1144
  className: "min-w-0 flex-1 text-sm bg-transparent outline-none",
1028
1145
  style: { color: "var(--text-main)" }
1029
1146
  }
1030
1147
  ),
1031
- g && /* @__PURE__ */ t(
1148
+ v && /* @__PURE__ */ t(
1032
1149
  "button",
1033
1150
  {
1034
1151
  type: "button",
@@ -1050,11 +1167,11 @@ function jt({
1050
1167
  /* @__PURE__ */ i(
1051
1168
  "ul",
1052
1169
  {
1053
- ref: E,
1170
+ ref: O,
1054
1171
  role: "listbox",
1055
1172
  className: "overflow-y-auto",
1056
1173
  style: {
1057
- maxHeight: O ? 220 : 180,
1174
+ maxHeight: T ? 220 : 180,
1058
1175
  scrollbarWidth: "thin",
1059
1176
  scrollbarColor: "var(--border) transparent",
1060
1177
  overscrollBehavior: "contain"
@@ -1068,7 +1185,7 @@ function jt({
1068
1185
  onMouseDown: (o) => {
1069
1186
  o.preventDefault(), F("");
1070
1187
  },
1071
- onMouseEnter: () => L(-1),
1188
+ onMouseEnter: () => B(-1),
1072
1189
  className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
1073
1190
  style: {
1074
1191
  background: y === -1 ? "var(--bg-hover)" : "transparent",
@@ -1078,7 +1195,7 @@ function jt({
1078
1195
  children: s
1079
1196
  }
1080
1197
  ),
1081
- Z.map((o, w) => {
1198
+ J.map((o, w) => {
1082
1199
  const Y = w === y, X = o.value === e;
1083
1200
  return /* @__PURE__ */ i(
1084
1201
  "li",
@@ -1088,7 +1205,7 @@ function jt({
1088
1205
  onMouseDown: (te) => {
1089
1206
  te.preventDefault(), o.disabled || F(o.value);
1090
1207
  },
1091
- onMouseEnter: () => !o.disabled && L(w),
1208
+ onMouseEnter: () => !o.disabled && B(w),
1092
1209
  className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
1093
1210
  style: {
1094
1211
  background: Y ? "var(--bg-hover)" : X ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
@@ -1128,7 +1245,7 @@ function jt({
1128
1245
  o.value
1129
1246
  );
1130
1247
  }),
1131
- Z.length === 0 && /* @__PURE__ */ t(
1248
+ J.length === 0 && /* @__PURE__ */ t(
1132
1249
  "li",
1133
1250
  {
1134
1251
  className: "px-3 py-4 text-sm text-center",
@@ -1145,7 +1262,7 @@ function jt({
1145
1262
  return /* @__PURE__ */ i(
1146
1263
  "div",
1147
1264
  {
1148
- ref: B,
1265
+ ref: M,
1149
1266
  className: `relative ${f || "w-full"}`,
1150
1267
  style: p,
1151
1268
  onKeyDown: V,
@@ -1158,16 +1275,16 @@ function jt({
1158
1275
  onClick: () => !u && m((o) => !o),
1159
1276
  className: "flex w-full items-center gap-2 rounded-lg text-left text-sm transition-colors focus:outline-none",
1160
1277
  style: {
1161
- height: Nt(d),
1162
- padding: Nt(h),
1278
+ height: St(d),
1279
+ padding: St(h),
1163
1280
  background: "var(--bg-input)",
1164
1281
  color: P ? "var(--text-main)" : "var(--text-muted)",
1165
- border: v ? "1px solid var(--primary)" : "1px solid var(--border)",
1282
+ border: b ? "1px solid var(--primary)" : "1px solid var(--border)",
1166
1283
  opacity: u ? 0.5 : 1,
1167
1284
  cursor: u ? "not-allowed" : "pointer"
1168
1285
  },
1169
1286
  "aria-haspopup": "listbox",
1170
- "aria-expanded": v,
1287
+ "aria-expanded": b,
1171
1288
  children: [
1172
1289
  (P == null ? void 0 : P.color) && /* @__PURE__ */ t(
1173
1290
  "span",
@@ -1205,14 +1322,14 @@ function jt({
1205
1322
  className: "flex-shrink-0 w-4 h-4 transition-transform",
1206
1323
  style: {
1207
1324
  color: "var(--text-muted)",
1208
- transform: v ? "rotate(180deg)" : "rotate(0deg)"
1325
+ transform: b ? "rotate(180deg)" : "rotate(0deg)"
1209
1326
  }
1210
1327
  }
1211
1328
  )
1212
1329
  ]
1213
1330
  }
1214
1331
  ),
1215
- v && W && Ke(Q, document.body)
1332
+ b && R && Ke(Q, document.body)
1216
1333
  ]
1217
1334
  }
1218
1335
  );
@@ -1221,7 +1338,7 @@ function Ge(e) {
1221
1338
  if (e !== void 0)
1222
1339
  return typeof e == "number" ? `${e}px` : e;
1223
1340
  }
1224
- function Fn({
1341
+ function Jn({
1225
1342
  value: e,
1226
1343
  onChange: r,
1227
1344
  placeholder: n = "Buscar...",
@@ -1232,7 +1349,7 @@ function Fn({
1232
1349
  }) {
1233
1350
  return /* @__PURE__ */ i("div", { className: `relative ${a}`, children: [
1234
1351
  /* @__PURE__ */ t(
1235
- Ze,
1352
+ Je,
1236
1353
  {
1237
1354
  className: "absolute top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)] pointer-events-none",
1238
1355
  style: { left: Ge(f) }
@@ -1251,7 +1368,7 @@ function Fn({
1251
1368
  )
1252
1369
  ] });
1253
1370
  }
1254
- function Un({
1371
+ function Kn({
1255
1372
  value: e,
1256
1373
  onChange: r,
1257
1374
  options: n,
@@ -1264,7 +1381,7 @@ function Un({
1264
1381
  searchable: h = !0
1265
1382
  }) {
1266
1383
  const N = s ? n.map(
1267
- (k, v) => v === 0 && !k.color ? { ...k, sublabel: k.sublabel ?? void 0 } : k
1384
+ (S, b) => b === 0 && !S.color ? { ...S, sublabel: S.sublabel ?? void 0 } : S
1268
1385
  ) : n;
1269
1386
  return /* @__PURE__ */ i("div", { className: `relative ${u}`, children: [
1270
1387
  s && /* @__PURE__ */ t(
@@ -1276,7 +1393,7 @@ function Un({
1276
1393
  }
1277
1394
  ),
1278
1395
  /* @__PURE__ */ t(
1279
- jt,
1396
+ Wt,
1280
1397
  {
1281
1398
  value: e,
1282
1399
  onChange: r,
@@ -1291,7 +1408,7 @@ function Un({
1291
1408
  )
1292
1409
  ] });
1293
1410
  }
1294
- const zr = {
1411
+ const qr = {
1295
1412
  sm: "24rem",
1296
1413
  md: "28rem",
1297
1414
  lg: "32rem",
@@ -1300,7 +1417,7 @@ const zr = {
1300
1417
  "4xl": "56rem",
1301
1418
  "5xl": "64rem"
1302
1419
  }, qe = 180;
1303
- function jr({
1420
+ function Gr({
1304
1421
  open: e,
1305
1422
  onClose: r,
1306
1423
  title: n,
@@ -1312,53 +1429,53 @@ function jr({
1312
1429
  size: d = "md",
1313
1430
  maxWidth: h,
1314
1431
  zIndex: N = 1e3,
1315
- closeOnBackdrop: k = !0,
1316
- closeOnEscape: v = !0,
1432
+ closeOnBackdrop: S = !0,
1433
+ closeOnEscape: b = !0,
1317
1434
  showCloseButton: m = !0,
1318
- placement: g = "center",
1435
+ placement: v = "center",
1319
1436
  bodyClassName: c = "px-6 py-5",
1320
1437
  panelClassName: y = "",
1321
- backdropClassName: L = "bg-black/50 backdrop-blur-sm",
1322
- contentClassName: W = "p-4",
1323
- ariaLabel: z,
1324
- frameless: $ = !1
1438
+ backdropClassName: B = "bg-black/50 backdrop-blur-sm",
1439
+ contentClassName: R = "p-4",
1440
+ ariaLabel: A,
1441
+ frameless: C = !1
1325
1442
  }) {
1326
- const [D, B] = T(!1), [M, R] = T(!1), E = re(null);
1327
- if (_(() => (e ? (E.current && clearTimeout(E.current), B(!0), requestAnimationFrame(() => requestAnimationFrame(() => R(!0)))) : (R(!1), E.current = setTimeout(
1328
- () => B(!1),
1443
+ const [L, M] = D(!1), [$, H] = D(!1), O = re(null);
1444
+ if (_(() => (e ? (O.current && clearTimeout(O.current), M(!0), requestAnimationFrame(() => requestAnimationFrame(() => H(!0)))) : (H(!1), O.current = setTimeout(
1445
+ () => M(!1),
1329
1446
  qe + 40
1330
1447
  )), () => {
1331
- E.current && clearTimeout(E.current);
1448
+ O.current && clearTimeout(O.current);
1332
1449
  }), [e]), _(() => {
1333
1450
  if (e)
1334
1451
  return document.body.style.overflow = "hidden", () => {
1335
1452
  document.body.style.overflow = "";
1336
1453
  };
1337
1454
  }, [e]), _(() => {
1338
- if (!e || !v) return;
1455
+ if (!e || !b) return;
1339
1456
  const V = (Q) => {
1340
1457
  Q.key === "Escape" && r();
1341
1458
  };
1342
1459
  return window.addEventListener("keydown", V), () => window.removeEventListener("keydown", V);
1343
- }, [v, r, e]), !D) return null;
1344
- const O = n || a || s || u || m, P = h ?? zr[d], Z = g === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", H = g === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl", F = M ? "translateY(0) scale(1)" : g === "bottom-mobile" ? "translateY(16px) scale(0.98)" : "translateY(10px) scale(0.96)";
1460
+ }, [b, r, e]), !L) return null;
1461
+ const T = n || a || s || u || m, P = h ?? qr[d], J = v === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", W = v === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl", F = $ ? "translateY(0) scale(1)" : v === "bottom-mobile" ? "translateY(16px) scale(0.98)" : "translateY(10px) scale(0.96)";
1345
1462
  return Ke(
1346
1463
  /* @__PURE__ */ i(
1347
1464
  "div",
1348
1465
  {
1349
1466
  role: "dialog",
1350
1467
  "aria-modal": "true",
1351
- "aria-label": z ?? n,
1352
- className: `fixed inset-0 flex ${Z} ${W}`,
1468
+ "aria-label": A ?? n,
1469
+ className: `fixed inset-0 flex ${J} ${R}`,
1353
1470
  style: { zIndex: N },
1354
1471
  children: [
1355
1472
  /* @__PURE__ */ t(
1356
1473
  "div",
1357
1474
  {
1358
- className: `absolute inset-0 ${L}`,
1359
- onClick: k ? r : void 0,
1475
+ className: `absolute inset-0 ${B}`,
1476
+ onClick: S ? r : void 0,
1360
1477
  style: {
1361
- opacity: M ? 1 : 0,
1478
+ opacity: $ ? 1 : 0,
1362
1479
  transition: `opacity ${qe}ms ease`
1363
1480
  }
1364
1481
  }
@@ -1366,18 +1483,18 @@ function jr({
1366
1483
  /* @__PURE__ */ i(
1367
1484
  "div",
1368
1485
  {
1369
- className: `relative z-10 flex max-h-[92dvh] w-full flex-col overflow-hidden ${$ ? "shadow-none" : "shadow-2xl"} ${H} ${y}`,
1486
+ className: `relative z-10 flex max-h-[92dvh] w-full flex-col overflow-hidden ${C ? "shadow-none" : "shadow-2xl"} ${W} ${y}`,
1370
1487
  style: {
1371
1488
  maxWidth: P,
1372
- background: $ ? "transparent" : "var(--bg-card)",
1373
- border: $ ? "none" : "1px solid var(--border)",
1374
- opacity: M ? 1 : 0,
1489
+ background: C ? "transparent" : "var(--bg-card)",
1490
+ border: C ? "none" : "1px solid var(--border)",
1491
+ opacity: $ ? 1 : 0,
1375
1492
  transform: F,
1376
1493
  transition: `opacity ${qe}ms ease, transform ${qe}ms ease`
1377
1494
  },
1378
1495
  onClick: (V) => V.stopPropagation(),
1379
1496
  children: [
1380
- O && /* @__PURE__ */ i(
1497
+ T && /* @__PURE__ */ i(
1381
1498
  "div",
1382
1499
  {
1383
1500
  className: "flex flex-shrink-0 items-center justify-between gap-3 px-6 py-4",
@@ -1429,7 +1546,7 @@ function jr({
1429
1546
  document.body
1430
1547
  );
1431
1548
  }
1432
- const _r = {
1549
+ const Xr = {
1433
1550
  danger: {
1434
1551
  iconBg: "rgba(239,68,68,0.12)",
1435
1552
  iconColor: "var(--danger)",
@@ -1449,7 +1566,7 @@ const _r = {
1449
1566
  btnColor: "#fff"
1450
1567
  }
1451
1568
  };
1452
- function Yn({
1569
+ function Qn({
1453
1570
  open: e,
1454
1571
  title: r,
1455
1572
  description: n,
@@ -1459,9 +1576,9 @@ function Yn({
1459
1576
  onConfirm: f,
1460
1577
  onCancel: p
1461
1578
  }) {
1462
- const d = _r[u];
1579
+ const d = Xr[u];
1463
1580
  return /* @__PURE__ */ i(
1464
- jr,
1581
+ Gr,
1465
1582
  {
1466
1583
  open: e,
1467
1584
  onClose: p,
@@ -1491,7 +1608,7 @@ function Yn({
1491
1608
  background: d.iconBg
1492
1609
  },
1493
1610
  children: /* @__PURE__ */ t(
1494
- Kt,
1611
+ ar,
1495
1612
  {
1496
1613
  className: "h-5 w-5",
1497
1614
  style: { color: d.iconColor }
@@ -1538,82 +1655,82 @@ function Yn({
1538
1655
  }
1539
1656
  );
1540
1657
  }
1541
- function _t(e) {
1658
+ function Ft(e) {
1542
1659
  const r = document.createElement("textarea");
1543
1660
  r.value = e, r.style.position = "fixed", r.style.opacity = "0", r.style.pointerEvents = "none", document.body.appendChild(r), r.select(), document.execCommand("copy"), document.body.removeChild(r);
1544
1661
  }
1545
- async function Rr(e) {
1662
+ async function Vr(e) {
1546
1663
  var r;
1547
1664
  if ((r = navigator.clipboard) != null && r.writeText) {
1548
1665
  await navigator.clipboard.writeText(e);
1549
1666
  return;
1550
1667
  }
1551
- _t(e);
1668
+ Ft(e);
1552
1669
  }
1553
- function Hr(e) {
1670
+ function Zr(e) {
1554
1671
  return typeof e == "function" ? e() : e;
1555
1672
  }
1556
- function Wr({
1673
+ function Jr({
1557
1674
  value: e,
1558
1675
  resetDelay: r = 2e3,
1559
1676
  title: n,
1560
1677
  copiedTitle: a = "Copiado",
1561
1678
  copiedLabel: s,
1562
- icon: u = /* @__PURE__ */ t(Qt, { className: "h-3.5 w-3.5" }),
1563
- copiedIcon: f = /* @__PURE__ */ t(Dt, { className: "h-3.5 w-3.5" }),
1679
+ icon: u = /* @__PURE__ */ t(ir, { className: "h-3.5 w-3.5" }),
1680
+ copiedIcon: f = /* @__PURE__ */ t(Pt, { className: "h-3.5 w-3.5" }),
1564
1681
  stopPropagation: p = !0,
1565
1682
  onCopied: d,
1566
1683
  onCopyError: h,
1567
1684
  className: N = "",
1568
- style: k,
1569
- children: v,
1685
+ style: S,
1686
+ children: b,
1570
1687
  onClick: m,
1571
- type: g = "button",
1688
+ type: v = "button",
1572
1689
  ...c
1573
1690
  }) {
1574
- const [y, L] = T(!1), W = re(null);
1691
+ const [y, B] = D(!1), R = re(null);
1575
1692
  _(() => () => {
1576
- W.current && window.clearTimeout(W.current);
1693
+ R.current && window.clearTimeout(R.current);
1577
1694
  }, []);
1578
- function z(D) {
1579
- L(!0), d == null || d(D), W.current && window.clearTimeout(W.current), W.current = window.setTimeout(() => {
1580
- L(!1), W.current = null;
1695
+ function A(L) {
1696
+ B(!0), d == null || d(L), R.current && window.clearTimeout(R.current), R.current = window.setTimeout(() => {
1697
+ B(!1), R.current = null;
1581
1698
  }, r);
1582
1699
  }
1583
- async function $(D) {
1584
- var M;
1585
- if (p && D.stopPropagation(), m == null || m(D), D.defaultPrevented) return;
1586
- const B = Hr(e);
1587
- if (B)
1700
+ async function C(L) {
1701
+ var $;
1702
+ if (p && L.stopPropagation(), m == null || m(L), L.defaultPrevented) return;
1703
+ const M = Zr(e);
1704
+ if (M)
1588
1705
  try {
1589
- await Rr(B), z(B);
1590
- } catch (R) {
1706
+ await Vr(M), A(M);
1707
+ } catch (H) {
1591
1708
  try {
1592
- _t(B), z(B);
1593
- } catch (E) {
1594
- h == null || h(E, B);
1709
+ Ft(M), A(M);
1710
+ } catch (O) {
1711
+ h == null || h(O, M);
1595
1712
  return;
1596
1713
  }
1597
- (M = navigator.clipboard) != null && M.writeText || h == null || h(R, B);
1714
+ ($ = navigator.clipboard) != null && $.writeText || h == null || h(H, M);
1598
1715
  }
1599
1716
  }
1600
1717
  return /* @__PURE__ */ i(
1601
1718
  "button",
1602
1719
  {
1603
1720
  ...c,
1604
- type: g,
1605
- onClick: $,
1721
+ type: v,
1722
+ onClick: C,
1606
1723
  title: y ? a : n,
1607
1724
  "aria-label": c["aria-label"] ?? (y ? a : n),
1608
1725
  "data-copied": y ? "true" : void 0,
1609
- className: `relative inline-flex h-7 shrink-0 items-center justify-center rounded-md transition-all duration-200 ${v ? "min-w-7 px-2" : "w-7"} ${N}`,
1726
+ className: `relative inline-flex h-7 shrink-0 items-center justify-center rounded-md transition-all duration-200 ${b ? "min-w-7 px-2" : "w-7"} ${N}`,
1610
1727
  style: {
1611
1728
  cursor: "pointer",
1612
1729
  background: y ? "rgba(22,163,74,0.15)" : "transparent",
1613
1730
  border: y ? "1px solid rgba(22,163,74,0.4)" : "1px solid transparent",
1614
1731
  color: y ? "#16a34a" : "var(--text-muted)",
1615
1732
  boxShadow: y ? "0 0 0 3px rgba(22,163,74,0.12)" : "none",
1616
- ...k
1733
+ ...S
1617
1734
  },
1618
1735
  children: [
1619
1736
  /* @__PURE__ */ t(
@@ -1624,145 +1741,45 @@ function Wr({
1624
1741
  children: y ? f : u
1625
1742
  }
1626
1743
  ),
1627
- v && /* @__PURE__ */ t("span", { className: "ml-2 text-xs font-medium", children: y ? s ?? v : v })
1744
+ b && /* @__PURE__ */ t("span", { className: "ml-2 text-xs font-medium", children: y ? s ?? b : b })
1628
1745
  ]
1629
1746
  }
1630
1747
  );
1631
1748
  }
1632
- function Fr(e, r) {
1749
+ function Kr(e, r) {
1633
1750
  const n = typeof e == "function" ? e() : e;
1634
1751
  return r ? r(n) : n;
1635
1752
  }
1636
- function qn({
1753
+ function ea({
1637
1754
  url: e,
1638
1755
  resolveUrl: r,
1639
1756
  title: n = "Copiar link",
1640
1757
  copiedTitle: a = "Link copiado",
1641
- icon: s = /* @__PURE__ */ t(er, { className: "h-3.5 w-3.5" }),
1758
+ icon: s = /* @__PURE__ */ t(or, { className: "h-3.5 w-3.5" }),
1642
1759
  ...u
1643
1760
  }) {
1644
1761
  return /* @__PURE__ */ t(
1645
- Wr,
1762
+ Jr,
1646
1763
  {
1647
1764
  ...u,
1648
- value: () => Fr(e, r),
1765
+ value: () => Kr(e, r),
1649
1766
  title: n,
1650
1767
  copiedTitle: a,
1651
1768
  icon: s
1652
1769
  }
1653
1770
  );
1654
1771
  }
1655
- function Ur(e) {
1656
- var a;
1657
- const r = Array.from(
1658
- e.querySelectorAll("*")
1659
- ).filter(
1660
- (s) => {
1661
- var u;
1662
- return s.scrollWidth > s.clientWidth && !!((u = s.textContent) != null && u.trim()) && s.tagName.toLowerCase() !== "svg" && !s.closest("svg");
1663
- }
1664
- );
1665
- return (e.scrollWidth > e.clientWidth || r.length > 0) && (((a = r[0]) == null ? void 0 : a.textContent) ?? e.textContent ?? "").trim() || null;
1666
- }
1667
- function Rt({
1668
- children: e,
1669
- content: r,
1670
- onlyWhenOverflow: n = !1,
1671
- className: a = "",
1672
- style: s,
1673
- as: u = "div"
1674
- }) {
1675
- const f = re(null), p = re(null), [d, h] = T(null), [N, k] = T("");
1676
- _(() => {
1677
- const g = f.current;
1678
- g && (g.querySelectorAll("[title]").forEach((c) => {
1679
- const y = c.getAttribute("title");
1680
- y && (c.getAttribute("aria-label") || c.setAttribute("aria-label", y), c.removeAttribute("title"));
1681
- }), g.querySelectorAll("svg title").forEach((c) => c.remove()));
1682
- }), Jt(() => {
1683
- if (!d) return;
1684
- const g = p.current;
1685
- if (!g) return;
1686
- const c = 12, y = 14, L = g.getBoundingClientRect(), W = window.innerWidth - L.width - c, z = window.innerHeight - L.height - c;
1687
- let $ = d.mouseX + y, D = d.mouseY + y;
1688
- $ > W && ($ = d.mouseX - L.width - y), D > z && (D = d.mouseY - L.height - y), $ = Math.min(Math.max(c, $), Math.max(c, W)), D = Math.min(Math.max(c, D), Math.max(c, z)), (Math.abs($ - d.x) > 0.5 || Math.abs(D - d.y) > 0.5) && h(
1689
- (B) => B && {
1690
- ...B,
1691
- x: $,
1692
- y: D
1693
- }
1694
- );
1695
- }, [d]);
1696
- const v = (g, c) => {
1697
- const y = f.current;
1698
- if (y) {
1699
- if (n) {
1700
- const L = Ur(y);
1701
- if (!L) return;
1702
- k(L);
1703
- }
1704
- !n && !r || h({ mouseX: g, mouseY: c, x: g + 14, y: c + 14 });
1705
- }
1706
- }, m = n ? N : r;
1707
- return /* @__PURE__ */ i(we, { children: [
1708
- /* @__PURE__ */ t(
1709
- u,
1710
- {
1711
- ref: (g) => {
1712
- f.current = g;
1713
- },
1714
- className: a,
1715
- style: s,
1716
- onMouseEnter: (g) => v(g.clientX, g.clientY),
1717
- onMouseMove: (g) => {
1718
- d && v(g.clientX, g.clientY);
1719
- },
1720
- onMouseLeave: () => h(null),
1721
- children: e
1722
- }
1723
- ),
1724
- d && m ? Ke(
1725
- /* @__PURE__ */ t(
1726
- "div",
1727
- {
1728
- ref: p,
1729
- role: "tooltip",
1730
- style: {
1731
- position: "fixed",
1732
- top: d.y,
1733
- left: d.x,
1734
- zIndex: 9999,
1735
- background: "var(--bg-card)",
1736
- border: "1px solid var(--border)",
1737
- borderRadius: 6,
1738
- padding: "5px 10px",
1739
- fontSize: 12,
1740
- color: "var(--text-main)",
1741
- boxShadow: "0 4px 16px rgba(0,0,0,0.35)",
1742
- pointerEvents: "none",
1743
- maxWidth: "min(420px, calc(100vw - 24px))",
1744
- whiteSpace: "normal",
1745
- lineHeight: 1.6,
1746
- overflowWrap: "anywhere"
1747
- },
1748
- children: m
1749
- }
1750
- ),
1751
- document.body
1752
- ) : null
1753
- ] });
1754
- }
1755
- const Yr = "[&_button]:h-7 [&_button]:min-h-0 [&_button]:gap-1 [&_button]:px-2 [&_button]:text-xs [&_button_svg]:h-3.5 [&_button_svg]:w-3.5 [&_button[data-icon=true]]:w-7 [&_button[data-icon=true]]:px-0";
1756
- function Pe(e) {
1772
+ const Qr = "[&_button]:h-7 [&_button]:min-h-0 [&_button]:gap-1 [&_button]:px-2 [&_button]:text-xs [&_button_svg]:h-3.5 [&_button_svg]:w-3.5 [&_button[data-icon=true]]:w-7 [&_button[data-icon=true]]:px-0";
1773
+ function Ie(e) {
1757
1774
  if (!e) return 150;
1758
1775
  const r = parseInt(e, 10);
1759
1776
  return isNaN(r) || r <= 0 ? 150 : r;
1760
1777
  }
1761
- function Be(e, r) {
1778
+ function Oe(e, r) {
1762
1779
  const n = e.minWidth ?? 80, a = e.maxWidth ?? 1 / 0;
1763
1780
  return Math.min(a, Math.max(n, r));
1764
1781
  }
1765
- function qr(e, r) {
1782
+ function en(e, r) {
1766
1783
  if (r <= 7) return Array.from({ length: r }, (a, s) => s + 1);
1767
1784
  const n = [1];
1768
1785
  e > 3 && n.push("...");
@@ -1770,13 +1787,13 @@ function qr(e, r) {
1770
1787
  n.push(a);
1771
1788
  return e < r - 2 && n.push("..."), n.push(r), n;
1772
1789
  }
1773
- function kt({
1790
+ function Ct({
1774
1791
  children: e,
1775
1792
  className: r = "",
1776
1793
  style: n
1777
1794
  }) {
1778
1795
  return /* @__PURE__ */ t(
1779
- Rt,
1796
+ ut,
1780
1797
  {
1781
1798
  onlyWhenOverflow: !0,
1782
1799
  className: r,
@@ -1791,7 +1808,7 @@ function kt({
1791
1808
  }
1792
1809
  );
1793
1810
  }
1794
- function Gn({
1811
+ function ta({
1795
1812
  columns: e,
1796
1813
  data: r,
1797
1814
  getRowId: n,
@@ -1803,69 +1820,69 @@ function Gn({
1803
1820
  selected: d,
1804
1821
  onToggleOne: h,
1805
1822
  onToggleAll: N,
1806
- highlightSelected: k = !0,
1807
- rowClassName: v,
1823
+ highlightSelected: S = !0,
1824
+ rowClassName: b,
1808
1825
  getRowCategory: m,
1809
- stickyHeader: g = !0,
1826
+ stickyHeader: v = !0,
1810
1827
  pageSize: c = 25,
1811
1828
  pageSizeOptions: y = [25, 50, 100],
1812
- pageSizeSelectWidth: L = 62,
1813
- pageSizeSelectHeight: W = 30,
1814
- pageSizeSelectPadding: z = "0 7px",
1815
- totalRows: $,
1816
- page: D,
1817
- onPageChange: B,
1818
- onPageSizeChange: M,
1819
- storageKey: R,
1820
- stickyFirstColumn: E = !1,
1821
- bottomOffset: O = 0,
1829
+ pageSizeSelectWidth: B = 62,
1830
+ pageSizeSelectHeight: R = 30,
1831
+ pageSizeSelectPadding: A = "0 7px",
1832
+ totalRows: C,
1833
+ page: L,
1834
+ onPageChange: M,
1835
+ onPageSizeChange: $,
1836
+ storageKey: H,
1837
+ stickyFirstColumn: O = !1,
1838
+ bottomOffset: T = 0,
1822
1839
  compact: P = !0,
1823
- restrictHeight: Z = !0,
1824
- minTableWidth: H
1840
+ restrictHeight: J = !0,
1841
+ minTableWidth: W
1825
1842
  }) {
1826
- const F = e.map((l) => l.key).join(","), [V, Q] = T(!R), o = re(null), w = re(!R), U = (l, x) => 50 + (l * 17 + x * 13 + 7) % 40, Y = re(null), [X, te] = T(
1843
+ const F = e.map((l) => l.key).join(","), [V, Q] = D(!H), o = re(null), w = re(!H), U = (l, g) => 50 + (l * 17 + g * 13 + 7) % 40, Y = re(null), [X, te] = D(
1827
1844
  void 0
1828
- ), [ce, ne] = T(!1);
1845
+ ), [ce, ne] = D(!1);
1829
1846
  _(() => {
1830
- const x = c !== !1 ? 32 : 0, C = 12;
1831
- function A() {
1847
+ const g = c !== !1 ? 32 : 0, E = 12;
1848
+ function I() {
1832
1849
  if (ne(window.innerWidth < 640), !Y.current) return;
1833
1850
  const G = Y.current.getBoundingClientRect().top;
1834
1851
  te(
1835
1852
  Math.max(
1836
1853
  120,
1837
- window.innerHeight - G - x - C - O
1854
+ window.innerHeight - G - g - E - T
1838
1855
  )
1839
1856
  );
1840
1857
  }
1841
- return A(), window.addEventListener("resize", A), () => window.removeEventListener("resize", A);
1842
- }, [a, c, O]);
1843
- const [Ne, pe] = T(
1858
+ return I(), window.addEventListener("resize", I), () => window.removeEventListener("resize", I);
1859
+ }, [a, c, T]);
1860
+ const [Ne, pe] = D(
1844
1861
  () => e.map((l) => l.key)
1845
- ), [he, de] = T(
1862
+ ), [he, de] = D(
1846
1863
  () => Object.fromEntries(
1847
- e.map((l) => [l.key, Be(l, Pe(l.width))])
1864
+ e.map((l) => [l.key, Oe(l, Ie(l.width))])
1848
1865
  )
1849
1866
  );
1850
1867
  _(() => {
1851
- const l = e.map((C) => C.key);
1852
- if (!R) {
1868
+ const l = e.map((E) => E.key);
1869
+ if (!H) {
1853
1870
  pe(l), w.current = !1, Q(!0);
1854
1871
  return;
1855
1872
  }
1856
- let x = !1;
1873
+ let g = !1;
1857
1874
  return w.current = !1, Q(!1), fetch(
1858
- `/api/user/preferences/datatables?key=${encodeURIComponent(R)}`,
1875
+ `/api/user/preferences/datatables?key=${encodeURIComponent(H)}`,
1859
1876
  { cache: "no-store" }
1860
- ).then((C) => C.ok ? C.json() : null).then((C) => {
1877
+ ).then((E) => E.ok ? E.json() : null).then((E) => {
1861
1878
  var Ue, Ye;
1862
- if (x) return;
1863
- const A = (Ue = C == null ? void 0 : C.settings) == null ? void 0 : Ue.columnOrder, G = Array.isArray(A) ? A.filter((fe) => l.includes(fe)) : [], ue = l.filter((fe) => !G.includes(fe)), be = G.length > 0 ? [...G, ...ue] : l, Me = Object.fromEntries(
1864
- e.map((fe) => [fe.key, Be(fe, Pe(fe.width))])
1865
- ), K = ((Ye = C == null ? void 0 : C.settings) == null ? void 0 : Ye.columnWidths) ?? {}, se = Object.fromEntries(
1879
+ if (g) return;
1880
+ const I = (Ue = E == null ? void 0 : E.settings) == null ? void 0 : Ue.columnOrder, G = Array.isArray(I) ? I.filter((fe) => l.includes(fe)) : [], ue = l.filter((fe) => !G.includes(fe)), be = G.length > 0 ? [...G, ...ue] : l, Me = Object.fromEntries(
1881
+ e.map((fe) => [fe.key, Oe(fe, Ie(fe.width))])
1882
+ ), K = ((Ye = E == null ? void 0 : E.settings) == null ? void 0 : Ye.columnWidths) ?? {}, se = Object.fromEntries(
1866
1883
  e.map((fe) => [
1867
1884
  fe.key,
1868
- Be(fe, K[fe.key] ?? Me[fe.key])
1885
+ Oe(fe, K[fe.key] ?? Me[fe.key])
1869
1886
  ])
1870
1887
  );
1871
1888
  pe(be), de(se), o.current = JSON.stringify({
@@ -1873,145 +1890,145 @@ function Gn({
1873
1890
  columnWidths: se
1874
1891
  }), w.current = !0;
1875
1892
  }).catch(() => {
1876
- if (!x) {
1893
+ if (!g) {
1877
1894
  pe(l);
1878
- const C = Object.fromEntries(
1879
- e.map((A) => [
1880
- A.key,
1881
- Be(A, Pe(A.width))
1895
+ const E = Object.fromEntries(
1896
+ e.map((I) => [
1897
+ I.key,
1898
+ Oe(I, Ie(I.width))
1882
1899
  ])
1883
1900
  );
1884
- de(C), o.current = JSON.stringify({
1901
+ de(E), o.current = JSON.stringify({
1885
1902
  columnOrder: l,
1886
- columnWidths: C
1903
+ columnWidths: E
1887
1904
  }), w.current = !0;
1888
1905
  }
1889
1906
  }).finally(() => {
1890
- x || Q(!0);
1907
+ g || Q(!0);
1891
1908
  }), () => {
1892
- x = !0;
1909
+ g = !0;
1893
1910
  };
1894
- }, [R, F, e]), _(() => {
1895
- if (!R || !V || !w.current) return;
1911
+ }, [H, F, e]), _(() => {
1912
+ if (!H || !V || !w.current) return;
1896
1913
  const l = {
1897
1914
  columnOrder: Ne,
1898
1915
  columnWidths: he
1899
- }, x = JSON.stringify(l);
1900
- if (x === o.current) return;
1901
- const C = window.setTimeout(() => {
1916
+ }, g = JSON.stringify(l);
1917
+ if (g === o.current) return;
1918
+ const E = window.setTimeout(() => {
1902
1919
  fetch("/api/user/preferences/datatables", {
1903
1920
  method: "PATCH",
1904
1921
  headers: { "Content-Type": "application/json" },
1905
- body: JSON.stringify({ key: R, settings: l })
1906
- }).then((A) => {
1907
- A.ok && (o.current = x);
1922
+ body: JSON.stringify({ key: H, settings: l })
1923
+ }).then((I) => {
1924
+ I.ok && (o.current = g);
1908
1925
  }).catch(() => {
1909
1926
  });
1910
1927
  }, 300);
1911
- return () => window.clearTimeout(C);
1912
- }, [Ne, he, R, V]), _(() => {
1928
+ return () => window.clearTimeout(E);
1929
+ }, [Ne, he, H, V]), _(() => {
1913
1930
  pe((l) => {
1914
- const x = e.map((G) => G.key), C = l.filter((G) => x.includes(G)), A = x.filter((G) => !C.includes(G));
1915
- return [...C, ...A];
1931
+ const g = e.map((G) => G.key), E = l.filter((G) => g.includes(G)), I = g.filter((G) => !E.includes(G));
1932
+ return [...E, ...I];
1916
1933
  });
1917
1934
  }, [F, e]);
1918
- const S = Ne.map((l) => e.find((x) => x.key === l)).filter((l) => !!l);
1935
+ const k = Ne.map((l) => e.find((g) => g.key === l)).filter((l) => !!l);
1919
1936
  _(() => {
1920
1937
  de((l) => {
1921
- const x = Object.fromEntries(
1922
- e.map((C) => [C.key, Be(C, Pe(C.width))])
1938
+ const g = Object.fromEntries(
1939
+ e.map((E) => [E.key, Oe(E, Ie(E.width))])
1923
1940
  );
1924
1941
  return Object.fromEntries(
1925
- e.map((C) => [
1926
- C.key,
1927
- Be(C, l[C.key] ?? x[C.key])
1942
+ e.map((E) => [
1943
+ E.key,
1944
+ Oe(E, l[E.key] ?? g[E.key])
1928
1945
  ])
1929
1946
  );
1930
1947
  });
1931
1948
  }, [F, e]);
1932
1949
  const j = re(null);
1933
1950
  _(() => {
1934
- function l(C) {
1935
- const A = j.current;
1936
- if (!A) return;
1937
- const G = C.clientX - A.startX, ue = e.find((be) => be.key === A.colKey);
1951
+ function l(E) {
1952
+ const I = j.current;
1953
+ if (!I) return;
1954
+ const G = E.clientX - I.startX, ue = e.find((be) => be.key === I.colKey);
1938
1955
  ue && de((be) => ({
1939
1956
  ...be,
1940
- [A.colKey]: Be(ue, A.startWidth + G)
1957
+ [I.colKey]: Oe(ue, I.startWidth + G)
1941
1958
  }));
1942
1959
  }
1943
- function x() {
1960
+ function g() {
1944
1961
  j.current && (j.current = null, document.body.style.cursor = "", document.body.style.userSelect = "");
1945
1962
  }
1946
- return document.addEventListener("pointermove", l), document.addEventListener("pointerup", x), () => {
1947
- document.removeEventListener("pointermove", l), document.removeEventListener("pointerup", x);
1963
+ return document.addEventListener("pointermove", l), document.addEventListener("pointerup", g), () => {
1964
+ document.removeEventListener("pointermove", l), document.removeEventListener("pointerup", g);
1948
1965
  };
1949
1966
  }, [e]);
1950
- const q = re(null), [ae, oe] = T(null);
1951
- function I(l, x) {
1952
- q.current = l, x.dataTransfer.effectAllowed = "move";
1967
+ const q = re(null), [ae, oe] = D(null);
1968
+ function z(l, g) {
1969
+ q.current = l, g.dataTransfer.effectAllowed = "move";
1953
1970
  }
1954
- function ke(l, x) {
1955
- x.preventDefault(), x.dataTransfer.dropEffect = "move", ae !== l && oe(l);
1971
+ function ke(l, g) {
1972
+ g.preventDefault(), g.dataTransfer.dropEffect = "move", ae !== l && oe(l);
1956
1973
  }
1957
- function Re(l, x) {
1958
- x.preventDefault();
1959
- const C = q.current;
1960
- C !== null && C !== l && pe((A) => {
1961
- const G = [...A], [ue] = G.splice(C, 1);
1974
+ function Re(l, g) {
1975
+ g.preventDefault();
1976
+ const E = q.current;
1977
+ E !== null && E !== l && pe((I) => {
1978
+ const G = [...I], [ue] = G.splice(E, 1);
1962
1979
  return G.splice(l, 0, ue), G;
1963
1980
  }), q.current = null, oe(null);
1964
1981
  }
1965
1982
  function Qe() {
1966
1983
  q.current = null, oe(null);
1967
1984
  }
1968
- const [me, He] = T(null);
1985
+ const [me, He] = D(null);
1969
1986
  function ie(l) {
1970
1987
  l.sortKey && He(
1971
- (x) => (x == null ? void 0 : x.key) === l.key ? { key: l.key, dir: x.dir === "asc" ? "desc" : "asc" } : { key: l.key, dir: "asc" }
1988
+ (g) => (g == null ? void 0 : g.key) === l.key ? { key: l.key, dir: g.dir === "asc" ? "desc" : "asc" } : { key: l.key, dir: "asc" }
1972
1989
  );
1973
1990
  }
1974
- const [We, Oe] = T(1), [Le, Fe] = T(
1991
+ const [We, Be] = D(1), [Le, Fe] = D(
1975
1992
  c === !1 ? 0 : c
1976
1993
  );
1977
1994
  _(() => {
1978
- Oe(1);
1995
+ Be(1);
1979
1996
  }, [r]);
1980
- const Se = !!(B && M), ve = c !== !1, b = Se ? D ?? 1 : We, ee = Se || ve ? Le : r.length, J = !!d && !!h && !!N, ye = J ? 40 : 0, le = J && r.length > 0 && d.size === r.length, De = J && d.size > 0 && d.size < r.length, Ce = ge.useMemo(() => {
1997
+ const Se = !!(M && $), ve = c !== !1, x = Se ? L ?? 1 : We, ee = Se || ve ? Le : r.length, Z = !!d && !!h && !!N, ye = Z ? 40 : 0, le = Z && r.length > 0 && d.size === r.length, De = Z && d.size > 0 && d.size < r.length, Ce = ge.useMemo(() => {
1981
1998
  if (!me) return r;
1982
- const l = e.find((x) => x.key === me.key && x.sortKey);
1983
- return l != null && l.sortKey ? [...r].sort((x, C) => {
1984
- const A = x[l.sortKey], G = C[l.sortKey], ue = A === G ? 0 : A == null ? 1 : G == null || A < G ? -1 : 1;
1999
+ const l = e.find((g) => g.key === me.key && g.sortKey);
2000
+ return l != null && l.sortKey ? [...r].sort((g, E) => {
2001
+ const I = g[l.sortKey], G = E[l.sortKey], ue = I === G ? 0 : I == null ? 1 : G == null || I < G ? -1 : 1;
1985
2002
  return me.dir === "asc" ? ue : -ue;
1986
2003
  }) : r;
1987
- }, [r, me, e]), dt = ge.useMemo(() => {
2004
+ }, [r, me, e]), mt = ge.useMemo(() => {
1988
2005
  if (Se || !ve) return Ce;
1989
- const l = (b - 1) * ee;
2006
+ const l = (x - 1) * ee;
1990
2007
  return Ce.slice(l, l + ee);
1991
- }, [Ce, Se, ve, b, ee]), Ae = $ ?? r.length, et = ve ? Math.max(1, Math.ceil(Ae / ee)) : 1, Yt = ve ? (b - 1) * ee + 1 : 1, qt = ve ? Math.min(b * ee, Ae) : Ae;
2008
+ }, [Ce, Se, ve, x, ee]), Ae = C ?? r.length, et = ve ? Math.max(1, Math.ceil(Ae / ee)) : 1, Xt = ve ? (x - 1) * ee + 1 : 1, Vt = ve ? Math.min(x * ee, Ae) : Ae;
1992
2009
  function tt(l) {
1993
- const x = Math.max(1, Math.min(l, et));
1994
- Se ? B(x) : Oe(x);
2010
+ const g = Math.max(1, Math.min(l, et));
2011
+ Se ? M(g) : Be(g);
1995
2012
  }
1996
- function Gt(l) {
1997
- Fe(l), Se ? (M(l), B(1)) : Oe(1), M && M(l);
2013
+ function Zt(l) {
2014
+ Fe(l), Se ? ($(l), M(1)) : Be(1), $ && $(l);
1998
2015
  }
1999
- const ut = (l) => l === "center" ? "text-center" : l === "right" ? "text-right" : "text-left", Xt = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))", Vt = S.length + (J ? 1 : 0);
2000
- function mt(l) {
2016
+ const ft = (l) => l === "center" ? "text-center" : l === "right" ? "text-right" : "text-left", Jt = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))", Kt = k.length + (Z ? 1 : 0);
2017
+ function pt(l) {
2001
2018
  return l ? typeof l == "string" ? { key: l, label: l } : l : null;
2002
2019
  }
2003
- const ft = () => /* @__PURE__ */ i(
2020
+ const ht = () => /* @__PURE__ */ i(
2004
2021
  "tr",
2005
2022
  {
2006
2023
  style: {
2007
2024
  background: "color-mix(in srgb, var(--bg-input) 72%, transparent)"
2008
2025
  },
2009
2026
  children: [
2010
- J && /* @__PURE__ */ t(
2027
+ Z && /* @__PURE__ */ t(
2011
2028
  "th",
2012
2029
  {
2013
2030
  className: `${P ? "px-2 py-1.5" : "px-3 py-2.5"} w-10`,
2014
- style: E ? {
2031
+ style: O ? {
2015
2032
  position: "sticky",
2016
2033
  left: 0,
2017
2034
  zIndex: 12,
@@ -2038,12 +2055,12 @@ function Gn({
2038
2055
  )
2039
2056
  }
2040
2057
  ),
2041
- S.map((l, x) => {
2042
- const C = (me == null ? void 0 : me.key) === l.key, A = !!l.sortKey, G = E && !ce && x === 0, ue = ae === x, Me = (he[l.key] ?? Pe(l.width)) < 120;
2058
+ k.map((l, g) => {
2059
+ const E = (me == null ? void 0 : me.key) === l.key, I = !!l.sortKey, G = O && !ce && g === 0, ue = ae === g, Me = (he[l.key] ?? Ie(l.width)) < 120;
2043
2060
  return /* @__PURE__ */ i(
2044
2061
  "th",
2045
2062
  {
2046
- className: `group select-none ${Me ? "text-left" : ut(l.align)}`,
2063
+ className: `group select-none ${Me ? "text-left" : ft(l.align)}`,
2047
2064
  style: {
2048
2065
  ...G ? {
2049
2066
  position: "sticky",
@@ -2059,24 +2076,24 @@ function Gn({
2059
2076
  borderBottom: "2px solid var(--border)",
2060
2077
  borderRight: "1px solid var(--border)"
2061
2078
  },
2062
- color: C ? "var(--primary)" : "var(--text-muted)",
2079
+ color: E ? "var(--primary)" : "var(--text-muted)",
2063
2080
  whiteSpace: "nowrap",
2064
2081
  transition: "color 0.15s",
2065
2082
  borderLeft: ue ? "2px solid var(--primary)" : "2px solid transparent",
2066
- cursor: A ? "pointer" : "default",
2083
+ cursor: I ? "pointer" : "default",
2067
2084
  // Padding: room for grip icon left, resize handle right
2068
2085
  padding: P ? "5px 24px 5px 6px" : "7px 28px 7px 6px"
2069
2086
  },
2070
- onDragOver: (K) => ke(x, K),
2071
- onDrop: (K) => Re(x, K),
2072
- onClick: A ? () => ie(l) : void 0,
2087
+ onDragOver: (K) => ke(g, K),
2088
+ onDrop: (K) => Re(g, K),
2089
+ onClick: I ? () => ie(l) : void 0,
2073
2090
  children: [
2074
2091
  /* @__PURE__ */ t(
2075
2092
  "span",
2076
2093
  {
2077
2094
  draggable: !0,
2078
2095
  onDragStart: (K) => {
2079
- K.stopPropagation(), I(x, K);
2096
+ K.stopPropagation(), z(g, K);
2080
2097
  },
2081
2098
  onDragEnd: (K) => {
2082
2099
  K.stopPropagation(), Qe();
@@ -2089,11 +2106,11 @@ function Gn({
2089
2106
  color: "var(--text-muted)",
2090
2107
  verticalAlign: "middle"
2091
2108
  },
2092
- children: /* @__PURE__ */ t(br, { size: 15 })
2109
+ children: /* @__PURE__ */ t(Nr, { size: 15 })
2093
2110
  }
2094
2111
  ),
2095
2112
  /* @__PURE__ */ t(
2096
- kt,
2113
+ Ct,
2097
2114
  {
2098
2115
  className: "inline-block max-w-full align-middle",
2099
2116
  style: {
@@ -2106,7 +2123,7 @@ function Gn({
2106
2123
  className: `inline-flex max-w-full items-center gap-1 font-semibold uppercase tracking-wider ${P ? "text-[11px]" : "text-xs"}`,
2107
2124
  children: [
2108
2125
  /* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: l.header }),
2109
- A && /* @__PURE__ */ t("span", { className: "flex-shrink-0 opacity-60", children: C ? me.dir === "asc" ? /* @__PURE__ */ t(tr, { className: "w-3 h-3" }) : /* @__PURE__ */ t(_e, { className: "w-3 h-3" }) : /* @__PURE__ */ t(rr, { className: "w-3 h-3 opacity-40" }) })
2126
+ I && /* @__PURE__ */ t("span", { className: "flex-shrink-0 opacity-60", children: E ? me.dir === "asc" ? /* @__PURE__ */ t(sr, { className: "w-3 h-3" }) : /* @__PURE__ */ t(_e, { className: "w-3 h-3" }) : /* @__PURE__ */ t(lr, { className: "w-3 h-3 opacity-40" }) })
2110
2127
  ]
2111
2128
  }
2112
2129
  )
@@ -2149,9 +2166,9 @@ function Gn({
2149
2166
  })
2150
2167
  ]
2151
2168
  }
2152
- ), pt = () => {
2169
+ ), bt = () => {
2153
2170
  if (!ve || a) return null;
2154
- const l = qr(b, et);
2171
+ const l = en(x, et);
2155
2172
  return /* @__PURE__ */ i(
2156
2173
  "div",
2157
2174
  {
@@ -2159,24 +2176,24 @@ function Gn({
2159
2176
  style: { borderColor: "var(--border)", background: "var(--bg-input)" },
2160
2177
  children: [
2161
2178
  /* @__PURE__ */ i("div", { className: "flex min-w-0 items-center gap-2", children: [
2162
- /* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: Ae === 0 ? "0 filas" : `${Yt}–${qt} de ${Ae}` }),
2179
+ /* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: Ae === 0 ? "0 filas" : `${Xt}–${Vt} de ${Ae}` }),
2163
2180
  /* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
2164
2181
  /* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: "Filas:" }),
2165
2182
  /* @__PURE__ */ t(
2166
- jt,
2183
+ Wt,
2167
2184
  {
2168
2185
  value: String(ee),
2169
- onChange: (x) => Gt(Number(x)),
2170
- options: y.map((x) => ({
2171
- value: String(x),
2172
- label: String(x)
2186
+ onChange: (g) => Zt(Number(g)),
2187
+ options: y.map((g) => ({
2188
+ value: String(g),
2189
+ label: String(g)
2173
2190
  })),
2174
2191
  placeholder: "Filas",
2175
2192
  searchable: !1,
2176
- height: W,
2177
- padding: z,
2193
+ height: R,
2194
+ padding: A,
2178
2195
  className: "shrink-0 [&>button]:rounded-md [&>button]:text-xs [&_svg]:h-3.5 [&_svg]:w-3.5",
2179
- style: { width: L }
2196
+ style: { width: B }
2180
2197
  }
2181
2198
  )
2182
2199
  ] })
@@ -2185,41 +2202,41 @@ function Gn({
2185
2202
  /* @__PURE__ */ t(
2186
2203
  "button",
2187
2204
  {
2188
- disabled: b <= 1,
2189
- onClick: () => tt(b - 1),
2205
+ disabled: x <= 1,
2206
+ onClick: () => tt(x - 1),
2190
2207
  className: "rounded p-0.5 transition-colors disabled:opacity-30",
2191
2208
  style: { color: "var(--text-muted)", background: "transparent" },
2192
2209
  children: /* @__PURE__ */ t(je, { className: "h-3.5 w-3.5" })
2193
2210
  }
2194
2211
  ),
2195
2212
  l.map(
2196
- (x, C) => x === "..." ? /* @__PURE__ */ t(
2213
+ (g, E) => g === "..." ? /* @__PURE__ */ t(
2197
2214
  "span",
2198
2215
  {
2199
2216
  className: "px-1",
2200
2217
  style: { color: "var(--text-muted)" },
2201
2218
  children: "…"
2202
2219
  },
2203
- `e${C}`
2220
+ `e${E}`
2204
2221
  ) : /* @__PURE__ */ t(
2205
2222
  "button",
2206
2223
  {
2207
- onClick: () => tt(x),
2224
+ onClick: () => tt(g),
2208
2225
  className: "h-5 w-5 rounded text-[11px] font-medium transition-colors",
2209
2226
  style: {
2210
- background: x === b ? "var(--primary)" : "transparent",
2211
- color: x === b ? "var(--primary-fg)" : "var(--text-muted)"
2227
+ background: g === x ? "var(--primary)" : "transparent",
2228
+ color: g === x ? "var(--primary-fg)" : "var(--text-muted)"
2212
2229
  },
2213
- children: x
2230
+ children: g
2214
2231
  },
2215
- x
2232
+ g
2216
2233
  )
2217
2234
  ),
2218
2235
  /* @__PURE__ */ t(
2219
2236
  "button",
2220
2237
  {
2221
- disabled: b >= et,
2222
- onClick: () => tt(b + 1),
2238
+ disabled: x >= et,
2239
+ onClick: () => tt(x + 1),
2223
2240
  className: "rounded p-0.5 transition-colors disabled:opacity-30",
2224
2241
  style: { color: "var(--text-muted)", background: "transparent" },
2225
2242
  children: /* @__PURE__ */ t(Te, { className: "h-3.5 w-3.5" })
@@ -2243,12 +2260,12 @@ function Gn({
2243
2260
  ref: Y,
2244
2261
  className: "min-w-0 max-w-full overflow-hidden rounded-t-xl",
2245
2262
  children: /* @__PURE__ */ t(
2246
- gt,
2263
+ wt,
2247
2264
  {
2248
2265
  options: { scrollbars: { autoHide: "leave", autoHideDelay: 200 } },
2249
2266
  className: "w-full",
2250
2267
  style: {
2251
- maxHeight: Z ? X : void 0,
2268
+ maxHeight: J ? X : void 0,
2252
2269
  maxWidth: "100%"
2253
2270
  },
2254
2271
  defer: !0,
@@ -2259,14 +2276,14 @@ function Gn({
2259
2276
  style: {
2260
2277
  tableLayout: "fixed",
2261
2278
  width: "100%",
2262
- minWidth: H ?? "max-content",
2279
+ minWidth: W ?? "max-content",
2263
2280
  borderCollapse: "separate",
2264
2281
  borderSpacing: 0
2265
2282
  },
2266
2283
  children: [
2267
2284
  /* @__PURE__ */ i("colgroup", { children: [
2268
- J && /* @__PURE__ */ t("col", { style: { width: 40 } }),
2269
- S.map((l) => /* @__PURE__ */ t(
2285
+ Z && /* @__PURE__ */ t("col", { style: { width: 40 } }),
2286
+ k.map((l) => /* @__PURE__ */ t(
2270
2287
  "col",
2271
2288
  {
2272
2289
  style: { width: he[l.key] ?? 150 }
@@ -2277,18 +2294,18 @@ function Gn({
2277
2294
  /* @__PURE__ */ t(
2278
2295
  "thead",
2279
2296
  {
2280
- style: g ? {
2297
+ style: v ? {
2281
2298
  position: "sticky",
2282
2299
  top: 0,
2283
2300
  zIndex: 10,
2284
2301
  backdropFilter: "blur(14px)",
2285
2302
  WebkitBackdropFilter: "blur(14px)"
2286
2303
  } : void 0,
2287
- children: ft()
2304
+ children: ht()
2288
2305
  }
2289
2306
  ),
2290
- /* @__PURE__ */ t("tbody", { children: Array.from({ length: s }).map((l, x) => /* @__PURE__ */ i("tr", { children: [
2291
- J && /* @__PURE__ */ t(
2307
+ /* @__PURE__ */ t("tbody", { children: Array.from({ length: s }).map((l, g) => /* @__PURE__ */ i("tr", { children: [
2308
+ Z && /* @__PURE__ */ t(
2292
2309
  "td",
2293
2310
  {
2294
2311
  className: `${P ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
@@ -2298,11 +2315,11 @@ function Gn({
2298
2315
  }
2299
2316
  }
2300
2317
  ),
2301
- S.map((C, A) => /* @__PURE__ */ t(
2318
+ k.map((E, I) => /* @__PURE__ */ t(
2302
2319
  "td",
2303
2320
  {
2304
2321
  className: P ? "px-2 py-1.5" : "px-3 py-2",
2305
- style: E && !ce && A === 0 ? {
2322
+ style: O && !ce && I === 0 ? {
2306
2323
  position: "sticky",
2307
2324
  left: ye,
2308
2325
  zIndex: 1,
@@ -2321,15 +2338,15 @@ function Gn({
2321
2338
  className: "h-3.5 rounded-full animate-pulse",
2322
2339
  style: {
2323
2340
  background: "var(--border)",
2324
- width: `${U(x, A)}%`,
2341
+ width: `${U(g, I)}%`,
2325
2342
  minWidth: 32
2326
2343
  }
2327
2344
  }
2328
2345
  )
2329
2346
  },
2330
- C.key
2347
+ E.key
2331
2348
  ))
2332
- ] }, x)) })
2349
+ ] }, g)) })
2333
2350
  ]
2334
2351
  }
2335
2352
  )
@@ -2337,7 +2354,7 @@ function Gn({
2337
2354
  )
2338
2355
  }
2339
2356
  ),
2340
- pt()
2357
+ bt()
2341
2358
  ]
2342
2359
  }
2343
2360
  ) : !a && r.length === 0 ? /* @__PURE__ */ i("div", { className: "py-20 flex flex-col items-center gap-3", children: [
@@ -2355,12 +2372,12 @@ function Gn({
2355
2372
  ref: Y,
2356
2373
  className: "min-w-0 max-w-full overflow-hidden rounded-t-xl",
2357
2374
  children: /* @__PURE__ */ t(
2358
- gt,
2375
+ wt,
2359
2376
  {
2360
2377
  options: { scrollbars: { autoHide: "leave", autoHideDelay: 200 } },
2361
2378
  className: "w-full",
2362
2379
  style: {
2363
- maxHeight: Z ? X : void 0,
2380
+ maxHeight: J ? X : void 0,
2364
2381
  maxWidth: "100%"
2365
2382
  },
2366
2383
  defer: !0,
@@ -2371,14 +2388,14 @@ function Gn({
2371
2388
  style: {
2372
2389
  tableLayout: "fixed",
2373
2390
  width: "100%",
2374
- minWidth: H ?? "max-content",
2391
+ minWidth: W ?? "max-content",
2375
2392
  borderCollapse: "separate",
2376
2393
  borderSpacing: 0
2377
2394
  },
2378
2395
  children: [
2379
2396
  /* @__PURE__ */ i("colgroup", { children: [
2380
- J && /* @__PURE__ */ t("col", { style: { width: 40 } }),
2381
- S.map((l) => /* @__PURE__ */ t(
2397
+ Z && /* @__PURE__ */ t("col", { style: { width: 40 } }),
2398
+ k.map((l) => /* @__PURE__ */ t(
2382
2399
  "col",
2383
2400
  {
2384
2401
  style: { width: he[l.key] ?? 150 }
@@ -2389,23 +2406,25 @@ function Gn({
2389
2406
  /* @__PURE__ */ t(
2390
2407
  "thead",
2391
2408
  {
2392
- style: g ? {
2409
+ style: v ? {
2393
2410
  position: "sticky",
2394
2411
  top: 0,
2395
2412
  zIndex: 10,
2396
2413
  backdropFilter: "blur(14px)",
2397
2414
  WebkitBackdropFilter: "blur(14px)"
2398
2415
  } : void 0,
2399
- children: ft()
2416
+ children: ht()
2400
2417
  }
2401
2418
  ),
2402
- /* @__PURE__ */ t("tbody", { children: dt.map((l, x) => {
2403
- const C = n(l), A = mt(m == null ? void 0 : m(l)), G = x > 0 ? mt(m == null ? void 0 : m(dt[x - 1])) : null, ue = A && A.key !== (G == null ? void 0 : G.key), be = J && d.has(C), Me = !!p, K = be && k ? "color-mix(in srgb, var(--primary) 8%, var(--bg-card))" : x % 2 === 1 ? "color-mix(in srgb, var(--bg-input) 50%, var(--bg-card))" : "var(--bg-card)";
2419
+ /* @__PURE__ */ t("tbody", { children: mt.map((l, g) => {
2420
+ const E = n(l), I = pt(m == null ? void 0 : m(l)), G = g > 0 ? pt(
2421
+ m == null ? void 0 : m(mt[g - 1])
2422
+ ) : null, ue = I && I.key !== (G == null ? void 0 : G.key), be = Z && d.has(E), Me = !!p, K = be && S ? "color-mix(in srgb, var(--primary) 8%, var(--bg-card))" : g % 2 === 1 ? "color-mix(in srgb, var(--bg-input) 50%, var(--bg-card))" : "var(--bg-card)";
2404
2423
  return /* @__PURE__ */ i(ge.Fragment, { children: [
2405
- ue && /* @__PURE__ */ t("tr", { className: A.className ?? "", children: /* @__PURE__ */ t(
2424
+ ue && /* @__PURE__ */ t("tr", { className: I.className ?? "", children: /* @__PURE__ */ t(
2406
2425
  "td",
2407
2426
  {
2408
- colSpan: Vt,
2427
+ colSpan: Kt,
2409
2428
  className: P ? "px-2 py-2" : "px-3 py-3",
2410
2429
  style: {
2411
2430
  background: "color-mix(in srgb, var(--primary) 8%, var(--bg-input))",
@@ -2413,8 +2432,8 @@ function Gn({
2413
2432
  borderRight: "1px solid var(--border)"
2414
2433
  },
2415
2434
  children: /* @__PURE__ */ t("div", { className: "flex min-w-0 items-center justify-between gap-3", children: /* @__PURE__ */ i("div", { className: "min-w-0", children: [
2416
- /* @__PURE__ */ t("div", { className: "truncate text-xs font-semibold uppercase tracking-wider text-[var(--text-main)]", children: A.label }),
2417
- A.description && /* @__PURE__ */ t("div", { className: "mt-0.5 truncate text-xs text-[var(--text-muted)]", children: A.description })
2435
+ /* @__PURE__ */ t("div", { className: "truncate text-xs font-semibold uppercase tracking-wider text-[var(--text-main)]", children: I.label }),
2436
+ I.description && /* @__PURE__ */ t("div", { className: "mt-0.5 truncate text-xs text-[var(--text-muted)]", children: I.description })
2418
2437
  ] }) })
2419
2438
  }
2420
2439
  ) }),
@@ -2422,7 +2441,7 @@ function Gn({
2422
2441
  "tr",
2423
2442
  {
2424
2443
  onClick: Me ? () => p(l) : void 0,
2425
- className: `transition-colors ${Me ? "cursor-pointer" : ""} ${v ? v(l) : ""}`,
2444
+ className: `transition-colors ${Me ? "cursor-pointer" : ""} ${b ? b(l) : ""}`,
2426
2445
  style: {
2427
2446
  "--dt-row-bg": K,
2428
2447
  "--dt-sticky-bg": K,
@@ -2434,7 +2453,7 @@ function Gn({
2434
2453
  "var(--bg-hover)"
2435
2454
  ), se.currentTarget.style.setProperty(
2436
2455
  "--dt-sticky-bg",
2437
- Xt
2456
+ Jt
2438
2457
  ));
2439
2458
  },
2440
2459
  onMouseLeave: (se) => {
@@ -2444,11 +2463,11 @@ function Gn({
2444
2463
  );
2445
2464
  },
2446
2465
  children: [
2447
- J && /* @__PURE__ */ t(
2466
+ Z && /* @__PURE__ */ t(
2448
2467
  "td",
2449
2468
  {
2450
2469
  className: `${P ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
2451
- style: E ? {
2470
+ style: O ? {
2452
2471
  position: "sticky",
2453
2472
  left: 0,
2454
2473
  zIndex: 3,
@@ -2459,7 +2478,7 @@ function Gn({
2459
2478
  borderRight: "1px solid var(--border)"
2460
2479
  },
2461
2480
  onClick: (se) => {
2462
- se.stopPropagation(), h(C);
2481
+ se.stopPropagation(), h(E);
2463
2482
  },
2464
2483
  children: /* @__PURE__ */ t(
2465
2484
  "input",
@@ -2467,18 +2486,18 @@ function Gn({
2467
2486
  type: "checkbox",
2468
2487
  checked: be,
2469
2488
  onClick: (se) => se.stopPropagation(),
2470
- onChange: () => h(C),
2489
+ onChange: () => h(E),
2471
2490
  className: "rounded cursor-pointer accent-[var(--primary)]"
2472
2491
  }
2473
2492
  )
2474
2493
  }
2475
2494
  ),
2476
- S.map((se, Ue) => {
2477
- const Ye = E && !ce && Ue === 0;
2495
+ k.map((se, Ue) => {
2496
+ const Ye = O && !ce && Ue === 0;
2478
2497
  return /* @__PURE__ */ t(
2479
2498
  "td",
2480
2499
  {
2481
- className: `${P ? "px-2 py-1.5" : "px-3 py-2"} ${Yr} ${ut(se.align)} ${se.className ?? ""}`,
2500
+ className: `${P ? "px-2 py-1.5" : "px-3 py-2"} ${Qr} ${ft(se.align)} ${se.className ?? ""}`,
2482
2501
  style: {
2483
2502
  overflow: "hidden",
2484
2503
  whiteSpace: "nowrap",
@@ -2494,7 +2513,7 @@ function Gn({
2494
2513
  borderRight: "1px solid var(--border)"
2495
2514
  }
2496
2515
  },
2497
- children: /* @__PURE__ */ t(kt, { children: se.cell(l) })
2516
+ children: /* @__PURE__ */ t(Ct, { children: se.cell(l) })
2498
2517
  },
2499
2518
  se.key
2500
2519
  );
@@ -2502,7 +2521,7 @@ function Gn({
2502
2521
  ]
2503
2522
  }
2504
2523
  )
2505
- ] }, C);
2524
+ ] }, E);
2506
2525
  }) })
2507
2526
  ]
2508
2527
  }
@@ -2511,22 +2530,22 @@ function Gn({
2511
2530
  )
2512
2531
  }
2513
2532
  ),
2514
- pt()
2533
+ bt()
2515
2534
  ]
2516
2535
  }
2517
2536
  );
2518
2537
  }
2519
- function Ie(e) {
2538
+ function Pe(e) {
2520
2539
  return e ? /* @__PURE__ */ new Date(`${e}T12:00:00`) : void 0;
2521
2540
  }
2522
- function St(e) {
2541
+ function $t(e) {
2523
2542
  return e.toISOString().slice(0, 10);
2524
2543
  }
2525
- function Gr({
2544
+ function tn({
2526
2545
  calendarMonth: e,
2527
2546
  displayIndex: r
2528
2547
  }) {
2529
- const { previousMonth: n, nextMonth: a, goToMonth: s, months: u, labels: f, formatters: p } = vr(), d = !!n && r === 0, h = !!a && r === u.length - 1;
2548
+ const { previousMonth: n, nextMonth: a, goToMonth: s, months: u, labels: f, formatters: p } = Sr(), d = !!n && r === 0, h = !!a && r === u.length - 1;
2530
2549
  return /* @__PURE__ */ i(
2531
2550
  "div",
2532
2551
  {
@@ -2591,10 +2610,10 @@ function Gr({
2591
2610
  }
2592
2611
  );
2593
2612
  }
2594
- function Xr(e) {
2613
+ function rn(e) {
2595
2614
  return e.charAt(0).toUpperCase() + e.slice(1);
2596
2615
  }
2597
- function Xn({
2616
+ function ra({
2598
2617
  startDate: e,
2599
2618
  endDate: r,
2600
2619
  onChange: n,
@@ -2606,13 +2625,13 @@ function Xn({
2606
2625
  endLabel: d = "Regreso"
2607
2626
  }) {
2608
2627
  const h = {
2609
- from: Ie(e),
2610
- to: Ie(r)
2611
- }, N = Ie(a), [k, v] = T(
2612
- Ie(s || e)
2628
+ from: Pe(e),
2629
+ to: Pe(r)
2630
+ }, N = Pe(a), [S, b] = D(
2631
+ Pe(s || e)
2613
2632
  );
2614
2633
  return _(() => {
2615
- v(Ie(s || e));
2634
+ b(Pe(s || e));
2616
2635
  }, [s, e]), /* @__PURE__ */ i("div", { children: [
2617
2636
  /* @__PURE__ */ t(
2618
2637
  "div",
@@ -2627,22 +2646,22 @@ function Xn({
2627
2646
  padding: "10px 8px"
2628
2647
  },
2629
2648
  children: /* @__PURE__ */ t(
2630
- xr,
2649
+ kr,
2631
2650
  {
2632
2651
  mode: "range",
2633
2652
  selected: h,
2634
- month: k,
2635
- onMonthChange: v,
2653
+ month: S,
2654
+ onMonthChange: b,
2636
2655
  onSelect: (m) => {
2637
- const g = m != null && m.from ? St(m.from) : e, c = m != null && m.to ? St(m.to) : "";
2638
- n({ startDate: g, endDate: c });
2656
+ const v = m != null && m.from ? $t(m.from) : e, c = m != null && m.to ? $t(m.to) : "";
2657
+ n({ startDate: v, endDate: c });
2639
2658
  },
2640
2659
  numberOfMonths: u,
2641
2660
  hideNavigation: !0,
2642
2661
  disabled: N ? { before: N } : void 0,
2643
2662
  showOutsideDays: !1,
2644
2663
  components: {
2645
- MonthCaption: Gr
2664
+ MonthCaption: tn
2646
2665
  },
2647
2666
  className: "text-sm",
2648
2667
  classNames: {
@@ -2734,7 +2753,7 @@ function Xn({
2734
2753
  }
2735
2754
  },
2736
2755
  formatters: {
2737
- formatCaption: (m) => Xr(
2756
+ formatCaption: (m) => rn(
2738
2757
  new Intl.DateTimeFormat("es-MX", {
2739
2758
  month: "long",
2740
2759
  year: "numeric"
@@ -2781,7 +2800,7 @@ function Xn({
2781
2800
  )
2782
2801
  ] });
2783
2802
  }
2784
- function Vn({
2803
+ function na({
2785
2804
  open: e,
2786
2805
  onClose: r,
2787
2806
  title: n,
@@ -2793,12 +2812,12 @@ function Vn({
2793
2812
  confirmDisabled: d = !1,
2794
2813
  headerActions: h,
2795
2814
  bodyClassName: N = "flex-1 overflow-y-auto px-6 py-5",
2796
- width: k = 440,
2797
- children: v
2815
+ width: S = 440,
2816
+ children: b
2798
2817
  }) {
2799
- const [m, g] = T(!1);
2818
+ const [m, v] = D(!1);
2800
2819
  return _(() => {
2801
- g(!0);
2820
+ v(!0);
2802
2821
  }, []), _(() => (document.body.style.overflow = e ? "hidden" : "", () => {
2803
2822
  document.body.style.overflow = "";
2804
2823
  }), [e]), _(() => {
@@ -2826,7 +2845,7 @@ function Vn({
2826
2845
  {
2827
2846
  className: `absolute inset-y-0 right-0 flex flex-col shadow-2xl transition-transform duration-300 ${e ? "translate-x-0" : "translate-x-full"}`,
2828
2847
  style: {
2829
- width: `min(100vw, ${k}px)`,
2848
+ width: `min(100vw, ${S}px)`,
2830
2849
  background: "var(--bg-card)",
2831
2850
  borderLeft: "1px solid var(--border)"
2832
2851
  },
@@ -2877,7 +2896,7 @@ function Vn({
2877
2896
  {
2878
2897
  variant: "primary",
2879
2898
  size: "sm",
2880
- icon: /* @__PURE__ */ t(gr, { className: "w-4 h-4" }),
2899
+ icon: /* @__PURE__ */ t(Cr, { className: "w-4 h-4" }),
2881
2900
  onClick: f,
2882
2901
  loading: p,
2883
2902
  disabled: d,
@@ -2889,7 +2908,7 @@ function Vn({
2889
2908
  ]
2890
2909
  }
2891
2910
  ),
2892
- /* @__PURE__ */ t("div", { "data-drawer-scroll": "true", className: N, children: v })
2911
+ /* @__PURE__ */ t("div", { "data-drawer-scroll": "true", className: N, children: b })
2893
2912
  ]
2894
2913
  }
2895
2914
  )
@@ -2899,23 +2918,23 @@ function Vn({
2899
2918
  document.body
2900
2919
  ) : null;
2901
2920
  }
2902
- var Ht = {
2921
+ var Ut = {
2903
2922
  color: void 0,
2904
2923
  size: void 0,
2905
2924
  className: void 0,
2906
2925
  style: void 0,
2907
2926
  attr: void 0
2908
- }, Ct = ge.createContext && /* @__PURE__ */ ge.createContext(Ht), Vr = ["attr", "size", "title"];
2909
- function Jr(e, r) {
2927
+ }, Et = ge.createContext && /* @__PURE__ */ ge.createContext(Ut), nn = ["attr", "size", "title"];
2928
+ function an(e, r) {
2910
2929
  if (e == null) return {};
2911
- var n, a, s = Zr(e, r);
2930
+ var n, a, s = on(e, r);
2912
2931
  if (Object.getOwnPropertySymbols) {
2913
2932
  var u = Object.getOwnPropertySymbols(e);
2914
2933
  for (a = 0; a < u.length; a++) n = u[a], r.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (s[n] = e[n]);
2915
2934
  }
2916
2935
  return s;
2917
2936
  }
2918
- function Zr(e, r) {
2937
+ function on(e, r) {
2919
2938
  if (e == null) return {};
2920
2939
  var n = {};
2921
2940
  for (var a in e) if ({}.hasOwnProperty.call(e, a)) {
@@ -2933,7 +2952,7 @@ function Ve() {
2933
2952
  return e;
2934
2953
  }, Ve.apply(null, arguments);
2935
2954
  }
2936
- function $t(e, r) {
2955
+ function Mt(e, r) {
2937
2956
  var n = Object.keys(e);
2938
2957
  if (Object.getOwnPropertySymbols) {
2939
2958
  var a = Object.getOwnPropertySymbols(e);
@@ -2943,25 +2962,25 @@ function $t(e, r) {
2943
2962
  }
2944
2963
  return n;
2945
2964
  }
2946
- function Je(e) {
2965
+ function Ze(e) {
2947
2966
  for (var r = 1; r < arguments.length; r++) {
2948
2967
  var n = arguments[r] != null ? arguments[r] : {};
2949
- r % 2 ? $t(Object(n), !0).forEach(function(a) {
2950
- Kr(e, a, n[a]);
2951
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : $t(Object(n)).forEach(function(a) {
2968
+ r % 2 ? Mt(Object(n), !0).forEach(function(a) {
2969
+ sn(e, a, n[a]);
2970
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Mt(Object(n)).forEach(function(a) {
2952
2971
  Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(n, a));
2953
2972
  });
2954
2973
  }
2955
2974
  return e;
2956
2975
  }
2957
- function Kr(e, r, n) {
2958
- return (r = Qr(r)) in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
2976
+ function sn(e, r, n) {
2977
+ return (r = ln(r)) in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
2959
2978
  }
2960
- function Qr(e) {
2961
- var r = en(e, "string");
2979
+ function ln(e) {
2980
+ var r = cn(e, "string");
2962
2981
  return typeof r == "symbol" ? r : r + "";
2963
2982
  }
2964
- function en(e, r) {
2983
+ function cn(e, r) {
2965
2984
  if (typeof e != "object" || !e) return e;
2966
2985
  var n = e[Symbol.toPrimitive];
2967
2986
  if (n !== void 0) {
@@ -2971,30 +2990,30 @@ function en(e, r) {
2971
2990
  }
2972
2991
  return (r === "string" ? String : Number)(e);
2973
2992
  }
2974
- function Wt(e) {
2975
- return e && e.map((r, n) => /* @__PURE__ */ ge.createElement(r.tag, Je({
2993
+ function Yt(e) {
2994
+ return e && e.map((r, n) => /* @__PURE__ */ ge.createElement(r.tag, Ze({
2976
2995
  key: n
2977
- }, r.attr), Wt(r.child)));
2996
+ }, r.attr), Yt(r.child)));
2978
2997
  }
2979
- function Ft(e) {
2980
- return (r) => /* @__PURE__ */ ge.createElement(tn, Ve({
2981
- attr: Je({}, e.attr)
2982
- }, r), Wt(e.child));
2998
+ function qt(e) {
2999
+ return (r) => /* @__PURE__ */ ge.createElement(dn, Ve({
3000
+ attr: Ze({}, e.attr)
3001
+ }, r), Yt(e.child));
2983
3002
  }
2984
- function tn(e) {
3003
+ function dn(e) {
2985
3004
  var r = (n) => {
2986
3005
  var {
2987
3006
  attr: a,
2988
3007
  size: s,
2989
3008
  title: u
2990
- } = e, f = Jr(e, Vr), p = s || n.size || "1em", d;
3009
+ } = e, f = an(e, nn), p = s || n.size || "1em", d;
2991
3010
  return n.className && (d = n.className), e.className && (d = (d ? d + " " : "") + e.className), /* @__PURE__ */ ge.createElement("svg", Ve({
2992
3011
  stroke: "currentColor",
2993
3012
  fill: "currentColor",
2994
3013
  strokeWidth: "0"
2995
3014
  }, n.attr, a, f, {
2996
3015
  className: d,
2997
- style: Je(Je({
3016
+ style: Ze(Ze({
2998
3017
  color: e.color || n.color
2999
3018
  }, n.style), e.style),
3000
3019
  height: p,
@@ -3002,13 +3021,13 @@ function tn(e) {
3002
3021
  xmlns: "http://www.w3.org/2000/svg"
3003
3022
  }), u && /* @__PURE__ */ ge.createElement("title", null, u), e.children);
3004
3023
  };
3005
- return Ct !== void 0 ? /* @__PURE__ */ ge.createElement(Ct.Consumer, null, (n) => r(n)) : r(Ht);
3024
+ return Et !== void 0 ? /* @__PURE__ */ ge.createElement(Et.Consumer, null, (n) => r(n)) : r(Ut);
3006
3025
  }
3007
- function rn(e) {
3008
- return Ft({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z" }, child: [] }] })(e);
3026
+ function un(e) {
3027
+ return qt({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z" }, child: [] }] })(e);
3009
3028
  }
3010
- function nn(e) {
3011
- return Ft({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M228,175a8,8,0,0,1-10.92-3l-19-33.2A123.23,123.23,0,0,1,162,155.46l5.87,35.22a8,8,0,0,1-6.58,9.21A8.4,8.4,0,0,1,160,200a8,8,0,0,1-7.88-6.69l-5.77-34.58a133.06,133.06,0,0,1-36.68,0l-5.77,34.58A8,8,0,0,1,96,200a8.4,8.4,0,0,1-1.32-.11,8,8,0,0,1-6.58-9.21L94,155.46a123.23,123.23,0,0,1-36.06-16.69L39,172A8,8,0,1,1,25.06,164l20-35a153.47,153.47,0,0,1-19.3-20A8,8,0,1,1,38.22,99c16.6,20.54,45.64,45,89.78,45s73.18-24.49,89.78-45A8,8,0,1,1,230.22,109a153.47,153.47,0,0,1-19.3,20l20,35A8,8,0,0,1,228,175Z" }, child: [] }] })(e);
3029
+ function mn(e) {
3030
+ return qt({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M228,175a8,8,0,0,1-10.92-3l-19-33.2A123.23,123.23,0,0,1,162,155.46l5.87,35.22a8,8,0,0,1-6.58,9.21A8.4,8.4,0,0,1,160,200a8,8,0,0,1-7.88-6.69l-5.77-34.58a133.06,133.06,0,0,1-36.68,0l-5.77,34.58A8,8,0,0,1,96,200a8.4,8.4,0,0,1-1.32-.11,8,8,0,0,1-6.58-9.21L94,155.46a123.23,123.23,0,0,1-36.06-16.69L39,172A8,8,0,1,1,25.06,164l20-35a153.47,153.47,0,0,1-19.3-20A8,8,0,1,1,38.22,99c16.6,20.54,45.64,45,89.78,45s73.18-24.49,89.78-45A8,8,0,1,1,230.22,109a153.47,153.47,0,0,1-19.3,20l20,35A8,8,0,0,1,228,175Z" }, child: [] }] })(e);
3012
3031
  }
3013
3032
  function at({
3014
3033
  className: e = "",
@@ -3022,7 +3041,7 @@ function at({
3022
3041
  }
3023
3042
  );
3024
3043
  }
3025
- function Jn({
3044
+ function aa({
3026
3045
  label: e,
3027
3046
  containerClassName: r = "",
3028
3047
  helperText: n,
@@ -3034,42 +3053,42 @@ function Jn({
3034
3053
  required: d,
3035
3054
  ...h
3036
3055
  }) {
3037
- const [N, k] = T(() => !!h.autoFocus), [v, m] = T(!1), g = h.type === "password" && f, c = g && v ? "text" : h.type, y = h.value !== void 0 ? String(h.value).length > 0 : h.defaultValue !== void 0 && String(h.defaultValue).length > 0, L = N || y, W = {
3038
- top: L ? 8 : 15,
3056
+ const [N, S] = D(() => !!h.autoFocus), [b, m] = D(!1), v = h.type === "password" && f, c = v && b ? "text" : h.type, y = h.value !== void 0 ? String(h.value).length > 0 : h.defaultValue !== void 0 && String(h.defaultValue).length > 0, B = N || y, R = {
3057
+ top: B ? 8 : 15,
3039
3058
  color: N ? "var(--primary)" : "var(--text-muted)",
3040
- fontSize: L ? 11 : 14,
3041
- fontWeight: L ? 600 : 400,
3042
- textTransform: L ? "uppercase" : "none"
3043
- }, z = (B) => {
3044
- var M;
3045
- k(!0), (M = h.onFocus) == null || M.call(h, B);
3046
- }, $ = (B) => {
3047
- var M;
3048
- k(!1), (M = h.onBlur) == null || M.call(h, B);
3049
- }, D = g ? /* @__PURE__ */ i(
3059
+ fontSize: B ? 11 : 14,
3060
+ fontWeight: B ? 600 : 400,
3061
+ textTransform: B ? "uppercase" : "none"
3062
+ }, A = (M) => {
3063
+ var $;
3064
+ S(!0), ($ = h.onFocus) == null || $.call(h, M);
3065
+ }, C = (M) => {
3066
+ var $;
3067
+ S(!1), ($ = h.onBlur) == null || $.call(h, M);
3068
+ }, L = v ? /* @__PURE__ */ i(
3050
3069
  "button",
3051
3070
  {
3052
3071
  type: "button",
3053
- "aria-label": v ? "Ocultar contraseña" : "Mostrar contraseña",
3054
- "aria-pressed": v,
3072
+ "aria-label": b ? "Ocultar contraseña" : "Mostrar contraseña",
3073
+ "aria-pressed": b,
3055
3074
  className: "absolute right-2.5 top-1/2 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-md text-[var(--text-muted)] transition-colors duration-200 hover:text-[var(--primary)] focus:outline-none",
3056
3075
  tabIndex: -1,
3057
- onClick: () => m((B) => !B),
3076
+ onClick: () => m((M) => !M),
3058
3077
  children: [
3059
3078
  /* @__PURE__ */ t(
3060
3079
  "span",
3061
3080
  {
3062
3081
  "aria-hidden": "true",
3063
- className: `absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-200 ease-out ${v ? "scale-y-0 rotate-[-8deg] opacity-0" : "scale-y-100 rotate-0 opacity-100"}`,
3064
- children: /* @__PURE__ */ t(rn, { className: "h-[18px] w-[18px]" })
3082
+ className: `absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-200 ease-out ${b ? "scale-y-0 rotate-[-8deg] opacity-0" : "scale-y-100 rotate-0 opacity-100"}`,
3083
+ children: /* @__PURE__ */ t(un, { className: "h-[18px] w-[18px]" })
3065
3084
  }
3066
3085
  ),
3067
3086
  /* @__PURE__ */ t(
3068
3087
  "span",
3069
3088
  {
3070
3089
  "aria-hidden": "true",
3071
- className: `absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-200 ease-out ${v ? "scale-y-100 rotate-0 opacity-100" : "scale-y-0 rotate-[8deg] opacity-0"}`,
3072
- children: /* @__PURE__ */ t(nn, { className: "h-[18px] w-[18px]" })
3090
+ className: `absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-200 ease-out ${b ? "scale-y-100 rotate-0 opacity-100" : "scale-y-0 rotate-[8deg] opacity-0"}`,
3091
+ children: /* @__PURE__ */ t(mn, { className: "h-[18px] w-[18px]" })
3073
3092
  }
3074
3093
  )
3075
3094
  ]
@@ -3086,16 +3105,16 @@ function Jn({
3086
3105
  placeholder: " ",
3087
3106
  "aria-invalid": !!a || h["aria-invalid"],
3088
3107
  "data-has-value": y ? "true" : void 0,
3089
- className: `h-12 w-full pt-5 ${g ? "pr-10" : ""} ${p}`,
3090
- onFocus: z,
3091
- onBlur: $
3108
+ className: `h-12 w-full pt-5 ${v ? "pr-10" : ""} ${p}`,
3109
+ onFocus: A,
3110
+ onBlur: C
3092
3111
  }
3093
3112
  ),
3094
3113
  /* @__PURE__ */ i(
3095
3114
  "span",
3096
3115
  {
3097
3116
  className: "pointer-events-none absolute left-3 transition-all duration-150",
3098
- style: W,
3117
+ style: R,
3099
3118
  children: [
3100
3119
  e,
3101
3120
  d && /* @__PURE__ */ t("span", { className: "ml-1 text-[var(--danger)]", children: "*" })
@@ -3106,11 +3125,11 @@ function Jn({
3106
3125
  "span",
3107
3126
  {
3108
3127
  className: "absolute right-2 transition-all duration-150",
3109
- style: { top: L ? 8 : 15 },
3128
+ style: { top: B ? 8 : 15 },
3110
3129
  children: s
3111
3130
  }
3112
3131
  ),
3113
- D
3132
+ L
3114
3133
  ] }),
3115
3134
  a ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: a }) : n ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--text-muted)]", children: n }) : null
3116
3135
  ] }) : /* @__PURE__ */ i("label", { className: `flex flex-col gap-2 ${r}`, children: [
@@ -3119,7 +3138,7 @@ function Jn({
3119
3138
  d && /* @__PURE__ */ t("span", { className: "text-[var(--danger)]", children: "*" }),
3120
3139
  s && /* @__PURE__ */ t("span", { className: "ml-auto normal-case", children: s })
3121
3140
  ] }),
3122
- g ? /* @__PURE__ */ i("span", { className: "relative block", children: [
3141
+ v ? /* @__PURE__ */ i("span", { className: "relative block", children: [
3123
3142
  /* @__PURE__ */ t(
3124
3143
  at,
3125
3144
  {
@@ -3128,11 +3147,11 @@ function Jn({
3128
3147
  required: d,
3129
3148
  "aria-invalid": !!a || h["aria-invalid"],
3130
3149
  className: `w-full pr-10 ${p}`,
3131
- onFocus: z,
3132
- onBlur: $
3150
+ onFocus: A,
3151
+ onBlur: C
3133
3152
  }
3134
3153
  ),
3135
- D
3154
+ L
3136
3155
  ] }) : /* @__PURE__ */ t(
3137
3156
  at,
3138
3157
  {
@@ -3148,7 +3167,7 @@ function Jn({
3148
3167
  function $e(...e) {
3149
3168
  return e.filter(Boolean).join(" ");
3150
3169
  }
3151
- function Zn({
3170
+ function ia({
3152
3171
  steps: e,
3153
3172
  activeStepId: r,
3154
3173
  initialStepId: n,
@@ -3160,59 +3179,59 @@ function Zn({
3160
3179
  allowBackNavigation: d = !0,
3161
3180
  showFooter: h = !0,
3162
3181
  previousLabel: N = "Anterior",
3163
- nextLabel: k = "Siguiente",
3164
- blockedNextLabel: v = "Completa este paso",
3182
+ nextLabel: S = "Siguiente",
3183
+ blockedNextLabel: b = "Completa este paso",
3165
3184
  className: m = "",
3166
- headerClassName: g = "",
3185
+ headerClassName: v = "",
3167
3186
  contentClassName: c = "",
3168
3187
  footerClassName: y = ""
3169
3188
  }) {
3170
3189
  var de;
3171
- const L = ((de = e[0]) == null ? void 0 : de.id) ?? "", [W, z] = T(
3172
- n ?? L
3173
- ), [$, D] = T(
3190
+ const B = ((de = e[0]) == null ? void 0 : de.id) ?? "", [R, A] = D(
3191
+ n ?? B
3192
+ ), [C, L] = D(
3174
3193
  s
3175
- ), B = r ?? W, M = a ?? $, R = ze(
3176
- () => new Set(M),
3177
- [M]
3178
- ), E = Math.max(
3194
+ ), M = r ?? R, $ = a ?? C, H = ze(
3195
+ () => new Set($),
3196
+ [$]
3197
+ ), O = Math.max(
3179
3198
  0,
3180
- e.findIndex((S) => S.id === B)
3181
- ), O = e[E] ?? e[0], P = e.length <= 1 ? 100 : E / (e.length - 1) * 100, Z = (S) => {
3182
- a || D(S), f == null || f(S);
3183
- }, H = (S) => {
3184
- const j = e.find((q) => q.id === S);
3185
- j && (r || z(S), u == null || u(S, j));
3186
- }, F = (S) => R.has(S), V = (S) => e.slice(0, S).find((j) => !j.optional && !R.has(j.id)), Q = (S) => {
3187
- const j = e[S];
3188
- return !j || j.disabled ? !1 : S === E || d && S < E ? !0 : !V(S);
3189
- }, o = (S) => {
3190
- const j = e.findIndex((q) => q.id === S);
3199
+ e.findIndex((k) => k.id === M)
3200
+ ), T = e[O] ?? e[0], P = e.length <= 1 ? 100 : O / (e.length - 1) * 100, J = (k) => {
3201
+ a || L(k), f == null || f(k);
3202
+ }, W = (k) => {
3203
+ const j = e.find((q) => q.id === k);
3204
+ j && (r || A(k), u == null || u(k, j));
3205
+ }, F = (k) => H.has(k), V = (k) => e.slice(0, k).find((j) => !j.optional && !H.has(j.id)), Q = (k) => {
3206
+ const j = e[k];
3207
+ return !j || j.disabled ? !1 : k === O || d && k < O ? !0 : !V(k);
3208
+ }, o = (k) => {
3209
+ const j = e.findIndex((q) => q.id === k);
3191
3210
  return j >= 0 && Q(j);
3192
- }, w = (S) => {
3193
- const j = e.findIndex((q) => q.id === S);
3211
+ }, w = (k) => {
3212
+ const j = e.findIndex((q) => q.id === k);
3194
3213
  if (j < 0) return !1;
3195
3214
  if (!Q(j)) {
3196
3215
  const q = V(j);
3197
3216
  return q && (p == null || p(e[j], q)), !1;
3198
3217
  }
3199
- return H(S), !0;
3200
- }, U = (S = O == null ? void 0 : O.id) => {
3201
- !S || R.has(S) || Z([...M, S]);
3202
- }, Y = (S = O == null ? void 0 : O.id) => {
3203
- if (!S) return;
3204
- const j = e.findIndex((ae) => ae.id === S), q = M.filter((ae) => {
3205
- const oe = e.findIndex((I) => I.id === ae);
3218
+ return W(k), !0;
3219
+ }, U = (k = T == null ? void 0 : T.id) => {
3220
+ !k || H.has(k) || J([...$, k]);
3221
+ }, Y = (k = T == null ? void 0 : T.id) => {
3222
+ if (!k) return;
3223
+ const j = e.findIndex((ae) => ae.id === k), q = $.filter((ae) => {
3224
+ const oe = e.findIndex((z) => z.id === ae);
3206
3225
  return oe >= 0 && oe < j;
3207
3226
  });
3208
- Z(q), j >= 0 && E > j && H(S);
3209
- }, X = () => E <= 0 ? !1 : w(e[E - 1].id), te = () => {
3210
- const S = e[E + 1];
3211
- return S ? w(S.id) : !1;
3227
+ J(q), j >= 0 && O > j && W(k);
3228
+ }, X = () => O <= 0 ? !1 : w(e[O - 1].id), te = () => {
3229
+ const k = e[O + 1];
3230
+ return k ? w(k.id) : !1;
3212
3231
  }, ce = {
3213
- activeStep: O,
3214
- activeIndex: E,
3215
- completedStepIds: M,
3232
+ activeStep: T,
3233
+ activeIndex: O,
3234
+ completedStepIds: $,
3216
3235
  isCompleted: F,
3217
3236
  isUnlocked: o,
3218
3237
  completeStep: U,
@@ -3221,8 +3240,8 @@ function Zn({
3221
3240
  goNext: te,
3222
3241
  goPrevious: X
3223
3242
  };
3224
- if (!O) return null;
3225
- const ne = e[E + 1], Ne = E > 0, pe = ne ? o(ne.id) : !1, he = typeof O.content == "function" ? O.content(ce) : O.content;
3243
+ if (!T) return null;
3244
+ const ne = e[O + 1], Ne = O > 0, pe = ne ? o(ne.id) : !1, he = typeof T.content == "function" ? T.content(ce) : T.content;
3226
3245
  return /* @__PURE__ */ i(
3227
3246
  "section",
3228
3247
  {
@@ -3236,7 +3255,7 @@ function Zn({
3236
3255
  {
3237
3256
  className: $e(
3238
3257
  "border-b border-[var(--border)] bg-[var(--bg-input)]",
3239
- g
3258
+ v
3240
3259
  ),
3241
3260
  children: [
3242
3261
  /* @__PURE__ */ t("div", { className: "relative h-1 overflow-hidden bg-[var(--border)]/55", children: /* @__PURE__ */ t(
@@ -3253,8 +3272,8 @@ function Zn({
3253
3272
  style: {
3254
3273
  gridTemplateColumns: `repeat(${e.length}, minmax(0, 1fr))`
3255
3274
  },
3256
- children: e.map((S, j) => {
3257
- const q = S.id === O.id, ae = F(S.id), oe = Q(j), I = V(j);
3275
+ children: e.map((k, j) => {
3276
+ const q = k.id === T.id, ae = F(k.id), oe = Q(j), z = V(j);
3258
3277
  return /* @__PURE__ */ i(
3259
3278
  "button",
3260
3279
  {
@@ -3262,8 +3281,8 @@ function Zn({
3262
3281
  disabled: !oe,
3263
3282
  "aria-current": q ? "step" : void 0,
3264
3283
  "aria-disabled": !oe,
3265
- title: !oe && I ? `Completa ${I.title}` : S.title,
3266
- onClick: () => w(S.id),
3284
+ title: !oe && z ? `Completa ${z.title}` : k.title,
3285
+ onClick: () => w(k.id),
3267
3286
  className: $e(
3268
3287
  "group relative min-h-16 min-w-0 overflow-hidden rounded-md border p-3 text-left transition-all duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--primary)]/35 disabled:cursor-not-allowed",
3269
3288
  q && "border-[var(--primary)] bg-[var(--bg-card)] shadow-sm",
@@ -3292,7 +3311,7 @@ function Zn({
3292
3311
  !ae && !q && oe && "border-[var(--border)] text-[var(--text-muted)]",
3293
3312
  !oe && "border-[var(--border)] text-[var(--text-muted)]"
3294
3313
  ),
3295
- children: ae ? /* @__PURE__ */ t(Dt, { className: "h-4 w-4" }) : oe ? j + 1 : /* @__PURE__ */ t(nr, { className: "h-3.5 w-3.5" })
3314
+ children: ae ? /* @__PURE__ */ t(Pt, { className: "h-4 w-4" }) : oe ? j + 1 : /* @__PURE__ */ t(cr, { className: "h-3.5 w-3.5" })
3296
3315
  }
3297
3316
  ),
3298
3317
  /* @__PURE__ */ i("span", { className: "min-w-0 flex-1", children: [
@@ -3306,17 +3325,17 @@ function Zn({
3306
3325
  children: [
3307
3326
  j + 1,
3308
3327
  ". ",
3309
- S.title
3328
+ k.title
3310
3329
  ]
3311
3330
  }
3312
3331
  ),
3313
- S.description && /* @__PURE__ */ t("span", { className: "mt-1 block truncate text-[11px] text-[var(--text-muted)]", children: S.description })
3332
+ k.description && /* @__PURE__ */ t("span", { className: "mt-1 block truncate text-[11px] text-[var(--text-muted)]", children: k.description })
3314
3333
  ] }),
3315
- S.badge && /* @__PURE__ */ t("span", { className: "shrink-0", children: S.badge })
3334
+ k.badge && /* @__PURE__ */ t("span", { className: "shrink-0", children: k.badge })
3316
3335
  ] })
3317
3336
  ]
3318
3337
  },
3319
- S.id
3338
+ k.id
3320
3339
  );
3321
3340
  })
3322
3341
  }
@@ -3333,7 +3352,7 @@ function Zn({
3333
3352
  ),
3334
3353
  children: he
3335
3354
  },
3336
- O.id
3355
+ T.id
3337
3356
  ),
3338
3357
  h && /* @__PURE__ */ i(
3339
3358
  "div",
@@ -3358,13 +3377,13 @@ function Zn({
3358
3377
  /* @__PURE__ */ i("div", { className: "flex items-center gap-3 text-xs text-[var(--text-muted)]", children: [
3359
3378
  /* @__PURE__ */ i("span", { children: [
3360
3379
  "Paso ",
3361
- E + 1,
3380
+ O + 1,
3362
3381
  " de ",
3363
3382
  e.length
3364
3383
  ] }),
3365
3384
  /* @__PURE__ */ t("span", { className: "h-1 w-1 rounded-full bg-[var(--border)]" }),
3366
3385
  /* @__PURE__ */ i("span", { children: [
3367
- M.length,
3386
+ $.length,
3368
3387
  " completados"
3369
3388
  ] })
3370
3389
  ] }),
@@ -3376,7 +3395,7 @@ function Zn({
3376
3395
  icon: /* @__PURE__ */ t(Te, {}),
3377
3396
  disabled: !ne || !pe,
3378
3397
  onClick: te,
3379
- children: ne && !pe ? v : k
3398
+ children: ne && !pe ? b : S
3380
3399
  }
3381
3400
  )
3382
3401
  ]
@@ -3386,7 +3405,7 @@ function Zn({
3386
3405
  }
3387
3406
  );
3388
3407
  }
3389
- const an = {
3408
+ const fn = {
3390
3409
  xs: {
3391
3410
  width: 28,
3392
3411
  height: 16,
@@ -3400,7 +3419,7 @@ const an = {
3400
3419
  padding: 2
3401
3420
  }
3402
3421
  };
3403
- function Kn({
3422
+ function oa({
3404
3423
  checked: e,
3405
3424
  disabled: r,
3406
3425
  onCheckedChange: n,
@@ -3408,7 +3427,7 @@ function Kn({
3408
3427
  className: s = "",
3409
3428
  ...u
3410
3429
  }) {
3411
- const f = an[a], p = e ? f.width - f.thumb - f.padding * 2 : 0;
3430
+ const f = fn[a], p = e ? f.width - f.thumb - f.padding * 2 : 0;
3412
3431
  return /* @__PURE__ */ t(
3413
3432
  "button",
3414
3433
  {
@@ -3442,11 +3461,11 @@ function Kn({
3442
3461
  }
3443
3462
  );
3444
3463
  }
3445
- const Et = [
3464
+ const Ot = [
3446
3465
  ".sidebar-scroll",
3447
3466
  "[data-overlay-scroll='true']"
3448
3467
  ].join(",");
3449
- function on(e) {
3468
+ function pn(e) {
3450
3469
  if (!(e instanceof HTMLElement) || e.dataset.overlayScroll === "false" || e.closest("[data-overlayscrollbars]") || e.matches("textarea,input,select,[contenteditable='true']"))
3451
3470
  return !1;
3452
3471
  const r = window.getComputedStyle(e);
@@ -3456,33 +3475,33 @@ function on(e) {
3456
3475
  r.overflowY
3457
3476
  ].join(" ").match(/auto|scroll/) || e.clientWidth === 0 && e.clientHeight === 0);
3458
3477
  }
3459
- function Ut(e) {
3478
+ function Gt(e) {
3460
3479
  return e.classList.contains("sidebar-scroll");
3461
3480
  }
3462
- function Mt(e) {
3463
- Ut(e) && e.querySelectorAll(".os-scrollbar-horizontal").forEach((r) => {
3481
+ function Bt(e) {
3482
+ Gt(e) && e.querySelectorAll(".os-scrollbar-horizontal").forEach((r) => {
3464
3483
  r.style.display = "none", r.style.height = "0", r.style.pointerEvents = "none";
3465
3484
  });
3466
3485
  }
3467
- function sn() {
3486
+ function hn() {
3468
3487
  return _(() => {
3469
3488
  const e = /* @__PURE__ */ new WeakMap();
3470
3489
  let r = 0;
3471
3490
  const n = () => {
3472
- r = 0, document.querySelectorAll(Et).forEach((u) => {
3473
- if (!on(u)) return;
3474
- if (vt(u)) {
3475
- Mt(u);
3491
+ r = 0, document.querySelectorAll(Ot).forEach((u) => {
3492
+ if (!pn(u)) return;
3493
+ if (yt(u)) {
3494
+ Bt(u);
3476
3495
  return;
3477
3496
  }
3478
- const p = vt(u, {
3479
- overflow: Ut(u) ? { x: "hidden", y: "scroll" } : void 0,
3497
+ const p = yt(u, {
3498
+ overflow: Gt(u) ? { x: "hidden", y: "scroll" } : void 0,
3480
3499
  scrollbars: {
3481
3500
  autoHide: "leave",
3482
3501
  autoHideDelay: 180
3483
3502
  }
3484
3503
  });
3485
- Mt(u), e.set(u, p);
3504
+ Bt(u), e.set(u, p);
3486
3505
  });
3487
3506
  }, a = () => {
3488
3507
  r || (r = window.requestAnimationFrame(n));
@@ -3495,20 +3514,20 @@ function sn() {
3495
3514
  attributes: !0,
3496
3515
  attributeFilter: ["class", "data-overlay-scroll"]
3497
3516
  }), window.addEventListener("resize", a), () => {
3498
- r && window.cancelAnimationFrame(r), s.disconnect(), window.removeEventListener("resize", a), document.querySelectorAll(Et).forEach((u) => {
3517
+ r && window.cancelAnimationFrame(r), s.disconnect(), window.removeEventListener("resize", a), document.querySelectorAll(Ot).forEach((u) => {
3499
3518
  var f;
3500
3519
  u instanceof HTMLElement && ((f = e.get(u)) == null || f.destroy());
3501
3520
  });
3502
3521
  };
3503
3522
  }, []), null;
3504
3523
  }
3505
- const ln = {
3524
+ const bn = {
3506
3525
  xs: { wh: "w-5 h-5", text: "text-[8px]" },
3507
3526
  sm: { wh: "w-7 h-7", text: "text-[11px]" },
3508
3527
  md: { wh: "w-9 h-9", text: "text-sm" },
3509
3528
  lg: { wh: "w-12 h-12", text: "text-base" },
3510
3529
  xl: { wh: "w-16 h-16", text: "text-xl" }
3511
- }, Bt = [
3530
+ }, Tt = [
3512
3531
  "bg-indigo-500",
3513
3532
  "bg-blue-500",
3514
3533
  "bg-emerald-500",
@@ -3517,30 +3536,30 @@ const ln = {
3517
3536
  "bg-teal-500",
3518
3537
  "bg-rose-500",
3519
3538
  "bg-cyan-500"
3520
- ], cn = {
3539
+ ], xn = {
3521
3540
  xs: "text-xs",
3522
3541
  sm: "text-sm",
3523
3542
  md: "text-base",
3524
3543
  lg: "text-lg"
3525
- }, dn = "bonsaif.bot", un = "Bonsaif Bot", mn = {
3544
+ }, vn = "bonsaif.bot", gn = "Bonsaif Bot", yn = {
3526
3545
  xs: "p-0.5",
3527
3546
  sm: "p-1",
3528
3547
  md: "p-1.5",
3529
3548
  lg: "p-2",
3530
3549
  xl: "p-2.5"
3531
3550
  };
3532
- function Ot(e) {
3551
+ function Lt(e) {
3533
3552
  return typeof e == "string" ? e.trim() : "";
3534
3553
  }
3535
- function fn(e) {
3554
+ function wn(e) {
3536
3555
  let r = 0;
3537
3556
  for (const n of e) r = r * 31 + n.charCodeAt(0) & 65535;
3538
- return Bt[r % Bt.length];
3557
+ return Tt[r % Tt.length];
3539
3558
  }
3540
- function pn(e, r) {
3541
- return e === dn || r === un;
3559
+ function Nn(e, r) {
3560
+ return e === vn || r === gn;
3542
3561
  }
3543
- function hn({
3562
+ function kn({
3544
3563
  userId: e,
3545
3564
  username: r,
3546
3565
  name: n,
@@ -3552,56 +3571,56 @@ function hn({
3552
3571
  wrapperClassName: d = "",
3553
3572
  labelClassName: h = "",
3554
3573
  labelSize: N = "xs",
3555
- avatarVersion: k = 0,
3556
- className: v = "",
3574
+ avatarVersion: S = 0,
3575
+ className: b = "",
3557
3576
  style: m
3558
3577
  }) {
3559
- var H;
3560
- const [g, c] = T(!1), y = typeof e == "string" && e.trim() && e !== "undefined" && e !== "null" ? e.trim() : "";
3578
+ var W;
3579
+ const [v, c] = D(!1), y = typeof e == "string" && e.trim() && e !== "undefined" && e !== "null" ? e.trim() : "";
3561
3580
  _(() => {
3562
3581
  c(!1);
3563
- }, [y, k]);
3564
- const { wh: L, text: W } = ln[a], z = Ot(n) || Ot(r) || p, $ = z.trim()[0] || "?", D = typeof process < "u" && ((H = process.env) == null ? void 0 : H.NEXT_PUBLIC_BASE_PATH) || "", B = pn(r, n), M = y ? `${D}/api/user/avatar/${y}${k ? `?v=${k}` : ""}` : "", E = {
3582
+ }, [y, S]);
3583
+ const { wh: B, text: R } = bn[a], A = Lt(n) || Lt(r) || p, C = A.trim()[0] || "?", L = typeof process < "u" && ((W = process.env) == null ? void 0 : W.NEXT_PUBLIC_BASE_PATH) || "", M = Nn(r, n), $ = y ? `${L}/api/user/avatar/${y}${S ? `?v=${S}` : ""}` : "", O = {
3565
3584
  xs: 20,
3566
3585
  sm: 28,
3567
3586
  md: 36,
3568
3587
  lg: 48,
3569
3588
  xl: 64
3570
- }[a], O = B ? /* @__PURE__ */ t(
3589
+ }[a], T = M ? /* @__PURE__ */ t(
3571
3590
  "span",
3572
3591
  {
3573
- className: `${L} ${mn[a]} rounded-full flex items-center justify-center bg-[#071f1a] ring-1 ring-emerald-400/35 shadow-[0_0_0_1px_rgba(255,255,255,0.06)] flex-shrink-0 ${v}`,
3592
+ className: `${B} ${yn[a]} rounded-full flex items-center justify-center bg-[#071f1a] ring-1 ring-emerald-400/35 shadow-[0_0_0_1px_rgba(255,255,255,0.06)] flex-shrink-0 ${b}`,
3574
3593
  style: m,
3575
3594
  children: /* @__PURE__ */ t(
3576
3595
  "img",
3577
3596
  {
3578
- src: `${D}/favicon.svg`,
3579
- alt: z,
3580
- width: E,
3581
- height: E,
3597
+ src: `${L}/favicon.svg`,
3598
+ alt: A,
3599
+ width: O,
3600
+ height: O,
3582
3601
  className: "h-full w-full object-contain"
3583
3602
  }
3584
3603
  )
3585
3604
  }
3586
- ) : M && !g ? /* @__PURE__ */ t(
3605
+ ) : $ && !v ? /* @__PURE__ */ t(
3587
3606
  "img",
3588
3607
  {
3589
- src: M,
3590
- alt: z,
3591
- width: E,
3592
- height: E,
3593
- className: `${L} rounded-full object-cover flex-shrink-0 ${v}`,
3608
+ src: $,
3609
+ alt: A,
3610
+ width: O,
3611
+ height: O,
3612
+ className: `${B} rounded-full object-cover flex-shrink-0 ${b}`,
3594
3613
  style: m,
3595
3614
  onError: () => c(!0)
3596
3615
  },
3597
- `${y}-${k}`
3616
+ `${y}-${S}`
3598
3617
  ) : /* @__PURE__ */ t(
3599
3618
  "span",
3600
3619
  {
3601
- className: `${L} ${fn(z)} ${W} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${v}`,
3620
+ className: `${B} ${wn(A)} ${R} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${b}`,
3602
3621
  style: m,
3603
- title: z,
3604
- children: $
3622
+ title: A,
3623
+ children: C
3605
3624
  }
3606
3625
  );
3607
3626
  if (s)
@@ -3610,39 +3629,39 @@ function hn({
3610
3629
  {
3611
3630
  className: `inline-flex min-w-0 items-center gap-2 ${d}`,
3612
3631
  children: [
3613
- O,
3632
+ T,
3614
3633
  /* @__PURE__ */ t(
3615
3634
  "span",
3616
3635
  {
3617
- className: `min-w-0 truncate ${cn[N]} font-medium text-[var(--text-main)] ${h}`,
3618
- title: z,
3619
- children: z
3636
+ className: `min-w-0 truncate ${xn[N]} font-medium text-[var(--text-main)] ${h}`,
3637
+ title: A,
3638
+ children: A
3620
3639
  }
3621
3640
  )
3622
3641
  ]
3623
3642
  }
3624
3643
  );
3625
- const P = u ?? !0, Z = f ?? z;
3626
- return P && Z ? /* @__PURE__ */ t(
3627
- Rt,
3644
+ const P = u ?? !0, J = f ?? A;
3645
+ return P && J ? /* @__PURE__ */ t(
3646
+ ut,
3628
3647
  {
3629
3648
  as: "span",
3630
- content: Z,
3649
+ content: J,
3631
3650
  className: `inline-flex flex-shrink-0 ${d}`,
3632
- children: O
3651
+ children: T
3633
3652
  }
3634
- ) : O;
3653
+ ) : T;
3635
3654
  }
3636
- function bn({ href: e, className: r, children: n }) {
3655
+ function Sn({ href: e, className: r, children: n }) {
3637
3656
  return /* @__PURE__ */ t("a", { href: e, className: r, children: n });
3638
3657
  }
3639
- function xn(e) {
3658
+ function Cn(e) {
3640
3659
  return e.reduce((r, n) => {
3641
3660
  const a = n.section ?? "Principal";
3642
3661
  return r[a] = [...r[a] ?? [], n], r;
3643
3662
  }, {});
3644
3663
  }
3645
- function vn({
3664
+ function $n({
3646
3665
  children: e,
3647
3666
  navItems: r = [],
3648
3667
  currentPath: n = typeof window > "u" ? "/" : window.location.pathname,
@@ -3652,19 +3671,19 @@ function vn({
3652
3671
  header: f,
3653
3672
  footer: p,
3654
3673
  onLogout: d,
3655
- LinkComponent: h = bn
3674
+ LinkComponent: h = Sn
3656
3675
  }) {
3657
- const [N, k] = T(!1), v = xn(r);
3676
+ const [N, S] = D(!1), b = Cn(r);
3658
3677
  return /* @__PURE__ */ i("div", { className: "min-h-screen bg-[var(--bg-main)] text-[var(--text-main)]", children: [
3659
- /* @__PURE__ */ t(sn, {}),
3678
+ /* @__PURE__ */ t(hn, {}),
3660
3679
  /* @__PURE__ */ t(
3661
3680
  "button",
3662
3681
  {
3663
3682
  type: "button",
3664
3683
  "aria-label": "Abrir navegación",
3665
3684
  className: "fixed left-3 top-3 z-50 inline-flex h-9 w-9 items-center justify-center rounded-md border border-white/10 bg-black/70 text-white lg:hidden",
3666
- onClick: () => k(!0),
3667
- children: /* @__PURE__ */ t(ar, { className: "h-5 w-5" })
3685
+ onClick: () => S(!0),
3686
+ children: /* @__PURE__ */ t(dr, { className: "h-5 w-5" })
3668
3687
  }
3669
3688
  ),
3670
3689
  N && /* @__PURE__ */ t(
@@ -3673,7 +3692,7 @@ function vn({
3673
3692
  type: "button",
3674
3693
  "aria-label": "Cerrar navegación",
3675
3694
  className: "fixed inset-0 z-40 bg-black/45 lg:hidden",
3676
- onClick: () => k(!1)
3695
+ onClick: () => S(!1)
3677
3696
  }
3678
3697
  ),
3679
3698
  /* @__PURE__ */ i(
@@ -3690,7 +3709,7 @@ function vn({
3690
3709
  type: "button",
3691
3710
  "aria-label": "Cerrar navegación",
3692
3711
  className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-white/70 hover:bg-white/10 lg:hidden",
3693
- onClick: () => k(!1),
3712
+ onClick: () => S(!1),
3694
3713
  children: /* @__PURE__ */ t(Ee, { className: "h-5 w-5" })
3695
3714
  }
3696
3715
  )
@@ -3700,12 +3719,12 @@ function vn({
3700
3719
  {
3701
3720
  className: "sidebar-scroll min-h-0 flex-1 overflow-y-auto px-3 py-4",
3702
3721
  "data-overlay-scroll": "true",
3703
- children: Object.entries(v).map(([m, g]) => /* @__PURE__ */ i("div", { className: "mb-5", children: [
3722
+ children: Object.entries(b).map(([m, v]) => /* @__PURE__ */ i("div", { className: "mb-5", children: [
3704
3723
  /* @__PURE__ */ i("div", { className: "mb-2 flex items-center gap-2 px-2 text-[11px] font-semibold uppercase tracking-wide text-white/35", children: [
3705
3724
  /* @__PURE__ */ t(_e, { className: "h-3.5 w-3.5" }),
3706
3725
  m
3707
3726
  ] }),
3708
- /* @__PURE__ */ t("div", { className: "space-y-1", children: g.map((c) => {
3727
+ /* @__PURE__ */ t("div", { className: "space-y-1", children: v.map((c) => {
3709
3728
  const y = n === c.href || n.startsWith(`${c.href}/`);
3710
3729
  return /* @__PURE__ */ i(
3711
3730
  h,
@@ -3726,7 +3745,7 @@ function vn({
3726
3745
  /* @__PURE__ */ i("div", { className: "border-t border-white/10 p-3", children: [
3727
3746
  a && /* @__PURE__ */ i("div", { className: "mb-3 flex min-w-0 items-center gap-3 rounded-lg bg-white/[0.04] p-2", children: [
3728
3747
  /* @__PURE__ */ t(
3729
- hn,
3748
+ kn,
3730
3749
  {
3731
3750
  name: a.initials ?? a.name ?? a.email ?? "Usuario",
3732
3751
  size: "md"
@@ -3744,7 +3763,7 @@ function vn({
3744
3763
  className: "w-full justify-start text-white hover:bg-white/10",
3745
3764
  onClick: d,
3746
3765
  children: [
3747
- /* @__PURE__ */ t(ir, { className: "h-4 w-4" }),
3766
+ /* @__PURE__ */ t(ur, { className: "h-4 w-4" }),
3748
3767
  " Salir"
3749
3768
  ]
3750
3769
  }
@@ -3760,7 +3779,7 @@ function vn({
3760
3779
  ] })
3761
3780
  ] });
3762
3781
  }
3763
- const gn = {
3782
+ const En = {
3764
3783
  dashboard: "Dashboard",
3765
3784
  tickets: "Tickets",
3766
3785
  teams: "Equipos",
@@ -3784,29 +3803,29 @@ const gn = {
3784
3803
  "security-incidents": "Incidentes",
3785
3804
  "guard-schedule": "Guardias"
3786
3805
  }, it = {
3787
- dashboard: /* @__PURE__ */ t(hr, { className: "h-5 w-5" }),
3788
- tickets: /* @__PURE__ */ t(pr, { className: "h-5 w-5" }),
3789
- teams: /* @__PURE__ */ t(xt, { className: "h-5 w-5" }),
3790
- projects: /* @__PURE__ */ t(fr, { className: "h-5 w-5" }),
3791
- clients: /* @__PURE__ */ t(mr, { className: "h-5 w-5" }),
3792
- surveys: /* @__PURE__ */ t(ur, { className: "h-5 w-5" }),
3793
- profile: /* @__PURE__ */ t(dr, { className: "h-5 w-5" }),
3794
- settings: /* @__PURE__ */ t(bt, { className: "h-5 w-5" }),
3795
- notifications: /* @__PURE__ */ t(cr, { className: "h-5 w-5" }),
3796
- changelog: /* @__PURE__ */ t(lr, { className: "h-5 w-5" }),
3806
+ dashboard: /* @__PURE__ */ t(wr, { className: "h-5 w-5" }),
3807
+ tickets: /* @__PURE__ */ t(yr, { className: "h-5 w-5" }),
3808
+ teams: /* @__PURE__ */ t(gt, { className: "h-5 w-5" }),
3809
+ projects: /* @__PURE__ */ t(gr, { className: "h-5 w-5" }),
3810
+ clients: /* @__PURE__ */ t(vr, { className: "h-5 w-5" }),
3811
+ surveys: /* @__PURE__ */ t(xr, { className: "h-5 w-5" }),
3812
+ profile: /* @__PURE__ */ t(br, { className: "h-5 w-5" }),
3813
+ settings: /* @__PURE__ */ t(vt, { className: "h-5 w-5" }),
3814
+ notifications: /* @__PURE__ */ t(hr, { className: "h-5 w-5" }),
3815
+ changelog: /* @__PURE__ */ t(pr, { className: "h-5 w-5" }),
3797
3816
  admin: /* @__PURE__ */ t(rt, { className: "h-5 w-5" }),
3798
- users: /* @__PURE__ */ t(xt, { className: "h-5 w-5" }),
3817
+ users: /* @__PURE__ */ t(gt, { className: "h-5 w-5" }),
3799
3818
  roles: /* @__PURE__ */ t(rt, { className: "h-5 w-5" }),
3800
- menus: /* @__PURE__ */ t(bt, { className: "h-5 w-5" }),
3819
+ menus: /* @__PURE__ */ t(vt, { className: "h-5 w-5" }),
3801
3820
  guards: /* @__PURE__ */ t(lt, { className: "h-5 w-5" }),
3802
3821
  vacations: /* @__PURE__ */ t(lt, { className: "h-5 w-5" }),
3803
- audit: /* @__PURE__ */ t(ht, { className: "h-5 w-5" }),
3804
- positions: /* @__PURE__ */ t(sr, { className: "h-5 w-5" }),
3805
- ranks: /* @__PURE__ */ t(ht, { className: "h-5 w-5" }),
3806
- "email-inbox": /* @__PURE__ */ t(or, { className: "h-5 w-5" }),
3822
+ audit: /* @__PURE__ */ t(xt, { className: "h-5 w-5" }),
3823
+ positions: /* @__PURE__ */ t(fr, { className: "h-5 w-5" }),
3824
+ ranks: /* @__PURE__ */ t(xt, { className: "h-5 w-5" }),
3825
+ "email-inbox": /* @__PURE__ */ t(mr, { className: "h-5 w-5" }),
3807
3826
  "security-incidents": /* @__PURE__ */ t(rt, { className: "h-5 w-5" })
3808
3827
  };
3809
- function yn({
3828
+ function Mn({
3810
3829
  href: e,
3811
3830
  className: r,
3812
3831
  style: n,
@@ -3814,17 +3833,17 @@ function yn({
3814
3833
  }) {
3815
3834
  return /* @__PURE__ */ t("a", { href: e, className: r, style: n, children: a });
3816
3835
  }
3817
- function wn(e) {
3836
+ function On(e) {
3818
3837
  return e.split("-").map((r) => r.charAt(0).toUpperCase() + r.slice(1)).join(" ");
3819
3838
  }
3820
- function Nn(e) {
3839
+ function Bn(e) {
3821
3840
  return /^\d+$/.test(e) || /^[a-f0-9]{8,}$/i.test(e);
3822
3841
  }
3823
- function kn(e) {
3842
+ function Tn(e) {
3824
3843
  const r = e.split("/").filter(Boolean);
3825
3844
  if (r.length === 0 || r.length === 1 && r[0] === "dashboard")
3826
3845
  return [];
3827
- const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, s = Nn(n) && a ? a : n, u = gn[s] ?? wn(s);
3846
+ const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, s = Bn(n) && a ? a : n, u = En[s] ?? On(s);
3828
3847
  return [{ label: "Inicio", href: "/" }, { label: u }];
3829
3848
  }
3830
3849
  function ot(e) {
@@ -3832,14 +3851,14 @@ function ot(e) {
3832
3851
  ":scope > [data-overlayscrollbars-viewport]"
3833
3852
  ));
3834
3853
  }
3835
- function Sn(e) {
3854
+ function Ln(e) {
3836
3855
  const r = e.split("/").filter(Boolean), n = r[r.length - 1];
3837
3856
  if (!n) return /* @__PURE__ */ t(Xe, { className: "h-5 w-5" });
3838
3857
  if (it[n]) return it[n];
3839
3858
  const a = r.length > 1 ? r[r.length - 2] : "";
3840
3859
  return it[a] ?? /* @__PURE__ */ t(Xe, { className: "h-5 w-5" });
3841
3860
  }
3842
- function Qn({
3861
+ function sa({
3843
3862
  title: e,
3844
3863
  subtitle: r,
3845
3864
  action: n,
@@ -3851,42 +3870,42 @@ function Qn({
3851
3870
  currentPath: d = typeof window > "u" ? "/" : window.location.pathname,
3852
3871
  showBreadcrumbs: h = !0,
3853
3872
  contained: N = !1,
3854
- LinkComponent: k = yn
3873
+ LinkComponent: S = Mn
3855
3874
  }) {
3856
- const v = re(null), [m, g] = T(!1), [c, y] = T(null), L = p ?? kn(d), W = s ?? Sn(d), z = h && L.length > 1;
3875
+ const b = re(null), [m, v] = D(!1), [c, y] = D(null), B = p ?? Tn(d), R = s ?? Ln(d), A = h && B.length > 1;
3857
3876
  return _(() => {
3858
3877
  if (N) {
3859
- g(!1);
3878
+ v(!1);
3860
3879
  return;
3861
3880
  }
3862
- let $ = null, D = 0, B = 0;
3863
- const M = () => {
3864
- const O = v.current, P = document.querySelector(
3881
+ let C = null, L = 0, M = 0;
3882
+ const $ = () => {
3883
+ const T = b.current, P = document.querySelector(
3865
3884
  "[data-app-scroll='true']"
3866
3885
  );
3867
- return (O == null ? void 0 : O.closest(".os-viewport")) ?? (O == null ? void 0 : O.closest(
3886
+ return (T == null ? void 0 : T.closest(".os-viewport")) ?? (T == null ? void 0 : T.closest(
3868
3887
  "[data-overlayscrollbars-viewport]"
3869
3888
  )) ?? ot(P) ?? P ?? window;
3870
- }, R = () => {
3871
- const O = $ && $ !== window ? $.scrollTop : window.scrollY;
3872
- g((P) => P ? O > 24 : O > 72);
3873
- }, E = () => {
3874
- $ == null || $.removeEventListener("scroll", R), $ = M(), $.addEventListener("scroll", R, { passive: !0 }), R();
3889
+ }, H = () => {
3890
+ const T = C && C !== window ? C.scrollTop : window.scrollY;
3891
+ v((P) => P ? T > 24 : T > 72);
3892
+ }, O = () => {
3893
+ C == null || C.removeEventListener("scroll", H), C = $(), C.addEventListener("scroll", H, { passive: !0 }), H();
3875
3894
  };
3876
- return E(), D = window.requestAnimationFrame(E), B = window.setTimeout(E, 120), () => {
3877
- window.cancelAnimationFrame(D), window.clearTimeout(B), $ == null || $.removeEventListener("scroll", R);
3895
+ return O(), L = window.requestAnimationFrame(O), M = window.setTimeout(O, 120), () => {
3896
+ window.cancelAnimationFrame(L), window.clearTimeout(M), C == null || C.removeEventListener("scroll", H);
3878
3897
  };
3879
3898
  }, [N]), _(() => {
3880
3899
  if (N) {
3881
3900
  y(null);
3882
3901
  return;
3883
3902
  }
3884
- let $ = 0;
3885
- const D = [], B = () => {
3886
- const H = v.current, F = H == null ? void 0 : H.parentElement, V = document.querySelector(
3903
+ let C = 0;
3904
+ const L = [], M = () => {
3905
+ const W = b.current, F = W == null ? void 0 : W.parentElement, V = document.querySelector(
3887
3906
  "[data-app-scroll='true']"
3888
3907
  ), Q = ot(V) ?? V;
3889
- if (!H || !F || !Q) {
3908
+ if (!W || !F || !Q) {
3890
3909
  y(null);
3891
3910
  return;
3892
3911
  }
@@ -3897,25 +3916,25 @@ function Qn({
3897
3916
  y(
3898
3917
  (ce) => ce && ce.marginLeft === te.marginLeft && ce.width === te.width ? ce : te
3899
3918
  );
3900
- }, M = () => {
3901
- window.cancelAnimationFrame($), $ = window.requestAnimationFrame(B);
3919
+ }, $ = () => {
3920
+ window.cancelAnimationFrame(C), C = window.requestAnimationFrame(M);
3902
3921
  };
3903
- M(), window.addEventListener("resize", M);
3904
- const R = new ResizeObserver(M), E = v.current, O = E == null ? void 0 : E.parentElement, P = document.querySelector(
3922
+ $(), window.addEventListener("resize", $);
3923
+ const H = new ResizeObserver($), O = b.current, T = O == null ? void 0 : O.parentElement, P = document.querySelector(
3905
3924
  "[data-app-scroll='true']"
3906
- ), Z = ot(P) ?? P;
3907
- return [O, P, Z].forEach((H) => {
3908
- H && R.observe(H);
3909
- }), D.push(window.setTimeout(M, 120)), D.push(window.setTimeout(M, 280)), () => {
3910
- window.cancelAnimationFrame($), window.removeEventListener("resize", M), R.disconnect(), D.forEach((H) => window.clearTimeout(H));
3925
+ ), J = ot(P) ?? P;
3926
+ return [T, P, J].forEach((W) => {
3927
+ W && H.observe(W);
3928
+ }), L.push(window.setTimeout($, 120)), L.push(window.setTimeout($, 280)), () => {
3929
+ window.cancelAnimationFrame(C), window.removeEventListener("resize", $), H.disconnect(), L.forEach((W) => window.clearTimeout(W));
3911
3930
  };
3912
3931
  }, [N]), /* @__PURE__ */ t(
3913
3932
  "div",
3914
3933
  {
3915
- ref: v,
3934
+ ref: b,
3916
3935
  "data-page-header": "true",
3917
3936
  "data-compact": m ? "true" : "false",
3918
- className: `sticky top-0 z-30 overflow-visible py-0 transition-[background-color,box-shadow,border-color] duration-300 ease-out ${N ? "mb-0 flex-shrink-0" : "mb-6 sm:mb-1"} ${u}`,
3937
+ className: `sticky top-0 z-30 overflow-visible py-0 transition-[background-color,box-shadow,border-color] duration-300 ease-out ${N ? "mb-0 flex-shrink-0" : "mb-4 sm:mb-0"} ${u}`,
3919
3938
  style: {
3920
3939
  ...c ? { marginLeft: c.marginLeft, width: c.width } : null,
3921
3940
  background: N ? "var(--bg-card)" : m ? "var(--bg-main)" : "color-mix(in srgb, var(--bg-main) 44%, transparent)",
@@ -3927,14 +3946,14 @@ function Qn({
3927
3946
  children: /* @__PURE__ */ i(
3928
3947
  "div",
3929
3948
  {
3930
- className: `flex flex-wrap items-center justify-between px-4 pt-0.5 transition-[gap,min-height,padding] duration-300 ease-out ${m ? "min-h-10 gap-2 sm:min-h-11 sm:gap-3" : "min-h-11 gap-3 sm:min-h-12 sm:gap-4"} ${f}`,
3949
+ className: `flex flex-wrap items-center justify-between px-4 pt-0.5 transition-[gap,min-height,padding] duration-300 ease-out ${m ? "min-h-9 gap-2 sm:min-h-10 sm:gap-2.5" : "min-h-10 gap-2.5 sm:min-h-11 sm:gap-3"} ${f}`,
3931
3950
  children: [
3932
3951
  /* @__PURE__ */ i(
3933
3952
  "div",
3934
3953
  {
3935
3954
  className: `min-w-0 flex flex-1 flex-col justify-center transition-[gap,transform] duration-300 ease-out ${m ? "gap-1" : "gap-1.5 sm:gap-2"}`,
3936
3955
  children: [
3937
- z && /* @__PURE__ */ t(
3956
+ A && /* @__PURE__ */ t(
3938
3957
  "nav",
3939
3958
  {
3940
3959
  "aria-label": "Breadcrumb",
@@ -3942,43 +3961,43 @@ function Qn({
3942
3961
  children: /* @__PURE__ */ t(
3943
3962
  "ol",
3944
3963
  {
3945
- className: `flex flex-wrap items-center gap-1.5 leading-none transition-[font-size,line-height] duration-300 ease-out ${m ? "text-[10px] sm:text-[11px]" : "text-[11px] sm:text-xs"}`,
3946
- children: L.map(($, D) => {
3947
- const B = D === L.length - 1;
3964
+ className: `flex flex-wrap items-center gap-1.5 leading-none transition-[font-size,line-height] duration-300 ease-out ${m ? "text-[10px]" : "text-[10px] sm:text-[11px]"}`,
3965
+ children: B.map((C, L) => {
3966
+ const M = L === B.length - 1;
3948
3967
  return /* @__PURE__ */ i(
3949
3968
  "li",
3950
3969
  {
3951
3970
  className: "flex min-w-0 items-center gap-1.5",
3952
3971
  children: [
3953
- D > 0 && /* @__PURE__ */ t(
3972
+ L > 0 && /* @__PURE__ */ t(
3954
3973
  Te,
3955
3974
  {
3956
3975
  className: "h-3.5 w-3.5 transition-[color,transform] duration-300 ease-out",
3957
3976
  style: { color: "var(--text-muted)" }
3958
3977
  }
3959
3978
  ),
3960
- $.href && !B ? /* @__PURE__ */ t(
3961
- k,
3979
+ C.href && !M ? /* @__PURE__ */ t(
3980
+ S,
3962
3981
  {
3963
- href: $.href,
3982
+ href: C.href,
3964
3983
  className: "truncate transition-colors duration-300 hover:underline",
3965
3984
  style: { color: "var(--text-muted)" },
3966
- children: $.label
3985
+ children: C.label
3967
3986
  }
3968
3987
  ) : /* @__PURE__ */ t(
3969
3988
  "span",
3970
3989
  {
3971
- "aria-current": B ? "page" : void 0,
3972
- className: B ? "truncate font-semibold" : "truncate",
3990
+ "aria-current": M ? "page" : void 0,
3991
+ className: M ? "truncate font-semibold" : "truncate",
3973
3992
  style: {
3974
- color: B ? "var(--text-main)" : "var(--text-muted)"
3993
+ color: M ? "var(--text-main)" : "var(--text-muted)"
3975
3994
  },
3976
- children: $.label
3995
+ children: C.label
3977
3996
  }
3978
3997
  )
3979
3998
  ]
3980
3999
  },
3981
- `${$.label}-${D}`
4000
+ `${C.label}-${L}`
3982
4001
  );
3983
4002
  })
3984
4003
  }
@@ -3993,11 +4012,11 @@ function Qn({
3993
4012
  /* @__PURE__ */ t(
3994
4013
  "span",
3995
4014
  {
3996
- className: `flex-shrink-0 transition-[color,transform,opacity] duration-300 ease-out ${m ? "scale-90 opacity-80" : "scale-100 opacity-100"}`,
4015
+ className: `flex-shrink-0 transition-[color,transform,opacity] duration-300 ease-out ${m ? "scale-75 opacity-80" : "scale-90 opacity-100"}`,
3997
4016
  style: {
3998
- color: z ? "var(--text-secondary)" : "var(--text-muted)"
4017
+ color: A ? "var(--text-secondary)" : "var(--text-muted)"
3999
4018
  },
4000
- children: W
4019
+ children: R
4001
4020
  }
4002
4021
  ),
4003
4022
  /* @__PURE__ */ i(
@@ -4009,7 +4028,7 @@ function Qn({
4009
4028
  /* @__PURE__ */ t(
4010
4029
  "h1",
4011
4030
  {
4012
- className: `truncate font-bold tracking-tight transition-[font-size,line-height,color] duration-300 ease-out ${m ? "text-lg sm:text-xl" : "text-xl sm:text-2xl"}`,
4031
+ className: `truncate font-bold tracking-tight transition-[font-size,line-height,color] duration-300 ease-out ${m ? "text-base sm:text-lg" : "text-lg sm:text-xl"}`,
4013
4032
  style: { color: "var(--text-main)" },
4014
4033
  children: e
4015
4034
  }
@@ -4018,7 +4037,7 @@ function Qn({
4018
4037
  "p",
4019
4038
  {
4020
4039
  "aria-hidden": m,
4021
- className: `overflow-hidden text-sm transition-[max-height,opacity,transform,margin] duration-300 ease-out ${m ? "mt-0 max-h-0 -translate-y-1 opacity-0" : "mt-0.5 max-h-6 translate-y-0 opacity-100 sm:mt-1"}`,
4040
+ className: `overflow-hidden text-xs transition-[max-height,opacity,transform,margin] duration-300 ease-out ${m ? "mt-0 max-h-0 -translate-y-1 opacity-0" : "mt-0.5 max-h-5 translate-y-0 opacity-100"}`,
4022
4041
  style: { color: "var(--text-muted)" },
4023
4042
  children: r
4024
4043
  }
@@ -4043,8 +4062,8 @@ function Qn({
4043
4062
  n && /* @__PURE__ */ t(
4044
4063
  "div",
4045
4064
  {
4046
- className: `page-header-actions flex flex-shrink-0 items-center self-center overflow-visible transition-[gap,min-height,opacity,transform] duration-300 ease-out ${m ? "min-h-10 gap-1.5 opacity-95" : "min-h-11 gap-2 opacity-100"}`,
4047
- children: n
4065
+ className: `page-header-actions flex flex-shrink-0 items-center self-center overflow-visible transition-[gap,min-height,opacity,transform] duration-300 ease-out ${m ? "min-h-8 gap-1 opacity-95" : "min-h-9 gap-1.5 opacity-100"}`,
4066
+ children: /* @__PURE__ */ t(zt.Provider, { value: { compact: !0, iconOnly: !0 }, children: n })
4048
4067
  }
4049
4068
  )
4050
4069
  ]
@@ -4053,20 +4072,20 @@ function Qn({
4053
4072
  }
4054
4073
  );
4055
4074
  }
4056
- function ea({
4075
+ function la({
4057
4076
  children: e,
4058
4077
  currentPath: r = typeof window > "u" ? "/" : window.location.pathname,
4059
4078
  publicRoutes: n = ["/", "/login", "/reset-password"],
4060
4079
  ...a
4061
4080
  }) {
4062
- return n.includes(r) ? /* @__PURE__ */ t(we, { children: e }) : /* @__PURE__ */ t(vn, { currentPath: r, ...a, children: e });
4081
+ return n.includes(r) ? /* @__PURE__ */ t(we, { children: e }) : /* @__PURE__ */ t($n, { currentPath: r, ...a, children: e });
4063
4082
  }
4064
- function Tt() {
4083
+ function Dt() {
4065
4084
  if (typeof window > "u") return "system";
4066
4085
  const e = localStorage.getItem("theme");
4067
4086
  return e === "light" || e === "dark" ? e : e === "system" ? "system" : document.documentElement.classList.contains("dark") ? "dark" : "light";
4068
4087
  }
4069
- function Cn(e, r, n) {
4088
+ function Dn(e, r, n) {
4070
4089
  try {
4071
4090
  const a = new URL(e), s = a.searchParams.get("callbackUrl");
4072
4091
  if (s) {
@@ -4081,17 +4100,17 @@ function Cn(e, r, n) {
4081
4100
  return e;
4082
4101
  }
4083
4102
  }
4084
- function ta({
4103
+ function ca({
4085
4104
  name: e,
4086
4105
  src: r,
4087
4106
  projectKey: n
4088
4107
  }) {
4089
- const [a, s] = T(
4090
- () => Tt()
4108
+ const [a, s] = D(
4109
+ () => Dt()
4091
4110
  ), u = re(null);
4092
4111
  _(() => {
4093
4112
  const d = new MutationObserver(
4094
- () => s(Tt())
4113
+ () => s(Dt())
4095
4114
  );
4096
4115
  return d.observe(document.documentElement, {
4097
4116
  attributes: !0,
@@ -4099,7 +4118,7 @@ function ta({
4099
4118
  }), () => d.disconnect();
4100
4119
  }, []);
4101
4120
  const f = ze(
4102
- () => Cn(r, a, n),
4121
+ () => Dn(r, a, n),
4103
4122
  [n, r, a]
4104
4123
  ), p = ze(() => {
4105
4124
  try {
@@ -4112,9 +4131,9 @@ function ta({
4112
4131
  if (!n) return;
4113
4132
  const d = n;
4114
4133
  function h(N) {
4115
- var m, g, c;
4134
+ var m, v, c;
4116
4135
  if (N.source !== ((m = u.current) == null ? void 0 : m.contentWindow) || p && N.origin !== p) return;
4117
- if (((g = N.data) == null ? void 0 : g.type) === "prime-microservice:overlay") {
4136
+ if (((v = N.data) == null ? void 0 : v.type) === "prime-microservice:overlay") {
4118
4137
  window.dispatchEvent(
4119
4138
  new CustomEvent("prime-auth:microservice-overlay", {
4120
4139
  detail: { active: !!N.data.active }
@@ -4123,10 +4142,10 @@ function ta({
4123
4142
  return;
4124
4143
  }
4125
4144
  if (((c = N.data) == null ? void 0 : c.type) !== "prime-microservice:navigation") return;
4126
- const k = N.data.path;
4127
- if (!k || !k.startsWith("/") || k.startsWith("//")) return;
4128
- const v = `/apps/${encodeURIComponent(d)}${k}`;
4129
- `${window.location.pathname}${window.location.search}${window.location.hash}` !== v && (window.history.replaceState(window.history.state, "", v), window.dispatchEvent(
4145
+ const S = N.data.path;
4146
+ if (!S || !S.startsWith("/") || S.startsWith("//")) return;
4147
+ const b = `/apps/${encodeURIComponent(d)}${S}`;
4148
+ `${window.location.pathname}${window.location.search}${window.location.hash}` !== b && (window.history.replaceState(window.history.state, "", b), window.dispatchEvent(
4130
4149
  new CustomEvent("prime-auth:microservice-navigation")
4131
4150
  ));
4132
4151
  }
@@ -4150,8 +4169,8 @@ function ta({
4150
4169
  }
4151
4170
  ) });
4152
4171
  }
4153
- function ra() {
4154
- const [e, r] = T(""), [n, a] = T(!1), [s, u] = T({ width: 96, height: 96 });
4172
+ function da() {
4173
+ const [e, r] = D(""), [n, a] = D(!1), [s, u] = D({ width: 96, height: 96 });
4155
4174
  return _(() => {
4156
4175
  let f = !1;
4157
4176
  return fetch("/api/microservices/prime-suite/chat-url", { cache: "no-store" }).then((p) => p.ok ? p.json() : null).then((p) => {
@@ -4166,8 +4185,8 @@ function ra() {
4166
4185
  if (((h = p.data) == null ? void 0 : h.type) !== "prime-suite-chat:state") return;
4167
4186
  const d = !!p.data.active;
4168
4187
  a(d), u({
4169
- width: Lt(p.data.width, 96, 720),
4170
- height: Lt(p.data.height, 96, 560)
4188
+ width: At(p.data.width, 96, 720),
4189
+ height: At(p.data.height, 96, 560)
4171
4190
  });
4172
4191
  };
4173
4192
  return window.addEventListener("message", f), () => window.removeEventListener("message", f);
@@ -4188,11 +4207,11 @@ function ra() {
4188
4207
  }
4189
4208
  ) : null;
4190
4209
  }
4191
- function Lt(e, r, n) {
4210
+ function At(e, r, n) {
4192
4211
  const a = typeof e == "number" && Number.isFinite(e) ? e : r;
4193
4212
  return Math.max(r, Math.min(n, Math.ceil(a)));
4194
4213
  }
4195
- function $n(e) {
4214
+ function An(e) {
4196
4215
  const r = document.documentElement, n = new MutationObserver(e);
4197
4216
  n.observe(r, { attributes: !0, attributeFilter: ["class"] });
4198
4217
  const a = window.matchMedia("(prefers-color-scheme: dark)");
@@ -4200,50 +4219,50 @@ function $n(e) {
4200
4219
  n.disconnect(), a.removeEventListener("change", e);
4201
4220
  };
4202
4221
  }
4203
- function En() {
4222
+ function In() {
4204
4223
  const e = localStorage.getItem("theme") || "system", r = window.matchMedia("(prefers-color-scheme: dark)").matches;
4205
4224
  return document.documentElement.classList.contains("dark") || e === "dark" || e === "system" && r ? "dark" : "light";
4206
4225
  }
4207
- function Mn() {
4226
+ function Pn() {
4208
4227
  return "light";
4209
4228
  }
4210
- function na() {
4211
- const e = Zt(
4212
- $n,
4213
- En,
4214
- Mn
4229
+ function ua() {
4230
+ const e = nr(
4231
+ An,
4232
+ In,
4233
+ Pn
4215
4234
  );
4216
- return /* @__PURE__ */ t(yr, { position: "bottom-center", theme: e, richColors: !0, closeButton: !0 });
4235
+ return /* @__PURE__ */ t($r, { position: "bottom-center", theme: e, richColors: !0, closeButton: !0 });
4217
4236
  }
4218
4237
  export {
4219
- vn as AuthShell,
4220
- Rn as BonsaifButton,
4238
+ $n as AuthShell,
4239
+ Xn as BonsaifButton,
4221
4240
  xe as Button,
4222
- Wn as CalendarPicker,
4223
- Un as CompactFilterSelect,
4224
- Fn as CompactSearchInput,
4225
- Yn as ConfirmDialog,
4226
- Wr as CopyButton,
4227
- qn as CopyLinkButton,
4228
- Gn as DataTable,
4229
- Xn as DateRangePicker,
4230
- Vn as Drawer,
4231
- Hn as DynamicDetailTabs,
4232
- sn as GlobalScrollbars,
4233
- Jn as InputField,
4234
- Er as LoadingState,
4235
- ta as MicroserviceFrame,
4236
- jr as Modal,
4237
- Rt as MouseTooltip,
4238
- Qn as PageHeader,
4239
- Nr as PageSearchInput,
4240
- ea as PrimeAuthRouteShell,
4241
- na as PrimeAuthToaster,
4242
- ra as PrimeSuiteChatFrame,
4243
- jt as SearchableSelect,
4244
- Zn as StepWizard,
4241
+ Zn as CalendarPicker,
4242
+ Kn as CompactFilterSelect,
4243
+ Jn as CompactSearchInput,
4244
+ Qn as ConfirmDialog,
4245
+ Jr as CopyButton,
4246
+ ea as CopyLinkButton,
4247
+ ta as DataTable,
4248
+ ra as DateRangePicker,
4249
+ na as Drawer,
4250
+ Vn as DynamicDetailTabs,
4251
+ hn as GlobalScrollbars,
4252
+ aa as InputField,
4253
+ Pr as LoadingState,
4254
+ ca as MicroserviceFrame,
4255
+ Gr as Modal,
4256
+ ut as MouseTooltip,
4257
+ sa as PageHeader,
4258
+ Mr as PageSearchInput,
4259
+ la as PrimeAuthRouteShell,
4260
+ ua as PrimeAuthToaster,
4261
+ da as PrimeSuiteChatFrame,
4262
+ Wt as SearchableSelect,
4263
+ ia as StepWizard,
4245
4264
  at as TextInput,
4246
- Kn as Toggle,
4247
- hn as UserAvatar,
4248
- wr as cn
4265
+ oa as Toggle,
4266
+ kn as UserAvatar,
4267
+ Er as cn
4249
4268
  };