bonsaif-ui 0.1.14 → 0.1.15

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
- import { jsx as t, jsxs as o, Fragment as Se } from "react/jsx-runtime";
3
- import { HiMagnifyingGlass as qe, HiXMark as Ne, HiInformationCircle as _t, HiExclamationCircle as zr, HiExclamationTriangle as ir, HiCheckCircle as Ir, HiChevronLeft as Ue, HiChevronDown as Ye, HiChevronRight as Ie, HiCalendarDays as kt, HiCheck as Qe, HiClipboardDocument as jr, HiLink as Pr, HiChevronUp as Rr, HiChevronUpDown as _r, HiEllipsisVertical as Hr, HiInbox as sr, HiLockClosed as Wr, HiBars3 as Fr, HiHome as lt, HiArrowRightOnRectangle as Ur, HiShieldCheck as vt, HiListBullet as Ht, HiBriefcase as Yr, HiCog6Tooth as Wt, HiUsers as Ft, HiDocumentText as qr, HiBell as Gr, HiUser as Kr, HiClipboardDocumentList as Vr, HiBuildingOffice2 as Xr, HiRectangleGroup as Zr, HiTicket as Jr, HiChartBar as Qr } from "react-icons/hi2";
4
- import we, { useRef as J, useState as A, useEffect as R, createContext as en, useLayoutEffect as tn, useContext as rn, isValidElement as $t, Children as nn, useMemo as je, useCallback as $e, cloneElement as an, forwardRef as on, useSyncExternalStore as sn } from "react";
2
+ import { jsx as t, jsxs as o, Fragment as Ce } from "react/jsx-runtime";
3
+ import { HiMagnifyingGlass as Ge, HiXMark as ye, HiInformationCircle as Ht, HiExclamationCircle as Ir, HiExclamationTriangle as $t, HiCheckCircle as jr, HiChevronLeft as qe, HiChevronDown as Ye, HiChevronRight as Ie, HiCalendarDays as kt, HiCheck as Qe, HiClipboardDocument as Pr, HiLink as Rr, HiChevronUp as _r, HiChevronUpDown as Hr, HiEllipsisVertical as Wr, HiInbox as sr, HiLockClosed as Fr, HiBars3 as Ur, HiHome as lt, HiArrowRightOnRectangle as qr, HiShieldCheck as vt, HiListBullet as Wt, HiBriefcase as Yr, HiCog6Tooth as Ft, HiUsers as Ut, HiDocumentText as Gr, HiBell as Kr, HiUser as Vr, HiClipboardDocumentList as Xr, HiBuildingOffice2 as Zr, HiRectangleGroup as Jr, HiTicket as Qr, HiChartBar as en } from "react-icons/hi2";
4
+ import ke, { useRef as J, useState as T, useEffect as H, createContext as tn, useLayoutEffect as rn, useContext as nn, isValidElement as Et, Children as an, useMemo as je, useCallback as ve, cloneElement as on, forwardRef as sn, useSyncExternalStore as ln } from "react";
5
5
  import { createPortal as Pe } from "react-dom";
6
- import { OverlayScrollbars as Ut } from "overlayscrollbars";
7
- import { MdDragIndicator as ln } from "react-icons/md";
6
+ import { OverlayScrollbars as qt } from "overlayscrollbars";
7
+ import { MdDragIndicator as cn } from "react-icons/md";
8
8
  import { OverlayScrollbarsComponent as Yt } from "overlayscrollbars-react";
9
- import { DayPicker as cn, useDayPicker as dn } from "react-day-picker";
9
+ import { DayPicker as dn, useDayPicker as un } from "react-day-picker";
10
10
  import "react-day-picker/dist/style.css";
