@sfperusacdev/sf-ui 0.1.26 → 0.1.28
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/sf-ui.css +1 -1
- package/dist/sf-ui.js +663 -636
- package/dist/sf-ui.js.map +1 -1
- package/dist/sf-ui.umd.cjs +7 -7
- package/dist/sf-ui.umd.cjs.map +1 -1
- package/dist/theme/sf-tokens.css +14 -0
- package/dist/types/src/components/cards/KPICard.d.ts +7 -1
- package/dist/types/src/components/cards/KPICard.test.d.ts +1 -0
- package/dist/types/src/components/cards/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/sf-ui.js
CHANGED
|
@@ -11,20 +11,20 @@ import { html as L } from "@codemirror/lang-html";
|
|
|
11
11
|
import { javascript as ee } from "@codemirror/lang-javascript";
|
|
12
12
|
import { json as te } from "@codemirror/lang-json";
|
|
13
13
|
import { sql as R } from "@codemirror/lang-sql";
|
|
14
|
-
import { MapContainer as z, Marker as ne, Polygon as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { Area as
|
|
18
|
-
import { yupResolver as
|
|
19
|
-
import * as
|
|
14
|
+
import { MapContainer as z, Marker as ne, Polygon as B, Polyline as V, TileLayer as H, useMap as re, useMapEvents as ie } from "react-leaflet";
|
|
15
|
+
import ae from "leaflet";
|
|
16
|
+
import oe from "react-easy-crop";
|
|
17
|
+
import { Area as se, AreaChart as U, Bar as ce, BarChart as le, CartesianGrid as ue, Legend as de, Line as fe, LineChart as pe, ResponsiveContainer as me, Tooltip as he, XAxis as ge, YAxis as _e } from "recharts";
|
|
18
|
+
import { yupResolver as ve } from "@hookform/resolvers/yup";
|
|
19
|
+
import * as W from "yup";
|
|
20
20
|
//#region \0rolldown/runtime.js
|
|
21
|
-
var
|
|
22
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
21
|
+
var ye = Object.create, be = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, Se = Object.getOwnPropertyNames, Ce = Object.getPrototypeOf, we = Object.prototype.hasOwnProperty, Te = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), Ee = (e, t, n, r) => {
|
|
22
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = Se(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !we.call(e, s) && s !== n && be(e, s, {
|
|
23
23
|
get: ((e) => t[e]).bind(null, s),
|
|
24
|
-
enumerable: !(r =
|
|
24
|
+
enumerable: !(r = xe(t, s)) || r.enumerable
|
|
25
25
|
});
|
|
26
26
|
return e;
|
|
27
|
-
}, De = (e, t, n) => (n = e == null ? {} :
|
|
27
|
+
}, De = (e, t, n) => (n = e == null ? {} : ye(Ce(e)), Ee(t || !e || !e.__esModule || !we.call(e, "default") ? be(n, "default", {
|
|
28
28
|
value: e,
|
|
29
29
|
enumerable: !0
|
|
30
30
|
}) : n, e)), Oe = {
|
|
@@ -2559,14 +2559,14 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2559
2559
|
let e = /* @__PURE__ */ new Map();
|
|
2560
2560
|
for (let t of n) e.set(t.value, t);
|
|
2561
2561
|
return e;
|
|
2562
|
-
}, [n]),
|
|
2562
|
+
}, [n]), B = p(() => {
|
|
2563
2563
|
let e = [];
|
|
2564
2564
|
for (let t of z) {
|
|
2565
2565
|
let n = ne.get(t);
|
|
2566
2566
|
n && e.push(n);
|
|
2567
2567
|
}
|
|
2568
2568
|
return e;
|
|
2569
|
-
}, [ne, z]),
|
|
2569
|
+
}, [ne, z]), V = p(() => {
|
|
2570
2570
|
let e = P.trim().toLowerCase();
|
|
2571
2571
|
return e ? n.filter((t) => t.label.toLowerCase().includes(e)) : n;
|
|
2572
2572
|
}, [n, P]);
|
|
@@ -2575,29 +2575,29 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2575
2575
|
te(R.current?.scrollTop ?? 0);
|
|
2576
2576
|
}));
|
|
2577
2577
|
}, [M, P]);
|
|
2578
|
-
let
|
|
2578
|
+
let H = (e) => {
|
|
2579
2579
|
D.field.onChange(e), C?.(e);
|
|
2580
|
-
},
|
|
2580
|
+
}, re = () => {
|
|
2581
2581
|
N(!1), F(""), L(void 0);
|
|
2582
|
-
},
|
|
2582
|
+
}, ie = (e) => {
|
|
2583
2583
|
if (g) return;
|
|
2584
2584
|
if (!o) {
|
|
2585
|
-
|
|
2585
|
+
H(e), re();
|
|
2586
2586
|
return;
|
|
2587
2587
|
}
|
|
2588
2588
|
let t = z.includes(e) ? z.filter((t) => t !== e) : [...z, e];
|
|
2589
|
-
|
|
2590
|
-
},
|
|
2589
|
+
H(t);
|
|
2590
|
+
}, ae = (e) => {
|
|
2591
2591
|
if (!g) {
|
|
2592
2592
|
if (!o) {
|
|
2593
|
-
|
|
2593
|
+
H("");
|
|
2594
2594
|
return;
|
|
2595
2595
|
}
|
|
2596
|
-
|
|
2596
|
+
H(z.filter((t) => t !== e));
|
|
2597
2597
|
}
|
|
2598
|
+
}, oe = () => {
|
|
2599
|
+
g || H(o ? [] : "");
|
|
2598
2600
|
}, se = () => {
|
|
2599
|
-
g || V(o ? [] : "");
|
|
2600
|
-
}, ce = () => {
|
|
2601
2601
|
let e = j.current;
|
|
2602
2602
|
if (!e) return;
|
|
2603
2603
|
let t = e.getBoundingClientRect(), n = window.innerHeight - t.bottom - 12 - 4, r = t.top - 12 - 4, i = r > n && n < 120 ? "top" : "bottom", a = Math.max(120, Math.min(288, i === "top" ? r : n));
|
|
@@ -2611,23 +2611,23 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2611
2611
|
});
|
|
2612
2612
|
};
|
|
2613
2613
|
f(() => {
|
|
2614
|
-
M &&
|
|
2614
|
+
M && se();
|
|
2615
2615
|
}, [M]), u(() => {
|
|
2616
2616
|
if (!M) return;
|
|
2617
|
-
let e = () =>
|
|
2617
|
+
let e = () => se();
|
|
2618
2618
|
return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
2619
2619
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
2620
2620
|
};
|
|
2621
2621
|
}, [M]), u(() => {
|
|
2622
2622
|
let e = (e) => {
|
|
2623
2623
|
let t = e.target;
|
|
2624
|
-
A.current?.contains(t) ||
|
|
2624
|
+
A.current?.contains(t) || re();
|
|
2625
2625
|
};
|
|
2626
2626
|
return document.addEventListener("pointerdown", e), () => {
|
|
2627
2627
|
document.removeEventListener("pointerdown", e);
|
|
2628
2628
|
};
|
|
2629
2629
|
}, []);
|
|
2630
|
-
let
|
|
2630
|
+
let U = /* @__PURE__ */ y("div", {
|
|
2631
2631
|
className: (0, X.default)("flex shrink-0 items-center gap-2 px-3 py-2", I?.direction === "top" ? "border-t border-slate-200" : "border-b border-slate-200"),
|
|
2632
2632
|
children: [/* @__PURE__ */ v(Ke, {
|
|
2633
2633
|
size: 16,
|
|
@@ -2638,22 +2638,22 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2638
2638
|
onChange: (e) => F(e.target.value),
|
|
2639
2639
|
className: "h-8 w-full bg-transparent text-sm text-slate-900 outline-none placeholder:text-slate-400"
|
|
2640
2640
|
})]
|
|
2641
|
-
}),
|
|
2641
|
+
}), ce = /* @__PURE__ */ v("div", {
|
|
2642
2642
|
ref: R,
|
|
2643
2643
|
className: "overflow-auto py-1",
|
|
2644
2644
|
style: { maxHeight: Math.max(72, (I?.maxHeight ?? 288) - rn) },
|
|
2645
2645
|
onScroll: (e) => {
|
|
2646
2646
|
te(e.currentTarget.scrollTop);
|
|
2647
2647
|
},
|
|
2648
|
-
children:
|
|
2649
|
-
let e = Math.max(72, (I?.maxHeight ?? 288) - rn), t = Math.max(1, Math.ceil(e / an)), n = Math.max(0, Math.floor(ee / an) - on), r = Math.min(
|
|
2648
|
+
children: V.length ? (() => {
|
|
2649
|
+
let e = Math.max(72, (I?.maxHeight ?? 288) - rn), t = Math.max(1, Math.ceil(e / an)), n = Math.max(0, Math.floor(ee / an) - on), r = Math.min(V.length, n + t + 12), i = n * an, a = Math.max(0, (V.length - r) * an), s = V.slice(n, r);
|
|
2650
2650
|
return /* @__PURE__ */ y(_, { children: [
|
|
2651
2651
|
i > 0 && /* @__PURE__ */ v("div", { style: { height: i } }),
|
|
2652
2652
|
s.map((e) => {
|
|
2653
2653
|
let t = z.includes(e.value);
|
|
2654
2654
|
return /* @__PURE__ */ y("button", {
|
|
2655
2655
|
type: "button",
|
|
2656
|
-
onClick: () =>
|
|
2656
|
+
onClick: () => ie(e.value),
|
|
2657
2657
|
className: (0, X.default)("flex h-10 w-full items-center gap-2 px-3 text-left text-sm hover:bg-slate-50", t ? "text-slate-900" : "text-slate-700"),
|
|
2658
2658
|
children: [/* @__PURE__ */ v("span", {
|
|
2659
2659
|
className: (0, X.default)("flex h-4 w-4 items-center justify-center border", o ? "rounded" : "rounded-full", t ? "border-slate-900 bg-slate-900 text-white" : "border-slate-300 bg-white"),
|
|
@@ -2700,10 +2700,10 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2700
2700
|
className: s,
|
|
2701
2701
|
withRightIcon: !0,
|
|
2702
2702
|
disabled: g
|
|
2703
|
-
}), "flex items-center gap-1.5 text-left", o &&
|
|
2703
|
+
}), "flex items-center gap-1.5 text-left", o && B.length > 1 && "h-auto min-h-[2.5rem] py-2"),
|
|
2704
2704
|
children: [/* @__PURE__ */ v("span", {
|
|
2705
2705
|
className: "flex min-w-0 flex-1 flex-wrap items-center gap-1",
|
|
2706
|
-
children:
|
|
2706
|
+
children: B.length ? o ? /* @__PURE__ */ y(_, { children: [B.slice(0, Math.max(0, S)).map((e) => /* @__PURE__ */ y("span", {
|
|
2707
2707
|
className: "inline-flex max-w-full items-center gap-1 rounded bg-slate-100 px-1.5 py-0.5 text-xs text-slate-700",
|
|
2708
2708
|
children: [/* @__PURE__ */ v("span", {
|
|
2709
2709
|
className: "truncate",
|
|
@@ -2711,27 +2711,27 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2711
2711
|
}), !g && /* @__PURE__ */ v("button", {
|
|
2712
2712
|
type: "button",
|
|
2713
2713
|
onClick: (t) => {
|
|
2714
|
-
t.stopPropagation(),
|
|
2714
|
+
t.stopPropagation(), ae(e.value);
|
|
2715
2715
|
},
|
|
2716
2716
|
className: "rounded text-slate-400 hover:text-slate-700",
|
|
2717
2717
|
children: /* @__PURE__ */ v(Ve, { size: 12 })
|
|
2718
2718
|
})]
|
|
2719
|
-
}, e.value)),
|
|
2719
|
+
}, e.value)), B.length > S && /* @__PURE__ */ y("span", {
|
|
2720
2720
|
className: "inline-flex items-center rounded bg-slate-100 px-1.5 py-0.5 text-xs text-slate-500",
|
|
2721
|
-
children: ["+",
|
|
2721
|
+
children: ["+", B.length - S]
|
|
2722
2722
|
})] }) : /* @__PURE__ */ v("span", {
|
|
2723
2723
|
className: "truncate",
|
|
2724
|
-
children:
|
|
2724
|
+
children: B[0]?.label
|
|
2725
2725
|
}) : /* @__PURE__ */ v("span", {
|
|
2726
2726
|
className: "text-slate-400",
|
|
2727
2727
|
children: c
|
|
2728
2728
|
})
|
|
2729
2729
|
}), /* @__PURE__ */ y("span", {
|
|
2730
2730
|
className: "flex items-center gap-1",
|
|
2731
|
-
children: [
|
|
2731
|
+
children: [B.length > 0 && !g && /* @__PURE__ */ v("button", {
|
|
2732
2732
|
type: "button",
|
|
2733
2733
|
onClick: (e) => {
|
|
2734
|
-
e.stopPropagation(),
|
|
2734
|
+
e.stopPropagation(), oe();
|
|
2735
2735
|
},
|
|
2736
2736
|
className: "rounded p-0.5 text-slate-400 hover:text-slate-700",
|
|
2737
2737
|
children: /* @__PURE__ */ v(Ve, { size: 14 })
|
|
@@ -2750,7 +2750,7 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2750
2750
|
maxHeight: I?.maxHeight ?? 0,
|
|
2751
2751
|
visibility: I ? "visible" : "hidden"
|
|
2752
2752
|
},
|
|
2753
|
-
children: I?.direction === "top" ? /* @__PURE__ */ y(_, { children: [
|
|
2753
|
+
children: I?.direction === "top" ? /* @__PURE__ */ y(_, { children: [ce, U] }) : /* @__PURE__ */ y(_, { children: [U, ce] })
|
|
2754
2754
|
})]
|
|
2755
2755
|
})
|
|
2756
2756
|
});
|
|
@@ -2973,7 +2973,7 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
2973
2973
|
return n != null && String(n).toLowerCase().includes(r);
|
|
2974
2974
|
});
|
|
2975
2975
|
}
|
|
2976
|
-
}), z = R.getRowModel().rows, ne = R.getFilteredRowModel().rows.length,
|
|
2976
|
+
}), z = R.getRowModel().rows, ne = R.getFilteredRowModel().rows.length, B = Math.max(0, f - z.length), V = R.getState().pagination.pageIndex + 1, H = Math.max(1, R.getPageCount()), re = R.getAllLeafColumns().length;
|
|
2977
2977
|
return /* @__PURE__ */ v(Z, {
|
|
2978
2978
|
id: S,
|
|
2979
2979
|
label: a,
|
|
@@ -3045,22 +3045,22 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
3045
3045
|
children: T(e.column.columnDef.cell, e.getContext())
|
|
3046
3046
|
}, e.id))
|
|
3047
3047
|
}, e.id);
|
|
3048
|
-
}), Array.from({ length:
|
|
3048
|
+
}), Array.from({ length: B }).map((e, t) => /* @__PURE__ */ v("tr", {
|
|
3049
3049
|
className: "h-10 border-b border-slate-100 last:border-b-0",
|
|
3050
|
-
children: Array.from({ length:
|
|
3050
|
+
children: Array.from({ length: re }).map((e, t) => /* @__PURE__ */ v("td", {
|
|
3051
3051
|
className: (0, X.default)("px-3 py-2 align-middle", t === 0 && "w-10"),
|
|
3052
3052
|
children: "\xA0"
|
|
3053
3053
|
}, t))
|
|
3054
3054
|
}, `empty-${t}`))] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("tr", {
|
|
3055
3055
|
className: "h-10 border-b border-slate-100",
|
|
3056
3056
|
children: /* @__PURE__ */ v("td", {
|
|
3057
|
-
colSpan:
|
|
3057
|
+
colSpan: re,
|
|
3058
3058
|
className: "px-3 py-3 text-sm text-slate-500",
|
|
3059
3059
|
children: d ? "Cargando..." : l
|
|
3060
3060
|
})
|
|
3061
3061
|
}), Array.from({ length: Math.max(0, f - 1) }).map((e, t) => /* @__PURE__ */ v("tr", {
|
|
3062
3062
|
className: "h-10 border-b border-slate-100 last:border-b-0",
|
|
3063
|
-
children: Array.from({ length:
|
|
3063
|
+
children: Array.from({ length: re }).map((e, t) => /* @__PURE__ */ v("td", {
|
|
3064
3064
|
className: (0, X.default)("px-3 py-2 align-middle", t === 0 && "w-10"),
|
|
3065
3065
|
children: "\xA0"
|
|
3066
3066
|
}, t))
|
|
@@ -3088,9 +3088,9 @@ var X = /* @__PURE__ */ De((/* @__PURE__ */ Te(((e, t) => {
|
|
|
3088
3088
|
/* @__PURE__ */ y("span", {
|
|
3089
3089
|
className: "text-xs text-slate-500",
|
|
3090
3090
|
children: [
|
|
3091
|
-
|
|
3091
|
+
V,
|
|
3092
3092
|
" / ",
|
|
3093
|
-
|
|
3093
|
+
H
|
|
3094
3094
|
]
|
|
3095
3095
|
}),
|
|
3096
3096
|
/* @__PURE__ */ v("button", {
|
|
@@ -4271,14 +4271,14 @@ var ir = (e) => {
|
|
|
4271
4271
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
4272
4272
|
return !0;
|
|
4273
4273
|
};
|
|
4274
|
-
function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGrouping: o = [], enableGrouping: s = !0, enableSorting: c = !0, enableFiltering: l = !0, enablePagination: d = !1, pageSize: f = 20, fillParentHeight: g = !1, maxBodyHeightPx: b, className: x = "", emptyMessage: S = "No hay datos", title: C = "Tabla", subtitle: w, sidePanel: N = !1, onGroupingChange: P, toolbarSlot: F, belowToolbarSlot: I, loading: L = !1, loadingMessage: ee = "Cargando...", isFetching: te = !1, error: R, onRetry: z, onRefresh: ne, onRowClick:
|
|
4275
|
-
let [
|
|
4274
|
+
function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGrouping: o = [], enableGrouping: s = !0, enableSorting: c = !0, enableFiltering: l = !0, enablePagination: d = !1, pageSize: f = 20, fillParentHeight: g = !1, maxBodyHeightPx: b, className: x = "", emptyMessage: S = "No hay datos", title: C = "Tabla", subtitle: w, sidePanel: N = !1, onGroupingChange: P, toolbarSlot: F, belowToolbarSlot: I, loading: L = !1, loadingMessage: ee = "Cargando...", isFetching: te = !1, error: R, onRetry: z, onRefresh: ne, onRowClick: B, enableRowSelection: V = !0, getRowActions: H, getBulkActions: re, bulkActionsSlot: ie, onSelectionChange: ae, headerVariant: oe = "default", embedded: se = !1, detail: U, controller: ce }) {
|
|
4275
|
+
let [le, ue] = h(o), [de, fe] = h(() => o.length > 0 ? {} : !0), [pe, me] = h([]), [he, ge] = h(""), [_e, ve] = h([]), [W, ye] = h({}), [be, xe] = h({}), [Se, Ce] = h(() => rr(i).map((e) => e.id)), [we, Te] = h({}), [Ee, De] = h({
|
|
4276
4276
|
pageIndex: 0,
|
|
4277
4277
|
pageSize: f
|
|
4278
|
-
}), [Oe, ke] = h(!1), [Ae, je] = h(!1), [Me, Ne] = h(!1), [Pe, Fe] = h(null), [Ie, Le] = h(!1), [Re, ze] = h({}), G =
|
|
4278
|
+
}), [Oe, ke] = h(!1), [Ae, je] = h(!1), [Me, Ne] = h(!1), [Pe, Fe] = h(null), [Ie, Le] = h(!1), [Re, ze] = h({}), G = U != null && (U.render != null || U.getRows != null && U.columns != null), Be = (e) => G ? U?.isExpandable?.(e) ?? !0 : !1, Ve = (e, t) => {
|
|
4279
4279
|
let n = Re[e];
|
|
4280
4280
|
if (n != null) return n;
|
|
4281
|
-
let r =
|
|
4281
|
+
let r = U?.defaultExpanded;
|
|
4282
4282
|
return typeof r == "function" ? r(t) : r === !0;
|
|
4283
4283
|
}, He = (e, t) => {
|
|
4284
4284
|
let n = !Ve(e, t);
|
|
@@ -4288,18 +4288,18 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4288
4288
|
}));
|
|
4289
4289
|
}, Ue = p(() => {
|
|
4290
4290
|
let e = [];
|
|
4291
|
-
return G && e.push("__detail"),
|
|
4291
|
+
return G && e.push("__detail"), V && e.push("__select"), H && e.push("__actions"), e;
|
|
4292
4292
|
}, [
|
|
4293
|
-
B,
|
|
4294
4293
|
V,
|
|
4294
|
+
H,
|
|
4295
4295
|
G
|
|
4296
4296
|
]), We = p(() => {
|
|
4297
4297
|
if (e) return t ?? zn();
|
|
4298
|
-
}, [e, t]), Ge = m(!1), K = m(!1), Ke = m(void 0), qe = m(null), Je = m(void 0), q = a ??
|
|
4298
|
+
}, [e, t]), Ge = m(!1), K = m(!1), Ke = m(void 0), qe = m(null), Je = m(void 0), q = a ?? le, Ye = p(() => w ?? (!s || q.length === 0 ? null : `Agrupado por: ${q.join(" → ")}`), [
|
|
4299
4299
|
w,
|
|
4300
4300
|
s,
|
|
4301
4301
|
q
|
|
4302
|
-
]), Xe =
|
|
4302
|
+
]), Xe = oe === "brand", Ze = p(() => rr(i).map((e) => ({
|
|
4303
4303
|
id: e.id,
|
|
4304
4304
|
headerLabel: $n(e.header, e.id)
|
|
4305
4305
|
})).filter((e) => !!e), [i]), Qe = p(() => {
|
|
@@ -4320,13 +4320,13 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4320
4320
|
e.set(t, i);
|
|
4321
4321
|
}
|
|
4322
4322
|
return e;
|
|
4323
|
-
}, [i, r]), et = p(() => nr(i,
|
|
4323
|
+
}, [i, r]), et = p(() => nr(i, we), [we, i]), tt = p(() => {
|
|
4324
4324
|
let e = [];
|
|
4325
|
-
return G && e.push("__detail"),
|
|
4325
|
+
return G && e.push("__detail"), V && e.push("__select"), e.push(...Se), H && e.push("__actions"), e;
|
|
4326
4326
|
}, [
|
|
4327
|
-
|
|
4328
|
-
B,
|
|
4327
|
+
Se,
|
|
4329
4328
|
V,
|
|
4329
|
+
H,
|
|
4330
4330
|
G
|
|
4331
4331
|
]), nt = p(() => {
|
|
4332
4332
|
let e = {
|
|
@@ -4354,7 +4354,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4354
4354
|
},
|
|
4355
4355
|
onChange: e.getToggleSelectedHandler()
|
|
4356
4356
|
})
|
|
4357
|
-
}, t =
|
|
4357
|
+
}, t = H == null ? null : {
|
|
4358
4358
|
id: "__actions",
|
|
4359
4359
|
size: 36,
|
|
4360
4360
|
enableSorting: !1,
|
|
@@ -4362,7 +4362,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4362
4362
|
enableHiding: !1,
|
|
4363
4363
|
header: () => null,
|
|
4364
4364
|
cell: ({ row: e }) => {
|
|
4365
|
-
let t =
|
|
4365
|
+
let t = H(e.original);
|
|
4366
4366
|
if (!t || t.length === 0) return null;
|
|
4367
4367
|
let n = e.id;
|
|
4368
4368
|
return /* @__PURE__ */ v(Qn, {
|
|
@@ -4397,22 +4397,22 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4397
4397
|
} : null;
|
|
4398
4398
|
return [
|
|
4399
4399
|
...n ? [n] : [],
|
|
4400
|
-
...
|
|
4400
|
+
...V ? [e] : [],
|
|
4401
4401
|
...et,
|
|
4402
4402
|
...t ? [t] : []
|
|
4403
4403
|
];
|
|
4404
4404
|
}, [
|
|
4405
4405
|
et,
|
|
4406
|
-
B,
|
|
4407
4406
|
V,
|
|
4407
|
+
H,
|
|
4408
4408
|
Pe,
|
|
4409
4409
|
G,
|
|
4410
4410
|
Re,
|
|
4411
|
-
|
|
4411
|
+
U
|
|
4412
4412
|
]), rt = p(() => {
|
|
4413
|
-
let e = Object.entries(
|
|
4413
|
+
let e = Object.entries(we).sort(([e], [t]) => e.localeCompare(t));
|
|
4414
4414
|
return JSON.stringify(e);
|
|
4415
|
-
}, [
|
|
4415
|
+
}, [we]), it = p(() => {
|
|
4416
4416
|
if (s) return k();
|
|
4417
4417
|
}, [s, rt]);
|
|
4418
4418
|
u(() => {
|
|
@@ -4427,7 +4427,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4427
4427
|
try {
|
|
4428
4428
|
let e = JSON.parse(n);
|
|
4429
4429
|
if (K.current) return;
|
|
4430
|
-
a == null && Array.isArray(e.grouping) &&
|
|
4430
|
+
a == null && Array.isArray(e.grouping) && ue(e.grouping), e.expanded != null && (e.expanded === !0 && Array.isArray(e.grouping) && e.grouping.length > 0 ? fe({}) : fe(e.expanded)), e.sorting && me(e.sorting), typeof e.globalFilter == "string" && ge(e.globalFilter), e.columnFilters && ve(e.columnFilters), e.columnVisibility && ye(e.columnVisibility), e.columnOrder && Ce(e.columnOrder), e.columnAggregations && Te(e.columnAggregations), e.pagination && De(e.pagination);
|
|
4431
4431
|
} catch {} finally {
|
|
4432
4432
|
Ge.current = !0;
|
|
4433
4433
|
}
|
|
@@ -4440,7 +4440,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4440
4440
|
We
|
|
4441
4441
|
]), u(() => {
|
|
4442
4442
|
let e = rr(i).map((e) => e.id);
|
|
4443
|
-
|
|
4443
|
+
Ce((t) => {
|
|
4444
4444
|
let n = t.filter((t) => e.includes(t));
|
|
4445
4445
|
for (let t of e) n.includes(t) || n.push(t);
|
|
4446
4446
|
return n;
|
|
@@ -4449,13 +4449,13 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4449
4449
|
if (!e || !We || !Ge.current) return;
|
|
4450
4450
|
let t = {
|
|
4451
4451
|
grouping: a == null ? q : void 0,
|
|
4452
|
-
expanded:
|
|
4453
|
-
sorting:
|
|
4454
|
-
globalFilter:
|
|
4455
|
-
columnFilters:
|
|
4456
|
-
columnVisibility:
|
|
4457
|
-
columnOrder:
|
|
4458
|
-
columnAggregations:
|
|
4452
|
+
expanded: de,
|
|
4453
|
+
sorting: pe,
|
|
4454
|
+
globalFilter: he,
|
|
4455
|
+
columnFilters: _e,
|
|
4456
|
+
columnVisibility: W,
|
|
4457
|
+
columnOrder: Se,
|
|
4458
|
+
columnAggregations: we,
|
|
4459
4459
|
pagination: Ee
|
|
4460
4460
|
};
|
|
4461
4461
|
return window.clearTimeout(Ke.current), Ke.current = window.setTimeout(() => {
|
|
@@ -4464,18 +4464,18 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4464
4464
|
window.clearTimeout(Ke.current);
|
|
4465
4465
|
};
|
|
4466
4466
|
}, [
|
|
4467
|
-
|
|
4467
|
+
_e,
|
|
4468
|
+
we,
|
|
4469
|
+
Se,
|
|
4468
4470
|
W,
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
fe,
|
|
4472
|
-
ge,
|
|
4471
|
+
de,
|
|
4472
|
+
he,
|
|
4473
4473
|
a,
|
|
4474
4474
|
e,
|
|
4475
4475
|
Ee,
|
|
4476
4476
|
q,
|
|
4477
4477
|
We,
|
|
4478
|
-
|
|
4478
|
+
pe
|
|
4479
4479
|
]);
|
|
4480
4480
|
let J = M({
|
|
4481
4481
|
data: r,
|
|
@@ -4483,42 +4483,42 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4483
4483
|
debugTable: !1,
|
|
4484
4484
|
state: {
|
|
4485
4485
|
grouping: q,
|
|
4486
|
-
expanded:
|
|
4487
|
-
sorting:
|
|
4488
|
-
globalFilter:
|
|
4489
|
-
columnFilters:
|
|
4490
|
-
columnVisibility:
|
|
4486
|
+
expanded: de,
|
|
4487
|
+
sorting: pe,
|
|
4488
|
+
globalFilter: he,
|
|
4489
|
+
columnFilters: _e,
|
|
4490
|
+
columnVisibility: W,
|
|
4491
4491
|
columnOrder: tt,
|
|
4492
4492
|
pagination: Ee,
|
|
4493
|
-
rowSelection:
|
|
4493
|
+
rowSelection: be
|
|
4494
4494
|
},
|
|
4495
4495
|
onGroupingChange: (e) => {
|
|
4496
4496
|
K.current = !0;
|
|
4497
4497
|
let t = typeof e == "function" ? e(q) : e;
|
|
4498
|
-
|
|
4498
|
+
ue((e) => or(e, t) ? e : t), or(q, t) || P?.(t);
|
|
4499
4499
|
},
|
|
4500
4500
|
onExpandedChange: (e) => {
|
|
4501
|
-
K.current = !0,
|
|
4501
|
+
K.current = !0, fe(e);
|
|
4502
4502
|
},
|
|
4503
4503
|
onSortingChange: (e) => {
|
|
4504
|
-
K.current = !0,
|
|
4504
|
+
K.current = !0, me(e);
|
|
4505
4505
|
},
|
|
4506
4506
|
onGlobalFilterChange: (e) => {
|
|
4507
|
-
K.current = !0,
|
|
4507
|
+
K.current = !0, ge(e);
|
|
4508
4508
|
},
|
|
4509
4509
|
onColumnFiltersChange: (e) => {
|
|
4510
|
-
K.current = !0,
|
|
4510
|
+
K.current = !0, ve(e);
|
|
4511
4511
|
},
|
|
4512
4512
|
onColumnVisibilityChange: (e) => {
|
|
4513
|
-
K.current = !0,
|
|
4513
|
+
K.current = !0, ye(e);
|
|
4514
4514
|
},
|
|
4515
4515
|
onRowSelectionChange: (e) => {
|
|
4516
|
-
K.current = !0,
|
|
4516
|
+
K.current = !0, xe(e);
|
|
4517
4517
|
},
|
|
4518
4518
|
onColumnOrderChange: (e) => {
|
|
4519
4519
|
K.current = !0;
|
|
4520
4520
|
let t = (typeof e == "function" ? e(tt) : e).filter((e) => !Ue.includes(e));
|
|
4521
|
-
|
|
4521
|
+
Ce(t);
|
|
4522
4522
|
},
|
|
4523
4523
|
onPaginationChange: (e) => {
|
|
4524
4524
|
K.current = !0, De(e);
|
|
@@ -4537,7 +4537,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4537
4537
|
getSubRows: (e) => e.subRows,
|
|
4538
4538
|
getPaginationRowModel: d ? A() : void 0,
|
|
4539
4539
|
filterFns: { columnFilter: Yn },
|
|
4540
|
-
enableRowSelection:
|
|
4540
|
+
enableRowSelection: V
|
|
4541
4541
|
});
|
|
4542
4542
|
qe.current = J;
|
|
4543
4543
|
let Y = J.getSelectedRowModel().flatRows.map((e) => e.original);
|
|
@@ -4553,13 +4553,13 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4553
4553
|
J,
|
|
4554
4554
|
rt
|
|
4555
4555
|
]), u(() => {
|
|
4556
|
-
|
|
4556
|
+
ae?.(J.getSelectedRowModel().flatRows.map((e) => e.original));
|
|
4557
4557
|
}, [
|
|
4558
|
-
|
|
4559
|
-
|
|
4558
|
+
ae,
|
|
4559
|
+
be,
|
|
4560
4560
|
J
|
|
4561
4561
|
]), u(() => {
|
|
4562
|
-
|
|
4562
|
+
ce && ce.register({
|
|
4563
4563
|
selection: {
|
|
4564
4564
|
selectRowFn: (e) => {
|
|
4565
4565
|
let t = Array.isArray(e) ? e : [e];
|
|
@@ -4586,8 +4586,8 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4586
4586
|
}
|
|
4587
4587
|
});
|
|
4588
4588
|
}, [
|
|
4589
|
-
|
|
4590
|
-
|
|
4589
|
+
ce,
|
|
4590
|
+
be,
|
|
4591
4591
|
J
|
|
4592
4592
|
]), u(() => {
|
|
4593
4593
|
s && q.length !== 0 && J.setGrouping(q);
|
|
@@ -4633,7 +4633,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4633
4633
|
children: "Columns"
|
|
4634
4634
|
}), /* @__PURE__ */ v("div", {
|
|
4635
4635
|
className: "sf-table-panel-stack sf-table-panel-stack--tight",
|
|
4636
|
-
children:
|
|
4636
|
+
children: Se.map((e) => J.getColumn(e)).filter(Boolean).map((e, t) => {
|
|
4637
4637
|
let n = e.id, r = e.getCanHide?.() ?? !0, i = e.getIsVisible(), a = Qe.get(n) ?? n;
|
|
4638
4638
|
return /* @__PURE__ */ y("div", {
|
|
4639
4639
|
draggable: !0,
|
|
@@ -4650,8 +4650,8 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4650
4650
|
e.preventDefault();
|
|
4651
4651
|
let r = ir(e);
|
|
4652
4652
|
if (!r || r === n) return;
|
|
4653
|
-
let i =
|
|
4654
|
-
i !== -1 && J.setColumnOrder(ar(
|
|
4653
|
+
let i = Se.indexOf(r), a = t;
|
|
4654
|
+
i !== -1 && J.setColumnOrder(ar(Se, i, a));
|
|
4655
4655
|
},
|
|
4656
4656
|
className: "sf-table-column-row",
|
|
4657
4657
|
children: [/* @__PURE__ */ y("span", {
|
|
@@ -4743,7 +4743,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4743
4743
|
children: [/* @__PURE__ */ v("p", {
|
|
4744
4744
|
className: "sf-table-panel__section-title",
|
|
4745
4745
|
children: "Aggregations"
|
|
4746
|
-
}), Object.keys(
|
|
4746
|
+
}), Object.keys(we).length > 0 && /* @__PURE__ */ v("button", {
|
|
4747
4747
|
type: "button",
|
|
4748
4748
|
onClick: () => {
|
|
4749
4749
|
K.current = !0, Te({});
|
|
@@ -4756,10 +4756,10 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4756
4756
|
children: [/* @__PURE__ */ v("p", {
|
|
4757
4757
|
className: "sf-table-panel__subtitle",
|
|
4758
4758
|
children: "Nota: solo se ve el resultado cuando la tabla está agrupada."
|
|
4759
|
-
}), Object.keys(
|
|
4759
|
+
}), Object.keys(we).length === 0 ? /* @__PURE__ */ v("div", {
|
|
4760
4760
|
className: "sf-table-panel-empty",
|
|
4761
4761
|
children: "Arrastra columnas aquí"
|
|
4762
|
-
}) : Object.entries(
|
|
4762
|
+
}) : Object.entries(we).map(([e, t]) => /* @__PURE__ */ y("div", {
|
|
4763
4763
|
className: "sf-table-panel-row",
|
|
4764
4764
|
children: [
|
|
4765
4765
|
/* @__PURE__ */ v("span", {
|
|
@@ -4805,7 +4805,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4805
4805
|
columnsMeta: Ze,
|
|
4806
4806
|
headerLabelById: Qe,
|
|
4807
4807
|
columnTypeById: $e,
|
|
4808
|
-
columnFilters:
|
|
4808
|
+
columnFilters: _e,
|
|
4809
4809
|
table: J,
|
|
4810
4810
|
markUserEdit: () => {
|
|
4811
4811
|
K.current = !0;
|
|
@@ -4816,16 +4816,16 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4816
4816
|
onClose: () => Ne(!1),
|
|
4817
4817
|
columnsMeta: Ze,
|
|
4818
4818
|
headerLabelById: Qe,
|
|
4819
|
-
sorting:
|
|
4819
|
+
sorting: pe,
|
|
4820
4820
|
table: J,
|
|
4821
4821
|
markUserEdit: () => {
|
|
4822
4822
|
K.current = !0;
|
|
4823
4823
|
}
|
|
4824
4824
|
}),
|
|
4825
4825
|
/* @__PURE__ */ y("div", {
|
|
4826
|
-
className: (0, X.default)(
|
|
4826
|
+
className: (0, X.default)(se ? "sf-table--embedded w-full" : "sf-table-shell w-full", x),
|
|
4827
4827
|
children: [
|
|
4828
|
-
!
|
|
4828
|
+
!se && /* @__PURE__ */ y("div", {
|
|
4829
4829
|
className: "sf-table-toolbar",
|
|
4830
4830
|
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h2", {
|
|
4831
4831
|
className: "sf-table-title",
|
|
@@ -4898,9 +4898,9 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4898
4898
|
]
|
|
4899
4899
|
}),
|
|
4900
4900
|
l && /* @__PURE__ */ v("input", {
|
|
4901
|
-
value:
|
|
4901
|
+
value: he,
|
|
4902
4902
|
onChange: (e) => {
|
|
4903
|
-
K.current = !0,
|
|
4903
|
+
K.current = !0, ge(e.target.value);
|
|
4904
4904
|
},
|
|
4905
4905
|
placeholder: "Buscar...",
|
|
4906
4906
|
className: "sf-table-search"
|
|
@@ -4910,10 +4910,10 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4910
4910
|
children: "Agrupado"
|
|
4911
4911
|
}),
|
|
4912
4912
|
typeof F == "function" ? F(Y, { clearSelection: () => J.resetRowSelection() }) : F,
|
|
4913
|
-
|
|
4913
|
+
V && Y.length > 0 && /* @__PURE__ */ y("div", {
|
|
4914
4914
|
className: "flex items-center gap-2",
|
|
4915
4915
|
children: [(() => {
|
|
4916
|
-
let e =
|
|
4916
|
+
let e = re?.(Y, { clearSelection: () => J.resetRowSelection() }) ?? [];
|
|
4917
4917
|
return e.length === 0 ? null : /* @__PURE__ */ y("div", {
|
|
4918
4918
|
className: "relative",
|
|
4919
4919
|
children: [/* @__PURE__ */ v("button", {
|
|
@@ -4943,7 +4943,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4943
4943
|
}, e.label))
|
|
4944
4944
|
})]
|
|
4945
4945
|
});
|
|
4946
|
-
})(),
|
|
4946
|
+
})(), ie?.(Y, { clearSelection: () => J.resetRowSelection() })]
|
|
4947
4947
|
})
|
|
4948
4948
|
]
|
|
4949
4949
|
})]
|
|
@@ -5008,9 +5008,9 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5008
5008
|
}) }) : /* @__PURE__ */ v(_, { children: J.getRowModel().rows.map((e) => {
|
|
5009
5009
|
let t = G && !e.getIsGrouped() && Be(e.original) && Ve(e.id, e.original);
|
|
5010
5010
|
return /* @__PURE__ */ y(n, { children: [/* @__PURE__ */ v("tr", {
|
|
5011
|
-
className: (0, X.default)("sf-table-row", e.getIsGrouped() && "sf-table-row--group",
|
|
5012
|
-
onClick:
|
|
5013
|
-
t.target.closest("button, a, input, select, label, [role=\"button\"]") ||
|
|
5011
|
+
className: (0, X.default)("sf-table-row", e.getIsGrouped() && "sf-table-row--group", B && !e.getIsGrouped() && "sf-table-row--clickable", t && "sf-table-row--detail-open"),
|
|
5012
|
+
onClick: B && !e.getIsGrouped() ? (t) => {
|
|
5013
|
+
t.target.closest("button, a, input, select, label, [role=\"button\"]") || B(e.original);
|
|
5014
5014
|
} : void 0,
|
|
5015
5015
|
children: e.getVisibleCells().map((t) => {
|
|
5016
5016
|
let n = t.getIsGrouped(), r = t.getIsAggregated(), i = t.getIsPlaceholder();
|
|
@@ -5034,7 +5034,7 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5034
5034
|
]
|
|
5035
5035
|
}) : r ? (() => {
|
|
5036
5036
|
let e = t.column.id;
|
|
5037
|
-
return
|
|
5037
|
+
return we[e] == null ? null : T(t.column.columnDef.aggregatedCell ?? t.column.columnDef.cell, t.getContext());
|
|
5038
5038
|
})() : i ? null : T(t.column.columnDef.cell, t.getContext())
|
|
5039
5039
|
}, t.id);
|
|
5040
5040
|
})
|
|
@@ -5045,15 +5045,15 @@ function sr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5045
5045
|
colSpan: e.getVisibleCells().length,
|
|
5046
5046
|
children: /* @__PURE__ */ v("div", {
|
|
5047
5047
|
className: "sf-table-detail-inner",
|
|
5048
|
-
children:
|
|
5048
|
+
children: U?.render ? U.render(e.original) : /* @__PURE__ */ v(sr, {
|
|
5049
5049
|
embedded: !0,
|
|
5050
|
-
data:
|
|
5051
|
-
columns:
|
|
5050
|
+
data: U?.getRows?.(e.original) ?? [],
|
|
5051
|
+
columns: U?.columns ?? [],
|
|
5052
5052
|
enableRowSelection: !1,
|
|
5053
5053
|
enableGrouping: !1,
|
|
5054
5054
|
enableFiltering: !1,
|
|
5055
5055
|
enableSorting: !1,
|
|
5056
|
-
emptyMessage:
|
|
5056
|
+
emptyMessage: U?.emptyMessage ?? "Sin detalle"
|
|
5057
5057
|
})
|
|
5058
5058
|
})
|
|
5059
5059
|
})
|
|
@@ -8942,7 +8942,7 @@ var lr = (e) => {
|
|
|
8942
8942
|
})
|
|
8943
8943
|
});
|
|
8944
8944
|
}, yo = ({ target: e, zoom: t = 16 }) => {
|
|
8945
|
-
let n =
|
|
8945
|
+
let n = re();
|
|
8946
8946
|
return u(() => {
|
|
8947
8947
|
e && n.setView([e.lat, e.lng], t, { animate: !0 });
|
|
8948
8948
|
}, [
|
|
@@ -9036,7 +9036,7 @@ var lr = (e) => {
|
|
|
9036
9036
|
}, `${e.lat}-${e.lng}-${e.label}`))
|
|
9037
9037
|
})]
|
|
9038
9038
|
});
|
|
9039
|
-
}, wo =
|
|
9039
|
+
}, wo = ae.divIcon({
|
|
9040
9040
|
className: "",
|
|
9041
9041
|
html: "<div class=\"sf-map-picker-marker\"></div>",
|
|
9042
9042
|
iconSize: [14, 14],
|
|
@@ -9062,7 +9062,7 @@ var lr = (e) => {
|
|
|
9062
9062
|
lat: String(e.lat ?? To.lat),
|
|
9063
9063
|
lng: String(e.lng ?? To.lng)
|
|
9064
9064
|
} : { ...To }, Mo = "© <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>", No = ({ lat: e, lng: t }) => {
|
|
9065
|
-
let n =
|
|
9065
|
+
let n = re();
|
|
9066
9066
|
return u(() => {
|
|
9067
9067
|
n.setView([e, t], n.getZoom(), { animate: !0 });
|
|
9068
9068
|
}, [
|
|
@@ -9070,7 +9070,7 @@ var lr = (e) => {
|
|
|
9070
9070
|
t,
|
|
9071
9071
|
n
|
|
9072
9072
|
]), null;
|
|
9073
|
-
}, Po = ({ readOnly: e, onPick: t }) => (
|
|
9073
|
+
}, Po = ({ readOnly: e, onPick: t }) => (ie({ click(n) {
|
|
9074
9074
|
e || t(Do(n.latlng.lat), Do(n.latlng.lng));
|
|
9075
9075
|
} }), null), Fo = ({ lat: e, lng: t, zoom: n = 13, readOnly: r, showGeocoder: i = !0, onPick: a }) => {
|
|
9076
9076
|
let o = [e, t], [s, c] = h(null);
|
|
@@ -9090,7 +9090,7 @@ var lr = (e) => {
|
|
|
9090
9090
|
scrollWheelZoom: !r,
|
|
9091
9091
|
className: "sf-map-frame",
|
|
9092
9092
|
children: [
|
|
9093
|
-
/* @__PURE__ */ v(
|
|
9093
|
+
/* @__PURE__ */ v(H, {
|
|
9094
9094
|
attribution: Mo,
|
|
9095
9095
|
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
|
9096
9096
|
}),
|
|
@@ -9248,16 +9248,23 @@ var lr = (e) => {
|
|
|
9248
9248
|
red: "sf-kpi-card--accent-red",
|
|
9249
9249
|
teal: "sf-kpi-card--accent-teal",
|
|
9250
9250
|
slate: "sf-kpi-card--accent-slate"
|
|
9251
|
-
}, zo =
|
|
9252
|
-
|
|
9251
|
+
}, zo = {
|
|
9252
|
+
emerald: "var(--sf-kpi-accent-emerald)",
|
|
9253
|
+
blue: "var(--sf-kpi-accent-blue)",
|
|
9254
|
+
amber: "var(--sf-kpi-accent-amber)",
|
|
9255
|
+
red: "var(--sf-kpi-accent-red)",
|
|
9256
|
+
teal: "var(--sf-kpi-accent-teal)",
|
|
9257
|
+
slate: "var(--sf-kpi-accent-slate)"
|
|
9258
|
+
}, Bo = (e) => `${e > 0 ? "+" : ""}${e}%`, Vo = (e, t) => !Number.isFinite(e) || !Number.isFinite(t) || t <= 0 ? null : Math.min(100, Math.max(0, e / t * 100)), Ho = ({ label: e, value: t, sublabel: n, icon: r, iconClassName: i, trend: a, trendLabel: o, accentTone: s, progress: c, className: l, onClick: u }) => {
|
|
9259
|
+
let d = a != null, f = d && a >= 0, p = c ? Vo(c.value, c.max) : null, m = c?.label ?? (p === null ? void 0 : `${Math.round(p)}%`);
|
|
9253
9260
|
return /* @__PURE__ */ y("div", {
|
|
9254
|
-
className: (0, X.default)("sf-card p-4", s && "sf-kpi-card", s && Ro[s],
|
|
9255
|
-
onClick:
|
|
9261
|
+
className: (0, X.default)("sf-card p-4", s && "sf-kpi-card", s && Ro[s], u && "sf-card--interactive", l),
|
|
9262
|
+
onClick: u,
|
|
9256
9263
|
onKeyDown: (e) => {
|
|
9257
|
-
|
|
9264
|
+
u && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), u());
|
|
9258
9265
|
},
|
|
9259
|
-
role:
|
|
9260
|
-
tabIndex:
|
|
9266
|
+
role: u ? "button" : void 0,
|
|
9267
|
+
tabIndex: u ? 0 : void 0,
|
|
9261
9268
|
children: [
|
|
9262
9269
|
/* @__PURE__ */ y("div", {
|
|
9263
9270
|
className: "mb-2 flex items-start justify-between gap-2",
|
|
@@ -9271,18 +9278,38 @@ var lr = (e) => {
|
|
|
9271
9278
|
className: "truncate text-sm font-medium sf-card-subtitle",
|
|
9272
9279
|
children: e
|
|
9273
9280
|
})]
|
|
9274
|
-
}),
|
|
9275
|
-
className: (0, X.default)("flex shrink-0 items-center gap-0.5 text-xs font-semibold tabular-nums",
|
|
9281
|
+
}), d && /* @__PURE__ */ y("span", {
|
|
9282
|
+
className: (0, X.default)("flex shrink-0 items-center gap-0.5 text-xs font-semibold tabular-nums", f ? "text-[var(--sf-success)]" : "text-[var(--sf-danger)]"),
|
|
9276
9283
|
children: [/* @__PURE__ */ v("span", {
|
|
9277
9284
|
"aria-hidden": "true",
|
|
9278
|
-
children:
|
|
9279
|
-
}),
|
|
9285
|
+
children: f ? "↑" : "↓"
|
|
9286
|
+
}), Bo(a)]
|
|
9280
9287
|
})]
|
|
9281
9288
|
}),
|
|
9282
9289
|
/* @__PURE__ */ v("p", {
|
|
9283
9290
|
className: "text-2xl font-semibold tabular-nums sf-card-title",
|
|
9284
9291
|
children: typeof t == "number" ? t.toLocaleString("es-PE") : t
|
|
9285
9292
|
}),
|
|
9293
|
+
p !== null && /* @__PURE__ */ y("div", {
|
|
9294
|
+
className: "mt-2 flex items-center gap-2",
|
|
9295
|
+
role: "progressbar",
|
|
9296
|
+
"aria-valuenow": Math.round(p),
|
|
9297
|
+
"aria-valuemin": 0,
|
|
9298
|
+
"aria-valuemax": 100,
|
|
9299
|
+
children: [/* @__PURE__ */ v("div", {
|
|
9300
|
+
className: "h-1.5 min-w-0 flex-1 overflow-hidden rounded-full bg-[var(--sf-border)]",
|
|
9301
|
+
children: /* @__PURE__ */ v("div", {
|
|
9302
|
+
className: "h-full rounded-full transition-[width]",
|
|
9303
|
+
style: {
|
|
9304
|
+
width: `${p}%`,
|
|
9305
|
+
backgroundColor: s ? zo[s] : "var(--sf-kpi-accent-slate)"
|
|
9306
|
+
}
|
|
9307
|
+
})
|
|
9308
|
+
}), m && /* @__PURE__ */ v("span", {
|
|
9309
|
+
className: "shrink-0 text-xs font-semibold tabular-nums sf-card-muted",
|
|
9310
|
+
children: m
|
|
9311
|
+
})]
|
|
9312
|
+
}),
|
|
9286
9313
|
(n || o) && /* @__PURE__ */ y("div", {
|
|
9287
9314
|
className: "mt-1.5 flex items-center justify-between gap-2",
|
|
9288
9315
|
children: [n && /* @__PURE__ */ v("span", {
|
|
@@ -9295,21 +9322,21 @@ var lr = (e) => {
|
|
|
9295
9322
|
})
|
|
9296
9323
|
]
|
|
9297
9324
|
});
|
|
9298
|
-
},
|
|
9325
|
+
}, Uo = {
|
|
9299
9326
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
9300
9327
|
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
9301
9328
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
|
|
9302
9329
|
5: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-5"
|
|
9303
|
-
},
|
|
9304
|
-
className: (0, X.default)("grid gap-4",
|
|
9330
|
+
}, Wo = ({ children: e, cols: t = 4, className: n }) => /* @__PURE__ */ v("div", {
|
|
9331
|
+
className: (0, X.default)("grid gap-4", Uo[t], n),
|
|
9305
9332
|
children: e
|
|
9306
|
-
}),
|
|
9333
|
+
}), Go = {
|
|
9307
9334
|
slate: "sf-metric-row__fill--slate",
|
|
9308
9335
|
emerald: "sf-metric-row__fill--emerald",
|
|
9309
9336
|
amber: "sf-metric-row__fill--amber",
|
|
9310
9337
|
red: "sf-metric-row__fill--red",
|
|
9311
9338
|
blue: "sf-metric-row__fill--blue"
|
|
9312
|
-
},
|
|
9339
|
+
}, Ko = ({ item: e, small: t = !1 }) => {
|
|
9313
9340
|
let n = Math.max(0, Math.min(100, e.value)), r = e.tone ?? "slate";
|
|
9314
9341
|
return /* @__PURE__ */ y("div", {
|
|
9315
9342
|
className: "w-full",
|
|
@@ -9325,7 +9352,7 @@ var lr = (e) => {
|
|
|
9325
9352
|
}), /* @__PURE__ */ v("div", {
|
|
9326
9353
|
className: (0, X.default)("sf-metric-row__track", t && "sf-metric-row__track--sm"),
|
|
9327
9354
|
children: /* @__PURE__ */ v("div", {
|
|
9328
|
-
className: (0, X.default)("sf-metric-row__fill",
|
|
9355
|
+
className: (0, X.default)("sf-metric-row__fill", Go[r]),
|
|
9329
9356
|
style: {
|
|
9330
9357
|
width: `${n}%`,
|
|
9331
9358
|
height: t ? 2 : 4,
|
|
@@ -9334,23 +9361,23 @@ var lr = (e) => {
|
|
|
9334
9361
|
})
|
|
9335
9362
|
})]
|
|
9336
9363
|
});
|
|
9337
|
-
},
|
|
9364
|
+
}, qo = ({ metrics: e, small: t = !1, className: n }) => /* @__PURE__ */ v("div", {
|
|
9338
9365
|
className: (0, X.default)("flex w-full flex-col gap-1.5", n),
|
|
9339
|
-
children: e.map((e, n) => /* @__PURE__ */ v(
|
|
9366
|
+
children: e.map((e, n) => /* @__PURE__ */ v(Ko, {
|
|
9340
9367
|
item: e,
|
|
9341
9368
|
small: t
|
|
9342
9369
|
}, `${e.label}-${n}`))
|
|
9343
|
-
}),
|
|
9370
|
+
}), Jo = {
|
|
9344
9371
|
default: "sf-entity-card--default",
|
|
9345
9372
|
featured: "sf-entity-card--featured",
|
|
9346
9373
|
warning: "sf-entity-card--warning"
|
|
9347
|
-
},
|
|
9374
|
+
}, Yo = {
|
|
9348
9375
|
default: null,
|
|
9349
9376
|
featured: "★",
|
|
9350
9377
|
warning: "!"
|
|
9351
|
-
},
|
|
9378
|
+
}, Xo = (e) => e.split(" ").map((e) => e[0]).join("").slice(0, 2).toUpperCase(), Zo = (e) => e >= 90 ? "sf-entity-score--high" : e >= 70 ? "sf-entity-score--mid" : "sf-entity-score--low", Qo = (e) => (t) => {
|
|
9352
9379
|
e && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), e());
|
|
9353
|
-
},
|
|
9380
|
+
}, $o = ({ photo: e, photoIcon: t, name: n }) => /* @__PURE__ */ v("div", {
|
|
9354
9381
|
className: "sf-entity-photo",
|
|
9355
9382
|
children: e ? /* @__PURE__ */ v("img", {
|
|
9356
9383
|
src: e,
|
|
@@ -9360,18 +9387,18 @@ var lr = (e) => {
|
|
|
9360
9387
|
}) : /* @__PURE__ */ v("span", {
|
|
9361
9388
|
className: "sf-entity-photo__initials",
|
|
9362
9389
|
"aria-hidden": "true",
|
|
9363
|
-
children: t ??
|
|
9390
|
+
children: t ?? Xo(n)
|
|
9364
9391
|
})
|
|
9365
|
-
}),
|
|
9366
|
-
let d =
|
|
9392
|
+
}), es = ({ name: e, subtitle: t, sublabel: n, photo: r, photoIcon: i, status: a = "default", metrics: o = [], actionLabel: s, onAction: c, onClick: l, className: u }) => {
|
|
9393
|
+
let d = Yo[a];
|
|
9367
9394
|
return /* @__PURE__ */ y("div", {
|
|
9368
|
-
className: (0, X.default)("sf-entity-card sf-entity-card--full",
|
|
9395
|
+
className: (0, X.default)("sf-entity-card sf-entity-card--full", Jo[a], l && "sf-entity-card--interactive", u),
|
|
9369
9396
|
onClick: l,
|
|
9370
|
-
onKeyDown:
|
|
9397
|
+
onKeyDown: Qo(l),
|
|
9371
9398
|
role: l ? "button" : void 0,
|
|
9372
9399
|
tabIndex: l ? 0 : void 0,
|
|
9373
9400
|
children: [
|
|
9374
|
-
/* @__PURE__ */ v(
|
|
9401
|
+
/* @__PURE__ */ v($o, {
|
|
9375
9402
|
photo: r,
|
|
9376
9403
|
photoIcon: i,
|
|
9377
9404
|
name: e
|
|
@@ -9398,7 +9425,7 @@ var lr = (e) => {
|
|
|
9398
9425
|
children: n
|
|
9399
9426
|
})
|
|
9400
9427
|
] }),
|
|
9401
|
-
o.length > 0 && /* @__PURE__ */ v(
|
|
9428
|
+
o.length > 0 && /* @__PURE__ */ v(qo, { metrics: o }),
|
|
9402
9429
|
s && /* @__PURE__ */ v($, {
|
|
9403
9430
|
type: "button",
|
|
9404
9431
|
variant: "outline",
|
|
@@ -9413,12 +9440,12 @@ var lr = (e) => {
|
|
|
9413
9440
|
})
|
|
9414
9441
|
]
|
|
9415
9442
|
});
|
|
9416
|
-
},
|
|
9417
|
-
let u =
|
|
9443
|
+
}, ts = ({ name: e, subtitle: t, sublabel: n, photo: r, photoIcon: i, score: a, status: o = "default", metrics: s = [], onClick: c, className: l }) => {
|
|
9444
|
+
let u = Yo[o];
|
|
9418
9445
|
return /* @__PURE__ */ y("div", {
|
|
9419
9446
|
className: (0, X.default)("sf-entity-card sf-entity-card--compact", c && "sf-entity-card--interactive", l),
|
|
9420
9447
|
onClick: c,
|
|
9421
|
-
onKeyDown:
|
|
9448
|
+
onKeyDown: Qo(c),
|
|
9422
9449
|
role: c ? "button" : void 0,
|
|
9423
9450
|
tabIndex: c ? 0 : void 0,
|
|
9424
9451
|
children: [
|
|
@@ -9430,7 +9457,7 @@ var lr = (e) => {
|
|
|
9430
9457
|
className: "h-full w-full object-cover"
|
|
9431
9458
|
}) : /* @__PURE__ */ v("span", {
|
|
9432
9459
|
className: "sf-entity-photo__initials sf-entity-photo__initials--sm",
|
|
9433
|
-
children: i ??
|
|
9460
|
+
children: i ?? Xo(e)
|
|
9434
9461
|
}), u && /* @__PURE__ */ v("span", {
|
|
9435
9462
|
className: "sf-entity-badge sf-entity-badge--inline",
|
|
9436
9463
|
children: u
|
|
@@ -9453,7 +9480,7 @@ var lr = (e) => {
|
|
|
9453
9480
|
}),
|
|
9454
9481
|
s.length > 0 && /* @__PURE__ */ v("div", {
|
|
9455
9482
|
className: "mt-1 flex flex-col gap-0.5",
|
|
9456
|
-
children: s.map((e, t) => /* @__PURE__ */ v(
|
|
9483
|
+
children: s.map((e, t) => /* @__PURE__ */ v(Ko, {
|
|
9457
9484
|
item: e,
|
|
9458
9485
|
small: !0
|
|
9459
9486
|
}, `${e.label}-${t}`))
|
|
@@ -9461,15 +9488,15 @@ var lr = (e) => {
|
|
|
9461
9488
|
]
|
|
9462
9489
|
}),
|
|
9463
9490
|
a !== void 0 && /* @__PURE__ */ v("div", {
|
|
9464
|
-
className: (0, X.default)("sf-entity-score",
|
|
9491
|
+
className: (0, X.default)("sf-entity-score", Zo(a)),
|
|
9465
9492
|
children: a
|
|
9466
9493
|
})
|
|
9467
9494
|
]
|
|
9468
9495
|
});
|
|
9469
|
-
},
|
|
9496
|
+
}, ns = ({ name: e, subtitle: t, sublabel: n, groupIcon: r = "👥", groupIconClassName: i, metrics: a = [], actionLabel: o, onAction: s, onClick: c, className: l }) => /* @__PURE__ */ y("div", {
|
|
9470
9497
|
className: (0, X.default)("sf-entity-card sf-entity-card--group", c && "sf-entity-card--interactive", l),
|
|
9471
9498
|
onClick: c,
|
|
9472
|
-
onKeyDown:
|
|
9499
|
+
onKeyDown: Qo(c),
|
|
9473
9500
|
role: c ? "button" : void 0,
|
|
9474
9501
|
tabIndex: c ? 0 : void 0,
|
|
9475
9502
|
children: [/* @__PURE__ */ v("div", {
|
|
@@ -9490,7 +9517,7 @@ var lr = (e) => {
|
|
|
9490
9517
|
className: "mt-0.5 font-mono text-[11px] sf-card-subtitle",
|
|
9491
9518
|
children: n
|
|
9492
9519
|
}),
|
|
9493
|
-
a.length > 0 && /* @__PURE__ */ v(
|
|
9520
|
+
a.length > 0 && /* @__PURE__ */ v(qo, {
|
|
9494
9521
|
metrics: a,
|
|
9495
9522
|
small: !0,
|
|
9496
9523
|
className: "mt-2"
|
|
@@ -9505,30 +9532,30 @@ var lr = (e) => {
|
|
|
9505
9532
|
})
|
|
9506
9533
|
]
|
|
9507
9534
|
})]
|
|
9508
|
-
}),
|
|
9535
|
+
}), rs = (e) => e.compact ? /* @__PURE__ */ v(ts, { ...e }) : e.variant === "group" ? /* @__PURE__ */ v(ns, { ...e }) : /* @__PURE__ */ v(es, { ...e }), is = {
|
|
9509
9536
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
9510
9537
|
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
9511
9538
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
|
|
9512
9539
|
5: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-5"
|
|
9513
|
-
},
|
|
9514
|
-
className: (0, X.default)("grid gap-3",
|
|
9540
|
+
}, as = ({ children: e, cols: t = 3, className: n }) => /* @__PURE__ */ v("div", {
|
|
9541
|
+
className: (0, X.default)("grid gap-3", is[t], n),
|
|
9515
9542
|
children: e
|
|
9516
|
-
}),
|
|
9543
|
+
}), os = {
|
|
9517
9544
|
alta: "danger",
|
|
9518
9545
|
media: "warning",
|
|
9519
9546
|
baja: "success"
|
|
9520
|
-
},
|
|
9547
|
+
}, ss = {
|
|
9521
9548
|
alto: "Impacto alto",
|
|
9522
9549
|
medio: "Impacto medio",
|
|
9523
9550
|
bajo: "Impacto bajo"
|
|
9524
|
-
},
|
|
9551
|
+
}, cs = ({ title: e, description: t, tags: n = [], priority: r = "media", impact: i = "medio", confidence: a, actionLabel: o, onAction: s, className: c }) => /* @__PURE__ */ y("div", {
|
|
9525
9552
|
className: (0, X.default)("sf-card flex items-start gap-3 p-3", c),
|
|
9526
9553
|
children: [
|
|
9527
9554
|
/* @__PURE__ */ v("div", {
|
|
9528
9555
|
className: "mt-0.5 shrink-0",
|
|
9529
9556
|
children: /* @__PURE__ */ v(ba, {
|
|
9530
9557
|
label: r,
|
|
9531
|
-
variant:
|
|
9558
|
+
variant: os[r],
|
|
9532
9559
|
size: "md"
|
|
9533
9560
|
})
|
|
9534
9561
|
}),
|
|
@@ -9574,7 +9601,7 @@ var lr = (e) => {
|
|
|
9574
9601
|
}),
|
|
9575
9602
|
/* @__PURE__ */ v("span", {
|
|
9576
9603
|
className: "text-[11px] font-medium sf-card-muted",
|
|
9577
|
-
children:
|
|
9604
|
+
children: ss[i]
|
|
9578
9605
|
}),
|
|
9579
9606
|
o && /* @__PURE__ */ y("button", {
|
|
9580
9607
|
type: "button",
|
|
@@ -9585,7 +9612,7 @@ var lr = (e) => {
|
|
|
9585
9612
|
]
|
|
9586
9613
|
})
|
|
9587
9614
|
]
|
|
9588
|
-
}),
|
|
9615
|
+
}), ls = (e) => e.trim().charAt(0).toUpperCase(), us = ({ active: e }) => /* @__PURE__ */ v("svg", {
|
|
9589
9616
|
className: (0, X.default)("sf-module-card__favorite-icon", e ? "sf-module-card__favorite-icon--active" : "sf-module-card__favorite-icon--idle"),
|
|
9590
9617
|
width: 16,
|
|
9591
9618
|
height: 16,
|
|
@@ -9594,7 +9621,7 @@ var lr = (e) => {
|
|
|
9594
9621
|
strokeLinejoin: "round",
|
|
9595
9622
|
"aria-hidden": "true",
|
|
9596
9623
|
children: /* @__PURE__ */ v("path", { d: "M12 3l2.6 5.3 5.9.85-4.25 4.15 1 5.8L12 18.6 6.75 19.05l1-5.8L3.5 9.15l5.9-.85z" })
|
|
9597
|
-
}),
|
|
9624
|
+
}), ds = ({ title: e, subtitle: t, icon: n, logoUrl: r, iconAccent: i, badge: a, isNew: o, favorite: s = !1, onFavoriteToggle: c, onClick: l, variant: u = "tile", density: d = "comfortable", enterAnimation: f = !1, enterAnimationOnce: p = !1, enterDelay: m, className: g, "aria-label": _ }) => {
|
|
9598
9625
|
let [b, x] = h(!1), S = f && (!p || !b), C = {
|
|
9599
9626
|
...i ? { "--sf-module-accent": i } : {},
|
|
9600
9627
|
...S && m != null ? { animationDelay: `${m}s` } : {}
|
|
@@ -9622,7 +9649,7 @@ var lr = (e) => {
|
|
|
9622
9649
|
onClick: (e) => {
|
|
9623
9650
|
e.stopPropagation(), c?.();
|
|
9624
9651
|
},
|
|
9625
|
-
children: /* @__PURE__ */ v(
|
|
9652
|
+
children: /* @__PURE__ */ v(us, { active: s })
|
|
9626
9653
|
}),
|
|
9627
9654
|
/* @__PURE__ */ y("div", {
|
|
9628
9655
|
className: "sf-module-card__icon-shell",
|
|
@@ -9633,7 +9660,7 @@ var lr = (e) => {
|
|
|
9633
9660
|
alt: ""
|
|
9634
9661
|
}) : n || /* @__PURE__ */ v("span", {
|
|
9635
9662
|
className: "sf-module-card__icon-fallback",
|
|
9636
|
-
children:
|
|
9663
|
+
children: ls(e)
|
|
9637
9664
|
})
|
|
9638
9665
|
}), a != null && a > 0 && /* @__PURE__ */ v("span", {
|
|
9639
9666
|
className: "sf-module-card__badge",
|
|
@@ -9663,10 +9690,10 @@ var lr = (e) => {
|
|
|
9663
9690
|
})
|
|
9664
9691
|
]
|
|
9665
9692
|
});
|
|
9666
|
-
},
|
|
9693
|
+
}, fs = ({ children: e, variant: t = "tile", density: n = "comfortable", className: r }) => /* @__PURE__ */ v("div", {
|
|
9667
9694
|
className: (0, X.default)(t === "tile" ? "sf-module-grid" : "sf-module-row-grid", t === "tile" && n === "compact" && "sf-module-grid--compact", t === "tile" && n === "comfortable" && "sf-module-grid--comfortable", r),
|
|
9668
9695
|
children: e
|
|
9669
|
-
}),
|
|
9696
|
+
}), ps = ({ tipo: e, hora: t, cupos: n, apto: r = !1, aptoLabel: i = "Unidad apta", children: a }) => /* @__PURE__ */ y("div", {
|
|
9670
9697
|
className: "sf-tramo-card",
|
|
9671
9698
|
children: [/* @__PURE__ */ y("div", {
|
|
9672
9699
|
className: "sf-tramo-card__header",
|
|
@@ -9706,7 +9733,7 @@ var lr = (e) => {
|
|
|
9706
9733
|
})
|
|
9707
9734
|
})]
|
|
9708
9735
|
})]
|
|
9709
|
-
}),
|
|
9736
|
+
}), ms = ({ value: e, label: t, accent: n = "var(--sf-success)", icon: r, className: i }) => /* @__PURE__ */ y("div", {
|
|
9710
9737
|
className: (0, X.default)("sf-stat-card", i),
|
|
9711
9738
|
style: { "--sf-stat-accent": n },
|
|
9712
9739
|
children: [
|
|
@@ -9727,7 +9754,7 @@ var lr = (e) => {
|
|
|
9727
9754
|
children: t
|
|
9728
9755
|
})
|
|
9729
9756
|
]
|
|
9730
|
-
}),
|
|
9757
|
+
}), hs = [
|
|
9731
9758
|
"Enero",
|
|
9732
9759
|
"Febrero",
|
|
9733
9760
|
"Marzo",
|
|
@@ -9740,7 +9767,7 @@ var lr = (e) => {
|
|
|
9740
9767
|
"Octubre",
|
|
9741
9768
|
"Noviembre",
|
|
9742
9769
|
"Diciembre"
|
|
9743
|
-
],
|
|
9770
|
+
], gs = [
|
|
9744
9771
|
"L",
|
|
9745
9772
|
"M",
|
|
9746
9773
|
"X",
|
|
@@ -9748,26 +9775,26 @@ var lr = (e) => {
|
|
|
9748
9775
|
"V",
|
|
9749
9776
|
"S",
|
|
9750
9777
|
"D"
|
|
9751
|
-
],
|
|
9778
|
+
], _s = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, vs = (e) => {
|
|
9752
9779
|
let [t, n, r] = e.split("-").map(Number);
|
|
9753
9780
|
return new Date(t, n - 1, r);
|
|
9754
|
-
},
|
|
9781
|
+
}, ys = (e, t) => {
|
|
9755
9782
|
let n = (new Date(e, t, 1).getDay() + 6) % 7, r = new Date(e, t + 1, 0).getDate(), i = [];
|
|
9756
9783
|
for (let e = 0; e < n; e += 1) i.push(null);
|
|
9757
9784
|
for (let n = 1; n <= r; n += 1) i.push(new Date(e, t, n));
|
|
9758
9785
|
for (; i.length % 7 != 0;) i.push(null);
|
|
9759
9786
|
return i;
|
|
9760
|
-
},
|
|
9787
|
+
}, bs = {
|
|
9761
9788
|
primary: "sf-calendar__badge--primary",
|
|
9762
9789
|
warning: "sf-calendar__badge--warning",
|
|
9763
9790
|
danger: "sf-calendar__badge--danger",
|
|
9764
9791
|
success: "sf-calendar__badge--success",
|
|
9765
9792
|
neutral: "sf-calendar__badge--neutral"
|
|
9766
|
-
},
|
|
9767
|
-
let n = `${e.getDate()} de ${
|
|
9793
|
+
}, xs = (e, t) => {
|
|
9794
|
+
let n = `${e.getDate()} de ${hs[e.getMonth()]} de ${e.getFullYear()}`;
|
|
9768
9795
|
return !t || t.count <= 0 ? n : `${n}, ${t.count} evento${t.count === 1 ? "" : "s"}`;
|
|
9769
|
-
},
|
|
9770
|
-
let a =
|
|
9796
|
+
}, Ss = ({ value: e, onChange: t, badges: n = [], compact: r = !1, className: i }) => {
|
|
9797
|
+
let a = _s(/* @__PURE__ */ new Date()), o = e ? vs(e) : /* @__PURE__ */ new Date(), [s, c] = h(o.getFullYear()), [l, u] = h(o.getMonth()), d = new Map(n.map((e) => [e.date, e])), f = ys(s, l), p = r ? "h-8" : "h-10";
|
|
9771
9798
|
return /* @__PURE__ */ y("div", {
|
|
9772
9799
|
className: (0, X.default)("sf-calendar", r ? "sf-calendar--compact" : "sf-calendar--default", i),
|
|
9773
9800
|
children: [
|
|
@@ -9786,7 +9813,7 @@ var lr = (e) => {
|
|
|
9786
9813
|
/* @__PURE__ */ y("span", {
|
|
9787
9814
|
className: "sf-calendar__title",
|
|
9788
9815
|
children: [
|
|
9789
|
-
|
|
9816
|
+
hs[l],
|
|
9790
9817
|
" ",
|
|
9791
9818
|
s
|
|
9792
9819
|
]
|
|
@@ -9805,7 +9832,7 @@ var lr = (e) => {
|
|
|
9805
9832
|
/* @__PURE__ */ v("div", {
|
|
9806
9833
|
className: "mb-0.5 grid grid-cols-7",
|
|
9807
9834
|
role: "row",
|
|
9808
|
-
children:
|
|
9835
|
+
children: gs.map((e) => /* @__PURE__ */ v("div", {
|
|
9809
9836
|
className: "sf-calendar__weekday",
|
|
9810
9837
|
role: "columnheader",
|
|
9811
9838
|
"aria-label": e,
|
|
@@ -9815,19 +9842,19 @@ var lr = (e) => {
|
|
|
9815
9842
|
/* @__PURE__ */ v("div", {
|
|
9816
9843
|
className: "grid grid-cols-7 gap-y-0.5",
|
|
9817
9844
|
role: "grid",
|
|
9818
|
-
"aria-label": `Calendario de ${
|
|
9845
|
+
"aria-label": `Calendario de ${hs[l]} ${s}`,
|
|
9819
9846
|
children: f.map((n, r) => {
|
|
9820
9847
|
if (!n) return /* @__PURE__ */ v("div", {
|
|
9821
9848
|
className: p,
|
|
9822
9849
|
role: "gridcell",
|
|
9823
9850
|
"aria-hidden": "true"
|
|
9824
9851
|
}, `empty-${r}`);
|
|
9825
|
-
let i =
|
|
9852
|
+
let i = _s(n), o = i === e, s = i === a, c = d.get(i);
|
|
9826
9853
|
return /* @__PURE__ */ y("button", {
|
|
9827
9854
|
type: "button",
|
|
9828
9855
|
role: "gridcell",
|
|
9829
9856
|
onClick: () => t?.(i),
|
|
9830
|
-
"aria-label":
|
|
9857
|
+
"aria-label": xs(n, c),
|
|
9831
9858
|
"aria-pressed": o,
|
|
9832
9859
|
"aria-current": s ? "date" : void 0,
|
|
9833
9860
|
className: (0, X.default)("sf-calendar__day", p, o && "sf-calendar__day--selected", !o && s && "sf-calendar__day--today", !o && !s && "sf-calendar__day--default"),
|
|
@@ -9835,7 +9862,7 @@ var lr = (e) => {
|
|
|
9835
9862
|
className: "leading-none",
|
|
9836
9863
|
children: n.getDate()
|
|
9837
9864
|
}), c && c.count > 0 && /* @__PURE__ */ v("span", {
|
|
9838
|
-
className: (0, X.default)("sf-calendar__badge", o ? "sf-calendar__badge--on-selected" :
|
|
9865
|
+
className: (0, X.default)("sf-calendar__badge", o ? "sf-calendar__badge--on-selected" : bs[c.variant ?? "primary"]),
|
|
9839
9866
|
children: c.count > 99 ? "99+" : c.count
|
|
9840
9867
|
})]
|
|
9841
9868
|
}, i);
|
|
@@ -9843,39 +9870,39 @@ var lr = (e) => {
|
|
|
9843
9870
|
})
|
|
9844
9871
|
]
|
|
9845
9872
|
});
|
|
9846
|
-
},
|
|
9873
|
+
}, Cs = {
|
|
9847
9874
|
xs: 56,
|
|
9848
9875
|
sm: 80,
|
|
9849
9876
|
md: 110,
|
|
9850
9877
|
lg: 150
|
|
9851
|
-
},
|
|
9878
|
+
}, ws = {
|
|
9852
9879
|
xs: 13,
|
|
9853
9880
|
sm: 18,
|
|
9854
9881
|
md: 24,
|
|
9855
9882
|
lg: 34
|
|
9856
|
-
},
|
|
9883
|
+
}, Ts = {
|
|
9857
9884
|
xs: 8,
|
|
9858
9885
|
sm: 10,
|
|
9859
9886
|
md: 11,
|
|
9860
9887
|
lg: 13
|
|
9861
|
-
},
|
|
9888
|
+
}, Es = {
|
|
9862
9889
|
xs: 7,
|
|
9863
9890
|
sm: 9,
|
|
9864
9891
|
md: 10,
|
|
9865
9892
|
lg: 12
|
|
9866
|
-
},
|
|
9893
|
+
}, Ds = {
|
|
9867
9894
|
xs: 6,
|
|
9868
9895
|
sm: 8,
|
|
9869
9896
|
md: 10,
|
|
9870
9897
|
lg: 13
|
|
9871
|
-
},
|
|
9898
|
+
}, Os = "var(--sf-success)", ks = "var(--sf-warning)", As = "var(--sf-danger)", js = (e, t, n) => {
|
|
9872
9899
|
let { warning: r, critical: i } = n;
|
|
9873
|
-
return t ? e >= i ?
|
|
9874
|
-
},
|
|
9900
|
+
return t ? e >= i ? Os : e >= r ? ks : As : e < r ? Os : e < i ? ks : As;
|
|
9901
|
+
}, Ms = ({ value: e, label: t, sublabel: n, size: r = "md", color: i, thresholds: a = {
|
|
9875
9902
|
warning: 70,
|
|
9876
9903
|
critical: 90
|
|
9877
9904
|
}, inverse: o = !1, showValue: s = !0, strokeWidth: c, className: l }) => {
|
|
9878
|
-
let u = Math.max(0, Math.min(100, e)), d =
|
|
9905
|
+
let u = Math.max(0, Math.min(100, e)), d = Cs[r], f = c ?? Ds[r], p = (d - f) / 2, m = d / 2, h = 2 * Math.PI * p, g = h * (1 - u / 100), _ = i ?? js(u, o, a);
|
|
9879
9906
|
return /* @__PURE__ */ y("div", {
|
|
9880
9907
|
className: (0, X.default)("sf-donut-gauge", l),
|
|
9881
9908
|
children: [
|
|
@@ -9918,9 +9945,9 @@ var lr = (e) => {
|
|
|
9918
9945
|
className: "absolute inset-0 flex items-center justify-center",
|
|
9919
9946
|
children: /* @__PURE__ */ y("span", {
|
|
9920
9947
|
className: "sf-donut-gauge__value",
|
|
9921
|
-
style: { fontSize:
|
|
9948
|
+
style: { fontSize: ws[r] },
|
|
9922
9949
|
children: [u, /* @__PURE__ */ v("span", {
|
|
9923
|
-
style: { fontSize:
|
|
9950
|
+
style: { fontSize: ws[r] * .55 },
|
|
9924
9951
|
children: "%"
|
|
9925
9952
|
})]
|
|
9926
9953
|
})
|
|
@@ -9928,43 +9955,43 @@ var lr = (e) => {
|
|
|
9928
9955
|
}),
|
|
9929
9956
|
t && /* @__PURE__ */ v("span", {
|
|
9930
9957
|
className: "sf-donut-gauge__label",
|
|
9931
|
-
style: { fontSize:
|
|
9958
|
+
style: { fontSize: Ts[r] },
|
|
9932
9959
|
children: t
|
|
9933
9960
|
}),
|
|
9934
9961
|
n && /* @__PURE__ */ v("span", {
|
|
9935
9962
|
className: "sf-donut-gauge__sublabel",
|
|
9936
|
-
style: { fontSize:
|
|
9963
|
+
style: { fontSize: Es[r] },
|
|
9937
9964
|
children: n
|
|
9938
9965
|
})
|
|
9939
9966
|
]
|
|
9940
9967
|
});
|
|
9941
|
-
},
|
|
9968
|
+
}, Ns = ({ gauges: e, size: t = "sm", className: n }) => /* @__PURE__ */ v("div", {
|
|
9942
9969
|
className: (0, X.default)("flex flex-wrap items-start gap-4", n),
|
|
9943
|
-
children: e.map((e, n) => /* @__PURE__ */ v(
|
|
9970
|
+
children: e.map((e, n) => /* @__PURE__ */ v(Ms, {
|
|
9944
9971
|
...e,
|
|
9945
9972
|
size: e.size ?? t
|
|
9946
9973
|
}, n))
|
|
9947
|
-
}),
|
|
9974
|
+
}), Ps = {
|
|
9948
9975
|
success: "sf-event-log__dot--success",
|
|
9949
9976
|
warning: "sf-event-log__dot--warning",
|
|
9950
9977
|
danger: "sf-event-log__dot--danger",
|
|
9951
9978
|
info: "sf-event-log__dot--info",
|
|
9952
9979
|
default: "sf-event-log__dot--default"
|
|
9953
|
-
},
|
|
9980
|
+
}, Fs = {
|
|
9954
9981
|
success: "sf-event-log__icon-wrap--success",
|
|
9955
9982
|
warning: "sf-event-log__icon-wrap--warning",
|
|
9956
9983
|
danger: "sf-event-log__icon-wrap--danger",
|
|
9957
9984
|
info: "sf-event-log__icon-wrap--info",
|
|
9958
9985
|
default: "sf-event-log__icon-wrap--default"
|
|
9959
|
-
},
|
|
9986
|
+
}, Is = {
|
|
9960
9987
|
success: "sf-alert-row-list__meta--success",
|
|
9961
9988
|
warning: "sf-alert-row-list__meta--warning",
|
|
9962
9989
|
danger: "sf-alert-row-list__meta--danger",
|
|
9963
9990
|
info: "sf-alert-row-list__meta--info",
|
|
9964
9991
|
default: "sf-alert-row-list__meta--default"
|
|
9965
|
-
},
|
|
9992
|
+
}, Ls = (e, t) => {
|
|
9966
9993
|
t && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
|
|
9967
|
-
},
|
|
9994
|
+
}, Rs = ({ events: e, title: t, maxHeight: n, compact: r = !1, showTimeline: i = !0, viewAllLabel: a, onViewAll: o, className: s }) => {
|
|
9968
9995
|
let c = r ? "text-[11px]" : "text-xs", l = r ? "text-[10px]" : "text-[11px]", u = r ? "text-[9px]" : "text-[10px]", d = r ? "py-1.5" : "py-2.5";
|
|
9969
9996
|
return /* @__PURE__ */ y("div", {
|
|
9970
9997
|
className: (0, X.default)("sf-event-log", s),
|
|
@@ -10005,11 +10032,11 @@ var lr = (e) => {
|
|
|
10005
10032
|
/* @__PURE__ */ v("div", {
|
|
10006
10033
|
className: "mt-0.5 shrink-0",
|
|
10007
10034
|
children: t.icon ? /* @__PURE__ */ v("div", {
|
|
10008
|
-
className: (0, X.default)("sf-event-log__icon-wrap",
|
|
10035
|
+
className: (0, X.default)("sf-event-log__icon-wrap", Fs[r]),
|
|
10009
10036
|
"aria-hidden": "true",
|
|
10010
10037
|
children: t.icon
|
|
10011
10038
|
}) : /* @__PURE__ */ v("div", {
|
|
10012
|
-
className: (0, X.default)("sf-event-log__dot",
|
|
10039
|
+
className: (0, X.default)("sf-event-log__dot", Ps[r]),
|
|
10013
10040
|
"aria-hidden": "true"
|
|
10014
10041
|
})
|
|
10015
10042
|
}),
|
|
@@ -10043,7 +10070,7 @@ var lr = (e) => {
|
|
|
10043
10070
|
})]
|
|
10044
10071
|
})]
|
|
10045
10072
|
});
|
|
10046
|
-
},
|
|
10073
|
+
}, zs = ({ items: e, maxHeight: t, className: n }) => /* @__PURE__ */ y("div", {
|
|
10047
10074
|
className: (0, X.default)("sf-alert-row-list sf-alert-row-list--divided", n),
|
|
10048
10075
|
style: t ? {
|
|
10049
10076
|
maxHeight: t,
|
|
@@ -10062,10 +10089,10 @@ var lr = (e) => {
|
|
|
10062
10089
|
role: e.onClick ? "button" : "listitem",
|
|
10063
10090
|
tabIndex: e.onClick ? 0 : void 0,
|
|
10064
10091
|
onClick: e.onClick,
|
|
10065
|
-
onKeyDown: (t) =>
|
|
10092
|
+
onKeyDown: (t) => Ls(t, e.onClick),
|
|
10066
10093
|
children: [
|
|
10067
10094
|
/* @__PURE__ */ v("span", {
|
|
10068
|
-
className: (0, X.default)("sf-event-log__dot",
|
|
10095
|
+
className: (0, X.default)("sf-event-log__dot", Ps[n]),
|
|
10069
10096
|
"aria-hidden": "true"
|
|
10070
10097
|
}),
|
|
10071
10098
|
/* @__PURE__ */ y("span", {
|
|
@@ -10076,7 +10103,7 @@ var lr = (e) => {
|
|
|
10076
10103
|
}), e.label]
|
|
10077
10104
|
}),
|
|
10078
10105
|
e.meta && /* @__PURE__ */ v("span", {
|
|
10079
|
-
className: (0, X.default)("sf-alert-row-list__meta",
|
|
10106
|
+
className: (0, X.default)("sf-alert-row-list__meta", Is[n]),
|
|
10080
10107
|
children: e.meta
|
|
10081
10108
|
}),
|
|
10082
10109
|
e.time && /* @__PURE__ */ v("span", {
|
|
@@ -10086,7 +10113,7 @@ var lr = (e) => {
|
|
|
10086
10113
|
]
|
|
10087
10114
|
}, t);
|
|
10088
10115
|
})]
|
|
10089
|
-
}),
|
|
10116
|
+
}), Bs = {
|
|
10090
10117
|
success: {
|
|
10091
10118
|
color: "#1F8A4C",
|
|
10092
10119
|
halo: "#EAF5EE"
|
|
@@ -10107,17 +10134,17 @@ var lr = (e) => {
|
|
|
10107
10134
|
color: "var(--sf-text-subtle, #5C7180)",
|
|
10108
10135
|
halo: "var(--sf-surface-alt, #EEF0F2)"
|
|
10109
10136
|
}
|
|
10110
|
-
},
|
|
10137
|
+
}, Vs = {
|
|
10111
10138
|
display: "flex",
|
|
10112
10139
|
gap: 12,
|
|
10113
10140
|
flexWrap: "wrap"
|
|
10114
|
-
},
|
|
10141
|
+
}, Hs = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
|
|
10115
10142
|
className: (0, X.default)("sf-alert-lane", t),
|
|
10116
|
-
style:
|
|
10143
|
+
style: Vs,
|
|
10117
10144
|
role: "list",
|
|
10118
10145
|
"aria-label": "Alertas",
|
|
10119
10146
|
children: e.map((e, t) => {
|
|
10120
|
-
let n =
|
|
10147
|
+
let n = Bs[e.status ?? "default"], r = e.color ?? n.color, i = e.halo ?? n.halo;
|
|
10121
10148
|
return /* @__PURE__ */ y("div", {
|
|
10122
10149
|
role: "listitem",
|
|
10123
10150
|
style: {
|
|
@@ -10188,26 +10215,26 @@ var lr = (e) => {
|
|
|
10188
10215
|
]
|
|
10189
10216
|
}, e.id ?? t);
|
|
10190
10217
|
})
|
|
10191
|
-
}),
|
|
10218
|
+
}), Us = {
|
|
10192
10219
|
default: "",
|
|
10193
10220
|
accent: "sf-card--accent",
|
|
10194
10221
|
critical: "sf-card--critical",
|
|
10195
10222
|
warning: "sf-card--warning",
|
|
10196
10223
|
success: "sf-card--success"
|
|
10197
|
-
},
|
|
10224
|
+
}, Ws = {
|
|
10198
10225
|
1: "col-span-1",
|
|
10199
10226
|
2: "col-span-1 sm:col-span-2",
|
|
10200
10227
|
3: "col-span-1 sm:col-span-2 lg:col-span-3",
|
|
10201
10228
|
4: "col-span-1 sm:col-span-2 lg:col-span-4"
|
|
10202
|
-
},
|
|
10229
|
+
}, Gs = {
|
|
10203
10230
|
none: "",
|
|
10204
10231
|
sm: "p-3",
|
|
10205
10232
|
md: "p-4",
|
|
10206
10233
|
lg: "p-5"
|
|
10207
|
-
},
|
|
10234
|
+
}, Ks = ({ title: e, subtitle: t, icon: n, headerAction: r, variant: i = "default", span: a = 1, padding: o = "md", className: s, children: c }) => /* @__PURE__ */ y("div", {
|
|
10208
10235
|
role: e ? "region" : void 0,
|
|
10209
10236
|
"aria-label": e,
|
|
10210
|
-
className: (0, X.default)("sf-card flex flex-col overflow-hidden",
|
|
10237
|
+
className: (0, X.default)("sf-card flex flex-col overflow-hidden", Us[i], Ws[a], s),
|
|
10211
10238
|
children: [(e || n || r) && /* @__PURE__ */ y("div", {
|
|
10212
10239
|
className: "sf-card-header",
|
|
10213
10240
|
children: [
|
|
@@ -10232,23 +10259,23 @@ var lr = (e) => {
|
|
|
10232
10259
|
})
|
|
10233
10260
|
]
|
|
10234
10261
|
}), /* @__PURE__ */ v("div", {
|
|
10235
|
-
className: (0, X.default)("flex-1",
|
|
10262
|
+
className: (0, X.default)("flex-1", Gs[o]),
|
|
10236
10263
|
children: c
|
|
10237
10264
|
})]
|
|
10238
|
-
}),
|
|
10265
|
+
}), qs = {
|
|
10239
10266
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
10240
10267
|
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
10241
10268
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
|
|
10242
10269
|
5: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",
|
|
10243
10270
|
6: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6"
|
|
10244
|
-
},
|
|
10271
|
+
}, Js = {
|
|
10245
10272
|
sm: "gap-2",
|
|
10246
10273
|
md: "gap-3",
|
|
10247
10274
|
lg: "gap-5"
|
|
10248
|
-
},
|
|
10249
|
-
className: (0, X.default)("grid",
|
|
10275
|
+
}, Ys = ({ cols: e = 4, gap: t = "md", className: n, children: r }) => /* @__PURE__ */ v("div", {
|
|
10276
|
+
className: (0, X.default)("grid", qs[e], Js[t], n),
|
|
10250
10277
|
children: r
|
|
10251
|
-
}),
|
|
10278
|
+
}), Xs = ({ title: e, subtitle: t, action: n, className: r, children: i }) => /* @__PURE__ */ y("section", {
|
|
10252
10279
|
className: (0, X.default)("flex flex-col gap-3", r),
|
|
10253
10280
|
"aria-label": e,
|
|
10254
10281
|
children: [/* @__PURE__ */ y("div", {
|
|
@@ -10264,13 +10291,13 @@ var lr = (e) => {
|
|
|
10264
10291
|
children: n
|
|
10265
10292
|
})]
|
|
10266
10293
|
}), i]
|
|
10267
|
-
}),
|
|
10294
|
+
}), Zs = {
|
|
10268
10295
|
slate: "sf-stat-tone--slate",
|
|
10269
10296
|
emerald: "sf-stat-tone--emerald",
|
|
10270
10297
|
amber: "sf-stat-tone--amber",
|
|
10271
10298
|
red: "sf-stat-tone--red",
|
|
10272
10299
|
blue: "sf-stat-tone--blue"
|
|
10273
|
-
},
|
|
10300
|
+
}, Qs = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
|
|
10274
10301
|
role: "list",
|
|
10275
10302
|
"aria-label": "Resumen de métricas",
|
|
10276
10303
|
className: (0, X.default)("flex flex-wrap items-center gap-5 border-t border-[var(--sf-border)] bg-[var(--sf-card-bg)] px-4 py-2", t),
|
|
@@ -10279,7 +10306,7 @@ var lr = (e) => {
|
|
|
10279
10306
|
role: "listitem",
|
|
10280
10307
|
children: [
|
|
10281
10308
|
e.tone && /* @__PURE__ */ v("span", {
|
|
10282
|
-
className: (0, X.default)("h-1.5 w-1.5 shrink-0 rounded-full",
|
|
10309
|
+
className: (0, X.default)("h-1.5 w-1.5 shrink-0 rounded-full", Zs[e.tone]),
|
|
10283
10310
|
"aria-hidden": "true"
|
|
10284
10311
|
}),
|
|
10285
10312
|
/* @__PURE__ */ y("span", {
|
|
@@ -10292,7 +10319,7 @@ var lr = (e) => {
|
|
|
10292
10319
|
})
|
|
10293
10320
|
]
|
|
10294
10321
|
}, t))
|
|
10295
|
-
}),
|
|
10322
|
+
}), $s = ({ header: e, sidebar: t, statBar: n, className: r, children: i }) => /* @__PURE__ */ y("div", {
|
|
10296
10323
|
className: "sf-card flex min-h-[480px] flex-col overflow-hidden bg-[var(--sf-page-bg)]",
|
|
10297
10324
|
role: "region",
|
|
10298
10325
|
"aria-label": "Dashboard",
|
|
@@ -10317,15 +10344,15 @@ var lr = (e) => {
|
|
|
10317
10344
|
children: n
|
|
10318
10345
|
})
|
|
10319
10346
|
]
|
|
10320
|
-
}),
|
|
10347
|
+
}), ec = ({ small: e, error: t }) => (0, X.default)("sf-input", "sf-input--otp", e && "sf-input--sm", t && "sf-input--error"), tc = (e, t) => {
|
|
10321
10348
|
let n = qt(String(e ?? ""), t);
|
|
10322
10349
|
return Array.from({ length: t }, (e, t) => n[t] ?? "");
|
|
10323
|
-
},
|
|
10350
|
+
}, nc = ({ form: e, name: t, label: n, info: r, required: i, disabled: a, small: o, className: s, length: c = 6, onChange: l }) => {
|
|
10324
10351
|
let u = b({
|
|
10325
10352
|
name: t,
|
|
10326
10353
|
control: e.control
|
|
10327
|
-
}), d = m([]), [f, p] = h(() =>
|
|
10328
|
-
u.field.value !== g && (_(u.field.value), p(
|
|
10354
|
+
}), d = m([]), [f, p] = h(() => tc(u.field.value, c)), [g, _] = h(u.field.value);
|
|
10355
|
+
u.field.value !== g && (_(u.field.value), p(tc(u.field.value, c)));
|
|
10329
10356
|
let y = String(t), x = u.fieldState.error?.message ? String(u.fieldState.error.message) : void 0, S = (e) => {
|
|
10330
10357
|
p(e);
|
|
10331
10358
|
let t = e.join("");
|
|
@@ -10369,7 +10396,7 @@ var lr = (e) => {
|
|
|
10369
10396
|
onBlur: () => u.field.onBlur(),
|
|
10370
10397
|
onChange: (e) => C(t, e.target.value),
|
|
10371
10398
|
onKeyDown: (e) => w(t, e),
|
|
10372
|
-
className:
|
|
10399
|
+
className: ec({
|
|
10373
10400
|
small: o,
|
|
10374
10401
|
error: !!x,
|
|
10375
10402
|
disabled: a
|
|
@@ -10377,15 +10404,15 @@ var lr = (e) => {
|
|
|
10377
10404
|
}, t))
|
|
10378
10405
|
})
|
|
10379
10406
|
});
|
|
10380
|
-
},
|
|
10407
|
+
}, rc = (e) => {
|
|
10381
10408
|
let [t, n] = e.slice(0, 10).split("-").map(Number), r = new Date(t, n, 0).getDate();
|
|
10382
10409
|
return `${t}-${String(n).padStart(2, "0")}-${String(r).padStart(2, "0")}`;
|
|
10383
|
-
},
|
|
10410
|
+
}, ic = ({ form: e, startName: t, endName: n, startLabel: r = "Desde", endLabel: i = "Hasta", required: a, endRequired: o, small: s, readOnlyEnd: c, adjustEnd: l = "start", onEndAdjusted: u, className: d }) => {
|
|
10384
10411
|
let f = String(e.watch(t) ?? ""), p = (t, r) => {
|
|
10385
10412
|
if (l === "none") return;
|
|
10386
10413
|
let i = t.slice(0, 10), a = r.slice(0, 10);
|
|
10387
10414
|
if (!_n(i) || !_n(a) || a >= i) return;
|
|
10388
|
-
let o = l === "month-end" ?
|
|
10415
|
+
let o = l === "month-end" ? rc(i) : i;
|
|
10389
10416
|
e.setValue(n, o, { shouldValidate: !1 }), u?.(o);
|
|
10390
10417
|
};
|
|
10391
10418
|
return /* @__PURE__ */ y("div", {
|
|
@@ -10410,16 +10437,16 @@ var lr = (e) => {
|
|
|
10410
10437
|
onChange: (n) => p(String(e.getValues(t) ?? ""), n)
|
|
10411
10438
|
})]
|
|
10412
10439
|
});
|
|
10413
|
-
},
|
|
10440
|
+
}, ac = (e) => /* @__PURE__ */ v(Cn, {
|
|
10414
10441
|
...e,
|
|
10415
10442
|
utc: !0
|
|
10416
|
-
}),
|
|
10443
|
+
}), oc = () => ({
|
|
10417
10444
|
start: "",
|
|
10418
10445
|
end: ""
|
|
10419
|
-
}),
|
|
10446
|
+
}), sc = () => ({
|
|
10420
10447
|
start: "",
|
|
10421
10448
|
end: ""
|
|
10422
|
-
}),
|
|
10449
|
+
}), cc = 0, lc = () => (cc += 1, `photo_${Date.now()}_${cc}`), uc = (e, t) => {
|
|
10423
10450
|
if (!t || t === "*") return !0;
|
|
10424
10451
|
let n = t.replace(/\s/g, "").split(","), r = `.${e.name.split(".").pop()?.toLowerCase() ?? ""}`, i = e.type.toLowerCase();
|
|
10425
10452
|
return n.some((e) => {
|
|
@@ -10431,20 +10458,20 @@ var lr = (e) => {
|
|
|
10431
10458
|
}
|
|
10432
10459
|
return i === t;
|
|
10433
10460
|
});
|
|
10434
|
-
},
|
|
10461
|
+
}, dc = (e, t = !1) => new Promise((n) => {
|
|
10435
10462
|
let r = document.createElement("input");
|
|
10436
10463
|
r.type = "file", r.accept = e, r.multiple = t, r.style.display = "none", r.onchange = () => {
|
|
10437
10464
|
n(Array.from(r.files ?? [])), r.remove();
|
|
10438
10465
|
}, document.body.appendChild(r), r.click();
|
|
10439
|
-
}),
|
|
10440
|
-
id:
|
|
10466
|
+
}), fc = (e) => ({
|
|
10467
|
+
id: lc(),
|
|
10441
10468
|
preview: URL.createObjectURL(e),
|
|
10442
10469
|
file: e
|
|
10443
|
-
}),
|
|
10470
|
+
}), pc = (e) => {
|
|
10444
10471
|
URL.revokeObjectURL(e.preview);
|
|
10445
|
-
},
|
|
10446
|
-
e.forEach(
|
|
10447
|
-
},
|
|
10472
|
+
}, mc = (e) => {
|
|
10473
|
+
e.forEach(pc);
|
|
10474
|
+
}, hc = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "object" && !!e && typeof e.id == "string" && typeof e.preview == "string" && e.file instanceof File) : [], gc = (e, t = .92) => new Promise((n, r) => {
|
|
10448
10475
|
let i = URL.createObjectURL(e), a = new Image();
|
|
10449
10476
|
a.onload = () => {
|
|
10450
10477
|
let o = Math.min(a.width, a.height), s = (a.width - o) / 2, c = (a.height - o) / 2, l = document.createElement("canvas");
|
|
@@ -10467,7 +10494,7 @@ var lr = (e) => {
|
|
|
10467
10494
|
}, a.onerror = () => {
|
|
10468
10495
|
URL.revokeObjectURL(i), r(/* @__PURE__ */ Error("Imagen inválida"));
|
|
10469
10496
|
}, a.src = i;
|
|
10470
|
-
}),
|
|
10497
|
+
}), _c = (e) => e.length === 0 ? "Arrastra archivos o haz clic" : e.length === 1 ? e[0].name : `${e.length} archivos seleccionados`, vc = (e) => `${e.name}-${e.lastModified}-${e.size}`, yc = ({ form: e, name: t, label: n, info: r, required: i, accept: a = "*", multiple: o = !1, maxSizeMb: s = 10, dropLabel: c, readOnly: l, disabled: u, small: d, className: f, onChange: p, onUpload: g, onRefresh: _ }) => {
|
|
10471
10498
|
let x = m(null), S = b({
|
|
10472
10499
|
name: t,
|
|
10473
10500
|
control: e.control
|
|
@@ -10476,7 +10503,7 @@ var lr = (e) => {
|
|
|
10476
10503
|
return e ? Array.isArray(e) ? e : [e] : [];
|
|
10477
10504
|
})(), L = async (e) => {
|
|
10478
10505
|
if (g) for (let t of e) {
|
|
10479
|
-
let e =
|
|
10506
|
+
let e = vc(t);
|
|
10480
10507
|
O((t) => new Set(t).add(e)), E((t) => ({
|
|
10481
10508
|
...t,
|
|
10482
10509
|
[e]: 0
|
|
@@ -10501,7 +10528,7 @@ var lr = (e) => {
|
|
|
10501
10528
|
}
|
|
10502
10529
|
}
|
|
10503
10530
|
}, ee = (e) => {
|
|
10504
|
-
let t = s * 1024 * 1024, n = e.filter((e) => e.size <= t &&
|
|
10531
|
+
let t = s * 1024 * 1024, n = e.filter((e) => e.size <= t && uc(e, a)), r = e.length - n.length;
|
|
10505
10532
|
if (A(r > 0 ? `${r} archivo(s) no cumplen tipo o tamaño máximo.` : null), o) {
|
|
10506
10533
|
let e = [...I, ...n];
|
|
10507
10534
|
S.field.onChange(e), p?.(e), L(n);
|
|
@@ -10555,7 +10582,7 @@ var lr = (e) => {
|
|
|
10555
10582
|
className: (0, X.default)("sf-file-drop", C && "sf-file-drop--dragging", !P && "sf-file-drop--interactive", P && "sf-file-drop--disabled", d ? "sf-file-drop--sm" : "sf-file-drop--md", N && "sf-file-drop--error"),
|
|
10556
10583
|
children: [/* @__PURE__ */ v("span", {
|
|
10557
10584
|
className: "sf-file-drop__title",
|
|
10558
|
-
children: C ? "Suelta aquí" : c ??
|
|
10585
|
+
children: C ? "Suelta aquí" : c ?? _c(I)
|
|
10559
10586
|
}), /* @__PURE__ */ y("span", {
|
|
10560
10587
|
className: "sf-file-drop__hint",
|
|
10561
10588
|
children: [
|
|
@@ -10570,7 +10597,7 @@ var lr = (e) => {
|
|
|
10570
10597
|
className: "sf-file-list",
|
|
10571
10598
|
"aria-label": "Archivos seleccionados",
|
|
10572
10599
|
children: I.map((e) => {
|
|
10573
|
-
let t =
|
|
10600
|
+
let t = vc(e), n = T[t], r = D.has(t);
|
|
10574
10601
|
return /* @__PURE__ */ y("li", {
|
|
10575
10602
|
className: "sf-file-list__item",
|
|
10576
10603
|
children: [/* @__PURE__ */ y("span", {
|
|
@@ -10599,7 +10626,7 @@ var lr = (e) => {
|
|
|
10599
10626
|
]
|
|
10600
10627
|
})
|
|
10601
10628
|
});
|
|
10602
|
-
},
|
|
10629
|
+
}, bc = ({ form: e, name: t, label: n, info: r, required: i, capture: a, maxSizeMb: o = 5, readOnly: c, disabled: l, small: d, className: f, onChange: g, onRefresh: _ }) => {
|
|
10603
10630
|
let x = m(null), S = b({
|
|
10604
10631
|
name: t,
|
|
10605
10632
|
control: e.control
|
|
@@ -10689,7 +10716,7 @@ var lr = (e) => {
|
|
|
10689
10716
|
]
|
|
10690
10717
|
})
|
|
10691
10718
|
});
|
|
10692
|
-
},
|
|
10719
|
+
}, xc = ({ form: e, name: t, label: n, info: r, required: i, width: a = 400, height: o = 160, readOnly: c, disabled: l, className: d, onChange: f, onRefresh: p }) => {
|
|
10693
10720
|
let g = m(null), _ = m(!1), x = m(null), S = m(void 0), C = b({
|
|
10694
10721
|
name: t,
|
|
10695
10722
|
control: e.control
|
|
@@ -10781,11 +10808,11 @@ var lr = (e) => {
|
|
|
10781
10808
|
})]
|
|
10782
10809
|
})
|
|
10783
10810
|
});
|
|
10784
|
-
},
|
|
10811
|
+
}, Sc = ({ form: e, name: t, label: n, info: r, required: i, max: a = 10, maxSizeMb: o = 5, camera: c = !1, readOnly: l, disabled: d, small: f, className: g, onChange: _, onRefresh: x }) => {
|
|
10785
10812
|
let S = m(null), C = b({
|
|
10786
10813
|
name: t,
|
|
10787
10814
|
control: e.control
|
|
10788
|
-
}), w = String(t), T = C.fieldState.error?.message ? String(C.fieldState.error.message) : void 0, [E, D] = h(null), O = T ?? E ?? void 0, k = l || d, A = p(() =>
|
|
10815
|
+
}), w = String(t), T = C.fieldState.error?.message ? String(C.fieldState.error.message) : void 0, [E, D] = h(null), O = T ?? E ?? void 0, k = l || d, A = p(() => hc(C.field.value), [C.field.value]), j = p(() => !k && A.length < a, [
|
|
10789
10816
|
k,
|
|
10790
10817
|
a,
|
|
10791
10818
|
A.length
|
|
@@ -10793,7 +10820,7 @@ var lr = (e) => {
|
|
|
10793
10820
|
u(() => {
|
|
10794
10821
|
N.current = A;
|
|
10795
10822
|
}, [A]), u(() => () => {
|
|
10796
|
-
for (let e of N.current)
|
|
10823
|
+
for (let e of N.current) pc(e);
|
|
10797
10824
|
}, []);
|
|
10798
10825
|
let P = s((e) => {
|
|
10799
10826
|
C.field.onChange(e), _?.(e);
|
|
@@ -10808,7 +10835,7 @@ var lr = (e) => {
|
|
|
10808
10835
|
D(`Hay imágenes que superan ${o} MB.`);
|
|
10809
10836
|
return;
|
|
10810
10837
|
}
|
|
10811
|
-
let r = a - A.length, i = n.slice(0, r).map((e) =>
|
|
10838
|
+
let r = a - A.length, i = n.slice(0, r).map((e) => fc(e));
|
|
10812
10839
|
if (n.length > r) {
|
|
10813
10840
|
D(`Solo puedes agregar ${r} imagen(es) más.`);
|
|
10814
10841
|
return;
|
|
@@ -10821,7 +10848,7 @@ var lr = (e) => {
|
|
|
10821
10848
|
A
|
|
10822
10849
|
]), I = s((e) => {
|
|
10823
10850
|
let t = A.find((t) => t.id === e);
|
|
10824
|
-
t &&
|
|
10851
|
+
t && pc(t), P(A.filter((t) => t.id !== e));
|
|
10825
10852
|
}, [P, A]);
|
|
10826
10853
|
return /* @__PURE__ */ v(Z, {
|
|
10827
10854
|
id: w,
|
|
@@ -10893,19 +10920,19 @@ var lr = (e) => {
|
|
|
10893
10920
|
]
|
|
10894
10921
|
})
|
|
10895
10922
|
});
|
|
10896
|
-
},
|
|
10923
|
+
}, Cc = (e) => {
|
|
10897
10924
|
switch (e.kind) {
|
|
10898
|
-
case "photo": return /* @__PURE__ */ v(
|
|
10899
|
-
case "multiPhoto": return /* @__PURE__ */ v(
|
|
10900
|
-
case "signature": return /* @__PURE__ */ v(
|
|
10925
|
+
case "photo": return /* @__PURE__ */ v(bc, { ...e });
|
|
10926
|
+
case "multiPhoto": return /* @__PURE__ */ v(Sc, { ...e });
|
|
10927
|
+
case "signature": return /* @__PURE__ */ v(xc, { ...e });
|
|
10901
10928
|
case "file": return /* @__PURE__ */ v(On, { ...e });
|
|
10902
10929
|
default: return null;
|
|
10903
10930
|
}
|
|
10904
|
-
},
|
|
10931
|
+
}, wc = (e) => new Promise((t, n) => {
|
|
10905
10932
|
let r = new Image();
|
|
10906
10933
|
r.addEventListener("load", () => t(r)), r.addEventListener("error", () => n(/* @__PURE__ */ Error("No se pudo cargar la imagen"))), r.setAttribute("crossOrigin", "anonymous"), r.src = e;
|
|
10907
|
-
}),
|
|
10908
|
-
let i = await
|
|
10934
|
+
}), Tc = async (e, t, n, r = "image/jpeg") => {
|
|
10935
|
+
let i = await wc(e), a = document.createElement("canvas");
|
|
10909
10936
|
a.width = t.width, a.height = t.height;
|
|
10910
10937
|
let o = a.getContext("2d");
|
|
10911
10938
|
if (!o) throw Error("Canvas no disponible");
|
|
@@ -10918,7 +10945,7 @@ var lr = (e) => {
|
|
|
10918
10945
|
e(new File([i], n, { type: r }));
|
|
10919
10946
|
}, r, .92);
|
|
10920
10947
|
});
|
|
10921
|
-
},
|
|
10948
|
+
}, Ec = ({ imageUrl: e, fileName: t, aspect: n = 1, onCancel: r, onConfirm: i, className: a }) => {
|
|
10922
10949
|
let [o, c] = h({
|
|
10923
10950
|
x: 0,
|
|
10924
10951
|
y: 0
|
|
@@ -10929,7 +10956,7 @@ var lr = (e) => {
|
|
|
10929
10956
|
m(!0);
|
|
10930
10957
|
try {
|
|
10931
10958
|
let n = t.toLowerCase().endsWith(".png") ? "image/png" : "image/jpeg";
|
|
10932
|
-
i(await
|
|
10959
|
+
i(await Tc(e, d, t, n));
|
|
10933
10960
|
} finally {
|
|
10934
10961
|
m(!1);
|
|
10935
10962
|
}
|
|
@@ -10940,7 +10967,7 @@ var lr = (e) => {
|
|
|
10940
10967
|
children: [
|
|
10941
10968
|
/* @__PURE__ */ v("div", {
|
|
10942
10969
|
className: "sf-photo-crop-editor__stage",
|
|
10943
|
-
children: /* @__PURE__ */ v(
|
|
10970
|
+
children: /* @__PURE__ */ v(oe, {
|
|
10944
10971
|
image: e,
|
|
10945
10972
|
crop: o,
|
|
10946
10973
|
zoom: l,
|
|
@@ -10980,7 +11007,7 @@ var lr = (e) => {
|
|
|
10980
11007
|
})
|
|
10981
11008
|
]
|
|
10982
11009
|
});
|
|
10983
|
-
},
|
|
11010
|
+
}, Dc = ({ form: e, name: t, label: n, info: r, required: i, maxSizeMb: a = 5, interactive: o = !0, aspect: c = 1, readOnly: l, disabled: d, small: f, className: g, onChange: _, onRefresh: x }) => {
|
|
10984
11011
|
let S = m(null), C = b({
|
|
10985
11012
|
name: t,
|
|
10986
11013
|
control: e.control
|
|
@@ -11009,7 +11036,7 @@ var lr = (e) => {
|
|
|
11009
11036
|
}
|
|
11010
11037
|
T(!0);
|
|
11011
11038
|
try {
|
|
11012
|
-
let t = await
|
|
11039
|
+
let t = await gc(e);
|
|
11013
11040
|
I(t);
|
|
11014
11041
|
} finally {
|
|
11015
11042
|
T(!1);
|
|
@@ -11101,7 +11128,7 @@ var lr = (e) => {
|
|
|
11101
11128
|
role: "dialog",
|
|
11102
11129
|
"aria-modal": "true",
|
|
11103
11130
|
"aria-label": "Editor de recorte",
|
|
11104
|
-
children: /* @__PURE__ */ v(
|
|
11131
|
+
children: /* @__PURE__ */ v(Ec, {
|
|
11105
11132
|
imageUrl: E.url,
|
|
11106
11133
|
fileName: E.fileName,
|
|
11107
11134
|
aspect: c,
|
|
@@ -11113,7 +11140,7 @@ var lr = (e) => {
|
|
|
11113
11140
|
})]
|
|
11114
11141
|
})]
|
|
11115
11142
|
});
|
|
11116
|
-
},
|
|
11143
|
+
}, Oc = () => [], kc = ({ title: e, description: t, className: n, children: r }) => /* @__PURE__ */ y("section", {
|
|
11117
11144
|
className: (0, X.default)("sf-neutral-map-frame", n),
|
|
11118
11145
|
children: [(e || t) && /* @__PURE__ */ y("div", {
|
|
11119
11146
|
className: "sf-neutral-map-frame__header",
|
|
@@ -11125,63 +11152,63 @@ var lr = (e) => {
|
|
|
11125
11152
|
children: t
|
|
11126
11153
|
})]
|
|
11127
11154
|
}), r]
|
|
11128
|
-
}),
|
|
11155
|
+
}), Ac = ({ tone: e = "info", children: t }) => /* @__PURE__ */ v("p", {
|
|
11129
11156
|
className: (0, X.default)("sf-neutral-map-status", `sf-neutral-map-status--${e}`),
|
|
11130
11157
|
role: e === "error" ? "alert" : "status",
|
|
11131
11158
|
children: t
|
|
11132
|
-
}),
|
|
11159
|
+
}), jc = "Maps config not found. Wrap your app with <SfProvider maps={...}>.", Mc = {
|
|
11133
11160
|
lat: -12.0464,
|
|
11134
11161
|
lng: -77.0428
|
|
11135
|
-
},
|
|
11162
|
+
}, Nc = 13, Pc = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", Fc = "© <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>", Ic = {
|
|
11136
11163
|
drawing: "basic",
|
|
11137
11164
|
streetView: "none",
|
|
11138
11165
|
clustering: "none",
|
|
11139
11166
|
heatmap: "none"
|
|
11140
|
-
},
|
|
11167
|
+
}, Lc = {
|
|
11141
11168
|
drawing: "basic",
|
|
11142
11169
|
streetView: "interactive",
|
|
11143
11170
|
clustering: "client",
|
|
11144
11171
|
heatmap: "weighted"
|
|
11145
|
-
},
|
|
11172
|
+
}, Rc = "sf-google-maps-script", zc = ({ apiKey: e, language: t = "es", region: n = "PE", libraries: r = [] }) => {
|
|
11146
11173
|
let i = new URLSearchParams({
|
|
11147
11174
|
key: e,
|
|
11148
11175
|
language: t,
|
|
11149
11176
|
region: n
|
|
11150
11177
|
});
|
|
11151
11178
|
return r.length > 0 && i.set("libraries", r.join(",")), `https://maps.googleapis.com/maps/api/js?${i.toString()}`;
|
|
11152
|
-
},
|
|
11179
|
+
}, Bc = (e) => {
|
|
11153
11180
|
let t = window;
|
|
11154
11181
|
return t.google?.maps ? Promise.resolve(t.google) : (t.__sfGoogleMapsPromise ||= new Promise((n, r) => {
|
|
11155
|
-
let i = document.getElementById(
|
|
11182
|
+
let i = document.getElementById(Rc);
|
|
11156
11183
|
if (i) {
|
|
11157
11184
|
i.addEventListener("load", () => n(t.google ?? {})), i.addEventListener("error", () => r(/* @__PURE__ */ Error("No se pudo cargar Google Maps.")));
|
|
11158
11185
|
return;
|
|
11159
11186
|
}
|
|
11160
11187
|
let a = document.createElement("script");
|
|
11161
|
-
a.id =
|
|
11188
|
+
a.id = Rc, a.src = zc(e), a.async = !0, a.defer = !0, a.addEventListener("load", () => n(t.google ?? {})), a.addEventListener("error", () => r(/* @__PURE__ */ Error("No se pudo cargar Google Maps."))), document.head.appendChild(a);
|
|
11162
11189
|
}), t.__sfGoogleMapsPromise);
|
|
11163
|
-
},
|
|
11190
|
+
}, Vc = (e, t = "") => {
|
|
11164
11191
|
let n = e.match(/^var\((--[^,)]+)\)$/);
|
|
11165
11192
|
return !n || typeof document > "u" ? t || e : getComputedStyle(document.documentElement).getPropertyValue(n[1]).trim() || t || e;
|
|
11166
|
-
},
|
|
11193
|
+
}, Hc = (e, t) => ({
|
|
11167
11194
|
map: t,
|
|
11168
11195
|
paths: e.points,
|
|
11169
|
-
strokeColor: e.color ??
|
|
11170
|
-
fillColor: e.fillColor ?? e.color ??
|
|
11196
|
+
strokeColor: e.color ?? Vc("var(--sf-map-area-stroke)"),
|
|
11197
|
+
fillColor: e.fillColor ?? e.color ?? Vc("var(--sf-map-area-fill)"),
|
|
11171
11198
|
fillOpacity: .14,
|
|
11172
11199
|
strokeWeight: 2.5
|
|
11173
|
-
}),
|
|
11200
|
+
}), Uc = (e, t) => ({
|
|
11174
11201
|
map: t,
|
|
11175
11202
|
path: e.points,
|
|
11176
|
-
strokeColor: e.color ??
|
|
11203
|
+
strokeColor: e.color ?? Vc("var(--sf-map-route-stroke)"),
|
|
11177
11204
|
strokeWeight: 3.5
|
|
11178
|
-
}),
|
|
11205
|
+
}), Wc = (e, t, n) => ({
|
|
11179
11206
|
map: t,
|
|
11180
11207
|
position: e.position,
|
|
11181
11208
|
title: e.title ?? e.label,
|
|
11182
11209
|
label: e.label ? e.label.slice(0, 1).toUpperCase() : void 0,
|
|
11183
11210
|
draggable: !n && e.options?.draggable
|
|
11184
|
-
}),
|
|
11211
|
+
}), Gc = ({ config: e, center: t = Mc, zoom: n = 13, markers: r = [], routes: i = [], areas: a = [], height: o = 320, className: s, readOnly: c, onClick: l, onMarkerClick: d, onMarkerDoubleClick: f, onMarkerDrag: p, onMarkerDragEnd: g }) => {
|
|
11185
11212
|
let _ = m(null), y = m(null), b = m(/* @__PURE__ */ new Map()), x = m(/* @__PURE__ */ new Map()), S = m(/* @__PURE__ */ new Map()), C = m({
|
|
11186
11213
|
onMarkerClick: d,
|
|
11187
11214
|
onMarkerDoubleClick: f,
|
|
@@ -11214,9 +11241,9 @@ var lr = (e) => {
|
|
|
11214
11241
|
return;
|
|
11215
11242
|
}
|
|
11216
11243
|
let t = !1;
|
|
11217
|
-
return D("loading"),
|
|
11244
|
+
return D("loading"), Bc(e).then((n) => {
|
|
11218
11245
|
t || !_.current || !n.maps?.Map || (y.current = new n.maps.Map(_.current, {
|
|
11219
|
-
center:
|
|
11246
|
+
center: Mc,
|
|
11220
11247
|
zoom: 13,
|
|
11221
11248
|
mapId: e.mapId,
|
|
11222
11249
|
disableDefaultUI: c
|
|
@@ -11235,7 +11262,7 @@ var lr = (e) => {
|
|
|
11235
11262
|
}, []), u(() => {
|
|
11236
11263
|
if (E !== "ready" || !e?.apiKey || !y.current) return;
|
|
11237
11264
|
let t = !1;
|
|
11238
|
-
return
|
|
11265
|
+
return Bc(e).then((e) => {
|
|
11239
11266
|
if (t || !e.maps?.Marker) return;
|
|
11240
11267
|
let n = new Set(r.map((e) => e.id));
|
|
11241
11268
|
b.current.forEach((e, t) => {
|
|
@@ -11244,10 +11271,10 @@ var lr = (e) => {
|
|
|
11244
11271
|
x.current.set(t.id, t);
|
|
11245
11272
|
let n = b.current.get(t.id);
|
|
11246
11273
|
if (n) {
|
|
11247
|
-
n.marker.setPosition?.(t.position), n.marker.setOptions?.(
|
|
11274
|
+
n.marker.setPosition?.(t.position), n.marker.setOptions?.(Wc(t, y.current, c));
|
|
11248
11275
|
return;
|
|
11249
11276
|
}
|
|
11250
|
-
let r = new e.maps.Marker(
|
|
11277
|
+
let r = new e.maps.Marker(Wc(t, y.current, c)), i = () => x.current.get(t.id) ?? t, a = [
|
|
11251
11278
|
r.addListener?.("click", () => {
|
|
11252
11279
|
C.current.onMarkerClick?.({ marker: i() });
|
|
11253
11280
|
}),
|
|
@@ -11291,7 +11318,7 @@ var lr = (e) => {
|
|
|
11291
11318
|
]), u(() => {
|
|
11292
11319
|
if (E !== "ready" || !e?.apiKey || !y.current) return;
|
|
11293
11320
|
let t = !1;
|
|
11294
|
-
return
|
|
11321
|
+
return Bc(e).then((e) => {
|
|
11295
11322
|
if (t || !e.maps?.Polyline || !e.maps.Polygon) return;
|
|
11296
11323
|
let n = /* @__PURE__ */ new Set([...a.map((e) => `area:${e.id}`), ...i.map((e) => `route:${e.id}`)]);
|
|
11297
11324
|
S.current.forEach((e, t) => {
|
|
@@ -11299,22 +11326,22 @@ var lr = (e) => {
|
|
|
11299
11326
|
}), a.forEach((t) => {
|
|
11300
11327
|
let n = `area:${t.id}`, r = S.current.get(n);
|
|
11301
11328
|
if (r?.kind === "area") {
|
|
11302
|
-
r.shape.setPaths?.(t.points), r.shape.setOptions?.(
|
|
11329
|
+
r.shape.setPaths?.(t.points), r.shape.setOptions?.(Hc(t, y.current));
|
|
11303
11330
|
return;
|
|
11304
11331
|
}
|
|
11305
11332
|
r?.shape.setMap?.(null), S.current.set(n, {
|
|
11306
11333
|
kind: "area",
|
|
11307
|
-
shape: new e.maps.Polygon(
|
|
11334
|
+
shape: new e.maps.Polygon(Hc(t, y.current))
|
|
11308
11335
|
});
|
|
11309
11336
|
}), i.forEach((t) => {
|
|
11310
11337
|
let n = `route:${t.id}`, r = S.current.get(n);
|
|
11311
11338
|
if (r?.kind === "route") {
|
|
11312
|
-
r.shape.setPath?.(t.points), r.shape.setOptions?.(
|
|
11339
|
+
r.shape.setPath?.(t.points), r.shape.setOptions?.(Uc(t, y.current));
|
|
11313
11340
|
return;
|
|
11314
11341
|
}
|
|
11315
11342
|
r?.shape.setMap?.(null), S.current.set(n, {
|
|
11316
11343
|
kind: "route",
|
|
11317
|
-
shape: new e.maps.Polyline(
|
|
11344
|
+
shape: new e.maps.Polyline(Uc(t, y.current))
|
|
11318
11345
|
});
|
|
11319
11346
|
});
|
|
11320
11347
|
}), () => {
|
|
@@ -11328,7 +11355,7 @@ var lr = (e) => {
|
|
|
11328
11355
|
]), u(() => {
|
|
11329
11356
|
if (E !== "ready" || !e?.apiKey || !y.current || !l || c) return;
|
|
11330
11357
|
let t = !1, n;
|
|
11331
|
-
return
|
|
11358
|
+
return Bc(e).then(() => {
|
|
11332
11359
|
let e = y.current;
|
|
11333
11360
|
t || !e?.addListener || (n = e.addListener("click", (e) => {
|
|
11334
11361
|
e.latLng && l({ location: {
|
|
@@ -11357,25 +11384,25 @@ var lr = (e) => {
|
|
|
11357
11384
|
"aria-busy": E !== "ready" || void 0
|
|
11358
11385
|
})
|
|
11359
11386
|
});
|
|
11360
|
-
},
|
|
11387
|
+
}, Kc = (e) => ({
|
|
11361
11388
|
id: "google",
|
|
11362
|
-
capabilities:
|
|
11363
|
-
createRenderer: () => (t) => /* @__PURE__ */ v(
|
|
11389
|
+
capabilities: Lc,
|
|
11390
|
+
createRenderer: () => (t) => /* @__PURE__ */ v(Gc, {
|
|
11364
11391
|
...t,
|
|
11365
11392
|
config: e
|
|
11366
11393
|
})
|
|
11367
|
-
}),
|
|
11394
|
+
}), qc = (e) => [e.lat, e.lng], Jc = (e) => ae.divIcon({
|
|
11368
11395
|
className: "",
|
|
11369
11396
|
html: `<div class="sf-neutral-map-marker" style="${e ? `--sf-neutral-map-marker-bg:${e};` : ""}"></div>`,
|
|
11370
11397
|
iconSize: [18, 18],
|
|
11371
11398
|
iconAnchor: [9, 9]
|
|
11372
|
-
}),
|
|
11399
|
+
}), Yc = ({ readOnly: e, onClick: t }) => (ie({ click(n) {
|
|
11373
11400
|
e || t?.({ location: {
|
|
11374
11401
|
lat: n.latlng.lat,
|
|
11375
11402
|
lng: n.latlng.lng
|
|
11376
11403
|
} });
|
|
11377
|
-
} }), null),
|
|
11378
|
-
let g = mo(), _ = p(() =>
|
|
11404
|
+
} }), null), Xc = ({ center: e = Mc, zoom: t = 13, markers: n = [], routes: r = [], areas: i = [], height: a = 320, className: o, readOnly: s, tileUrl: c = Pc, attribution: l = Fc, onClick: u, onMarkerClick: d, onMarkerDoubleClick: f, onMarkerDrag: m, onMarkerDragEnd: h }) => {
|
|
11405
|
+
let g = mo(), _ = p(() => qc(e), [e]), b = typeof a == "number" ? { height: `${a}px` } : { height: a };
|
|
11379
11406
|
return g ? /* @__PURE__ */ v("div", {
|
|
11380
11407
|
className: o,
|
|
11381
11408
|
style: b,
|
|
@@ -11386,33 +11413,33 @@ var lr = (e) => {
|
|
|
11386
11413
|
doubleClickZoom: !1,
|
|
11387
11414
|
className: "sf-map-frame",
|
|
11388
11415
|
children: [
|
|
11389
|
-
/* @__PURE__ */ v(
|
|
11416
|
+
/* @__PURE__ */ v(H, {
|
|
11390
11417
|
attribution: l,
|
|
11391
11418
|
url: c
|
|
11392
11419
|
}),
|
|
11393
|
-
/* @__PURE__ */ v(
|
|
11420
|
+
/* @__PURE__ */ v(Yc, {
|
|
11394
11421
|
readOnly: s,
|
|
11395
11422
|
onClick: u
|
|
11396
11423
|
}),
|
|
11397
|
-
i.map((e) => /* @__PURE__ */ v(
|
|
11398
|
-
positions: e.points.map(
|
|
11424
|
+
i.map((e) => /* @__PURE__ */ v(B, {
|
|
11425
|
+
positions: e.points.map(qc),
|
|
11399
11426
|
pathOptions: {
|
|
11400
|
-
color: e.color ??
|
|
11401
|
-
fillColor: e.fillColor ?? e.color ??
|
|
11427
|
+
color: e.color ?? Vc("var(--sf-map-area-stroke)"),
|
|
11428
|
+
fillColor: e.fillColor ?? e.color ?? Vc("var(--sf-map-area-fill)"),
|
|
11402
11429
|
fillOpacity: .14,
|
|
11403
11430
|
weight: 2.5
|
|
11404
11431
|
}
|
|
11405
11432
|
}, e.id)),
|
|
11406
|
-
r.map((e) => /* @__PURE__ */ v(
|
|
11407
|
-
positions: e.points.map(
|
|
11433
|
+
r.map((e) => /* @__PURE__ */ v(V, {
|
|
11434
|
+
positions: e.points.map(qc),
|
|
11408
11435
|
pathOptions: {
|
|
11409
|
-
color: e.color ??
|
|
11436
|
+
color: e.color ?? Vc("var(--sf-map-route-stroke)"),
|
|
11410
11437
|
weight: 3.5
|
|
11411
11438
|
}
|
|
11412
11439
|
}, e.id)),
|
|
11413
11440
|
n.map((e) => /* @__PURE__ */ v(ne, {
|
|
11414
|
-
position:
|
|
11415
|
-
icon:
|
|
11441
|
+
position: qc(e.position),
|
|
11442
|
+
icon: Jc(e.color),
|
|
11416
11443
|
title: e.title ?? e.label,
|
|
11417
11444
|
draggable: !s && e.options?.draggable,
|
|
11418
11445
|
bubblingMouseEvents: !1,
|
|
@@ -11449,18 +11476,18 @@ var lr = (e) => {
|
|
|
11449
11476
|
style: b,
|
|
11450
11477
|
children: "Cargando mapa…"
|
|
11451
11478
|
});
|
|
11452
|
-
},
|
|
11479
|
+
}, Zc = (e) => ({
|
|
11453
11480
|
id: "leaflet",
|
|
11454
|
-
capabilities:
|
|
11455
|
-
createRenderer: () => (t) => /* @__PURE__ */ v(
|
|
11481
|
+
capabilities: Ic,
|
|
11482
|
+
createRenderer: () => (t) => /* @__PURE__ */ v(Xc, {
|
|
11456
11483
|
...t,
|
|
11457
11484
|
tileUrl: e?.tileUrl,
|
|
11458
11485
|
attribution: e?.attribution
|
|
11459
11486
|
})
|
|
11460
|
-
}),
|
|
11461
|
-
let n =
|
|
11462
|
-
return 2 *
|
|
11463
|
-
},
|
|
11487
|
+
}), Qc = 6371e3, $c = (e) => e * Math.PI / 180, el = (e, t) => {
|
|
11488
|
+
let n = $c(t.lat - e.lat), r = $c(t.lng - e.lng), i = $c(e.lat), a = $c(t.lat), o = Math.sin(n / 2) ** 2 + Math.sin(r / 2) ** 2 * Math.cos(i) * Math.cos(a);
|
|
11489
|
+
return 2 * Qc * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o));
|
|
11490
|
+
}, tl = () => ({
|
|
11464
11491
|
id: "basic",
|
|
11465
11492
|
capabilities: {
|
|
11466
11493
|
distance: "point-to-point",
|
|
@@ -11468,12 +11495,12 @@ var lr = (e) => {
|
|
|
11468
11495
|
},
|
|
11469
11496
|
async calculateDistance(e) {
|
|
11470
11497
|
let t = e.origins[0], n = e.destinations[0];
|
|
11471
|
-
return { distanceMeters: t && n ?
|
|
11498
|
+
return { distanceMeters: t && n ? el(t, n) : 0 };
|
|
11472
11499
|
}
|
|
11473
|
-
}),
|
|
11500
|
+
}), nl = (e) => ({
|
|
11474
11501
|
lat: e.lat(),
|
|
11475
11502
|
lng: e.lng()
|
|
11476
|
-
}),
|
|
11503
|
+
}), rl = (e) => {
|
|
11477
11504
|
let t = e.geometry?.location;
|
|
11478
11505
|
if (!t) return null;
|
|
11479
11506
|
let n = e.formatted_address ?? e.place_id ?? "Ubicación Google Maps";
|
|
@@ -11481,45 +11508,45 @@ var lr = (e) => {
|
|
|
11481
11508
|
id: e.place_id ?? n,
|
|
11482
11509
|
label: n,
|
|
11483
11510
|
address: e.formatted_address,
|
|
11484
|
-
location:
|
|
11511
|
+
location: nl(t),
|
|
11485
11512
|
provider: "google",
|
|
11486
11513
|
raw: e
|
|
11487
11514
|
};
|
|
11488
|
-
},
|
|
11515
|
+
}, il = (e) => ({
|
|
11489
11516
|
id: "google",
|
|
11490
11517
|
capabilities: { geocoding: "full" },
|
|
11491
11518
|
async geocode(t) {
|
|
11492
|
-
let n = (await
|
|
11519
|
+
let n = (await Bc(e)).maps?.Geocoder;
|
|
11493
11520
|
return n ? new Promise((e) => {
|
|
11494
11521
|
new n().geocode({ address: t }, (t) => {
|
|
11495
|
-
e((t ?? []).map((e) =>
|
|
11522
|
+
e((t ?? []).map((e) => rl(e)).filter((e) => !!e));
|
|
11496
11523
|
});
|
|
11497
11524
|
}) : [];
|
|
11498
11525
|
},
|
|
11499
11526
|
async reverseGeocode(t) {
|
|
11500
|
-
let n = (await
|
|
11527
|
+
let n = (await Bc(e)).maps?.Geocoder;
|
|
11501
11528
|
return n ? new Promise((e) => {
|
|
11502
11529
|
new n().geocode({ location: t }, (t) => {
|
|
11503
|
-
e(
|
|
11530
|
+
e(rl(t?.[0] ?? {}));
|
|
11504
11531
|
});
|
|
11505
11532
|
}) : null;
|
|
11506
11533
|
}
|
|
11507
|
-
}),
|
|
11534
|
+
}), al = (e) => e.toFixed(6), ol = (e, t, n) => Math.min(Math.max(e, t), n), sl = (e) => ol(e, -90, 90), cl = (e) => ol(e, -180, 180), ll = (e, t = 0) => {
|
|
11508
11535
|
if (typeof e == "number") return Number.isFinite(e) ? e : t;
|
|
11509
11536
|
let n = Number.parseFloat(e.trim().replace(",", "."));
|
|
11510
11537
|
return Number.isFinite(n) ? n : t;
|
|
11511
|
-
},
|
|
11538
|
+
}, ul = (e) => `${al(e.lat)}, ${al(e.lng)}`, dl = (e, t) => {
|
|
11512
11539
|
if (!e || typeof e != "object" || !("lat" in e) || !("lng" in e)) return t;
|
|
11513
|
-
let n =
|
|
11540
|
+
let n = ll(e.lat, t.lat), r = ll(e.lng, t.lng);
|
|
11514
11541
|
return {
|
|
11515
|
-
lat:
|
|
11516
|
-
lng:
|
|
11542
|
+
lat: sl(n),
|
|
11543
|
+
lng: cl(r)
|
|
11517
11544
|
};
|
|
11518
|
-
},
|
|
11545
|
+
}, fl = (e, t = "Ubicación") => ({
|
|
11519
11546
|
id: `${e.lat}:${e.lng}`,
|
|
11520
11547
|
position: e,
|
|
11521
11548
|
label: t
|
|
11522
|
-
}),
|
|
11549
|
+
}), pl = () => ({
|
|
11523
11550
|
id: "nominatim",
|
|
11524
11551
|
capabilities: { geocoding: "basic" },
|
|
11525
11552
|
async geocode(e) {
|
|
@@ -11543,13 +11570,13 @@ var lr = (e) => {
|
|
|
11543
11570
|
provider: "nominatim"
|
|
11544
11571
|
};
|
|
11545
11572
|
}
|
|
11546
|
-
}),
|
|
11573
|
+
}), ml = (e) => ({
|
|
11547
11574
|
id: e.id,
|
|
11548
11575
|
capabilities: { places: e.capabilities.geocoding === "none" ? "none" : "basic" },
|
|
11549
11576
|
searchPlaces(t) {
|
|
11550
11577
|
return e.geocode(t);
|
|
11551
11578
|
}
|
|
11552
|
-
}),
|
|
11579
|
+
}), hl = () => ({
|
|
11553
11580
|
id: "basic",
|
|
11554
11581
|
capabilities: {
|
|
11555
11582
|
routing: "basic",
|
|
@@ -11567,31 +11594,31 @@ var lr = (e) => {
|
|
|
11567
11594
|
]
|
|
11568
11595
|
};
|
|
11569
11596
|
}
|
|
11570
|
-
}),
|
|
11597
|
+
}), gl = i({}), _l = (e) => {
|
|
11571
11598
|
let t = e.services?.geocoding ?? e.defaultEngine, n = e.engines.google;
|
|
11572
|
-
return t === "google" && n ?
|
|
11573
|
-
},
|
|
11574
|
-
let t = e.defaultEngine === "google" ?
|
|
11599
|
+
return t === "google" && n ? il(n) : pl();
|
|
11600
|
+
}, vl = (e) => {
|
|
11601
|
+
let t = e.defaultEngine === "google" ? Kc(e.engines.google) : Zc(e.engines.leaflet), n = _l(e);
|
|
11575
11602
|
return {
|
|
11576
11603
|
config: e,
|
|
11577
11604
|
engine: t,
|
|
11578
11605
|
geocodingService: n,
|
|
11579
|
-
placesService:
|
|
11580
|
-
routingService:
|
|
11581
|
-
distanceService:
|
|
11606
|
+
placesService: ml(n),
|
|
11607
|
+
routingService: hl(),
|
|
11608
|
+
distanceService: tl()
|
|
11582
11609
|
};
|
|
11583
|
-
},
|
|
11584
|
-
let n = p(() => ({ maps: e ?
|
|
11585
|
-
return /* @__PURE__ */ v(
|
|
11610
|
+
}, yl = ({ maps: e, children: t }) => {
|
|
11611
|
+
let n = p(() => ({ maps: e ? vl(e) : void 0 }), [e]);
|
|
11612
|
+
return /* @__PURE__ */ v(gl.Provider, {
|
|
11586
11613
|
value: n,
|
|
11587
11614
|
children: t
|
|
11588
11615
|
});
|
|
11589
|
-
},
|
|
11590
|
-
let e =
|
|
11591
|
-
if (!e.maps) throw Error(
|
|
11616
|
+
}, bl = () => c(gl), xl = () => {
|
|
11617
|
+
let e = bl();
|
|
11618
|
+
if (!e.maps) throw Error(jc);
|
|
11592
11619
|
return e.maps;
|
|
11593
|
-
},
|
|
11594
|
-
let e =
|
|
11620
|
+
}, Sl = () => {
|
|
11621
|
+
let e = xl(), [t, n] = h(!1), [r, i] = h([]), [a, o] = h(null), c = m(0);
|
|
11595
11622
|
return {
|
|
11596
11623
|
loading: t,
|
|
11597
11624
|
results: r,
|
|
@@ -11615,18 +11642,18 @@ var lr = (e) => {
|
|
|
11615
11642
|
}
|
|
11616
11643
|
}, [e.geocodingService])
|
|
11617
11644
|
};
|
|
11618
|
-
},
|
|
11619
|
-
let e =
|
|
11645
|
+
}, Cl = () => {
|
|
11646
|
+
let e = xl();
|
|
11620
11647
|
return p(() => ({
|
|
11621
11648
|
id: e.engine.id,
|
|
11622
11649
|
capabilities: e.engine.capabilities,
|
|
11623
11650
|
renderer: e.engine.createRenderer()
|
|
11624
11651
|
}), [e.engine]);
|
|
11625
|
-
},
|
|
11652
|
+
}, wl = () => xl().config, Tl = (e) => e && typeof e == "object" && "label" in e ? String(e.label ?? "") : "", El = ({ form: e, name: t, label: n, info: r, required: i, placeholder: a = "Buscar dirección", readOnly: o, disabled: s, className: c, onChange: l, onRefresh: u }) => {
|
|
11626
11653
|
let d = b({
|
|
11627
11654
|
name: t,
|
|
11628
11655
|
control: e.control
|
|
11629
|
-
}), { loading: f, results: p, error: m, search: g } =
|
|
11656
|
+
}), { loading: f, results: p, error: m, search: g } = Sl(), [_, x] = h(() => Tl(d.field.value)), S = String(t), C = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, w = o || s, T = (e) => {
|
|
11630
11657
|
d.field.onChange(e), l?.(e);
|
|
11631
11658
|
};
|
|
11632
11659
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -11693,9 +11720,9 @@ var lr = (e) => {
|
|
|
11693
11720
|
]
|
|
11694
11721
|
})
|
|
11695
11722
|
});
|
|
11696
|
-
},
|
|
11697
|
-
let g =
|
|
11698
|
-
return /* @__PURE__ */ v(
|
|
11723
|
+
}, Dl = ({ title: e, description: t, center: n = Mc, zoom: r = 13, markers: i = [], routes: a = [], areas: o = [], height: s = 360, className: c, readOnly: l, onClick: u, onMarkerClick: d, onMarkerDoubleClick: f, onMarkerDrag: m, onMarkerDragEnd: h }) => {
|
|
11724
|
+
let g = Cl(), _ = p(() => g.renderer, [g.renderer]);
|
|
11725
|
+
return /* @__PURE__ */ v(kc, {
|
|
11699
11726
|
title: e,
|
|
11700
11727
|
description: t,
|
|
11701
11728
|
className: c,
|
|
@@ -11714,16 +11741,16 @@ var lr = (e) => {
|
|
|
11714
11741
|
onMarkerDragEnd: h
|
|
11715
11742
|
})
|
|
11716
11743
|
});
|
|
11717
|
-
},
|
|
11744
|
+
}, Ol = ({ form: e, name: t, label: n, info: r, required: i, zoom: a = 13, readOnly: o, disabled: s, className: c, onChange: l, onRefresh: u }) => {
|
|
11718
11745
|
let [d, f] = h(!1), [p, m] = h(null), g = b({
|
|
11719
11746
|
name: t,
|
|
11720
11747
|
control: e.control
|
|
11721
|
-
}), _ = String(t), x = g.fieldState.error?.message ? String(g.fieldState.error.message) : void 0, S = o || s, C =
|
|
11748
|
+
}), _ = String(t), x = g.fieldState.error?.message ? String(g.fieldState.error.message) : void 0, S = o || s, C = dl(g.field.value, Mc), w = (e) => {
|
|
11722
11749
|
g.field.onChange(e), l?.(e);
|
|
11723
11750
|
}, T = (e, t) => {
|
|
11724
11751
|
w({
|
|
11725
11752
|
...C,
|
|
11726
|
-
[e]:
|
|
11753
|
+
[e]: ll(t, C[e])
|
|
11727
11754
|
});
|
|
11728
11755
|
};
|
|
11729
11756
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -11746,7 +11773,7 @@ var lr = (e) => {
|
|
|
11746
11773
|
id: `${_}-lat`,
|
|
11747
11774
|
type: "text",
|
|
11748
11775
|
inputMode: "decimal",
|
|
11749
|
-
value:
|
|
11776
|
+
value: al(C.lat),
|
|
11750
11777
|
readOnly: S,
|
|
11751
11778
|
disabled: s,
|
|
11752
11779
|
"aria-invalid": !!x || void 0,
|
|
@@ -11766,7 +11793,7 @@ var lr = (e) => {
|
|
|
11766
11793
|
id: `${_}-lng`,
|
|
11767
11794
|
type: "text",
|
|
11768
11795
|
inputMode: "decimal",
|
|
11769
|
-
value:
|
|
11796
|
+
value: al(C.lng),
|
|
11770
11797
|
readOnly: S,
|
|
11771
11798
|
disabled: s,
|
|
11772
11799
|
"aria-invalid": !!x || void 0,
|
|
@@ -11785,8 +11812,8 @@ var lr = (e) => {
|
|
|
11785
11812
|
onClick: () => {
|
|
11786
11813
|
!navigator.geolocation || d || S || (f(!0), m(null), navigator.geolocation.getCurrentPosition((e) => {
|
|
11787
11814
|
let t = {
|
|
11788
|
-
lat: Number(
|
|
11789
|
-
lng: Number(
|
|
11815
|
+
lat: Number(al(e.coords.latitude)),
|
|
11816
|
+
lng: Number(al(e.coords.longitude))
|
|
11790
11817
|
};
|
|
11791
11818
|
w(t), m(e.coords.accuracy > 200 ? `Precisión aproximada: ${Math.round(e.coords.accuracy)} m.` : null), f(!1);
|
|
11792
11819
|
}, () => {
|
|
@@ -11807,7 +11834,7 @@ var lr = (e) => {
|
|
|
11807
11834
|
role: "status",
|
|
11808
11835
|
children: p
|
|
11809
11836
|
}),
|
|
11810
|
-
/* @__PURE__ */ v(
|
|
11837
|
+
/* @__PURE__ */ v(Dl, {
|
|
11811
11838
|
center: C,
|
|
11812
11839
|
zoom: a,
|
|
11813
11840
|
height: 220,
|
|
@@ -11819,8 +11846,8 @@ var lr = (e) => {
|
|
|
11819
11846
|
}],
|
|
11820
11847
|
onClick: (e) => {
|
|
11821
11848
|
w({
|
|
11822
|
-
lat: Number(
|
|
11823
|
-
lng: Number(
|
|
11849
|
+
lat: Number(al(e.location.lat)),
|
|
11850
|
+
lng: Number(al(e.location.lng))
|
|
11824
11851
|
}), g.field.onBlur();
|
|
11825
11852
|
}
|
|
11826
11853
|
}),
|
|
@@ -11831,19 +11858,19 @@ var lr = (e) => {
|
|
|
11831
11858
|
]
|
|
11832
11859
|
})
|
|
11833
11860
|
});
|
|
11834
|
-
},
|
|
11861
|
+
}, kl = (e) => /* @__PURE__ */ v(Ol, { ...e }), Al = (e) => Array.isArray(e) ? e.map((e) => dl(e, Mc)) : [], jl = (e) => e.length === 0 ? "Sin puntos" : e.length === 1 ? "1 punto" : `${e.length} puntos`, Ml = "var(--sf-map-area-stroke)", Nl = "var(--sf-map-area-fill)", Pl = "var(--sf-map-route-stroke)", Fl = ({ form: e, name: t, mode: n, label: r, info: i, required: a = !0, zoom: o = 13, readOnly: s, disabled: c, className: l, onChange: u, onRefresh: d }) => {
|
|
11835
11862
|
let f = n === "area" ? 3 : 2, p = `Dibuja al menos ${f} puntos para ${n === "area" ? "un área" : "una ruta"}.`, m = b({
|
|
11836
11863
|
name: t,
|
|
11837
11864
|
control: e.control,
|
|
11838
11865
|
rules: { validate: (e) => {
|
|
11839
|
-
let t =
|
|
11866
|
+
let t = Al(e).length;
|
|
11840
11867
|
return t === 0 && !a ? !0 : t < f ? p : !0;
|
|
11841
11868
|
} }
|
|
11842
|
-
}), h = String(t), g = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, _ = s || c, x =
|
|
11869
|
+
}), h = String(t), g = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, _ = s || c, x = Al(m.field.value), S = x.at(-1) ?? Mc, C = {
|
|
11843
11870
|
id: `${h}-${n}`,
|
|
11844
11871
|
points: x,
|
|
11845
|
-
color: n === "area" ?
|
|
11846
|
-
fillColor: n === "area" ?
|
|
11872
|
+
color: n === "area" ? Ml : Pl,
|
|
11873
|
+
fillColor: n === "area" ? Nl : void 0
|
|
11847
11874
|
}, w = (e) => {
|
|
11848
11875
|
m.field.onChange(e), u?.(e);
|
|
11849
11876
|
}, T = () => w(x.slice(0, -1)), E = () => w([]), D = (e, t, n) => e.map((e, r) => r === t ? n : e), O = (e) => {
|
|
@@ -11876,7 +11903,7 @@ var lr = (e) => {
|
|
|
11876
11903
|
children: "Limpiar"
|
|
11877
11904
|
})]
|
|
11878
11905
|
}),
|
|
11879
|
-
/* @__PURE__ */ v(
|
|
11906
|
+
/* @__PURE__ */ v(Dl, {
|
|
11880
11907
|
center: S,
|
|
11881
11908
|
zoom: o,
|
|
11882
11909
|
height: 260,
|
|
@@ -11885,7 +11912,7 @@ var lr = (e) => {
|
|
|
11885
11912
|
id: `${h}-point-${t}`,
|
|
11886
11913
|
position: e,
|
|
11887
11914
|
label: String(t + 1),
|
|
11888
|
-
color: n === "area" ?
|
|
11915
|
+
color: n === "area" ? Ml : Pl,
|
|
11889
11916
|
options: { draggable: !_ }
|
|
11890
11917
|
})),
|
|
11891
11918
|
areas: n === "area" && x.length >= 3 ? [C] : [],
|
|
@@ -11908,7 +11935,7 @@ var lr = (e) => {
|
|
|
11908
11935
|
className: "sf-map-hint",
|
|
11909
11936
|
"aria-live": "polite",
|
|
11910
11937
|
children: [
|
|
11911
|
-
|
|
11938
|
+
jl(x),
|
|
11912
11939
|
" · Clic para añadir. Arrastra un punto para moverlo. Doble clic para eliminar.",
|
|
11913
11940
|
" ",
|
|
11914
11941
|
/* @__PURE__ */ v("span", {
|
|
@@ -11920,38 +11947,38 @@ var lr = (e) => {
|
|
|
11920
11947
|
]
|
|
11921
11948
|
})
|
|
11922
11949
|
});
|
|
11923
|
-
},
|
|
11950
|
+
}, Il = (e) => /* @__PURE__ */ v(Fl, {
|
|
11924
11951
|
...e,
|
|
11925
11952
|
mode: "area"
|
|
11926
|
-
}),
|
|
11953
|
+
}), Ll = (e) => /* @__PURE__ */ v(Fl, {
|
|
11927
11954
|
...e,
|
|
11928
11955
|
mode: "route"
|
|
11929
|
-
}),
|
|
11956
|
+
}), Rl = (e) => {
|
|
11930
11957
|
switch (e.kind) {
|
|
11931
|
-
case "coordinates": return /* @__PURE__ */ v(
|
|
11932
|
-
case "location": return /* @__PURE__ */ v(
|
|
11933
|
-
case "address": return /* @__PURE__ */ v(
|
|
11934
|
-
case "area": return /* @__PURE__ */ v(
|
|
11935
|
-
case "route": return /* @__PURE__ */ v(
|
|
11958
|
+
case "coordinates": return /* @__PURE__ */ v(kl, { ...e });
|
|
11959
|
+
case "location": return /* @__PURE__ */ v(Ol, { ...e });
|
|
11960
|
+
case "address": return /* @__PURE__ */ v(El, { ...e });
|
|
11961
|
+
case "area": return /* @__PURE__ */ v(Il, { ...e });
|
|
11962
|
+
case "route": return /* @__PURE__ */ v(Ll, { ...e });
|
|
11936
11963
|
default: return null;
|
|
11937
11964
|
}
|
|
11938
|
-
},
|
|
11965
|
+
}, zl = /^#[0-9a-fA-F]{6}$/, Bl = "#".padEnd(7, "0"), Vl = () => {
|
|
11939
11966
|
if (typeof document > "u") return "";
|
|
11940
11967
|
let e = getComputedStyle(document.documentElement).getPropertyValue("--sf-primary").trim();
|
|
11941
|
-
return
|
|
11942
|
-
},
|
|
11968
|
+
return zl.test(e) ? e.toLowerCase() : "";
|
|
11969
|
+
}, Hl = (e, t, n) => Math.min(n, Math.max(t, e)), Ul = (e, t) => t?.formatValue ? t.formatValue(e) : t?.suffix ? `${e} ${t.suffix}` : String(e), Wl = () => [], Gl = (e) => Array.isArray(e) ? e.map((e) => String(e ?? "").trim()).filter(Boolean) : [], Kl = () => [], ql = (e) => Array.isArray(e) ? e.map((e) => {
|
|
11943
11970
|
if (typeof e != "object" || !e) return null;
|
|
11944
11971
|
let t = e;
|
|
11945
11972
|
return {
|
|
11946
11973
|
key: String(t.key ?? ""),
|
|
11947
11974
|
value: String(t.value ?? "")
|
|
11948
11975
|
};
|
|
11949
|
-
}).filter((e) => e != null) : [],
|
|
11976
|
+
}).filter((e) => e != null) : [], Jl = (e = 0, t = 100) => ({
|
|
11950
11977
|
start: e,
|
|
11951
11978
|
end: t
|
|
11952
|
-
}),
|
|
11979
|
+
}), Yl = (e, t = 0, n = 100) => {
|
|
11953
11980
|
if (e && typeof e == "object" && "start" in e && "end" in e) {
|
|
11954
|
-
let r = e, i =
|
|
11981
|
+
let r = e, i = Hl(Number(r.start), t, n), a = Hl(Number(r.end), t, n);
|
|
11955
11982
|
return i <= a ? {
|
|
11956
11983
|
start: i,
|
|
11957
11984
|
end: a
|
|
@@ -11960,15 +11987,15 @@ var lr = (e) => {
|
|
|
11960
11987
|
end: i
|
|
11961
11988
|
};
|
|
11962
11989
|
}
|
|
11963
|
-
return
|
|
11964
|
-
},
|
|
11965
|
-
let n =
|
|
11966
|
-
return
|
|
11967
|
-
},
|
|
11990
|
+
return Jl(t, n);
|
|
11991
|
+
}, Xl = (e, t) => {
|
|
11992
|
+
let n = Vl(), r = String(t ?? (n || Bl)).trim(), i = zl.test(r) ? r.toLowerCase() : Bl, a = String(e ?? i).trim();
|
|
11993
|
+
return zl.test(a) ? a.toLowerCase() : i;
|
|
11994
|
+
}, Zl = (e, t, n) => n <= t ? 0 : Math.round((Hl(e, t, n) - t) / (n - t) * 100), Ql = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), $l = ({ form: e, name: t, label: n, info: r, required: i, min: a = 0, max: o = 100, step: s = 1, suffix: c, readOnly: l, disabled: u, className: d, formatValue: f, onChange: p, onRefresh: m }) => {
|
|
11968
11995
|
let h = b({
|
|
11969
11996
|
name: t,
|
|
11970
11997
|
control: e.control
|
|
11971
|
-
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S =
|
|
11998
|
+
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = Hl(Number(h.field.value ?? a), a, o), C = (e) => {
|
|
11972
11999
|
h.field.onChange(e), p?.(e);
|
|
11973
12000
|
};
|
|
11974
12001
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -11992,17 +12019,17 @@ var lr = (e) => {
|
|
|
11992
12019
|
"aria-invalid": !!_ || void 0,
|
|
11993
12020
|
onBlur: () => h.field.onBlur(),
|
|
11994
12021
|
onChange: (e) => C(Number(e.target.value)),
|
|
11995
|
-
className:
|
|
12022
|
+
className: Ql(x)
|
|
11996
12023
|
}), /* @__PURE__ */ v("span", {
|
|
11997
12024
|
className: "sf-slider__value",
|
|
11998
|
-
children:
|
|
12025
|
+
children: Ul(S, {
|
|
11999
12026
|
suffix: c,
|
|
12000
12027
|
formatValue: f
|
|
12001
12028
|
})
|
|
12002
12029
|
})]
|
|
12003
12030
|
})
|
|
12004
12031
|
});
|
|
12005
|
-
},
|
|
12032
|
+
}, eu = {
|
|
12006
12033
|
slate: {
|
|
12007
12034
|
wrap: "border-slate-300 bg-white",
|
|
12008
12035
|
button: "bg-slate-50 text-slate-600 hover:bg-slate-100",
|
|
@@ -12023,7 +12050,7 @@ var lr = (e) => {
|
|
|
12023
12050
|
button: "bg-blue-50 text-blue-700 hover:bg-blue-100",
|
|
12024
12051
|
value: "text-blue-700"
|
|
12025
12052
|
}
|
|
12026
|
-
},
|
|
12053
|
+
}, tu = {
|
|
12027
12054
|
sm: {
|
|
12028
12055
|
button: "h-6 w-6",
|
|
12029
12056
|
icon: "h-3 w-3",
|
|
@@ -12034,13 +12061,13 @@ var lr = (e) => {
|
|
|
12034
12061
|
icon: "h-3.5 w-3.5",
|
|
12035
12062
|
value: "min-w-[2.5rem] px-1.5 text-sm"
|
|
12036
12063
|
}
|
|
12037
|
-
},
|
|
12064
|
+
}, nu = (e, t) => {
|
|
12038
12065
|
let n = (String(t).split(".")[1] ?? "").length;
|
|
12039
12066
|
return Number(e.toFixed(n));
|
|
12040
|
-
},
|
|
12041
|
-
let f =
|
|
12067
|
+
}, ru = ({ value: e, onChange: t, min: n = 0, max: r = Infinity, step: i = 1, tone: a = "slate", size: o = "md", disabled: s = !1, readOnly: c = !1, ariaLabel: l, formatValue: u, className: d }) => {
|
|
12068
|
+
let f = eu[a], p = tu[o], m = s || c, h = (a) => {
|
|
12042
12069
|
if (m) return;
|
|
12043
|
-
let o = Math.min(r, Math.max(n,
|
|
12070
|
+
let o = Math.min(r, Math.max(n, nu(a, i)));
|
|
12044
12071
|
o !== e && t(o);
|
|
12045
12072
|
}, g = e <= n, _ = e >= r, b = u ? u(e) : String(e), x = (0, X.default)("flex items-center justify-center font-bold leading-none transition-colors disabled:cursor-not-allowed disabled:opacity-40", f.button, p.button);
|
|
12046
12073
|
return /* @__PURE__ */ y("div", {
|
|
@@ -12076,11 +12103,11 @@ var lr = (e) => {
|
|
|
12076
12103
|
})
|
|
12077
12104
|
]
|
|
12078
12105
|
});
|
|
12079
|
-
},
|
|
12106
|
+
}, iu = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), au = ({ form: e, name: t, label: n, info: r, required: i, min: a = 0, max: o = 100, step: s = 1, suffix: c, readOnly: l, disabled: u, className: d, formatValue: f, onChange: p, onRefresh: m }) => {
|
|
12080
12107
|
let h = b({
|
|
12081
12108
|
name: t,
|
|
12082
12109
|
control: e.control
|
|
12083
|
-
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S =
|
|
12110
|
+
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = Yl(h.field.value, a, o), C = (e) => {
|
|
12084
12111
|
h.field.onChange(e), p?.(e);
|
|
12085
12112
|
}, w = {
|
|
12086
12113
|
suffix: c,
|
|
@@ -12098,7 +12125,7 @@ var lr = (e) => {
|
|
|
12098
12125
|
children: [
|
|
12099
12126
|
/* @__PURE__ */ v("span", {
|
|
12100
12127
|
className: "sf-slider__value sf-slider__value--sm",
|
|
12101
|
-
children:
|
|
12128
|
+
children: Ul(S.start, w)
|
|
12102
12129
|
}),
|
|
12103
12130
|
/* @__PURE__ */ y("div", {
|
|
12104
12131
|
className: "grid flex-1 gap-2",
|
|
@@ -12120,7 +12147,7 @@ var lr = (e) => {
|
|
|
12120
12147
|
end: Math.max(t, S.end)
|
|
12121
12148
|
});
|
|
12122
12149
|
},
|
|
12123
|
-
className:
|
|
12150
|
+
className: iu(x)
|
|
12124
12151
|
}), /* @__PURE__ */ v("input", {
|
|
12125
12152
|
id: `${g}-end`,
|
|
12126
12153
|
type: "range",
|
|
@@ -12139,21 +12166,21 @@ var lr = (e) => {
|
|
|
12139
12166
|
end: t
|
|
12140
12167
|
});
|
|
12141
12168
|
},
|
|
12142
|
-
className:
|
|
12169
|
+
className: iu(x)
|
|
12143
12170
|
})]
|
|
12144
12171
|
}),
|
|
12145
12172
|
/* @__PURE__ */ v("span", {
|
|
12146
12173
|
className: "sf-slider__value sf-slider__value--sm",
|
|
12147
|
-
children:
|
|
12174
|
+
children: Ul(S.end, w)
|
|
12148
12175
|
})
|
|
12149
12176
|
]
|
|
12150
12177
|
})
|
|
12151
12178
|
});
|
|
12152
|
-
},
|
|
12179
|
+
}, ou = ({ form: e, name: t, label: n, info: r, required: i, min: a = 0, max: o = 100, suffix: s, className: c, formatValue: l, onRefresh: u }) => {
|
|
12153
12180
|
let d = b({
|
|
12154
12181
|
name: t,
|
|
12155
12182
|
control: e.control
|
|
12156
|
-
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m =
|
|
12183
|
+
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = Hl(Number(d.field.value ?? a), a, o), h = Zl(m, a, o);
|
|
12157
12184
|
return /* @__PURE__ */ v(Z, {
|
|
12158
12185
|
id: f,
|
|
12159
12186
|
label: n,
|
|
@@ -12176,21 +12203,21 @@ var lr = (e) => {
|
|
|
12176
12203
|
})
|
|
12177
12204
|
}), /* @__PURE__ */ v("span", {
|
|
12178
12205
|
className: "sf-progress-bar__value",
|
|
12179
|
-
children:
|
|
12206
|
+
children: Ul(m, {
|
|
12180
12207
|
suffix: s,
|
|
12181
12208
|
formatValue: l
|
|
12182
12209
|
})
|
|
12183
12210
|
})]
|
|
12184
12211
|
})
|
|
12185
12212
|
});
|
|
12186
|
-
},
|
|
12213
|
+
}, su = {
|
|
12187
12214
|
default: "sf-progress-bar-readonly__fill--default",
|
|
12188
12215
|
success: "sf-progress-bar-readonly__fill--success",
|
|
12189
12216
|
warning: "sf-progress-bar-readonly__fill--warning",
|
|
12190
12217
|
danger: "sf-progress-bar-readonly__fill--danger",
|
|
12191
12218
|
info: "sf-progress-bar-readonly__fill--info"
|
|
12192
|
-
},
|
|
12193
|
-
let u =
|
|
12219
|
+
}, cu = ({ value: e, min: t = 0, max: n = 100, label: r, showValue: i = !0, suffix: a, formatValue: o, tone: s = "default", size: c = "md", className: l }) => {
|
|
12220
|
+
let u = Hl(e, t, n), d = Zl(u, t, n), f = Ul(u, {
|
|
12194
12221
|
suffix: a,
|
|
12195
12222
|
formatValue: o
|
|
12196
12223
|
});
|
|
@@ -12204,7 +12231,7 @@ var lr = (e) => {
|
|
|
12204
12231
|
/* @__PURE__ */ v("div", {
|
|
12205
12232
|
className: "sf-progress-bar-readonly__track",
|
|
12206
12233
|
children: /* @__PURE__ */ v("div", {
|
|
12207
|
-
className: (0, X.default)("sf-progress-bar-readonly__fill",
|
|
12234
|
+
className: (0, X.default)("sf-progress-bar-readonly__fill", su[s]),
|
|
12208
12235
|
style: { width: `${d}%` },
|
|
12209
12236
|
role: "progressbar",
|
|
12210
12237
|
"aria-label": r ?? "Progreso",
|
|
@@ -12219,11 +12246,11 @@ var lr = (e) => {
|
|
|
12219
12246
|
})
|
|
12220
12247
|
]
|
|
12221
12248
|
});
|
|
12222
|
-
},
|
|
12249
|
+
}, lu = ({ form: e, name: t, label: n, info: r, required: i, stars: a = 5, readOnly: o, disabled: s, small: c, className: l, onChange: u, onRefresh: d }) => {
|
|
12223
12250
|
let [f, p] = h(0), m = b({
|
|
12224
12251
|
name: t,
|
|
12225
12252
|
control: e.control
|
|
12226
|
-
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, y = o || s, x =
|
|
12253
|
+
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, y = o || s, x = uu(Number(m.field.value ?? 0), a), S = f || x, C = (e) => {
|
|
12227
12254
|
m.field.onChange(e), u?.(e), m.field.onBlur();
|
|
12228
12255
|
}, w = (e, t) => {
|
|
12229
12256
|
if (y) return;
|
|
@@ -12263,12 +12290,12 @@ var lr = (e) => {
|
|
|
12263
12290
|
}, e))
|
|
12264
12291
|
})
|
|
12265
12292
|
});
|
|
12266
|
-
},
|
|
12293
|
+
}, uu = (e, t) => !Number.isFinite(e) || e < 0 ? 0 : Math.min(t, Math.round(e)), du = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
|
|
12267
12294
|
let d = b({
|
|
12268
12295
|
name: t,
|
|
12269
12296
|
control: e.control
|
|
12270
|
-
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h =
|
|
12271
|
-
let t =
|
|
12297
|
+
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = Xl(d.field.value), g = (e) => {
|
|
12298
|
+
let t = Xl(e, h);
|
|
12272
12299
|
d.field.onChange(t), l?.(t);
|
|
12273
12300
|
};
|
|
12274
12301
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -12311,11 +12338,11 @@ var lr = (e) => {
|
|
|
12311
12338
|
})]
|
|
12312
12339
|
})
|
|
12313
12340
|
});
|
|
12314
|
-
},
|
|
12341
|
+
}, fu = ({ form: e, name: t, label: n, info: r, required: i, placeholder: a = "Escribe y presiona Enter", maxItems: o, readOnly: s, disabled: c, className: l, onChange: u, onRefresh: d }) => {
|
|
12315
12342
|
let [f, p] = h(""), m = b({
|
|
12316
12343
|
name: t,
|
|
12317
12344
|
control: e.control
|
|
12318
|
-
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, x = s || c, S =
|
|
12345
|
+
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, x = s || c, S = Gl(m.field.value), C = o != null && S.length >= o, w = (e) => {
|
|
12319
12346
|
m.field.onChange(e), u?.(e);
|
|
12320
12347
|
}, T = () => {
|
|
12321
12348
|
let e = f.trim();
|
|
@@ -12367,11 +12394,11 @@ var lr = (e) => {
|
|
|
12367
12394
|
})]
|
|
12368
12395
|
})
|
|
12369
12396
|
});
|
|
12370
|
-
},
|
|
12397
|
+
}, pu = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
|
|
12371
12398
|
let d = b({
|
|
12372
12399
|
name: t,
|
|
12373
12400
|
control: e.control
|
|
12374
|
-
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h =
|
|
12401
|
+
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = ql(d.field.value), g = (e) => {
|
|
12375
12402
|
d.field.onChange(e), l?.(e);
|
|
12376
12403
|
}, _ = (e, t, n) => {
|
|
12377
12404
|
g(h.map((r, i) => i === e ? {
|
|
@@ -12456,7 +12483,7 @@ var lr = (e) => {
|
|
|
12456
12483
|
})]
|
|
12457
12484
|
})
|
|
12458
12485
|
});
|
|
12459
|
-
},
|
|
12486
|
+
}, mu = ({ items: e, onReorder: t, className: n }) => {
|
|
12460
12487
|
let [r, i] = h(null), a = (n) => (a) => {
|
|
12461
12488
|
if (a.preventDefault(), !r) return;
|
|
12462
12489
|
let o = e.findIndex((e) => e.id === r);
|
|
@@ -12482,7 +12509,7 @@ var lr = (e) => {
|
|
|
12482
12509
|
})]
|
|
12483
12510
|
}, e.id))
|
|
12484
12511
|
});
|
|
12485
|
-
},
|
|
12512
|
+
}, hu = ({ value: e, onChange: t, options: n, name: r = "card-radio-group", className: i, ariaLabel: a = "Opciones" }) => /* @__PURE__ */ v("div", {
|
|
12486
12513
|
className: (0, X.default)("sf-card-radio-group", i),
|
|
12487
12514
|
role: "radiogroup",
|
|
12488
12515
|
"aria-label": a,
|
|
@@ -12519,7 +12546,7 @@ var lr = (e) => {
|
|
|
12519
12546
|
]
|
|
12520
12547
|
}, n.value);
|
|
12521
12548
|
})
|
|
12522
|
-
}),
|
|
12549
|
+
}), gu = {
|
|
12523
12550
|
group: {
|
|
12524
12551
|
label: "Grupo / Entidad",
|
|
12525
12552
|
labelShort: "GRP",
|
|
@@ -12538,7 +12565,7 @@ var lr = (e) => {
|
|
|
12538
12565
|
rowClass: "sf-org-tree-row--role",
|
|
12539
12566
|
barClass: "sf-org-tree-bar--role"
|
|
12540
12567
|
}
|
|
12541
|
-
},
|
|
12568
|
+
}, _u = (e) => {
|
|
12542
12569
|
let t = /* @__PURE__ */ new Map(), n = new Set(e.map((e) => e.id));
|
|
12543
12570
|
for (let n of e) {
|
|
12544
12571
|
let e = n.parentId == null || n.parentId === "" ? null : n.parentId, r = t.get(e) ?? [];
|
|
@@ -12565,16 +12592,16 @@ var lr = (e) => {
|
|
|
12565
12592
|
hasChildren: !1
|
|
12566
12593
|
});
|
|
12567
12594
|
return r;
|
|
12568
|
-
},
|
|
12595
|
+
}, vu = (e, t = gu) => t[e] ?? gu[e] ?? null, yu = (e) => e.length, bu = (e) => {
|
|
12569
12596
|
let t = new Set(e.map((e) => e.id));
|
|
12570
12597
|
return e.filter((e) => {
|
|
12571
12598
|
let n = e.parentId == null || e.parentId === "" ? null : e.parentId;
|
|
12572
12599
|
return n == null || !t.has(n);
|
|
12573
12600
|
});
|
|
12574
|
-
},
|
|
12601
|
+
}, xu = ({ type: e, className: t }) => v(e === "group" ? ut : e === "role" ? Ue : He, {
|
|
12575
12602
|
className: t,
|
|
12576
12603
|
"aria-hidden": "true"
|
|
12577
|
-
}),
|
|
12604
|
+
}), Su = ({ nodes: e, title: t = "Estructura", subtitle: n, loading: r = !1, error: i = null, onRefresh: a, canEdit: o = !1, onAddNode: c, onEditNode: l, onDeleteNode: d, showLegend: f = !1, themes: g = gu, onRenderNode: _, maxHeight: b = 480, className: x }) => {
|
|
12578
12605
|
let [S, C] = h(/* @__PURE__ */ new Set()), [w, T] = h({
|
|
12579
12606
|
visible: !1,
|
|
12580
12607
|
x: 0,
|
|
@@ -12597,7 +12624,7 @@ var lr = (e) => {
|
|
|
12597
12624
|
window.removeEventListener("mousedown", e), window.removeEventListener("keydown", t);
|
|
12598
12625
|
};
|
|
12599
12626
|
}, [w.visible]);
|
|
12600
|
-
let D = p(() =>
|
|
12627
|
+
let D = p(() => _u(e), [e]), O = s((e) => {
|
|
12601
12628
|
let t = e.parentId == null || e.parentId === "" ? null : e.parentId;
|
|
12602
12629
|
for (; t != null;) {
|
|
12603
12630
|
if (S.has(t)) return !0;
|
|
@@ -12684,7 +12711,7 @@ var lr = (e) => {
|
|
|
12684
12711
|
className: "sf-org-tree__empty",
|
|
12685
12712
|
children: "Sin nodos"
|
|
12686
12713
|
}), k.map((e) => {
|
|
12687
|
-
let t =
|
|
12714
|
+
let t = vu(e.type, g);
|
|
12688
12715
|
return /* @__PURE__ */ v("li", {
|
|
12689
12716
|
role: "treeitem",
|
|
12690
12717
|
"aria-level": e.depth + 1,
|
|
@@ -12704,7 +12731,7 @@ var lr = (e) => {
|
|
|
12704
12731
|
tabIndex: e.hasChildren ? 0 : -1,
|
|
12705
12732
|
children: S.has(e.id) ? /* @__PURE__ */ v(Y, { className: "h-4 w-4" }) : /* @__PURE__ */ v(ot, { className: "h-4 w-4" })
|
|
12706
12733
|
}),
|
|
12707
|
-
/* @__PURE__ */ v(
|
|
12734
|
+
/* @__PURE__ */ v(xu, {
|
|
12708
12735
|
type: e.type,
|
|
12709
12736
|
className: "h-4 w-4 shrink-0 opacity-70"
|
|
12710
12737
|
}),
|
|
@@ -12789,7 +12816,7 @@ var lr = (e) => {
|
|
|
12789
12816
|
})
|
|
12790
12817
|
]
|
|
12791
12818
|
});
|
|
12792
|
-
},
|
|
12819
|
+
}, Cu = {
|
|
12793
12820
|
street: {
|
|
12794
12821
|
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
|
12795
12822
|
attribution: "© <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>"
|
|
@@ -12798,27 +12825,27 @@ var lr = (e) => {
|
|
|
12798
12825
|
url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
|
|
12799
12826
|
attribution: "Tiles © Esri — Source: Esri, Maxar, Earthstar Geographics, and the GIS User Community"
|
|
12800
12827
|
}
|
|
12801
|
-
},
|
|
12828
|
+
}, wu = {
|
|
12802
12829
|
default: "Nodo",
|
|
12803
12830
|
nap: "NAP",
|
|
12804
12831
|
olt: "OLT",
|
|
12805
12832
|
splitter: "Splitter"
|
|
12806
|
-
},
|
|
12833
|
+
}, Tu = {
|
|
12807
12834
|
default: "var(--sf-accent)",
|
|
12808
12835
|
nap: "var(--sf-network-kind-nap)",
|
|
12809
12836
|
olt: "var(--sf-network-kind-olt)",
|
|
12810
12837
|
splitter: "var(--sf-network-kind-splitter)"
|
|
12811
|
-
},
|
|
12838
|
+
}, Eu = {
|
|
12812
12839
|
normal: "var(--sf-network-status-normal)",
|
|
12813
12840
|
warning: "var(--sf-network-status-warning)",
|
|
12814
12841
|
critical: "var(--sf-network-status-critical)",
|
|
12815
12842
|
maintenance: "var(--sf-network-status-maintenance)"
|
|
12816
|
-
},
|
|
12843
|
+
}, Du = {
|
|
12817
12844
|
normal: "Normal",
|
|
12818
12845
|
warning: "Advertencia",
|
|
12819
12846
|
critical: "Crítico",
|
|
12820
12847
|
maintenance: "Mantenimiento"
|
|
12821
|
-
},
|
|
12848
|
+
}, Ou = {
|
|
12822
12849
|
backbone: {
|
|
12823
12850
|
color: "var(--sf-network-edge-backbone)",
|
|
12824
12851
|
weight: 2.5
|
|
@@ -12832,7 +12859,7 @@ var lr = (e) => {
|
|
|
12832
12859
|
weight: 1.5,
|
|
12833
12860
|
dashArray: "6 4"
|
|
12834
12861
|
}
|
|
12835
|
-
},
|
|
12862
|
+
}, ku = Vc, Au = (e) => {
|
|
12836
12863
|
if (!Array.isArray(e)) return [];
|
|
12837
12864
|
let t = [];
|
|
12838
12865
|
for (let n of e) {
|
|
@@ -12841,24 +12868,24 @@ var lr = (e) => {
|
|
|
12841
12868
|
if (!r) continue;
|
|
12842
12869
|
let i = Number(e.lat), a = Number(e.lng);
|
|
12843
12870
|
if (!Number.isFinite(i) || !Number.isFinite(a)) continue;
|
|
12844
|
-
let o = String(e.status ?? "normal"), s = o in
|
|
12871
|
+
let o = String(e.status ?? "normal"), s = o in Eu ? o : "normal", c = {
|
|
12845
12872
|
id: r,
|
|
12846
12873
|
label: String(e.label ?? ""),
|
|
12847
12874
|
lat: i,
|
|
12848
12875
|
lng: a,
|
|
12849
12876
|
status: s
|
|
12850
12877
|
}, l = e.kind == null ? r.startsWith("nap:") ? "nap" : "default" : String(e.kind);
|
|
12851
|
-
l in
|
|
12878
|
+
l in wu && (c.kind = l), e.value != null && Number.isFinite(Number(e.value)) && (c.value = Number(e.value)), e.icon != null && (c.icon = String(e.icon)), t.push(c);
|
|
12852
12879
|
}
|
|
12853
12880
|
return t;
|
|
12854
|
-
},
|
|
12881
|
+
}, ju = (e) => {
|
|
12855
12882
|
if (!Array.isArray(e)) return [];
|
|
12856
12883
|
let t = [];
|
|
12857
12884
|
for (let n of e) {
|
|
12858
12885
|
if (typeof n != "object" || !n) continue;
|
|
12859
12886
|
let e = n, r = String(e.from ?? ""), i = String(e.to ?? "");
|
|
12860
12887
|
if (!r || !i) continue;
|
|
12861
|
-
let a = String(e.type ?? "backbone"), o = a in
|
|
12888
|
+
let a = String(e.type ?? "backbone"), o = a in Ou ? a : "backbone";
|
|
12862
12889
|
t.push({
|
|
12863
12890
|
from: r,
|
|
12864
12891
|
to: i,
|
|
@@ -12866,7 +12893,7 @@ var lr = (e) => {
|
|
|
12866
12893
|
});
|
|
12867
12894
|
}
|
|
12868
12895
|
return t;
|
|
12869
|
-
},
|
|
12896
|
+
}, Mu = (e) => {
|
|
12870
12897
|
let t = {
|
|
12871
12898
|
normal: 0,
|
|
12872
12899
|
warning: 0,
|
|
@@ -12875,18 +12902,18 @@ var lr = (e) => {
|
|
|
12875
12902
|
};
|
|
12876
12903
|
for (let n of e) t[n.status] += 1;
|
|
12877
12904
|
return t;
|
|
12878
|
-
},
|
|
12905
|
+
}, Nu = (e) => {
|
|
12879
12906
|
if (e.length === 0) return null;
|
|
12880
12907
|
let t = e.map((e) => e.lat), n = e.map((e) => e.lng);
|
|
12881
12908
|
return [[Math.min(...t), Math.min(...n)], [Math.max(...t), Math.max(...n)]];
|
|
12882
|
-
},
|
|
12909
|
+
}, Pu = (e) => Object.fromEntries(e.map((e) => [e.id, [e.lat, e.lng]])), Fu = (e, t) => e.flatMap((e) => {
|
|
12883
12910
|
let n = t[e.from], r = t[e.to];
|
|
12884
12911
|
return !n || !r ? [] : [{
|
|
12885
12912
|
edge: e,
|
|
12886
12913
|
line: [n, r]
|
|
12887
12914
|
}];
|
|
12888
|
-
}),
|
|
12889
|
-
let i =
|
|
12915
|
+
}), Iu = ({ nodes: e, edges: t = [], placement: n = "bottom-left", className: r }) => {
|
|
12916
|
+
let i = Mu(e), a = Array.from(new Set(t.map((e) => e.type ?? "backbone")));
|
|
12890
12917
|
return /* @__PURE__ */ y("div", {
|
|
12891
12918
|
className: (0, X.default)("sf-network-legend", n === "bottom-right" ? "sf-network-legend--right" : "sf-network-legend--left", r),
|
|
12892
12919
|
role: "region",
|
|
@@ -12898,15 +12925,15 @@ var lr = (e) => {
|
|
|
12898
12925
|
}),
|
|
12899
12926
|
/* @__PURE__ */ v("ul", {
|
|
12900
12927
|
className: "space-y-1",
|
|
12901
|
-
children: Object.keys(
|
|
12928
|
+
children: Object.keys(Du).map((e) => /* @__PURE__ */ y("li", {
|
|
12902
12929
|
className: "sf-network-legend__item",
|
|
12903
12930
|
children: [/* @__PURE__ */ y("span", {
|
|
12904
12931
|
className: "flex items-center gap-2",
|
|
12905
12932
|
children: [/* @__PURE__ */ v("span", {
|
|
12906
12933
|
className: "inline-block h-2.5 w-2.5 rounded-full",
|
|
12907
|
-
style: { background:
|
|
12934
|
+
style: { background: Eu[e] },
|
|
12908
12935
|
"aria-hidden": "true"
|
|
12909
|
-
}),
|
|
12936
|
+
}), Du[e]]
|
|
12910
12937
|
}), /* @__PURE__ */ v("span", {
|
|
12911
12938
|
className: "sf-network-legend__count",
|
|
12912
12939
|
children: i[e]
|
|
@@ -12919,7 +12946,7 @@ var lr = (e) => {
|
|
|
12919
12946
|
}), /* @__PURE__ */ v("ul", {
|
|
12920
12947
|
className: "space-y-1",
|
|
12921
12948
|
children: a.map((e) => {
|
|
12922
|
-
let t =
|
|
12949
|
+
let t = Ou[e ?? "backbone"];
|
|
12923
12950
|
return /* @__PURE__ */ y("li", {
|
|
12924
12951
|
className: "sf-network-legend__item sf-network-legend__item--edge",
|
|
12925
12952
|
children: [/* @__PURE__ */ v("span", {
|
|
@@ -12939,19 +12966,19 @@ var lr = (e) => {
|
|
|
12939
12966
|
})
|
|
12940
12967
|
]
|
|
12941
12968
|
});
|
|
12942
|
-
},
|
|
12943
|
-
let n = e.status, r = e.kind ?? "default", i = r === "nap" ? "NAP" : e.value == null ? e.icon ??
|
|
12944
|
-
return
|
|
12969
|
+
}, Lu = [-12.0464, -77.0428], Ru = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """), zu = (e, t) => {
|
|
12970
|
+
let n = e.status, r = e.kind ?? "default", i = r === "nap" ? "NAP" : e.value == null ? e.icon ?? wu[r].slice(0, 3).toUpperCase() : `${e.value}%`, a = Ru(e.label.length > 40 ? `${e.label.slice(0, 37)}…` : e.label), o = t ? " sf-network-marker--selected" : "";
|
|
12971
|
+
return ae.divIcon({
|
|
12945
12972
|
className: "sf-network-marker-root",
|
|
12946
12973
|
iconAnchor: [24, 42],
|
|
12947
12974
|
iconSize: [48, 48],
|
|
12948
12975
|
html: `<div class="sf-network-marker${o}">
|
|
12949
12976
|
<div class="sf-network-marker__label">${a}</div>
|
|
12950
|
-
<div class="sf-network-marker__dot sf-network-marker__dot--status-${n} sf-network-marker__dot--kind-${r}">${
|
|
12977
|
+
<div class="sf-network-marker__dot sf-network-marker__dot--status-${n} sf-network-marker__dot--kind-${r}">${Ru(String(i))}</div>
|
|
12951
12978
|
</div>`
|
|
12952
12979
|
});
|
|
12953
|
-
},
|
|
12954
|
-
let t =
|
|
12980
|
+
}, Bu = ({ nodes: e }) => {
|
|
12981
|
+
let t = re(), n = Nu(e);
|
|
12955
12982
|
return u(() => {
|
|
12956
12983
|
n && t.fitBounds(n, {
|
|
12957
12984
|
padding: [32, 32],
|
|
@@ -12962,8 +12989,8 @@ var lr = (e) => {
|
|
|
12962
12989
|
t,
|
|
12963
12990
|
e
|
|
12964
12991
|
]), null;
|
|
12965
|
-
},
|
|
12966
|
-
let g = mo(), [_, b] = h("street"), x = l ?? _, S =
|
|
12992
|
+
}, Vu = ({ nodes: e, edges: t = [], center: n = Lu, zoom: r = 12, height: i = 420, selectedNodeId: a, onNodeClick: o, showLegend: s = !0, fitBoundsToNodes: c = !0, basemap: l, onBasemapChange: u, showBasemapSwitcher: d = !1, ariaLabel: f = "Mapa de red", className: m }) => {
|
|
12993
|
+
let g = mo(), [_, b] = h("street"), x = l ?? _, S = Cu[x], C = p(() => Pu(e), [e]), w = p(() => Fu(t, C), [t, C]), T = (e) => {
|
|
12967
12994
|
l === void 0 && b(e), u?.(e);
|
|
12968
12995
|
};
|
|
12969
12996
|
return /* @__PURE__ */ y("div", {
|
|
@@ -12978,17 +13005,17 @@ var lr = (e) => {
|
|
|
12978
13005
|
scrollWheelZoom: !0,
|
|
12979
13006
|
className: "h-full w-full",
|
|
12980
13007
|
children: [
|
|
12981
|
-
/* @__PURE__ */ v(
|
|
13008
|
+
/* @__PURE__ */ v(H, {
|
|
12982
13009
|
attribution: S.attribution,
|
|
12983
13010
|
url: S.url
|
|
12984
13011
|
}),
|
|
12985
|
-
c && e.length > 0 && /* @__PURE__ */ v(
|
|
13012
|
+
c && e.length > 0 && /* @__PURE__ */ v(Bu, { nodes: e }),
|
|
12986
13013
|
w.map(({ edge: e, line: t }) => {
|
|
12987
|
-
let n =
|
|
12988
|
-
return /* @__PURE__ */ v(
|
|
13014
|
+
let n = Ou[e.type ?? "backbone"];
|
|
13015
|
+
return /* @__PURE__ */ v(V, {
|
|
12989
13016
|
positions: t,
|
|
12990
13017
|
pathOptions: {
|
|
12991
|
-
color:
|
|
13018
|
+
color: ku(n.color),
|
|
12992
13019
|
weight: n.weight,
|
|
12993
13020
|
dashArray: n.dashArray
|
|
12994
13021
|
}
|
|
@@ -12996,7 +13023,7 @@ var lr = (e) => {
|
|
|
12996
13023
|
}),
|
|
12997
13024
|
e.map((e) => /* @__PURE__ */ v(ne, {
|
|
12998
13025
|
position: C[e.id],
|
|
12999
|
-
icon:
|
|
13026
|
+
icon: zu(e, e.id === a),
|
|
13000
13027
|
title: e.label,
|
|
13001
13028
|
alt: `${e.label}, estado ${e.status}`,
|
|
13002
13029
|
keyboard: !!o,
|
|
@@ -13020,17 +13047,17 @@ var lr = (e) => {
|
|
|
13020
13047
|
children: e === "street" ? "Mapa" : "Satélite"
|
|
13021
13048
|
}, e))
|
|
13022
13049
|
}),
|
|
13023
|
-
s && e.length > 0 && /* @__PURE__ */ v(
|
|
13050
|
+
s && e.length > 0 && /* @__PURE__ */ v(Iu, {
|
|
13024
13051
|
nodes: e,
|
|
13025
13052
|
edges: t
|
|
13026
13053
|
})
|
|
13027
13054
|
]
|
|
13028
13055
|
});
|
|
13029
|
-
},
|
|
13056
|
+
}, Hu = {
|
|
13030
13057
|
edit: "sf-audit-timeline__icon-wrap--edit",
|
|
13031
13058
|
sync: "sf-audit-timeline__icon-wrap--sync",
|
|
13032
13059
|
create: "sf-audit-timeline__icon-wrap--create"
|
|
13033
|
-
},
|
|
13060
|
+
}, Uu = ({ items: e, sectionTitle: t = "Historial de movimientos", eventCountLabel: n, ariaLabel: r = "Historial de movimientos", emptyMessage: i = "Sin eventos", className: a }) => {
|
|
13034
13061
|
let o = n ?? `${e.length} evento${e.length === 1 ? "" : "s"}`;
|
|
13035
13062
|
return /* @__PURE__ */ y("section", {
|
|
13036
13063
|
className: (0, X.default)("sf-audit-timeline", a),
|
|
@@ -13069,11 +13096,11 @@ var lr = (e) => {
|
|
|
13069
13096
|
/* @__PURE__ */ v("div", {
|
|
13070
13097
|
className: "sf-audit-timeline__marker",
|
|
13071
13098
|
children: t.icon ? /* @__PURE__ */ v("span", {
|
|
13072
|
-
className: (0, X.default)("sf-audit-timeline__icon-wrap",
|
|
13099
|
+
className: (0, X.default)("sf-audit-timeline__icon-wrap", Hu[r]),
|
|
13073
13100
|
"aria-hidden": "true",
|
|
13074
13101
|
children: t.icon
|
|
13075
13102
|
}) : /* @__PURE__ */ v("span", {
|
|
13076
|
-
className: (0, X.default)("sf-audit-timeline__icon-wrap",
|
|
13103
|
+
className: (0, X.default)("sf-audit-timeline__icon-wrap", Hu[r]),
|
|
13077
13104
|
"aria-hidden": "true"
|
|
13078
13105
|
})
|
|
13079
13106
|
}),
|
|
@@ -13109,16 +13136,16 @@ var lr = (e) => {
|
|
|
13109
13136
|
})]
|
|
13110
13137
|
})]
|
|
13111
13138
|
});
|
|
13112
|
-
},
|
|
13139
|
+
}, Wu = {
|
|
13113
13140
|
info: "sf-record-list__icon--info",
|
|
13114
13141
|
warning: "sf-record-list__icon--warning",
|
|
13115
13142
|
success: "sf-record-list__icon--success",
|
|
13116
13143
|
neutral: "sf-record-list__icon--neutral"
|
|
13117
|
-
},
|
|
13144
|
+
}, Gu = ({ icon: e, iconTone: t = "info", title: n, subtitle: r, badge: i, actions: a, className: o }) => /* @__PURE__ */ y("article", {
|
|
13118
13145
|
className: (0, X.default)("sf-record-list__item", o),
|
|
13119
13146
|
children: [
|
|
13120
13147
|
e && /* @__PURE__ */ v("span", {
|
|
13121
|
-
className: (0, X.default)("sf-record-list__icon",
|
|
13148
|
+
className: (0, X.default)("sf-record-list__icon", Wu[t]),
|
|
13122
13149
|
"aria-hidden": "true",
|
|
13123
13150
|
children: e
|
|
13124
13151
|
}),
|
|
@@ -13143,7 +13170,7 @@ var lr = (e) => {
|
|
|
13143
13170
|
children: a
|
|
13144
13171
|
})
|
|
13145
13172
|
]
|
|
13146
|
-
}),
|
|
13173
|
+
}), Ku = ({ title: e, action: t, items: n, className: r, ariaLabel: i }) => /* @__PURE__ */ y("section", {
|
|
13147
13174
|
className: (0, X.default)("sf-record-list", r),
|
|
13148
13175
|
"aria-label": i ?? (typeof e == "string" ? e : void 0),
|
|
13149
13176
|
children: [(e || t) && /* @__PURE__ */ y("div", {
|
|
@@ -13157,9 +13184,9 @@ var lr = (e) => {
|
|
|
13157
13184
|
})]
|
|
13158
13185
|
}), /* @__PURE__ */ v("div", {
|
|
13159
13186
|
className: "sf-record-list__items",
|
|
13160
|
-
children: n.map((e, t) => /* @__PURE__ */ v(
|
|
13187
|
+
children: n.map((e, t) => /* @__PURE__ */ v(Gu, { ...e }, e.id ?? t))
|
|
13161
13188
|
})]
|
|
13162
|
-
}),
|
|
13189
|
+
}), qu = ({ label: e, pulse: t = !0, className: n }) => /* @__PURE__ */ y("span", {
|
|
13163
13190
|
className: (0, X.default)("sf-live-chip", n),
|
|
13164
13191
|
children: [/* @__PURE__ */ v("span", {
|
|
13165
13192
|
className: (0, X.default)("sf-live-chip__dot", t && "sf-live-chip__dot--pulse"),
|
|
@@ -13168,12 +13195,12 @@ var lr = (e) => {
|
|
|
13168
13195
|
className: "sf-live-chip__label",
|
|
13169
13196
|
children: e
|
|
13170
13197
|
})]
|
|
13171
|
-
}),
|
|
13198
|
+
}), Ju = {
|
|
13172
13199
|
default: "var(--sf-text, #1B2A38)",
|
|
13173
13200
|
success: "#1F8A4C",
|
|
13174
13201
|
warning: "#C76A12",
|
|
13175
13202
|
danger: "#C0392B"
|
|
13176
|
-
},
|
|
13203
|
+
}, Yu = {
|
|
13177
13204
|
display: "flex",
|
|
13178
13205
|
alignItems: "center",
|
|
13179
13206
|
justifyContent: "space-between",
|
|
@@ -13184,110 +13211,110 @@ var lr = (e) => {
|
|
|
13184
13211
|
border: "1px solid var(--sf-border, #E2E8EC)",
|
|
13185
13212
|
borderRadius: 13,
|
|
13186
13213
|
boxShadow: "0 1px 3px rgba(12,33,49,.06), 0 1px 2px rgba(12,33,49,.04)"
|
|
13187
|
-
},
|
|
13214
|
+
}, Xu = {
|
|
13188
13215
|
display: "flex",
|
|
13189
13216
|
alignItems: "center",
|
|
13190
13217
|
gap: 14,
|
|
13191
13218
|
flexWrap: "wrap"
|
|
13192
|
-
},
|
|
13219
|
+
}, Zu = {
|
|
13193
13220
|
width: 1,
|
|
13194
13221
|
height: 20,
|
|
13195
13222
|
background: "var(--sf-border, #DCE3E7)"
|
|
13196
|
-
},
|
|
13223
|
+
}, Qu = {
|
|
13197
13224
|
fontSize: 13,
|
|
13198
13225
|
fontWeight: 600,
|
|
13199
13226
|
color: "var(--sf-text-subtle, #8A98A4)"
|
|
13200
|
-
},
|
|
13227
|
+
}, $u = {
|
|
13201
13228
|
fontSize: 15,
|
|
13202
13229
|
fontWeight: 800,
|
|
13203
13230
|
color: "var(--sf-text, #1B2A38)",
|
|
13204
13231
|
fontVariantNumeric: "tabular-nums"
|
|
13205
|
-
},
|
|
13232
|
+
}, ed = {
|
|
13206
13233
|
fontSize: 12.5,
|
|
13207
13234
|
fontWeight: 800,
|
|
13208
13235
|
color: "#C76A12"
|
|
13209
|
-
},
|
|
13236
|
+
}, td = {
|
|
13210
13237
|
fontSize: 13,
|
|
13211
13238
|
fontWeight: 700,
|
|
13212
13239
|
color: "var(--sf-text-subtle, #5C7180)"
|
|
13213
|
-
},
|
|
13240
|
+
}, nd = {
|
|
13214
13241
|
display: "flex",
|
|
13215
13242
|
alignItems: "center",
|
|
13216
13243
|
gap: 22,
|
|
13217
13244
|
margin: 0
|
|
13218
|
-
},
|
|
13245
|
+
}, rd = {
|
|
13219
13246
|
display: "flex",
|
|
13220
13247
|
alignItems: "baseline",
|
|
13221
13248
|
gap: 6
|
|
13222
|
-
},
|
|
13249
|
+
}, id = {
|
|
13223
13250
|
fontSize: 10.5,
|
|
13224
13251
|
fontWeight: 700,
|
|
13225
13252
|
letterSpacing: ".05em",
|
|
13226
13253
|
textTransform: "uppercase",
|
|
13227
13254
|
color: "var(--sf-text-subtle, #8A98A4)"
|
|
13228
|
-
},
|
|
13255
|
+
}, ad = ({ liveLabel: e, metrics: t, nextDeparture: n, className: r, ariaLabel: i = "Estado en vivo" }) => /* @__PURE__ */ y("section", {
|
|
13229
13256
|
className: (0, X.default)("sf-live-status-bar", r),
|
|
13230
13257
|
"aria-label": i,
|
|
13231
|
-
style:
|
|
13258
|
+
style: Yu,
|
|
13232
13259
|
children: [/* @__PURE__ */ y("div", {
|
|
13233
|
-
style:
|
|
13260
|
+
style: Xu,
|
|
13234
13261
|
children: [
|
|
13235
|
-
/* @__PURE__ */ v(
|
|
13262
|
+
/* @__PURE__ */ v(qu, { label: "En vivo" }),
|
|
13236
13263
|
/* @__PURE__ */ v("span", {
|
|
13237
|
-
style:
|
|
13264
|
+
style: td,
|
|
13238
13265
|
children: e
|
|
13239
13266
|
}),
|
|
13240
13267
|
n && /* @__PURE__ */ y(_, { children: [
|
|
13241
13268
|
/* @__PURE__ */ v("span", {
|
|
13242
|
-
style:
|
|
13269
|
+
style: Zu,
|
|
13243
13270
|
"aria-hidden": "true"
|
|
13244
13271
|
}),
|
|
13245
13272
|
/* @__PURE__ */ v("span", {
|
|
13246
|
-
style:
|
|
13273
|
+
style: Qu,
|
|
13247
13274
|
children: n.label ?? "Próxima salida"
|
|
13248
13275
|
}),
|
|
13249
13276
|
/* @__PURE__ */ v("span", {
|
|
13250
|
-
style:
|
|
13277
|
+
style: $u,
|
|
13251
13278
|
children: n.time
|
|
13252
13279
|
}),
|
|
13253
13280
|
n.countdown != null && /* @__PURE__ */ v("span", {
|
|
13254
|
-
style:
|
|
13281
|
+
style: ed,
|
|
13255
13282
|
children: n.countdown
|
|
13256
13283
|
})
|
|
13257
13284
|
] })
|
|
13258
13285
|
]
|
|
13259
13286
|
}), /* @__PURE__ */ v("dl", {
|
|
13260
|
-
style:
|
|
13287
|
+
style: nd,
|
|
13261
13288
|
children: t.map((e, t) => /* @__PURE__ */ y("div", {
|
|
13262
|
-
style:
|
|
13289
|
+
style: rd,
|
|
13263
13290
|
children: [/* @__PURE__ */ v("dd", {
|
|
13264
13291
|
style: {
|
|
13265
13292
|
margin: 0,
|
|
13266
13293
|
fontSize: 20,
|
|
13267
13294
|
fontWeight: 800,
|
|
13268
13295
|
fontVariantNumeric: "tabular-nums",
|
|
13269
|
-
color:
|
|
13296
|
+
color: Ju[e.accent ?? "default"]
|
|
13270
13297
|
},
|
|
13271
13298
|
children: e.value
|
|
13272
13299
|
}), /* @__PURE__ */ v("dt", {
|
|
13273
|
-
style:
|
|
13300
|
+
style: id,
|
|
13274
13301
|
children: e.label
|
|
13275
13302
|
})]
|
|
13276
13303
|
}, e.id ?? `${e.label}-${t}`))
|
|
13277
13304
|
})]
|
|
13278
|
-
}),
|
|
13305
|
+
}), od = {
|
|
13279
13306
|
success: "sf-timeline__dot--success",
|
|
13280
13307
|
warning: "sf-timeline__dot--warning",
|
|
13281
13308
|
danger: "sf-timeline__dot--danger",
|
|
13282
13309
|
info: "sf-timeline__dot--info",
|
|
13283
13310
|
default: "sf-timeline__dot--default"
|
|
13284
|
-
},
|
|
13311
|
+
}, sd = {
|
|
13285
13312
|
success: "sf-timeline__icon-wrap--success",
|
|
13286
13313
|
warning: "sf-timeline__icon-wrap--warning",
|
|
13287
13314
|
danger: "sf-timeline__icon-wrap--danger",
|
|
13288
13315
|
info: "sf-timeline__icon-wrap--info",
|
|
13289
13316
|
default: "sf-timeline__icon-wrap--default"
|
|
13290
|
-
},
|
|
13317
|
+
}, cd = ({ items: e, ariaLabel: t = "Línea de tiempo", emptyMessage: n = "Sin eventos", className: r }) => /* @__PURE__ */ y("ol", {
|
|
13291
13318
|
className: (0, X.default)("sf-timeline", r),
|
|
13292
13319
|
"aria-label": t,
|
|
13293
13320
|
children: [e.length === 0 && /* @__PURE__ */ v("li", {
|
|
@@ -13306,11 +13333,11 @@ var lr = (e) => {
|
|
|
13306
13333
|
/* @__PURE__ */ v("div", {
|
|
13307
13334
|
className: "sf-timeline__marker",
|
|
13308
13335
|
children: t.icon ? /* @__PURE__ */ v("span", {
|
|
13309
|
-
className: (0, X.default)("sf-timeline__icon-wrap",
|
|
13336
|
+
className: (0, X.default)("sf-timeline__icon-wrap", sd[r]),
|
|
13310
13337
|
"aria-hidden": "true",
|
|
13311
13338
|
children: t.icon
|
|
13312
13339
|
}) : /* @__PURE__ */ v("span", {
|
|
13313
|
-
className: (0, X.default)("sf-timeline__dot",
|
|
13340
|
+
className: (0, X.default)("sf-timeline__dot", od[r]),
|
|
13314
13341
|
"aria-hidden": "true"
|
|
13315
13342
|
})
|
|
13316
13343
|
}),
|
|
@@ -13333,7 +13360,7 @@ var lr = (e) => {
|
|
|
13333
13360
|
]
|
|
13334
13361
|
}, t.id ?? n);
|
|
13335
13362
|
})]
|
|
13336
|
-
}),
|
|
13363
|
+
}), ld = ({ items: e, autoPlay: t = !1, intervalMs: n = 4e3, showDots: r = !0, showArrows: i = !0, className: a }) => {
|
|
13337
13364
|
let o = m(null), [c, l] = h(0), d = s((t) => {
|
|
13338
13365
|
let n = o.current;
|
|
13339
13366
|
if (!n || e.length === 0) return;
|
|
@@ -13395,36 +13422,36 @@ var lr = (e) => {
|
|
|
13395
13422
|
})
|
|
13396
13423
|
]
|
|
13397
13424
|
});
|
|
13398
|
-
},
|
|
13425
|
+
}, ud = [
|
|
13399
13426
|
"var(--sf-chart-1)",
|
|
13400
13427
|
"var(--sf-chart-2)",
|
|
13401
13428
|
"var(--sf-chart-3)",
|
|
13402
13429
|
"var(--sf-chart-4)",
|
|
13403
13430
|
"var(--sf-chart-5)"
|
|
13404
|
-
],
|
|
13431
|
+
], dd = (e, t) => e.color ?? ud[t % ud.length], fd = {
|
|
13405
13432
|
borderRadius: "0.375rem",
|
|
13406
13433
|
border: "1px solid var(--sf-chart-tooltip-border)",
|
|
13407
13434
|
background: "var(--sf-chart-tooltip-bg)",
|
|
13408
13435
|
fontSize: "0.75rem",
|
|
13409
13436
|
color: "var(--sf-chart-tooltip-text)"
|
|
13410
|
-
},
|
|
13437
|
+
}, pd = {
|
|
13411
13438
|
fill: "var(--sf-chart-axis)",
|
|
13412
13439
|
fontSize: 11
|
|
13413
|
-
},
|
|
13440
|
+
}, md = {
|
|
13414
13441
|
fontSize: "0.75rem",
|
|
13415
13442
|
color: "var(--sf-chart-axis)"
|
|
13416
|
-
},
|
|
13443
|
+
}, hd = {
|
|
13417
13444
|
top: 8,
|
|
13418
13445
|
right: 8,
|
|
13419
13446
|
left: 0,
|
|
13420
13447
|
bottom: 0
|
|
13421
|
-
},
|
|
13448
|
+
}, gd = {
|
|
13422
13449
|
bar: {
|
|
13423
|
-
Root:
|
|
13424
|
-
renderSeries: (e) => e.map((e, t) => /* @__PURE__ */ v(
|
|
13450
|
+
Root: le,
|
|
13451
|
+
renderSeries: (e) => e.map((e, t) => /* @__PURE__ */ v(ce, {
|
|
13425
13452
|
dataKey: e.key,
|
|
13426
13453
|
name: e.label ?? e.key,
|
|
13427
|
-
fill:
|
|
13454
|
+
fill: dd(e, t),
|
|
13428
13455
|
radius: [
|
|
13429
13456
|
4,
|
|
13430
13457
|
4,
|
|
@@ -13434,10 +13461,10 @@ var lr = (e) => {
|
|
|
13434
13461
|
}, e.key))
|
|
13435
13462
|
},
|
|
13436
13463
|
line: {
|
|
13437
|
-
Root:
|
|
13464
|
+
Root: pe,
|
|
13438
13465
|
renderSeries: (e) => e.map((e, t) => {
|
|
13439
|
-
let n =
|
|
13440
|
-
return /* @__PURE__ */ v(
|
|
13466
|
+
let n = dd(e, t);
|
|
13467
|
+
return /* @__PURE__ */ v(fe, {
|
|
13441
13468
|
type: "monotone",
|
|
13442
13469
|
dataKey: e.key,
|
|
13443
13470
|
name: e.label ?? e.key,
|
|
@@ -13452,10 +13479,10 @@ var lr = (e) => {
|
|
|
13452
13479
|
})
|
|
13453
13480
|
},
|
|
13454
13481
|
area: {
|
|
13455
|
-
Root:
|
|
13482
|
+
Root: U,
|
|
13456
13483
|
renderSeries: (e) => e.map((e, t) => {
|
|
13457
|
-
let n =
|
|
13458
|
-
return /* @__PURE__ */ v(
|
|
13484
|
+
let n = dd(e, t);
|
|
13485
|
+
return /* @__PURE__ */ v(se, {
|
|
13459
13486
|
type: "monotone",
|
|
13460
13487
|
dataKey: e.key,
|
|
13461
13488
|
name: e.label ?? e.key,
|
|
@@ -13466,36 +13493,36 @@ var lr = (e) => {
|
|
|
13466
13493
|
}, e.key);
|
|
13467
13494
|
})
|
|
13468
13495
|
}
|
|
13469
|
-
},
|
|
13470
|
-
let { Root: d, renderSeries: f } =
|
|
13496
|
+
}, _d = ({ type: e, data: t, xKey: n, series: r, height: i = 280, ariaLabel: a, emptyMessage: o = "Sin datos para mostrar", className: s, showGrid: c = !0, showTooltip: l = !0, showLegend: u = r.length > 1 }) => {
|
|
13497
|
+
let { Root: d, renderSeries: f } = gd[e], p = t.length > 0 && r.length > 0;
|
|
13471
13498
|
return /* @__PURE__ */ v("div", {
|
|
13472
13499
|
className: (0, X.default)("sf-chart", s),
|
|
13473
13500
|
style: { height: i },
|
|
13474
13501
|
role: "img",
|
|
13475
13502
|
"aria-label": a ?? `Gráfico ${e}`,
|
|
13476
|
-
children: p ? /* @__PURE__ */ v(
|
|
13503
|
+
children: p ? /* @__PURE__ */ v(me, {
|
|
13477
13504
|
width: "100%",
|
|
13478
13505
|
height: "100%",
|
|
13479
13506
|
children: /* @__PURE__ */ y(d, {
|
|
13480
13507
|
data: t,
|
|
13481
|
-
margin:
|
|
13508
|
+
margin: hd,
|
|
13482
13509
|
children: [
|
|
13483
|
-
c && /* @__PURE__ */ v(
|
|
13510
|
+
c && /* @__PURE__ */ v(ue, {
|
|
13484
13511
|
strokeDasharray: "3 3",
|
|
13485
13512
|
vertical: !1
|
|
13486
13513
|
}),
|
|
13487
|
-
/* @__PURE__ */ v(
|
|
13514
|
+
/* @__PURE__ */ v(ge, {
|
|
13488
13515
|
dataKey: n,
|
|
13489
|
-
tick:
|
|
13516
|
+
tick: pd,
|
|
13490
13517
|
axisLine: { stroke: "var(--sf-chart-grid)" }
|
|
13491
13518
|
}),
|
|
13492
|
-
/* @__PURE__ */ v(
|
|
13493
|
-
tick:
|
|
13519
|
+
/* @__PURE__ */ v(_e, {
|
|
13520
|
+
tick: pd,
|
|
13494
13521
|
axisLine: { stroke: "var(--sf-chart-grid)" },
|
|
13495
13522
|
width: 48
|
|
13496
13523
|
}),
|
|
13497
|
-
l && /* @__PURE__ */ v(
|
|
13498
|
-
u && /* @__PURE__ */ v(
|
|
13524
|
+
l && /* @__PURE__ */ v(he, { contentStyle: fd }),
|
|
13525
|
+
u && /* @__PURE__ */ v(de, { wrapperStyle: md }),
|
|
13499
13526
|
f(r)
|
|
13500
13527
|
]
|
|
13501
13528
|
})
|
|
@@ -13505,8 +13532,8 @@ var lr = (e) => {
|
|
|
13505
13532
|
children: o
|
|
13506
13533
|
})
|
|
13507
13534
|
});
|
|
13508
|
-
},
|
|
13509
|
-
let c = p(() =>
|
|
13535
|
+
}, vd = ({ data: e, dataKey: t, height: n = 40, width: r = "100%", color: i, ariaLabel: a = "Tendencia", emptyMessage: o = "Sin datos", className: s }) => {
|
|
13536
|
+
let c = p(() => dd({ color: i }, 0), [i]), l = e.length > 0, u = p(() => ({
|
|
13510
13537
|
top: 4,
|
|
13511
13538
|
right: 4,
|
|
13512
13539
|
left: 4,
|
|
@@ -13520,13 +13547,13 @@ var lr = (e) => {
|
|
|
13520
13547
|
},
|
|
13521
13548
|
role: "img",
|
|
13522
13549
|
"aria-label": a,
|
|
13523
|
-
children: l ? /* @__PURE__ */ v(
|
|
13550
|
+
children: l ? /* @__PURE__ */ v(me, {
|
|
13524
13551
|
width: "100%",
|
|
13525
13552
|
height: "100%",
|
|
13526
|
-
children: /* @__PURE__ */ v(
|
|
13553
|
+
children: /* @__PURE__ */ v(pe, {
|
|
13527
13554
|
data: e,
|
|
13528
13555
|
margin: u,
|
|
13529
|
-
children: /* @__PURE__ */ v(
|
|
13556
|
+
children: /* @__PURE__ */ v(fe, {
|
|
13530
13557
|
type: "monotone",
|
|
13531
13558
|
dataKey: t,
|
|
13532
13559
|
stroke: c,
|
|
@@ -13541,7 +13568,7 @@ var lr = (e) => {
|
|
|
13541
13568
|
children: o
|
|
13542
13569
|
})
|
|
13543
13570
|
});
|
|
13544
|
-
},
|
|
13571
|
+
}, yd = (e, { initialPageSize: t = 10 } = {}) => {
|
|
13545
13572
|
let [n, r] = h(""), [i, a] = h(0), [o, s] = h(t), c = p(() => {
|
|
13546
13573
|
let t = n.trim().toLowerCase();
|
|
13547
13574
|
return t ? e.filter((e) => Object.values(e).some((e) => String(e ?? "").toLowerCase().includes(t))) : e;
|
|
@@ -13568,37 +13595,37 @@ var lr = (e) => {
|
|
|
13568
13595
|
]),
|
|
13569
13596
|
totalItems: l
|
|
13570
13597
|
};
|
|
13571
|
-
},
|
|
13572
|
-
let n =
|
|
13598
|
+
}, bd = (e) => String(e ?? "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim(), xd = (e) => typeof e == "string" || typeof e == "number", Sd = (e, t) => {
|
|
13599
|
+
let n = bd(t);
|
|
13573
13600
|
return typeof t == "number" && (n = `#${n}`), e.toLowerCase().endsWith("codigo") && !n.startsWith("#") && (n = `.${n}`), n;
|
|
13574
|
-
},
|
|
13601
|
+
}, Cd = (e, t, n) => {
|
|
13575
13602
|
if (t?.length) return [...t];
|
|
13576
13603
|
let r = new Set(n), i = [];
|
|
13577
|
-
for (let t in e) r.has(t) ||
|
|
13604
|
+
for (let t in e) r.has(t) || xd(e[t]) && i.push(t);
|
|
13578
13605
|
return i;
|
|
13579
|
-
},
|
|
13580
|
-
let r = "", i =
|
|
13606
|
+
}, wd = (e, t, n) => {
|
|
13607
|
+
let r = "", i = Cd(e, t, n);
|
|
13581
13608
|
for (let t of i) {
|
|
13582
13609
|
let n = e[t];
|
|
13583
|
-
if (!
|
|
13584
|
-
let i =
|
|
13610
|
+
if (!xd(n)) continue;
|
|
13611
|
+
let i = Sd(t, n);
|
|
13585
13612
|
i && (r += `${i} `);
|
|
13586
13613
|
}
|
|
13587
13614
|
return r;
|
|
13588
|
-
},
|
|
13615
|
+
}, Td = (e) => {
|
|
13589
13616
|
let t = e.split(";"), n = [];
|
|
13590
13617
|
for (let e of t) {
|
|
13591
|
-
let t =
|
|
13618
|
+
let t = bd(e);
|
|
13592
13619
|
t.length >= 2 && n.push(t);
|
|
13593
13620
|
}
|
|
13594
13621
|
return n;
|
|
13595
|
-
},
|
|
13596
|
-
let [n, r] = h(""), i = l(n), a = t?.filters, o = t?.searchableKeys, s = t?.ignoredKeys, c = p(() =>
|
|
13622
|
+
}, Ed = (e, t) => {
|
|
13623
|
+
let [n, r] = h(""), i = l(n), a = t?.filters, o = t?.searchableKeys, s = t?.ignoredKeys, c = p(() => Td(i), [i]), u = p(() => {
|
|
13597
13624
|
if (!e?.length) return [];
|
|
13598
13625
|
let t = [];
|
|
13599
13626
|
for (let n of e) t.push({
|
|
13600
13627
|
item: n,
|
|
13601
|
-
searchIndex:
|
|
13628
|
+
searchIndex: wd(n, o, s)
|
|
13602
13629
|
});
|
|
13603
13630
|
return t;
|
|
13604
13631
|
}, [
|
|
@@ -13640,15 +13667,15 @@ var lr = (e) => {
|
|
|
13640
13667
|
};
|
|
13641
13668
|
//#endregion
|
|
13642
13669
|
//#region src/hooks/useArrayPaginator.ts
|
|
13643
|
-
function
|
|
13670
|
+
function Dd(e, t, n) {
|
|
13644
13671
|
if (t <= 0) return [];
|
|
13645
13672
|
let r = Math.max(0, n);
|
|
13646
13673
|
return r >= e.length ? [] : e.slice(r, r + t);
|
|
13647
13674
|
}
|
|
13648
|
-
var
|
|
13675
|
+
var Od = (e, t, n) => {
|
|
13649
13676
|
let r = e?.[n], i = t?.[n];
|
|
13650
13677
|
return r == null && i == null ? 0 : r == null ? -1 : i == null ? 1 : typeof r == "boolean" && typeof i == "boolean" ? Number(r) - Number(i) : typeof r == "number" && typeof i == "number" ? r - i : r instanceof Date && i instanceof Date ? r.getTime() - i.getTime() : typeof r == "string" && typeof i == "string" ? r.localeCompare(i, void 0, { sensitivity: "base" }) : String(r).localeCompare(String(i), void 0, { sensitivity: "base" });
|
|
13651
|
-
},
|
|
13678
|
+
}, kd = (e, t) => {
|
|
13652
13679
|
let [n, r] = h([]), [i, a] = h(() => ({
|
|
13653
13680
|
limit: Math.max(1, t?.limit ?? 100),
|
|
13654
13681
|
offset: 0
|
|
@@ -13661,7 +13688,7 @@ var Ed = (e, t, n) => {
|
|
|
13661
13688
|
if (e.length === 0) return [];
|
|
13662
13689
|
let r = [...e];
|
|
13663
13690
|
if (n.length > 0) {
|
|
13664
|
-
let e = t?.onSortFunc ??
|
|
13691
|
+
let e = t?.onSortFunc ?? Od, i = t?.strictSort ?? !1;
|
|
13665
13692
|
r.sort((t, r) => {
|
|
13666
13693
|
for (let { id: a, desc: o } of n) {
|
|
13667
13694
|
if (i && (!(typeof t == "object" && t) || !(typeof r == "object" && r) || !(a in t) || !(a in r))) continue;
|
|
@@ -13671,7 +13698,7 @@ var Ed = (e, t, n) => {
|
|
|
13671
13698
|
return 0;
|
|
13672
13699
|
});
|
|
13673
13700
|
}
|
|
13674
|
-
return
|
|
13701
|
+
return Dd(r, o, c);
|
|
13675
13702
|
}, [
|
|
13676
13703
|
e,
|
|
13677
13704
|
o,
|
|
@@ -13690,7 +13717,7 @@ var Ed = (e, t, n) => {
|
|
|
13690
13717
|
onSortChange: r,
|
|
13691
13718
|
pageData: u
|
|
13692
13719
|
};
|
|
13693
|
-
},
|
|
13720
|
+
}, Ad = (e, t) => {
|
|
13694
13721
|
if (typeof window > "u") return t;
|
|
13695
13722
|
try {
|
|
13696
13723
|
let n = window.localStorage.getItem(e);
|
|
@@ -13698,8 +13725,8 @@ var Ed = (e, t, n) => {
|
|
|
13698
13725
|
} catch {
|
|
13699
13726
|
return t;
|
|
13700
13727
|
}
|
|
13701
|
-
},
|
|
13702
|
-
let [n, r] = h(() =>
|
|
13728
|
+
}, jd = (e, t) => {
|
|
13729
|
+
let [n, r] = h(() => Ad(e, t));
|
|
13703
13730
|
return [n, (t) => {
|
|
13704
13731
|
r((n) => {
|
|
13705
13732
|
let r = typeof t == "function" ? t(n) : t;
|
|
@@ -13709,52 +13736,52 @@ var Ed = (e, t, n) => {
|
|
|
13709
13736
|
return r;
|
|
13710
13737
|
});
|
|
13711
13738
|
}];
|
|
13712
|
-
},
|
|
13739
|
+
}, Md = (e) => typeof window > "u" ? null : new URL(window.location.href).searchParams.get(e), Nd = (e, t) => {
|
|
13713
13740
|
if (typeof window > "u") return;
|
|
13714
13741
|
let n = new URL(window.location.href);
|
|
13715
13742
|
t != null && t !== "" ? n.searchParams.set(e, t) : n.searchParams.delete(e), window.history.replaceState(null, "", n.toString());
|
|
13716
|
-
},
|
|
13717
|
-
|
|
13718
|
-
},
|
|
13743
|
+
}, Pd = (e) => {
|
|
13744
|
+
Nd(e, null);
|
|
13745
|
+
}, Fd = (e, t) => {
|
|
13719
13746
|
let [n, r] = h(() => {
|
|
13720
13747
|
let n = typeof e == "function" ? e() : e;
|
|
13721
13748
|
if (!t) return n;
|
|
13722
|
-
let r =
|
|
13723
|
-
return r == null || r === "" ? (
|
|
13749
|
+
let r = Md(t);
|
|
13750
|
+
return r == null || r === "" ? (Nd(t, n), n) : r;
|
|
13724
13751
|
});
|
|
13725
13752
|
return [n, (e) => {
|
|
13726
13753
|
r((n) => {
|
|
13727
13754
|
let r = typeof e == "function" ? e(n) : e;
|
|
13728
|
-
return t &&
|
|
13755
|
+
return t && Nd(t, r), r;
|
|
13729
13756
|
});
|
|
13730
13757
|
}];
|
|
13731
|
-
},
|
|
13758
|
+
}, Id = () => {
|
|
13732
13759
|
let e = globalThis.process?.env?.NODE_ENV;
|
|
13733
13760
|
return e != null && e === "development";
|
|
13734
|
-
},
|
|
13761
|
+
}, Ld = (e, t) => {
|
|
13735
13762
|
let n = x({
|
|
13736
|
-
resolver:
|
|
13763
|
+
resolver: ve(e),
|
|
13737
13764
|
defaultValues: t?.defaultValues
|
|
13738
13765
|
}), r = (e, t) => n.handleSubmit(e, (e, n) => {
|
|
13739
|
-
|
|
13766
|
+
Id() && console.log(e), t?.(e, n);
|
|
13740
13767
|
});
|
|
13741
13768
|
return {
|
|
13742
13769
|
...n,
|
|
13743
13770
|
handleSubmit: r
|
|
13744
13771
|
};
|
|
13745
|
-
},
|
|
13772
|
+
}, Rd = (e) => {
|
|
13746
13773
|
let t = String(e ?? ""), n = 0;
|
|
13747
13774
|
for (; n < t.length && t.charCodeAt(n) <= 32;) n += 1;
|
|
13748
13775
|
let r = t.slice(n);
|
|
13749
13776
|
return /^[=+\-@]/.test(r) ? `'${t}` : t;
|
|
13750
|
-
},
|
|
13751
|
-
let t =
|
|
13777
|
+
}, zd = (e) => {
|
|
13778
|
+
let t = Rd(e);
|
|
13752
13779
|
return /[",\n\r]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
|
|
13753
|
-
},
|
|
13780
|
+
}, Bd = (e, t) => {
|
|
13754
13781
|
if (typeof document > "u") return;
|
|
13755
|
-
let n = `\uFEFF${[t.columns.map((e) =>
|
|
13782
|
+
let n = `\uFEFF${[t.columns.map((e) => zd(e.header)).join(","), ...e.map((e) => t.columns.map((t) => zd(t.getValue(e))).join(","))].join("\n")}`, r = new Blob([n], { type: "text/csv;charset=utf-8" }), i = URL.createObjectURL(r), a = document.createElement("a");
|
|
13756
13783
|
a.href = i, a.download = t.filename ?? "export.csv", a.click(), URL.revokeObjectURL(i);
|
|
13757
|
-
},
|
|
13784
|
+
}, Vd = (e) => Rd(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """), Hd = (e) => typeof e == "number" && Number.isFinite(e) ? "Number" : "String", Ud = (e, t) => {
|
|
13758
13785
|
if (typeof document > "u") return;
|
|
13759
13786
|
let { columns: n, filename: r = "export.xls" } = t, i = `<?xml version="1.0"?>
|
|
13760
13787
|
<?mso-application progid="Excel.Sheet"?>
|
|
@@ -13767,51 +13794,51 @@ var Ed = (e, t, n) => {
|
|
|
13767
13794
|
</Styles>
|
|
13768
13795
|
<Worksheet ss:Name="Export">
|
|
13769
13796
|
<Table>
|
|
13770
|
-
<Row>${n.map((e) => `<Cell ss:StyleID="Header"><Data ss:Type="String">${
|
|
13797
|
+
<Row>${n.map((e) => `<Cell ss:StyleID="Header"><Data ss:Type="String">${Vd(e.header)}</Data></Cell>`).join("")}</Row>
|
|
13771
13798
|
${e.map((e) => `<Row>${n.map((t) => {
|
|
13772
|
-
let n = t.getValue(e), r =
|
|
13773
|
-
return `<Cell><Data ss:Type="${r}">${r === "Number" ? String(n) :
|
|
13799
|
+
let n = t.getValue(e), r = Hd(n);
|
|
13800
|
+
return `<Cell><Data ss:Type="${r}">${r === "Number" ? String(n) : Vd(n)}</Data></Cell>`;
|
|
13774
13801
|
}).join("")}</Row>`).join("")}
|
|
13775
13802
|
</Table>
|
|
13776
13803
|
</Worksheet>
|
|
13777
13804
|
</Workbook>`, a = new Blob([i], { type: "application/vnd.ms-excel" }), o = URL.createObjectURL(a), s = document.createElement("a");
|
|
13778
13805
|
s.href = o, s.download = r.endsWith(".xls") || r.endsWith(".xlsx") ? r : `${r}.xls`, s.click(), URL.revokeObjectURL(o);
|
|
13779
|
-
},
|
|
13806
|
+
}, Wd = "Este campo es requerido", Gd = "Introduce una dirección de correo electrónico válida", Kd = "El correo electrónico es obligatorio", qd = "El valor de este campo es inválido", Jd = "Introduce un número de celular válido", Yd = (e) => e == null ? null : typeof e == "string" ? e.trim() === "" ? null : e.trim() : e, Xd = (e = Wd) => W.string().transform(Yd).required(e), Zd = () => W.string().transform(Yd).default(null).nullable(), Qd = (e = Kd) => W.string().transform(Yd).email(Gd).required(e), $d = (e = Gd) => W.string().transform(Yd).test("emailTest", e, (e) => e == null || e === "" || W.string().email().isValidSync(e)).default(null).nullable(), ef = (e, t = qd, n = Wd) => W.string().transform(Yd).trim().test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).required(n), tf = (e, t = qd) => W.string().transform(Yd).test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).default(null).nullable(), nf = (e) => {
|
|
13780
13807
|
let t = e?.minLength == null ? void 0 : Math.max(1, e.minLength);
|
|
13781
13808
|
return {
|
|
13782
13809
|
minLength: t,
|
|
13783
13810
|
maxLength: e?.maxLength == null ? void 0 : Math.max(t ?? 1, e.maxLength)
|
|
13784
13811
|
};
|
|
13785
|
-
},
|
|
13786
|
-
let { minLength: t, maxLength: n } =
|
|
13812
|
+
}, rf = (e) => {
|
|
13813
|
+
let { minLength: t, maxLength: n } = nf(e), r = /^[0-9]+$/, i = W.string().transform(Yd).test("rgxValidation", (e, t) => e == null || e === "" || e.match(r) != null || t.createError({ message: "El campo debe contener solo caracteres numéricos" }));
|
|
13787
13814
|
return t != null && (i = i.min(t, `El campo debe tener al menos ${t} caracteres`)), n != null && (i = i.max(n, `La longitud máxima permitida es de ${n} caracteres`)), i;
|
|
13788
|
-
},
|
|
13815
|
+
}, af = (e) => rf(e).required(Wd), of = (e) => rf(e).default(null).nullable(), sf = (e = Wd) => W.boolean().typeError("El tipo de dato debe ser booleano").required(e), cf = () => W.boolean().typeError("El tipo de dato debe ser booleano").default(null).nullable(), lf = (e, t) => t == null || t === "" ? null : Number.isNaN(e) ? void 0 : e, uf = (e = Wd) => W.number().transform(lf).typeError("Debe ser numérico").required(e), df = () => W.number().transform(lf).typeError("Debe ser numérico").default(null).nullable().notRequired(), ff = (e = Wd) => W.number().transform(lf).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").required(e), pf = (e = Wd) => ff(e).integer("Este campo debe ser un número entero"), mf = () => W.number().transform(lf).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").default(null).nullable(), hf = () => mf().integer("Este campo debe ser un número entero"), gf = (e) => {
|
|
13789
13816
|
let t = /^(?:\+51)\s?[0-9]{3}\s?[0-9]{3}\s?[0-9]{3}$/;
|
|
13790
|
-
return
|
|
13791
|
-
},
|
|
13792
|
-
transformNullIfEmpty:
|
|
13793
|
-
requiredString:
|
|
13794
|
-
nullableString:
|
|
13795
|
-
requiredEmail:
|
|
13796
|
-
nullableEmail:
|
|
13797
|
-
requiredMatchString:
|
|
13798
|
-
nullableOrMatchString:
|
|
13799
|
-
requiredStringNumbersOnly:
|
|
13800
|
-
nullableStringNumbersOnly:
|
|
13801
|
-
requiredBoolean:
|
|
13802
|
-
nullableBoolean:
|
|
13803
|
-
requiredNumber:
|
|
13804
|
-
nullableNumber:
|
|
13805
|
-
requiredPositiveNumber:
|
|
13806
|
-
requiredPositiveInteger:
|
|
13807
|
-
nullablePositiveNumber:
|
|
13808
|
-
nullablePositiveInteger:
|
|
13809
|
-
nullableCelular:
|
|
13810
|
-
requiredCelular:
|
|
13811
|
-
requiredStringArray:
|
|
13812
|
-
nullableStringArray:
|
|
13813
|
-
},
|
|
13817
|
+
return W.string().transform((e) => e == null ? null : typeof e == "string" ? e.trim() === "" ? null : e.trim().startsWith("+") ? e.trim() : `+51 ${e.trim()}` : e).test("rgxValidation", e, (e) => e == null || e === "" || e.match(t) != null).default(null);
|
|
13818
|
+
}, _f = (e = Jd) => gf(e).nullable(), vf = (e = Jd) => gf(e).required(Wd), yf = (e = Wd) => W.array().of(Xd()).min(1, "Debe contener al menos un elemento").required(e), bf = () => W.array().of(Zd()).default(null).nullable(), xf = {
|
|
13819
|
+
transformNullIfEmpty: Yd,
|
|
13820
|
+
requiredString: Xd,
|
|
13821
|
+
nullableString: Zd,
|
|
13822
|
+
requiredEmail: Qd,
|
|
13823
|
+
nullableEmail: $d,
|
|
13824
|
+
requiredMatchString: ef,
|
|
13825
|
+
nullableOrMatchString: tf,
|
|
13826
|
+
requiredStringNumbersOnly: af,
|
|
13827
|
+
nullableStringNumbersOnly: of,
|
|
13828
|
+
requiredBoolean: sf,
|
|
13829
|
+
nullableBoolean: cf,
|
|
13830
|
+
requiredNumber: uf,
|
|
13831
|
+
nullableNumber: df,
|
|
13832
|
+
requiredPositiveNumber: ff,
|
|
13833
|
+
requiredPositiveInteger: pf,
|
|
13834
|
+
nullablePositiveNumber: mf,
|
|
13835
|
+
nullablePositiveInteger: hf,
|
|
13836
|
+
nullableCelular: _f,
|
|
13837
|
+
requiredCelular: vf,
|
|
13838
|
+
requiredStringArray: yf,
|
|
13839
|
+
nullableStringArray: bf
|
|
13840
|
+
}, Sf = (e) => W.object().shape(e(xf));
|
|
13814
13841
|
//#endregion
|
|
13815
|
-
export { Vr as AccessDenied, Ki as Accordion, jr as ActionButton, _r as ActiveFiltersBar,
|
|
13842
|
+
export { Vr as AccessDenied, Ki as Accordion, jr as ActionButton, _r as ActiveFiltersBar, El as AddressSearchInput, Nr as Alert, Hs as AlertLane, zs as AlertRowList, io as AppBarContainer, ro as AppShell, $a as AppsGridIcon, Il as AreaInput, dn as AsyncCardSelect, cr as AsyncCustomTable, ln as AsyncSearchSelect, mn as AsyncSearchTableSelect, Uu as AuditTimeline, ga as Avatar, _a as AvatarGroup, ba as Badge, Ut as BooleanCheckbox, Wi as Breadcrumb, $ as Button, Er as ButtonGroup, ud as CHART_SERIES_COLORS, Kt as COUNTRY_DIAL_CODES, Gt as CURRENCY_SYMBOLS, Ss as Calendar, hu as CardRadioGroup, un as CardSelect, ld as Carousel, _d as Chart, Rt as Checkbox, zt as CheckboxGroup, vo as CodeEditor, du as ColorInput, Ti as CommandPalette, ei as ConfirmDialog, pi as ContextMenuProvider, kl as CoordinatesInput, tn as CurrencyInput, sr as CustomTable, Ks as DashboardCard, Ys as DashboardGrid, $s as DashboardLayout, Xs as DashboardSection, Qs as DashboardStatBar, St as DateInput, Dt as DatePicker, ic as DateRangeFields, Cn as DateRangeInput, ac as DateRangeUtcInput, Ya as DateWeekStrip, An as DisplayField, Xt as DniInput, Ms as DonutGauge, Ns as DonutGaugeRow, xi as Drawer, ai as DropdownMenu, oi as DropdownMenuItem, Sr as EditableDataGrid, Pr as EmptyState, rs as EntityCard, as as EntityCardGrid, Ir as ErrorView, Rs as EventLog, Tr as ExpandableTableSection, Z as FieldLayout, yc as FileDropInput, On as FileInput, sa as FilterBar, la as FilterBarDate, ca as FilterBarField, ua as FilterBarSelect, da as FilterBarText, kr as FormActions, ia as FormWizard, zi as HeightProvider, yt as Input, ma as ItineraryEditor, Ho as KPICard, Wo as KPIGrid, pu as KeyValueInput, qu as LiveChip, Ba as LiveRouteBoard, ad as LiveStatusBar, zr as LoadingView, Ol as LocationPicker, bo as MIN_MAP_GEOCODER_QUERY_LENGTH, hs as MONTH_NAMES, fa as MaestroLayout, kc as MapFrame, Lo as MapPicker, Ac as MapStatus, Dl as MapView, oa as MasterDetailLayout, aa as MasterDetailListItem, ni as MessageDialog, qo as MetricBarList, Ko as MetricBarRow, Qr as Modal, ds as ModuleCard, fs as ModuleCardGrid, Sc as MultiPhotoInput, Cu as NETWORK_BASEMAPS, Ou as NETWORK_EDGE_STYLES, Tu as NETWORK_KIND_COLORS, wu as NETWORK_KIND_LABELS, Eu as NETWORK_STATUS_COLORS, Du as NETWORK_STATUS_LABELS, Kn as NUMBER_FILTER_OPS, Iu as NetworkLegend, Vu as NetworkMap, vi as NotificationBell, xt as NumberInput, ru as NumberStepper, gu as ORG_TREE_DEFAULT_THEMES, si as OptionItem, Su as OrgTree, nc as OtpInput, Oi as PageContainer, Ai as PageHeader, Wn as PaginationRangeInput, Oa as PassengerBoardCard, kt as PasswordInput, $t as PhoneInput, Dc as PhotoCropInput, bc as PhotoInput, Ct as Popover, Di as ProductTour, ou as ProgressBar, cu as ProgressBarReadonly, gi as QRView, Bt as RadioGroup, au as RangeSliderInput, lu as RatingInput, cs as RecommendationCard, Ku as RecordList, Gu as RecordListItem, Br as RetryBlock, fo as RichTextEditor, Ll as RouteInput, Or as RowActions, Zt as RucInput, Mc as SF_DEFAULT_MAP_CENTER, Nc as SF_DEFAULT_MAP_ZOOM, Lc as SF_GOOGLE_ENGINE_CAPABILITIES, Ic as SF_LEAFLET_ENGINE_CAPABILITIES, jc as SF_MAPS_CONFIG_ERROR, Fc as SF_OSM_ATTRIBUTION, Pc as SF_OSM_TILE_URL, Gn as STRING_FILTER_OPS, qi as ScrollArea, sn as SearchSelect, pn as SearchTableSelect, Lt as Select, Ui as Separator, yl as SfProvider, Si as Sheet, ji as SidePanel, Li as SidePanelContainer, xc as SignaturePad, Ur as Skeleton, $l as SliderInput, Tn as SmartDateInput, nn as SmartInput, Rl as SmartMapInput, Cc as SmartMediaInput, hn as SmartSelect, mu as SortableList, vd as Sparkline, Rr as Spinner, ms as StatCard, ta as Stepper, Ji as SummaryItem, eo as SyncIcon, ci as TabMenuOption, gr as TableColumnSettings, Xn as TableFiltersPanel, ki as TablePageLayout, Zn as TableSortingPanel, Mi as Tabs, fu as TagsInput, bt as TextArea, wn as TimeRangeInput, cd as Timeline, Yr as ToastProvider, Vt as Toggle, Ht as ToggleCard, Dr as ToolbarButton, yi as Tooltip, ps as TramoCard, It as Transfer, Pt as TreeSelect, Va as UnitSelector, Vi as Visibility, Hi as Visivility, gs as WEEKDAY_LABELS, Qa as WeekdayToggleStrip, Wt as YesNoSelect, va as badgeClassName, ya as badgeDotClassName, br as buildActiveFilterChips, ys as buildMonthGrid, _u as buildOrgTreeRows, Ft as buttonClassName, Sn as calcTimeDuration, Hl as clampNumber, ho as codeEditorClassName, Yn as columnFilterFn, Mu as countNetworkStatus, yu as countOrgTreeNodes, Sf as createFormSchema, zn as createLocalStorageAsyncStateStore, fc as createPhotoItem, gc as cropImageToSquare, Od as defaultOnSortFunc, oc as emptyDateRange, Kl as emptyKeyValuePairs, Jl as emptyNumberRange, Oc as emptyPhotoItems, Wl as emptyTags, sc as emptyTimeRange, Bd as exportTableCsv, Ud as exportTableXlsx, Q as fieldClassName, yr as formatColumnFilterValue, So as formatMapGeocoderLabel, Ul as formatSliderLabel, yn as fromUtcDateIso, Jn as inferInitialFilterValue, _t as inputFocusTransition, xr as isBlankRow, qn as isColumnFilterValue, _n as isValidDateString, uc as isValidFileType, Fu as networkEdgeLines, Nu as networkMapBounds, Pu as networkNodePositions, lc as nextPhotoId, bn as normalizeDateRange, Xl as normalizeHexColor, ql as normalizeKeyValuePairs, ju as normalizeNetworkEdges, Au as normalizeNetworkNodes, Yl as normalizeNumberRange, hc as normalizePhotoItems, Gl as normalizeTags, xn as normalizeTimeRange, cf as nullableBoolean, _f as nullableCelular, $d as nullableEmail, df as nullableNumber, tf as nullableOrMatchString, hf as nullablePositiveInteger, mf as nullablePositiveNumber, Zd as nullableString, bf as nullableStringArray, of as nullableStringNumbersOnly, bu as orgTreeRootNodes, vs as parseYMD, Zl as progressPercent, Md as readQueryValue, Pd as removeQueryValue, sf as requiredBoolean, vf as requiredCelular, Qd as requiredEmail, ef as requiredMatchString, uf as requiredNumber, pf as requiredPositiveInteger, ff as requiredPositiveNumber, Xd as requiredString, yf as requiredStringArray, af as requiredStringNumbersOnly, vu as resolveOrgTreeTheme, dd as resolveSeriesColor, pc as revokePhotoPreview, mc as revokePhotoPreviews, qt as sanitizeDigits, xo as searchMapAddresses, sl as sfClampLatitude, cl as sfClampLongitude, al as sfFormatCoordinate, ul as sfLatLngToString, fl as sfMarkerFromLatLng, dl as sfNormalizeLatLng, ll as sfParseCoordinate, dc as showFilePicker, vt as textareaClassName, Wa as toIsoDate, gn as toLocalDateYMD, _s as toLocalYMD, Nt as toStringArray, vn as toUtcDateIso, Yd as transformNullIfEmpty, Nd as updateQueryValue, Sl as useAddressSearch, kd as useArrayPaginator, cn as useAsyncOptions, li as useClickAway, Bi as useContainerHeight, hi as useContextMenu, Ld as useCustomForm, lr as useCustomTableController, ii as useDropdownClose, Ed as useFilterData, ra as useFormWizard, mo as useIsClient, yd as useMaestroFilter, Cl as useMapEngine, wl as useMapsConfig, $r as useModal, Fd as useQueryStringState, bl as useSf, xl as useSfMaps, Fi as useSidePanelContainer, Ni as useSidePanelHandle, jd as useStoredState, mr as useTableColumnSettings, Xr as useToast, Yt as validateDni, Jt as validateRuc, xf as validators };
|
|
13816
13843
|
|
|
13817
13844
|
//# sourceMappingURL=sf-ui.js.map
|