bonsaif-ui 0.1.39 → 0.1.40
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 +1012 -980
- package/dist/bonsaif-ui.umd.cjs +6 -6
- package/dist/components/ui/DataTable.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/bonsaif-ui.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import je, { useRef as se, useState as L, useEffect as Q, createContext as To, useLayoutEffect as Ao, useContext as Do, isValidElement as
|
|
2
|
+
import je, { useRef as se, useState as L, useEffect as Q, createContext as To, useLayoutEffect as Ao, useContext as Do, isValidElement as sa, Children as Bo, useMemo as it, useCallback as Ce, forwardRef as xn, cloneElement as Oo, useId as Io, useSyncExternalStore as Ho } from "react";
|
|
3
3
|
import { jsx as t, jsxs as l, Fragment as ze } from "react/jsx-runtime";
|
|
4
|
-
import { HiMagnifyingGlass as xt, HiXMark as Ie, HiInformationCircle as
|
|
5
|
-
import { createPortal as
|
|
4
|
+
import { HiMagnifyingGlass as xt, HiXMark as Ie, HiInformationCircle as ra, HiExclamationCircle as jo, HiExclamationTriangle as ca, HiCheckCircle as zo, HiChevronLeft as Tt, HiChevronDown as Xe, HiChevronRight as st, HiCalendarDays as aa, HiCheck as Ue, HiClipboardDocument as Fo, HiLink as gn, HiCog6Tooth as Sr, HiChevronUp as Yr, HiChevronUpDown as Ro, HiFunnel as _o, HiEllipsisVertical as Po, HiMinus as yn, HiTableCells as Wo, HiDocumentText as wn, HiCommandLine as qo, HiClock as Wa, HiTrash as Nn, HiArrowDownTray as Uo, HiInbox as kn, HiArrowUpTray as Vo, HiDocument as Ko, HiH2 as Yo, HiH3 as Go, HiArrowsPointingIn as Xo, HiArrowsPointingOut as Zo, HiArrowUturnLeft as Jo, HiArrowUturnRight as Qo, HiListBullet as na, HiNumberedList as el, HiArrowTurnUpLeft as tl, HiArrowTurnDownRight as rl, HiBars3BottomLeft as al, HiBars3CenterLeft as nl, HiBars3BottomRight as ol, HiBars3 as Cn, HiLinkSlash as ll, HiPhoto as il, HiOutlinePaintBrush as sl, HiNoSymbol as cl, HiLockClosed as dl, HiHome as Er, HiArrowRightOnRectangle as ul, HiShieldCheck as Gr, HiBriefcase as ml, HiUsers as qa, HiBell as bl, HiUser as pl, HiClipboardDocumentList as fl, HiBuildingOffice2 as hl, HiRectangleGroup as vl, HiTicket as xl, HiChartBar as gl } from "react-icons/hi2";
|
|
5
|
+
import { createPortal as Ze } from "react-dom";
|
|
6
6
|
import { OverlayScrollbars as Ua } from "overlayscrollbars";
|
|
7
7
|
import { Toaster as yl } from "sonner";
|
|
8
8
|
import { toast as Mc } from "sonner";
|
|
@@ -119,13 +119,13 @@ function Cl({
|
|
|
119
119
|
const Sn = To({});
|
|
120
120
|
let En = 0;
|
|
121
121
|
const Ka = "bonsaif-ui:hide-tooltips";
|
|
122
|
-
function
|
|
122
|
+
function fr(e = 700) {
|
|
123
123
|
En = Date.now() + e;
|
|
124
124
|
}
|
|
125
125
|
function Sl() {
|
|
126
126
|
return Date.now() > En;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function hr(e) {
|
|
129
129
|
if (typeof document > "u") return !1;
|
|
130
130
|
const r = Array.from(
|
|
131
131
|
document.querySelectorAll(
|
|
@@ -146,7 +146,7 @@ function El(e) {
|
|
|
146
146
|
);
|
|
147
147
|
return (e.scrollWidth > e.clientWidth || r.length > 0) && (((n = r[0]) == null ? void 0 : n.textContent) ?? e.textContent ?? "").trim() || null;
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Ut({
|
|
150
150
|
children: e,
|
|
151
151
|
content: r,
|
|
152
152
|
onlyWhenOverflow: a = !1,
|
|
@@ -164,28 +164,28 @@ function qt({
|
|
|
164
164
|
Q(() => {
|
|
165
165
|
const S = f.current;
|
|
166
166
|
S && (S.querySelectorAll("[title]").forEach((O) => {
|
|
167
|
-
const
|
|
168
|
-
|
|
167
|
+
const _ = O.getAttribute("title");
|
|
168
|
+
_ && (O.getAttribute("aria-label") || O.setAttribute("aria-label", _), O.removeAttribute("title"));
|
|
169
169
|
}), S.querySelectorAll("svg title").forEach((O) => O.remove()));
|
|
170
170
|
}), Ao(() => {
|
|
171
171
|
if (!y) return;
|
|
172
172
|
const S = C.current;
|
|
173
173
|
if (!S) return;
|
|
174
|
-
const O = 12,
|
|
175
|
-
let
|
|
174
|
+
const O = 12, _ = 14, I = S.getBoundingClientRect(), ee = window.innerWidth - I.width - O, z = window.innerHeight - I.height - O;
|
|
175
|
+
let h = y.mouseX + _, R = y.mouseY + _, q, ae;
|
|
176
176
|
if (!i && f.current) {
|
|
177
177
|
const re = f.current.getBoundingClientRect(), ve = re.left + re.width / 2, M = re.top + re.height / 2;
|
|
178
|
-
c === "top" ? (
|
|
178
|
+
c === "top" ? (h = ve - I.width / 2, R = re.top - I.height - _, ae = I.height - 1) : c === "left" ? (h = re.left - I.width - _, R = M - I.height / 2, q = I.width - 1) : c === "right" ? (h = re.right + _, R = M - I.height / 2, q = -7) : (h = ve - I.width / 2, R = re.bottom + _, ae = -7);
|
|
179
179
|
}
|
|
180
|
-
if (i && (
|
|
180
|
+
if (i && (h > ee && (h = y.mouseX - I.width - _), R > z && (R = y.mouseY - I.height - _)), h = Math.min(Math.max(O, h), Math.max(O, ee)), R = Math.min(Math.max(O, R), Math.max(O, z)), !i && f.current) {
|
|
181
181
|
const re = f.current.getBoundingClientRect(), ve = re.left + re.width / 2, M = re.top + re.height / 2;
|
|
182
|
-
c === "top" || c === "bottom" ? q = Math.min(Math.max(14, ve -
|
|
182
|
+
c === "top" || c === "bottom" ? q = Math.min(Math.max(14, ve - h), I.width - 14) : ae = Math.min(Math.max(14, M - R), I.height - 14);
|
|
183
183
|
}
|
|
184
|
-
(Math.abs(
|
|
184
|
+
(Math.abs(h - y.x) > 0.5 || Math.abs(R - y.y) > 0.5 || q !== y.arrowX || ae !== y.arrowY) && A(
|
|
185
185
|
(re) => re && {
|
|
186
186
|
...re,
|
|
187
|
-
x:
|
|
188
|
-
y:
|
|
187
|
+
x: h,
|
|
188
|
+
y: R,
|
|
189
189
|
arrowX: q,
|
|
190
190
|
arrowY: ae
|
|
191
191
|
}
|
|
@@ -193,12 +193,12 @@ function qt({
|
|
|
193
193
|
}, [i, c, y]);
|
|
194
194
|
const V = () => {
|
|
195
195
|
N.current && (window.clearTimeout(N.current), N.current = null);
|
|
196
|
-
},
|
|
196
|
+
}, E = (S, O) => {
|
|
197
197
|
if (!Sl() || x.current) return;
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
198
|
+
const _ = f.current;
|
|
199
|
+
if (_ && !hr(_)) {
|
|
200
200
|
if (a) {
|
|
201
|
-
const I = El(
|
|
201
|
+
const I = El(_);
|
|
202
202
|
if (!I) return;
|
|
203
203
|
B(I);
|
|
204
204
|
}
|
|
@@ -208,7 +208,7 @@ function qt({
|
|
|
208
208
|
const S = f.current;
|
|
209
209
|
if (!S) return;
|
|
210
210
|
const O = S.getBoundingClientRect();
|
|
211
|
-
|
|
211
|
+
E(O.left + O.width / 2, O.bottom);
|
|
212
212
|
}, Y = () => {
|
|
213
213
|
V(), A(null);
|
|
214
214
|
}, X = () => {
|
|
@@ -218,34 +218,34 @@ function qt({
|
|
|
218
218
|
}
|
|
219
219
|
V(), N.current = window.setTimeout(() => A(null), 120);
|
|
220
220
|
}, j = () => {
|
|
221
|
-
|
|
221
|
+
fr(), x.current = !0, Y();
|
|
222
222
|
}, U = () => {
|
|
223
223
|
x.current = !1;
|
|
224
224
|
};
|
|
225
225
|
Q(() => {
|
|
226
226
|
if (!y) return;
|
|
227
|
-
if (
|
|
227
|
+
if (hr(f.current)) {
|
|
228
228
|
A(null);
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
231
231
|
const S = () => A(null), O = () => {
|
|
232
|
-
|
|
232
|
+
fr(), x.current = !0, A(null);
|
|
233
233
|
};
|
|
234
234
|
document.addEventListener("pointerdown", O, !0), document.addEventListener("click", O, !0), document.addEventListener("scroll", S, !0), window.addEventListener("blur", S), document.addEventListener("visibilitychange", S), document.addEventListener("keydown", S, !0);
|
|
235
|
-
const
|
|
236
|
-
|
|
235
|
+
const _ = new MutationObserver(() => {
|
|
236
|
+
hr(f.current) && A(null);
|
|
237
237
|
});
|
|
238
|
-
return
|
|
238
|
+
return _.observe(document.body, {
|
|
239
239
|
childList: !0,
|
|
240
240
|
subtree: !0,
|
|
241
241
|
attributes: !0,
|
|
242
242
|
attributeFilter: ["role", "aria-modal", "aria-hidden", "class"]
|
|
243
243
|
}), () => {
|
|
244
|
-
document.removeEventListener("pointerdown", O, !0), document.removeEventListener("click", O, !0), document.removeEventListener("scroll", S, !0), window.removeEventListener("blur", S), document.removeEventListener("visibilitychange", S), document.removeEventListener("keydown", S, !0),
|
|
244
|
+
document.removeEventListener("pointerdown", O, !0), document.removeEventListener("click", O, !0), document.removeEventListener("scroll", S, !0), window.removeEventListener("blur", S), document.removeEventListener("visibilitychange", S), document.removeEventListener("keydown", S, !0), _.disconnect();
|
|
245
245
|
};
|
|
246
246
|
}, [y]), Q(() => {
|
|
247
|
-
const S = () =>
|
|
248
|
-
|
|
247
|
+
const S = () => fr(), O = () => {
|
|
248
|
+
fr(), x.current = !0, A(null);
|
|
249
249
|
};
|
|
250
250
|
return document.addEventListener("pointerdown", S, !0), document.addEventListener("click", S, !0), document.addEventListener("keydown", S, !0), window.addEventListener(Ka, O), () => {
|
|
251
251
|
document.removeEventListener("pointerdown", S, !0), document.removeEventListener("click", S, !0), document.removeEventListener("keydown", S, !0), window.removeEventListener(
|
|
@@ -265,10 +265,10 @@ function qt({
|
|
|
265
265
|
className: m,
|
|
266
266
|
style: p,
|
|
267
267
|
onMouseEnter: (S) => {
|
|
268
|
-
V(), U(), i ?
|
|
268
|
+
V(), U(), i ? E(S.clientX, S.clientY) : H();
|
|
269
269
|
},
|
|
270
270
|
onMouseMove: (S) => {
|
|
271
|
-
y && i &&
|
|
271
|
+
y && i && E(S.clientX, S.clientY);
|
|
272
272
|
},
|
|
273
273
|
onMouseDown: j,
|
|
274
274
|
onClick: j,
|
|
@@ -280,7 +280,7 @@ function qt({
|
|
|
280
280
|
children: e
|
|
281
281
|
}
|
|
282
282
|
),
|
|
283
|
-
y && G && !
|
|
283
|
+
y && G && !hr(f.current) ? Ze(
|
|
284
284
|
/* @__PURE__ */ l(
|
|
285
285
|
"div",
|
|
286
286
|
{
|
|
@@ -364,11 +364,11 @@ const $l = "inline-flex shrink-0 items-center justify-center gap-2 whitespace-no
|
|
|
364
364
|
ghost: {},
|
|
365
365
|
icon: {}
|
|
366
366
|
};
|
|
367
|
-
function
|
|
368
|
-
return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(
|
|
367
|
+
function oa(e) {
|
|
368
|
+
return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(oa).join(" ").trim() : sa(e) ? oa(e.props.children) : "";
|
|
369
369
|
}
|
|
370
370
|
function Bl(e) {
|
|
371
|
-
return Bo.toArray(e).find(
|
|
371
|
+
return Bo.toArray(e).find(sa) ?? null;
|
|
372
372
|
}
|
|
373
373
|
function Be({
|
|
374
374
|
variant: e = "primary",
|
|
@@ -385,7 +385,7 @@ function Be({
|
|
|
385
385
|
style: k,
|
|
386
386
|
...f
|
|
387
387
|
}) {
|
|
388
|
-
const C = Do(Sn), N = c ?? C.iconOnly ?? e === "icon", x = C.compact ?? !1, y = C.headerAction ?? !1, A = y && r === "md" ? "sm" : x && !y && r === "md" ? "xs" : r, K = e === "icon" || N, B = y && K, V =
|
|
388
|
+
const C = Do(Sn), N = c ?? C.iconOnly ?? e === "icon", x = C.compact ?? !1, y = C.headerAction ?? !1, A = y && r === "md" ? "sm" : x && !y && r === "md" ? "xs" : r, K = e === "icon" || N, B = y && K, V = oa(b), E = i ?? f.title ?? f["aria-label"] ?? (N ? V : void 0), H = E ? void 0 : f.title, Y = f["aria-label"] ?? (typeof E == "string" ? E : V || void 0), X = a ? null : n ?? (N ? Bl(b) : null), j = /* @__PURE__ */ l(
|
|
389
389
|
"button",
|
|
390
390
|
{
|
|
391
391
|
...f,
|
|
@@ -420,11 +420,11 @@ function Be({
|
|
|
420
420
|
]
|
|
421
421
|
}
|
|
422
422
|
);
|
|
423
|
-
return
|
|
424
|
-
|
|
423
|
+
return E ? /* @__PURE__ */ t(
|
|
424
|
+
Ut,
|
|
425
425
|
{
|
|
426
426
|
as: "span",
|
|
427
|
-
content:
|
|
427
|
+
content: E,
|
|
428
428
|
className: "inline-flex shrink-0",
|
|
429
429
|
children: j
|
|
430
430
|
}
|
|
@@ -551,7 +551,7 @@ function jl(e) {
|
|
|
551
551
|
function zl(e) {
|
|
552
552
|
return typeof e == "function" ? e : e.default;
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Fl(e, r) {
|
|
555
555
|
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__ */ l("div", { className: "max-w-md", children: [
|
|
556
556
|
/* @__PURE__ */ t("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: "No se pudo cargar este modulo" }),
|
|
557
557
|
/* @__PURE__ */ t("p", { className: "mt-1 text-xs text-[var(--text-muted)]", children: e.message }),
|
|
@@ -576,11 +576,11 @@ function js({
|
|
|
576
576
|
subtitle: N,
|
|
577
577
|
emptyState: x,
|
|
578
578
|
loadingState: y,
|
|
579
|
-
errorState: A =
|
|
579
|
+
errorState: A = Fl,
|
|
580
580
|
renderTabLabel: K,
|
|
581
581
|
searchableTabs: B = "auto",
|
|
582
582
|
tabsSearchThreshold: V = 6,
|
|
583
|
-
tabsSearchPlaceholder:
|
|
583
|
+
tabsSearchPlaceholder: E = "Buscar modulo...",
|
|
584
584
|
tabsSearchValue: H,
|
|
585
585
|
onTabsSearchChange: Y,
|
|
586
586
|
emptySearchState: X,
|
|
@@ -591,34 +591,34 @@ function js({
|
|
|
591
591
|
tabsClassName: O = ""
|
|
592
592
|
}) {
|
|
593
593
|
var qe;
|
|
594
|
-
const
|
|
594
|
+
const _ = it(
|
|
595
595
|
() => c.filter(
|
|
596
596
|
(Z) => !Z.hidden && ((k == null ? void 0 : k(Z, i)) ?? !0)
|
|
597
597
|
),
|
|
598
598
|
[k, i, c]
|
|
599
|
-
), I = (qe =
|
|
599
|
+
), I = (qe = _.find(
|
|
600
600
|
(Z) => !Z.disabled
|
|
601
601
|
)) == null ? void 0 : qe.service, [ee, z] = L(
|
|
602
602
|
p ?? I ?? ""
|
|
603
|
-
), [
|
|
603
|
+
), [h, R] = L({}), [q, ae] = L({}), [re, ve] = L(""), [M, me] = L(!1), T = se(q), ie = se(0), pe = H ?? re, W = Ga(pe), te = B === !0 || B === "auto" && _.length >= V, J = te && pe.trim().length > 0, ne = it(() => W ? _.filter(
|
|
604
604
|
(Z) => Ga(jl(Z)).includes(W)
|
|
605
|
-
) :
|
|
605
|
+
) : _, [W, _]), xe = b ?? ee, le = _.find((Z) => Z.service === xe) ?? _.find((Z) => !Z.disabled);
|
|
606
606
|
Q(() => {
|
|
607
607
|
!le && I && z(I);
|
|
608
608
|
}, [I, le]), Q(() => {
|
|
609
609
|
T.current = q;
|
|
610
610
|
}, [q]);
|
|
611
|
-
const
|
|
611
|
+
const $ = (Z) => {
|
|
612
612
|
Z.disabled || (b || z(Z.service), w == null || w(Z.service, Z));
|
|
613
613
|
}, P = (Z) => {
|
|
614
614
|
H === void 0 && ve(Z), Y == null || Y(Z);
|
|
615
615
|
}, ce = (Z, Me) => {
|
|
616
|
-
const Te = ne.filter((De) => !De.disabled),
|
|
616
|
+
const Te = ne.filter((De) => !De.disabled), _e = Te.findIndex(
|
|
617
617
|
(De) => De.service === Me.service
|
|
618
618
|
);
|
|
619
|
-
|
|
620
|
-
Te[(
|
|
621
|
-
)), Z.key === "Home" && (Z.preventDefault(),
|
|
619
|
+
_e < 0 || ((Z.key === "ArrowRight" || Z.key === "ArrowDown") && (Z.preventDefault(), $(Te[(_e + 1) % Te.length])), (Z.key === "ArrowLeft" || Z.key === "ArrowUp") && (Z.preventDefault(), $(
|
|
620
|
+
Te[(_e - 1 + Te.length) % Te.length]
|
|
621
|
+
)), Z.key === "Home" && (Z.preventDefault(), $(Te[0])), Z.key === "End" && (Z.preventDefault(), $(Te[Te.length - 1])));
|
|
622
622
|
}, de = Ce(() => {
|
|
623
623
|
if (!le) return;
|
|
624
624
|
const Z = le.service, Me = T.current[Z];
|
|
@@ -634,50 +634,50 @@ function js({
|
|
|
634
634
|
}));
|
|
635
635
|
return;
|
|
636
636
|
}
|
|
637
|
-
const
|
|
637
|
+
const _e = ++ie.current;
|
|
638
638
|
ae((De) => ({
|
|
639
639
|
...De,
|
|
640
640
|
[Z]: { ...De[Z], loading: !0, error: void 0 }
|
|
641
641
|
})), Te(le, i).then((De) => {
|
|
642
|
-
if (
|
|
643
|
-
const
|
|
644
|
-
ae((
|
|
645
|
-
...
|
|
646
|
-
[Z]: { component:
|
|
642
|
+
if (_e !== ie.current && !f) return;
|
|
643
|
+
const et = zl(De);
|
|
644
|
+
ae((Re) => ({
|
|
645
|
+
...Re,
|
|
646
|
+
[Z]: { component: et, loading: !1 }
|
|
647
647
|
}));
|
|
648
648
|
}).catch((De) => {
|
|
649
|
-
const
|
|
650
|
-
ae((
|
|
651
|
-
...
|
|
652
|
-
[Z]: { ...
|
|
649
|
+
const et = De instanceof Error ? De : new Error(String(De));
|
|
650
|
+
ae((Re) => ({
|
|
651
|
+
...Re,
|
|
652
|
+
[Z]: { ...Re[Z], loading: !1, error: et }
|
|
653
653
|
}));
|
|
654
654
|
});
|
|
655
655
|
}, [i, f, m, d, le]);
|
|
656
656
|
Q(de, [de]);
|
|
657
|
-
const Se = le ?
|
|
658
|
-
le &&
|
|
657
|
+
const Se = le ? h[le.service] ?? null : null, be = le ? q[le.service] : void 0, Ee = be == null ? void 0 : be.component, Ne = (Z) => {
|
|
658
|
+
le && R((Me) => ({
|
|
659
659
|
...Me,
|
|
660
660
|
[le.service]: Z
|
|
661
661
|
}));
|
|
662
662
|
}, ue = () => {
|
|
663
|
-
le &&
|
|
663
|
+
le && R((Z) => ({
|
|
664
664
|
...Z,
|
|
665
665
|
[le.service]: null
|
|
666
666
|
}));
|
|
667
|
-
},
|
|
667
|
+
}, Fe = {
|
|
668
668
|
context: i,
|
|
669
669
|
parent: n,
|
|
670
670
|
links: c,
|
|
671
|
-
visibleLinks:
|
|
671
|
+
visibleLinks: _,
|
|
672
672
|
filteredLinks: ne,
|
|
673
673
|
selectedLink: le,
|
|
674
674
|
selectedService: le == null ? void 0 : le.service,
|
|
675
675
|
activeItemId: Se,
|
|
676
676
|
tabsSearch: pe,
|
|
677
|
-
onSelectService:
|
|
677
|
+
onSelectService: $,
|
|
678
678
|
onOpenDetail: Ne,
|
|
679
679
|
onBackToList: ue
|
|
680
|
-
},
|
|
680
|
+
}, Qe = a ? a(Fe) : r ? /* @__PURE__ */ t(r, { ...Fe }) : e;
|
|
681
681
|
return /* @__PURE__ */ l(
|
|
682
682
|
"section",
|
|
683
683
|
{
|
|
@@ -687,7 +687,7 @@ function js({
|
|
|
687
687
|
"aside",
|
|
688
688
|
{
|
|
689
689
|
className: `min-w-0 rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-4 ${G}`,
|
|
690
|
-
children:
|
|
690
|
+
children: Qe
|
|
691
691
|
}
|
|
692
692
|
),
|
|
693
693
|
/* @__PURE__ */ l(
|
|
@@ -704,7 +704,7 @@ function js({
|
|
|
704
704
|
j && /* @__PURE__ */ l("span", { className: "hidden text-xs font-semibold text-[var(--text-muted)] transition-opacity duration-200 sm:inline", children: [
|
|
705
705
|
ne.length,
|
|
706
706
|
" / ",
|
|
707
|
-
|
|
707
|
+
_.length
|
|
708
708
|
] }),
|
|
709
709
|
te && /* @__PURE__ */ l(ze, { children: [
|
|
710
710
|
/* @__PURE__ */ t(
|
|
@@ -717,7 +717,7 @@ function js({
|
|
|
717
717
|
{
|
|
718
718
|
value: pe,
|
|
719
719
|
onChange: P,
|
|
720
|
-
placeholder:
|
|
720
|
+
placeholder: E,
|
|
721
721
|
className: "w-full",
|
|
722
722
|
autoFocus: M,
|
|
723
723
|
forceExpanded: !0,
|
|
@@ -759,7 +759,7 @@ function js({
|
|
|
759
759
|
role: "tab",
|
|
760
760
|
"aria-selected": Me,
|
|
761
761
|
disabled: Z.disabled,
|
|
762
|
-
onClick: () =>
|
|
762
|
+
onClick: () => $(Z),
|
|
763
763
|
onKeyDown: (Te) => ce(Te, Z),
|
|
764
764
|
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 ${Me ? "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)]"}`,
|
|
765
765
|
children: K ? K(Z, Me) : /* @__PURE__ */ l(ze, { children: [
|
|
@@ -797,12 +797,12 @@ function js({
|
|
|
797
797
|
}
|
|
798
798
|
);
|
|
799
799
|
}
|
|
800
|
-
const
|
|
800
|
+
const Rl = {
|
|
801
801
|
info: {
|
|
802
802
|
color: "#2563eb",
|
|
803
803
|
background: "rgba(59, 130, 246, 0.1)",
|
|
804
804
|
border: "rgba(59, 130, 246, 0.24)",
|
|
805
|
-
icon: /* @__PURE__ */ t(
|
|
805
|
+
icon: /* @__PURE__ */ t(ra, { className: "h-5 w-5" })
|
|
806
806
|
},
|
|
807
807
|
success: {
|
|
808
808
|
color: "#047857",
|
|
@@ -814,7 +814,7 @@ const Fl = {
|
|
|
814
814
|
color: "#b45309",
|
|
815
815
|
background: "rgba(245, 158, 11, 0.12)",
|
|
816
816
|
border: "rgba(245, 158, 11, 0.26)",
|
|
817
|
-
icon: /* @__PURE__ */ t(
|
|
817
|
+
icon: /* @__PURE__ */ t(ca, { className: "h-5 w-5" })
|
|
818
818
|
},
|
|
819
819
|
danger: {
|
|
820
820
|
color: "var(--danger)",
|
|
@@ -826,7 +826,7 @@ const Fl = {
|
|
|
826
826
|
color: "var(--text-secondary)",
|
|
827
827
|
background: "var(--bg-input)",
|
|
828
828
|
border: "var(--border)",
|
|
829
|
-
icon: /* @__PURE__ */ t(
|
|
829
|
+
icon: /* @__PURE__ */ t(ra, { className: "h-5 w-5" })
|
|
830
830
|
}
|
|
831
831
|
};
|
|
832
832
|
function zs({
|
|
@@ -838,7 +838,7 @@ function zs({
|
|
|
838
838
|
onDismiss: c,
|
|
839
839
|
className: d = ""
|
|
840
840
|
}) {
|
|
841
|
-
const m =
|
|
841
|
+
const m = Rl[e];
|
|
842
842
|
return /* @__PURE__ */ l(
|
|
843
843
|
"div",
|
|
844
844
|
{
|
|
@@ -883,7 +883,7 @@ const Mn = [
|
|
|
883
883
|
"Octubre",
|
|
884
884
|
"Noviembre",
|
|
885
885
|
"Diciembre"
|
|
886
|
-
],
|
|
886
|
+
], _l = [
|
|
887
887
|
"Ene",
|
|
888
888
|
"Feb",
|
|
889
889
|
"Mar",
|
|
@@ -896,13 +896,13 @@ const Mn = [
|
|
|
896
896
|
"Oct",
|
|
897
897
|
"Nov",
|
|
898
898
|
"Dic"
|
|
899
|
-
], Pl = ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"],
|
|
900
|
-
function
|
|
899
|
+
], Pl = ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"], Xr = 6;
|
|
900
|
+
function la(e, r, a) {
|
|
901
901
|
return `${e}-${String(r).padStart(2, "0")}-${String(a).padStart(2, "0")}`;
|
|
902
902
|
}
|
|
903
903
|
function Wl() {
|
|
904
904
|
const e = /* @__PURE__ */ new Date();
|
|
905
|
-
return
|
|
905
|
+
return la(e.getFullYear(), e.getMonth() + 1, e.getDate());
|
|
906
906
|
}
|
|
907
907
|
function Tn(e) {
|
|
908
908
|
const [r, a, n] = e.split("-").map(Number);
|
|
@@ -913,7 +913,7 @@ function ql(e) {
|
|
|
913
913
|
const { year: r, month: a, day: n } = Tn(e);
|
|
914
914
|
return !r || !a || !n ? "Seleccionar fecha" : `${String(n).padStart(2, "0")} ${Mn[a - 1]} ${r}`;
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function Fs({
|
|
917
917
|
value: e,
|
|
918
918
|
onChange: r,
|
|
919
919
|
minDate: a,
|
|
@@ -922,24 +922,24 @@ function _s({
|
|
|
922
922
|
const i = Wl(), d = Tn(e || i), m = n === "popover", [b, p] = L(!1), w = se(null), [k, f] = L({
|
|
923
923
|
horizontal: "left",
|
|
924
924
|
vertical: "bottom"
|
|
925
|
-
}), [C, N] = L(d.year), [x, y] = L(d.month), [A, K] = L("days"), B = 16, [V,
|
|
925
|
+
}), [C, N] = L(d.year), [x, y] = L(d.month), [A, K] = L("days"), B = 16, [V, E] = L(0), H = C - 7 + V, Y = Array.from({ length: B }, (z, h) => H + h);
|
|
926
926
|
Q(() => {
|
|
927
927
|
if (!m || !b || !w.current) return;
|
|
928
|
-
const z = w.current.getBoundingClientRect(),
|
|
928
|
+
const z = w.current.getBoundingClientRect(), h = 8, R = 280, q = 340, ae = z.left + R > window.innerWidth - h, re = z.right - R >= h, ve = z.bottom + 8 + q > window.innerHeight - h, M = z.top - 8 - q >= h;
|
|
929
929
|
f({
|
|
930
930
|
horizontal: ae && re ? "right" : "left",
|
|
931
931
|
vertical: ve && M ? "top" : "bottom"
|
|
932
932
|
});
|
|
933
933
|
}, [m, b]), Q(() => {
|
|
934
934
|
if (!m || !b) return;
|
|
935
|
-
function z(
|
|
936
|
-
w.current && (w.current.contains(
|
|
935
|
+
function z(R) {
|
|
936
|
+
w.current && (w.current.contains(R.target) || p(!1));
|
|
937
937
|
}
|
|
938
|
-
function
|
|
939
|
-
|
|
938
|
+
function h(R) {
|
|
939
|
+
R.key === "Escape" && p(!1);
|
|
940
940
|
}
|
|
941
|
-
return document.addEventListener("mousedown", z), document.addEventListener("keydown",
|
|
942
|
-
document.removeEventListener("mousedown", z), document.removeEventListener("keydown",
|
|
941
|
+
return document.addEventListener("mousedown", z), document.addEventListener("keydown", h), () => {
|
|
942
|
+
document.removeEventListener("mousedown", z), document.removeEventListener("keydown", h);
|
|
943
943
|
};
|
|
944
944
|
}, [m, b]);
|
|
945
945
|
function X() {
|
|
@@ -950,13 +950,13 @@ function _s({
|
|
|
950
950
|
}
|
|
951
951
|
const U = new Date(C, x - 1, 1).getDay(), G = new Date(C, x, 0).getDate(), S = [
|
|
952
952
|
...Array(U).fill(null),
|
|
953
|
-
...Array.from({ length: G }, (z,
|
|
953
|
+
...Array.from({ length: G }, (z, h) => h + 1)
|
|
954
954
|
];
|
|
955
|
-
for (; S.length <
|
|
956
|
-
const O = S.slice(0,
|
|
957
|
-
function
|
|
958
|
-
const
|
|
959
|
-
a &&
|
|
955
|
+
for (; S.length < Xr * 7; ) S.push(null);
|
|
956
|
+
const O = S.slice(0, Xr * 7);
|
|
957
|
+
function _(z) {
|
|
958
|
+
const h = la(C, x, z);
|
|
959
|
+
a && h < a || (r(h), m && p(!1));
|
|
960
960
|
}
|
|
961
961
|
const I = {
|
|
962
962
|
background: "none",
|
|
@@ -997,7 +997,7 @@ function _s({
|
|
|
997
997
|
onClick: X,
|
|
998
998
|
style: I,
|
|
999
999
|
title: "Mes anterior",
|
|
1000
|
-
children: /* @__PURE__ */ t(
|
|
1000
|
+
children: /* @__PURE__ */ t(Tt, { size: 16 })
|
|
1001
1001
|
}
|
|
1002
1002
|
),
|
|
1003
1003
|
/* @__PURE__ */ l(
|
|
@@ -1005,7 +1005,7 @@ function _s({
|
|
|
1005
1005
|
{
|
|
1006
1006
|
type: "button",
|
|
1007
1007
|
onClick: () => {
|
|
1008
|
-
K("years"),
|
|
1008
|
+
K("years"), E(0);
|
|
1009
1009
|
},
|
|
1010
1010
|
style: {
|
|
1011
1011
|
background: "none",
|
|
@@ -1024,7 +1024,7 @@ function _s({
|
|
|
1024
1024
|
Mn[x - 1],
|
|
1025
1025
|
" ",
|
|
1026
1026
|
C,
|
|
1027
|
-
/* @__PURE__ */ t(
|
|
1027
|
+
/* @__PURE__ */ t(Xe, { size: 13, style: { color: "var(--text-muted)" } })
|
|
1028
1028
|
]
|
|
1029
1029
|
}
|
|
1030
1030
|
),
|
|
@@ -1043,9 +1043,9 @@ function _s({
|
|
|
1043
1043
|
"button",
|
|
1044
1044
|
{
|
|
1045
1045
|
type: "button",
|
|
1046
|
-
onClick: () =>
|
|
1046
|
+
onClick: () => E((z) => z - B),
|
|
1047
1047
|
style: I,
|
|
1048
|
-
children: /* @__PURE__ */ t(
|
|
1048
|
+
children: /* @__PURE__ */ t(Tt, { size: 16 })
|
|
1049
1049
|
}
|
|
1050
1050
|
),
|
|
1051
1051
|
/* @__PURE__ */ l(
|
|
@@ -1074,7 +1074,7 @@ function _s({
|
|
|
1074
1074
|
"button",
|
|
1075
1075
|
{
|
|
1076
1076
|
type: "button",
|
|
1077
|
-
onClick: () =>
|
|
1077
|
+
onClick: () => E((z) => z + B),
|
|
1078
1078
|
style: I,
|
|
1079
1079
|
children: /* @__PURE__ */ t(st, { size: 16 })
|
|
1080
1080
|
}
|
|
@@ -1092,22 +1092,22 @@ function _s({
|
|
|
1092
1092
|
gap: 3,
|
|
1093
1093
|
marginBottom: 8
|
|
1094
1094
|
},
|
|
1095
|
-
children:
|
|
1096
|
-
const
|
|
1095
|
+
children: _l.map((z, h) => {
|
|
1096
|
+
const R = h + 1 === x;
|
|
1097
1097
|
return /* @__PURE__ */ t(
|
|
1098
1098
|
"button",
|
|
1099
1099
|
{
|
|
1100
1100
|
type: "button",
|
|
1101
|
-
onClick: () => y(
|
|
1101
|
+
onClick: () => y(h + 1),
|
|
1102
1102
|
style: {
|
|
1103
1103
|
border: "none",
|
|
1104
1104
|
cursor: "pointer",
|
|
1105
1105
|
borderRadius: 6,
|
|
1106
1106
|
fontSize: 11,
|
|
1107
|
-
fontWeight:
|
|
1107
|
+
fontWeight: R ? 700 : 400,
|
|
1108
1108
|
padding: "4px 0",
|
|
1109
|
-
background:
|
|
1110
|
-
color:
|
|
1109
|
+
background: R ? "var(--primary)" : "transparent",
|
|
1110
|
+
color: R ? "var(--primary-fg, #ffffff)" : "var(--text-secondary)"
|
|
1111
1111
|
},
|
|
1112
1112
|
children: z
|
|
1113
1113
|
},
|
|
@@ -1131,7 +1131,7 @@ function _s({
|
|
|
1131
1131
|
gap: 3
|
|
1132
1132
|
},
|
|
1133
1133
|
children: Y.map((z) => {
|
|
1134
|
-
const
|
|
1134
|
+
const h = z === C;
|
|
1135
1135
|
return /* @__PURE__ */ t(
|
|
1136
1136
|
"button",
|
|
1137
1137
|
{
|
|
@@ -1144,11 +1144,11 @@ function _s({
|
|
|
1144
1144
|
cursor: "pointer",
|
|
1145
1145
|
borderRadius: 6,
|
|
1146
1146
|
fontSize: 12,
|
|
1147
|
-
fontWeight:
|
|
1147
|
+
fontWeight: h ? 700 : 400,
|
|
1148
1148
|
padding: "6px 0",
|
|
1149
|
-
background:
|
|
1150
|
-
color:
|
|
1151
|
-
outline: z === (/* @__PURE__ */ new Date()).getFullYear() && !
|
|
1149
|
+
background: h ? "var(--primary)" : "transparent",
|
|
1150
|
+
color: h ? "var(--primary-fg, #ffffff)" : "var(--text-main)",
|
|
1151
|
+
outline: z === (/* @__PURE__ */ new Date()).getFullYear() && !h ? "2px solid var(--primary)" : "none",
|
|
1152
1152
|
outlineOffset: "-2px"
|
|
1153
1153
|
},
|
|
1154
1154
|
children: z
|
|
@@ -1191,19 +1191,19 @@ function _s({
|
|
|
1191
1191
|
style: {
|
|
1192
1192
|
display: "grid",
|
|
1193
1193
|
gridTemplateColumns: "repeat(7,1fr)",
|
|
1194
|
-
gridTemplateRows: `repeat(${
|
|
1194
|
+
gridTemplateRows: `repeat(${Xr},1fr)`,
|
|
1195
1195
|
padding: "4px 8px 10px",
|
|
1196
1196
|
gap: 2
|
|
1197
1197
|
},
|
|
1198
|
-
children: O.map((z,
|
|
1198
|
+
children: O.map((z, h) => {
|
|
1199
1199
|
if (z === null)
|
|
1200
|
-
return /* @__PURE__ */ t("div", { style: { aspectRatio: "1" } },
|
|
1201
|
-
const
|
|
1200
|
+
return /* @__PURE__ */ t("div", { style: { aspectRatio: "1" } }, h);
|
|
1201
|
+
const R = la(C, x, z), q = R === e, ae = R === i, re = !!(a && R < a);
|
|
1202
1202
|
return /* @__PURE__ */ t(
|
|
1203
1203
|
"button",
|
|
1204
1204
|
{
|
|
1205
1205
|
type: "button",
|
|
1206
|
-
onClick: () => !re &&
|
|
1206
|
+
onClick: () => !re && _(z),
|
|
1207
1207
|
style: {
|
|
1208
1208
|
width: "100%",
|
|
1209
1209
|
aspectRatio: "1",
|
|
@@ -1220,7 +1220,7 @@ function _s({
|
|
|
1220
1220
|
},
|
|
1221
1221
|
children: z
|
|
1222
1222
|
},
|
|
1223
|
-
|
|
1223
|
+
h
|
|
1224
1224
|
);
|
|
1225
1225
|
})
|
|
1226
1226
|
}
|
|
@@ -1244,11 +1244,11 @@ function _s({
|
|
|
1244
1244
|
},
|
|
1245
1245
|
children: [
|
|
1246
1246
|
/* @__PURE__ */ l("span", { className: "inline-flex items-center gap-2 min-w-0", children: [
|
|
1247
|
-
/* @__PURE__ */ t(
|
|
1247
|
+
/* @__PURE__ */ t(aa, { className: "w-4 h-4 text-[var(--text-muted)]" }),
|
|
1248
1248
|
/* @__PURE__ */ t("span", { className: "truncate", children: ql(e) })
|
|
1249
1249
|
] }),
|
|
1250
1250
|
/* @__PURE__ */ t(
|
|
1251
|
-
|
|
1251
|
+
Xe,
|
|
1252
1252
|
{
|
|
1253
1253
|
className: `w-4 h-4 text-[var(--text-muted)] transition-transform ${b ? "rotate-180" : ""}`
|
|
1254
1254
|
}
|
|
@@ -1280,7 +1280,7 @@ function Vl(e, r) {
|
|
|
1280
1280
|
}
|
|
1281
1281
|
e && (e.current = r);
|
|
1282
1282
|
}
|
|
1283
|
-
const
|
|
1283
|
+
const ia = xn(function({
|
|
1284
1284
|
label: r,
|
|
1285
1285
|
description: a,
|
|
1286
1286
|
error: n,
|
|
@@ -1346,7 +1346,7 @@ function Dn({
|
|
|
1346
1346
|
title: a,
|
|
1347
1347
|
copiedTitle: n = "Copiado",
|
|
1348
1348
|
copiedLabel: i,
|
|
1349
|
-
icon: c = /* @__PURE__ */ t(
|
|
1349
|
+
icon: c = /* @__PURE__ */ t(Fo, { size: 14 }),
|
|
1350
1350
|
copiedIcon: d = /* @__PURE__ */ t(Ue, { size: 14 }),
|
|
1351
1351
|
stopPropagation: m = !0,
|
|
1352
1352
|
onCopied: b,
|
|
@@ -1362,14 +1362,14 @@ function Dn({
|
|
|
1362
1362
|
Q(() => () => {
|
|
1363
1363
|
K.current && window.clearTimeout(K.current);
|
|
1364
1364
|
}, []);
|
|
1365
|
-
function B(
|
|
1366
|
-
A(!0), b == null || b(
|
|
1365
|
+
function B(E) {
|
|
1366
|
+
A(!0), b == null || b(E), K.current && window.clearTimeout(K.current), K.current = window.setTimeout(() => {
|
|
1367
1367
|
A(!1), K.current = null;
|
|
1368
1368
|
}, r);
|
|
1369
1369
|
}
|
|
1370
|
-
async function V(
|
|
1370
|
+
async function V(E) {
|
|
1371
1371
|
var Y;
|
|
1372
|
-
if (m &&
|
|
1372
|
+
if (m && E.stopPropagation(), C == null || C(E), E.defaultPrevented) return;
|
|
1373
1373
|
const H = Yl(e);
|
|
1374
1374
|
if (H)
|
|
1375
1375
|
try {
|
|
@@ -1416,7 +1416,7 @@ function Dn({
|
|
|
1416
1416
|
}
|
|
1417
1417
|
);
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1419
|
+
function Rs({
|
|
1420
1420
|
code: e,
|
|
1421
1421
|
children: r,
|
|
1422
1422
|
title: a = "Codigo",
|
|
@@ -1486,11 +1486,11 @@ function Fs({
|
|
|
1486
1486
|
}
|
|
1487
1487
|
);
|
|
1488
1488
|
}
|
|
1489
|
-
function
|
|
1489
|
+
function Zr(e) {
|
|
1490
1490
|
if (e !== void 0)
|
|
1491
1491
|
return typeof e == "number" ? `${e}px` : e;
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function qt({
|
|
1494
1494
|
value: e,
|
|
1495
1495
|
onChange: r,
|
|
1496
1496
|
options: a,
|
|
@@ -1509,7 +1509,7 @@ function Wt({
|
|
|
1509
1509
|
searchable: x = !0,
|
|
1510
1510
|
minOptionsForSearch: y = 6
|
|
1511
1511
|
}) {
|
|
1512
|
-
const [A, K] = L(!1), [B, V] = L(""), [
|
|
1512
|
+
const [A, K] = L(!1), [B, V] = L(""), [E, H] = L(-1), [Y, X] = L(!1), [j, U] = L({}), G = se(null), S = se(null), O = se(null), _ = se(null), I = x && a.length >= y, ee = a.find((M) => M.value === e) ?? null, z = c === "ghost", h = n === "error" ? "var(--danger)" : A ? "var(--primary)" : "var(--border)", R = I && B.trim() ? a.filter(
|
|
1513
1513
|
(M) => {
|
|
1514
1514
|
var me;
|
|
1515
1515
|
return M.label.toLowerCase().includes(B.toLowerCase()) || ((me = M.sublabel) == null ? void 0 : me.toLowerCase().includes(B.toLowerCase()));
|
|
@@ -1524,7 +1524,7 @@ function Wt({
|
|
|
1524
1524
|
top: pe ? void 0 : me.bottom + 4,
|
|
1525
1525
|
bottom: pe ? window.innerHeight - me.top + 4 : void 0,
|
|
1526
1526
|
width: me.width,
|
|
1527
|
-
minWidth:
|
|
1527
|
+
minWidth: Zr(f),
|
|
1528
1528
|
zIndex: 9999
|
|
1529
1529
|
});
|
|
1530
1530
|
}, [f, I]);
|
|
@@ -1547,10 +1547,10 @@ function Wt({
|
|
|
1547
1547
|
window.removeEventListener("resize", q), window.removeEventListener("scroll", q, !0);
|
|
1548
1548
|
};
|
|
1549
1549
|
}, [A, q]), Q(() => {
|
|
1550
|
-
if (
|
|
1551
|
-
const M =
|
|
1550
|
+
if (E < 0 || !_.current) return;
|
|
1551
|
+
const M = _.current.children[E];
|
|
1552
1552
|
M == null || M.scrollIntoView({ block: "nearest" });
|
|
1553
|
-
}, [
|
|
1553
|
+
}, [E]);
|
|
1554
1554
|
const ae = Ce(
|
|
1555
1555
|
(M) => {
|
|
1556
1556
|
r(M), K(!1), V("");
|
|
@@ -1562,7 +1562,7 @@ function Wt({
|
|
|
1562
1562
|
(M.key === "Enter" || M.key === " " || M.key === "ArrowDown") && (M.preventDefault(), K(!0));
|
|
1563
1563
|
return;
|
|
1564
1564
|
}
|
|
1565
|
-
M.key === "Escape" ? (M.preventDefault(), K(!1), V("")) : M.key === "ArrowDown" ? (M.preventDefault(), H((me) => Math.min(me + 1,
|
|
1565
|
+
M.key === "Escape" ? (M.preventDefault(), K(!1), V("")) : M.key === "ArrowDown" ? (M.preventDefault(), H((me) => Math.min(me + 1, R.length - 1))) : M.key === "ArrowUp" ? (M.preventDefault(), H((me) => Math.max(me - 1, b ? -1 : 0))) : M.key === "Enter" && (M.preventDefault(), E === -1 && b ? ae("") : R[E] && ae(R[E].value));
|
|
1566
1566
|
}
|
|
1567
1567
|
const ve = /* @__PURE__ */ l(
|
|
1568
1568
|
"div",
|
|
@@ -1624,7 +1624,7 @@ function Wt({
|
|
|
1624
1624
|
/* @__PURE__ */ l(
|
|
1625
1625
|
"ul",
|
|
1626
1626
|
{
|
|
1627
|
-
ref:
|
|
1627
|
+
ref: _,
|
|
1628
1628
|
role: "listbox",
|
|
1629
1629
|
className: "overflow-y-auto",
|
|
1630
1630
|
style: {
|
|
@@ -1645,15 +1645,15 @@ function Wt({
|
|
|
1645
1645
|
onMouseEnter: () => H(-1),
|
|
1646
1646
|
className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
|
|
1647
1647
|
style: {
|
|
1648
|
-
background:
|
|
1648
|
+
background: E === -1 ? "var(--bg-hover)" : "transparent",
|
|
1649
1649
|
color: "var(--text-muted)",
|
|
1650
1650
|
fontStyle: "italic"
|
|
1651
1651
|
},
|
|
1652
1652
|
children: b
|
|
1653
1653
|
}
|
|
1654
1654
|
),
|
|
1655
|
-
|
|
1656
|
-
const ie = me ===
|
|
1655
|
+
R.map((M, me) => {
|
|
1656
|
+
const ie = me === E, pe = M.value === e;
|
|
1657
1657
|
return /* @__PURE__ */ l(
|
|
1658
1658
|
"li",
|
|
1659
1659
|
{
|
|
@@ -1702,7 +1702,7 @@ function Wt({
|
|
|
1702
1702
|
M.value
|
|
1703
1703
|
);
|
|
1704
1704
|
}),
|
|
1705
|
-
|
|
1705
|
+
R.length === 0 && /* @__PURE__ */ t(
|
|
1706
1706
|
"li",
|
|
1707
1707
|
{
|
|
1708
1708
|
className: "px-3 py-4 text-sm text-center",
|
|
@@ -1732,11 +1732,11 @@ function Wt({
|
|
|
1732
1732
|
onClick: () => !p && K((M) => !M),
|
|
1733
1733
|
className: "flex w-full items-center gap-2 rounded-lg text-left text-sm transition-colors focus:outline-none",
|
|
1734
1734
|
style: {
|
|
1735
|
-
height:
|
|
1736
|
-
padding:
|
|
1735
|
+
height: Zr(C),
|
|
1736
|
+
padding: Zr(N),
|
|
1737
1737
|
background: z ? "transparent" : "var(--bg-input)",
|
|
1738
1738
|
color: ee ? "var(--text-main)" : "var(--text-muted)",
|
|
1739
|
-
border: z ? "1px solid transparent" : `1px solid ${
|
|
1739
|
+
border: z ? "1px solid transparent" : `1px solid ${h}`,
|
|
1740
1740
|
opacity: p ? 0.5 : 1,
|
|
1741
1741
|
cursor: p ? "not-allowed" : "pointer"
|
|
1742
1742
|
},
|
|
@@ -1775,7 +1775,7 @@ function Wt({
|
|
|
1775
1775
|
children: /* @__PURE__ */ t(Ie, { className: "w-3 h-3" })
|
|
1776
1776
|
}
|
|
1777
1777
|
) : /* @__PURE__ */ t(
|
|
1778
|
-
|
|
1778
|
+
Xe,
|
|
1779
1779
|
{
|
|
1780
1780
|
className: "flex-shrink-0 w-4 h-4 transition-transform",
|
|
1781
1781
|
style: {
|
|
@@ -1787,16 +1787,16 @@ function Wt({
|
|
|
1787
1787
|
]
|
|
1788
1788
|
}
|
|
1789
1789
|
),
|
|
1790
|
-
A && Y &&
|
|
1790
|
+
A && Y && Ze(ve, document.body)
|
|
1791
1791
|
]
|
|
1792
1792
|
}
|
|
1793
1793
|
);
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1795
|
+
function Cr(e) {
|
|
1796
1796
|
if (e !== void 0)
|
|
1797
1797
|
return typeof e == "number" ? `${e}px` : e;
|
|
1798
1798
|
}
|
|
1799
|
-
function
|
|
1799
|
+
function _s({
|
|
1800
1800
|
value: e,
|
|
1801
1801
|
onChange: r,
|
|
1802
1802
|
placeholder: a = "Buscar...",
|
|
@@ -1810,7 +1810,7 @@ function Rs({
|
|
|
1810
1810
|
xt,
|
|
1811
1811
|
{
|
|
1812
1812
|
className: "absolute top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)] pointer-events-none",
|
|
1813
|
-
style: { left:
|
|
1813
|
+
style: { left: Cr(d) }
|
|
1814
1814
|
}
|
|
1815
1815
|
),
|
|
1816
1816
|
/* @__PURE__ */ t(
|
|
@@ -1821,7 +1821,7 @@ function Rs({
|
|
|
1821
1821
|
onChange: (m) => r(m.target.value),
|
|
1822
1822
|
placeholder: a,
|
|
1823
1823
|
className: "w-full rounded-lg border border-[var(--border)] [background:var(--bg-card)] text-sm text-[var(--text-main)] placeholder:text-[var(--text-muted)] outline-none transition-[border-color,box-shadow] focus:border-primary focus:ring-2 focus:ring-primary/20",
|
|
1824
|
-
style: { height:
|
|
1824
|
+
style: { height: Cr(i), padding: Cr(c) }
|
|
1825
1825
|
}
|
|
1826
1826
|
)
|
|
1827
1827
|
] });
|
|
@@ -1846,12 +1846,12 @@ function Ps({
|
|
|
1846
1846
|
"span",
|
|
1847
1847
|
{
|
|
1848
1848
|
className: "pointer-events-none absolute top-1/2 z-10 -translate-y-1/2 text-[var(--text-muted)]",
|
|
1849
|
-
style: { left:
|
|
1849
|
+
style: { left: Cr(b) },
|
|
1850
1850
|
children: i
|
|
1851
1851
|
}
|
|
1852
1852
|
),
|
|
1853
1853
|
/* @__PURE__ */ t(
|
|
1854
|
-
|
|
1854
|
+
qt,
|
|
1855
1855
|
{
|
|
1856
1856
|
value: e,
|
|
1857
1857
|
onChange: r,
|
|
@@ -1874,7 +1874,7 @@ const Gl = {
|
|
|
1874
1874
|
"2xl": "48rem",
|
|
1875
1875
|
"4xl": "56rem",
|
|
1876
1876
|
"5xl": "64rem"
|
|
1877
|
-
},
|
|
1877
|
+
}, vr = 180, Xl = "bg-[color-mix(in_srgb,var(--bg-main)_72%,transparent)] backdrop-blur-sm";
|
|
1878
1878
|
function Bn({
|
|
1879
1879
|
open: e,
|
|
1880
1880
|
onClose: r,
|
|
@@ -1898,10 +1898,10 @@ function Bn({
|
|
|
1898
1898
|
ariaLabel: B,
|
|
1899
1899
|
frameless: V = !1
|
|
1900
1900
|
}) {
|
|
1901
|
-
const [
|
|
1901
|
+
const [E, H] = L(!1), [Y, X] = L(!1), j = se(null);
|
|
1902
1902
|
if (Q(() => (e ? (j.current && clearTimeout(j.current), H(!0), requestAnimationFrame(() => requestAnimationFrame(() => X(!0)))) : (X(!1), j.current = setTimeout(
|
|
1903
1903
|
() => H(!1),
|
|
1904
|
-
|
|
1904
|
+
vr + 40
|
|
1905
1905
|
)), () => {
|
|
1906
1906
|
j.current && clearTimeout(j.current);
|
|
1907
1907
|
}), [e]), Q(() => {
|
|
@@ -1915,9 +1915,9 @@ function Bn({
|
|
|
1915
1915
|
ee.key === "Escape" && r();
|
|
1916
1916
|
};
|
|
1917
1917
|
return window.addEventListener("keydown", I), () => window.removeEventListener("keydown", I);
|
|
1918
|
-
}, [f, r, e]),
|
|
1919
|
-
const U = a || n || i || c || C, G = p ?? Gl[b], S = N === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", O = N === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl",
|
|
1920
|
-
return
|
|
1918
|
+
}, [f, r, e]), !E) return null;
|
|
1919
|
+
const U = a || n || i || c || C, G = p ?? Gl[b], S = N === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", O = N === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl", _ = Y ? "translateY(0) scale(1)" : N === "bottom-mobile" ? "translateY(16px) scale(0.98)" : "translateY(10px) scale(0.96)";
|
|
1920
|
+
return Ze(
|
|
1921
1921
|
/* @__PURE__ */ l(
|
|
1922
1922
|
"div",
|
|
1923
1923
|
{
|
|
@@ -1935,7 +1935,7 @@ function Bn({
|
|
|
1935
1935
|
onClick: k ? r : void 0,
|
|
1936
1936
|
style: {
|
|
1937
1937
|
opacity: Y ? 1 : 0,
|
|
1938
|
-
transition: `opacity ${
|
|
1938
|
+
transition: `opacity ${vr}ms ease`
|
|
1939
1939
|
}
|
|
1940
1940
|
}
|
|
1941
1941
|
),
|
|
@@ -1948,8 +1948,8 @@ function Bn({
|
|
|
1948
1948
|
background: V ? "transparent" : "var(--bg-card)",
|
|
1949
1949
|
border: V ? "none" : "1px solid var(--border)",
|
|
1950
1950
|
opacity: Y ? 1 : 0,
|
|
1951
|
-
transform:
|
|
1952
|
-
transition: `opacity ${
|
|
1951
|
+
transform: _,
|
|
1952
|
+
transition: `opacity ${vr}ms ease, transform ${vr}ms ease`
|
|
1953
1953
|
},
|
|
1954
1954
|
onClick: (I) => I.stopPropagation(),
|
|
1955
1955
|
children: [
|
|
@@ -2069,7 +2069,7 @@ function Ws({
|
|
|
2069
2069
|
background: p.iconBg
|
|
2070
2070
|
},
|
|
2071
2071
|
children: /* @__PURE__ */ t(
|
|
2072
|
-
|
|
2072
|
+
ca,
|
|
2073
2073
|
{
|
|
2074
2074
|
className: "h-5 w-5",
|
|
2075
2075
|
style: { color: p.iconColor }
|
|
@@ -2139,7 +2139,7 @@ function qs({
|
|
|
2139
2139
|
}
|
|
2140
2140
|
);
|
|
2141
2141
|
}
|
|
2142
|
-
const
|
|
2142
|
+
const Mr = [
|
|
2143
2143
|
{ value: "equals", label: "Igual a", valueMode: "single" },
|
|
2144
2144
|
{ value: "notEquals", label: "No es igual a", valueMode: "single" },
|
|
2145
2145
|
{ value: "greaterThan", label: "Mayor que", valueMode: "single" },
|
|
@@ -2159,7 +2159,7 @@ const Cr = [
|
|
|
2159
2159
|
{ value: "bottom10", label: "10 inferiores", valueMode: "none" },
|
|
2160
2160
|
{ value: "aboveAverage", label: "Sobre promedio", valueMode: "none" },
|
|
2161
2161
|
{ value: "belowAverage", label: "Bajo promedio", valueMode: "none" }
|
|
2162
|
-
], Ql =
|
|
2162
|
+
], Ql = Mr.map((e) => ({
|
|
2163
2163
|
value: e.value,
|
|
2164
2164
|
label: e.label
|
|
2165
2165
|
})), ei = 12, ti = {
|
|
@@ -2214,12 +2214,12 @@ function si(e) {
|
|
|
2214
2214
|
pagination: !1
|
|
2215
2215
|
} : { ...ti, ...e ?? {} };
|
|
2216
2216
|
}
|
|
2217
|
-
function
|
|
2217
|
+
function xr(e) {
|
|
2218
2218
|
if (!e || typeof e != "object") return !1;
|
|
2219
2219
|
const r = e;
|
|
2220
2220
|
return typeof r.key == "string" && (r.dir === "asc" || r.dir === "desc");
|
|
2221
2221
|
}
|
|
2222
|
-
function
|
|
2222
|
+
function gr(e, r) {
|
|
2223
2223
|
if (!e || typeof e != "object" || Array.isArray(e)) return {};
|
|
2224
2224
|
const a = Object.entries(e).flatMap(
|
|
2225
2225
|
([n, i]) => {
|
|
@@ -2232,10 +2232,10 @@ function pr(e, r) {
|
|
|
2232
2232
|
);
|
|
2233
2233
|
return Object.fromEntries(a);
|
|
2234
2234
|
}
|
|
2235
|
-
function
|
|
2235
|
+
function yr(e, r) {
|
|
2236
2236
|
if (!e || typeof e != "object" || Array.isArray(e)) return {};
|
|
2237
2237
|
const a = new Set(
|
|
2238
|
-
|
|
2238
|
+
Mr.map((i) => i.value)
|
|
2239
2239
|
), n = Object.entries(e).flatMap(
|
|
2240
2240
|
([i, c]) => {
|
|
2241
2241
|
if (!r.has(i) || !c || typeof c != "object")
|
|
@@ -2293,21 +2293,21 @@ function ft(e, r) {
|
|
|
2293
2293
|
function ui(e) {
|
|
2294
2294
|
return e == null || e === "" ? "(Vacio)" : e instanceof Date ? e.toLocaleDateString() : String(e);
|
|
2295
2295
|
}
|
|
2296
|
-
function
|
|
2297
|
-
return e == null || typeof e == "boolean" ? "" : typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(
|
|
2296
|
+
function Mt(e) {
|
|
2297
|
+
return e == null || typeof e == "boolean" ? "" : typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(Mt).join(" ").trim() : je.isValidElement(e) ? Mt(e.props.children) : "";
|
|
2298
2298
|
}
|
|
2299
|
-
function
|
|
2299
|
+
function wr(e, r) {
|
|
2300
2300
|
const a = e.filterValue ? e.filterValue(r) : e.sortKey ? r[e.sortKey] : e.cell(r);
|
|
2301
|
-
return typeof a == "string" || typeof a == "number" || typeof a == "boolean" || a === null || a === void 0 || a instanceof Date ? ui(a) :
|
|
2301
|
+
return typeof a == "string" || typeof a == "number" || typeof a == "boolean" || a === null || a === void 0 || a instanceof Date ? ui(a) : Mt(a).trim();
|
|
2302
2302
|
}
|
|
2303
|
-
function
|
|
2303
|
+
function Wt(e) {
|
|
2304
2304
|
const r = e.replace(/,/g, "").trim();
|
|
2305
2305
|
if (!r) return null;
|
|
2306
2306
|
const a = Number(r);
|
|
2307
2307
|
return Number.isFinite(a) ? a : null;
|
|
2308
2308
|
}
|
|
2309
|
-
function
|
|
2310
|
-
const a =
|
|
2309
|
+
function Lt(e, r) {
|
|
2310
|
+
const a = Wt(e), n = Wt(r);
|
|
2311
2311
|
return a !== null && n !== null ? a - n : e.localeCompare(r, void 0, {
|
|
2312
2312
|
numeric: !0,
|
|
2313
2313
|
sensitivity: "base"
|
|
@@ -2315,7 +2315,7 @@ function $t(e, r) {
|
|
|
2315
2315
|
}
|
|
2316
2316
|
function mi(e, r, a) {
|
|
2317
2317
|
var d, m;
|
|
2318
|
-
const n = ((d = r.value) == null ? void 0 : d.trim()) ?? "", i = ((m = r.valueTo) == null ? void 0 : m.trim()) ?? "", c =
|
|
2318
|
+
const n = ((d = r.value) == null ? void 0 : d.trim()) ?? "", i = ((m = r.valueTo) == null ? void 0 : m.trim()) ?? "", c = Mr.find(
|
|
2319
2319
|
(b) => b.value === r.operator
|
|
2320
2320
|
);
|
|
2321
2321
|
if ((c == null ? void 0 : c.valueMode) === "single" && !n || (c == null ? void 0 : c.valueMode) === "between" && (!n || !i))
|
|
@@ -2326,27 +2326,27 @@ function mi(e, r, a) {
|
|
|
2326
2326
|
case "notEquals":
|
|
2327
2327
|
return e.toLowerCase() !== n.toLowerCase();
|
|
2328
2328
|
case "greaterThan":
|
|
2329
|
-
return
|
|
2329
|
+
return Lt(e, n) > 0;
|
|
2330
2330
|
case "greaterThanOrEqual":
|
|
2331
|
-
return
|
|
2331
|
+
return Lt(e, n) >= 0;
|
|
2332
2332
|
case "lessThan":
|
|
2333
|
-
return
|
|
2333
|
+
return Lt(e, n) < 0;
|
|
2334
2334
|
case "lessThanOrEqual":
|
|
2335
|
-
return
|
|
2335
|
+
return Lt(e, n) <= 0;
|
|
2336
2336
|
case "between":
|
|
2337
|
-
return
|
|
2337
|
+
return Lt(e, n) >= 0 && Lt(e, i) <= 0;
|
|
2338
2338
|
case "top10":
|
|
2339
2339
|
case "bottom10": {
|
|
2340
|
-
const p = a.map((k) => ({ value: k, number:
|
|
2340
|
+
const p = a.map((k) => ({ value: k, number: Wt(k) })).filter(
|
|
2341
2341
|
(k) => k.number !== null
|
|
2342
2342
|
).sort((k, f) => k.number - f.number).map((k) => k.value);
|
|
2343
2343
|
return (r.operator === "top10" ? p.slice(-10) : p.slice(0, 10)).includes(e);
|
|
2344
2344
|
}
|
|
2345
2345
|
case "aboveAverage":
|
|
2346
2346
|
case "belowAverage": {
|
|
2347
|
-
const b = a.map(
|
|
2347
|
+
const b = a.map(Wt).filter((k) => k !== null);
|
|
2348
2348
|
if (b.length === 0) return !1;
|
|
2349
|
-
const p = b.reduce((k, f) => k + f, 0) / b.length, w =
|
|
2349
|
+
const p = b.reduce((k, f) => k + f, 0) / b.length, w = Wt(e);
|
|
2350
2350
|
return w === null ? !1 : r.operator === "aboveAverage" ? w > p : w < p;
|
|
2351
2351
|
}
|
|
2352
2352
|
default:
|
|
@@ -2359,7 +2359,7 @@ function Za({
|
|
|
2359
2359
|
style: a
|
|
2360
2360
|
}) {
|
|
2361
2361
|
return /* @__PURE__ */ t(
|
|
2362
|
-
|
|
2362
|
+
Ut,
|
|
2363
2363
|
{
|
|
2364
2364
|
onlyWhenOverflow: !0,
|
|
2365
2365
|
className: r,
|
|
@@ -2396,7 +2396,7 @@ function Us({
|
|
|
2396
2396
|
highlightSelected: K = !0,
|
|
2397
2397
|
rowClassName: B,
|
|
2398
2398
|
getRowCategory: V,
|
|
2399
|
-
stickyHeader:
|
|
2399
|
+
stickyHeader: E = !0,
|
|
2400
2400
|
pageSize: H = 25,
|
|
2401
2401
|
pageSizeOptions: Y = [25, 50, 100],
|
|
2402
2402
|
pageSizeSelectWidth: X = 62,
|
|
@@ -2405,12 +2405,12 @@ function Us({
|
|
|
2405
2405
|
totalRows: G,
|
|
2406
2406
|
page: S,
|
|
2407
2407
|
onPageChange: O,
|
|
2408
|
-
onPageSizeChange:
|
|
2408
|
+
onPageSizeChange: _,
|
|
2409
2409
|
storageKey: I,
|
|
2410
2410
|
stickyFirstColumn: ee = !1,
|
|
2411
2411
|
bottomOffset: z = 0,
|
|
2412
|
-
compact:
|
|
2413
|
-
restrictHeight:
|
|
2412
|
+
compact: h = !0,
|
|
2413
|
+
restrictHeight: R = !0,
|
|
2414
2414
|
maxHeight: q,
|
|
2415
2415
|
minTableWidth: ae,
|
|
2416
2416
|
enableColumnVisibility: re = !0,
|
|
@@ -2427,7 +2427,7 @@ function Us({
|
|
|
2427
2427
|
bqlPlaceholder: xe = `status = activo
|
|
2428
2428
|
rol IN (admin, employee)`,
|
|
2429
2429
|
bqlQuickFilters: le = [],
|
|
2430
|
-
bqlExamples:
|
|
2430
|
+
bqlExamples: $ = [],
|
|
2431
2431
|
bqlSuggestions: P = [],
|
|
2432
2432
|
bqlActiveFilters: ce,
|
|
2433
2433
|
bqlError: de,
|
|
@@ -2437,46 +2437,46 @@ rol IN (admin, employee)`,
|
|
|
2437
2437
|
exportFilename: Ne = "datos"
|
|
2438
2438
|
}) {
|
|
2439
2439
|
var Pa;
|
|
2440
|
-
const ue = si(be),
|
|
2440
|
+
const ue = si(be), Fe = Object.values(ue).some(Boolean), Qe = e.map((o) => o.key).join(","), qe = me.join(","), Z = se(e), Me = se(me);
|
|
2441
2441
|
Z.current = e, Me.current = me;
|
|
2442
|
-
const [Te,
|
|
2443
|
-
!I || !
|
|
2444
|
-
), De = se(null),
|
|
2445
|
-
|
|
2442
|
+
const [Te, _e] = L(
|
|
2443
|
+
!I || !Fe
|
|
2444
|
+
), De = se(null), et = se(!I), Re = M !== void 0, [Un, At] = L(() => ft(me, e)), Pe = ft(
|
|
2445
|
+
Re ? M : Un,
|
|
2446
2446
|
e
|
|
2447
|
-
), [nt,
|
|
2447
|
+
), [nt, Vt] = L(!1), [ct, Vn] = L("filter"), [Dt, Kt] = L(
|
|
2448
2448
|
null
|
|
2449
|
-
), [
|
|
2449
|
+
), [ua, ma] = L(""), [We, Bt] = L({}), [Ve, Yt] = L({}), Tr = k !== void 0, [ba, Kn] = L(f), Ot = W !== void 0, [Yn, Ar] = L(te), tt = Ot ? W : Yn, [Gt, Xt] = L(tt), [rt, dt] = L(!1), [pa, gt] = L(!1), [fa, yt] = L(!1), [It, Ht] = L([]), Dr = se(null), ha = se(null), Br = se(null), [Gn, Xn] = L(
|
|
2450
2450
|
{}
|
|
2451
2451
|
), [Zn, Jn] = L(
|
|
2452
2452
|
{}
|
|
2453
|
-
), [
|
|
2453
|
+
), [jt, Zt] = L(!1), Or = se(null), Jt = se(null), [Qn, eo] = L(
|
|
2454
2454
|
{}
|
|
2455
|
-
),
|
|
2455
|
+
), va = se(null), Qt = se(null), [Ir, xa] = L(
|
|
2456
2456
|
r.length > 0 || n || m === !1
|
|
2457
|
-
),
|
|
2457
|
+
), ga = (o, s) => 50 + (o * 17 + s * 13 + 7) % 40, ot = se(null), [to, ro] = L(
|
|
2458
2458
|
void 0
|
|
2459
|
-
), [
|
|
2459
|
+
), [ya, ao] = L(0), [Hr, no] = L(!1);
|
|
2460
2460
|
Q(() => {
|
|
2461
2461
|
function o() {
|
|
2462
2462
|
no(window.innerWidth < 640);
|
|
2463
2463
|
}
|
|
2464
|
-
if (!
|
|
2464
|
+
if (!R || q !== void 0)
|
|
2465
2465
|
return o(), window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
|
|
2466
2466
|
const g = H !== !1 ? 48 : 0, u = 12;
|
|
2467
|
-
function
|
|
2467
|
+
function F() {
|
|
2468
2468
|
if (o(), !ot.current) return;
|
|
2469
|
-
const
|
|
2469
|
+
const v = ot.current.getBoundingClientRect().top;
|
|
2470
2470
|
ro(
|
|
2471
2471
|
Math.max(
|
|
2472
2472
|
120,
|
|
2473
|
-
window.innerHeight -
|
|
2473
|
+
window.innerHeight - v - g - u - z
|
|
2474
2474
|
)
|
|
2475
2475
|
);
|
|
2476
2476
|
}
|
|
2477
|
-
return
|
|
2478
|
-
}, [n, H, z,
|
|
2479
|
-
const
|
|
2477
|
+
return F(), window.addEventListener("resize", F), () => window.removeEventListener("resize", F);
|
|
2478
|
+
}, [n, H, z, R, q]);
|
|
2479
|
+
const wa = R ? q ?? to : void 0;
|
|
2480
2480
|
Q(() => {
|
|
2481
2481
|
const o = ot.current;
|
|
2482
2482
|
if (!o) return;
|
|
@@ -2487,168 +2487,168 @@ rol IN (admin, employee)`,
|
|
|
2487
2487
|
return g.observe(o), () => g.disconnect();
|
|
2488
2488
|
}, [n, Te, r.length]), Q(() => {
|
|
2489
2489
|
if (m === !1 || n || r.length > 0) {
|
|
2490
|
-
|
|
2490
|
+
xa(!0);
|
|
2491
2491
|
return;
|
|
2492
2492
|
}
|
|
2493
|
-
if (
|
|
2493
|
+
if (Ir) return;
|
|
2494
2494
|
const o = window.setTimeout(() => {
|
|
2495
|
-
|
|
2495
|
+
xa(!0);
|
|
2496
2496
|
}, m);
|
|
2497
2497
|
return () => window.clearTimeout(o);
|
|
2498
|
-
}, [r.length, m,
|
|
2499
|
-
const [wt,
|
|
2498
|
+
}, [r.length, m, Ir, n]);
|
|
2499
|
+
const [wt, zt] = L(
|
|
2500
2500
|
() => e.map((o) => o.key)
|
|
2501
|
-
), [Nt,
|
|
2501
|
+
), [Nt, Ft] = L(
|
|
2502
2502
|
() => Object.fromEntries(
|
|
2503
2503
|
e.map((o) => [o.key, at(o, pt(o.width))])
|
|
2504
2504
|
)
|
|
2505
|
-
), [$e, kt] = L(null), [oo,
|
|
2505
|
+
), [$e, kt] = L(null), [oo, er] = L(1), [tr, jr] = L(
|
|
2506
2506
|
H === !1 ? 0 : H
|
|
2507
2507
|
);
|
|
2508
2508
|
Q(() => {
|
|
2509
|
-
const o = Z.current, s = Me.current, g = o.map((
|
|
2510
|
-
if (!I || !
|
|
2511
|
-
ue.layout &&
|
|
2509
|
+
const o = Z.current, s = Me.current, g = o.map((v) => v.key), u = new Set(g);
|
|
2510
|
+
if (!I || !Fe) {
|
|
2511
|
+
ue.layout && zt(g), Re || At(
|
|
2512
2512
|
ft(
|
|
2513
2513
|
s,
|
|
2514
2514
|
o
|
|
2515
2515
|
)
|
|
2516
|
-
),
|
|
2516
|
+
), et.current = !1, _e(!0);
|
|
2517
2517
|
return;
|
|
2518
2518
|
}
|
|
2519
|
-
let
|
|
2520
|
-
return
|
|
2519
|
+
let F = !1;
|
|
2520
|
+
return et.current = !1, _e(!1), fetch(
|
|
2521
2521
|
`/api/user/preferences/datatables?key=${encodeURIComponent(I)}`,
|
|
2522
2522
|
{ cache: "no-store" }
|
|
2523
|
-
).then((
|
|
2524
|
-
if (
|
|
2525
|
-
const oe = Xa(I), D = li(
|
|
2523
|
+
).then((v) => v.ok ? v.json() : null).then((v) => {
|
|
2524
|
+
if (F) return;
|
|
2525
|
+
const oe = Xa(I), D = li(v == null ? void 0 : v.settings) ? v == null ? void 0 : v.settings : oe, Le = ue.layout ? D == null ? void 0 : D.columnOrder : void 0, ke = Array.isArray(Le) ? Le.filter((Ae) => g.includes(Ae)) : [], fe = g.filter((Ae) => !ke.includes(Ae)), ge = ke.length > 0 ? [...ke, ...fe] : g, he = Object.fromEntries(
|
|
2526
2526
|
o.map((Ae) => [
|
|
2527
2527
|
Ae.key,
|
|
2528
2528
|
at(Ae, pt(Ae.width))
|
|
2529
2529
|
])
|
|
2530
|
-
), Oe = ue.layout ? (D == null ? void 0 : D.columnWidths) ?? {} : {},
|
|
2530
|
+
), Oe = ue.layout ? (D == null ? void 0 : D.columnWidths) ?? {} : {}, we = Object.fromEntries(
|
|
2531
2531
|
o.map((Ae) => [
|
|
2532
2532
|
Ae.key,
|
|
2533
2533
|
at(Ae, Oe[Ae.key] ?? he[Ae.key])
|
|
2534
2534
|
])
|
|
2535
|
-
),
|
|
2535
|
+
), pr = ft(
|
|
2536
2536
|
ue.layout ? (D == null ? void 0 : D.hiddenColumnKeys) ?? s : s,
|
|
2537
2537
|
o
|
|
2538
2538
|
);
|
|
2539
|
-
if (ue.layout && (
|
|
2540
|
-
|
|
2541
|
-
),
|
|
2542
|
-
|
|
2539
|
+
if (ue.layout && (zt(ge), Ft(we)), Re || At(pr), ue.filters && (Bt(
|
|
2540
|
+
gr(D == null ? void 0 : D.filters, u)
|
|
2541
|
+
), Yt(
|
|
2542
|
+
yr(
|
|
2543
2543
|
D == null ? void 0 : D.conditionFilters,
|
|
2544
2544
|
u
|
|
2545
2545
|
)
|
|
2546
2546
|
)), ue.sort) {
|
|
2547
|
-
const Ae =
|
|
2547
|
+
const Ae = xr(D == null ? void 0 : D.sort) ? D.sort : null;
|
|
2548
2548
|
kt(Ae && u.has(Ae.key) ? Ae : null);
|
|
2549
2549
|
}
|
|
2550
2550
|
if (ue.bql) {
|
|
2551
2551
|
const Ae = typeof (D == null ? void 0 : D.bql) == "string" ? D.bql : te;
|
|
2552
|
-
|
|
2552
|
+
Ot ? J == null || J(Ae) : Ar(Ae);
|
|
2553
2553
|
}
|
|
2554
|
-
ue.bql &&
|
|
2554
|
+
ue.bql && Ht(
|
|
2555
2555
|
Array.isArray(D == null ? void 0 : D.bqlHistory) ? D.bqlHistory.filter(
|
|
2556
2556
|
(Ae) => typeof Ae == "string"
|
|
2557
2557
|
) : []
|
|
2558
|
-
), ue.pagination && typeof (D == null ? void 0 : D.pageSize) == "number" && D.pageSize > 0 &&
|
|
2558
|
+
), ue.pagination && typeof (D == null ? void 0 : D.pageSize) == "number" && D.pageSize > 0 && jr(D.pageSize), De.current = JSON.stringify({
|
|
2559
2559
|
columnOrder: ge,
|
|
2560
|
-
columnWidths:
|
|
2561
|
-
hiddenColumnKeys:
|
|
2562
|
-
filters:
|
|
2563
|
-
conditionFilters:
|
|
2560
|
+
columnWidths: we,
|
|
2561
|
+
hiddenColumnKeys: pr,
|
|
2562
|
+
filters: gr(D == null ? void 0 : D.filters, u),
|
|
2563
|
+
conditionFilters: yr(
|
|
2564
2564
|
D == null ? void 0 : D.conditionFilters,
|
|
2565
2565
|
u
|
|
2566
2566
|
),
|
|
2567
|
-
sort:
|
|
2567
|
+
sort: xr(D == null ? void 0 : D.sort) ? D.sort : null,
|
|
2568
2568
|
bql: typeof (D == null ? void 0 : D.bql) == "string" ? D.bql : "",
|
|
2569
2569
|
bqlHistory: Array.isArray(D == null ? void 0 : D.bqlHistory) ? D.bqlHistory : [],
|
|
2570
2570
|
pageSize: typeof (D == null ? void 0 : D.pageSize) == "number" ? D.pageSize : void 0
|
|
2571
|
-
}),
|
|
2571
|
+
}), et.current = !0;
|
|
2572
2572
|
}).catch(() => {
|
|
2573
|
-
if (!
|
|
2574
|
-
const
|
|
2575
|
-
o.map((
|
|
2576
|
-
|
|
2577
|
-
at(
|
|
2573
|
+
if (!F) {
|
|
2574
|
+
const v = Xa(I), oe = ue.layout ? v == null ? void 0 : v.columnOrder : void 0, D = Array.isArray(oe) ? oe.filter((we) => g.includes(we)) : [], Le = g.filter((we) => !D.includes(we)), ke = D.length > 0 ? [...D, ...Le] : g, fe = Object.fromEntries(
|
|
2575
|
+
o.map((we) => [
|
|
2576
|
+
we.key,
|
|
2577
|
+
at(we, pt(we.width))
|
|
2578
2578
|
])
|
|
2579
|
-
), ge = ue.layout ? (
|
|
2580
|
-
o.map((
|
|
2581
|
-
|
|
2582
|
-
at(
|
|
2579
|
+
), ge = ue.layout ? (v == null ? void 0 : v.columnWidths) ?? {} : {}, he = Object.fromEntries(
|
|
2580
|
+
o.map((we) => [
|
|
2581
|
+
we.key,
|
|
2582
|
+
at(we, ge[we.key] ?? fe[we.key])
|
|
2583
2583
|
])
|
|
2584
2584
|
);
|
|
2585
|
-
ue.layout && (
|
|
2585
|
+
ue.layout && (zt(ke), Ft(he));
|
|
2586
2586
|
const Oe = ft(
|
|
2587
|
-
ue.layout ? (
|
|
2587
|
+
ue.layout ? (v == null ? void 0 : v.hiddenColumnKeys) ?? s : s,
|
|
2588
2588
|
o
|
|
2589
2589
|
);
|
|
2590
|
-
if (
|
|
2591
|
-
|
|
2592
|
-
),
|
|
2593
|
-
|
|
2594
|
-
|
|
2590
|
+
if (Re || At(Oe), ue.filters && (Bt(
|
|
2591
|
+
gr(v == null ? void 0 : v.filters, u)
|
|
2592
|
+
), Yt(
|
|
2593
|
+
yr(
|
|
2594
|
+
v == null ? void 0 : v.conditionFilters,
|
|
2595
2595
|
u
|
|
2596
2596
|
)
|
|
2597
2597
|
)), ue.sort) {
|
|
2598
|
-
const
|
|
2598
|
+
const we = xr(v == null ? void 0 : v.sort) ? v.sort : null;
|
|
2599
2599
|
kt(
|
|
2600
|
-
|
|
2600
|
+
we && u.has(we.key) ? we : null
|
|
2601
2601
|
);
|
|
2602
2602
|
}
|
|
2603
2603
|
if (ue.bql) {
|
|
2604
|
-
const
|
|
2605
|
-
|
|
2604
|
+
const we = typeof (v == null ? void 0 : v.bql) == "string" ? v.bql : te;
|
|
2605
|
+
Ot ? J == null || J(we) : Ar(we);
|
|
2606
2606
|
}
|
|
2607
|
-
ue.bql &&
|
|
2608
|
-
Array.isArray(
|
|
2609
|
-
(
|
|
2607
|
+
ue.bql && Ht(
|
|
2608
|
+
Array.isArray(v == null ? void 0 : v.bqlHistory) ? v.bqlHistory.filter(
|
|
2609
|
+
(we) => typeof we == "string"
|
|
2610
2610
|
) : []
|
|
2611
|
-
), ue.pagination && typeof (
|
|
2611
|
+
), ue.pagination && typeof (v == null ? void 0 : v.pageSize) == "number" && v.pageSize > 0 && jr(v.pageSize), De.current = JSON.stringify({
|
|
2612
2612
|
columnOrder: ke,
|
|
2613
2613
|
columnWidths: he,
|
|
2614
2614
|
hiddenColumnKeys: Oe,
|
|
2615
|
-
filters:
|
|
2616
|
-
|
|
2615
|
+
filters: gr(
|
|
2616
|
+
v == null ? void 0 : v.filters,
|
|
2617
2617
|
u
|
|
2618
2618
|
),
|
|
2619
|
-
conditionFilters:
|
|
2620
|
-
|
|
2619
|
+
conditionFilters: yr(
|
|
2620
|
+
v == null ? void 0 : v.conditionFilters,
|
|
2621
2621
|
u
|
|
2622
2622
|
),
|
|
2623
|
-
sort:
|
|
2624
|
-
bql: typeof (
|
|
2625
|
-
bqlHistory: Array.isArray(
|
|
2626
|
-
pageSize: typeof (
|
|
2627
|
-
}),
|
|
2623
|
+
sort: xr(v == null ? void 0 : v.sort) ? v.sort : null,
|
|
2624
|
+
bql: typeof (v == null ? void 0 : v.bql) == "string" ? v.bql : "",
|
|
2625
|
+
bqlHistory: Array.isArray(v == null ? void 0 : v.bqlHistory) ? v.bqlHistory : [],
|
|
2626
|
+
pageSize: typeof (v == null ? void 0 : v.pageSize) == "number" ? v.pageSize : void 0
|
|
2627
|
+
}), et.current = !0;
|
|
2628
2628
|
}
|
|
2629
2629
|
}).finally(() => {
|
|
2630
|
-
|
|
2630
|
+
F || _e(!0);
|
|
2631
2631
|
}), () => {
|
|
2632
|
-
|
|
2632
|
+
F = !0;
|
|
2633
2633
|
};
|
|
2634
2634
|
}, [
|
|
2635
2635
|
I,
|
|
2636
|
-
_e,
|
|
2637
|
-
Ze,
|
|
2638
|
-
qe,
|
|
2639
2636
|
Fe,
|
|
2637
|
+
Qe,
|
|
2638
|
+
qe,
|
|
2639
|
+
Re,
|
|
2640
2640
|
ue.layout,
|
|
2641
2641
|
ue.filters,
|
|
2642
2642
|
ue.sort,
|
|
2643
2643
|
ue.bql,
|
|
2644
2644
|
ue.pagination,
|
|
2645
|
-
|
|
2645
|
+
Ot,
|
|
2646
2646
|
J,
|
|
2647
2647
|
te
|
|
2648
2648
|
]), Q(() => {
|
|
2649
|
-
if (!I || !Te || !
|
|
2649
|
+
if (!I || !Te || !Fe || !et.current) return;
|
|
2650
2650
|
const o = {};
|
|
2651
|
-
ue.layout && (o.columnOrder = wt, o.columnWidths = Nt, o.hiddenColumnKeys = Pe), ue.filters && (o.filters = We, o.conditionFilters = Ve), ue.sort && (o.sort = $e), ue.bql && (o.bql =
|
|
2651
|
+
ue.layout && (o.columnOrder = wt, o.columnWidths = Nt, o.hiddenColumnKeys = Pe), ue.filters && (o.filters = We, o.conditionFilters = Ve), ue.sort && (o.sort = $e), ue.bql && (o.bql = tt, o.bqlHistory = It), ue.pagination && H !== !1 && (o.pageSize = tr);
|
|
2652
2652
|
const s = JSON.stringify(o);
|
|
2653
2653
|
if (s === De.current) return;
|
|
2654
2654
|
ii(I, o), De.current = s;
|
|
@@ -2669,75 +2669,75 @@ rol IN (admin, employee)`,
|
|
|
2669
2669
|
We,
|
|
2670
2670
|
Ve,
|
|
2671
2671
|
$e,
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2672
|
+
tt,
|
|
2673
|
+
It,
|
|
2674
|
+
tr,
|
|
2675
2675
|
H,
|
|
2676
2676
|
I,
|
|
2677
2677
|
Te,
|
|
2678
|
-
|
|
2678
|
+
Fe,
|
|
2679
2679
|
ue.layout,
|
|
2680
2680
|
ue.filters,
|
|
2681
2681
|
ue.sort,
|
|
2682
2682
|
ue.bql,
|
|
2683
2683
|
ue.pagination
|
|
2684
2684
|
]), Q(() => {
|
|
2685
|
-
|
|
2686
|
-
const s = e.map((
|
|
2685
|
+
zt((o) => {
|
|
2686
|
+
const s = e.map((F) => F.key), g = o.filter((F) => s.includes(F)), u = s.filter((F) => !g.includes(F));
|
|
2687
2687
|
return [...g, ...u];
|
|
2688
2688
|
});
|
|
2689
|
-
}, [
|
|
2690
|
-
const Na = wt.map((o) => e.find((s) => s.key === o)).filter((o) => !!o),
|
|
2689
|
+
}, [Qe, e]);
|
|
2690
|
+
const Na = wt.map((o) => e.find((s) => s.key === o)).filter((o) => !!o), Ke = Na.filter(
|
|
2691
2691
|
(o) => !Pe.includes(o.key)
|
|
2692
|
-
), lo = Object.keys(We).length, io = Object.keys(Ve).length,
|
|
2692
|
+
), lo = Object.keys(We).length, io = Object.keys(Ve).length, zr = lo + io;
|
|
2693
2693
|
function ka(o) {
|
|
2694
2694
|
const s = /* @__PURE__ */ new Set();
|
|
2695
2695
|
return r.reduce((g, u) => {
|
|
2696
|
-
const
|
|
2697
|
-
return !
|
|
2696
|
+
const F = wr(o, u);
|
|
2697
|
+
return !F || s.has(F) || (s.add(F), g.push({ value: F, label: F })), g;
|
|
2698
2698
|
}, []);
|
|
2699
2699
|
}
|
|
2700
2700
|
function so() {
|
|
2701
|
-
const o = e.find((s) => s.key ===
|
|
2701
|
+
const o = e.find((s) => s.key === Dt);
|
|
2702
2702
|
return o ? ka(o) : [];
|
|
2703
2703
|
}
|
|
2704
2704
|
function co(o) {
|
|
2705
2705
|
return !!(ve && !vt(o) && (o.filterValue || o.sortKey || ka(o).length > 0));
|
|
2706
2706
|
}
|
|
2707
2707
|
function Ca(o, s) {
|
|
2708
|
-
|
|
2708
|
+
Bt((g) => {
|
|
2709
2709
|
const u = { ...g };
|
|
2710
2710
|
return u[o] = s, u;
|
|
2711
2711
|
});
|
|
2712
2712
|
}
|
|
2713
2713
|
function uo(o, s, g, u) {
|
|
2714
|
-
const
|
|
2715
|
-
oe.length === g.length ?
|
|
2714
|
+
const F = We[o] ?? [], v = u ? F : g.filter((D) => D !== s), oe = u ? F.includes(s) ? F.filter((D) => D !== s) : [...F, s] : v;
|
|
2715
|
+
oe.length === g.length ? Fr(o) : Ca(o, oe);
|
|
2716
2716
|
}
|
|
2717
|
-
function
|
|
2718
|
-
|
|
2717
|
+
function Fr(o) {
|
|
2718
|
+
Bt((s) => {
|
|
2719
2719
|
const g = { ...s };
|
|
2720
2720
|
return delete g[o], g;
|
|
2721
2721
|
});
|
|
2722
2722
|
}
|
|
2723
|
-
function
|
|
2724
|
-
|
|
2723
|
+
function rr(o, s) {
|
|
2724
|
+
Yt((g) => {
|
|
2725
2725
|
const u = { ...g };
|
|
2726
2726
|
return s ? u[o] = s : delete u[o], u;
|
|
2727
2727
|
});
|
|
2728
2728
|
}
|
|
2729
2729
|
function Sa(o) {
|
|
2730
|
-
|
|
2730
|
+
rr(o, null);
|
|
2731
2731
|
}
|
|
2732
2732
|
function mo() {
|
|
2733
|
-
|
|
2733
|
+
Bt({}), Yt({});
|
|
2734
2734
|
}
|
|
2735
2735
|
function Ea(o) {
|
|
2736
|
-
|
|
2736
|
+
Ot || Ar(o), J == null || J(o);
|
|
2737
2737
|
}
|
|
2738
|
-
function
|
|
2738
|
+
function ar(o) {
|
|
2739
2739
|
const s = o.trim();
|
|
2740
|
-
|
|
2740
|
+
Xt(s), Ea(s), dt(!1), gt(!1), yt(!1), s && Ht(
|
|
2741
2741
|
(g) => [s, ...g.filter((u) => u !== s)].slice(
|
|
2742
2742
|
0,
|
|
2743
2743
|
ei
|
|
@@ -2745,21 +2745,21 @@ rol IN (admin, employee)`,
|
|
|
2745
2745
|
);
|
|
2746
2746
|
}
|
|
2747
2747
|
function $a() {
|
|
2748
|
-
|
|
2748
|
+
Xt(""), Ea(""), dt(!1), gt(!1), yt(!1);
|
|
2749
2749
|
}
|
|
2750
|
-
function
|
|
2751
|
-
|
|
2750
|
+
function Rr(o, s) {
|
|
2751
|
+
Xt(o), s && (s.style.height = "auto", s.style.height = `${Math.min(s.scrollHeight, 180)}px`);
|
|
2752
2752
|
}
|
|
2753
2753
|
Q(() => {
|
|
2754
|
-
|
|
2755
|
-
}, [
|
|
2756
|
-
const
|
|
2757
|
-
const o =
|
|
2754
|
+
Xt(tt);
|
|
2755
|
+
}, [tt]);
|
|
2756
|
+
const nr = je.useCallback(() => {
|
|
2757
|
+
const o = Dr.current;
|
|
2758
2758
|
if (!o) return;
|
|
2759
|
-
const s = o.getBoundingClientRect(), g = 12, u = 8,
|
|
2759
|
+
const s = o.getBoundingClientRect(), g = 12, u = 8, F = Math.min(780, Math.max(320, window.innerWidth - 32)), v = Math.max(
|
|
2760
2760
|
g,
|
|
2761
|
-
window.innerWidth -
|
|
2762
|
-
), oe = Math.min(Math.max(g, s.left),
|
|
2761
|
+
window.innerWidth - F - g
|
|
2762
|
+
), oe = Math.min(Math.max(g, s.left), v), D = s.bottom + u, Le = window.innerHeight - s.top + u, ke = window.innerHeight - D - g, fe = s.top - g - u, ge = ke < 280 && fe > ke, he = Math.max(
|
|
2763
2763
|
240,
|
|
2764
2764
|
ge ? fe : ke
|
|
2765
2765
|
);
|
|
@@ -2769,32 +2769,32 @@ rol IN (admin, employee)`,
|
|
|
2769
2769
|
left: oe,
|
|
2770
2770
|
top: ge ? void 0 : D,
|
|
2771
2771
|
bottom: ge ? Le : void 0,
|
|
2772
|
-
width:
|
|
2772
|
+
width: F,
|
|
2773
2773
|
maxWidth: "calc(100vw - 24px)",
|
|
2774
2774
|
maxHeight: he,
|
|
2775
2775
|
overflowY: "auto"
|
|
2776
2776
|
});
|
|
2777
2777
|
}, []);
|
|
2778
2778
|
Q(() => {
|
|
2779
|
-
if (!
|
|
2779
|
+
if (!rt) return;
|
|
2780
2780
|
function o(u) {
|
|
2781
|
-
var
|
|
2782
|
-
const
|
|
2783
|
-
(
|
|
2781
|
+
var v, oe;
|
|
2782
|
+
const F = u.target;
|
|
2783
|
+
(v = Dr.current) != null && v.contains(F) || (oe = ha.current) != null && oe.contains(F) || (dt(!1), gt(!1), yt(!1));
|
|
2784
2784
|
}
|
|
2785
2785
|
function s(u) {
|
|
2786
2786
|
u.key === "Escape" && (dt(!1), gt(!1), yt(!1));
|
|
2787
2787
|
}
|
|
2788
2788
|
function g() {
|
|
2789
|
-
|
|
2789
|
+
nr();
|
|
2790
2790
|
}
|
|
2791
|
-
return
|
|
2791
|
+
return nr(), document.addEventListener("mousedown", o), window.addEventListener("keydown", s), window.addEventListener("resize", g), window.addEventListener("scroll", g, !0), () => {
|
|
2792
2792
|
document.removeEventListener("mousedown", o), window.removeEventListener("keydown", s), window.removeEventListener("resize", g), window.removeEventListener("scroll", g, !0);
|
|
2793
2793
|
};
|
|
2794
|
-
}, [
|
|
2794
|
+
}, [rt, nr]);
|
|
2795
2795
|
function La(o) {
|
|
2796
2796
|
const s = ft(o, e);
|
|
2797
|
-
|
|
2797
|
+
Re || At(s), T == null || T(s);
|
|
2798
2798
|
}
|
|
2799
2799
|
function bo(o) {
|
|
2800
2800
|
La(
|
|
@@ -2804,16 +2804,16 @@ rol IN (admin, employee)`,
|
|
|
2804
2804
|
function po() {
|
|
2805
2805
|
La([]);
|
|
2806
2806
|
}
|
|
2807
|
-
const
|
|
2808
|
-
(o =
|
|
2807
|
+
const _r = je.useCallback(
|
|
2808
|
+
(o = Qt.current) => {
|
|
2809
2809
|
if (!o) return;
|
|
2810
|
-
const s = o.getBoundingClientRect(), g = Math.min(292, Math.max(240, window.innerWidth - 16)), u = Math.max(8, window.innerWidth - g - 8),
|
|
2810
|
+
const s = o.getBoundingClientRect(), g = Math.min(292, Math.max(240, window.innerWidth - 16)), u = Math.max(8, window.innerWidth - g - 8), F = Math.min(Math.max(8, s.right - g), u), v = window.innerHeight - s.bottom, oe = s.bottom + 6, D = window.innerHeight - s.top + 6, ke = v < 360 && s.top > v ? void 0 : oe, fe = ke === void 0 ? D : void 0, ge = Math.max(
|
|
2811
2811
|
220,
|
|
2812
2812
|
ke === void 0 ? s.top - 16 : window.innerHeight - oe - 8
|
|
2813
2813
|
), he = {
|
|
2814
2814
|
position: "fixed",
|
|
2815
2815
|
zIndex: 9999,
|
|
2816
|
-
left:
|
|
2816
|
+
left: F,
|
|
2817
2817
|
top: ke,
|
|
2818
2818
|
bottom: fe,
|
|
2819
2819
|
width: g,
|
|
@@ -2827,12 +2827,12 @@ rol IN (admin, employee)`,
|
|
|
2827
2827
|
);
|
|
2828
2828
|
function Ma(o, s, g = null) {
|
|
2829
2829
|
o.preventDefault(), o.stopPropagation();
|
|
2830
|
-
const u =
|
|
2830
|
+
const u = Qt.current === o.currentTarget && ct === s && Dt === g;
|
|
2831
2831
|
if (nt && u) {
|
|
2832
|
-
|
|
2832
|
+
Vt(!1), Kt(null);
|
|
2833
2833
|
return;
|
|
2834
2834
|
}
|
|
2835
|
-
|
|
2835
|
+
Qt.current = o.currentTarget, Vn(s), Kt(g), ma(""), _r(o.currentTarget), Vt(!0);
|
|
2836
2836
|
}
|
|
2837
2837
|
function fo(o) {
|
|
2838
2838
|
if (vt(o)) return;
|
|
@@ -2840,22 +2840,22 @@ rol IN (admin, employee)`,
|
|
|
2840
2840
|
if (!s) return;
|
|
2841
2841
|
const u = Array.from(
|
|
2842
2842
|
s.querySelectorAll("[data-dt-column-key]")
|
|
2843
|
-
).filter((
|
|
2844
|
-
const oe =
|
|
2843
|
+
).filter((F) => F.dataset.dtColumnKey === o.key).reduce((F, v) => {
|
|
2844
|
+
const oe = v.querySelector(
|
|
2845
2845
|
"[data-dt-autofit-content]"
|
|
2846
|
-
), D = oe ? oe.scrollWidth : Math.max(
|
|
2846
|
+
), D = oe ? oe.scrollWidth : Math.max(v.scrollWidth, v.offsetWidth);
|
|
2847
2847
|
return Math.max(
|
|
2848
|
-
|
|
2849
|
-
Math.ceil(D + ci(
|
|
2848
|
+
F,
|
|
2849
|
+
Math.ceil(D + ci(v))
|
|
2850
2850
|
);
|
|
2851
2851
|
}, 0);
|
|
2852
|
-
u <= 0 ||
|
|
2853
|
-
...
|
|
2852
|
+
u <= 0 || Ft((F) => ({
|
|
2853
|
+
...F,
|
|
2854
2854
|
[o.key]: at(o, u + 12)
|
|
2855
2855
|
}));
|
|
2856
2856
|
}
|
|
2857
2857
|
Q(() => {
|
|
2858
|
-
|
|
2858
|
+
Ft((o) => {
|
|
2859
2859
|
const s = Object.fromEntries(
|
|
2860
2860
|
e.map((g) => [g.key, at(g, pt(g.width))])
|
|
2861
2861
|
);
|
|
@@ -2866,63 +2866,63 @@ rol IN (admin, employee)`,
|
|
|
2866
2866
|
])
|
|
2867
2867
|
);
|
|
2868
2868
|
});
|
|
2869
|
-
}, [
|
|
2870
|
-
|
|
2869
|
+
}, [Qe, e]), Q(() => {
|
|
2870
|
+
Re || At(
|
|
2871
2871
|
(o) => ft(o, e)
|
|
2872
2872
|
);
|
|
2873
|
-
}, [
|
|
2873
|
+
}, [Qe, e, Re]), Q(() => {
|
|
2874
2874
|
function o(u) {
|
|
2875
2875
|
var oe, D;
|
|
2876
|
-
const
|
|
2877
|
-
|
|
2876
|
+
const F = u.target, v = u.target;
|
|
2877
|
+
v != null && v.closest("[data-bonsaif-select-dropdown='true']") || !((oe = va.current) != null && oe.contains(F)) && !((D = Qt.current) != null && D.contains(F)) && (Vt(!1), Kt(null));
|
|
2878
2878
|
}
|
|
2879
2879
|
function s(u) {
|
|
2880
|
-
u.key === "Escape" && (
|
|
2880
|
+
u.key === "Escape" && (Vt(!1), Kt(null));
|
|
2881
2881
|
}
|
|
2882
2882
|
function g() {
|
|
2883
|
-
|
|
2883
|
+
_r();
|
|
2884
2884
|
}
|
|
2885
2885
|
return nt && (document.addEventListener("mousedown", o), window.addEventListener("keydown", s), window.addEventListener("resize", g), window.addEventListener("scroll", g, !0)), () => {
|
|
2886
2886
|
document.removeEventListener("mousedown", o), window.removeEventListener("keydown", s), window.removeEventListener("resize", g), window.removeEventListener("scroll", g, !0);
|
|
2887
2887
|
};
|
|
2888
|
-
}, [nt,
|
|
2889
|
-
const
|
|
2888
|
+
}, [nt, _r]);
|
|
2889
|
+
const Rt = se(null);
|
|
2890
2890
|
Q(() => {
|
|
2891
2891
|
function o(g) {
|
|
2892
|
-
const u =
|
|
2892
|
+
const u = Rt.current;
|
|
2893
2893
|
if (!u) return;
|
|
2894
|
-
const
|
|
2895
|
-
|
|
2894
|
+
const F = g.clientX - u.startX, v = e.find((oe) => oe.key === u.colKey);
|
|
2895
|
+
v && Ft((oe) => ({
|
|
2896
2896
|
...oe,
|
|
2897
|
-
[u.colKey]: at(
|
|
2897
|
+
[u.colKey]: at(v, u.startWidth + F)
|
|
2898
2898
|
}));
|
|
2899
2899
|
}
|
|
2900
2900
|
function s() {
|
|
2901
|
-
|
|
2901
|
+
Rt.current && (Rt.current = null, document.body.style.cursor = "", document.body.style.userSelect = "");
|
|
2902
2902
|
}
|
|
2903
2903
|
return document.addEventListener("pointermove", o), document.addEventListener("pointerup", s), () => {
|
|
2904
2904
|
document.removeEventListener("pointermove", o), document.removeEventListener("pointerup", s);
|
|
2905
2905
|
};
|
|
2906
2906
|
}, [e]);
|
|
2907
|
-
const
|
|
2907
|
+
const or = se(null), [Ta, Pr] = L(null);
|
|
2908
2908
|
function ho(o, s) {
|
|
2909
|
-
|
|
2909
|
+
or.current = wt.indexOf(o), s.dataTransfer.effectAllowed = "move";
|
|
2910
2910
|
}
|
|
2911
2911
|
function vo(o, s) {
|
|
2912
2912
|
s.preventDefault(), s.dataTransfer.dropEffect = "move";
|
|
2913
2913
|
const g = wt.indexOf(o);
|
|
2914
|
-
Ta !== g &&
|
|
2914
|
+
Ta !== g && Pr(g);
|
|
2915
2915
|
}
|
|
2916
2916
|
function xo(o, s) {
|
|
2917
2917
|
s.preventDefault();
|
|
2918
|
-
const g =
|
|
2919
|
-
g !== null && g !== u &&
|
|
2920
|
-
const
|
|
2921
|
-
return
|
|
2922
|
-
}),
|
|
2918
|
+
const g = or.current, u = wt.indexOf(o);
|
|
2919
|
+
g !== null && g !== u && zt((F) => {
|
|
2920
|
+
const v = [...F], [oe] = v.splice(g, 1);
|
|
2921
|
+
return v.splice(u, 0, oe), v;
|
|
2922
|
+
}), or.current = null, Pr(null);
|
|
2923
2923
|
}
|
|
2924
2924
|
function go() {
|
|
2925
|
-
|
|
2925
|
+
or.current = null, Pr(null);
|
|
2926
2926
|
}
|
|
2927
2927
|
function yo(o) {
|
|
2928
2928
|
o.sortKey && kt(
|
|
@@ -2930,98 +2930,98 @@ rol IN (admin, employee)`,
|
|
|
2930
2930
|
);
|
|
2931
2931
|
}
|
|
2932
2932
|
Q(() => {
|
|
2933
|
-
|
|
2933
|
+
er(1);
|
|
2934
2934
|
}, [r]), Q(() => {
|
|
2935
|
-
|
|
2935
|
+
er(1);
|
|
2936
2936
|
}, [Ve, We]);
|
|
2937
|
-
const ut = !!(O &&
|
|
2937
|
+
const ut = !!(O && _), mt = H !== !1, He = ut ? S ?? 1 : oo, Ye = ut || mt ? tr : r.length, Ge = !!x && !!y && !!A, Ct = !!p, Aa = je.useMemo(
|
|
2938
2938
|
() => new Set(
|
|
2939
|
-
|
|
2939
|
+
Tr ? Array.from(k ?? []) : ba
|
|
2940
2940
|
),
|
|
2941
|
-
[
|
|
2942
|
-
),
|
|
2941
|
+
[Tr, k, ba]
|
|
2942
|
+
), Wr = (Ct ? 40 : 0) + (Ge ? 40 : 0), wo = Ge && r.length > 0 && x.size === r.length, No = Ge && x.size > 0 && x.size < r.length, lr = je.useMemo(() => {
|
|
2943
2943
|
const o = Object.entries(We), s = Object.entries(Ve);
|
|
2944
2944
|
return o.length === 0 && s.length === 0 ? r : r.filter(
|
|
2945
|
-
(g) => o.every(([u,
|
|
2946
|
-
const
|
|
2947
|
-
return
|
|
2948
|
-
}) && s.every(([u,
|
|
2949
|
-
const
|
|
2950
|
-
if (!
|
|
2945
|
+
(g) => o.every(([u, F]) => {
|
|
2946
|
+
const v = e.find((oe) => oe.key === u);
|
|
2947
|
+
return v ? F.includes(wr(v, g)) : !0;
|
|
2948
|
+
}) && s.every(([u, F]) => {
|
|
2949
|
+
const v = e.find((D) => D.key === u);
|
|
2950
|
+
if (!v) return !0;
|
|
2951
2951
|
const oe = r.map(
|
|
2952
|
-
(D) =>
|
|
2952
|
+
(D) => wr(v, D)
|
|
2953
2953
|
);
|
|
2954
2954
|
return mi(
|
|
2955
|
-
|
|
2956
|
-
|
|
2955
|
+
wr(v, g),
|
|
2956
|
+
F,
|
|
2957
2957
|
oe
|
|
2958
2958
|
);
|
|
2959
2959
|
})
|
|
2960
2960
|
);
|
|
2961
2961
|
}, [Ve, We, e, r]), bt = je.useMemo(() => {
|
|
2962
|
-
if (!$e) return
|
|
2962
|
+
if (!$e) return lr;
|
|
2963
2963
|
const o = e.find((s) => s.key === $e.key && s.sortKey);
|
|
2964
|
-
return o != null && o.sortKey ? [...
|
|
2965
|
-
const u = s[o.sortKey],
|
|
2966
|
-
return $e.dir === "asc" ?
|
|
2967
|
-
}) :
|
|
2968
|
-
}, [
|
|
2964
|
+
return o != null && o.sortKey ? [...lr].sort((s, g) => {
|
|
2965
|
+
const u = s[o.sortKey], F = g[o.sortKey], v = u === F ? 0 : u == null ? 1 : F == null || u < F ? -1 : 1;
|
|
2966
|
+
return $e.dir === "asc" ? v : -v;
|
|
2967
|
+
}) : lr;
|
|
2968
|
+
}, [lr, $e, e]), Da = je.useMemo(() => {
|
|
2969
2969
|
if (ut || !mt) return bt;
|
|
2970
|
-
const o = (He - 1) *
|
|
2971
|
-
return bt.slice(o, o +
|
|
2972
|
-
}, [bt, ut, mt, He,
|
|
2973
|
-
function
|
|
2970
|
+
const o = (He - 1) * Ye;
|
|
2971
|
+
return bt.slice(o, o + Ye);
|
|
2972
|
+
}, [bt, ut, mt, He, Ye]), St = ut ? G ?? r.length : bt.length, qr = mt ? Math.max(1, Math.ceil(St / Ye)) : 1, ko = mt && St > Ye, Co = mt ? (He - 1) * Ye + 1 : 1, So = mt ? Math.min(He * Ye, St) : St;
|
|
2973
|
+
function Ur(o) {
|
|
2974
2974
|
if (n) return;
|
|
2975
|
-
const s = Math.max(1, Math.min(o,
|
|
2976
|
-
ut ? O(s) :
|
|
2975
|
+
const s = Math.max(1, Math.min(o, qr));
|
|
2976
|
+
ut ? O(s) : er(s);
|
|
2977
2977
|
}
|
|
2978
2978
|
function Eo(o) {
|
|
2979
|
-
n || (
|
|
2979
|
+
n || (jr(o), ut ? (_(o), O(1)) : er(1), _ && _(o));
|
|
2980
2980
|
}
|
|
2981
2981
|
function Ba(o) {
|
|
2982
2982
|
const s = new Set(Aa);
|
|
2983
2983
|
s.has(o) ? s.delete(o) : s.add(o);
|
|
2984
2984
|
const g = Array.from(s);
|
|
2985
|
-
|
|
2985
|
+
Tr || Kn(g), C == null || C(g);
|
|
2986
2986
|
}
|
|
2987
2987
|
Q(() => {
|
|
2988
2988
|
Se == null || Se({
|
|
2989
|
-
bql:
|
|
2989
|
+
bql: tt,
|
|
2990
2990
|
filters: We,
|
|
2991
2991
|
conditionFilters: Ve,
|
|
2992
2992
|
sort: $e,
|
|
2993
2993
|
page: He,
|
|
2994
|
-
pageSize:
|
|
2994
|
+
pageSize: Ye,
|
|
2995
2995
|
hiddenColumnKeys: Pe
|
|
2996
2996
|
});
|
|
2997
2997
|
}, [
|
|
2998
|
-
|
|
2998
|
+
tt,
|
|
2999
2999
|
We,
|
|
3000
3000
|
Ve,
|
|
3001
3001
|
$e,
|
|
3002
3002
|
He,
|
|
3003
|
-
|
|
3003
|
+
Ye,
|
|
3004
3004
|
Pe,
|
|
3005
3005
|
Se
|
|
3006
3006
|
]);
|
|
3007
|
-
const Oa = (o) => o === "center" ? "text-center" : o === "right" ? "text-right" : "text-left", $o = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))",
|
|
3007
|
+
const Oa = (o) => o === "center" ? "text-center" : o === "right" ? "text-right" : "text-left", $o = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))", Vr = "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%)", ye = "color-mix(in srgb, var(--border) 62%, var(--bg-card))", Et = "color-mix(in srgb, var(--primary) 24%, var(--border))", ir = `inset 0 0 0 1px ${ye}`, Ia = Ke.reduce(
|
|
3008
3008
|
(o, s) => o + (Nt[s.key] ?? pt(s.width)),
|
|
3009
|
-
(Ct ? 40 : 0) + (
|
|
3010
|
-
), Ha = typeof ae == "number" ? ae : typeof ae == "string" ? Number(((Pa = ae.match(/^(\d+(?:\.\d+)?)px$/)) == null ? void 0 : Pa[1]) ?? NaN) : NaN,
|
|
3009
|
+
(Ct ? 40 : 0) + (Ge ? 40 : 0)
|
|
3010
|
+
), Ha = typeof ae == "number" ? ae : typeof ae == "string" ? Number(((Pa = ae.match(/^(\d+(?:\.\d+)?)px$/)) == null ? void 0 : Pa[1]) ?? NaN) : NaN, _t = Number.isFinite(Ha) ? Math.max(Ia, Ha, ya) : Math.max(Ia, ya), sr = ae ?? _t, $t = `${Ct ? "40px " : ""}${Ge ? "40px " : ""}${Ke.map((o) => `${Nt[o.key] ?? pt(o.width)}px`).join(" ")}`;
|
|
3011
3011
|
Q(() => {
|
|
3012
3012
|
$e && Pe.includes($e.key) && kt(null);
|
|
3013
3013
|
}, [Pe, $e]);
|
|
3014
3014
|
function ja(o) {
|
|
3015
3015
|
return o ? typeof o == "string" ? { key: o, label: o } : o : null;
|
|
3016
3016
|
}
|
|
3017
|
-
const
|
|
3017
|
+
const cr = () => /* @__PURE__ */ l(
|
|
3018
3018
|
"div",
|
|
3019
3019
|
{
|
|
3020
3020
|
role: "row",
|
|
3021
3021
|
className: "grid",
|
|
3022
3022
|
style: {
|
|
3023
|
-
gridTemplateColumns:
|
|
3024
|
-
background:
|
|
3023
|
+
gridTemplateColumns: $t,
|
|
3024
|
+
background: Vr,
|
|
3025
3025
|
borderBottom: `1px solid ${Et}`
|
|
3026
3026
|
},
|
|
3027
3027
|
children: [
|
|
@@ -3029,33 +3029,33 @@ rol IN (admin, employee)`,
|
|
|
3029
3029
|
"div",
|
|
3030
3030
|
{
|
|
3031
3031
|
role: "columnheader",
|
|
3032
|
-
className: `${
|
|
3032
|
+
className: `${h ? "px-2 py-1.5" : "px-3 py-2.5"} w-10`,
|
|
3033
3033
|
style: {
|
|
3034
3034
|
borderBottom: `1px solid ${Et}`,
|
|
3035
|
-
borderRight: `1px solid ${
|
|
3035
|
+
borderRight: `1px solid ${ye}`
|
|
3036
3036
|
}
|
|
3037
3037
|
}
|
|
3038
3038
|
),
|
|
3039
|
-
|
|
3039
|
+
Ge && /* @__PURE__ */ t(
|
|
3040
3040
|
"div",
|
|
3041
3041
|
{
|
|
3042
3042
|
role: "columnheader",
|
|
3043
|
-
className: `${
|
|
3043
|
+
className: `${h ? "px-2 py-1.5" : "px-3 py-2.5"} w-10`,
|
|
3044
3044
|
style: ee ? {
|
|
3045
3045
|
position: "sticky",
|
|
3046
3046
|
left: 0,
|
|
3047
3047
|
zIndex: 12,
|
|
3048
|
-
background:
|
|
3048
|
+
background: Vr,
|
|
3049
3049
|
backdropFilter: "blur(14px)",
|
|
3050
3050
|
WebkitBackdropFilter: "blur(14px)",
|
|
3051
3051
|
boxShadow: `inset 0 -1px 0 ${Et}`,
|
|
3052
|
-
borderRight: `1px solid ${
|
|
3052
|
+
borderRight: `1px solid ${ye}`
|
|
3053
3053
|
} : {
|
|
3054
3054
|
borderBottom: `1px solid ${Et}`,
|
|
3055
|
-
borderRight: `1px solid ${
|
|
3055
|
+
borderRight: `1px solid ${ye}`
|
|
3056
3056
|
},
|
|
3057
3057
|
children: /* @__PURE__ */ t(
|
|
3058
|
-
|
|
3058
|
+
ia,
|
|
3059
3059
|
{
|
|
3060
3060
|
size: "sm",
|
|
3061
3061
|
checked: wo,
|
|
@@ -3068,8 +3068,8 @@ rol IN (admin, employee)`,
|
|
|
3068
3068
|
)
|
|
3069
3069
|
}
|
|
3070
3070
|
),
|
|
3071
|
-
|
|
3072
|
-
const g = ($e == null ? void 0 : $e.key) === o.key, u = !!o.sortKey,
|
|
3071
|
+
Ke.map((o, s) => {
|
|
3072
|
+
const g = ($e == null ? void 0 : $e.key) === o.key, u = !!o.sortKey, F = vt(o), v = ee && !Hr && s === 0, oe = Ta === s, Le = (Nt[o.key] ?? pt(o.width)) < 120, ke = Object.prototype.hasOwnProperty.call(We, o.key) || Object.prototype.hasOwnProperty.call(Ve, o.key);
|
|
3073
3073
|
return /* @__PURE__ */ l(
|
|
3074
3074
|
"div",
|
|
3075
3075
|
{
|
|
@@ -3077,26 +3077,26 @@ rol IN (admin, employee)`,
|
|
|
3077
3077
|
"data-dt-column-key": o.key,
|
|
3078
3078
|
className: `group select-none ${Le ? "text-left" : Oa(o.align)}`,
|
|
3079
3079
|
style: {
|
|
3080
|
-
...
|
|
3080
|
+
...v ? {
|
|
3081
3081
|
position: "sticky",
|
|
3082
|
-
left:
|
|
3082
|
+
left: Wr,
|
|
3083
3083
|
zIndex: 12,
|
|
3084
|
-
background:
|
|
3084
|
+
background: Vr,
|
|
3085
3085
|
backdropFilter: "blur(14px)",
|
|
3086
3086
|
WebkitBackdropFilter: "blur(14px)",
|
|
3087
3087
|
boxShadow: `3px 0 6px -2px rgba(0,0,0,0.10), inset 0 -1px 0 ${Et}`,
|
|
3088
|
-
borderRight: `1px solid ${
|
|
3088
|
+
borderRight: `1px solid ${ye}`
|
|
3089
3089
|
} : {
|
|
3090
3090
|
position: "relative",
|
|
3091
3091
|
borderBottom: `1px solid ${Et}`,
|
|
3092
|
-
borderRight: `1px solid ${
|
|
3092
|
+
borderRight: `1px solid ${ye}`
|
|
3093
3093
|
},
|
|
3094
3094
|
color: g ? "var(--primary)" : "var(--text-muted)",
|
|
3095
3095
|
whiteSpace: "nowrap",
|
|
3096
3096
|
transition: "color 0.15s",
|
|
3097
3097
|
borderLeft: oe ? "2px solid var(--primary)" : "2px solid transparent",
|
|
3098
3098
|
cursor: "default",
|
|
3099
|
-
padding:
|
|
3099
|
+
padding: F ? h ? "7px 6px" : "9px 8px" : h ? "8px 6px 10px" : "10px 8px 12px"
|
|
3100
3100
|
},
|
|
3101
3101
|
onDragOver: (fe) => vo(o.key, fe),
|
|
3102
3102
|
onDrop: (fe) => xo(o.key, fe),
|
|
@@ -3104,7 +3104,7 @@ rol IN (admin, employee)`,
|
|
|
3104
3104
|
/* @__PURE__ */ l(
|
|
3105
3105
|
"div",
|
|
3106
3106
|
{
|
|
3107
|
-
className: `flex min-w-0 items-center gap-1 ${
|
|
3107
|
+
className: `flex min-w-0 items-center gap-1 ${F ? "justify-center" : Le ? "justify-start" : o.align === "center" ? "justify-center" : o.align === "right" ? "justify-end" : "justify-start"}`,
|
|
3108
3108
|
children: [
|
|
3109
3109
|
/* @__PURE__ */ t(
|
|
3110
3110
|
"span",
|
|
@@ -3123,19 +3123,19 @@ rol IN (admin, employee)`,
|
|
|
3123
3123
|
style: { cursor: "grab" }
|
|
3124
3124
|
}
|
|
3125
3125
|
),
|
|
3126
|
-
|
|
3126
|
+
F ? /* @__PURE__ */ t(
|
|
3127
3127
|
"span",
|
|
3128
3128
|
{
|
|
3129
3129
|
className: "inline-flex h-5 w-5 items-center justify-center rounded-md text-[var(--text-muted)]",
|
|
3130
3130
|
title: "Acciones",
|
|
3131
3131
|
"aria-label": "Acciones",
|
|
3132
|
-
children: /* @__PURE__ */ t(
|
|
3132
|
+
children: /* @__PURE__ */ t(Sr, { className: "h-3.5 w-3.5" })
|
|
3133
3133
|
}
|
|
3134
3134
|
) : /* @__PURE__ */ t(Za, { className: "min-w-0 flex-1", children: /* @__PURE__ */ t(
|
|
3135
3135
|
"span",
|
|
3136
3136
|
{
|
|
3137
3137
|
"data-dt-autofit-content": !0,
|
|
3138
|
-
className: `inline-flex max-w-full items-center font-semibold uppercase tracking-wider ${
|
|
3138
|
+
className: `inline-flex max-w-full items-center font-semibold uppercase tracking-wider ${h ? "text-[11px]" : "text-xs"}`,
|
|
3139
3139
|
children: /* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: o.header })
|
|
3140
3140
|
}
|
|
3141
3141
|
) }),
|
|
@@ -3151,40 +3151,40 @@ rol IN (admin, employee)`,
|
|
|
3151
3151
|
"data-dt-sort-button": !0,
|
|
3152
3152
|
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 ${g ? "opacity-100" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"}`,
|
|
3153
3153
|
style: { bottom: "-0.5rem", top: "auto" },
|
|
3154
|
-
children: g ? $e.dir === "asc" ? /* @__PURE__ */ t(
|
|
3154
|
+
children: g ? $e.dir === "asc" ? /* @__PURE__ */ t(Yr, { className: "h-3 w-3" }) : /* @__PURE__ */ t(Xe, { className: "h-3 w-3" }) : /* @__PURE__ */ t(Ro, { className: "h-3 w-3" })
|
|
3155
3155
|
}
|
|
3156
3156
|
),
|
|
3157
|
-
ve && !
|
|
3157
|
+
ve && !F && co(o) && /* @__PURE__ */ t(
|
|
3158
3158
|
"button",
|
|
3159
3159
|
{
|
|
3160
3160
|
type: "button",
|
|
3161
3161
|
"aria-haspopup": "menu",
|
|
3162
|
-
"aria-expanded": nt &&
|
|
3162
|
+
"aria-expanded": nt && Dt === o.key,
|
|
3163
3163
|
"aria-label": `Filtrar ${String(o.header)}`,
|
|
3164
3164
|
title: "Filtrar",
|
|
3165
3165
|
onClick: (fe) => Ma(fe, "filter", o.key),
|
|
3166
|
-
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 ${nt && ct === "filter" &&
|
|
3167
|
-
children: ke ? /* @__PURE__ */ t(
|
|
3166
|
+
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 ${nt && ct === "filter" && Dt === o.key ? "bg-[var(--bg-card)] text-[var(--primary)] opacity-100" : ke ? "text-[var(--primary)] opacity-100" : ""}`,
|
|
3167
|
+
children: ke ? /* @__PURE__ */ t(_o, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(Po, { className: "h-3.5 w-3.5" })
|
|
3168
3168
|
}
|
|
3169
3169
|
)
|
|
3170
3170
|
]
|
|
3171
3171
|
}
|
|
3172
3172
|
),
|
|
3173
|
-
!
|
|
3173
|
+
!F && /* @__PURE__ */ t(
|
|
3174
3174
|
"span",
|
|
3175
3175
|
{
|
|
3176
3176
|
role: "separator",
|
|
3177
3177
|
"aria-orientation": "vertical",
|
|
3178
3178
|
title: "Arrastrar para redimensionar. Doble click para autoajustar",
|
|
3179
3179
|
onPointerDown: (fe) => {
|
|
3180
|
-
fe.preventDefault(), fe.stopPropagation(),
|
|
3180
|
+
fe.preventDefault(), fe.stopPropagation(), Rt.current = {
|
|
3181
3181
|
colKey: o.key,
|
|
3182
3182
|
startX: fe.clientX,
|
|
3183
3183
|
startWidth: Nt[o.key] ?? 150
|
|
3184
3184
|
}, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
3185
3185
|
},
|
|
3186
3186
|
onDoubleClick: (fe) => {
|
|
3187
|
-
fe.preventDefault(), fe.stopPropagation(),
|
|
3187
|
+
fe.preventDefault(), fe.stopPropagation(), Rt.current = null, document.body.style.cursor = "", document.body.style.userSelect = "", fo(o);
|
|
3188
3188
|
},
|
|
3189
3189
|
onClick: (fe) => fe.stopPropagation(),
|
|
3190
3190
|
className: "absolute top-0 flex h-full items-center justify-center opacity-0 transition-opacity duration-150 group-hover:opacity-100",
|
|
@@ -3210,22 +3210,22 @@ rol IN (admin, employee)`,
|
|
|
3210
3210
|
})
|
|
3211
3211
|
]
|
|
3212
3212
|
}
|
|
3213
|
-
),
|
|
3213
|
+
), dr = () => {
|
|
3214
3214
|
if (!nt || typeof document > "u" || ct === "visibility" && !re || ct === "filter" && !ve) return null;
|
|
3215
3215
|
const o = e.find(
|
|
3216
|
-
(he) => he.key ===
|
|
3217
|
-
), s = so(), g = o ? Object.prototype.hasOwnProperty.call(We, o.key) : !1, u = o ? Ve[o.key] : void 0,
|
|
3216
|
+
(he) => he.key === Dt
|
|
3217
|
+
), s = so(), g = o ? Object.prototype.hasOwnProperty.call(We, o.key) : !1, u = o ? Ve[o.key] : void 0, F = Mr.find(
|
|
3218
3218
|
(he) => he.value === (u == null ? void 0 : u.operator)
|
|
3219
|
-
),
|
|
3219
|
+
), v = o ? We[o.key] ?? [] : [], oe = ua.trim().toLowerCase(), D = oe ? s.filter(
|
|
3220
3220
|
(he) => he.label.toLowerCase().includes(oe)
|
|
3221
|
-
) : s, Le = o && s.length > 0 && (!g ||
|
|
3222
|
-
o && (
|
|
3221
|
+
) : s, Le = o && s.length > 0 && (!g || v.length === s.length), ke = o && g && v.length > 0 && v.length < s.length, fe = Pe.length, ge = () => {
|
|
3222
|
+
o && (Fr(o.key), Sa(o.key));
|
|
3223
3223
|
};
|
|
3224
|
-
return
|
|
3224
|
+
return Ze(
|
|
3225
3225
|
/* @__PURE__ */ t(
|
|
3226
3226
|
"div",
|
|
3227
3227
|
{
|
|
3228
|
-
ref:
|
|
3228
|
+
ref: va,
|
|
3229
3229
|
role: "menu",
|
|
3230
3230
|
className: "overflow-hidden rounded-lg border p-1 shadow-xl",
|
|
3231
3231
|
style: {
|
|
@@ -3235,7 +3235,7 @@ rol IN (admin, employee)`,
|
|
|
3235
3235
|
},
|
|
3236
3236
|
children: ct === "visibility" ? /* @__PURE__ */ l(ze, { children: [
|
|
3237
3237
|
/* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-2 border-b border-[var(--border)] px-2 py-1.5", children: [
|
|
3238
|
-
/* @__PURE__ */ t("span", { className: "min-w-0 truncate text-xs font-semibold uppercase text-[var(--text-muted)]", children: fe > 0 ? `${
|
|
3238
|
+
/* @__PURE__ */ t("span", { className: "min-w-0 truncate text-xs font-semibold uppercase text-[var(--text-muted)]", children: fe > 0 ? `${Ke.length} de ${e.length} visibles` : `${e.length} visibles` }),
|
|
3239
3239
|
/* @__PURE__ */ t(
|
|
3240
3240
|
"button",
|
|
3241
3241
|
{
|
|
@@ -3248,14 +3248,14 @@ rol IN (admin, employee)`,
|
|
|
3248
3248
|
)
|
|
3249
3249
|
] }),
|
|
3250
3250
|
/* @__PURE__ */ t("div", { className: "max-h-72 overflow-auto py-1", children: Na.map((he) => {
|
|
3251
|
-
const Oe = !Pe.includes(he.key),
|
|
3251
|
+
const Oe = !Pe.includes(he.key), pr = !(he.hideable !== !1) || Oe && Ke.length <= 1;
|
|
3252
3252
|
return /* @__PURE__ */ l(
|
|
3253
3253
|
"button",
|
|
3254
3254
|
{
|
|
3255
3255
|
type: "button",
|
|
3256
3256
|
role: "menuitemcheckbox",
|
|
3257
3257
|
"aria-checked": Oe,
|
|
3258
|
-
disabled:
|
|
3258
|
+
disabled: pr,
|
|
3259
3259
|
onClick: () => bo(he.key),
|
|
3260
3260
|
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",
|
|
3261
3261
|
style: { color: "var(--text-main)" },
|
|
@@ -3305,7 +3305,7 @@ rol IN (admin, employee)`,
|
|
|
3305
3305
|
style: { color: "var(--text-main)" },
|
|
3306
3306
|
children: [
|
|
3307
3307
|
/* @__PURE__ */ l("span", { className: "flex min-w-0 items-center gap-1.5 truncate", children: [
|
|
3308
|
-
/* @__PURE__ */ t(
|
|
3308
|
+
/* @__PURE__ */ t(Yr, { className: "h-4 w-4 shrink-0 text-[var(--primary)]" }),
|
|
3309
3309
|
/* @__PURE__ */ t("span", { className: "truncate", children: "Ascendente" })
|
|
3310
3310
|
] }),
|
|
3311
3311
|
($e == null ? void 0 : $e.key) === o.key && $e.dir === "asc" && /* @__PURE__ */ t(Ue, { className: "h-4 w-4 shrink-0 text-[var(--primary)]" })
|
|
@@ -3321,7 +3321,7 @@ rol IN (admin, employee)`,
|
|
|
3321
3321
|
style: { color: "var(--text-main)" },
|
|
3322
3322
|
children: [
|
|
3323
3323
|
/* @__PURE__ */ l("span", { className: "flex min-w-0 items-center gap-1.5 truncate", children: [
|
|
3324
|
-
/* @__PURE__ */ t(
|
|
3324
|
+
/* @__PURE__ */ t(Xe, { className: "h-4 w-4 shrink-0 text-[var(--primary)]" }),
|
|
3325
3325
|
/* @__PURE__ */ t("span", { className: "truncate", children: "Descendente" })
|
|
3326
3326
|
] }),
|
|
3327
3327
|
($e == null ? void 0 : $e.key) === o.key && $e.dir === "desc" && /* @__PURE__ */ t(Ue, { className: "h-4 w-4 shrink-0 text-[var(--primary)]" })
|
|
@@ -3332,7 +3332,7 @@ rol IN (admin, employee)`,
|
|
|
3332
3332
|
/* @__PURE__ */ l("div", { className: "border-b border-[var(--border)] p-2", children: [
|
|
3333
3333
|
/* @__PURE__ */ l("div", { className: "grid grid-cols-[minmax(0,1.05fr)_minmax(0,0.95fr)] gap-2", children: [
|
|
3334
3334
|
/* @__PURE__ */ t(
|
|
3335
|
-
|
|
3335
|
+
qt,
|
|
3336
3336
|
{
|
|
3337
3337
|
value: (u == null ? void 0 : u.operator) ?? "",
|
|
3338
3338
|
onChange: (he) => {
|
|
@@ -3340,7 +3340,7 @@ rol IN (admin, employee)`,
|
|
|
3340
3340
|
Sa(o.key);
|
|
3341
3341
|
return;
|
|
3342
3342
|
}
|
|
3343
|
-
|
|
3343
|
+
rr(o.key, {
|
|
3344
3344
|
operator: he,
|
|
3345
3345
|
value: (u == null ? void 0 : u.value) ?? "",
|
|
3346
3346
|
valueTo: (u == null ? void 0 : u.valueTo) ?? ""
|
|
@@ -3357,12 +3357,12 @@ rol IN (admin, employee)`,
|
|
|
3357
3357
|
className: "min-w-0 [&>button]:rounded-md [&>button]:text-sm [&>button]:font-medium"
|
|
3358
3358
|
}
|
|
3359
3359
|
),
|
|
3360
|
-
(
|
|
3360
|
+
(F == null ? void 0 : F.valueMode) !== "none" ? /* @__PURE__ */ t(
|
|
3361
3361
|
"input",
|
|
3362
3362
|
{
|
|
3363
3363
|
value: (u == null ? void 0 : u.value) ?? "",
|
|
3364
3364
|
onChange: (he) => {
|
|
3365
|
-
u &&
|
|
3365
|
+
u && rr(o.key, {
|
|
3366
3366
|
...u,
|
|
3367
3367
|
value: he.target.value
|
|
3368
3368
|
});
|
|
@@ -3388,12 +3388,12 @@ rol IN (admin, employee)`,
|
|
|
3388
3388
|
}
|
|
3389
3389
|
)
|
|
3390
3390
|
] }),
|
|
3391
|
-
(
|
|
3391
|
+
(F == null ? void 0 : F.valueMode) === "between" && /* @__PURE__ */ t(
|
|
3392
3392
|
"input",
|
|
3393
3393
|
{
|
|
3394
3394
|
value: (u == null ? void 0 : u.valueTo) ?? "",
|
|
3395
3395
|
onChange: (he) => {
|
|
3396
|
-
u &&
|
|
3396
|
+
u && rr(o.key, {
|
|
3397
3397
|
...u,
|
|
3398
3398
|
valueTo: he.target.value
|
|
3399
3399
|
});
|
|
@@ -3421,8 +3421,8 @@ rol IN (admin, employee)`,
|
|
|
3421
3421
|
/* @__PURE__ */ t(
|
|
3422
3422
|
"input",
|
|
3423
3423
|
{
|
|
3424
|
-
value:
|
|
3425
|
-
onChange: (he) =>
|
|
3424
|
+
value: ua,
|
|
3425
|
+
onChange: (he) => ma(he.target.value),
|
|
3426
3426
|
placeholder: "Buscar",
|
|
3427
3427
|
className: "min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-[var(--text-muted)]",
|
|
3428
3428
|
style: { color: "var(--text-main)" }
|
|
@@ -3446,7 +3446,7 @@ rol IN (admin, employee)`,
|
|
|
3446
3446
|
role: "menuitemcheckbox",
|
|
3447
3447
|
"aria-checked": ke ? "mixed" : !!Le,
|
|
3448
3448
|
onClick: () => {
|
|
3449
|
-
o && (Le && !g ? Ca(o.key, []) :
|
|
3449
|
+
o && (Le && !g ? Ca(o.key, []) : Fr(o.key));
|
|
3450
3450
|
},
|
|
3451
3451
|
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)]",
|
|
3452
3452
|
style: { color: "var(--text-main)" },
|
|
@@ -3471,7 +3471,7 @@ rol IN (admin, employee)`,
|
|
|
3471
3471
|
}
|
|
3472
3472
|
),
|
|
3473
3473
|
D.map((he) => {
|
|
3474
|
-
const Oe = !g ||
|
|
3474
|
+
const Oe = !g || v.includes(he.value);
|
|
3475
3475
|
return /* @__PURE__ */ l(
|
|
3476
3476
|
"button",
|
|
3477
3477
|
{
|
|
@@ -3481,7 +3481,7 @@ rol IN (admin, employee)`,
|
|
|
3481
3481
|
onClick: () => uo(
|
|
3482
3482
|
o.key,
|
|
3483
3483
|
he.value,
|
|
3484
|
-
s.map((
|
|
3484
|
+
s.map((we) => we.value),
|
|
3485
3485
|
g
|
|
3486
3486
|
),
|
|
3487
3487
|
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)]",
|
|
@@ -3516,44 +3516,44 @@ rol IN (admin, employee)`,
|
|
|
3516
3516
|
);
|
|
3517
3517
|
};
|
|
3518
3518
|
Q(() => {
|
|
3519
|
-
if (!
|
|
3519
|
+
if (!jt) return;
|
|
3520
3520
|
function o(s) {
|
|
3521
|
-
|
|
3521
|
+
Or.current && !Or.current.contains(s.target) && Jt.current && !Jt.current.contains(s.target) && Zt(!1);
|
|
3522
3522
|
}
|
|
3523
3523
|
return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
|
|
3524
|
-
}, [
|
|
3524
|
+
}, [jt]);
|
|
3525
3525
|
function za(o, s) {
|
|
3526
3526
|
if (o.filterValue) {
|
|
3527
3527
|
const g = o.filterValue(s);
|
|
3528
3528
|
return g == null || g === "" ? "" : String(g);
|
|
3529
3529
|
}
|
|
3530
|
-
return
|
|
3530
|
+
return Mt(o.cell(s));
|
|
3531
3531
|
}
|
|
3532
|
-
function
|
|
3532
|
+
function Fa(o) {
|
|
3533
3533
|
return `"${o.replace(/"/g, '""')}"`;
|
|
3534
3534
|
}
|
|
3535
|
-
function
|
|
3535
|
+
function ur(o) {
|
|
3536
3536
|
return o.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
3537
3537
|
}
|
|
3538
3538
|
function Lo() {
|
|
3539
|
-
const o =
|
|
3540
|
-
(D) => o.map((Le) =>
|
|
3539
|
+
const o = Ke.filter((D) => !vt(D)), s = o.map((D) => Fa(Mt(D.header))).join(","), g = bt.map(
|
|
3540
|
+
(D) => o.map((Le) => Fa(za(Le, D))).join(",")
|
|
3541
3541
|
).join(`
|
|
3542
3542
|
`), u = `${s}
|
|
3543
|
-
${g}`,
|
|
3543
|
+
${g}`, F = new Blob(["\uFEFF" + u], {
|
|
3544
3544
|
type: "text/csv;charset=utf-8;"
|
|
3545
|
-
}),
|
|
3546
|
-
oe.href =
|
|
3545
|
+
}), v = URL.createObjectURL(F), oe = document.createElement("a");
|
|
3546
|
+
oe.href = v, oe.download = `${Ne}.csv`, document.body.appendChild(oe), oe.click(), document.body.removeChild(oe), URL.revokeObjectURL(v);
|
|
3547
3547
|
}
|
|
3548
3548
|
function Mo() {
|
|
3549
|
-
const o =
|
|
3550
|
-
(oe) =>
|
|
3549
|
+
const o = Ke.filter((oe) => !vt(oe)), s = o.map(
|
|
3550
|
+
(oe) => ur(Mt(oe.header))
|
|
3551
3551
|
), u = bt.map(
|
|
3552
|
-
(oe) => o.map((D) =>
|
|
3552
|
+
(oe) => o.map((D) => ur(za(D, oe)))
|
|
3553
3553
|
).map(
|
|
3554
3554
|
(oe) => `<tr>${oe.map((D) => `<td>${D}</td>`).join("")}</tr>`
|
|
3555
|
-
).join(""),
|
|
3556
|
-
<html lang="es"><head><meta charset="utf-8"><title>${
|
|
3555
|
+
).join(""), F = `<!DOCTYPE html>
|
|
3556
|
+
<html lang="es"><head><meta charset="utf-8"><title>${ur(Ne)}</title>
|
|
3557
3557
|
<style>
|
|
3558
3558
|
body{font-family:system-ui,sans-serif;font-size:11px;margin:20px;color:#111}
|
|
3559
3559
|
h3{margin:0 0 4px;font-size:14px}
|
|
@@ -3564,19 +3564,19 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3564
3564
|
tr:nth-child(even) td{background:#f9f9f9}
|
|
3565
3565
|
@media print{body{margin:0}@page{margin:1cm}}
|
|
3566
3566
|
</style></head><body>
|
|
3567
|
-
<h3>${
|
|
3567
|
+
<h3>${ur(Ne)}</h3>
|
|
3568
3568
|
<p>${bt.length} registros · ${(/* @__PURE__ */ new Date()).toLocaleDateString("es")}</p>
|
|
3569
3569
|
<table><thead><tr>${s.map((oe) => `<th>${oe}</th>`).join("")}</tr></thead>
|
|
3570
3570
|
<tbody>${u}</tbody></table>
|
|
3571
3571
|
<script>window.onload=()=>{window.print()}<\/script>
|
|
3572
|
-
</body></html>`,
|
|
3573
|
-
|
|
3572
|
+
</body></html>`, v = window.open("", "_blank");
|
|
3573
|
+
v && (v.document.write(F), v.document.close());
|
|
3574
3574
|
}
|
|
3575
|
-
const
|
|
3575
|
+
const mr = () => !Ee || !jt ? null : Ze(
|
|
3576
3576
|
/* @__PURE__ */ l(
|
|
3577
3577
|
"div",
|
|
3578
3578
|
{
|
|
3579
|
-
ref:
|
|
3579
|
+
ref: Or,
|
|
3580
3580
|
role: "menu",
|
|
3581
3581
|
className: "overflow-hidden rounded-lg border p-1 shadow-xl",
|
|
3582
3582
|
style: {
|
|
@@ -3596,7 +3596,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3596
3596
|
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)]",
|
|
3597
3597
|
style: { color: "var(--text-main)" },
|
|
3598
3598
|
onClick: () => {
|
|
3599
|
-
Lo(),
|
|
3599
|
+
Lo(), Zt(!1);
|
|
3600
3600
|
},
|
|
3601
3601
|
children: [
|
|
3602
3602
|
/* @__PURE__ */ t(Wo, { className: "h-4 w-4 shrink-0 text-emerald-500" }),
|
|
@@ -3612,7 +3612,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3612
3612
|
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)]",
|
|
3613
3613
|
style: { color: "var(--text-main)" },
|
|
3614
3614
|
onClick: () => {
|
|
3615
|
-
Mo(),
|
|
3615
|
+
Mo(), Zt(!1);
|
|
3616
3616
|
},
|
|
3617
3617
|
children: [
|
|
3618
3618
|
/* @__PURE__ */ t(wn, { className: "h-4 w-4 shrink-0 text-red-500" }),
|
|
@@ -3624,16 +3624,16 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3624
3624
|
}
|
|
3625
3625
|
),
|
|
3626
3626
|
document.body
|
|
3627
|
-
),
|
|
3628
|
-
const o = pe &&
|
|
3629
|
-
return !re &&
|
|
3627
|
+
), br = () => {
|
|
3628
|
+
const o = pe && tt.trim().length > 0, s = ce != null && ce.length ? ce : o ? [{ key: "bql", label: "BQL", value: tt }] : [], g = P.filter((u) => u.trim() && u !== Gt).slice(0, 8);
|
|
3629
|
+
return !re && zr === 0 && !pe && !Ee ? null : /* @__PURE__ */ l(
|
|
3630
3630
|
"div",
|
|
3631
3631
|
{
|
|
3632
3632
|
className: "relative flex min-h-9 flex-wrap items-center justify-between gap-2 border-b rounded-t-lg px-2 py-1",
|
|
3633
3633
|
style: { borderColor: "var(--border)", background: "var(--bg-input)" },
|
|
3634
3634
|
children: [
|
|
3635
3635
|
/* @__PURE__ */ l("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
3636
|
-
|
|
3636
|
+
zr > 0 && /* @__PURE__ */ l(
|
|
3637
3637
|
"button",
|
|
3638
3638
|
{
|
|
3639
3639
|
type: "button",
|
|
@@ -3641,7 +3641,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3641
3641
|
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)]",
|
|
3642
3642
|
children: [
|
|
3643
3643
|
/* @__PURE__ */ t(Ie, { className: "h-3.5 w-3.5" }),
|
|
3644
|
-
|
|
3644
|
+
zr,
|
|
3645
3645
|
" filtros"
|
|
3646
3646
|
]
|
|
3647
3647
|
}
|
|
@@ -3649,7 +3649,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3649
3649
|
pe && /* @__PURE__ */ l(
|
|
3650
3650
|
"div",
|
|
3651
3651
|
{
|
|
3652
|
-
ref:
|
|
3652
|
+
ref: Dr,
|
|
3653
3653
|
className: "relative flex min-w-0 flex-1 items-center gap-2",
|
|
3654
3654
|
children: [
|
|
3655
3655
|
/* @__PURE__ */ l(
|
|
@@ -3657,25 +3657,25 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3657
3657
|
{
|
|
3658
3658
|
type: "button",
|
|
3659
3659
|
onClick: () => {
|
|
3660
|
-
if (
|
|
3660
|
+
if (rt) {
|
|
3661
3661
|
dt(!1);
|
|
3662
3662
|
return;
|
|
3663
3663
|
}
|
|
3664
|
-
|
|
3664
|
+
nr(), dt(!0);
|
|
3665
3665
|
},
|
|
3666
3666
|
className: "inline-flex h-7 shrink-0 items-center gap-1.5 rounded-md border px-2 text-xs font-bold transition-colors",
|
|
3667
3667
|
style: {
|
|
3668
|
-
background:
|
|
3669
|
-
borderColor:
|
|
3670
|
-
color:
|
|
3668
|
+
background: rt ? "var(--primary)" : o ? "color-mix(in srgb, var(--primary) 12%, transparent)" : "var(--bg-card)",
|
|
3669
|
+
borderColor: rt || o ? "var(--primary)" : "var(--border)",
|
|
3670
|
+
color: rt ? "var(--primary-fg)" : "var(--primary)"
|
|
3671
3671
|
},
|
|
3672
|
-
"aria-expanded":
|
|
3672
|
+
"aria-expanded": rt,
|
|
3673
3673
|
title: "Abrir filtros BQL",
|
|
3674
3674
|
children: [
|
|
3675
3675
|
/* @__PURE__ */ t(qo, { className: "h-3.5 w-3.5" }),
|
|
3676
3676
|
"BQL",
|
|
3677
3677
|
o && /* @__PURE__ */ t("span", { className: "h-1.5 w-1.5 rounded-full bg-current" }),
|
|
3678
|
-
|
|
3678
|
+
rt ? /* @__PURE__ */ t(Yr, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ t(Xe, { className: "h-3.5 w-3.5" })
|
|
3679
3679
|
]
|
|
3680
3680
|
}
|
|
3681
3681
|
),
|
|
@@ -3716,11 +3716,11 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3716
3716
|
children: /* @__PURE__ */ t(Ie, { className: "h-4 w-4" })
|
|
3717
3717
|
}
|
|
3718
3718
|
),
|
|
3719
|
-
|
|
3719
|
+
rt && Ze(
|
|
3720
3720
|
/* @__PURE__ */ l(
|
|
3721
3721
|
"div",
|
|
3722
3722
|
{
|
|
3723
|
-
ref:
|
|
3723
|
+
ref: ha,
|
|
3724
3724
|
className: "flex flex-col gap-3 rounded-lg p-3 shadow-2xl",
|
|
3725
3725
|
style: {
|
|
3726
3726
|
...Gn,
|
|
@@ -3733,7 +3733,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3733
3733
|
"button",
|
|
3734
3734
|
{
|
|
3735
3735
|
type: "button",
|
|
3736
|
-
onClick: () =>
|
|
3736
|
+
onClick: () => ar(u.bql),
|
|
3737
3737
|
className: "inline-flex h-7 items-center gap-1.5 rounded-md border px-2.5 text-xs font-semibold transition-colors hover:border-[var(--primary)] hover:text-[var(--primary)]",
|
|
3738
3738
|
style: {
|
|
3739
3739
|
background: "var(--bg-input)",
|
|
@@ -3747,26 +3747,26 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3747
3747
|
},
|
|
3748
3748
|
u.label
|
|
3749
3749
|
)),
|
|
3750
|
-
|
|
3750
|
+
$.length > 0 && /* @__PURE__ */ l(
|
|
3751
3751
|
"button",
|
|
3752
3752
|
{
|
|
3753
3753
|
type: "button",
|
|
3754
3754
|
onClick: () => gt((u) => !u),
|
|
3755
3755
|
className: "inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--bg-input)] hover:text-[var(--primary)]",
|
|
3756
|
-
"aria-expanded":
|
|
3756
|
+
"aria-expanded": pa,
|
|
3757
3757
|
children: [
|
|
3758
|
-
/* @__PURE__ */ t(
|
|
3758
|
+
/* @__PURE__ */ t(ra, { className: "h-3.5 w-3.5" }),
|
|
3759
3759
|
"Ejemplos"
|
|
3760
3760
|
]
|
|
3761
3761
|
}
|
|
3762
3762
|
),
|
|
3763
|
-
|
|
3763
|
+
It.length > 0 && /* @__PURE__ */ l(
|
|
3764
3764
|
"button",
|
|
3765
3765
|
{
|
|
3766
3766
|
type: "button",
|
|
3767
3767
|
onClick: () => yt((u) => !u),
|
|
3768
3768
|
className: "inline-flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-[var(--text-muted)] transition-colors hover:bg-[var(--bg-input)] hover:text-[var(--primary)]",
|
|
3769
|
-
"aria-expanded":
|
|
3769
|
+
"aria-expanded": fa,
|
|
3770
3770
|
children: [
|
|
3771
3771
|
/* @__PURE__ */ t(Wa, { className: "h-3.5 w-3.5" }),
|
|
3772
3772
|
"Historial"
|
|
@@ -3786,12 +3786,12 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3786
3786
|
/* @__PURE__ */ t(
|
|
3787
3787
|
"textarea",
|
|
3788
3788
|
{
|
|
3789
|
-
ref:
|
|
3790
|
-
value:
|
|
3789
|
+
ref: Br,
|
|
3790
|
+
value: Gt,
|
|
3791
3791
|
rows: 3,
|
|
3792
|
-
onChange: (u) =>
|
|
3792
|
+
onChange: (u) => Rr(u.target.value, u.target),
|
|
3793
3793
|
onKeyDown: (u) => {
|
|
3794
|
-
u.key === "Enter" && !u.shiftKey && (u.preventDefault(),
|
|
3794
|
+
u.key === "Enter" && !u.shiftKey && (u.preventDefault(), ar(Gt)), u.key === "Escape" && dt(!1);
|
|
3795
3795
|
},
|
|
3796
3796
|
placeholder: xe,
|
|
3797
3797
|
autoComplete: "off",
|
|
@@ -3814,9 +3814,9 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3814
3814
|
"button",
|
|
3815
3815
|
{
|
|
3816
3816
|
type: "button",
|
|
3817
|
-
onMouseDown: (
|
|
3818
|
-
var
|
|
3819
|
-
|
|
3817
|
+
onMouseDown: (F) => {
|
|
3818
|
+
var v;
|
|
3819
|
+
F.preventDefault(), Rr(u), (v = Br.current) == null || v.focus();
|
|
3820
3820
|
},
|
|
3821
3821
|
className: "block w-full px-4 py-2 text-left text-xs transition-colors hover:bg-[var(--bg-hover)] hover:text-[var(--primary)]",
|
|
3822
3822
|
style: {
|
|
@@ -3860,7 +3860,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3860
3860
|
u.key
|
|
3861
3861
|
))
|
|
3862
3862
|
] }),
|
|
3863
|
-
|
|
3863
|
+
fa && It.length > 0 && /* @__PURE__ */ l("div", { className: "overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-input)]", children: [
|
|
3864
3864
|
/* @__PURE__ */ l("div", { className: "flex items-center justify-between border-b border-[var(--border)] px-3 py-2", children: [
|
|
3865
3865
|
/* @__PURE__ */ l("span", { className: "flex items-center gap-1.5 text-xs font-semibold text-[var(--text-secondary)]", children: [
|
|
3866
3866
|
/* @__PURE__ */ t(Wa, { className: "h-3.5 w-3.5" }),
|
|
@@ -3871,7 +3871,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3871
3871
|
{
|
|
3872
3872
|
type: "button",
|
|
3873
3873
|
onClick: () => {
|
|
3874
|
-
|
|
3874
|
+
Ht([]), yt(!1);
|
|
3875
3875
|
},
|
|
3876
3876
|
className: "inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs text-[var(--text-muted)]",
|
|
3877
3877
|
children: [
|
|
@@ -3881,7 +3881,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3881
3881
|
}
|
|
3882
3882
|
)
|
|
3883
3883
|
] }),
|
|
3884
|
-
|
|
3884
|
+
It.map((u) => /* @__PURE__ */ l(
|
|
3885
3885
|
"div",
|
|
3886
3886
|
{
|
|
3887
3887
|
className: "group flex items-center gap-2 border-b border-[var(--border)] px-3 py-2 last:border-b-0",
|
|
@@ -3890,7 +3890,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3890
3890
|
"button",
|
|
3891
3891
|
{
|
|
3892
3892
|
type: "button",
|
|
3893
|
-
onClick: () =>
|
|
3893
|
+
onClick: () => ar(u),
|
|
3894
3894
|
className: "min-w-0 flex-1 text-left",
|
|
3895
3895
|
children: /* @__PURE__ */ t("code", { className: "block truncate text-xs text-[var(--primary)]", children: u })
|
|
3896
3896
|
}
|
|
@@ -3899,8 +3899,8 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3899
3899
|
"button",
|
|
3900
3900
|
{
|
|
3901
3901
|
type: "button",
|
|
3902
|
-
onClick: () =>
|
|
3903
|
-
(
|
|
3902
|
+
onClick: () => Ht(
|
|
3903
|
+
(F) => F.filter((v) => v !== u)
|
|
3904
3904
|
),
|
|
3905
3905
|
className: "rounded p-1 text-[var(--text-muted)] opacity-0 transition-opacity group-hover:opacity-100",
|
|
3906
3906
|
children: /* @__PURE__ */ t(Ie, { className: "h-3.5 w-3.5" })
|
|
@@ -3911,13 +3911,13 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3911
3911
|
u
|
|
3912
3912
|
))
|
|
3913
3913
|
] }),
|
|
3914
|
-
|
|
3914
|
+
pa && $.length > 0 && /* @__PURE__ */ t("div", { className: "grid gap-2 sm:grid-cols-2 lg:grid-cols-3", children: $.map((u) => /* @__PURE__ */ l(
|
|
3915
3915
|
"button",
|
|
3916
3916
|
{
|
|
3917
3917
|
type: "button",
|
|
3918
3918
|
onClick: () => {
|
|
3919
|
-
var
|
|
3920
|
-
|
|
3919
|
+
var F;
|
|
3920
|
+
Rr(u.bql), gt(!1), (F = Br.current) == null || F.focus();
|
|
3921
3921
|
},
|
|
3922
3922
|
className: "rounded-lg border border-[var(--border)] bg-[var(--bg-input)] p-2 text-left transition-colors hover:border-[var(--primary)]",
|
|
3923
3923
|
children: [
|
|
@@ -3944,7 +3944,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3944
3944
|
"button",
|
|
3945
3945
|
{
|
|
3946
3946
|
type: "button",
|
|
3947
|
-
onClick: () =>
|
|
3947
|
+
onClick: () => ar(Gt),
|
|
3948
3948
|
className: "inline-flex h-8 items-center gap-1.5 rounded-md bg-[var(--primary)] px-4 text-xs font-semibold text-[var(--primary-fg)] transition-opacity hover:opacity-90",
|
|
3949
3949
|
children: [
|
|
3950
3950
|
/* @__PURE__ */ t(Ue, { className: "h-3.5 w-3.5" }),
|
|
@@ -3965,21 +3965,21 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3965
3965
|
Ee && /* @__PURE__ */ t(
|
|
3966
3966
|
"button",
|
|
3967
3967
|
{
|
|
3968
|
-
ref:
|
|
3968
|
+
ref: Jt,
|
|
3969
3969
|
type: "button",
|
|
3970
3970
|
"aria-haspopup": "menu",
|
|
3971
|
-
"aria-expanded":
|
|
3971
|
+
"aria-expanded": jt,
|
|
3972
3972
|
"aria-label": "Exportar datos",
|
|
3973
3973
|
title: "Exportar datos",
|
|
3974
3974
|
onClick: () => {
|
|
3975
|
-
var
|
|
3976
|
-
const u = (
|
|
3975
|
+
var F;
|
|
3976
|
+
const u = (F = Jt.current) == null ? void 0 : F.getBoundingClientRect();
|
|
3977
3977
|
u && eo({
|
|
3978
3978
|
top: u.bottom + 4,
|
|
3979
3979
|
right: window.innerWidth - u.right
|
|
3980
|
-
}),
|
|
3980
|
+
}), Zt((v) => !v);
|
|
3981
3981
|
},
|
|
3982
|
-
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)] ${
|
|
3982
|
+
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)] ${jt ? "bg-[var(--bg-card)] text-[var(--primary)]" : ""}`,
|
|
3983
3983
|
children: /* @__PURE__ */ t(Uo, { className: "h-4 w-4" })
|
|
3984
3984
|
}
|
|
3985
3985
|
),
|
|
@@ -3993,20 +3993,20 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
3993
3993
|
title: ie,
|
|
3994
3994
|
onClick: (u) => Ma(u, "visibility"),
|
|
3995
3995
|
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)] ${nt && ct === "visibility" ? "bg-[var(--bg-card)] text-[var(--primary)]" : ""}`,
|
|
3996
|
-
children: /* @__PURE__ */ t(
|
|
3996
|
+
children: /* @__PURE__ */ t(Sr, { className: "h-4 w-4" })
|
|
3997
3997
|
}
|
|
3998
3998
|
)
|
|
3999
3999
|
]
|
|
4000
4000
|
}
|
|
4001
4001
|
);
|
|
4002
|
-
},
|
|
4002
|
+
}, Ra = () => {
|
|
4003
4003
|
if (!ko) return null;
|
|
4004
|
-
const o = di(He,
|
|
4004
|
+
const o = di(He, qr);
|
|
4005
4005
|
return /* @__PURE__ */ l(
|
|
4006
4006
|
"div",
|
|
4007
4007
|
{
|
|
4008
4008
|
"aria-busy": n,
|
|
4009
|
-
className: `grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-2 rounded-b-xl border-t text-xs select-none ${
|
|
4009
|
+
className: `grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-2 rounded-b-xl border-t text-xs select-none ${h ? "px-2 py-0.5" : "px-3 py-1"}`,
|
|
4010
4010
|
style: { borderColor: "var(--border)", background: "var(--bg-input)" },
|
|
4011
4011
|
children: [
|
|
4012
4012
|
/* @__PURE__ */ l("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
@@ -4014,9 +4014,9 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4014
4014
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-1", children: [
|
|
4015
4015
|
/* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: "Filas:" }),
|
|
4016
4016
|
/* @__PURE__ */ t(
|
|
4017
|
-
|
|
4017
|
+
qt,
|
|
4018
4018
|
{
|
|
4019
|
-
value: String(
|
|
4019
|
+
value: String(Ye),
|
|
4020
4020
|
onChange: (s) => Eo(Number(s)),
|
|
4021
4021
|
options: Y.map((s) => ({
|
|
4022
4022
|
value: String(s),
|
|
@@ -4038,7 +4038,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4038
4038
|
"button",
|
|
4039
4039
|
{
|
|
4040
4040
|
disabled: n || He <= 1,
|
|
4041
|
-
onClick: () =>
|
|
4041
|
+
onClick: () => Ur(He - 1),
|
|
4042
4042
|
onMouseEnter: (s) => {
|
|
4043
4043
|
s.currentTarget.disabled || (s.currentTarget.style.background = "color-mix(in srgb, var(--primary) 14%, var(--bg-card))", s.currentTarget.style.color = "var(--primary)");
|
|
4044
4044
|
},
|
|
@@ -4047,7 +4047,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4047
4047
|
},
|
|
4048
4048
|
className: "cursor-pointer rounded p-0.5 transition-colors disabled:cursor-not-allowed disabled:opacity-30",
|
|
4049
4049
|
style: { background: "transparent", color: "var(--text-muted)" },
|
|
4050
|
-
children: /* @__PURE__ */ t(
|
|
4050
|
+
children: /* @__PURE__ */ t(Tt, { className: "h-3.5 w-3.5" })
|
|
4051
4051
|
}
|
|
4052
4052
|
),
|
|
4053
4053
|
o.map(
|
|
@@ -4063,7 +4063,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4063
4063
|
"button",
|
|
4064
4064
|
{
|
|
4065
4065
|
disabled: n,
|
|
4066
|
-
onClick: () =>
|
|
4066
|
+
onClick: () => Ur(s),
|
|
4067
4067
|
onMouseEnter: (u) => {
|
|
4068
4068
|
u.currentTarget.disabled || s === He || (u.currentTarget.style.background = "color-mix(in srgb, var(--primary) 14%, var(--bg-card))", u.currentTarget.style.color = "var(--primary)");
|
|
4069
4069
|
},
|
|
@@ -4083,8 +4083,8 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4083
4083
|
/* @__PURE__ */ t(
|
|
4084
4084
|
"button",
|
|
4085
4085
|
{
|
|
4086
|
-
disabled: n || He >=
|
|
4087
|
-
onClick: () =>
|
|
4086
|
+
disabled: n || He >= qr,
|
|
4087
|
+
onClick: () => Ur(He + 1),
|
|
4088
4088
|
onMouseEnter: (s) => {
|
|
4089
4089
|
s.currentTarget.disabled || (s.currentTarget.style.background = "color-mix(in srgb, var(--primary) 14%, var(--bg-card))", s.currentTarget.style.color = "var(--primary)");
|
|
4090
4090
|
},
|
|
@@ -4101,80 +4101,112 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4101
4101
|
]
|
|
4102
4102
|
}
|
|
4103
4103
|
);
|
|
4104
|
-
},
|
|
4104
|
+
}, _a = () => /* @__PURE__ */ l(
|
|
4105
4105
|
"div",
|
|
4106
4106
|
{
|
|
4107
4107
|
className: "w-full min-w-0 max-w-full flex flex-col rounded-lg overflow-hidden",
|
|
4108
|
-
style: { background: "var(--bg-card)", boxShadow:
|
|
4109
|
-
children:
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
borderColor: "var(--border)",
|
|
4125
|
-
background: "color-mix(in srgb, var(--bg-input) 72%, transparent)"
|
|
4126
|
-
},
|
|
4127
|
-
children: /* @__PURE__ */ t(
|
|
4128
|
-
"div",
|
|
4129
|
-
{
|
|
4130
|
-
className: "h-3.5 w-40 animate-pulse rounded-full",
|
|
4131
|
-
style: { background: "var(--border)" }
|
|
4132
|
-
}
|
|
4133
|
-
)
|
|
4134
|
-
}
|
|
4135
|
-
),
|
|
4136
|
-
/* @__PURE__ */ t("div", { className: "space-y-2 p-3", children: Array.from({ length: Math.min(6, i) }).map(
|
|
4137
|
-
(o, s) => /* @__PURE__ */ t(
|
|
4108
|
+
style: { background: "var(--bg-card)", boxShadow: ir },
|
|
4109
|
+
children: [
|
|
4110
|
+
dr(),
|
|
4111
|
+
mr(),
|
|
4112
|
+
br(),
|
|
4113
|
+
/* @__PURE__ */ t("div", { ref: ot, className: "min-w-0 max-w-full overflow-hidden", children: /* @__PURE__ */ l(
|
|
4114
|
+
"div",
|
|
4115
|
+
{
|
|
4116
|
+
role: "table",
|
|
4117
|
+
className: "text-sm",
|
|
4118
|
+
style: {
|
|
4119
|
+
width: _t,
|
|
4120
|
+
minWidth: sr
|
|
4121
|
+
},
|
|
4122
|
+
children: [
|
|
4123
|
+
/* @__PURE__ */ t(
|
|
4138
4124
|
"div",
|
|
4139
4125
|
{
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
"
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4126
|
+
role: "rowgroup",
|
|
4127
|
+
style: E ? {
|
|
4128
|
+
position: "sticky",
|
|
4129
|
+
top: 0,
|
|
4130
|
+
zIndex: 10,
|
|
4131
|
+
backdropFilter: "blur(14px)",
|
|
4132
|
+
WebkitBackdropFilter: "blur(14px)"
|
|
4133
|
+
} : void 0,
|
|
4134
|
+
children: cr()
|
|
4135
|
+
}
|
|
4136
|
+
),
|
|
4137
|
+
/* @__PURE__ */ t("div", { role: "rowgroup", children: Array.from({ length: Math.min(6, i) }).map(
|
|
4138
|
+
(o, s) => /* @__PURE__ */ l(
|
|
4139
|
+
"div",
|
|
4140
|
+
{
|
|
4141
|
+
role: "row",
|
|
4142
|
+
className: "grid",
|
|
4143
|
+
style: {
|
|
4144
|
+
gridTemplateColumns: $t,
|
|
4145
|
+
borderBottom: `1px solid ${ye}`
|
|
4150
4146
|
},
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4147
|
+
children: [
|
|
4148
|
+
Ge && /* @__PURE__ */ t(
|
|
4149
|
+
"div",
|
|
4150
|
+
{
|
|
4151
|
+
role: "cell",
|
|
4152
|
+
className: `${h ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
4153
|
+
style: {
|
|
4154
|
+
borderBottom: `1px solid ${ye}`,
|
|
4155
|
+
borderRight: `1px solid ${ye}`
|
|
4156
|
+
}
|
|
4157
|
+
},
|
|
4158
|
+
"select-cell"
|
|
4159
|
+
),
|
|
4160
|
+
Ke.map((g, u) => /* @__PURE__ */ t(
|
|
4161
|
+
"div",
|
|
4162
|
+
{
|
|
4163
|
+
role: "cell",
|
|
4164
|
+
className: h ? "px-2 py-1.5" : "px-3 py-2",
|
|
4165
|
+
style: {
|
|
4166
|
+
borderBottom: `1px solid ${ye}`,
|
|
4167
|
+
borderRight: `1px solid ${ye}`
|
|
4168
|
+
},
|
|
4169
|
+
children: /* @__PURE__ */ t(
|
|
4170
|
+
"div",
|
|
4171
|
+
{
|
|
4172
|
+
className: "h-3.5 rounded-full animate-pulse",
|
|
4173
|
+
style: {
|
|
4174
|
+
background: "var(--border)",
|
|
4175
|
+
width: `${ga(s, u)}%`,
|
|
4176
|
+
minWidth: 32
|
|
4177
|
+
}
|
|
4178
|
+
}
|
|
4179
|
+
)
|
|
4180
|
+
},
|
|
4181
|
+
g.key
|
|
4182
|
+
))
|
|
4183
|
+
]
|
|
4184
|
+
},
|
|
4185
|
+
s
|
|
4186
|
+
)
|
|
4187
|
+
) })
|
|
4188
|
+
]
|
|
4189
|
+
}
|
|
4190
|
+
) })
|
|
4191
|
+
]
|
|
4160
4192
|
}
|
|
4161
|
-
),
|
|
4162
|
-
return I && !Te && r.length === 0 || !n && r.length === 0 && !
|
|
4193
|
+
), Kr = "min-w-0 max-w-full overflow-hidden";
|
|
4194
|
+
return I && !Te && r.length === 0 || !n && r.length === 0 && !Ir ? _a() : n && r.length === 0 ? /* @__PURE__ */ l(
|
|
4163
4195
|
"div",
|
|
4164
4196
|
{
|
|
4165
4197
|
className: "w-full min-w-0 max-w-full flex flex-col rounded-lg overflow-hidden",
|
|
4166
|
-
style: { background: "var(--bg-card)", boxShadow:
|
|
4198
|
+
style: { background: "var(--bg-card)", boxShadow: ir },
|
|
4167
4199
|
children: [
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
/* @__PURE__ */ t("div", { ref: ot, className:
|
|
4200
|
+
dr(),
|
|
4201
|
+
mr(),
|
|
4202
|
+
br(),
|
|
4203
|
+
/* @__PURE__ */ t("div", { ref: ot, className: Kr, children: /* @__PURE__ */ t(
|
|
4172
4204
|
Va,
|
|
4173
4205
|
{
|
|
4174
4206
|
options: { scrollbars: { autoHide: "leave", autoHideDelay: 200 } },
|
|
4175
4207
|
className: "w-full",
|
|
4176
4208
|
style: {
|
|
4177
|
-
maxHeight:
|
|
4209
|
+
maxHeight: wa,
|
|
4178
4210
|
maxWidth: "100%"
|
|
4179
4211
|
},
|
|
4180
4212
|
defer: !0,
|
|
@@ -4184,22 +4216,22 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4184
4216
|
role: "table",
|
|
4185
4217
|
className: "text-sm",
|
|
4186
4218
|
style: {
|
|
4187
|
-
width:
|
|
4188
|
-
minWidth:
|
|
4219
|
+
width: _t,
|
|
4220
|
+
minWidth: sr
|
|
4189
4221
|
},
|
|
4190
4222
|
children: [
|
|
4191
4223
|
/* @__PURE__ */ t(
|
|
4192
4224
|
"div",
|
|
4193
4225
|
{
|
|
4194
4226
|
role: "rowgroup",
|
|
4195
|
-
style:
|
|
4227
|
+
style: E ? {
|
|
4196
4228
|
position: "sticky",
|
|
4197
4229
|
top: 0,
|
|
4198
4230
|
zIndex: 10,
|
|
4199
4231
|
backdropFilter: "blur(14px)",
|
|
4200
4232
|
WebkitBackdropFilter: "blur(14px)"
|
|
4201
4233
|
} : void 0,
|
|
4202
|
-
children:
|
|
4234
|
+
children: cr()
|
|
4203
4235
|
}
|
|
4204
4236
|
),
|
|
4205
4237
|
/* @__PURE__ */ t("div", { role: "rowgroup", children: Array.from({ length: i }).map((o, s) => /* @__PURE__ */ l(
|
|
@@ -4208,42 +4240,42 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4208
4240
|
role: "row",
|
|
4209
4241
|
className: "grid",
|
|
4210
4242
|
style: {
|
|
4211
|
-
gridTemplateColumns:
|
|
4212
|
-
borderBottom: `1px solid ${
|
|
4243
|
+
gridTemplateColumns: $t,
|
|
4244
|
+
borderBottom: `1px solid ${ye}`
|
|
4213
4245
|
},
|
|
4214
4246
|
children: [
|
|
4215
|
-
|
|
4247
|
+
Ge && /* @__PURE__ */ t(
|
|
4216
4248
|
"div",
|
|
4217
4249
|
{
|
|
4218
4250
|
role: "cell",
|
|
4219
|
-
className: `${
|
|
4251
|
+
className: `${h ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
4220
4252
|
style: {
|
|
4221
|
-
borderBottom: `1px solid ${
|
|
4222
|
-
borderRight: `1px solid ${
|
|
4253
|
+
borderBottom: `1px solid ${ye}`,
|
|
4254
|
+
borderRight: `1px solid ${ye}`
|
|
4223
4255
|
}
|
|
4224
4256
|
},
|
|
4225
4257
|
"select-cell"
|
|
4226
4258
|
),
|
|
4227
|
-
|
|
4228
|
-
const
|
|
4259
|
+
Ke.map((g, u) => {
|
|
4260
|
+
const F = ee && !Hr && u === 0;
|
|
4229
4261
|
return /* @__PURE__ */ t(
|
|
4230
4262
|
"div",
|
|
4231
4263
|
{
|
|
4232
4264
|
role: "cell",
|
|
4233
4265
|
"data-dt-column-key": g.key,
|
|
4234
|
-
className:
|
|
4235
|
-
style:
|
|
4266
|
+
className: h ? "px-2 py-1.5" : "px-3 py-2",
|
|
4267
|
+
style: F ? {
|
|
4236
4268
|
position: "sticky",
|
|
4237
|
-
left:
|
|
4269
|
+
left: Wr,
|
|
4238
4270
|
zIndex: 1,
|
|
4239
4271
|
background: "color-mix(in srgb, var(--bg-card) 72%, transparent)",
|
|
4240
4272
|
backdropFilter: "blur(10px)",
|
|
4241
4273
|
WebkitBackdropFilter: "blur(10px)",
|
|
4242
|
-
boxShadow: `3px 0 6px -2px rgba(0,0,0,0.10), inset 0 -1px 0 ${
|
|
4243
|
-
borderRight: `1px solid ${
|
|
4274
|
+
boxShadow: `3px 0 6px -2px rgba(0,0,0,0.10), inset 0 -1px 0 ${ye}`,
|
|
4275
|
+
borderRight: `1px solid ${ye}`
|
|
4244
4276
|
} : {
|
|
4245
|
-
borderBottom: `1px solid ${
|
|
4246
|
-
borderRight: `1px solid ${
|
|
4277
|
+
borderBottom: `1px solid ${ye}`,
|
|
4278
|
+
borderRight: `1px solid ${ye}`
|
|
4247
4279
|
},
|
|
4248
4280
|
children: /* @__PURE__ */ t(
|
|
4249
4281
|
"div",
|
|
@@ -4251,7 +4283,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4251
4283
|
className: "h-3.5 rounded-full animate-pulse",
|
|
4252
4284
|
style: {
|
|
4253
4285
|
background: "var(--border)",
|
|
4254
|
-
width: `${
|
|
4286
|
+
width: `${ga(s, u)}%`,
|
|
4255
4287
|
minWidth: 32
|
|
4256
4288
|
}
|
|
4257
4289
|
}
|
|
@@ -4269,39 +4301,39 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4269
4301
|
)
|
|
4270
4302
|
}
|
|
4271
4303
|
) }),
|
|
4272
|
-
|
|
4304
|
+
Ra()
|
|
4273
4305
|
]
|
|
4274
4306
|
}
|
|
4275
4307
|
) : !n && r.length === 0 ? /* @__PURE__ */ l(
|
|
4276
4308
|
"div",
|
|
4277
4309
|
{
|
|
4278
4310
|
className: "w-full min-w-0 max-w-full flex flex-col rounded-lg overflow-hidden",
|
|
4279
|
-
style: { background: "var(--bg-card)", boxShadow:
|
|
4311
|
+
style: { background: "var(--bg-card)", boxShadow: ir },
|
|
4280
4312
|
children: [
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
/* @__PURE__ */ t("div", { ref: ot, className:
|
|
4313
|
+
dr(),
|
|
4314
|
+
mr(),
|
|
4315
|
+
br(),
|
|
4316
|
+
/* @__PURE__ */ t("div", { ref: ot, className: Kr, children: /* @__PURE__ */ t(
|
|
4285
4317
|
"div",
|
|
4286
4318
|
{
|
|
4287
4319
|
role: "table",
|
|
4288
4320
|
className: "text-sm",
|
|
4289
4321
|
style: {
|
|
4290
|
-
width:
|
|
4291
|
-
minWidth:
|
|
4322
|
+
width: _t,
|
|
4323
|
+
minWidth: sr
|
|
4292
4324
|
},
|
|
4293
4325
|
children: /* @__PURE__ */ t(
|
|
4294
4326
|
"div",
|
|
4295
4327
|
{
|
|
4296
4328
|
role: "rowgroup",
|
|
4297
|
-
style:
|
|
4329
|
+
style: E ? {
|
|
4298
4330
|
position: "sticky",
|
|
4299
4331
|
top: 0,
|
|
4300
4332
|
zIndex: 10,
|
|
4301
4333
|
backdropFilter: "blur(14px)",
|
|
4302
4334
|
WebkitBackdropFilter: "blur(14px)"
|
|
4303
4335
|
} : void 0,
|
|
4304
|
-
children:
|
|
4336
|
+
children: cr()
|
|
4305
4337
|
}
|
|
4306
4338
|
)
|
|
4307
4339
|
}
|
|
@@ -4311,7 +4343,7 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4311
4343
|
{
|
|
4312
4344
|
className: "flex min-h-[180px] flex-col items-center justify-center gap-3 border-t px-6 py-12 text-center",
|
|
4313
4345
|
style: {
|
|
4314
|
-
borderColor:
|
|
4346
|
+
borderColor: ye,
|
|
4315
4347
|
background: "linear-gradient(180deg, color-mix(in srgb, var(--bg-input) 58%, transparent), var(--bg-card))"
|
|
4316
4348
|
},
|
|
4317
4349
|
children: [
|
|
@@ -4345,18 +4377,18 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4345
4377
|
"div",
|
|
4346
4378
|
{
|
|
4347
4379
|
className: "w-full min-w-0 max-w-full flex flex-col rounded-lg overflow-hidden",
|
|
4348
|
-
style: { background: "var(--bg-card)", boxShadow:
|
|
4380
|
+
style: { background: "var(--bg-card)", boxShadow: ir },
|
|
4349
4381
|
children: [
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
/* @__PURE__ */ t("div", { ref: ot, className:
|
|
4382
|
+
dr(),
|
|
4383
|
+
mr(),
|
|
4384
|
+
br(),
|
|
4385
|
+
/* @__PURE__ */ t("div", { ref: ot, className: Kr, children: /* @__PURE__ */ t(
|
|
4354
4386
|
Va,
|
|
4355
4387
|
{
|
|
4356
4388
|
options: { scrollbars: { autoHide: "leave", autoHideDelay: 200 } },
|
|
4357
4389
|
className: "w-full",
|
|
4358
4390
|
style: {
|
|
4359
|
-
maxHeight:
|
|
4391
|
+
maxHeight: wa,
|
|
4360
4392
|
maxWidth: "100%"
|
|
4361
4393
|
},
|
|
4362
4394
|
defer: !0,
|
|
@@ -4366,45 +4398,45 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4366
4398
|
role: "table",
|
|
4367
4399
|
className: "text-sm",
|
|
4368
4400
|
style: {
|
|
4369
|
-
width:
|
|
4370
|
-
minWidth:
|
|
4401
|
+
width: _t,
|
|
4402
|
+
minWidth: sr
|
|
4371
4403
|
},
|
|
4372
4404
|
children: [
|
|
4373
4405
|
/* @__PURE__ */ t(
|
|
4374
4406
|
"div",
|
|
4375
4407
|
{
|
|
4376
4408
|
role: "rowgroup",
|
|
4377
|
-
style:
|
|
4409
|
+
style: E ? {
|
|
4378
4410
|
position: "sticky",
|
|
4379
4411
|
top: 0,
|
|
4380
4412
|
zIndex: 10,
|
|
4381
4413
|
backdropFilter: "blur(14px)",
|
|
4382
4414
|
WebkitBackdropFilter: "blur(14px)"
|
|
4383
4415
|
} : void 0,
|
|
4384
|
-
children:
|
|
4416
|
+
children: cr()
|
|
4385
4417
|
}
|
|
4386
4418
|
),
|
|
4387
4419
|
/* @__PURE__ */ t("div", { role: "rowgroup", children: Da.map((o, s) => {
|
|
4388
|
-
const g = a(o), u = ja(V == null ? void 0 : V(o)),
|
|
4420
|
+
const g = a(o), u = ja(V == null ? void 0 : V(o)), F = s > 0 ? ja(
|
|
4389
4421
|
V == null ? void 0 : V(Da[s - 1])
|
|
4390
|
-
) : null,
|
|
4422
|
+
) : null, v = u && u.key !== (F == null ? void 0 : F.key), oe = Ge && x.has(g), D = Ct ? (w == null ? void 0 : w(o)) ?? !0 : !1, Le = D && Aa.has(g), ke = !!b || N && D, fe = oe && K ? "color-mix(in srgb, var(--primary) 8%, var(--bg-card))" : s % 2 === 1 ? "color-mix(in srgb, var(--bg-input) 30%, var(--bg-card))" : "var(--bg-card)";
|
|
4391
4423
|
return /* @__PURE__ */ l(je.Fragment, { children: [
|
|
4392
|
-
|
|
4424
|
+
v && /* @__PURE__ */ t(
|
|
4393
4425
|
"div",
|
|
4394
4426
|
{
|
|
4395
4427
|
role: "row",
|
|
4396
4428
|
className: `grid ${u.className ?? ""}`,
|
|
4397
|
-
style: { gridTemplateColumns:
|
|
4429
|
+
style: { gridTemplateColumns: $t },
|
|
4398
4430
|
children: /* @__PURE__ */ t(
|
|
4399
4431
|
"div",
|
|
4400
4432
|
{
|
|
4401
4433
|
role: "cell",
|
|
4402
|
-
className:
|
|
4434
|
+
className: h ? "px-2 py-2" : "px-3 py-3",
|
|
4403
4435
|
style: {
|
|
4404
4436
|
gridColumn: "1 / -1",
|
|
4405
4437
|
background: "color-mix(in srgb, var(--primary) 8%, var(--bg-input))",
|
|
4406
|
-
borderBottom: `1px solid ${
|
|
4407
|
-
borderRight: `1px solid ${
|
|
4438
|
+
borderBottom: `1px solid ${ye}`,
|
|
4439
|
+
borderRight: `1px solid ${ye}`
|
|
4408
4440
|
},
|
|
4409
4441
|
children: /* @__PURE__ */ t("div", { className: "flex min-w-0 items-center justify-between gap-3", children: /* @__PURE__ */ l("div", { className: "min-w-0", children: [
|
|
4410
4442
|
/* @__PURE__ */ t("div", { className: "truncate text-xs font-semibold uppercase tracking-wider text-[var(--text-main)]", children: u.label }),
|
|
@@ -4432,11 +4464,11 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4432
4464
|
} : void 0,
|
|
4433
4465
|
className: `grid transition-colors ${ke ? "cursor-pointer" : ""} ${B ? B(o) : ""}`,
|
|
4434
4466
|
style: {
|
|
4435
|
-
gridTemplateColumns:
|
|
4467
|
+
gridTemplateColumns: $t,
|
|
4436
4468
|
"--dt-row-bg": fe,
|
|
4437
4469
|
"--dt-sticky-bg": fe,
|
|
4438
4470
|
background: "var(--dt-row-bg)",
|
|
4439
|
-
borderBottom: `1px solid ${
|
|
4471
|
+
borderBottom: `1px solid ${ye}`
|
|
4440
4472
|
},
|
|
4441
4473
|
onMouseEnter: (ge) => {
|
|
4442
4474
|
oe || (ge.currentTarget.style.setProperty(
|
|
@@ -4458,10 +4490,10 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4458
4490
|
"div",
|
|
4459
4491
|
{
|
|
4460
4492
|
role: "cell",
|
|
4461
|
-
className: `${
|
|
4493
|
+
className: `${h ? "px-2 py-1.5" : "px-3 py-2"} flex w-10 items-center justify-center`,
|
|
4462
4494
|
style: {
|
|
4463
|
-
borderBottom: `1px solid ${
|
|
4464
|
-
borderRight: `1px solid ${
|
|
4495
|
+
borderBottom: `1px solid ${ye}`,
|
|
4496
|
+
borderRight: `1px solid ${ye}`
|
|
4465
4497
|
},
|
|
4466
4498
|
"data-dt-disable-row-click": "true",
|
|
4467
4499
|
children: D && /* @__PURE__ */ t(
|
|
@@ -4474,31 +4506,31 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4474
4506
|
ge.stopPropagation(), Ba(g);
|
|
4475
4507
|
},
|
|
4476
4508
|
className: "inline-flex h-6 w-6 items-center justify-center rounded-md text-[var(--text-muted)] transition-colors hover:bg-[var(--bg-input)] hover:text-[var(--primary)]",
|
|
4477
|
-
children: Le ? /* @__PURE__ */ t(
|
|
4509
|
+
children: Le ? /* @__PURE__ */ t(Xe, { className: "h-4 w-4" }) : /* @__PURE__ */ t(st, { className: "h-4 w-4" })
|
|
4478
4510
|
}
|
|
4479
4511
|
)
|
|
4480
4512
|
}
|
|
4481
4513
|
),
|
|
4482
|
-
|
|
4514
|
+
Ge && /* @__PURE__ */ t(
|
|
4483
4515
|
"div",
|
|
4484
4516
|
{
|
|
4485
4517
|
role: "cell",
|
|
4486
|
-
className: `${
|
|
4518
|
+
className: `${h ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
4487
4519
|
style: ee ? {
|
|
4488
4520
|
position: "sticky",
|
|
4489
4521
|
left: 0,
|
|
4490
4522
|
zIndex: 3,
|
|
4491
4523
|
background: "var(--dt-sticky-bg)",
|
|
4492
|
-
boxShadow: `inset 0 -1px 0 ${
|
|
4524
|
+
boxShadow: `inset 0 -1px 0 ${ye}`
|
|
4493
4525
|
} : {
|
|
4494
|
-
borderBottom: `1px solid ${
|
|
4495
|
-
borderRight: `1px solid ${
|
|
4526
|
+
borderBottom: `1px solid ${ye}`,
|
|
4527
|
+
borderRight: `1px solid ${ye}`
|
|
4496
4528
|
},
|
|
4497
4529
|
onClick: (ge) => {
|
|
4498
4530
|
ge.stopPropagation(), y(g);
|
|
4499
4531
|
},
|
|
4500
4532
|
children: /* @__PURE__ */ t(
|
|
4501
|
-
|
|
4533
|
+
ia,
|
|
4502
4534
|
{
|
|
4503
4535
|
size: "sm",
|
|
4504
4536
|
checked: oe,
|
|
@@ -4511,28 +4543,28 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4511
4543
|
)
|
|
4512
4544
|
}
|
|
4513
4545
|
),
|
|
4514
|
-
|
|
4515
|
-
const Oe = ee && !
|
|
4546
|
+
Ke.map((ge, he) => {
|
|
4547
|
+
const Oe = ee && !Hr && he === 0, we = vt(ge);
|
|
4516
4548
|
return /* @__PURE__ */ t(
|
|
4517
4549
|
"div",
|
|
4518
4550
|
{
|
|
4519
4551
|
role: "cell",
|
|
4520
4552
|
"data-dt-column-key": ge.key,
|
|
4521
|
-
"data-dt-disable-row-click": ge.disableRowClick ||
|
|
4522
|
-
className: `${
|
|
4553
|
+
"data-dt-disable-row-click": ge.disableRowClick || we ? "true" : void 0,
|
|
4554
|
+
className: `${we ? "px-2 py-1.5 text-center" : `${h ? "px-2 py-1.5" : "px-3 py-2"} ${Oa(ge.align)}`} ${ai} ${ge.className ?? ""}`,
|
|
4523
4555
|
style: {
|
|
4524
4556
|
overflow: "hidden",
|
|
4525
4557
|
whiteSpace: "nowrap",
|
|
4526
4558
|
...Oe ? {
|
|
4527
4559
|
position: "sticky",
|
|
4528
|
-
left:
|
|
4560
|
+
left: Wr,
|
|
4529
4561
|
zIndex: 3,
|
|
4530
4562
|
background: "var(--dt-sticky-bg)",
|
|
4531
|
-
boxShadow: `3px 0 6px -2px rgba(0,0,0,0.10), inset 0 -1px 0 ${
|
|
4532
|
-
borderRight: `1px solid ${
|
|
4563
|
+
boxShadow: `3px 0 6px -2px rgba(0,0,0,0.10), inset 0 -1px 0 ${ye}`,
|
|
4564
|
+
borderRight: `1px solid ${ye}`
|
|
4533
4565
|
} : {
|
|
4534
|
-
borderBottom: `1px solid ${
|
|
4535
|
-
borderRight: `1px solid ${
|
|
4566
|
+
borderBottom: `1px solid ${ye}`,
|
|
4567
|
+
borderRight: `1px solid ${ye}`
|
|
4536
4568
|
}
|
|
4537
4569
|
},
|
|
4538
4570
|
children: /* @__PURE__ */ t(Za, { children: /* @__PURE__ */ t(
|
|
@@ -4555,16 +4587,16 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4555
4587
|
{
|
|
4556
4588
|
role: "row",
|
|
4557
4589
|
className: "grid",
|
|
4558
|
-
style: { gridTemplateColumns:
|
|
4590
|
+
style: { gridTemplateColumns: $t },
|
|
4559
4591
|
children: /* @__PURE__ */ t(
|
|
4560
4592
|
"div",
|
|
4561
4593
|
{
|
|
4562
4594
|
role: "cell",
|
|
4563
|
-
className:
|
|
4595
|
+
className: h ? "px-2 py-2" : "px-3 py-3",
|
|
4564
4596
|
style: {
|
|
4565
4597
|
gridColumn: "1 / -1",
|
|
4566
4598
|
background: "color-mix(in srgb, var(--bg-input) 60%, var(--bg-card))",
|
|
4567
|
-
borderBottom: `1px solid ${
|
|
4599
|
+
borderBottom: `1px solid ${ye}`
|
|
4568
4600
|
},
|
|
4569
4601
|
children: p(o)
|
|
4570
4602
|
}
|
|
@@ -4578,12 +4610,12 @@ ${g}`, _ = new Blob(["\uFEFF" + u], {
|
|
|
4578
4610
|
)
|
|
4579
4611
|
}
|
|
4580
4612
|
) }),
|
|
4581
|
-
|
|
4613
|
+
Ra()
|
|
4582
4614
|
]
|
|
4583
4615
|
}
|
|
4584
4616
|
);
|
|
4585
4617
|
}
|
|
4586
|
-
function
|
|
4618
|
+
function Pt(e) {
|
|
4587
4619
|
return e ? /* @__PURE__ */ new Date(`${e}T12:00:00`) : void 0;
|
|
4588
4620
|
}
|
|
4589
4621
|
function Ja(e) {
|
|
@@ -4628,7 +4660,7 @@ function bi({
|
|
|
4628
4660
|
opacity: b ? 1 : 0.45,
|
|
4629
4661
|
cursor: b ? "pointer" : "not-allowed"
|
|
4630
4662
|
},
|
|
4631
|
-
children: /* @__PURE__ */ t(
|
|
4663
|
+
children: /* @__PURE__ */ t(Tt, { size: 16 })
|
|
4632
4664
|
}
|
|
4633
4665
|
),
|
|
4634
4666
|
/* @__PURE__ */ t(
|
|
@@ -4673,13 +4705,13 @@ function Vs({
|
|
|
4673
4705
|
endLabel: b = "Regreso"
|
|
4674
4706
|
}) {
|
|
4675
4707
|
const p = {
|
|
4676
|
-
from:
|
|
4677
|
-
to:
|
|
4678
|
-
}, w =
|
|
4679
|
-
|
|
4708
|
+
from: Pt(e),
|
|
4709
|
+
to: Pt(r)
|
|
4710
|
+
}, w = Pt(n), [k, f] = L(
|
|
4711
|
+
Pt(i || e)
|
|
4680
4712
|
);
|
|
4681
4713
|
return Q(() => {
|
|
4682
|
-
f(
|
|
4714
|
+
f(Pt(i || e));
|
|
4683
4715
|
}, [i, e]), /* @__PURE__ */ l("div", { children: [
|
|
4684
4716
|
/* @__PURE__ */ t(
|
|
4685
4717
|
"div",
|
|
@@ -4867,14 +4899,14 @@ function Ks({
|
|
|
4867
4899
|
onOpenChange: m
|
|
4868
4900
|
}) {
|
|
4869
4901
|
const [b, p] = L(!1), [w, k] = L(!1), [f, C] = L({}), N = se(null), x = se(null), y = Ce(
|
|
4870
|
-
(
|
|
4871
|
-
p(
|
|
4902
|
+
(E) => {
|
|
4903
|
+
p(E), m == null || m(E);
|
|
4872
4904
|
},
|
|
4873
4905
|
[m]
|
|
4874
4906
|
), A = Ce(() => {
|
|
4875
|
-
const
|
|
4876
|
-
if (
|
|
4877
|
-
const H =
|
|
4907
|
+
const E = N.current;
|
|
4908
|
+
if (!E) return;
|
|
4909
|
+
const H = E.getBoundingClientRect(), Y = typeof n == "number" ? n : H.width, X = typeof n == "number" ? n : Math.max(H.width, 180), j = a === "end" ? Math.max(8, H.right - X) : Math.min(H.left, window.innerWidth - X - 8), U = window.innerHeight - H.bottom, G = U < 240 && H.top > U ? void 0 : H.bottom + 6, S = G === void 0 ? window.innerHeight - H.top + 6 : void 0;
|
|
4878
4910
|
C({
|
|
4879
4911
|
position: "fixed",
|
|
4880
4912
|
zIndex: 9999,
|
|
@@ -4887,20 +4919,20 @@ function Ks({
|
|
|
4887
4919
|
Q(() => k(!0), []), Q(() => {
|
|
4888
4920
|
if (!b) return;
|
|
4889
4921
|
A();
|
|
4890
|
-
const
|
|
4922
|
+
const E = (Y) => {
|
|
4891
4923
|
var j, U;
|
|
4892
4924
|
const X = Y.target;
|
|
4893
4925
|
!((j = N.current) != null && j.contains(X)) && !((U = x.current) != null && U.contains(X)) && y(!1);
|
|
4894
4926
|
}, H = (Y) => {
|
|
4895
4927
|
Y.key === "Escape" && y(!1);
|
|
4896
4928
|
};
|
|
4897
|
-
return document.addEventListener("mousedown",
|
|
4898
|
-
document.removeEventListener("mousedown",
|
|
4929
|
+
return document.addEventListener("mousedown", E), window.addEventListener("keydown", H), window.addEventListener("resize", A), window.addEventListener("scroll", A, !0), () => {
|
|
4930
|
+
document.removeEventListener("mousedown", E), window.removeEventListener("keydown", H), window.removeEventListener("resize", A), window.removeEventListener("scroll", A, !0);
|
|
4899
4931
|
};
|
|
4900
4932
|
}, [b, y, A]);
|
|
4901
|
-
const K = (
|
|
4902
|
-
i || (
|
|
4903
|
-
}, B =
|
|
4933
|
+
const K = (E) => {
|
|
4934
|
+
i || (E.key === "Enter" || E.key === " ") && (E.preventDefault(), y(!b));
|
|
4935
|
+
}, B = sa(e) ? Oo(e, {
|
|
4904
4936
|
onClick: () => {
|
|
4905
4937
|
i || (Qa(), y(!b));
|
|
4906
4938
|
}
|
|
@@ -4912,32 +4944,32 @@ function Ks({
|
|
|
4912
4944
|
"data-bonsaif-overlay": "true",
|
|
4913
4945
|
className: `overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-1 shadow-xl ${d}`,
|
|
4914
4946
|
style: f,
|
|
4915
|
-
children: r.map((
|
|
4916
|
-
|
|
4947
|
+
children: r.map((E) => /* @__PURE__ */ l("div", { children: [
|
|
4948
|
+
E.separatorBefore && /* @__PURE__ */ t("div", { className: "my-1 border-t border-[var(--border)]" }),
|
|
4917
4949
|
/* @__PURE__ */ l(
|
|
4918
4950
|
"button",
|
|
4919
4951
|
{
|
|
4920
4952
|
type: "button",
|
|
4921
4953
|
role: "menuitem",
|
|
4922
|
-
disabled:
|
|
4954
|
+
disabled: E.disabled,
|
|
4923
4955
|
onClick: () => {
|
|
4924
4956
|
var H;
|
|
4925
|
-
|
|
4957
|
+
E.disabled || (Qa(), (H = E.onSelect) == null || H.call(E), y(!1));
|
|
4926
4958
|
},
|
|
4927
4959
|
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",
|
|
4928
4960
|
style: {
|
|
4929
|
-
color:
|
|
4961
|
+
color: E.danger ? "var(--danger)" : "var(--text-main)"
|
|
4930
4962
|
},
|
|
4931
4963
|
children: [
|
|
4932
|
-
|
|
4964
|
+
E.icon && /* @__PURE__ */ t("span", { className: "mt-0.5 shrink-0", children: E.icon }),
|
|
4933
4965
|
/* @__PURE__ */ l("span", { className: "min-w-0 flex-1", children: [
|
|
4934
|
-
/* @__PURE__ */ t("span", { className: "block truncate text-sm font-medium", children:
|
|
4935
|
-
|
|
4966
|
+
/* @__PURE__ */ t("span", { className: "block truncate text-sm font-medium", children: E.label }),
|
|
4967
|
+
E.description && /* @__PURE__ */ t("span", { className: "block truncate text-xs text-[var(--text-muted)]", children: E.description })
|
|
4936
4968
|
] })
|
|
4937
4969
|
]
|
|
4938
4970
|
}
|
|
4939
4971
|
)
|
|
4940
|
-
] },
|
|
4972
|
+
] }, E.id))
|
|
4941
4973
|
}
|
|
4942
4974
|
) : null;
|
|
4943
4975
|
return /* @__PURE__ */ l(
|
|
@@ -4952,7 +4984,7 @@ function Ks({
|
|
|
4952
4984
|
className: `inline-flex ${i ? "pointer-events-none opacity-60" : ""} ${c}`,
|
|
4953
4985
|
children: [
|
|
4954
4986
|
B,
|
|
4955
|
-
w && V ?
|
|
4987
|
+
w && V ? Ze(V, document.body) : null
|
|
4956
4988
|
]
|
|
4957
4989
|
}
|
|
4958
4990
|
);
|
|
@@ -4979,7 +5011,7 @@ function Ys({
|
|
|
4979
5011
|
onDiscardChanges: A,
|
|
4980
5012
|
children: K
|
|
4981
5013
|
}) {
|
|
4982
|
-
const [B, V] = L(!1), [
|
|
5014
|
+
const [B, V] = L(!1), [E, H] = L(!1), [Y, X] = L(!1), j = Ce(() => {
|
|
4983
5015
|
H(!0), requestAnimationFrame(() => {
|
|
4984
5016
|
requestAnimationFrame(() => X(!0));
|
|
4985
5017
|
});
|
|
@@ -5003,9 +5035,9 @@ function Ys({
|
|
|
5003
5035
|
document.body.style.overflow = "";
|
|
5004
5036
|
}), [e]), Q(() => {
|
|
5005
5037
|
if (!e) return;
|
|
5006
|
-
const O = (
|
|
5007
|
-
if (
|
|
5008
|
-
if (
|
|
5038
|
+
const O = (_) => {
|
|
5039
|
+
if (_.key === "Escape") {
|
|
5040
|
+
if (E) {
|
|
5009
5041
|
U();
|
|
5010
5042
|
return;
|
|
5011
5043
|
}
|
|
@@ -5013,7 +5045,7 @@ function Ys({
|
|
|
5013
5045
|
}
|
|
5014
5046
|
};
|
|
5015
5047
|
return window.addEventListener("keydown", O), () => window.removeEventListener("keydown", O);
|
|
5016
|
-
}, [U,
|
|
5048
|
+
}, [U, E, e, G]), B ? Ze(
|
|
5017
5049
|
/* @__PURE__ */ l(
|
|
5018
5050
|
"div",
|
|
5019
5051
|
{
|
|
@@ -5100,7 +5132,7 @@ function Ys({
|
|
|
5100
5132
|
]
|
|
5101
5133
|
}
|
|
5102
5134
|
),
|
|
5103
|
-
|
|
5135
|
+
E && /* @__PURE__ */ l(
|
|
5104
5136
|
"div",
|
|
5105
5137
|
{
|
|
5106
5138
|
role: "dialog",
|
|
@@ -5141,7 +5173,7 @@ function Ys({
|
|
|
5141
5173
|
className: "mb-4 flex h-11 w-11 items-center justify-center rounded-xl",
|
|
5142
5174
|
style: { background: "var(--warning-bg, #fff7ed)" },
|
|
5143
5175
|
children: /* @__PURE__ */ t(
|
|
5144
|
-
|
|
5176
|
+
ca,
|
|
5145
5177
|
{
|
|
5146
5178
|
className: "h-5 w-5",
|
|
5147
5179
|
style: { color: "var(--warning, #d97706)" }
|
|
@@ -5209,51 +5241,51 @@ function Ys({
|
|
|
5209
5241
|
) : null;
|
|
5210
5242
|
}
|
|
5211
5243
|
const xi = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, gi = /^\+?[0-9\s().-]+$/, yi = 7, wi = 15;
|
|
5212
|
-
function
|
|
5244
|
+
function Je(e) {
|
|
5213
5245
|
return e == null || String(e).trim() === "";
|
|
5214
5246
|
}
|
|
5215
5247
|
function In(e) {
|
|
5216
5248
|
return typeof e == "number" ? e : typeof e == "string" && e.trim() !== "" ? Number(e) : Number.NaN;
|
|
5217
5249
|
}
|
|
5218
5250
|
function Hn(e) {
|
|
5219
|
-
return
|
|
5251
|
+
return Je(e) ? !1 : xi.test(String(e));
|
|
5220
5252
|
}
|
|
5221
5253
|
function jn(e) {
|
|
5222
|
-
if (
|
|
5254
|
+
if (Je(e)) return !1;
|
|
5223
5255
|
const r = String(e), a = r.replace(/\D/g, "");
|
|
5224
5256
|
return gi.test(r) && a.length >= yi && a.length <= wi;
|
|
5225
5257
|
}
|
|
5226
5258
|
function Gs(e = "Este campo es requerido.") {
|
|
5227
|
-
return (r) =>
|
|
5259
|
+
return (r) => Je(r) ? e : void 0;
|
|
5228
5260
|
}
|
|
5229
5261
|
function Xs(e = "Ingresa un correo valido.") {
|
|
5230
|
-
return (r) =>
|
|
5262
|
+
return (r) => Je(r) || Hn(r) ? void 0 : e;
|
|
5231
5263
|
}
|
|
5232
5264
|
function Zs(e = "Ingresa un telefono valido.") {
|
|
5233
|
-
return (r) =>
|
|
5265
|
+
return (r) => Je(r) || jn(r) ? void 0 : e;
|
|
5234
5266
|
}
|
|
5235
5267
|
function Js(e, r) {
|
|
5236
|
-
return (a) =>
|
|
5268
|
+
return (a) => Je(a) || String(a).length >= e ? void 0 : r ?? `Debe tener al menos ${e} caracteres.`;
|
|
5237
5269
|
}
|
|
5238
5270
|
function Qs(e, r) {
|
|
5239
|
-
return (a) =>
|
|
5271
|
+
return (a) => Je(a) || String(a).length <= e ? void 0 : r ?? `Debe tener ${e} caracteres o menos.`;
|
|
5240
5272
|
}
|
|
5241
5273
|
function ec(e, r) {
|
|
5242
5274
|
return (a) => {
|
|
5243
|
-
if (
|
|
5275
|
+
if (Je(a)) return;
|
|
5244
5276
|
const n = In(a);
|
|
5245
5277
|
return Number.isFinite(n) && n >= e ? void 0 : r ?? `Debe ser mayor o igual a ${e}.`;
|
|
5246
5278
|
};
|
|
5247
5279
|
}
|
|
5248
5280
|
function tc(e, r) {
|
|
5249
5281
|
return (a) => {
|
|
5250
|
-
if (
|
|
5282
|
+
if (Je(a)) return;
|
|
5251
5283
|
const n = In(a);
|
|
5252
5284
|
return Number.isFinite(n) && n <= e ? void 0 : r ?? `Debe ser menor o igual a ${e}.`;
|
|
5253
5285
|
};
|
|
5254
5286
|
}
|
|
5255
5287
|
function rc(e, r = "El formato no es valido.") {
|
|
5256
|
-
return (a) =>
|
|
5288
|
+
return (a) => Je(a) || e.test(String(a)) ? void 0 : r;
|
|
5257
5289
|
}
|
|
5258
5290
|
function ac(e, r) {
|
|
5259
5291
|
const a = {};
|
|
@@ -5299,14 +5331,14 @@ function Ci(e, r) {
|
|
|
5299
5331
|
}
|
|
5300
5332
|
return a;
|
|
5301
5333
|
}
|
|
5302
|
-
function
|
|
5303
|
-
return
|
|
5334
|
+
function $r() {
|
|
5335
|
+
return $r = Object.assign ? Object.assign.bind() : function(e) {
|
|
5304
5336
|
for (var r = 1; r < arguments.length; r++) {
|
|
5305
5337
|
var a = arguments[r];
|
|
5306
5338
|
for (var n in a) ({}).hasOwnProperty.call(a, n) && (e[n] = a[n]);
|
|
5307
5339
|
}
|
|
5308
5340
|
return e;
|
|
5309
|
-
},
|
|
5341
|
+
}, $r.apply(null, arguments);
|
|
5310
5342
|
}
|
|
5311
5343
|
function rn(e, r) {
|
|
5312
5344
|
var a = Object.keys(e);
|
|
@@ -5318,7 +5350,7 @@ function rn(e, r) {
|
|
|
5318
5350
|
}
|
|
5319
5351
|
return a;
|
|
5320
5352
|
}
|
|
5321
|
-
function
|
|
5353
|
+
function Lr(e) {
|
|
5322
5354
|
for (var r = 1; r < arguments.length; r++) {
|
|
5323
5355
|
var a = arguments[r] != null ? arguments[r] : {};
|
|
5324
5356
|
r % 2 ? rn(Object(a), !0).forEach(function(n) {
|
|
@@ -5346,15 +5378,15 @@ function $i(e, r) {
|
|
|
5346
5378
|
}
|
|
5347
5379
|
return (r === "string" ? String : Number)(e);
|
|
5348
5380
|
}
|
|
5349
|
-
function
|
|
5350
|
-
return e && e.map((r, a) => /* @__PURE__ */ je.createElement(r.tag,
|
|
5381
|
+
function Fn(e) {
|
|
5382
|
+
return e && e.map((r, a) => /* @__PURE__ */ je.createElement(r.tag, Lr({
|
|
5351
5383
|
key: a
|
|
5352
|
-
}, r.attr),
|
|
5384
|
+
}, r.attr), Fn(r.child)));
|
|
5353
5385
|
}
|
|
5354
|
-
function
|
|
5355
|
-
return (r) => /* @__PURE__ */ je.createElement(Li,
|
|
5356
|
-
attr:
|
|
5357
|
-
}, r),
|
|
5386
|
+
function da(e) {
|
|
5387
|
+
return (r) => /* @__PURE__ */ je.createElement(Li, $r({
|
|
5388
|
+
attr: Lr({}, e.attr)
|
|
5389
|
+
}, r), Fn(e.child));
|
|
5358
5390
|
}
|
|
5359
5391
|
function Li(e) {
|
|
5360
5392
|
var r = (a) => {
|
|
@@ -5363,13 +5395,13 @@ function Li(e) {
|
|
|
5363
5395
|
size: i,
|
|
5364
5396
|
title: c
|
|
5365
5397
|
} = e, d = ki(e, Ni), m = i || a.size || "1em", b;
|
|
5366
|
-
return a.className && (b = a.className), e.className && (b = (b ? b + " " : "") + e.className), /* @__PURE__ */ je.createElement("svg",
|
|
5398
|
+
return a.className && (b = a.className), e.className && (b = (b ? b + " " : "") + e.className), /* @__PURE__ */ je.createElement("svg", $r({
|
|
5367
5399
|
stroke: "currentColor",
|
|
5368
5400
|
fill: "currentColor",
|
|
5369
5401
|
strokeWidth: "0"
|
|
5370
5402
|
}, a.attr, n, d, {
|
|
5371
5403
|
className: b,
|
|
5372
|
-
style:
|
|
5404
|
+
style: Lr(Lr({
|
|
5373
5405
|
color: e.color || a.color
|
|
5374
5406
|
}, a.style), e.style),
|
|
5375
5407
|
height: m,
|
|
@@ -5379,16 +5411,16 @@ function Li(e) {
|
|
|
5379
5411
|
};
|
|
5380
5412
|
return tn !== void 0 ? /* @__PURE__ */ je.createElement(tn.Consumer, null, (a) => r(a)) : r(zn);
|
|
5381
5413
|
}
|
|
5382
|
-
function
|
|
5383
|
-
return
|
|
5414
|
+
function Rn(e) {
|
|
5415
|
+
return da({ 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);
|
|
5384
5416
|
}
|
|
5385
5417
|
function Mi(e) {
|
|
5386
|
-
return
|
|
5418
|
+
return da({ 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);
|
|
5387
5419
|
}
|
|
5388
5420
|
function Ti(e) {
|
|
5389
|
-
return
|
|
5421
|
+
return da({ 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);
|
|
5390
5422
|
}
|
|
5391
|
-
function
|
|
5423
|
+
function Jr({
|
|
5392
5424
|
className: e = "",
|
|
5393
5425
|
...r
|
|
5394
5426
|
}) {
|
|
@@ -5400,7 +5432,7 @@ function Qr({
|
|
|
5400
5432
|
}
|
|
5401
5433
|
);
|
|
5402
5434
|
}
|
|
5403
|
-
function
|
|
5435
|
+
function _n({
|
|
5404
5436
|
label: e,
|
|
5405
5437
|
containerClassName: r = "",
|
|
5406
5438
|
helperText: a,
|
|
@@ -5415,7 +5447,7 @@ function Rn({
|
|
|
5415
5447
|
required: k,
|
|
5416
5448
|
...f
|
|
5417
5449
|
}) {
|
|
5418
|
-
const [C, N] = L(() => !!f.autoFocus), [x, y] = L(!1), A = f.type === "password" && b, K = A && x ? "text" : f.type, B = !!n, V = B && i !== "tooltip",
|
|
5450
|
+
const [C, N] = L(() => !!f.autoFocus), [x, y] = L(!1), A = f.type === "password" && b, K = A && x ? "text" : f.type, B = !!n, V = B && i !== "tooltip", E = B && i !== "inline", H = p ? k : void 0, Y = B ? "border-[var(--danger)] focus:border-[var(--danger)]" : "", X = E ? A ? "pr-20" : "pr-10" : A ? "pr-10" : "", j = f.value !== void 0 ? String(f.value).length > 0 : f.defaultValue !== void 0 && String(f.defaultValue).length > 0, U = C || j, G = {
|
|
5419
5451
|
top: U ? 7 : 12,
|
|
5420
5452
|
color: C ? "var(--primary)" : "var(--text-muted)",
|
|
5421
5453
|
fontSize: U ? 10 : 13,
|
|
@@ -5427,7 +5459,7 @@ function Rn({
|
|
|
5427
5459
|
}, O = (ee) => {
|
|
5428
5460
|
var z;
|
|
5429
5461
|
N(!1), (z = f.onBlur) == null || z.call(f, ee);
|
|
5430
|
-
},
|
|
5462
|
+
}, _ = A ? /* @__PURE__ */ l(
|
|
5431
5463
|
"button",
|
|
5432
5464
|
{
|
|
5433
5465
|
type: "button",
|
|
@@ -5455,8 +5487,8 @@ function Rn({
|
|
|
5455
5487
|
)
|
|
5456
5488
|
]
|
|
5457
5489
|
}
|
|
5458
|
-
) : null, I =
|
|
5459
|
-
|
|
5490
|
+
) : null, I = E ? /* @__PURE__ */ t(
|
|
5491
|
+
Ut,
|
|
5460
5492
|
{
|
|
5461
5493
|
as: "span",
|
|
5462
5494
|
content: n,
|
|
@@ -5468,7 +5500,7 @@ function Rn({
|
|
|
5468
5500
|
role: "img",
|
|
5469
5501
|
"aria-label": c,
|
|
5470
5502
|
className: "flex h-full w-full items-center justify-center outline-none",
|
|
5471
|
-
children: /* @__PURE__ */ t(
|
|
5503
|
+
children: /* @__PURE__ */ t(Rn, { className: "h-[18px] w-[18px]" })
|
|
5472
5504
|
}
|
|
5473
5505
|
)
|
|
5474
5506
|
}
|
|
@@ -5476,7 +5508,7 @@ function Rn({
|
|
|
5476
5508
|
return m ? /* @__PURE__ */ l("label", { className: `flex flex-col gap-2 ${r}`, children: [
|
|
5477
5509
|
/* @__PURE__ */ l("span", { className: "relative block", children: [
|
|
5478
5510
|
/* @__PURE__ */ t(
|
|
5479
|
-
|
|
5511
|
+
Jr,
|
|
5480
5512
|
{
|
|
5481
5513
|
...f,
|
|
5482
5514
|
type: K,
|
|
@@ -5509,7 +5541,7 @@ function Rn({
|
|
|
5509
5541
|
}
|
|
5510
5542
|
),
|
|
5511
5543
|
I,
|
|
5512
|
-
|
|
5544
|
+
_
|
|
5513
5545
|
] }),
|
|
5514
5546
|
V ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: n }) : a ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--text-muted)]", children: a }) : null
|
|
5515
5547
|
] }) : /* @__PURE__ */ l("label", { className: `flex flex-col gap-2 ${r}`, children: [
|
|
@@ -5520,7 +5552,7 @@ function Rn({
|
|
|
5520
5552
|
] }),
|
|
5521
5553
|
A ? /* @__PURE__ */ l("span", { className: "relative block", children: [
|
|
5522
5554
|
/* @__PURE__ */ t(
|
|
5523
|
-
|
|
5555
|
+
Jr,
|
|
5524
5556
|
{
|
|
5525
5557
|
...f,
|
|
5526
5558
|
type: K,
|
|
@@ -5532,10 +5564,10 @@ function Rn({
|
|
|
5532
5564
|
}
|
|
5533
5565
|
),
|
|
5534
5566
|
I,
|
|
5535
|
-
|
|
5567
|
+
_
|
|
5536
5568
|
] }) : /* @__PURE__ */ l("span", { className: "relative block", children: [
|
|
5537
5569
|
/* @__PURE__ */ t(
|
|
5538
|
-
|
|
5570
|
+
Jr,
|
|
5539
5571
|
{
|
|
5540
5572
|
...f,
|
|
5541
5573
|
required: H,
|
|
@@ -5567,7 +5599,7 @@ function nc({
|
|
|
5567
5599
|
() => an(m)
|
|
5568
5600
|
), f = d !== void 0 ? an(d) : w, C = a && f.length > 0 && !Hn(f) ? n : void 0;
|
|
5569
5601
|
return /* @__PURE__ */ t(
|
|
5570
|
-
|
|
5602
|
+
_n,
|
|
5571
5603
|
{
|
|
5572
5604
|
...p,
|
|
5573
5605
|
value: d,
|
|
@@ -5659,7 +5691,7 @@ function lc({
|
|
|
5659
5691
|
size: K = "md",
|
|
5660
5692
|
containerClassName: B = "",
|
|
5661
5693
|
dropzoneClassName: V = "",
|
|
5662
|
-
fileListClassName:
|
|
5694
|
+
fileListClassName: E = "",
|
|
5663
5695
|
className: H = "",
|
|
5664
5696
|
id: Y,
|
|
5665
5697
|
accept: X,
|
|
@@ -5667,18 +5699,18 @@ function lc({
|
|
|
5667
5699
|
required: U,
|
|
5668
5700
|
...G
|
|
5669
5701
|
}) {
|
|
5670
|
-
const S = Io(), O = Y ?? S,
|
|
5671
|
-
i === void 0 &&
|
|
5702
|
+
const S = Io(), O = Y ?? S, _ = se(null), [I, ee] = L(!1), [z, h] = L(c), R = i ?? z, q = !!a, ae = f && R.length > 0 && !j, re = (ne, xe) => {
|
|
5703
|
+
i === void 0 && h(ne), d == null || d(ne, xe);
|
|
5672
5704
|
}, ve = (ne, xe) => {
|
|
5673
5705
|
const le = ne.filter(
|
|
5674
5706
|
(de) => nn(de, X)
|
|
5675
|
-
),
|
|
5707
|
+
), $ = ne.filter(
|
|
5676
5708
|
(de) => !nn(de, X)
|
|
5677
|
-
), P = w ? [...
|
|
5678
|
-
|
|
5709
|
+
), P = w ? [...R, ...le] : le, ce = Oi(P, b, p);
|
|
5710
|
+
$.length > 0 && (m == null || m($)), re(ce, xe);
|
|
5679
5711
|
}, M = () => {
|
|
5680
5712
|
var ne;
|
|
5681
|
-
j || (ne =
|
|
5713
|
+
j || (ne = _.current) == null || ne.click();
|
|
5682
5714
|
}, me = (ne) => {
|
|
5683
5715
|
ve(Array.from(ne.target.files ?? []), ne), ne.target.value = "";
|
|
5684
5716
|
}, T = (ne) => {
|
|
@@ -5690,7 +5722,7 @@ function lc({
|
|
|
5690
5722
|
}, W = (ne) => {
|
|
5691
5723
|
ne.key !== "Enter" && ne.key !== " " || (ne.preventDefault(), M());
|
|
5692
5724
|
}, te = (ne) => {
|
|
5693
|
-
re(
|
|
5725
|
+
re(R.filter((xe, le) => le !== ne));
|
|
5694
5726
|
}, J = () => {
|
|
5695
5727
|
re([]);
|
|
5696
5728
|
};
|
|
@@ -5704,13 +5736,13 @@ function lc({
|
|
|
5704
5736
|
"input",
|
|
5705
5737
|
{
|
|
5706
5738
|
...G,
|
|
5707
|
-
ref:
|
|
5739
|
+
ref: _,
|
|
5708
5740
|
id: O,
|
|
5709
5741
|
type: "file",
|
|
5710
5742
|
accept: X,
|
|
5711
5743
|
multiple: b,
|
|
5712
5744
|
disabled: j,
|
|
5713
|
-
required: U &&
|
|
5745
|
+
required: U && R.length === 0,
|
|
5714
5746
|
"aria-invalid": q || G["aria-invalid"],
|
|
5715
5747
|
className: "sr-only",
|
|
5716
5748
|
onChange: me
|
|
@@ -5740,10 +5772,10 @@ function lc({
|
|
|
5740
5772
|
]
|
|
5741
5773
|
}
|
|
5742
5774
|
),
|
|
5743
|
-
k &&
|
|
5775
|
+
k && R.length > 0 && /* @__PURE__ */ l(
|
|
5744
5776
|
"div",
|
|
5745
5777
|
{
|
|
5746
|
-
className: `rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${
|
|
5778
|
+
className: `rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${E}`,
|
|
5747
5779
|
children: [
|
|
5748
5780
|
/* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3 border-b border-[var(--border)] px-3 py-2", children: [
|
|
5749
5781
|
/* @__PURE__ */ t("span", { className: "text-xs font-semibold uppercase text-[var(--text-muted)]", children: A }),
|
|
@@ -5758,7 +5790,7 @@ function lc({
|
|
|
5758
5790
|
}
|
|
5759
5791
|
)
|
|
5760
5792
|
] }),
|
|
5761
|
-
/* @__PURE__ */ t("ul", { className: "divide-y divide-[var(--border)]", children:
|
|
5793
|
+
/* @__PURE__ */ t("ul", { className: "divide-y divide-[var(--border)]", children: R.map((ne, xe) => /* @__PURE__ */ l(
|
|
5762
5794
|
"li",
|
|
5763
5795
|
{
|
|
5764
5796
|
className: "flex items-center gap-3 px-3 py-2",
|
|
@@ -5816,8 +5848,8 @@ function ic({
|
|
|
5816
5848
|
() => e.map((B) => ({ key: !1, type: "", ...B }))
|
|
5817
5849
|
), [f, C] = L(""), [N, x] = L(""), y = Ce(
|
|
5818
5850
|
(B, V) => {
|
|
5819
|
-
k((
|
|
5820
|
-
const H =
|
|
5851
|
+
k((E) => {
|
|
5852
|
+
const H = E.map((Y, X) => X === B ? { ...Y, ...V } : Y);
|
|
5821
5853
|
return p == null || p(H), H;
|
|
5822
5854
|
});
|
|
5823
5855
|
},
|
|
@@ -5837,13 +5869,13 @@ function ic({
|
|
|
5837
5869
|
x("Ese campo ya existe en el arreglo.");
|
|
5838
5870
|
return;
|
|
5839
5871
|
}
|
|
5840
|
-
const
|
|
5872
|
+
const E = {
|
|
5841
5873
|
name: B,
|
|
5842
5874
|
key: !1,
|
|
5843
5875
|
type: ((H = a[0]) == null ? void 0 : H.value) ?? ""
|
|
5844
5876
|
};
|
|
5845
5877
|
k((Y) => {
|
|
5846
|
-
const X = [...Y,
|
|
5878
|
+
const X = [...Y, E];
|
|
5847
5879
|
return p == null || p(X), X;
|
|
5848
5880
|
}), C(""), x("");
|
|
5849
5881
|
}, [a, w, f, p]);
|
|
@@ -5900,19 +5932,19 @@ function ic({
|
|
|
5900
5932
|
}
|
|
5901
5933
|
),
|
|
5902
5934
|
/* @__PURE__ */ t("div", { className: "flex justify-center", children: /* @__PURE__ */ t(
|
|
5903
|
-
|
|
5935
|
+
ia,
|
|
5904
5936
|
{
|
|
5905
5937
|
size: "sm",
|
|
5906
5938
|
checked: B.key ?? !1,
|
|
5907
|
-
onChange: (
|
|
5939
|
+
onChange: (E) => y(V, { key: E.target.checked }),
|
|
5908
5940
|
"aria-label": `${B.name} es clave`
|
|
5909
5941
|
}
|
|
5910
5942
|
) }),
|
|
5911
5943
|
/* @__PURE__ */ t(
|
|
5912
|
-
|
|
5944
|
+
qt,
|
|
5913
5945
|
{
|
|
5914
5946
|
value: B.type ?? "",
|
|
5915
|
-
onChange: (
|
|
5947
|
+
onChange: (E) => y(V, { type: E }),
|
|
5916
5948
|
options: a,
|
|
5917
5949
|
placeholder: "—",
|
|
5918
5950
|
emptyLabel: "—",
|
|
@@ -6037,13 +6069,13 @@ function sc({
|
|
|
6037
6069
|
emptyText: C = "Sin resultados",
|
|
6038
6070
|
clearLabel: N = "Limpiar seleccion"
|
|
6039
6071
|
}) {
|
|
6040
|
-
const [x, y] = L(!1), [A, K] = L(""), [B, V] = L(0), [
|
|
6041
|
-
() => a.filter((T) =>
|
|
6042
|
-
[a,
|
|
6043
|
-
), ee = k === "all" ? I.length : k, z = I.slice(0, ee),
|
|
6072
|
+
const [x, y] = L(!1), [A, K] = L(""), [B, V] = L(0), [E, H] = L(!1), [Y, X] = L({}), j = se(null), U = se(null), G = se(null), S = se(null), O = p && a.length >= w, _ = it(() => new Set(e), [e]), I = it(
|
|
6073
|
+
() => a.filter((T) => _.has(T.value)),
|
|
6074
|
+
[a, _]
|
|
6075
|
+
), ee = k === "all" ? I.length : k, z = I.slice(0, ee), h = Math.max(
|
|
6044
6076
|
0,
|
|
6045
6077
|
I.length - z.length
|
|
6046
|
-
),
|
|
6078
|
+
), R = O && A.trim() ? a.filter(
|
|
6047
6079
|
(T) => {
|
|
6048
6080
|
var ie;
|
|
6049
6081
|
return T.label.toLowerCase().includes(A.toLowerCase()) || ((ie = T.sublabel) == null ? void 0 : ie.toLowerCase().includes(A.toLowerCase()));
|
|
@@ -6069,10 +6101,10 @@ function sc({
|
|
|
6069
6101
|
(T) => {
|
|
6070
6102
|
const ie = a.find((W) => W.value === T);
|
|
6071
6103
|
if (ie != null && ie.disabled) return;
|
|
6072
|
-
const pe =
|
|
6104
|
+
const pe = _.has(T) ? e.filter((W) => W !== T) : [...e, T];
|
|
6073
6105
|
ae(pe);
|
|
6074
6106
|
},
|
|
6075
|
-
[ae, a, e,
|
|
6107
|
+
[ae, a, e, _]
|
|
6076
6108
|
), ve = Ce(() => ae([]), [ae]);
|
|
6077
6109
|
Q(() => H(!0), []), Q(() => {
|
|
6078
6110
|
if (!x) return;
|
|
@@ -6102,7 +6134,7 @@ function sc({
|
|
|
6102
6134
|
(T.key === "Enter" || T.key === " " || T.key === "ArrowDown") && (T.preventDefault(), y(!0));
|
|
6103
6135
|
return;
|
|
6104
6136
|
}
|
|
6105
|
-
T.key === "Escape" && (T.preventDefault(), y(!1), K("")), T.key === "ArrowDown" && (T.preventDefault(), V((ie) => Math.min(ie + 1,
|
|
6137
|
+
T.key === "Escape" && (T.preventDefault(), y(!1), K("")), T.key === "ArrowDown" && (T.preventDefault(), V((ie) => Math.min(ie + 1, R.length - 1))), T.key === "ArrowUp" && (T.preventDefault(), V((ie) => Math.max(ie - 1, 0))), T.key === "Enter" && R[B] && (T.preventDefault(), re(R[B].value)), T.key === "Backspace" && !A && e.length && (T.preventDefault(), ae(e.slice(0, -1)));
|
|
6106
6138
|
}
|
|
6107
6139
|
const me = /* @__PURE__ */ l(
|
|
6108
6140
|
"div",
|
|
@@ -6201,8 +6233,8 @@ function sc({
|
|
|
6201
6233
|
overscrollBehavior: "contain"
|
|
6202
6234
|
},
|
|
6203
6235
|
children: [
|
|
6204
|
-
|
|
6205
|
-
const pe = ie === B, W =
|
|
6236
|
+
R.map((T, ie) => {
|
|
6237
|
+
const pe = ie === B, W = _.has(T.value);
|
|
6206
6238
|
return /* @__PURE__ */ l(
|
|
6207
6239
|
"li",
|
|
6208
6240
|
{
|
|
@@ -6263,7 +6295,7 @@ function sc({
|
|
|
6263
6295
|
T.value
|
|
6264
6296
|
);
|
|
6265
6297
|
}),
|
|
6266
|
-
|
|
6298
|
+
R.length === 0 && /* @__PURE__ */ t(
|
|
6267
6299
|
"li",
|
|
6268
6300
|
{
|
|
6269
6301
|
className: "px-3 py-4 text-center text-sm",
|
|
@@ -6333,7 +6365,7 @@ function sc({
|
|
|
6333
6365
|
},
|
|
6334
6366
|
T.value
|
|
6335
6367
|
)),
|
|
6336
|
-
|
|
6368
|
+
h > 0 && /* @__PURE__ */ l(
|
|
6337
6369
|
"span",
|
|
6338
6370
|
{
|
|
6339
6371
|
className: "inline-flex items-center rounded-md px-1.5 py-0.5 text-xs font-semibold",
|
|
@@ -6343,7 +6375,7 @@ function sc({
|
|
|
6343
6375
|
},
|
|
6344
6376
|
children: [
|
|
6345
6377
|
"+",
|
|
6346
|
-
|
|
6378
|
+
h
|
|
6347
6379
|
]
|
|
6348
6380
|
}
|
|
6349
6381
|
)
|
|
@@ -6362,7 +6394,7 @@ function sc({
|
|
|
6362
6394
|
children: /* @__PURE__ */ t(Ie, { className: "h-3 w-3" })
|
|
6363
6395
|
}
|
|
6364
6396
|
) : /* @__PURE__ */ t(
|
|
6365
|
-
|
|
6397
|
+
Xe,
|
|
6366
6398
|
{
|
|
6367
6399
|
className: "h-4 w-4 flex-shrink-0 transition-transform",
|
|
6368
6400
|
style: {
|
|
@@ -6374,7 +6406,7 @@ function sc({
|
|
|
6374
6406
|
]
|
|
6375
6407
|
}
|
|
6376
6408
|
),
|
|
6377
|
-
x &&
|
|
6409
|
+
x && E && Ze(me, document.body)
|
|
6378
6410
|
]
|
|
6379
6411
|
}
|
|
6380
6412
|
);
|
|
@@ -6383,7 +6415,7 @@ function cc({
|
|
|
6383
6415
|
inputMode: e = "decimal",
|
|
6384
6416
|
...r
|
|
6385
6417
|
}) {
|
|
6386
|
-
return /* @__PURE__ */ t(
|
|
6418
|
+
return /* @__PURE__ */ t(_n, { ...r, type: "number", inputMode: e });
|
|
6387
6419
|
}
|
|
6388
6420
|
function zi(e, r, a) {
|
|
6389
6421
|
const n = [], i = Math.max(2, e - a), c = Math.min(r - 1, e + a);
|
|
@@ -6414,7 +6446,7 @@ function dc({
|
|
|
6414
6446
|
"aria-label": "Pagina anterior",
|
|
6415
6447
|
disabled: n || m <= 1,
|
|
6416
6448
|
onClick: () => a(m - 1),
|
|
6417
|
-
children: /* @__PURE__ */ t(
|
|
6449
|
+
children: /* @__PURE__ */ t(Tt, { className: "h-4 w-4" })
|
|
6418
6450
|
}
|
|
6419
6451
|
),
|
|
6420
6452
|
b.map(
|
|
@@ -6458,7 +6490,7 @@ function dc({
|
|
|
6458
6490
|
}
|
|
6459
6491
|
);
|
|
6460
6492
|
}
|
|
6461
|
-
const
|
|
6493
|
+
const Fi = [
|
|
6462
6494
|
{ value: "+1", label: "+1", sublabel: "Estados Unidos, Canada, Caribe" },
|
|
6463
6495
|
{ value: "+7", label: "+7", sublabel: "Rusia, Kazajistan" },
|
|
6464
6496
|
{ value: "+20", label: "+20", sublabel: "Egipto" },
|
|
@@ -6668,10 +6700,10 @@ const _i = [
|
|
|
6668
6700
|
function ln(e) {
|
|
6669
6701
|
return e == null ? "" : String(e);
|
|
6670
6702
|
}
|
|
6671
|
-
function
|
|
6703
|
+
function Nr(e) {
|
|
6672
6704
|
return e ? e.startsWith("+") ? e : `+${e}` : "+1";
|
|
6673
6705
|
}
|
|
6674
|
-
function
|
|
6706
|
+
function Ri(e) {
|
|
6675
6707
|
return typeof e == "number" ? `${e}px` : e;
|
|
6676
6708
|
}
|
|
6677
6709
|
function uc({
|
|
@@ -6696,7 +6728,7 @@ function uc({
|
|
|
6696
6728
|
label: K,
|
|
6697
6729
|
containerClassName: B = "",
|
|
6698
6730
|
helperText: V,
|
|
6699
|
-
labelAction:
|
|
6731
|
+
labelAction: E,
|
|
6700
6732
|
className: H = "",
|
|
6701
6733
|
required: Y,
|
|
6702
6734
|
disabled: X,
|
|
@@ -6707,16 +6739,16 @@ function uc({
|
|
|
6707
6739
|
...O
|
|
6708
6740
|
}) {
|
|
6709
6741
|
var ne;
|
|
6710
|
-
const [
|
|
6742
|
+
const [_, I] = L(
|
|
6711
6743
|
() => ln(m)
|
|
6712
6744
|
), [ee, z] = L(
|
|
6713
|
-
() =>
|
|
6714
|
-
),
|
|
6715
|
-
const xe = C ??
|
|
6716
|
-
return le != null && le.length ? xe.filter((
|
|
6717
|
-
}, [f, C]),
|
|
6718
|
-
(xe) => xe.value ===
|
|
6719
|
-
) ?
|
|
6745
|
+
() => Nr(w)
|
|
6746
|
+
), h = it(() => {
|
|
6747
|
+
const xe = C ?? Fi, le = f == null ? void 0 : f.map(Nr);
|
|
6748
|
+
return le != null && le.length ? xe.filter(($) => le.includes($.value)) : xe;
|
|
6749
|
+
}, [f, C]), R = ((ne = h[0]) == null ? void 0 : ne.value) ?? "+1", q = h.some(
|
|
6750
|
+
(xe) => xe.value === Nr(p ?? ee)
|
|
6751
|
+
) ? Nr(p ?? ee) : R, ae = d !== void 0 ? ln(d) : _, re = `${q} ${ae}`.trim(), ve = a && ae.length > 0 && !jn(re) ? n : void 0, M = c ?? ve, me = !!M, T = me && i !== "tooltip", ie = me && i !== "inline", pe = me ? "border-[var(--danger)] focus-within:border-[var(--danger)]" : "border-[var(--border)] focus-within:border-[var(--primary)]", W = (xe) => {
|
|
6720
6752
|
const le = xe.currentTarget.value;
|
|
6721
6753
|
d === void 0 && I(le), A == null || A(le, {
|
|
6722
6754
|
countryCode: q,
|
|
@@ -6730,7 +6762,7 @@ function uc({
|
|
|
6730
6762
|
fullNumber: `${xe} ${ae}`.trim()
|
|
6731
6763
|
});
|
|
6732
6764
|
}, J = ie ? /* @__PURE__ */ t(
|
|
6733
|
-
|
|
6765
|
+
Ut,
|
|
6734
6766
|
{
|
|
6735
6767
|
as: "span",
|
|
6736
6768
|
content: M,
|
|
@@ -6742,7 +6774,7 @@ function uc({
|
|
|
6742
6774
|
role: "img",
|
|
6743
6775
|
"aria-label": S,
|
|
6744
6776
|
className: "flex h-full w-full items-center justify-center outline-none",
|
|
6745
|
-
children: /* @__PURE__ */ t(
|
|
6777
|
+
children: /* @__PURE__ */ t(Rn, { className: "h-[18px] w-[18px]" })
|
|
6746
6778
|
}
|
|
6747
6779
|
)
|
|
6748
6780
|
}
|
|
@@ -6751,7 +6783,7 @@ function uc({
|
|
|
6751
6783
|
/* @__PURE__ */ l("span", { className: "inline-flex items-center gap-1 text-xs font-semibold uppercase text-[var(--text-muted)]", children: [
|
|
6752
6784
|
/* @__PURE__ */ t("span", { children: K }),
|
|
6753
6785
|
Y && /* @__PURE__ */ t("span", { className: "text-[var(--danger)]", children: "*" }),
|
|
6754
|
-
|
|
6786
|
+
E && /* @__PURE__ */ t("span", { className: "ml-auto normal-case", children: E })
|
|
6755
6787
|
] }),
|
|
6756
6788
|
/* @__PURE__ */ l(
|
|
6757
6789
|
"span",
|
|
@@ -6759,11 +6791,11 @@ function uc({
|
|
|
6759
6791
|
className: `flex h-10 min-w-0 items-center overflow-hidden rounded-lg border bg-[var(--bg-input)] transition-colors ${pe}`,
|
|
6760
6792
|
children: [
|
|
6761
6793
|
/* @__PURE__ */ t(
|
|
6762
|
-
|
|
6794
|
+
qt,
|
|
6763
6795
|
{
|
|
6764
6796
|
value: q,
|
|
6765
6797
|
onChange: te,
|
|
6766
|
-
options:
|
|
6798
|
+
options: h,
|
|
6767
6799
|
placeholder: N,
|
|
6768
6800
|
disabled: X,
|
|
6769
6801
|
ariaLabel: "Codigo telefonico",
|
|
@@ -6773,7 +6805,7 @@ function uc({
|
|
|
6773
6805
|
minOptionsForSearch: 0,
|
|
6774
6806
|
dropdownMinWidth: 300,
|
|
6775
6807
|
className: `shrink-0 ${x}`,
|
|
6776
|
-
style: { width:
|
|
6808
|
+
style: { width: Ri(y) },
|
|
6777
6809
|
height: 38,
|
|
6778
6810
|
padding: "0 8px 0 10px"
|
|
6779
6811
|
}
|
|
@@ -6867,10 +6899,10 @@ function mc({
|
|
|
6867
6899
|
)
|
|
6868
6900
|
] });
|
|
6869
6901
|
}
|
|
6870
|
-
const Pn = () => '<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>',
|
|
6902
|
+
const Pn = () => '<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>', kr = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), Wn = (e) => e.toLocaleLowerCase().replace(
|
|
6871
6903
|
new RegExp("(^|[^\\p{L}\\p{N}])(\\p{L})", "gu"),
|
|
6872
6904
|
(r, a, n) => `${a}${n.toLocaleUpperCase()}`
|
|
6873
|
-
),
|
|
6905
|
+
), _i = (e) => e.replace(/[<>]/g, "").toLowerCase(), Pi = (e) => new RegExp("\\p{L}", "u").test(e), Qr = (e, r) => {
|
|
6874
6906
|
const a = e.trim();
|
|
6875
6907
|
return !a || !Pi(a) ? !1 : r === "uppercase" ? a === a.toLocaleUpperCase() : r === "lowercase" ? a === a.toLocaleLowerCase() : a === Wn(a);
|
|
6876
6908
|
}, sn = (e) => {
|
|
@@ -6907,7 +6939,7 @@ function bc({
|
|
|
6907
6939
|
placeholder: a = "Escribe algo...",
|
|
6908
6940
|
minHeight: n = "80px"
|
|
6909
6941
|
}) {
|
|
6910
|
-
const i = se(null), c = se(null), d = se(null), m = se(!1), b = se(e ?? ""), p = se(r), [w, k] = L(() => !e || e.trim() === ""), [f, C] = L(/* @__PURE__ */ new Set()), [N, x] = L(null), [y, A] = L(""), [K, B] = L(""), [V,
|
|
6942
|
+
const i = se(null), c = se(null), d = se(null), m = se(!1), b = se(e ?? ""), p = se(r), [w, k] = L(() => !e || e.trim() === ""), [f, C] = L(/* @__PURE__ */ new Set()), [N, x] = L(null), [y, A] = L(""), [K, B] = L(""), [V, E] = L(""), [H, Y] = L(""), [X, j] = L(!1), U = Ce(
|
|
6911
6943
|
() => m.current ? c.current : i.current,
|
|
6912
6944
|
[]
|
|
6913
6945
|
);
|
|
@@ -6915,27 +6947,27 @@ function bc({
|
|
|
6915
6947
|
p.current = r;
|
|
6916
6948
|
}, [r]);
|
|
6917
6949
|
const G = Ce(() => {
|
|
6918
|
-
const
|
|
6919
|
-
if (
|
|
6950
|
+
const $ = window.getSelection(), P = U();
|
|
6951
|
+
if (!$ || !P || $.rangeCount === 0 || $.isCollapsed)
|
|
6920
6952
|
return "";
|
|
6921
|
-
const ce =
|
|
6922
|
-
return !P.contains(ce.startContainer) || !P.contains(ce.endContainer) ? "" :
|
|
6953
|
+
const ce = $.getRangeAt(0);
|
|
6954
|
+
return !P.contains(ce.startContainer) || !P.contains(ce.endContainer) ? "" : $.toString();
|
|
6923
6955
|
}, [U]);
|
|
6924
6956
|
Q(() => {
|
|
6925
|
-
const
|
|
6926
|
-
b.current =
|
|
6957
|
+
const $ = e ?? "";
|
|
6958
|
+
b.current = $;
|
|
6927
6959
|
const P = [i.current, c.current].filter(
|
|
6928
6960
|
(de) => !!de
|
|
6929
6961
|
);
|
|
6930
6962
|
P.forEach((de) => {
|
|
6931
|
-
de.innerHTML !==
|
|
6932
|
-
}), k(
|
|
6963
|
+
de.innerHTML !== $ && (de.innerHTML = $);
|
|
6964
|
+
}), k(!$ || $.trim() === "");
|
|
6933
6965
|
const ce = P.map((de) => sn(de));
|
|
6934
6966
|
return () => ce.forEach((de) => de());
|
|
6935
6967
|
}, [e]), Q(() => {
|
|
6936
6968
|
var de, Se;
|
|
6937
6969
|
m.current = X;
|
|
6938
|
-
let
|
|
6970
|
+
let $, P = 0, ce;
|
|
6939
6971
|
if (X) {
|
|
6940
6972
|
const be = i.current;
|
|
6941
6973
|
be && (b.current = be.innerHTML);
|
|
@@ -6946,7 +6978,7 @@ function bc({
|
|
|
6946
6978
|
P = requestAnimationFrame(Ee);
|
|
6947
6979
|
return;
|
|
6948
6980
|
}
|
|
6949
|
-
Ne.innerHTML !== b.current && (Ne.innerHTML = b.current),
|
|
6981
|
+
Ne.innerHTML !== b.current && (Ne.innerHTML = b.current), $ = sn(Ne), k(((ue = Ne.textContent) == null ? void 0 : ue.trim()) === ""), ce = setTimeout(() => Ne.focus(), 60);
|
|
6950
6982
|
};
|
|
6951
6983
|
P = requestAnimationFrame(Ee);
|
|
6952
6984
|
} else {
|
|
@@ -6954,11 +6986,11 @@ function bc({
|
|
|
6954
6986
|
b.current = Ne, Ee && Ee.innerHTML !== Ne && (Ee.innerHTML = Ne), Ne !== ue && p.current(Ne), k(((Se = (de = be ?? Ee) == null ? void 0 : de.textContent) == null ? void 0 : Se.trim()) === "");
|
|
6955
6987
|
}
|
|
6956
6988
|
return () => {
|
|
6957
|
-
P && cancelAnimationFrame(P), ce && clearTimeout(ce),
|
|
6989
|
+
P && cancelAnimationFrame(P), ce && clearTimeout(ce), $ == null || $();
|
|
6958
6990
|
};
|
|
6959
6991
|
}, [X]);
|
|
6960
6992
|
const S = Ce(() => {
|
|
6961
|
-
const
|
|
6993
|
+
const $ = [
|
|
6962
6994
|
"bold",
|
|
6963
6995
|
"italic",
|
|
6964
6996
|
"underline",
|
|
@@ -6970,7 +7002,7 @@ function bc({
|
|
|
6970
7002
|
"justifyRight",
|
|
6971
7003
|
"justifyFull"
|
|
6972
7004
|
], P = /* @__PURE__ */ new Set();
|
|
6973
|
-
|
|
7005
|
+
$.forEach((de) => {
|
|
6974
7006
|
try {
|
|
6975
7007
|
document.queryCommandState(de) && P.add(de);
|
|
6976
7008
|
} catch {
|
|
@@ -6978,7 +7010,7 @@ function bc({
|
|
|
6978
7010
|
}
|
|
6979
7011
|
});
|
|
6980
7012
|
try {
|
|
6981
|
-
const de =
|
|
7013
|
+
const de = _i(
|
|
6982
7014
|
document.queryCommandValue("formatBlock")
|
|
6983
7015
|
);
|
|
6984
7016
|
de && P.add(`formatBlock:${de}`);
|
|
@@ -6986,66 +7018,66 @@ function bc({
|
|
|
6986
7018
|
return;
|
|
6987
7019
|
}
|
|
6988
7020
|
const ce = G();
|
|
6989
|
-
|
|
7021
|
+
Qr(ce, "uppercase") && P.add("__upper"), Qr(ce, "lowercase") && P.add("__lower"), Qr(ce, "capitalize") && P.add("__cap"), C(P);
|
|
6990
7022
|
}, [G]), O = () => {
|
|
6991
7023
|
var P;
|
|
6992
|
-
const
|
|
6993
|
-
|
|
6994
|
-
},
|
|
6995
|
-
if (
|
|
7024
|
+
const $ = U();
|
|
7025
|
+
$ && (b.current = $.innerHTML, p.current(b.current), k(((P = $.textContent) == null ? void 0 : P.trim()) === ""));
|
|
7026
|
+
}, _ = ($) => {
|
|
7027
|
+
if (!$) {
|
|
6996
7028
|
const P = i.current;
|
|
6997
7029
|
P && (b.current = P.innerHTML);
|
|
6998
7030
|
}
|
|
6999
|
-
j(
|
|
7000
|
-
}, I = (
|
|
7031
|
+
j(!$);
|
|
7032
|
+
}, I = ($, P) => {
|
|
7001
7033
|
var ce;
|
|
7002
|
-
(ce = U()) == null || ce.focus(), document.execCommand(
|
|
7003
|
-
}, ee = (
|
|
7004
|
-
I("formatBlock",
|
|
7034
|
+
(ce = U()) == null || ce.focus(), document.execCommand($, !1, P), O(), S();
|
|
7035
|
+
}, ee = ($) => {
|
|
7036
|
+
I("formatBlock", $);
|
|
7005
7037
|
}, z = () => {
|
|
7006
|
-
var
|
|
7007
|
-
(
|
|
7008
|
-
},
|
|
7009
|
-
const
|
|
7010
|
-
|
|
7011
|
-
},
|
|
7012
|
-
const
|
|
7013
|
-
|
|
7014
|
-
}, q = (
|
|
7015
|
-
if (
|
|
7038
|
+
var $;
|
|
7039
|
+
($ = U()) == null || $.focus(), document.execCommand("insertHTML", !1, "<hr><p><br></p>"), O(), S();
|
|
7040
|
+
}, h = () => {
|
|
7041
|
+
const $ = window.getSelection();
|
|
7042
|
+
$ && $.rangeCount > 0 && (d.current = $.getRangeAt(0).cloneRange());
|
|
7043
|
+
}, R = () => {
|
|
7044
|
+
const $ = window.getSelection();
|
|
7045
|
+
$ && d.current && ($.removeAllRanges(), $.addRange(d.current));
|
|
7046
|
+
}, q = ($) => {
|
|
7047
|
+
if (h(), $ === "link") {
|
|
7016
7048
|
const P = window.getSelection();
|
|
7017
7049
|
B(
|
|
7018
7050
|
P && !P.isCollapsed ? P.toString() : ""
|
|
7019
7051
|
), A("");
|
|
7020
7052
|
}
|
|
7021
|
-
|
|
7053
|
+
$ === "image" && (E(""), Y("")), x($);
|
|
7022
7054
|
}, ae = () => {
|
|
7023
7055
|
var de;
|
|
7024
7056
|
if (!y.trim()) return;
|
|
7025
|
-
|
|
7026
|
-
const
|
|
7057
|
+
R(), (de = U()) == null || de.focus();
|
|
7058
|
+
const $ = window.getSelection(), ce = ($ && !$.isCollapsed ? $.toString() : "") || K.trim() || y.trim();
|
|
7027
7059
|
document.execCommand(
|
|
7028
7060
|
"insertHTML",
|
|
7029
7061
|
!1,
|
|
7030
|
-
`<a href="${
|
|
7062
|
+
`<a href="${kr(y.trim())}" target="_blank" rel="noopener noreferrer" class="rich-link">${kr(ce)}</a>`
|
|
7031
7063
|
), O(), x(null);
|
|
7032
|
-
}, re = (
|
|
7033
|
-
var
|
|
7034
|
-
V.trim() && (
|
|
7064
|
+
}, re = ($, P = "") => `<span class="rich-img-wrap" contenteditable="false"><img src="${kr($)}" alt="${kr(P)}" class="rich-img" />${Pn()}</span>`, ve = () => {
|
|
7065
|
+
var $;
|
|
7066
|
+
V.trim() && (R(), ($ = U()) == null || $.focus(), document.execCommand(
|
|
7035
7067
|
"insertHTML",
|
|
7036
7068
|
!1,
|
|
7037
7069
|
re(V.trim(), H.trim())
|
|
7038
7070
|
), O(), x(null));
|
|
7039
|
-
}, M = (
|
|
7071
|
+
}, M = ($, P = 1200, ce = 1200, de = 0.72) => new Promise((Se, be) => {
|
|
7040
7072
|
const Ee = new FileReader();
|
|
7041
7073
|
Ee.onerror = be, Ee.onload = (Ne) => {
|
|
7042
|
-
var
|
|
7043
|
-
const ue = (
|
|
7044
|
-
|
|
7045
|
-
let { width: qe, height: Z } =
|
|
7074
|
+
var Qe;
|
|
7075
|
+
const ue = (Qe = Ne.target) == null ? void 0 : Qe.result, Fe = new Image();
|
|
7076
|
+
Fe.onerror = be, Fe.onload = () => {
|
|
7077
|
+
let { width: qe, height: Z } = Fe;
|
|
7046
7078
|
if (qe > P || Z > ce) {
|
|
7047
|
-
const
|
|
7048
|
-
qe = Math.round(qe *
|
|
7079
|
+
const _e = Math.min(P / qe, ce / Z);
|
|
7080
|
+
qe = Math.round(qe * _e), Z = Math.round(Z * _e);
|
|
7049
7081
|
}
|
|
7050
7082
|
const Me = document.createElement("canvas");
|
|
7051
7083
|
Me.width = qe, Me.height = Z;
|
|
@@ -7054,13 +7086,13 @@ function bc({
|
|
|
7054
7086
|
Se(ue);
|
|
7055
7087
|
return;
|
|
7056
7088
|
}
|
|
7057
|
-
Te.drawImage(
|
|
7058
|
-
},
|
|
7059
|
-
}, Ee.readAsDataURL(
|
|
7060
|
-
}), me = (
|
|
7061
|
-
const ce = Array.from(
|
|
7089
|
+
Te.drawImage(Fe, 0, 0, qe, Z), Se(Me.toDataURL("image/jpeg", de));
|
|
7090
|
+
}, Fe.src = ue;
|
|
7091
|
+
}, Ee.readAsDataURL($);
|
|
7092
|
+
}), me = ($) => {
|
|
7093
|
+
const ce = Array.from($.clipboardData.items).find((Se) => Se.type.startsWith("image/"));
|
|
7062
7094
|
if (!ce) return;
|
|
7063
|
-
|
|
7095
|
+
$.preventDefault();
|
|
7064
7096
|
const de = ce.getAsFile();
|
|
7065
7097
|
de && M(de).then((Se) => {
|
|
7066
7098
|
var be;
|
|
@@ -7070,7 +7102,7 @@ function bc({
|
|
|
7070
7102
|
re(Se, "imagen")
|
|
7071
7103
|
), O();
|
|
7072
7104
|
});
|
|
7073
|
-
}, T = (
|
|
7105
|
+
}, T = ($) => {
|
|
7074
7106
|
const P = window.getSelection(), ce = U();
|
|
7075
7107
|
if (!P || !ce || P.rangeCount === 0 || P.isCollapsed)
|
|
7076
7108
|
return;
|
|
@@ -7080,17 +7112,17 @@ function bc({
|
|
|
7080
7112
|
const Se = de.toString();
|
|
7081
7113
|
if (!Se) return;
|
|
7082
7114
|
let be = Se;
|
|
7083
|
-
|
|
7115
|
+
$ === "uppercase" ? be = Se.toLocaleUpperCase() : $ === "lowercase" ? be = Se.toLocaleLowerCase() : be = Wn(Se), de.deleteContents();
|
|
7084
7116
|
const Ee = document.createTextNode(be);
|
|
7085
7117
|
de.insertNode(Ee);
|
|
7086
7118
|
const Ne = document.createRange();
|
|
7087
7119
|
Ne.setStart(Ee, 0), Ne.setEnd(Ee, be.length), P.removeAllRanges(), P.addRange(Ne), d.current = Ne.cloneRange(), O(), S();
|
|
7088
7120
|
}, ie = () => {
|
|
7089
|
-
|
|
7121
|
+
h(), S();
|
|
7090
7122
|
}, pe = () => {
|
|
7091
7123
|
O(), S();
|
|
7092
|
-
}, W = (
|
|
7093
|
-
if (
|
|
7124
|
+
}, W = ($) => {
|
|
7125
|
+
if ($.key === "Escape") {
|
|
7094
7126
|
if (N) {
|
|
7095
7127
|
x(null);
|
|
7096
7128
|
return;
|
|
@@ -7100,14 +7132,14 @@ function bc({
|
|
|
7100
7132
|
return;
|
|
7101
7133
|
}
|
|
7102
7134
|
}
|
|
7103
|
-
N || (
|
|
7135
|
+
N || ($.ctrlKey || $.metaKey) && ($.key === "b" && ($.preventDefault(), I("bold")), $.key === "i" && ($.preventDefault(), I("italic")), $.key === "u" && ($.preventDefault(), I("underline")), $.key === "k" && ($.preventDefault(), q("link")));
|
|
7104
7136
|
}, te = () => /* @__PURE__ */ t(
|
|
7105
7137
|
"div",
|
|
7106
7138
|
{
|
|
7107
7139
|
className: "h-4 w-px flex-shrink-0 mx-1",
|
|
7108
7140
|
style: { background: "var(--border)" }
|
|
7109
7141
|
}
|
|
7110
|
-
), J = (
|
|
7142
|
+
), J = ($, P, ce, de, Se) => {
|
|
7111
7143
|
const be = Se ?? (f.has(ce) || ce === "__link" && N === "link" || ce === "__img" && N === "image");
|
|
7112
7144
|
return /* @__PURE__ */ t(
|
|
7113
7145
|
"button",
|
|
@@ -7122,23 +7154,23 @@ function bc({
|
|
|
7122
7154
|
color: be ? "var(--primary)" : "var(--text-secondary)",
|
|
7123
7155
|
background: be ? "rgba(59,130,246,0.12)" : "transparent"
|
|
7124
7156
|
},
|
|
7125
|
-
children:
|
|
7157
|
+
children: $
|
|
7126
7158
|
},
|
|
7127
7159
|
ce
|
|
7128
7160
|
);
|
|
7129
|
-
}, ne = (
|
|
7130
|
-
const P =
|
|
7161
|
+
}, ne = ($) => {
|
|
7162
|
+
const P = $.target;
|
|
7131
7163
|
if (P.closest("[data-action='delete-img']")) {
|
|
7132
|
-
|
|
7164
|
+
$.preventDefault();
|
|
7133
7165
|
const ce = P.closest(".rich-img-wrap");
|
|
7134
7166
|
ce && (ce.remove(), O());
|
|
7135
7167
|
}
|
|
7136
|
-
}, xe = (
|
|
7168
|
+
}, xe = ($) => /* @__PURE__ */ l(ze, { children: [
|
|
7137
7169
|
N === "link" && /* @__PURE__ */ l(
|
|
7138
7170
|
"div",
|
|
7139
7171
|
{
|
|
7140
7172
|
className: "flex flex-shrink-0 flex-wrap items-center gap-2 border-t px-3 py-2",
|
|
7141
|
-
style: { borderColor: "var(--border)", background:
|
|
7173
|
+
style: { borderColor: "var(--border)", background: $ },
|
|
7142
7174
|
children: [
|
|
7143
7175
|
/* @__PURE__ */ t(
|
|
7144
7176
|
"input",
|
|
@@ -7204,7 +7236,7 @@ function bc({
|
|
|
7204
7236
|
"div",
|
|
7205
7237
|
{
|
|
7206
7238
|
className: "flex flex-shrink-0 flex-wrap items-center gap-2 border-t px-3 py-2",
|
|
7207
|
-
style: { borderColor: "var(--border)", background:
|
|
7239
|
+
style: { borderColor: "var(--border)", background: $ },
|
|
7208
7240
|
children: [
|
|
7209
7241
|
/* @__PURE__ */ t(
|
|
7210
7242
|
"input",
|
|
@@ -7212,7 +7244,7 @@ function bc({
|
|
|
7212
7244
|
autoFocus: !0,
|
|
7213
7245
|
type: "url",
|
|
7214
7246
|
value: V,
|
|
7215
|
-
onChange: (P) =>
|
|
7247
|
+
onChange: (P) => E(P.target.value),
|
|
7216
7248
|
onKeyDown: (P) => {
|
|
7217
7249
|
P.key === "Enter" && (P.preventDefault(), ve()), P.key === "Escape" && x(null);
|
|
7218
7250
|
},
|
|
@@ -7266,7 +7298,7 @@ function bc({
|
|
|
7266
7298
|
]
|
|
7267
7299
|
}
|
|
7268
7300
|
)
|
|
7269
|
-
] }), le = (
|
|
7301
|
+
] }), le = ($, P) => /* @__PURE__ */ l(
|
|
7270
7302
|
"div",
|
|
7271
7303
|
{
|
|
7272
7304
|
className: "flex flex-shrink-0 flex-wrap items-center gap-0.5 border-t px-2 py-1",
|
|
@@ -7318,7 +7350,7 @@ function bc({
|
|
|
7318
7350
|
J(/* @__PURE__ */ t("s", { children: "S" }), "Tachado", "strikeThrough"),
|
|
7319
7351
|
te(),
|
|
7320
7352
|
J(
|
|
7321
|
-
/* @__PURE__ */ t(
|
|
7353
|
+
/* @__PURE__ */ t(na, { className: "h-4 w-4" }),
|
|
7322
7354
|
"Lista sin orden",
|
|
7323
7355
|
"insertUnorderedList"
|
|
7324
7356
|
),
|
|
@@ -7418,13 +7450,13 @@ function bc({
|
|
|
7418
7450
|
"button",
|
|
7419
7451
|
{
|
|
7420
7452
|
type: "button",
|
|
7421
|
-
title:
|
|
7453
|
+
title: $ ? "Salir del modo de enfoque (Esc)" : "Modo de enfoque",
|
|
7422
7454
|
onMouseDown: (ce) => {
|
|
7423
|
-
ce.preventDefault(),
|
|
7455
|
+
ce.preventDefault(), _($);
|
|
7424
7456
|
},
|
|
7425
7457
|
className: "flex h-7 w-7 items-center justify-center rounded transition-colors",
|
|
7426
7458
|
style: { color: "var(--text-secondary)" },
|
|
7427
|
-
children:
|
|
7459
|
+
children: $ ? /* @__PURE__ */ t(Xo, { className: "h-4 w-4" }) : /* @__PURE__ */ t(Zo, { className: "h-4 w-4" })
|
|
7428
7460
|
}
|
|
7429
7461
|
)
|
|
7430
7462
|
]
|
|
@@ -7667,79 +7699,79 @@ function hc({
|
|
|
7667
7699
|
optionClassName: f,
|
|
7668
7700
|
spinnerClassName: C
|
|
7669
7701
|
}) {
|
|
7670
|
-
const [N, x] = L(!1), [y, A] = L(!1), [K, B] = L(-1), [V,
|
|
7702
|
+
const [N, x] = L(!1), [y, A] = L(!1), [K, B] = L(-1), [V, E] = L({}), H = se(null), Y = se(null), X = se(null), j = r.find((h) => h.value === e) ?? r[0], U = {
|
|
7671
7703
|
...j != null && j.tone ? cn[j.tone] : void 0,
|
|
7672
7704
|
...j == null ? void 0 : j.style
|
|
7673
|
-
}, G = i || c || r.length === 0, S = (
|
|
7674
|
-
d &&
|
|
7705
|
+
}, G = i || c || r.length === 0, S = (h) => {
|
|
7706
|
+
d && h.stopPropagation();
|
|
7675
7707
|
}, O = Ce(() => {
|
|
7676
7708
|
x(!1), B(-1);
|
|
7677
|
-
}, []),
|
|
7678
|
-
const
|
|
7679
|
-
if (!
|
|
7680
|
-
const
|
|
7681
|
-
Math.max(8,
|
|
7709
|
+
}, []), _ = Ce(() => {
|
|
7710
|
+
const h = H.current;
|
|
7711
|
+
if (!h) return;
|
|
7712
|
+
const R = h.getBoundingClientRect(), q = Math.max(R.width, Ki[n]), ae = Math.min(Math.max(r.length, 1) * 38 + 12, 260), re = window.innerHeight - R.bottom, ve = re < ae && R.top > re, M = Math.min(
|
|
7713
|
+
Math.max(8, R.left + R.width / 2 - q / 2),
|
|
7682
7714
|
window.innerWidth - q - 8
|
|
7683
7715
|
);
|
|
7684
|
-
|
|
7716
|
+
E({
|
|
7685
7717
|
position: "fixed",
|
|
7686
7718
|
left: M,
|
|
7687
|
-
top: ve ? void 0 :
|
|
7688
|
-
bottom: ve ? window.innerHeight -
|
|
7719
|
+
top: ve ? void 0 : R.bottom + 6,
|
|
7720
|
+
bottom: ve ? window.innerHeight - R.top + 6 : void 0,
|
|
7689
7721
|
width: q,
|
|
7690
7722
|
zIndex: 9999
|
|
7691
7723
|
});
|
|
7692
7724
|
}, [r.length, n]), I = Ce(
|
|
7693
|
-
(
|
|
7694
|
-
|
|
7725
|
+
(h) => {
|
|
7726
|
+
h.disabled || (a(h.value), O());
|
|
7695
7727
|
},
|
|
7696
7728
|
[O, a]
|
|
7697
7729
|
);
|
|
7698
7730
|
Q(() => A(!0), []), Q(() => {
|
|
7699
7731
|
if (!N) return;
|
|
7700
|
-
|
|
7701
|
-
const
|
|
7702
|
-
B(
|
|
7703
|
-
}, [N, r,
|
|
7732
|
+
_();
|
|
7733
|
+
const h = r.findIndex((R) => R.value === e);
|
|
7734
|
+
B(h >= 0 ? h : 0);
|
|
7735
|
+
}, [N, r, _, e]), Q(() => {
|
|
7704
7736
|
if (!N) return;
|
|
7705
|
-
function
|
|
7737
|
+
function h(R) {
|
|
7706
7738
|
var ae, re;
|
|
7707
|
-
const q =
|
|
7739
|
+
const q = R.target;
|
|
7708
7740
|
!((ae = H.current) != null && ae.contains(q)) && !((re = Y.current) != null && re.contains(q)) && O();
|
|
7709
7741
|
}
|
|
7710
|
-
return document.addEventListener("mousedown",
|
|
7742
|
+
return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
|
|
7711
7743
|
}, [O, N]), Q(() => {
|
|
7712
7744
|
if (N)
|
|
7713
|
-
return window.addEventListener("resize",
|
|
7714
|
-
window.removeEventListener("resize",
|
|
7745
|
+
return window.addEventListener("resize", _), window.addEventListener("scroll", _, !0), () => {
|
|
7746
|
+
window.removeEventListener("resize", _), window.removeEventListener("scroll", _, !0);
|
|
7715
7747
|
};
|
|
7716
|
-
}, [N,
|
|
7748
|
+
}, [N, _]), Q(() => {
|
|
7717
7749
|
if (K < 0 || !X.current) return;
|
|
7718
|
-
const
|
|
7719
|
-
|
|
7750
|
+
const h = X.current.children[K];
|
|
7751
|
+
h == null || h.scrollIntoView({ block: "nearest" });
|
|
7720
7752
|
}, [K]);
|
|
7721
|
-
function ee(
|
|
7753
|
+
function ee(h) {
|
|
7722
7754
|
if (!G) {
|
|
7723
7755
|
if (!N) {
|
|
7724
|
-
["Enter", " ", "ArrowDown", "ArrowUp"].includes(
|
|
7756
|
+
["Enter", " ", "ArrowDown", "ArrowUp"].includes(h.key) && (h.preventDefault(), x(!0));
|
|
7725
7757
|
return;
|
|
7726
7758
|
}
|
|
7727
|
-
if (
|
|
7728
|
-
|
|
7759
|
+
if (h.key === "Escape") {
|
|
7760
|
+
h.preventDefault(), O();
|
|
7729
7761
|
return;
|
|
7730
7762
|
}
|
|
7731
|
-
if (
|
|
7732
|
-
|
|
7763
|
+
if (h.key === "ArrowDown") {
|
|
7764
|
+
h.preventDefault(), B((R) => Math.min(R + 1, r.length - 1));
|
|
7733
7765
|
return;
|
|
7734
7766
|
}
|
|
7735
|
-
if (
|
|
7736
|
-
|
|
7767
|
+
if (h.key === "ArrowUp") {
|
|
7768
|
+
h.preventDefault(), B((R) => Math.max(R - 1, 0));
|
|
7737
7769
|
return;
|
|
7738
7770
|
}
|
|
7739
|
-
if (
|
|
7740
|
-
|
|
7741
|
-
const
|
|
7742
|
-
|
|
7771
|
+
if (h.key === "Enter" || h.key === " ") {
|
|
7772
|
+
h.preventDefault();
|
|
7773
|
+
const R = r[K];
|
|
7774
|
+
R && I(R);
|
|
7743
7775
|
}
|
|
7744
7776
|
}
|
|
7745
7777
|
}
|
|
@@ -7772,10 +7804,10 @@ function hc({
|
|
|
7772
7804
|
scrollbarColor: "var(--border) transparent",
|
|
7773
7805
|
overscrollBehavior: "contain"
|
|
7774
7806
|
},
|
|
7775
|
-
children: r.map((
|
|
7776
|
-
const q =
|
|
7777
|
-
...
|
|
7778
|
-
...
|
|
7807
|
+
children: r.map((h, R) => {
|
|
7808
|
+
const q = h.value === e, ae = R === K, re = {
|
|
7809
|
+
...h.tone ? cn[h.tone] : void 0,
|
|
7810
|
+
...h.style
|
|
7779
7811
|
};
|
|
7780
7812
|
return /* @__PURE__ */ l(
|
|
7781
7813
|
"button",
|
|
@@ -7783,15 +7815,15 @@ function hc({
|
|
|
7783
7815
|
type: "button",
|
|
7784
7816
|
role: "option",
|
|
7785
7817
|
"aria-selected": q,
|
|
7786
|
-
disabled:
|
|
7787
|
-
onMouseEnter: () => !
|
|
7818
|
+
disabled: h.disabled,
|
|
7819
|
+
onMouseEnter: () => !h.disabled && B(R),
|
|
7788
7820
|
onMouseDown: (ve) => {
|
|
7789
|
-
ve.preventDefault(), I(
|
|
7821
|
+
ve.preventDefault(), I(h);
|
|
7790
7822
|
},
|
|
7791
7823
|
className: ht(
|
|
7792
7824
|
"flex w-full items-center gap-2 rounded-lg font-medium text-left transition-colors disabled:cursor-not-allowed disabled:opacity-45",
|
|
7793
7825
|
Yi[n],
|
|
7794
|
-
q ?
|
|
7826
|
+
q ? h.className : void 0,
|
|
7795
7827
|
f
|
|
7796
7828
|
),
|
|
7797
7829
|
style: {
|
|
@@ -7801,10 +7833,10 @@ function hc({
|
|
|
7801
7833
|
},
|
|
7802
7834
|
children: [
|
|
7803
7835
|
/* @__PURE__ */ t("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center", children: q ? /* @__PURE__ */ t(Ue, { className: "h-4 w-4" }) : null }),
|
|
7804
|
-
/* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate", children:
|
|
7836
|
+
/* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate", children: h.label })
|
|
7805
7837
|
]
|
|
7806
7838
|
},
|
|
7807
|
-
|
|
7839
|
+
h.value
|
|
7808
7840
|
);
|
|
7809
7841
|
})
|
|
7810
7842
|
}
|
|
@@ -7829,7 +7861,7 @@ function hc({
|
|
|
7829
7861
|
"aria-haspopup": "listbox",
|
|
7830
7862
|
"aria-expanded": N,
|
|
7831
7863
|
title: b,
|
|
7832
|
-
onClick: () => !G && x((
|
|
7864
|
+
onClick: () => !G && x((h) => !h),
|
|
7833
7865
|
className: ht(
|
|
7834
7866
|
"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",
|
|
7835
7867
|
Ui[n],
|
|
@@ -7841,7 +7873,7 @@ function hc({
|
|
|
7841
7873
|
}
|
|
7842
7874
|
),
|
|
7843
7875
|
/* @__PURE__ */ t(
|
|
7844
|
-
|
|
7876
|
+
Xe,
|
|
7845
7877
|
{
|
|
7846
7878
|
"aria-hidden": "true",
|
|
7847
7879
|
className: ht(
|
|
@@ -7861,7 +7893,7 @@ function hc({
|
|
|
7861
7893
|
)
|
|
7862
7894
|
}
|
|
7863
7895
|
),
|
|
7864
|
-
N && y &&
|
|
7896
|
+
N && y && Ze(z, document.body)
|
|
7865
7897
|
]
|
|
7866
7898
|
}
|
|
7867
7899
|
);
|
|
@@ -7964,7 +7996,7 @@ function xc({
|
|
|
7964
7996
|
var pe;
|
|
7965
7997
|
const A = ((pe = e[0]) == null ? void 0 : pe.id) ?? "", [K, B] = L(
|
|
7966
7998
|
a ?? A
|
|
7967
|
-
), [V,
|
|
7999
|
+
), [V, E] = L(
|
|
7968
8000
|
i
|
|
7969
8001
|
), H = r ?? K, Y = n ?? V, X = it(
|
|
7970
8002
|
() => new Set(Y),
|
|
@@ -7973,17 +8005,17 @@ function xc({
|
|
|
7973
8005
|
0,
|
|
7974
8006
|
e.findIndex((W) => W.id === H)
|
|
7975
8007
|
), U = e[j] ?? e[0], G = e.length <= 1 ? 100 : j / (e.length - 1) * 100, S = (W) => {
|
|
7976
|
-
n ||
|
|
8008
|
+
n || E(W), d == null || d(W);
|
|
7977
8009
|
}, O = (W) => {
|
|
7978
8010
|
const te = e.find((J) => J.id === W);
|
|
7979
8011
|
te && (r || B(W), c == null || c(W, te));
|
|
7980
|
-
},
|
|
8012
|
+
}, _ = (W) => X.has(W), I = (W) => e.slice(0, W).find((te) => !te.optional && !X.has(te.id)), ee = (W) => {
|
|
7981
8013
|
const te = e[W];
|
|
7982
8014
|
return !te || te.disabled ? !1 : W === j || b && W < j ? !0 : !I(W);
|
|
7983
8015
|
}, z = (W) => {
|
|
7984
8016
|
const te = e.findIndex((J) => J.id === W);
|
|
7985
8017
|
return te >= 0 && ee(te);
|
|
7986
|
-
},
|
|
8018
|
+
}, h = (W) => {
|
|
7987
8019
|
const te = e.findIndex((J) => J.id === W);
|
|
7988
8020
|
if (te < 0) return !1;
|
|
7989
8021
|
if (!ee(te)) {
|
|
@@ -7991,7 +8023,7 @@ function xc({
|
|
|
7991
8023
|
return J && (m == null || m(e[te], J)), !1;
|
|
7992
8024
|
}
|
|
7993
8025
|
return O(W), !0;
|
|
7994
|
-
},
|
|
8026
|
+
}, R = (W = U == null ? void 0 : U.id) => {
|
|
7995
8027
|
!W || X.has(W) || S([...Y, W]);
|
|
7996
8028
|
}, q = (W = U == null ? void 0 : U.id) => {
|
|
7997
8029
|
if (!W) return;
|
|
@@ -8000,18 +8032,18 @@ function xc({
|
|
|
8000
8032
|
return xe >= 0 && xe < te;
|
|
8001
8033
|
});
|
|
8002
8034
|
S(J), te >= 0 && j > te && O(W);
|
|
8003
|
-
}, ae = () => j <= 0 ? !1 :
|
|
8035
|
+
}, ae = () => j <= 0 ? !1 : h(e[j - 1].id), re = () => {
|
|
8004
8036
|
const W = e[j + 1];
|
|
8005
|
-
return W ?
|
|
8037
|
+
return W ? h(W.id) : !1;
|
|
8006
8038
|
}, ve = {
|
|
8007
8039
|
activeStep: U,
|
|
8008
8040
|
activeIndex: j,
|
|
8009
8041
|
completedStepIds: Y,
|
|
8010
|
-
isCompleted:
|
|
8042
|
+
isCompleted: _,
|
|
8011
8043
|
isUnlocked: z,
|
|
8012
|
-
completeStep:
|
|
8044
|
+
completeStep: R,
|
|
8013
8045
|
uncompleteStep: q,
|
|
8014
|
-
goToStep:
|
|
8046
|
+
goToStep: h,
|
|
8015
8047
|
goNext: re,
|
|
8016
8048
|
goPrevious: ae
|
|
8017
8049
|
};
|
|
@@ -8048,7 +8080,7 @@ function xc({
|
|
|
8048
8080
|
gridTemplateColumns: `repeat(${e.length}, minmax(0, 1fr))`
|
|
8049
8081
|
},
|
|
8050
8082
|
children: e.map((W, te) => {
|
|
8051
|
-
const J = W.id === U.id, ne =
|
|
8083
|
+
const J = W.id === U.id, ne = _(W.id), xe = ee(te), le = I(te);
|
|
8052
8084
|
return /* @__PURE__ */ l(
|
|
8053
8085
|
"button",
|
|
8054
8086
|
{
|
|
@@ -8057,7 +8089,7 @@ function xc({
|
|
|
8057
8089
|
"aria-current": J ? "step" : void 0,
|
|
8058
8090
|
"aria-disabled": !xe,
|
|
8059
8091
|
title: !xe && le ? `Completa ${le.title}` : W.title,
|
|
8060
|
-
onClick: () =>
|
|
8092
|
+
onClick: () => h(W.id),
|
|
8061
8093
|
className: lt(
|
|
8062
8094
|
"group relative min-h-16 min-w-0 overflow-hidden rounded-md border p-3 text-left transition-all duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--primary)]/35 disabled:cursor-not-allowed",
|
|
8063
8095
|
J && "border-[var(--primary)] bg-[var(--bg-card)] shadow-sm",
|
|
@@ -8143,7 +8175,7 @@ function xc({
|
|
|
8143
8175
|
variant: "secondary",
|
|
8144
8176
|
height: 38,
|
|
8145
8177
|
padding: "0 14px",
|
|
8146
|
-
icon: /* @__PURE__ */ t(
|
|
8178
|
+
icon: /* @__PURE__ */ t(Tt, {}),
|
|
8147
8179
|
disabled: !me,
|
|
8148
8180
|
onClick: ae,
|
|
8149
8181
|
children: w
|
|
@@ -8223,7 +8255,7 @@ const Qi = xn(
|
|
|
8223
8255
|
onInput: A,
|
|
8224
8256
|
...K
|
|
8225
8257
|
}, B) {
|
|
8226
|
-
const V = se(null),
|
|
8258
|
+
const V = se(null), E = Ji(N, x), H = p ?? y, Y = !!(k || f || b), X = w === "error" ? "var(--danger)" : w === "success" ? "#16a34a" : "var(--border)", j = {
|
|
8227
8259
|
...C ?? {},
|
|
8228
8260
|
...d ? { minHeight: `${d * 24 + 18}px` } : null,
|
|
8229
8261
|
...m ? { maxHeight: `${m * 24 + 18}px` } : null
|
|
@@ -8255,7 +8287,7 @@ const Qi = xn(
|
|
|
8255
8287
|
G,
|
|
8256
8288
|
f && /* @__PURE__ */ t("span", { className: "absolute right-2 top-2 flex items-center justify-center", children: f }),
|
|
8257
8289
|
b && /* @__PURE__ */ l("span", { className: "absolute bottom-1.5 right-2 rounded bg-[var(--bg-input)] px-1.5 text-[10px] font-semibold text-[var(--text-muted)]", children: [
|
|
8258
|
-
|
|
8290
|
+
E,
|
|
8259
8291
|
H ? `/${H}` : ""
|
|
8260
8292
|
] })
|
|
8261
8293
|
] }) : G;
|
|
@@ -8466,12 +8498,12 @@ function us({
|
|
|
8466
8498
|
className: f = "",
|
|
8467
8499
|
style: C
|
|
8468
8500
|
}) {
|
|
8469
|
-
var
|
|
8501
|
+
var _;
|
|
8470
8502
|
const [N, x] = L(!1), y = typeof e == "string" && e.trim() && e !== "undefined" && e !== "null" ? e.trim() : "";
|
|
8471
8503
|
Q(() => {
|
|
8472
8504
|
x(!1);
|
|
8473
8505
|
}, [y, k]);
|
|
8474
|
-
const { wh: A, text: K } = as[n], B = bn(a) || bn(r) || m, V = B.trim()[0] || "?",
|
|
8506
|
+
const { wh: A, text: K } = as[n], B = bn(a) || bn(r) || m, V = B.trim()[0] || "?", E = typeof process < "u" && ((_ = process.env) == null ? void 0 : _.NEXT_PUBLIC_BASE_PATH) || "", H = cs(r, a), Y = ds(E, "/favicon.svg"), X = y ? `${E}/api/user/avatar/${y}${k ? `?v=${k}` : ""}` : "", U = {
|
|
8475
8507
|
xs: 20,
|
|
8476
8508
|
sm: 28,
|
|
8477
8509
|
md: 36,
|
|
@@ -8534,7 +8566,7 @@ function us({
|
|
|
8534
8566
|
);
|
|
8535
8567
|
const S = c ?? !0, O = d ?? B;
|
|
8536
8568
|
return S && O ? /* @__PURE__ */ t(
|
|
8537
|
-
|
|
8569
|
+
Ut,
|
|
8538
8570
|
{
|
|
8539
8571
|
as: "span",
|
|
8540
8572
|
content: O,
|
|
@@ -8592,7 +8624,7 @@ function ps({
|
|
|
8592
8624
|
className: `fixed inset-y-0 left-0 z-50 flex w-72 flex-col bg-[#071716] text-white shadow-2xl transition-transform duration-200 lg:translate-x-0 ${w ? "translate-x-0" : "-translate-x-full"}`,
|
|
8593
8625
|
children: [
|
|
8594
8626
|
/* @__PURE__ */ l("div", { className: "flex h-16 items-center gap-3 border-b border-white/10 px-4", children: [
|
|
8595
|
-
/* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-white/10 text-white", children: c ?? /* @__PURE__ */ t(
|
|
8627
|
+
/* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-white/10 text-white", children: c ?? /* @__PURE__ */ t(Er, { className: "h-5 w-5" }) }),
|
|
8596
8628
|
/* @__PURE__ */ t("div", { className: "min-w-0 flex-1 truncate text-sm font-semibold", children: i }),
|
|
8597
8629
|
/* @__PURE__ */ t(
|
|
8598
8630
|
"button",
|
|
@@ -8612,7 +8644,7 @@ function ps({
|
|
|
8612
8644
|
"data-overlay-scroll": "true",
|
|
8613
8645
|
children: Object.entries(f).map(([C, N]) => /* @__PURE__ */ l("div", { className: "mb-5", children: [
|
|
8614
8646
|
/* @__PURE__ */ l("div", { className: "mb-2 flex items-center gap-2 px-2 text-[11px] font-semibold uppercase tracking-wide text-white/35", children: [
|
|
8615
|
-
/* @__PURE__ */ t(
|
|
8647
|
+
/* @__PURE__ */ t(Xe, { className: "h-3.5 w-3.5" }),
|
|
8616
8648
|
C
|
|
8617
8649
|
] }),
|
|
8618
8650
|
/* @__PURE__ */ t("div", { className: "space-y-1", children: N.map((x) => {
|
|
@@ -8623,7 +8655,7 @@ function ps({
|
|
|
8623
8655
|
href: x.href,
|
|
8624
8656
|
className: `flex min-w-0 items-center gap-2 rounded-md px-2 py-2 text-sm transition-colors ${y ? "bg-white/10 text-white" : "text-white/55 hover:bg-white/[0.06] hover:text-white/85"}`,
|
|
8625
8657
|
children: [
|
|
8626
|
-
/* @__PURE__ */ t("span", { className: "flex h-5 w-5 flex-shrink-0 items-center justify-center", children: x.icon ?? /* @__PURE__ */ t(
|
|
8658
|
+
/* @__PURE__ */ t("span", { className: "flex h-5 w-5 flex-shrink-0 items-center justify-center", children: x.icon ?? /* @__PURE__ */ t(Er, { className: "h-4 w-4" }) }),
|
|
8627
8659
|
/* @__PURE__ */ t("span", { className: "truncate", children: x.label })
|
|
8628
8660
|
]
|
|
8629
8661
|
},
|
|
@@ -8693,7 +8725,7 @@ const pn = "bonsaif-ui:prime-auth-sso", fs = {
|
|
|
8693
8725
|
"email-inbox": "Buzones",
|
|
8694
8726
|
"security-incidents": "Incidentes",
|
|
8695
8727
|
"guard-schedule": "Guardias"
|
|
8696
|
-
},
|
|
8728
|
+
}, ea = {
|
|
8697
8729
|
dashboard: /* @__PURE__ */ t(gl, { className: "h-5 w-5" }),
|
|
8698
8730
|
tickets: /* @__PURE__ */ t(xl, { className: "h-5 w-5" }),
|
|
8699
8731
|
teams: /* @__PURE__ */ t(qa, { className: "h-5 w-5" }),
|
|
@@ -8701,20 +8733,20 @@ const pn = "bonsaif-ui:prime-auth-sso", fs = {
|
|
|
8701
8733
|
clients: /* @__PURE__ */ t(hl, { className: "h-5 w-5" }),
|
|
8702
8734
|
surveys: /* @__PURE__ */ t(fl, { className: "h-5 w-5" }),
|
|
8703
8735
|
profile: /* @__PURE__ */ t(pl, { className: "h-5 w-5" }),
|
|
8704
|
-
settings: /* @__PURE__ */ t(
|
|
8736
|
+
settings: /* @__PURE__ */ t(Sr, { className: "h-5 w-5" }),
|
|
8705
8737
|
notifications: /* @__PURE__ */ t(bl, { className: "h-5 w-5" }),
|
|
8706
8738
|
changelog: /* @__PURE__ */ t(wn, { className: "h-5 w-5" }),
|
|
8707
|
-
admin: /* @__PURE__ */ t(
|
|
8739
|
+
admin: /* @__PURE__ */ t(Gr, { className: "h-5 w-5" }),
|
|
8708
8740
|
users: /* @__PURE__ */ t(qa, { className: "h-5 w-5" }),
|
|
8709
|
-
roles: /* @__PURE__ */ t(
|
|
8710
|
-
menus: /* @__PURE__ */ t(
|
|
8711
|
-
guards: /* @__PURE__ */ t(
|
|
8712
|
-
vacations: /* @__PURE__ */ t(
|
|
8713
|
-
audit: /* @__PURE__ */ t(
|
|
8741
|
+
roles: /* @__PURE__ */ t(Gr, { className: "h-5 w-5" }),
|
|
8742
|
+
menus: /* @__PURE__ */ t(Sr, { className: "h-5 w-5" }),
|
|
8743
|
+
guards: /* @__PURE__ */ t(aa, { className: "h-5 w-5" }),
|
|
8744
|
+
vacations: /* @__PURE__ */ t(aa, { className: "h-5 w-5" }),
|
|
8745
|
+
audit: /* @__PURE__ */ t(na, { className: "h-5 w-5" }),
|
|
8714
8746
|
positions: /* @__PURE__ */ t(ml, { className: "h-5 w-5" }),
|
|
8715
|
-
ranks: /* @__PURE__ */ t(
|
|
8747
|
+
ranks: /* @__PURE__ */ t(na, { className: "h-5 w-5" }),
|
|
8716
8748
|
"email-inbox": /* @__PURE__ */ t(kn, { className: "h-5 w-5" }),
|
|
8717
|
-
"security-incidents": /* @__PURE__ */ t(
|
|
8749
|
+
"security-incidents": /* @__PURE__ */ t(Gr, { className: "h-5 w-5" })
|
|
8718
8750
|
};
|
|
8719
8751
|
function hs({
|
|
8720
8752
|
href: e,
|
|
@@ -8737,17 +8769,17 @@ function gs(e) {
|
|
|
8737
8769
|
const a = decodeURIComponent(r[r.length - 1]), n = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, i = xs(a) && n ? n : a, c = fs[i] ?? vs(i);
|
|
8738
8770
|
return [{ label: "Inicio", href: "/" }, { label: c }];
|
|
8739
8771
|
}
|
|
8740
|
-
function
|
|
8772
|
+
function ta(e) {
|
|
8741
8773
|
return (e == null ? void 0 : e.querySelector(":scope > .os-viewport")) ?? (e == null ? void 0 : e.querySelector(
|
|
8742
8774
|
":scope > [data-overlayscrollbars-viewport]"
|
|
8743
8775
|
));
|
|
8744
8776
|
}
|
|
8745
8777
|
function ys(e) {
|
|
8746
8778
|
const r = e.split("/").filter(Boolean), a = r[r.length - 1];
|
|
8747
|
-
if (!a) return /* @__PURE__ */ t(
|
|
8748
|
-
if (
|
|
8779
|
+
if (!a) return /* @__PURE__ */ t(Er, { className: "h-5 w-5" });
|
|
8780
|
+
if (ea[a]) return ea[a];
|
|
8749
8781
|
const n = r.length > 1 ? r[r.length - 2] : "";
|
|
8750
|
-
return
|
|
8782
|
+
return ea[n] ?? /* @__PURE__ */ t(Er, { className: "h-5 w-5" });
|
|
8751
8783
|
}
|
|
8752
8784
|
function ws(e) {
|
|
8753
8785
|
return e.includes("primeAuthOrigin") || e.includes("primeAuthProjectKey");
|
|
@@ -8781,7 +8813,7 @@ function wc({
|
|
|
8781
8813
|
contained: w = !1,
|
|
8782
8814
|
LinkComponent: k = hs
|
|
8783
8815
|
}) {
|
|
8784
|
-
const f = se(null), [C, N] = L(!1), [x, y] = L(b ?? "/"), [A, K] = L(() => fn()), [B, V] = L(null),
|
|
8816
|
+
const f = se(null), [C, N] = L(!1), [x, y] = L(b ?? "/"), [A, K] = L(() => fn()), [B, V] = L(null), E = b ?? x, H = m ?? gs(E), Y = i ?? ys(E), X = p && !A && H.length > 1, j = !X;
|
|
8785
8817
|
Q(() => {
|
|
8786
8818
|
b || y(window.location.pathname);
|
|
8787
8819
|
}, [b]), Q(() => {
|
|
@@ -8792,18 +8824,18 @@ function wc({
|
|
|
8792
8824
|
return;
|
|
8793
8825
|
}
|
|
8794
8826
|
let G = null, S = 0, O = 0;
|
|
8795
|
-
const
|
|
8796
|
-
const z = f.current,
|
|
8827
|
+
const _ = () => {
|
|
8828
|
+
const z = f.current, h = document.querySelector(
|
|
8797
8829
|
"[data-app-scroll='true']"
|
|
8798
8830
|
);
|
|
8799
8831
|
return (z == null ? void 0 : z.closest(".os-viewport")) ?? (z == null ? void 0 : z.closest(
|
|
8800
8832
|
"[data-overlayscrollbars-viewport]"
|
|
8801
|
-
)) ??
|
|
8833
|
+
)) ?? ta(h) ?? h ?? window;
|
|
8802
8834
|
}, I = () => {
|
|
8803
8835
|
const z = G && G !== window ? G.scrollTop : window.scrollY;
|
|
8804
|
-
N((
|
|
8836
|
+
N((h) => h ? z > 24 : z > 72);
|
|
8805
8837
|
}, ee = () => {
|
|
8806
|
-
G == null || G.removeEventListener("scroll", I), G =
|
|
8838
|
+
G == null || G.removeEventListener("scroll", I), G = _(), G.addEventListener("scroll", I, { passive: !0 }), I();
|
|
8807
8839
|
};
|
|
8808
8840
|
return ee(), S = window.requestAnimationFrame(ee), O = window.setTimeout(ee, 120), () => {
|
|
8809
8841
|
window.cancelAnimationFrame(S), window.clearTimeout(O), G == null || G.removeEventListener("scroll", I);
|
|
@@ -8817,7 +8849,7 @@ function wc({
|
|
|
8817
8849
|
const S = [], O = () => {
|
|
8818
8850
|
const q = f.current, ae = q == null ? void 0 : q.parentElement, re = document.querySelector(
|
|
8819
8851
|
"[data-app-scroll='true']"
|
|
8820
|
-
), ve =
|
|
8852
|
+
), ve = ta(re) ?? re;
|
|
8821
8853
|
if (!q || !ae || !ve) {
|
|
8822
8854
|
V(null);
|
|
8823
8855
|
return;
|
|
@@ -8829,17 +8861,17 @@ function wc({
|
|
|
8829
8861
|
V(
|
|
8830
8862
|
(te) => te && te.marginLeft === W.marginLeft && te.width === W.width ? te : W
|
|
8831
8863
|
);
|
|
8832
|
-
},
|
|
8864
|
+
}, _ = () => {
|
|
8833
8865
|
window.cancelAnimationFrame(G), G = window.requestAnimationFrame(O);
|
|
8834
8866
|
};
|
|
8835
|
-
|
|
8836
|
-
const I = new ResizeObserver(
|
|
8867
|
+
_(), window.addEventListener("resize", _);
|
|
8868
|
+
const I = new ResizeObserver(_), ee = f.current, z = ee == null ? void 0 : ee.parentElement, h = document.querySelector(
|
|
8837
8869
|
"[data-app-scroll='true']"
|
|
8838
|
-
),
|
|
8839
|
-
return [z,
|
|
8870
|
+
), R = ta(h) ?? h;
|
|
8871
|
+
return [z, h, R].forEach((q) => {
|
|
8840
8872
|
q && I.observe(q);
|
|
8841
|
-
}), S.push(window.setTimeout(
|
|
8842
|
-
window.cancelAnimationFrame(G), window.removeEventListener("resize",
|
|
8873
|
+
}), S.push(window.setTimeout(_, 120)), S.push(window.setTimeout(_, 280)), () => {
|
|
8874
|
+
window.cancelAnimationFrame(G), window.removeEventListener("resize", _), I.disconnect(), S.forEach((q) => window.clearTimeout(q));
|
|
8843
8875
|
};
|
|
8844
8876
|
}, [w]);
|
|
8845
8877
|
const U = {
|
|
@@ -9185,11 +9217,11 @@ export {
|
|
|
9185
9217
|
Hs as BonsaifButton,
|
|
9186
9218
|
Sc as BonsaifUIToaster,
|
|
9187
9219
|
Be as Button,
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9220
|
+
Fs as CalendarPicker,
|
|
9221
|
+
ia as Checkbox,
|
|
9222
|
+
Rs as CodeBlock,
|
|
9191
9223
|
Ps as CompactFilterSelect,
|
|
9192
|
-
|
|
9224
|
+
_s as CompactSearchInput,
|
|
9193
9225
|
Ws as ConfirmDialog,
|
|
9194
9226
|
Dn as CopyButton,
|
|
9195
9227
|
qs as CopyLinkButton,
|
|
@@ -9204,11 +9236,11 @@ export {
|
|
|
9204
9236
|
lc as FileUpload,
|
|
9205
9237
|
Hi as FormField,
|
|
9206
9238
|
rs as GlobalScrollbars,
|
|
9207
|
-
|
|
9239
|
+
_n as InputField,
|
|
9208
9240
|
Ol as LoadingState,
|
|
9209
9241
|
kc as MicroserviceFrame,
|
|
9210
9242
|
Bn as Modal,
|
|
9211
|
-
|
|
9243
|
+
Ut as MouseTooltip,
|
|
9212
9244
|
sc as MultiSelect,
|
|
9213
9245
|
cc as NumberField,
|
|
9214
9246
|
wc as PageHeader,
|
|
@@ -9219,13 +9251,13 @@ export {
|
|
|
9219
9251
|
Cc as PrimeSuiteChatFrame,
|
|
9220
9252
|
mc as RadioGroup,
|
|
9221
9253
|
bc as RichTextEditor,
|
|
9222
|
-
|
|
9254
|
+
qt as SearchableSelect,
|
|
9223
9255
|
pc as SectionPanel,
|
|
9224
9256
|
fc as StatusBadge,
|
|
9225
9257
|
hc as StatusSelect,
|
|
9226
9258
|
xc as StepWizard,
|
|
9227
9259
|
vc as Tabs,
|
|
9228
|
-
|
|
9260
|
+
Jr as TextInput,
|
|
9229
9261
|
Qi as Textarea,
|
|
9230
9262
|
gc as TextareaField,
|
|
9231
9263
|
yc as Toggle,
|
|
@@ -9239,7 +9271,7 @@ export {
|
|
|
9239
9271
|
tc as maxValue,
|
|
9240
9272
|
Js as minLength,
|
|
9241
9273
|
ec as minValue,
|
|
9242
|
-
|
|
9274
|
+
Fi as phoneCountryCodeOptions,
|
|
9243
9275
|
Zs as phoneFormat,
|
|
9244
9276
|
Gs as required,
|
|
9245
9277
|
Mc as toast,
|