bonsaif-ui 0.1.67 → 0.1.68
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/dist/bonsaif-ui.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import je, { useRef as se, useState as z, useEffect as ie, createContext as
|
|
2
|
+
import je, { useRef as se, useState as z, useEffect as ie, createContext as _i, useLayoutEffect as Hi, useContext as ji, isValidElement as ta, Children as Wi, useMemo as Ye, useCallback as Ce, forwardRef as wo, cloneElement as qi, useId as No, useSyncExternalStore as Ui } from "react";
|
|
3
3
|
import { jsx as t, jsxs as o, Fragment as Re } from "react/jsx-runtime";
|
|
4
|
-
import { HiMagnifyingGlass as Et, HiXMark as Fe, HiInformationCircle as Gn, HiExclamationCircle as
|
|
4
|
+
import { HiMagnifyingGlass as Et, HiXMark as Fe, HiInformationCircle as Gn, HiExclamationCircle as ko, HiExclamationTriangle as ra, HiCheckCircle as Ki, HiChevronLeft as Ut, HiChevronDown as at, HiChevronRight as $t, HiCalendarDays as Yn, HiCheck as Ge, HiClipboardDocument as Vi, HiLink as Co, HiCog6Tooth as en, HiChevronUp as Dn, HiChevronUpDown as Gi, HiFunnel as Yi, HiEllipsisVertical as Xi, HiMinus as So, HiTableCells as Zi, HiDocumentText as Eo, HiCommandLine as Ji, HiClock as Fa, HiTrash as $o, HiArrowDownTray as Qi, HiPencil as Lo, HiInbox as Ao, HiArrowUpTray as el, HiDocument as tl, HiH2 as rl, HiH3 as nl, HiArrowsPointingIn as al, HiArrowsPointingOut as ol, HiArrowUturnLeft as il, HiArrowUturnRight as ll, HiListBullet as Xn, HiNumberedList as sl, HiArrowTurnUpLeft as cl, HiArrowTurnDownRight as dl, HiBars3BottomLeft as ul, HiBars3CenterLeft as ml, HiBars3BottomRight as fl, HiBars3 as Mo, HiLinkSlash as bl, HiPhoto as pl, HiOutlinePaintBrush as hl, HiNoSymbol as vl, HiLockClosed as xl, HiHome as tn, HiArrowRightOnRectangle as gl, HiShieldCheck as Bn, HiBriefcase as yl, HiUsers as _a, HiBell as wl, HiUser as Nl, HiClipboardDocumentList as kl, HiBuildingOffice2 as Cl, HiRectangleGroup as Sl, HiTicket as El, HiChartBar as $l } from "react-icons/hi2";
|
|
5
5
|
import { createPortal as ot } from "react-dom";
|
|
6
|
-
import { Tooltip as
|
|
6
|
+
import { Tooltip as Ll, ResponsiveContainer as Yt, LineChart as Al, CartesianGrid as fr, XAxis as Kt, YAxis as Vt, Legend as cn, Line as To, AreaChart as Ml, Area as Tl, BarChart as Do, Bar as rn, PieChart as Dl, Pie as Bl, Cell as Bo, Sector as Il, ComposedChart as Ol } from "recharts";
|
|
7
7
|
import { OverlayScrollbars as Ha } from "overlayscrollbars";
|
|
8
|
-
import { Toaster as
|
|
9
|
-
import { toast as
|
|
8
|
+
import { Toaster as Rl } from "sonner";
|
|
9
|
+
import { toast as Gu } from "sonner";
|
|
10
10
|
import { OverlayScrollbarsComponent as ja } from "overlayscrollbars-react";
|
|
11
|
-
import { DayPicker as
|
|
11
|
+
import { DayPicker as Pl, useDayPicker as zl } from "react-day-picker";
|
|
12
12
|
import "react-day-picker/dist/style.css";
|
|
13
|
-
import { FiSave as
|
|
13
|
+
import { FiSave as Fl } from "react-icons/fi";
|
|
14
14
|
function kt(...e) {
|
|
15
15
|
return e.filter(Boolean).join(" ");
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function zd({
|
|
18
18
|
variant: e = "primary",
|
|
19
19
|
className: r,
|
|
20
20
|
type: n = "button",
|
|
@@ -31,7 +31,7 @@ function Od({
|
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function _l({
|
|
35
35
|
value: e,
|
|
36
36
|
onChange: r,
|
|
37
37
|
placeholder: n,
|
|
@@ -117,14 +117,14 @@ function Fl({
|
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
119
|
}
|
|
120
|
-
const
|
|
121
|
-
let
|
|
120
|
+
const Io = _i({});
|
|
121
|
+
let Oo = 0;
|
|
122
122
|
const Wa = "bonsaif-ui:hide-tooltips";
|
|
123
123
|
function _r(e = 700) {
|
|
124
|
-
|
|
124
|
+
Oo = Date.now() + e;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
127
|
-
return Date.now() >
|
|
126
|
+
function Hl() {
|
|
127
|
+
return Date.now() > Oo;
|
|
128
128
|
}
|
|
129
129
|
function Hr(e) {
|
|
130
130
|
if (typeof document > "u") return !1;
|
|
@@ -135,7 +135,7 @@ function Hr(e) {
|
|
|
135
135
|
);
|
|
136
136
|
return e && r.some((n) => n.contains(e)) ? !1 : r.length > 0;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function jl(e) {
|
|
139
139
|
var a;
|
|
140
140
|
const r = Array.from(
|
|
141
141
|
e.querySelectorAll("*")
|
|
@@ -168,7 +168,7 @@ function br({
|
|
|
168
168
|
const J = j.getAttribute("title");
|
|
169
169
|
J && (j.getAttribute("aria-label") || j.setAttribute("aria-label", J), j.removeAttribute("title"));
|
|
170
170
|
}), C.querySelectorAll("svg title").forEach((j) => j.remove()));
|
|
171
|
-
}),
|
|
171
|
+
}), Hi(() => {
|
|
172
172
|
if (!v) return;
|
|
173
173
|
const C = A.current;
|
|
174
174
|
if (!C) return;
|
|
@@ -195,11 +195,11 @@ function br({
|
|
|
195
195
|
const F = () => {
|
|
196
196
|
w.current && (window.clearTimeout(w.current), w.current = null);
|
|
197
197
|
}, S = (C, j) => {
|
|
198
|
-
if (!
|
|
198
|
+
if (!Hl() || y.current) return;
|
|
199
199
|
const J = p.current;
|
|
200
200
|
if (J && !Hr(J)) {
|
|
201
201
|
if (n) {
|
|
202
|
-
const U =
|
|
202
|
+
const U = jl(J);
|
|
203
203
|
if (!U) return;
|
|
204
204
|
x(U);
|
|
205
205
|
}
|
|
@@ -342,23 +342,23 @@ function qa(e) {
|
|
|
342
342
|
if (e !== void 0)
|
|
343
343
|
return typeof e == "number" ? `${e}px` : e;
|
|
344
344
|
}
|
|
345
|
-
const
|
|
345
|
+
const Wl = "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", ql = {
|
|
346
346
|
primary: "border border-[var(--border)] text-[var(--text-main)] hover:border-[var(--border)] hover:bg-[var(--bg-input)] active:scale-[0.98] transition-colors",
|
|
347
347
|
secondary: "border border-[var(--border)] text-[var(--text-main)] hover:border-[var(--border)] hover:bg-[var(--bg-input)] active:scale-[0.98] transition-colors",
|
|
348
348
|
danger: "border border-[var(--border)] text-[var(--danger)] hover:border-[var(--danger)] hover:bg-[var(--danger-bg)] active:scale-[0.98] transition-colors",
|
|
349
349
|
ghost: "text-[var(--text-secondary)] hover:opacity-70",
|
|
350
350
|
icon: "text-[var(--text-muted)] hover:text-[var(--primary)] hover:bg-primary/5"
|
|
351
|
-
},
|
|
351
|
+
}, Ul = "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", Kl = {
|
|
352
352
|
xs: "h-8 px-2.5 text-xs",
|
|
353
353
|
sm: "h-9 px-3.5 text-xs",
|
|
354
354
|
md: "h-10 px-3.5 text-sm",
|
|
355
355
|
lg: "h-11 px-4 text-sm font-semibold"
|
|
356
|
-
},
|
|
356
|
+
}, Vl = {
|
|
357
357
|
xs: "h-8 w-8",
|
|
358
358
|
sm: "h-9 w-9",
|
|
359
359
|
md: "h-10 w-10",
|
|
360
360
|
lg: "h-10 w-10"
|
|
361
|
-
},
|
|
361
|
+
}, Gl = {
|
|
362
362
|
primary: { background: "var(--bg-card)" },
|
|
363
363
|
secondary: { background: "var(--bg-card)" },
|
|
364
364
|
danger: { background: "var(--bg-card)" },
|
|
@@ -368,8 +368,8 @@ const jl = "inline-flex shrink-0 items-center justify-center gap-2 whitespace-no
|
|
|
368
368
|
function Zn(e) {
|
|
369
369
|
return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Zn).join(" ").trim() : ta(e) ? Zn(e.props.children) : "";
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
return
|
|
371
|
+
function Yl(e) {
|
|
372
|
+
return Wi.toArray(e).find(ta) ?? null;
|
|
373
373
|
}
|
|
374
374
|
function ze({
|
|
375
375
|
variant: e = "primary",
|
|
@@ -386,7 +386,7 @@ function ze({
|
|
|
386
386
|
style: b,
|
|
387
387
|
...p
|
|
388
388
|
}) {
|
|
389
|
-
const A =
|
|
389
|
+
const A = ji(Io), w = l ?? A.iconOnly ?? e === "icon", y = A.compact ?? !1, v = A.headerAction ?? !1, N = v && r === "md" ? "sm" : y && !v && r === "md" ? "xs" : r, T = e === "icon" || w, x = v && T, F = Zn(u), S = i ?? p.title ?? p["aria-label"] ?? (w ? F : void 0), k = S ? void 0 : p.title, H = p["aria-label"] ?? (typeof S == "string" ? S : F || void 0), X = n ? null : a ?? (w ? Yl(u) : null), $ = /* @__PURE__ */ o(
|
|
390
390
|
"button",
|
|
391
391
|
{
|
|
392
392
|
...p,
|
|
@@ -396,9 +396,9 @@ function ze({
|
|
|
396
396
|
"data-size": N,
|
|
397
397
|
"data-icon": T ? "true" : void 0,
|
|
398
398
|
disabled: f || n,
|
|
399
|
-
className: `${
|
|
399
|
+
className: `${Wl} ${x ? Ul : ql[e]} ${T ? Vl[N] : Kl[N]} ${y && !T ? "px-2.5" : ""} ${m}`,
|
|
400
400
|
style: {
|
|
401
|
-
...
|
|
401
|
+
...Gl[e],
|
|
402
402
|
height: qa(s),
|
|
403
403
|
padding: qa(c),
|
|
404
404
|
...b,
|
|
@@ -431,13 +431,13 @@ function ze({
|
|
|
431
431
|
}
|
|
432
432
|
) : $;
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function Xl({
|
|
435
435
|
variant: e = "page",
|
|
436
436
|
title: r = "Cargando...",
|
|
437
437
|
rows: n = 6,
|
|
438
438
|
children: a
|
|
439
439
|
}) {
|
|
440
|
-
return e === "table" ? /* @__PURE__ */ t(
|
|
440
|
+
return e === "table" ? /* @__PURE__ */ t(Ro, { rows: n }) : e === "sections" ? /* @__PURE__ */ t(Zl, { rows: n }) : e === "cards" ? /* @__PURE__ */ t(Jl, { rows: n }) : /* @__PURE__ */ t(
|
|
441
441
|
"div",
|
|
442
442
|
{
|
|
443
443
|
className: "flex min-h-[240px] items-center justify-center rounded-lg border border-[var(--border)] p-6 shadow-[var(--card-shadow)]",
|
|
@@ -456,7 +456,7 @@ function Yl({
|
|
|
456
456
|
}
|
|
457
457
|
);
|
|
458
458
|
}
|
|
459
|
-
function
|
|
459
|
+
function Zl({ rows: e }) {
|
|
460
460
|
return /* @__PURE__ */ t("div", { className: "space-y-4", children: Array.from({ length: Math.max(2, Math.min(e, 4)) }).map(
|
|
461
461
|
(r, n) => /* @__PURE__ */ o(
|
|
462
462
|
"section",
|
|
@@ -475,7 +475,7 @@ function Xl({ rows: e }) {
|
|
|
475
475
|
] })
|
|
476
476
|
] }),
|
|
477
477
|
/* @__PURE__ */ t(
|
|
478
|
-
|
|
478
|
+
Ro,
|
|
479
479
|
{
|
|
480
480
|
rows: n === 0 ? e : Math.max(3, e - 2),
|
|
481
481
|
compact: !0
|
|
@@ -487,7 +487,7 @@ function Xl({ rows: e }) {
|
|
|
487
487
|
)
|
|
488
488
|
) });
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Jl({ rows: e }) {
|
|
491
491
|
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(
|
|
492
492
|
"div",
|
|
493
493
|
{
|
|
@@ -501,7 +501,7 @@ function Zl({ rows: e }) {
|
|
|
501
501
|
n
|
|
502
502
|
)) });
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function Ro({
|
|
505
505
|
rows: e,
|
|
506
506
|
compact: r = !1
|
|
507
507
|
}) {
|
|
@@ -534,32 +534,32 @@ function Oo({
|
|
|
534
534
|
))
|
|
535
535
|
] });
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function Po(e) {
|
|
538
538
|
const r = e.split("/").filter(Boolean);
|
|
539
539
|
return (r[r.length - 1] ?? e).replace(/^lv_/, "").split(/[-_]/).filter(Boolean).map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ");
|
|
540
540
|
}
|
|
541
541
|
function Ua(e) {
|
|
542
542
|
return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim();
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function Ql(e) {
|
|
545
545
|
return [
|
|
546
546
|
e.label,
|
|
547
|
-
|
|
547
|
+
Po(e.service),
|
|
548
548
|
e.description,
|
|
549
549
|
e.service
|
|
550
550
|
].filter(Boolean).join(" ");
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function es(e) {
|
|
553
553
|
return typeof e == "function" ? e : e.default;
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function ts(e, r) {
|
|
556
556
|
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: [
|
|
557
557
|
/* @__PURE__ */ t("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: "No se pudo cargar este modulo" }),
|
|
558
558
|
/* @__PURE__ */ t("p", { className: "mt-1 text-xs text-[var(--text-muted)]", children: e.message }),
|
|
559
559
|
/* @__PURE__ */ t(ze, { className: "mt-4", height: 36, padding: "0 14px", onClick: r, children: "Reintentar" })
|
|
560
560
|
] }) });
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function Fd({
|
|
563
563
|
parentPanel: e,
|
|
564
564
|
parentPanelComponent: r,
|
|
565
565
|
renderParentPanel: n,
|
|
@@ -577,7 +577,7 @@ function Rd({
|
|
|
577
577
|
subtitle: w,
|
|
578
578
|
emptyState: y,
|
|
579
579
|
loadingState: v,
|
|
580
|
-
errorState: N =
|
|
580
|
+
errorState: N = ts,
|
|
581
581
|
renderTabLabel: T,
|
|
582
582
|
searchableTabs: x = "auto",
|
|
583
583
|
tabsSearchThreshold: F = 6,
|
|
@@ -602,7 +602,7 @@ function Rd({
|
|
|
602
602
|
)) == null ? void 0 : me.service, [ne, G] = z(
|
|
603
603
|
m ?? U ?? ""
|
|
604
604
|
), [E, V] = z({}), [ae, L] = z({}), [R, re] = z(""), [ee, oe] = z(!1), D = se(ae), ue = se(0), Z = k ?? R, B = Ua(Z), M = x === !0 || x === "auto" && J.length >= F, W = M && Z.trim().length > 0, K = Ye(() => B ? J.filter(
|
|
605
|
-
(Y) => Ua(
|
|
605
|
+
(Y) => Ua(Ql(Y)).includes(B)
|
|
606
606
|
) : J, [B, J]), ce = u ?? ne, de = J.find((Y) => Y.service === ce) ?? J.find((Y) => !Y.disabled);
|
|
607
607
|
ie(() => {
|
|
608
608
|
!de && U && G(U);
|
|
@@ -641,7 +641,7 @@ function Rd({
|
|
|
641
641
|
[Y]: { ...xe[Y], loading: !0, error: void 0 }
|
|
642
642
|
})), pe(de, i).then((xe) => {
|
|
643
643
|
if ($e !== ue.current && !p) return;
|
|
644
|
-
const Oe =
|
|
644
|
+
const Oe = es(xe);
|
|
645
645
|
L((Le) => ({
|
|
646
646
|
...Le,
|
|
647
647
|
[Y]: { component: Oe, loading: !1 }
|
|
@@ -714,7 +714,7 @@ function Rd({
|
|
|
714
714
|
className: `origin-right overflow-hidden transition-[width,opacity,transform] duration-200 ease-out ${ee ? "w-[min(20rem,44vw)] translate-x-0 opacity-100" : "w-0 translate-x-2 opacity-0"}`,
|
|
715
715
|
"aria-hidden": !ee,
|
|
716
716
|
children: /* @__PURE__ */ t(
|
|
717
|
-
|
|
717
|
+
_l,
|
|
718
718
|
{
|
|
719
719
|
value: Z,
|
|
720
720
|
onChange: Be,
|
|
@@ -765,7 +765,7 @@ function Rd({
|
|
|
765
765
|
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 ${ke ? "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)]"}`,
|
|
766
766
|
children: T ? T(Y, ke) : /* @__PURE__ */ o(Re, { children: [
|
|
767
767
|
Y.icon,
|
|
768
|
-
/* @__PURE__ */ t("span", { children: Y.label ??
|
|
768
|
+
/* @__PURE__ */ t("span", { children: Y.label ?? Po(Y.service) }),
|
|
769
769
|
Y.badge && /* @__PURE__ */ t("span", { className: "rounded-full bg-[var(--bg-input)] px-1.5 py-0.5 text-[10px] text-[var(--text-muted)]", children: Y.badge })
|
|
770
770
|
] })
|
|
771
771
|
},
|
|
@@ -777,7 +777,7 @@ function Rd({
|
|
|
777
777
|
(de == null ? void 0 : de.description) && /* @__PURE__ */ t("div", { className: "border-b border-[var(--border)] px-4 py-2 text-xs text-[var(--text-muted)]", children: de.description }),
|
|
778
778
|
/* @__PURE__ */ o("div", { className: "min-h-[420px] p-4", children: [
|
|
779
779
|
!de && (y ?? /* @__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." })),
|
|
780
|
-
de && (be == null ? void 0 : be.loading) && (v ?? /* @__PURE__ */ t(
|
|
780
|
+
de && (be == null ? void 0 : be.loading) && (v ?? /* @__PURE__ */ t(Xl, { title: "Cargando modulo..." })),
|
|
781
781
|
de && (be == null ? void 0 : be.error) && N(be.error, we),
|
|
782
782
|
de && st && !(be != null && be.loading) && !(be != null && be.error) && /* @__PURE__ */ t(
|
|
783
783
|
st,
|
|
@@ -798,7 +798,7 @@ function Rd({
|
|
|
798
798
|
}
|
|
799
799
|
);
|
|
800
800
|
}
|
|
801
|
-
const
|
|
801
|
+
const rs = {
|
|
802
802
|
info: {
|
|
803
803
|
color: "#2563eb",
|
|
804
804
|
background: "rgba(59, 130, 246, 0.1)",
|
|
@@ -809,7 +809,7 @@ const ts = {
|
|
|
809
809
|
color: "#047857",
|
|
810
810
|
background: "rgba(16, 185, 129, 0.1)",
|
|
811
811
|
border: "rgba(16, 185, 129, 0.24)",
|
|
812
|
-
icon: /* @__PURE__ */ t(
|
|
812
|
+
icon: /* @__PURE__ */ t(Ki, { className: "h-5 w-5" })
|
|
813
813
|
},
|
|
814
814
|
warning: {
|
|
815
815
|
color: "#b45309",
|
|
@@ -821,7 +821,7 @@ const ts = {
|
|
|
821
821
|
color: "var(--danger)",
|
|
822
822
|
background: "var(--danger-bg)",
|
|
823
823
|
border: "color-mix(in srgb, var(--danger) 20%, var(--border))",
|
|
824
|
-
icon: /* @__PURE__ */ t(
|
|
824
|
+
icon: /* @__PURE__ */ t(ko, { className: "h-5 w-5" })
|
|
825
825
|
},
|
|
826
826
|
neutral: {
|
|
827
827
|
color: "var(--text-secondary)",
|
|
@@ -830,7 +830,7 @@ const ts = {
|
|
|
830
830
|
icon: /* @__PURE__ */ t(Gn, { className: "h-5 w-5" })
|
|
831
831
|
}
|
|
832
832
|
};
|
|
833
|
-
function
|
|
833
|
+
function _d({
|
|
834
834
|
variant: e = "info",
|
|
835
835
|
title: r,
|
|
836
836
|
children: n,
|
|
@@ -839,7 +839,7 @@ function Pd({
|
|
|
839
839
|
onDismiss: l,
|
|
840
840
|
className: s = ""
|
|
841
841
|
}) {
|
|
842
|
-
const c =
|
|
842
|
+
const c = rs[e];
|
|
843
843
|
return /* @__PURE__ */ o(
|
|
844
844
|
"div",
|
|
845
845
|
{
|
|
@@ -871,7 +871,7 @@ function Pd({
|
|
|
871
871
|
}
|
|
872
872
|
);
|
|
873
873
|
}
|
|
874
|
-
const
|
|
874
|
+
const zo = [
|
|
875
875
|
"Enero",
|
|
876
876
|
"Febrero",
|
|
877
877
|
"Marzo",
|
|
@@ -884,7 +884,7 @@ const Po = [
|
|
|
884
884
|
"Octubre",
|
|
885
885
|
"Noviembre",
|
|
886
886
|
"Diciembre"
|
|
887
|
-
],
|
|
887
|
+
], ns = [
|
|
888
888
|
"Ene",
|
|
889
889
|
"Feb",
|
|
890
890
|
"Mar",
|
|
@@ -897,30 +897,30 @@ const Po = [
|
|
|
897
897
|
"Oct",
|
|
898
898
|
"Nov",
|
|
899
899
|
"Dic"
|
|
900
|
-
],
|
|
900
|
+
], as = ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"], In = 6;
|
|
901
901
|
function Jn(e, r, n) {
|
|
902
902
|
return `${e}-${String(r).padStart(2, "0")}-${String(n).padStart(2, "0")}`;
|
|
903
903
|
}
|
|
904
|
-
function
|
|
904
|
+
function os() {
|
|
905
905
|
const e = /* @__PURE__ */ new Date();
|
|
906
906
|
return Jn(e.getFullYear(), e.getMonth() + 1, e.getDate());
|
|
907
907
|
}
|
|
908
|
-
function
|
|
908
|
+
function Fo(e) {
|
|
909
909
|
const [r, n, a] = e.split("-").map(Number);
|
|
910
910
|
return { year: r, month: n, day: a };
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function is(e) {
|
|
913
913
|
if (!e) return "Seleccionar fecha";
|
|
914
|
-
const { year: r, month: n, day: a } =
|
|
915
|
-
return !r || !n || !a ? "Seleccionar fecha" : `${String(a).padStart(2, "0")} ${
|
|
914
|
+
const { year: r, month: n, day: a } = Fo(e);
|
|
915
|
+
return !r || !n || !a ? "Seleccionar fecha" : `${String(a).padStart(2, "0")} ${zo[n - 1]} ${r}`;
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function Hd({
|
|
918
918
|
value: e,
|
|
919
919
|
onChange: r,
|
|
920
920
|
minDate: n,
|
|
921
921
|
displayMode: a = "inline"
|
|
922
922
|
}) {
|
|
923
|
-
const i =
|
|
923
|
+
const i = os(), s = Fo(e || i), c = a === "popover", [u, m] = z(!1), f = se(null), [b, p] = z({
|
|
924
924
|
horizontal: "left",
|
|
925
925
|
vertical: "bottom"
|
|
926
926
|
}), [A, w] = z(s.year), [y, v] = z(s.month), [N, T] = z("days"), x = 16, [F, S] = z(0), k = A - 7 + F, H = Array.from({ length: x }, (G, E) => k + E);
|
|
@@ -1022,7 +1022,7 @@ function zd({
|
|
|
1022
1022
|
padding: "2px 6px"
|
|
1023
1023
|
},
|
|
1024
1024
|
children: [
|
|
1025
|
-
|
|
1025
|
+
zo[y - 1],
|
|
1026
1026
|
" ",
|
|
1027
1027
|
A,
|
|
1028
1028
|
/* @__PURE__ */ t(at, { size: 13, style: { color: "var(--text-muted)" } })
|
|
@@ -1093,7 +1093,7 @@ function zd({
|
|
|
1093
1093
|
gap: 3,
|
|
1094
1094
|
marginBottom: 8
|
|
1095
1095
|
},
|
|
1096
|
-
children:
|
|
1096
|
+
children: ns.map((G, E) => {
|
|
1097
1097
|
const V = E + 1 === y;
|
|
1098
1098
|
return /* @__PURE__ */ t(
|
|
1099
1099
|
"button",
|
|
@@ -1169,7 +1169,7 @@ function zd({
|
|
|
1169
1169
|
gridTemplateColumns: "repeat(7,1fr)",
|
|
1170
1170
|
padding: "6px 8px 0"
|
|
1171
1171
|
},
|
|
1172
|
-
children:
|
|
1172
|
+
children: as.map((G) => /* @__PURE__ */ t(
|
|
1173
1173
|
"div",
|
|
1174
1174
|
{
|
|
1175
1175
|
style: {
|
|
@@ -1246,7 +1246,7 @@ function zd({
|
|
|
1246
1246
|
children: [
|
|
1247
1247
|
/* @__PURE__ */ o("span", { className: "inline-flex items-center gap-2 min-w-0", children: [
|
|
1248
1248
|
/* @__PURE__ */ t(Yn, { className: "w-4 h-4 text-[var(--text-muted)]" }),
|
|
1249
|
-
/* @__PURE__ */ t("span", { className: "truncate", children:
|
|
1249
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: is(e) })
|
|
1250
1250
|
] }),
|
|
1251
1251
|
/* @__PURE__ */ t(
|
|
1252
1252
|
at,
|
|
@@ -1270,18 +1270,18 @@ function zd({
|
|
|
1270
1270
|
)
|
|
1271
1271
|
] }) : ne;
|
|
1272
1272
|
}
|
|
1273
|
-
const
|
|
1273
|
+
const ls = {
|
|
1274
1274
|
sm: "h-4 w-4",
|
|
1275
1275
|
md: "h-5 w-5"
|
|
1276
1276
|
};
|
|
1277
|
-
function
|
|
1277
|
+
function ss(e, r) {
|
|
1278
1278
|
if (typeof e == "function") {
|
|
1279
1279
|
e(r);
|
|
1280
1280
|
return;
|
|
1281
1281
|
}
|
|
1282
1282
|
e && (e.current = r);
|
|
1283
1283
|
}
|
|
1284
|
-
const Qn =
|
|
1284
|
+
const Qn = wo(function({
|
|
1285
1285
|
label: r,
|
|
1286
1286
|
description: n,
|
|
1287
1287
|
error: a,
|
|
@@ -1306,13 +1306,13 @@ const Qn = yo(function({
|
|
|
1306
1306
|
{
|
|
1307
1307
|
...m,
|
|
1308
1308
|
ref: (p) => {
|
|
1309
|
-
b.current = p,
|
|
1309
|
+
b.current = p, ss(f, p);
|
|
1310
1310
|
},
|
|
1311
1311
|
type: "checkbox",
|
|
1312
1312
|
disabled: u,
|
|
1313
1313
|
"aria-checked": l ? "mixed" : m["aria-checked"],
|
|
1314
1314
|
"aria-invalid": !!a || m["aria-invalid"],
|
|
1315
|
-
className: `peer ${
|
|
1315
|
+
className: `peer ${ls[i]} 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 ${s}`
|
|
1316
1316
|
}
|
|
1317
1317
|
),
|
|
1318
1318
|
/* @__PURE__ */ t(Ge, { 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 peer-aria-checked:mixed:scale-100 peer-aria-checked:mixed:opacity-100" })
|
|
@@ -1326,28 +1326,28 @@ const Qn = yo(function({
|
|
|
1326
1326
|
}
|
|
1327
1327
|
);
|
|
1328
1328
|
});
|
|
1329
|
-
function
|
|
1329
|
+
function _o(e) {
|
|
1330
1330
|
const r = document.createElement("textarea");
|
|
1331
1331
|
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);
|
|
1332
1332
|
}
|
|
1333
|
-
async function
|
|
1333
|
+
async function cs(e) {
|
|
1334
1334
|
var r;
|
|
1335
1335
|
if ((r = navigator.clipboard) != null && r.writeText) {
|
|
1336
1336
|
await navigator.clipboard.writeText(e);
|
|
1337
1337
|
return;
|
|
1338
1338
|
}
|
|
1339
|
-
|
|
1339
|
+
_o(e);
|
|
1340
1340
|
}
|
|
1341
|
-
function
|
|
1341
|
+
function ds(e) {
|
|
1342
1342
|
return typeof e == "function" ? e() : e;
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function Ho({
|
|
1345
1345
|
value: e,
|
|
1346
1346
|
resetDelay: r = 2e3,
|
|
1347
1347
|
title: n,
|
|
1348
1348
|
copiedTitle: a = "Copiado",
|
|
1349
1349
|
copiedLabel: i,
|
|
1350
|
-
icon: l = /* @__PURE__ */ t(
|
|
1350
|
+
icon: l = /* @__PURE__ */ t(Vi, { size: 14 }),
|
|
1351
1351
|
copiedIcon: s = /* @__PURE__ */ t(Ge, { size: 14 }),
|
|
1352
1352
|
stopPropagation: c = !0,
|
|
1353
1353
|
onCopied: u,
|
|
@@ -1371,13 +1371,13 @@ function _o({
|
|
|
1371
1371
|
async function F(S) {
|
|
1372
1372
|
var H;
|
|
1373
1373
|
if (c && S.stopPropagation(), A == null || A(S), S.defaultPrevented) return;
|
|
1374
|
-
const k =
|
|
1374
|
+
const k = ds(e);
|
|
1375
1375
|
if (k)
|
|
1376
1376
|
try {
|
|
1377
|
-
await
|
|
1377
|
+
await cs(k), x(k);
|
|
1378
1378
|
} catch (X) {
|
|
1379
1379
|
try {
|
|
1380
|
-
|
|
1380
|
+
_o(k), x(k);
|
|
1381
1381
|
} catch ($) {
|
|
1382
1382
|
m == null || m($, k);
|
|
1383
1383
|
return;
|
|
@@ -1417,7 +1417,7 @@ function _o({
|
|
|
1417
1417
|
}
|
|
1418
1418
|
);
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function jd({
|
|
1421
1421
|
code: e,
|
|
1422
1422
|
children: r,
|
|
1423
1423
|
title: n = "Codigo",
|
|
@@ -1452,7 +1452,7 @@ function Fd({
|
|
|
1452
1452
|
children: [
|
|
1453
1453
|
/* @__PURE__ */ t("span", { className: "min-w-0 truncate text-[11px] font-black uppercase tracking-[0.08em]", children: n }),
|
|
1454
1454
|
/* @__PURE__ */ t(
|
|
1455
|
-
|
|
1455
|
+
Ho,
|
|
1456
1456
|
{
|
|
1457
1457
|
value: m,
|
|
1458
1458
|
title: "Copiar codigo",
|
|
@@ -1827,7 +1827,7 @@ function Zr(e) {
|
|
|
1827
1827
|
if (e !== void 0)
|
|
1828
1828
|
return typeof e == "number" ? `${e}px` : e;
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1830
|
+
function Wd({
|
|
1831
1831
|
value: e,
|
|
1832
1832
|
onChange: r,
|
|
1833
1833
|
placeholder: n = "Buscar...",
|
|
@@ -1857,7 +1857,7 @@ function _d({
|
|
|
1857
1857
|
)
|
|
1858
1858
|
] });
|
|
1859
1859
|
}
|
|
1860
|
-
function
|
|
1860
|
+
function qd({
|
|
1861
1861
|
value: e,
|
|
1862
1862
|
onChange: r,
|
|
1863
1863
|
options: n,
|
|
@@ -1897,7 +1897,7 @@ function Hd({
|
|
|
1897
1897
|
)
|
|
1898
1898
|
] });
|
|
1899
1899
|
}
|
|
1900
|
-
const
|
|
1900
|
+
const us = {
|
|
1901
1901
|
sm: "24rem",
|
|
1902
1902
|
md: "28rem",
|
|
1903
1903
|
lg: "32rem",
|
|
@@ -1905,8 +1905,8 @@ const ds = {
|
|
|
1905
1905
|
"2xl": "48rem",
|
|
1906
1906
|
"4xl": "56rem",
|
|
1907
1907
|
"5xl": "64rem"
|
|
1908
|
-
}, jr = 180,
|
|
1909
|
-
function
|
|
1908
|
+
}, jr = 180, ms = "bg-[color-mix(in_srgb,var(--bg-main)_72%,transparent)] backdrop-blur-sm";
|
|
1909
|
+
function jo({
|
|
1910
1910
|
open: e,
|
|
1911
1911
|
onClose: r,
|
|
1912
1912
|
title: n,
|
|
@@ -1924,7 +1924,7 @@ function Ho({
|
|
|
1924
1924
|
placement: w = "center",
|
|
1925
1925
|
bodyClassName: y = "px-6 py-5",
|
|
1926
1926
|
panelClassName: v = "",
|
|
1927
|
-
backdropClassName: N =
|
|
1927
|
+
backdropClassName: N = ms,
|
|
1928
1928
|
contentClassName: T = "p-4",
|
|
1929
1929
|
ariaLabel: x,
|
|
1930
1930
|
frameless: F = !1,
|
|
@@ -1948,7 +1948,7 @@ function Ho({
|
|
|
1948
1948
|
};
|
|
1949
1949
|
return window.addEventListener("keydown", ne), () => window.removeEventListener("keydown", ne);
|
|
1950
1950
|
}, [p, r, e]), !k) return null;
|
|
1951
|
-
const le = n || a || i || l || A, C = m ??
|
|
1951
|
+
const le = n || a || i || l || A, C = m ?? us[u], j = w === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", J = w === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl", U = X ? "translateY(0) scale(1)" : w === "bottom-mobile" ? "translateY(16px) scale(0.98)" : "translateY(10px) scale(0.96)";
|
|
1952
1952
|
return ot(
|
|
1953
1953
|
/* @__PURE__ */ o(
|
|
1954
1954
|
"div",
|
|
@@ -2047,7 +2047,7 @@ function Ho({
|
|
|
2047
2047
|
document.body
|
|
2048
2048
|
);
|
|
2049
2049
|
}
|
|
2050
|
-
const
|
|
2050
|
+
const fs = {
|
|
2051
2051
|
danger: {
|
|
2052
2052
|
iconBg: "rgba(239,68,68,0.12)",
|
|
2053
2053
|
iconColor: "var(--danger)",
|
|
@@ -2067,7 +2067,7 @@ const ms = {
|
|
|
2067
2067
|
btnColor: "#fff"
|
|
2068
2068
|
}
|
|
2069
2069
|
};
|
|
2070
|
-
function
|
|
2070
|
+
function Ud({
|
|
2071
2071
|
open: e,
|
|
2072
2072
|
title: r,
|
|
2073
2073
|
description: n,
|
|
@@ -2078,9 +2078,9 @@ function jd({
|
|
|
2078
2078
|
onConfirm: c,
|
|
2079
2079
|
onCancel: u
|
|
2080
2080
|
}) {
|
|
2081
|
-
const m =
|
|
2081
|
+
const m = fs[l];
|
|
2082
2082
|
return /* @__PURE__ */ o(
|
|
2083
|
-
|
|
2083
|
+
jo,
|
|
2084
2084
|
{
|
|
2085
2085
|
open: e,
|
|
2086
2086
|
onClose: u,
|
|
@@ -2158,26 +2158,43 @@ function jd({
|
|
|
2158
2158
|
}
|
|
2159
2159
|
);
|
|
2160
2160
|
}
|
|
2161
|
-
function
|
|
2162
|
-
|
|
2163
|
-
|
|
2161
|
+
function bs(e) {
|
|
2162
|
+
return e ? typeof e == "function" ? e() : e : "";
|
|
2163
|
+
}
|
|
2164
|
+
function ps(e) {
|
|
2165
|
+
return /^https?:\/\//i.test(e);
|
|
2164
2166
|
}
|
|
2165
|
-
function
|
|
2167
|
+
function Ka(e, r) {
|
|
2168
|
+
try {
|
|
2169
|
+
return new URL(e, r).toString();
|
|
2170
|
+
} catch {
|
|
2171
|
+
return e;
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
function hs(e, r, n, a = !1) {
|
|
2175
|
+
const i = typeof e == "function" ? e() : e, l = r ? r(i) : i;
|
|
2176
|
+
if (!l || ps(l)) return l;
|
|
2177
|
+
const s = bs(n);
|
|
2178
|
+
return s ? Ka(l, s) : a && typeof window < "u" ? Ka(l, window.location.origin) : l;
|
|
2179
|
+
}
|
|
2180
|
+
function Kd({
|
|
2166
2181
|
url: e,
|
|
2167
2182
|
resolveUrl: r,
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2183
|
+
baseUrl: n,
|
|
2184
|
+
useWindowOriginForRelative: a = !1,
|
|
2185
|
+
title: i = "Copiar link",
|
|
2186
|
+
copiedTitle: l = "Link copiado",
|
|
2187
|
+
icon: s = /* @__PURE__ */ t(Co, { className: "h-3.5 w-3.5" }),
|
|
2188
|
+
...c
|
|
2172
2189
|
}) {
|
|
2173
2190
|
return /* @__PURE__ */ t(
|
|
2174
|
-
|
|
2191
|
+
Ho,
|
|
2175
2192
|
{
|
|
2176
|
-
...
|
|
2177
|
-
value: () =>
|
|
2178
|
-
title:
|
|
2179
|
-
copiedTitle:
|
|
2180
|
-
icon:
|
|
2193
|
+
...c,
|
|
2194
|
+
value: () => hs(e, r, n, a),
|
|
2195
|
+
title: i,
|
|
2196
|
+
copiedTitle: l,
|
|
2197
|
+
icon: s
|
|
2181
2198
|
}
|
|
2182
2199
|
);
|
|
2183
2200
|
}
|
|
@@ -2187,7 +2204,7 @@ let jt = {
|
|
|
2187
2204
|
pageSizeOptions: [...nn]
|
|
2188
2205
|
}
|
|
2189
2206
|
};
|
|
2190
|
-
function
|
|
2207
|
+
function vs(e) {
|
|
2191
2208
|
if (!Array.isArray(e))
|
|
2192
2209
|
return [...nn];
|
|
2193
2210
|
const r = Array.from(
|
|
@@ -2199,16 +2216,16 @@ function bs(e) {
|
|
|
2199
2216
|
);
|
|
2200
2217
|
return r.length > 0 ? r : [...nn];
|
|
2201
2218
|
}
|
|
2202
|
-
function
|
|
2219
|
+
function Vd(e) {
|
|
2203
2220
|
!e || typeof e != "object" || e.dataTable && (jt = {
|
|
2204
2221
|
...jt,
|
|
2205
2222
|
dataTable: {
|
|
2206
2223
|
...jt.dataTable,
|
|
2207
|
-
pageSizeOptions:
|
|
2224
|
+
pageSizeOptions: vs(e.dataTable.pageSizeOptions)
|
|
2208
2225
|
}
|
|
2209
2226
|
});
|
|
2210
2227
|
}
|
|
2211
|
-
function
|
|
2228
|
+
function Gd() {
|
|
2212
2229
|
return {
|
|
2213
2230
|
dataTable: {
|
|
2214
2231
|
pageSizeOptions: [...jt.dataTable.pageSizeOptions]
|
|
@@ -2218,7 +2235,7 @@ function Ud() {
|
|
|
2218
2235
|
function Jr() {
|
|
2219
2236
|
return [...jt.dataTable.pageSizeOptions];
|
|
2220
2237
|
}
|
|
2221
|
-
function
|
|
2238
|
+
function Yd() {
|
|
2222
2239
|
jt = {
|
|
2223
2240
|
dataTable: {
|
|
2224
2241
|
pageSizeOptions: [...nn]
|
|
@@ -2245,30 +2262,30 @@ const dn = [
|
|
|
2245
2262
|
{ value: "bottom10", label: "10 inferiores", valueMode: "none" },
|
|
2246
2263
|
{ value: "aboveAverage", label: "Sobre promedio", valueMode: "none" },
|
|
2247
2264
|
{ value: "belowAverage", label: "Bajo promedio", valueMode: "none" }
|
|
2248
|
-
],
|
|
2265
|
+
], xs = dn.map((e) => ({
|
|
2249
2266
|
value: e.value,
|
|
2250
2267
|
label: e.label
|
|
2251
|
-
})),
|
|
2268
|
+
})), gs = 12, ys = {
|
|
2252
2269
|
layout: !0,
|
|
2253
2270
|
filters: !1,
|
|
2254
2271
|
sort: !1,
|
|
2255
2272
|
bql: !1,
|
|
2256
2273
|
pagination: !0
|
|
2257
|
-
},
|
|
2274
|
+
}, ws = "bonsaif-ui:datatable:", Ns = "[&_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", ks = [], Cs = 52;
|
|
2258
2275
|
function wt(e) {
|
|
2259
2276
|
if (!e) return 150;
|
|
2260
2277
|
const r = parseInt(e, 10);
|
|
2261
2278
|
return isNaN(r) || r <= 0 ? 150 : r;
|
|
2262
2279
|
}
|
|
2263
|
-
function
|
|
2280
|
+
function Ss(e) {
|
|
2264
2281
|
return !!(e && (Array.isArray(e.columnOrder) && e.columnOrder.length > 0 || e.columnWidths && Object.keys(e.columnWidths).length > 0 || Array.isArray(e.hiddenColumnKeys) && e.hiddenColumnKeys.length > 0 || e.filters && Object.keys(e.filters).length > 0 || e.conditionFilters && Object.keys(e.conditionFilters).length > 0 || e.sort || typeof e.bql == "string" || Array.isArray(e.bqlHistory) && e.bqlHistory.length > 0 || typeof e.pageSize == "number"));
|
|
2265
2282
|
}
|
|
2266
|
-
function
|
|
2267
|
-
return `${
|
|
2283
|
+
function Wo(e) {
|
|
2284
|
+
return `${ws}${e}`;
|
|
2268
2285
|
}
|
|
2269
2286
|
function Rn(e) {
|
|
2270
2287
|
try {
|
|
2271
|
-
const r = window.localStorage.getItem(
|
|
2288
|
+
const r = window.localStorage.getItem(Wo(e));
|
|
2272
2289
|
if (!r) return null;
|
|
2273
2290
|
const n = JSON.parse(r);
|
|
2274
2291
|
return n && typeof n == "object" ? n : null;
|
|
@@ -2276,16 +2293,16 @@ function Rn(e) {
|
|
|
2276
2293
|
return null;
|
|
2277
2294
|
}
|
|
2278
2295
|
}
|
|
2279
|
-
function
|
|
2296
|
+
function Es(e, r) {
|
|
2280
2297
|
try {
|
|
2281
2298
|
window.localStorage.setItem(
|
|
2282
|
-
|
|
2299
|
+
Wo(e),
|
|
2283
2300
|
JSON.stringify(r)
|
|
2284
2301
|
);
|
|
2285
2302
|
} catch {
|
|
2286
2303
|
}
|
|
2287
2304
|
}
|
|
2288
|
-
function
|
|
2305
|
+
function $s(e, r) {
|
|
2289
2306
|
if (e === !0)
|
|
2290
2307
|
return {
|
|
2291
2308
|
layout: !0,
|
|
@@ -2303,12 +2320,12 @@ function Cs(e, r) {
|
|
|
2303
2320
|
pagination: !1
|
|
2304
2321
|
};
|
|
2305
2322
|
const n = {
|
|
2306
|
-
...
|
|
2323
|
+
...ys,
|
|
2307
2324
|
...e ?? {}
|
|
2308
2325
|
};
|
|
2309
2326
|
return r && (typeof e != "object" || e.pagination !== !1) && (n.pagination = !0), n;
|
|
2310
2327
|
}
|
|
2311
|
-
function
|
|
2328
|
+
function Va(...e) {
|
|
2312
2329
|
return e.reduce(
|
|
2313
2330
|
(r, n) => ({ ...r, ...n ?? {} }),
|
|
2314
2331
|
{}
|
|
@@ -2359,18 +2376,18 @@ function Kr(e, r) {
|
|
|
2359
2376
|
return Object.fromEntries(a);
|
|
2360
2377
|
}
|
|
2361
2378
|
function mt(e, r) {
|
|
2362
|
-
if (Ct(e)) return
|
|
2379
|
+
if (Ct(e)) return Cs;
|
|
2363
2380
|
const n = e.minWidth ?? 80, a = e.maxWidth ?? 1 / 0;
|
|
2364
2381
|
return Math.min(a, Math.max(n, r));
|
|
2365
2382
|
}
|
|
2366
|
-
function
|
|
2383
|
+
function Ls(e) {
|
|
2367
2384
|
const r = window.getComputedStyle(e);
|
|
2368
2385
|
return parseFloat(r.paddingLeft) + parseFloat(r.paddingRight);
|
|
2369
2386
|
}
|
|
2370
2387
|
function Ct(e) {
|
|
2371
2388
|
return e.key === "actions" || e.key === "acciones" ? !0 : typeof e.header == "string" && e.header.trim().toLowerCase() === "acciones";
|
|
2372
2389
|
}
|
|
2373
|
-
function
|
|
2390
|
+
function As(e, r) {
|
|
2374
2391
|
if (r <= 7) return Array.from({ length: r }, (a, i) => i + 1);
|
|
2375
2392
|
const n = [1];
|
|
2376
2393
|
e > 3 && n.push("...");
|
|
@@ -2393,7 +2410,7 @@ function Nt(e, r) {
|
|
|
2393
2410
|
)) == null ? void 0 : s.key;
|
|
2394
2411
|
return l ? a.filter((c) => c !== l) : [];
|
|
2395
2412
|
}
|
|
2396
|
-
function
|
|
2413
|
+
function Ms(e) {
|
|
2397
2414
|
return e == null || e === "" ? "(Vacio)" : e instanceof Date ? e.toLocaleDateString() : String(e);
|
|
2398
2415
|
}
|
|
2399
2416
|
function Wt(e) {
|
|
@@ -2401,7 +2418,7 @@ function Wt(e) {
|
|
|
2401
2418
|
}
|
|
2402
2419
|
function Vr(e, r) {
|
|
2403
2420
|
const n = e.filterValue ? e.filterValue(r) : e.sortKey ? r[e.sortKey] : e.cell(r);
|
|
2404
|
-
return typeof n == "string" || typeof n == "number" || typeof n == "boolean" || n === null || n === void 0 || n instanceof Date ?
|
|
2421
|
+
return typeof n == "string" || typeof n == "number" || typeof n == "boolean" || n === null || n === void 0 || n instanceof Date ? Ms(n) : Wt(n).trim();
|
|
2405
2422
|
}
|
|
2406
2423
|
function dr(e) {
|
|
2407
2424
|
const r = e.replace(/,/g, "").trim();
|
|
@@ -2424,7 +2441,7 @@ function Qr(e) {
|
|
|
2424
2441
|
);
|
|
2425
2442
|
return r.length > 0 ? r : Jr();
|
|
2426
2443
|
}
|
|
2427
|
-
function
|
|
2444
|
+
function Ts(e, r, n) {
|
|
2428
2445
|
var s, c;
|
|
2429
2446
|
const a = ((s = r.value) == null ? void 0 : s.trim()) ?? "", i = ((c = r.valueTo) == null ? void 0 : c.trim()) ?? "", l = dn.find(
|
|
2430
2447
|
(u) => u.value === r.operator
|
|
@@ -2464,7 +2481,7 @@ function Ls(e, r, n) {
|
|
|
2464
2481
|
return !0;
|
|
2465
2482
|
}
|
|
2466
2483
|
}
|
|
2467
|
-
function
|
|
2484
|
+
function Ga({
|
|
2468
2485
|
children: e,
|
|
2469
2486
|
className: r = "",
|
|
2470
2487
|
style: n
|
|
@@ -2485,7 +2502,7 @@ function Va({
|
|
|
2485
2502
|
}
|
|
2486
2503
|
);
|
|
2487
2504
|
}
|
|
2488
|
-
function
|
|
2505
|
+
function Ds({
|
|
2489
2506
|
columns: e,
|
|
2490
2507
|
data: r,
|
|
2491
2508
|
getRowId: n,
|
|
@@ -2527,7 +2544,7 @@ function As({
|
|
|
2527
2544
|
enableColumnVisibility: R = !0,
|
|
2528
2545
|
enableColumnFilters: re = !0,
|
|
2529
2546
|
hiddenColumnKeys: ee,
|
|
2530
|
-
defaultHiddenColumnKeys: oe =
|
|
2547
|
+
defaultHiddenColumnKeys: oe = ks,
|
|
2531
2548
|
onHiddenColumnKeysChange: D,
|
|
2532
2549
|
columnVisibilityLabel: ue = "Columnas",
|
|
2533
2550
|
enableBql: Z = !1,
|
|
@@ -2548,29 +2565,29 @@ rol IN (admin, employee)`,
|
|
|
2548
2565
|
exportFilename: ct = "datos"
|
|
2549
2566
|
}) {
|
|
2550
2567
|
var Pa;
|
|
2551
|
-
const ve =
|
|
2568
|
+
const ve = $s(be, U), P = Object.values(ve).some(Boolean), _ = e.map((d) => d.key).join(","), me = oe.join(","), Y = se(e), ke = se(oe);
|
|
2552
2569
|
Y.current = e, ke.current = oe;
|
|
2553
2570
|
const [pe, $e] = z(
|
|
2554
2571
|
!U || !P
|
|
2555
2572
|
), xe = se(null), Oe = se(!U), Le = ee !== void 0, [xr, Ue] = z(() => Nt(oe, e)), Pe = Nt(
|
|
2556
2573
|
Le ? ee : xr,
|
|
2557
2574
|
e
|
|
2558
|
-
), [qe, ht] = z(!1), [Je,
|
|
2575
|
+
), [qe, ht] = z(!1), [Je, ri] = z("filter"), [Zt, gr] = z(
|
|
2559
2576
|
null
|
|
2560
|
-
), [ia, la] = z(""), [Ke, Jt] = z({}), [Qe, yr] = z({}), bn = b !== void 0, [sa,
|
|
2577
|
+
), [ia, la] = z(""), [Ke, Jt] = z({}), [Qe, yr] = z({}), bn = b !== void 0, [sa, ni] = z(p), Qt = B !== void 0, [ai, pn] = z(M), dt = Qt ? B : ai, [wr, Nr] = z(dt), [ut, vt] = z(!1), [ca, Mt] = z(!1), [da, Tt] = z(!1), [er, tr] = z([]), hn = se(null), ua = se(null), vn = se(null), [oi, ii] = z(
|
|
2561
2578
|
{}
|
|
2562
|
-
), [
|
|
2579
|
+
), [li, si] = z(
|
|
2563
2580
|
{}
|
|
2564
|
-
), [rr, kr] = z(!1), xn = se(null), Cr = se(null), [
|
|
2581
|
+
), [rr, kr] = z(!1), xn = se(null), Cr = se(null), [ci, di] = z(
|
|
2565
2582
|
{}
|
|
2566
2583
|
), ma = se(null), Sr = se(null), [gn, fa] = z(
|
|
2567
2584
|
r.length > 0 || a || c === !1
|
|
2568
|
-
), ba = (d, h) => 50 + (d * 17 + h * 13 + 7) % 40, bt = se(null), [
|
|
2585
|
+
), ba = (d, h) => 50 + (d * 17 + h * 13 + 7) % 40, bt = se(null), [ui, mi] = z(
|
|
2569
2586
|
void 0
|
|
2570
|
-
), [pa,
|
|
2587
|
+
), [pa, fi] = z(0), [yn, bi] = z(!1);
|
|
2571
2588
|
ie(() => {
|
|
2572
2589
|
function d() {
|
|
2573
|
-
|
|
2590
|
+
bi(window.innerWidth < 640);
|
|
2574
2591
|
}
|
|
2575
2592
|
if (!V || ae !== void 0)
|
|
2576
2593
|
return d(), window.addEventListener("resize", d), () => window.removeEventListener("resize", d);
|
|
@@ -2578,7 +2595,7 @@ rol IN (admin, employee)`,
|
|
|
2578
2595
|
function te() {
|
|
2579
2596
|
if (d(), !bt.current) return;
|
|
2580
2597
|
const I = bt.current.getBoundingClientRect().top;
|
|
2581
|
-
|
|
2598
|
+
mi(
|
|
2582
2599
|
Math.max(
|
|
2583
2600
|
120,
|
|
2584
2601
|
window.innerHeight - I - O - g - G
|
|
@@ -2587,11 +2604,11 @@ rol IN (admin, employee)`,
|
|
|
2587
2604
|
}
|
|
2588
2605
|
return te(), window.addEventListener("resize", te), () => window.removeEventListener("resize", te);
|
|
2589
2606
|
}, [a, k, G, V, ae]);
|
|
2590
|
-
const ha = V ? ae ??
|
|
2607
|
+
const ha = V ? ae ?? ui : void 0;
|
|
2591
2608
|
ie(() => {
|
|
2592
2609
|
const d = bt.current;
|
|
2593
2610
|
if (!d) return;
|
|
2594
|
-
const h = () =>
|
|
2611
|
+
const h = () => fi(d.clientWidth);
|
|
2595
2612
|
if (h(), typeof ResizeObserver > "u")
|
|
2596
2613
|
return window.addEventListener("resize", h), () => window.removeEventListener("resize", h);
|
|
2597
2614
|
const O = new ResizeObserver(h);
|
|
@@ -2613,7 +2630,7 @@ rol IN (admin, employee)`,
|
|
|
2613
2630
|
() => Object.fromEntries(
|
|
2614
2631
|
e.map((d) => [d.key, mt(d, wt(d.width))])
|
|
2615
2632
|
)
|
|
2616
|
-
), [De, It] = z(null), [
|
|
2633
|
+
), [De, It] = z(null), [pi, Er] = z(1), [$r, wn] = z(
|
|
2617
2634
|
k === !1 ? 0 : k
|
|
2618
2635
|
);
|
|
2619
2636
|
ie(() => {
|
|
@@ -2633,9 +2650,9 @@ rol IN (admin, employee)`,
|
|
|
2633
2650
|
{ cache: "no-store" }
|
|
2634
2651
|
).then((I) => I.ok ? I.json() : null).then((I) => {
|
|
2635
2652
|
if (te) return;
|
|
2636
|
-
const fe = Rn(U), Q =
|
|
2653
|
+
const fe = Rn(U), Q = Va(
|
|
2637
2654
|
fe,
|
|
2638
|
-
|
|
2655
|
+
Ss(I == null ? void 0 : I.settings) ? I == null ? void 0 : I.settings : null
|
|
2639
2656
|
), Me = Qr(
|
|
2640
2657
|
H ?? Jr()
|
|
2641
2658
|
), Ae = k === !1 ? 0 : k, ge = ve.layout ? Q == null ? void 0 : Q.columnOrder : void 0, Ne = Array.isArray(ge) ? ge.filter((Ie) => O.includes(Ie)) : [], ye = O.filter((Ie) => !Ne.includes(Ie)), _e = Ne.length > 0 ? [...Ne, ...ye] : O, nt = Object.fromEntries(
|
|
@@ -2789,9 +2806,9 @@ rol IN (admin, employee)`,
|
|
|
2789
2806
|
if (!U || !pe || !P || !Oe.current) return;
|
|
2790
2807
|
const d = {};
|
|
2791
2808
|
ve.layout && (d.columnOrder = Dt, d.columnWidths = Bt, d.hiddenColumnKeys = Pe), ve.filters && (d.filters = Ke, d.conditionFilters = Qe), ve.sort && (d.sort = De), ve.bql && (d.bql = dt, d.bqlHistory = er), ve.pagination && k !== !1 && (d.pageSize = $r);
|
|
2792
|
-
const h = Rn(U), O =
|
|
2809
|
+
const h = Rn(U), O = Va(h, d), g = JSON.stringify(O);
|
|
2793
2810
|
if (g === xe.current) return;
|
|
2794
|
-
|
|
2811
|
+
Es(U, O), xe.current = g;
|
|
2795
2812
|
const te = window.setTimeout(() => {
|
|
2796
2813
|
fetch("/api/user/preferences/datatables", {
|
|
2797
2814
|
method: "PATCH",
|
|
@@ -2829,7 +2846,7 @@ rol IN (admin, employee)`,
|
|
|
2829
2846
|
}, [_, e]);
|
|
2830
2847
|
const va = Dt.map((d) => e.find((h) => h.key === d)).filter((d) => !!d), et = va.filter(
|
|
2831
2848
|
(d) => !Pe.includes(d.key)
|
|
2832
|
-
),
|
|
2849
|
+
), hi = Object.keys(Ke).length, vi = Object.keys(Qe).length, Nn = hi + vi;
|
|
2833
2850
|
function xa(d) {
|
|
2834
2851
|
const h = /* @__PURE__ */ new Set();
|
|
2835
2852
|
return r.reduce((O, g) => {
|
|
@@ -2837,11 +2854,11 @@ rol IN (admin, employee)`,
|
|
|
2837
2854
|
return !te || h.has(te) || (h.add(te), O.push({ value: te, label: te })), O;
|
|
2838
2855
|
}, []);
|
|
2839
2856
|
}
|
|
2840
|
-
function
|
|
2857
|
+
function xi() {
|
|
2841
2858
|
const d = e.find((h) => h.key === Zt);
|
|
2842
2859
|
return d ? xa(d) : [];
|
|
2843
2860
|
}
|
|
2844
|
-
function
|
|
2861
|
+
function gi(d) {
|
|
2845
2862
|
return !!(re && !Ct(d) && (d.filterValue || d.sortKey || xa(d).length > 0));
|
|
2846
2863
|
}
|
|
2847
2864
|
function ga(d, h) {
|
|
@@ -2850,7 +2867,7 @@ rol IN (admin, employee)`,
|
|
|
2850
2867
|
return g[d] = h, g;
|
|
2851
2868
|
});
|
|
2852
2869
|
}
|
|
2853
|
-
function
|
|
2870
|
+
function yi(d, h, O, g) {
|
|
2854
2871
|
const te = Ke[d] ?? [], I = g ? te : O.filter((Q) => Q !== h), fe = g ? te.includes(h) ? te.filter((Q) => Q !== h) : [...te, h] : I;
|
|
2855
2872
|
fe.length === O.length ? kn(d) : ga(d, fe);
|
|
2856
2873
|
}
|
|
@@ -2869,7 +2886,7 @@ rol IN (admin, employee)`,
|
|
|
2869
2886
|
function ya(d) {
|
|
2870
2887
|
Lr(d, null);
|
|
2871
2888
|
}
|
|
2872
|
-
function
|
|
2889
|
+
function wi() {
|
|
2873
2890
|
Jt({}), yr({});
|
|
2874
2891
|
}
|
|
2875
2892
|
function wa(d) {
|
|
@@ -2880,7 +2897,7 @@ rol IN (admin, employee)`,
|
|
|
2880
2897
|
Nr(h), wa(h), vt(!1), Mt(!1), Tt(!1), h && tr(
|
|
2881
2898
|
(O) => [h, ...O.filter((g) => g !== h)].slice(
|
|
2882
2899
|
0,
|
|
2883
|
-
|
|
2900
|
+
gs
|
|
2884
2901
|
)
|
|
2885
2902
|
);
|
|
2886
2903
|
}
|
|
@@ -2903,7 +2920,7 @@ rol IN (admin, employee)`,
|
|
|
2903
2920
|
240,
|
|
2904
2921
|
Ne ? ge : Ae
|
|
2905
2922
|
);
|
|
2906
|
-
|
|
2923
|
+
ii({
|
|
2907
2924
|
position: "fixed",
|
|
2908
2925
|
zIndex: 1e4,
|
|
2909
2926
|
left: fe,
|
|
@@ -2936,12 +2953,12 @@ rol IN (admin, employee)`,
|
|
|
2936
2953
|
const h = Nt(d, e);
|
|
2937
2954
|
Le || Ue(h), D == null || D(h);
|
|
2938
2955
|
}
|
|
2939
|
-
function
|
|
2956
|
+
function Ni(d) {
|
|
2940
2957
|
ka(
|
|
2941
2958
|
Pe.includes(d) ? Pe.filter((h) => h !== d) : [...Pe, d]
|
|
2942
2959
|
);
|
|
2943
2960
|
}
|
|
2944
|
-
function
|
|
2961
|
+
function ki() {
|
|
2945
2962
|
ka([]);
|
|
2946
2963
|
}
|
|
2947
2964
|
const Sn = je.useCallback(
|
|
@@ -2961,7 +2978,7 @@ rol IN (admin, employee)`,
|
|
|
2961
2978
|
maxHeight: Ne,
|
|
2962
2979
|
"--dt-column-menu-max-height": `${Ne}px`
|
|
2963
2980
|
};
|
|
2964
|
-
|
|
2981
|
+
si(ye);
|
|
2965
2982
|
},
|
|
2966
2983
|
[]
|
|
2967
2984
|
);
|
|
@@ -2972,9 +2989,9 @@ rol IN (admin, employee)`,
|
|
|
2972
2989
|
ht(!1), gr(null);
|
|
2973
2990
|
return;
|
|
2974
2991
|
}
|
|
2975
|
-
Sr.current = d.currentTarget,
|
|
2992
|
+
Sr.current = d.currentTarget, ri(h), gr(O), la(""), Sn(d.currentTarget), ht(!0);
|
|
2976
2993
|
}
|
|
2977
|
-
function
|
|
2994
|
+
function Ci(d) {
|
|
2978
2995
|
if (Ct(d)) return;
|
|
2979
2996
|
const h = bt.current;
|
|
2980
2997
|
if (!h) return;
|
|
@@ -2986,7 +3003,7 @@ rol IN (admin, employee)`,
|
|
|
2986
3003
|
), Q = fe ? fe.scrollWidth : Math.max(I.scrollWidth, I.offsetWidth);
|
|
2987
3004
|
return Math.max(
|
|
2988
3005
|
te,
|
|
2989
|
-
Math.ceil(Q +
|
|
3006
|
+
Math.ceil(Q + Ls(I))
|
|
2990
3007
|
);
|
|
2991
3008
|
}, 0);
|
|
2992
3009
|
g <= 0 || ar((te) => ({
|
|
@@ -3045,15 +3062,15 @@ rol IN (admin, employee)`,
|
|
|
3045
3062
|
};
|
|
3046
3063
|
}, [e]);
|
|
3047
3064
|
const Tr = se(null), [Sa, En] = z(null);
|
|
3048
|
-
function
|
|
3065
|
+
function Si(d, h) {
|
|
3049
3066
|
Tr.current = Dt.indexOf(d), h.dataTransfer.effectAllowed = "move";
|
|
3050
3067
|
}
|
|
3051
|
-
function
|
|
3068
|
+
function Ei(d, h) {
|
|
3052
3069
|
h.preventDefault(), h.dataTransfer.dropEffect = "move";
|
|
3053
3070
|
const O = Dt.indexOf(d);
|
|
3054
3071
|
Sa !== O && En(O);
|
|
3055
3072
|
}
|
|
3056
|
-
function
|
|
3073
|
+
function $i(d, h) {
|
|
3057
3074
|
h.preventDefault();
|
|
3058
3075
|
const O = Tr.current, g = Dt.indexOf(d);
|
|
3059
3076
|
O !== null && O !== g && nr((te) => {
|
|
@@ -3061,10 +3078,10 @@ rol IN (admin, employee)`,
|
|
|
3061
3078
|
return I.splice(g, 0, fe), I;
|
|
3062
3079
|
}), Tr.current = null, En(null);
|
|
3063
3080
|
}
|
|
3064
|
-
function
|
|
3081
|
+
function Li() {
|
|
3065
3082
|
Tr.current = null, En(null);
|
|
3066
3083
|
}
|
|
3067
|
-
function
|
|
3084
|
+
function Ai(d) {
|
|
3068
3085
|
d.sortKey && It(
|
|
3069
3086
|
(h) => (h == null ? void 0 : h.key) === d.key ? { key: d.key, dir: h.dir === "asc" ? "desc" : "asc" } : { key: d.key, dir: "asc" }
|
|
3070
3087
|
);
|
|
@@ -3074,17 +3091,17 @@ rol IN (admin, employee)`,
|
|
|
3074
3091
|
}, [r]), ie(() => {
|
|
3075
3092
|
Er(1);
|
|
3076
3093
|
}, [Qe, Ke]);
|
|
3077
|
-
const xt = !!(j && J), gt = k !== !1,
|
|
3094
|
+
const xt = !!(j && J), gt = k !== !1, Mi = je.useMemo(
|
|
3078
3095
|
() => Qr(
|
|
3079
3096
|
H ?? Jr()
|
|
3080
3097
|
),
|
|
3081
3098
|
[H]
|
|
3082
|
-
), He = xt ? C ?? 1 :
|
|
3099
|
+
), He = xt ? C ?? 1 : pi, tt = xt || gt ? $r : r.length, rt = !!y && !!v && !!N, Ot = !!m, Ea = je.useMemo(
|
|
3083
3100
|
() => new Set(
|
|
3084
3101
|
bn ? Array.from(b ?? []) : sa
|
|
3085
3102
|
),
|
|
3086
3103
|
[bn, b, sa]
|
|
3087
|
-
), $n = (Ot ? 40 : 0) + (rt ? 40 : 0),
|
|
3104
|
+
), $n = (Ot ? 40 : 0) + (rt ? 40 : 0), Ti = rt && r.length > 0 && y.size === r.length, Di = rt && y.size > 0 && y.size < r.length, Dr = je.useMemo(() => {
|
|
3088
3105
|
const d = Object.entries(Ke), h = Object.entries(Qe);
|
|
3089
3106
|
return d.length === 0 && h.length === 0 ? r : r.filter(
|
|
3090
3107
|
(O) => d.every(([g, te]) => {
|
|
@@ -3096,7 +3113,7 @@ rol IN (admin, employee)`,
|
|
|
3096
3113
|
const fe = r.map(
|
|
3097
3114
|
(Q) => Vr(I, Q)
|
|
3098
3115
|
);
|
|
3099
|
-
return
|
|
3116
|
+
return Ts(
|
|
3100
3117
|
Vr(I, O),
|
|
3101
3118
|
te,
|
|
3102
3119
|
fe
|
|
@@ -3114,20 +3131,20 @@ rol IN (admin, employee)`,
|
|
|
3114
3131
|
if (xt || !gt) return yt;
|
|
3115
3132
|
const d = (He - 1) * tt;
|
|
3116
3133
|
return yt.slice(d, d + tt);
|
|
3117
|
-
}, [yt, xt, gt, He, tt]), Rt = xt ? le ?? r.length : yt.length, Ln = gt ? Math.max(1, Math.ceil(Rt / tt)) : 1,
|
|
3134
|
+
}, [yt, xt, gt, He, tt]), Rt = xt ? le ?? r.length : yt.length, Ln = gt ? Math.max(1, Math.ceil(Rt / tt)) : 1, Bi = gt && Rt > tt, Ii = gt ? (He - 1) * tt + 1 : 1, Oi = gt ? Math.min(He * tt, Rt) : Rt;
|
|
3118
3135
|
function An(d) {
|
|
3119
3136
|
if (a) return;
|
|
3120
3137
|
const h = Math.max(1, Math.min(d, Ln));
|
|
3121
3138
|
xt ? j(h) : Er(h);
|
|
3122
3139
|
}
|
|
3123
|
-
function
|
|
3140
|
+
function Ri(d) {
|
|
3124
3141
|
a || (wn(d), xt ? (J(d), j(1)) : Er(1), J && J(d));
|
|
3125
3142
|
}
|
|
3126
3143
|
function La(d) {
|
|
3127
3144
|
const h = new Set(Ea);
|
|
3128
3145
|
h.has(d) ? h.delete(d) : h.add(d);
|
|
3129
3146
|
const O = Array.from(h);
|
|
3130
|
-
bn ||
|
|
3147
|
+
bn || ni(O), A == null || A(O);
|
|
3131
3148
|
}
|
|
3132
3149
|
ie(() => {
|
|
3133
3150
|
Se == null || Se({
|
|
@@ -3149,7 +3166,7 @@ rol IN (admin, employee)`,
|
|
|
3149
3166
|
Pe,
|
|
3150
3167
|
Se
|
|
3151
3168
|
]);
|
|
3152
|
-
const Aa = (d) => d === "center" ? "text-center" : d === "right" ? "text-right" : "text-left",
|
|
3169
|
+
const Aa = (d) => d === "center" ? "text-center" : d === "right" ? "text-right" : "text-left", Pi = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))", Mn = "linear-gradient(180deg, color-mix(in srgb, var(--bg-input) 90%, var(--bg-card)) 0%, color-mix(in srgb, var(--bg-input) 70%, var(--bg-card)) 100%)", Ee = "color-mix(in srgb, var(--border) 62%, var(--bg-card))", Pt = "color-mix(in srgb, var(--primary) 24%, var(--border))", Br = `inset 0 0 0 1px ${Ee}`, Ma = et.reduce(
|
|
3153
3170
|
(d, h) => d + (Bt[h.key] ?? wt(h.width)),
|
|
3154
3171
|
(Ot ? 40 : 0) + (rt ? 40 : 0)
|
|
3155
3172
|
), Ta = typeof L == "number" ? L : typeof L == "string" ? Number(((Pa = L.match(/^(\d+(?:\.\d+)?)px$/)) == null ? void 0 : Pa[1]) ?? NaN) : NaN, ir = Number.isFinite(Ta) ? Math.max(Ma, Ta, pa) : Math.max(Ma, pa), Ir = L ?? ir, zt = `${Ot ? "40px " : ""}${rt ? "40px " : ""}${et.map((d) => `${Bt[d.key] ?? wt(d.width)}px`).join(" ")}`;
|
|
@@ -3203,8 +3220,8 @@ rol IN (admin, employee)`,
|
|
|
3203
3220
|
Qn,
|
|
3204
3221
|
{
|
|
3205
3222
|
size: "sm",
|
|
3206
|
-
checked:
|
|
3207
|
-
indeterminate:
|
|
3223
|
+
checked: Ti,
|
|
3224
|
+
indeterminate: Di,
|
|
3208
3225
|
onChange: N,
|
|
3209
3226
|
"aria-label": "Seleccionar todos",
|
|
3210
3227
|
containerClassName: "items-center",
|
|
@@ -3243,8 +3260,8 @@ rol IN (admin, employee)`,
|
|
|
3243
3260
|
cursor: "default",
|
|
3244
3261
|
padding: te ? E ? "7px 6px" : "9px 8px" : E ? "8px 6px 10px" : "10px 8px 12px"
|
|
3245
3262
|
},
|
|
3246
|
-
onDragOver: (ge) =>
|
|
3247
|
-
onDrop: (ge) =>
|
|
3263
|
+
onDragOver: (ge) => Ei(d.key, ge),
|
|
3264
|
+
onDrop: (ge) => $i(d.key, ge),
|
|
3248
3265
|
children: [
|
|
3249
3266
|
/* @__PURE__ */ o(
|
|
3250
3267
|
"div",
|
|
@@ -3256,10 +3273,10 @@ rol IN (admin, employee)`,
|
|
|
3256
3273
|
{
|
|
3257
3274
|
draggable: !0,
|
|
3258
3275
|
onDragStart: (ge) => {
|
|
3259
|
-
ge.stopPropagation(),
|
|
3276
|
+
ge.stopPropagation(), Si(d.key, ge);
|
|
3260
3277
|
},
|
|
3261
3278
|
onDragEnd: (ge) => {
|
|
3262
|
-
ge.stopPropagation(),
|
|
3279
|
+
ge.stopPropagation(), Li();
|
|
3263
3280
|
},
|
|
3264
3281
|
onClick: (ge) => ge.stopPropagation(),
|
|
3265
3282
|
title: "Arrastrar para mover columna",
|
|
@@ -3276,7 +3293,7 @@ rol IN (admin, employee)`,
|
|
|
3276
3293
|
"aria-label": "Acciones",
|
|
3277
3294
|
children: /* @__PURE__ */ t(en, { className: "h-3.5 w-3.5" })
|
|
3278
3295
|
}
|
|
3279
|
-
) : /* @__PURE__ */ t(
|
|
3296
|
+
) : /* @__PURE__ */ t(Ga, { className: "min-w-0 flex-1", children: /* @__PURE__ */ t(
|
|
3280
3297
|
"span",
|
|
3281
3298
|
{
|
|
3282
3299
|
"data-dt-autofit-content": !0,
|
|
@@ -3291,15 +3308,15 @@ rol IN (admin, employee)`,
|
|
|
3291
3308
|
"aria-label": `Ordenar por ${String(d.header)}`,
|
|
3292
3309
|
title: "Ordenar",
|
|
3293
3310
|
onClick: (ge) => {
|
|
3294
|
-
ge.stopPropagation(),
|
|
3311
|
+
ge.stopPropagation(), Ai(d);
|
|
3295
3312
|
},
|
|
3296
3313
|
"data-dt-sort-button": !0,
|
|
3297
3314
|
className: `absolute -bottom-2 left-1/2 z-20 inline-flex h-4 w-4 -translate-x-1/2 items-center justify-center rounded-full bg-[var(--primary)] text-[var(--primary-fg)] shadow-[0_1px_3px_rgba(15,23,42,0.22)] transition-[opacity,transform] duration-150 hover:scale-105 focus:scale-105 focus:opacity-100 focus:outline-none ${O ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"}`,
|
|
3298
3315
|
style: { bottom: "-0.5rem", top: "auto" },
|
|
3299
|
-
children: O ? De.dir === "asc" ? /* @__PURE__ */ t(Dn, { className: "h-3 w-3" }) : /* @__PURE__ */ t(at, { className: "h-3 w-3" }) : /* @__PURE__ */ t(
|
|
3316
|
+
children: O ? De.dir === "asc" ? /* @__PURE__ */ t(Dn, { className: "h-3 w-3" }) : /* @__PURE__ */ t(at, { className: "h-3 w-3" }) : /* @__PURE__ */ t(Gi, { className: "h-3 w-3" })
|
|
3300
3317
|
}
|
|
3301
3318
|
),
|
|
3302
|
-
re && !te &&
|
|
3319
|
+
re && !te && gi(d) && /* @__PURE__ */ t(
|
|
3303
3320
|
"button",
|
|
3304
3321
|
{
|
|
3305
3322
|
type: "button",
|
|
@@ -3309,7 +3326,7 @@ rol IN (admin, employee)`,
|
|
|
3309
3326
|
title: "Filtrar",
|
|
3310
3327
|
onClick: (ge) => Ca(ge, "filter", d.key),
|
|
3311
3328
|
className: `inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-sm bg-transparent text-[var(--text-muted)] opacity-0 transition-[opacity,color,background-color] duration-150 hover:bg-[var(--bg-card)] hover:text-[var(--primary)] focus:bg-[var(--bg-card)] focus:text-[var(--primary)] focus:opacity-100 group-hover:opacity-100 ${qe && Je === "filter" && Zt === d.key ? "bg-[var(--bg-card)] text-[var(--primary)] opacity-100" : Ae ? "text-[var(--primary)] opacity-100" : ""}`,
|
|
3312
|
-
children: Ae ? /* @__PURE__ */ t(
|
|
3329
|
+
children: Ae ? /* @__PURE__ */ t(Yi, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(Xi, { className: "h-3.5 w-3.5" })
|
|
3313
3330
|
}
|
|
3314
3331
|
)
|
|
3315
3332
|
]
|
|
@@ -3329,7 +3346,7 @@ rol IN (admin, employee)`,
|
|
|
3329
3346
|
}, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
3330
3347
|
},
|
|
3331
3348
|
onDoubleClick: (ge) => {
|
|
3332
|
-
ge.preventDefault(), ge.stopPropagation(), or.current = null, document.body.style.cursor = "", document.body.style.userSelect = "",
|
|
3349
|
+
ge.preventDefault(), ge.stopPropagation(), or.current = null, document.body.style.cursor = "", document.body.style.userSelect = "", Ci(d);
|
|
3333
3350
|
},
|
|
3334
3351
|
onClick: (ge) => ge.stopPropagation(),
|
|
3335
3352
|
className: "absolute top-0 flex h-full items-center justify-center opacity-0 transition-opacity duration-200 hover:opacity-100",
|
|
@@ -3390,7 +3407,7 @@ rol IN (admin, employee)`,
|
|
|
3390
3407
|
if (!qe || typeof document > "u" || Je === "visibility" && !R || Je === "filter" && !re) return null;
|
|
3391
3408
|
const d = e.find(
|
|
3392
3409
|
(ye) => ye.key === Zt
|
|
3393
|
-
), h =
|
|
3410
|
+
), h = xi(), O = d ? Object.prototype.hasOwnProperty.call(Ke, d.key) : !1, g = d ? Qe[d.key] : void 0, te = dn.find(
|
|
3394
3411
|
(ye) => ye.value === (g == null ? void 0 : g.operator)
|
|
3395
3412
|
), I = d ? Ke[d.key] ?? [] : [], fe = ia.trim().toLowerCase(), Q = fe ? h.filter(
|
|
3396
3413
|
(ye) => ye.label.toLowerCase().includes(fe)
|
|
@@ -3405,7 +3422,7 @@ rol IN (admin, employee)`,
|
|
|
3405
3422
|
role: "menu",
|
|
3406
3423
|
className: "overflow-hidden rounded-lg border p-1 shadow-xl",
|
|
3407
3424
|
style: {
|
|
3408
|
-
...
|
|
3425
|
+
...li,
|
|
3409
3426
|
borderColor: "var(--border)",
|
|
3410
3427
|
background: "var(--bg-card)"
|
|
3411
3428
|
},
|
|
@@ -3416,7 +3433,7 @@ rol IN (admin, employee)`,
|
|
|
3416
3433
|
"button",
|
|
3417
3434
|
{
|
|
3418
3435
|
type: "button",
|
|
3419
|
-
onClick:
|
|
3436
|
+
onClick: ki,
|
|
3420
3437
|
disabled: ge === 0,
|
|
3421
3438
|
className: "rounded px-1.5 py-0.5 text-xs font-medium text-[var(--primary)] transition-colors hover:bg-[var(--bg-input)] disabled:opacity-40",
|
|
3422
3439
|
children: "Mostrar todas"
|
|
@@ -3432,7 +3449,7 @@ rol IN (admin, employee)`,
|
|
|
3432
3449
|
role: "menuitemcheckbox",
|
|
3433
3450
|
"aria-checked": _e,
|
|
3434
3451
|
disabled: Ft,
|
|
3435
|
-
onClick: () =>
|
|
3452
|
+
onClick: () => Ni(ye.key),
|
|
3436
3453
|
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",
|
|
3437
3454
|
style: { color: "var(--text-main)" },
|
|
3438
3455
|
children: [
|
|
@@ -3522,7 +3539,7 @@ rol IN (admin, employee)`,
|
|
|
3522
3539
|
valueTo: (g == null ? void 0 : g.valueTo) ?? ""
|
|
3523
3540
|
});
|
|
3524
3541
|
},
|
|
3525
|
-
options:
|
|
3542
|
+
options: xs,
|
|
3526
3543
|
placeholder: "Opcion",
|
|
3527
3544
|
emptyLabel: "Sin condicion",
|
|
3528
3545
|
ariaLabel: "Operador de filtro",
|
|
@@ -3637,7 +3654,7 @@ rol IN (admin, employee)`,
|
|
|
3637
3654
|
color: "var(--primary-fg)"
|
|
3638
3655
|
},
|
|
3639
3656
|
children: [
|
|
3640
|
-
Ae && /* @__PURE__ */ t(
|
|
3657
|
+
Ae && /* @__PURE__ */ t(So, { className: "h-3 w-3" }),
|
|
3641
3658
|
Me && !Ae && /* @__PURE__ */ t(Ge, { className: "h-3 w-3" })
|
|
3642
3659
|
]
|
|
3643
3660
|
}
|
|
@@ -3654,7 +3671,7 @@ rol IN (admin, employee)`,
|
|
|
3654
3671
|
type: "button",
|
|
3655
3672
|
role: "menuitemcheckbox",
|
|
3656
3673
|
"aria-checked": _e,
|
|
3657
|
-
onClick: () =>
|
|
3674
|
+
onClick: () => yi(
|
|
3658
3675
|
d.key,
|
|
3659
3676
|
ye.value,
|
|
3660
3677
|
h.map((nt) => nt.value),
|
|
@@ -3711,7 +3728,7 @@ rol IN (admin, employee)`,
|
|
|
3711
3728
|
function Pr(d) {
|
|
3712
3729
|
return d.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
3713
3730
|
}
|
|
3714
|
-
function
|
|
3731
|
+
function zi() {
|
|
3715
3732
|
const d = et.filter((Q) => !Ct(Q)), h = d.map((Q) => Ia(Wt(Q.header))).join(","), O = yt.map(
|
|
3716
3733
|
(Q) => d.map((Me) => Ia(Ba(Me, Q))).join(",")
|
|
3717
3734
|
).join(`
|
|
@@ -3721,7 +3738,7 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
3721
3738
|
}), I = URL.createObjectURL(te), fe = document.createElement("a");
|
|
3722
3739
|
fe.href = I, fe.download = `${ct}.csv`, document.body.appendChild(fe), fe.click(), document.body.removeChild(fe), URL.revokeObjectURL(I);
|
|
3723
3740
|
}
|
|
3724
|
-
function
|
|
3741
|
+
function Fi() {
|
|
3725
3742
|
const d = et.filter((fe) => !Ct(fe)), h = d.map(
|
|
3726
3743
|
(fe) => Pr(Wt(fe.header))
|
|
3727
3744
|
), g = yt.map(
|
|
@@ -3756,7 +3773,7 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
3756
3773
|
role: "menu",
|
|
3757
3774
|
className: "overflow-hidden rounded-lg border p-1 shadow-xl",
|
|
3758
3775
|
style: {
|
|
3759
|
-
...
|
|
3776
|
+
...ci,
|
|
3760
3777
|
position: "fixed",
|
|
3761
3778
|
zIndex: 9999,
|
|
3762
3779
|
minWidth: 170,
|
|
@@ -3772,10 +3789,10 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
3772
3789
|
className: "flex w-full items-center gap-2.5 rounded-md px-2.5 py-1.5 text-sm transition-colors hover:bg-[var(--bg-input)]",
|
|
3773
3790
|
style: { color: "var(--text-main)" },
|
|
3774
3791
|
onClick: () => {
|
|
3775
|
-
|
|
3792
|
+
zi(), kr(!1);
|
|
3776
3793
|
},
|
|
3777
3794
|
children: [
|
|
3778
|
-
/* @__PURE__ */ t(
|
|
3795
|
+
/* @__PURE__ */ t(Zi, { className: "h-4 w-4 shrink-0 text-emerald-500" }),
|
|
3779
3796
|
"Descargar CSV / Excel"
|
|
3780
3797
|
]
|
|
3781
3798
|
}
|
|
@@ -3788,10 +3805,10 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
3788
3805
|
className: "flex w-full items-center gap-2.5 rounded-md px-2.5 py-1.5 text-sm transition-colors hover:bg-[var(--bg-input)]",
|
|
3789
3806
|
style: { color: "var(--text-main)" },
|
|
3790
3807
|
onClick: () => {
|
|
3791
|
-
|
|
3808
|
+
Fi(), kr(!1);
|
|
3792
3809
|
},
|
|
3793
3810
|
children: [
|
|
3794
|
-
/* @__PURE__ */ t(
|
|
3811
|
+
/* @__PURE__ */ t(Eo, { className: "h-4 w-4 shrink-0 text-red-500" }),
|
|
3795
3812
|
"Imprimir / PDF"
|
|
3796
3813
|
]
|
|
3797
3814
|
}
|
|
@@ -3813,7 +3830,7 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
3813
3830
|
"button",
|
|
3814
3831
|
{
|
|
3815
3832
|
type: "button",
|
|
3816
|
-
onClick:
|
|
3833
|
+
onClick: wi,
|
|
3817
3834
|
className: "inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-[var(--primary)] transition-colors hover:bg-[var(--bg-card)]",
|
|
3818
3835
|
children: [
|
|
3819
3836
|
/* @__PURE__ */ t(Fe, { className: "h-3.5 w-3.5" }),
|
|
@@ -3848,7 +3865,7 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
3848
3865
|
"aria-expanded": ut,
|
|
3849
3866
|
title: "Abrir filtros BQL",
|
|
3850
3867
|
children: [
|
|
3851
|
-
/* @__PURE__ */ t(
|
|
3868
|
+
/* @__PURE__ */ t(Ji, { className: "h-3.5 w-3.5" }),
|
|
3852
3869
|
"BQL",
|
|
3853
3870
|
d && /* @__PURE__ */ t("span", { className: "h-1.5 w-1.5 rounded-full bg-current" }),
|
|
3854
3871
|
ut ? /* @__PURE__ */ t(Dn, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(at, { className: "h-3.5 w-3.5" })
|
|
@@ -3899,7 +3916,7 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
3899
3916
|
ref: ua,
|
|
3900
3917
|
className: "flex flex-col gap-3 rounded-lg p-3 shadow-2xl",
|
|
3901
3918
|
style: {
|
|
3902
|
-
...
|
|
3919
|
+
...oi,
|
|
3903
3920
|
background: "var(--bg-card)",
|
|
3904
3921
|
border: "1px solid color-mix(in srgb, var(--primary) 35%, var(--border))"
|
|
3905
3922
|
},
|
|
@@ -4051,7 +4068,7 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
4051
4068
|
},
|
|
4052
4069
|
className: "inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs text-[var(--text-muted)]",
|
|
4053
4070
|
children: [
|
|
4054
|
-
/* @__PURE__ */ t(
|
|
4071
|
+
/* @__PURE__ */ t($o, { className: "h-3 w-3" }),
|
|
4055
4072
|
"Limpiar"
|
|
4056
4073
|
]
|
|
4057
4074
|
}
|
|
@@ -4150,13 +4167,13 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
4150
4167
|
onClick: () => {
|
|
4151
4168
|
var te;
|
|
4152
4169
|
const g = (te = Cr.current) == null ? void 0 : te.getBoundingClientRect();
|
|
4153
|
-
g &&
|
|
4170
|
+
g && di({
|
|
4154
4171
|
top: g.bottom + 4,
|
|
4155
4172
|
right: window.innerWidth - g.right
|
|
4156
4173
|
}), kr((I) => !I);
|
|
4157
4174
|
},
|
|
4158
4175
|
className: `inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-[var(--text-muted)] transition-colors hover:bg-[var(--bg-card)] hover:text-[var(--primary)] focus:bg-[var(--bg-card)] focus:text-[var(--primary)] ${rr ? "bg-[var(--bg-card)] text-[var(--primary)]" : ""}`,
|
|
4159
|
-
children: /* @__PURE__ */ t(
|
|
4176
|
+
children: /* @__PURE__ */ t(Qi, { className: "h-4 w-4" })
|
|
4160
4177
|
}
|
|
4161
4178
|
),
|
|
4162
4179
|
R && /* @__PURE__ */ t(
|
|
@@ -4176,8 +4193,8 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
4176
4193
|
}
|
|
4177
4194
|
);
|
|
4178
4195
|
}, Oa = () => {
|
|
4179
|
-
if (!
|
|
4180
|
-
const d =
|
|
4196
|
+
if (!Bi) return null;
|
|
4197
|
+
const d = As(He, Ln);
|
|
4181
4198
|
return /* @__PURE__ */ o(
|
|
4182
4199
|
"div",
|
|
4183
4200
|
{
|
|
@@ -4186,15 +4203,15 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
4186
4203
|
style: { borderColor: "var(--border)", background: "var(--bg-input)" },
|
|
4187
4204
|
children: [
|
|
4188
4205
|
/* @__PURE__ */ o("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
4189
|
-
/* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: Rt === 0 ? "0 filas" : `${
|
|
4206
|
+
/* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: Rt === 0 ? "0 filas" : `${Ii}–${Oi} de ${Rt}` }),
|
|
4190
4207
|
/* @__PURE__ */ o("div", { className: "flex items-center gap-1", children: [
|
|
4191
4208
|
/* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: "Filas:" }),
|
|
4192
4209
|
/* @__PURE__ */ t(
|
|
4193
4210
|
Gt,
|
|
4194
4211
|
{
|
|
4195
4212
|
value: String(tt),
|
|
4196
|
-
onChange: (h) =>
|
|
4197
|
-
options:
|
|
4213
|
+
onChange: (h) => Ri(Number(h)),
|
|
4214
|
+
options: Mi.map((h) => ({
|
|
4198
4215
|
value: String(h),
|
|
4199
4216
|
label: String(h)
|
|
4200
4217
|
})),
|
|
@@ -4652,7 +4669,7 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
4652
4669
|
"var(--bg-hover)"
|
|
4653
4670
|
), Ne.currentTarget.style.setProperty(
|
|
4654
4671
|
"--dt-sticky-bg",
|
|
4655
|
-
|
|
4672
|
+
Pi
|
|
4656
4673
|
));
|
|
4657
4674
|
},
|
|
4658
4675
|
onMouseLeave: (Ne) => {
|
|
@@ -4727,7 +4744,7 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
4727
4744
|
role: "cell",
|
|
4728
4745
|
"data-dt-column-key": Ne.key,
|
|
4729
4746
|
"data-dt-disable-row-click": Ne.disableRowClick || nt ? "true" : void 0,
|
|
4730
|
-
className: `${nt ? "px-2 py-1.5 text-center" : `${E ? "px-2 py-1.5" : "px-3 py-2"} ${Aa(Ne.align)}`} ${
|
|
4747
|
+
className: `${nt ? "px-2 py-1.5 text-center" : `${E ? "px-2 py-1.5" : "px-3 py-2"} ${Aa(Ne.align)}`} ${Ns} ${Ne.className ?? ""}`,
|
|
4731
4748
|
style: {
|
|
4732
4749
|
overflow: "hidden",
|
|
4733
4750
|
whiteSpace: "nowrap",
|
|
@@ -4743,7 +4760,7 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
4743
4760
|
borderRight: `1px solid ${Ee}`
|
|
4744
4761
|
}
|
|
4745
4762
|
},
|
|
4746
|
-
children: /* @__PURE__ */ t(
|
|
4763
|
+
children: /* @__PURE__ */ t(Ga, { children: /* @__PURE__ */ t(
|
|
4747
4764
|
"div",
|
|
4748
4765
|
{
|
|
4749
4766
|
"data-dt-autofit-content": !0,
|
|
@@ -4791,24 +4808,24 @@ ${O}`, te = new Blob(["\uFEFF" + g], {
|
|
|
4791
4808
|
}
|
|
4792
4809
|
);
|
|
4793
4810
|
}
|
|
4794
|
-
const
|
|
4811
|
+
const Bs = {
|
|
4795
4812
|
email: { pattern: /^[^\s@]+@[^\s@]+\.[^\s@]+$/, message: "Correo inválido" },
|
|
4796
4813
|
integer: { pattern: /^-?\d+$/, message: "Debe ser un número entero" },
|
|
4797
4814
|
date: { pattern: /^\d{4}-\d{2}-\d{2}$/, message: "Fecha inválida" }
|
|
4798
4815
|
};
|
|
4799
|
-
function
|
|
4816
|
+
function Is(e, r) {
|
|
4800
4817
|
if (r.minLength !== void 0 && e.length < r.minLength)
|
|
4801
4818
|
return r.message ?? `Mínimo ${r.minLength} caracteres`;
|
|
4802
4819
|
if (r.maxLength !== void 0 && e.length > r.maxLength)
|
|
4803
4820
|
return r.message ?? `Máximo ${r.maxLength} caracteres`;
|
|
4804
4821
|
if (!e) return null;
|
|
4805
4822
|
if (r.preset) {
|
|
4806
|
-
const n =
|
|
4823
|
+
const n = Bs[r.preset];
|
|
4807
4824
|
if (!n.pattern.test(e)) return r.message ?? n.message;
|
|
4808
4825
|
}
|
|
4809
4826
|
return r.pattern && !r.pattern.test(e) ? r.message ?? "Formato inválido" : null;
|
|
4810
4827
|
}
|
|
4811
|
-
const
|
|
4828
|
+
const Os = /* @__PURE__ */ new Set([
|
|
4812
4829
|
"Backspace",
|
|
4813
4830
|
"Delete",
|
|
4814
4831
|
"ArrowLeft",
|
|
@@ -4821,7 +4838,7 @@ const Ds = /* @__PURE__ */ new Set([
|
|
|
4821
4838
|
"Enter",
|
|
4822
4839
|
"Escape"
|
|
4823
4840
|
]);
|
|
4824
|
-
function
|
|
4841
|
+
function Rs({
|
|
4825
4842
|
initialValue: e,
|
|
4826
4843
|
type: r,
|
|
4827
4844
|
mask: n,
|
|
@@ -4842,14 +4859,14 @@ function Bs({
|
|
|
4842
4859
|
onChange: (f) => s(f.target.value),
|
|
4843
4860
|
onBlur: () => i(),
|
|
4844
4861
|
onKeyDown: (f) => {
|
|
4845
|
-
f.key === "Enter" && (f.preventDefault(), a(l)), f.key === "Escape" && (f.preventDefault(), i()), (n == null ? void 0 : n.preset) === "integer" && !f.ctrlKey && !f.metaKey && !
|
|
4862
|
+
f.key === "Enter" && (f.preventDefault(), a(l)), f.key === "Escape" && (f.preventDefault(), i()), (n == null ? void 0 : n.preset) === "integer" && !f.ctrlKey && !f.metaKey && !Os.has(f.key) && !/^[\d-]$/.test(f.key) && f.preventDefault();
|
|
4846
4863
|
},
|
|
4847
4864
|
onClick: (f) => f.stopPropagation(),
|
|
4848
4865
|
className: "w-full min-w-0 border-0 bg-transparent p-0 text-sm text-[var(--text-main)] outline-none"
|
|
4849
4866
|
}
|
|
4850
4867
|
);
|
|
4851
4868
|
}
|
|
4852
|
-
function
|
|
4869
|
+
function Ps({
|
|
4853
4870
|
initialValue: e,
|
|
4854
4871
|
options: r,
|
|
4855
4872
|
loading: n,
|
|
@@ -4893,7 +4910,7 @@ function Is({
|
|
|
4893
4910
|
}
|
|
4894
4911
|
);
|
|
4895
4912
|
}
|
|
4896
|
-
const
|
|
4913
|
+
const zs = {
|
|
4897
4914
|
outline: "2px solid var(--primary)",
|
|
4898
4915
|
outlineOffset: "-2px",
|
|
4899
4916
|
borderRadius: "4px",
|
|
@@ -4903,7 +4920,7 @@ const Os = {
|
|
|
4903
4920
|
outlineOffset: "-2px",
|
|
4904
4921
|
borderRadius: "4px"
|
|
4905
4922
|
};
|
|
4906
|
-
function
|
|
4923
|
+
function Xd({
|
|
4907
4924
|
columns: e,
|
|
4908
4925
|
data: r,
|
|
4909
4926
|
getRowId: n,
|
|
@@ -5039,7 +5056,7 @@ function Vd({
|
|
|
5039
5056
|
if (!(ee != null && ee.editable)) return;
|
|
5040
5057
|
const { field: oe, type: D, mask: ue, validate: Z } = ee.editable, B = D === "number" ? re === "" ? null : Number(re) : re;
|
|
5041
5058
|
if (ue) {
|
|
5042
|
-
const we =
|
|
5059
|
+
const we = Is(re, ue);
|
|
5043
5060
|
if (we) {
|
|
5044
5061
|
y((Se) => ({
|
|
5045
5062
|
...Se,
|
|
@@ -5182,7 +5199,7 @@ function Vd({
|
|
|
5182
5199
|
};
|
|
5183
5200
|
if (D) {
|
|
5184
5201
|
const de = R.type === "select" ? /* @__PURE__ */ t(
|
|
5185
|
-
|
|
5202
|
+
Ps,
|
|
5186
5203
|
{
|
|
5187
5204
|
initialValue: W,
|
|
5188
5205
|
options: x[oe] ?? [],
|
|
@@ -5191,7 +5208,7 @@ function Vd({
|
|
|
5191
5208
|
onCancel: G
|
|
5192
5209
|
}
|
|
5193
5210
|
) : /* @__PURE__ */ t(
|
|
5194
|
-
|
|
5211
|
+
Rs,
|
|
5195
5212
|
{
|
|
5196
5213
|
initialValue: W,
|
|
5197
5214
|
type: R.type ?? "text",
|
|
@@ -5204,7 +5221,7 @@ function Vd({
|
|
|
5204
5221
|
"div",
|
|
5205
5222
|
{
|
|
5206
5223
|
className: "absolute inset-0 flex items-center px-2",
|
|
5207
|
-
style:
|
|
5224
|
+
style: zs,
|
|
5208
5225
|
onClick: (he) => he.stopPropagation(),
|
|
5209
5226
|
children: de
|
|
5210
5227
|
}
|
|
@@ -5245,10 +5262,10 @@ function Vd({
|
|
|
5245
5262
|
}
|
|
5246
5263
|
),
|
|
5247
5264
|
/* @__PURE__ */ t("span", { className: "relative z-0 inline-flex items-center gap-1 pointer-events-none", children: Z ? /* @__PURE__ */ o("span", { className: "flex items-center gap-1 text-red-500", children: [
|
|
5248
|
-
/* @__PURE__ */ t(
|
|
5265
|
+
/* @__PURE__ */ t(ko, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
5249
5266
|
/* @__PURE__ */ t("span", { className: "truncate text-xs", children: Z })
|
|
5250
5267
|
] }) : /* @__PURE__ */ t("span", { className: "truncate", children: ce }) }),
|
|
5251
|
-
!B && /* @__PURE__ */ t(
|
|
5268
|
+
!B && /* @__PURE__ */ t(Lo, { className: "pointer-events-none absolute right-1 top-1/2 z-0 h-3 w-3 -translate-y-1/2 shrink-0 text-[var(--text-muted)] opacity-0 transition-opacity peer-hover:opacity-40" })
|
|
5252
5269
|
] });
|
|
5253
5270
|
}
|
|
5254
5271
|
};
|
|
@@ -5285,7 +5302,7 @@ function Vd({
|
|
|
5285
5302
|
},
|
|
5286
5303
|
style: { width: "100%", minWidth: 0, outline: "none" },
|
|
5287
5304
|
children: /* @__PURE__ */ t(
|
|
5288
|
-
|
|
5305
|
+
Ds,
|
|
5289
5306
|
{
|
|
5290
5307
|
...l,
|
|
5291
5308
|
columns: ae,
|
|
@@ -5299,14 +5316,14 @@ function Vd({
|
|
|
5299
5316
|
function lr(e) {
|
|
5300
5317
|
return e ? /* @__PURE__ */ new Date(`${e}T12:00:00`) : void 0;
|
|
5301
5318
|
}
|
|
5302
|
-
function
|
|
5319
|
+
function Ya(e) {
|
|
5303
5320
|
return e.toISOString().slice(0, 10);
|
|
5304
5321
|
}
|
|
5305
|
-
function
|
|
5322
|
+
function Fs({
|
|
5306
5323
|
calendarMonth: e,
|
|
5307
5324
|
displayIndex: r
|
|
5308
5325
|
}) {
|
|
5309
|
-
const { previousMonth: n, nextMonth: a, goToMonth: i, months: l, labels: s, formatters: c } =
|
|
5326
|
+
const { previousMonth: n, nextMonth: a, goToMonth: i, months: l, labels: s, formatters: c } = zl(), u = !!n && r === 0, m = !!a && r === l.length - 1;
|
|
5310
5327
|
return /* @__PURE__ */ o(
|
|
5311
5328
|
"div",
|
|
5312
5329
|
{
|
|
@@ -5371,10 +5388,10 @@ function Rs({
|
|
|
5371
5388
|
}
|
|
5372
5389
|
);
|
|
5373
5390
|
}
|
|
5374
|
-
function
|
|
5391
|
+
function _s(e) {
|
|
5375
5392
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
5376
5393
|
}
|
|
5377
|
-
function
|
|
5394
|
+
function Zd({
|
|
5378
5395
|
startDate: e,
|
|
5379
5396
|
endDate: r,
|
|
5380
5397
|
onChange: n,
|
|
@@ -5407,14 +5424,14 @@ function Gd({
|
|
|
5407
5424
|
padding: "10px 8px"
|
|
5408
5425
|
},
|
|
5409
5426
|
children: /* @__PURE__ */ t(
|
|
5410
|
-
|
|
5427
|
+
Pl,
|
|
5411
5428
|
{
|
|
5412
5429
|
mode: "range",
|
|
5413
5430
|
selected: m,
|
|
5414
5431
|
month: b,
|
|
5415
5432
|
onMonthChange: p,
|
|
5416
5433
|
onSelect: (A) => {
|
|
5417
|
-
const w = A != null && A.from ?
|
|
5434
|
+
const w = A != null && A.from ? Ya(A.from) : e, y = A != null && A.to ? Ya(A.to) : "";
|
|
5418
5435
|
n({ startDate: w, endDate: y });
|
|
5419
5436
|
},
|
|
5420
5437
|
numberOfMonths: l,
|
|
@@ -5422,7 +5439,7 @@ function Gd({
|
|
|
5422
5439
|
disabled: f ? { before: f } : void 0,
|
|
5423
5440
|
showOutsideDays: !1,
|
|
5424
5441
|
components: {
|
|
5425
|
-
MonthCaption:
|
|
5442
|
+
MonthCaption: Fs
|
|
5426
5443
|
},
|
|
5427
5444
|
className: "text-sm",
|
|
5428
5445
|
classNames: {
|
|
@@ -5514,7 +5531,7 @@ function Gd({
|
|
|
5514
5531
|
}
|
|
5515
5532
|
},
|
|
5516
5533
|
formatters: {
|
|
5517
|
-
formatCaption: (A) =>
|
|
5534
|
+
formatCaption: (A) => _s(
|
|
5518
5535
|
new Intl.DateTimeFormat("es-MX", {
|
|
5519
5536
|
month: "long",
|
|
5520
5537
|
year: "numeric"
|
|
@@ -5561,15 +5578,15 @@ function Gd({
|
|
|
5561
5578
|
)
|
|
5562
5579
|
] });
|
|
5563
5580
|
}
|
|
5564
|
-
const
|
|
5565
|
-
function
|
|
5566
|
-
window.dispatchEvent(new CustomEvent(
|
|
5581
|
+
const Hs = "bonsaif-ui:hide-tooltips";
|
|
5582
|
+
function Xa() {
|
|
5583
|
+
window.dispatchEvent(new CustomEvent(Hs));
|
|
5567
5584
|
}
|
|
5568
|
-
function
|
|
5585
|
+
function js(e) {
|
|
5569
5586
|
if (e !== void 0)
|
|
5570
5587
|
return typeof e == "number" ? `${e}px` : e;
|
|
5571
5588
|
}
|
|
5572
|
-
function
|
|
5589
|
+
function Jd({
|
|
5573
5590
|
trigger: e,
|
|
5574
5591
|
items: r,
|
|
5575
5592
|
align: n = "end",
|
|
@@ -5594,7 +5611,7 @@ function Yd({
|
|
|
5594
5611
|
left: $,
|
|
5595
5612
|
top: le,
|
|
5596
5613
|
bottom: C,
|
|
5597
|
-
width:
|
|
5614
|
+
width: js(typeof a == "number" ? H : a)
|
|
5598
5615
|
});
|
|
5599
5616
|
}, [n, a]);
|
|
5600
5617
|
ie(() => b(!0), []), ie(() => {
|
|
@@ -5613,9 +5630,9 @@ function Yd({
|
|
|
5613
5630
|
}, [u, v, N]);
|
|
5614
5631
|
const T = (S) => {
|
|
5615
5632
|
i || (S.key === "Enter" || S.key === " ") && (S.preventDefault(), v(!u));
|
|
5616
|
-
}, x = ta(e) ?
|
|
5633
|
+
}, x = ta(e) ? qi(e, {
|
|
5617
5634
|
onClick: () => {
|
|
5618
|
-
i || (
|
|
5635
|
+
i || (Xa(), v(!u));
|
|
5619
5636
|
}
|
|
5620
5637
|
}) : e, F = u ? /* @__PURE__ */ t(
|
|
5621
5638
|
"div",
|
|
@@ -5635,7 +5652,7 @@ function Yd({
|
|
|
5635
5652
|
disabled: S.disabled,
|
|
5636
5653
|
onClick: () => {
|
|
5637
5654
|
var k;
|
|
5638
|
-
S.disabled || (
|
|
5655
|
+
S.disabled || (Xa(), (k = S.onSelect) == null || k.call(S), v(!1));
|
|
5639
5656
|
},
|
|
5640
5657
|
className: "flex w-full min-w-0 items-start 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",
|
|
5641
5658
|
style: {
|
|
@@ -5670,8 +5687,8 @@ function Yd({
|
|
|
5670
5687
|
}
|
|
5671
5688
|
);
|
|
5672
5689
|
}
|
|
5673
|
-
const
|
|
5674
|
-
function
|
|
5690
|
+
const Ws = 180, Za = "bg-[color-mix(in_srgb,var(--bg-main)_72%,transparent)] backdrop-blur-sm";
|
|
5691
|
+
function Qd({
|
|
5675
5692
|
open: e,
|
|
5676
5693
|
onClose: r,
|
|
5677
5694
|
title: n,
|
|
@@ -5700,7 +5717,7 @@ function Xd({
|
|
|
5700
5717
|
}, []), le = Ce(() => {
|
|
5701
5718
|
$(!1), window.setTimeout(
|
|
5702
5719
|
() => H(!1),
|
|
5703
|
-
|
|
5720
|
+
Ws
|
|
5704
5721
|
);
|
|
5705
5722
|
}, []), C = Ce(() => {
|
|
5706
5723
|
if (p) {
|
|
@@ -5738,7 +5755,7 @@ function Xd({
|
|
|
5738
5755
|
/* @__PURE__ */ t(
|
|
5739
5756
|
"div",
|
|
5740
5757
|
{
|
|
5741
|
-
className: `absolute inset-0 ${
|
|
5758
|
+
className: `absolute inset-0 ${Za}`,
|
|
5742
5759
|
onClick: C
|
|
5743
5760
|
}
|
|
5744
5761
|
),
|
|
@@ -5798,7 +5815,7 @@ function Xd({
|
|
|
5798
5815
|
{
|
|
5799
5816
|
variant: "primary",
|
|
5800
5817
|
size: "sm",
|
|
5801
|
-
icon: /* @__PURE__ */ t(
|
|
5818
|
+
icon: /* @__PURE__ */ t(Fl, { className: "w-4 h-4" }),
|
|
5802
5819
|
onClick: s,
|
|
5803
5820
|
loading: c,
|
|
5804
5821
|
disabled: u,
|
|
@@ -5835,7 +5852,7 @@ function Xd({
|
|
|
5835
5852
|
/* @__PURE__ */ t(
|
|
5836
5853
|
"div",
|
|
5837
5854
|
{
|
|
5838
|
-
className: `absolute inset-0 ${
|
|
5855
|
+
className: `absolute inset-0 ${Za} transition-opacity duration-200 ease-out ${X ? "opacity-100" : "opacity-0"}`,
|
|
5839
5856
|
onClick: le
|
|
5840
5857
|
}
|
|
5841
5858
|
),
|
|
@@ -5932,54 +5949,54 @@ function Xd({
|
|
|
5932
5949
|
document.body
|
|
5933
5950
|
) : null;
|
|
5934
5951
|
}
|
|
5935
|
-
const
|
|
5952
|
+
const qs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Us = /^\+?[0-9\s().-]+$/, Ks = 7, Vs = 15;
|
|
5936
5953
|
function it(e) {
|
|
5937
5954
|
return e == null || String(e).trim() === "";
|
|
5938
5955
|
}
|
|
5939
|
-
function Wo(e) {
|
|
5940
|
-
return typeof e == "number" ? e : typeof e == "string" && e.trim() !== "" ? Number(e) : Number.NaN;
|
|
5941
|
-
}
|
|
5942
5956
|
function qo(e) {
|
|
5943
|
-
return
|
|
5957
|
+
return typeof e == "number" ? e : typeof e == "string" && e.trim() !== "" ? Number(e) : Number.NaN;
|
|
5944
5958
|
}
|
|
5945
5959
|
function Uo(e) {
|
|
5960
|
+
return it(e) ? !1 : qs.test(String(e));
|
|
5961
|
+
}
|
|
5962
|
+
function Ko(e) {
|
|
5946
5963
|
if (it(e)) return !1;
|
|
5947
5964
|
const r = String(e), n = r.replace(/\D/g, "");
|
|
5948
|
-
return
|
|
5965
|
+
return Us.test(r) && n.length >= Ks && n.length <= Vs;
|
|
5949
5966
|
}
|
|
5950
|
-
function
|
|
5967
|
+
function eu(e = "Este campo es requerido.") {
|
|
5951
5968
|
return (r) => it(r) ? e : void 0;
|
|
5952
5969
|
}
|
|
5953
|
-
function
|
|
5954
|
-
return (r) => it(r) || qo(r) ? void 0 : e;
|
|
5955
|
-
}
|
|
5956
|
-
function Qd(e = "Ingresa un telefono valido.") {
|
|
5970
|
+
function tu(e = "Ingresa un correo valido.") {
|
|
5957
5971
|
return (r) => it(r) || Uo(r) ? void 0 : e;
|
|
5958
5972
|
}
|
|
5959
|
-
function
|
|
5973
|
+
function ru(e = "Ingresa un telefono valido.") {
|
|
5974
|
+
return (r) => it(r) || Ko(r) ? void 0 : e;
|
|
5975
|
+
}
|
|
5976
|
+
function nu(e, r) {
|
|
5960
5977
|
return (n) => it(n) || String(n).length >= e ? void 0 : r ?? `Debe tener al menos ${e} caracteres.`;
|
|
5961
5978
|
}
|
|
5962
|
-
function
|
|
5979
|
+
function au(e, r) {
|
|
5963
5980
|
return (n) => it(n) || String(n).length <= e ? void 0 : r ?? `Debe tener ${e} caracteres o menos.`;
|
|
5964
5981
|
}
|
|
5965
|
-
function
|
|
5982
|
+
function ou(e, r) {
|
|
5966
5983
|
return (n) => {
|
|
5967
5984
|
if (it(n)) return;
|
|
5968
|
-
const a =
|
|
5985
|
+
const a = qo(n);
|
|
5969
5986
|
return Number.isFinite(a) && a >= e ? void 0 : r ?? `Debe ser mayor o igual a ${e}.`;
|
|
5970
5987
|
};
|
|
5971
5988
|
}
|
|
5972
|
-
function
|
|
5989
|
+
function iu(e, r) {
|
|
5973
5990
|
return (n) => {
|
|
5974
5991
|
if (it(n)) return;
|
|
5975
|
-
const a =
|
|
5992
|
+
const a = qo(n);
|
|
5976
5993
|
return Number.isFinite(a) && a <= e ? void 0 : r ?? `Debe ser menor o igual a ${e}.`;
|
|
5977
5994
|
};
|
|
5978
5995
|
}
|
|
5979
|
-
function
|
|
5996
|
+
function lu(e, r = "El formato no es valido.") {
|
|
5980
5997
|
return (n) => it(n) || e.test(String(n)) ? void 0 : r;
|
|
5981
5998
|
}
|
|
5982
|
-
function
|
|
5999
|
+
function su(e, r) {
|
|
5983
6000
|
const n = {};
|
|
5984
6001
|
for (const a of Object.keys(r)) {
|
|
5985
6002
|
const i = r[a];
|
|
@@ -5998,23 +6015,23 @@ function ou(e, r) {
|
|
|
5998
6015
|
errors: n
|
|
5999
6016
|
};
|
|
6000
6017
|
}
|
|
6001
|
-
var
|
|
6018
|
+
var Vo = {
|
|
6002
6019
|
color: void 0,
|
|
6003
6020
|
size: void 0,
|
|
6004
6021
|
className: void 0,
|
|
6005
6022
|
style: void 0,
|
|
6006
6023
|
attr: void 0
|
|
6007
|
-
},
|
|
6008
|
-
function
|
|
6024
|
+
}, Ja = je.createContext && /* @__PURE__ */ je.createContext(Vo), Gs = ["attr", "size", "title"];
|
|
6025
|
+
function Ys(e, r) {
|
|
6009
6026
|
if (e == null) return {};
|
|
6010
|
-
var n, a, i =
|
|
6027
|
+
var n, a, i = Xs(e, r);
|
|
6011
6028
|
if (Object.getOwnPropertySymbols) {
|
|
6012
6029
|
var l = Object.getOwnPropertySymbols(e);
|
|
6013
6030
|
for (a = 0; a < l.length; a++) n = l[a], r.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
|
|
6014
6031
|
}
|
|
6015
6032
|
return i;
|
|
6016
6033
|
}
|
|
6017
|
-
function
|
|
6034
|
+
function Xs(e, r) {
|
|
6018
6035
|
if (e == null) return {};
|
|
6019
6036
|
var n = {};
|
|
6020
6037
|
for (var a in e) if ({}.hasOwnProperty.call(e, a)) {
|
|
@@ -6032,7 +6049,7 @@ function an() {
|
|
|
6032
6049
|
return e;
|
|
6033
6050
|
}, an.apply(null, arguments);
|
|
6034
6051
|
}
|
|
6035
|
-
function
|
|
6052
|
+
function Qa(e, r) {
|
|
6036
6053
|
var n = Object.keys(e);
|
|
6037
6054
|
if (Object.getOwnPropertySymbols) {
|
|
6038
6055
|
var a = Object.getOwnPropertySymbols(e);
|
|
@@ -6045,22 +6062,22 @@ function Ja(e, r) {
|
|
|
6045
6062
|
function on(e) {
|
|
6046
6063
|
for (var r = 1; r < arguments.length; r++) {
|
|
6047
6064
|
var n = arguments[r] != null ? arguments[r] : {};
|
|
6048
|
-
r % 2 ?
|
|
6049
|
-
|
|
6050
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
6065
|
+
r % 2 ? Qa(Object(n), !0).forEach(function(a) {
|
|
6066
|
+
Zs(e, a, n[a]);
|
|
6067
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Qa(Object(n)).forEach(function(a) {
|
|
6051
6068
|
Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(n, a));
|
|
6052
6069
|
});
|
|
6053
6070
|
}
|
|
6054
6071
|
return e;
|
|
6055
6072
|
}
|
|
6056
|
-
function
|
|
6057
|
-
return (r =
|
|
6073
|
+
function Zs(e, r, n) {
|
|
6074
|
+
return (r = Js(r)) in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
|
|
6058
6075
|
}
|
|
6059
|
-
function
|
|
6060
|
-
var r =
|
|
6076
|
+
function Js(e) {
|
|
6077
|
+
var r = Qs(e, "string");
|
|
6061
6078
|
return typeof r == "symbol" ? r : r + "";
|
|
6062
6079
|
}
|
|
6063
|
-
function
|
|
6080
|
+
function Qs(e, r) {
|
|
6064
6081
|
if (typeof e != "object" || !e) return e;
|
|
6065
6082
|
var n = e[Symbol.toPrimitive];
|
|
6066
6083
|
if (n !== void 0) {
|
|
@@ -6070,23 +6087,23 @@ function Xs(e, r) {
|
|
|
6070
6087
|
}
|
|
6071
6088
|
return (r === "string" ? String : Number)(e);
|
|
6072
6089
|
}
|
|
6073
|
-
function
|
|
6090
|
+
function Go(e) {
|
|
6074
6091
|
return e && e.map((r, n) => /* @__PURE__ */ je.createElement(r.tag, on({
|
|
6075
6092
|
key: n
|
|
6076
|
-
}, r.attr),
|
|
6093
|
+
}, r.attr), Go(r.child)));
|
|
6077
6094
|
}
|
|
6078
6095
|
function na(e) {
|
|
6079
|
-
return (r) => /* @__PURE__ */ je.createElement(
|
|
6096
|
+
return (r) => /* @__PURE__ */ je.createElement(ec, an({
|
|
6080
6097
|
attr: on({}, e.attr)
|
|
6081
|
-
}, r),
|
|
6098
|
+
}, r), Go(e.child));
|
|
6082
6099
|
}
|
|
6083
|
-
function
|
|
6100
|
+
function ec(e) {
|
|
6084
6101
|
var r = (n) => {
|
|
6085
6102
|
var {
|
|
6086
6103
|
attr: a,
|
|
6087
6104
|
size: i,
|
|
6088
6105
|
title: l
|
|
6089
|
-
} = e, s =
|
|
6106
|
+
} = e, s = Ys(e, Gs), c = i || n.size || "1em", u;
|
|
6090
6107
|
return n.className && (u = n.className), e.className && (u = (u ? u + " " : "") + e.className), /* @__PURE__ */ je.createElement("svg", an({
|
|
6091
6108
|
stroke: "currentColor",
|
|
6092
6109
|
fill: "currentColor",
|
|
@@ -6101,15 +6118,15 @@ function Zs(e) {
|
|
|
6101
6118
|
xmlns: "http://www.w3.org/2000/svg"
|
|
6102
6119
|
}), l && /* @__PURE__ */ je.createElement("title", null, l), e.children);
|
|
6103
6120
|
};
|
|
6104
|
-
return
|
|
6121
|
+
return Ja !== void 0 ? /* @__PURE__ */ je.createElement(Ja.Consumer, null, (n) => r(n)) : r(Vo);
|
|
6105
6122
|
}
|
|
6106
|
-
function
|
|
6123
|
+
function Yo(e) {
|
|
6107
6124
|
return na({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z" }, child: [] }] })(e);
|
|
6108
6125
|
}
|
|
6109
|
-
function
|
|
6126
|
+
function tc(e) {
|
|
6110
6127
|
return na({ 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);
|
|
6111
6128
|
}
|
|
6112
|
-
function
|
|
6129
|
+
function rc(e) {
|
|
6113
6130
|
return na({ 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);
|
|
6114
6131
|
}
|
|
6115
6132
|
function zn({
|
|
@@ -6124,7 +6141,7 @@ function zn({
|
|
|
6124
6141
|
}
|
|
6125
6142
|
);
|
|
6126
6143
|
}
|
|
6127
|
-
function
|
|
6144
|
+
function Xo({
|
|
6128
6145
|
label: e,
|
|
6129
6146
|
containerClassName: r = "",
|
|
6130
6147
|
helperText: n,
|
|
@@ -6166,7 +6183,7 @@ function Yo({
|
|
|
6166
6183
|
{
|
|
6167
6184
|
"aria-hidden": "true",
|
|
6168
6185
|
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"}`,
|
|
6169
|
-
children: /* @__PURE__ */ t(
|
|
6186
|
+
children: /* @__PURE__ */ t(tc, { className: "h-[18px] w-[18px]" })
|
|
6170
6187
|
}
|
|
6171
6188
|
),
|
|
6172
6189
|
/* @__PURE__ */ t(
|
|
@@ -6174,7 +6191,7 @@ function Yo({
|
|
|
6174
6191
|
{
|
|
6175
6192
|
"aria-hidden": "true",
|
|
6176
6193
|
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"}`,
|
|
6177
|
-
children: /* @__PURE__ */ t(
|
|
6194
|
+
children: /* @__PURE__ */ t(rc, { className: "h-[18px] w-[18px]" })
|
|
6178
6195
|
}
|
|
6179
6196
|
)
|
|
6180
6197
|
]
|
|
@@ -6192,7 +6209,7 @@ function Yo({
|
|
|
6192
6209
|
role: "img",
|
|
6193
6210
|
"aria-label": l,
|
|
6194
6211
|
className: "flex h-full w-full items-center justify-center outline-none",
|
|
6195
|
-
children: /* @__PURE__ */ t(
|
|
6212
|
+
children: /* @__PURE__ */ t(Yo, { className: "h-[18px] w-[18px]" })
|
|
6196
6213
|
}
|
|
6197
6214
|
)
|
|
6198
6215
|
}
|
|
@@ -6272,10 +6289,10 @@ function Yo({
|
|
|
6272
6289
|
F ? /* @__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
|
|
6273
6290
|
] });
|
|
6274
6291
|
}
|
|
6275
|
-
function
|
|
6292
|
+
function eo(e) {
|
|
6276
6293
|
return e == null ? "" : String(e);
|
|
6277
6294
|
}
|
|
6278
|
-
function
|
|
6295
|
+
function cu({
|
|
6279
6296
|
autoComplete: e = "email",
|
|
6280
6297
|
inputMode: r = "email",
|
|
6281
6298
|
validate: n = !0,
|
|
@@ -6288,10 +6305,10 @@ function iu({
|
|
|
6288
6305
|
...m
|
|
6289
6306
|
}) {
|
|
6290
6307
|
const [f, b] = z(
|
|
6291
|
-
() =>
|
|
6292
|
-
), p = s !== void 0 ?
|
|
6308
|
+
() => eo(c)
|
|
6309
|
+
), p = s !== void 0 ? eo(s) : f, A = n && p.length > 0 && !Uo(p) ? a : void 0;
|
|
6293
6310
|
return /* @__PURE__ */ t(
|
|
6294
|
-
|
|
6311
|
+
Xo,
|
|
6295
6312
|
{
|
|
6296
6313
|
...m,
|
|
6297
6314
|
value: s,
|
|
@@ -6307,15 +6324,15 @@ function iu({
|
|
|
6307
6324
|
}
|
|
6308
6325
|
);
|
|
6309
6326
|
}
|
|
6310
|
-
const
|
|
6327
|
+
const nc = {
|
|
6311
6328
|
sm: "min-h-[160px] p-4",
|
|
6312
6329
|
md: "min-h-[220px] p-6",
|
|
6313
6330
|
lg: "min-h-[300px] p-8"
|
|
6314
6331
|
};
|
|
6315
|
-
function
|
|
6332
|
+
function du({
|
|
6316
6333
|
title: e = "Sin resultados",
|
|
6317
6334
|
description: r,
|
|
6318
|
-
icon: n = /* @__PURE__ */ t(
|
|
6335
|
+
icon: n = /* @__PURE__ */ t(Ao, { className: "h-5 w-5" }),
|
|
6319
6336
|
action: a,
|
|
6320
6337
|
secondaryAction: i,
|
|
6321
6338
|
size: l = "md",
|
|
@@ -6324,7 +6341,7 @@ function lu({
|
|
|
6324
6341
|
return /* @__PURE__ */ t(
|
|
6325
6342
|
"div",
|
|
6326
6343
|
{
|
|
6327
|
-
className: `flex items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] text-center ${
|
|
6344
|
+
className: `flex items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] text-center ${nc[l]} ${s}`,
|
|
6328
6345
|
children: /* @__PURE__ */ o("div", { className: "flex max-w-sm flex-col items-center gap-3", children: [
|
|
6329
6346
|
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 }),
|
|
6330
6347
|
/* @__PURE__ */ o("div", { className: "space-y-1", children: [
|
|
@@ -6339,12 +6356,12 @@ function lu({
|
|
|
6339
6356
|
}
|
|
6340
6357
|
);
|
|
6341
6358
|
}
|
|
6342
|
-
const
|
|
6359
|
+
const ac = {
|
|
6343
6360
|
sm: "min-h-[112px] p-4",
|
|
6344
6361
|
md: "min-h-[148px] p-5",
|
|
6345
6362
|
lg: "min-h-[184px] p-6"
|
|
6346
6363
|
};
|
|
6347
|
-
function
|
|
6364
|
+
function oc(e) {
|
|
6348
6365
|
if (e === 0) return "0 B";
|
|
6349
6366
|
const r = ["B", "KB", "MB", "GB"], n = Math.min(
|
|
6350
6367
|
Math.floor(Math.log(e) / Math.log(1024)),
|
|
@@ -6352,16 +6369,16 @@ function rc(e) {
|
|
|
6352
6369
|
), a = e / 1024 ** n;
|
|
6353
6370
|
return `${a >= 10 || n === 0 ? a.toFixed(0) : a.toFixed(1)} ${r[n]}`;
|
|
6354
6371
|
}
|
|
6355
|
-
function
|
|
6372
|
+
function to(e, r) {
|
|
6356
6373
|
return r ? r.split(",").map((n) => n.trim().toLowerCase()).filter(Boolean).some((n) => {
|
|
6357
6374
|
const a = e.name.toLowerCase(), i = e.type.toLowerCase();
|
|
6358
6375
|
return n.startsWith(".") ? a.endsWith(n) : n.endsWith("/*") ? i.startsWith(n.slice(0, -1)) : i === n;
|
|
6359
6376
|
}) : !0;
|
|
6360
6377
|
}
|
|
6361
|
-
function
|
|
6378
|
+
function ic(e, r, n) {
|
|
6362
6379
|
return r ? n === void 0 ? e : e.slice(0, Math.max(0, n)) : e.slice(0, 1);
|
|
6363
6380
|
}
|
|
6364
|
-
function
|
|
6381
|
+
function uu({
|
|
6365
6382
|
label: e,
|
|
6366
6383
|
helperText: r,
|
|
6367
6384
|
error: n,
|
|
@@ -6391,14 +6408,14 @@ function su({
|
|
|
6391
6408
|
required: q,
|
|
6392
6409
|
...le
|
|
6393
6410
|
}) {
|
|
6394
|
-
const C =
|
|
6411
|
+
const C = No(), j = H ?? C, J = se(null), [U, ne] = z(!1), [G, E] = z(l), V = i ?? G, ae = !!n, L = p && V.length > 0 && !$, R = (K, ce) => {
|
|
6395
6412
|
i === void 0 && E(K), s == null || s(K, ce);
|
|
6396
6413
|
}, re = (K, ce) => {
|
|
6397
6414
|
const de = K.filter(
|
|
6398
|
-
(we) =>
|
|
6415
|
+
(we) => to(we, X)
|
|
6399
6416
|
), he = K.filter(
|
|
6400
|
-
(we) => !
|
|
6401
|
-
), Be = f ? [...V, ...de] : de, We =
|
|
6417
|
+
(we) => !to(we, X)
|
|
6418
|
+
), Be = f ? [...V, ...de] : de, We = ic(Be, u, m);
|
|
6402
6419
|
he.length > 0 && (c == null || c(he)), R(We, ce);
|
|
6403
6420
|
}, ee = () => {
|
|
6404
6421
|
var K;
|
|
@@ -6448,14 +6465,14 @@ function su({
|
|
|
6448
6465
|
"aria-controls": j,
|
|
6449
6466
|
"aria-disabled": $ || void 0,
|
|
6450
6467
|
"aria-invalid": ae || void 0,
|
|
6451
|
-
className: `flex cursor-pointer flex-col items-center justify-center gap-3 rounded-lg border border-dashed bg-[var(--bg-card)] text-center outline-none transition-colors focus:border-[var(--primary)] focus:bg-[var(--bg-input)] ${
|
|
6468
|
+
className: `flex cursor-pointer flex-col items-center justify-center gap-3 rounded-lg border border-dashed bg-[var(--bg-card)] text-center outline-none transition-colors focus:border-[var(--primary)] focus:bg-[var(--bg-input)] ${ac[T]} ${U ? "border-[var(--primary)] bg-[var(--bg-input)]" : ae ? "border-[var(--danger)]" : "border-[var(--border)]"} ${$ ? "cursor-not-allowed opacity-60" : "hover:border-[var(--primary)] hover:bg-[var(--bg-input)]"} ${F} ${k}`,
|
|
6452
6469
|
onClick: ee,
|
|
6453
6470
|
onDragOver: D,
|
|
6454
6471
|
onDragLeave: ue,
|
|
6455
6472
|
onDrop: Z,
|
|
6456
6473
|
onKeyDown: B,
|
|
6457
6474
|
children: [
|
|
6458
|
-
/* @__PURE__ */ t("span", { 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: /* @__PURE__ */ t(
|
|
6475
|
+
/* @__PURE__ */ t("span", { 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: /* @__PURE__ */ t(el, { className: "h-5 w-5" }) }),
|
|
6459
6476
|
/* @__PURE__ */ o("span", { className: "space-y-1", children: [
|
|
6460
6477
|
/* @__PURE__ */ t("span", { className: "block text-sm font-semibold text-[var(--text-main)]", children: U ? w : y }),
|
|
6461
6478
|
v && /* @__PURE__ */ t("span", { className: "block text-sm text-[var(--text-muted)]", children: v })
|
|
@@ -6478,7 +6495,7 @@ function su({
|
|
|
6478
6495
|
className: "inline-flex h-7 w-7 items-center justify-center rounded-md text-[var(--text-muted)] transition-colors hover:bg-[var(--bg-input)] hover:text-[var(--danger)] focus:outline-none",
|
|
6479
6496
|
"aria-label": "Quitar todos los archivos",
|
|
6480
6497
|
onClick: W,
|
|
6481
|
-
children: /* @__PURE__ */ t(
|
|
6498
|
+
children: /* @__PURE__ */ t($o, { className: "h-4 w-4" })
|
|
6482
6499
|
}
|
|
6483
6500
|
)
|
|
6484
6501
|
] }),
|
|
@@ -6487,10 +6504,10 @@ function su({
|
|
|
6487
6504
|
{
|
|
6488
6505
|
className: "flex items-center gap-3 px-3 py-2",
|
|
6489
6506
|
children: [
|
|
6490
|
-
/* @__PURE__ */ t("span", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-[var(--bg-input)] text-[var(--text-muted)]", children: /* @__PURE__ */ t(
|
|
6507
|
+
/* @__PURE__ */ t("span", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-[var(--bg-input)] text-[var(--text-muted)]", children: /* @__PURE__ */ t(tl, { className: "h-4 w-4" }) }),
|
|
6491
6508
|
/* @__PURE__ */ o("span", { className: "min-w-0 flex-1 text-left", children: [
|
|
6492
6509
|
/* @__PURE__ */ t("span", { className: "block truncate text-sm font-medium text-[var(--text-main)]", children: K.name }),
|
|
6493
|
-
/* @__PURE__ */ t("span", { className: "block text-xs text-[var(--text-muted)]", children:
|
|
6510
|
+
/* @__PURE__ */ t("span", { className: "block text-xs text-[var(--text-muted)]", children: oc(K.size) })
|
|
6494
6511
|
] }),
|
|
6495
6512
|
!$ && /* @__PURE__ */ t(
|
|
6496
6513
|
"button",
|
|
@@ -6512,7 +6529,7 @@ function su({
|
|
|
6512
6529
|
n ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: n }) : r ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--text-muted)]", children: r }) : null
|
|
6513
6530
|
] });
|
|
6514
6531
|
}
|
|
6515
|
-
const
|
|
6532
|
+
const lc = [
|
|
6516
6533
|
{ value: "texto", label: "texto" },
|
|
6517
6534
|
{ value: "numero", label: "número" },
|
|
6518
6535
|
{ value: "fecha", label: "fecha" },
|
|
@@ -6524,10 +6541,10 @@ const ac = [
|
|
|
6524
6541
|
{ value: "archivo", label: "archivo" },
|
|
6525
6542
|
{ value: "imagen", label: "imagen" }
|
|
6526
6543
|
];
|
|
6527
|
-
function
|
|
6544
|
+
function mu({
|
|
6528
6545
|
fields: e,
|
|
6529
6546
|
title: r = "Layout",
|
|
6530
|
-
fieldTypes: n =
|
|
6547
|
+
fieldTypes: n = lc,
|
|
6531
6548
|
saveLabel: a = "Guardar",
|
|
6532
6549
|
allowAddField: i = !1,
|
|
6533
6550
|
addFieldPlaceholder: l = "Nuevo campo",
|
|
@@ -6717,7 +6734,7 @@ function cu({
|
|
|
6717
6734
|
}
|
|
6718
6735
|
);
|
|
6719
6736
|
}
|
|
6720
|
-
function
|
|
6737
|
+
function sc({
|
|
6721
6738
|
label: e,
|
|
6722
6739
|
children: r,
|
|
6723
6740
|
helperText: n,
|
|
@@ -6737,14 +6754,14 @@ function oc({
|
|
|
6737
6754
|
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
|
|
6738
6755
|
] });
|
|
6739
6756
|
}
|
|
6740
|
-
function
|
|
6757
|
+
function ro(e) {
|
|
6741
6758
|
if (e !== void 0)
|
|
6742
6759
|
return typeof e == "number" ? `${e}px` : e;
|
|
6743
6760
|
}
|
|
6744
|
-
function
|
|
6761
|
+
function cc(e, r) {
|
|
6745
6762
|
return e.length !== r.length ? !1 : e.every((n, a) => n === r[a]);
|
|
6746
6763
|
}
|
|
6747
|
-
function
|
|
6764
|
+
function fu({
|
|
6748
6765
|
value: e,
|
|
6749
6766
|
onChange: r,
|
|
6750
6767
|
options: n,
|
|
@@ -6786,7 +6803,7 @@ function du({
|
|
|
6786
6803
|
});
|
|
6787
6804
|
}, [j]), L = Ce(
|
|
6788
6805
|
(D) => {
|
|
6789
|
-
|
|
6806
|
+
cc(e, D) || r(D);
|
|
6790
6807
|
},
|
|
6791
6808
|
[r, e]
|
|
6792
6809
|
), R = Ce(
|
|
@@ -7017,8 +7034,8 @@ function du({
|
|
|
7017
7034
|
onClick: () => !i && v((D) => !D),
|
|
7018
7035
|
className: "flex w-full items-center gap-2 rounded-lg text-left text-sm transition-colors focus:outline-none",
|
|
7019
7036
|
style: {
|
|
7020
|
-
minHeight:
|
|
7021
|
-
padding:
|
|
7037
|
+
minHeight: ro(c),
|
|
7038
|
+
padding: ro(u),
|
|
7022
7039
|
background: "var(--bg-input)",
|
|
7023
7040
|
color: U.length ? "var(--text-main)" : "var(--text-muted)",
|
|
7024
7041
|
border: y ? "1px solid var(--primary)" : "1px solid var(--border)",
|
|
@@ -7103,19 +7120,19 @@ function du({
|
|
|
7103
7120
|
}
|
|
7104
7121
|
);
|
|
7105
7122
|
}
|
|
7106
|
-
function
|
|
7123
|
+
function bu({
|
|
7107
7124
|
inputMode: e = "decimal",
|
|
7108
7125
|
...r
|
|
7109
7126
|
}) {
|
|
7110
|
-
return /* @__PURE__ */ t(
|
|
7127
|
+
return /* @__PURE__ */ t(Xo, { ...r, type: "number", inputMode: e });
|
|
7111
7128
|
}
|
|
7112
|
-
function
|
|
7129
|
+
function dc(e, r, n) {
|
|
7113
7130
|
const a = [], i = Math.max(2, e - n), l = Math.min(r - 1, e + n);
|
|
7114
7131
|
a.push(1), i > 2 && a.push("...");
|
|
7115
7132
|
for (let s = i; s <= l; s += 1) a.push(s);
|
|
7116
7133
|
return l < r - 1 && a.push("..."), r > 1 && a.push(r), a;
|
|
7117
7134
|
}
|
|
7118
|
-
function
|
|
7135
|
+
function pu({
|
|
7119
7136
|
page: e,
|
|
7120
7137
|
totalPages: r,
|
|
7121
7138
|
onPageChange: n,
|
|
@@ -7123,7 +7140,7 @@ function mu({
|
|
|
7123
7140
|
siblingCount: i = 1,
|
|
7124
7141
|
className: l = ""
|
|
7125
7142
|
}) {
|
|
7126
|
-
const s = Math.max(1, r), c = Math.min(Math.max(1, e), s), u =
|
|
7143
|
+
const s = Math.max(1, r), c = Math.min(Math.max(1, e), s), u = dc(c, s, i);
|
|
7127
7144
|
return /* @__PURE__ */ o(
|
|
7128
7145
|
"nav",
|
|
7129
7146
|
{
|
|
@@ -7182,7 +7199,7 @@ function mu({
|
|
|
7182
7199
|
}
|
|
7183
7200
|
);
|
|
7184
7201
|
}
|
|
7185
|
-
const
|
|
7202
|
+
const uc = [
|
|
7186
7203
|
{ value: "+1", label: "+1", sublabel: "Estados Unidos, Canada, Caribe" },
|
|
7187
7204
|
{ value: "+7", label: "+7", sublabel: "Rusia, Kazajistan" },
|
|
7188
7205
|
{ value: "+20", label: "+20", sublabel: "Egipto" },
|
|
@@ -7389,16 +7406,16 @@ const sc = [
|
|
|
7389
7406
|
{ value: "+996", label: "+996", sublabel: "Kirguistan" },
|
|
7390
7407
|
{ value: "+998", label: "+998", sublabel: "Uzbekistan" }
|
|
7391
7408
|
];
|
|
7392
|
-
function
|
|
7409
|
+
function no(e) {
|
|
7393
7410
|
return e == null ? "" : String(e);
|
|
7394
7411
|
}
|
|
7395
7412
|
function Gr(e) {
|
|
7396
7413
|
return e ? e.startsWith("+") ? e : `+${e}` : "+1";
|
|
7397
7414
|
}
|
|
7398
|
-
function
|
|
7415
|
+
function mc(e) {
|
|
7399
7416
|
return typeof e == "number" ? `${e}px` : e;
|
|
7400
7417
|
}
|
|
7401
|
-
function
|
|
7418
|
+
function hu({
|
|
7402
7419
|
autoComplete: e = "tel",
|
|
7403
7420
|
inputMode: r = "tel",
|
|
7404
7421
|
validate: n = !0,
|
|
@@ -7432,15 +7449,15 @@ function fu({
|
|
|
7432
7449
|
}) {
|
|
7433
7450
|
var K;
|
|
7434
7451
|
const [J, U] = z(
|
|
7435
|
-
() =>
|
|
7452
|
+
() => no(c)
|
|
7436
7453
|
), [ne, G] = z(
|
|
7437
7454
|
() => Gr(f)
|
|
7438
7455
|
), E = Ye(() => {
|
|
7439
|
-
const ce = A ??
|
|
7456
|
+
const ce = A ?? uc, de = p == null ? void 0 : p.map(Gr);
|
|
7440
7457
|
return de != null && de.length ? ce.filter((he) => de.includes(he.value)) : ce;
|
|
7441
7458
|
}, [p, A]), V = ((K = E[0]) == null ? void 0 : K.value) ?? "+1", ae = E.some(
|
|
7442
7459
|
(ce) => ce.value === Gr(m ?? ne)
|
|
7443
|
-
) ? Gr(m ?? ne) : V, L = s !== void 0 ?
|
|
7460
|
+
) ? Gr(m ?? ne) : V, L = s !== void 0 ? no(s) : J, R = `${ae} ${L}`.trim(), re = n && L.length > 0 && !Ko(R) ? a : void 0, ee = l ?? re, oe = !!ee, D = oe && i !== "tooltip", ue = oe && i !== "inline", Z = oe ? "border-[var(--danger)] focus-within:border-[var(--danger)]" : "border-[var(--border)] focus-within:border-[var(--primary)]", B = (ce) => {
|
|
7444
7461
|
const de = ce.currentTarget.value;
|
|
7445
7462
|
s === void 0 && U(de), N == null || N(de, {
|
|
7446
7463
|
countryCode: ae,
|
|
@@ -7466,7 +7483,7 @@ function fu({
|
|
|
7466
7483
|
role: "img",
|
|
7467
7484
|
"aria-label": C,
|
|
7468
7485
|
className: "flex h-full w-full items-center justify-center outline-none",
|
|
7469
|
-
children: /* @__PURE__ */ t(
|
|
7486
|
+
children: /* @__PURE__ */ t(Yo, { className: "h-[18px] w-[18px]" })
|
|
7470
7487
|
}
|
|
7471
7488
|
)
|
|
7472
7489
|
}
|
|
@@ -7497,7 +7514,7 @@ function fu({
|
|
|
7497
7514
|
minOptionsForSearch: 0,
|
|
7498
7515
|
dropdownMinWidth: 300,
|
|
7499
7516
|
className: `shrink-0 ${y}`,
|
|
7500
|
-
style: { width:
|
|
7517
|
+
style: { width: mc(v) },
|
|
7501
7518
|
height: 38,
|
|
7502
7519
|
padding: "0 8px 0 10px"
|
|
7503
7520
|
}
|
|
@@ -7529,7 +7546,7 @@ function fu({
|
|
|
7529
7546
|
D ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: ee }) : F ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--text-muted)]", children: F }) : null
|
|
7530
7547
|
] });
|
|
7531
7548
|
}
|
|
7532
|
-
function
|
|
7549
|
+
function vu({
|
|
7533
7550
|
value: e,
|
|
7534
7551
|
onChange: r,
|
|
7535
7552
|
options: n,
|
|
@@ -7591,10 +7608,10 @@ function bu({
|
|
|
7591
7608
|
)
|
|
7592
7609
|
] });
|
|
7593
7610
|
}
|
|
7594
|
-
const
|
|
7611
|
+
const Zo = () => '<button type="button" class="rich-img-del" data-action="delete-img" title="Eliminar imagen"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M9 2a1 1 0 0 0-.894.553L7.382 4H4a1 1 0 0 0 0 2v10a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V6a1 1 0 0 0 0-2h-3.382l-.724-1.447A1 1 0 0 0 11 2H9zm-1 6a1 1 0 1 1 2 0v4a1 1 0 1 1-2 0V8zm4 0a1 1 0 1 1 2 0v4a1 1 0 1 1-2 0V8z" clip-rule="evenodd"/></svg></button>', cr = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), Jo = (e) => e.toLocaleLowerCase().replace(
|
|
7595
7612
|
new RegExp("(^|[^\\p{L}\\p{N}])(\\p{L})", "gu"),
|
|
7596
7613
|
(r, n, a) => `${n}${a.toLocaleUpperCase()}`
|
|
7597
|
-
),
|
|
7614
|
+
), fc = (e) => e.replace(/[<>]/g, "").toLowerCase(), bc = /* @__PURE__ */ new Set([
|
|
7598
7615
|
"p",
|
|
7599
7616
|
"br",
|
|
7600
7617
|
"div",
|
|
@@ -7617,13 +7634,13 @@ const Xo = () => '<button type="button" class="rich-img-del" data-action="delete
|
|
|
7617
7634
|
"a",
|
|
7618
7635
|
"img",
|
|
7619
7636
|
"hr"
|
|
7620
|
-
]),
|
|
7637
|
+
]), pc = /^[\s\u00a0]*([•●○■▪▫◆◇►▶➢❖✓✔\-–—*])[\s\u00a0]+/, hc = (e) => {
|
|
7621
7638
|
const r = e.indexOf("<!--StartFragment-->"), n = e.indexOf("<!--EndFragment-->");
|
|
7622
7639
|
if (r !== -1 && n !== -1 && n > r)
|
|
7623
7640
|
return e.slice(r + 20, n);
|
|
7624
7641
|
const a = e.match(/<body[^>]*>([\s\S]*)<\/body>/i);
|
|
7625
7642
|
return a ? a[1] : e;
|
|
7626
|
-
}, un = (e, r) => r.test(e),
|
|
7643
|
+
}, un = (e, r) => r.test(e), vc = (e) => un(e, /font-weight\s*:\s*(bold|[6-9]00)/i), xc = (e) => un(e, /font-style\s*:\s*italic/i), gc = (e) => un(e, /text-decoration(?:-line)?\s*:[^;]*underline/i), yc = (e) => un(e, /text-decoration(?:-line)?\s*:[^;]*(line-through|linethrough)/i), Yr = (e, r) => {
|
|
7627
7644
|
var a;
|
|
7628
7645
|
if (!e.childNodes.length || e.childNodes.length === 1 && ((a = e.firstChild) == null ? void 0 : a.nodeType) === Node.ELEMENT_NODE && e.firstChild.tagName.toLowerCase() === r)
|
|
7629
7646
|
return;
|
|
@@ -7638,18 +7655,18 @@ const Xo = () => '<button type="button" class="rich-img-del" data-action="delete
|
|
|
7638
7655
|
}
|
|
7639
7656
|
for (; e.firstChild; ) r.insertBefore(e.firstChild, e);
|
|
7640
7657
|
r.removeChild(e);
|
|
7641
|
-
},
|
|
7658
|
+
}, wc = (e) => {
|
|
7642
7659
|
const r = e.getAttribute("class") ?? "", n = e.getAttribute("style") ?? "";
|
|
7643
7660
|
return /mso-list/i.test(n) || /MsoListParagraph/i.test(r) || /MsoList/i.test(r);
|
|
7644
|
-
},
|
|
7661
|
+
}, ao = (e) => {
|
|
7645
7662
|
const r = e.getAttribute("style") ?? "", n = e.textContent ?? "";
|
|
7646
7663
|
return /mso-level-number-format\s*:\s*(decimal|arabic|roman|alpha)/i.test(r) || /^\s*\d+[.)]\s/.test(n) || /^\s*[a-zA-Z][.)]\s/.test(n) ? "ol" : "ul";
|
|
7647
|
-
},
|
|
7664
|
+
}, Nc = (e) => {
|
|
7648
7665
|
const n = e.ownerDocument.createTreeWalker(e, NodeFilter.SHOW_TEXT).nextNode();
|
|
7649
7666
|
if (!n || !n.textContent) return;
|
|
7650
|
-
const a = n.textContent.replace(
|
|
7667
|
+
const a = n.textContent.replace(pc, "").replace(/^\s*\d+[.)]\s+/, "").replace(/^\s*[a-zA-Z][.)]\s+/, "");
|
|
7651
7668
|
a !== n.textContent && (n.textContent = a);
|
|
7652
|
-
},
|
|
7669
|
+
}, kc = (e) => {
|
|
7653
7670
|
const r = Array.from(
|
|
7654
7671
|
e.querySelectorAll("span, font, p, div, li, h1, h2, h3, h4")
|
|
7655
7672
|
);
|
|
@@ -7657,20 +7674,20 @@ const Xo = () => '<button type="button" class="rich-img-del" data-action="delete
|
|
|
7657
7674
|
(n, a) => a.querySelectorAll("*").length - n.querySelectorAll("*").length
|
|
7658
7675
|
), r.forEach((n) => {
|
|
7659
7676
|
const a = n.getAttribute("style") ?? "";
|
|
7660
|
-
a && (
|
|
7677
|
+
a && (vc(a) && Yr(n, "strong"), xc(a) && Yr(n, "em"), gc(a) && Yr(n, "u"), yc(a) && Yr(n, "s"));
|
|
7661
7678
|
});
|
|
7662
|
-
},
|
|
7679
|
+
}, Cc = (e) => {
|
|
7663
7680
|
const r = Array.from(
|
|
7664
7681
|
e.querySelectorAll("p, div")
|
|
7665
|
-
).filter(
|
|
7682
|
+
).filter(wc);
|
|
7666
7683
|
if (!r.length) return;
|
|
7667
7684
|
let n = 0;
|
|
7668
7685
|
for (; n < r.length; ) {
|
|
7669
|
-
const a = r[n], i =
|
|
7686
|
+
const a = r[n], i = ao(a), l = [a];
|
|
7670
7687
|
let s = n + 1;
|
|
7671
7688
|
for (; s < r.length; ) {
|
|
7672
7689
|
const m = r[s];
|
|
7673
|
-
if (
|
|
7690
|
+
if (ao(m) !== i) break;
|
|
7674
7691
|
let f = l[l.length - 1].nextSibling;
|
|
7675
7692
|
for (; f && f.nodeType === Node.TEXT_NODE && !(f.textContent ?? "").trim(); )
|
|
7676
7693
|
f = f.nextSibling;
|
|
@@ -7684,14 +7701,14 @@ const Xo = () => '<button type="button" class="rich-img-del" data-action="delete
|
|
|
7684
7701
|
}
|
|
7685
7702
|
const u = a.ownerDocument.createElement(i);
|
|
7686
7703
|
c.insertBefore(u, a), l.forEach((m) => {
|
|
7687
|
-
|
|
7704
|
+
Nc(m);
|
|
7688
7705
|
const f = m.ownerDocument.createElement("li");
|
|
7689
7706
|
for (; m.firstChild; ) f.appendChild(m.firstChild);
|
|
7690
7707
|
u.appendChild(f), m.remove();
|
|
7691
7708
|
}), n = s;
|
|
7692
7709
|
}
|
|
7693
|
-
},
|
|
7694
|
-
const r =
|
|
7710
|
+
}, Sc = (e) => e === "h1" ? "h2" : e === "h4" || e === "h5" || e === "h6" ? "h3" : e === "div" ? "p" : e, Ec = (e) => {
|
|
7711
|
+
const r = hc(
|
|
7695
7712
|
e.replace(/<!--\[if[\s\S]*?<!\[endif\]-->/gi, "").replace(/<xml[\s\S]*?<\/xml>/gi, "").replace(/<style[\s\S]*?<\/style>/gi, "").replace(/<\/?o:[^>]*>/gi, "").replace(/<\/?w:[^>]*>/gi, "").replace(/<\/?m:[^>]*>/gi, "")
|
|
7696
7713
|
), i = new DOMParser().parseFromString(
|
|
7697
7714
|
`<!DOCTYPE html><html><body>${r}</body></html>`,
|
|
@@ -7699,7 +7716,7 @@ const Xo = () => '<button type="button" class="rich-img-del" data-action="delete
|
|
|
7699
7716
|
).body;
|
|
7700
7717
|
i.querySelectorAll(
|
|
7701
7718
|
"script, style, meta, link, xml, title, head, iframe, object, embed, form, input, button, textarea, select, noscript"
|
|
7702
|
-
).forEach((s) => s.remove()),
|
|
7719
|
+
).forEach((s) => s.remove()), kc(i), Cc(i);
|
|
7703
7720
|
const l = (s) => {
|
|
7704
7721
|
const c = Array.from(s.childNodes);
|
|
7705
7722
|
if (s.nodeType === Node.ELEMENT_NODE) {
|
|
@@ -7712,11 +7729,11 @@ const Xo = () => '<button type="button" class="rich-img-del" data-action="delete
|
|
|
7712
7729
|
Xr(u), c.forEach(l);
|
|
7713
7730
|
return;
|
|
7714
7731
|
}
|
|
7715
|
-
if (!
|
|
7732
|
+
if (!bc.has(m)) {
|
|
7716
7733
|
Xr(u), c.forEach(l);
|
|
7717
7734
|
return;
|
|
7718
7735
|
}
|
|
7719
|
-
const f =
|
|
7736
|
+
const f = Sc(m);
|
|
7720
7737
|
if (f !== m) {
|
|
7721
7738
|
const b = u.ownerDocument.createElement(f);
|
|
7722
7739
|
for (; u.firstChild; ) b.appendChild(u.firstChild);
|
|
@@ -7779,15 +7796,15 @@ const Xo = () => '<button type="button" class="rich-img-del" data-action="delete
|
|
|
7779
7796
|
}
|
|
7780
7797
|
}), i.innerHTML.replace(/<!--[\s\S]*?-->/g, "").replace(/ /gi, " ").replace(/(<br\s*\/?>\s*){3,}/gi, "<br><br>").replace(/<p>(?:\s|<br\s*\/?>)*<\/p>/gi, "").trim();
|
|
7781
7798
|
}, Fn = (e) => cr(e).replace(/\r\n?/g, `
|
|
7782
|
-
`).split(/\n{2,}/).map((r) => `<p>${r.replace(/\n/g, "<br>") || "<br>"}</p>`).join(""),
|
|
7799
|
+
`).split(/\n{2,}/).map((r) => `<p>${r.replace(/\n/g, "<br>") || "<br>"}</p>`).join(""), $c = (e) => new RegExp("\\p{L}", "u").test(e), _n = (e, r) => {
|
|
7783
7800
|
const n = e.trim();
|
|
7784
|
-
return !n ||
|
|
7785
|
-
},
|
|
7801
|
+
return !n || !$c(n) ? !1 : r === "uppercase" ? n === n.toLocaleUpperCase() : r === "lowercase" ? n === n.toLocaleLowerCase() : n === Jo(n);
|
|
7802
|
+
}, oo = (e) => {
|
|
7786
7803
|
const r = (a) => {
|
|
7787
7804
|
var i, l;
|
|
7788
7805
|
if (!a.closest(".rich-img-wrap")) {
|
|
7789
7806
|
const s = document.createElement("span");
|
|
7790
|
-
s.className = "rich-img-wrap", s.contentEditable = "false", (i = a.parentNode) == null || i.insertBefore(s, a), s.appendChild(a), s.insertAdjacentHTML("beforeend",
|
|
7807
|
+
s.className = "rich-img-wrap", s.contentEditable = "false", (i = a.parentNode) == null || i.insertBefore(s, a), s.appendChild(a), s.insertAdjacentHTML("beforeend", Zo());
|
|
7791
7808
|
}
|
|
7792
7809
|
(l = a.closest(".rich-img-wrap")) == null || l.classList.add("rich-img-broken");
|
|
7793
7810
|
};
|
|
@@ -7810,7 +7827,7 @@ const Xo = () => '<button type="button" class="rich-img-del" data-action="delete
|
|
|
7810
7827
|
};
|
|
7811
7828
|
return e.addEventListener("error", n, !0), () => e.removeEventListener("error", n, !0);
|
|
7812
7829
|
};
|
|
7813
|
-
function
|
|
7830
|
+
function xu({
|
|
7814
7831
|
value: e,
|
|
7815
7832
|
onChange: r,
|
|
7816
7833
|
placeholder: n = "Escribe algo...",
|
|
@@ -7846,7 +7863,7 @@ function pu({
|
|
|
7846
7863
|
_.forEach((Y) => {
|
|
7847
7864
|
Y.innerHTML !== P && (Y.innerHTML = P);
|
|
7848
7865
|
}), w(!P || P.trim() === "");
|
|
7849
|
-
const me = _.map((Y) =>
|
|
7866
|
+
const me = _.map((Y) => oo(Y));
|
|
7850
7867
|
return () => me.forEach((Y) => Y());
|
|
7851
7868
|
}, [e]), ie(() => {
|
|
7852
7869
|
var Y, ke;
|
|
@@ -7862,7 +7879,7 @@ function pu({
|
|
|
7862
7879
|
_ = requestAnimationFrame($e);
|
|
7863
7880
|
return;
|
|
7864
7881
|
}
|
|
7865
|
-
xe.innerHTML !== f.current && (xe.innerHTML = f.current), P =
|
|
7882
|
+
xe.innerHTML !== f.current && (xe.innerHTML = f.current), P = oo(xe), w(((Oe = xe.textContent) == null ? void 0 : Oe.trim()) === ""), me = setTimeout(() => xe.focus(), 60);
|
|
7866
7883
|
};
|
|
7867
7884
|
_ = requestAnimationFrame($e);
|
|
7868
7885
|
} else {
|
|
@@ -7894,7 +7911,7 @@ function pu({
|
|
|
7894
7911
|
}
|
|
7895
7912
|
});
|
|
7896
7913
|
try {
|
|
7897
|
-
const Y =
|
|
7914
|
+
const Y = fc(
|
|
7898
7915
|
i().queryCommandValue("formatBlock")
|
|
7899
7916
|
);
|
|
7900
7917
|
Y && _.add(`formatBlock:${Y}`);
|
|
@@ -7944,7 +7961,7 @@ function pu({
|
|
|
7944
7961
|
!1,
|
|
7945
7962
|
`<a href="${cr(x.trim())}" target="_blank" rel="noopener noreferrer" class="rich-link">${cr(me)}</a>`
|
|
7946
7963
|
), ne(), T(null);
|
|
7947
|
-
}, oe = (P, _ = "") => `<span class="rich-img-wrap" contenteditable="false"><img src="${cr(P)}" alt="${cr(_)}" class="rich-img" />${
|
|
7964
|
+
}, oe = (P, _ = "") => `<span class="rich-img-wrap" contenteditable="false"><img src="${cr(P)}" alt="${cr(_)}" class="rich-img" />${Zo()}</span>`, D = () => {
|
|
7948
7965
|
var P;
|
|
7949
7966
|
H.trim() && (R(), (P = j()) == null || P.focus(), i().execCommand(
|
|
7950
7967
|
"insertHTML",
|
|
@@ -8000,7 +8017,7 @@ function pu({
|
|
|
8000
8017
|
if (ke || pe) {
|
|
8001
8018
|
me.preventDefault(), me.stopPropagation();
|
|
8002
8019
|
try {
|
|
8003
|
-
const Le = ke ?
|
|
8020
|
+
const Le = ke ? Ec(ke) : Fn(pe);
|
|
8004
8021
|
if (!Le) {
|
|
8005
8022
|
pe && B.current(Fn(pe));
|
|
8006
8023
|
return;
|
|
@@ -8053,7 +8070,7 @@ function pu({
|
|
|
8053
8070
|
const ke = Y.toString();
|
|
8054
8071
|
if (!ke) return;
|
|
8055
8072
|
let pe = ke;
|
|
8056
|
-
P === "uppercase" ? pe = ke.toLocaleUpperCase() : P === "lowercase" ? pe = ke.toLocaleLowerCase() : pe =
|
|
8073
|
+
P === "uppercase" ? pe = ke.toLocaleUpperCase() : P === "lowercase" ? pe = ke.toLocaleLowerCase() : pe = Jo(ke), Y.deleteContents();
|
|
8057
8074
|
const $e = document.createTextNode(pe);
|
|
8058
8075
|
Y.insertNode($e);
|
|
8059
8076
|
const xe = document.createRange();
|
|
@@ -8252,12 +8269,12 @@ function pu({
|
|
|
8252
8269
|
style: { borderColor: "var(--border)", background: _ },
|
|
8253
8270
|
children: [
|
|
8254
8271
|
be(
|
|
8255
|
-
/* @__PURE__ */ t(
|
|
8272
|
+
/* @__PURE__ */ t(il, { className: "h-4 w-4" }),
|
|
8256
8273
|
"Deshacer",
|
|
8257
8274
|
"undo"
|
|
8258
8275
|
),
|
|
8259
8276
|
be(
|
|
8260
|
-
/* @__PURE__ */ t(
|
|
8277
|
+
/* @__PURE__ */ t(ll, { className: "h-4 w-4" }),
|
|
8261
8278
|
"Rehacer",
|
|
8262
8279
|
"redo"
|
|
8263
8280
|
),
|
|
@@ -8270,14 +8287,14 @@ function pu({
|
|
|
8270
8287
|
y.has("formatBlock:p") || y.has("formatBlock:div")
|
|
8271
8288
|
),
|
|
8272
8289
|
be(
|
|
8273
|
-
/* @__PURE__ */ t(
|
|
8290
|
+
/* @__PURE__ */ t(rl, { className: "h-4 w-4" }),
|
|
8274
8291
|
"Titulo 2",
|
|
8275
8292
|
"__h2",
|
|
8276
8293
|
() => V("h2"),
|
|
8277
8294
|
y.has("formatBlock:h2")
|
|
8278
8295
|
),
|
|
8279
8296
|
be(
|
|
8280
|
-
/* @__PURE__ */ t(
|
|
8297
|
+
/* @__PURE__ */ t(nl, { className: "h-4 w-4" }),
|
|
8281
8298
|
"Titulo 3",
|
|
8282
8299
|
"__h3",
|
|
8283
8300
|
() => V("h3"),
|
|
@@ -8302,38 +8319,38 @@ function pu({
|
|
|
8302
8319
|
"insertUnorderedList"
|
|
8303
8320
|
),
|
|
8304
8321
|
be(
|
|
8305
|
-
/* @__PURE__ */ t(
|
|
8322
|
+
/* @__PURE__ */ t(sl, { className: "h-4 w-4" }),
|
|
8306
8323
|
"Lista numerada",
|
|
8307
8324
|
"insertOrderedList"
|
|
8308
8325
|
),
|
|
8309
8326
|
be(
|
|
8310
|
-
/* @__PURE__ */ t(
|
|
8327
|
+
/* @__PURE__ */ t(cl, { className: "h-4 w-4" }),
|
|
8311
8328
|
"Disminuir sangria",
|
|
8312
8329
|
"outdent"
|
|
8313
8330
|
),
|
|
8314
8331
|
be(
|
|
8315
|
-
/* @__PURE__ */ t(
|
|
8332
|
+
/* @__PURE__ */ t(dl, { className: "h-4 w-4" }),
|
|
8316
8333
|
"Aumentar sangria",
|
|
8317
8334
|
"indent"
|
|
8318
8335
|
),
|
|
8319
8336
|
Se(),
|
|
8320
8337
|
be(
|
|
8321
|
-
/* @__PURE__ */ t(
|
|
8338
|
+
/* @__PURE__ */ t(ul, { className: "h-4 w-4" }),
|
|
8322
8339
|
"Alinear izquierda",
|
|
8323
8340
|
"justifyLeft"
|
|
8324
8341
|
),
|
|
8325
8342
|
be(
|
|
8326
|
-
/* @__PURE__ */ t(
|
|
8343
|
+
/* @__PURE__ */ t(ml, { className: "h-4 w-4" }),
|
|
8327
8344
|
"Centrar",
|
|
8328
8345
|
"justifyCenter"
|
|
8329
8346
|
),
|
|
8330
8347
|
be(
|
|
8331
|
-
/* @__PURE__ */ t(
|
|
8348
|
+
/* @__PURE__ */ t(fl, { className: "h-4 w-4" }),
|
|
8332
8349
|
"Alinear derecha",
|
|
8333
8350
|
"justifyRight"
|
|
8334
8351
|
),
|
|
8335
8352
|
be(
|
|
8336
|
-
/* @__PURE__ */ t(
|
|
8353
|
+
/* @__PURE__ */ t(Mo, { className: "h-4 w-4" }),
|
|
8337
8354
|
"Justificar",
|
|
8338
8355
|
"justifyFull"
|
|
8339
8356
|
),
|
|
@@ -8358,36 +8375,36 @@ function pu({
|
|
|
8358
8375
|
),
|
|
8359
8376
|
Se(),
|
|
8360
8377
|
be(
|
|
8361
|
-
/* @__PURE__ */ t(
|
|
8378
|
+
/* @__PURE__ */ t(Co, { className: "h-4 w-4" }),
|
|
8362
8379
|
"Insertar enlace (Ctrl+K)",
|
|
8363
8380
|
"__link",
|
|
8364
8381
|
() => re("link")
|
|
8365
8382
|
),
|
|
8366
8383
|
be(
|
|
8367
|
-
/* @__PURE__ */ t(
|
|
8384
|
+
/* @__PURE__ */ t(bl, { className: "h-4 w-4" }),
|
|
8368
8385
|
"Quitar enlace",
|
|
8369
8386
|
"unlink"
|
|
8370
8387
|
),
|
|
8371
8388
|
be(
|
|
8372
|
-
/* @__PURE__ */ t(
|
|
8389
|
+
/* @__PURE__ */ t(pl, { className: "h-4 w-4" }),
|
|
8373
8390
|
"Insertar imagen",
|
|
8374
8391
|
"__img",
|
|
8375
8392
|
() => re("image")
|
|
8376
8393
|
),
|
|
8377
8394
|
be(
|
|
8378
|
-
/* @__PURE__ */ t(
|
|
8395
|
+
/* @__PURE__ */ t(So, { className: "h-4 w-4" }),
|
|
8379
8396
|
"Insertar separador",
|
|
8380
8397
|
"__divider",
|
|
8381
8398
|
ae
|
|
8382
8399
|
),
|
|
8383
8400
|
Se(),
|
|
8384
8401
|
be(
|
|
8385
|
-
/* @__PURE__ */ t(
|
|
8402
|
+
/* @__PURE__ */ t(hl, { className: "h-4 w-4" }),
|
|
8386
8403
|
"Limpiar formato",
|
|
8387
8404
|
"removeFormat"
|
|
8388
8405
|
),
|
|
8389
8406
|
be(
|
|
8390
|
-
/* @__PURE__ */ t(
|
|
8407
|
+
/* @__PURE__ */ t(vl, { className: "h-4 w-4" }),
|
|
8391
8408
|
"Quitar bloque",
|
|
8392
8409
|
"__clearBlock",
|
|
8393
8410
|
() => V("p")
|
|
@@ -8404,7 +8421,7 @@ function pu({
|
|
|
8404
8421
|
},
|
|
8405
8422
|
className: "flex h-7 w-7 items-center justify-center rounded transition-colors",
|
|
8406
8423
|
style: { color: "var(--text-secondary)" },
|
|
8407
|
-
children: P ? /* @__PURE__ */ t(
|
|
8424
|
+
children: P ? /* @__PURE__ */ t(al, { className: "h-4 w-4" }) : /* @__PURE__ */ t(ol, { className: "h-4 w-4" })
|
|
8408
8425
|
}
|
|
8409
8426
|
)
|
|
8410
8427
|
]
|
|
@@ -8447,7 +8464,7 @@ function pu({
|
|
|
8447
8464
|
}
|
|
8448
8465
|
),
|
|
8449
8466
|
/* @__PURE__ */ o(
|
|
8450
|
-
|
|
8467
|
+
jo,
|
|
8451
8468
|
{
|
|
8452
8469
|
open: le,
|
|
8453
8470
|
onClose: () => C(!1),
|
|
@@ -8486,7 +8503,7 @@ function pu({
|
|
|
8486
8503
|
)
|
|
8487
8504
|
] });
|
|
8488
8505
|
}
|
|
8489
|
-
function
|
|
8506
|
+
function gu({
|
|
8490
8507
|
title: e,
|
|
8491
8508
|
subtitle: r,
|
|
8492
8509
|
icon: n,
|
|
@@ -8518,7 +8535,7 @@ function hu({
|
|
|
8518
8535
|
}
|
|
8519
8536
|
);
|
|
8520
8537
|
}
|
|
8521
|
-
const
|
|
8538
|
+
const Lc = {
|
|
8522
8539
|
neutral: {
|
|
8523
8540
|
text: "var(--text-secondary)",
|
|
8524
8541
|
bg: "var(--bg-input)",
|
|
@@ -8549,12 +8566,12 @@ const Sc = {
|
|
|
8549
8566
|
bg: "rgba(59, 130, 246, 0.11)",
|
|
8550
8567
|
border: "rgba(59, 130, 246, 0.24)"
|
|
8551
8568
|
}
|
|
8552
|
-
},
|
|
8569
|
+
}, Ac = {
|
|
8553
8570
|
xs: "min-h-5 px-1.5 text-[10px]",
|
|
8554
8571
|
sm: "min-h-6 px-2 text-xs",
|
|
8555
8572
|
md: "min-h-7 px-2.5 text-sm"
|
|
8556
8573
|
};
|
|
8557
|
-
function
|
|
8574
|
+
function yu({
|
|
8558
8575
|
children: e,
|
|
8559
8576
|
tone: r = "neutral",
|
|
8560
8577
|
size: n = "sm",
|
|
@@ -8562,11 +8579,11 @@ function vu({
|
|
|
8562
8579
|
dot: i = !1,
|
|
8563
8580
|
className: l = ""
|
|
8564
8581
|
}) {
|
|
8565
|
-
const s =
|
|
8582
|
+
const s = Lc[r];
|
|
8566
8583
|
return /* @__PURE__ */ o(
|
|
8567
8584
|
"span",
|
|
8568
8585
|
{
|
|
8569
|
-
className: `inline-flex max-w-full shrink-0 items-center gap-1.5 rounded-full border font-semibold leading-none ${
|
|
8586
|
+
className: `inline-flex max-w-full shrink-0 items-center gap-1.5 rounded-full border font-semibold leading-none ${Ac[n]} ${l}`,
|
|
8570
8587
|
style: {
|
|
8571
8588
|
color: s.text,
|
|
8572
8589
|
background: s.bg,
|
|
@@ -8587,7 +8604,7 @@ function vu({
|
|
|
8587
8604
|
}
|
|
8588
8605
|
);
|
|
8589
8606
|
}
|
|
8590
|
-
const
|
|
8607
|
+
const io = {
|
|
8591
8608
|
neutral: {
|
|
8592
8609
|
color: "var(--text-secondary)",
|
|
8593
8610
|
background: "var(--bg-input)"
|
|
@@ -8612,24 +8629,24 @@ const oo = {
|
|
|
8612
8629
|
color: "#2563eb",
|
|
8613
8630
|
background: "rgba(59, 130, 246, 0.11)"
|
|
8614
8631
|
}
|
|
8615
|
-
},
|
|
8632
|
+
}, Mc = {
|
|
8616
8633
|
xs: "min-h-5 px-1.5 pr-6 text-[10px]",
|
|
8617
8634
|
sm: "min-h-6 px-2 pr-7 text-xs",
|
|
8618
8635
|
md: "min-h-7 px-2.5 pr-8 text-sm"
|
|
8619
|
-
},
|
|
8636
|
+
}, Tc = {
|
|
8620
8637
|
xs: "right-1 h-3 w-3",
|
|
8621
8638
|
sm: "right-1.5 h-3 w-3",
|
|
8622
8639
|
md: "right-2 h-3.5 w-3.5"
|
|
8623
|
-
},
|
|
8640
|
+
}, Dc = {
|
|
8624
8641
|
xs: 148,
|
|
8625
8642
|
sm: 164,
|
|
8626
8643
|
md: 184
|
|
8627
|
-
},
|
|
8644
|
+
}, Bc = {
|
|
8628
8645
|
xs: "px-2.5 py-1.5 text-xs",
|
|
8629
8646
|
sm: "px-3 py-2 text-sm",
|
|
8630
8647
|
md: "px-3.5 py-2.5 text-sm"
|
|
8631
8648
|
};
|
|
8632
|
-
function
|
|
8649
|
+
function wu({
|
|
8633
8650
|
value: e,
|
|
8634
8651
|
options: r,
|
|
8635
8652
|
onChange: n,
|
|
@@ -8646,7 +8663,7 @@ function xu({
|
|
|
8646
8663
|
spinnerClassName: A
|
|
8647
8664
|
}) {
|
|
8648
8665
|
const [w, y] = z(!1), [v, N] = z(!1), [T, x] = z(-1), [F, S] = z({}), k = se(null), H = se(null), X = se(null), $ = r.find((E) => E.value === e) ?? r[0], q = {
|
|
8649
|
-
...$ != null && $.tone ?
|
|
8666
|
+
...$ != null && $.tone ? io[$.tone] : void 0,
|
|
8650
8667
|
...$ == null ? void 0 : $.style
|
|
8651
8668
|
}, le = i || l || r.length === 0, C = (E) => {
|
|
8652
8669
|
s && E.stopPropagation();
|
|
@@ -8655,7 +8672,7 @@ function xu({
|
|
|
8655
8672
|
}, []), J = Ce(() => {
|
|
8656
8673
|
const E = k.current;
|
|
8657
8674
|
if (!E) return;
|
|
8658
|
-
const V = E.getBoundingClientRect(), ae = Math.max(V.width,
|
|
8675
|
+
const V = E.getBoundingClientRect(), ae = Math.max(V.width, Dc[a]), L = Math.min(Math.max(r.length, 1) * 38 + 12, 260), R = window.innerHeight - V.bottom, re = R < L && V.top > R, ee = Math.min(
|
|
8659
8676
|
Math.max(8, V.left + V.width / 2 - ae / 2),
|
|
8660
8677
|
window.innerWidth - ae - 8
|
|
8661
8678
|
);
|
|
@@ -8752,7 +8769,7 @@ function xu({
|
|
|
8752
8769
|
},
|
|
8753
8770
|
children: r.map((E, V) => {
|
|
8754
8771
|
const ae = E.value === e, L = V === T, R = {
|
|
8755
|
-
...E.tone ?
|
|
8772
|
+
...E.tone ? io[E.tone] : void 0,
|
|
8756
8773
|
...E.style
|
|
8757
8774
|
};
|
|
8758
8775
|
return /* @__PURE__ */ o(
|
|
@@ -8768,7 +8785,7 @@ function xu({
|
|
|
8768
8785
|
},
|
|
8769
8786
|
className: kt(
|
|
8770
8787
|
"flex w-full items-center gap-2 rounded-lg font-medium text-left transition-colors disabled:cursor-not-allowed disabled:opacity-45",
|
|
8771
|
-
|
|
8788
|
+
Bc[a],
|
|
8772
8789
|
ae ? E.className : void 0,
|
|
8773
8790
|
p
|
|
8774
8791
|
),
|
|
@@ -8810,7 +8827,7 @@ function xu({
|
|
|
8810
8827
|
onClick: () => !le && y((E) => !E),
|
|
8811
8828
|
className: kt(
|
|
8812
8829
|
"inline-flex items-center rounded-full border border-transparent font-medium leading-none outline-none transition-colors hover:border-current focus:border-current disabled:cursor-wait disabled:opacity-70",
|
|
8813
|
-
|
|
8830
|
+
Mc[a],
|
|
8814
8831
|
$ == null ? void 0 : $.className,
|
|
8815
8832
|
f
|
|
8816
8833
|
),
|
|
@@ -8824,7 +8841,7 @@ function xu({
|
|
|
8824
8841
|
"aria-hidden": "true",
|
|
8825
8842
|
className: kt(
|
|
8826
8843
|
"pointer-events-none absolute opacity-70 transition-transform",
|
|
8827
|
-
|
|
8844
|
+
Tc[a],
|
|
8828
8845
|
w ? "rotate-180" : "rotate-0"
|
|
8829
8846
|
)
|
|
8830
8847
|
}
|
|
@@ -8844,7 +8861,7 @@ function xu({
|
|
|
8844
8861
|
}
|
|
8845
8862
|
);
|
|
8846
8863
|
}
|
|
8847
|
-
function
|
|
8864
|
+
function Nu({
|
|
8848
8865
|
tabs: e,
|
|
8849
8866
|
activeTabId: r,
|
|
8850
8867
|
defaultActiveTabId: n,
|
|
@@ -8920,7 +8937,7 @@ function gu({
|
|
|
8920
8937
|
function pt(...e) {
|
|
8921
8938
|
return e.filter(Boolean).join(" ");
|
|
8922
8939
|
}
|
|
8923
|
-
function
|
|
8940
|
+
function ku({
|
|
8924
8941
|
steps: e,
|
|
8925
8942
|
activeStepId: r,
|
|
8926
8943
|
initialStepId: n,
|
|
@@ -9064,7 +9081,7 @@ function yu({
|
|
|
9064
9081
|
!K && !W && ce && "border-[var(--border)] text-[var(--text-muted)]",
|
|
9065
9082
|
!ce && "border-[var(--border)] text-[var(--text-muted)]"
|
|
9066
9083
|
),
|
|
9067
|
-
children: K ? /* @__PURE__ */ t(Ge, { className: "h-4 w-4" }) : ce ? M + 1 : /* @__PURE__ */ t(
|
|
9084
|
+
children: K ? /* @__PURE__ */ t(Ge, { className: "h-4 w-4" }) : ce ? M + 1 : /* @__PURE__ */ t(xl, { className: "h-3.5 w-3.5" })
|
|
9068
9085
|
}
|
|
9069
9086
|
),
|
|
9070
9087
|
/* @__PURE__ */ o("span", { className: "min-w-0 flex-1", children: [
|
|
@@ -9158,17 +9175,17 @@ function yu({
|
|
|
9158
9175
|
}
|
|
9159
9176
|
);
|
|
9160
9177
|
}
|
|
9161
|
-
const
|
|
9178
|
+
const Ic = {
|
|
9162
9179
|
sm: "min-h-20 px-2.5 py-1.5 text-xs leading-5",
|
|
9163
9180
|
md: "min-h-24 px-2.5 py-2 text-sm leading-5",
|
|
9164
9181
|
lg: "min-h-32 px-3 py-2.5 text-sm leading-6"
|
|
9165
|
-
},
|
|
9182
|
+
}, Oc = {
|
|
9166
9183
|
none: "resize-none",
|
|
9167
9184
|
vertical: "resize-y",
|
|
9168
9185
|
horizontal: "resize-x",
|
|
9169
9186
|
both: "resize"
|
|
9170
9187
|
};
|
|
9171
|
-
function
|
|
9188
|
+
function Rc(e, r) {
|
|
9172
9189
|
if (e) {
|
|
9173
9190
|
if (typeof e == "function") {
|
|
9174
9191
|
e(r);
|
|
@@ -9177,10 +9194,10 @@ function Bc(e, r) {
|
|
|
9177
9194
|
e.current = r;
|
|
9178
9195
|
}
|
|
9179
9196
|
}
|
|
9180
|
-
function
|
|
9197
|
+
function Pc(e, r) {
|
|
9181
9198
|
return e !== void 0 ? String(e).length : r !== void 0 ? String(r).length : 0;
|
|
9182
9199
|
}
|
|
9183
|
-
const
|
|
9200
|
+
const zc = wo(
|
|
9184
9201
|
function({
|
|
9185
9202
|
className: r = "",
|
|
9186
9203
|
wrapperClassName: n = "",
|
|
@@ -9201,7 +9218,7 @@ const Oc = yo(
|
|
|
9201
9218
|
onInput: N,
|
|
9202
9219
|
...T
|
|
9203
9220
|
}, x) {
|
|
9204
|
-
const F = se(null), S =
|
|
9221
|
+
const F = se(null), S = Pc(w, y), k = m ?? v, H = !!(b || p || u), X = f === "error" ? "var(--danger)" : f === "success" ? "#16a34a" : "var(--border)", $ = {
|
|
9205
9222
|
...A ?? {},
|
|
9206
9223
|
...s ? { minHeight: `${s * 24 + 18}px` } : null,
|
|
9207
9224
|
...c ? { maxHeight: `${c * 24 + 18}px` } : null
|
|
@@ -9215,7 +9232,7 @@ const Oc = yo(
|
|
|
9215
9232
|
{
|
|
9216
9233
|
...T,
|
|
9217
9234
|
ref: (C) => {
|
|
9218
|
-
F.current = C,
|
|
9235
|
+
F.current = C, Rc(x, C);
|
|
9219
9236
|
},
|
|
9220
9237
|
value: w,
|
|
9221
9238
|
defaultValue: y,
|
|
@@ -9225,7 +9242,7 @@ const Oc = yo(
|
|
|
9225
9242
|
q(), N == null || N(C);
|
|
9226
9243
|
},
|
|
9227
9244
|
style: { ...$, borderColor: X },
|
|
9228
|
-
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 ${
|
|
9245
|
+
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 ${Ic[a]} ${Oc[l ? "none" : i]} ${b ? "pl-8" : ""} ${p ? "pr-10" : ""} ${r}`
|
|
9229
9246
|
}
|
|
9230
9247
|
);
|
|
9231
9248
|
return H ? /* @__PURE__ */ o("span", { className: `relative block ${n}`, children: [
|
|
@@ -9239,7 +9256,7 @@ const Oc = yo(
|
|
|
9239
9256
|
] }) : le;
|
|
9240
9257
|
}
|
|
9241
9258
|
);
|
|
9242
|
-
function
|
|
9259
|
+
function Cu({
|
|
9243
9260
|
label: e,
|
|
9244
9261
|
containerClassName: r = "",
|
|
9245
9262
|
helperText: n,
|
|
@@ -9251,7 +9268,7 @@ function wu({
|
|
|
9251
9268
|
...u
|
|
9252
9269
|
}) {
|
|
9253
9270
|
return /* @__PURE__ */ t(
|
|
9254
|
-
|
|
9271
|
+
sc,
|
|
9255
9272
|
{
|
|
9256
9273
|
label: e,
|
|
9257
9274
|
required: l,
|
|
@@ -9260,7 +9277,7 @@ function wu({
|
|
|
9260
9277
|
labelAction: i,
|
|
9261
9278
|
className: r,
|
|
9262
9279
|
children: /* @__PURE__ */ t(
|
|
9263
|
-
|
|
9280
|
+
zc,
|
|
9264
9281
|
{
|
|
9265
9282
|
...u,
|
|
9266
9283
|
required: l,
|
|
@@ -9271,7 +9288,7 @@ function wu({
|
|
|
9271
9288
|
}
|
|
9272
9289
|
);
|
|
9273
9290
|
}
|
|
9274
|
-
const
|
|
9291
|
+
const lo = [
|
|
9275
9292
|
{ bg: "#dbeafe", text: "#1e40af", border: "#bfdbfe" },
|
|
9276
9293
|
// blue
|
|
9277
9294
|
{ bg: "#dcfce7", text: "#166534", border: "#bbf7d0" },
|
|
@@ -9289,30 +9306,30 @@ const io = [
|
|
|
9289
9306
|
{ bg: "#f0fdf4", text: "#14532d", border: "#bbf7d0" }
|
|
9290
9307
|
// emerald
|
|
9291
9308
|
];
|
|
9292
|
-
function
|
|
9293
|
-
return
|
|
9309
|
+
function Fc(e) {
|
|
9310
|
+
return lo[e % lo.length];
|
|
9294
9311
|
}
|
|
9295
|
-
let
|
|
9312
|
+
let _c = 0;
|
|
9296
9313
|
function Hn() {
|
|
9297
|
-
return ++
|
|
9314
|
+
return ++_c;
|
|
9298
9315
|
}
|
|
9299
|
-
function
|
|
9316
|
+
function so(e, r) {
|
|
9300
9317
|
return r ? r instanceof RegExp ? r.test(e) : r(e) : !0;
|
|
9301
9318
|
}
|
|
9302
|
-
function
|
|
9319
|
+
function Hc(e) {
|
|
9303
9320
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
9304
9321
|
}
|
|
9305
|
-
function
|
|
9322
|
+
function jc(e, r) {
|
|
9306
9323
|
const n = r.filter(Boolean);
|
|
9307
9324
|
if (n.length === 0)
|
|
9308
9325
|
return [e.trim()].filter(Boolean);
|
|
9309
9326
|
const a = new RegExp(
|
|
9310
|
-
`${n.map((i) =>
|
|
9327
|
+
`${n.map((i) => Hc(i)).join("|")}|\\r?\\n`,
|
|
9311
9328
|
"g"
|
|
9312
9329
|
);
|
|
9313
9330
|
return e.split(a).map((i) => i.trim()).filter(Boolean);
|
|
9314
9331
|
}
|
|
9315
|
-
function
|
|
9332
|
+
function Su({
|
|
9316
9333
|
value: e,
|
|
9317
9334
|
defaultValue: r,
|
|
9318
9335
|
onChange: n,
|
|
@@ -9361,7 +9378,7 @@ function Nu({
|
|
|
9361
9378
|
ce = !0;
|
|
9362
9379
|
continue;
|
|
9363
9380
|
}
|
|
9364
|
-
if (!
|
|
9381
|
+
if (!so(he, m)) {
|
|
9365
9382
|
ce = !0;
|
|
9366
9383
|
continue;
|
|
9367
9384
|
}
|
|
@@ -9389,7 +9406,7 @@ function Nu({
|
|
|
9389
9406
|
if (!(!u && N.some(
|
|
9390
9407
|
(ce) => ce.id !== M && ce.value.toLowerCase() === K.toLowerCase()
|
|
9391
9408
|
))) {
|
|
9392
|
-
if (!
|
|
9409
|
+
if (!so(K, m)) {
|
|
9393
9410
|
ne();
|
|
9394
9411
|
return;
|
|
9395
9412
|
}
|
|
@@ -9436,7 +9453,7 @@ function Nu({
|
|
|
9436
9453
|
if (!W || !(s.some((he) => he && W.includes(he)) || W.includes(`
|
|
9437
9454
|
`))) return;
|
|
9438
9455
|
M.preventDefault();
|
|
9439
|
-
const ce =
|
|
9456
|
+
const ce = jc(W, s);
|
|
9440
9457
|
E(ce) && x("");
|
|
9441
9458
|
}
|
|
9442
9459
|
function ue() {
|
|
@@ -9477,7 +9494,7 @@ function Nu({
|
|
|
9477
9494
|
}
|
|
9478
9495
|
` }),
|
|
9479
9496
|
N.map((M) => {
|
|
9480
|
-
const W =
|
|
9497
|
+
const W = Fc(M.colorIndex);
|
|
9481
9498
|
return F === M.id ? (
|
|
9482
9499
|
/* ── Inline edit ── */
|
|
9483
9500
|
/* @__PURE__ */ t(
|
|
@@ -9518,7 +9535,7 @@ function Nu({
|
|
|
9518
9535
|
K.stopPropagation(), R(M);
|
|
9519
9536
|
},
|
|
9520
9537
|
className: "flex h-4 w-4 flex-shrink-0 items-center justify-center rounded opacity-60 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none",
|
|
9521
|
-
children: /* @__PURE__ */ t(
|
|
9538
|
+
children: /* @__PURE__ */ t(Lo, { className: "h-3 w-3" })
|
|
9522
9539
|
}
|
|
9523
9540
|
),
|
|
9524
9541
|
/* @__PURE__ */ t(
|
|
@@ -9560,7 +9577,7 @@ function Nu({
|
|
|
9560
9577
|
U ? /* @__PURE__ */ t("span", { className: "text-xs font-medium text-[var(--danger)]", children: p }) : b ? /* @__PURE__ */ t("span", { className: "text-xs font-medium text-[var(--text-muted)]", children: b }) : null
|
|
9561
9578
|
] });
|
|
9562
9579
|
}
|
|
9563
|
-
const
|
|
9580
|
+
const Wc = {
|
|
9564
9581
|
xs: {
|
|
9565
9582
|
width: 28,
|
|
9566
9583
|
height: 16,
|
|
@@ -9574,7 +9591,7 @@ const _c = {
|
|
|
9574
9591
|
padding: 2
|
|
9575
9592
|
}
|
|
9576
9593
|
};
|
|
9577
|
-
function
|
|
9594
|
+
function Eu({
|
|
9578
9595
|
checked: e,
|
|
9579
9596
|
disabled: r,
|
|
9580
9597
|
onCheckedChange: n,
|
|
@@ -9582,7 +9599,7 @@ function ku({
|
|
|
9582
9599
|
className: i = "",
|
|
9583
9600
|
...l
|
|
9584
9601
|
}) {
|
|
9585
|
-
const s =
|
|
9602
|
+
const s = Wc[a], c = e ? s.width - s.thumb - s.padding * 2 : 0;
|
|
9586
9603
|
return /* @__PURE__ */ t(
|
|
9587
9604
|
"button",
|
|
9588
9605
|
{
|
|
@@ -9616,13 +9633,13 @@ function ku({
|
|
|
9616
9633
|
}
|
|
9617
9634
|
);
|
|
9618
9635
|
}
|
|
9619
|
-
const
|
|
9636
|
+
const co = [
|
|
9620
9637
|
".sidebar-scroll",
|
|
9621
9638
|
".app-scroll",
|
|
9622
9639
|
".showcase-nav-scroll",
|
|
9623
9640
|
"[data-overlay-scroll='true']"
|
|
9624
9641
|
].join(",");
|
|
9625
|
-
function
|
|
9642
|
+
function qc(e) {
|
|
9626
9643
|
if (!(e instanceof HTMLElement) || e.dataset.overlayScroll === "false" || e.closest("[data-overlayscrollbars]") || e.matches("textarea,input,select,[contenteditable='true']"))
|
|
9627
9644
|
return !1;
|
|
9628
9645
|
const r = window.getComputedStyle(e);
|
|
@@ -9632,33 +9649,33 @@ function Hc(e) {
|
|
|
9632
9649
|
r.overflowY
|
|
9633
9650
|
].join(" ").match(/auto|scroll/) || e.clientWidth === 0 && e.clientHeight === 0);
|
|
9634
9651
|
}
|
|
9635
|
-
function
|
|
9652
|
+
function Qo(e) {
|
|
9636
9653
|
return e.classList.contains("sidebar-scroll") || e.classList.contains("showcase-nav-scroll");
|
|
9637
9654
|
}
|
|
9638
|
-
function
|
|
9639
|
-
|
|
9655
|
+
function uo(e) {
|
|
9656
|
+
Qo(e) && e.querySelectorAll(".os-scrollbar-horizontal").forEach((r) => {
|
|
9640
9657
|
r.style.display = "none", r.style.height = "0", r.style.pointerEvents = "none";
|
|
9641
9658
|
});
|
|
9642
9659
|
}
|
|
9643
|
-
function
|
|
9660
|
+
function Uc() {
|
|
9644
9661
|
return ie(() => {
|
|
9645
9662
|
const e = /* @__PURE__ */ new WeakMap();
|
|
9646
9663
|
let r = 0;
|
|
9647
9664
|
const n = () => {
|
|
9648
|
-
r = 0, document.querySelectorAll(
|
|
9649
|
-
if (!
|
|
9665
|
+
r = 0, document.querySelectorAll(co).forEach((l) => {
|
|
9666
|
+
if (!qc(l)) return;
|
|
9650
9667
|
if (Ha(l)) {
|
|
9651
|
-
|
|
9668
|
+
uo(l);
|
|
9652
9669
|
return;
|
|
9653
9670
|
}
|
|
9654
9671
|
const c = Ha(l, {
|
|
9655
|
-
overflow:
|
|
9672
|
+
overflow: Qo(l) ? { x: "hidden", y: "scroll" } : void 0,
|
|
9656
9673
|
scrollbars: {
|
|
9657
9674
|
autoHide: "leave",
|
|
9658
9675
|
autoHideDelay: 180
|
|
9659
9676
|
}
|
|
9660
9677
|
});
|
|
9661
|
-
|
|
9678
|
+
uo(l), e.set(l, c);
|
|
9662
9679
|
});
|
|
9663
9680
|
}, a = () => {
|
|
9664
9681
|
r || (r = window.requestAnimationFrame(n));
|
|
@@ -9671,20 +9688,20 @@ function jc() {
|
|
|
9671
9688
|
attributes: !0,
|
|
9672
9689
|
attributeFilter: ["class", "data-overlay-scroll"]
|
|
9673
9690
|
}), window.addEventListener("resize", a), () => {
|
|
9674
|
-
r && window.cancelAnimationFrame(r), i.disconnect(), window.removeEventListener("resize", a), document.querySelectorAll(
|
|
9691
|
+
r && window.cancelAnimationFrame(r), i.disconnect(), window.removeEventListener("resize", a), document.querySelectorAll(co).forEach((l) => {
|
|
9675
9692
|
var s;
|
|
9676
9693
|
l instanceof HTMLElement && ((s = e.get(l)) == null || s.destroy());
|
|
9677
9694
|
});
|
|
9678
9695
|
};
|
|
9679
9696
|
}, []), null;
|
|
9680
9697
|
}
|
|
9681
|
-
const jn = "primeSuiteAppUrl",
|
|
9698
|
+
const jn = "primeSuiteAppUrl", Kc = {
|
|
9682
9699
|
xs: { wh: "w-5 h-5", text: "text-[8px]" },
|
|
9683
9700
|
sm: { wh: "w-7 h-7", text: "text-[11px]" },
|
|
9684
9701
|
md: { wh: "w-9 h-9", text: "text-sm" },
|
|
9685
9702
|
lg: { wh: "w-12 h-12", text: "text-base" },
|
|
9686
9703
|
xl: { wh: "w-16 h-16", text: "text-xl" }
|
|
9687
|
-
},
|
|
9704
|
+
}, mo = [
|
|
9688
9705
|
"bg-indigo-500",
|
|
9689
9706
|
"bg-blue-500",
|
|
9690
9707
|
"bg-emerald-500",
|
|
@@ -9693,19 +9710,19 @@ const jn = "primeSuiteAppUrl", Wc = {
|
|
|
9693
9710
|
"bg-teal-500",
|
|
9694
9711
|
"bg-rose-500",
|
|
9695
9712
|
"bg-cyan-500"
|
|
9696
|
-
],
|
|
9713
|
+
], Vc = {
|
|
9697
9714
|
xs: "text-xs",
|
|
9698
9715
|
sm: "text-sm",
|
|
9699
9716
|
md: "text-base",
|
|
9700
9717
|
lg: "text-lg"
|
|
9701
|
-
},
|
|
9718
|
+
}, Gc = "bonsaif.bot", Yc = "Bonsaif Bot", Xc = {
|
|
9702
9719
|
xs: "p-0.5",
|
|
9703
9720
|
sm: "p-1",
|
|
9704
9721
|
md: "p-1.5",
|
|
9705
9722
|
lg: "p-2",
|
|
9706
9723
|
xl: "p-2.5"
|
|
9707
9724
|
};
|
|
9708
|
-
function
|
|
9725
|
+
function fo(e) {
|
|
9709
9726
|
return typeof e == "string" ? e.trim() : "";
|
|
9710
9727
|
}
|
|
9711
9728
|
function St(e) {
|
|
@@ -9720,7 +9737,7 @@ function Wn(e) {
|
|
|
9720
9737
|
return "";
|
|
9721
9738
|
}
|
|
9722
9739
|
}
|
|
9723
|
-
function
|
|
9740
|
+
function Zc(e) {
|
|
9724
9741
|
const r = St(e);
|
|
9725
9742
|
if (!r) return "";
|
|
9726
9743
|
const n = r.match(/^\/apps\/[^/]+/i);
|
|
@@ -9738,7 +9755,7 @@ function Gc(e) {
|
|
|
9738
9755
|
"api"
|
|
9739
9756
|
])).has(a[0].toLowerCase()) ? "" : St(`/${a[0]}`);
|
|
9740
9757
|
}
|
|
9741
|
-
function
|
|
9758
|
+
function Jc() {
|
|
9742
9759
|
var a;
|
|
9743
9760
|
const e = St(
|
|
9744
9761
|
typeof process < "u" && ((a = process.env) == null ? void 0 : a.NEXT_PUBLIC_BASE_PATH) || ""
|
|
@@ -9764,24 +9781,24 @@ function Yc() {
|
|
|
9764
9781
|
const i = n.startsWith("http") ? Wn(n) : St(n);
|
|
9765
9782
|
if (i) return i;
|
|
9766
9783
|
}
|
|
9767
|
-
return
|
|
9784
|
+
return Zc(window.location.pathname);
|
|
9768
9785
|
}
|
|
9769
|
-
function
|
|
9786
|
+
function Qc(e) {
|
|
9770
9787
|
const r = e.split(/\s+/).map((n) => n.trim()).filter(Boolean);
|
|
9771
9788
|
return r.length === 0 ? "?" : r.length === 1 ? r[0].slice(0, 1).toUpperCase() : `${r[0].slice(0, 1)}${r[1].slice(0, 1)}`.toUpperCase();
|
|
9772
9789
|
}
|
|
9773
|
-
function
|
|
9790
|
+
function ed(e) {
|
|
9774
9791
|
let r = 0;
|
|
9775
9792
|
for (const n of e) r = r * 31 + n.charCodeAt(0) & 65535;
|
|
9776
|
-
return
|
|
9793
|
+
return mo[r % mo.length];
|
|
9777
9794
|
}
|
|
9778
|
-
function
|
|
9779
|
-
return e ===
|
|
9795
|
+
function td(e, r) {
|
|
9796
|
+
return e === Gc || r === Yc;
|
|
9780
9797
|
}
|
|
9781
|
-
function
|
|
9798
|
+
function rd(e, r) {
|
|
9782
9799
|
return `${e.replace(/\/$/, "")}${r}`;
|
|
9783
9800
|
}
|
|
9784
|
-
function
|
|
9801
|
+
function nd({
|
|
9785
9802
|
userId: e,
|
|
9786
9803
|
username: r,
|
|
9787
9804
|
name: n,
|
|
@@ -9801,7 +9818,7 @@ function ed({
|
|
|
9801
9818
|
ie(() => {
|
|
9802
9819
|
y(!1);
|
|
9803
9820
|
}, [v, b]);
|
|
9804
|
-
const { wh: N, text: T } =
|
|
9821
|
+
const { wh: N, text: T } = Kc[a], x = fo(n) || fo(r) || c, F = Qc(x), S = Jc(), k = td(r, n), H = rd(S, "/favicon.svg"), X = {
|
|
9805
9822
|
xs: 20,
|
|
9806
9823
|
sm: 28,
|
|
9807
9824
|
md: 36,
|
|
@@ -9816,7 +9833,7 @@ function ed({
|
|
|
9816
9833
|
}, [b, S, v, a]), q = X[a], le = k ? /* @__PURE__ */ t(
|
|
9817
9834
|
"span",
|
|
9818
9835
|
{
|
|
9819
|
-
className: `${N} ${
|
|
9836
|
+
className: `${N} ${Xc[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 ${p}`,
|
|
9820
9837
|
style: A,
|
|
9821
9838
|
children: /* @__PURE__ */ t(
|
|
9822
9839
|
"img",
|
|
@@ -9846,7 +9863,7 @@ function ed({
|
|
|
9846
9863
|
) : /* @__PURE__ */ t(
|
|
9847
9864
|
"span",
|
|
9848
9865
|
{
|
|
9849
|
-
className: `${N} ${
|
|
9866
|
+
className: `${N} ${ed(x)} ${T} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${p}`,
|
|
9850
9867
|
style: A,
|
|
9851
9868
|
title: x,
|
|
9852
9869
|
children: F
|
|
@@ -9862,7 +9879,7 @@ function ed({
|
|
|
9862
9879
|
/* @__PURE__ */ t(
|
|
9863
9880
|
"span",
|
|
9864
9881
|
{
|
|
9865
|
-
className: `min-w-0 truncate ${
|
|
9882
|
+
className: `min-w-0 truncate ${Vc[f]} font-medium text-[var(--text-main)] ${m}`,
|
|
9866
9883
|
title: x,
|
|
9867
9884
|
children: x
|
|
9868
9885
|
}
|
|
@@ -9881,16 +9898,16 @@ function ed({
|
|
|
9881
9898
|
}
|
|
9882
9899
|
) : le;
|
|
9883
9900
|
}
|
|
9884
|
-
function
|
|
9901
|
+
function ad({ href: e, className: r, children: n }) {
|
|
9885
9902
|
return /* @__PURE__ */ t("a", { href: e, className: r, children: n });
|
|
9886
9903
|
}
|
|
9887
|
-
function
|
|
9904
|
+
function od(e) {
|
|
9888
9905
|
return e.reduce((r, n) => {
|
|
9889
9906
|
const a = n.section ?? "Principal";
|
|
9890
9907
|
return r[a] = [...r[a] ?? [], n], r;
|
|
9891
9908
|
}, {});
|
|
9892
9909
|
}
|
|
9893
|
-
function
|
|
9910
|
+
function id({
|
|
9894
9911
|
children: e,
|
|
9895
9912
|
navItems: r = [],
|
|
9896
9913
|
currentPath: n = typeof window > "u" ? "/" : window.location.pathname,
|
|
@@ -9900,11 +9917,11 @@ function nd({
|
|
|
9900
9917
|
header: s,
|
|
9901
9918
|
footer: c,
|
|
9902
9919
|
onLogout: u,
|
|
9903
|
-
LinkComponent: m =
|
|
9920
|
+
LinkComponent: m = ad
|
|
9904
9921
|
}) {
|
|
9905
|
-
const [f, b] = z(!1), p =
|
|
9922
|
+
const [f, b] = z(!1), p = od(r);
|
|
9906
9923
|
return /* @__PURE__ */ o("div", { className: "min-h-screen bg-[var(--bg-main)] text-[var(--text-main)]", children: [
|
|
9907
|
-
/* @__PURE__ */ t(
|
|
9924
|
+
/* @__PURE__ */ t(Uc, {}),
|
|
9908
9925
|
/* @__PURE__ */ t(
|
|
9909
9926
|
"button",
|
|
9910
9927
|
{
|
|
@@ -9912,7 +9929,7 @@ function nd({
|
|
|
9912
9929
|
"aria-label": "Abrir navegación",
|
|
9913
9930
|
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",
|
|
9914
9931
|
onClick: () => b(!0),
|
|
9915
|
-
children: /* @__PURE__ */ t(
|
|
9932
|
+
children: /* @__PURE__ */ t(Mo, { className: "h-5 w-5" })
|
|
9916
9933
|
}
|
|
9917
9934
|
),
|
|
9918
9935
|
f && /* @__PURE__ */ t(
|
|
@@ -9974,7 +9991,7 @@ function nd({
|
|
|
9974
9991
|
/* @__PURE__ */ o("div", { className: "border-t border-white/10 p-3", children: [
|
|
9975
9992
|
a && /* @__PURE__ */ o("div", { className: "mb-3 flex min-w-0 items-center gap-3 rounded-lg bg-white/[0.04] p-2", children: [
|
|
9976
9993
|
/* @__PURE__ */ t(
|
|
9977
|
-
|
|
9994
|
+
nd,
|
|
9978
9995
|
{
|
|
9979
9996
|
name: a.initials ?? a.name ?? a.email ?? "Usuario",
|
|
9980
9997
|
size: "md"
|
|
@@ -9992,7 +10009,7 @@ function nd({
|
|
|
9992
10009
|
className: "w-full justify-start text-white hover:bg-white/10",
|
|
9993
10010
|
onClick: u,
|
|
9994
10011
|
children: [
|
|
9995
|
-
/* @__PURE__ */ t(
|
|
10012
|
+
/* @__PURE__ */ t(gl, { className: "h-4 w-4" }),
|
|
9996
10013
|
" Salir"
|
|
9997
10014
|
]
|
|
9998
10015
|
}
|
|
@@ -10008,7 +10025,7 @@ function nd({
|
|
|
10008
10025
|
] })
|
|
10009
10026
|
] });
|
|
10010
10027
|
}
|
|
10011
|
-
const
|
|
10028
|
+
const bo = "bonsaif-ui:prime-auth-sso", ld = {
|
|
10012
10029
|
dashboard: "Dashboard",
|
|
10013
10030
|
tickets: "Tickets",
|
|
10014
10031
|
teams: "Equipos",
|
|
@@ -10032,16 +10049,16 @@ const fo = "bonsaif-ui:prime-auth-sso", ad = {
|
|
|
10032
10049
|
"security-incidents": "Incidentes",
|
|
10033
10050
|
"guard-schedule": "Guardias"
|
|
10034
10051
|
}, qn = {
|
|
10035
|
-
dashboard: /* @__PURE__ */ t(
|
|
10036
|
-
tickets: /* @__PURE__ */ t(
|
|
10052
|
+
dashboard: /* @__PURE__ */ t($l, { className: "h-5 w-5" }),
|
|
10053
|
+
tickets: /* @__PURE__ */ t(El, { className: "h-5 w-5" }),
|
|
10037
10054
|
teams: /* @__PURE__ */ t(_a, { className: "h-5 w-5" }),
|
|
10038
|
-
projects: /* @__PURE__ */ t(
|
|
10039
|
-
clients: /* @__PURE__ */ t(
|
|
10040
|
-
surveys: /* @__PURE__ */ t(
|
|
10041
|
-
profile: /* @__PURE__ */ t(
|
|
10055
|
+
projects: /* @__PURE__ */ t(Sl, { className: "h-5 w-5" }),
|
|
10056
|
+
clients: /* @__PURE__ */ t(Cl, { className: "h-5 w-5" }),
|
|
10057
|
+
surveys: /* @__PURE__ */ t(kl, { className: "h-5 w-5" }),
|
|
10058
|
+
profile: /* @__PURE__ */ t(Nl, { className: "h-5 w-5" }),
|
|
10042
10059
|
settings: /* @__PURE__ */ t(en, { className: "h-5 w-5" }),
|
|
10043
|
-
notifications: /* @__PURE__ */ t(
|
|
10044
|
-
changelog: /* @__PURE__ */ t(
|
|
10060
|
+
notifications: /* @__PURE__ */ t(wl, { className: "h-5 w-5" }),
|
|
10061
|
+
changelog: /* @__PURE__ */ t(Eo, { className: "h-5 w-5" }),
|
|
10045
10062
|
admin: /* @__PURE__ */ t(Bn, { className: "h-5 w-5" }),
|
|
10046
10063
|
users: /* @__PURE__ */ t(_a, { className: "h-5 w-5" }),
|
|
10047
10064
|
roles: /* @__PURE__ */ t(Bn, { className: "h-5 w-5" }),
|
|
@@ -10049,22 +10066,22 @@ const fo = "bonsaif-ui:prime-auth-sso", ad = {
|
|
|
10049
10066
|
guards: /* @__PURE__ */ t(Yn, { className: "h-5 w-5" }),
|
|
10050
10067
|
vacations: /* @__PURE__ */ t(Yn, { className: "h-5 w-5" }),
|
|
10051
10068
|
audit: /* @__PURE__ */ t(Xn, { className: "h-5 w-5" }),
|
|
10052
|
-
positions: /* @__PURE__ */ t(
|
|
10069
|
+
positions: /* @__PURE__ */ t(yl, { className: "h-5 w-5" }),
|
|
10053
10070
|
ranks: /* @__PURE__ */ t(Xn, { className: "h-5 w-5" }),
|
|
10054
|
-
"email-inbox": /* @__PURE__ */ t(
|
|
10071
|
+
"email-inbox": /* @__PURE__ */ t(Ao, { className: "h-5 w-5" }),
|
|
10055
10072
|
"security-incidents": /* @__PURE__ */ t(Bn, { className: "h-5 w-5" })
|
|
10056
10073
|
};
|
|
10057
|
-
function
|
|
10074
|
+
function sd(e) {
|
|
10058
10075
|
return e.split("-").map((r) => r.charAt(0).toUpperCase() + r.slice(1)).join(" ");
|
|
10059
10076
|
}
|
|
10060
|
-
function
|
|
10077
|
+
function cd(e) {
|
|
10061
10078
|
return /^\d+$/.test(e) || /^[a-f0-9]{8,}$/i.test(e);
|
|
10062
10079
|
}
|
|
10063
|
-
function
|
|
10080
|
+
function dd(e) {
|
|
10064
10081
|
const r = e.split("/").filter(Boolean);
|
|
10065
10082
|
if (r.length === 0 || r.length === 1 && r[0] === "dashboard")
|
|
10066
10083
|
return [];
|
|
10067
|
-
const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, i =
|
|
10084
|
+
const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, i = cd(n) && a ? a : n, l = ld[i] ?? sd(i);
|
|
10068
10085
|
return [{ label: "Inicio", href: "/" }, { label: l }];
|
|
10069
10086
|
}
|
|
10070
10087
|
function Un(e) {
|
|
@@ -10072,32 +10089,32 @@ function Un(e) {
|
|
|
10072
10089
|
":scope > [data-overlayscrollbars-viewport]"
|
|
10073
10090
|
));
|
|
10074
10091
|
}
|
|
10075
|
-
function
|
|
10092
|
+
function ud(e) {
|
|
10076
10093
|
const r = e.split("/").filter(Boolean), n = r[r.length - 1];
|
|
10077
10094
|
if (!n) return /* @__PURE__ */ t(tn, { className: "h-5 w-5" });
|
|
10078
10095
|
if (qn[n]) return qn[n];
|
|
10079
10096
|
const a = r.length > 1 ? r[r.length - 2] : "";
|
|
10080
10097
|
return qn[a] ?? /* @__PURE__ */ t(tn, { className: "h-5 w-5" });
|
|
10081
10098
|
}
|
|
10082
|
-
function
|
|
10099
|
+
function md(e) {
|
|
10083
10100
|
return e.includes("primeAuthOrigin") || e.includes("primeAuthProjectKey");
|
|
10084
10101
|
}
|
|
10085
|
-
function
|
|
10102
|
+
function po() {
|
|
10086
10103
|
if (typeof window > "u") return !1;
|
|
10087
|
-
if (
|
|
10104
|
+
if (md(window.location.href)) {
|
|
10088
10105
|
try {
|
|
10089
|
-
window.sessionStorage.setItem(
|
|
10106
|
+
window.sessionStorage.setItem(bo, "true");
|
|
10090
10107
|
} catch {
|
|
10091
10108
|
}
|
|
10092
10109
|
return !0;
|
|
10093
10110
|
}
|
|
10094
10111
|
try {
|
|
10095
|
-
return window.sessionStorage.getItem(
|
|
10112
|
+
return window.sessionStorage.getItem(bo) === "true";
|
|
10096
10113
|
} catch {
|
|
10097
10114
|
return !1;
|
|
10098
10115
|
}
|
|
10099
10116
|
}
|
|
10100
|
-
function
|
|
10117
|
+
function $u({
|
|
10101
10118
|
title: e,
|
|
10102
10119
|
subtitle: r,
|
|
10103
10120
|
action: n,
|
|
@@ -10110,11 +10127,11 @@ function Cu({
|
|
|
10110
10127
|
showBreadcrumbs: m = !0,
|
|
10111
10128
|
contained: f = !1
|
|
10112
10129
|
}) {
|
|
10113
|
-
const b = se(null), [p, A] = z(!1), [w, y] = z(u ?? "/"), [v, N] = z(() =>
|
|
10130
|
+
const b = se(null), [p, A] = z(!1), [w, y] = z(u ?? "/"), [v, N] = z(() => po()), [T, x] = z(null), F = u ?? w, S = c ?? dd(F), k = i ?? ud(F), H = m && !v && S.length > 1, X = !H;
|
|
10114
10131
|
ie(() => {
|
|
10115
10132
|
u || y(window.location.pathname);
|
|
10116
10133
|
}, [u]), ie(() => {
|
|
10117
|
-
N(
|
|
10134
|
+
N(po());
|
|
10118
10135
|
}, []), ie(() => {
|
|
10119
10136
|
if (f) {
|
|
10120
10137
|
A(!1);
|
|
@@ -10258,7 +10275,7 @@ function Cu({
|
|
|
10258
10275
|
{
|
|
10259
10276
|
className: `page-header-actions ml-auto flex max-w-full flex-shrink-0 flex-wrap items-center justify-end self-center overflow-visible transition-[gap,min-height,opacity,transform] duration-300 ease-out ${p ? "min-h-9 gap-1 opacity-95" : "min-h-9 gap-1.5 opacity-100"}`,
|
|
10260
10277
|
children: /* @__PURE__ */ t(
|
|
10261
|
-
|
|
10278
|
+
Io.Provider,
|
|
10262
10279
|
{
|
|
10263
10280
|
value: { compact: !0, headerAction: !0 },
|
|
10264
10281
|
children: n
|
|
@@ -10272,20 +10289,20 @@ function Cu({
|
|
|
10272
10289
|
}
|
|
10273
10290
|
);
|
|
10274
10291
|
}
|
|
10275
|
-
function
|
|
10292
|
+
function Lu({
|
|
10276
10293
|
children: e,
|
|
10277
10294
|
currentPath: r = typeof window > "u" ? "/" : window.location.pathname,
|
|
10278
10295
|
publicRoutes: n = ["/", "/login", "/reset-password"],
|
|
10279
10296
|
...a
|
|
10280
10297
|
}) {
|
|
10281
|
-
return n.includes(r) ? /* @__PURE__ */ t(Re, { children: e }) : /* @__PURE__ */ t(
|
|
10298
|
+
return n.includes(r) ? /* @__PURE__ */ t(Re, { children: e }) : /* @__PURE__ */ t(id, { currentPath: r, ...a, children: e });
|
|
10282
10299
|
}
|
|
10283
|
-
function
|
|
10300
|
+
function ho() {
|
|
10284
10301
|
if (typeof window > "u") return "system";
|
|
10285
10302
|
const e = localStorage.getItem("theme");
|
|
10286
10303
|
return e === "light" || e === "dark" ? e : e === "system" ? "system" : document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
10287
10304
|
}
|
|
10288
|
-
function
|
|
10305
|
+
function fd(e, r, n) {
|
|
10289
10306
|
try {
|
|
10290
10307
|
const a = new URL(e), i = a.searchParams.get("callbackUrl");
|
|
10291
10308
|
if (i) {
|
|
@@ -10300,16 +10317,16 @@ function dd(e, r, n) {
|
|
|
10300
10317
|
return e;
|
|
10301
10318
|
}
|
|
10302
10319
|
}
|
|
10303
|
-
function
|
|
10320
|
+
function Au({
|
|
10304
10321
|
name: e,
|
|
10305
10322
|
src: r,
|
|
10306
10323
|
projectKey: n
|
|
10307
10324
|
}) {
|
|
10308
10325
|
const [a, i] = z("system"), l = se(null);
|
|
10309
10326
|
ie(() => {
|
|
10310
|
-
i(
|
|
10327
|
+
i(ho());
|
|
10311
10328
|
const u = new MutationObserver(
|
|
10312
|
-
() => i(
|
|
10329
|
+
() => i(ho())
|
|
10313
10330
|
);
|
|
10314
10331
|
return u.observe(document.documentElement, {
|
|
10315
10332
|
attributes: !0,
|
|
@@ -10317,7 +10334,7 @@ function Eu({
|
|
|
10317
10334
|
}), () => u.disconnect();
|
|
10318
10335
|
}, []);
|
|
10319
10336
|
const s = Ye(
|
|
10320
|
-
() =>
|
|
10337
|
+
() => fd(r, a, n),
|
|
10321
10338
|
[n, r, a]
|
|
10322
10339
|
), c = Ye(() => {
|
|
10323
10340
|
try {
|
|
@@ -10368,7 +10385,7 @@ function Eu({
|
|
|
10368
10385
|
}
|
|
10369
10386
|
) });
|
|
10370
10387
|
}
|
|
10371
|
-
function
|
|
10388
|
+
function Mu() {
|
|
10372
10389
|
const [e, r] = z(""), [n, a] = z(!1), [i, l] = z({ width: 96, height: 96 });
|
|
10373
10390
|
return ie(() => {
|
|
10374
10391
|
let s = !1;
|
|
@@ -10384,8 +10401,8 @@ function $u() {
|
|
|
10384
10401
|
if (((m = c.data) == null ? void 0 : m.type) !== "prime-suite-chat:state") return;
|
|
10385
10402
|
const u = !!c.data.active;
|
|
10386
10403
|
a(u), l({
|
|
10387
|
-
width:
|
|
10388
|
-
height:
|
|
10404
|
+
width: vo(c.data.width, 96, 720),
|
|
10405
|
+
height: vo(c.data.height, 96, 560)
|
|
10389
10406
|
});
|
|
10390
10407
|
};
|
|
10391
10408
|
return window.addEventListener("message", s), () => window.removeEventListener("message", s);
|
|
@@ -10406,11 +10423,11 @@ function $u() {
|
|
|
10406
10423
|
}
|
|
10407
10424
|
) : null;
|
|
10408
10425
|
}
|
|
10409
|
-
function
|
|
10426
|
+
function vo(e, r, n) {
|
|
10410
10427
|
const a = typeof e == "number" && Number.isFinite(e) ? e : r;
|
|
10411
10428
|
return Math.max(r, Math.min(n, Math.ceil(a)));
|
|
10412
10429
|
}
|
|
10413
|
-
function
|
|
10430
|
+
function bd(e) {
|
|
10414
10431
|
const r = document.documentElement, n = new MutationObserver(e);
|
|
10415
10432
|
n.observe(r, { attributes: !0, attributeFilter: ["class"] });
|
|
10416
10433
|
const a = window.matchMedia("(prefers-color-scheme: dark)");
|
|
@@ -10418,24 +10435,24 @@ function ud(e) {
|
|
|
10418
10435
|
n.disconnect(), a.removeEventListener("change", e);
|
|
10419
10436
|
};
|
|
10420
10437
|
}
|
|
10421
|
-
function
|
|
10438
|
+
function pd() {
|
|
10422
10439
|
const e = localStorage.getItem("theme") || "system", r = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
10423
10440
|
return document.documentElement.classList.contains("dark") || e === "dark" || e === "system" && r ? "dark" : "light";
|
|
10424
10441
|
}
|
|
10425
|
-
function
|
|
10442
|
+
function hd() {
|
|
10426
10443
|
return "light";
|
|
10427
10444
|
}
|
|
10428
|
-
function
|
|
10445
|
+
function Tu({
|
|
10429
10446
|
position: e = "bottom-center"
|
|
10430
10447
|
}) {
|
|
10431
|
-
const r =
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10448
|
+
const r = Ui(
|
|
10449
|
+
bd,
|
|
10450
|
+
pd,
|
|
10451
|
+
hd
|
|
10435
10452
|
);
|
|
10436
|
-
return /* @__PURE__ */ t(
|
|
10453
|
+
return /* @__PURE__ */ t(Rl, { position: e, theme: r, richColors: !0, closeButton: !0 });
|
|
10437
10454
|
}
|
|
10438
|
-
function
|
|
10455
|
+
function Du({
|
|
10439
10456
|
title: e,
|
|
10440
10457
|
subtitle: r,
|
|
10441
10458
|
actions: n,
|
|
@@ -10484,7 +10501,7 @@ const ea = [
|
|
|
10484
10501
|
"#60a5fa",
|
|
10485
10502
|
"#94a3b8"
|
|
10486
10503
|
];
|
|
10487
|
-
function
|
|
10504
|
+
function vd(e, r) {
|
|
10488
10505
|
return e.color ?? ea[r % ea.length];
|
|
10489
10506
|
}
|
|
10490
10507
|
function ft(e = "primary") {
|
|
@@ -10536,7 +10553,7 @@ function sr(e, r = 1) {
|
|
|
10536
10553
|
const c = l >= 100 ? l.toFixed(0) : l.toFixed(r);
|
|
10537
10554
|
return `${n}${c.replace(/\.0$/, "")} ${i[s]}`;
|
|
10538
10555
|
}
|
|
10539
|
-
function
|
|
10556
|
+
function xd(e, r = "bytes", n = 1) {
|
|
10540
10557
|
if (!Number.isFinite(e)) return "—";
|
|
10541
10558
|
const a = e < 0 ? "-" : "", i = Math.abs(e), l = r === "bits" ? ["b/s", "Kb/s", "Mb/s", "Gb/s", "Tb/s"] : ["B/s", "KB/s", "MB/s", "GB/s", "TB/s"];
|
|
10542
10559
|
if (i < 1024) return `${a}${Math.round(i)} ${l[0]}`;
|
|
@@ -10587,19 +10604,19 @@ function Ze({
|
|
|
10587
10604
|
}
|
|
10588
10605
|
);
|
|
10589
10606
|
}
|
|
10590
|
-
const Lt = 680, At = "ease-out",
|
|
10607
|
+
const Lt = 680, At = "ease-out", gd = {
|
|
10591
10608
|
top: 18,
|
|
10592
10609
|
right: 8,
|
|
10593
10610
|
bottom: 12,
|
|
10594
10611
|
left: 0
|
|
10595
10612
|
};
|
|
10596
10613
|
function hr(e) {
|
|
10597
|
-
return { ...
|
|
10614
|
+
return { ...gd, ...e };
|
|
10598
10615
|
}
|
|
10599
10616
|
function mr(e) {
|
|
10600
10617
|
return e.map((r, n) => ({
|
|
10601
10618
|
...r,
|
|
10602
|
-
color:
|
|
10619
|
+
color: vd(r, n),
|
|
10603
10620
|
label: r.label ?? r.key
|
|
10604
10621
|
}));
|
|
10605
10622
|
}
|
|
@@ -10619,7 +10636,7 @@ function Ve() {
|
|
|
10619
10636
|
function vr() {
|
|
10620
10637
|
return "color-mix(in srgb, var(--border) 55%, transparent)";
|
|
10621
10638
|
}
|
|
10622
|
-
function
|
|
10639
|
+
function ei() {
|
|
10623
10640
|
return "color-mix(in srgb, var(--primary) 45%, var(--border))";
|
|
10624
10641
|
}
|
|
10625
10642
|
function fn() {
|
|
@@ -10633,15 +10650,15 @@ function fn() {
|
|
|
10633
10650
|
color: "var(--text-muted)"
|
|
10634
10651
|
};
|
|
10635
10652
|
}
|
|
10636
|
-
function
|
|
10653
|
+
function yd(e, r = lt) {
|
|
10637
10654
|
if (e == null || e === "") return "—";
|
|
10638
10655
|
const n = typeof e == "number" ? e : Number(e);
|
|
10639
10656
|
return Number.isFinite(n) ? r(n) : String(e);
|
|
10640
10657
|
}
|
|
10641
|
-
function
|
|
10658
|
+
function xo(e) {
|
|
10642
10659
|
return `bonsaif-grad-${e.replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
10643
10660
|
}
|
|
10644
|
-
function
|
|
10661
|
+
function wd({
|
|
10645
10662
|
active: e,
|
|
10646
10663
|
label: r,
|
|
10647
10664
|
payload: n,
|
|
@@ -10670,7 +10687,7 @@ function xd({
|
|
|
10670
10687
|
),
|
|
10671
10688
|
l.name ?? l.dataKey
|
|
10672
10689
|
] }),
|
|
10673
|
-
/* @__PURE__ */ t("span", { className: "bonsaif-chart-tooltip-value", children:
|
|
10690
|
+
/* @__PURE__ */ t("span", { className: "bonsaif-chart-tooltip-value", children: yd(u, a) })
|
|
10674
10691
|
]
|
|
10675
10692
|
},
|
|
10676
10693
|
String(l.dataKey ?? l.name ?? s)
|
|
@@ -10689,7 +10706,7 @@ function Xt({
|
|
|
10689
10706
|
...c
|
|
10690
10707
|
}) {
|
|
10691
10708
|
return /* @__PURE__ */ t(
|
|
10692
|
-
|
|
10709
|
+
Ll,
|
|
10693
10710
|
{
|
|
10694
10711
|
...c,
|
|
10695
10712
|
cursor: n,
|
|
@@ -10703,11 +10720,11 @@ function Xt({
|
|
|
10703
10720
|
overflow: "visible",
|
|
10704
10721
|
...i
|
|
10705
10722
|
},
|
|
10706
|
-
content: r ?? /* @__PURE__ */ t(
|
|
10723
|
+
content: r ?? /* @__PURE__ */ t(wd, { valueFormat: e })
|
|
10707
10724
|
}
|
|
10708
10725
|
);
|
|
10709
10726
|
}
|
|
10710
|
-
function
|
|
10727
|
+
function Bu({
|
|
10711
10728
|
data: e,
|
|
10712
10729
|
xKey: r,
|
|
10713
10730
|
series: n,
|
|
@@ -10733,7 +10750,7 @@ function Mu({
|
|
|
10733
10750
|
role: "img",
|
|
10734
10751
|
"aria-label": A,
|
|
10735
10752
|
style: { height: a },
|
|
10736
|
-
children: /* @__PURE__ */ t(Yt, { width: "100%", height: "100%", children: /* @__PURE__ */ o(
|
|
10753
|
+
children: /* @__PURE__ */ t(Yt, { width: "100%", height: "100%", children: /* @__PURE__ */ o(Al, { data: e, margin: T, children: [
|
|
10737
10754
|
c ? /* @__PURE__ */ t(
|
|
10738
10755
|
fr,
|
|
10739
10756
|
{
|
|
@@ -10772,7 +10789,7 @@ function Mu({
|
|
|
10772
10789
|
{
|
|
10773
10790
|
valueFormat: b,
|
|
10774
10791
|
cursor: {
|
|
10775
|
-
stroke:
|
|
10792
|
+
stroke: ei(),
|
|
10776
10793
|
strokeWidth: 1.25,
|
|
10777
10794
|
strokeDasharray: "4 4"
|
|
10778
10795
|
}
|
|
@@ -10789,7 +10806,7 @@ function Mu({
|
|
|
10789
10806
|
}
|
|
10790
10807
|
) : null,
|
|
10791
10808
|
N.map((x, F) => /* @__PURE__ */ t(
|
|
10792
|
-
|
|
10809
|
+
To,
|
|
10793
10810
|
{
|
|
10794
10811
|
type: w ? "monotone" : "linear",
|
|
10795
10812
|
dataKey: x.key,
|
|
@@ -10840,11 +10857,11 @@ function oa({
|
|
|
10840
10857
|
role: "img",
|
|
10841
10858
|
"aria-label": A,
|
|
10842
10859
|
style: { height: a },
|
|
10843
|
-
children: /* @__PURE__ */ t(Yt, { width: "100%", height: "100%", children: /* @__PURE__ */ o(
|
|
10860
|
+
children: /* @__PURE__ */ t(Yt, { width: "100%", height: "100%", children: /* @__PURE__ */ o(Ml, { data: e, margin: T, children: [
|
|
10844
10861
|
/* @__PURE__ */ t("defs", { children: N.map((x) => /* @__PURE__ */ o(
|
|
10845
10862
|
"linearGradient",
|
|
10846
10863
|
{
|
|
10847
|
-
id:
|
|
10864
|
+
id: xo(x.key),
|
|
10848
10865
|
x1: "0",
|
|
10849
10866
|
y1: "0",
|
|
10850
10867
|
x2: "0",
|
|
@@ -10909,7 +10926,7 @@ function oa({
|
|
|
10909
10926
|
{
|
|
10910
10927
|
valueFormat: b,
|
|
10911
10928
|
cursor: {
|
|
10912
|
-
stroke:
|
|
10929
|
+
stroke: ei(),
|
|
10913
10930
|
strokeWidth: 1.25,
|
|
10914
10931
|
strokeDasharray: "4 4"
|
|
10915
10932
|
}
|
|
@@ -10926,13 +10943,13 @@ function oa({
|
|
|
10926
10943
|
}
|
|
10927
10944
|
) : null,
|
|
10928
10945
|
N.map((x) => /* @__PURE__ */ t(
|
|
10929
|
-
|
|
10946
|
+
Tl,
|
|
10930
10947
|
{
|
|
10931
10948
|
type: "monotone",
|
|
10932
10949
|
dataKey: x.key,
|
|
10933
10950
|
name: x.label,
|
|
10934
10951
|
stroke: x.color,
|
|
10935
|
-
fill: `url(#${
|
|
10952
|
+
fill: `url(#${xo(x.key)})`,
|
|
10936
10953
|
strokeWidth: 2.25,
|
|
10937
10954
|
stackId: w ? "stack" : void 0,
|
|
10938
10955
|
isAnimationActive: !0,
|
|
@@ -10952,7 +10969,7 @@ function oa({
|
|
|
10952
10969
|
}
|
|
10953
10970
|
);
|
|
10954
10971
|
}
|
|
10955
|
-
function
|
|
10972
|
+
function Iu({
|
|
10956
10973
|
data: e,
|
|
10957
10974
|
xKey: r,
|
|
10958
10975
|
series: n,
|
|
@@ -10980,7 +10997,7 @@ function Tu({
|
|
|
10980
10997
|
"aria-label": A,
|
|
10981
10998
|
style: { height: a },
|
|
10982
10999
|
children: /* @__PURE__ */ t(Yt, { width: "100%", height: "100%", children: /* @__PURE__ */ o(
|
|
10983
|
-
|
|
11000
|
+
Do,
|
|
10984
11001
|
{
|
|
10985
11002
|
data: e,
|
|
10986
11003
|
margin: x,
|
|
@@ -11087,12 +11104,12 @@ function Tu({
|
|
|
11087
11104
|
}
|
|
11088
11105
|
);
|
|
11089
11106
|
}
|
|
11090
|
-
function
|
|
11091
|
-
return /* @__PURE__ */ t(
|
|
11107
|
+
function Ou(e) {
|
|
11108
|
+
return /* @__PURE__ */ t(ti, { ...e, variant: "pie" });
|
|
11092
11109
|
}
|
|
11093
|
-
function
|
|
11110
|
+
function Ru(e) {
|
|
11094
11111
|
return /* @__PURE__ */ t(
|
|
11095
|
-
|
|
11112
|
+
ti,
|
|
11096
11113
|
{
|
|
11097
11114
|
...e,
|
|
11098
11115
|
variant: "donut",
|
|
@@ -11102,10 +11119,10 @@ function Bu(e) {
|
|
|
11102
11119
|
}
|
|
11103
11120
|
);
|
|
11104
11121
|
}
|
|
11105
|
-
function
|
|
11122
|
+
function go(e, r) {
|
|
11106
11123
|
return e == null || !Number.isFinite(e) ? r : e > 0 && e <= 1 ? e * 100 : e;
|
|
11107
11124
|
}
|
|
11108
|
-
function
|
|
11125
|
+
function ti({
|
|
11109
11126
|
data: e,
|
|
11110
11127
|
nameKey: r,
|
|
11111
11128
|
valueKey: n,
|
|
@@ -11129,7 +11146,7 @@ function ei({
|
|
|
11129
11146
|
value: pr(C[n]) ?? 0,
|
|
11130
11147
|
fill: A[j % A.length],
|
|
11131
11148
|
row: C
|
|
11132
|
-
})).filter((C) => C.value > 0), T = !N.length, x = v === "donut", F = N.length, S =
|
|
11149
|
+
})).filter((C) => C.value > 0), T = !N.length, x = v === "donut", F = N.length, S = go(b, x ? 62 : 12), k = go(p, 78), H = Math.min(
|
|
11133
11150
|
w ?? (x ? 2 : 3),
|
|
11134
11151
|
Math.max(0.5, 10 / Math.max(1, F))
|
|
11135
11152
|
), X = Math.min(
|
|
@@ -11147,10 +11164,10 @@ function ei({
|
|
|
11147
11164
|
"aria-label": f ?? (v === "donut" ? "Donut chart" : "Pie chart"),
|
|
11148
11165
|
style: { height: a },
|
|
11149
11166
|
children: /* @__PURE__ */ o("div", { className: "bonsaif-pie-layout", children: [
|
|
11150
|
-
/* @__PURE__ */ t("div", { className: "bonsaif-pie-plot", style: { height: le }, children: /* @__PURE__ */ t(Yt, { width: "100%", height: "100%", children: /* @__PURE__ */ o(
|
|
11167
|
+
/* @__PURE__ */ t("div", { className: "bonsaif-pie-plot", style: { height: le }, children: /* @__PURE__ */ t(Yt, { width: "100%", height: "100%", children: /* @__PURE__ */ o(Dl, { margin: { top: 4, right: 4, bottom: 4, left: 4 }, children: [
|
|
11151
11168
|
u ? /* @__PURE__ */ t(Xt, { valueFormat: m }) : null,
|
|
11152
11169
|
/* @__PURE__ */ t(
|
|
11153
|
-
|
|
11170
|
+
Bl,
|
|
11154
11171
|
{
|
|
11155
11172
|
data: N,
|
|
11156
11173
|
dataKey: "value",
|
|
@@ -11170,8 +11187,8 @@ function ei({
|
|
|
11170
11187
|
animationDuration: Lt,
|
|
11171
11188
|
animationEasing: At,
|
|
11172
11189
|
label: !1,
|
|
11173
|
-
activeShape:
|
|
11174
|
-
children: N.map((C) => /* @__PURE__ */ t(
|
|
11190
|
+
activeShape: Nd,
|
|
11191
|
+
children: N.map((C) => /* @__PURE__ */ t(Bo, { fill: C.fill }, C.name))
|
|
11175
11192
|
}
|
|
11176
11193
|
),
|
|
11177
11194
|
x ? /* @__PURE__ */ t(
|
|
@@ -11205,10 +11222,10 @@ function ei({
|
|
|
11205
11222
|
}
|
|
11206
11223
|
);
|
|
11207
11224
|
}
|
|
11208
|
-
function
|
|
11225
|
+
function Nd(e) {
|
|
11209
11226
|
const { outerRadius: r = 0, ...n } = e;
|
|
11210
11227
|
return /* @__PURE__ */ t(
|
|
11211
|
-
|
|
11228
|
+
Il,
|
|
11212
11229
|
{
|
|
11213
11230
|
...n,
|
|
11214
11231
|
outerRadius: Number(r) + 4,
|
|
@@ -11217,7 +11234,7 @@ function gd(e) {
|
|
|
11217
11234
|
}
|
|
11218
11235
|
);
|
|
11219
11236
|
}
|
|
11220
|
-
function
|
|
11237
|
+
function Pu({
|
|
11221
11238
|
data: e,
|
|
11222
11239
|
dataKey: r,
|
|
11223
11240
|
width: n = "100%",
|
|
@@ -11281,7 +11298,7 @@ function Iu({
|
|
|
11281
11298
|
}
|
|
11282
11299
|
);
|
|
11283
11300
|
}
|
|
11284
|
-
function
|
|
11301
|
+
function zu({
|
|
11285
11302
|
data: e,
|
|
11286
11303
|
xKey: r,
|
|
11287
11304
|
series: n,
|
|
@@ -11319,7 +11336,7 @@ function Ou({
|
|
|
11319
11336
|
role: "img",
|
|
11320
11337
|
"aria-label": y,
|
|
11321
11338
|
style: { height: l },
|
|
11322
|
-
children: /* @__PURE__ */ t(Yt, { width: "100%", height: "100%", children: /* @__PURE__ */ o(
|
|
11339
|
+
children: /* @__PURE__ */ t(Yt, { width: "100%", height: "100%", children: /* @__PURE__ */ o(Ol, { data: e, margin: X, barCategoryGap: "34%", children: [
|
|
11323
11340
|
m ? /* @__PURE__ */ t(
|
|
11324
11341
|
fr,
|
|
11325
11342
|
{
|
|
@@ -11387,7 +11404,7 @@ function Ou({
|
|
|
11387
11404
|
$.key
|
|
11388
11405
|
)),
|
|
11389
11406
|
H.map(($) => /* @__PURE__ */ t(
|
|
11390
|
-
|
|
11407
|
+
To,
|
|
11391
11408
|
{
|
|
11392
11409
|
type: "monotone",
|
|
11393
11410
|
dataKey: $.key,
|
|
@@ -11411,7 +11428,7 @@ function Ou({
|
|
|
11411
11428
|
}
|
|
11412
11429
|
);
|
|
11413
11430
|
}
|
|
11414
|
-
function
|
|
11431
|
+
function Fu({
|
|
11415
11432
|
data: e,
|
|
11416
11433
|
xKey: r,
|
|
11417
11434
|
valueKey: n,
|
|
@@ -11430,7 +11447,7 @@ function Ru({
|
|
|
11430
11447
|
totalColor: y = "var(--primary)"
|
|
11431
11448
|
}) {
|
|
11432
11449
|
const v = Ye(
|
|
11433
|
-
() =>
|
|
11450
|
+
() => kd(e, {
|
|
11434
11451
|
xKey: r,
|
|
11435
11452
|
valueKey: n,
|
|
11436
11453
|
typeKey: a,
|
|
@@ -11447,7 +11464,7 @@ function Ru({
|
|
|
11447
11464
|
role: "img",
|
|
11448
11465
|
"aria-label": p,
|
|
11449
11466
|
style: { height: i },
|
|
11450
|
-
children: /* @__PURE__ */ t(Yt, { width: "100%", height: "100%", children: /* @__PURE__ */ o(
|
|
11467
|
+
children: /* @__PURE__ */ t(Yt, { width: "100%", height: "100%", children: /* @__PURE__ */ o(Do, { data: v, margin: T, barCategoryGap: "42%", children: [
|
|
11451
11468
|
u ? /* @__PURE__ */ t(
|
|
11452
11469
|
fr,
|
|
11453
11470
|
{
|
|
@@ -11509,14 +11526,14 @@ function Ru({
|
|
|
11509
11526
|
isAnimationActive: !0,
|
|
11510
11527
|
animationDuration: Lt,
|
|
11511
11528
|
animationEasing: At,
|
|
11512
|
-
children: v.map((x) => /* @__PURE__ */ t(
|
|
11529
|
+
children: v.map((x) => /* @__PURE__ */ t(Bo, { fill: x.color }, x.label))
|
|
11513
11530
|
}
|
|
11514
11531
|
)
|
|
11515
11532
|
] }) })
|
|
11516
11533
|
}
|
|
11517
11534
|
);
|
|
11518
11535
|
}
|
|
11519
|
-
function
|
|
11536
|
+
function kd(e, r) {
|
|
11520
11537
|
let n = 0;
|
|
11521
11538
|
return e.map((a, i) => {
|
|
11522
11539
|
const l = pr(a[r.valueKey]) ?? 0, s = r.typeKey ? String(a[r.typeKey] ?? "") : "", c = s === "total" || i === e.length - 1 && s !== "increase" && s !== "decrease";
|
|
@@ -11532,7 +11549,7 @@ function yd(e, r) {
|
|
|
11532
11549
|
});
|
|
11533
11550
|
}
|
|
11534
11551
|
const Ht = 135 * Math.PI / 180, Vn = 270 * Math.PI / 180;
|
|
11535
|
-
function
|
|
11552
|
+
function _u({
|
|
11536
11553
|
value: e,
|
|
11537
11554
|
min: r = 0,
|
|
11538
11555
|
max: n = 100,
|
|
@@ -11551,7 +11568,7 @@ function Pu({
|
|
|
11551
11568
|
thickness: y = 9,
|
|
11552
11569
|
showScale: v = !1
|
|
11553
11570
|
}) {
|
|
11554
|
-
const N =
|
|
11571
|
+
const N = No().replace(/:/g, ""), T = n - r || 1, x = Math.min(1, Math.max(0, (e - r) / T)), [F, S] = z(
|
|
11555
11572
|
w > 0 ? 0 : x
|
|
11556
11573
|
);
|
|
11557
11574
|
if (ie(() => {
|
|
@@ -11573,7 +11590,7 @@ function Pu({
|
|
|
11573
11590
|
return G = requestAnimationFrame(ae), () => cancelAnimationFrame(G);
|
|
11574
11591
|
}, [x, w, l, s]), l) return /* @__PURE__ */ t(Xe, { height: a });
|
|
11575
11592
|
if (s) return /* @__PURE__ */ t(Ze, { height: a, text: c });
|
|
11576
|
-
const k = 100, H = 108, X = 72, $ = b ??
|
|
11593
|
+
const k = 100, H = 108, X = 72, $ = b ?? Cd(e, n, f, p), q = r + F * T, le = yo(k, H, X, Ht, Ht + Vn), C = Ht + Math.max(1e-3, F) * Vn, j = yo(k, H, X, Ht, C), J = sn(k, H, X, Ht), U = sn(k, H, X, Ht + Vn);
|
|
11577
11594
|
return /* @__PURE__ */ t(
|
|
11578
11595
|
"div",
|
|
11579
11596
|
{
|
|
@@ -11682,7 +11699,7 @@ function Pu({
|
|
|
11682
11699
|
}
|
|
11683
11700
|
);
|
|
11684
11701
|
}
|
|
11685
|
-
function
|
|
11702
|
+
function Cd(e, r, n, a) {
|
|
11686
11703
|
if (a != null && a.length) {
|
|
11687
11704
|
const l = [...a].sort((c, u) => c.value - u.value);
|
|
11688
11705
|
let s = l[0].color;
|
|
@@ -11700,11 +11717,11 @@ function sn(e, r, n, a) {
|
|
|
11700
11717
|
y: r + n * Math.sin(a)
|
|
11701
11718
|
};
|
|
11702
11719
|
}
|
|
11703
|
-
function
|
|
11720
|
+
function yo(e, r, n, a, i) {
|
|
11704
11721
|
const l = sn(e, r, n, a), s = sn(e, r, n, i), c = i - a, u = Math.abs(c) > Math.PI ? 1 : 0;
|
|
11705
11722
|
return `M ${l.x} ${l.y} A ${n} ${n} 0 ${u} 1 ${s.x} ${s.y}`;
|
|
11706
11723
|
}
|
|
11707
|
-
function
|
|
11724
|
+
function Hu({
|
|
11708
11725
|
value: e,
|
|
11709
11726
|
target: r,
|
|
11710
11727
|
max: n,
|
|
@@ -11886,7 +11903,7 @@ function zu({
|
|
|
11886
11903
|
X
|
|
11887
11904
|
] }) : X });
|
|
11888
11905
|
}
|
|
11889
|
-
function
|
|
11906
|
+
function ju({
|
|
11890
11907
|
data: e,
|
|
11891
11908
|
value: r,
|
|
11892
11909
|
timeKey: n = "t",
|
|
@@ -11972,7 +11989,7 @@ function Fu({
|
|
|
11972
11989
|
}
|
|
11973
11990
|
);
|
|
11974
11991
|
}
|
|
11975
|
-
function
|
|
11992
|
+
function Wu({
|
|
11976
11993
|
used: e,
|
|
11977
11994
|
total: r,
|
|
11978
11995
|
cached: n,
|
|
@@ -12107,8 +12124,8 @@ function _u({
|
|
|
12107
12124
|
}
|
|
12108
12125
|
);
|
|
12109
12126
|
}
|
|
12110
|
-
const
|
|
12111
|
-
function
|
|
12127
|
+
const Sd = "color-mix(in srgb, var(--primary) 25%, #38bdf8)", Ed = "color-mix(in srgb, var(--primary) 20%, #2dd4bf)";
|
|
12128
|
+
function qu({
|
|
12112
12129
|
data: e,
|
|
12113
12130
|
timeKey: r = "t",
|
|
12114
12131
|
inboundKey: n = "in",
|
|
@@ -12118,8 +12135,8 @@ function Hu({
|
|
|
12118
12135
|
unit: s = "bytes",
|
|
12119
12136
|
inboundLabel: c = "Entrada",
|
|
12120
12137
|
outboundLabel: u = "Salida",
|
|
12121
|
-
inboundColor: m =
|
|
12122
|
-
outboundColor: f =
|
|
12138
|
+
inboundColor: m = Sd,
|
|
12139
|
+
outboundColor: f = Ed,
|
|
12123
12140
|
height: b = 240,
|
|
12124
12141
|
className: p = "",
|
|
12125
12142
|
loading: A = !1,
|
|
@@ -12132,7 +12149,7 @@ function Hu({
|
|
|
12132
12149
|
const x = i ?? qt(e, n) ?? 0, F = l ?? qt(e, a) ?? 0, S = !A && e.length === 0;
|
|
12133
12150
|
if (A) return /* @__PURE__ */ t(Xe, { height: b });
|
|
12134
12151
|
if (S) return /* @__PURE__ */ t(Ze, { height: b, text: w });
|
|
12135
|
-
const k = ($) =>
|
|
12152
|
+
const k = ($) => xd($, s), X = Math.max(140, b - 76);
|
|
12136
12153
|
return /* @__PURE__ */ o(
|
|
12137
12154
|
"div",
|
|
12138
12155
|
{
|
|
@@ -12232,7 +12249,7 @@ function Hu({
|
|
|
12232
12249
|
}
|
|
12233
12250
|
);
|
|
12234
12251
|
}
|
|
12235
|
-
function
|
|
12252
|
+
function Uu(e) {
|
|
12236
12253
|
const [r, n] = z({}), [a, i] = z(!1), l = Ce(
|
|
12237
12254
|
(m) => a || r[m] ? e[m] : void 0,
|
|
12238
12255
|
[e, a, r]
|
|
@@ -12253,97 +12270,97 @@ function ju(e) {
|
|
|
12253
12270
|
};
|
|
12254
12271
|
}
|
|
12255
12272
|
export {
|
|
12256
|
-
|
|
12273
|
+
_d as Alert,
|
|
12257
12274
|
oa as AreaChart,
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12275
|
+
id as AuthShell,
|
|
12276
|
+
Iu as BarChart,
|
|
12277
|
+
zd as BonsaifButton,
|
|
12278
|
+
Tu as BonsaifUIToaster,
|
|
12279
|
+
Hu as BulletChart,
|
|
12263
12280
|
ze as Button,
|
|
12264
12281
|
ea as CHART_PALETTE,
|
|
12265
|
-
|
|
12266
|
-
|
|
12282
|
+
Hd as CalendarPicker,
|
|
12283
|
+
Du as ChartCard,
|
|
12267
12284
|
Qn as Checkbox,
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12288
|
-
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
|
|
12292
|
-
|
|
12293
|
-
|
|
12294
|
-
|
|
12285
|
+
jd as CodeBlock,
|
|
12286
|
+
zu as ComboChart,
|
|
12287
|
+
qd as CompactFilterSelect,
|
|
12288
|
+
Wd as CompactSearchInput,
|
|
12289
|
+
Ud as ConfirmDialog,
|
|
12290
|
+
Ho as CopyButton,
|
|
12291
|
+
Kd as CopyLinkButton,
|
|
12292
|
+
ju as CpuChart,
|
|
12293
|
+
Xd as DataSheets,
|
|
12294
|
+
Ds as DataTable,
|
|
12295
|
+
Zd as DateRangePicker,
|
|
12296
|
+
Ru as DonutChart,
|
|
12297
|
+
Qd as Drawer,
|
|
12298
|
+
Jd as DropdownMenu,
|
|
12299
|
+
Fd as DynamicDetailTabs,
|
|
12300
|
+
cu as EmailField,
|
|
12301
|
+
du as EmptyState,
|
|
12302
|
+
mu as FieldLayoutEditor,
|
|
12303
|
+
uu as FileUpload,
|
|
12304
|
+
sc as FormField,
|
|
12305
|
+
_u as GaugeChart,
|
|
12306
|
+
Uc as GlobalScrollbars,
|
|
12307
|
+
Xo as InputField,
|
|
12308
|
+
Bu as LineChart,
|
|
12309
|
+
Xl as LoadingState,
|
|
12310
|
+
Au as MicroserviceFrame,
|
|
12311
|
+
jo as Modal,
|
|
12295
12312
|
br as MouseTooltip,
|
|
12296
|
-
|
|
12297
|
-
|
|
12298
|
-
|
|
12299
|
-
|
|
12300
|
-
|
|
12301
|
-
|
|
12302
|
-
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
-
|
|
12308
|
-
|
|
12313
|
+
fu as MultiSelect,
|
|
12314
|
+
qu as NetworkChart,
|
|
12315
|
+
bu as NumberField,
|
|
12316
|
+
$u as PageHeader,
|
|
12317
|
+
_l as PageSearchInput,
|
|
12318
|
+
pu as Pagination,
|
|
12319
|
+
hu as PhoneField,
|
|
12320
|
+
Ou as PieChart,
|
|
12321
|
+
Lu as PrimeAuthRouteShell,
|
|
12322
|
+
Mu as PrimeSuiteChatFrame,
|
|
12323
|
+
vu as RadioGroup,
|
|
12324
|
+
Wu as RamChart,
|
|
12325
|
+
xu as RichTextEditor,
|
|
12309
12326
|
Gt as SearchableSelect,
|
|
12310
|
-
|
|
12311
|
-
|
|
12312
|
-
|
|
12313
|
-
|
|
12314
|
-
|
|
12315
|
-
|
|
12316
|
-
|
|
12327
|
+
gu as SectionPanel,
|
|
12328
|
+
Pu as Sparkline,
|
|
12329
|
+
yu as StatusBadge,
|
|
12330
|
+
wu as StatusSelect,
|
|
12331
|
+
ku as StepWizard,
|
|
12332
|
+
Nu as Tabs,
|
|
12333
|
+
Su as TagInput,
|
|
12317
12334
|
zn as TextInput,
|
|
12318
|
-
|
|
12319
|
-
|
|
12320
|
-
|
|
12321
|
-
|
|
12322
|
-
|
|
12335
|
+
zc as Textarea,
|
|
12336
|
+
Cu as TextareaField,
|
|
12337
|
+
Eu as Toggle,
|
|
12338
|
+
nd as UserAvatar,
|
|
12339
|
+
Fu as WaterfallChart,
|
|
12323
12340
|
kt as cn,
|
|
12324
|
-
|
|
12341
|
+
Vd as configureBonsaifUI,
|
|
12325
12342
|
lt as defaultValueFormat,
|
|
12326
|
-
|
|
12343
|
+
tu as emailFormat,
|
|
12327
12344
|
sr as formatBytes,
|
|
12328
12345
|
ur as formatPercent,
|
|
12329
|
-
|
|
12330
|
-
|
|
12331
|
-
|
|
12332
|
-
|
|
12333
|
-
|
|
12334
|
-
|
|
12335
|
-
|
|
12336
|
-
|
|
12337
|
-
|
|
12338
|
-
|
|
12339
|
-
|
|
12340
|
-
|
|
12341
|
-
|
|
12342
|
-
|
|
12343
|
-
|
|
12346
|
+
xd as formatRate,
|
|
12347
|
+
Gd as getBonsaifUIConfig,
|
|
12348
|
+
Uo as isValidEmail,
|
|
12349
|
+
Ko as isValidPhone,
|
|
12350
|
+
lu as matches,
|
|
12351
|
+
au as maxLength,
|
|
12352
|
+
iu as maxValue,
|
|
12353
|
+
nu as minLength,
|
|
12354
|
+
ou as minValue,
|
|
12355
|
+
uc as phoneCountryCodeOptions,
|
|
12356
|
+
ru as phoneFormat,
|
|
12357
|
+
eu as required,
|
|
12358
|
+
Yd as resetBonsaifUIConfig,
|
|
12359
|
+
vd as seriesColor,
|
|
12360
|
+
Gu as toast,
|
|
12344
12361
|
ft as toneColor,
|
|
12345
12362
|
ln as usageColor,
|
|
12346
12363
|
aa as usageTone,
|
|
12347
|
-
|
|
12348
|
-
|
|
12364
|
+
Uu as useValidationVisibility,
|
|
12365
|
+
su as validateForm
|
|
12349
12366
|
};
|