11
- import { FiSave as un } from "react-icons/fi";
12
- import { Toaster as mn } from "sonner";
13
- function fn(...e) {
11
+ import { FiSave as mn } from "react-icons/fi";
12
+ import { Toaster as fn } from "sonner";
13
+ function pn(...e) {
14
14
  return e.filter(Boolean).join(" ");
15
15
  }
16
- function Va({
16
+ function Za({
17
17
  variant: e = "primary",
18
18
  className: r,
19
19
  type: n = "button",
@@ -23,14 +23,14 @@ function Va({
23
23
  return /* @__PURE__ */ t(
24
24
  "button",
25
25
  {
26
- className: fn("bonsaif-ui-button", `bonsaif-ui-button--${e}`, r),
26
+ className: pn("bonsaif-ui-button", `bonsaif-ui-button--${e}`, r),
27
27
  type: n,
28
28
  ...i,
29
29
  children: a
30
30
  }
31
31
  );
32
32
  }
33
- function pn({
33
+ function hn({
34
34
  value: e,
35
35
  onChange: r,
36
36
  placeholder: n,
@@ -41,8 +41,8 @@ function pn({
41
41
  size: s = "default",
42
42
  inputTabIndex: f
43
43
  }) {
44
- const p = J(null), [k, N] = A(!1), y = c || k || e.trim().length > 0, v = s === "sm" ? "h-9 rounded-md" : "h-10 rounded-lg", u = a || "w-48 sm:w-64 lg:w-72";
45
- R(() => {
44
+ const p = J(null), [k, N] = T(!1), y = c || k || e.trim().length > 0, v = s === "sm" ? "h-9 rounded-md" : "h-10 rounded-lg", u = a || "w-48 sm:w-64 lg:w-72";
45
+ H(() => {
46
46
  var h;
47
47
  i && ((h = p.current) == null || h.focus());
48
48
  }, [i]);
@@ -59,7 +59,7 @@ function pn({
59
59
  },
60
60
  children: [
61
61
  /* @__PURE__ */ t(
62
- qe,
62
+ Ge,
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)" }
@@ -100,15 +100,15 @@ function pn({
100
100
  className: "absolute right-2 top-1/2 flex !h-6 !w-6 -translate-y-1/2 items-center justify-center rounded-full !p-0 leading-none transition-colors hover:bg-black/5",
101
101
  style: { color: "var(--text-muted)" },
102
102
  "aria-label": "Limpiar búsqueda",
103
- children: /* @__PURE__ */ t(Ne, { className: "h-3.5 w-3.5 flex-shrink-0" })
103
+ children: /* @__PURE__ */ t(ye, { className: "h-3.5 w-3.5 flex-shrink-0" })
104
104
  }
105
105
  )
106
106
  ]
107
107
  }
108
108
  );
109
109
  }
110
- const lr = en({});
111
- function hn(e) {
110
+ const lr = tn({});
111
+ function bn(e) {
112
112
  var a;
113
113
  const r = Array.from(
114
114
  e.querySelectorAll("*")
@@ -120,7 +120,7 @@ function hn(e) {
120
120
  );
121
121
  return (e.scrollWidth > e.clientWidth || r.length > 0) && (((a = r[0]) == null ? void 0 : a.textContent) ?? e.textContent ?? "").trim() || null;
122
122
  }
123
- function Et({
123
+ function Mt({
124
124
  children: e,
125
125
  content: r,
126
126
  onlyWhenOverflow: n = !1,
@@ -128,20 +128,20 @@ function Et({
128
128
  style: i,
129
129
  as: c = "div"
130
130
  }) {
131
- const d = J(null), s = J(null), [f, p] = A(null), [k, N] = A("");
132
- R(() => {
131
+ const d = J(null), s = J(null), [f, p] = T(null), [k, N] = T("");
132
+ H(() => {
133
133
  const u = d.current;
134
134
  u && (u.querySelectorAll("[title]").forEach((b) => {
135
135
  const h = b.getAttribute("title");
136
136
  h && (b.getAttribute("aria-label") || b.setAttribute("aria-label", h), b.removeAttribute("title"));
137
137
  }), u.querySelectorAll("svg title").forEach((b) => b.remove()));
138
- }), tn(() => {
138
+ }), rn(() => {
139
139
  if (!f) return;
140
140
  const u = s.current;
141
141
  if (!u) return;
142
- const b = 12, h = 14, C = u.getBoundingClientRect(), P = window.innerWidth - C.width - b, j = window.innerHeight - C.height - b;
142
+ const b = 12, h = 14, C = u.getBoundingClientRect(), _ = window.innerWidth - C.width - b, I = window.innerHeight - C.height - b;
143
143
  let B = f.mouseX + h, w = f.mouseY + h;
144
- B > P && (B = f.mouseX - C.width - h), w > j && (w = f.mouseY - C.height - h), B = Math.min(Math.max(b, B), Math.max(b, P)), w = Math.min(Math.max(b, w), Math.max(b, j)), (Math.abs(B - f.x) > 0.5 || Math.abs(w - f.y) > 0.5) && p(
144
+ B > _ && (B = f.mouseX - C.width - h), w > I && (w = f.mouseY - C.height - h), B = Math.min(Math.max(b, B), Math.max(b, _)), w = Math.min(Math.max(b, w), Math.max(b, I)), (Math.abs(B - f.x) > 0.5 || Math.abs(w - f.y) > 0.5) && p(
145
145
  ($) => $ && {
146
146
  ...$,
147
147
  x: B,
@@ -153,14 +153,14 @@ function Et({
153
153
  const h = d.current;
154
154
  if (h) {
155
155
  if (n) {
156
- const C = hn(h);
156
+ const C = bn(h);
157
157
  if (!C) return;
158
158
  N(C);
159
159
  }
160
160
  !n && !r || p({ mouseX: u, mouseY: b, x: u + 14, y: b + 14 });
161
161
  }
162
162
  }, v = n ? k : r;
163
- return /* @__PURE__ */ o(Se, { children: [
163
+ return /* @__PURE__ */ o(Ce, { children: [
164
164
  /* @__PURE__ */ t(
165
165
  c,
166
166
  {
@@ -208,27 +208,27 @@ function Et({
208
208
  ) : null
209
209
  ] });
210
210
  }
211
- function qt(e) {
211
+ function Gt(e) {
212
212
  if (e !== void 0)
213
213
  return typeof e == "number" ? `${e}px` : e;
214
214
  }
215
- const bn = "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", xn = {
215
+ const xn = "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", vn = {
216
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",
217
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",
218
218
  danger: "border border-[var(--border)] text-[var(--danger)] hover:border-[var(--danger)] hover:bg-[var(--danger-bg)] active:scale-[0.98] transition-colors",
219
219
  ghost: "text-[var(--text-secondary)] hover:opacity-70",
220
220
  icon: "text-[var(--text-muted)] hover:text-[var(--primary)] hover:bg-primary/5"
221
- }, vn = "border border-[var(--border)] text-[var(--text-muted)] shadow-sm shadow-black/5 hover:border-[var(--border)] hover:bg-[var(--bg-input)] hover:text-[var(--primary)] active:scale-[0.98] transition-colors", gn = {
221
+ }, gn = "border border-[var(--border)] text-[var(--text-muted)] shadow-sm shadow-black/5 hover:border-[var(--border)] hover:bg-[var(--bg-input)] hover:text-[var(--primary)] active:scale-[0.98] transition-colors", yn = {
222
222
  xs: "h-8 px-2.5 text-xs",
223
223
  sm: "h-9 px-3.5 text-xs",
224
224
  md: "h-10 px-3.5 text-sm",
225
225
  lg: "h-11 px-4 text-sm font-semibold"
226
- }, yn = {
226
+ }, wn = {
227
227
  xs: "h-8 w-8",
228
228
  sm: "h-9 w-9",
229
229
  md: "h-10 w-10",
230
230
  lg: "h-10 w-10"
231
- }, wn = {
231
+ }, Nn = {
232
232
  primary: { background: "var(--bg-card)" },
233
233
  secondary: { background: "var(--bg-card)" },
234
234
  danger: { background: "var(--bg-card)" },
@@ -236,12 +236,12 @@ const bn = "inline-flex shrink-0 items-center justify-center gap-2 whitespace-no
236
236
  icon: {}
237
237
  };
238
238
  function St(e) {
239
- return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(St).join(" ").trim() : $t(e) ? St(e.props.children) : "";
239
+ return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(St).join(" ").trim() : Et(e) ? St(e.props.children) : "";
240
240
  }
241
- function Nn(e) {
242
- return nn.toArray(e).find($t) ?? null;
241
+ function kn(e) {
242
+ return an.toArray(e).find(Et) ?? null;
243
243
  }
244
- function xe({
244
+ function pe({
245
245
  variant: e = "primary",
246
246
  size: r = "md",
247
247
  loading: n = !1,
@@ -256,23 +256,23 @@ function xe({
256
256
  style: N,
257
257
  ...y
258
258
  }) {
259
- const v = rn(lr), u = c ?? v.iconOnly ?? e === "icon", b = v.compact ?? !1, h = v.headerAction ?? !1, C = b && !h && r === "md" ? "xs" : r, P = e === "icon" || u, j = h && P, B = St(f), w = i ?? y.title ?? y["aria-label"] ?? (u ? B : void 0), $ = w ? void 0 : y.title, T = y["aria-label"] ?? (typeof w == "string" ? w : B || void 0), _ = n ? null : a ?? (u ? Nn(f) : null), D = /* @__PURE__ */ o(
259
+ const v = nn(lr), u = c ?? v.iconOnly ?? e === "icon", b = v.compact ?? !1, h = v.headerAction ?? !1, C = b && !h && r === "md" ? "xs" : r, _ = e === "icon" || u, I = h && _, B = St(f), w = i ?? y.title ?? y["aria-label"] ?? (u ? B : void 0), $ = w ? void 0 : y.title, A = y["aria-label"] ?? (typeof w == "string" ? w : B || void 0), j = n ? null : a ?? (u ? kn(f) : null), M = /* @__PURE__ */ o(
260
260
  "button",
261
261
  {
262
262
  ...y,
263
263
  title: $,
264
- "aria-label": T,
264
+ "aria-label": A,
265
265
  "data-variant": e,
266
266
  "data-size": C,
267
- "data-icon": P ? "true" : void 0,
267
+ "data-icon": _ ? "true" : void 0,
268
268
  disabled: k || n,
269
- className: `${bn} ${j ? vn : xn[e]} ${P ? yn[C] : gn[C]} ${b && !P ? "px-2.5" : ""} ${p}`,
269
+ className: `${xn} ${I ? gn : vn[e]} ${_ ? wn[C] : yn[C]} ${b && !_ ? "px-2.5" : ""} ${p}`,
270
270
  style: {
271
- ...wn[e],
272
- height: qt(d),
273
- padding: qt(s),
271
+ ...Nn[e],
272
+ height: Gt(d),
273
+ padding: Gt(s),
274
274
  ...N,
275
- ...j ? {
275
+ ...I ? {
276
276
  width: "40px",
277
277
  height: "40px",
278
278
  padding: 0,
@@ -281,28 +281,28 @@ function xe({
281
281
  } : null
282
282
  },
283
283
  children: [
284
- n ? /* @__PURE__ */ t("span", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : _,
284
+ n ? /* @__PURE__ */ t("span", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : j,
285
285
  !u && f
286
286
  ]
287
287
  }
288
288
  );
289
289
  return w ? /* @__PURE__ */ t(
290
- Et,
290
+ Mt,
291
291
  {
292
292
  as: "span",
293
293
  content: w,
294
294
  className: "inline-flex shrink-0",
295
- children: D
295
+ children: M
296
296
  }
297
- ) : D;
297
+ ) : M;
298
298
  }
299
- function kn({
299
+ function Sn({
300
300
  variant: e = "page",
301
301
  title: r = "Cargando...",
302
302
  rows: n = 6,
303
303
  children: a
304
304
  }) {
305
- return e === "table" ? /* @__PURE__ */ t(cr, { rows: n }) : e === "sections" ? /* @__PURE__ */ t(Sn, { rows: n }) : e === "cards" ? /* @__PURE__ */ t(Cn, { 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__ */ o("div", { className: "flex flex-col items-center gap-3 text-center", children: [
305
+ return e === "table" ? /* @__PURE__ */ t(cr, { rows: n }) : e === "sections" ? /* @__PURE__ */ t(Cn, { rows: n }) : e === "cards" ? /* @__PURE__ */ t($n, { 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__ */ o("div", { className: "flex flex-col items-center gap-3 text-center", children: [
306
306
  /* @__PURE__ */ t("div", { className: "h-9 w-9 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--primary)]" }),
307
307
  /* @__PURE__ */ o("div", { children: [
308
308
  /* @__PURE__ */ t("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: r }),
@@ -310,7 +310,7 @@ function kn({
310
310
  ] })
311
311
  ] }) });
312
312
  }
313
- function Sn({ rows: e }) {
313
+ function Cn({ rows: e }) {
314
314
  return /* @__PURE__ */ t("div", { className: "space-y-4", children: Array.from({ length: Math.max(2, Math.min(e, 4)) }).map(
315
315
  (r, n) => /* @__PURE__ */ o(
316
316
  "section",
@@ -341,7 +341,7 @@ function Sn({ rows: e }) {
341
341
  )
342
342
  ) });
343
343
  }
344
- function Cn({ rows: e }) {
344
+ function $n({ rows: e }) {
345
345
  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__ */ o(
346
346
  "div",
347
347
  {
@@ -392,10 +392,10 @@ function dr(e) {
392
392
  const r = e.split("/").filter(Boolean);
393
393
  return (r[r.length - 1] ?? e).replace(/^lv_/, "").split(/[-_]/).filter(Boolean).map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ");
394
394
  }
395
- function Gt(e) {
395
+ function Kt(e) {
396
396
  return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim();
397
397
  }
398
- function $n(e) {
398
+ function En(e) {
399
399
  return [
400
400
  e.label,
401
401
  dr(e.service),
@@ -403,17 +403,17 @@ function $n(e) {
403
403
  e.service
404
404
  ].filter(Boolean).join(" ");
405
405
  }
406
- function En(e) {
406
+ function Mn(e) {
407
407
  return typeof e == "function" ? e : e.default;
408
408
  }
409
- function Mn(e, r) {
409
+ function Dn(e, r) {
410
410
  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__ */ o("div", { className: "max-w-md", children: [
411
411
  /* @__PURE__ */ t("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: "No se pudo cargar este modulo" }),
412
412
  /* @__PURE__ */ t("p", { className: "mt-1 text-xs text-[var(--text-muted)]", children: e.message }),
413
- /* @__PURE__ */ t(xe, { className: "mt-4", height: 36, padding: "0 14px", onClick: r, children: "Reintentar" })
413
+ /* @__PURE__ */ t(pe, { className: "mt-4", height: 36, padding: "0 14px", onClick: r, children: "Reintentar" })
414
414
  ] }) });
415
415
  }
416
- function Xa({
416
+ function Ja({
417
417
  parentPanel: e,
418
418
  parentPanelComponent: r,
419
419
  renderParentPanel: n,
@@ -431,93 +431,93 @@ function Xa({
431
431
  subtitle: u,
432
432
  emptyState: b,
433
433
  loadingState: h,
434
- errorState: C = Mn,
435
- renderTabLabel: P,
436
- searchableTabs: j = "auto",
434
+ errorState: C = Dn,
435
+ renderTabLabel: _,
436
+ searchableTabs: I = "auto",
437
437
  tabsSearchThreshold: B = 6,
438
438
  tabsSearchPlaceholder: w = "Buscar modulo...",
439
439
  tabsSearchValue: $,
440
- onTabsSearchChange: T,
441
- emptySearchState: _,
442
- showTabCount: D = !0,
443
- className: L = "",
444
- parentClassName: H = "",
440
+ onTabsSearchChange: A,
441
+ emptySearchState: j,
442
+ showTabCount: M = !0,
443
+ className: E = "",
444
+ parentClassName: P = "",
445
445
  contentClassName: z = "",
446
446
  tabsClassName: W = ""
447
447
  }) {
448
448
  var Me;
449
449
  const F = je(
450
450
  () => c.filter(
451
- (M) => !M.hidden && ((N == null ? void 0 : N(M, i)) ?? !0)
451
+ (L) => !L.hidden && ((N == null ? void 0 : N(L, i)) ?? !0)
452
452
  ),
453
453
  [N, i, c]
454
454
  ), V = (Me = F.find(
455
- (M) => !M.disabled
456
- )) == null ? void 0 : Me.service, [ne, m] = A(
455
+ (L) => !L.disabled
456
+ )) == null ? void 0 : Me.service, [ne, m] = T(
457
457
  p ?? V ?? ""
458
- ), [E, Y] = A({}), [X, Z] = A({}), [ae, de] = A(""), [x, G] = A(!1), pe = J(X), te = J(0), Q = $ ?? ae, O = Gt(Q), K = j === !0 || j === "auto" && F.length >= B, ee = K && Q.trim().length > 0, se = je(() => O ? F.filter(
459
- (M) => Gt($n(M)).includes(O)
460
- ) : F, [O, F]), he = f ?? ne, q = F.find((M) => M.service === he) ?? F.find((M) => !M.disabled);
461
- R(() => {
462
- !q && V && m(V);
463
- }, [V, q]), R(() => {
464
- pe.current = X;
458
+ ), [D, q] = T({}), [X, Z] = T({}), [ae, de] = T(""), [x, G] = T(!1), he = J(X), te = J(0), Q = $ ?? ae, O = Kt(Q), K = I === !0 || I === "auto" && F.length >= B, ee = K && Q.trim().length > 0, se = je(() => O ? F.filter(
459
+ (L) => Kt(En(L)).includes(O)
460
+ ) : F, [O, F]), be = f ?? ne, Y = F.find((L) => L.service === be) ?? F.find((L) => !L.disabled);
461
+ H(() => {
462
+ !Y && V && m(V);
463
+ }, [V, Y]), H(() => {
464
+ he.current = X;
465
465
  }, [X]);
466
- const Ce = (M) => {
467
- M.disabled || (f || m(M.service), k == null || k(M.service, M));
468
- }, Le = (M) => {
469
- $ === void 0 && de(M), T == null || T(M);
470
- }, Ge = (M, le) => {
471
- const ue = se.filter((me) => !me.disabled), be = ue.findIndex(
466
+ const $e = (L) => {
467
+ L.disabled || (f || m(L.service), k == null || k(L.service, L));
468
+ }, Be = (L) => {
469
+ $ === void 0 && de(L), A == null || A(L);
470
+ }, Ke = (L, le) => {
471
+ const ue = se.filter((me) => !me.disabled), xe = ue.findIndex(
472
472
  (me) => me.service === le.service
473
473
  );
474
- be < 0 || ((M.key === "ArrowRight" || M.key === "ArrowDown") && (M.preventDefault(), Ce(ue[(be + 1) % ue.length])), (M.key === "ArrowLeft" || M.key === "ArrowUp") && (M.preventDefault(), Ce(
475
- ue[(be - 1 + ue.length) % ue.length]
476
- )), M.key === "Home" && (M.preventDefault(), Ce(ue[0])), M.key === "End" && (M.preventDefault(), Ce(ue[ue.length - 1])));
477
- }, Re = $e(() => {
478
- if (!q) return;
479
- const M = q.service, le = pe.current[M];
474
+ xe < 0 || ((L.key === "ArrowRight" || L.key === "ArrowDown") && (L.preventDefault(), $e(ue[(xe + 1) % ue.length])), (L.key === "ArrowLeft" || L.key === "ArrowUp") && (L.preventDefault(), $e(
475
+ ue[(xe - 1 + ue.length) % ue.length]
476
+ )), L.key === "Home" && (L.preventDefault(), $e(ue[0])), L.key === "End" && (L.preventDefault(), $e(ue[ue.length - 1])));
477
+ }, Re = ve(() => {
478
+ if (!Y) return;
479
+ const L = Y.service, le = he.current[L];
480
480
  if (le != null && le.loading || le != null && le.component && y) return;
481
- const ue = (d == null ? void 0 : d[M]) ?? s;
481
+ const ue = (d == null ? void 0 : d[L]) ?? s;
482
482
  if (!ue) {
483
483
  Z((me) => ({
484
484
  ...me,
485
- [M]: {
485
+ [L]: {
486
486
  loading: !1,
487
- error: new Error(`No module loader found for service "${M}".`)
487
+ error: new Error(`No module loader found for service "${L}".`)
488
488
  }
489
489
  }));
490
490
  return;
491
491
  }
492
- const be = ++te.current;
492
+ const xe = ++te.current;
493
493
  Z((me) => ({
494
494
  ...me,
495
- [M]: { ...me[M], loading: !0, error: void 0 }
496
- })), ue(q, i).then((me) => {
497
- if (be !== te.current && !y) return;
498
- const Ve = En(me);
495
+ [L]: { ...me[L], loading: !0, error: void 0 }
496
+ })), ue(Y, i).then((me) => {
497
+ if (xe !== te.current && !y) return;
498
+ const Xe = Mn(me);
499
499
  Z((We) => ({
500
500
  ...We,
501
- [M]: { component: Ve, loading: !1 }
501
+ [L]: { component: Xe, loading: !1 }
502
502
  }));
503
503
  }).catch((me) => {
504
- const Ve = me instanceof Error ? me : new Error(String(me));
504
+ const Xe = me instanceof Error ? me : new Error(String(me));
505
505
  Z((We) => ({
506
506
  ...We,
507
- [M]: { ...We[M], loading: !1, error: Ve }
507
+ [L]: { ...We[L], loading: !1, error: Xe }
508
508
  }));
509
509
  });
510
- }, [i, y, s, d, q]);
511
- R(Re, [Re]);
512
- const Ke = q ? E[q.service] ?? null : null, oe = q ? X[q.service] : void 0, _e = oe == null ? void 0 : oe.component, et = (M) => {
513
- q && Y((le) => ({
510
+ }, [i, y, s, d, Y]);
511
+ H(Re, [Re]);
512
+ const Ve = Y ? D[Y.service] ?? null : null, oe = Y ? X[Y.service] : void 0, _e = oe == null ? void 0 : oe.component, et = (L) => {
513
+ Y && q((le) => ({
514
514
  ...le,
515
- [q.service]: M
515
+ [Y.service]: L
516
516
  }));
517
517
  }, He = () => {
518
- q && Y((M) => ({
519
- ...M,
520
- [q.service]: null
518
+ Y && q((L) => ({
519
+ ...L,
520
+ [Y.service]: null
521
521
  }));
522
522
  }, tt = {
523
523
  context: i,
@@ -525,23 +525,23 @@ function Xa({
525
525
  links: c,
526
526
  visibleLinks: F,
527
527
  filteredLinks: se,
528
- selectedLink: q,
529
- selectedService: q == null ? void 0 : q.service,
530
- activeItemId: Ke,
528
+ selectedLink: Y,
529
+ selectedService: Y == null ? void 0 : Y.service,
530
+ activeItemId: Ve,
531
531
  tabsSearch: Q,
532
- onSelectService: Ce,
532
+ onSelectService: $e,
533
533
  onOpenDetail: et,
534
534
  onBackToList: He
535
535
  }, Ee = n ? n(tt) : r ? /* @__PURE__ */ t(r, { ...tt }) : e;
536
536
  return /* @__PURE__ */ o(
537
537
  "section",
538
538
  {
539
- className: `grid min-h-[520px] gap-4 lg:grid-cols-[minmax(260px,360px)_minmax(0,1fr)] ${L}`,
539
+ className: `grid min-h-[520px] gap-4 lg:grid-cols-[minmax(260px,360px)_minmax(0,1fr)] ${E}`,
540
540
  children: [
541
541
  /* @__PURE__ */ t(
542
542
  "aside",
543
543
  {
544
- className: `min-w-0 rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-4 ${H}`,
544
+ className: `min-w-0 rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-4 ${P}`,
545
545
  children: Ee
546
546
  }
547
547
  ),
@@ -550,28 +550,28 @@ function Xa({
550
550
  {
551
551
  className: `relative min-w-0 overflow-visible rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${z}`,
552
552
  children: [
553
- (v || u || K || D) && /* @__PURE__ */ t("div", { className: "relative border-b border-[var(--border)] px-4 py-3", children: /* @__PURE__ */ o("div", { className: "flex min-w-0 items-start justify-between gap-3", children: [
553
+ (v || u || K || M) && /* @__PURE__ */ t("div", { className: "relative border-b border-[var(--border)] px-4 py-3", children: /* @__PURE__ */ o("div", { className: "flex min-w-0 items-start justify-between gap-3", children: [
554
554
  /* @__PURE__ */ o("div", { className: "min-w-0", children: [
555
555
  v && /* @__PURE__ */ t("h2", { className: "truncate text-sm font-semibold text-[var(--text-main)]", children: v }),
556
556
  u && /* @__PURE__ */ t("p", { className: "mt-1 line-clamp-2 text-xs text-[var(--text-muted)]", children: u })
557
557
  ] }),
558
- (K || D) && /* @__PURE__ */ o("div", { className: "flex min-w-0 flex-shrink-0 items-center justify-end gap-2", children: [
559
- D && /* @__PURE__ */ o("span", { className: "hidden text-xs font-semibold text-[var(--text-muted)] transition-opacity duration-200 sm:inline", children: [
558
+ (K || M) && /* @__PURE__ */ o("div", { className: "flex min-w-0 flex-shrink-0 items-center justify-end gap-2", children: [
559
+ M && /* @__PURE__ */ o("span", { className: "hidden text-xs font-semibold text-[var(--text-muted)] transition-opacity duration-200 sm:inline", children: [
560
560
  se.length,
561
561
  " / ",
562
562
  F.length
563
563
  ] }),
564
- K && /* @__PURE__ */ o(Se, { children: [
564
+ K && /* @__PURE__ */ o(Ce, { children: [
565
565
  /* @__PURE__ */ t(
566
566
  "div",
567
567
  {
568
568
  className: `origin-right overflow-hidden transition-[width,opacity,transform] duration-200 ease-out ${x ? "w-[min(20rem,44vw)] translate-x-0 opacity-100" : "w-0 translate-x-2 opacity-0"}`,
569
569
  "aria-hidden": !x,
570
570
  children: /* @__PURE__ */ t(
571
- pn,
571
+ hn,
572
572
  {
573
573
  value: Q,
574
- onChange: Le,
574
+ onChange: Be,
575
575
  placeholder: w,
576
576
  className: "w-full",
577
577
  autoFocus: x,
@@ -590,10 +590,10 @@ function Xa({
590
590
  "aria-label": x ? "Cerrar busqueda" : "Buscar tabs",
591
591
  "aria-expanded": x,
592
592
  onClick: () => {
593
- x && Q && Le(""), G((M) => !M);
593
+ x && Q && Be(""), G((L) => !L);
594
594
  },
595
595
  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 ${x || ee ? "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)]"}`,
596
- children: /* @__PURE__ */ t("span", { className: "grid h-4 w-4 place-items-center transition-transform duration-200", children: x || ee ? /* @__PURE__ */ t(Ne, { className: "h-4 w-4" }) : /* @__PURE__ */ t(qe, { className: "h-4 w-4" }) })
596
+ children: /* @__PURE__ */ t("span", { className: "grid h-4 w-4 place-items-center transition-transform duration-200", children: x || ee ? /* @__PURE__ */ t(ye, { className: "h-4 w-4" }) : /* @__PURE__ */ t(Ge, { className: "h-4 w-4" }) })
597
597
  }
598
598
  )
599
599
  ] })
@@ -605,41 +605,41 @@ function Xa({
605
605
  role: "tablist",
606
606
  "aria-label": v ?? "Modulos relacionados",
607
607
  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}`,
608
- children: se.length > 0 ? se.map((M) => {
609
- const le = M.service === (q == null ? void 0 : q.service);
608
+ children: se.length > 0 ? se.map((L) => {
609
+ const le = L.service === (Y == null ? void 0 : Y.service);
610
610
  return /* @__PURE__ */ t(
611
611
  "button",
612
612
  {
613
613
  type: "button",
614
614
  role: "tab",
615
615
  "aria-selected": le,
616
- disabled: M.disabled,
617
- onClick: () => Ce(M),
618
- onKeyDown: (ue) => Ge(ue, M),
616
+ disabled: L.disabled,
617
+ onClick: () => $e(L),
618
+ onKeyDown: (ue) => Ke(ue, L),
619
619
  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 ${le ? "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)]"}`,
620
- children: P ? P(M, le) : /* @__PURE__ */ o(Se, { children: [
621
- M.icon,
622
- /* @__PURE__ */ t("span", { children: M.label ?? dr(M.service) }),
623
- M.badge && /* @__PURE__ */ t("span", { className: "rounded-full bg-[var(--bg-input)] px-1.5 py-0.5 text-[10px] text-[var(--text-muted)]", children: M.badge })
620
+ children: _ ? _(L, le) : /* @__PURE__ */ o(Ce, { children: [
621
+ L.icon,
622
+ /* @__PURE__ */ t("span", { children: L.label ?? dr(L.service) }),
623
+ L.badge && /* @__PURE__ */ t("span", { className: "rounded-full bg-[var(--bg-input)] px-1.5 py-0.5 text-[10px] text-[var(--text-muted)]", children: L.badge })
624
624
  ] })
625
625
  },
626
- M.service
626
+ L.service
627
627
  );
628
- }) : /* @__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: _ ?? "No hay modulos que coincidan con la busqueda." })
628
+ }) : /* @__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: j ?? "No hay modulos que coincidan con la busqueda." })
629
629
  }
630
630
  ),
631
- (q == null ? void 0 : q.description) && /* @__PURE__ */ t("div", { className: "border-b border-[var(--border)] px-4 py-2 text-xs text-[var(--text-muted)]", children: q.description }),
631
+ (Y == null ? void 0 : Y.description) && /* @__PURE__ */ t("div", { className: "border-b border-[var(--border)] px-4 py-2 text-xs text-[var(--text-muted)]", children: Y.description }),
632
632
  /* @__PURE__ */ o("div", { className: "min-h-[420px] p-4", children: [
633
- !q && (b ?? /* @__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." })),
634
- q && (oe == null ? void 0 : oe.loading) && (h ?? /* @__PURE__ */ t(kn, { title: "Cargando modulo..." })),
635
- q && (oe == null ? void 0 : oe.error) && C(oe.error, Re),
636
- q && _e && !(oe != null && oe.loading) && !(oe != null && oe.error) && /* @__PURE__ */ t(
633
+ !Y && (b ?? /* @__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." })),
634
+ Y && (oe == null ? void 0 : oe.loading) && (h ?? /* @__PURE__ */ t(Sn, { title: "Cargando modulo..." })),
635
+ Y && (oe == null ? void 0 : oe.error) && C(oe.error, Re),
636
+ Y && _e && !(oe != null && oe.loading) && !(oe != null && oe.error) && /* @__PURE__ */ t(
637
637
  _e,
638
638
  {
639
639
  context: i,
640
640
  parent: a,
641
- link: q,
642
- activeItemId: Ke,
641
+ link: Y,
642
+ activeItemId: Ve,
643
643
  onOpenDetail: et,
644
644
  onBackToList: He
645
645
  }
@@ -652,39 +652,39 @@ function Xa({
652
652
  }
653
653
  );
654
654
  }
655
- const Dn = {
655
+ const Ln = {
656
656
  info: {
657
657
  color: "#2563eb",
658
658
  background: "rgba(59, 130, 246, 0.1)",
659
659
  border: "rgba(59, 130, 246, 0.24)",
660
- icon: /* @__PURE__ */ t(_t, { className: "h-5 w-5" })
660
+ icon: /* @__PURE__ */ t(Ht, { className: "h-5 w-5" })
661
661
  },
662
662
  success: {
663
663
  color: "#047857",
664
664
  background: "rgba(16, 185, 129, 0.1)",
665
665
  border: "rgba(16, 185, 129, 0.24)",
666
- icon: /* @__PURE__ */ t(Ir, { className: "h-5 w-5" })
666
+ icon: /* @__PURE__ */ t(jr, { className: "h-5 w-5" })
667
667
  },
668
668
  warning: {
669
669
  color: "#b45309",
670
670
  background: "rgba(245, 158, 11, 0.12)",
671
671
  border: "rgba(245, 158, 11, 0.26)",
672
- icon: /* @__PURE__ */ t(ir, { className: "h-5 w-5" })
672
+ icon: /* @__PURE__ */ t($t, { className: "h-5 w-5" })
673
673
  },
674
674
  danger: {
675
675
  color: "var(--danger)",
676
676
  background: "var(--danger-bg)",
677
677
  border: "color-mix(in srgb, var(--danger) 20%, var(--border))",
678
- icon: /* @__PURE__ */ t(zr, { className: "h-5 w-5" })
678
+ icon: /* @__PURE__ */ t(Ir, { className: "h-5 w-5" })
679
679
  },
680
680
  neutral: {
681
681
  color: "var(--text-secondary)",
682
682
  background: "var(--bg-input)",
683
683
  border: "var(--border)",
684
- icon: /* @__PURE__ */ t(_t, { className: "h-5 w-5" })
684
+ icon: /* @__PURE__ */ t(Ht, { className: "h-5 w-5" })
685
685
  }
686
686
  };
687
- function Za({
687
+ function Qa({
688
688
  variant: e = "info",
689
689
  title: r,
690
690
  children: n,
@@ -693,7 +693,7 @@ function Za({
693
693
  onDismiss: c,
694
694
  className: d = ""
695
695
  }) {
696
- const s = Dn[e];
696
+ const s = Ln[e];
697
697
  return /* @__PURE__ */ o(
698
698
  "div",
699
699
  {
@@ -711,14 +711,14 @@ function Za({
711
711
  i && /* @__PURE__ */ t("div", { className: "mt-3", children: i })
712
712
  ] }),
713
713
  c && /* @__PURE__ */ t(
714
- xe,
714
+ pe,
715
715
  {
716
716
  variant: "icon",
717
717
  size: "xs",
718
718
  "aria-label": "Cerrar alerta",
719
719
  onClick: c,
720
720
  className: "-mr-1 -mt-1",
721
- children: /* @__PURE__ */ t(Ne, { className: "h-4 w-4" })
721
+ children: /* @__PURE__ */ t(ye, { className: "h-4 w-4" })
722
722
  }
723
723
  )
724
724
  ]
@@ -738,7 +738,7 @@ const ur = [
738
738
  "Octubre",
739
739
  "Noviembre",
740
740
  "Diciembre"
741
- ], Ln = [
741
+ ], Bn = [
742
742
  "Ene",
743
743
  "Feb",
744
744
  "Mar",
@@ -751,7 +751,7 @@ const ur = [
751
751
  "Oct",
752
752
  "Nov",
753
753
  "Dic"
754
- ], Bn = ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"], gt = 6;
754
+ ], An = ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"], gt = 6;
755
755
  function Ct(e, r, n) {
756
756
  return `${e}-${String(r).padStart(2, "0")}-${String(n).padStart(2, "0")}`;
757
757
  }
@@ -763,55 +763,55 @@ function mr(e) {
763
763
  const [r, n, a] = e.split("-").map(Number);
764
764
  return { year: r, month: n, day: a };
765
765
  }
766
- function An(e) {
766
+ function On(e) {
767
767
  if (!e) return "Seleccionar fecha";
768
768
  const { year: r, month: n, day: a } = mr(e);
769
769
  return !r || !n || !a ? "Seleccionar fecha" : `${String(a).padStart(2, "0")} ${ur[n - 1]} ${r}`;
770
770
  }
771
- function Ja({
771
+ function eo({
772
772
  value: e,
773
773
  onChange: r,
774
774
  minDate: n,
775
775
  displayMode: a = "inline"
776
776
  }) {
777
- const i = Tn(), d = mr(e || i), s = a === "popover", [f, p] = A(!1), k = J(null), [N, y] = A({
777
+ const i = Tn(), d = mr(e || i), s = a === "popover", [f, p] = T(!1), k = J(null), [N, y] = T({
778
778
  horizontal: "left",
779
779
  vertical: "bottom"
780
- }), [v, u] = A(d.year), [b, h] = A(d.month), [C, P] = A("days"), j = 16, [B, w] = A(0), $ = v - 7 + B, T = Array.from({ length: j }, (m, E) => $ + E);
781
- R(() => {
780
+ }), [v, u] = T(d.year), [b, h] = T(d.month), [C, _] = T("days"), I = 16, [B, w] = T(0), $ = v - 7 + B, A = Array.from({ length: I }, (m, D) => $ + D);
781
+ H(() => {
782
782
  if (!s || !f || !k.current) return;
783
- const m = k.current.getBoundingClientRect(), E = 8, Y = 280, X = 340, Z = m.left + Y > window.innerWidth - E, ae = m.right - Y >= E, de = m.bottom + 8 + X > window.innerHeight - E, x = m.top - 8 - X >= E;
783
+ const m = k.current.getBoundingClientRect(), D = 8, q = 280, X = 340, Z = m.left + q > window.innerWidth - D, ae = m.right - q >= D, de = m.bottom + 8 + X > window.innerHeight - D, x = m.top - 8 - X >= D;
784
784
  y({
785
785
  horizontal: Z && ae ? "right" : "left",
786
786
  vertical: de && x ? "top" : "bottom"
787
787
  });
788
- }, [s, f]), R(() => {
788
+ }, [s, f]), H(() => {
789
789
  if (!s || !f) return;
790
- function m(Y) {
791
- k.current && (k.current.contains(Y.target) || p(!1));
790
+ function m(q) {
791
+ k.current && (k.current.contains(q.target) || p(!1));
792
792
  }
793
- function E(Y) {
794
- Y.key === "Escape" && p(!1);
793
+ function D(q) {
794
+ q.key === "Escape" && p(!1);
795
795
  }
796
- return document.addEventListener("mousedown", m), document.addEventListener("keydown", E), () => {
797
- document.removeEventListener("mousedown", m), document.removeEventListener("keydown", E);
796
+ return document.addEventListener("mousedown", m), document.addEventListener("keydown", D), () => {
797
+ document.removeEventListener("mousedown", m), document.removeEventListener("keydown", D);
798
798
  };
799
799
  }, [s, f]);
800
- function _() {
800
+ function j() {
801
801
  b === 1 ? (u((m) => m - 1), h(12)) : h((m) => m - 1);
802
802
  }
803
- function D() {
803
+ function M() {
804
804
  b === 12 ? (u((m) => m + 1), h(1)) : h((m) => m + 1);
805
805
  }
806
- const L = new Date(v, b - 1, 1).getDay(), H = new Date(v, b, 0).getDate(), z = [
807
- ...Array(L).fill(null),
808
- ...Array.from({ length: H }, (m, E) => E + 1)
806
+ const E = new Date(v, b - 1, 1).getDay(), P = new Date(v, b, 0).getDate(), z = [
807
+ ...Array(E).fill(null),
808
+ ...Array.from({ length: P }, (m, D) => D + 1)
809
809
  ];
810
810
  for (; z.length < gt * 7; ) z.push(null);
811
811
  const W = z.slice(0, gt * 7);
812
812
  function F(m) {
813
- const E = Ct(v, b, m);
814
- n && E < n || (r(E), s && p(!1));
813
+ const D = Ct(v, b, m);
814
+ n && D < n || (r(D), s && p(!1));
815
815
  }
816
816
  const V = {
817
817
  background: "none",
@@ -844,15 +844,15 @@ function Ja({
844
844
  padding: "10px 12px",
845
845
  borderBottom: "1px solid var(--border)"
846
846
  },
847
- children: C === "days" ? /* @__PURE__ */ o(Se, { children: [
847
+ children: C === "days" ? /* @__PURE__ */ o(Ce, { children: [
848
848
  /* @__PURE__ */ t(
849
849
  "button",
850
850
  {
851
851
  type: "button",
852
- onClick: _,
852
+ onClick: j,
853
853
  style: V,
854
854
  title: "Mes anterior",
855
- children: /* @__PURE__ */ t(Ue, { size: 16 })
855
+ children: /* @__PURE__ */ t(qe, { size: 16 })
856
856
  }
857
857
  ),
858
858
  /* @__PURE__ */ o(
@@ -860,7 +860,7 @@ function Ja({
860
860
  {
861
861
  type: "button",
862
862
  onClick: () => {
863
- P("years"), w(0);
863
+ _("years"), w(0);
864
864
  },
865
865
  style: {
866
866
  background: "none",
@@ -887,27 +887,27 @@ function Ja({
887
887
  "button",
888
888
  {
889
889
  type: "button",
890
- onClick: D,
890
+ onClick: M,
891
891
  style: V,
892
892
  title: "Mes siguiente",
893
893
  children: /* @__PURE__ */ t(Ie, { size: 16 })
894
894
  }
895
895
  )
896
- ] }) : /* @__PURE__ */ o(Se, { children: [
896
+ ] }) : /* @__PURE__ */ o(Ce, { children: [
897
897
  /* @__PURE__ */ t(
898
898
  "button",
899
899
  {
900
900
  type: "button",
901
- onClick: () => w((m) => m - j),
901
+ onClick: () => w((m) => m - I),
902
902
  style: V,
903
- children: /* @__PURE__ */ t(Ue, { size: 16 })
903
+ children: /* @__PURE__ */ t(qe, { size: 16 })
904
904
  }
905
905
  ),
906
906
  /* @__PURE__ */ o(
907
907
  "button",
908
908
  {
909
909
  type: "button",
910
- onClick: () => P("days"),
910
+ onClick: () => _("days"),
911
911
  style: {
912
912
  background: "none",
913
913
  border: "none",
@@ -919,9 +919,9 @@ function Ja({
919
919
  padding: "2px 6px"
920
920
  },
921
921
  children: [
922
- T[0],
922
+ A[0],
923
923
  " – ",
924
- T[T.length - 1]
924
+ A[A.length - 1]
925
925
  ]
926
926
  }
927
927
  ),
@@ -929,7 +929,7 @@ function Ja({
929
929
  "button",
930
930
  {
931
931
  type: "button",
932
- onClick: () => w((m) => m + j),
932
+ onClick: () => w((m) => m + I),
933
933
  style: V,
934
934
  children: /* @__PURE__ */ t(Ie, { size: 16 })
935
935
  }
@@ -947,22 +947,22 @@ function Ja({
947
947
  gap: 3,
948
948
  marginBottom: 8
949
949
  },
950
- children: Ln.map((m, E) => {
951
- const Y = E + 1 === b;
950
+ children: Bn.map((m, D) => {
951
+ const q = D + 1 === b;
952
952
  return /* @__PURE__ */ t(
953
953
  "button",
954
954
  {
955
955
  type: "button",
956
- onClick: () => h(E + 1),
956
+ onClick: () => h(D + 1),
957
957
  style: {
958
958
  border: "none",
959
959
  cursor: "pointer",
960
960
  borderRadius: 6,
961
961
  fontSize: 11,
962
- fontWeight: Y ? 700 : 400,
962
+ fontWeight: q ? 700 : 400,
963
963
  padding: "4px 0",
964
- background: Y ? "var(--primary)" : "transparent",
965
- color: Y ? "var(--primary-fg, #ffffff)" : "var(--text-secondary)"
964
+ background: q ? "var(--primary)" : "transparent",
965
+ color: q ? "var(--primary-fg, #ffffff)" : "var(--text-secondary)"
966
966
  },
967
967
  children: m
968
968
  },
@@ -985,25 +985,25 @@ function Ja({
985
985
  gridTemplateColumns: "repeat(4,1fr)",
986
986
  gap: 3
987
987
  },
988
- children: T.map((m) => {
989
- const E = m === v;
988
+ children: A.map((m) => {
989
+ const D = m === v;
990
990
  return /* @__PURE__ */ t(
991
991
  "button",
992
992
  {
993
993
  type: "button",
994
994
  onClick: () => {
995
- u(m), P("days");
995
+ u(m), _("days");
996
996
  },
997
997
  style: {
998
998
  border: "none",
999
999
  cursor: "pointer",
1000
1000
  borderRadius: 6,
1001
1001
  fontSize: 12,
1002
- fontWeight: E ? 700 : 400,
1002
+ fontWeight: D ? 700 : 400,
1003
1003
  padding: "6px 0",
1004
- background: E ? "var(--primary)" : "transparent",
1005
- color: E ? "var(--primary-fg, #ffffff)" : "var(--text-main)",
1006
- outline: m === (/* @__PURE__ */ new Date()).getFullYear() && !E ? "2px solid var(--primary)" : "none",
1004
+ background: D ? "var(--primary)" : "transparent",
1005
+ color: D ? "var(--primary-fg, #ffffff)" : "var(--text-main)",
1006
+ outline: m === (/* @__PURE__ */ new Date()).getFullYear() && !D ? "2px solid var(--primary)" : "none",
1007
1007
  outlineOffset: "-2px"
1008
1008
  },
1009
1009
  children: m
@@ -1014,7 +1014,7 @@ function Ja({
1014
1014
  }
1015
1015
  )
1016
1016
  ] }),
1017
- C === "days" && /* @__PURE__ */ o(Se, { children: [
1017
+ C === "days" && /* @__PURE__ */ o(Ce, { children: [
1018
1018
  /* @__PURE__ */ t(
1019
1019
  "div",
1020
1020
  {
@@ -1023,7 +1023,7 @@ function Ja({
1023
1023
  gridTemplateColumns: "repeat(7,1fr)",
1024
1024
  padding: "6px 8px 0"
1025
1025
  },
1026
- children: Bn.map((m) => /* @__PURE__ */ t(
1026
+ children: An.map((m) => /* @__PURE__ */ t(
1027
1027
  "div",
1028
1028
  {
1029
1029
  style: {
@@ -1050,10 +1050,10 @@ function Ja({
1050
1050
  padding: "4px 8px 10px",
1051
1051
  gap: 2
1052
1052
  },
1053
- children: W.map((m, E) => {
1053
+ children: W.map((m, D) => {
1054
1054
  if (m === null)
1055
- return /* @__PURE__ */ t("div", { style: { aspectRatio: "1" } }, E);
1056
- const Y = Ct(v, b, m), X = Y === e, Z = Y === i, ae = !!(n && Y < n);
1055
+ return /* @__PURE__ */ t("div", { style: { aspectRatio: "1" } }, D);
1056
+ const q = Ct(v, b, m), X = q === e, Z = q === i, ae = !!(n && q < n);
1057
1057
  return /* @__PURE__ */ t(
1058
1058
  "button",
1059
1059
  {
@@ -1075,7 +1075,7 @@ function Ja({
1075
1075
  },
1076
1076
  children: m
1077
1077
  },
1078
- E
1078
+ D
1079
1079
  );
1080
1080
  })
1081
1081
  }
@@ -1100,7 +1100,7 @@ function Ja({
1100
1100
  children: [
1101
1101
  /* @__PURE__ */ o("span", { className: "inline-flex items-center gap-2 min-w-0", children: [
1102
1102
  /* @__PURE__ */ t(kt, { className: "w-4 h-4 text-[var(--text-muted)]" }),
1103
- /* @__PURE__ */ t("span", { className: "truncate", children: An(e) })
1103
+ /* @__PURE__ */ t("span", { className: "truncate", children: On(e) })
1104
1104
  ] }),
1105
1105
  /* @__PURE__ */ t(
1106
1106
  Ye,
@@ -1124,11 +1124,11 @@ function Ja({
1124
1124
  )
1125
1125
  ] }) : ne;
1126
1126
  }
1127
- const On = {
1127
+ const zn = {
1128
1128
  sm: "h-4 w-4",
1129
1129
  md: "h-5 w-5"
1130
1130
  };
1131
- function Qa({
1131
+ function to({
1132
1132
  label: e,
1133
1133
  description: r,
1134
1134
  error: n,
@@ -1151,7 +1151,7 @@ function Qa({
1151
1151
  type: "checkbox",
1152
1152
  disabled: d,
1153
1153
  "aria-invalid": !!n || s["aria-invalid"],
1154
- className: `peer ${On[a]} appearance-none rounded border border-[var(--border)] bg-[var(--bg-input)] transition-colors checked:border-[var(--primary)] checked:bg-[var(--primary)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--primary)]/40 ${i}`
1154
+ className: `peer ${zn[a]} appearance-none rounded border border-[var(--border)] bg-[var(--bg-input)] transition-colors checked:border-[var(--primary)] checked:bg-[var(--primary)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--primary)]/40 ${i}`
1155
1155
  }
1156
1156
  ),
1157
1157
  /* @__PURE__ */ t(Qe, { className: "pointer-events-none absolute left-1/2 top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 scale-75 text-[var(--primary-fg)] opacity-0 transition peer-checked:scale-100 peer-checked:opacity-100" })
@@ -1169,7 +1169,7 @@ function fr(e) {
1169
1169
  const r = document.createElement("textarea");
1170
1170
  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);
1171
1171
  }
1172
- async function zn(e) {
1172
+ async function In(e) {
1173
1173
  var r;
1174
1174
  if ((r = navigator.clipboard) != null && r.writeText) {
1175
1175
  await navigator.clipboard.writeText(e);
@@ -1177,7 +1177,7 @@ async function zn(e) {
1177
1177
  }
1178
1178
  fr(e);
1179
1179
  }
1180
- function In(e) {
1180
+ function jn(e) {
1181
1181
  return typeof e == "function" ? e() : e;
1182
1182
  }
1183
1183
  function pr({
@@ -1186,7 +1186,7 @@ function pr({
1186
1186
  title: n,
1187
1187
  copiedTitle: a = "Copiado",
1188
1188
  copiedLabel: i,
1189
- icon: c = /* @__PURE__ */ t(jr, { size: 14 }),
1189
+ icon: c = /* @__PURE__ */ t(Pr, { size: 14 }),
1190
1190
  copiedIcon: d = /* @__PURE__ */ t(Qe, { size: 14 }),
1191
1191
  stopPropagation: s = !0,
1192
1192
  onCopied: f,
@@ -1198,30 +1198,30 @@ function pr({
1198
1198
  type: u = "button",
1199
1199
  ...b
1200
1200
  }) {
1201
- const [h, C] = A(!1), P = J(null);
1202
- R(() => () => {
1203
- P.current && window.clearTimeout(P.current);
1201
+ const [h, C] = T(!1), _ = J(null);
1202
+ H(() => () => {
1203
+ _.current && window.clearTimeout(_.current);
1204
1204
  }, []);
1205
- function j(w) {
1206
- C(!0), f == null || f(w), P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
1207
- C(!1), P.current = null;
1205
+ function I(w) {
1206
+ C(!0), f == null || f(w), _.current && window.clearTimeout(_.current), _.current = window.setTimeout(() => {
1207
+ C(!1), _.current = null;
1208
1208
  }, r);
1209
1209
  }
1210
1210
  async function B(w) {
1211
- var T;
1211
+ var A;
1212
1212
  if (s && w.stopPropagation(), v == null || v(w), w.defaultPrevented) return;
1213
- const $ = In(e);
1213
+ const $ = jn(e);
1214
1214
  if ($)
1215
1215
  try {
1216
- await zn($), j($);
1217
- } catch (_) {
1216
+ await In($), I($);
1217
+ } catch (j) {
1218
1218
  try {
1219
- fr($), j($);
1220
- } catch (D) {
1221
- p == null || p(D, $);
1219
+ fr($), I($);
1220
+ } catch (M) {
1221
+ p == null || p(M, $);
1222
1222
  return;
1223
1223
  }
1224
- (T = navigator.clipboard) != null && T.writeText || p == null || p(_, $);
1224
+ (A = navigator.clipboard) != null && A.writeText || p == null || p(j, $);
1225
1225
  }
1226
1226
  }
1227
1227
  return /* @__PURE__ */ o(
@@ -1256,7 +1256,7 @@ function pr({
1256
1256
  }
1257
1257
  );
1258
1258
  }
1259
- function eo({
1259
+ function ro({
1260
1260
  code: e,
1261
1261
  children: r,
1262
1262
  title: n = "Codigo",
@@ -1326,7 +1326,7 @@ function eo({
1326
1326
  }
1327
1327
  );
1328
1328
  }
1329
- function Kt(e) {
1329
+ function Vt(e) {
1330
1330
  if (e !== void 0)
1331
1331
  return typeof e == "number" ? `${e}px` : e;
1332
1332
  }
@@ -1344,48 +1344,48 @@ function hr({
1344
1344
  searchable: k = !0,
1345
1345
  minOptionsForSearch: N = 6
1346
1346
  }) {
1347
- const [y, v] = A(!1), [u, b] = A(""), [h, C] = A(-1), [P, j] = A(!1), [B, w] = A({}), $ = J(null), T = J(null), _ = J(null), D = J(null), L = k && n.length >= N, H = n.find((m) => m.value === e) ?? null, z = L && u.trim() ? n.filter(
1347
+ const [y, v] = T(!1), [u, b] = T(""), [h, C] = T(-1), [_, I] = T(!1), [B, w] = T({}), $ = J(null), A = J(null), j = J(null), M = J(null), E = k && n.length >= N, P = n.find((m) => m.value === e) ?? null, z = E && u.trim() ? n.filter(
1348
1348
  (m) => {
1349
- var E;
1350
- return m.label.toLowerCase().includes(u.toLowerCase()) || ((E = m.sublabel) == null ? void 0 : E.toLowerCase().includes(u.toLowerCase()));
1349
+ var D;
1350
+ return m.label.toLowerCase().includes(u.toLowerCase()) || ((D = m.sublabel) == null ? void 0 : D.toLowerCase().includes(u.toLowerCase()));
1351
1351
  }
1352
- ) : n, W = $e(() => {
1352
+ ) : n, W = ve(() => {
1353
1353
  const m = $.current;
1354
1354
  if (!m) return;
1355
- const E = m.getBoundingClientRect(), Y = L ? 272 : 212, X = window.innerHeight - E.bottom, Z = X < Y && E.top > X;
1355
+ const D = m.getBoundingClientRect(), q = E ? 272 : 212, X = window.innerHeight - D.bottom, Z = X < q && D.top > X;
1356
1356
  w({
1357
1357
  position: "fixed",
1358
- left: E.left,
1359
- top: Z ? void 0 : E.bottom + 4,
1360
- bottom: Z ? window.innerHeight - E.top + 4 : void 0,
1361
- width: E.width,
1358
+ left: D.left,
1359
+ top: Z ? void 0 : D.bottom + 4,
1360
+ bottom: Z ? window.innerHeight - D.top + 4 : void 0,
1361
+ width: D.width,
1362
1362
  zIndex: 9999
1363
1363
  });
1364
- }, [L]);
1365
- R(() => j(!0), []), R(() => {
1364
+ }, [E]);
1365
+ H(() => I(!0), []), H(() => {
1366
1366
  if (!y) return;
1367
- function m(E) {
1367
+ function m(D) {
1368
1368
  var X, Z;
1369
- const Y = E.target;
1370
- !((X = $.current) != null && X.contains(Y)) && !((Z = T.current) != null && Z.contains(Y)) && (v(!1), b(""));
1369
+ const q = D.target;
1370
+ !((X = $.current) != null && X.contains(q)) && !((Z = A.current) != null && Z.contains(q)) && (v(!1), b(""));
1371
1371
  }
1372
1372
  return document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
1373
- }, [y]), R(() => {
1374
- y && (C(-1), W(), L && setTimeout(() => {
1373
+ }, [y]), H(() => {
1374
+ y && (C(-1), W(), E && setTimeout(() => {
1375
1375
  var m;
1376
- return (m = _.current) == null ? void 0 : m.focus();
1376
+ return (m = j.current) == null ? void 0 : m.focus();
1377
1377
  }, 0));
1378
- }, [y, L, W]), R(() => {
1378
+ }, [y, E, W]), H(() => {
1379
1379
  if (y)
1380
1380
  return window.addEventListener("resize", W), window.addEventListener("scroll", W, !0), () => {
1381
1381
  window.removeEventListener("resize", W), window.removeEventListener("scroll", W, !0);
1382
1382
  };
1383
- }, [y, W]), R(() => {
1384
- if (h < 0 || !D.current) return;
1385
- const m = D.current.children[h];
1383
+ }, [y, W]), H(() => {
1384
+ if (h < 0 || !M.current) return;
1385
+ const m = M.current.children[h];
1386
1386
  m == null || m.scrollIntoView({ block: "nearest" });
1387
1387
  }, [h]);
1388
- const F = $e(
1388
+ const F = ve(
1389
1389
  (m) => {
1390
1390
  r(m), v(!1), b("");
1391
1391
  },
@@ -1396,12 +1396,12 @@ function hr({
1396
1396
  (m.key === "Enter" || m.key === " " || m.key === "ArrowDown") && (m.preventDefault(), v(!0));
1397
1397
  return;
1398
1398
  }
1399
- m.key === "Escape" ? (m.preventDefault(), v(!1), b("")) : m.key === "ArrowDown" ? (m.preventDefault(), C((E) => Math.min(E + 1, z.length - 1))) : m.key === "ArrowUp" ? (m.preventDefault(), C((E) => Math.max(E - 1, i ? -1 : 0))) : m.key === "Enter" && (m.preventDefault(), h === -1 && i ? F("") : z[h] && F(z[h].value));
1399
+ m.key === "Escape" ? (m.preventDefault(), v(!1), b("")) : m.key === "ArrowDown" ? (m.preventDefault(), C((D) => Math.min(D + 1, z.length - 1))) : m.key === "ArrowUp" ? (m.preventDefault(), C((D) => Math.max(D - 1, i ? -1 : 0))) : m.key === "Enter" && (m.preventDefault(), h === -1 && i ? F("") : z[h] && F(z[h].value));
1400
1400
  }
1401
1401
  const ne = /* @__PURE__ */ o(
1402
1402
  "div",
1403
1403
  {
1404
- ref: T,
1404
+ ref: A,
1405
1405
  className: "rounded-xl shadow-xl overflow-hidden",
1406
1406
  style: {
1407
1407
  ...B,
@@ -1409,14 +1409,14 @@ function hr({
1409
1409
  border: "1px solid var(--border)"
1410
1410
  },
1411
1411
  children: [
1412
- L && /* @__PURE__ */ o(
1412
+ E && /* @__PURE__ */ o(
1413
1413
  "div",
1414
1414
  {
1415
1415
  className: "flex items-center gap-2 px-3 py-2",
1416
1416
  style: { borderBottom: "1px solid var(--border)" },
1417
1417
  children: [
1418
1418
  /* @__PURE__ */ t(
1419
- qe,
1419
+ Ge,
1420
1420
  {
1421
1421
  className: "w-3.5 h-3.5 flex-shrink-0",
1422
1422
  style: { color: "var(--text-muted)" }
@@ -1425,7 +1425,7 @@ function hr({
1425
1425
  /* @__PURE__ */ t(
1426
1426
  "input",
1427
1427
  {
1428
- ref: _,
1428
+ ref: j,
1429
1429
  value: u,
1430
1430
  onChange: (m) => {
1431
1431
  b(m.target.value), C(-1);
@@ -1443,7 +1443,7 @@ function hr({
1443
1443
  m.preventDefault(), b("");
1444
1444
  },
1445
1445
  children: /* @__PURE__ */ t(
1446
- Ne,
1446
+ ye,
1447
1447
  {
1448
1448
  className: "w-3.5 h-3.5",
1449
1449
  style: { color: "var(--text-muted)" }
@@ -1457,11 +1457,11 @@ function hr({
1457
1457
  /* @__PURE__ */ o(
1458
1458
  "ul",
1459
1459
  {
1460
- ref: D,
1460
+ ref: M,
1461
1461
  role: "listbox",
1462
1462
  className: "overflow-y-auto",
1463
1463
  style: {
1464
- maxHeight: L ? 220 : 180,
1464
+ maxHeight: E ? 220 : 180,
1465
1465
  scrollbarWidth: "thin",
1466
1466
  scrollbarColor: "var(--border) transparent",
1467
1467
  overscrollBehavior: "contain"
@@ -1485,8 +1485,8 @@ function hr({
1485
1485
  children: i
1486
1486
  }
1487
1487
  ),
1488
- z.map((m, E) => {
1489
- const X = E === h, Z = m.value === e;
1488
+ z.map((m, D) => {
1489
+ const X = D === h, Z = m.value === e;
1490
1490
  return /* @__PURE__ */ o(
1491
1491
  "li",
1492
1492
  {
@@ -1495,7 +1495,7 @@ function hr({
1495
1495
  onMouseDown: (ae) => {
1496
1496
  ae.preventDefault(), m.disabled || F(m.value);
1497
1497
  },
1498
- onMouseEnter: () => !m.disabled && C(E),
1498
+ onMouseEnter: () => !m.disabled && C(D),
1499
1499
  className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
1500
1500
  style: {
1501
1501
  background: X ? "var(--bg-hover)" : Z ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
@@ -1565,10 +1565,10 @@ function hr({
1565
1565
  onClick: () => !c && v((m) => !m),
1566
1566
  className: "flex w-full items-center gap-2 rounded-lg text-left text-sm transition-colors focus:outline-none",
1567
1567
  style: {
1568
- height: Kt(f),
1569
- padding: Kt(p),
1568
+ height: Vt(f),
1569
+ padding: Vt(p),
1570
1570
  background: "var(--bg-input)",
1571
- color: H ? "var(--text-main)" : "var(--text-muted)",
1571
+ color: P ? "var(--text-main)" : "var(--text-muted)",
1572
1572
  border: y ? "1px solid var(--primary)" : "1px solid var(--border)",
1573
1573
  opacity: c ? 0.5 : 1,
1574
1574
  cursor: c ? "not-allowed" : "pointer"
@@ -1576,25 +1576,25 @@ function hr({
1576
1576
  "aria-haspopup": "listbox",
1577
1577
  "aria-expanded": y,
1578
1578
  children: [
1579
- (H == null ? void 0 : H.color) && /* @__PURE__ */ t(
1579
+ (P == null ? void 0 : P.color) && /* @__PURE__ */ t(
1580
1580
  "span",
1581
1581
  {
1582
1582
  className: "flex-shrink-0 w-2.5 h-2.5 rounded-full",
1583
- style: { background: H.color }
1583
+ style: { background: P.color }
1584
1584
  }
1585
1585
  ),
1586
- /* @__PURE__ */ t("span", { className: "min-w-0 flex flex-1 items-baseline gap-1 overflow-hidden", children: H ? /* @__PURE__ */ o(Se, { children: [
1587
- /* @__PURE__ */ t("span", { className: "truncate", children: H.label }),
1588
- H.sublabel && /* @__PURE__ */ t(
1586
+ /* @__PURE__ */ t("span", { className: "min-w-0 flex flex-1 items-baseline gap-1 overflow-hidden", children: P ? /* @__PURE__ */ o(Ce, { children: [
1587
+ /* @__PURE__ */ t("span", { className: "truncate", children: P.label }),
1588
+ P.sublabel && /* @__PURE__ */ t(
1589
1589
  "span",
1590
1590
  {
1591
1591
  className: "min-w-0 flex-shrink truncate",
1592
1592
  style: { color: "var(--text-muted)", fontSize: 12 },
1593
- children: H.sublabel
1593
+ children: P.sublabel
1594
1594
  }
1595
1595
  )
1596
1596
  ] }) : /* @__PURE__ */ t("span", { className: "truncate", children: a }) }),
1597
- H && i ? /* @__PURE__ */ t(
1597
+ P && i ? /* @__PURE__ */ t(
1598
1598
  "span",
1599
1599
  {
1600
1600
  role: "button",
@@ -1604,7 +1604,7 @@ function hr({
1604
1604
  },
1605
1605
  className: "flex-shrink-0 rounded-full p-0.5 transition-colors hover:bg-black/10",
1606
1606
  style: { color: "var(--text-muted)" },
1607
- children: /* @__PURE__ */ t(Ne, { className: "w-3 h-3" })
1607
+ children: /* @__PURE__ */ t(ye, { className: "w-3 h-3" })
1608
1608
  }
1609
1609
  ) : /* @__PURE__ */ t(
1610
1610
  Ye,
@@ -1619,7 +1619,7 @@ function hr({
1619
1619
  ]
1620
1620
  }
1621
1621
  ),
1622
- y && P && Pe(ne, document.body)
1622
+ y && _ && Pe(ne, document.body)
1623
1623
  ]
1624
1624
  }
1625
1625
  );
@@ -1628,7 +1628,7 @@ function st(e) {
1628
1628
  if (e !== void 0)
1629
1629
  return typeof e == "number" ? `${e}px` : e;
1630
1630
  }
1631
- function to({
1631
+ function no({
1632
1632
  value: e,
1633
1633
  onChange: r,
1634
1634
  placeholder: n = "Buscar...",
@@ -1639,7 +1639,7 @@ function to({
1639
1639
  }) {
1640
1640
  return /* @__PURE__ */ o("div", { className: `relative ${a}`, children: [
1641
1641
  /* @__PURE__ */ t(
1642
- qe,
1642
+ Ge,
1643
1643
  {
1644
1644
  className: "absolute top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)] pointer-events-none",
1645
1645
  style: { left: st(d) }
@@ -1658,7 +1658,7 @@ function to({
1658
1658
  )
1659
1659
  ] });
1660
1660
  }
1661
- function ro({
1661
+ function ao({
1662
1662
  value: e,
1663
1663
  onChange: r,
1664
1664
  options: n,
@@ -1698,7 +1698,7 @@ function ro({
1698
1698
  )
1699
1699
  ] });
1700
1700
  }
1701
- const jn = {
1701
+ const Pn = {
1702
1702
  sm: "24rem",
1703
1703
  md: "28rem",
1704
1704
  lg: "32rem",
@@ -1707,7 +1707,7 @@ const jn = {
1707
1707
  "4xl": "56rem",
1708
1708
  "5xl": "64rem"
1709
1709
  }, it = 180;
1710
- function Pn({
1710
+ function Rn({
1711
1711
  open: e,
1712
1712
  onClose: r,
1713
1713
  title: n,
@@ -1726,37 +1726,37 @@ function Pn({
1726
1726
  bodyClassName: b = "px-6 py-5",
1727
1727
  panelClassName: h = "",
1728
1728
  backdropClassName: C = "bg-black/50 backdrop-blur-sm",
1729
- contentClassName: P = "p-4",
1730
- ariaLabel: j,
1729
+ contentClassName: _ = "p-4",
1730
+ ariaLabel: I,
1731
1731
  frameless: B = !1
1732
1732
  }) {
1733
- const [w, $] = A(!1), [T, _] = A(!1), D = J(null);
1734
- if (R(() => (e ? (D.current && clearTimeout(D.current), $(!0), requestAnimationFrame(() => requestAnimationFrame(() => _(!0)))) : (_(!1), D.current = setTimeout(
1733
+ const [w, $] = T(!1), [A, j] = T(!1), M = J(null);
1734
+ if (H(() => (e ? (M.current && clearTimeout(M.current), $(!0), requestAnimationFrame(() => requestAnimationFrame(() => j(!0)))) : (j(!1), M.current = setTimeout(
1735
1735
  () => $(!1),
1736
1736
  it + 40
1737
1737
  )), () => {
1738
- D.current && clearTimeout(D.current);
1739
- }), [e]), R(() => {
1738
+ M.current && clearTimeout(M.current);
1739
+ }), [e]), H(() => {
1740
1740
  if (e)
1741
1741
  return document.body.style.overflow = "hidden", () => {
1742
1742
  document.body.style.overflow = "";
1743
1743
  };
1744
- }, [e]), R(() => {
1744
+ }, [e]), H(() => {
1745
1745
  if (!e || !y) return;
1746
1746
  const V = (ne) => {
1747
1747
  ne.key === "Escape" && r();
1748
1748
  };
1749
1749
  return window.addEventListener("keydown", V), () => window.removeEventListener("keydown", V);
1750
1750
  }, [y, r, e]), !w) return null;
1751
- const L = n || a || i || c || v, H = p ?? jn[f], z = u === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", W = u === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl", F = T ? "translateY(0) scale(1)" : u === "bottom-mobile" ? "translateY(16px) scale(0.98)" : "translateY(10px) scale(0.96)";
1751
+ const E = n || a || i || c || v, P = p ?? Pn[f], z = u === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", W = u === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl", F = A ? "translateY(0) scale(1)" : u === "bottom-mobile" ? "translateY(16px) scale(0.98)" : "translateY(10px) scale(0.96)";
1752
1752
  return Pe(
1753
1753
  /* @__PURE__ */ o(
1754
1754
  "div",
1755
1755
  {
1756
1756
  role: "dialog",
1757
1757
  "aria-modal": "true",
1758
- "aria-label": j ?? n,
1759
- className: `fixed inset-0 flex ${z} ${P}`,
1758
+ "aria-label": I ?? n,
1759
+ className: `fixed inset-0 flex ${z} ${_}`,
1760
1760
  style: { zIndex: k },
1761
1761
  children: [
1762
1762
  /* @__PURE__ */ t(
@@ -1765,7 +1765,7 @@ function Pn({
1765
1765
  className: `absolute inset-0 ${C}`,
1766
1766
  onClick: N ? r : void 0,
1767
1767
  style: {
1768
- opacity: T ? 1 : 0,
1768
+ opacity: A ? 1 : 0,
1769
1769
  transition: `opacity ${it}ms ease`
1770
1770
  }
1771
1771
  }
@@ -1775,16 +1775,16 @@ function Pn({
1775
1775
  {
1776
1776
  className: `relative z-10 flex max-h-[92dvh] w-full flex-col overflow-hidden ${B ? "shadow-none" : "shadow-2xl"} ${W} ${h}`,
1777
1777
  style: {
1778
- maxWidth: H,
1778
+ maxWidth: P,
1779
1779
  background: B ? "transparent" : "var(--bg-card)",
1780
1780
  border: B ? "none" : "1px solid var(--border)",
1781
- opacity: T ? 1 : 0,
1781
+ opacity: A ? 1 : 0,
1782
1782
  transform: F,
1783
1783
  transition: `opacity ${it}ms ease, transform ${it}ms ease`
1784
1784
  },
1785
1785
  onClick: (V) => V.stopPropagation(),
1786
1786
  children: [
1787
- L && /* @__PURE__ */ o(
1787
+ E && /* @__PURE__ */ o(
1788
1788
  "div",
1789
1789
  {
1790
1790
  className: "flex flex-shrink-0 items-center justify-between gap-3 px-6 py-4",
@@ -1813,7 +1813,7 @@ function Pn({
1813
1813
  ] }),
1814
1814
  /* @__PURE__ */ o("div", { className: "flex flex-shrink-0 items-center gap-2", children: [
1815
1815
  c,
1816
- v && /* @__PURE__ */ t(xe, { variant: "icon", onClick: r, title: "Cerrar", children: /* @__PURE__ */ t(Ne, { className: "h-5 w-5" }) })
1816
+ v && /* @__PURE__ */ t(pe, { variant: "icon", onClick: r, title: "Cerrar", children: /* @__PURE__ */ t(ye, { className: "h-5 w-5" }) })
1817
1817
  ] })
1818
1818
  ]
1819
1819
  }
@@ -1836,7 +1836,7 @@ function Pn({
1836
1836
  document.body
1837
1837
  );
1838
1838
  }
1839
- const Rn = {
1839
+ const _n = {
1840
1840
  danger: {
1841
1841
  iconBg: "rgba(239,68,68,0.12)",
1842
1842
  iconColor: "var(--danger)",
@@ -1856,7 +1856,7 @@ const Rn = {
1856
1856
  btnColor: "#fff"
1857
1857
  }
1858
1858
  };
1859
- function no({
1859
+ function oo({
1860
1860
  open: e,
1861
1861
  title: r,
1862
1862
  description: n,
@@ -1866,9 +1866,9 @@ function no({
1866
1866
  onConfirm: d,
1867
1867
  onCancel: s
1868
1868
  }) {
1869
- const f = Rn[c];
1869
+ const f = _n[c];
1870
1870
  return /* @__PURE__ */ o(
1871
- Pn,
1871
+ Rn,
1872
1872
  {
1873
1873
  open: e,
1874
1874
  onClose: s,
@@ -1880,14 +1880,14 @@ function no({
1880
1880
  ariaLabel: r,
1881
1881
  children: [
1882
1882
  /* @__PURE__ */ t(
1883
- xe,
1883
+ pe,
1884
1884
  {
1885
1885
  variant: "icon",
1886
1886
  onClick: s,
1887
1887
  className: "absolute right-3 top-3 h-7 w-7 hover:opacity-70",
1888
1888
  style: { color: "var(--text-muted)" },
1889
1889
  "aria-label": "Cancelar",
1890
- children: /* @__PURE__ */ t(Ne, { className: "h-4 w-4" })
1890
+ children: /* @__PURE__ */ t(ye, { className: "h-4 w-4" })
1891
1891
  }
1892
1892
  ),
1893
1893
  /* @__PURE__ */ t(
@@ -1898,7 +1898,7 @@ function no({
1898
1898
  background: f.iconBg
1899
1899
  },
1900
1900
  children: /* @__PURE__ */ t(
1901
- ir,
1901
+ $t,
1902
1902
  {
1903
1903
  className: "h-5 w-5",
1904
1904
  style: { color: f.iconColor }
@@ -1917,7 +1917,7 @@ function no({
1917
1917
  n && /* @__PURE__ */ t("p", { className: "text-sm", style: { color: "var(--text-muted)" }, children: n }),
1918
1918
  /* @__PURE__ */ o("div", { className: "mt-6 flex gap-2", children: [
1919
1919
  /* @__PURE__ */ t(
1920
- xe,
1920
+ pe,
1921
1921
  {
1922
1922
  variant: "secondary",
1923
1923
  onClick: s,
@@ -1927,7 +1927,7 @@ function no({
1927
1927
  }
1928
1928
  ),
1929
1929
  /* @__PURE__ */ t(
1930
- xe,
1930
+ pe,
1931
1931
  {
1932
1932
  variant: "danger",
1933
1933
  onClick: d,
@@ -1945,30 +1945,30 @@ function no({
1945
1945
  }
1946
1946
  );
1947
1947
  }
1948
- function _n(e, r) {
1948
+ function Hn(e, r) {
1949
1949
  const n = typeof e == "function" ? e() : e;
1950
1950
  return r ? r(n) : n;
1951
1951
  }
1952
- function ao({
1952
+ function io({
1953
1953
  url: e,
1954
1954
  resolveUrl: r,
1955
1955
  title: n = "Copiar link",
1956
1956
  copiedTitle: a = "Link copiado",
1957
- icon: i = /* @__PURE__ */ t(Pr, { className: "h-3.5 w-3.5" }),
1957
+ icon: i = /* @__PURE__ */ t(Rr, { className: "h-3.5 w-3.5" }),
1958
1958
  ...c
1959
1959
  }) {
1960
1960
  return /* @__PURE__ */ t(
1961
1961
  pr,
1962
1962
  {
1963
1963
  ...c,
1964
- value: () => _n(e, r),
1964
+ value: () => Hn(e, r),
1965
1965
  title: n,
1966
1966
  copiedTitle: a,
1967
1967
  icon: i
1968
1968
  }
1969
1969
  );
1970
1970
  }
1971
- const Hn = "[&_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", Wn = [];
1971
+ const Wn = "[&_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", Fn = [];
1972
1972
  function Ze(e) {
1973
1973
  if (!e) return 150;
1974
1974
  const r = parseInt(e, 10);
@@ -1978,7 +1978,7 @@ function Oe(e, r) {
1978
1978
  const n = e.minWidth ?? 80, a = e.maxWidth ?? 1 / 0;
1979
1979
  return Math.min(a, Math.max(n, r));
1980
1980
  }
1981
- function Fn(e, r) {
1981
+ function Un(e, r) {
1982
1982
  if (r <= 7) return Array.from({ length: r }, (a, i) => i + 1);
1983
1983
  const n = [1];
1984
1984
  e > 3 && n.push("...");
@@ -2001,13 +2001,13 @@ function ze(e, r) {
2001
2001
  )) == null ? void 0 : d.key;
2002
2002
  return c ? a.filter((s) => s !== c) : [];
2003
2003
  }
2004
- function Vt({
2004
+ function Xt({
2005
2005
  children: e,
2006
2006
  className: r = "",
2007
2007
  style: n
2008
2008
  }) {
2009
2009
  return /* @__PURE__ */ t(
2010
- Et,
2010
+ Mt,
2011
2011
  {
2012
2012
  onlyWhenOverflow: !0,
2013
2013
  className: r,
@@ -2022,7 +2022,7 @@ function Vt({
2022
2022
  }
2023
2023
  );
2024
2024
  }
2025
- function oo({
2025
+ function so({
2026
2026
  columns: e,
2027
2027
  data: r,
2028
2028
  getRowId: n,
@@ -2041,71 +2041,71 @@ function oo({
2041
2041
  stickyHeader: b = !0,
2042
2042
  pageSize: h = 25,
2043
2043
  pageSizeOptions: C = [25, 50, 100],
2044
- pageSizeSelectWidth: P = 62,
2045
- pageSizeSelectHeight: j = 30,
2044
+ pageSizeSelectWidth: _ = 62,
2045
+ pageSizeSelectHeight: I = 30,
2046
2046
  pageSizeSelectPadding: B = "0 7px",
2047
2047
  totalRows: w,
2048
2048
  page: $,
2049
- onPageChange: T,
2050
- onPageSizeChange: _,
2051
- storageKey: D,
2052
- stickyFirstColumn: L = !1,
2053
- bottomOffset: H = 0,
2049
+ onPageChange: A,
2050
+ onPageSizeChange: j,
2051
+ storageKey: M,
2052
+ stickyFirstColumn: E = !1,
2053
+ bottomOffset: P = 0,
2054
2054
  compact: z = !0,
2055
2055
  restrictHeight: W = !0,
2056
2056
  minTableWidth: F,
2057
2057
  enableColumnVisibility: V = !0,
2058
2058
  hiddenColumnKeys: ne,
2059
- defaultHiddenColumnKeys: m = Wn,
2060
- onHiddenColumnKeysChange: E,
2061
- columnVisibilityLabel: Y = "Columnas"
2059
+ defaultHiddenColumnKeys: m = Fn,
2060
+ onHiddenColumnKeysChange: D,
2061
+ columnVisibilityLabel: q = "Columnas"
2062
2062
  }) {
2063
- const X = e.map((l) => l.key).join(","), [Z, ae] = A(!D), de = J(null), x = J(!D), G = ne !== void 0, [pe, te] = A(() => ze(m, e)), Q = ze(
2064
- G ? ne : pe,
2063
+ const X = e.map((l) => l.key).join(","), [Z, ae] = T(!M), de = J(null), x = J(!M), G = ne !== void 0, [he, te] = T(() => ze(m, e)), Q = ze(
2064
+ G ? ne : he,
2065
2065
  e
2066
- ), [O, K] = A(!1), [ee, se] = A(
2066
+ ), [O, K] = T(!1), [ee, se] = T(
2067
2067
  null
2068
- ), [he, q] = A(
2068
+ ), [be, Y] = T(
2069
2069
  {}
2070
- ), Ce = J(null), Le = J(null), [Ge, Re] = A(
2070
+ ), $e = J(null), Be = J(null), [Ke, Re] = T(
2071
2071
  r.length > 0 || a || s === !1
2072
- ), Ke = (l, g) => 50 + (l * 17 + g * 13 + 7) % 40, oe = J(null), [_e, et] = A(
2072
+ ), Ve = (l, g) => 50 + (l * 17 + g * 13 + 7) % 40, oe = J(null), [_e, et] = T(
2073
2073
  void 0
2074
- ), [He, tt] = A(!1);
2075
- R(() => {
2074
+ ), [He, tt] = T(!1);
2075
+ H(() => {
2076
2076
  const g = h !== !1 ? 32 : 0, S = 12;
2077
- function I() {
2077
+ function R() {
2078
2078
  if (tt(window.innerWidth < 640), !oe.current) return;
2079
2079
  const U = oe.current.getBoundingClientRect().top;
2080
2080
  et(
2081
2081
  Math.max(
2082
2082
  120,
2083
- window.innerHeight - U - g - S - H
2083
+ window.innerHeight - U - g - S - P
2084
2084
  )
2085
2085
  );
2086
2086
  }
2087
- return I(), window.addEventListener("resize", I), () => window.removeEventListener("resize", I);
2088
- }, [a, h, H]), R(() => {
2087
+ return R(), window.addEventListener("resize", R), () => window.removeEventListener("resize", R);
2088
+ }, [a, h, P]), H(() => {
2089
2089
  if (s === !1 || a || r.length > 0) {
2090
2090
  Re(!0);
2091
2091
  return;
2092
2092
  }
2093
- if (Ge) return;
2093
+ if (Ke) return;
2094
2094
  const l = window.setTimeout(() => {
2095
2095
  Re(!0);
2096
2096
  }, s);
2097
2097
  return () => window.clearTimeout(l);
2098
- }, [r.length, s, Ge, a]);
2099
- const [Ee, Me] = A(
2098
+ }, [r.length, s, Ke, a]);
2099
+ const [Ee, Me] = T(
2100
2100
  () => e.map((l) => l.key)
2101
- ), [M, le] = A(
2101
+ ), [L, le] = T(
2102
2102
  () => Object.fromEntries(
2103
2103
  e.map((l) => [l.key, Oe(l, Ze(l.width))])
2104
2104
  )
2105
2105
  );
2106
- R(() => {
2106
+ H(() => {
2107
2107
  const l = e.map((S) => S.key);
2108
- if (!D) {
2108
+ if (!M) {
2109
2109
  Me(l), G || te(
2110
2110
  ze(m, e)
2111
2111
  ), x.current = !1, ae(!0);
@@ -2113,20 +2113,20 @@ function oo({
2113
2113
  }
2114
2114
  let g = !1;
2115
2115
  return x.current = !1, ae(!1), fetch(
2116
- `/api/user/preferences/datatables?key=${encodeURIComponent(D)}`,
2116
+ `/api/user/preferences/datatables?key=${encodeURIComponent(M)}`,
2117
2117
  { cache: "no-store" }
2118
2118
  ).then((S) => S.ok ? S.json() : null).then((S) => {
2119
- var ot, Pt, Rt;
2119
+ var ot, Rt, _t;
2120
2120
  if (g) return;
2121
- const I = (ot = S == null ? void 0 : S.settings) == null ? void 0 : ot.columnOrder, U = Array.isArray(I) ? I.filter((ve) => l.includes(ve)) : [], ie = l.filter((ve) => !U.includes(ve)), ce = U.length > 0 ? [...U, ...ie] : l, Ae = Object.fromEntries(
2122
- e.map((ve) => [ve.key, Oe(ve, Ze(ve.width))])
2123
- ), re = ((Pt = S == null ? void 0 : S.settings) == null ? void 0 : Pt.columnWidths) ?? {}, fe = Object.fromEntries(
2124
- e.map((ve) => [
2125
- ve.key,
2126
- Oe(ve, re[ve.key] ?? Ae[ve.key])
2121
+ const R = (ot = S == null ? void 0 : S.settings) == null ? void 0 : ot.columnOrder, U = Array.isArray(R) ? R.filter((ge) => l.includes(ge)) : [], ie = l.filter((ge) => !U.includes(ge)), ce = U.length > 0 ? [...U, ...ie] : l, Te = Object.fromEntries(
2122
+ e.map((ge) => [ge.key, Oe(ge, Ze(ge.width))])
2123
+ ), re = ((Rt = S == null ? void 0 : S.settings) == null ? void 0 : Rt.columnWidths) ?? {}, fe = Object.fromEntries(
2124
+ e.map((ge) => [
2125
+ ge.key,
2126
+ Oe(ge, re[ge.key] ?? Te[ge.key])
2127
2127
  ])
2128
2128
  ), at = ze(
2129
- ((Rt = S == null ? void 0 : S.settings) == null ? void 0 : Rt.hiddenColumnKeys) ?? m,
2129
+ ((_t = S == null ? void 0 : S.settings) == null ? void 0 : _t.hiddenColumnKeys) ?? m,
2130
2130
  e
2131
2131
  );
2132
2132
  Me(ce), le(fe), G || te(at), de.current = JSON.stringify({
@@ -2144,14 +2144,14 @@ function oo({
2144
2144
  ])
2145
2145
  );
2146
2146
  le(S);
2147
- const I = ze(
2147
+ const R = ze(
2148
2148
  m,
2149
2149
  e
2150
2150
  );
2151
- G || te(I), de.current = JSON.stringify({
2151
+ G || te(R), de.current = JSON.stringify({
2152
2152
  columnOrder: l,
2153
2153
  columnWidths: S,
2154
- hiddenColumnKeys: I
2154
+ hiddenColumnKeys: R
2155
2155
  }), x.current = !0;
2156
2156
  }
2157
2157
  }).finally(() => {
@@ -2160,16 +2160,16 @@ function oo({
2160
2160
  g = !0;
2161
2161
  };
2162
2162
  }, [
2163
- D,
2163
+ M,
2164
2164
  X,
2165
2165
  e,
2166
2166
  m,
2167
2167
  G
2168
- ]), R(() => {
2169
- if (!D || !Z || !x.current) return;
2168
+ ]), H(() => {
2169
+ if (!M || !Z || !x.current) return;
2170
2170
  const l = {
2171
2171
  columnOrder: Ee,
2172
- columnWidths: M,
2172
+ columnWidths: L,
2173
2173
  hiddenColumnKeys: Q
2174
2174
  }, g = JSON.stringify(l);
2175
2175
  if (g === de.current) return;
@@ -2177,27 +2177,27 @@ function oo({
2177
2177
  fetch("/api/user/preferences/datatables", {
2178
2178
  method: "PATCH",
2179
2179
  headers: { "Content-Type": "application/json" },
2180
- body: JSON.stringify({ key: D, settings: l })
2181
- }).then((I) => {
2182
- I.ok && (de.current = g);
2180
+ body: JSON.stringify({ key: M, settings: l })
2181
+ }).then((R) => {
2182
+ R.ok && (de.current = g);
2183
2183
  }).catch(() => {
2184
2184
  });
2185
2185
  }, 300);
2186
2186
  return () => window.clearTimeout(S);
2187
- }, [Ee, M, Q, D, Z]), R(() => {
2187
+ }, [Ee, L, Q, M, Z]), H(() => {
2188
2188
  Me((l) => {
2189
- const g = e.map((U) => U.key), S = l.filter((U) => g.includes(U)), I = g.filter((U) => !S.includes(U));
2190
- return [...S, ...I];
2189
+ const g = e.map((U) => U.key), S = l.filter((U) => g.includes(U)), R = g.filter((U) => !S.includes(U));
2190
+ return [...S, ...R];
2191
2191
  });
2192
2192
  }, [X, e]);
2193
- const ue = Ee.map((l) => e.find((g) => g.key === l)).filter((l) => !!l), be = ue.filter(
2193
+ const ue = Ee.map((l) => e.find((g) => g.key === l)).filter((l) => !!l), xe = ue.filter(
2194
2194
  (l) => !Q.includes(l.key)
2195
2195
  );
2196
2196
  function me(l) {
2197
2197
  const g = ze(l, e);
2198
- G || te(g), E == null || E(g);
2198
+ G || te(g), D == null || D(g);
2199
2199
  }
2200
- function Ve(l) {
2200
+ function Xe(l) {
2201
2201
  me(
2202
2202
  Q.includes(l) ? Q.filter((g) => g !== l) : [...Q, l]
2203
2203
  );
@@ -2205,17 +2205,17 @@ function oo({
2205
2205
  function We() {
2206
2206
  me([]);
2207
2207
  }
2208
- const ut = we.useCallback(
2209
- (l = Le.current) => {
2208
+ const ut = ke.useCallback(
2209
+ (l = Be.current) => {
2210
2210
  if (!l) return;
2211
- const g = l.getBoundingClientRect(), S = 256, I = Math.min(
2211
+ const g = l.getBoundingClientRect(), S = 256, R = Math.min(
2212
2212
  Math.max(8, g.right - S),
2213
2213
  window.innerWidth - S - 8
2214
2214
  ), U = window.innerHeight - g.bottom, ie = U < 288 && g.top > U ? void 0 : g.bottom + 6, ce = ie === void 0 ? window.innerHeight - g.top + 6 : void 0;
2215
- q({
2215
+ Y({
2216
2216
  position: "fixed",
2217
2217
  zIndex: 9999,
2218
- left: I,
2218
+ left: R,
2219
2219
  top: ie,
2220
2220
  bottom: ce,
2221
2221
  width: S
@@ -2225,14 +2225,14 @@ function oo({
2225
2225
  );
2226
2226
  function yr(l, g) {
2227
2227
  l.preventDefault(), l.stopPropagation();
2228
- const S = Le.current === l.currentTarget && ee === g;
2228
+ const S = Be.current === l.currentTarget && ee === g;
2229
2229
  if (O && S) {
2230
2230
  K(!1), se(null);
2231
2231
  return;
2232
2232
  }
2233
- Le.current = l.currentTarget, se(g), ut(l.currentTarget), K(!0);
2233
+ Be.current = l.currentTarget, se(g), ut(l.currentTarget), K(!0);
2234
2234
  }
2235
- R(() => {
2235
+ H(() => {
2236
2236
  le((l) => {
2237
2237
  const g = Object.fromEntries(
2238
2238
  e.map((S) => [S.key, Oe(S, Ze(S.width))])
@@ -2244,18 +2244,18 @@ function oo({
2244
2244
  ])
2245
2245
  );
2246
2246
  });
2247
- }, [X, e]), R(() => {
2247
+ }, [X, e]), H(() => {
2248
2248
  G || te(
2249
2249
  (l) => ze(l, e)
2250
2250
  );
2251
- }, [X, e, G]), R(() => {
2252
- function l(I) {
2251
+ }, [X, e, G]), H(() => {
2252
+ function l(R) {
2253
2253
  var ie, ce;
2254
- const U = I.target;
2255
- !((ie = Ce.current) != null && ie.contains(U)) && !((ce = Le.current) != null && ce.contains(U)) && (K(!1), se(null));
2254
+ const U = R.target;
2255
+ !((ie = $e.current) != null && ie.contains(U)) && !((ce = Be.current) != null && ce.contains(U)) && (K(!1), se(null));
2256
2256
  }
2257
- function g(I) {
2258
- I.key === "Escape" && (K(!1), se(null));
2257
+ function g(R) {
2258
+ R.key === "Escape" && (K(!1), se(null));
2259
2259
  }
2260
2260
  function S() {
2261
2261
  ut();
@@ -2265,14 +2265,14 @@ function oo({
2265
2265
  };
2266
2266
  }, [O, ut]);
2267
2267
  const rt = J(null);
2268
- R(() => {
2268
+ H(() => {
2269
2269
  function l(S) {
2270
- const I = rt.current;
2271
- if (!I) return;
2272
- const U = S.clientX - I.startX, ie = e.find((ce) => ce.key === I.colKey);
2270
+ const R = rt.current;
2271
+ if (!R) return;
2272
+ const U = S.clientX - R.startX, ie = e.find((ce) => ce.key === R.colKey);
2273
2273
  ie && le((ce) => ({
2274
2274
  ...ce,
2275
- [I.colKey]: Oe(ie, I.startWidth + U)
2275
+ [R.colKey]: Oe(ie, R.startWidth + U)
2276
2276
  }));
2277
2277
  }
2278
2278
  function g() {
@@ -2282,76 +2282,76 @@ function oo({
2282
2282
  document.removeEventListener("pointermove", l), document.removeEventListener("pointerup", g);
2283
2283
  };
2284
2284
  }, [e]);
2285
- const nt = J(null), [Mt, mt] = A(null);
2285
+ const nt = J(null), [Dt, mt] = T(null);
2286
2286
  function wr(l, g) {
2287
2287
  nt.current = Ee.indexOf(l), g.dataTransfer.effectAllowed = "move";
2288
2288
  }
2289
2289
  function Nr(l, g) {
2290
2290
  g.preventDefault(), g.dataTransfer.dropEffect = "move";
2291
2291
  const S = Ee.indexOf(l);
2292
- Mt !== S && mt(S);
2292
+ Dt !== S && mt(S);
2293
2293
  }
2294
2294
  function kr(l, g) {
2295
2295
  g.preventDefault();
2296
- const S = nt.current, I = Ee.indexOf(l);
2297
- S !== null && S !== I && Me((U) => {
2296
+ const S = nt.current, R = Ee.indexOf(l);
2297
+ S !== null && S !== R && Me((U) => {
2298
2298
  const ie = [...U], [ce] = ie.splice(S, 1);
2299
- return ie.splice(I, 0, ce), ie;
2299
+ return ie.splice(R, 0, ce), ie;
2300
2300
  }), nt.current = null, mt(null);
2301
2301
  }
2302
2302
  function Sr() {
2303
2303
  nt.current = null, mt(null);
2304
2304
  }
2305
- const [ge, Dt] = A(null);
2305
+ const [we, Lt] = T(null);
2306
2306
  function Cr(l) {
2307
- l.sortKey && Dt(
2307
+ l.sortKey && Lt(
2308
2308
  (g) => (g == null ? void 0 : g.key) === l.key ? { key: l.key, dir: g.dir === "asc" ? "desc" : "asc" } : { key: l.key, dir: "asc" }
2309
2309
  );
2310
2310
  }
2311
- const [$r, ft] = A(1), [Lt, Er] = A(
2311
+ const [$r, ft] = T(1), [Bt, Er] = T(
2312
2312
  h === !1 ? 0 : h
2313
2313
  );
2314
- R(() => {
2314
+ H(() => {
2315
2315
  ft(1);
2316
2316
  }, [r]);
2317
- const Fe = !!(T && _), Be = h !== !1, ye = Fe ? $ ?? 1 : $r, Te = Fe || Be ? Lt : r.length, ke = !!p && !!k && !!N, pt = ke ? 40 : 0, Mr = ke && r.length > 0 && p.size === r.length, Dr = ke && p.size > 0 && p.size < r.length, ht = we.useMemo(() => {
2318
- if (!ge) return r;
2319
- const l = e.find((g) => g.key === ge.key && g.sortKey);
2317
+ const Fe = !!(A && j), Ae = h !== !1, Ne = Fe ? $ ?? 1 : $r, De = Fe || Ae ? Bt : r.length, Se = !!p && !!k && !!N, pt = Se ? 40 : 0, Mr = Se && r.length > 0 && p.size === r.length, Dr = Se && p.size > 0 && p.size < r.length, ht = ke.useMemo(() => {
2318
+ if (!we) return r;
2319
+ const l = e.find((g) => g.key === we.key && g.sortKey);
2320
2320
  return l != null && l.sortKey ? [...r].sort((g, S) => {
2321
- const I = g[l.sortKey], U = S[l.sortKey], ie = I === U ? 0 : I == null ? 1 : U == null || I < U ? -1 : 1;
2322
- return ge.dir === "asc" ? ie : -ie;
2321
+ const R = g[l.sortKey], U = S[l.sortKey], ie = R === U ? 0 : R == null ? 1 : U == null || R < U ? -1 : 1;
2322
+ return we.dir === "asc" ? ie : -ie;
2323
2323
  }) : r;
2324
- }, [r, ge, e]), Bt = we.useMemo(() => {
2325
- if (Fe || !Be) return ht;
2326
- const l = (ye - 1) * Te;
2327
- return ht.slice(l, l + Te);
2328
- }, [ht, Fe, Be, ye, Te]), Xe = w ?? r.length, bt = Be ? Math.max(1, Math.ceil(Xe / Te)) : 1, Lr = Be ? (ye - 1) * Te + 1 : 1, Br = Be ? Math.min(ye * Te, Xe) : Xe;
2324
+ }, [r, we, e]), At = ke.useMemo(() => {
2325
+ if (Fe || !Ae) return ht;
2326
+ const l = (Ne - 1) * De;
2327
+ return ht.slice(l, l + De);
2328
+ }, [ht, Fe, Ae, Ne, De]), Ue = w ?? r.length, bt = Ae ? Math.max(1, Math.ceil(Ue / De)) : 1, Lr = Ae && Ue > De, Br = Ae ? (Ne - 1) * De + 1 : 1, Ar = Ae ? Math.min(Ne * De, Ue) : Ue;
2329
2329
  function xt(l) {
2330
2330
  const g = Math.max(1, Math.min(l, bt));
2331
- Fe ? T(g) : ft(g);
2331
+ Fe ? A(g) : ft(g);
2332
2332
  }
2333
2333
  function Tr(l) {
2334
- Er(l), Fe ? (_(l), T(1)) : ft(1), _ && _(l);
2334
+ Er(l), Fe ? (j(l), A(1)) : ft(1), j && j(l);
2335
2335
  }
2336
- const Tt = (l) => l === "center" ? "text-center" : l === "right" ? "text-right" : "text-left", Ar = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))", Or = be.length + (ke ? 1 : 0);
2337
- R(() => {
2338
- ge && Q.includes(ge.key) && Dt(null);
2339
- }, [Q, ge]);
2340
- function At(l) {
2336
+ const Tt = (l) => l === "center" ? "text-center" : l === "right" ? "text-right" : "text-left", Or = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))", zr = xe.length + (Se ? 1 : 0);
2337
+ H(() => {
2338
+ we && Q.includes(we.key) && Lt(null);
2339
+ }, [Q, we]);
2340
+ function Ot(l) {
2341
2341
  return l ? typeof l == "string" ? { key: l, label: l } : l : null;
2342
2342
  }
2343
- const Ot = () => /* @__PURE__ */ o(
2343
+ const zt = () => /* @__PURE__ */ o(
2344
2344
  "tr",
2345
2345
  {
2346
2346
  style: {
2347
2347
  background: "color-mix(in srgb, var(--bg-input) 72%, transparent)"
2348
2348
  },
2349
2349
  children: [
2350
- ke && /* @__PURE__ */ t(
2350
+ Se && /* @__PURE__ */ t(
2351
2351
  "th",
2352
2352
  {
2353
2353
  className: `${z ? "px-2 py-1.5" : "px-3 py-2.5"} w-10`,
2354
- style: L ? {
2354
+ style: E ? {
2355
2355
  position: "sticky",
2356
2356
  left: 0,
2357
2357
  zIndex: 12,
@@ -2378,12 +2378,12 @@ function oo({
2378
2378
  )
2379
2379
  }
2380
2380
  ),
2381
- be.map((l, g) => {
2382
- const S = (ge == null ? void 0 : ge.key) === l.key, I = !!l.sortKey, U = L && !He && g === 0, ie = Mt === g, Ae = (M[l.key] ?? Ze(l.width)) < 120;
2381
+ xe.map((l, g) => {
2382
+ const S = (we == null ? void 0 : we.key) === l.key, R = !!l.sortKey, U = E && !He && g === 0, ie = Dt === g, Te = (L[l.key] ?? Ze(l.width)) < 120;
2383
2383
  return /* @__PURE__ */ o(
2384
2384
  "th",
2385
2385
  {
2386
- className: `group select-none ${Ae ? "text-left" : Tt(l.align)}`,
2386
+ className: `group select-none ${Te ? "text-left" : Tt(l.align)}`,
2387
2387
  style: {
2388
2388
  ...U ? {
2389
2389
  position: "sticky",
@@ -2403,13 +2403,13 @@ function oo({
2403
2403
  whiteSpace: "nowrap",
2404
2404
  transition: "color 0.15s",
2405
2405
  borderLeft: ie ? "2px solid var(--primary)" : "2px solid transparent",
2406
- cursor: I ? "pointer" : "default",
2406
+ cursor: R ? "pointer" : "default",
2407
2407
  // Padding: room for grip icon left, column menu and resize handle right.
2408
2408
  padding: V ? z ? "5px 48px 5px 6px" : "7px 52px 7px 6px" : z ? "5px 24px 5px 6px" : "7px 28px 7px 6px"
2409
2409
  },
2410
2410
  onDragOver: (re) => Nr(l.key, re),
2411
2411
  onDrop: (re) => kr(l.key, re),
2412
- onClick: I ? () => Cr(l) : void 0,
2412
+ onClick: R ? () => Cr(l) : void 0,
2413
2413
  children: [
2414
2414
  /* @__PURE__ */ t(
2415
2415
  "span",
@@ -2429,16 +2429,16 @@ function oo({
2429
2429
  color: "var(--text-muted)",
2430
2430
  verticalAlign: "middle"
2431
2431
  },
2432
- children: /* @__PURE__ */ t(ln, { size: 15 })
2432
+ children: /* @__PURE__ */ t(cn, { size: 15 })
2433
2433
  }
2434
2434
  ),
2435
2435
  /* @__PURE__ */ t(
2436
- Vt,
2436
+ Xt,
2437
2437
  {
2438
2438
  className: "inline-block max-w-full align-middle",
2439
2439
  style: {
2440
2440
  width: V ? "calc(100% - 42px)" : "calc(100% - 22px)",
2441
- textAlign: Ae ? "left" : l.align === "center" ? "center" : l.align === "right" ? "right" : "left"
2441
+ textAlign: Te ? "left" : l.align === "center" ? "center" : l.align === "right" ? "right" : "left"
2442
2442
  },
2443
2443
  children: /* @__PURE__ */ o(
2444
2444
  "span",
@@ -2446,7 +2446,7 @@ function oo({
2446
2446
  className: `inline-flex max-w-full items-center gap-1 font-semibold uppercase tracking-wider ${z ? "text-[11px]" : "text-xs"}`,
2447
2447
  children: [
2448
2448
  /* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: l.header }),
2449
- I && /* @__PURE__ */ t("span", { className: "flex-shrink-0 opacity-60", children: S ? ge.dir === "asc" ? /* @__PURE__ */ t(Rr, { className: "w-3 h-3" }) : /* @__PURE__ */ t(Ye, { className: "w-3 h-3" }) : /* @__PURE__ */ t(_r, { className: "w-3 h-3 opacity-40" }) })
2449
+ R && /* @__PURE__ */ t("span", { className: "flex-shrink-0 opacity-60", children: S ? we.dir === "asc" ? /* @__PURE__ */ t(_r, { className: "w-3 h-3" }) : /* @__PURE__ */ t(Ye, { className: "w-3 h-3" }) : /* @__PURE__ */ t(Hr, { className: "w-3 h-3 opacity-40" }) })
2450
2450
  ]
2451
2451
  }
2452
2452
  )
@@ -2458,12 +2458,12 @@ function oo({
2458
2458
  type: "button",
2459
2459
  "aria-haspopup": "menu",
2460
2460
  "aria-expanded": O && ee === l.key,
2461
- "aria-label": Y,
2462
- title: Y,
2461
+ "aria-label": q,
2462
+ title: q,
2463
2463
  onClick: (re) => yr(re, l.key),
2464
2464
  className: `absolute top-1/2 right-3 inline-flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded-md opacity-0 transition-colors transition-opacity hover:bg-[var(--bg-card)] group-hover:opacity-100 focus:opacity-100 ${O && ee === l.key ? "opacity-100" : ""}`,
2465
2465
  style: { color: "var(--text-muted)", zIndex: 4 },
2466
- children: /* @__PURE__ */ t(Hr, { className: "h-4 w-4" })
2466
+ children: /* @__PURE__ */ t(Wr, { className: "h-4 w-4" })
2467
2467
  }
2468
2468
  ),
2469
2469
  /* @__PURE__ */ t(
@@ -2476,7 +2476,7 @@ function oo({
2476
2476
  re.preventDefault(), re.stopPropagation(), rt.current = {
2477
2477
  colKey: l.key,
2478
2478
  startX: re.clientX,
2479
- startWidth: M[l.key] ?? 150
2479
+ startWidth: L[l.key] ?? 150
2480
2480
  }, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
2481
2481
  },
2482
2482
  onClick: (re) => re.stopPropagation(),
@@ -2503,7 +2503,7 @@ function oo({
2503
2503
  })
2504
2504
  ]
2505
2505
  }
2506
- ), zt = () => {
2506
+ ), It = () => {
2507
2507
  if (!V || !O || typeof document > "u")
2508
2508
  return null;
2509
2509
  const l = Q.length;
@@ -2511,17 +2511,17 @@ function oo({
2511
2511
  /* @__PURE__ */ o(
2512
2512
  "div",
2513
2513
  {
2514
- ref: Ce,
2514
+ ref: $e,
2515
2515
  role: "menu",
2516
2516
  className: "overflow-hidden rounded-lg border p-1 shadow-xl",
2517
2517
  style: {
2518
- ...he,
2518
+ ...be,
2519
2519
  borderColor: "var(--border)",
2520
2520
  background: "var(--bg-card)"
2521
2521
  },
2522
2522
  children: [
2523
2523
  /* @__PURE__ */ o("div", { className: "flex items-center justify-between gap-2 border-b border-[var(--border)] px-2 py-1.5", children: [
2524
- /* @__PURE__ */ t("span", { className: "min-w-0 truncate text-xs font-semibold uppercase text-[var(--text-muted)]", children: l > 0 ? `${be.length} de ${e.length} visibles` : `${e.length} visibles` }),
2524
+ /* @__PURE__ */ t("span", { className: "min-w-0 truncate text-xs font-semibold uppercase text-[var(--text-muted)]", children: l > 0 ? `${xe.length} de ${e.length} visibles` : `${e.length} visibles` }),
2525
2525
  /* @__PURE__ */ t(
2526
2526
  "button",
2527
2527
  {
@@ -2534,7 +2534,7 @@ function oo({
2534
2534
  )
2535
2535
  ] }),
2536
2536
  /* @__PURE__ */ t("div", { className: "max-h-72 overflow-auto py-1", children: ue.map((g) => {
2537
- const S = !Q.includes(g.key), U = !(g.hideable !== !1) || S && be.length <= 1;
2537
+ const S = !Q.includes(g.key), U = !(g.hideable !== !1) || S && xe.length <= 1;
2538
2538
  return /* @__PURE__ */ o(
2539
2539
  "button",
2540
2540
  {
@@ -2542,7 +2542,7 @@ function oo({
2542
2542
  role: "menuitemcheckbox",
2543
2543
  "aria-checked": S,
2544
2544
  disabled: U,
2545
- onClick: () => Ve(g.key),
2545
+ onClick: () => Xe(g.key),
2546
2546
  className: "flex w-full min-w-0 items-center gap-2 rounded-md px-2.5 py-1.5 text-left transition-colors hover:bg-[var(--bg-input)] disabled:cursor-not-allowed disabled:opacity-50",
2547
2547
  style: { color: "var(--text-main)" },
2548
2548
  children: [
@@ -2569,9 +2569,9 @@ function oo({
2569
2569
  ),
2570
2570
  document.body
2571
2571
  );
2572
- }, It = () => {
2573
- if (!Be || a) return null;
2574
- const l = Fn(ye, bt);
2572
+ }, jt = () => {
2573
+ if (!Lr || a) return null;
2574
+ const l = Un(Ne, bt);
2575
2575
  return /* @__PURE__ */ o(
2576
2576
  "div",
2577
2577
  {
@@ -2579,13 +2579,13 @@ function oo({
2579
2579
  style: { borderColor: "var(--border)", background: "var(--bg-input)" },
2580
2580
  children: [
2581
2581
  /* @__PURE__ */ o("div", { className: "flex min-w-0 items-center gap-2", children: [
2582
- /* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: Xe === 0 ? "0 filas" : `${Lr}–${Br} de ${Xe}` }),
2582
+ /* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: Ue === 0 ? "0 filas" : `${Br}–${Ar} de ${Ue}` }),
2583
2583
  /* @__PURE__ */ o("div", { className: "flex items-center gap-1", children: [
2584
2584
  /* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: "Filas:" }),
2585
2585
  /* @__PURE__ */ t(
2586
2586
  hr,
2587
2587
  {
2588
- value: String(Te),
2588
+ value: String(De),
2589
2589
  onChange: (g) => Tr(Number(g)),
2590
2590
  options: C.map((g) => ({
2591
2591
  value: String(g),
@@ -2593,10 +2593,10 @@ function oo({
2593
2593
  })),
2594
2594
  placeholder: "Filas",
2595
2595
  searchable: !1,
2596
- height: j,
2596
+ height: I,
2597
2597
  padding: B,
2598
2598
  className: "shrink-0 [&>button]:rounded-md [&>button]:text-xs [&_svg]:h-3.5 [&_svg]:w-3.5",
2599
- style: { width: P }
2599
+ style: { width: _ }
2600
2600
  }
2601
2601
  )
2602
2602
  ] })
@@ -2605,11 +2605,11 @@ function oo({
2605
2605
  /* @__PURE__ */ t(
2606
2606
  "button",
2607
2607
  {
2608
- disabled: ye <= 1,
2609
- onClick: () => xt(ye - 1),
2608
+ disabled: Ne <= 1,
2609
+ onClick: () => xt(Ne - 1),
2610
2610
  className: "rounded p-0.5 transition-colors disabled:opacity-30",
2611
2611
  style: { color: "var(--text-muted)", background: "transparent" },
2612
- children: /* @__PURE__ */ t(Ue, { className: "h-3.5 w-3.5" })
2612
+ children: /* @__PURE__ */ t(qe, { className: "h-3.5 w-3.5" })
2613
2613
  }
2614
2614
  ),
2615
2615
  l.map(
@@ -2627,8 +2627,8 @@ function oo({
2627
2627
  onClick: () => xt(g),
2628
2628
  className: "h-5 w-5 rounded text-[11px] font-medium transition-colors",
2629
2629
  style: {
2630
- background: g === ye ? "var(--primary)" : "transparent",
2631
- color: g === ye ? "var(--primary-fg)" : "var(--text-muted)"
2630
+ background: g === Ne ? "var(--primary)" : "transparent",
2631
+ color: g === Ne ? "var(--primary-fg)" : "var(--text-muted)"
2632
2632
  },
2633
2633
  children: g
2634
2634
  },
@@ -2638,8 +2638,8 @@ function oo({
2638
2638
  /* @__PURE__ */ t(
2639
2639
  "button",
2640
2640
  {
2641
- disabled: ye >= bt,
2642
- onClick: () => xt(ye + 1),
2641
+ disabled: Ne >= bt,
2642
+ onClick: () => xt(Ne + 1),
2643
2643
  className: "rounded p-0.5 transition-colors disabled:opacity-30",
2644
2644
  style: { color: "var(--text-muted)", background: "transparent" },
2645
2645
  children: /* @__PURE__ */ t(Ie, { className: "h-3.5 w-3.5" })
@@ -2650,7 +2650,7 @@ function oo({
2650
2650
  ]
2651
2651
  }
2652
2652
  );
2653
- }, jt = () => /* @__PURE__ */ t(
2653
+ }, Pt = () => /* @__PURE__ */ t(
2654
2654
  "div",
2655
2655
  {
2656
2656
  className: "w-full min-w-0 max-w-full flex flex-col rounded-xl overflow-hidden",
@@ -2687,17 +2687,17 @@ function oo({
2687
2687
  "div",
2688
2688
  {
2689
2689
  className: "grid grid-cols-[1.2fr_1fr_0.8fr_0.7fr] gap-3",
2690
- children: Array.from({ length: 4 }).map((S, I) => /* @__PURE__ */ t(
2690
+ children: Array.from({ length: 4 }).map((S, R) => /* @__PURE__ */ t(
2691
2691
  "div",
2692
2692
  {
2693
2693
  className: "h-3.5 animate-pulse rounded-full",
2694
2694
  style: {
2695
2695
  background: "var(--border)",
2696
- width: `${Ke(g, I)}%`,
2696
+ width: `${Ve(g, R)}%`,
2697
2697
  minWidth: 32
2698
2698
  }
2699
2699
  },
2700
- I
2700
+ R
2701
2701
  ))
2702
2702
  },
2703
2703
  g
@@ -2708,13 +2708,13 @@ function oo({
2708
2708
  )
2709
2709
  }
2710
2710
  );
2711
- return D && !Z || !a && r.length === 0 && !Ge ? jt() : a && r.length === 0 ? /* @__PURE__ */ o(
2711
+ return M && !Z || !a && r.length === 0 && !Ke ? Pt() : a && r.length === 0 ? /* @__PURE__ */ o(
2712
2712
  "div",
2713
2713
  {
2714
2714
  className: "w-full min-w-0 max-w-full flex flex-col rounded-xl overflow-visible",
2715
2715
  style: { border: "1px solid var(--border)" },
2716
2716
  children: [
2717
- zt(),
2717
+ It(),
2718
2718
  /* @__PURE__ */ t(
2719
2719
  "div",
2720
2720
  {
@@ -2743,11 +2743,11 @@ function oo({
2743
2743
  },
2744
2744
  children: [
2745
2745
  /* @__PURE__ */ o("colgroup", { children: [
2746
- ke && /* @__PURE__ */ t("col", { style: { width: 40 } }),
2747
- be.map((l) => /* @__PURE__ */ t(
2746
+ Se && /* @__PURE__ */ t("col", { style: { width: 40 } }),
2747
+ xe.map((l) => /* @__PURE__ */ t(
2748
2748
  "col",
2749
2749
  {
2750
- style: { width: M[l.key] ?? 150 }
2750
+ style: { width: L[l.key] ?? 150 }
2751
2751
  },
2752
2752
  l.key
2753
2753
  ))
@@ -2762,11 +2762,11 @@ function oo({
2762
2762
  backdropFilter: "blur(14px)",
2763
2763
  WebkitBackdropFilter: "blur(14px)"
2764
2764
  } : void 0,
2765
- children: Ot()
2765
+ children: zt()
2766
2766
  }
2767
2767
  ),
2768
2768
  /* @__PURE__ */ t("tbody", { children: Array.from({ length: i }).map((l, g) => /* @__PURE__ */ o("tr", { children: [
2769
- ke && /* @__PURE__ */ t(
2769
+ Se && /* @__PURE__ */ t(
2770
2770
  "td",
2771
2771
  {
2772
2772
  className: `${z ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
@@ -2776,11 +2776,11 @@ function oo({
2776
2776
  }
2777
2777
  }
2778
2778
  ),
2779
- be.map((S, I) => /* @__PURE__ */ t(
2779
+ xe.map((S, R) => /* @__PURE__ */ t(
2780
2780
  "td",
2781
2781
  {
2782
2782
  className: z ? "px-2 py-1.5" : "px-3 py-2",
2783
- style: L && !He && I === 0 ? {
2783
+ style: E && !He && R === 0 ? {
2784
2784
  position: "sticky",
2785
2785
  left: pt,
2786
2786
  zIndex: 1,
@@ -2799,7 +2799,7 @@ function oo({
2799
2799
  className: "h-3.5 rounded-full animate-pulse",
2800
2800
  style: {
2801
2801
  background: "var(--border)",
2802
- width: `${Ke(g, I)}%`,
2802
+ width: `${Ve(g, R)}%`,
2803
2803
  minWidth: 32
2804
2804
  }
2805
2805
  }
@@ -2815,7 +2815,7 @@ function oo({
2815
2815
  )
2816
2816
  }
2817
2817
  ),
2818
- It()
2818
+ jt()
2819
2819
  ]
2820
2820
  }
2821
2821
  ) : !a && r.length === 0 ? /* @__PURE__ */ o(
@@ -2836,7 +2836,7 @@ function oo({
2836
2836
  background: "color-mix(in srgb, var(--primary) 8%, var(--bg-card))",
2837
2837
  color: "var(--primary)"
2838
2838
  },
2839
- children: c ?? /* @__PURE__ */ t(qe, { className: "h-5 w-5" })
2839
+ children: c ?? /* @__PURE__ */ t(Ge, { className: "h-5 w-5" })
2840
2840
  }
2841
2841
  ),
2842
2842
  /* @__PURE__ */ t(
@@ -2856,7 +2856,7 @@ function oo({
2856
2856
  className: "w-full min-w-0 max-w-full flex flex-col rounded-xl overflow-visible",
2857
2857
  style: { border: "1px solid var(--border)" },
2858
2858
  children: [
2859
- zt(),
2859
+ It(),
2860
2860
  /* @__PURE__ */ t(
2861
2861
  "div",
2862
2862
  {
@@ -2885,11 +2885,11 @@ function oo({
2885
2885
  },
2886
2886
  children: [
2887
2887
  /* @__PURE__ */ o("colgroup", { children: [
2888
- ke && /* @__PURE__ */ t("col", { style: { width: 40 } }),
2889
- be.map((l) => /* @__PURE__ */ t(
2888
+ Se && /* @__PURE__ */ t("col", { style: { width: 40 } }),
2889
+ xe.map((l) => /* @__PURE__ */ t(
2890
2890
  "col",
2891
2891
  {
2892
- style: { width: M[l.key] ?? 150 }
2892
+ style: { width: L[l.key] ?? 150 }
2893
2893
  },
2894
2894
  l.key
2895
2895
  ))
@@ -2904,18 +2904,18 @@ function oo({
2904
2904
  backdropFilter: "blur(14px)",
2905
2905
  WebkitBackdropFilter: "blur(14px)"
2906
2906
  } : void 0,
2907
- children: Ot()
2907
+ children: zt()
2908
2908
  }
2909
2909
  ),
2910
- /* @__PURE__ */ t("tbody", { children: Bt.map((l, g) => {
2911
- const S = n(l), I = At(u == null ? void 0 : u(l)), U = g > 0 ? At(
2912
- u == null ? void 0 : u(Bt[g - 1])
2913
- ) : null, ie = I && I.key !== (U == null ? void 0 : U.key), ce = ke && p.has(S), Ae = !!f, re = ce && y ? "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)";
2914
- return /* @__PURE__ */ o(we.Fragment, { children: [
2915
- ie && /* @__PURE__ */ t("tr", { className: I.className ?? "", children: /* @__PURE__ */ t(
2910
+ /* @__PURE__ */ t("tbody", { children: At.map((l, g) => {
2911
+ const S = n(l), R = Ot(u == null ? void 0 : u(l)), U = g > 0 ? Ot(
2912
+ u == null ? void 0 : u(At[g - 1])
2913
+ ) : null, ie = R && R.key !== (U == null ? void 0 : U.key), ce = Se && p.has(S), Te = !!f, re = ce && y ? "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)";
2914
+ return /* @__PURE__ */ o(ke.Fragment, { children: [
2915
+ ie && /* @__PURE__ */ t("tr", { className: R.className ?? "", children: /* @__PURE__ */ t(
2916
2916
  "td",
2917
2917
  {
2918
- colSpan: Or,
2918
+ colSpan: zr,
2919
2919
  className: z ? "px-2 py-2" : "px-3 py-3",
2920
2920
  style: {
2921
2921
  background: "color-mix(in srgb, var(--primary) 8%, var(--bg-input))",
@@ -2923,16 +2923,16 @@ function oo({
2923
2923
  borderRight: "1px solid var(--border)"
2924
2924
  },
2925
2925
  children: /* @__PURE__ */ t("div", { className: "flex min-w-0 items-center justify-between gap-3", children: /* @__PURE__ */ o("div", { className: "min-w-0", children: [
2926
- /* @__PURE__ */ t("div", { className: "truncate text-xs font-semibold uppercase tracking-wider text-[var(--text-main)]", children: I.label }),
2927
- I.description && /* @__PURE__ */ t("div", { className: "mt-0.5 truncate text-xs text-[var(--text-muted)]", children: I.description })
2926
+ /* @__PURE__ */ t("div", { className: "truncate text-xs font-semibold uppercase tracking-wider text-[var(--text-main)]", children: R.label }),
2927
+ R.description && /* @__PURE__ */ t("div", { className: "mt-0.5 truncate text-xs text-[var(--text-muted)]", children: R.description })
2928
2928
  ] }) })
2929
2929
  }
2930
2930
  ) }),
2931
2931
  /* @__PURE__ */ o(
2932
2932
  "tr",
2933
2933
  {
2934
- onClick: Ae ? () => f(l) : void 0,
2935
- className: `transition-colors ${Ae ? "cursor-pointer" : ""} ${v ? v(l) : ""}`,
2934
+ onClick: Te ? () => f(l) : void 0,
2935
+ className: `transition-colors ${Te ? "cursor-pointer" : ""} ${v ? v(l) : ""}`,
2936
2936
  style: {
2937
2937
  "--dt-row-bg": re,
2938
2938
  "--dt-sticky-bg": re,
@@ -2944,7 +2944,7 @@ function oo({
2944
2944
  "var(--bg-hover)"
2945
2945
  ), fe.currentTarget.style.setProperty(
2946
2946
  "--dt-sticky-bg",
2947
- Ar
2947
+ Or
2948
2948
  ));
2949
2949
  },
2950
2950
  onMouseLeave: (fe) => {
@@ -2954,11 +2954,11 @@ function oo({
2954
2954
  );
2955
2955
  },
2956
2956
  children: [
2957
- ke && /* @__PURE__ */ t(
2957
+ Se && /* @__PURE__ */ t(
2958
2958
  "td",
2959
2959
  {
2960
2960
  className: `${z ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
2961
- style: L ? {
2961
+ style: E ? {
2962
2962
  position: "sticky",
2963
2963
  left: 0,
2964
2964
  zIndex: 3,
@@ -2983,12 +2983,12 @@ function oo({
2983
2983
  )
2984
2984
  }
2985
2985
  ),
2986
- be.map((fe, at) => {
2987
- const ot = L && !He && at === 0;
2986
+ xe.map((fe, at) => {
2987
+ const ot = E && !He && at === 0;
2988
2988
  return /* @__PURE__ */ t(
2989
2989
  "td",
2990
2990
  {
2991
- className: `${z ? "px-2 py-1.5" : "px-3 py-2"} ${Hn} ${Tt(fe.align)} ${fe.className ?? ""}`,
2991
+ className: `${z ? "px-2 py-1.5" : "px-3 py-2"} ${Wn} ${Tt(fe.align)} ${fe.className ?? ""}`,
2992
2992
  style: {
2993
2993
  overflow: "hidden",
2994
2994
  whiteSpace: "nowrap",
@@ -3004,7 +3004,7 @@ function oo({
3004
3004
  borderRight: "1px solid var(--border)"
3005
3005
  }
3006
3006
  },
3007
- children: /* @__PURE__ */ t(Vt, { children: fe.cell(l) })
3007
+ children: /* @__PURE__ */ t(Xt, { children: fe.cell(l) })
3008
3008
  },
3009
3009
  fe.key
3010
3010
  );
@@ -3021,7 +3021,7 @@ function oo({
3021
3021
  )
3022
3022
  }
3023
3023
  ),
3024
- It()
3024
+ jt()
3025
3025
  ]
3026
3026
  }
3027
3027
  );
@@ -3029,14 +3029,14 @@ function oo({
3029
3029
  function Je(e) {
3030
3030
  return e ? /* @__PURE__ */ new Date(`${e}T12:00:00`) : void 0;
3031
3031
  }
3032
- function Xt(e) {
3032
+ function Zt(e) {
3033
3033
  return e.toISOString().slice(0, 10);
3034
3034
  }
3035
- function Un({
3035
+ function qn({
3036
3036
  calendarMonth: e,
3037
3037
  displayIndex: r
3038
3038
  }) {
3039
- const { previousMonth: n, nextMonth: a, goToMonth: i, months: c, labels: d, formatters: s } = dn(), f = !!n && r === 0, p = !!a && r === c.length - 1;
3039
+ const { previousMonth: n, nextMonth: a, goToMonth: i, months: c, labels: d, formatters: s } = un(), f = !!n && r === 0, p = !!a && r === c.length - 1;
3040
3040
  return /* @__PURE__ */ o(
3041
3041
  "div",
3042
3042
  {
@@ -3071,7 +3071,7 @@ function Un({
3071
3071
  opacity: f ? 1 : 0.45,
3072
3072
  cursor: f ? "pointer" : "not-allowed"
3073
3073
  },
3074
- children: /* @__PURE__ */ t(Ue, { size: 16 })
3074
+ children: /* @__PURE__ */ t(qe, { size: 16 })
3075
3075
  }
3076
3076
  ),
3077
3077
  /* @__PURE__ */ t(
@@ -3104,7 +3104,7 @@ function Un({
3104
3104
  function Yn(e) {
3105
3105
  return e.charAt(0).toUpperCase() + e.slice(1);
3106
3106
  }
3107
- function io({
3107
+ function lo({
3108
3108
  startDate: e,
3109
3109
  endDate: r,
3110
3110
  onChange: n,
@@ -3118,10 +3118,10 @@ function io({
3118
3118
  const p = {
3119
3119
  from: Je(e),
3120
3120
  to: Je(r)
3121
- }, k = Je(a), [N, y] = A(
3121
+ }, k = Je(a), [N, y] = T(
3122
3122
  Je(i || e)
3123
3123
  );
3124
- return R(() => {
3124
+ return H(() => {
3125
3125
  y(Je(i || e));
3126
3126
  }, [i, e]), /* @__PURE__ */ o("div", { children: [
3127
3127
  /* @__PURE__ */ t(
@@ -3137,14 +3137,14 @@ function io({
3137
3137
  padding: "10px 8px"
3138
3138
  },
3139
3139
  children: /* @__PURE__ */ t(
3140
- cn,
3140
+ dn,
3141
3141
  {
3142
3142
  mode: "range",
3143
3143
  selected: p,
3144
3144
  month: N,
3145
3145
  onMonthChange: y,
3146
3146
  onSelect: (v) => {
3147
- const u = v != null && v.from ? Xt(v.from) : e, b = v != null && v.to ? Xt(v.to) : "";
3147
+ const u = v != null && v.from ? Zt(v.from) : e, b = v != null && v.to ? Zt(v.to) : "";
3148
3148
  n({ startDate: u, endDate: b });
3149
3149
  },
3150
3150
  numberOfMonths: c,
@@ -3152,7 +3152,7 @@ function io({
3152
3152
  disabled: k ? { before: k } : void 0,
3153
3153
  showOutsideDays: !1,
3154
3154
  components: {
3155
- MonthCaption: Un
3155
+ MonthCaption: qn
3156
3156
  },
3157
3157
  className: "text-sm",
3158
3158
  classNames: {
@@ -3291,11 +3291,11 @@ function io({
3291
3291
  )
3292
3292
  ] });
3293
3293
  }
3294
- function qn(e) {
3294
+ function Gn(e) {
3295
3295
  if (e !== void 0)
3296
3296
  return typeof e == "number" ? `${e}px` : e;
3297
3297
  }
3298
- function so({
3298
+ function co({
3299
3299
  trigger: e,
3300
3300
  items: r,
3301
3301
  align: n = "end",
@@ -3305,41 +3305,41 @@ function so({
3305
3305
  menuClassName: d = "",
3306
3306
  onOpenChange: s
3307
3307
  }) {
3308
- const [f, p] = A(!1), [k, N] = A(!1), [y, v] = A({}), u = J(null), b = J(null), h = $e(
3308
+ const [f, p] = T(!1), [k, N] = T(!1), [y, v] = T({}), u = J(null), b = J(null), h = ve(
3309
3309
  (w) => {
3310
3310
  p(w), s == null || s(w);
3311
3311
  },
3312
3312
  [s]
3313
- ), C = $e(() => {
3313
+ ), C = ve(() => {
3314
3314
  const w = u.current;
3315
3315
  if (!w) return;
3316
- const $ = w.getBoundingClientRect(), T = typeof a == "number" ? a : $.width, _ = typeof a == "number" ? a : Math.max($.width, 180), D = n === "end" ? Math.max(8, $.right - _) : Math.min($.left, window.innerWidth - _ - 8), L = window.innerHeight - $.bottom, H = L < 240 && $.top > L ? void 0 : $.bottom + 6, z = H === void 0 ? window.innerHeight - $.top + 6 : void 0;
3316
+ const $ = w.getBoundingClientRect(), A = typeof a == "number" ? a : $.width, j = typeof a == "number" ? a : Math.max($.width, 180), M = n === "end" ? Math.max(8, $.right - j) : Math.min($.left, window.innerWidth - j - 8), E = window.innerHeight - $.bottom, P = E < 240 && $.top > E ? void 0 : $.bottom + 6, z = P === void 0 ? window.innerHeight - $.top + 6 : void 0;
3317
3317
  v({
3318
3318
  position: "fixed",
3319
3319
  zIndex: 9999,
3320
- left: D,
3321
- top: H,
3320
+ left: M,
3321
+ top: P,
3322
3322
  bottom: z,
3323
- width: qn(typeof a == "number" ? T : a)
3323
+ width: Gn(typeof a == "number" ? A : a)
3324
3324
  });
3325
3325
  }, [n, a]);
3326
- R(() => N(!0), []), R(() => {
3326
+ H(() => N(!0), []), H(() => {
3327
3327
  if (!f) return;
3328
3328
  C();
3329
- const w = (T) => {
3330
- var D, L;
3331
- const _ = T.target;
3332
- !((D = u.current) != null && D.contains(_)) && !((L = b.current) != null && L.contains(_)) && h(!1);
3333
- }, $ = (T) => {
3334
- T.key === "Escape" && h(!1);
3329
+ const w = (A) => {
3330
+ var M, E;
3331
+ const j = A.target;
3332
+ !((M = u.current) != null && M.contains(j)) && !((E = b.current) != null && E.contains(j)) && h(!1);
3333
+ }, $ = (A) => {
3334
+ A.key === "Escape" && h(!1);
3335
3335
  };
3336
3336
  return document.addEventListener("mousedown", w), window.addEventListener("keydown", $), window.addEventListener("resize", C), window.addEventListener("scroll", C, !0), () => {
3337
3337
  document.removeEventListener("mousedown", w), window.removeEventListener("keydown", $), window.removeEventListener("resize", C), window.removeEventListener("scroll", C, !0);
3338
3338
  };
3339
3339
  }, [f, h, C]);
3340
- const P = (w) => {
3340
+ const _ = (w) => {
3341
3341
  i || (w.key === "Enter" || w.key === " ") && (w.preventDefault(), h(!f));
3342
- }, j = $t(e) ? an(e, {
3342
+ }, I = Et(e) ? on(e, {
3343
3343
  onClick: () => !i && h(!f)
3344
3344
  }) : e, B = f ? /* @__PURE__ */ t(
3345
3345
  "div",
@@ -3384,16 +3384,17 @@ function so({
3384
3384
  tabIndex: i ? -1 : 0,
3385
3385
  "aria-haspopup": "menu",
3386
3386
  "aria-expanded": f,
3387
- onKeyDown: P,
3387
+ onKeyDown: _,
3388
3388
  className: `inline-flex ${i ? "pointer-events-none opacity-60" : ""} ${c}`,
3389
3389
  children: [
3390
- j,
3390
+ I,
3391
3391
  k && B ? Pe(B, document.body) : null
3392
3392
  ]
3393
3393
  }
3394
3394
  );
3395
3395
  }
3396
- function lo({
3396
+ const Kn = 180;
3397
+ function uo({
3397
3398
  open: e,
3398
3399
  onClose: r,
3399
3400
  title: n,
@@ -3406,20 +3407,49 @@ function lo({
3406
3407
  headerActions: p,
3407
3408
  bodyClassName: k = "flex-1 overflow-y-auto px-6 py-5",
3408
3409
  width: N = 440,
3409
- children: y
3410
+ hasUnsavedChanges: y = !1,
3411
+ unsavedChangesTitle: v = "Descartar cambios",
3412
+ unsavedChangesDescription: u = "Hay cambios sin guardar. Si cierras el drawer se perderán.",
3413
+ unsavedChangesConfirmLabel: b = "Descartar",
3414
+ unsavedChangesCancelLabel: h = "Seguir editando",
3415
+ onDiscardChanges: C,
3416
+ children: _
3410
3417
  }) {
3411
- const [v, u] = A(!1);
3412
- return R(() => {
3413
- u(!0);
3414
- }, []), R(() => (document.body.style.overflow = e ? "hidden" : "", () => {
3418
+ const [I, B] = T(!1), [w, $] = T(!1), [A, j] = T(!1), M = ve(() => {
3419
+ $(!0), requestAnimationFrame(() => {
3420
+ requestAnimationFrame(() => j(!0));
3421
+ });
3422
+ }, []), E = ve(() => {
3423
+ j(!1), window.setTimeout(
3424
+ () => $(!1),
3425
+ Kn
3426
+ );
3427
+ }, []), P = ve(() => {
3428
+ if (y) {
3429
+ M();
3430
+ return;
3431
+ }
3432
+ r();
3433
+ }, [y, r, M]), z = ve(() => {
3434
+ j(!1), $(!1), C == null || C(), r();
3435
+ }, [r, C]);
3436
+ return H(() => {
3437
+ B(!0);
3438
+ }, []), H(() => (document.body.style.overflow = e ? "hidden" : "", e || (j(!1), $(!1)), () => {
3415
3439
  document.body.style.overflow = "";
3416
- }), [e]), R(() => {
3440
+ }), [e]), H(() => {
3417
3441
  if (!e) return;
3418
- const b = (h) => {
3419
- h.key === "Escape" && r();
3442
+ const W = (F) => {
3443
+ if (F.key === "Escape") {
3444
+ if (w) {
3445
+ E();
3446
+ return;
3447
+ }
3448
+ P();
3449
+ }
3420
3450
  };
3421
- return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
3422
- }, [e, r]), v ? Pe(
3451
+ return window.addEventListener("keydown", W), () => window.removeEventListener("keydown", W);
3452
+ }, [E, w, e, P]), I ? Pe(
3423
3453
  /* @__PURE__ */ o(
3424
3454
  "div",
3425
3455
  {
@@ -3430,7 +3460,7 @@ function lo({
3430
3460
  "div",
3431
3461
  {
3432
3462
  className: "absolute inset-0 bg-black/40 backdrop-blur-sm",
3433
- onClick: r
3463
+ onClick: P
3434
3464
  }
3435
3465
  ),
3436
3466
  /* @__PURE__ */ o(
@@ -3450,7 +3480,7 @@ function lo({
3450
3480
  style: { borderBottom: "1px solid var(--border)" },
3451
3481
  children: [
3452
3482
  /* @__PURE__ */ o("div", { className: "flex items-center gap-3 min-w-0", children: [
3453
- /* @__PURE__ */ t(xe, { variant: "icon", onClick: r, title: "Cerrar", children: /* @__PURE__ */ t(Ne, { className: "w-5 h-5" }) }),
3483
+ /* @__PURE__ */ t(pe, { variant: "icon", onClick: P, title: "Cerrar", children: /* @__PURE__ */ t(ye, { className: "w-5 h-5" }) }),
3454
3484
  i && /* @__PURE__ */ t("div", { className: "flex-shrink-0", children: i }),
3455
3485
  /* @__PURE__ */ o("div", { className: "min-w-0", children: [
3456
3486
  /* @__PURE__ */ t(
@@ -3473,23 +3503,23 @@ function lo({
3473
3503
  ] }),
3474
3504
  (p || d) && /* @__PURE__ */ o("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
3475
3505
  p,
3476
- d && /* @__PURE__ */ o(Se, { children: [
3506
+ d && /* @__PURE__ */ o(Ce, { children: [
3477
3507
  /* @__PURE__ */ t(
3478
- xe,
3508
+ pe,
3479
3509
  {
3480
3510
  variant: "secondary",
3481
3511
  size: "sm",
3482
- onClick: r,
3512
+ onClick: P,
3483
3513
  style: { background: "var(--bg-input)" },
3484
3514
  children: "Cancelar"
3485
3515
  }
3486
3516
  ),
3487
3517
  /* @__PURE__ */ t(
3488
- xe,
3518
+ pe,
3489
3519
  {
3490
3520
  variant: "primary",
3491
3521
  size: "sm",
3492
- icon: /* @__PURE__ */ t(un, { className: "w-4 h-4" }),
3522
+ icon: /* @__PURE__ */ t(mn, { className: "w-4 h-4" }),
3493
3523
  onClick: d,
3494
3524
  loading: s,
3495
3525
  disabled: f,
@@ -3501,7 +3531,109 @@ function lo({
3501
3531
  ]
3502
3532
  }
3503
3533
  ),
3504
- /* @__PURE__ */ t("div", { "data-drawer-scroll": "true", className: k, children: y })
3534
+ /* @__PURE__ */ t("div", { "data-drawer-scroll": "true", className: k, children: _ })
3535
+ ]
3536
+ }
3537
+ ),
3538
+ w && /* @__PURE__ */ o(
3539
+ "div",
3540
+ {
3541
+ role: "dialog",
3542
+ "aria-modal": "true",
3543
+ "aria-label": v,
3544
+ className: "fixed inset-0 z-[1001] flex items-center justify-center p-4",
3545
+ children: [
3546
+ /* @__PURE__ */ t(
3547
+ "div",
3548
+ {
3549
+ className: `absolute inset-0 bg-black/50 backdrop-blur-sm transition-opacity duration-200 ease-out ${A ? "opacity-100" : "opacity-0"}`,
3550
+ onClick: E
3551
+ }
3552
+ ),
3553
+ /* @__PURE__ */ o(
3554
+ "div",
3555
+ {
3556
+ className: `relative z-10 w-full max-w-sm rounded-2xl border p-6 shadow-2xl transition-[opacity,transform] duration-200 ease-out ${A ? "translate-y-0 scale-100 opacity-100" : "translate-y-2 scale-[0.96] opacity-0"}`,
3557
+ style: {
3558
+ background: "var(--bg-card, #ffffff)",
3559
+ borderColor: "var(--border, #d8e1dc)"
3560
+ },
3561
+ children: [
3562
+ /* @__PURE__ */ t(
3563
+ pe,
3564
+ {
3565
+ variant: "icon",
3566
+ onClick: E,
3567
+ className: "absolute right-3 top-3 h-7 w-7 hover:opacity-70",
3568
+ style: { color: "var(--text-muted, #6b7f78)" },
3569
+ "aria-label": h,
3570
+ children: /* @__PURE__ */ t(ye, { className: "h-4 w-4" })
3571
+ }
3572
+ ),
3573
+ /* @__PURE__ */ t(
3574
+ "div",
3575
+ {
3576
+ className: "mb-4 flex h-11 w-11 items-center justify-center rounded-xl",
3577
+ style: { background: "var(--warning-bg, #fff7ed)" },
3578
+ children: /* @__PURE__ */ t(
3579
+ $t,
3580
+ {
3581
+ className: "h-5 w-5",
3582
+ style: { color: "var(--warning, #d97706)" }
3583
+ }
3584
+ )
3585
+ }
3586
+ ),
3587
+ /* @__PURE__ */ t(
3588
+ "h2",
3589
+ {
3590
+ className: "mb-1 text-base font-semibold",
3591
+ style: { color: "var(--text-main, #0f2f2c)" },
3592
+ children: v
3593
+ }
3594
+ ),
3595
+ /* @__PURE__ */ t(
3596
+ "p",
3597
+ {
3598
+ className: "text-sm",
3599
+ style: { color: "var(--text-muted, #6b7f78)" },
3600
+ children: u
3601
+ }
3602
+ ),
3603
+ /* @__PURE__ */ o("div", { className: "mt-6 flex gap-2", children: [
3604
+ /* @__PURE__ */ t(
3605
+ pe,
3606
+ {
3607
+ variant: "secondary",
3608
+ onClick: E,
3609
+ className: "flex-1 border",
3610
+ style: {
3611
+ background: "var(--bg-input, #f7faf8)",
3612
+ borderColor: "var(--border, #d8e1dc)",
3613
+ color: "var(--text-main, #0f2f2c)"
3614
+ },
3615
+ children: h
3616
+ }
3617
+ ),
3618
+ /* @__PURE__ */ t(
3619
+ pe,
3620
+ {
3621
+ variant: "secondary",
3622
+ onClick: z,
3623
+ className: "flex-1 border",
3624
+ style: {
3625
+ background: "var(--warning, #d97706)",
3626
+ borderColor: "transparent",
3627
+ color: "#fff",
3628
+ boxShadow: "0 10px 22px rgba(217, 119, 6, 0.22)"
3629
+ },
3630
+ children: b
3631
+ }
3632
+ )
3633
+ ] })
3634
+ ]
3635
+ }
3636
+ )
3505
3637
  ]
3506
3638
  }
3507
3639
  )
@@ -3511,12 +3643,12 @@ function lo({
3511
3643
  document.body
3512
3644
  ) : null;
3513
3645
  }
3514
- const Gn = {
3646
+ const Vn = {
3515
3647
  sm: "min-h-[160px] p-4",
3516
3648
  md: "min-h-[220px] p-6",
3517
3649
  lg: "min-h-[300px] p-8"
3518
3650
  };
3519
- function co({
3651
+ function mo({
3520
3652
  title: e = "Sin resultados",
3521
3653
  description: r,
3522
3654
  icon: n = /* @__PURE__ */ t(sr, { className: "h-5 w-5" }),
@@ -3528,7 +3660,7 @@ function co({
3528
3660
  return /* @__PURE__ */ t(
3529
3661
  "div",
3530
3662
  {
3531
- className: `flex items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] text-center ${Gn[c]} ${d}`,
3663
+ className: `flex items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] text-center ${Vn[c]} ${d}`,
3532
3664
  children: /* @__PURE__ */ o("div", { className: "flex max-w-sm flex-col items-center gap-3", children: [
3533
3665
  n && /* @__PURE__ */ t("div", { className: "flex h-10 w-10 items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-input)] text-[var(--text-muted)]", children: n }),
3534
3666
  /* @__PURE__ */ o("div", { className: "space-y-1", children: [
@@ -3543,7 +3675,7 @@ function co({
3543
3675
  }
3544
3676
  );
3545
3677
  }
3546
- function Kn({
3678
+ function Xn({
3547
3679
  label: e,
3548
3680
  children: r,
3549
3681
  helperText: n,
@@ -3569,17 +3701,17 @@ var br = {
3569
3701
  className: void 0,
3570
3702
  style: void 0,
3571
3703
  attr: void 0
3572
- }, Zt = we.createContext && /* @__PURE__ */ we.createContext(br), Vn = ["attr", "size", "title"];
3573
- function Xn(e, r) {
3704
+ }, Jt = ke.createContext && /* @__PURE__ */ ke.createContext(br), Zn = ["attr", "size", "title"];
3705
+ function Jn(e, r) {
3574
3706
  if (e == null) return {};
3575
- var n, a, i = Zn(e, r);
3707
+ var n, a, i = Qn(e, r);
3576
3708
  if (Object.getOwnPropertySymbols) {
3577
3709
  var c = Object.getOwnPropertySymbols(e);
3578
3710
  for (a = 0; a < c.length; a++) n = c[a], r.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
3579
3711
  }
3580
3712
  return i;
3581
3713
  }
3582
- function Zn(e, r) {
3714
+ function Qn(e, r) {
3583
3715
  if (e == null) return {};
3584
3716
  var n = {};
3585
3717
  for (var a in e) if ({}.hasOwnProperty.call(e, a)) {
@@ -3597,7 +3729,7 @@ function ct() {
3597
3729
  return e;
3598
3730
  }, ct.apply(null, arguments);
3599
3731
  }
3600
- function Jt(e, r) {
3732
+ function Qt(e, r) {
3601
3733
  var n = Object.keys(e);
3602
3734
  if (Object.getOwnPropertySymbols) {
3603
3735
  var a = Object.getOwnPropertySymbols(e);
@@ -3610,22 +3742,22 @@ function Jt(e, r) {
3610
3742
  function dt(e) {
3611
3743
  for (var r = 1; r < arguments.length; r++) {
3612
3744
  var n = arguments[r] != null ? arguments[r] : {};
3613
- r % 2 ? Jt(Object(n), !0).forEach(function(a) {
3614
- Jn(e, a, n[a]);
3615
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Jt(Object(n)).forEach(function(a) {
3745
+ r % 2 ? Qt(Object(n), !0).forEach(function(a) {
3746
+ ea(e, a, n[a]);
3747
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Qt(Object(n)).forEach(function(a) {
3616
3748
  Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(n, a));
3617
3749
  });
3618
3750
  }
3619
3751
  return e;
3620
3752
  }
3621
- function Jn(e, r, n) {
3622
- return (r = Qn(r)) in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
3753
+ function ea(e, r, n) {
3754
+ return (r = ta(r)) in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
3623
3755
  }
3624
- function Qn(e) {
3625
- var r = ea(e, "string");
3756
+ function ta(e) {
3757
+ var r = ra(e, "string");
3626
3758
  return typeof r == "symbol" ? r : r + "";
3627
3759
  }
3628
- function ea(e, r) {
3760
+ function ra(e, r) {
3629
3761
  if (typeof e != "object" || !e) return e;
3630
3762
  var n = e[Symbol.toPrimitive];
3631
3763
  if (n !== void 0) {
@@ -3636,23 +3768,23 @@ function ea(e, r) {
3636
3768
  return (r === "string" ? String : Number)(e);
3637
3769
  }
3638
3770
  function xr(e) {
3639
- return e && e.map((r, n) => /* @__PURE__ */ we.createElement(r.tag, dt({
3771
+ return e && e.map((r, n) => /* @__PURE__ */ ke.createElement(r.tag, dt({
3640
3772
  key: n
3641
3773
  }, r.attr), xr(r.child)));
3642
3774
  }
3643
3775
  function vr(e) {
3644
- return (r) => /* @__PURE__ */ we.createElement(ta, ct({
3776
+ return (r) => /* @__PURE__ */ ke.createElement(na, ct({
3645
3777
  attr: dt({}, e.attr)
3646
3778
  }, r), xr(e.child));
3647
3779
  }
3648
- function ta(e) {
3780
+ function na(e) {
3649
3781
  var r = (n) => {
3650
3782
  var {
3651
3783
  attr: a,
3652
3784
  size: i,
3653
3785
  title: c
3654
- } = e, d = Xn(e, Vn), s = i || n.size || "1em", f;
3655
- return n.className && (f = n.className), e.className && (f = (f ? f + " " : "") + e.className), /* @__PURE__ */ we.createElement("svg", ct({
3786
+ } = e, d = Jn(e, Zn), s = i || n.size || "1em", f;
3787
+ return n.className && (f = n.className), e.className && (f = (f ? f + " " : "") + e.className), /* @__PURE__ */ ke.createElement("svg", ct({
3656
3788
  stroke: "currentColor",
3657
3789
  fill: "currentColor",
3658
3790
  strokeWidth: "0"
@@ -3664,14 +3796,14 @@ function ta(e) {
3664
3796
  height: s,
3665
3797
  width: s,
3666
3798
  xmlns: "http://www.w3.org/2000/svg"
3667
- }), c && /* @__PURE__ */ we.createElement("title", null, c), e.children);
3799
+ }), c && /* @__PURE__ */ ke.createElement("title", null, c), e.children);
3668
3800
  };
3669
- return Zt !== void 0 ? /* @__PURE__ */ we.createElement(Zt.Consumer, null, (n) => r(n)) : r(br);
3801
+ return Jt !== void 0 ? /* @__PURE__ */ ke.createElement(Jt.Consumer, null, (n) => r(n)) : r(br);
3670
3802
  }
3671
- function ra(e) {
3803
+ function aa(e) {
3672
3804
  return vr({ 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);
3673
3805
  }
3674
- function na(e) {
3806
+ function oa(e) {
3675
3807
  return vr({ 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);
3676
3808
  }
3677
3809
  function yt({
@@ -3686,7 +3818,7 @@ function yt({
3686
3818
  }
3687
3819
  );
3688
3820
  }
3689
- function uo({
3821
+ function fo({
3690
3822
  label: e,
3691
3823
  containerClassName: r = "",
3692
3824
  helperText: n,
@@ -3698,18 +3830,18 @@ function uo({
3698
3830
  required: f,
3699
3831
  ...p
3700
3832
  }) {
3701
- const [k, N] = A(() => !!p.autoFocus), [y, v] = A(!1), u = p.type === "password" && d, b = u && y ? "text" : p.type, h = p.value !== void 0 ? String(p.value).length > 0 : p.defaultValue !== void 0 && String(p.defaultValue).length > 0, C = k || h, P = {
3833
+ const [k, N] = T(() => !!p.autoFocus), [y, v] = T(!1), u = p.type === "password" && d, b = u && y ? "text" : p.type, h = p.value !== void 0 ? String(p.value).length > 0 : p.defaultValue !== void 0 && String(p.defaultValue).length > 0, C = k || h, _ = {
3702
3834
  top: C ? 7 : 12,
3703
3835
  color: k ? "var(--primary)" : "var(--text-muted)",
3704
3836
  fontSize: C ? 10 : 13,
3705
3837
  fontWeight: C ? 600 : 400,
3706
3838
  textTransform: C ? "uppercase" : "none"
3707
- }, j = ($) => {
3708
- var T;
3709
- N(!0), (T = p.onFocus) == null || T.call(p, $);
3839
+ }, I = ($) => {
3840
+ var A;
3841
+ N(!0), (A = p.onFocus) == null || A.call(p, $);
3710
3842
  }, B = ($) => {
3711
- var T;
3712
- N(!1), (T = p.onBlur) == null || T.call(p, $);
3843
+ var A;
3844
+ N(!1), (A = p.onBlur) == null || A.call(p, $);
3713
3845
  }, w = u ? /* @__PURE__ */ o(
3714
3846
  "button",
3715
3847
  {
@@ -3725,7 +3857,7 @@ function uo({
3725
3857
  {
3726
3858
  "aria-hidden": "true",
3727
3859
  className: `absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-200 ease-out ${y ? "scale-y-0 rotate-[-8deg] opacity-0" : "scale-y-100 rotate-0 opacity-100"}`,
3728
- children: /* @__PURE__ */ t(ra, { className: "h-[18px] w-[18px]" })
3860
+ children: /* @__PURE__ */ t(aa, { className: "h-[18px] w-[18px]" })
3729
3861
  }
3730
3862
  ),
3731
3863
  /* @__PURE__ */ t(
@@ -3733,7 +3865,7 @@ function uo({
3733
3865
  {
3734
3866
  "aria-hidden": "true",
3735
3867
  className: `absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-200 ease-out ${y ? "scale-y-100 rotate-0 opacity-100" : "scale-y-0 rotate-[8deg] opacity-0"}`,
3736
- children: /* @__PURE__ */ t(na, { className: "h-[18px] w-[18px]" })
3868
+ children: /* @__PURE__ */ t(oa, { className: "h-[18px] w-[18px]" })
3737
3869
  }
3738
3870
  )
3739
3871
  ]
@@ -3751,7 +3883,7 @@ function uo({
3751
3883
  "aria-invalid": !!a || p["aria-invalid"],
3752
3884
  "data-has-value": h ? "true" : void 0,
3753
3885
  className: `h-11 w-full pt-5 ${u ? "pr-10" : ""} ${s}`,
3754
- onFocus: j,
3886
+ onFocus: I,
3755
3887
  onBlur: B
3756
3888
  }
3757
3889
  ),
@@ -3759,7 +3891,7 @@ function uo({
3759
3891
  "span",
3760
3892
  {
3761
3893
  className: "pointer-events-none absolute left-3 transition-all duration-150",
3762
- style: P,
3894
+ style: _,
3763
3895
  children: [
3764
3896
  e,
3765
3897
  f && /* @__PURE__ */ t("span", { className: "ml-1 text-[var(--danger)]", children: "*" })
@@ -3792,7 +3924,7 @@ function uo({
3792
3924
  required: f,
3793
3925
  "aria-invalid": !!a || p["aria-invalid"],
3794
3926
  className: `w-full pr-10 ${s}`,
3795
- onFocus: j,
3927
+ onFocus: I,
3796
3928
  onBlur: B
3797
3929
  }
3798
3930
  ),
@@ -3809,14 +3941,14 @@ function uo({
3809
3941
  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
3810
3942
  ] });
3811
3943
  }
3812
- function Qt(e) {
3944
+ function er(e) {
3813
3945
  if (e !== void 0)
3814
3946
  return typeof e == "number" ? `${e}px` : e;
3815
3947
  }
3816
- function aa(e, r) {
3948
+ function ia(e, r) {
3817
3949
  return e.length !== r.length ? !1 : e.every((n, a) => n === r[a]);
3818
3950
  }
3819
- function mo({
3951
+ function po({
3820
3952
  value: e,
3821
3953
  onChange: r,
3822
3954
  options: n,
@@ -3832,7 +3964,7 @@ function mo({
3832
3964
  emptyText: y = "Sin resultados",
3833
3965
  clearLabel: v = "Limpiar seleccion"
3834
3966
  }) {
3835
- const [u, b] = A(!1), [h, C] = A(""), [P, j] = A(0), [B, w] = A(!1), [$, T] = A({}), _ = J(null), D = J(null), L = J(null), H = J(null), z = p && n.length >= k, W = je(() => new Set(e), [e]), F = je(
3967
+ const [u, b] = T(!1), [h, C] = T(""), [_, I] = T(0), [B, w] = T(!1), [$, A] = T({}), j = J(null), M = J(null), E = J(null), P = J(null), z = p && n.length >= k, W = je(() => new Set(e), [e]), F = je(
3836
3968
  () => n.filter((x) => W.has(x.value)),
3837
3969
  [n, W]
3838
3970
  ), V = F.slice(0, N), ne = Math.max(
@@ -3843,11 +3975,11 @@ function mo({
3843
3975
  var G;
3844
3976
  return x.label.toLowerCase().includes(h.toLowerCase()) || ((G = x.sublabel) == null ? void 0 : G.toLowerCase().includes(h.toLowerCase()));
3845
3977
  }
3846
- ) : n, E = $e(() => {
3847
- const x = _.current;
3978
+ ) : n, D = ve(() => {
3979
+ const x = j.current;
3848
3980
  if (!x) return;
3849
- const G = x.getBoundingClientRect(), pe = z ? 304 : 244, te = window.innerHeight - G.bottom, Q = te < pe && G.top > te;
3850
- T({
3981
+ const G = x.getBoundingClientRect(), he = z ? 304 : 244, te = window.innerHeight - G.bottom, Q = te < he && G.top > te;
3982
+ A({
3851
3983
  position: "fixed",
3852
3984
  left: G.left,
3853
3985
  top: Q ? void 0 : G.bottom + 4,
@@ -3855,54 +3987,54 @@ function mo({
3855
3987
  width: G.width,
3856
3988
  zIndex: 9999
3857
3989
  });
3858
- }, [z]), Y = $e(
3990
+ }, [z]), q = ve(
3859
3991
  (x) => {
3860
- aa(e, x) || r(x);
3992
+ ia(e, x) || r(x);
3861
3993
  },
3862
3994
  [r, e]
3863
- ), X = $e(
3995
+ ), X = ve(
3864
3996
  (x) => {
3865
3997
  const G = n.find((te) => te.value === x);
3866
3998
  if (G != null && G.disabled) return;
3867
- const pe = W.has(x) ? e.filter((te) => te !== x) : [...e, x];
3868
- Y(pe);
3999
+ const he = W.has(x) ? e.filter((te) => te !== x) : [...e, x];
4000
+ q(he);
3869
4001
  },
3870
- [Y, n, e, W]
3871
- ), Z = $e(() => Y([]), [Y]);
3872
- R(() => w(!0), []), R(() => {
4002
+ [q, n, e, W]
4003
+ ), Z = ve(() => q([]), [q]);
4004
+ H(() => w(!0), []), H(() => {
3873
4005
  if (!u) return;
3874
4006
  function x(G) {
3875
4007
  var te, Q;
3876
- const pe = G.target;
3877
- !((te = _.current) != null && te.contains(pe)) && !((Q = D.current) != null && Q.contains(pe)) && (b(!1), C(""));
4008
+ const he = G.target;
4009
+ !((te = j.current) != null && te.contains(he)) && !((Q = M.current) != null && Q.contains(he)) && (b(!1), C(""));
3878
4010
  }
3879
4011
  return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
3880
- }, [u]), R(() => {
3881
- u && (j(0), E(), z && setTimeout(() => {
4012
+ }, [u]), H(() => {
4013
+ u && (I(0), D(), z && setTimeout(() => {
3882
4014
  var x;
3883
- return (x = L.current) == null ? void 0 : x.focus();
4015
+ return (x = E.current) == null ? void 0 : x.focus();
3884
4016
  }, 0));
3885
- }, [u, z, E]), R(() => {
4017
+ }, [u, z, D]), H(() => {
3886
4018
  if (u)
3887
- return window.addEventListener("resize", E), window.addEventListener("scroll", E, !0), () => {
3888
- window.removeEventListener("resize", E), window.removeEventListener("scroll", E, !0);
4019
+ return window.addEventListener("resize", D), window.addEventListener("scroll", D, !0), () => {
4020
+ window.removeEventListener("resize", D), window.removeEventListener("scroll", D, !0);
3889
4021
  };
3890
- }, [u, E]), R(() => {
3891
- if (P < 0 || !H.current) return;
3892
- const x = H.current.children[P];
4022
+ }, [u, D]), H(() => {
4023
+ if (_ < 0 || !P.current) return;
4024
+ const x = P.current.children[_];
3893
4025
  x == null || x.scrollIntoView({ block: "nearest" });
3894
- }, [P]);
4026
+ }, [_]);
3895
4027
  function ae(x) {
3896
4028
  if (!u) {
3897
4029
  (x.key === "Enter" || x.key === " " || x.key === "ArrowDown") && (x.preventDefault(), b(!0));
3898
4030
  return;
3899
4031
  }
3900
- x.key === "Escape" && (x.preventDefault(), b(!1), C("")), x.key === "ArrowDown" && (x.preventDefault(), j((G) => Math.min(G + 1, m.length - 1))), x.key === "ArrowUp" && (x.preventDefault(), j((G) => Math.max(G - 1, 0))), x.key === "Enter" && m[P] && (x.preventDefault(), X(m[P].value)), x.key === "Backspace" && !h && e.length && (x.preventDefault(), Y(e.slice(0, -1)));
4032
+ x.key === "Escape" && (x.preventDefault(), b(!1), C("")), x.key === "ArrowDown" && (x.preventDefault(), I((G) => Math.min(G + 1, m.length - 1))), x.key === "ArrowUp" && (x.preventDefault(), I((G) => Math.max(G - 1, 0))), x.key === "Enter" && m[_] && (x.preventDefault(), X(m[_].value)), x.key === "Backspace" && !h && e.length && (x.preventDefault(), q(e.slice(0, -1)));
3901
4033
  }
3902
4034
  const de = /* @__PURE__ */ o(
3903
4035
  "div",
3904
4036
  {
3905
- ref: D,
4037
+ ref: M,
3906
4038
  className: "overflow-hidden rounded-xl shadow-xl",
3907
4039
  style: {
3908
4040
  ...$,
@@ -3917,7 +4049,7 @@ function mo({
3917
4049
  style: { borderBottom: "1px solid var(--border)" },
3918
4050
  children: [
3919
4051
  /* @__PURE__ */ t(
3920
- qe,
4052
+ Ge,
3921
4053
  {
3922
4054
  className: "h-3.5 w-3.5 flex-shrink-0",
3923
4055
  style: { color: "var(--text-muted)" }
@@ -3926,10 +4058,10 @@ function mo({
3926
4058
  /* @__PURE__ */ t(
3927
4059
  "input",
3928
4060
  {
3929
- ref: L,
4061
+ ref: E,
3930
4062
  value: h,
3931
4063
  onChange: (x) => {
3932
- C(x.target.value), j(0);
4064
+ C(x.target.value), I(0);
3933
4065
  },
3934
4066
  placeholder: "Buscar…",
3935
4067
  className: "min-w-0 flex-1 bg-transparent text-sm outline-none",
@@ -3944,7 +4076,7 @@ function mo({
3944
4076
  x.preventDefault(), C("");
3945
4077
  },
3946
4078
  children: /* @__PURE__ */ t(
3947
- Ne,
4079
+ ye,
3948
4080
  {
3949
4081
  className: "h-3.5 w-3.5",
3950
4082
  style: { color: "var(--text-muted)" }
@@ -3985,7 +4117,7 @@ function mo({
3985
4117
  /* @__PURE__ */ o(
3986
4118
  "ul",
3987
4119
  {
3988
- ref: H,
4120
+ ref: P,
3989
4121
  role: "listbox",
3990
4122
  "aria-multiselectable": "true",
3991
4123
  className: "overflow-y-auto",
@@ -3997,7 +4129,7 @@ function mo({
3997
4129
  },
3998
4130
  children: [
3999
4131
  m.map((x, G) => {
4000
- const pe = G === P, te = W.has(x.value);
4132
+ const he = G === _, te = W.has(x.value);
4001
4133
  return /* @__PURE__ */ o(
4002
4134
  "li",
4003
4135
  {
@@ -4006,10 +4138,10 @@ function mo({
4006
4138
  onMouseDown: (Q) => {
4007
4139
  Q.preventDefault(), X(x.value);
4008
4140
  },
4009
- onMouseEnter: () => !x.disabled && j(G),
4141
+ onMouseEnter: () => !x.disabled && I(G),
4010
4142
  className: "flex cursor-pointer items-center gap-2 px-3 py-2 text-sm transition-colors",
4011
4143
  style: {
4012
- background: pe ? "var(--bg-hover)" : te ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
4144
+ background: he ? "var(--bg-hover)" : te ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
4013
4145
  color: x.disabled ? "var(--text-muted)" : "var(--text-main)",
4014
4146
  cursor: x.disabled ? "not-allowed" : "pointer",
4015
4147
  opacity: x.disabled ? 0.58 : 1
@@ -4075,7 +4207,7 @@ function mo({
4075
4207
  return /* @__PURE__ */ o(
4076
4208
  "div",
4077
4209
  {
4078
- ref: _,
4210
+ ref: j,
4079
4211
  className: `relative ${c || "w-full"}`,
4080
4212
  style: d,
4081
4213
  onKeyDown: ae,
@@ -4088,8 +4220,8 @@ function mo({
4088
4220
  onClick: () => !i && b((x) => !x),
4089
4221
  className: "flex w-full items-center gap-2 rounded-lg text-left text-sm transition-colors focus:outline-none",
4090
4222
  style: {
4091
- minHeight: Qt(s),
4092
- padding: Qt(f),
4223
+ minHeight: er(s),
4224
+ padding: er(f),
4093
4225
  background: "var(--bg-input)",
4094
4226
  color: F.length ? "var(--text-main)" : "var(--text-muted)",
4095
4227
  border: u ? "1px solid var(--primary)" : "1px solid var(--border)",
@@ -4099,7 +4231,7 @@ function mo({
4099
4231
  "aria-haspopup": "listbox",
4100
4232
  "aria-expanded": u,
4101
4233
  children: [
4102
- /* @__PURE__ */ t("span", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-1.5 overflow-hidden", children: V.length ? /* @__PURE__ */ o(Se, { children: [
4234
+ /* @__PURE__ */ t("span", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-1.5 overflow-hidden", children: V.length ? /* @__PURE__ */ o(Ce, { children: [
4103
4235
  V.map((x) => /* @__PURE__ */ o(
4104
4236
  "span",
4105
4237
  {
@@ -4148,7 +4280,7 @@ function mo({
4148
4280
  },
4149
4281
  className: "flex-shrink-0 rounded-full p-0.5 transition-colors hover:bg-black/10",
4150
4282
  style: { color: "var(--text-muted)" },
4151
- children: /* @__PURE__ */ t(Ne, { className: "h-3 w-3" })
4283
+ children: /* @__PURE__ */ t(ye, { className: "h-3 w-3" })
4152
4284
  }
4153
4285
  ) : /* @__PURE__ */ t(
4154
4286
  Ye,
@@ -4168,13 +4300,13 @@ function mo({
4168
4300
  }
4169
4301
  );
4170
4302
  }
4171
- function oa(e, r, n) {
4303
+ function sa(e, r, n) {
4172
4304
  const a = [], i = Math.max(2, e - n), c = Math.min(r - 1, e + n);
4173
4305
  a.push(1), i > 2 && a.push("...");
4174
4306
  for (let d = i; d <= c; d += 1) a.push(d);
4175
4307
  return c < r - 1 && a.push("..."), r > 1 && a.push(r), a;
4176
4308
  }
4177
- function fo({
4309
+ function ho({
4178
4310
  page: e,
4179
4311
  totalPages: r,
4180
4312
  onPageChange: n,
@@ -4182,7 +4314,7 @@ function fo({
4182
4314
  siblingCount: i = 1,
4183
4315
  className: c = ""
4184
4316
  }) {
4185
- const d = Math.max(1, r), s = Math.min(Math.max(1, e), d), f = oa(s, d, i);
4317
+ const d = Math.max(1, r), s = Math.min(Math.max(1, e), d), f = sa(s, d, i);
4186
4318
  return /* @__PURE__ */ o(
4187
4319
  "nav",
4188
4320
  {
@@ -4190,14 +4322,14 @@ function fo({
4190
4322
  className: `inline-flex items-center gap-1 ${c}`,
4191
4323
  children: [
4192
4324
  /* @__PURE__ */ t(
4193
- xe,
4325
+ pe,
4194
4326
  {
4195
4327
  variant: "icon",
4196
4328
  size: "xs",
4197
4329
  "aria-label": "Pagina anterior",
4198
4330
  disabled: a || s <= 1,
4199
4331
  onClick: () => n(s - 1),
4200
- children: /* @__PURE__ */ t(Ue, { className: "h-4 w-4" })
4332
+ children: /* @__PURE__ */ t(qe, { className: "h-4 w-4" })
4201
4333
  }
4202
4334
  ),
4203
4335
  f.map(
@@ -4227,7 +4359,7 @@ function fo({
4227
4359
  )
4228
4360
  ),
4229
4361
  /* @__PURE__ */ t(
4230
- xe,
4362
+ pe,
4231
4363
  {
4232
4364
  variant: "icon",
4233
4365
  size: "xs",
@@ -4241,7 +4373,7 @@ function fo({
4241
4373
  }
4242
4374
  );
4243
4375
  }
4244
- function po({
4376
+ function bo({
4245
4377
  value: e,
4246
4378
  onChange: r,
4247
4379
  options: n,
@@ -4303,7 +4435,7 @@ function po({
4303
4435
  )
4304
4436
  ] });
4305
4437
  }
4306
- function ho({
4438
+ function xo({
4307
4439
  title: e,
4308
4440
  subtitle: r,
4309
4441
  icon: n,
@@ -4335,7 +4467,7 @@ function ho({
4335
4467
  }
4336
4468
  );
4337
4469
  }
4338
- const ia = {
4470
+ const la = {
4339
4471
  neutral: {
4340
4472
  text: "var(--text-secondary)",
4341
4473
  bg: "var(--bg-input)",
@@ -4366,12 +4498,12 @@ const ia = {
4366
4498
  bg: "rgba(59, 130, 246, 0.11)",
4367
4499
  border: "rgba(59, 130, 246, 0.24)"
4368
4500
  }
4369
- }, sa = {
4501
+ }, ca = {
4370
4502
  xs: "min-h-5 px-1.5 text-[10px]",
4371
4503
  sm: "min-h-6 px-2 text-xs",
4372
4504
  md: "min-h-7 px-2.5 text-sm"
4373
4505
  };
4374
- function bo({
4506
+ function vo({
4375
4507
  children: e,
4376
4508
  tone: r = "neutral",
4377
4509
  size: n = "sm",
@@ -4379,11 +4511,11 @@ function bo({
4379
4511
  dot: i = !1,
4380
4512
  className: c = ""
4381
4513
  }) {
4382
- const d = ia[r];
4514
+ const d = la[r];
4383
4515
  return /* @__PURE__ */ o(
4384
4516
  "span",
4385
4517
  {
4386
- className: `inline-flex max-w-full shrink-0 items-center gap-1.5 rounded-full border font-semibold leading-none ${sa[n]} ${c}`,
4518
+ className: `inline-flex max-w-full shrink-0 items-center gap-1.5 rounded-full border font-semibold leading-none ${ca[n]} ${c}`,
4387
4519
  style: {
4388
4520
  color: d.text,
4389
4521
  background: d.bg,
@@ -4404,7 +4536,7 @@ function bo({
4404
4536
  }
4405
4537
  );
4406
4538
  }
4407
- function xo({
4539
+ function go({
4408
4540
  tabs: e,
4409
4541
  activeTabId: r,
4410
4542
  defaultActiveTabId: n,
@@ -4477,10 +4609,10 @@ function xo({
4477
4609
  )
4478
4610
  ] });
4479
4611
  }
4480
- function De(...e) {
4612
+ function Le(...e) {
4481
4613
  return e.filter(Boolean).join(" ");
4482
4614
  }
4483
- function vo({
4615
+ function yo({
4484
4616
  steps: e,
4485
4617
  activeStepId: r,
4486
4618
  initialStepId: n,
@@ -4500,28 +4632,28 @@ function vo({
4500
4632
  footerClassName: h = ""
4501
4633
  }) {
4502
4634
  var Q;
4503
- const C = ((Q = e[0]) == null ? void 0 : Q.id) ?? "", [P, j] = A(
4635
+ const C = ((Q = e[0]) == null ? void 0 : Q.id) ?? "", [_, I] = T(
4504
4636
  n ?? C
4505
- ), [B, w] = A(
4637
+ ), [B, w] = T(
4506
4638
  i
4507
- ), $ = r ?? P, T = a ?? B, _ = je(
4508
- () => new Set(T),
4509
- [T]
4510
- ), D = Math.max(
4639
+ ), $ = r ?? _, A = a ?? B, j = je(
4640
+ () => new Set(A),
4641
+ [A]
4642
+ ), M = Math.max(
4511
4643
  0,
4512
4644
  e.findIndex((O) => O.id === $)
4513
- ), L = e[D] ?? e[0], H = e.length <= 1 ? 100 : D / (e.length - 1) * 100, z = (O) => {
4645
+ ), E = e[M] ?? e[0], P = e.length <= 1 ? 100 : M / (e.length - 1) * 100, z = (O) => {
4514
4646
  a || w(O), d == null || d(O);
4515
4647
  }, W = (O) => {
4516
4648
  const K = e.find((ee) => ee.id === O);
4517
- K && (r || j(O), c == null || c(O, K));
4518
- }, F = (O) => _.has(O), V = (O) => e.slice(0, O).find((K) => !K.optional && !_.has(K.id)), ne = (O) => {
4649
+ K && (r || I(O), c == null || c(O, K));
4650
+ }, F = (O) => j.has(O), V = (O) => e.slice(0, O).find((K) => !K.optional && !j.has(K.id)), ne = (O) => {
4519
4651
  const K = e[O];
4520
- return !K || K.disabled ? !1 : O === D || f && O < D ? !0 : !V(O);
4652
+ return !K || K.disabled ? !1 : O === M || f && O < M ? !0 : !V(O);
4521
4653
  }, m = (O) => {
4522
4654
  const K = e.findIndex((ee) => ee.id === O);
4523
4655
  return K >= 0 && ne(K);
4524
- }, E = (O) => {
4656
+ }, D = (O) => {
4525
4657
  const K = e.findIndex((ee) => ee.id === O);
4526
4658
  if (K < 0) return !1;
4527
4659
  if (!ne(K)) {
@@ -4529,36 +4661,36 @@ function vo({
4529
4661
  return ee && (s == null || s(e[K], ee)), !1;
4530
4662
  }
4531
4663
  return W(O), !0;
4532
- }, Y = (O = L == null ? void 0 : L.id) => {
4533
- !O || _.has(O) || z([...T, O]);
4534
- }, X = (O = L == null ? void 0 : L.id) => {
4664
+ }, q = (O = E == null ? void 0 : E.id) => {
4665
+ !O || j.has(O) || z([...A, O]);
4666
+ }, X = (O = E == null ? void 0 : E.id) => {
4535
4667
  if (!O) return;
4536
- const K = e.findIndex((se) => se.id === O), ee = T.filter((se) => {
4537
- const he = e.findIndex((q) => q.id === se);
4538
- return he >= 0 && he < K;
4668
+ const K = e.findIndex((se) => se.id === O), ee = A.filter((se) => {
4669
+ const be = e.findIndex((Y) => Y.id === se);
4670
+ return be >= 0 && be < K;
4539
4671
  });
4540
- z(ee), K >= 0 && D > K && W(O);
4541
- }, Z = () => D <= 0 ? !1 : E(e[D - 1].id), ae = () => {
4542
- const O = e[D + 1];
4543
- return O ? E(O.id) : !1;
4672
+ z(ee), K >= 0 && M > K && W(O);
4673
+ }, Z = () => M <= 0 ? !1 : D(e[M - 1].id), ae = () => {
4674
+ const O = e[M + 1];
4675
+ return O ? D(O.id) : !1;
4544
4676
  }, de = {
4545
- activeStep: L,
4546
- activeIndex: D,
4547
- completedStepIds: T,
4677
+ activeStep: E,
4678
+ activeIndex: M,
4679
+ completedStepIds: A,
4548
4680
  isCompleted: F,
4549
4681
  isUnlocked: m,
4550
- completeStep: Y,
4682
+ completeStep: q,
4551
4683
  uncompleteStep: X,
4552
- goToStep: E,
4684
+ goToStep: D,
4553
4685
  goNext: ae,
4554
4686
  goPrevious: Z
4555
4687
  };
4556
- if (!L) return null;
4557
- const x = e[D + 1], G = D > 0, pe = x ? m(x.id) : !1, te = typeof L.content == "function" ? L.content(de) : L.content;
4688
+ if (!E) return null;
4689
+ const x = e[M + 1], G = M > 0, he = x ? m(x.id) : !1, te = typeof E.content == "function" ? E.content(de) : E.content;
4558
4690
  return /* @__PURE__ */ o(
4559
4691
  "section",
4560
4692
  {
4561
- className: De(
4693
+ className: Le(
4562
4694
  "overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)]",
4563
4695
  v
4564
4696
  ),
@@ -4566,7 +4698,7 @@ function vo({
4566
4698
  /* @__PURE__ */ o(
4567
4699
  "div",
4568
4700
  {
4569
- className: De(
4701
+ className: Le(
4570
4702
  "border-b border-[var(--border)] bg-[var(--bg-input)]",
4571
4703
  u
4572
4704
  ),
@@ -4575,7 +4707,7 @@ function vo({
4575
4707
  "div",
4576
4708
  {
4577
4709
  className: "h-full rounded-r-full bg-[var(--primary)] transition-[width] duration-500 ease-out",
4578
- style: { width: `${H}%` }
4710
+ style: { width: `${P}%` }
4579
4711
  }
4580
4712
  ) }),
4581
4713
  /* @__PURE__ */ t(
@@ -4586,28 +4718,28 @@ function vo({
4586
4718
  gridTemplateColumns: `repeat(${e.length}, minmax(0, 1fr))`
4587
4719
  },
4588
4720
  children: e.map((O, K) => {
4589
- const ee = O.id === L.id, se = F(O.id), he = ne(K), q = V(K);
4721
+ const ee = O.id === E.id, se = F(O.id), be = ne(K), Y = V(K);
4590
4722
  return /* @__PURE__ */ o(
4591
4723
  "button",
4592
4724
  {
4593
4725
  type: "button",
4594
- disabled: !he,
4726
+ disabled: !be,
4595
4727
  "aria-current": ee ? "step" : void 0,
4596
- "aria-disabled": !he,
4597
- title: !he && q ? `Completa ${q.title}` : O.title,
4598
- onClick: () => E(O.id),
4599
- className: De(
4728
+ "aria-disabled": !be,
4729
+ title: !be && Y ? `Completa ${Y.title}` : O.title,
4730
+ onClick: () => D(O.id),
4731
+ className: Le(
4600
4732
  "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",
4601
4733
  ee && "border-[var(--primary)] bg-[var(--bg-card)] shadow-sm",
4602
4734
  se && !ee && "border-[var(--primary)]/35 bg-[var(--bg-card)]",
4603
- !ee && !se && he && "border-transparent bg-[var(--bg-card)]/45 hover:border-[var(--border)] hover:bg-[var(--bg-card)]",
4604
- !he && "border-transparent bg-[var(--bg-card)]/35 opacity-60"
4735
+ !ee && !se && be && "border-transparent bg-[var(--bg-card)]/45 hover:border-[var(--border)] hover:bg-[var(--bg-card)]",
4736
+ !be && "border-transparent bg-[var(--bg-card)]/35 opacity-60"
4605
4737
  ),
4606
4738
  children: [
4607
4739
  /* @__PURE__ */ t(
4608
4740
  "span",
4609
4741
  {
4610
- className: De(
4742
+ className: Le(
4611
4743
  "absolute inset-x-0 top-0 h-0.5 origin-left scale-x-0 bg-[var(--primary)] transition-transform duration-300",
4612
4744
  ee && "scale-x-100"
4613
4745
  )
@@ -4617,21 +4749,21 @@ function vo({
4617
4749
  /* @__PURE__ */ t(
4618
4750
  "span",
4619
4751
  {
4620
- className: De(
4752
+ className: Le(
4621
4753
  "grid h-7 w-7 shrink-0 place-items-center rounded-full border text-xs font-bold transition-all duration-200",
4622
4754
  ee && "border-[var(--primary)] bg-[var(--primary)] text-[var(--primary-fg)]",
4623
4755
  se && !ee && "border-[var(--primary)] bg-[var(--primary)]/12 text-[var(--primary)]",
4624
- !se && !ee && he && "border-[var(--border)] text-[var(--text-muted)]",
4625
- !he && "border-[var(--border)] text-[var(--text-muted)]"
4756
+ !se && !ee && be && "border-[var(--border)] text-[var(--text-muted)]",
4757
+ !be && "border-[var(--border)] text-[var(--text-muted)]"
4626
4758
  ),
4627
- children: se ? /* @__PURE__ */ t(Qe, { className: "h-4 w-4" }) : he ? K + 1 : /* @__PURE__ */ t(Wr, { className: "h-3.5 w-3.5" })
4759
+ children: se ? /* @__PURE__ */ t(Qe, { className: "h-4 w-4" }) : be ? K + 1 : /* @__PURE__ */ t(Fr, { className: "h-3.5 w-3.5" })
4628
4760
  }
4629
4761
  ),
4630
4762
  /* @__PURE__ */ o("span", { className: "min-w-0 flex-1", children: [
4631
4763
  /* @__PURE__ */ o(
4632
4764
  "span",
4633
4765
  {
4634
- className: De(
4766
+ className: Le(
4635
4767
  "block truncate text-xs font-semibold transition-colors duration-200",
4636
4768
  ee ? "text-[var(--text-main)]" : "text-[var(--text-secondary)]"
4637
4769
  ),
@@ -4659,29 +4791,29 @@ function vo({
4659
4791
  /* @__PURE__ */ t(
4660
4792
  "div",
4661
4793
  {
4662
- className: De(
4794
+ className: Le(
4663
4795
  "min-h-72 animate-[stepWizardIn_220ms_ease-out] p-5",
4664
4796
  b
4665
4797
  ),
4666
4798
  children: te
4667
4799
  },
4668
- L.id
4800
+ E.id
4669
4801
  ),
4670
4802
  p && /* @__PURE__ */ o(
4671
4803
  "div",
4672
4804
  {
4673
- className: De(
4805
+ className: Le(
4674
4806
  "flex flex-wrap items-center justify-between gap-3 border-t border-[var(--border)] bg-[var(--bg-input)] px-4 py-3",
4675
4807
  h
4676
4808
  ),
4677
4809
  children: [
4678
4810
  /* @__PURE__ */ t(
4679
- xe,
4811
+ pe,
4680
4812
  {
4681
4813
  variant: "secondary",
4682
4814
  height: 38,
4683
4815
  padding: "0 14px",
4684
- icon: /* @__PURE__ */ t(Ue, {}),
4816
+ icon: /* @__PURE__ */ t(qe, {}),
4685
4817
  disabled: !G,
4686
4818
  onClick: Z,
4687
4819
  children: k
@@ -4690,25 +4822,25 @@ function vo({
4690
4822
  /* @__PURE__ */ o("div", { className: "flex items-center gap-3 text-xs text-[var(--text-muted)]", children: [
4691
4823
  /* @__PURE__ */ o("span", { children: [
4692
4824
  "Paso ",
4693
- D + 1,
4825
+ M + 1,
4694
4826
  " de ",
4695
4827
  e.length
4696
4828
  ] }),
4697
4829
  /* @__PURE__ */ t("span", { className: "h-1 w-1 rounded-full bg-[var(--border)]" }),
4698
4830
  /* @__PURE__ */ o("span", { children: [
4699
- T.length,
4831
+ A.length,
4700
4832
  " completados"
4701
4833
  ] })
4702
4834
  ] }),
4703
4835
  /* @__PURE__ */ t(
4704
- xe,
4836
+ pe,
4705
4837
  {
4706
4838
  height: 38,
4707
4839
  padding: "0 14px",
4708
4840
  icon: /* @__PURE__ */ t(Ie, {}),
4709
- disabled: !x || !pe,
4841
+ disabled: !x || !he,
4710
4842
  onClick: ae,
4711
- children: x && !pe ? y : N
4843
+ children: x && !he ? y : N
4712
4844
  }
4713
4845
  )
4714
4846
  ]
@@ -4718,17 +4850,17 @@ function vo({
4718
4850
  }
4719
4851
  );
4720
4852
  }
4721
- const la = {
4853
+ const da = {
4722
4854
  sm: "min-h-20 px-2.5 py-1.5 text-xs leading-5",
4723
4855
  md: "min-h-24 px-2.5 py-2 text-sm leading-5",
4724
4856
  lg: "min-h-32 px-3 py-2.5 text-sm leading-6"
4725
- }, ca = {
4857
+ }, ua = {
4726
4858
  none: "resize-none",
4727
4859
  vertical: "resize-y",
4728
4860
  horizontal: "resize-x",
4729
4861
  both: "resize"
4730
4862
  };
4731
- function da(e, r) {
4863
+ function ma(e, r) {
4732
4864
  if (e) {
4733
4865
  if (typeof e == "function") {
4734
4866
  e(r);
@@ -4737,10 +4869,10 @@ function da(e, r) {
4737
4869
  e.current = r;
4738
4870
  }
4739
4871
  }
4740
- function ua(e, r) {
4872
+ function fa(e, r) {
4741
4873
  return e !== void 0 ? String(e).length : r !== void 0 ? String(r).length : 0;
4742
4874
  }
4743
- const ma = on(
4875
+ const pa = sn(
4744
4876
  function({
4745
4877
  className: r = "",
4746
4878
  wrapperClassName: n = "",
@@ -4759,47 +4891,47 @@ const ma = on(
4759
4891
  defaultValue: b,
4760
4892
  maxLength: h,
4761
4893
  onInput: C,
4762
- ...P
4763
- }, j) {
4764
- const B = J(null), w = ua(u, b), $ = p ?? h, T = !!(N || y || f), _ = k === "error" ? "var(--danger)" : k === "success" ? "#16a34a" : "var(--border)", D = {
4894
+ ..._
4895
+ }, I) {
4896
+ const B = J(null), w = fa(u, b), $ = p ?? h, A = !!(N || y || f), j = k === "error" ? "var(--danger)" : k === "success" ? "#16a34a" : "var(--border)", M = {
4765
4897
  ...v ?? {},
4766
4898
  ...d ? { minHeight: `${d * 24 + 18}px` } : null,
4767
4899
  ...s ? { maxHeight: `${s * 24 + 18}px` } : null
4768
- }, L = () => {
4900
+ }, E = () => {
4769
4901
  const z = B.current;
4770
4902
  !z || !c || (z.style.height = "auto", z.style.height = `${z.scrollHeight}px`);
4771
4903
  };
4772
- R(L, [c, u]);
4773
- const H = /* @__PURE__ */ t(
4904
+ H(E, [c, u]);
4905
+ const P = /* @__PURE__ */ t(
4774
4906
  "textarea",
4775
4907
  {
4776
- ...P,
4908
+ ..._,
4777
4909
  ref: (z) => {
4778
- B.current = z, da(j, z);
4910
+ B.current = z, ma(I, z);
4779
4911
  },
4780
4912
  value: u,
4781
4913
  defaultValue: b,
4782
4914
  maxLength: h,
4783
- "aria-invalid": k === "error" || P["aria-invalid"],
4915
+ "aria-invalid": k === "error" || _["aria-invalid"],
4784
4916
  onInput: (z) => {
4785
- L(), C == null || C(z);
4917
+ E(), C == null || C(z);
4786
4918
  },
4787
- style: { ...D, borderColor: _ },
4788
- className: `w-full rounded-lg border bg-[var(--bg-input)] text-[var(--text-main)] outline-none placeholder:text-[var(--text-muted)] transition-colors focus:border-[var(--primary)] disabled:cursor-not-allowed disabled:opacity-60 ${la[a]} ${ca[c ? "none" : i]} ${N ? "pl-8" : ""} ${y ? "pr-10" : ""} ${r}`
4919
+ style: { ...M, borderColor: j },
4920
+ className: `w-full rounded-lg border bg-[var(--bg-input)] text-[var(--text-main)] outline-none placeholder:text-[var(--text-muted)] transition-colors focus:border-[var(--primary)] disabled:cursor-not-allowed disabled:opacity-60 ${da[a]} ${ua[c ? "none" : i]} ${N ? "pl-8" : ""} ${y ? "pr-10" : ""} ${r}`
4789
4921
  }
4790
4922
  );
4791
- return T ? /* @__PURE__ */ o("span", { className: `relative block ${n}`, children: [
4923
+ return A ? /* @__PURE__ */ o("span", { className: `relative block ${n}`, children: [
4792
4924
  N && /* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-2.5 top-2.5 flex h-4 w-4 items-center justify-center text-[var(--text-muted)]", children: N }),
4793
- H,
4925
+ P,
4794
4926
  y && /* @__PURE__ */ t("span", { className: "absolute right-2 top-2 flex items-center justify-center", children: y }),
4795
4927
  f && /* @__PURE__ */ o("span", { className: "absolute bottom-1.5 right-2 rounded bg-[var(--bg-input)] px-1.5 text-[10px] font-semibold text-[var(--text-muted)]", children: [
4796
4928
  w,
4797
4929
  $ ? `/${$}` : ""
4798
4930
  ] })
4799
- ] }) : H;
4931
+ ] }) : P;
4800
4932
  }
4801
4933
  );
4802
- function go({
4934
+ function wo({
4803
4935
  label: e,
4804
4936
  containerClassName: r = "",
4805
4937
  helperText: n,
@@ -4811,7 +4943,7 @@ function go({
4811
4943
  ...f
4812
4944
  }) {
4813
4945
  return /* @__PURE__ */ t(
4814
- Kn,
4946
+ Xn,
4815
4947
  {
4816
4948
  label: e,
4817
4949
  required: c,
@@ -4820,7 +4952,7 @@ function go({
4820
4952
  labelAction: i,
4821
4953
  className: r,
4822
4954
  children: /* @__PURE__ */ t(
4823
- ma,
4955
+ pa,
4824
4956
  {
4825
4957
  ...f,
4826
4958
  required: c,
@@ -4831,7 +4963,7 @@ function go({
4831
4963
  }
4832
4964
  );
4833
4965
  }
4834
- const fa = {
4966
+ const ha = {
4835
4967
  xs: {
4836
4968
  width: 28,
4837
4969
  height: 16,
@@ -4845,7 +4977,7 @@ const fa = {
4845
4977
  padding: 2
4846
4978
  }
4847
4979
  };
4848
- function yo({
4980
+ function No({
4849
4981
  checked: e,
4850
4982
  disabled: r,
4851
4983
  onCheckedChange: n,
@@ -4853,7 +4985,7 @@ function yo({
4853
4985
  className: i = "",
4854
4986
  ...c
4855
4987
  }) {
4856
- const d = fa[a], s = e ? d.width - d.thumb - d.padding * 2 : 0;
4988
+ const d = ha[a], s = e ? d.width - d.thumb - d.padding * 2 : 0;
4857
4989
  return /* @__PURE__ */ t(
4858
4990
  "button",
4859
4991
  {
@@ -4887,11 +5019,11 @@ function yo({
4887
5019
  }
4888
5020
  );
4889
5021
  }
4890
- const er = [
5022
+ const tr = [
4891
5023
  ".sidebar-scroll",
4892
5024
  "[data-overlay-scroll='true']"
4893
5025
  ].join(",");
4894
- function pa(e) {
5026
+ function ba(e) {
4895
5027
  if (!(e instanceof HTMLElement) || e.dataset.overlayScroll === "false" || e.closest("[data-overlayscrollbars]") || e.matches("textarea,input,select,[contenteditable='true']"))
4896
5028
  return !1;
4897
5029
  const r = window.getComputedStyle(e);
@@ -4904,30 +5036,30 @@ function pa(e) {
4904
5036
  function gr(e) {
4905
5037
  return e.classList.contains("sidebar-scroll");
4906
5038
  }
4907
- function tr(e) {
5039
+ function rr(e) {
4908
5040
  gr(e) && e.querySelectorAll(".os-scrollbar-horizontal").forEach((r) => {
4909
5041
  r.style.display = "none", r.style.height = "0", r.style.pointerEvents = "none";
4910
5042
  });
4911
5043
  }
4912
- function ha() {
4913
- return R(() => {
5044
+ function xa() {
5045
+ return H(() => {
4914
5046
  const e = /* @__PURE__ */ new WeakMap();
4915
5047
  let r = 0;
4916
5048
  const n = () => {
4917
- r = 0, document.querySelectorAll(er).forEach((c) => {
4918
- if (!pa(c)) return;
4919
- if (Ut(c)) {
4920
- tr(c);
5049
+ r = 0, document.querySelectorAll(tr).forEach((c) => {
5050
+ if (!ba(c)) return;
5051
+ if (qt(c)) {
5052
+ rr(c);
4921
5053
  return;
4922
5054
  }
4923
- const s = Ut(c, {
5055
+ const s = qt(c, {
4924
5056
  overflow: gr(c) ? { x: "hidden", y: "scroll" } : void 0,
4925
5057
  scrollbars: {
4926
5058
  autoHide: "leave",
4927
5059
  autoHideDelay: 180
4928
5060
  }
4929
5061
  });
4930
- tr(c), e.set(c, s);
5062
+ rr(c), e.set(c, s);
4931
5063
  });
4932
5064
  }, a = () => {
4933
5065
  r || (r = window.requestAnimationFrame(n));
@@ -4940,20 +5072,20 @@ function ha() {
4940
5072
  attributes: !0,
4941
5073
  attributeFilter: ["class", "data-overlay-scroll"]
4942
5074
  }), window.addEventListener("resize", a), () => {
4943
- r && window.cancelAnimationFrame(r), i.disconnect(), window.removeEventListener("resize", a), document.querySelectorAll(er).forEach((c) => {
5075
+ r && window.cancelAnimationFrame(r), i.disconnect(), window.removeEventListener("resize", a), document.querySelectorAll(tr).forEach((c) => {
4944
5076
  var d;
4945
5077
  c instanceof HTMLElement && ((d = e.get(c)) == null || d.destroy());
4946
5078
  });
4947
5079
  };
4948
5080
  }, []), null;
4949
5081
  }
4950
- const ba = {
5082
+ const va = {
4951
5083
  xs: { wh: "w-5 h-5", text: "text-[8px]" },
4952
5084
  sm: { wh: "w-7 h-7", text: "text-[11px]" },
4953
5085
  md: { wh: "w-9 h-9", text: "text-sm" },
4954
5086
  lg: { wh: "w-12 h-12", text: "text-base" },
4955
5087
  xl: { wh: "w-16 h-16", text: "text-xl" }
4956
- }, rr = [
5088
+ }, nr = [
4957
5089
  "bg-indigo-500",
4958
5090
  "bg-blue-500",
4959
5091
  "bg-emerald-500",
@@ -4962,33 +5094,33 @@ const ba = {
4962
5094
  "bg-teal-500",
4963
5095
  "bg-rose-500",
4964
5096
  "bg-cyan-500"
4965
- ], xa = {
5097
+ ], ga = {
4966
5098
  xs: "text-xs",
4967
5099
  sm: "text-sm",
4968
5100
  md: "text-base",
4969
5101
  lg: "text-lg"
4970
- }, va = "bonsaif.bot", ga = "Bonsaif Bot", ya = {
5102
+ }, ya = "bonsaif.bot", wa = "Bonsaif Bot", Na = {
4971
5103
  xs: "p-0.5",
4972
5104
  sm: "p-1",
4973
5105
  md: "p-1.5",
4974
5106
  lg: "p-2",
4975
5107
  xl: "p-2.5"
4976
5108
  };
4977
- function nr(e) {
5109
+ function ar(e) {
4978
5110
  return typeof e == "string" ? e.trim() : "";
4979
5111
  }
4980
- function wa(e) {
5112
+ function ka(e) {
4981
5113
  let r = 0;
4982
5114
  for (const n of e) r = r * 31 + n.charCodeAt(0) & 65535;
4983
- return rr[r % rr.length];
5115
+ return nr[r % nr.length];
4984
5116
  }
4985
- function Na(e, r) {
4986
- return e === va || r === ga;
5117
+ function Sa(e, r) {
5118
+ return e === ya || r === wa;
4987
5119
  }
4988
- function ka(e, r) {
5120
+ function Ca(e, r) {
4989
5121
  return `${e.replace(/\/$/, "")}${r}`;
4990
5122
  }
4991
- function Sa({
5123
+ function $a({
4992
5124
  userId: e,
4993
5125
  username: r,
4994
5126
  name: n,
@@ -5005,39 +5137,39 @@ function Sa({
5005
5137
  style: v
5006
5138
  }) {
5007
5139
  var F;
5008
- const [u, b] = A(!1), h = typeof e == "string" && e.trim() && e !== "undefined" && e !== "null" ? e.trim() : "";
5009
- R(() => {
5140
+ const [u, b] = T(!1), h = typeof e == "string" && e.trim() && e !== "undefined" && e !== "null" ? e.trim() : "";
5141
+ H(() => {
5010
5142
  b(!1);
5011
5143
  }, [h, N]);
5012
- const { wh: C, text: P } = ba[a], j = nr(n) || nr(r) || s, B = j.trim()[0] || "?", w = typeof process < "u" && ((F = process.env) == null ? void 0 : F.NEXT_PUBLIC_BASE_PATH) || "", $ = Na(r, n), T = ka(w, "/favicon.svg"), _ = h ? `${w}/api/user/avatar/${h}${N ? `?v=${N}` : ""}` : "", L = {
5144
+ const { wh: C, text: _ } = va[a], I = ar(n) || ar(r) || s, B = I.trim()[0] || "?", w = typeof process < "u" && ((F = process.env) == null ? void 0 : F.NEXT_PUBLIC_BASE_PATH) || "", $ = Sa(r, n), A = Ca(w, "/favicon.svg"), j = h ? `${w}/api/user/avatar/${h}${N ? `?v=${N}` : ""}` : "", E = {
5013
5145
  xs: 20,
5014
5146
  sm: 28,
5015
5147
  md: 36,
5016
5148
  lg: 48,
5017
5149
  xl: 64
5018
- }[a], H = $ ? /* @__PURE__ */ t(
5150
+ }[a], P = $ ? /* @__PURE__ */ t(
5019
5151
  "span",
5020
5152
  {
5021
- className: `${C} ${ya[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 ${y}`,
5153
+ className: `${C} ${Na[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 ${y}`,
5022
5154
  style: v,
5023
5155
  children: /* @__PURE__ */ t(
5024
5156
  "img",
5025
5157
  {
5026
- src: T,
5027
- alt: j,
5028
- width: L,
5029
- height: L,
5158
+ src: A,
5159
+ alt: I,
5160
+ width: E,
5161
+ height: E,
5030
5162
  className: "h-full w-full object-contain"
5031
5163
  }
5032
5164
  )
5033
5165
  }
5034
- ) : _ && !u ? /* @__PURE__ */ t(
5166
+ ) : j && !u ? /* @__PURE__ */ t(
5035
5167
  "img",
5036
5168
  {
5037
- src: _,
5038
- alt: j,
5039
- width: L,
5040
- height: L,
5169
+ src: j,
5170
+ alt: I,
5171
+ width: E,
5172
+ height: E,
5041
5173
  className: `${C} rounded-full object-cover flex-shrink-0 ${y}`,
5042
5174
  style: v,
5043
5175
  onError: () => b(!0)
@@ -5046,9 +5178,9 @@ function Sa({
5046
5178
  ) : /* @__PURE__ */ t(
5047
5179
  "span",
5048
5180
  {
5049
- className: `${C} ${wa(j)} ${P} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${y}`,
5181
+ className: `${C} ${ka(I)} ${_} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${y}`,
5050
5182
  style: v,
5051
- title: j,
5183
+ title: I,
5052
5184
  children: B
5053
5185
  }
5054
5186
  );
@@ -5058,39 +5190,39 @@ function Sa({
5058
5190
  {
5059
5191
  className: `inline-flex min-w-0 items-center gap-2 ${f}`,
5060
5192
  children: [
5061
- H,
5193
+ P,
5062
5194
  /* @__PURE__ */ t(
5063
5195
  "span",
5064
5196
  {
5065
- className: `min-w-0 truncate ${xa[k]} font-medium text-[var(--text-main)] ${p}`,
5066
- title: j,
5067
- children: j
5197
+ className: `min-w-0 truncate ${ga[k]} font-medium text-[var(--text-main)] ${p}`,
5198
+ title: I,
5199
+ children: I
5068
5200
  }
5069
5201
  )
5070
5202
  ]
5071
5203
  }
5072
5204
  );
5073
- const z = c ?? !0, W = d ?? j;
5205
+ const z = c ?? !0, W = d ?? I;
5074
5206
  return z && W ? /* @__PURE__ */ t(
5075
- Et,
5207
+ Mt,
5076
5208
  {
5077
5209
  as: "span",
5078
5210
  content: W,
5079
5211
  className: `inline-flex flex-shrink-0 ${f}`,
5080
- children: H
5212
+ children: P
5081
5213
  }
5082
- ) : H;
5214
+ ) : P;
5083
5215
  }
5084
- function Ca({ href: e, className: r, children: n }) {
5216
+ function Ea({ href: e, className: r, children: n }) {
5085
5217
  return /* @__PURE__ */ t("a", { href: e, className: r, children: n });
5086
5218
  }
5087
- function $a(e) {
5219
+ function Ma(e) {
5088
5220
  return e.reduce((r, n) => {
5089
5221
  const a = n.section ?? "Principal";
5090
5222
  return r[a] = [...r[a] ?? [], n], r;
5091
5223
  }, {});
5092
5224
  }
5093
- function Ea({
5225
+ function Da({
5094
5226
  children: e,
5095
5227
  navItems: r = [],
5096
5228
  currentPath: n = typeof window > "u" ? "/" : window.location.pathname,
@@ -5100,11 +5232,11 @@ function Ea({
5100
5232
  header: d,
5101
5233
  footer: s,
5102
5234
  onLogout: f,
5103
- LinkComponent: p = Ca
5235
+ LinkComponent: p = Ea
5104
5236
  }) {
5105
- const [k, N] = A(!1), y = $a(r);
5237
+ const [k, N] = T(!1), y = Ma(r);
5106
5238
  return /* @__PURE__ */ o("div", { className: "min-h-screen bg-[var(--bg-main)] text-[var(--text-main)]", children: [
5107
- /* @__PURE__ */ t(ha, {}),
5239
+ /* @__PURE__ */ t(xa, {}),
5108
5240
  /* @__PURE__ */ t(
5109
5241
  "button",
5110
5242
  {
@@ -5112,7 +5244,7 @@ function Ea({
5112
5244
  "aria-label": "Abrir navegación",
5113
5245
  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",
5114
5246
  onClick: () => N(!0),
5115
- children: /* @__PURE__ */ t(Fr, { className: "h-5 w-5" })
5247
+ children: /* @__PURE__ */ t(Ur, { className: "h-5 w-5" })
5116
5248
  }
5117
5249
  ),
5118
5250
  k && /* @__PURE__ */ t(
@@ -5139,7 +5271,7 @@ function Ea({
5139
5271
  "aria-label": "Cerrar navegación",
5140
5272
  className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-white/70 hover:bg-white/10 lg:hidden",
5141
5273
  onClick: () => N(!1),
5142
- children: /* @__PURE__ */ t(Ne, { className: "h-5 w-5" })
5274
+ children: /* @__PURE__ */ t(ye, { className: "h-5 w-5" })
5143
5275
  }
5144
5276
  )
5145
5277
  ] }),
@@ -5174,7 +5306,7 @@ function Ea({
5174
5306
  /* @__PURE__ */ o("div", { className: "border-t border-white/10 p-3", children: [
5175
5307
  a && /* @__PURE__ */ o("div", { className: "mb-3 flex min-w-0 items-center gap-3 rounded-lg bg-white/[0.04] p-2", children: [
5176
5308
  /* @__PURE__ */ t(
5177
- Sa,
5309
+ $a,
5178
5310
  {
5179
5311
  name: a.initials ?? a.name ?? a.email ?? "Usuario",
5180
5312
  size: "md"
@@ -5186,13 +5318,13 @@ function Ea({
5186
5318
  ] })
5187
5319
  ] }),
5188
5320
  f && /* @__PURE__ */ o(
5189
- xe,
5321
+ pe,
5190
5322
  {
5191
5323
  variant: "ghost",
5192
5324
  className: "w-full justify-start text-white hover:bg-white/10",
5193
5325
  onClick: f,
5194
5326
  children: [
5195
- /* @__PURE__ */ t(Ur, { className: "h-4 w-4" }),
5327
+ /* @__PURE__ */ t(qr, { className: "h-4 w-4" }),
5196
5328
  " Salir"
5197
5329
  ]
5198
5330
  }
@@ -5208,7 +5340,7 @@ function Ea({
5208
5340
  ] })
5209
5341
  ] });
5210
5342
  }
5211
- const Ma = {
5343
+ const La = {
5212
5344
  dashboard: "Dashboard",
5213
5345
  tickets: "Tickets",
5214
5346
  teams: "Equipos",
@@ -5232,29 +5364,29 @@ const Ma = {
5232
5364
  "security-incidents": "Incidentes",
5233
5365
  "guard-schedule": "Guardias"
5234
5366
  }, wt = {
5235
- dashboard: /* @__PURE__ */ t(Qr, { className: "h-5 w-5" }),
5236
- tickets: /* @__PURE__ */ t(Jr, { className: "h-5 w-5" }),
5237
- teams: /* @__PURE__ */ t(Ft, { className: "h-5 w-5" }),
5238
- projects: /* @__PURE__ */ t(Zr, { className: "h-5 w-5" }),
5239
- clients: /* @__PURE__ */ t(Xr, { className: "h-5 w-5" }),
5240
- surveys: /* @__PURE__ */ t(Vr, { className: "h-5 w-5" }),
5241
- profile: /* @__PURE__ */ t(Kr, { className: "h-5 w-5" }),
5242
- settings: /* @__PURE__ */ t(Wt, { className: "h-5 w-5" }),
5243
- notifications: /* @__PURE__ */ t(Gr, { className: "h-5 w-5" }),
5244
- changelog: /* @__PURE__ */ t(qr, { className: "h-5 w-5" }),
5367
+ dashboard: /* @__PURE__ */ t(en, { className: "h-5 w-5" }),
5368
+ tickets: /* @__PURE__ */ t(Qr, { className: "h-5 w-5" }),
5369
+ teams: /* @__PURE__ */ t(Ut, { className: "h-5 w-5" }),
5370
+ projects: /* @__PURE__ */ t(Jr, { className: "h-5 w-5" }),
5371
+ clients: /* @__PURE__ */ t(Zr, { className: "h-5 w-5" }),
5372
+ surveys: /* @__PURE__ */ t(Xr, { className: "h-5 w-5" }),
5373
+ profile: /* @__PURE__ */ t(Vr, { className: "h-5 w-5" }),
5374
+ settings: /* @__PURE__ */ t(Ft, { className: "h-5 w-5" }),
5375
+ notifications: /* @__PURE__ */ t(Kr, { className: "h-5 w-5" }),
5376
+ changelog: /* @__PURE__ */ t(Gr, { className: "h-5 w-5" }),
5245
5377
  admin: /* @__PURE__ */ t(vt, { className: "h-5 w-5" }),
5246
- users: /* @__PURE__ */ t(Ft, { className: "h-5 w-5" }),
5378
+ users: /* @__PURE__ */ t(Ut, { className: "h-5 w-5" }),
5247
5379
  roles: /* @__PURE__ */ t(vt, { className: "h-5 w-5" }),
5248
- menus: /* @__PURE__ */ t(Wt, { className: "h-5 w-5" }),
5380
+ menus: /* @__PURE__ */ t(Ft, { className: "h-5 w-5" }),
5249
5381
  guards: /* @__PURE__ */ t(kt, { className: "h-5 w-5" }),
5250
5382
  vacations: /* @__PURE__ */ t(kt, { className: "h-5 w-5" }),
5251
- audit: /* @__PURE__ */ t(Ht, { className: "h-5 w-5" }),
5383
+ audit: /* @__PURE__ */ t(Wt, { className: "h-5 w-5" }),
5252
5384
  positions: /* @__PURE__ */ t(Yr, { className: "h-5 w-5" }),
5253
- ranks: /* @__PURE__ */ t(Ht, { className: "h-5 w-5" }),
5385
+ ranks: /* @__PURE__ */ t(Wt, { className: "h-5 w-5" }),
5254
5386
  "email-inbox": /* @__PURE__ */ t(sr, { className: "h-5 w-5" }),
5255
5387
  "security-incidents": /* @__PURE__ */ t(vt, { className: "h-5 w-5" })
5256
5388
  };
5257
- function Da({
5389
+ function Ba({
5258
5390
  href: e,
5259
5391
  className: r,
5260
5392
  style: n,
@@ -5262,17 +5394,17 @@ function Da({
5262
5394
  }) {
5263
5395
  return /* @__PURE__ */ t("a", { href: e, className: r, style: n, children: a });
5264
5396
  }
5265
- function La(e) {
5397
+ function Aa(e) {
5266
5398
  return e.split("-").map((r) => r.charAt(0).toUpperCase() + r.slice(1)).join(" ");
5267
5399
  }
5268
- function Ba(e) {
5400
+ function Ta(e) {
5269
5401
  return /^\d+$/.test(e) || /^[a-f0-9]{8,}$/i.test(e);
5270
5402
  }
5271
- function Ta(e) {
5403
+ function Oa(e) {
5272
5404
  const r = e.split("/").filter(Boolean);
5273
5405
  if (r.length === 0 || r.length === 1 && r[0] === "dashboard")
5274
5406
  return [];
5275
- const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, i = Ba(n) && a ? a : n, c = Ma[i] ?? La(i);
5407
+ const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, i = Ta(n) && a ? a : n, c = La[i] ?? Aa(i);
5276
5408
  return [{ label: "Inicio", href: "/" }, { label: c }];
5277
5409
  }
5278
5410
  function Nt(e) {
@@ -5280,14 +5412,14 @@ function Nt(e) {
5280
5412
  ":scope > [data-overlayscrollbars-viewport]"
5281
5413
  ));
5282
5414
  }
5283
- function Aa(e) {
5415
+ function za(e) {
5284
5416
  const r = e.split("/").filter(Boolean), n = r[r.length - 1];
5285
5417
  if (!n) return /* @__PURE__ */ t(lt, { className: "h-5 w-5" });
5286
5418
  if (wt[n]) return wt[n];
5287
5419
  const a = r.length > 1 ? r[r.length - 2] : "";
5288
5420
  return wt[a] ?? /* @__PURE__ */ t(lt, { className: "h-5 w-5" });
5289
5421
  }
5290
- function wo({
5422
+ function ko({
5291
5423
  title: e,
5292
5424
  subtitle: r,
5293
5425
  action: n,
@@ -5299,32 +5431,32 @@ function wo({
5299
5431
  currentPath: f = typeof window > "u" ? "/" : window.location.pathname,
5300
5432
  showBreadcrumbs: p = !0,
5301
5433
  contained: k = !1,
5302
- LinkComponent: N = Da
5434
+ LinkComponent: N = Ba
5303
5435
  }) {
5304
- const y = J(null), [v, u] = A(!1), [b, h] = A(null), C = s ?? Ta(f), P = i ?? Aa(f), j = p && C.length > 1;
5305
- return R(() => {
5436
+ const y = J(null), [v, u] = T(!1), [b, h] = T(null), C = s ?? Oa(f), _ = i ?? za(f), I = p && C.length > 1;
5437
+ return H(() => {
5306
5438
  if (k) {
5307
5439
  u(!1);
5308
5440
  return;
5309
5441
  }
5310
5442
  let B = null, w = 0, $ = 0;
5311
- const T = () => {
5312
- const L = y.current, H = document.querySelector(
5443
+ const A = () => {
5444
+ const E = y.current, P = document.querySelector(
5313
5445
  "[data-app-scroll='true']"
5314
5446
  );
5315
- return (L == null ? void 0 : L.closest(".os-viewport")) ?? (L == null ? void 0 : L.closest(
5447
+ return (E == null ? void 0 : E.closest(".os-viewport")) ?? (E == null ? void 0 : E.closest(
5316
5448
  "[data-overlayscrollbars-viewport]"
5317
- )) ?? Nt(H) ?? H ?? window;
5318
- }, _ = () => {
5319
- const L = B && B !== window ? B.scrollTop : window.scrollY;
5320
- u((H) => H ? L > 24 : L > 72);
5321
- }, D = () => {
5322
- B == null || B.removeEventListener("scroll", _), B = T(), B.addEventListener("scroll", _, { passive: !0 }), _();
5449
+ )) ?? Nt(P) ?? P ?? window;
5450
+ }, j = () => {
5451
+ const E = B && B !== window ? B.scrollTop : window.scrollY;
5452
+ u((P) => P ? E > 24 : E > 72);
5453
+ }, M = () => {
5454
+ B == null || B.removeEventListener("scroll", j), B = A(), B.addEventListener("scroll", j, { passive: !0 }), j();
5323
5455
  };
5324
- return D(), w = window.requestAnimationFrame(D), $ = window.setTimeout(D, 120), () => {
5325
- window.cancelAnimationFrame(w), window.clearTimeout($), B == null || B.removeEventListener("scroll", _);
5456
+ return M(), w = window.requestAnimationFrame(M), $ = window.setTimeout(M, 120), () => {
5457
+ window.cancelAnimationFrame(w), window.clearTimeout($), B == null || B.removeEventListener("scroll", j);
5326
5458
  };
5327
- }, [k]), R(() => {
5459
+ }, [k]), H(() => {
5328
5460
  if (k) {
5329
5461
  h(null);
5330
5462
  return;
@@ -5338,24 +5470,24 @@ function wo({
5338
5470
  h(null);
5339
5471
  return;
5340
5472
  }
5341
- const m = F.getBoundingClientRect(), E = window.getComputedStyle(F), Y = ne.getBoundingClientRect(), X = ne instanceof HTMLElement && ne.clientWidth > 0 ? ne.clientWidth : Y.width, Z = m.left + parseFloat(E.paddingLeft || "0"), ae = {
5342
- marginLeft: Math.round(Y.left - Z),
5473
+ const m = F.getBoundingClientRect(), D = window.getComputedStyle(F), q = ne.getBoundingClientRect(), X = ne instanceof HTMLElement && ne.clientWidth > 0 ? ne.clientWidth : q.width, Z = m.left + parseFloat(D.paddingLeft || "0"), ae = {
5474
+ marginLeft: Math.round(q.left - Z),
5343
5475
  width: Math.round(X)
5344
5476
  };
5345
5477
  h(
5346
5478
  (de) => de && de.marginLeft === ae.marginLeft && de.width === ae.width ? de : ae
5347
5479
  );
5348
- }, T = () => {
5480
+ }, A = () => {
5349
5481
  window.cancelAnimationFrame(B), B = window.requestAnimationFrame($);
5350
5482
  };
5351
- T(), window.addEventListener("resize", T);
5352
- const _ = new ResizeObserver(T), D = y.current, L = D == null ? void 0 : D.parentElement, H = document.querySelector(
5483
+ A(), window.addEventListener("resize", A);
5484
+ const j = new ResizeObserver(A), M = y.current, E = M == null ? void 0 : M.parentElement, P = document.querySelector(
5353
5485
  "[data-app-scroll='true']"
5354
- ), z = Nt(H) ?? H;
5355
- return [L, H, z].forEach((W) => {
5356
- W && _.observe(W);
5357
- }), w.push(window.setTimeout(T, 120)), w.push(window.setTimeout(T, 280)), () => {
5358
- window.cancelAnimationFrame(B), window.removeEventListener("resize", T), _.disconnect(), w.forEach((W) => window.clearTimeout(W));
5486
+ ), z = Nt(P) ?? P;
5487
+ return [E, P, z].forEach((W) => {
5488
+ W && j.observe(W);
5489
+ }), w.push(window.setTimeout(A, 120)), w.push(window.setTimeout(A, 280)), () => {
5490
+ window.cancelAnimationFrame(B), window.removeEventListener("resize", A), j.disconnect(), w.forEach((W) => window.clearTimeout(W));
5359
5491
  };
5360
5492
  }, [k]), /* @__PURE__ */ t(
5361
5493
  "div",
@@ -5382,7 +5514,7 @@ function wo({
5382
5514
  {
5383
5515
  className: `min-w-0 flex flex-1 flex-col justify-center transition-[gap,transform] duration-300 ease-out ${v ? "gap-1" : "gap-1.5 sm:gap-2"}`,
5384
5516
  children: [
5385
- j && /* @__PURE__ */ t(
5517
+ I && /* @__PURE__ */ t(
5386
5518
  "nav",
5387
5519
  {
5388
5520
  "aria-label": "Breadcrumb",
@@ -5443,9 +5575,9 @@ function wo({
5443
5575
  {
5444
5576
  className: `flex-shrink-0 transition-[color,transform,opacity] duration-300 ease-out ${v ? "scale-75 opacity-80" : "scale-90 opacity-100"}`,
5445
5577
  style: {
5446
- color: j ? "var(--text-secondary)" : "var(--text-muted)"
5578
+ color: I ? "var(--text-secondary)" : "var(--text-muted)"
5447
5579
  },
5448
- children: P
5580
+ children: _
5449
5581
  }
5450
5582
  ),
5451
5583
  /* @__PURE__ */ o(
@@ -5507,20 +5639,20 @@ function wo({
5507
5639
  }
5508
5640
  );
5509
5641
  }
5510
- function No({
5642
+ function So({
5511
5643
  children: e,
5512
5644
  currentPath: r = typeof window > "u" ? "/" : window.location.pathname,
5513
5645
  publicRoutes: n = ["/", "/login", "/reset-password"],
5514
5646
  ...a
5515
5647
  }) {
5516
- return n.includes(r) ? /* @__PURE__ */ t(Se, { children: e }) : /* @__PURE__ */ t(Ea, { currentPath: r, ...a, children: e });
5648
+ return n.includes(r) ? /* @__PURE__ */ t(Ce, { children: e }) : /* @__PURE__ */ t(Da, { currentPath: r, ...a, children: e });
5517
5649
  }
5518
- function ar() {
5650
+ function or() {
5519
5651
  if (typeof window > "u") return "system";
5520
5652
  const e = localStorage.getItem("theme");
5521
5653
  return e === "light" || e === "dark" ? e : e === "system" ? "system" : document.documentElement.classList.contains("dark") ? "dark" : "light";
5522
5654
  }
5523
- function Oa(e, r, n) {
5655
+ function Ia(e, r, n) {
5524
5656
  try {
5525
5657
  const a = new URL(e), i = a.searchParams.get("callbackUrl");
5526
5658
  if (i) {
@@ -5535,17 +5667,17 @@ function Oa(e, r, n) {
5535
5667
  return e;
5536
5668
  }
5537
5669
  }
5538
- function ko({
5670
+ function Co({
5539
5671
  name: e,
5540
5672
  src: r,
5541
5673
  projectKey: n
5542
5674
  }) {
5543
- const [a, i] = A(
5544
- () => ar()
5675
+ const [a, i] = T(
5676
+ () => or()
5545
5677
  ), c = J(null);
5546
- R(() => {
5678
+ H(() => {
5547
5679
  const f = new MutationObserver(
5548
- () => i(ar())
5680
+ () => i(or())
5549
5681
  );
5550
5682
  return f.observe(document.documentElement, {
5551
5683
  attributes: !0,
@@ -5553,7 +5685,7 @@ function ko({
5553
5685
  }), () => f.disconnect();
5554
5686
  }, []);
5555
5687
  const d = je(
5556
- () => Oa(r, a, n),
5688
+ () => Ia(r, a, n),
5557
5689
  [n, r, a]
5558
5690
  ), s = je(() => {
5559
5691
  try {
@@ -5562,7 +5694,7 @@ function ko({
5562
5694
  return "";
5563
5695
  }
5564
5696
  }, [d]);
5565
- return R(() => {
5697
+ return H(() => {
5566
5698
  if (!n) return;
5567
5699
  const f = n;
5568
5700
  function p(k) {
@@ -5604,9 +5736,9 @@ function ko({
5604
5736
  }
5605
5737
  ) });
5606
5738
  }
5607
- function So() {
5608
- const [e, r] = A(""), [n, a] = A(!1), [i, c] = A({ width: 96, height: 96 });
5609
- return R(() => {
5739
+ function $o() {
5740
+ const [e, r] = T(""), [n, a] = T(!1), [i, c] = T({ width: 96, height: 96 });
5741
+ return H(() => {
5610
5742
  let d = !1;
5611
5743
  return fetch("/api/microservices/prime-suite/chat-url", { cache: "no-store" }).then((s) => s.ok ? s.json() : null).then((s) => {
5612
5744
  !d && (s != null && s.src) && r(s.src);
@@ -5614,14 +5746,14 @@ function So() {
5614
5746
  }), () => {
5615
5747
  d = !0;
5616
5748
  };
5617
- }, []), R(() => {
5749
+ }, []), H(() => {
5618
5750
  const d = (s) => {
5619
5751
  var p;
5620
5752
  if (((p = s.data) == null ? void 0 : p.type) !== "prime-suite-chat:state") return;
5621
5753
  const f = !!s.data.active;
5622
5754
  a(f), c({
5623
- width: or(s.data.width, 96, 720),
5624
- height: or(s.data.height, 96, 560)
5755
+ width: ir(s.data.width, 96, 720),
5756
+ height: ir(s.data.height, 96, 560)
5625
5757
  });
5626
5758
  };
5627
5759
  return window.addEventListener("message", d), () => window.removeEventListener("message", d);
@@ -5642,11 +5774,11 @@ function So() {
5642
5774
  }
5643
5775
  ) : null;
5644
5776
  }
5645
- function or(e, r, n) {
5777
+ function ir(e, r, n) {
5646
5778
  const a = typeof e == "number" && Number.isFinite(e) ? e : r;
5647
5779
  return Math.max(r, Math.min(n, Math.ceil(a)));
5648
5780
  }
5649
- function za(e) {
5781
+ function ja(e) {
5650
5782
  const r = document.documentElement, n = new MutationObserver(e);
5651
5783
  n.observe(r, { attributes: !0, attributeFilter: ["class"] });
5652
5784
  const a = window.matchMedia("(prefers-color-scheme: dark)");
@@ -5654,64 +5786,64 @@ function za(e) {
5654
5786
  n.disconnect(), a.removeEventListener("change", e);
5655
5787
  };
5656
5788
  }
5657
- function Ia() {
5789
+ function Pa() {
5658
5790
  const e = localStorage.getItem("theme") || "system", r = window.matchMedia("(prefers-color-scheme: dark)").matches;
5659
5791
  return document.documentElement.classList.contains("dark") || e === "dark" || e === "system" && r ? "dark" : "light";
5660
5792
  }
5661
- function ja() {
5793
+ function Ra() {
5662
5794
  return "light";
5663
5795
  }
5664
- function Co() {
5665
- const e = sn(
5666
- za,
5667
- Ia,
5668
- ja
5796
+ function Eo() {
5797
+ const e = ln(
5798
+ ja,
5799
+ Pa,
5800
+ Ra
5669
5801
  );
5670
- return /* @__PURE__ */ t(mn, { position: "bottom-center", theme: e, richColors: !0, closeButton: !0 });
5802
+ return /* @__PURE__ */ t(fn, { position: "bottom-center", theme: e, richColors: !0, closeButton: !0 });
5671
5803
  }
5672
5804
  export {
5673
- Za as Alert,
5674
- Ea as AuthShell,
5675
- Va as BonsaifButton,
5676
- xe as Button,
5677
- Ja as CalendarPicker,
5678
- Qa as Checkbox,
5679
- eo as CodeBlock,
5680
- ro as CompactFilterSelect,
5681
- to as CompactSearchInput,
5682
- no as ConfirmDialog,
5805
+ Qa as Alert,
5806
+ Da as AuthShell,
5807
+ Za as BonsaifButton,
5808
+ pe as Button,
5809
+ eo as CalendarPicker,
5810
+ to as Checkbox,
5811
+ ro as CodeBlock,
5812
+ ao as CompactFilterSelect,
5813
+ no as CompactSearchInput,
5814
+ oo as ConfirmDialog,
5683
5815
  pr as CopyButton,
5684
- ao as CopyLinkButton,
5685
- oo as DataTable,
5686
- io as DateRangePicker,
5687
- lo as Drawer,
5688
- so as DropdownMenu,
5689
- Xa as DynamicDetailTabs,
5690
- co as EmptyState,
5691
- Kn as FormField,
5692
- ha as GlobalScrollbars,
5693
- uo as InputField,
5694
- kn as LoadingState,
5695
- ko as MicroserviceFrame,
5696
- Pn as Modal,
5697
- Et as MouseTooltip,
5698
- mo as MultiSelect,
5699
- wo as PageHeader,
5700
- pn as PageSearchInput,
5701
- fo as Pagination,
5702
- No as PrimeAuthRouteShell,
5703
- Co as PrimeAuthToaster,
5704
- So as PrimeSuiteChatFrame,
5705
- po as RadioGroup,
5816
+ io as CopyLinkButton,
5817
+ so as DataTable,
5818
+ lo as DateRangePicker,
5819
+ uo as Drawer,
5820
+ co as DropdownMenu,
5821
+ Ja as DynamicDetailTabs,
5822
+ mo as EmptyState,
5823
+ Xn as FormField,
5824
+ xa as GlobalScrollbars,
5825
+ fo as InputField,
5826
+ Sn as LoadingState,
5827
+ Co as MicroserviceFrame,
5828
+ Rn as Modal,
5829
+ Mt as MouseTooltip,
5830
+ po as MultiSelect,
5831
+ ko as PageHeader,
5832
+ hn as PageSearchInput,
5833
+ ho as Pagination,
5834
+ So as PrimeAuthRouteShell,
5835
+ Eo as PrimeAuthToaster,
5836
+ $o as PrimeSuiteChatFrame,
5837
+ bo as RadioGroup,
5706
5838
  hr as SearchableSelect,
5707
- ho as SectionPanel,
5708
- bo as StatusBadge,
5709
- vo as StepWizard,
5710
- xo as Tabs,
5839
+ xo as SectionPanel,
5840
+ vo as StatusBadge,
5841
+ yo as StepWizard,
5842
+ go as Tabs,
5711
5843
  yt as TextInput,
5712
- ma as Textarea,
5713
- go as TextareaField,
5714
- yo as Toggle,
5715
- Sa as UserAvatar,
5716
- fn as cn
5844
+ pa as Textarea,
5845
+ wo as TextareaField,
5846
+ No as Toggle,
5847
+ $a as UserAvatar,
5848
+ pn as cn
5717
5849
  };