bonsaif-ui 0.1.14 → 0.1.16
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.
- package/CHANGELOG.md +5 -0
- package/README.md +119 -0
- package/dist/bonsaif-ui.js +1076 -938
- package/dist/bonsaif-ui.umd.cjs +1 -1
- package/dist/components/ui/DataTable.d.ts.map +1 -1
- package/dist/components/ui/Drawer.d.ts +14 -3
- package/dist/components/ui/Drawer.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/bonsaif-ui.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as t, jsxs as o, Fragment as
|
|
3
|
-
import { HiMagnifyingGlass as
|
|
4
|
-
import
|
|
2
|
+
import { jsx as t, jsxs as o, Fragment as Ce } from "react/jsx-runtime";
|
|
3
|
+
import { HiMagnifyingGlass as Ve, 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 Vr, HiBell as Gr, HiUser as Kr, 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 A, 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
|
|
7
|
-
import { MdDragIndicator as
|
|
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
|
|
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
|
|
12
|
-
import { Toaster as
|
|
13
|
-
function
|
|
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
|
|
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:
|
|
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
|
|
33
|
+
function hn({
|
|
34
34
|
value: e,
|
|
35
35
|
onChange: r,
|
|
36
36
|
placeholder: n,
|
|
@@ -42,7 +42,7 @@ function pn({
|
|
|
42
42
|
inputTabIndex: f
|
|
43
43
|
}) {
|
|
44
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
|
-
|
|
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
|
-
|
|
62
|
+
Ve,
|
|
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(
|
|
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 =
|
|
111
|
-
function
|
|
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
|
|
123
|
+
function Mt({
|
|
124
124
|
children: e,
|
|
125
125
|
content: r,
|
|
126
126
|
onlyWhenOverflow: n = !1,
|
|
@@ -129,19 +129,19 @@ function Et({
|
|
|
129
129
|
as: c = "div"
|
|
130
130
|
}) {
|
|
131
131
|
const d = J(null), s = J(null), [f, p] = A(null), [k, N] = A("");
|
|
132
|
-
|
|
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
|
-
}),
|
|
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(),
|
|
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 >
|
|
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 =
|
|
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(
|
|
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
|
|
211
|
+
function Vt(e) {
|
|
212
212
|
if (e !== void 0)
|
|
213
213
|
return typeof e == "number" ? `${e}px` : e;
|
|
214
214
|
}
|
|
215
|
-
const
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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() :
|
|
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
|
|
242
|
-
return
|
|
241
|
+
function kn(e) {
|
|
242
|
+
return an.toArray(e).find(Et) ?? null;
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function pe({
|
|
245
245
|
variant: e = "primary",
|
|
246
246
|
size: r = "md",
|
|
247
247
|
loading: n = !1,
|
|
@@ -256,7 +256,7 @@ function xe({
|
|
|
256
256
|
style: N,
|
|
257
257
|
...y
|
|
258
258
|
}) {
|
|
259
|
-
const v =
|
|
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, T = 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,
|
|
@@ -264,15 +264,15 @@ function xe({
|
|
|
264
264
|
"aria-label": T,
|
|
265
265
|
"data-variant": e,
|
|
266
266
|
"data-size": C,
|
|
267
|
-
"data-icon":
|
|
267
|
+
"data-icon": _ ? "true" : void 0,
|
|
268
268
|
disabled: k || n,
|
|
269
|
-
className: `${
|
|
269
|
+
className: `${xn} ${I ? gn : vn[e]} ${_ ? wn[C] : yn[C]} ${b && !_ ? "px-2.5" : ""} ${p}`,
|
|
270
270
|
style: {
|
|
271
|
-
...
|
|
272
|
-
height:
|
|
273
|
-
padding:
|
|
271
|
+
...Nn[e],
|
|
272
|
+
height: Vt(d),
|
|
273
|
+
padding: Vt(s),
|
|
274
274
|
...N,
|
|
275
|
-
...
|
|
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
|
-
|
|
290
|
+
Mt,
|
|
291
291
|
{
|
|
292
292
|
as: "span",
|
|
293
293
|
content: w,
|
|
294
294
|
className: "inline-flex shrink-0",
|
|
295
|
-
children:
|
|
295
|
+
children: M
|
|
296
296
|
}
|
|
297
|
-
) :
|
|
297
|
+
) : M;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
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(
|
|
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
|
|
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
|
|
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
|
{
|
|
@@ -395,7 +395,7 @@ function dr(e) {
|
|
|
395
395
|
function Gt(e) {
|
|
396
396
|
return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim();
|
|
397
397
|
}
|
|
398
|
-
function
|
|
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
|
|
406
|
+
function Mn(e) {
|
|
407
407
|
return typeof e == "function" ? e : e.default;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
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(
|
|
413
|
+
/* @__PURE__ */ t(pe, { className: "mt-4", height: 36, padding: "0 14px", onClick: r, children: "Reintentar" })
|
|
414
414
|
] }) });
|
|
415
415
|
}
|
|
416
|
-
function
|
|
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 =
|
|
435
|
-
renderTabLabel:
|
|
436
|
-
searchableTabs:
|
|
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
440
|
onTabsSearchChange: T,
|
|
441
|
-
emptySearchState:
|
|
442
|
-
showTabCount:
|
|
443
|
-
className:
|
|
444
|
-
parentClassName:
|
|
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
|
-
(
|
|
451
|
+
(L) => !L.hidden && ((N == null ? void 0 : N(L, i)) ?? !0)
|
|
452
452
|
),
|
|
453
453
|
[N, i, c]
|
|
454
|
-
),
|
|
455
|
-
(
|
|
454
|
+
), Z = (Me = F.find(
|
|
455
|
+
(L) => !L.disabled
|
|
456
456
|
)) == null ? void 0 : Me.service, [ne, m] = A(
|
|
457
|
-
p ??
|
|
458
|
-
), [
|
|
459
|
-
(
|
|
460
|
-
) : F, [O, F]),
|
|
461
|
-
|
|
462
|
-
!
|
|
463
|
-
}, [
|
|
464
|
-
|
|
465
|
-
}, [
|
|
466
|
-
const
|
|
467
|
-
|
|
468
|
-
},
|
|
469
|
-
$ === void 0 && de(
|
|
470
|
-
}, Ge = (
|
|
471
|
-
const ue = se.filter((me) => !me.disabled),
|
|
457
|
+
p ?? Z ?? ""
|
|
458
|
+
), [D, q] = A({}), [K, X] = A({}), [oe, de] = A(""), [x, V] = A(!1), he = J(K), te = J(0), Q = $ ?? oe, O = Gt(Q), G = I === !0 || I === "auto" && F.length >= B, ee = G && Q.trim().length > 0, se = je(() => O ? F.filter(
|
|
459
|
+
(L) => Gt(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 && Z && m(Z);
|
|
463
|
+
}, [Z, Y]), H(() => {
|
|
464
|
+
he.current = K;
|
|
465
|
+
}, [K]);
|
|
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), T == null || T(L);
|
|
470
|
+
}, Ge = (L, le) => {
|
|
471
|
+
const ue = se.filter((me) => !me.disabled), xe = ue.findIndex(
|
|
472
472
|
(me) => me.service === le.service
|
|
473
473
|
);
|
|
474
|
-
|
|
475
|
-
ue[(
|
|
476
|
-
)),
|
|
477
|
-
}, Re =
|
|
478
|
-
if (!
|
|
479
|
-
const
|
|
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[
|
|
481
|
+
const ue = (d == null ? void 0 : d[L]) ?? s;
|
|
482
482
|
if (!ue) {
|
|
483
|
-
|
|
483
|
+
X((me) => ({
|
|
484
484
|
...me,
|
|
485
|
-
[
|
|
485
|
+
[L]: {
|
|
486
486
|
loading: !1,
|
|
487
|
-
error: new Error(`No module loader found for service "${
|
|
487
|
+
error: new Error(`No module loader found for service "${L}".`)
|
|
488
488
|
}
|
|
489
489
|
}));
|
|
490
490
|
return;
|
|
491
491
|
}
|
|
492
|
-
const
|
|
493
|
-
|
|
492
|
+
const xe = ++te.current;
|
|
493
|
+
X((me) => ({
|
|
494
494
|
...me,
|
|
495
|
-
[
|
|
496
|
-
})), ue(
|
|
497
|
-
if (
|
|
498
|
-
const
|
|
499
|
-
|
|
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
|
+
X((We) => ({
|
|
500
500
|
...We,
|
|
501
|
-
[
|
|
501
|
+
[L]: { component: Xe, loading: !1 }
|
|
502
502
|
}));
|
|
503
503
|
}).catch((me) => {
|
|
504
|
-
const
|
|
505
|
-
|
|
504
|
+
const Xe = me instanceof Error ? me : new Error(String(me));
|
|
505
|
+
X((We) => ({
|
|
506
506
|
...We,
|
|
507
|
-
[
|
|
507
|
+
[L]: { ...We[L], loading: !1, error: Xe }
|
|
508
508
|
}));
|
|
509
509
|
});
|
|
510
|
-
}, [i, y, s, d,
|
|
511
|
-
|
|
512
|
-
const Ke =
|
|
513
|
-
|
|
510
|
+
}, [i, y, s, d, Y]);
|
|
511
|
+
H(Re, [Re]);
|
|
512
|
+
const Ke = Y ? D[Y.service] ?? null : null, ie = Y ? K[Y.service] : void 0, _e = ie == null ? void 0 : ie.component, et = (L) => {
|
|
513
|
+
Y && q((le) => ({
|
|
514
514
|
...le,
|
|
515
|
-
[
|
|
515
|
+
[Y.service]: L
|
|
516
516
|
}));
|
|
517
517
|
}, He = () => {
|
|
518
|
-
|
|
519
|
-
...
|
|
520
|
-
[
|
|
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:
|
|
529
|
-
selectedService:
|
|
528
|
+
selectedLink: Y,
|
|
529
|
+
selectedService: Y == null ? void 0 : Y.service,
|
|
530
530
|
activeItemId: Ke,
|
|
531
531
|
tabsSearch: Q,
|
|
532
|
-
onSelectService:
|
|
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)] ${
|
|
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 ${
|
|
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,33 +550,33 @@ 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 ||
|
|
553
|
+
(v || u || G || 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
|
-
(
|
|
559
|
-
|
|
558
|
+
(G || 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
|
-
|
|
564
|
+
G && /* @__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
|
-
|
|
571
|
+
hn,
|
|
572
572
|
{
|
|
573
573
|
value: Q,
|
|
574
|
-
onChange:
|
|
574
|
+
onChange: Be,
|
|
575
575
|
placeholder: w,
|
|
576
576
|
className: "w-full",
|
|
577
577
|
autoFocus: x,
|
|
578
578
|
forceExpanded: !0,
|
|
579
|
-
onEscape: () =>
|
|
579
|
+
onEscape: () => V(!1),
|
|
580
580
|
size: "sm",
|
|
581
581
|
inputTabIndex: x ? 0 : -1
|
|
582
582
|
}
|
|
@@ -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 &&
|
|
593
|
+
x && Q && Be(""), V((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(
|
|
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(Ve, { className: "h-4 w-4" }) })
|
|
597
597
|
}
|
|
598
598
|
)
|
|
599
599
|
] })
|
|
@@ -605,40 +605,40 @@ 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((
|
|
609
|
-
const le =
|
|
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:
|
|
617
|
-
onClick: () =>
|
|
618
|
-
onKeyDown: (ue) => Ge(ue,
|
|
616
|
+
disabled: L.disabled,
|
|
617
|
+
onClick: () => $e(L),
|
|
618
|
+
onKeyDown: (ue) => Ge(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:
|
|
621
|
-
|
|
622
|
-
/* @__PURE__ */ t("span", { children:
|
|
623
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
-
(
|
|
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
|
-
!
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
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 && (ie == null ? void 0 : ie.loading) && (h ?? /* @__PURE__ */ t(Sn, { title: "Cargando modulo..." })),
|
|
635
|
+
Y && (ie == null ? void 0 : ie.error) && C(ie.error, Re),
|
|
636
|
+
Y && _e && !(ie != null && ie.loading) && !(ie != null && ie.error) && /* @__PURE__ */ t(
|
|
637
637
|
_e,
|
|
638
638
|
{
|
|
639
639
|
context: i,
|
|
640
640
|
parent: a,
|
|
641
|
-
link:
|
|
641
|
+
link: Y,
|
|
642
642
|
activeItemId: Ke,
|
|
643
643
|
onOpenDetail: et,
|
|
644
644
|
onBackToList: He
|
|
@@ -652,39 +652,39 @@ function Xa({
|
|
|
652
652
|
}
|
|
653
653
|
);
|
|
654
654
|
}
|
|
655
|
-
const
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
684
|
+
icon: /* @__PURE__ */ t(Ht, { className: "h-5 w-5" })
|
|
685
685
|
}
|
|
686
686
|
};
|
|
687
|
-
function
|
|
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 =
|
|
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
|
-
|
|
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(
|
|
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
|
-
],
|
|
741
|
+
], Bn = [
|
|
742
742
|
"Ene",
|
|
743
743
|
"Feb",
|
|
744
744
|
"Mar",
|
|
@@ -751,11 +751,11 @@ const ur = [
|
|
|
751
751
|
"Oct",
|
|
752
752
|
"Nov",
|
|
753
753
|
"Dic"
|
|
754
|
-
],
|
|
754
|
+
], Tn = ["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
|
}
|
|
758
|
-
function
|
|
758
|
+
function An() {
|
|
759
759
|
const e = /* @__PURE__ */ new Date();
|
|
760
760
|
return Ct(e.getFullYear(), e.getMonth() + 1, e.getDate());
|
|
761
761
|
}
|
|
@@ -763,57 +763,57 @@ 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
|
|
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
|
|
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 =
|
|
777
|
+
const i = An(), d = mr(e || i), s = a === "popover", [f, p] = A(!1), k = J(null), [N, y] = A({
|
|
778
778
|
horizontal: "left",
|
|
779
779
|
vertical: "bottom"
|
|
780
|
-
}), [v, u] = A(d.year), [b, h] = A(d.month), [C,
|
|
781
|
-
|
|
780
|
+
}), [v, u] = A(d.year), [b, h] = A(d.month), [C, _] = A("days"), I = 16, [B, w] = A(0), $ = v - 7 + B, T = Array.from({ length: I }, (m, D) => $ + D);
|
|
781
|
+
H(() => {
|
|
782
782
|
if (!s || !f || !k.current) return;
|
|
783
|
-
const m = k.current.getBoundingClientRect(),
|
|
783
|
+
const m = k.current.getBoundingClientRect(), D = 8, q = 280, K = 340, X = m.left + q > window.innerWidth - D, oe = m.right - q >= D, de = m.bottom + 8 + K > window.innerHeight - D, x = m.top - 8 - K >= D;
|
|
784
784
|
y({
|
|
785
|
-
horizontal:
|
|
785
|
+
horizontal: X && oe ? "right" : "left",
|
|
786
786
|
vertical: de && x ? "top" : "bottom"
|
|
787
787
|
});
|
|
788
|
-
}, [s, f]),
|
|
788
|
+
}, [s, f]), H(() => {
|
|
789
789
|
if (!s || !f) return;
|
|
790
|
-
function m(
|
|
791
|
-
k.current && (k.current.contains(
|
|
790
|
+
function m(q) {
|
|
791
|
+
k.current && (k.current.contains(q.target) || p(!1));
|
|
792
792
|
}
|
|
793
|
-
function
|
|
794
|
-
|
|
793
|
+
function D(q) {
|
|
794
|
+
q.key === "Escape" && p(!1);
|
|
795
795
|
}
|
|
796
|
-
return document.addEventListener("mousedown", m), document.addEventListener("keydown",
|
|
797
|
-
document.removeEventListener("mousedown", m), document.removeEventListener("keydown",
|
|
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
|
|
803
|
+
function M() {
|
|
804
804
|
b === 12 ? (u((m) => m + 1), h(1)) : h((m) => m + 1);
|
|
805
805
|
}
|
|
806
|
-
const
|
|
807
|
-
...Array(
|
|
808
|
-
...Array.from({ length:
|
|
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
|
|
814
|
-
n &&
|
|
813
|
+
const D = Ct(v, b, m);
|
|
814
|
+
n && D < n || (r(D), s && p(!1));
|
|
815
815
|
}
|
|
816
|
-
const
|
|
816
|
+
const Z = {
|
|
817
817
|
background: "none",
|
|
818
818
|
border: "none",
|
|
819
819
|
cursor: "pointer",
|
|
@@ -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(
|
|
847
|
+
children: C === "days" ? /* @__PURE__ */ o(Ce, { children: [
|
|
848
848
|
/* @__PURE__ */ t(
|
|
849
849
|
"button",
|
|
850
850
|
{
|
|
851
851
|
type: "button",
|
|
852
|
-
onClick:
|
|
853
|
-
style:
|
|
852
|
+
onClick: j,
|
|
853
|
+
style: Z,
|
|
854
854
|
title: "Mes anterior",
|
|
855
|
-
children: /* @__PURE__ */ t(
|
|
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
|
-
|
|
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:
|
|
891
|
-
style:
|
|
890
|
+
onClick: M,
|
|
891
|
+
style: Z,
|
|
892
892
|
title: "Mes siguiente",
|
|
893
893
|
children: /* @__PURE__ */ t(Ie, { size: 16 })
|
|
894
894
|
}
|
|
895
895
|
)
|
|
896
|
-
] }) : /* @__PURE__ */ o(
|
|
896
|
+
] }) : /* @__PURE__ */ o(Ce, { children: [
|
|
897
897
|
/* @__PURE__ */ t(
|
|
898
898
|
"button",
|
|
899
899
|
{
|
|
900
900
|
type: "button",
|
|
901
|
-
onClick: () => w((m) => m -
|
|
902
|
-
style:
|
|
903
|
-
children: /* @__PURE__ */ t(
|
|
901
|
+
onClick: () => w((m) => m - I),
|
|
902
|
+
style: Z,
|
|
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: () =>
|
|
910
|
+
onClick: () => _("days"),
|
|
911
911
|
style: {
|
|
912
912
|
background: "none",
|
|
913
913
|
border: "none",
|
|
@@ -929,8 +929,8 @@ function Ja({
|
|
|
929
929
|
"button",
|
|
930
930
|
{
|
|
931
931
|
type: "button",
|
|
932
|
-
onClick: () => w((m) => m +
|
|
933
|
-
style:
|
|
932
|
+
onClick: () => w((m) => m + I),
|
|
933
|
+
style: Z,
|
|
934
934
|
children: /* @__PURE__ */ t(Ie, { size: 16 })
|
|
935
935
|
}
|
|
936
936
|
)
|
|
@@ -947,22 +947,22 @@ function Ja({
|
|
|
947
947
|
gap: 3,
|
|
948
948
|
marginBottom: 8
|
|
949
949
|
},
|
|
950
|
-
children:
|
|
951
|
-
const
|
|
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(
|
|
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:
|
|
962
|
+
fontWeight: q ? 700 : 400,
|
|
963
963
|
padding: "4px 0",
|
|
964
|
-
background:
|
|
965
|
-
color:
|
|
964
|
+
background: q ? "var(--primary)" : "transparent",
|
|
965
|
+
color: q ? "var(--primary-fg, #ffffff)" : "var(--text-secondary)"
|
|
966
966
|
},
|
|
967
967
|
children: m
|
|
968
968
|
},
|
|
@@ -986,24 +986,24 @@ function Ja({
|
|
|
986
986
|
gap: 3
|
|
987
987
|
},
|
|
988
988
|
children: T.map((m) => {
|
|
989
|
-
const
|
|
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),
|
|
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:
|
|
1002
|
+
fontWeight: D ? 700 : 400,
|
|
1003
1003
|
padding: "6px 0",
|
|
1004
|
-
background:
|
|
1005
|
-
color:
|
|
1006
|
-
outline: m === (/* @__PURE__ */ new Date()).getFullYear() && !
|
|
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(
|
|
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:
|
|
1026
|
+
children: Tn.map((m) => /* @__PURE__ */ t(
|
|
1027
1027
|
"div",
|
|
1028
1028
|
{
|
|
1029
1029
|
style: {
|
|
@@ -1050,32 +1050,32 @@ function Ja({
|
|
|
1050
1050
|
padding: "4px 8px 10px",
|
|
1051
1051
|
gap: 2
|
|
1052
1052
|
},
|
|
1053
|
-
children: W.map((m,
|
|
1053
|
+
children: W.map((m, D) => {
|
|
1054
1054
|
if (m === null)
|
|
1055
|
-
return /* @__PURE__ */ t("div", { style: { aspectRatio: "1" } },
|
|
1056
|
-
const
|
|
1055
|
+
return /* @__PURE__ */ t("div", { style: { aspectRatio: "1" } }, D);
|
|
1056
|
+
const q = Ct(v, b, m), K = q === e, X = q === i, oe = !!(n && q < n);
|
|
1057
1057
|
return /* @__PURE__ */ t(
|
|
1058
1058
|
"button",
|
|
1059
1059
|
{
|
|
1060
1060
|
type: "button",
|
|
1061
|
-
onClick: () => !
|
|
1061
|
+
onClick: () => !oe && F(m),
|
|
1062
1062
|
style: {
|
|
1063
1063
|
width: "100%",
|
|
1064
1064
|
aspectRatio: "1",
|
|
1065
1065
|
borderRadius: 6,
|
|
1066
1066
|
border: "none",
|
|
1067
|
-
cursor:
|
|
1067
|
+
cursor: oe ? "not-allowed" : "pointer",
|
|
1068
1068
|
fontSize: 12,
|
|
1069
|
-
fontWeight:
|
|
1070
|
-
background:
|
|
1071
|
-
color:
|
|
1072
|
-
opacity:
|
|
1073
|
-
outline:
|
|
1069
|
+
fontWeight: K || X ? 700 : 400,
|
|
1070
|
+
background: K ? "var(--primary)" : "transparent",
|
|
1071
|
+
color: K ? "var(--primary-fg, #ffffff)" : oe ? "var(--text-muted)" : "var(--text-main)",
|
|
1072
|
+
opacity: oe ? 0.4 : 1,
|
|
1073
|
+
outline: X && !K ? "2px solid var(--primary)" : "none",
|
|
1074
1074
|
outlineOffset: "-2px"
|
|
1075
1075
|
},
|
|
1076
1076
|
children: m
|
|
1077
1077
|
},
|
|
1078
|
-
|
|
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:
|
|
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
|
|
1127
|
+
const zn = {
|
|
1128
1128
|
sm: "h-4 w-4",
|
|
1129
1129
|
md: "h-5 w-5"
|
|
1130
1130
|
};
|
|
1131
|
-
function
|
|
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 ${
|
|
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
|
|
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
|
|
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(
|
|
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),
|
|
1202
|
-
|
|
1203
|
-
|
|
1201
|
+
const [h, C] = A(!1), _ = J(null);
|
|
1202
|
+
H(() => () => {
|
|
1203
|
+
_.current && window.clearTimeout(_.current);
|
|
1204
1204
|
}, []);
|
|
1205
|
-
function
|
|
1206
|
-
C(!0), f == null || f(w),
|
|
1207
|
-
C(!1),
|
|
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
1211
|
var T;
|
|
1212
1212
|
if (s && w.stopPropagation(), v == null || v(w), w.defaultPrevented) return;
|
|
1213
|
-
const $ =
|
|
1213
|
+
const $ = jn(e);
|
|
1214
1214
|
if ($)
|
|
1215
1215
|
try {
|
|
1216
|
-
await
|
|
1217
|
-
} catch (
|
|
1216
|
+
await In($), I($);
|
|
1217
|
+
} catch (j) {
|
|
1218
1218
|
try {
|
|
1219
|
-
fr($),
|
|
1220
|
-
} catch (
|
|
1221
|
-
p == null || p(
|
|
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
|
+
(T = navigator.clipboard) != null && T.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
|
|
1259
|
+
function ro({
|
|
1260
1260
|
code: e,
|
|
1261
1261
|
children: r,
|
|
1262
1262
|
title: n = "Codigo",
|
|
@@ -1344,59 +1344,59 @@ 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), [
|
|
1347
|
+
const [y, v] = A(!1), [u, b] = A(""), [h, C] = A(-1), [_, I] = A(!1), [B, w] = A({}), $ = J(null), T = 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
|
|
1350
|
-
return m.label.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 =
|
|
1352
|
+
) : n, W = ve(() => {
|
|
1353
1353
|
const m = $.current;
|
|
1354
1354
|
if (!m) return;
|
|
1355
|
-
const
|
|
1355
|
+
const D = m.getBoundingClientRect(), q = E ? 272 : 212, K = window.innerHeight - D.bottom, X = K < q && D.top > K;
|
|
1356
1356
|
w({
|
|
1357
1357
|
position: "fixed",
|
|
1358
|
-
left:
|
|
1359
|
-
top:
|
|
1360
|
-
bottom:
|
|
1361
|
-
width:
|
|
1358
|
+
left: D.left,
|
|
1359
|
+
top: X ? void 0 : D.bottom + 4,
|
|
1360
|
+
bottom: X ? window.innerHeight - D.top + 4 : void 0,
|
|
1361
|
+
width: D.width,
|
|
1362
1362
|
zIndex: 9999
|
|
1363
1363
|
});
|
|
1364
|
-
}, [
|
|
1365
|
-
|
|
1364
|
+
}, [E]);
|
|
1365
|
+
H(() => I(!0), []), H(() => {
|
|
1366
1366
|
if (!y) return;
|
|
1367
|
-
function m(
|
|
1368
|
-
var
|
|
1369
|
-
const
|
|
1370
|
-
!((
|
|
1367
|
+
function m(D) {
|
|
1368
|
+
var K, X;
|
|
1369
|
+
const q = D.target;
|
|
1370
|
+
!((K = $.current) != null && K.contains(q)) && !((X = T.current) != null && X.contains(q)) && (v(!1), b(""));
|
|
1371
1371
|
}
|
|
1372
1372
|
return document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
|
|
1373
|
-
}, [y]),
|
|
1374
|
-
y && (C(-1), W(),
|
|
1373
|
+
}, [y]), H(() => {
|
|
1374
|
+
y && (C(-1), W(), E && setTimeout(() => {
|
|
1375
1375
|
var m;
|
|
1376
|
-
return (m =
|
|
1376
|
+
return (m = j.current) == null ? void 0 : m.focus();
|
|
1377
1377
|
}, 0));
|
|
1378
|
-
}, [y,
|
|
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]),
|
|
1384
|
-
if (h < 0 || !
|
|
1385
|
-
const m =
|
|
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 =
|
|
1388
|
+
const F = ve(
|
|
1389
1389
|
(m) => {
|
|
1390
1390
|
r(m), v(!1), b("");
|
|
1391
1391
|
},
|
|
1392
1392
|
[r]
|
|
1393
1393
|
);
|
|
1394
|
-
function
|
|
1394
|
+
function Z(m) {
|
|
1395
1395
|
if (!y) {
|
|
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((
|
|
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",
|
|
@@ -1409,14 +1409,14 @@ function hr({
|
|
|
1409
1409
|
border: "1px solid var(--border)"
|
|
1410
1410
|
},
|
|
1411
1411
|
children: [
|
|
1412
|
-
|
|
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
|
-
|
|
1419
|
+
Ve,
|
|
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
|
-
|
|
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:
|
|
1460
|
+
ref: M,
|
|
1461
1461
|
role: "listbox",
|
|
1462
1462
|
className: "overflow-y-auto",
|
|
1463
1463
|
style: {
|
|
1464
|
-
maxHeight:
|
|
1464
|
+
maxHeight: E ? 220 : 180,
|
|
1465
1465
|
scrollbarWidth: "thin",
|
|
1466
1466
|
scrollbarColor: "var(--border) transparent",
|
|
1467
1467
|
overscrollBehavior: "contain"
|
|
@@ -1485,23 +1485,23 @@ function hr({
|
|
|
1485
1485
|
children: i
|
|
1486
1486
|
}
|
|
1487
1487
|
),
|
|
1488
|
-
z.map((m,
|
|
1489
|
-
const
|
|
1488
|
+
z.map((m, D) => {
|
|
1489
|
+
const K = D === h, X = m.value === e;
|
|
1490
1490
|
return /* @__PURE__ */ o(
|
|
1491
1491
|
"li",
|
|
1492
1492
|
{
|
|
1493
1493
|
role: "option",
|
|
1494
|
-
"aria-selected":
|
|
1495
|
-
onMouseDown: (
|
|
1496
|
-
|
|
1494
|
+
"aria-selected": X,
|
|
1495
|
+
onMouseDown: (oe) => {
|
|
1496
|
+
oe.preventDefault(), m.disabled || F(m.value);
|
|
1497
1497
|
},
|
|
1498
|
-
onMouseEnter: () => !m.disabled && C(
|
|
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
|
-
background:
|
|
1501
|
+
background: K ? "var(--bg-hover)" : X ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
|
|
1502
1502
|
color: m.disabled ? "var(--text-muted)" : "var(--text-main)",
|
|
1503
1503
|
cursor: m.disabled ? "not-allowed" : "pointer",
|
|
1504
|
-
boxShadow:
|
|
1504
|
+
boxShadow: X ? "inset 2px 0 0 var(--primary)" : void 0
|
|
1505
1505
|
},
|
|
1506
1506
|
children: [
|
|
1507
1507
|
m.color && /* @__PURE__ */ t(
|
|
@@ -1555,7 +1555,7 @@ function hr({
|
|
|
1555
1555
|
ref: $,
|
|
1556
1556
|
className: `relative ${d || "w-full"}`,
|
|
1557
1557
|
style: s,
|
|
1558
|
-
onKeyDown:
|
|
1558
|
+
onKeyDown: Z,
|
|
1559
1559
|
children: [
|
|
1560
1560
|
/* @__PURE__ */ o(
|
|
1561
1561
|
"button",
|
|
@@ -1568,7 +1568,7 @@ function hr({
|
|
|
1568
1568
|
height: Kt(f),
|
|
1569
1569
|
padding: Kt(p),
|
|
1570
1570
|
background: "var(--bg-input)",
|
|
1571
|
-
color:
|
|
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
|
-
(
|
|
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:
|
|
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:
|
|
1587
|
-
/* @__PURE__ */ t("span", { className: "truncate", children:
|
|
1588
|
-
|
|
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:
|
|
1593
|
+
children: P.sublabel
|
|
1594
1594
|
}
|
|
1595
1595
|
)
|
|
1596
1596
|
] }) : /* @__PURE__ */ t("span", { className: "truncate", children: a }) }),
|
|
1597
|
-
|
|
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(
|
|
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 &&
|
|
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
|
|
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
|
-
|
|
1642
|
+
Ve,
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
1730
|
-
ariaLabel:
|
|
1729
|
+
contentClassName: _ = "p-4",
|
|
1730
|
+
ariaLabel: I,
|
|
1731
1731
|
frameless: B = !1
|
|
1732
1732
|
}) {
|
|
1733
|
-
const [w, $] = A(!1), [T,
|
|
1734
|
-
if (
|
|
1733
|
+
const [w, $] = A(!1), [T, j] = A(!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
|
-
|
|
1739
|
-
}), [e]),
|
|
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]),
|
|
1744
|
+
}, [e]), H(() => {
|
|
1745
1745
|
if (!e || !y) return;
|
|
1746
|
-
const
|
|
1746
|
+
const Z = (ne) => {
|
|
1747
1747
|
ne.key === "Escape" && r();
|
|
1748
1748
|
};
|
|
1749
|
-
return window.addEventListener("keydown",
|
|
1749
|
+
return window.addEventListener("keydown", Z), () => window.removeEventListener("keydown", Z);
|
|
1750
1750
|
}, [y, r, e]), !w) return null;
|
|
1751
|
-
const
|
|
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 = T ? "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":
|
|
1759
|
-
className: `fixed inset-0 flex ${z} ${
|
|
1758
|
+
"aria-label": I ?? n,
|
|
1759
|
+
className: `fixed inset-0 flex ${z} ${_}`,
|
|
1760
1760
|
style: { zIndex: k },
|
|
1761
1761
|
children: [
|
|
1762
1762
|
/* @__PURE__ */ t(
|
|
@@ -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:
|
|
1778
|
+
maxWidth: P,
|
|
1779
1779
|
background: B ? "transparent" : "var(--bg-card)",
|
|
1780
1780
|
border: B ? "none" : "1px solid var(--border)",
|
|
1781
1781
|
opacity: T ? 1 : 0,
|
|
1782
1782
|
transform: F,
|
|
1783
1783
|
transition: `opacity ${it}ms ease, transform ${it}ms ease`
|
|
1784
1784
|
},
|
|
1785
|
-
onClick: (
|
|
1785
|
+
onClick: (Z) => Z.stopPropagation(),
|
|
1786
1786
|
children: [
|
|
1787
|
-
|
|
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(
|
|
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
|
|
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
|
|
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 =
|
|
1869
|
+
const f = _n[c];
|
|
1870
1870
|
return /* @__PURE__ */ o(
|
|
1871
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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(
|
|
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: () =>
|
|
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
|
|
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
|
|
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
|
|
2004
|
+
function Xt({
|
|
2005
2005
|
children: e,
|
|
2006
2006
|
className: r = "",
|
|
2007
2007
|
style: n
|
|
2008
2008
|
}) {
|
|
2009
2009
|
return /* @__PURE__ */ t(
|
|
2010
|
-
|
|
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
|
|
2025
|
+
function so({
|
|
2026
2026
|
columns: e,
|
|
2027
2027
|
data: r,
|
|
2028
2028
|
getRowId: n,
|
|
@@ -2041,51 +2041,51 @@ function oo({
|
|
|
2041
2041
|
stickyHeader: b = !0,
|
|
2042
2042
|
pageSize: h = 25,
|
|
2043
2043
|
pageSizeOptions: C = [25, 50, 100],
|
|
2044
|
-
pageSizeSelectWidth:
|
|
2045
|
-
pageSizeSelectHeight:
|
|
2044
|
+
pageSizeSelectWidth: _ = 62,
|
|
2045
|
+
pageSizeSelectHeight: I = 30,
|
|
2046
2046
|
pageSizeSelectPadding: B = "0 7px",
|
|
2047
2047
|
totalRows: w,
|
|
2048
2048
|
page: $,
|
|
2049
2049
|
onPageChange: T,
|
|
2050
|
-
onPageSizeChange:
|
|
2051
|
-
storageKey:
|
|
2052
|
-
stickyFirstColumn:
|
|
2053
|
-
bottomOffset:
|
|
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
|
-
enableColumnVisibility:
|
|
2057
|
+
enableColumnVisibility: Z = !0,
|
|
2058
2058
|
hiddenColumnKeys: ne,
|
|
2059
|
-
defaultHiddenColumnKeys: m =
|
|
2060
|
-
onHiddenColumnKeysChange:
|
|
2061
|
-
columnVisibilityLabel:
|
|
2059
|
+
defaultHiddenColumnKeys: m = Fn,
|
|
2060
|
+
onHiddenColumnKeysChange: D,
|
|
2061
|
+
columnVisibilityLabel: q = "Columnas"
|
|
2062
2062
|
}) {
|
|
2063
|
-
const
|
|
2064
|
-
|
|
2063
|
+
const K = e.map((l) => l.key).join(","), [X, oe] = A(!M), de = J(null), x = J(!M), V = ne !== void 0, [he, te] = A(() => ze(m, e)), Q = ze(
|
|
2064
|
+
V ? ne : he,
|
|
2065
2065
|
e
|
|
2066
|
-
), [O,
|
|
2066
|
+
), [O, G] = A(!1), [ee, se] = A(
|
|
2067
2067
|
null
|
|
2068
|
-
), [
|
|
2068
|
+
), [be, Y] = A(
|
|
2069
2069
|
{}
|
|
2070
|
-
),
|
|
2070
|
+
), $e = J(null), Be = J(null), [Ge, Re] = A(
|
|
2071
2071
|
r.length > 0 || a || s === !1
|
|
2072
|
-
), Ke = (l, g) => 50 + (l * 17 + g * 13 + 7) % 40,
|
|
2072
|
+
), Ke = (l, g) => 50 + (l * 17 + g * 13 + 7) % 40, ie = J(null), [_e, et] = A(
|
|
2073
2073
|
void 0
|
|
2074
2074
|
), [He, tt] = A(!1);
|
|
2075
|
-
|
|
2075
|
+
H(() => {
|
|
2076
2076
|
const g = h !== !1 ? 32 : 0, S = 12;
|
|
2077
|
-
function
|
|
2078
|
-
if (tt(window.innerWidth < 640), !
|
|
2079
|
-
const U =
|
|
2077
|
+
function R() {
|
|
2078
|
+
if (tt(window.innerWidth < 640), !ie.current) return;
|
|
2079
|
+
const U = ie.current.getBoundingClientRect().top;
|
|
2080
2080
|
et(
|
|
2081
2081
|
Math.max(
|
|
2082
2082
|
120,
|
|
2083
|
-
window.innerHeight - U - g - S -
|
|
2083
|
+
window.innerHeight - U - g - S - P
|
|
2084
2084
|
)
|
|
2085
2085
|
);
|
|
2086
2086
|
}
|
|
2087
|
-
return
|
|
2088
|
-
}, [a, h,
|
|
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;
|
|
@@ -2098,38 +2098,38 @@ function oo({
|
|
|
2098
2098
|
}, [r.length, s, Ge, a]);
|
|
2099
2099
|
const [Ee, Me] = A(
|
|
2100
2100
|
() => e.map((l) => l.key)
|
|
2101
|
-
), [
|
|
2101
|
+
), [L, le] = A(
|
|
2102
2102
|
() => Object.fromEntries(
|
|
2103
2103
|
e.map((l) => [l.key, Oe(l, Ze(l.width))])
|
|
2104
2104
|
)
|
|
2105
2105
|
);
|
|
2106
|
-
|
|
2106
|
+
H(() => {
|
|
2107
2107
|
const l = e.map((S) => S.key);
|
|
2108
|
-
if (!
|
|
2109
|
-
Me(l),
|
|
2108
|
+
if (!M) {
|
|
2109
|
+
Me(l), V || te(
|
|
2110
2110
|
ze(m, e)
|
|
2111
|
-
), x.current = !1,
|
|
2111
|
+
), x.current = !1, oe(!0);
|
|
2112
2112
|
return;
|
|
2113
2113
|
}
|
|
2114
2114
|
let g = !1;
|
|
2115
|
-
return x.current = !1,
|
|
2116
|
-
`/api/user/preferences/datatables?key=${encodeURIComponent(
|
|
2115
|
+
return x.current = !1, oe(!1), fetch(
|
|
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,
|
|
2119
|
+
var ot, Rt, _t;
|
|
2120
2120
|
if (g) return;
|
|
2121
|
-
const
|
|
2122
|
-
e.map((
|
|
2123
|
-
), re = ((
|
|
2124
|
-
e.map((
|
|
2125
|
-
|
|
2126
|
-
Oe(
|
|
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)) : [], ae = l.filter((ge) => !U.includes(ge)), ce = U.length > 0 ? [...U, ...ae] : l, Ae = 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] ?? Ae[ge.key])
|
|
2127
2127
|
])
|
|
2128
2128
|
), at = ze(
|
|
2129
|
-
((
|
|
2129
|
+
((_t = S == null ? void 0 : S.settings) == null ? void 0 : _t.hiddenColumnKeys) ?? m,
|
|
2130
2130
|
e
|
|
2131
2131
|
);
|
|
2132
|
-
Me(ce), le(fe),
|
|
2132
|
+
Me(ce), le(fe), V || te(at), de.current = JSON.stringify({
|
|
2133
2133
|
columnOrder: ce,
|
|
2134
2134
|
columnWidths: fe,
|
|
2135
2135
|
hiddenColumnKeys: at
|
|
@@ -2144,32 +2144,32 @@ function oo({
|
|
|
2144
2144
|
])
|
|
2145
2145
|
);
|
|
2146
2146
|
le(S);
|
|
2147
|
-
const
|
|
2147
|
+
const R = ze(
|
|
2148
2148
|
m,
|
|
2149
2149
|
e
|
|
2150
2150
|
);
|
|
2151
|
-
|
|
2151
|
+
V || te(R), de.current = JSON.stringify({
|
|
2152
2152
|
columnOrder: l,
|
|
2153
2153
|
columnWidths: S,
|
|
2154
|
-
hiddenColumnKeys:
|
|
2154
|
+
hiddenColumnKeys: R
|
|
2155
2155
|
}), x.current = !0;
|
|
2156
2156
|
}
|
|
2157
2157
|
}).finally(() => {
|
|
2158
|
-
g ||
|
|
2158
|
+
g || oe(!0);
|
|
2159
2159
|
}), () => {
|
|
2160
2160
|
g = !0;
|
|
2161
2161
|
};
|
|
2162
2162
|
}, [
|
|
2163
|
-
|
|
2164
|
-
|
|
2163
|
+
M,
|
|
2164
|
+
K,
|
|
2165
2165
|
e,
|
|
2166
2166
|
m,
|
|
2167
|
-
|
|
2168
|
-
]),
|
|
2169
|
-
if (!
|
|
2167
|
+
V
|
|
2168
|
+
]), H(() => {
|
|
2169
|
+
if (!M || !X || !x.current) return;
|
|
2170
2170
|
const l = {
|
|
2171
2171
|
columnOrder: Ee,
|
|
2172
|
-
columnWidths:
|
|
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:
|
|
2181
|
-
}).then((
|
|
2182
|
-
|
|
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,
|
|
2187
|
+
}, [Ee, L, Q, M, X]), H(() => {
|
|
2188
2188
|
Me((l) => {
|
|
2189
|
-
const g = e.map((U) => U.key), S = l.filter((U) => g.includes(U)),
|
|
2190
|
-
return [...S, ...
|
|
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
|
-
}, [
|
|
2193
|
-
const ue = Ee.map((l) => e.find((g) => g.key === l)).filter((l) => !!l),
|
|
2192
|
+
}, [K, e]);
|
|
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
|
-
|
|
2198
|
+
V || te(g), D == null || D(g);
|
|
2199
2199
|
}
|
|
2200
|
-
function
|
|
2200
|
+
function Xe(l) {
|
|
2201
2201
|
me(
|
|
2202
2202
|
Q.includes(l) ? Q.filter((g) => g !== l) : [...Q, l]
|
|
2203
2203
|
);
|
|
@@ -2205,18 +2205,18 @@ function oo({
|
|
|
2205
2205
|
function We() {
|
|
2206
2206
|
me([]);
|
|
2207
2207
|
}
|
|
2208
|
-
const ut =
|
|
2209
|
-
(l =
|
|
2208
|
+
const ut = ke.useCallback(
|
|
2209
|
+
(l = Be.current) => {
|
|
2210
2210
|
if (!l) return;
|
|
2211
|
-
const g = l.getBoundingClientRect(), S = 256,
|
|
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
|
-
), U = window.innerHeight - g.bottom,
|
|
2215
|
-
|
|
2214
|
+
), U = window.innerHeight - g.bottom, ae = U < 288 && g.top > U ? void 0 : g.bottom + 6, ce = ae === void 0 ? window.innerHeight - g.top + 6 : void 0;
|
|
2215
|
+
Y({
|
|
2216
2216
|
position: "fixed",
|
|
2217
2217
|
zIndex: 9999,
|
|
2218
|
-
left:
|
|
2219
|
-
top:
|
|
2218
|
+
left: R,
|
|
2219
|
+
top: ae,
|
|
2220
2220
|
bottom: ce,
|
|
2221
2221
|
width: S
|
|
2222
2222
|
});
|
|
@@ -2225,14 +2225,14 @@ function oo({
|
|
|
2225
2225
|
);
|
|
2226
2226
|
function yr(l, g) {
|
|
2227
2227
|
l.preventDefault(), l.stopPropagation();
|
|
2228
|
-
const S =
|
|
2228
|
+
const S = Be.current === l.currentTarget && ee === g;
|
|
2229
2229
|
if (O && S) {
|
|
2230
|
-
|
|
2230
|
+
G(!1), se(null);
|
|
2231
2231
|
return;
|
|
2232
2232
|
}
|
|
2233
|
-
|
|
2233
|
+
Be.current = l.currentTarget, se(g), ut(l.currentTarget), G(!0);
|
|
2234
2234
|
}
|
|
2235
|
-
|
|
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
|
-
}, [
|
|
2248
|
-
|
|
2247
|
+
}, [K, e]), H(() => {
|
|
2248
|
+
V || te(
|
|
2249
2249
|
(l) => ze(l, e)
|
|
2250
2250
|
);
|
|
2251
|
-
}, [
|
|
2252
|
-
function l(
|
|
2253
|
-
var
|
|
2254
|
-
const U =
|
|
2255
|
-
!((
|
|
2251
|
+
}, [K, e, V]), H(() => {
|
|
2252
|
+
function l(R) {
|
|
2253
|
+
var ae, ce;
|
|
2254
|
+
const U = R.target;
|
|
2255
|
+
!((ae = $e.current) != null && ae.contains(U)) && !((ce = Be.current) != null && ce.contains(U)) && (G(!1), se(null));
|
|
2256
2256
|
}
|
|
2257
|
-
function g(
|
|
2258
|
-
|
|
2257
|
+
function g(R) {
|
|
2258
|
+
R.key === "Escape" && (G(!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
|
-
|
|
2268
|
+
H(() => {
|
|
2269
2269
|
function l(S) {
|
|
2270
|
-
const
|
|
2271
|
-
if (!
|
|
2272
|
-
const U = S.clientX -
|
|
2273
|
-
|
|
2270
|
+
const R = rt.current;
|
|
2271
|
+
if (!R) return;
|
|
2272
|
+
const U = S.clientX - R.startX, ae = e.find((ce) => ce.key === R.colKey);
|
|
2273
|
+
ae && le((ce) => ({
|
|
2274
2274
|
...ce,
|
|
2275
|
-
[
|
|
2275
|
+
[R.colKey]: Oe(ae, 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), [
|
|
2285
|
+
const nt = J(null), [Dt, mt] = A(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
|
-
|
|
2292
|
+
Dt !== S && mt(S);
|
|
2293
2293
|
}
|
|
2294
2294
|
function kr(l, g) {
|
|
2295
2295
|
g.preventDefault();
|
|
2296
|
-
const S = nt.current,
|
|
2297
|
-
S !== null && S !==
|
|
2298
|
-
const
|
|
2299
|
-
return
|
|
2296
|
+
const S = nt.current, R = Ee.indexOf(l);
|
|
2297
|
+
S !== null && S !== R && Me((U) => {
|
|
2298
|
+
const ae = [...U], [ce] = ae.splice(S, 1);
|
|
2299
|
+
return ae.splice(R, 0, ce), ae;
|
|
2300
2300
|
}), nt.current = null, mt(null);
|
|
2301
2301
|
}
|
|
2302
2302
|
function Sr() {
|
|
2303
2303
|
nt.current = null, mt(null);
|
|
2304
2304
|
}
|
|
2305
|
-
const [
|
|
2305
|
+
const [we, Lt] = A(null);
|
|
2306
2306
|
function Cr(l) {
|
|
2307
|
-
l.sortKey &&
|
|
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), [
|
|
2311
|
+
const [$r, ft] = A(1), [Bt, Er] = A(
|
|
2312
2312
|
h === !1 ? 0 : h
|
|
2313
2313
|
);
|
|
2314
|
-
|
|
2314
|
+
H(() => {
|
|
2315
2315
|
ft(1);
|
|
2316
2316
|
}, [r]);
|
|
2317
|
-
const Fe = !!(T &&
|
|
2318
|
-
if (!
|
|
2319
|
-
const l = e.find((g) => g.key ===
|
|
2317
|
+
const Fe = !!(T && j), Te = h !== !1, Ne = Fe ? $ ?? 1 : $r, De = Fe || Te ? 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
|
|
2322
|
-
return
|
|
2321
|
+
const R = g[l.sortKey], U = S[l.sortKey], ae = R === U ? 0 : R == null ? 1 : U == null || R < U ? -1 : 1;
|
|
2322
|
+
return we.dir === "asc" ? ae : -ae;
|
|
2323
2323
|
}) : r;
|
|
2324
|
-
}, [r,
|
|
2325
|
-
if (Fe || !
|
|
2326
|
-
const l = (
|
|
2327
|
-
return ht.slice(l, l +
|
|
2328
|
-
}, [ht, Fe,
|
|
2324
|
+
}, [r, we, e]), Tt = ke.useMemo(() => {
|
|
2325
|
+
if (Fe || !Te) return ht;
|
|
2326
|
+
const l = (Ne - 1) * De;
|
|
2327
|
+
return ht.slice(l, l + De);
|
|
2328
|
+
}, [ht, Fe, Te, Ne, De]), Ue = w ?? r.length, bt = Te ? Math.max(1, Math.ceil(Ue / De)) : 1, Lr = Te && Ue > De, Br = Te ? (Ne - 1) * De + 1 : 1, Tr = Te ? Math.min(Ne * De, Ue) : Ue;
|
|
2329
2329
|
function xt(l) {
|
|
2330
2330
|
const g = Math.max(1, Math.min(l, bt));
|
|
2331
2331
|
Fe ? T(g) : ft(g);
|
|
2332
2332
|
}
|
|
2333
|
-
function
|
|
2334
|
-
Er(l), Fe ? (
|
|
2333
|
+
function Ar(l) {
|
|
2334
|
+
Er(l), Fe ? (j(l), T(1)) : ft(1), j && j(l);
|
|
2335
2335
|
}
|
|
2336
|
-
const
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
}, [Q,
|
|
2340
|
-
function
|
|
2336
|
+
const At = (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
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
2382
|
-
const S = (
|
|
2381
|
+
xe.map((l, g) => {
|
|
2382
|
+
const S = (we == null ? void 0 : we.key) === l.key, R = !!l.sortKey, U = E && !He && g === 0, ae = Dt === g, Ae = (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" :
|
|
2386
|
+
className: `group select-none ${Ae ? "text-left" : At(l.align)}`,
|
|
2387
2387
|
style: {
|
|
2388
2388
|
...U ? {
|
|
2389
2389
|
position: "sticky",
|
|
@@ -2402,14 +2402,13 @@ function oo({
|
|
|
2402
2402
|
color: S ? "var(--primary)" : "var(--text-muted)",
|
|
2403
2403
|
whiteSpace: "nowrap",
|
|
2404
2404
|
transition: "color 0.15s",
|
|
2405
|
-
borderLeft:
|
|
2406
|
-
cursor:
|
|
2407
|
-
|
|
2408
|
-
padding: V ? z ? "5px 48px 5px 6px" : "7px 52px 7px 6px" : z ? "5px 24px 5px 6px" : "7px 28px 7px 6px"
|
|
2405
|
+
borderLeft: ae ? "2px solid var(--primary)" : "2px solid transparent",
|
|
2406
|
+
cursor: R ? "pointer" : "default",
|
|
2407
|
+
padding: z ? "5px 20px 5px 12px" : "7px 24px 7px 12px"
|
|
2409
2408
|
},
|
|
2410
2409
|
onDragOver: (re) => Nr(l.key, re),
|
|
2411
2410
|
onDrop: (re) => kr(l.key, re),
|
|
2412
|
-
onClick:
|
|
2411
|
+
onClick: R ? () => Cr(l) : void 0,
|
|
2413
2412
|
children: [
|
|
2414
2413
|
/* @__PURE__ */ t(
|
|
2415
2414
|
"span",
|
|
@@ -2423,21 +2422,23 @@ function oo({
|
|
|
2423
2422
|
},
|
|
2424
2423
|
onClick: (re) => re.stopPropagation(),
|
|
2425
2424
|
title: "Arrastrar para reordenar",
|
|
2426
|
-
className:
|
|
2425
|
+
className: `absolute left-0 top-1/2 inline-flex h-6 w-5 -translate-x-1/2 -translate-y-1/2 scale-90 items-center justify-center rounded-md border opacity-0 shadow-sm transition-[opacity,transform,background-color,border-color] duration-150 group-hover:scale-100 group-hover:opacity-100 ${ae ? "scale-100 opacity-100" : ""}`,
|
|
2427
2426
|
style: {
|
|
2428
2427
|
cursor: "grab",
|
|
2429
|
-
color: "var(--text-muted)",
|
|
2430
|
-
|
|
2428
|
+
color: ae ? "var(--primary)" : "var(--text-muted)",
|
|
2429
|
+
background: "var(--bg-card)",
|
|
2430
|
+
borderColor: ae ? "var(--primary)" : "var(--border)",
|
|
2431
|
+
zIndex: 5
|
|
2431
2432
|
},
|
|
2432
|
-
children: /* @__PURE__ */ t(
|
|
2433
|
+
children: /* @__PURE__ */ t(cn, { size: 15 })
|
|
2433
2434
|
}
|
|
2434
2435
|
),
|
|
2435
2436
|
/* @__PURE__ */ t(
|
|
2436
|
-
|
|
2437
|
+
Xt,
|
|
2437
2438
|
{
|
|
2438
2439
|
className: "inline-block max-w-full align-middle",
|
|
2439
2440
|
style: {
|
|
2440
|
-
width:
|
|
2441
|
+
width: "100%",
|
|
2441
2442
|
textAlign: Ae ? "left" : l.align === "center" ? "center" : l.align === "right" ? "right" : "left"
|
|
2442
2443
|
},
|
|
2443
2444
|
children: /* @__PURE__ */ o(
|
|
@@ -2446,24 +2447,29 @@ function oo({
|
|
|
2446
2447
|
className: `inline-flex max-w-full items-center gap-1 font-semibold uppercase tracking-wider ${z ? "text-[11px]" : "text-xs"}`,
|
|
2447
2448
|
children: [
|
|
2448
2449
|
/* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: l.header }),
|
|
2449
|
-
|
|
2450
|
+
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
2451
|
]
|
|
2451
2452
|
}
|
|
2452
2453
|
)
|
|
2453
2454
|
}
|
|
2454
2455
|
),
|
|
2455
|
-
|
|
2456
|
+
Z && /* @__PURE__ */ t(
|
|
2456
2457
|
"button",
|
|
2457
2458
|
{
|
|
2458
2459
|
type: "button",
|
|
2459
2460
|
"aria-haspopup": "menu",
|
|
2460
2461
|
"aria-expanded": O && ee === l.key,
|
|
2461
|
-
"aria-label":
|
|
2462
|
-
title:
|
|
2462
|
+
"aria-label": q,
|
|
2463
|
+
title: q,
|
|
2463
2464
|
onClick: (re) => yr(re, l.key),
|
|
2464
|
-
className: `absolute top-1/2
|
|
2465
|
-
style: {
|
|
2466
|
-
|
|
2465
|
+
className: `absolute right-3 top-1/2 inline-flex h-6 w-6 -translate-y-1/2 scale-95 items-center justify-center rounded-md border opacity-0 shadow-sm transition-[opacity,transform,background-color,border-color] duration-150 hover:bg-[var(--bg-card)] group-hover:scale-100 group-hover:opacity-100 focus:scale-100 focus:opacity-100 ${O && ee === l.key ? "scale-100 opacity-100" : ""}`,
|
|
2466
|
+
style: {
|
|
2467
|
+
color: "var(--text-muted)",
|
|
2468
|
+
background: "var(--bg-card)",
|
|
2469
|
+
borderColor: "var(--border)",
|
|
2470
|
+
zIndex: 4
|
|
2471
|
+
},
|
|
2472
|
+
children: /* @__PURE__ */ t(Wr, { className: "h-4 w-4" })
|
|
2467
2473
|
}
|
|
2468
2474
|
),
|
|
2469
2475
|
/* @__PURE__ */ t(
|
|
@@ -2476,7 +2482,7 @@ function oo({
|
|
|
2476
2482
|
re.preventDefault(), re.stopPropagation(), rt.current = {
|
|
2477
2483
|
colKey: l.key,
|
|
2478
2484
|
startX: re.clientX,
|
|
2479
|
-
startWidth:
|
|
2485
|
+
startWidth: L[l.key] ?? 150
|
|
2480
2486
|
}, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
2481
2487
|
},
|
|
2482
2488
|
onClick: (re) => re.stopPropagation(),
|
|
@@ -2503,25 +2509,25 @@ function oo({
|
|
|
2503
2509
|
})
|
|
2504
2510
|
]
|
|
2505
2511
|
}
|
|
2506
|
-
),
|
|
2507
|
-
if (!
|
|
2512
|
+
), It = () => {
|
|
2513
|
+
if (!Z || !O || typeof document > "u")
|
|
2508
2514
|
return null;
|
|
2509
2515
|
const l = Q.length;
|
|
2510
2516
|
return Pe(
|
|
2511
2517
|
/* @__PURE__ */ o(
|
|
2512
2518
|
"div",
|
|
2513
2519
|
{
|
|
2514
|
-
ref:
|
|
2520
|
+
ref: $e,
|
|
2515
2521
|
role: "menu",
|
|
2516
2522
|
className: "overflow-hidden rounded-lg border p-1 shadow-xl",
|
|
2517
2523
|
style: {
|
|
2518
|
-
...
|
|
2524
|
+
...be,
|
|
2519
2525
|
borderColor: "var(--border)",
|
|
2520
2526
|
background: "var(--bg-card)"
|
|
2521
2527
|
},
|
|
2522
2528
|
children: [
|
|
2523
2529
|
/* @__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 ? `${
|
|
2530
|
+
/* @__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
2531
|
/* @__PURE__ */ t(
|
|
2526
2532
|
"button",
|
|
2527
2533
|
{
|
|
@@ -2534,7 +2540,7 @@ function oo({
|
|
|
2534
2540
|
)
|
|
2535
2541
|
] }),
|
|
2536
2542
|
/* @__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 &&
|
|
2543
|
+
const S = !Q.includes(g.key), U = !(g.hideable !== !1) || S && xe.length <= 1;
|
|
2538
2544
|
return /* @__PURE__ */ o(
|
|
2539
2545
|
"button",
|
|
2540
2546
|
{
|
|
@@ -2542,7 +2548,7 @@ function oo({
|
|
|
2542
2548
|
role: "menuitemcheckbox",
|
|
2543
2549
|
"aria-checked": S,
|
|
2544
2550
|
disabled: U,
|
|
2545
|
-
onClick: () =>
|
|
2551
|
+
onClick: () => Xe(g.key),
|
|
2546
2552
|
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
2553
|
style: { color: "var(--text-main)" },
|
|
2548
2554
|
children: [
|
|
@@ -2569,9 +2575,9 @@ function oo({
|
|
|
2569
2575
|
),
|
|
2570
2576
|
document.body
|
|
2571
2577
|
);
|
|
2572
|
-
},
|
|
2573
|
-
if (!
|
|
2574
|
-
const l =
|
|
2578
|
+
}, jt = () => {
|
|
2579
|
+
if (!Lr || a) return null;
|
|
2580
|
+
const l = Un(Ne, bt);
|
|
2575
2581
|
return /* @__PURE__ */ o(
|
|
2576
2582
|
"div",
|
|
2577
2583
|
{
|
|
@@ -2579,24 +2585,24 @@ function oo({
|
|
|
2579
2585
|
style: { borderColor: "var(--border)", background: "var(--bg-input)" },
|
|
2580
2586
|
children: [
|
|
2581
2587
|
/* @__PURE__ */ o("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2582
|
-
/* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children:
|
|
2588
|
+
/* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: Ue === 0 ? "0 filas" : `${Br}–${Tr} de ${Ue}` }),
|
|
2583
2589
|
/* @__PURE__ */ o("div", { className: "flex items-center gap-1", children: [
|
|
2584
2590
|
/* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: "Filas:" }),
|
|
2585
2591
|
/* @__PURE__ */ t(
|
|
2586
2592
|
hr,
|
|
2587
2593
|
{
|
|
2588
|
-
value: String(
|
|
2589
|
-
onChange: (g) =>
|
|
2594
|
+
value: String(De),
|
|
2595
|
+
onChange: (g) => Ar(Number(g)),
|
|
2590
2596
|
options: C.map((g) => ({
|
|
2591
2597
|
value: String(g),
|
|
2592
2598
|
label: String(g)
|
|
2593
2599
|
})),
|
|
2594
2600
|
placeholder: "Filas",
|
|
2595
2601
|
searchable: !1,
|
|
2596
|
-
height:
|
|
2602
|
+
height: I,
|
|
2597
2603
|
padding: B,
|
|
2598
2604
|
className: "shrink-0 [&>button]:rounded-md [&>button]:text-xs [&_svg]:h-3.5 [&_svg]:w-3.5",
|
|
2599
|
-
style: { width:
|
|
2605
|
+
style: { width: _ }
|
|
2600
2606
|
}
|
|
2601
2607
|
)
|
|
2602
2608
|
] })
|
|
@@ -2605,11 +2611,11 @@ function oo({
|
|
|
2605
2611
|
/* @__PURE__ */ t(
|
|
2606
2612
|
"button",
|
|
2607
2613
|
{
|
|
2608
|
-
disabled:
|
|
2609
|
-
onClick: () => xt(
|
|
2614
|
+
disabled: Ne <= 1,
|
|
2615
|
+
onClick: () => xt(Ne - 1),
|
|
2610
2616
|
className: "rounded p-0.5 transition-colors disabled:opacity-30",
|
|
2611
2617
|
style: { color: "var(--text-muted)", background: "transparent" },
|
|
2612
|
-
children: /* @__PURE__ */ t(
|
|
2618
|
+
children: /* @__PURE__ */ t(qe, { className: "h-3.5 w-3.5" })
|
|
2613
2619
|
}
|
|
2614
2620
|
),
|
|
2615
2621
|
l.map(
|
|
@@ -2627,8 +2633,8 @@ function oo({
|
|
|
2627
2633
|
onClick: () => xt(g),
|
|
2628
2634
|
className: "h-5 w-5 rounded text-[11px] font-medium transition-colors",
|
|
2629
2635
|
style: {
|
|
2630
|
-
background: g ===
|
|
2631
|
-
color: g ===
|
|
2636
|
+
background: g === Ne ? "var(--primary)" : "transparent",
|
|
2637
|
+
color: g === Ne ? "var(--primary-fg)" : "var(--text-muted)"
|
|
2632
2638
|
},
|
|
2633
2639
|
children: g
|
|
2634
2640
|
},
|
|
@@ -2638,8 +2644,8 @@ function oo({
|
|
|
2638
2644
|
/* @__PURE__ */ t(
|
|
2639
2645
|
"button",
|
|
2640
2646
|
{
|
|
2641
|
-
disabled:
|
|
2642
|
-
onClick: () => xt(
|
|
2647
|
+
disabled: Ne >= bt,
|
|
2648
|
+
onClick: () => xt(Ne + 1),
|
|
2643
2649
|
className: "rounded p-0.5 transition-colors disabled:opacity-30",
|
|
2644
2650
|
style: { color: "var(--text-muted)", background: "transparent" },
|
|
2645
2651
|
children: /* @__PURE__ */ t(Ie, { className: "h-3.5 w-3.5" })
|
|
@@ -2650,7 +2656,7 @@ function oo({
|
|
|
2650
2656
|
]
|
|
2651
2657
|
}
|
|
2652
2658
|
);
|
|
2653
|
-
},
|
|
2659
|
+
}, Pt = () => /* @__PURE__ */ t(
|
|
2654
2660
|
"div",
|
|
2655
2661
|
{
|
|
2656
2662
|
className: "w-full min-w-0 max-w-full flex flex-col rounded-xl overflow-hidden",
|
|
@@ -2658,7 +2664,7 @@ function oo({
|
|
|
2658
2664
|
children: /* @__PURE__ */ o(
|
|
2659
2665
|
"div",
|
|
2660
2666
|
{
|
|
2661
|
-
ref:
|
|
2667
|
+
ref: ie,
|
|
2662
2668
|
className: "min-w-0 max-w-full",
|
|
2663
2669
|
style: {
|
|
2664
2670
|
maxHeight: W ? _e : void 0,
|
|
@@ -2687,17 +2693,17 @@ function oo({
|
|
|
2687
2693
|
"div",
|
|
2688
2694
|
{
|
|
2689
2695
|
className: "grid grid-cols-[1.2fr_1fr_0.8fr_0.7fr] gap-3",
|
|
2690
|
-
children: Array.from({ length: 4 }).map((S,
|
|
2696
|
+
children: Array.from({ length: 4 }).map((S, R) => /* @__PURE__ */ t(
|
|
2691
2697
|
"div",
|
|
2692
2698
|
{
|
|
2693
2699
|
className: "h-3.5 animate-pulse rounded-full",
|
|
2694
2700
|
style: {
|
|
2695
2701
|
background: "var(--border)",
|
|
2696
|
-
width: `${Ke(g,
|
|
2702
|
+
width: `${Ke(g, R)}%`,
|
|
2697
2703
|
minWidth: 32
|
|
2698
2704
|
}
|
|
2699
2705
|
},
|
|
2700
|
-
|
|
2706
|
+
R
|
|
2701
2707
|
))
|
|
2702
2708
|
},
|
|
2703
2709
|
g
|
|
@@ -2708,17 +2714,17 @@ function oo({
|
|
|
2708
2714
|
)
|
|
2709
2715
|
}
|
|
2710
2716
|
);
|
|
2711
|
-
return
|
|
2717
|
+
return M && !X || !a && r.length === 0 && !Ge ? Pt() : a && r.length === 0 ? /* @__PURE__ */ o(
|
|
2712
2718
|
"div",
|
|
2713
2719
|
{
|
|
2714
2720
|
className: "w-full min-w-0 max-w-full flex flex-col rounded-xl overflow-visible",
|
|
2715
2721
|
style: { border: "1px solid var(--border)" },
|
|
2716
2722
|
children: [
|
|
2717
|
-
|
|
2723
|
+
It(),
|
|
2718
2724
|
/* @__PURE__ */ t(
|
|
2719
2725
|
"div",
|
|
2720
2726
|
{
|
|
2721
|
-
ref:
|
|
2727
|
+
ref: ie,
|
|
2722
2728
|
className: "min-w-0 max-w-full overflow-hidden rounded-t-xl",
|
|
2723
2729
|
children: /* @__PURE__ */ t(
|
|
2724
2730
|
Yt,
|
|
@@ -2743,11 +2749,11 @@ function oo({
|
|
|
2743
2749
|
},
|
|
2744
2750
|
children: [
|
|
2745
2751
|
/* @__PURE__ */ o("colgroup", { children: [
|
|
2746
|
-
|
|
2747
|
-
|
|
2752
|
+
Se && /* @__PURE__ */ t("col", { style: { width: 40 } }),
|
|
2753
|
+
xe.map((l) => /* @__PURE__ */ t(
|
|
2748
2754
|
"col",
|
|
2749
2755
|
{
|
|
2750
|
-
style: { width:
|
|
2756
|
+
style: { width: L[l.key] ?? 150 }
|
|
2751
2757
|
},
|
|
2752
2758
|
l.key
|
|
2753
2759
|
))
|
|
@@ -2762,11 +2768,11 @@ function oo({
|
|
|
2762
2768
|
backdropFilter: "blur(14px)",
|
|
2763
2769
|
WebkitBackdropFilter: "blur(14px)"
|
|
2764
2770
|
} : void 0,
|
|
2765
|
-
children:
|
|
2771
|
+
children: zt()
|
|
2766
2772
|
}
|
|
2767
2773
|
),
|
|
2768
2774
|
/* @__PURE__ */ t("tbody", { children: Array.from({ length: i }).map((l, g) => /* @__PURE__ */ o("tr", { children: [
|
|
2769
|
-
|
|
2775
|
+
Se && /* @__PURE__ */ t(
|
|
2770
2776
|
"td",
|
|
2771
2777
|
{
|
|
2772
2778
|
className: `${z ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
@@ -2776,11 +2782,11 @@ function oo({
|
|
|
2776
2782
|
}
|
|
2777
2783
|
}
|
|
2778
2784
|
),
|
|
2779
|
-
|
|
2785
|
+
xe.map((S, R) => /* @__PURE__ */ t(
|
|
2780
2786
|
"td",
|
|
2781
2787
|
{
|
|
2782
2788
|
className: z ? "px-2 py-1.5" : "px-3 py-2",
|
|
2783
|
-
style:
|
|
2789
|
+
style: E && !He && R === 0 ? {
|
|
2784
2790
|
position: "sticky",
|
|
2785
2791
|
left: pt,
|
|
2786
2792
|
zIndex: 1,
|
|
@@ -2799,7 +2805,7 @@ function oo({
|
|
|
2799
2805
|
className: "h-3.5 rounded-full animate-pulse",
|
|
2800
2806
|
style: {
|
|
2801
2807
|
background: "var(--border)",
|
|
2802
|
-
width: `${Ke(g,
|
|
2808
|
+
width: `${Ke(g, R)}%`,
|
|
2803
2809
|
minWidth: 32
|
|
2804
2810
|
}
|
|
2805
2811
|
}
|
|
@@ -2815,7 +2821,7 @@ function oo({
|
|
|
2815
2821
|
)
|
|
2816
2822
|
}
|
|
2817
2823
|
),
|
|
2818
|
-
|
|
2824
|
+
jt()
|
|
2819
2825
|
]
|
|
2820
2826
|
}
|
|
2821
2827
|
) : !a && r.length === 0 ? /* @__PURE__ */ o(
|
|
@@ -2836,7 +2842,7 @@ function oo({
|
|
|
2836
2842
|
background: "color-mix(in srgb, var(--primary) 8%, var(--bg-card))",
|
|
2837
2843
|
color: "var(--primary)"
|
|
2838
2844
|
},
|
|
2839
|
-
children: c ?? /* @__PURE__ */ t(
|
|
2845
|
+
children: c ?? /* @__PURE__ */ t(Ve, { className: "h-5 w-5" })
|
|
2840
2846
|
}
|
|
2841
2847
|
),
|
|
2842
2848
|
/* @__PURE__ */ t(
|
|
@@ -2856,11 +2862,11 @@ function oo({
|
|
|
2856
2862
|
className: "w-full min-w-0 max-w-full flex flex-col rounded-xl overflow-visible",
|
|
2857
2863
|
style: { border: "1px solid var(--border)" },
|
|
2858
2864
|
children: [
|
|
2859
|
-
|
|
2865
|
+
It(),
|
|
2860
2866
|
/* @__PURE__ */ t(
|
|
2861
2867
|
"div",
|
|
2862
2868
|
{
|
|
2863
|
-
ref:
|
|
2869
|
+
ref: ie,
|
|
2864
2870
|
className: "min-w-0 max-w-full overflow-hidden rounded-t-xl",
|
|
2865
2871
|
children: /* @__PURE__ */ t(
|
|
2866
2872
|
Yt,
|
|
@@ -2885,11 +2891,11 @@ function oo({
|
|
|
2885
2891
|
},
|
|
2886
2892
|
children: [
|
|
2887
2893
|
/* @__PURE__ */ o("colgroup", { children: [
|
|
2888
|
-
|
|
2889
|
-
|
|
2894
|
+
Se && /* @__PURE__ */ t("col", { style: { width: 40 } }),
|
|
2895
|
+
xe.map((l) => /* @__PURE__ */ t(
|
|
2890
2896
|
"col",
|
|
2891
2897
|
{
|
|
2892
|
-
style: { width:
|
|
2898
|
+
style: { width: L[l.key] ?? 150 }
|
|
2893
2899
|
},
|
|
2894
2900
|
l.key
|
|
2895
2901
|
))
|
|
@@ -2904,18 +2910,18 @@ function oo({
|
|
|
2904
2910
|
backdropFilter: "blur(14px)",
|
|
2905
2911
|
WebkitBackdropFilter: "blur(14px)"
|
|
2906
2912
|
} : void 0,
|
|
2907
|
-
children:
|
|
2913
|
+
children: zt()
|
|
2908
2914
|
}
|
|
2909
2915
|
),
|
|
2910
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
2911
|
-
const S = n(l),
|
|
2912
|
-
u == null ? void 0 : u(
|
|
2913
|
-
) : null,
|
|
2914
|
-
return /* @__PURE__ */ o(
|
|
2915
|
-
|
|
2916
|
+
/* @__PURE__ */ t("tbody", { children: Tt.map((l, g) => {
|
|
2917
|
+
const S = n(l), R = Ot(u == null ? void 0 : u(l)), U = g > 0 ? Ot(
|
|
2918
|
+
u == null ? void 0 : u(Tt[g - 1])
|
|
2919
|
+
) : null, ae = R && R.key !== (U == null ? void 0 : U.key), ce = Se && 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)";
|
|
2920
|
+
return /* @__PURE__ */ o(ke.Fragment, { children: [
|
|
2921
|
+
ae && /* @__PURE__ */ t("tr", { className: R.className ?? "", children: /* @__PURE__ */ t(
|
|
2916
2922
|
"td",
|
|
2917
2923
|
{
|
|
2918
|
-
colSpan:
|
|
2924
|
+
colSpan: zr,
|
|
2919
2925
|
className: z ? "px-2 py-2" : "px-3 py-3",
|
|
2920
2926
|
style: {
|
|
2921
2927
|
background: "color-mix(in srgb, var(--primary) 8%, var(--bg-input))",
|
|
@@ -2923,8 +2929,8 @@ function oo({
|
|
|
2923
2929
|
borderRight: "1px solid var(--border)"
|
|
2924
2930
|
},
|
|
2925
2931
|
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:
|
|
2927
|
-
|
|
2932
|
+
/* @__PURE__ */ t("div", { className: "truncate text-xs font-semibold uppercase tracking-wider text-[var(--text-main)]", children: R.label }),
|
|
2933
|
+
R.description && /* @__PURE__ */ t("div", { className: "mt-0.5 truncate text-xs text-[var(--text-muted)]", children: R.description })
|
|
2928
2934
|
] }) })
|
|
2929
2935
|
}
|
|
2930
2936
|
) }),
|
|
@@ -2944,7 +2950,7 @@ function oo({
|
|
|
2944
2950
|
"var(--bg-hover)"
|
|
2945
2951
|
), fe.currentTarget.style.setProperty(
|
|
2946
2952
|
"--dt-sticky-bg",
|
|
2947
|
-
|
|
2953
|
+
Or
|
|
2948
2954
|
));
|
|
2949
2955
|
},
|
|
2950
2956
|
onMouseLeave: (fe) => {
|
|
@@ -2954,11 +2960,11 @@ function oo({
|
|
|
2954
2960
|
);
|
|
2955
2961
|
},
|
|
2956
2962
|
children: [
|
|
2957
|
-
|
|
2963
|
+
Se && /* @__PURE__ */ t(
|
|
2958
2964
|
"td",
|
|
2959
2965
|
{
|
|
2960
2966
|
className: `${z ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
2961
|
-
style:
|
|
2967
|
+
style: E ? {
|
|
2962
2968
|
position: "sticky",
|
|
2963
2969
|
left: 0,
|
|
2964
2970
|
zIndex: 3,
|
|
@@ -2983,12 +2989,12 @@ function oo({
|
|
|
2983
2989
|
)
|
|
2984
2990
|
}
|
|
2985
2991
|
),
|
|
2986
|
-
|
|
2987
|
-
const ot =
|
|
2992
|
+
xe.map((fe, at) => {
|
|
2993
|
+
const ot = E && !He && at === 0;
|
|
2988
2994
|
return /* @__PURE__ */ t(
|
|
2989
2995
|
"td",
|
|
2990
2996
|
{
|
|
2991
|
-
className: `${z ? "px-2 py-1.5" : "px-3 py-2"} ${
|
|
2997
|
+
className: `${z ? "px-2 py-1.5" : "px-3 py-2"} ${Wn} ${At(fe.align)} ${fe.className ?? ""}`,
|
|
2992
2998
|
style: {
|
|
2993
2999
|
overflow: "hidden",
|
|
2994
3000
|
whiteSpace: "nowrap",
|
|
@@ -3004,7 +3010,7 @@ function oo({
|
|
|
3004
3010
|
borderRight: "1px solid var(--border)"
|
|
3005
3011
|
}
|
|
3006
3012
|
},
|
|
3007
|
-
children: /* @__PURE__ */ t(
|
|
3013
|
+
children: /* @__PURE__ */ t(Xt, { children: fe.cell(l) })
|
|
3008
3014
|
},
|
|
3009
3015
|
fe.key
|
|
3010
3016
|
);
|
|
@@ -3021,7 +3027,7 @@ function oo({
|
|
|
3021
3027
|
)
|
|
3022
3028
|
}
|
|
3023
3029
|
),
|
|
3024
|
-
|
|
3030
|
+
jt()
|
|
3025
3031
|
]
|
|
3026
3032
|
}
|
|
3027
3033
|
);
|
|
@@ -3029,14 +3035,14 @@ function oo({
|
|
|
3029
3035
|
function Je(e) {
|
|
3030
3036
|
return e ? /* @__PURE__ */ new Date(`${e}T12:00:00`) : void 0;
|
|
3031
3037
|
}
|
|
3032
|
-
function
|
|
3038
|
+
function Zt(e) {
|
|
3033
3039
|
return e.toISOString().slice(0, 10);
|
|
3034
3040
|
}
|
|
3035
|
-
function
|
|
3041
|
+
function qn({
|
|
3036
3042
|
calendarMonth: e,
|
|
3037
3043
|
displayIndex: r
|
|
3038
3044
|
}) {
|
|
3039
|
-
const { previousMonth: n, nextMonth: a, goToMonth: i, months: c, labels: d, formatters: s } =
|
|
3045
|
+
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
3046
|
return /* @__PURE__ */ o(
|
|
3041
3047
|
"div",
|
|
3042
3048
|
{
|
|
@@ -3071,7 +3077,7 @@ function Un({
|
|
|
3071
3077
|
opacity: f ? 1 : 0.45,
|
|
3072
3078
|
cursor: f ? "pointer" : "not-allowed"
|
|
3073
3079
|
},
|
|
3074
|
-
children: /* @__PURE__ */ t(
|
|
3080
|
+
children: /* @__PURE__ */ t(qe, { size: 16 })
|
|
3075
3081
|
}
|
|
3076
3082
|
),
|
|
3077
3083
|
/* @__PURE__ */ t(
|
|
@@ -3104,7 +3110,7 @@ function Un({
|
|
|
3104
3110
|
function Yn(e) {
|
|
3105
3111
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
3106
3112
|
}
|
|
3107
|
-
function
|
|
3113
|
+
function lo({
|
|
3108
3114
|
startDate: e,
|
|
3109
3115
|
endDate: r,
|
|
3110
3116
|
onChange: n,
|
|
@@ -3121,7 +3127,7 @@ function io({
|
|
|
3121
3127
|
}, k = Je(a), [N, y] = A(
|
|
3122
3128
|
Je(i || e)
|
|
3123
3129
|
);
|
|
3124
|
-
return
|
|
3130
|
+
return H(() => {
|
|
3125
3131
|
y(Je(i || e));
|
|
3126
3132
|
}, [i, e]), /* @__PURE__ */ o("div", { children: [
|
|
3127
3133
|
/* @__PURE__ */ t(
|
|
@@ -3137,14 +3143,14 @@ function io({
|
|
|
3137
3143
|
padding: "10px 8px"
|
|
3138
3144
|
},
|
|
3139
3145
|
children: /* @__PURE__ */ t(
|
|
3140
|
-
|
|
3146
|
+
dn,
|
|
3141
3147
|
{
|
|
3142
3148
|
mode: "range",
|
|
3143
3149
|
selected: p,
|
|
3144
3150
|
month: N,
|
|
3145
3151
|
onMonthChange: y,
|
|
3146
3152
|
onSelect: (v) => {
|
|
3147
|
-
const u = v != null && v.from ?
|
|
3153
|
+
const u = v != null && v.from ? Zt(v.from) : e, b = v != null && v.to ? Zt(v.to) : "";
|
|
3148
3154
|
n({ startDate: u, endDate: b });
|
|
3149
3155
|
},
|
|
3150
3156
|
numberOfMonths: c,
|
|
@@ -3152,7 +3158,7 @@ function io({
|
|
|
3152
3158
|
disabled: k ? { before: k } : void 0,
|
|
3153
3159
|
showOutsideDays: !1,
|
|
3154
3160
|
components: {
|
|
3155
|
-
MonthCaption:
|
|
3161
|
+
MonthCaption: qn
|
|
3156
3162
|
},
|
|
3157
3163
|
className: "text-sm",
|
|
3158
3164
|
classNames: {
|
|
@@ -3291,11 +3297,11 @@ function io({
|
|
|
3291
3297
|
)
|
|
3292
3298
|
] });
|
|
3293
3299
|
}
|
|
3294
|
-
function
|
|
3300
|
+
function Vn(e) {
|
|
3295
3301
|
if (e !== void 0)
|
|
3296
3302
|
return typeof e == "number" ? `${e}px` : e;
|
|
3297
3303
|
}
|
|
3298
|
-
function
|
|
3304
|
+
function co({
|
|
3299
3305
|
trigger: e,
|
|
3300
3306
|
items: r,
|
|
3301
3307
|
align: n = "end",
|
|
@@ -3305,31 +3311,31 @@ function so({
|
|
|
3305
3311
|
menuClassName: d = "",
|
|
3306
3312
|
onOpenChange: s
|
|
3307
3313
|
}) {
|
|
3308
|
-
const [f, p] = A(!1), [k, N] = A(!1), [y, v] = A({}), u = J(null), b = J(null), h =
|
|
3314
|
+
const [f, p] = A(!1), [k, N] = A(!1), [y, v] = A({}), u = J(null), b = J(null), h = ve(
|
|
3309
3315
|
(w) => {
|
|
3310
3316
|
p(w), s == null || s(w);
|
|
3311
3317
|
},
|
|
3312
3318
|
[s]
|
|
3313
|
-
), C =
|
|
3319
|
+
), C = ve(() => {
|
|
3314
3320
|
const w = u.current;
|
|
3315
3321
|
if (!w) return;
|
|
3316
|
-
const $ = w.getBoundingClientRect(), T = typeof a == "number" ? a : $.width,
|
|
3322
|
+
const $ = w.getBoundingClientRect(), T = 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
3323
|
v({
|
|
3318
3324
|
position: "fixed",
|
|
3319
3325
|
zIndex: 9999,
|
|
3320
|
-
left:
|
|
3321
|
-
top:
|
|
3326
|
+
left: M,
|
|
3327
|
+
top: P,
|
|
3322
3328
|
bottom: z,
|
|
3323
|
-
width:
|
|
3329
|
+
width: Vn(typeof a == "number" ? T : a)
|
|
3324
3330
|
});
|
|
3325
3331
|
}, [n, a]);
|
|
3326
|
-
|
|
3332
|
+
H(() => N(!0), []), H(() => {
|
|
3327
3333
|
if (!f) return;
|
|
3328
3334
|
C();
|
|
3329
3335
|
const w = (T) => {
|
|
3330
|
-
var
|
|
3331
|
-
const
|
|
3332
|
-
!((
|
|
3336
|
+
var M, E;
|
|
3337
|
+
const j = T.target;
|
|
3338
|
+
!((M = u.current) != null && M.contains(j)) && !((E = b.current) != null && E.contains(j)) && h(!1);
|
|
3333
3339
|
}, $ = (T) => {
|
|
3334
3340
|
T.key === "Escape" && h(!1);
|
|
3335
3341
|
};
|
|
@@ -3337,9 +3343,9 @@ function so({
|
|
|
3337
3343
|
document.removeEventListener("mousedown", w), window.removeEventListener("keydown", $), window.removeEventListener("resize", C), window.removeEventListener("scroll", C, !0);
|
|
3338
3344
|
};
|
|
3339
3345
|
}, [f, h, C]);
|
|
3340
|
-
const
|
|
3346
|
+
const _ = (w) => {
|
|
3341
3347
|
i || (w.key === "Enter" || w.key === " ") && (w.preventDefault(), h(!f));
|
|
3342
|
-
},
|
|
3348
|
+
}, I = Et(e) ? on(e, {
|
|
3343
3349
|
onClick: () => !i && h(!f)
|
|
3344
3350
|
}) : e, B = f ? /* @__PURE__ */ t(
|
|
3345
3351
|
"div",
|
|
@@ -3384,16 +3390,17 @@ function so({
|
|
|
3384
3390
|
tabIndex: i ? -1 : 0,
|
|
3385
3391
|
"aria-haspopup": "menu",
|
|
3386
3392
|
"aria-expanded": f,
|
|
3387
|
-
onKeyDown:
|
|
3393
|
+
onKeyDown: _,
|
|
3388
3394
|
className: `inline-flex ${i ? "pointer-events-none opacity-60" : ""} ${c}`,
|
|
3389
3395
|
children: [
|
|
3390
|
-
|
|
3396
|
+
I,
|
|
3391
3397
|
k && B ? Pe(B, document.body) : null
|
|
3392
3398
|
]
|
|
3393
3399
|
}
|
|
3394
3400
|
);
|
|
3395
3401
|
}
|
|
3396
|
-
|
|
3402
|
+
const Gn = 180;
|
|
3403
|
+
function uo({
|
|
3397
3404
|
open: e,
|
|
3398
3405
|
onClose: r,
|
|
3399
3406
|
title: n,
|
|
@@ -3406,20 +3413,49 @@ function lo({
|
|
|
3406
3413
|
headerActions: p,
|
|
3407
3414
|
bodyClassName: k = "flex-1 overflow-y-auto px-6 py-5",
|
|
3408
3415
|
width: N = 440,
|
|
3409
|
-
|
|
3416
|
+
hasUnsavedChanges: y = !1,
|
|
3417
|
+
unsavedChangesTitle: v = "Descartar cambios",
|
|
3418
|
+
unsavedChangesDescription: u = "Hay cambios sin guardar. Si cierras el drawer se perderán.",
|
|
3419
|
+
unsavedChangesConfirmLabel: b = "Descartar",
|
|
3420
|
+
unsavedChangesCancelLabel: h = "Seguir editando",
|
|
3421
|
+
onDiscardChanges: C,
|
|
3422
|
+
children: _
|
|
3410
3423
|
}) {
|
|
3411
|
-
const [
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3424
|
+
const [I, B] = A(!1), [w, $] = A(!1), [T, j] = A(!1), M = ve(() => {
|
|
3425
|
+
$(!0), requestAnimationFrame(() => {
|
|
3426
|
+
requestAnimationFrame(() => j(!0));
|
|
3427
|
+
});
|
|
3428
|
+
}, []), E = ve(() => {
|
|
3429
|
+
j(!1), window.setTimeout(
|
|
3430
|
+
() => $(!1),
|
|
3431
|
+
Gn
|
|
3432
|
+
);
|
|
3433
|
+
}, []), P = ve(() => {
|
|
3434
|
+
if (y) {
|
|
3435
|
+
M();
|
|
3436
|
+
return;
|
|
3437
|
+
}
|
|
3438
|
+
r();
|
|
3439
|
+
}, [y, r, M]), z = ve(() => {
|
|
3440
|
+
j(!1), $(!1), C == null || C(), r();
|
|
3441
|
+
}, [r, C]);
|
|
3442
|
+
return H(() => {
|
|
3443
|
+
B(!0);
|
|
3444
|
+
}, []), H(() => (document.body.style.overflow = e ? "hidden" : "", e || (j(!1), $(!1)), () => {
|
|
3415
3445
|
document.body.style.overflow = "";
|
|
3416
|
-
}), [e]),
|
|
3446
|
+
}), [e]), H(() => {
|
|
3417
3447
|
if (!e) return;
|
|
3418
|
-
const
|
|
3419
|
-
|
|
3448
|
+
const W = (F) => {
|
|
3449
|
+
if (F.key === "Escape") {
|
|
3450
|
+
if (w) {
|
|
3451
|
+
E();
|
|
3452
|
+
return;
|
|
3453
|
+
}
|
|
3454
|
+
P();
|
|
3455
|
+
}
|
|
3420
3456
|
};
|
|
3421
|
-
return window.addEventListener("keydown",
|
|
3422
|
-
}, [e,
|
|
3457
|
+
return window.addEventListener("keydown", W), () => window.removeEventListener("keydown", W);
|
|
3458
|
+
}, [E, w, e, P]), I ? Pe(
|
|
3423
3459
|
/* @__PURE__ */ o(
|
|
3424
3460
|
"div",
|
|
3425
3461
|
{
|
|
@@ -3430,7 +3466,7 @@ function lo({
|
|
|
3430
3466
|
"div",
|
|
3431
3467
|
{
|
|
3432
3468
|
className: "absolute inset-0 bg-black/40 backdrop-blur-sm",
|
|
3433
|
-
onClick:
|
|
3469
|
+
onClick: P
|
|
3434
3470
|
}
|
|
3435
3471
|
),
|
|
3436
3472
|
/* @__PURE__ */ o(
|
|
@@ -3450,7 +3486,7 @@ function lo({
|
|
|
3450
3486
|
style: { borderBottom: "1px solid var(--border)" },
|
|
3451
3487
|
children: [
|
|
3452
3488
|
/* @__PURE__ */ o("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
3453
|
-
/* @__PURE__ */ t(
|
|
3489
|
+
/* @__PURE__ */ t(pe, { variant: "icon", onClick: P, title: "Cerrar", children: /* @__PURE__ */ t(ye, { className: "w-5 h-5" }) }),
|
|
3454
3490
|
i && /* @__PURE__ */ t("div", { className: "flex-shrink-0", children: i }),
|
|
3455
3491
|
/* @__PURE__ */ o("div", { className: "min-w-0", children: [
|
|
3456
3492
|
/* @__PURE__ */ t(
|
|
@@ -3473,23 +3509,23 @@ function lo({
|
|
|
3473
3509
|
] }),
|
|
3474
3510
|
(p || d) && /* @__PURE__ */ o("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
3475
3511
|
p,
|
|
3476
|
-
d && /* @__PURE__ */ o(
|
|
3512
|
+
d && /* @__PURE__ */ o(Ce, { children: [
|
|
3477
3513
|
/* @__PURE__ */ t(
|
|
3478
|
-
|
|
3514
|
+
pe,
|
|
3479
3515
|
{
|
|
3480
3516
|
variant: "secondary",
|
|
3481
3517
|
size: "sm",
|
|
3482
|
-
onClick:
|
|
3518
|
+
onClick: P,
|
|
3483
3519
|
style: { background: "var(--bg-input)" },
|
|
3484
3520
|
children: "Cancelar"
|
|
3485
3521
|
}
|
|
3486
3522
|
),
|
|
3487
3523
|
/* @__PURE__ */ t(
|
|
3488
|
-
|
|
3524
|
+
pe,
|
|
3489
3525
|
{
|
|
3490
3526
|
variant: "primary",
|
|
3491
3527
|
size: "sm",
|
|
3492
|
-
icon: /* @__PURE__ */ t(
|
|
3528
|
+
icon: /* @__PURE__ */ t(mn, { className: "w-4 h-4" }),
|
|
3493
3529
|
onClick: d,
|
|
3494
3530
|
loading: s,
|
|
3495
3531
|
disabled: f,
|
|
@@ -3501,7 +3537,109 @@ function lo({
|
|
|
3501
3537
|
]
|
|
3502
3538
|
}
|
|
3503
3539
|
),
|
|
3504
|
-
/* @__PURE__ */ t("div", { "data-drawer-scroll": "true", className: k, children:
|
|
3540
|
+
/* @__PURE__ */ t("div", { "data-drawer-scroll": "true", className: k, children: _ })
|
|
3541
|
+
]
|
|
3542
|
+
}
|
|
3543
|
+
),
|
|
3544
|
+
w && /* @__PURE__ */ o(
|
|
3545
|
+
"div",
|
|
3546
|
+
{
|
|
3547
|
+
role: "dialog",
|
|
3548
|
+
"aria-modal": "true",
|
|
3549
|
+
"aria-label": v,
|
|
3550
|
+
className: "fixed inset-0 z-[1001] flex items-center justify-center p-4",
|
|
3551
|
+
children: [
|
|
3552
|
+
/* @__PURE__ */ t(
|
|
3553
|
+
"div",
|
|
3554
|
+
{
|
|
3555
|
+
className: `absolute inset-0 bg-black/50 backdrop-blur-sm transition-opacity duration-200 ease-out ${T ? "opacity-100" : "opacity-0"}`,
|
|
3556
|
+
onClick: E
|
|
3557
|
+
}
|
|
3558
|
+
),
|
|
3559
|
+
/* @__PURE__ */ o(
|
|
3560
|
+
"div",
|
|
3561
|
+
{
|
|
3562
|
+
className: `relative z-10 w-full max-w-sm rounded-2xl border p-6 shadow-2xl transition-[opacity,transform] duration-200 ease-out ${T ? "translate-y-0 scale-100 opacity-100" : "translate-y-2 scale-[0.96] opacity-0"}`,
|
|
3563
|
+
style: {
|
|
3564
|
+
background: "var(--bg-card, #ffffff)",
|
|
3565
|
+
borderColor: "var(--border, #d8e1dc)"
|
|
3566
|
+
},
|
|
3567
|
+
children: [
|
|
3568
|
+
/* @__PURE__ */ t(
|
|
3569
|
+
pe,
|
|
3570
|
+
{
|
|
3571
|
+
variant: "icon",
|
|
3572
|
+
onClick: E,
|
|
3573
|
+
className: "absolute right-3 top-3 h-7 w-7 hover:opacity-70",
|
|
3574
|
+
style: { color: "var(--text-muted, #6b7f78)" },
|
|
3575
|
+
"aria-label": h,
|
|
3576
|
+
children: /* @__PURE__ */ t(ye, { className: "h-4 w-4" })
|
|
3577
|
+
}
|
|
3578
|
+
),
|
|
3579
|
+
/* @__PURE__ */ t(
|
|
3580
|
+
"div",
|
|
3581
|
+
{
|
|
3582
|
+
className: "mb-4 flex h-11 w-11 items-center justify-center rounded-xl",
|
|
3583
|
+
style: { background: "var(--warning-bg, #fff7ed)" },
|
|
3584
|
+
children: /* @__PURE__ */ t(
|
|
3585
|
+
$t,
|
|
3586
|
+
{
|
|
3587
|
+
className: "h-5 w-5",
|
|
3588
|
+
style: { color: "var(--warning, #d97706)" }
|
|
3589
|
+
}
|
|
3590
|
+
)
|
|
3591
|
+
}
|
|
3592
|
+
),
|
|
3593
|
+
/* @__PURE__ */ t(
|
|
3594
|
+
"h2",
|
|
3595
|
+
{
|
|
3596
|
+
className: "mb-1 text-base font-semibold",
|
|
3597
|
+
style: { color: "var(--text-main, #0f2f2c)" },
|
|
3598
|
+
children: v
|
|
3599
|
+
}
|
|
3600
|
+
),
|
|
3601
|
+
/* @__PURE__ */ t(
|
|
3602
|
+
"p",
|
|
3603
|
+
{
|
|
3604
|
+
className: "text-sm",
|
|
3605
|
+
style: { color: "var(--text-muted, #6b7f78)" },
|
|
3606
|
+
children: u
|
|
3607
|
+
}
|
|
3608
|
+
),
|
|
3609
|
+
/* @__PURE__ */ o("div", { className: "mt-6 flex gap-2", children: [
|
|
3610
|
+
/* @__PURE__ */ t(
|
|
3611
|
+
pe,
|
|
3612
|
+
{
|
|
3613
|
+
variant: "secondary",
|
|
3614
|
+
onClick: E,
|
|
3615
|
+
className: "flex-1 border",
|
|
3616
|
+
style: {
|
|
3617
|
+
background: "var(--bg-input, #f7faf8)",
|
|
3618
|
+
borderColor: "var(--border, #d8e1dc)",
|
|
3619
|
+
color: "var(--text-main, #0f2f2c)"
|
|
3620
|
+
},
|
|
3621
|
+
children: h
|
|
3622
|
+
}
|
|
3623
|
+
),
|
|
3624
|
+
/* @__PURE__ */ t(
|
|
3625
|
+
pe,
|
|
3626
|
+
{
|
|
3627
|
+
variant: "secondary",
|
|
3628
|
+
onClick: z,
|
|
3629
|
+
className: "flex-1 border",
|
|
3630
|
+
style: {
|
|
3631
|
+
background: "var(--warning, #d97706)",
|
|
3632
|
+
borderColor: "transparent",
|
|
3633
|
+
color: "#fff",
|
|
3634
|
+
boxShadow: "0 10px 22px rgba(217, 119, 6, 0.22)"
|
|
3635
|
+
},
|
|
3636
|
+
children: b
|
|
3637
|
+
}
|
|
3638
|
+
)
|
|
3639
|
+
] })
|
|
3640
|
+
]
|
|
3641
|
+
}
|
|
3642
|
+
)
|
|
3505
3643
|
]
|
|
3506
3644
|
}
|
|
3507
3645
|
)
|
|
@@ -3511,12 +3649,12 @@ function lo({
|
|
|
3511
3649
|
document.body
|
|
3512
3650
|
) : null;
|
|
3513
3651
|
}
|
|
3514
|
-
const
|
|
3652
|
+
const Kn = {
|
|
3515
3653
|
sm: "min-h-[160px] p-4",
|
|
3516
3654
|
md: "min-h-[220px] p-6",
|
|
3517
3655
|
lg: "min-h-[300px] p-8"
|
|
3518
3656
|
};
|
|
3519
|
-
function
|
|
3657
|
+
function mo({
|
|
3520
3658
|
title: e = "Sin resultados",
|
|
3521
3659
|
description: r,
|
|
3522
3660
|
icon: n = /* @__PURE__ */ t(sr, { className: "h-5 w-5" }),
|
|
@@ -3528,7 +3666,7 @@ function co({
|
|
|
3528
3666
|
return /* @__PURE__ */ t(
|
|
3529
3667
|
"div",
|
|
3530
3668
|
{
|
|
3531
|
-
className: `flex items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] text-center ${
|
|
3669
|
+
className: `flex items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] text-center ${Kn[c]} ${d}`,
|
|
3532
3670
|
children: /* @__PURE__ */ o("div", { className: "flex max-w-sm flex-col items-center gap-3", children: [
|
|
3533
3671
|
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
3672
|
/* @__PURE__ */ o("div", { className: "space-y-1", children: [
|
|
@@ -3543,7 +3681,7 @@ function co({
|
|
|
3543
3681
|
}
|
|
3544
3682
|
);
|
|
3545
3683
|
}
|
|
3546
|
-
function
|
|
3684
|
+
function Xn({
|
|
3547
3685
|
label: e,
|
|
3548
3686
|
children: r,
|
|
3549
3687
|
helperText: n,
|
|
@@ -3569,17 +3707,17 @@ var br = {
|
|
|
3569
3707
|
className: void 0,
|
|
3570
3708
|
style: void 0,
|
|
3571
3709
|
attr: void 0
|
|
3572
|
-
},
|
|
3573
|
-
function
|
|
3710
|
+
}, Jt = ke.createContext && /* @__PURE__ */ ke.createContext(br), Zn = ["attr", "size", "title"];
|
|
3711
|
+
function Jn(e, r) {
|
|
3574
3712
|
if (e == null) return {};
|
|
3575
|
-
var n, a, i =
|
|
3713
|
+
var n, a, i = Qn(e, r);
|
|
3576
3714
|
if (Object.getOwnPropertySymbols) {
|
|
3577
3715
|
var c = Object.getOwnPropertySymbols(e);
|
|
3578
3716
|
for (a = 0; a < c.length; a++) n = c[a], r.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
|
|
3579
3717
|
}
|
|
3580
3718
|
return i;
|
|
3581
3719
|
}
|
|
3582
|
-
function
|
|
3720
|
+
function Qn(e, r) {
|
|
3583
3721
|
if (e == null) return {};
|
|
3584
3722
|
var n = {};
|
|
3585
3723
|
for (var a in e) if ({}.hasOwnProperty.call(e, a)) {
|
|
@@ -3597,7 +3735,7 @@ function ct() {
|
|
|
3597
3735
|
return e;
|
|
3598
3736
|
}, ct.apply(null, arguments);
|
|
3599
3737
|
}
|
|
3600
|
-
function
|
|
3738
|
+
function Qt(e, r) {
|
|
3601
3739
|
var n = Object.keys(e);
|
|
3602
3740
|
if (Object.getOwnPropertySymbols) {
|
|
3603
3741
|
var a = Object.getOwnPropertySymbols(e);
|
|
@@ -3610,22 +3748,22 @@ function Jt(e, r) {
|
|
|
3610
3748
|
function dt(e) {
|
|
3611
3749
|
for (var r = 1; r < arguments.length; r++) {
|
|
3612
3750
|
var n = arguments[r] != null ? arguments[r] : {};
|
|
3613
|
-
r % 2 ?
|
|
3614
|
-
|
|
3615
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
3751
|
+
r % 2 ? Qt(Object(n), !0).forEach(function(a) {
|
|
3752
|
+
ea(e, a, n[a]);
|
|
3753
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Qt(Object(n)).forEach(function(a) {
|
|
3616
3754
|
Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(n, a));
|
|
3617
3755
|
});
|
|
3618
3756
|
}
|
|
3619
3757
|
return e;
|
|
3620
3758
|
}
|
|
3621
|
-
function
|
|
3622
|
-
return (r =
|
|
3759
|
+
function ea(e, r, n) {
|
|
3760
|
+
return (r = ta(r)) in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
|
|
3623
3761
|
}
|
|
3624
|
-
function
|
|
3625
|
-
var r =
|
|
3762
|
+
function ta(e) {
|
|
3763
|
+
var r = ra(e, "string");
|
|
3626
3764
|
return typeof r == "symbol" ? r : r + "";
|
|
3627
3765
|
}
|
|
3628
|
-
function
|
|
3766
|
+
function ra(e, r) {
|
|
3629
3767
|
if (typeof e != "object" || !e) return e;
|
|
3630
3768
|
var n = e[Symbol.toPrimitive];
|
|
3631
3769
|
if (n !== void 0) {
|
|
@@ -3636,23 +3774,23 @@ function ea(e, r) {
|
|
|
3636
3774
|
return (r === "string" ? String : Number)(e);
|
|
3637
3775
|
}
|
|
3638
3776
|
function xr(e) {
|
|
3639
|
-
return e && e.map((r, n) => /* @__PURE__ */
|
|
3777
|
+
return e && e.map((r, n) => /* @__PURE__ */ ke.createElement(r.tag, dt({
|
|
3640
3778
|
key: n
|
|
3641
3779
|
}, r.attr), xr(r.child)));
|
|
3642
3780
|
}
|
|
3643
3781
|
function vr(e) {
|
|
3644
|
-
return (r) => /* @__PURE__ */
|
|
3782
|
+
return (r) => /* @__PURE__ */ ke.createElement(na, ct({
|
|
3645
3783
|
attr: dt({}, e.attr)
|
|
3646
3784
|
}, r), xr(e.child));
|
|
3647
3785
|
}
|
|
3648
|
-
function
|
|
3786
|
+
function na(e) {
|
|
3649
3787
|
var r = (n) => {
|
|
3650
3788
|
var {
|
|
3651
3789
|
attr: a,
|
|
3652
3790
|
size: i,
|
|
3653
3791
|
title: c
|
|
3654
|
-
} = e, d =
|
|
3655
|
-
return n.className && (f = n.className), e.className && (f = (f ? f + " " : "") + e.className), /* @__PURE__ */
|
|
3792
|
+
} = e, d = Jn(e, Zn), s = i || n.size || "1em", f;
|
|
3793
|
+
return n.className && (f = n.className), e.className && (f = (f ? f + " " : "") + e.className), /* @__PURE__ */ ke.createElement("svg", ct({
|
|
3656
3794
|
stroke: "currentColor",
|
|
3657
3795
|
fill: "currentColor",
|
|
3658
3796
|
strokeWidth: "0"
|
|
@@ -3664,14 +3802,14 @@ function ta(e) {
|
|
|
3664
3802
|
height: s,
|
|
3665
3803
|
width: s,
|
|
3666
3804
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3667
|
-
}), c && /* @__PURE__ */
|
|
3805
|
+
}), c && /* @__PURE__ */ ke.createElement("title", null, c), e.children);
|
|
3668
3806
|
};
|
|
3669
|
-
return
|
|
3807
|
+
return Jt !== void 0 ? /* @__PURE__ */ ke.createElement(Jt.Consumer, null, (n) => r(n)) : r(br);
|
|
3670
3808
|
}
|
|
3671
|
-
function
|
|
3809
|
+
function aa(e) {
|
|
3672
3810
|
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
3811
|
}
|
|
3674
|
-
function
|
|
3812
|
+
function oa(e) {
|
|
3675
3813
|
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
3814
|
}
|
|
3677
3815
|
function yt({
|
|
@@ -3686,7 +3824,7 @@ function yt({
|
|
|
3686
3824
|
}
|
|
3687
3825
|
);
|
|
3688
3826
|
}
|
|
3689
|
-
function
|
|
3827
|
+
function fo({
|
|
3690
3828
|
label: e,
|
|
3691
3829
|
containerClassName: r = "",
|
|
3692
3830
|
helperText: n,
|
|
@@ -3698,13 +3836,13 @@ function uo({
|
|
|
3698
3836
|
required: f,
|
|
3699
3837
|
...p
|
|
3700
3838
|
}) {
|
|
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,
|
|
3839
|
+
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, _ = {
|
|
3702
3840
|
top: C ? 7 : 12,
|
|
3703
3841
|
color: k ? "var(--primary)" : "var(--text-muted)",
|
|
3704
3842
|
fontSize: C ? 10 : 13,
|
|
3705
3843
|
fontWeight: C ? 600 : 400,
|
|
3706
3844
|
textTransform: C ? "uppercase" : "none"
|
|
3707
|
-
},
|
|
3845
|
+
}, I = ($) => {
|
|
3708
3846
|
var T;
|
|
3709
3847
|
N(!0), (T = p.onFocus) == null || T.call(p, $);
|
|
3710
3848
|
}, B = ($) => {
|
|
@@ -3725,7 +3863,7 @@ function uo({
|
|
|
3725
3863
|
{
|
|
3726
3864
|
"aria-hidden": "true",
|
|
3727
3865
|
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(
|
|
3866
|
+
children: /* @__PURE__ */ t(aa, { className: "h-[18px] w-[18px]" })
|
|
3729
3867
|
}
|
|
3730
3868
|
),
|
|
3731
3869
|
/* @__PURE__ */ t(
|
|
@@ -3733,7 +3871,7 @@ function uo({
|
|
|
3733
3871
|
{
|
|
3734
3872
|
"aria-hidden": "true",
|
|
3735
3873
|
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(
|
|
3874
|
+
children: /* @__PURE__ */ t(oa, { className: "h-[18px] w-[18px]" })
|
|
3737
3875
|
}
|
|
3738
3876
|
)
|
|
3739
3877
|
]
|
|
@@ -3751,7 +3889,7 @@ function uo({
|
|
|
3751
3889
|
"aria-invalid": !!a || p["aria-invalid"],
|
|
3752
3890
|
"data-has-value": h ? "true" : void 0,
|
|
3753
3891
|
className: `h-11 w-full pt-5 ${u ? "pr-10" : ""} ${s}`,
|
|
3754
|
-
onFocus:
|
|
3892
|
+
onFocus: I,
|
|
3755
3893
|
onBlur: B
|
|
3756
3894
|
}
|
|
3757
3895
|
),
|
|
@@ -3759,7 +3897,7 @@ function uo({
|
|
|
3759
3897
|
"span",
|
|
3760
3898
|
{
|
|
3761
3899
|
className: "pointer-events-none absolute left-3 transition-all duration-150",
|
|
3762
|
-
style:
|
|
3900
|
+
style: _,
|
|
3763
3901
|
children: [
|
|
3764
3902
|
e,
|
|
3765
3903
|
f && /* @__PURE__ */ t("span", { className: "ml-1 text-[var(--danger)]", children: "*" })
|
|
@@ -3792,7 +3930,7 @@ function uo({
|
|
|
3792
3930
|
required: f,
|
|
3793
3931
|
"aria-invalid": !!a || p["aria-invalid"],
|
|
3794
3932
|
className: `w-full pr-10 ${s}`,
|
|
3795
|
-
onFocus:
|
|
3933
|
+
onFocus: I,
|
|
3796
3934
|
onBlur: B
|
|
3797
3935
|
}
|
|
3798
3936
|
),
|
|
@@ -3809,14 +3947,14 @@ function uo({
|
|
|
3809
3947
|
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
3948
|
] });
|
|
3811
3949
|
}
|
|
3812
|
-
function
|
|
3950
|
+
function er(e) {
|
|
3813
3951
|
if (e !== void 0)
|
|
3814
3952
|
return typeof e == "number" ? `${e}px` : e;
|
|
3815
3953
|
}
|
|
3816
|
-
function
|
|
3954
|
+
function ia(e, r) {
|
|
3817
3955
|
return e.length !== r.length ? !1 : e.every((n, a) => n === r[a]);
|
|
3818
3956
|
}
|
|
3819
|
-
function
|
|
3957
|
+
function po({
|
|
3820
3958
|
value: e,
|
|
3821
3959
|
onChange: r,
|
|
3822
3960
|
options: n,
|
|
@@ -3832,77 +3970,77 @@ function mo({
|
|
|
3832
3970
|
emptyText: y = "Sin resultados",
|
|
3833
3971
|
clearLabel: v = "Limpiar seleccion"
|
|
3834
3972
|
}) {
|
|
3835
|
-
const [u, b] = A(!1), [h, C] = A(""), [
|
|
3973
|
+
const [u, b] = A(!1), [h, C] = A(""), [_, I] = A(0), [B, w] = A(!1), [$, T] = A({}), 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
3974
|
() => n.filter((x) => W.has(x.value)),
|
|
3837
3975
|
[n, W]
|
|
3838
|
-
),
|
|
3976
|
+
), Z = F.slice(0, N), ne = Math.max(
|
|
3839
3977
|
0,
|
|
3840
|
-
F.length -
|
|
3978
|
+
F.length - Z.length
|
|
3841
3979
|
), m = z && h.trim() ? n.filter(
|
|
3842
3980
|
(x) => {
|
|
3843
|
-
var
|
|
3844
|
-
return x.label.toLowerCase().includes(h.toLowerCase()) || ((
|
|
3981
|
+
var V;
|
|
3982
|
+
return x.label.toLowerCase().includes(h.toLowerCase()) || ((V = x.sublabel) == null ? void 0 : V.toLowerCase().includes(h.toLowerCase()));
|
|
3845
3983
|
}
|
|
3846
|
-
) : n,
|
|
3847
|
-
const x =
|
|
3984
|
+
) : n, D = ve(() => {
|
|
3985
|
+
const x = j.current;
|
|
3848
3986
|
if (!x) return;
|
|
3849
|
-
const
|
|
3987
|
+
const V = x.getBoundingClientRect(), he = z ? 304 : 244, te = window.innerHeight - V.bottom, Q = te < he && V.top > te;
|
|
3850
3988
|
T({
|
|
3851
3989
|
position: "fixed",
|
|
3852
|
-
left:
|
|
3853
|
-
top: Q ? void 0 :
|
|
3854
|
-
bottom: Q ? window.innerHeight -
|
|
3855
|
-
width:
|
|
3990
|
+
left: V.left,
|
|
3991
|
+
top: Q ? void 0 : V.bottom + 4,
|
|
3992
|
+
bottom: Q ? window.innerHeight - V.top + 4 : void 0,
|
|
3993
|
+
width: V.width,
|
|
3856
3994
|
zIndex: 9999
|
|
3857
3995
|
});
|
|
3858
|
-
}, [z]),
|
|
3996
|
+
}, [z]), q = ve(
|
|
3859
3997
|
(x) => {
|
|
3860
|
-
|
|
3998
|
+
ia(e, x) || r(x);
|
|
3861
3999
|
},
|
|
3862
4000
|
[r, e]
|
|
3863
|
-
),
|
|
4001
|
+
), K = ve(
|
|
3864
4002
|
(x) => {
|
|
3865
|
-
const
|
|
3866
|
-
if (
|
|
3867
|
-
const
|
|
3868
|
-
|
|
4003
|
+
const V = n.find((te) => te.value === x);
|
|
4004
|
+
if (V != null && V.disabled) return;
|
|
4005
|
+
const he = W.has(x) ? e.filter((te) => te !== x) : [...e, x];
|
|
4006
|
+
q(he);
|
|
3869
4007
|
},
|
|
3870
|
-
[
|
|
3871
|
-
),
|
|
3872
|
-
|
|
4008
|
+
[q, n, e, W]
|
|
4009
|
+
), X = ve(() => q([]), [q]);
|
|
4010
|
+
H(() => w(!0), []), H(() => {
|
|
3873
4011
|
if (!u) return;
|
|
3874
|
-
function x(
|
|
4012
|
+
function x(V) {
|
|
3875
4013
|
var te, Q;
|
|
3876
|
-
const
|
|
3877
|
-
!((te =
|
|
4014
|
+
const he = V.target;
|
|
4015
|
+
!((te = j.current) != null && te.contains(he)) && !((Q = M.current) != null && Q.contains(he)) && (b(!1), C(""));
|
|
3878
4016
|
}
|
|
3879
4017
|
return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
3880
|
-
}, [u]),
|
|
3881
|
-
u && (
|
|
4018
|
+
}, [u]), H(() => {
|
|
4019
|
+
u && (I(0), D(), z && setTimeout(() => {
|
|
3882
4020
|
var x;
|
|
3883
|
-
return (x =
|
|
4021
|
+
return (x = E.current) == null ? void 0 : x.focus();
|
|
3884
4022
|
}, 0));
|
|
3885
|
-
}, [u, z,
|
|
4023
|
+
}, [u, z, D]), H(() => {
|
|
3886
4024
|
if (u)
|
|
3887
|
-
return window.addEventListener("resize",
|
|
3888
|
-
window.removeEventListener("resize",
|
|
4025
|
+
return window.addEventListener("resize", D), window.addEventListener("scroll", D, !0), () => {
|
|
4026
|
+
window.removeEventListener("resize", D), window.removeEventListener("scroll", D, !0);
|
|
3889
4027
|
};
|
|
3890
|
-
}, [u,
|
|
3891
|
-
if (
|
|
3892
|
-
const x =
|
|
4028
|
+
}, [u, D]), H(() => {
|
|
4029
|
+
if (_ < 0 || !P.current) return;
|
|
4030
|
+
const x = P.current.children[_];
|
|
3893
4031
|
x == null || x.scrollIntoView({ block: "nearest" });
|
|
3894
|
-
}, [
|
|
3895
|
-
function
|
|
4032
|
+
}, [_]);
|
|
4033
|
+
function oe(x) {
|
|
3896
4034
|
if (!u) {
|
|
3897
4035
|
(x.key === "Enter" || x.key === " " || x.key === "ArrowDown") && (x.preventDefault(), b(!0));
|
|
3898
4036
|
return;
|
|
3899
4037
|
}
|
|
3900
|
-
x.key === "Escape" && (x.preventDefault(), b(!1), C("")), x.key === "ArrowDown" && (x.preventDefault(),
|
|
4038
|
+
x.key === "Escape" && (x.preventDefault(), b(!1), C("")), x.key === "ArrowDown" && (x.preventDefault(), I((V) => Math.min(V + 1, m.length - 1))), x.key === "ArrowUp" && (x.preventDefault(), I((V) => Math.max(V - 1, 0))), x.key === "Enter" && m[_] && (x.preventDefault(), K(m[_].value)), x.key === "Backspace" && !h && e.length && (x.preventDefault(), q(e.slice(0, -1)));
|
|
3901
4039
|
}
|
|
3902
4040
|
const de = /* @__PURE__ */ o(
|
|
3903
4041
|
"div",
|
|
3904
4042
|
{
|
|
3905
|
-
ref:
|
|
4043
|
+
ref: M,
|
|
3906
4044
|
className: "overflow-hidden rounded-xl shadow-xl",
|
|
3907
4045
|
style: {
|
|
3908
4046
|
...$,
|
|
@@ -3917,7 +4055,7 @@ function mo({
|
|
|
3917
4055
|
style: { borderBottom: "1px solid var(--border)" },
|
|
3918
4056
|
children: [
|
|
3919
4057
|
/* @__PURE__ */ t(
|
|
3920
|
-
|
|
4058
|
+
Ve,
|
|
3921
4059
|
{
|
|
3922
4060
|
className: "h-3.5 w-3.5 flex-shrink-0",
|
|
3923
4061
|
style: { color: "var(--text-muted)" }
|
|
@@ -3926,10 +4064,10 @@ function mo({
|
|
|
3926
4064
|
/* @__PURE__ */ t(
|
|
3927
4065
|
"input",
|
|
3928
4066
|
{
|
|
3929
|
-
ref:
|
|
4067
|
+
ref: E,
|
|
3930
4068
|
value: h,
|
|
3931
4069
|
onChange: (x) => {
|
|
3932
|
-
C(x.target.value),
|
|
4070
|
+
C(x.target.value), I(0);
|
|
3933
4071
|
},
|
|
3934
4072
|
placeholder: "Buscar…",
|
|
3935
4073
|
className: "min-w-0 flex-1 bg-transparent text-sm outline-none",
|
|
@@ -3944,7 +4082,7 @@ function mo({
|
|
|
3944
4082
|
x.preventDefault(), C("");
|
|
3945
4083
|
},
|
|
3946
4084
|
children: /* @__PURE__ */ t(
|
|
3947
|
-
|
|
4085
|
+
ye,
|
|
3948
4086
|
{
|
|
3949
4087
|
className: "h-3.5 w-3.5",
|
|
3950
4088
|
style: { color: "var(--text-muted)" }
|
|
@@ -3973,7 +4111,7 @@ function mo({
|
|
|
3973
4111
|
{
|
|
3974
4112
|
type: "button",
|
|
3975
4113
|
onMouseDown: (x) => {
|
|
3976
|
-
x.preventDefault(),
|
|
4114
|
+
x.preventDefault(), X();
|
|
3977
4115
|
},
|
|
3978
4116
|
className: "font-semibold transition-colors hover:text-[var(--primary)]",
|
|
3979
4117
|
children: v
|
|
@@ -3985,7 +4123,7 @@ function mo({
|
|
|
3985
4123
|
/* @__PURE__ */ o(
|
|
3986
4124
|
"ul",
|
|
3987
4125
|
{
|
|
3988
|
-
ref:
|
|
4126
|
+
ref: P,
|
|
3989
4127
|
role: "listbox",
|
|
3990
4128
|
"aria-multiselectable": "true",
|
|
3991
4129
|
className: "overflow-y-auto",
|
|
@@ -3996,20 +4134,20 @@ function mo({
|
|
|
3996
4134
|
overscrollBehavior: "contain"
|
|
3997
4135
|
},
|
|
3998
4136
|
children: [
|
|
3999
|
-
m.map((x,
|
|
4000
|
-
const
|
|
4137
|
+
m.map((x, V) => {
|
|
4138
|
+
const he = V === _, te = W.has(x.value);
|
|
4001
4139
|
return /* @__PURE__ */ o(
|
|
4002
4140
|
"li",
|
|
4003
4141
|
{
|
|
4004
4142
|
role: "option",
|
|
4005
4143
|
"aria-selected": te,
|
|
4006
4144
|
onMouseDown: (Q) => {
|
|
4007
|
-
Q.preventDefault(),
|
|
4145
|
+
Q.preventDefault(), K(x.value);
|
|
4008
4146
|
},
|
|
4009
|
-
onMouseEnter: () => !x.disabled &&
|
|
4147
|
+
onMouseEnter: () => !x.disabled && I(V),
|
|
4010
4148
|
className: "flex cursor-pointer items-center gap-2 px-3 py-2 text-sm transition-colors",
|
|
4011
4149
|
style: {
|
|
4012
|
-
background:
|
|
4150
|
+
background: he ? "var(--bg-hover)" : te ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
|
|
4013
4151
|
color: x.disabled ? "var(--text-muted)" : "var(--text-main)",
|
|
4014
4152
|
cursor: x.disabled ? "not-allowed" : "pointer",
|
|
4015
4153
|
opacity: x.disabled ? 0.58 : 1
|
|
@@ -4075,10 +4213,10 @@ function mo({
|
|
|
4075
4213
|
return /* @__PURE__ */ o(
|
|
4076
4214
|
"div",
|
|
4077
4215
|
{
|
|
4078
|
-
ref:
|
|
4216
|
+
ref: j,
|
|
4079
4217
|
className: `relative ${c || "w-full"}`,
|
|
4080
4218
|
style: d,
|
|
4081
|
-
onKeyDown:
|
|
4219
|
+
onKeyDown: oe,
|
|
4082
4220
|
children: [
|
|
4083
4221
|
/* @__PURE__ */ o(
|
|
4084
4222
|
"button",
|
|
@@ -4088,8 +4226,8 @@ function mo({
|
|
|
4088
4226
|
onClick: () => !i && b((x) => !x),
|
|
4089
4227
|
className: "flex w-full items-center gap-2 rounded-lg text-left text-sm transition-colors focus:outline-none",
|
|
4090
4228
|
style: {
|
|
4091
|
-
minHeight:
|
|
4092
|
-
padding:
|
|
4229
|
+
minHeight: er(s),
|
|
4230
|
+
padding: er(f),
|
|
4093
4231
|
background: "var(--bg-input)",
|
|
4094
4232
|
color: F.length ? "var(--text-main)" : "var(--text-muted)",
|
|
4095
4233
|
border: u ? "1px solid var(--primary)" : "1px solid var(--border)",
|
|
@@ -4099,8 +4237,8 @@ function mo({
|
|
|
4099
4237
|
"aria-haspopup": "listbox",
|
|
4100
4238
|
"aria-expanded": u,
|
|
4101
4239
|
children: [
|
|
4102
|
-
/* @__PURE__ */ t("span", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-1.5 overflow-hidden", children:
|
|
4103
|
-
|
|
4240
|
+
/* @__PURE__ */ t("span", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-1.5 overflow-hidden", children: Z.length ? /* @__PURE__ */ o(Ce, { children: [
|
|
4241
|
+
Z.map((x) => /* @__PURE__ */ o(
|
|
4104
4242
|
"span",
|
|
4105
4243
|
{
|
|
4106
4244
|
className: "inline-flex max-w-[160px] items-center gap-1 rounded-md border px-1.5 py-0.5 text-xs font-semibold",
|
|
@@ -4144,11 +4282,11 @@ function mo({
|
|
|
4144
4282
|
tabIndex: -1,
|
|
4145
4283
|
"aria-label": v,
|
|
4146
4284
|
onMouseDown: (x) => {
|
|
4147
|
-
x.preventDefault(), x.stopPropagation(),
|
|
4285
|
+
x.preventDefault(), x.stopPropagation(), X();
|
|
4148
4286
|
},
|
|
4149
4287
|
className: "flex-shrink-0 rounded-full p-0.5 transition-colors hover:bg-black/10",
|
|
4150
4288
|
style: { color: "var(--text-muted)" },
|
|
4151
|
-
children: /* @__PURE__ */ t(
|
|
4289
|
+
children: /* @__PURE__ */ t(ye, { className: "h-3 w-3" })
|
|
4152
4290
|
}
|
|
4153
4291
|
) : /* @__PURE__ */ t(
|
|
4154
4292
|
Ye,
|
|
@@ -4168,13 +4306,13 @@ function mo({
|
|
|
4168
4306
|
}
|
|
4169
4307
|
);
|
|
4170
4308
|
}
|
|
4171
|
-
function
|
|
4309
|
+
function sa(e, r, n) {
|
|
4172
4310
|
const a = [], i = Math.max(2, e - n), c = Math.min(r - 1, e + n);
|
|
4173
4311
|
a.push(1), i > 2 && a.push("...");
|
|
4174
4312
|
for (let d = i; d <= c; d += 1) a.push(d);
|
|
4175
4313
|
return c < r - 1 && a.push("..."), r > 1 && a.push(r), a;
|
|
4176
4314
|
}
|
|
4177
|
-
function
|
|
4315
|
+
function ho({
|
|
4178
4316
|
page: e,
|
|
4179
4317
|
totalPages: r,
|
|
4180
4318
|
onPageChange: n,
|
|
@@ -4182,7 +4320,7 @@ function fo({
|
|
|
4182
4320
|
siblingCount: i = 1,
|
|
4183
4321
|
className: c = ""
|
|
4184
4322
|
}) {
|
|
4185
|
-
const d = Math.max(1, r), s = Math.min(Math.max(1, e), d), f =
|
|
4323
|
+
const d = Math.max(1, r), s = Math.min(Math.max(1, e), d), f = sa(s, d, i);
|
|
4186
4324
|
return /* @__PURE__ */ o(
|
|
4187
4325
|
"nav",
|
|
4188
4326
|
{
|
|
@@ -4190,14 +4328,14 @@ function fo({
|
|
|
4190
4328
|
className: `inline-flex items-center gap-1 ${c}`,
|
|
4191
4329
|
children: [
|
|
4192
4330
|
/* @__PURE__ */ t(
|
|
4193
|
-
|
|
4331
|
+
pe,
|
|
4194
4332
|
{
|
|
4195
4333
|
variant: "icon",
|
|
4196
4334
|
size: "xs",
|
|
4197
4335
|
"aria-label": "Pagina anterior",
|
|
4198
4336
|
disabled: a || s <= 1,
|
|
4199
4337
|
onClick: () => n(s - 1),
|
|
4200
|
-
children: /* @__PURE__ */ t(
|
|
4338
|
+
children: /* @__PURE__ */ t(qe, { className: "h-4 w-4" })
|
|
4201
4339
|
}
|
|
4202
4340
|
),
|
|
4203
4341
|
f.map(
|
|
@@ -4227,7 +4365,7 @@ function fo({
|
|
|
4227
4365
|
)
|
|
4228
4366
|
),
|
|
4229
4367
|
/* @__PURE__ */ t(
|
|
4230
|
-
|
|
4368
|
+
pe,
|
|
4231
4369
|
{
|
|
4232
4370
|
variant: "icon",
|
|
4233
4371
|
size: "xs",
|
|
@@ -4241,7 +4379,7 @@ function fo({
|
|
|
4241
4379
|
}
|
|
4242
4380
|
);
|
|
4243
4381
|
}
|
|
4244
|
-
function
|
|
4382
|
+
function bo({
|
|
4245
4383
|
value: e,
|
|
4246
4384
|
onChange: r,
|
|
4247
4385
|
options: n,
|
|
@@ -4303,7 +4441,7 @@ function po({
|
|
|
4303
4441
|
)
|
|
4304
4442
|
] });
|
|
4305
4443
|
}
|
|
4306
|
-
function
|
|
4444
|
+
function xo({
|
|
4307
4445
|
title: e,
|
|
4308
4446
|
subtitle: r,
|
|
4309
4447
|
icon: n,
|
|
@@ -4335,7 +4473,7 @@ function ho({
|
|
|
4335
4473
|
}
|
|
4336
4474
|
);
|
|
4337
4475
|
}
|
|
4338
|
-
const
|
|
4476
|
+
const la = {
|
|
4339
4477
|
neutral: {
|
|
4340
4478
|
text: "var(--text-secondary)",
|
|
4341
4479
|
bg: "var(--bg-input)",
|
|
@@ -4366,12 +4504,12 @@ const ia = {
|
|
|
4366
4504
|
bg: "rgba(59, 130, 246, 0.11)",
|
|
4367
4505
|
border: "rgba(59, 130, 246, 0.24)"
|
|
4368
4506
|
}
|
|
4369
|
-
},
|
|
4507
|
+
}, ca = {
|
|
4370
4508
|
xs: "min-h-5 px-1.5 text-[10px]",
|
|
4371
4509
|
sm: "min-h-6 px-2 text-xs",
|
|
4372
4510
|
md: "min-h-7 px-2.5 text-sm"
|
|
4373
4511
|
};
|
|
4374
|
-
function
|
|
4512
|
+
function vo({
|
|
4375
4513
|
children: e,
|
|
4376
4514
|
tone: r = "neutral",
|
|
4377
4515
|
size: n = "sm",
|
|
@@ -4379,11 +4517,11 @@ function bo({
|
|
|
4379
4517
|
dot: i = !1,
|
|
4380
4518
|
className: c = ""
|
|
4381
4519
|
}) {
|
|
4382
|
-
const d =
|
|
4520
|
+
const d = la[r];
|
|
4383
4521
|
return /* @__PURE__ */ o(
|
|
4384
4522
|
"span",
|
|
4385
4523
|
{
|
|
4386
|
-
className: `inline-flex max-w-full shrink-0 items-center gap-1.5 rounded-full border font-semibold leading-none ${
|
|
4524
|
+
className: `inline-flex max-w-full shrink-0 items-center gap-1.5 rounded-full border font-semibold leading-none ${ca[n]} ${c}`,
|
|
4387
4525
|
style: {
|
|
4388
4526
|
color: d.text,
|
|
4389
4527
|
background: d.bg,
|
|
@@ -4404,7 +4542,7 @@ function bo({
|
|
|
4404
4542
|
}
|
|
4405
4543
|
);
|
|
4406
4544
|
}
|
|
4407
|
-
function
|
|
4545
|
+
function go({
|
|
4408
4546
|
tabs: e,
|
|
4409
4547
|
activeTabId: r,
|
|
4410
4548
|
defaultActiveTabId: n,
|
|
@@ -4477,10 +4615,10 @@ function xo({
|
|
|
4477
4615
|
)
|
|
4478
4616
|
] });
|
|
4479
4617
|
}
|
|
4480
|
-
function
|
|
4618
|
+
function Le(...e) {
|
|
4481
4619
|
return e.filter(Boolean).join(" ");
|
|
4482
4620
|
}
|
|
4483
|
-
function
|
|
4621
|
+
function yo({
|
|
4484
4622
|
steps: e,
|
|
4485
4623
|
activeStepId: r,
|
|
4486
4624
|
initialStepId: n,
|
|
@@ -4500,65 +4638,65 @@ function vo({
|
|
|
4500
4638
|
footerClassName: h = ""
|
|
4501
4639
|
}) {
|
|
4502
4640
|
var Q;
|
|
4503
|
-
const C = ((Q = e[0]) == null ? void 0 : Q.id) ?? "", [
|
|
4641
|
+
const C = ((Q = e[0]) == null ? void 0 : Q.id) ?? "", [_, I] = A(
|
|
4504
4642
|
n ?? C
|
|
4505
4643
|
), [B, w] = A(
|
|
4506
4644
|
i
|
|
4507
|
-
), $ = r ??
|
|
4645
|
+
), $ = r ?? _, T = a ?? B, j = je(
|
|
4508
4646
|
() => new Set(T),
|
|
4509
4647
|
[T]
|
|
4510
|
-
),
|
|
4648
|
+
), M = Math.max(
|
|
4511
4649
|
0,
|
|
4512
4650
|
e.findIndex((O) => O.id === $)
|
|
4513
|
-
),
|
|
4651
|
+
), E = e[M] ?? e[0], P = e.length <= 1 ? 100 : M / (e.length - 1) * 100, z = (O) => {
|
|
4514
4652
|
a || w(O), d == null || d(O);
|
|
4515
4653
|
}, W = (O) => {
|
|
4516
|
-
const
|
|
4517
|
-
|
|
4518
|
-
}, F = (O) =>
|
|
4519
|
-
const
|
|
4520
|
-
return !
|
|
4654
|
+
const G = e.find((ee) => ee.id === O);
|
|
4655
|
+
G && (r || I(O), c == null || c(O, G));
|
|
4656
|
+
}, F = (O) => j.has(O), Z = (O) => e.slice(0, O).find((G) => !G.optional && !j.has(G.id)), ne = (O) => {
|
|
4657
|
+
const G = e[O];
|
|
4658
|
+
return !G || G.disabled ? !1 : O === M || f && O < M ? !0 : !Z(O);
|
|
4521
4659
|
}, m = (O) => {
|
|
4522
|
-
const
|
|
4523
|
-
return
|
|
4524
|
-
},
|
|
4525
|
-
const
|
|
4526
|
-
if (
|
|
4527
|
-
if (!ne(
|
|
4528
|
-
const ee =
|
|
4529
|
-
return ee && (s == null || s(e[
|
|
4660
|
+
const G = e.findIndex((ee) => ee.id === O);
|
|
4661
|
+
return G >= 0 && ne(G);
|
|
4662
|
+
}, D = (O) => {
|
|
4663
|
+
const G = e.findIndex((ee) => ee.id === O);
|
|
4664
|
+
if (G < 0) return !1;
|
|
4665
|
+
if (!ne(G)) {
|
|
4666
|
+
const ee = Z(G);
|
|
4667
|
+
return ee && (s == null || s(e[G], ee)), !1;
|
|
4530
4668
|
}
|
|
4531
4669
|
return W(O), !0;
|
|
4532
|
-
},
|
|
4533
|
-
!O ||
|
|
4534
|
-
},
|
|
4670
|
+
}, q = (O = E == null ? void 0 : E.id) => {
|
|
4671
|
+
!O || j.has(O) || z([...T, O]);
|
|
4672
|
+
}, K = (O = E == null ? void 0 : E.id) => {
|
|
4535
4673
|
if (!O) return;
|
|
4536
|
-
const
|
|
4537
|
-
const
|
|
4538
|
-
return
|
|
4674
|
+
const G = e.findIndex((se) => se.id === O), ee = T.filter((se) => {
|
|
4675
|
+
const be = e.findIndex((Y) => Y.id === se);
|
|
4676
|
+
return be >= 0 && be < G;
|
|
4539
4677
|
});
|
|
4540
|
-
z(ee),
|
|
4541
|
-
},
|
|
4542
|
-
const O = e[
|
|
4543
|
-
return O ?
|
|
4678
|
+
z(ee), G >= 0 && M > G && W(O);
|
|
4679
|
+
}, X = () => M <= 0 ? !1 : D(e[M - 1].id), oe = () => {
|
|
4680
|
+
const O = e[M + 1];
|
|
4681
|
+
return O ? D(O.id) : !1;
|
|
4544
4682
|
}, de = {
|
|
4545
|
-
activeStep:
|
|
4546
|
-
activeIndex:
|
|
4683
|
+
activeStep: E,
|
|
4684
|
+
activeIndex: M,
|
|
4547
4685
|
completedStepIds: T,
|
|
4548
4686
|
isCompleted: F,
|
|
4549
4687
|
isUnlocked: m,
|
|
4550
|
-
completeStep:
|
|
4551
|
-
uncompleteStep:
|
|
4552
|
-
goToStep:
|
|
4553
|
-
goNext:
|
|
4554
|
-
goPrevious:
|
|
4688
|
+
completeStep: q,
|
|
4689
|
+
uncompleteStep: K,
|
|
4690
|
+
goToStep: D,
|
|
4691
|
+
goNext: oe,
|
|
4692
|
+
goPrevious: X
|
|
4555
4693
|
};
|
|
4556
|
-
if (!
|
|
4557
|
-
const x = e[
|
|
4694
|
+
if (!E) return null;
|
|
4695
|
+
const x = e[M + 1], V = M > 0, he = x ? m(x.id) : !1, te = typeof E.content == "function" ? E.content(de) : E.content;
|
|
4558
4696
|
return /* @__PURE__ */ o(
|
|
4559
4697
|
"section",
|
|
4560
4698
|
{
|
|
4561
|
-
className:
|
|
4699
|
+
className: Le(
|
|
4562
4700
|
"overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)]",
|
|
4563
4701
|
v
|
|
4564
4702
|
),
|
|
@@ -4566,7 +4704,7 @@ function vo({
|
|
|
4566
4704
|
/* @__PURE__ */ o(
|
|
4567
4705
|
"div",
|
|
4568
4706
|
{
|
|
4569
|
-
className:
|
|
4707
|
+
className: Le(
|
|
4570
4708
|
"border-b border-[var(--border)] bg-[var(--bg-input)]",
|
|
4571
4709
|
u
|
|
4572
4710
|
),
|
|
@@ -4575,7 +4713,7 @@ function vo({
|
|
|
4575
4713
|
"div",
|
|
4576
4714
|
{
|
|
4577
4715
|
className: "h-full rounded-r-full bg-[var(--primary)] transition-[width] duration-500 ease-out",
|
|
4578
|
-
style: { width: `${
|
|
4716
|
+
style: { width: `${P}%` }
|
|
4579
4717
|
}
|
|
4580
4718
|
) }),
|
|
4581
4719
|
/* @__PURE__ */ t(
|
|
@@ -4585,29 +4723,29 @@ function vo({
|
|
|
4585
4723
|
style: {
|
|
4586
4724
|
gridTemplateColumns: `repeat(${e.length}, minmax(0, 1fr))`
|
|
4587
4725
|
},
|
|
4588
|
-
children: e.map((O,
|
|
4589
|
-
const ee = O.id ===
|
|
4726
|
+
children: e.map((O, G) => {
|
|
4727
|
+
const ee = O.id === E.id, se = F(O.id), be = ne(G), Y = Z(G);
|
|
4590
4728
|
return /* @__PURE__ */ o(
|
|
4591
4729
|
"button",
|
|
4592
4730
|
{
|
|
4593
4731
|
type: "button",
|
|
4594
|
-
disabled: !
|
|
4732
|
+
disabled: !be,
|
|
4595
4733
|
"aria-current": ee ? "step" : void 0,
|
|
4596
|
-
"aria-disabled": !
|
|
4597
|
-
title: !
|
|
4598
|
-
onClick: () =>
|
|
4599
|
-
className:
|
|
4734
|
+
"aria-disabled": !be,
|
|
4735
|
+
title: !be && Y ? `Completa ${Y.title}` : O.title,
|
|
4736
|
+
onClick: () => D(O.id),
|
|
4737
|
+
className: Le(
|
|
4600
4738
|
"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
4739
|
ee && "border-[var(--primary)] bg-[var(--bg-card)] shadow-sm",
|
|
4602
4740
|
se && !ee && "border-[var(--primary)]/35 bg-[var(--bg-card)]",
|
|
4603
|
-
!ee && !se &&
|
|
4604
|
-
!
|
|
4741
|
+
!ee && !se && be && "border-transparent bg-[var(--bg-card)]/45 hover:border-[var(--border)] hover:bg-[var(--bg-card)]",
|
|
4742
|
+
!be && "border-transparent bg-[var(--bg-card)]/35 opacity-60"
|
|
4605
4743
|
),
|
|
4606
4744
|
children: [
|
|
4607
4745
|
/* @__PURE__ */ t(
|
|
4608
4746
|
"span",
|
|
4609
4747
|
{
|
|
4610
|
-
className:
|
|
4748
|
+
className: Le(
|
|
4611
4749
|
"absolute inset-x-0 top-0 h-0.5 origin-left scale-x-0 bg-[var(--primary)] transition-transform duration-300",
|
|
4612
4750
|
ee && "scale-x-100"
|
|
4613
4751
|
)
|
|
@@ -4617,26 +4755,26 @@ function vo({
|
|
|
4617
4755
|
/* @__PURE__ */ t(
|
|
4618
4756
|
"span",
|
|
4619
4757
|
{
|
|
4620
|
-
className:
|
|
4758
|
+
className: Le(
|
|
4621
4759
|
"grid h-7 w-7 shrink-0 place-items-center rounded-full border text-xs font-bold transition-all duration-200",
|
|
4622
4760
|
ee && "border-[var(--primary)] bg-[var(--primary)] text-[var(--primary-fg)]",
|
|
4623
4761
|
se && !ee && "border-[var(--primary)] bg-[var(--primary)]/12 text-[var(--primary)]",
|
|
4624
|
-
!se && !ee &&
|
|
4625
|
-
!
|
|
4762
|
+
!se && !ee && be && "border-[var(--border)] text-[var(--text-muted)]",
|
|
4763
|
+
!be && "border-[var(--border)] text-[var(--text-muted)]"
|
|
4626
4764
|
),
|
|
4627
|
-
children: se ? /* @__PURE__ */ t(Qe, { className: "h-4 w-4" }) :
|
|
4765
|
+
children: se ? /* @__PURE__ */ t(Qe, { className: "h-4 w-4" }) : be ? G + 1 : /* @__PURE__ */ t(Fr, { className: "h-3.5 w-3.5" })
|
|
4628
4766
|
}
|
|
4629
4767
|
),
|
|
4630
4768
|
/* @__PURE__ */ o("span", { className: "min-w-0 flex-1", children: [
|
|
4631
4769
|
/* @__PURE__ */ o(
|
|
4632
4770
|
"span",
|
|
4633
4771
|
{
|
|
4634
|
-
className:
|
|
4772
|
+
className: Le(
|
|
4635
4773
|
"block truncate text-xs font-semibold transition-colors duration-200",
|
|
4636
4774
|
ee ? "text-[var(--text-main)]" : "text-[var(--text-secondary)]"
|
|
4637
4775
|
),
|
|
4638
4776
|
children: [
|
|
4639
|
-
|
|
4777
|
+
G + 1,
|
|
4640
4778
|
". ",
|
|
4641
4779
|
O.title
|
|
4642
4780
|
]
|
|
@@ -4659,38 +4797,38 @@ function vo({
|
|
|
4659
4797
|
/* @__PURE__ */ t(
|
|
4660
4798
|
"div",
|
|
4661
4799
|
{
|
|
4662
|
-
className:
|
|
4800
|
+
className: Le(
|
|
4663
4801
|
"min-h-72 animate-[stepWizardIn_220ms_ease-out] p-5",
|
|
4664
4802
|
b
|
|
4665
4803
|
),
|
|
4666
4804
|
children: te
|
|
4667
4805
|
},
|
|
4668
|
-
|
|
4806
|
+
E.id
|
|
4669
4807
|
),
|
|
4670
4808
|
p && /* @__PURE__ */ o(
|
|
4671
4809
|
"div",
|
|
4672
4810
|
{
|
|
4673
|
-
className:
|
|
4811
|
+
className: Le(
|
|
4674
4812
|
"flex flex-wrap items-center justify-between gap-3 border-t border-[var(--border)] bg-[var(--bg-input)] px-4 py-3",
|
|
4675
4813
|
h
|
|
4676
4814
|
),
|
|
4677
4815
|
children: [
|
|
4678
4816
|
/* @__PURE__ */ t(
|
|
4679
|
-
|
|
4817
|
+
pe,
|
|
4680
4818
|
{
|
|
4681
4819
|
variant: "secondary",
|
|
4682
4820
|
height: 38,
|
|
4683
4821
|
padding: "0 14px",
|
|
4684
|
-
icon: /* @__PURE__ */ t(
|
|
4685
|
-
disabled: !
|
|
4686
|
-
onClick:
|
|
4822
|
+
icon: /* @__PURE__ */ t(qe, {}),
|
|
4823
|
+
disabled: !V,
|
|
4824
|
+
onClick: X,
|
|
4687
4825
|
children: k
|
|
4688
4826
|
}
|
|
4689
4827
|
),
|
|
4690
4828
|
/* @__PURE__ */ o("div", { className: "flex items-center gap-3 text-xs text-[var(--text-muted)]", children: [
|
|
4691
4829
|
/* @__PURE__ */ o("span", { children: [
|
|
4692
4830
|
"Paso ",
|
|
4693
|
-
|
|
4831
|
+
M + 1,
|
|
4694
4832
|
" de ",
|
|
4695
4833
|
e.length
|
|
4696
4834
|
] }),
|
|
@@ -4701,14 +4839,14 @@ function vo({
|
|
|
4701
4839
|
] })
|
|
4702
4840
|
] }),
|
|
4703
4841
|
/* @__PURE__ */ t(
|
|
4704
|
-
|
|
4842
|
+
pe,
|
|
4705
4843
|
{
|
|
4706
4844
|
height: 38,
|
|
4707
4845
|
padding: "0 14px",
|
|
4708
4846
|
icon: /* @__PURE__ */ t(Ie, {}),
|
|
4709
|
-
disabled: !x || !
|
|
4710
|
-
onClick:
|
|
4711
|
-
children: x && !
|
|
4847
|
+
disabled: !x || !he,
|
|
4848
|
+
onClick: oe,
|
|
4849
|
+
children: x && !he ? y : N
|
|
4712
4850
|
}
|
|
4713
4851
|
)
|
|
4714
4852
|
]
|
|
@@ -4718,17 +4856,17 @@ function vo({
|
|
|
4718
4856
|
}
|
|
4719
4857
|
);
|
|
4720
4858
|
}
|
|
4721
|
-
const
|
|
4859
|
+
const da = {
|
|
4722
4860
|
sm: "min-h-20 px-2.5 py-1.5 text-xs leading-5",
|
|
4723
4861
|
md: "min-h-24 px-2.5 py-2 text-sm leading-5",
|
|
4724
4862
|
lg: "min-h-32 px-3 py-2.5 text-sm leading-6"
|
|
4725
|
-
},
|
|
4863
|
+
}, ua = {
|
|
4726
4864
|
none: "resize-none",
|
|
4727
4865
|
vertical: "resize-y",
|
|
4728
4866
|
horizontal: "resize-x",
|
|
4729
4867
|
both: "resize"
|
|
4730
4868
|
};
|
|
4731
|
-
function
|
|
4869
|
+
function ma(e, r) {
|
|
4732
4870
|
if (e) {
|
|
4733
4871
|
if (typeof e == "function") {
|
|
4734
4872
|
e(r);
|
|
@@ -4737,10 +4875,10 @@ function da(e, r) {
|
|
|
4737
4875
|
e.current = r;
|
|
4738
4876
|
}
|
|
4739
4877
|
}
|
|
4740
|
-
function
|
|
4878
|
+
function fa(e, r) {
|
|
4741
4879
|
return e !== void 0 ? String(e).length : r !== void 0 ? String(r).length : 0;
|
|
4742
4880
|
}
|
|
4743
|
-
const
|
|
4881
|
+
const pa = sn(
|
|
4744
4882
|
function({
|
|
4745
4883
|
className: r = "",
|
|
4746
4884
|
wrapperClassName: n = "",
|
|
@@ -4759,47 +4897,47 @@ const ma = on(
|
|
|
4759
4897
|
defaultValue: b,
|
|
4760
4898
|
maxLength: h,
|
|
4761
4899
|
onInput: C,
|
|
4762
|
-
...
|
|
4763
|
-
},
|
|
4764
|
-
const B = J(null), w =
|
|
4900
|
+
..._
|
|
4901
|
+
}, I) {
|
|
4902
|
+
const B = J(null), w = fa(u, b), $ = p ?? h, T = !!(N || y || f), j = k === "error" ? "var(--danger)" : k === "success" ? "#16a34a" : "var(--border)", M = {
|
|
4765
4903
|
...v ?? {},
|
|
4766
4904
|
...d ? { minHeight: `${d * 24 + 18}px` } : null,
|
|
4767
4905
|
...s ? { maxHeight: `${s * 24 + 18}px` } : null
|
|
4768
|
-
},
|
|
4906
|
+
}, E = () => {
|
|
4769
4907
|
const z = B.current;
|
|
4770
4908
|
!z || !c || (z.style.height = "auto", z.style.height = `${z.scrollHeight}px`);
|
|
4771
4909
|
};
|
|
4772
|
-
|
|
4773
|
-
const
|
|
4910
|
+
H(E, [c, u]);
|
|
4911
|
+
const P = /* @__PURE__ */ t(
|
|
4774
4912
|
"textarea",
|
|
4775
4913
|
{
|
|
4776
|
-
...
|
|
4914
|
+
..._,
|
|
4777
4915
|
ref: (z) => {
|
|
4778
|
-
B.current = z,
|
|
4916
|
+
B.current = z, ma(I, z);
|
|
4779
4917
|
},
|
|
4780
4918
|
value: u,
|
|
4781
4919
|
defaultValue: b,
|
|
4782
4920
|
maxLength: h,
|
|
4783
|
-
"aria-invalid": k === "error" ||
|
|
4921
|
+
"aria-invalid": k === "error" || _["aria-invalid"],
|
|
4784
4922
|
onInput: (z) => {
|
|
4785
|
-
|
|
4923
|
+
E(), C == null || C(z);
|
|
4786
4924
|
},
|
|
4787
|
-
style: { ...
|
|
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 ${
|
|
4925
|
+
style: { ...M, borderColor: j },
|
|
4926
|
+
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
4927
|
}
|
|
4790
4928
|
);
|
|
4791
4929
|
return T ? /* @__PURE__ */ o("span", { className: `relative block ${n}`, children: [
|
|
4792
4930
|
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
|
-
|
|
4931
|
+
P,
|
|
4794
4932
|
y && /* @__PURE__ */ t("span", { className: "absolute right-2 top-2 flex items-center justify-center", children: y }),
|
|
4795
4933
|
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
4934
|
w,
|
|
4797
4935
|
$ ? `/${$}` : ""
|
|
4798
4936
|
] })
|
|
4799
|
-
] }) :
|
|
4937
|
+
] }) : P;
|
|
4800
4938
|
}
|
|
4801
4939
|
);
|
|
4802
|
-
function
|
|
4940
|
+
function wo({
|
|
4803
4941
|
label: e,
|
|
4804
4942
|
containerClassName: r = "",
|
|
4805
4943
|
helperText: n,
|
|
@@ -4811,7 +4949,7 @@ function go({
|
|
|
4811
4949
|
...f
|
|
4812
4950
|
}) {
|
|
4813
4951
|
return /* @__PURE__ */ t(
|
|
4814
|
-
|
|
4952
|
+
Xn,
|
|
4815
4953
|
{
|
|
4816
4954
|
label: e,
|
|
4817
4955
|
required: c,
|
|
@@ -4820,7 +4958,7 @@ function go({
|
|
|
4820
4958
|
labelAction: i,
|
|
4821
4959
|
className: r,
|
|
4822
4960
|
children: /* @__PURE__ */ t(
|
|
4823
|
-
|
|
4961
|
+
pa,
|
|
4824
4962
|
{
|
|
4825
4963
|
...f,
|
|
4826
4964
|
required: c,
|
|
@@ -4831,7 +4969,7 @@ function go({
|
|
|
4831
4969
|
}
|
|
4832
4970
|
);
|
|
4833
4971
|
}
|
|
4834
|
-
const
|
|
4972
|
+
const ha = {
|
|
4835
4973
|
xs: {
|
|
4836
4974
|
width: 28,
|
|
4837
4975
|
height: 16,
|
|
@@ -4845,7 +4983,7 @@ const fa = {
|
|
|
4845
4983
|
padding: 2
|
|
4846
4984
|
}
|
|
4847
4985
|
};
|
|
4848
|
-
function
|
|
4986
|
+
function No({
|
|
4849
4987
|
checked: e,
|
|
4850
4988
|
disabled: r,
|
|
4851
4989
|
onCheckedChange: n,
|
|
@@ -4853,7 +4991,7 @@ function yo({
|
|
|
4853
4991
|
className: i = "",
|
|
4854
4992
|
...c
|
|
4855
4993
|
}) {
|
|
4856
|
-
const d =
|
|
4994
|
+
const d = ha[a], s = e ? d.width - d.thumb - d.padding * 2 : 0;
|
|
4857
4995
|
return /* @__PURE__ */ t(
|
|
4858
4996
|
"button",
|
|
4859
4997
|
{
|
|
@@ -4887,11 +5025,11 @@ function yo({
|
|
|
4887
5025
|
}
|
|
4888
5026
|
);
|
|
4889
5027
|
}
|
|
4890
|
-
const
|
|
5028
|
+
const tr = [
|
|
4891
5029
|
".sidebar-scroll",
|
|
4892
5030
|
"[data-overlay-scroll='true']"
|
|
4893
5031
|
].join(",");
|
|
4894
|
-
function
|
|
5032
|
+
function ba(e) {
|
|
4895
5033
|
if (!(e instanceof HTMLElement) || e.dataset.overlayScroll === "false" || e.closest("[data-overlayscrollbars]") || e.matches("textarea,input,select,[contenteditable='true']"))
|
|
4896
5034
|
return !1;
|
|
4897
5035
|
const r = window.getComputedStyle(e);
|
|
@@ -4904,30 +5042,30 @@ function pa(e) {
|
|
|
4904
5042
|
function gr(e) {
|
|
4905
5043
|
return e.classList.contains("sidebar-scroll");
|
|
4906
5044
|
}
|
|
4907
|
-
function
|
|
5045
|
+
function rr(e) {
|
|
4908
5046
|
gr(e) && e.querySelectorAll(".os-scrollbar-horizontal").forEach((r) => {
|
|
4909
5047
|
r.style.display = "none", r.style.height = "0", r.style.pointerEvents = "none";
|
|
4910
5048
|
});
|
|
4911
5049
|
}
|
|
4912
|
-
function
|
|
4913
|
-
return
|
|
5050
|
+
function xa() {
|
|
5051
|
+
return H(() => {
|
|
4914
5052
|
const e = /* @__PURE__ */ new WeakMap();
|
|
4915
5053
|
let r = 0;
|
|
4916
5054
|
const n = () => {
|
|
4917
|
-
r = 0, document.querySelectorAll(
|
|
4918
|
-
if (!
|
|
4919
|
-
if (
|
|
4920
|
-
|
|
5055
|
+
r = 0, document.querySelectorAll(tr).forEach((c) => {
|
|
5056
|
+
if (!ba(c)) return;
|
|
5057
|
+
if (qt(c)) {
|
|
5058
|
+
rr(c);
|
|
4921
5059
|
return;
|
|
4922
5060
|
}
|
|
4923
|
-
const s =
|
|
5061
|
+
const s = qt(c, {
|
|
4924
5062
|
overflow: gr(c) ? { x: "hidden", y: "scroll" } : void 0,
|
|
4925
5063
|
scrollbars: {
|
|
4926
5064
|
autoHide: "leave",
|
|
4927
5065
|
autoHideDelay: 180
|
|
4928
5066
|
}
|
|
4929
5067
|
});
|
|
4930
|
-
|
|
5068
|
+
rr(c), e.set(c, s);
|
|
4931
5069
|
});
|
|
4932
5070
|
}, a = () => {
|
|
4933
5071
|
r || (r = window.requestAnimationFrame(n));
|
|
@@ -4940,20 +5078,20 @@ function ha() {
|
|
|
4940
5078
|
attributes: !0,
|
|
4941
5079
|
attributeFilter: ["class", "data-overlay-scroll"]
|
|
4942
5080
|
}), window.addEventListener("resize", a), () => {
|
|
4943
|
-
r && window.cancelAnimationFrame(r), i.disconnect(), window.removeEventListener("resize", a), document.querySelectorAll(
|
|
5081
|
+
r && window.cancelAnimationFrame(r), i.disconnect(), window.removeEventListener("resize", a), document.querySelectorAll(tr).forEach((c) => {
|
|
4944
5082
|
var d;
|
|
4945
5083
|
c instanceof HTMLElement && ((d = e.get(c)) == null || d.destroy());
|
|
4946
5084
|
});
|
|
4947
5085
|
};
|
|
4948
5086
|
}, []), null;
|
|
4949
5087
|
}
|
|
4950
|
-
const
|
|
5088
|
+
const va = {
|
|
4951
5089
|
xs: { wh: "w-5 h-5", text: "text-[8px]" },
|
|
4952
5090
|
sm: { wh: "w-7 h-7", text: "text-[11px]" },
|
|
4953
5091
|
md: { wh: "w-9 h-9", text: "text-sm" },
|
|
4954
5092
|
lg: { wh: "w-12 h-12", text: "text-base" },
|
|
4955
5093
|
xl: { wh: "w-16 h-16", text: "text-xl" }
|
|
4956
|
-
},
|
|
5094
|
+
}, nr = [
|
|
4957
5095
|
"bg-indigo-500",
|
|
4958
5096
|
"bg-blue-500",
|
|
4959
5097
|
"bg-emerald-500",
|
|
@@ -4962,33 +5100,33 @@ const ba = {
|
|
|
4962
5100
|
"bg-teal-500",
|
|
4963
5101
|
"bg-rose-500",
|
|
4964
5102
|
"bg-cyan-500"
|
|
4965
|
-
],
|
|
5103
|
+
], ga = {
|
|
4966
5104
|
xs: "text-xs",
|
|
4967
5105
|
sm: "text-sm",
|
|
4968
5106
|
md: "text-base",
|
|
4969
5107
|
lg: "text-lg"
|
|
4970
|
-
},
|
|
5108
|
+
}, ya = "bonsaif.bot", wa = "Bonsaif Bot", Na = {
|
|
4971
5109
|
xs: "p-0.5",
|
|
4972
5110
|
sm: "p-1",
|
|
4973
5111
|
md: "p-1.5",
|
|
4974
5112
|
lg: "p-2",
|
|
4975
5113
|
xl: "p-2.5"
|
|
4976
5114
|
};
|
|
4977
|
-
function
|
|
5115
|
+
function ar(e) {
|
|
4978
5116
|
return typeof e == "string" ? e.trim() : "";
|
|
4979
5117
|
}
|
|
4980
|
-
function
|
|
5118
|
+
function ka(e) {
|
|
4981
5119
|
let r = 0;
|
|
4982
5120
|
for (const n of e) r = r * 31 + n.charCodeAt(0) & 65535;
|
|
4983
|
-
return
|
|
5121
|
+
return nr[r % nr.length];
|
|
4984
5122
|
}
|
|
4985
|
-
function
|
|
4986
|
-
return e ===
|
|
5123
|
+
function Sa(e, r) {
|
|
5124
|
+
return e === ya || r === wa;
|
|
4987
5125
|
}
|
|
4988
|
-
function
|
|
5126
|
+
function Ca(e, r) {
|
|
4989
5127
|
return `${e.replace(/\/$/, "")}${r}`;
|
|
4990
5128
|
}
|
|
4991
|
-
function
|
|
5129
|
+
function $a({
|
|
4992
5130
|
userId: e,
|
|
4993
5131
|
username: r,
|
|
4994
5132
|
name: n,
|
|
@@ -5006,38 +5144,38 @@ function Sa({
|
|
|
5006
5144
|
}) {
|
|
5007
5145
|
var F;
|
|
5008
5146
|
const [u, b] = A(!1), h = typeof e == "string" && e.trim() && e !== "undefined" && e !== "null" ? e.trim() : "";
|
|
5009
|
-
|
|
5147
|
+
H(() => {
|
|
5010
5148
|
b(!1);
|
|
5011
5149
|
}, [h, N]);
|
|
5012
|
-
const { wh: C, text:
|
|
5150
|
+
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), T = Ca(w, "/favicon.svg"), j = h ? `${w}/api/user/avatar/${h}${N ? `?v=${N}` : ""}` : "", E = {
|
|
5013
5151
|
xs: 20,
|
|
5014
5152
|
sm: 28,
|
|
5015
5153
|
md: 36,
|
|
5016
5154
|
lg: 48,
|
|
5017
5155
|
xl: 64
|
|
5018
|
-
}[a],
|
|
5156
|
+
}[a], P = $ ? /* @__PURE__ */ t(
|
|
5019
5157
|
"span",
|
|
5020
5158
|
{
|
|
5021
|
-
className: `${C} ${
|
|
5159
|
+
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
5160
|
style: v,
|
|
5023
5161
|
children: /* @__PURE__ */ t(
|
|
5024
5162
|
"img",
|
|
5025
5163
|
{
|
|
5026
5164
|
src: T,
|
|
5027
|
-
alt:
|
|
5028
|
-
width:
|
|
5029
|
-
height:
|
|
5165
|
+
alt: I,
|
|
5166
|
+
width: E,
|
|
5167
|
+
height: E,
|
|
5030
5168
|
className: "h-full w-full object-contain"
|
|
5031
5169
|
}
|
|
5032
5170
|
)
|
|
5033
5171
|
}
|
|
5034
|
-
) :
|
|
5172
|
+
) : j && !u ? /* @__PURE__ */ t(
|
|
5035
5173
|
"img",
|
|
5036
5174
|
{
|
|
5037
|
-
src:
|
|
5038
|
-
alt:
|
|
5039
|
-
width:
|
|
5040
|
-
height:
|
|
5175
|
+
src: j,
|
|
5176
|
+
alt: I,
|
|
5177
|
+
width: E,
|
|
5178
|
+
height: E,
|
|
5041
5179
|
className: `${C} rounded-full object-cover flex-shrink-0 ${y}`,
|
|
5042
5180
|
style: v,
|
|
5043
5181
|
onError: () => b(!0)
|
|
@@ -5046,9 +5184,9 @@ function Sa({
|
|
|
5046
5184
|
) : /* @__PURE__ */ t(
|
|
5047
5185
|
"span",
|
|
5048
5186
|
{
|
|
5049
|
-
className: `${C} ${
|
|
5187
|
+
className: `${C} ${ka(I)} ${_} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${y}`,
|
|
5050
5188
|
style: v,
|
|
5051
|
-
title:
|
|
5189
|
+
title: I,
|
|
5052
5190
|
children: B
|
|
5053
5191
|
}
|
|
5054
5192
|
);
|
|
@@ -5058,39 +5196,39 @@ function Sa({
|
|
|
5058
5196
|
{
|
|
5059
5197
|
className: `inline-flex min-w-0 items-center gap-2 ${f}`,
|
|
5060
5198
|
children: [
|
|
5061
|
-
|
|
5199
|
+
P,
|
|
5062
5200
|
/* @__PURE__ */ t(
|
|
5063
5201
|
"span",
|
|
5064
5202
|
{
|
|
5065
|
-
className: `min-w-0 truncate ${
|
|
5066
|
-
title:
|
|
5067
|
-
children:
|
|
5203
|
+
className: `min-w-0 truncate ${ga[k]} font-medium text-[var(--text-main)] ${p}`,
|
|
5204
|
+
title: I,
|
|
5205
|
+
children: I
|
|
5068
5206
|
}
|
|
5069
5207
|
)
|
|
5070
5208
|
]
|
|
5071
5209
|
}
|
|
5072
5210
|
);
|
|
5073
|
-
const z = c ?? !0, W = d ??
|
|
5211
|
+
const z = c ?? !0, W = d ?? I;
|
|
5074
5212
|
return z && W ? /* @__PURE__ */ t(
|
|
5075
|
-
|
|
5213
|
+
Mt,
|
|
5076
5214
|
{
|
|
5077
5215
|
as: "span",
|
|
5078
5216
|
content: W,
|
|
5079
5217
|
className: `inline-flex flex-shrink-0 ${f}`,
|
|
5080
|
-
children:
|
|
5218
|
+
children: P
|
|
5081
5219
|
}
|
|
5082
|
-
) :
|
|
5220
|
+
) : P;
|
|
5083
5221
|
}
|
|
5084
|
-
function
|
|
5222
|
+
function Ea({ href: e, className: r, children: n }) {
|
|
5085
5223
|
return /* @__PURE__ */ t("a", { href: e, className: r, children: n });
|
|
5086
5224
|
}
|
|
5087
|
-
function
|
|
5225
|
+
function Ma(e) {
|
|
5088
5226
|
return e.reduce((r, n) => {
|
|
5089
5227
|
const a = n.section ?? "Principal";
|
|
5090
5228
|
return r[a] = [...r[a] ?? [], n], r;
|
|
5091
5229
|
}, {});
|
|
5092
5230
|
}
|
|
5093
|
-
function
|
|
5231
|
+
function Da({
|
|
5094
5232
|
children: e,
|
|
5095
5233
|
navItems: r = [],
|
|
5096
5234
|
currentPath: n = typeof window > "u" ? "/" : window.location.pathname,
|
|
@@ -5100,11 +5238,11 @@ function Ea({
|
|
|
5100
5238
|
header: d,
|
|
5101
5239
|
footer: s,
|
|
5102
5240
|
onLogout: f,
|
|
5103
|
-
LinkComponent: p =
|
|
5241
|
+
LinkComponent: p = Ea
|
|
5104
5242
|
}) {
|
|
5105
|
-
const [k, N] = A(!1), y =
|
|
5243
|
+
const [k, N] = A(!1), y = Ma(r);
|
|
5106
5244
|
return /* @__PURE__ */ o("div", { className: "min-h-screen bg-[var(--bg-main)] text-[var(--text-main)]", children: [
|
|
5107
|
-
/* @__PURE__ */ t(
|
|
5245
|
+
/* @__PURE__ */ t(xa, {}),
|
|
5108
5246
|
/* @__PURE__ */ t(
|
|
5109
5247
|
"button",
|
|
5110
5248
|
{
|
|
@@ -5112,7 +5250,7 @@ function Ea({
|
|
|
5112
5250
|
"aria-label": "Abrir navegación",
|
|
5113
5251
|
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
5252
|
onClick: () => N(!0),
|
|
5115
|
-
children: /* @__PURE__ */ t(
|
|
5253
|
+
children: /* @__PURE__ */ t(Ur, { className: "h-5 w-5" })
|
|
5116
5254
|
}
|
|
5117
5255
|
),
|
|
5118
5256
|
k && /* @__PURE__ */ t(
|
|
@@ -5139,7 +5277,7 @@ function Ea({
|
|
|
5139
5277
|
"aria-label": "Cerrar navegación",
|
|
5140
5278
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-white/70 hover:bg-white/10 lg:hidden",
|
|
5141
5279
|
onClick: () => N(!1),
|
|
5142
|
-
children: /* @__PURE__ */ t(
|
|
5280
|
+
children: /* @__PURE__ */ t(ye, { className: "h-5 w-5" })
|
|
5143
5281
|
}
|
|
5144
5282
|
)
|
|
5145
5283
|
] }),
|
|
@@ -5174,7 +5312,7 @@ function Ea({
|
|
|
5174
5312
|
/* @__PURE__ */ o("div", { className: "border-t border-white/10 p-3", children: [
|
|
5175
5313
|
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
5314
|
/* @__PURE__ */ t(
|
|
5177
|
-
|
|
5315
|
+
$a,
|
|
5178
5316
|
{
|
|
5179
5317
|
name: a.initials ?? a.name ?? a.email ?? "Usuario",
|
|
5180
5318
|
size: "md"
|
|
@@ -5186,13 +5324,13 @@ function Ea({
|
|
|
5186
5324
|
] })
|
|
5187
5325
|
] }),
|
|
5188
5326
|
f && /* @__PURE__ */ o(
|
|
5189
|
-
|
|
5327
|
+
pe,
|
|
5190
5328
|
{
|
|
5191
5329
|
variant: "ghost",
|
|
5192
5330
|
className: "w-full justify-start text-white hover:bg-white/10",
|
|
5193
5331
|
onClick: f,
|
|
5194
5332
|
children: [
|
|
5195
|
-
/* @__PURE__ */ t(
|
|
5333
|
+
/* @__PURE__ */ t(qr, { className: "h-4 w-4" }),
|
|
5196
5334
|
" Salir"
|
|
5197
5335
|
]
|
|
5198
5336
|
}
|
|
@@ -5208,7 +5346,7 @@ function Ea({
|
|
|
5208
5346
|
] })
|
|
5209
5347
|
] });
|
|
5210
5348
|
}
|
|
5211
|
-
const
|
|
5349
|
+
const La = {
|
|
5212
5350
|
dashboard: "Dashboard",
|
|
5213
5351
|
tickets: "Tickets",
|
|
5214
5352
|
teams: "Equipos",
|
|
@@ -5232,29 +5370,29 @@ const Ma = {
|
|
|
5232
5370
|
"security-incidents": "Incidentes",
|
|
5233
5371
|
"guard-schedule": "Guardias"
|
|
5234
5372
|
}, wt = {
|
|
5235
|
-
dashboard: /* @__PURE__ */ t(
|
|
5236
|
-
tickets: /* @__PURE__ */ t(
|
|
5237
|
-
teams: /* @__PURE__ */ t(
|
|
5238
|
-
projects: /* @__PURE__ */ t(
|
|
5239
|
-
clients: /* @__PURE__ */ t(
|
|
5240
|
-
surveys: /* @__PURE__ */ t(
|
|
5373
|
+
dashboard: /* @__PURE__ */ t(en, { className: "h-5 w-5" }),
|
|
5374
|
+
tickets: /* @__PURE__ */ t(Qr, { className: "h-5 w-5" }),
|
|
5375
|
+
teams: /* @__PURE__ */ t(Ut, { className: "h-5 w-5" }),
|
|
5376
|
+
projects: /* @__PURE__ */ t(Jr, { className: "h-5 w-5" }),
|
|
5377
|
+
clients: /* @__PURE__ */ t(Zr, { className: "h-5 w-5" }),
|
|
5378
|
+
surveys: /* @__PURE__ */ t(Xr, { className: "h-5 w-5" }),
|
|
5241
5379
|
profile: /* @__PURE__ */ t(Kr, { className: "h-5 w-5" }),
|
|
5242
|
-
settings: /* @__PURE__ */ t(
|
|
5380
|
+
settings: /* @__PURE__ */ t(Ft, { className: "h-5 w-5" }),
|
|
5243
5381
|
notifications: /* @__PURE__ */ t(Gr, { className: "h-5 w-5" }),
|
|
5244
|
-
changelog: /* @__PURE__ */ t(
|
|
5382
|
+
changelog: /* @__PURE__ */ t(Vr, { className: "h-5 w-5" }),
|
|
5245
5383
|
admin: /* @__PURE__ */ t(vt, { className: "h-5 w-5" }),
|
|
5246
|
-
users: /* @__PURE__ */ t(
|
|
5384
|
+
users: /* @__PURE__ */ t(Ut, { className: "h-5 w-5" }),
|
|
5247
5385
|
roles: /* @__PURE__ */ t(vt, { className: "h-5 w-5" }),
|
|
5248
|
-
menus: /* @__PURE__ */ t(
|
|
5386
|
+
menus: /* @__PURE__ */ t(Ft, { className: "h-5 w-5" }),
|
|
5249
5387
|
guards: /* @__PURE__ */ t(kt, { className: "h-5 w-5" }),
|
|
5250
5388
|
vacations: /* @__PURE__ */ t(kt, { className: "h-5 w-5" }),
|
|
5251
|
-
audit: /* @__PURE__ */ t(
|
|
5389
|
+
audit: /* @__PURE__ */ t(Wt, { className: "h-5 w-5" }),
|
|
5252
5390
|
positions: /* @__PURE__ */ t(Yr, { className: "h-5 w-5" }),
|
|
5253
|
-
ranks: /* @__PURE__ */ t(
|
|
5391
|
+
ranks: /* @__PURE__ */ t(Wt, { className: "h-5 w-5" }),
|
|
5254
5392
|
"email-inbox": /* @__PURE__ */ t(sr, { className: "h-5 w-5" }),
|
|
5255
5393
|
"security-incidents": /* @__PURE__ */ t(vt, { className: "h-5 w-5" })
|
|
5256
5394
|
};
|
|
5257
|
-
function
|
|
5395
|
+
function Ba({
|
|
5258
5396
|
href: e,
|
|
5259
5397
|
className: r,
|
|
5260
5398
|
style: n,
|
|
@@ -5262,17 +5400,17 @@ function Da({
|
|
|
5262
5400
|
}) {
|
|
5263
5401
|
return /* @__PURE__ */ t("a", { href: e, className: r, style: n, children: a });
|
|
5264
5402
|
}
|
|
5265
|
-
function
|
|
5403
|
+
function Ta(e) {
|
|
5266
5404
|
return e.split("-").map((r) => r.charAt(0).toUpperCase() + r.slice(1)).join(" ");
|
|
5267
5405
|
}
|
|
5268
|
-
function
|
|
5406
|
+
function Aa(e) {
|
|
5269
5407
|
return /^\d+$/.test(e) || /^[a-f0-9]{8,}$/i.test(e);
|
|
5270
5408
|
}
|
|
5271
|
-
function
|
|
5409
|
+
function Oa(e) {
|
|
5272
5410
|
const r = e.split("/").filter(Boolean);
|
|
5273
5411
|
if (r.length === 0 || r.length === 1 && r[0] === "dashboard")
|
|
5274
5412
|
return [];
|
|
5275
|
-
const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, i =
|
|
5413
|
+
const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, i = Aa(n) && a ? a : n, c = La[i] ?? Ta(i);
|
|
5276
5414
|
return [{ label: "Inicio", href: "/" }, { label: c }];
|
|
5277
5415
|
}
|
|
5278
5416
|
function Nt(e) {
|
|
@@ -5280,14 +5418,14 @@ function Nt(e) {
|
|
|
5280
5418
|
":scope > [data-overlayscrollbars-viewport]"
|
|
5281
5419
|
));
|
|
5282
5420
|
}
|
|
5283
|
-
function
|
|
5421
|
+
function za(e) {
|
|
5284
5422
|
const r = e.split("/").filter(Boolean), n = r[r.length - 1];
|
|
5285
5423
|
if (!n) return /* @__PURE__ */ t(lt, { className: "h-5 w-5" });
|
|
5286
5424
|
if (wt[n]) return wt[n];
|
|
5287
5425
|
const a = r.length > 1 ? r[r.length - 2] : "";
|
|
5288
5426
|
return wt[a] ?? /* @__PURE__ */ t(lt, { className: "h-5 w-5" });
|
|
5289
5427
|
}
|
|
5290
|
-
function
|
|
5428
|
+
function ko({
|
|
5291
5429
|
title: e,
|
|
5292
5430
|
subtitle: r,
|
|
5293
5431
|
action: n,
|
|
@@ -5299,63 +5437,63 @@ function wo({
|
|
|
5299
5437
|
currentPath: f = typeof window > "u" ? "/" : window.location.pathname,
|
|
5300
5438
|
showBreadcrumbs: p = !0,
|
|
5301
5439
|
contained: k = !1,
|
|
5302
|
-
LinkComponent: N =
|
|
5440
|
+
LinkComponent: N = Ba
|
|
5303
5441
|
}) {
|
|
5304
|
-
const y = J(null), [v, u] = A(!1), [b, h] = A(null), C = s ??
|
|
5305
|
-
return
|
|
5442
|
+
const y = J(null), [v, u] = A(!1), [b, h] = A(null), C = s ?? Oa(f), _ = i ?? za(f), I = p && C.length > 1;
|
|
5443
|
+
return H(() => {
|
|
5306
5444
|
if (k) {
|
|
5307
5445
|
u(!1);
|
|
5308
5446
|
return;
|
|
5309
5447
|
}
|
|
5310
5448
|
let B = null, w = 0, $ = 0;
|
|
5311
5449
|
const T = () => {
|
|
5312
|
-
const
|
|
5450
|
+
const E = y.current, P = document.querySelector(
|
|
5313
5451
|
"[data-app-scroll='true']"
|
|
5314
5452
|
);
|
|
5315
|
-
return (
|
|
5453
|
+
return (E == null ? void 0 : E.closest(".os-viewport")) ?? (E == null ? void 0 : E.closest(
|
|
5316
5454
|
"[data-overlayscrollbars-viewport]"
|
|
5317
|
-
)) ?? Nt(
|
|
5318
|
-
},
|
|
5319
|
-
const
|
|
5320
|
-
u((
|
|
5321
|
-
},
|
|
5322
|
-
B == null || B.removeEventListener("scroll",
|
|
5455
|
+
)) ?? Nt(P) ?? P ?? window;
|
|
5456
|
+
}, j = () => {
|
|
5457
|
+
const E = B && B !== window ? B.scrollTop : window.scrollY;
|
|
5458
|
+
u((P) => P ? E > 24 : E > 72);
|
|
5459
|
+
}, M = () => {
|
|
5460
|
+
B == null || B.removeEventListener("scroll", j), B = T(), B.addEventListener("scroll", j, { passive: !0 }), j();
|
|
5323
5461
|
};
|
|
5324
|
-
return
|
|
5325
|
-
window.cancelAnimationFrame(w), window.clearTimeout($), B == null || B.removeEventListener("scroll",
|
|
5462
|
+
return M(), w = window.requestAnimationFrame(M), $ = window.setTimeout(M, 120), () => {
|
|
5463
|
+
window.cancelAnimationFrame(w), window.clearTimeout($), B == null || B.removeEventListener("scroll", j);
|
|
5326
5464
|
};
|
|
5327
|
-
}, [k]),
|
|
5465
|
+
}, [k]), H(() => {
|
|
5328
5466
|
if (k) {
|
|
5329
5467
|
h(null);
|
|
5330
5468
|
return;
|
|
5331
5469
|
}
|
|
5332
5470
|
let B = 0;
|
|
5333
5471
|
const w = [], $ = () => {
|
|
5334
|
-
const W = y.current, F = W == null ? void 0 : W.parentElement,
|
|
5472
|
+
const W = y.current, F = W == null ? void 0 : W.parentElement, Z = document.querySelector(
|
|
5335
5473
|
"[data-app-scroll='true']"
|
|
5336
|
-
), ne = Nt(
|
|
5474
|
+
), ne = Nt(Z) ?? Z;
|
|
5337
5475
|
if (!W || !F || !ne) {
|
|
5338
5476
|
h(null);
|
|
5339
5477
|
return;
|
|
5340
5478
|
}
|
|
5341
|
-
const m = F.getBoundingClientRect(),
|
|
5342
|
-
marginLeft: Math.round(
|
|
5343
|
-
width: Math.round(
|
|
5479
|
+
const m = F.getBoundingClientRect(), D = window.getComputedStyle(F), q = ne.getBoundingClientRect(), K = ne instanceof HTMLElement && ne.clientWidth > 0 ? ne.clientWidth : q.width, X = m.left + parseFloat(D.paddingLeft || "0"), oe = {
|
|
5480
|
+
marginLeft: Math.round(q.left - X),
|
|
5481
|
+
width: Math.round(K)
|
|
5344
5482
|
};
|
|
5345
5483
|
h(
|
|
5346
|
-
(de) => de && de.marginLeft ===
|
|
5484
|
+
(de) => de && de.marginLeft === oe.marginLeft && de.width === oe.width ? de : oe
|
|
5347
5485
|
);
|
|
5348
5486
|
}, T = () => {
|
|
5349
5487
|
window.cancelAnimationFrame(B), B = window.requestAnimationFrame($);
|
|
5350
5488
|
};
|
|
5351
5489
|
T(), window.addEventListener("resize", T);
|
|
5352
|
-
const
|
|
5490
|
+
const j = new ResizeObserver(T), M = y.current, E = M == null ? void 0 : M.parentElement, P = document.querySelector(
|
|
5353
5491
|
"[data-app-scroll='true']"
|
|
5354
|
-
), z = Nt(
|
|
5355
|
-
return [
|
|
5356
|
-
W &&
|
|
5492
|
+
), z = Nt(P) ?? P;
|
|
5493
|
+
return [E, P, z].forEach((W) => {
|
|
5494
|
+
W && j.observe(W);
|
|
5357
5495
|
}), w.push(window.setTimeout(T, 120)), w.push(window.setTimeout(T, 280)), () => {
|
|
5358
|
-
window.cancelAnimationFrame(B), window.removeEventListener("resize", T),
|
|
5496
|
+
window.cancelAnimationFrame(B), window.removeEventListener("resize", T), j.disconnect(), w.forEach((W) => window.clearTimeout(W));
|
|
5359
5497
|
};
|
|
5360
5498
|
}, [k]), /* @__PURE__ */ t(
|
|
5361
5499
|
"div",
|
|
@@ -5382,7 +5520,7 @@ function wo({
|
|
|
5382
5520
|
{
|
|
5383
5521
|
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
5522
|
children: [
|
|
5385
|
-
|
|
5523
|
+
I && /* @__PURE__ */ t(
|
|
5386
5524
|
"nav",
|
|
5387
5525
|
{
|
|
5388
5526
|
"aria-label": "Breadcrumb",
|
|
@@ -5443,9 +5581,9 @@ function wo({
|
|
|
5443
5581
|
{
|
|
5444
5582
|
className: `flex-shrink-0 transition-[color,transform,opacity] duration-300 ease-out ${v ? "scale-75 opacity-80" : "scale-90 opacity-100"}`,
|
|
5445
5583
|
style: {
|
|
5446
|
-
color:
|
|
5584
|
+
color: I ? "var(--text-secondary)" : "var(--text-muted)"
|
|
5447
5585
|
},
|
|
5448
|
-
children:
|
|
5586
|
+
children: _
|
|
5449
5587
|
}
|
|
5450
5588
|
),
|
|
5451
5589
|
/* @__PURE__ */ o(
|
|
@@ -5507,20 +5645,20 @@ function wo({
|
|
|
5507
5645
|
}
|
|
5508
5646
|
);
|
|
5509
5647
|
}
|
|
5510
|
-
function
|
|
5648
|
+
function So({
|
|
5511
5649
|
children: e,
|
|
5512
5650
|
currentPath: r = typeof window > "u" ? "/" : window.location.pathname,
|
|
5513
5651
|
publicRoutes: n = ["/", "/login", "/reset-password"],
|
|
5514
5652
|
...a
|
|
5515
5653
|
}) {
|
|
5516
|
-
return n.includes(r) ? /* @__PURE__ */ t(
|
|
5654
|
+
return n.includes(r) ? /* @__PURE__ */ t(Ce, { children: e }) : /* @__PURE__ */ t(Da, { currentPath: r, ...a, children: e });
|
|
5517
5655
|
}
|
|
5518
|
-
function
|
|
5656
|
+
function or() {
|
|
5519
5657
|
if (typeof window > "u") return "system";
|
|
5520
5658
|
const e = localStorage.getItem("theme");
|
|
5521
5659
|
return e === "light" || e === "dark" ? e : e === "system" ? "system" : document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
5522
5660
|
}
|
|
5523
|
-
function
|
|
5661
|
+
function Ia(e, r, n) {
|
|
5524
5662
|
try {
|
|
5525
5663
|
const a = new URL(e), i = a.searchParams.get("callbackUrl");
|
|
5526
5664
|
if (i) {
|
|
@@ -5535,17 +5673,17 @@ function Oa(e, r, n) {
|
|
|
5535
5673
|
return e;
|
|
5536
5674
|
}
|
|
5537
5675
|
}
|
|
5538
|
-
function
|
|
5676
|
+
function Co({
|
|
5539
5677
|
name: e,
|
|
5540
5678
|
src: r,
|
|
5541
5679
|
projectKey: n
|
|
5542
5680
|
}) {
|
|
5543
5681
|
const [a, i] = A(
|
|
5544
|
-
() =>
|
|
5682
|
+
() => or()
|
|
5545
5683
|
), c = J(null);
|
|
5546
|
-
|
|
5684
|
+
H(() => {
|
|
5547
5685
|
const f = new MutationObserver(
|
|
5548
|
-
() => i(
|
|
5686
|
+
() => i(or())
|
|
5549
5687
|
);
|
|
5550
5688
|
return f.observe(document.documentElement, {
|
|
5551
5689
|
attributes: !0,
|
|
@@ -5553,7 +5691,7 @@ function ko({
|
|
|
5553
5691
|
}), () => f.disconnect();
|
|
5554
5692
|
}, []);
|
|
5555
5693
|
const d = je(
|
|
5556
|
-
() =>
|
|
5694
|
+
() => Ia(r, a, n),
|
|
5557
5695
|
[n, r, a]
|
|
5558
5696
|
), s = je(() => {
|
|
5559
5697
|
try {
|
|
@@ -5562,7 +5700,7 @@ function ko({
|
|
|
5562
5700
|
return "";
|
|
5563
5701
|
}
|
|
5564
5702
|
}, [d]);
|
|
5565
|
-
return
|
|
5703
|
+
return H(() => {
|
|
5566
5704
|
if (!n) return;
|
|
5567
5705
|
const f = n;
|
|
5568
5706
|
function p(k) {
|
|
@@ -5604,9 +5742,9 @@ function ko({
|
|
|
5604
5742
|
}
|
|
5605
5743
|
) });
|
|
5606
5744
|
}
|
|
5607
|
-
function
|
|
5745
|
+
function $o() {
|
|
5608
5746
|
const [e, r] = A(""), [n, a] = A(!1), [i, c] = A({ width: 96, height: 96 });
|
|
5609
|
-
return
|
|
5747
|
+
return H(() => {
|
|
5610
5748
|
let d = !1;
|
|
5611
5749
|
return fetch("/api/microservices/prime-suite/chat-url", { cache: "no-store" }).then((s) => s.ok ? s.json() : null).then((s) => {
|
|
5612
5750
|
!d && (s != null && s.src) && r(s.src);
|
|
@@ -5614,14 +5752,14 @@ function So() {
|
|
|
5614
5752
|
}), () => {
|
|
5615
5753
|
d = !0;
|
|
5616
5754
|
};
|
|
5617
|
-
}, []),
|
|
5755
|
+
}, []), H(() => {
|
|
5618
5756
|
const d = (s) => {
|
|
5619
5757
|
var p;
|
|
5620
5758
|
if (((p = s.data) == null ? void 0 : p.type) !== "prime-suite-chat:state") return;
|
|
5621
5759
|
const f = !!s.data.active;
|
|
5622
5760
|
a(f), c({
|
|
5623
|
-
width:
|
|
5624
|
-
height:
|
|
5761
|
+
width: ir(s.data.width, 96, 720),
|
|
5762
|
+
height: ir(s.data.height, 96, 560)
|
|
5625
5763
|
});
|
|
5626
5764
|
};
|
|
5627
5765
|
return window.addEventListener("message", d), () => window.removeEventListener("message", d);
|
|
@@ -5642,11 +5780,11 @@ function So() {
|
|
|
5642
5780
|
}
|
|
5643
5781
|
) : null;
|
|
5644
5782
|
}
|
|
5645
|
-
function
|
|
5783
|
+
function ir(e, r, n) {
|
|
5646
5784
|
const a = typeof e == "number" && Number.isFinite(e) ? e : r;
|
|
5647
5785
|
return Math.max(r, Math.min(n, Math.ceil(a)));
|
|
5648
5786
|
}
|
|
5649
|
-
function
|
|
5787
|
+
function ja(e) {
|
|
5650
5788
|
const r = document.documentElement, n = new MutationObserver(e);
|
|
5651
5789
|
n.observe(r, { attributes: !0, attributeFilter: ["class"] });
|
|
5652
5790
|
const a = window.matchMedia("(prefers-color-scheme: dark)");
|
|
@@ -5654,64 +5792,64 @@ function za(e) {
|
|
|
5654
5792
|
n.disconnect(), a.removeEventListener("change", e);
|
|
5655
5793
|
};
|
|
5656
5794
|
}
|
|
5657
|
-
function
|
|
5795
|
+
function Pa() {
|
|
5658
5796
|
const e = localStorage.getItem("theme") || "system", r = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
5659
5797
|
return document.documentElement.classList.contains("dark") || e === "dark" || e === "system" && r ? "dark" : "light";
|
|
5660
5798
|
}
|
|
5661
|
-
function
|
|
5799
|
+
function Ra() {
|
|
5662
5800
|
return "light";
|
|
5663
5801
|
}
|
|
5664
|
-
function
|
|
5665
|
-
const e =
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5802
|
+
function Eo() {
|
|
5803
|
+
const e = ln(
|
|
5804
|
+
ja,
|
|
5805
|
+
Pa,
|
|
5806
|
+
Ra
|
|
5669
5807
|
);
|
|
5670
|
-
return /* @__PURE__ */ t(
|
|
5808
|
+
return /* @__PURE__ */ t(fn, { position: "bottom-center", theme: e, richColors: !0, closeButton: !0 });
|
|
5671
5809
|
}
|
|
5672
5810
|
export {
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5811
|
+
Qa as Alert,
|
|
5812
|
+
Da as AuthShell,
|
|
5813
|
+
Za as BonsaifButton,
|
|
5814
|
+
pe as Button,
|
|
5815
|
+
eo as CalendarPicker,
|
|
5816
|
+
to as Checkbox,
|
|
5817
|
+
ro as CodeBlock,
|
|
5818
|
+
ao as CompactFilterSelect,
|
|
5819
|
+
no as CompactSearchInput,
|
|
5820
|
+
oo as ConfirmDialog,
|
|
5683
5821
|
pr as CopyButton,
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5822
|
+
io as CopyLinkButton,
|
|
5823
|
+
so as DataTable,
|
|
5824
|
+
lo as DateRangePicker,
|
|
5825
|
+
uo as Drawer,
|
|
5826
|
+
co as DropdownMenu,
|
|
5827
|
+
Ja as DynamicDetailTabs,
|
|
5828
|
+
mo as EmptyState,
|
|
5829
|
+
Xn as FormField,
|
|
5830
|
+
xa as GlobalScrollbars,
|
|
5831
|
+
fo as InputField,
|
|
5832
|
+
Sn as LoadingState,
|
|
5833
|
+
Co as MicroserviceFrame,
|
|
5834
|
+
Rn as Modal,
|
|
5835
|
+
Mt as MouseTooltip,
|
|
5836
|
+
po as MultiSelect,
|
|
5837
|
+
ko as PageHeader,
|
|
5838
|
+
hn as PageSearchInput,
|
|
5839
|
+
ho as Pagination,
|
|
5840
|
+
So as PrimeAuthRouteShell,
|
|
5841
|
+
Eo as PrimeAuthToaster,
|
|
5842
|
+
$o as PrimeSuiteChatFrame,
|
|
5843
|
+
bo as RadioGroup,
|
|
5706
5844
|
hr as SearchableSelect,
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5845
|
+
xo as SectionPanel,
|
|
5846
|
+
vo as StatusBadge,
|
|
5847
|
+
yo as StepWizard,
|
|
5848
|
+
go as Tabs,
|
|
5711
5849
|
yt as TextInput,
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5850
|
+
pa as Textarea,
|
|
5851
|
+
wo as TextareaField,
|
|
5852
|
+
No as Toggle,
|
|
5853
|
+
$a as UserAvatar,
|
|
5854
|
+
pn as cn
|
|
5717
5855
|
};
|