@sfperusacdev/sf-ui 0.2.8 → 0.2.9
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 +690 -696
- 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/types/src/components/dashboard/DonutBreakdown.d.ts +2 -0
- package/dist/types/src/components/dashboard/DonutGauge.d.ts +2 -0
- package/dist/types/src/components/dashboard/DonutGauge.test.d.ts +1 -0
- package/dist/types/src/components/dashboard/donutSizing.d.ts +32 -0
- package/package.json +1 -1
package/dist/sf-ui.js
CHANGED
|
@@ -11,7 +11,7 @@ import { html as L } from "@codemirror/lang-html";
|
|
|
11
11
|
import { javascript as R } from "@codemirror/lang-javascript";
|
|
12
12
|
import { json as z } from "@codemirror/lang-json";
|
|
13
13
|
import { sql as B } from "@codemirror/lang-sql";
|
|
14
|
-
import { Circle as ee, MapContainer as
|
|
14
|
+
import { Circle as ee, MapContainer as te, Marker as ne, Polygon as re, Polyline as ie, TileLayer as V, Tooltip as H, useMap as U, useMapEvents as ae } from "react-leaflet";
|
|
15
15
|
import oe from "leaflet";
|
|
16
16
|
import { Area as se, AreaChart as W, Bar as ce, BarChart as le, CartesianGrid as ue, Label as de, LabelList as fe, Legend as pe, Line as me, LineChart as he, PolarAngleAxis as ge, PolarGrid as _e, PolarRadiusAxis as ve, Radar as ye, RadarChart as be, ReferenceLine as xe, ResponsiveContainer as Se, Tooltip as Ce, XAxis as we, YAxis as Te } from "recharts";
|
|
17
17
|
import Ee from "react-easy-crop";
|
|
@@ -2720,18 +2720,18 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
2720
2720
|
let O = b({
|
|
2721
2721
|
name: t,
|
|
2722
2722
|
control: e.control
|
|
2723
|
-
}), k = String(t), A = O.fieldState.error, j = m(null), M = m(null), [N, P] = h(!1), [F, I] = h(""), [L, R] = h(), [z, B] = h(0), ee = m(null),
|
|
2723
|
+
}), k = String(t), A = O.fieldState.error, j = m(null), M = m(null), [N, P] = h(!1), [F, I] = h(""), [L, R] = h(), [z, B] = h(0), ee = m(null), te = p(() => o ? Jt(O.field.value) : O.field.value ? [String(O.field.value)] : [], [O.field.value, o]), ne = p(() => {
|
|
2724
2724
|
let e = /* @__PURE__ */ new Map();
|
|
2725
2725
|
for (let t of n) e.set(t.value, t);
|
|
2726
2726
|
return e;
|
|
2727
|
-
}, [n]),
|
|
2727
|
+
}, [n]), re = p(() => {
|
|
2728
2728
|
let e = [];
|
|
2729
|
-
for (let t of
|
|
2730
|
-
let n =
|
|
2729
|
+
for (let t of te) {
|
|
2730
|
+
let n = ne.get(t);
|
|
2731
2731
|
n && e.push(n);
|
|
2732
2732
|
}
|
|
2733
2733
|
return e;
|
|
2734
|
-
}, [
|
|
2734
|
+
}, [ne, te]), ie = p(() => {
|
|
2735
2735
|
let e = F.trim().toLowerCase();
|
|
2736
2736
|
return e ? n.filter((t) => t.label.toLowerCase().includes(e)) : n;
|
|
2737
2737
|
}, [n, F]);
|
|
@@ -2740,28 +2740,28 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
2740
2740
|
B(ee.current?.scrollTop ?? 0);
|
|
2741
2741
|
}));
|
|
2742
2742
|
}, [N, F]);
|
|
2743
|
-
let
|
|
2743
|
+
let V = (e) => {
|
|
2744
2744
|
O.field.onChange(e), C?.(e);
|
|
2745
|
-
},
|
|
2745
|
+
}, H = () => {
|
|
2746
2746
|
P(!1), I(""), R(void 0);
|
|
2747
2747
|
}, U = (e) => {
|
|
2748
2748
|
if (g) return;
|
|
2749
2749
|
if (!o) {
|
|
2750
|
-
|
|
2750
|
+
V(e), H();
|
|
2751
2751
|
return;
|
|
2752
2752
|
}
|
|
2753
|
-
let t =
|
|
2754
|
-
|
|
2753
|
+
let t = te.includes(e) ? te.filter((t) => t !== e) : [...te, e];
|
|
2754
|
+
V(t);
|
|
2755
2755
|
}, ae = (e) => {
|
|
2756
2756
|
if (!g) {
|
|
2757
2757
|
if (!o) {
|
|
2758
|
-
|
|
2758
|
+
V("");
|
|
2759
2759
|
return;
|
|
2760
2760
|
}
|
|
2761
|
-
|
|
2761
|
+
V(te.filter((t) => t !== e));
|
|
2762
2762
|
}
|
|
2763
2763
|
}, oe = () => {
|
|
2764
|
-
g ||
|
|
2764
|
+
g || V(o ? [] : "");
|
|
2765
2765
|
}, se = () => {
|
|
2766
2766
|
let e = M.current;
|
|
2767
2767
|
if (!e) return;
|
|
@@ -2786,7 +2786,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
2786
2786
|
}, [N]), u(() => {
|
|
2787
2787
|
let e = (e) => {
|
|
2788
2788
|
let t = e.target;
|
|
2789
|
-
j.current?.contains(t) ||
|
|
2789
|
+
j.current?.contains(t) || H();
|
|
2790
2790
|
};
|
|
2791
2791
|
return document.addEventListener("pointerdown", e), () => {
|
|
2792
2792
|
document.removeEventListener("pointerdown", e);
|
|
@@ -2810,12 +2810,12 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
2810
2810
|
onScroll: (e) => {
|
|
2811
2811
|
B(e.currentTarget.scrollTop);
|
|
2812
2812
|
},
|
|
2813
|
-
children:
|
|
2814
|
-
let e = Math.max(72, (L?.maxHeight ?? 288) - yn), t = Math.max(1, Math.ceil(e / bn)), n = Math.max(0, Math.floor(z / bn) - xn), r = Math.min(
|
|
2813
|
+
children: ie.length ? (() => {
|
|
2814
|
+
let e = Math.max(72, (L?.maxHeight ?? 288) - yn), t = Math.max(1, Math.ceil(e / bn)), n = Math.max(0, Math.floor(z / bn) - xn), r = Math.min(ie.length, n + t + 12), i = n * bn, a = Math.max(0, (ie.length - r) * bn), s = ie.slice(n, r);
|
|
2815
2815
|
return /* @__PURE__ */ y(_, { children: [
|
|
2816
2816
|
i > 0 && /* @__PURE__ */ v("div", { style: { height: i } }),
|
|
2817
2817
|
s.map((e) => {
|
|
2818
|
-
let t =
|
|
2818
|
+
let t = te.includes(e.value);
|
|
2819
2819
|
return /* @__PURE__ */ y("button", {
|
|
2820
2820
|
type: "button",
|
|
2821
2821
|
onClick: () => U(e.value),
|
|
@@ -2871,10 +2871,10 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
2871
2871
|
withRightIcon: !0,
|
|
2872
2872
|
withLeftIcon: !!D,
|
|
2873
2873
|
disabled: g
|
|
2874
|
-
}), "flex items-center gap-1.5 text-left", o &&
|
|
2874
|
+
}), "flex items-center gap-1.5 text-left", o && re.length > 1 && "h-auto min-h-[2.5rem] py-2"),
|
|
2875
2875
|
children: [/* @__PURE__ */ v("span", {
|
|
2876
2876
|
className: "flex min-w-0 flex-1 flex-wrap items-center gap-1",
|
|
2877
|
-
children:
|
|
2877
|
+
children: re.length ? o ? /* @__PURE__ */ y(_, { children: [re.slice(0, Math.max(0, S)).map((e) => /* @__PURE__ */ y("span", {
|
|
2878
2878
|
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",
|
|
2879
2879
|
children: [/* @__PURE__ */ v("span", {
|
|
2880
2880
|
className: "truncate",
|
|
@@ -2887,19 +2887,19 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
2887
2887
|
className: "rounded text-slate-400 hover:text-slate-700",
|
|
2888
2888
|
children: /* @__PURE__ */ v(q, { size: 12 })
|
|
2889
2889
|
})]
|
|
2890
|
-
}, e.value)),
|
|
2890
|
+
}, e.value)), re.length > S && /* @__PURE__ */ y("span", {
|
|
2891
2891
|
className: "inline-flex items-center rounded bg-slate-100 px-1.5 py-0.5 text-xs text-slate-500",
|
|
2892
|
-
children: ["+",
|
|
2892
|
+
children: ["+", re.length - S]
|
|
2893
2893
|
})] }) : /* @__PURE__ */ v("span", {
|
|
2894
2894
|
className: "truncate",
|
|
2895
|
-
children:
|
|
2895
|
+
children: re[0]?.label
|
|
2896
2896
|
}) : /* @__PURE__ */ v("span", {
|
|
2897
2897
|
className: "text-slate-400",
|
|
2898
2898
|
children: c
|
|
2899
2899
|
})
|
|
2900
2900
|
}), /* @__PURE__ */ y("span", {
|
|
2901
2901
|
className: "flex items-center gap-1",
|
|
2902
|
-
children: [
|
|
2902
|
+
children: [re.length > 0 && !g && /* @__PURE__ */ v("button", {
|
|
2903
2903
|
type: "button",
|
|
2904
2904
|
onClick: (e) => {
|
|
2905
2905
|
e.stopPropagation(), oe();
|
|
@@ -3073,7 +3073,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3073
3073
|
pageSize: f
|
|
3074
3074
|
}), z = p(() => c ? Jt(j.field.value) : j.field.value ? [String(j.field.value)] : [], [j.field.value, c]), B = p(() => n.filter((e) => z.includes(e.value)), [n, z]), ee = (e) => {
|
|
3075
3075
|
j.field.onChange(e), m?.(e);
|
|
3076
|
-
},
|
|
3076
|
+
}, te = (e) => {
|
|
3077
3077
|
if (u || d) return;
|
|
3078
3078
|
if (!c) {
|
|
3079
3079
|
ee(e), j.field.onBlur();
|
|
@@ -3081,7 +3081,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3081
3081
|
}
|
|
3082
3082
|
let t = z.includes(e) ? z.filter((t) => t !== e) : [...z, e];
|
|
3083
3083
|
ee(t), j.field.onBlur();
|
|
3084
|
-
},
|
|
3084
|
+
}, ne = (e) => {
|
|
3085
3085
|
if (!(u || d)) {
|
|
3086
3086
|
if (!c) {
|
|
3087
3087
|
ee(""), j.field.onBlur();
|
|
@@ -3089,9 +3089,9 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3089
3089
|
}
|
|
3090
3090
|
ee(z.filter((t) => t !== e)), j.field.onBlur();
|
|
3091
3091
|
}
|
|
3092
|
-
},
|
|
3092
|
+
}, re = () => {
|
|
3093
3093
|
u || d || (ee(c ? [] : ""), j.field.onBlur());
|
|
3094
|
-
},
|
|
3094
|
+
}, ie = p(() => [
|
|
3095
3095
|
{
|
|
3096
3096
|
id: "selected",
|
|
3097
3097
|
header: "",
|
|
@@ -3123,9 +3123,9 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3123
3123
|
c,
|
|
3124
3124
|
u,
|
|
3125
3125
|
z
|
|
3126
|
-
]),
|
|
3126
|
+
]), V = M({
|
|
3127
3127
|
data: n,
|
|
3128
|
-
columns:
|
|
3128
|
+
columns: ie,
|
|
3129
3129
|
state: {
|
|
3130
3130
|
globalFilter: F,
|
|
3131
3131
|
pagination: L
|
|
@@ -3147,7 +3147,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3147
3147
|
return n != null && String(n).toLowerCase().includes(r);
|
|
3148
3148
|
});
|
|
3149
3149
|
}
|
|
3150
|
-
}),
|
|
3150
|
+
}), H = V.getRowModel().rows, U = V.getFilteredRowModel().rows.length, ae = Math.max(0, f - H.length), oe = V.getState().pagination.pageIndex + 1, se = Math.max(1, V.getPageCount()), W = V.getAllLeafColumns().length, ce = C > 0 && F.trim().length < C;
|
|
3151
3151
|
return /* @__PURE__ */ v(Z, {
|
|
3152
3152
|
id: N,
|
|
3153
3153
|
label: a,
|
|
@@ -3171,7 +3171,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3171
3171
|
disabled: u || d,
|
|
3172
3172
|
placeholder: d ? "Cargando..." : x ?? "Buscar...",
|
|
3173
3173
|
onBlur: () => j.field.onBlur(),
|
|
3174
|
-
onChange: (e) =>
|
|
3174
|
+
onChange: (e) => V.setGlobalFilter(e.target.value),
|
|
3175
3175
|
className: "h-8 w-full bg-transparent text-sm text-slate-900 outline-none placeholder:text-slate-400 disabled:cursor-not-allowed"
|
|
3176
3176
|
})]
|
|
3177
3177
|
}),
|
|
@@ -3195,7 +3195,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3195
3195
|
children: e.label
|
|
3196
3196
|
}), !u && /* @__PURE__ */ v("button", {
|
|
3197
3197
|
type: "button",
|
|
3198
|
-
onClick: () =>
|
|
3198
|
+
onClick: () => ne(e.value),
|
|
3199
3199
|
className: "shrink-0 rounded text-slate-400 hover:text-slate-700",
|
|
3200
3200
|
children: /* @__PURE__ */ v(q, { size: 12 })
|
|
3201
3201
|
})]
|
|
@@ -3206,7 +3206,7 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3206
3206
|
})]
|
|
3207
3207
|
}), B.length > 0 && !u && !d && /* @__PURE__ */ v("button", {
|
|
3208
3208
|
type: "button",
|
|
3209
|
-
onClick:
|
|
3209
|
+
onClick: re,
|
|
3210
3210
|
className: "shrink-0 text-xs font-medium text-slate-500 hover:text-slate-900",
|
|
3211
3211
|
children: "Limpiar"
|
|
3212
3212
|
})]
|
|
@@ -3231,10 +3231,10 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3231
3231
|
]
|
|
3232
3232
|
}) : /* @__PURE__ */ v("table", {
|
|
3233
3233
|
className: "w-full table-fixed border-collapse text-sm",
|
|
3234
|
-
children: /* @__PURE__ */ v("tbody", { children:
|
|
3234
|
+
children: /* @__PURE__ */ v("tbody", { children: H.length ? /* @__PURE__ */ y(_, { children: [H.map((e) => {
|
|
3235
3235
|
let t = z.includes(e.original.value);
|
|
3236
3236
|
return /* @__PURE__ */ v("tr", {
|
|
3237
|
-
onClick: () =>
|
|
3237
|
+
onClick: () => te(e.original.value),
|
|
3238
3238
|
className: (0, X.default)("h-10 border-b border-slate-100 last:border-b-0", u || d ? "cursor-default" : "cursor-pointer hover:bg-slate-50", t && "bg-slate-50"),
|
|
3239
3239
|
children: e.getVisibleCells().map((e) => /* @__PURE__ */ v("td", {
|
|
3240
3240
|
className: (0, X.default)("px-3 py-2 align-middle text-slate-700", e.column.id === "selected" && "w-10"),
|
|
@@ -3276,8 +3276,8 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3276
3276
|
children: [
|
|
3277
3277
|
/* @__PURE__ */ v("button", {
|
|
3278
3278
|
type: "button",
|
|
3279
|
-
disabled: u || d || !
|
|
3280
|
-
onClick: () =>
|
|
3279
|
+
disabled: u || d || !V.getCanPreviousPage(),
|
|
3280
|
+
onClick: () => V.previousPage(),
|
|
3281
3281
|
className: "rounded border border-slate-300 bg-white px-2 py-1 text-xs text-slate-700 disabled:cursor-not-allowed disabled:opacity-50",
|
|
3282
3282
|
children: "Anterior"
|
|
3283
3283
|
}),
|
|
@@ -3291,8 +3291,8 @@ var X = /* @__PURE__ */ Ie((/* @__PURE__ */ Pe(((e, t) => {
|
|
|
3291
3291
|
}),
|
|
3292
3292
|
/* @__PURE__ */ v("button", {
|
|
3293
3293
|
type: "button",
|
|
3294
|
-
disabled: u || d || !
|
|
3295
|
-
onClick: () =>
|
|
3294
|
+
disabled: u || d || !V.getCanNextPage(),
|
|
3295
|
+
onClick: () => V.nextPage(),
|
|
3296
3296
|
className: "rounded border border-slate-300 bg-white px-2 py-1 text-xs text-slate-700 disabled:cursor-not-allowed disabled:opacity-50",
|
|
3297
3297
|
children: "Siguiente"
|
|
3298
3298
|
})
|
|
@@ -4657,7 +4657,7 @@ var Er = (e) => {
|
|
|
4657
4657
|
for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
|
|
4658
4658
|
return !0;
|
|
4659
4659
|
};
|
|
4660
|
-
function kr({ 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 = 25, paginationVariant: g = "classic", pageSizeOptions: b, serverPagination: x, fillParentHeight: S = !1, maxBodyHeightPx: C, className: w = "", emptyMessage: N = "No hay datos", title: P = "Tabla", subtitle: F, sidePanel: I = !1, onGroupingChange: L, toolbarSlot: R, belowToolbarSlot: z, loading: B = !1, loadingMessage: ee = "Cargando...", isFetching:
|
|
4660
|
+
function kr({ 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 = 25, paginationVariant: g = "classic", pageSizeOptions: b, serverPagination: x, fillParentHeight: S = !1, maxBodyHeightPx: C, className: w = "", emptyMessage: N = "No hay datos", title: P = "Tabla", subtitle: F, sidePanel: I = !1, onGroupingChange: L, toolbarSlot: R, belowToolbarSlot: z, loading: B = !1, loadingMessage: ee = "Cargando...", isFetching: te = !1, error: ne, onRetry: re, onRefresh: ie, onRowClick: V, enableRowSelection: H = !0, getRowActions: U, getBulkActions: ae, bulkActionsSlot: oe, onSelectionChange: se, headerVariant: W = "default", searchPlaceholder: ce = "Buscar...", embedded: le = !1, detail: ue, controller: de }) {
|
|
4661
4661
|
let [fe, pe] = h(o), [me, he] = h(() => o.length > 0 ? {} : !0), [ge, _e] = h([]), [ve, ye] = h(""), [be, xe] = h([]), [Se, Ce] = h({}), [we, Te] = h({}), [Ee, De] = h(() => Tr(i).map((e) => e.id)), [G, Oe] = h({}), [ke, Ae] = h({
|
|
4662
4662
|
pageIndex: 0,
|
|
4663
4663
|
pageSize: f
|
|
@@ -4674,9 +4674,9 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4674
4674
|
}));
|
|
4675
4675
|
}, Je = p(() => {
|
|
4676
4676
|
let e = [];
|
|
4677
|
-
return We && e.push("__detail"),
|
|
4677
|
+
return We && e.push("__detail"), H && e.push("__select"), U && e.push("__actions"), e;
|
|
4678
4678
|
}, [
|
|
4679
|
-
|
|
4679
|
+
H,
|
|
4680
4680
|
U,
|
|
4681
4681
|
We
|
|
4682
4682
|
]), K = p(() => {
|
|
@@ -4708,10 +4708,10 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4708
4708
|
return e;
|
|
4709
4709
|
}, [i, r]), ct = p(() => wr(i, G), [G, i]), lt = p(() => {
|
|
4710
4710
|
let e = [];
|
|
4711
|
-
return We && e.push("__detail"),
|
|
4711
|
+
return We && e.push("__detail"), H && e.push("__select"), e.push(...Ee), U && e.push("__actions"), e;
|
|
4712
4712
|
}, [
|
|
4713
4713
|
Ee,
|
|
4714
|
-
|
|
4714
|
+
H,
|
|
4715
4715
|
U,
|
|
4716
4716
|
We
|
|
4717
4717
|
]), ut = p(() => {
|
|
@@ -4783,13 +4783,13 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4783
4783
|
} : null;
|
|
4784
4784
|
return [
|
|
4785
4785
|
...n ? [n] : [],
|
|
4786
|
-
...
|
|
4786
|
+
...H ? [e] : [],
|
|
4787
4787
|
...ct,
|
|
4788
4788
|
...t ? [t] : []
|
|
4789
4789
|
];
|
|
4790
4790
|
}, [
|
|
4791
4791
|
ct,
|
|
4792
|
-
|
|
4792
|
+
H,
|
|
4793
4793
|
U,
|
|
4794
4794
|
Re,
|
|
4795
4795
|
We,
|
|
@@ -4921,7 +4921,7 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
4921
4921
|
getSubRows: (e) => e.subRows,
|
|
4922
4922
|
getPaginationRowModel: je ? A() : void 0,
|
|
4923
4923
|
filterFns: { columnFilter: _r },
|
|
4924
|
-
enableRowSelection:
|
|
4924
|
+
enableRowSelection: H
|
|
4925
4925
|
});
|
|
4926
4926
|
Ze.current = Y;
|
|
4927
4927
|
let pt = je ? Y.getPrePaginationRowModel().rows.length : 0;
|
|
@@ -5234,20 +5234,20 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5234
5234
|
})] }), /* @__PURE__ */ y("div", {
|
|
5235
5235
|
className: "sf-table-toolbar-actions",
|
|
5236
5236
|
children: [
|
|
5237
|
-
(
|
|
5237
|
+
(te || ie) && /* @__PURE__ */ y("div", {
|
|
5238
5238
|
className: "flex items-center gap-2",
|
|
5239
|
-
children: [
|
|
5239
|
+
children: [te && /* @__PURE__ */ y("span", {
|
|
5240
5240
|
className: "sf-table-toolbar-status",
|
|
5241
5241
|
children: [/* @__PURE__ */ v("span", {
|
|
5242
5242
|
className: "sf-table-spinner sf-table-spinner--sm",
|
|
5243
5243
|
"aria-hidden": "true"
|
|
5244
5244
|
}), "Actualizando"]
|
|
5245
|
-
}),
|
|
5245
|
+
}), ie && /* @__PURE__ */ v("button", {
|
|
5246
5246
|
type: "button",
|
|
5247
5247
|
"aria-label": "Refrescar",
|
|
5248
5248
|
className: "sf-table-toolbar-btn",
|
|
5249
|
-
disabled:
|
|
5250
|
-
onClick:
|
|
5249
|
+
disabled: te,
|
|
5250
|
+
onClick: ie,
|
|
5251
5251
|
children: /* @__PURE__ */ v(Kn, {
|
|
5252
5252
|
className: "h-5 w-5",
|
|
5253
5253
|
"aria-hidden": "true"
|
|
@@ -5308,7 +5308,7 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5308
5308
|
children: "Agrupado"
|
|
5309
5309
|
}),
|
|
5310
5310
|
typeof R == "function" ? R(mt, { clearSelection: () => Y.resetRowSelection() }) : R,
|
|
5311
|
-
|
|
5311
|
+
H && mt.length > 0 && /* @__PURE__ */ y("div", {
|
|
5312
5312
|
className: "flex items-center gap-2",
|
|
5313
5313
|
children: [(() => {
|
|
5314
5314
|
let e = ae?.(mt, { clearSelection: () => Y.resetRowSelection() }) ?? [];
|
|
@@ -5346,12 +5346,12 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5346
5346
|
]
|
|
5347
5347
|
})]
|
|
5348
5348
|
}),
|
|
5349
|
-
|
|
5349
|
+
ne != null && /* @__PURE__ */ y("div", {
|
|
5350
5350
|
className: "sf-table-error",
|
|
5351
|
-
children: [/* @__PURE__ */ v("div", { children:
|
|
5351
|
+
children: [/* @__PURE__ */ v("div", { children: ne }), re && /* @__PURE__ */ v("button", {
|
|
5352
5352
|
type: "button",
|
|
5353
5353
|
className: "sf-table-error__retry",
|
|
5354
|
-
onClick:
|
|
5354
|
+
onClick: re,
|
|
5355
5355
|
children: "Reintentar"
|
|
5356
5356
|
})]
|
|
5357
5357
|
}),
|
|
@@ -5406,9 +5406,9 @@ function kr({ id: e, stateStore: t, data: r, columns: i, grouping: a, defaultGro
|
|
|
5406
5406
|
}) }) : /* @__PURE__ */ v(_, { children: Y.getRowModel().rows.map((e) => {
|
|
5407
5407
|
let t = We && !e.getIsGrouped() && Ge(e.original) && Ke(e.id, e.original);
|
|
5408
5408
|
return /* @__PURE__ */ y(n, { children: [/* @__PURE__ */ v("tr", {
|
|
5409
|
-
className: (0, X.default)("sf-table-row", e.getIsGrouped() && "sf-table-row--group",
|
|
5410
|
-
onClick:
|
|
5411
|
-
t.target.closest("button, a, input, select, label, [role=\"button\"]") ||
|
|
5409
|
+
className: (0, X.default)("sf-table-row", e.getIsGrouped() && "sf-table-row--group", V && !e.getIsGrouped() && "sf-table-row--clickable", t && "sf-table-row--detail-open"),
|
|
5410
|
+
onClick: V && !e.getIsGrouped() ? (t) => {
|
|
5411
|
+
t.target.closest("button, a, input, select, label, [role=\"button\"]") || V(e.original);
|
|
5412
5412
|
} : void 0,
|
|
5413
5413
|
children: e.getVisibleCells().map((t) => {
|
|
5414
5414
|
let n = t.getIsGrouped(), r = t.getIsAggregated(), i = t.getIsPlaceholder();
|
|
@@ -9579,13 +9579,13 @@ var jr = (e) => {
|
|
|
9579
9579
|
lng: e.lng
|
|
9580
9580
|
}), a(Xo(e.lat), Xo(e.lng));
|
|
9581
9581
|
}
|
|
9582
|
-
}), /* @__PURE__ */ y(
|
|
9582
|
+
}), /* @__PURE__ */ y(te, {
|
|
9583
9583
|
center: o,
|
|
9584
9584
|
zoom: n,
|
|
9585
9585
|
scrollWheelZoom: !r,
|
|
9586
9586
|
className: "sf-map-frame",
|
|
9587
9587
|
children: [
|
|
9588
|
-
/* @__PURE__ */ v(
|
|
9588
|
+
/* @__PURE__ */ v(V, {
|
|
9589
9589
|
attribution: ts,
|
|
9590
9590
|
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
|
9591
9591
|
}),
|
|
@@ -9598,7 +9598,7 @@ var jr = (e) => {
|
|
|
9598
9598
|
readOnly: r,
|
|
9599
9599
|
onPick: a
|
|
9600
9600
|
}),
|
|
9601
|
-
/* @__PURE__ */ v(
|
|
9601
|
+
/* @__PURE__ */ v(ne, {
|
|
9602
9602
|
position: o,
|
|
9603
9603
|
icon: qo,
|
|
9604
9604
|
draggable: !r,
|
|
@@ -10627,50 +10627,74 @@ var jr = (e) => {
|
|
|
10627
10627
|
lg: 150,
|
|
10628
10628
|
xl: 285
|
|
10629
10629
|
}, yc = {
|
|
10630
|
+
xs: 6,
|
|
10631
|
+
sm: 8,
|
|
10632
|
+
md: 10,
|
|
10633
|
+
lg: 13,
|
|
10634
|
+
xl: 25
|
|
10635
|
+
}, bc = {
|
|
10630
10636
|
xs: 13,
|
|
10631
10637
|
sm: 18,
|
|
10632
10638
|
md: 24,
|
|
10633
10639
|
lg: 34,
|
|
10634
10640
|
xl: 64
|
|
10635
|
-
},
|
|
10641
|
+
}, xc = {
|
|
10636
10642
|
xs: 8,
|
|
10637
10643
|
sm: 10,
|
|
10638
10644
|
md: 11,
|
|
10639
10645
|
lg: 13,
|
|
10640
10646
|
xl: 24
|
|
10641
|
-
},
|
|
10647
|
+
}, Sc = .2, Cc = .6, wc = .86, Tc = (e, t) => {
|
|
10648
|
+
let n = vc[e], r = Math.min(t ?? yc[e], Math.round(n * Sc)), i = (n - r) / 2;
|
|
10649
|
+
return {
|
|
10650
|
+
dim: n,
|
|
10651
|
+
stroke: r,
|
|
10652
|
+
radius: i,
|
|
10653
|
+
center: n / 2,
|
|
10654
|
+
circumference: 2 * Math.PI * i,
|
|
10655
|
+
hole: n - 2 * r
|
|
10656
|
+
};
|
|
10657
|
+
}, Ec = (e, t, n) => {
|
|
10658
|
+
let r = Math.max(1, String(n).length), i = t * wc / (Cc * r);
|
|
10659
|
+
return Math.floor(Math.min(e, i) * 2) / 2;
|
|
10660
|
+
}, Dc = (e, t) => `${+(e / t * 100).toFixed(2)}cqw`, Oc = (e, t, n, r) => {
|
|
10661
|
+
let i = Ec(n, e.hole, t), a = Math.min(r, i * .6);
|
|
10662
|
+
return {
|
|
10663
|
+
"--sf-donut-dim": `${e.dim}px`,
|
|
10664
|
+
"--sf-donut-inset": `${+(e.stroke / e.dim * 100).toFixed(2)}%`,
|
|
10665
|
+
"--sf-donut-value": Dc(i, e.dim),
|
|
10666
|
+
"--sf-donut-label": Dc(a, e.dim)
|
|
10667
|
+
};
|
|
10668
|
+
}, kc = {
|
|
10669
|
+
xs: 8,
|
|
10670
|
+
sm: 10,
|
|
10671
|
+
md: 11,
|
|
10672
|
+
lg: 13,
|
|
10673
|
+
xl: 24
|
|
10674
|
+
}, Ac = {
|
|
10642
10675
|
xs: 7,
|
|
10643
10676
|
sm: 9,
|
|
10644
10677
|
md: 10,
|
|
10645
10678
|
lg: 12,
|
|
10646
10679
|
xl: 22
|
|
10647
|
-
},
|
|
10648
|
-
xs: 6,
|
|
10649
|
-
sm: 8,
|
|
10650
|
-
md: 10,
|
|
10651
|
-
lg: 13,
|
|
10652
|
-
xl: 25
|
|
10653
|
-
}, Cc = "var(--sf-success)", wc = "var(--sf-warning)", Tc = "var(--sf-danger)", Ec = (e, t, n) => {
|
|
10680
|
+
}, jc = "var(--sf-success)", Mc = "var(--sf-warning)", Nc = "var(--sf-danger)", Pc = (e, t, n) => {
|
|
10654
10681
|
let { warning: r, critical: i } = n;
|
|
10655
|
-
return t ? e >= i ?
|
|
10656
|
-
},
|
|
10682
|
+
return t ? e >= i ? jc : e >= r ? Mc : Nc : e < r ? jc : e < i ? Mc : Nc;
|
|
10683
|
+
}, Fc = ({ value: e, label: t, sublabel: n, size: r = "md", color: i, thresholds: a = {
|
|
10657
10684
|
warning: 70,
|
|
10658
10685
|
critical: 90
|
|
10659
10686
|
}, inverse: o = !1, showValue: s = !0, strokeWidth: c, className: l }) => {
|
|
10660
|
-
let u = Math.max(0, Math.min(100, e)), d =
|
|
10687
|
+
let u = Math.max(0, Math.min(100, e)), d = Tc(r, c), f = d.circumference * (1 - u / 100), p = i ?? Pc(u, o, a);
|
|
10661
10688
|
return /* @__PURE__ */ y("div", {
|
|
10662
10689
|
className: (0, X.default)("sf-donut-gauge", l),
|
|
10663
10690
|
children: [
|
|
10664
10691
|
/* @__PURE__ */ y("div", {
|
|
10665
|
-
className: "
|
|
10666
|
-
style: {
|
|
10667
|
-
width: d,
|
|
10668
|
-
height: d
|
|
10669
|
-
},
|
|
10692
|
+
className: "sf-donut__ring",
|
|
10693
|
+
style: Oc(d, `${u}%`, bc[r], xc[r]),
|
|
10670
10694
|
children: [/* @__PURE__ */ y("svg", {
|
|
10671
|
-
width:
|
|
10672
|
-
height:
|
|
10673
|
-
viewBox: `0 0 ${d} ${d}`,
|
|
10695
|
+
width: "100%",
|
|
10696
|
+
height: "100%",
|
|
10697
|
+
viewBox: `0 0 ${d.dim} ${d.dim}`,
|
|
10674
10698
|
style: { transform: "rotate(-90deg)" },
|
|
10675
10699
|
"aria-label": t ?? "Indicador",
|
|
10676
10700
|
"aria-valuemin": 0,
|
|
@@ -10678,31 +10702,30 @@ var jr = (e) => {
|
|
|
10678
10702
|
"aria-valuenow": u,
|
|
10679
10703
|
role: "progressbar",
|
|
10680
10704
|
children: [/* @__PURE__ */ v("circle", {
|
|
10681
|
-
cx:
|
|
10682
|
-
cy:
|
|
10683
|
-
r:
|
|
10705
|
+
cx: d.center,
|
|
10706
|
+
cy: d.center,
|
|
10707
|
+
r: d.radius,
|
|
10684
10708
|
fill: "none",
|
|
10685
10709
|
stroke: "var(--sf-gauge-track)",
|
|
10686
|
-
strokeWidth:
|
|
10710
|
+
strokeWidth: d.stroke
|
|
10687
10711
|
}), /* @__PURE__ */ v("circle", {
|
|
10688
|
-
cx:
|
|
10689
|
-
cy:
|
|
10690
|
-
r:
|
|
10712
|
+
cx: d.center,
|
|
10713
|
+
cy: d.center,
|
|
10714
|
+
r: d.radius,
|
|
10691
10715
|
fill: "none",
|
|
10692
|
-
stroke:
|
|
10693
|
-
strokeWidth:
|
|
10716
|
+
stroke: p,
|
|
10717
|
+
strokeWidth: d.stroke,
|
|
10694
10718
|
strokeLinecap: "round",
|
|
10695
|
-
strokeDasharray:
|
|
10696
|
-
strokeDashoffset:
|
|
10719
|
+
strokeDasharray: d.circumference,
|
|
10720
|
+
strokeDashoffset: f,
|
|
10697
10721
|
style: { transition: "stroke-dashoffset 0.5s ease, stroke 0.3s ease" }
|
|
10698
10722
|
})]
|
|
10699
10723
|
}), s && /* @__PURE__ */ v("div", {
|
|
10700
|
-
className: "
|
|
10724
|
+
className: "sf-donut__center",
|
|
10701
10725
|
children: /* @__PURE__ */ y("span", {
|
|
10702
10726
|
className: "sf-donut-gauge__value",
|
|
10703
|
-
style: { fontSize: yc[r] },
|
|
10704
10727
|
children: [u, /* @__PURE__ */ v("span", {
|
|
10705
|
-
|
|
10728
|
+
className: "sf-donut-gauge__unit",
|
|
10706
10729
|
children: "%"
|
|
10707
10730
|
})]
|
|
10708
10731
|
})
|
|
@@ -10710,59 +10733,35 @@ var jr = (e) => {
|
|
|
10710
10733
|
}),
|
|
10711
10734
|
t && /* @__PURE__ */ v("span", {
|
|
10712
10735
|
className: "sf-donut-gauge__label",
|
|
10713
|
-
style: { fontSize:
|
|
10736
|
+
style: { fontSize: kc[r] },
|
|
10714
10737
|
children: t
|
|
10715
10738
|
}),
|
|
10716
10739
|
n && /* @__PURE__ */ v("span", {
|
|
10717
10740
|
className: "sf-donut-gauge__sublabel",
|
|
10718
|
-
style: { fontSize:
|
|
10741
|
+
style: { fontSize: Ac[r] },
|
|
10719
10742
|
children: n
|
|
10720
10743
|
})
|
|
10721
10744
|
]
|
|
10722
10745
|
});
|
|
10723
|
-
},
|
|
10746
|
+
}, Ic = ({ gauges: e, size: t = "sm", className: n }) => /* @__PURE__ */ v("div", {
|
|
10724
10747
|
className: (0, X.default)("flex flex-wrap items-start gap-4", n),
|
|
10725
|
-
children: e.map((e, n) => /* @__PURE__ */ v(
|
|
10748
|
+
children: e.map((e, n) => /* @__PURE__ */ v(Fc, {
|
|
10726
10749
|
...e,
|
|
10727
10750
|
size: e.size ?? t
|
|
10728
10751
|
}, n))
|
|
10729
|
-
}),
|
|
10730
|
-
xs: 56,
|
|
10731
|
-
sm: 80,
|
|
10732
|
-
md: 110,
|
|
10733
|
-
lg: 150,
|
|
10734
|
-
xl: 285
|
|
10735
|
-
}, jc = {
|
|
10736
|
-
xs: 6,
|
|
10737
|
-
sm: 8,
|
|
10738
|
-
md: 10,
|
|
10739
|
-
lg: 13,
|
|
10740
|
-
xl: 25
|
|
10741
|
-
}, Mc = {
|
|
10742
|
-
xs: 13,
|
|
10743
|
-
sm: 18,
|
|
10744
|
-
md: 24,
|
|
10745
|
-
lg: 34,
|
|
10746
|
-
xl: 64
|
|
10747
|
-
}, Nc = {
|
|
10748
|
-
xs: 8,
|
|
10749
|
-
sm: 10,
|
|
10750
|
-
md: 11,
|
|
10751
|
-
lg: 13,
|
|
10752
|
-
xl: 24
|
|
10753
|
-
}, Pc = [
|
|
10752
|
+
}), Lc = (e) => `${Math.round(e * 100)}%`, Rc = [
|
|
10754
10753
|
"var(--sf-primary)",
|
|
10755
10754
|
"var(--sf-info)",
|
|
10756
10755
|
"var(--sf-warning)",
|
|
10757
10756
|
"var(--sf-accent)"
|
|
10758
|
-
],
|
|
10759
|
-
let l = e.reduce((e, t) => e + Math.max(0, t.value), 0), u =
|
|
10760
|
-
let n =
|
|
10757
|
+
], zc = ({ segments: e, centerValue: t, centerLabel: n, size: r = "md", strokeWidth: i, showLegend: a = !0, legendVariant: o = "list", formatPct: s = Lc, className: c }) => {
|
|
10758
|
+
let l = e.reduce((e, t) => e + Math.max(0, t.value), 0), u = Tc(r, i), d = String(t ?? l.toLocaleString("es-PE")), f = e.map((e) => l > 0 ? Math.max(0, e.value) / l : 0), p = e.map((e, t) => {
|
|
10759
|
+
let n = f[t], r = u.circumference * n, i = f.slice(0, t).reduce((e, t) => e + t, 0), a = u.circumference * (1 - i);
|
|
10761
10760
|
return {
|
|
10762
10761
|
...e,
|
|
10763
10762
|
pct: n,
|
|
10764
|
-
color: e.color ??
|
|
10765
|
-
dasharray: `${r} ${
|
|
10763
|
+
color: e.color ?? Rc[t % Rc.length],
|
|
10764
|
+
dasharray: `${r} ${u.circumference - r}`,
|
|
10766
10765
|
dashoffset: a
|
|
10767
10766
|
};
|
|
10768
10767
|
});
|
|
@@ -10770,50 +10769,45 @@ var jr = (e) => {
|
|
|
10770
10769
|
className: (0, X.default)("sf-donut-breakdown", o === "stat" && "sf-donut-breakdown--stat", c),
|
|
10771
10770
|
children: [
|
|
10772
10771
|
/* @__PURE__ */ y("div", {
|
|
10773
|
-
className: "
|
|
10774
|
-
style:
|
|
10775
|
-
width: u,
|
|
10776
|
-
height: u
|
|
10777
|
-
},
|
|
10772
|
+
className: "sf-donut__ring",
|
|
10773
|
+
style: Oc(u, d, bc[r], xc[r]),
|
|
10778
10774
|
children: [/* @__PURE__ */ v("svg", {
|
|
10779
|
-
width:
|
|
10780
|
-
height:
|
|
10781
|
-
viewBox: `0 0 ${u} ${u}`,
|
|
10775
|
+
width: "100%",
|
|
10776
|
+
height: "100%",
|
|
10777
|
+
viewBox: `0 0 ${u.dim} ${u.dim}`,
|
|
10782
10778
|
style: { transform: "rotate(-90deg)" },
|
|
10783
10779
|
"aria-hidden": "true",
|
|
10784
10780
|
children: l <= 0 ? /* @__PURE__ */ v("circle", {
|
|
10785
|
-
cx:
|
|
10786
|
-
cy:
|
|
10787
|
-
r:
|
|
10781
|
+
cx: u.center,
|
|
10782
|
+
cy: u.center,
|
|
10783
|
+
r: u.radius,
|
|
10788
10784
|
fill: "none",
|
|
10789
10785
|
stroke: "var(--sf-gauge-track)",
|
|
10790
|
-
strokeWidth:
|
|
10791
|
-
}) :
|
|
10792
|
-
cx:
|
|
10793
|
-
cy:
|
|
10794
|
-
r:
|
|
10786
|
+
strokeWidth: u.stroke
|
|
10787
|
+
}) : p.map((e, t) => /* @__PURE__ */ v("circle", {
|
|
10788
|
+
cx: u.center,
|
|
10789
|
+
cy: u.center,
|
|
10790
|
+
r: u.radius,
|
|
10795
10791
|
fill: "none",
|
|
10796
10792
|
stroke: e.color,
|
|
10797
|
-
strokeWidth:
|
|
10793
|
+
strokeWidth: u.stroke,
|
|
10798
10794
|
strokeDasharray: e.dasharray,
|
|
10799
10795
|
strokeDashoffset: e.dashoffset
|
|
10800
10796
|
}, `${e.label}-${t}`))
|
|
10801
10797
|
}), /* @__PURE__ */ y("div", {
|
|
10802
|
-
className: "
|
|
10798
|
+
className: "sf-donut__center",
|
|
10803
10799
|
children: [/* @__PURE__ */ v("span", {
|
|
10804
10800
|
className: "sf-donut-breakdown__value",
|
|
10805
|
-
|
|
10806
|
-
children: t ?? l.toLocaleString("es-PE")
|
|
10801
|
+
children: d
|
|
10807
10802
|
}), n && /* @__PURE__ */ v("span", {
|
|
10808
10803
|
className: "sf-donut-breakdown__label",
|
|
10809
|
-
style: { fontSize: Nc[r] },
|
|
10810
10804
|
children: n
|
|
10811
10805
|
})]
|
|
10812
10806
|
})]
|
|
10813
10807
|
}),
|
|
10814
10808
|
a && o === "stat" && /* @__PURE__ */ v("ul", {
|
|
10815
10809
|
className: "sf-donut-breakdown__stats",
|
|
10816
|
-
children:
|
|
10810
|
+
children: p.map((e, t) => /* @__PURE__ */ y("li", {
|
|
10817
10811
|
className: "sf-donut-breakdown__stat",
|
|
10818
10812
|
children: [/* @__PURE__ */ v("span", {
|
|
10819
10813
|
className: "sf-donut-breakdown__stat-dot",
|
|
@@ -10834,7 +10828,7 @@ var jr = (e) => {
|
|
|
10834
10828
|
}),
|
|
10835
10829
|
a && o === "list" && /* @__PURE__ */ v("ul", {
|
|
10836
10830
|
className: "sf-donut-breakdown__legend",
|
|
10837
|
-
children:
|
|
10831
|
+
children: p.map((e, t) => /* @__PURE__ */ y("li", {
|
|
10838
10832
|
className: "sf-donut-breakdown__legend-item",
|
|
10839
10833
|
children: [
|
|
10840
10834
|
/* @__PURE__ */ v("span", {
|
|
@@ -10859,27 +10853,27 @@ var jr = (e) => {
|
|
|
10859
10853
|
})
|
|
10860
10854
|
]
|
|
10861
10855
|
});
|
|
10862
|
-
},
|
|
10856
|
+
}, Bc = {
|
|
10863
10857
|
success: "sf-event-log__dot--success",
|
|
10864
10858
|
warning: "sf-event-log__dot--warning",
|
|
10865
10859
|
danger: "sf-event-log__dot--danger",
|
|
10866
10860
|
info: "sf-event-log__dot--info",
|
|
10867
10861
|
default: "sf-event-log__dot--default"
|
|
10868
|
-
},
|
|
10862
|
+
}, Vc = {
|
|
10869
10863
|
success: "sf-event-log__icon-wrap--success",
|
|
10870
10864
|
warning: "sf-event-log__icon-wrap--warning",
|
|
10871
10865
|
danger: "sf-event-log__icon-wrap--danger",
|
|
10872
10866
|
info: "sf-event-log__icon-wrap--info",
|
|
10873
10867
|
default: "sf-event-log__icon-wrap--default"
|
|
10874
|
-
},
|
|
10868
|
+
}, Hc = {
|
|
10875
10869
|
success: "sf-alert-row-list__meta--success",
|
|
10876
10870
|
warning: "sf-alert-row-list__meta--warning",
|
|
10877
10871
|
danger: "sf-alert-row-list__meta--danger",
|
|
10878
10872
|
info: "sf-alert-row-list__meta--info",
|
|
10879
10873
|
default: "sf-alert-row-list__meta--default"
|
|
10880
|
-
},
|
|
10874
|
+
}, Uc = (e, t) => {
|
|
10881
10875
|
t && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), t());
|
|
10882
|
-
},
|
|
10876
|
+
}, Wc = ({ events: e, title: t, maxHeight: n, compact: r = !1, showTimeline: i = !0, viewAllLabel: a, onViewAll: o, className: s }) => {
|
|
10883
10877
|
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";
|
|
10884
10878
|
return /* @__PURE__ */ y("div", {
|
|
10885
10879
|
className: (0, X.default)("sf-event-log", s),
|
|
@@ -10920,11 +10914,11 @@ var jr = (e) => {
|
|
|
10920
10914
|
/* @__PURE__ */ v("div", {
|
|
10921
10915
|
className: "mt-0.5 shrink-0",
|
|
10922
10916
|
children: t.icon ? /* @__PURE__ */ v("div", {
|
|
10923
|
-
className: (0, X.default)("sf-event-log__icon-wrap",
|
|
10917
|
+
className: (0, X.default)("sf-event-log__icon-wrap", Vc[r]),
|
|
10924
10918
|
"aria-hidden": "true",
|
|
10925
10919
|
children: t.icon
|
|
10926
10920
|
}) : /* @__PURE__ */ v("div", {
|
|
10927
|
-
className: (0, X.default)("sf-event-log__dot",
|
|
10921
|
+
className: (0, X.default)("sf-event-log__dot", Bc[r]),
|
|
10928
10922
|
"aria-hidden": "true"
|
|
10929
10923
|
})
|
|
10930
10924
|
}),
|
|
@@ -10958,16 +10952,16 @@ var jr = (e) => {
|
|
|
10958
10952
|
})]
|
|
10959
10953
|
})]
|
|
10960
10954
|
});
|
|
10961
|
-
},
|
|
10955
|
+
}, Gc = {
|
|
10962
10956
|
time: "Hora",
|
|
10963
10957
|
vehicle: "Vehículo",
|
|
10964
10958
|
description: "Descripción"
|
|
10965
|
-
},
|
|
10959
|
+
}, Kc = {
|
|
10966
10960
|
critical: "sf-alert-row-list__severity--critical",
|
|
10967
10961
|
warning: "sf-alert-row-list__severity--warning",
|
|
10968
10962
|
info: !1
|
|
10969
|
-
},
|
|
10970
|
-
let t =
|
|
10963
|
+
}, qc = ({ severity: e }) => {
|
|
10964
|
+
let t = Kc[e];
|
|
10971
10965
|
return t ? /* @__PURE__ */ v("span", {
|
|
10972
10966
|
className: (0, X.default)("sf-alert-row-list__severity", t),
|
|
10973
10967
|
"aria-hidden": "true",
|
|
@@ -11002,7 +10996,7 @@ var jr = (e) => {
|
|
|
11002
10996
|
})] })
|
|
11003
10997
|
})
|
|
11004
10998
|
}) : null;
|
|
11005
|
-
},
|
|
10999
|
+
}, Jc = ({ actions: e }) => /* @__PURE__ */ v("span", {
|
|
11006
11000
|
className: "sf-alert-row-list__actions",
|
|
11007
11001
|
children: e.map((e, t) => /* @__PURE__ */ v("button", {
|
|
11008
11002
|
type: "button",
|
|
@@ -11012,9 +11006,9 @@ var jr = (e) => {
|
|
|
11012
11006
|
},
|
|
11013
11007
|
children: e.label
|
|
11014
11008
|
}, t))
|
|
11015
|
-
}),
|
|
11009
|
+
}), Yc = ({ items: e, maxHeight: t, className: n, columns: r = !1, headerLabels: i, density: a = "comfortable", emptyMessage: o = "Sin alertas" }) => {
|
|
11016
11010
|
let s = {
|
|
11017
|
-
...
|
|
11011
|
+
...Gc,
|
|
11018
11012
|
...i
|
|
11019
11013
|
};
|
|
11020
11014
|
return /* @__PURE__ */ y("div", {
|
|
@@ -11048,13 +11042,13 @@ var jr = (e) => {
|
|
|
11048
11042
|
role: a ? "button" : "listitem",
|
|
11049
11043
|
tabIndex: a ? 0 : void 0,
|
|
11050
11044
|
onClick: a ? e.onClick : void 0,
|
|
11051
|
-
onKeyDown: a ? (t) =>
|
|
11045
|
+
onKeyDown: a ? (t) => Uc(t, e.onClick) : void 0
|
|
11052
11046
|
};
|
|
11053
11047
|
return r ? /* @__PURE__ */ y("div", {
|
|
11054
11048
|
...o,
|
|
11055
11049
|
children: [
|
|
11056
11050
|
/* @__PURE__ */ v("span", {
|
|
11057
|
-
className: (0, X.default)("sf-event-log__dot",
|
|
11051
|
+
className: (0, X.default)("sf-event-log__dot", Bc[n]),
|
|
11058
11052
|
"aria-hidden": "true"
|
|
11059
11053
|
}),
|
|
11060
11054
|
/* @__PURE__ */ v("span", {
|
|
@@ -11063,7 +11057,7 @@ var jr = (e) => {
|
|
|
11063
11057
|
}),
|
|
11064
11058
|
/* @__PURE__ */ y("span", {
|
|
11065
11059
|
className: "sf-alert-row-list__vehicle",
|
|
11066
|
-
children: [e.severity && /* @__PURE__ */ v(
|
|
11060
|
+
children: [e.severity && /* @__PURE__ */ v(qc, { severity: e.severity }), e.vehicle]
|
|
11067
11061
|
}),
|
|
11068
11062
|
/* @__PURE__ */ y("span", {
|
|
11069
11063
|
className: "sf-alert-row-list__description",
|
|
@@ -11074,17 +11068,17 @@ var jr = (e) => {
|
|
|
11074
11068
|
children: e.icon
|
|
11075
11069
|
}), e.label]
|
|
11076
11070
|
}), e.meta && /* @__PURE__ */ v("span", {
|
|
11077
|
-
className: (0, X.default)("sf-alert-row-list__meta",
|
|
11071
|
+
className: (0, X.default)("sf-alert-row-list__meta", Hc[n]),
|
|
11078
11072
|
children: e.meta
|
|
11079
11073
|
})]
|
|
11080
11074
|
}),
|
|
11081
|
-
i && /* @__PURE__ */ v(
|
|
11075
|
+
i && /* @__PURE__ */ v(Jc, { actions: e.actions })
|
|
11082
11076
|
]
|
|
11083
11077
|
}, t) : /* @__PURE__ */ y("div", {
|
|
11084
11078
|
...o,
|
|
11085
11079
|
children: [
|
|
11086
11080
|
/* @__PURE__ */ v("span", {
|
|
11087
|
-
className: (0, X.default)("sf-event-log__dot",
|
|
11081
|
+
className: (0, X.default)("sf-event-log__dot", Bc[n]),
|
|
11088
11082
|
"aria-hidden": "true"
|
|
11089
11083
|
}),
|
|
11090
11084
|
/* @__PURE__ */ y("span", {
|
|
@@ -11095,20 +11089,20 @@ var jr = (e) => {
|
|
|
11095
11089
|
}), e.label]
|
|
11096
11090
|
}),
|
|
11097
11091
|
e.meta && /* @__PURE__ */ v("span", {
|
|
11098
|
-
className: (0, X.default)("sf-alert-row-list__meta",
|
|
11092
|
+
className: (0, X.default)("sf-alert-row-list__meta", Hc[n]),
|
|
11099
11093
|
children: e.meta
|
|
11100
11094
|
}),
|
|
11101
11095
|
e.time && /* @__PURE__ */ v("span", {
|
|
11102
11096
|
className: "sf-alert-row-list__time",
|
|
11103
11097
|
children: e.time
|
|
11104
11098
|
}),
|
|
11105
|
-
i && /* @__PURE__ */ v(
|
|
11099
|
+
i && /* @__PURE__ */ v(Jc, { actions: e.actions })
|
|
11106
11100
|
]
|
|
11107
11101
|
}, t);
|
|
11108
11102
|
})
|
|
11109
11103
|
]
|
|
11110
11104
|
});
|
|
11111
|
-
},
|
|
11105
|
+
}, Xc = {
|
|
11112
11106
|
success: {
|
|
11113
11107
|
color: "#1F8A4C",
|
|
11114
11108
|
halo: "#EAF5EE"
|
|
@@ -11129,17 +11123,17 @@ var jr = (e) => {
|
|
|
11129
11123
|
color: "var(--sf-text-subtle, #5C7180)",
|
|
11130
11124
|
halo: "var(--sf-surface-alt, #EEF0F2)"
|
|
11131
11125
|
}
|
|
11132
|
-
},
|
|
11126
|
+
}, Zc = {
|
|
11133
11127
|
display: "flex",
|
|
11134
11128
|
gap: 12,
|
|
11135
11129
|
flexWrap: "wrap"
|
|
11136
|
-
},
|
|
11130
|
+
}, Qc = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
|
|
11137
11131
|
className: (0, X.default)("sf-alert-lane", t),
|
|
11138
|
-
style:
|
|
11132
|
+
style: Zc,
|
|
11139
11133
|
role: "list",
|
|
11140
11134
|
"aria-label": "Alertas",
|
|
11141
11135
|
children: e.map((e, t) => {
|
|
11142
|
-
let n =
|
|
11136
|
+
let n = Xc[e.status ?? "default"], r = e.color ?? n.color, i = e.halo ?? n.halo;
|
|
11143
11137
|
return /* @__PURE__ */ y("div", {
|
|
11144
11138
|
role: "listitem",
|
|
11145
11139
|
style: {
|
|
@@ -11210,7 +11204,7 @@ var jr = (e) => {
|
|
|
11210
11204
|
]
|
|
11211
11205
|
}, e.id ?? t);
|
|
11212
11206
|
})
|
|
11213
|
-
}),
|
|
11207
|
+
}), $c = ({ tone: e = "default" }) => /* @__PURE__ */ v("span", {
|
|
11214
11208
|
className: (0, X.default)("sf-alert-summary-row__icon", `sf-alert-summary-row__icon--${e}`),
|
|
11215
11209
|
"aria-hidden": "true",
|
|
11216
11210
|
children: /* @__PURE__ */ y("svg", {
|
|
@@ -11247,7 +11241,7 @@ var jr = (e) => {
|
|
|
11247
11241
|
y2: "4.71"
|
|
11248
11242
|
})] })]
|
|
11249
11243
|
})
|
|
11250
|
-
}),
|
|
11244
|
+
}), el = ({ items: e, className: t, density: n = "comfortable", emptyMessage: r = "Sin alertas", showIcon: i = !1, showChevron: a = !1 }) => /* @__PURE__ */ y("div", {
|
|
11251
11245
|
className: (0, X.default)("sf-alert-summary-list", t),
|
|
11252
11246
|
children: [e.length === 0 && /* @__PURE__ */ v("p", {
|
|
11253
11247
|
className: "sf-alert-summary-list__empty",
|
|
@@ -11265,7 +11259,7 @@ var jr = (e) => {
|
|
|
11265
11259
|
} : void 0,
|
|
11266
11260
|
children: [/* @__PURE__ */ y("div", {
|
|
11267
11261
|
className: "flex min-w-0 items-start gap-2",
|
|
11268
|
-
children: [i && (e.icon ?? /* @__PURE__ */ v(
|
|
11262
|
+
children: [i && (e.icon ?? /* @__PURE__ */ v($c, { tone: e.tone })), /* @__PURE__ */ y("div", {
|
|
11269
11263
|
className: "min-w-0",
|
|
11270
11264
|
children: [/* @__PURE__ */ v("p", {
|
|
11271
11265
|
className: "sf-alert-summary-row__label",
|
|
@@ -11302,7 +11296,7 @@ var jr = (e) => {
|
|
|
11302
11296
|
})]
|
|
11303
11297
|
}, `${e.label}-${t}`);
|
|
11304
11298
|
})]
|
|
11305
|
-
}),
|
|
11299
|
+
}), tl = ({ items: e, confidence: t, updatedAt: n, className: r }) => {
|
|
11306
11300
|
let i = [
|
|
11307
11301
|
...e.map((e, t) => /* @__PURE__ */ y("span", {
|
|
11308
11302
|
className: "sf-evidence-footnote__item",
|
|
@@ -11339,7 +11333,7 @@ var jr = (e) => {
|
|
|
11339
11333
|
}), e]
|
|
11340
11334
|
}, t))
|
|
11341
11335
|
});
|
|
11342
|
-
},
|
|
11336
|
+
}, nl = (e) => e.toLocaleString("es-PE"), rl = ({ rows: e, planLabel: t = "Plan", realLabel: n = "Real", className: r }) => /* @__PURE__ */ y("table", {
|
|
11343
11337
|
className: (0, X.default)("sf-comparison-table", r),
|
|
11344
11338
|
children: [/* @__PURE__ */ v("thead", { children: /* @__PURE__ */ y("tr", { children: [
|
|
11345
11339
|
/* @__PURE__ */ v("th", { className: "sf-comparison-table__th sf-comparison-table__th--label" }),
|
|
@@ -11356,7 +11350,7 @@ var jr = (e) => {
|
|
|
11356
11350
|
children: "Desviación"
|
|
11357
11351
|
})
|
|
11358
11352
|
] }) }), /* @__PURE__ */ v("tbody", { children: e.map((e) => {
|
|
11359
|
-
let t = e.valueFormat ??
|
|
11353
|
+
let t = e.valueFormat ?? nl, n = e.direction ?? "up-good", r = e.real - e.plan, i = e.plan === 0 ? 0 : r / Math.abs(e.plan) * 100, a = n === "neutral" ? null : n === "up-good" ? r >= 0 : r <= 0;
|
|
11360
11354
|
return /* @__PURE__ */ y("tr", {
|
|
11361
11355
|
className: "sf-comparison-table__row",
|
|
11362
11356
|
children: [
|
|
@@ -11387,40 +11381,40 @@ var jr = (e) => {
|
|
|
11387
11381
|
]
|
|
11388
11382
|
}, e.key);
|
|
11389
11383
|
}) })]
|
|
11390
|
-
}),
|
|
11384
|
+
}), il = {
|
|
11391
11385
|
default: "",
|
|
11392
11386
|
accent: "sf-card--accent",
|
|
11393
11387
|
critical: "sf-card--critical",
|
|
11394
11388
|
warning: "sf-card--warning",
|
|
11395
11389
|
success: "sf-card--success"
|
|
11396
|
-
},
|
|
11390
|
+
}, al = {
|
|
11397
11391
|
1: "col-span-1",
|
|
11398
11392
|
2: "col-span-1 sm:col-span-2",
|
|
11399
11393
|
3: "col-span-1 sm:col-span-2 lg:col-span-3",
|
|
11400
11394
|
4: "col-span-1 sm:col-span-2 lg:col-span-4",
|
|
11401
11395
|
5: "col-span-1 sm:col-span-2 lg:col-span-5",
|
|
11402
11396
|
6: "col-span-1 sm:col-span-2 lg:col-span-6"
|
|
11403
|
-
},
|
|
11397
|
+
}, ol = {
|
|
11404
11398
|
none: "",
|
|
11405
11399
|
sm: "p-3",
|
|
11406
11400
|
md: "p-4",
|
|
11407
11401
|
lg: "p-5"
|
|
11408
|
-
},
|
|
11402
|
+
}, sl = {
|
|
11409
11403
|
visible: "",
|
|
11410
11404
|
auto: "overflow-auto",
|
|
11411
11405
|
hidden: "overflow-hidden"
|
|
11412
|
-
},
|
|
11406
|
+
}, cl = () => /* @__PURE__ */ v("div", {
|
|
11413
11407
|
className: "sf-card-state__spinner",
|
|
11414
11408
|
role: "status",
|
|
11415
11409
|
"aria-label": "Cargando",
|
|
11416
11410
|
children: /* @__PURE__ */ v("span", { className: "sf-card-state__spinner-ring" })
|
|
11417
|
-
}),
|
|
11411
|
+
}), ll = ({ title: e, subtitle: t, icon: n, headerAction: r, variant: i = "default", span: a = 1, padding: o = "md", look: s = "default", headerSize: c = s === "board" ? "md" : "sm", headerWrap: l = s === "board", headerDivider: u = s !== "board", footer: d, state: f = "idle", loadingMessage: p = "Cargando…", errorMessage: m = "No se pudo cargar la información.", emptyMessage: h = "Sin datos para mostrar.", onRetry: g, retryLabel: b = "Reintentar", minHeight: x, bodyOverflow: S = "visible", className: C, children: w }) => {
|
|
11418
11412
|
let T = x === void 0 ? void 0 : { minHeight: x }, E = f !== "idle" && /* @__PURE__ */ y("div", {
|
|
11419
11413
|
className: "sf-card-state",
|
|
11420
11414
|
style: T,
|
|
11421
11415
|
role: f === "error" ? "alert" : f === "empty" ? "status" : void 0,
|
|
11422
11416
|
children: [
|
|
11423
|
-
f === "loading" && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(
|
|
11417
|
+
f === "loading" && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(cl, {}), p && /* @__PURE__ */ v("p", {
|
|
11424
11418
|
className: "sf-card-state__message",
|
|
11425
11419
|
children: p
|
|
11426
11420
|
})] }),
|
|
@@ -11442,7 +11436,7 @@ var jr = (e) => {
|
|
|
11442
11436
|
return /* @__PURE__ */ y("div", {
|
|
11443
11437
|
role: e ? "region" : void 0,
|
|
11444
11438
|
"aria-label": e,
|
|
11445
|
-
className: (0, X.default)("sf-card flex flex-col overflow-hidden",
|
|
11439
|
+
className: (0, X.default)("sf-card flex flex-col overflow-hidden", il[i], al[a], C),
|
|
11446
11440
|
children: [
|
|
11447
11441
|
(e || n || r) && /* @__PURE__ */ y("div", {
|
|
11448
11442
|
className: (0, X.default)("sf-card-header", c === "md" && "sf-card-header--md", l && "sf-card-header--wrap", !u && "sf-card-header--no-divider"),
|
|
@@ -11473,7 +11467,7 @@ var jr = (e) => {
|
|
|
11473
11467
|
]
|
|
11474
11468
|
}),
|
|
11475
11469
|
/* @__PURE__ */ v("div", {
|
|
11476
|
-
className: (0, X.default)("flex-1",
|
|
11470
|
+
className: (0, X.default)("flex-1", ol[o], sl[S]),
|
|
11477
11471
|
style: f === "idle" ? T : void 0,
|
|
11478
11472
|
children: f === "idle" ? w : E
|
|
11479
11473
|
}),
|
|
@@ -11483,24 +11477,24 @@ var jr = (e) => {
|
|
|
11483
11477
|
})
|
|
11484
11478
|
]
|
|
11485
11479
|
});
|
|
11486
|
-
},
|
|
11480
|
+
}, ul = {
|
|
11487
11481
|
2: "grid-cols-1 sm:grid-cols-2",
|
|
11488
11482
|
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
11489
11483
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
|
|
11490
11484
|
5: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",
|
|
11491
11485
|
6: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6"
|
|
11492
|
-
},
|
|
11486
|
+
}, dl = {
|
|
11493
11487
|
sm: "gap-2",
|
|
11494
11488
|
md: "gap-3",
|
|
11495
11489
|
lg: "gap-5"
|
|
11496
|
-
},
|
|
11490
|
+
}, fl = {
|
|
11497
11491
|
stretch: "items-stretch",
|
|
11498
11492
|
start: "items-start"
|
|
11499
|
-
},
|
|
11500
|
-
className: (0, X.default)("grid", !r &&
|
|
11493
|
+
}, pl = ({ cols: e = 4, gap: t = "md", alignItems: n = "stretch", minColWidth: r, className: i, children: a }) => /* @__PURE__ */ v("div", {
|
|
11494
|
+
className: (0, X.default)("grid", !r && ul[e], dl[t], fl[n], i),
|
|
11501
11495
|
style: r ? { gridTemplateColumns: `repeat(auto-fit, minmax(${r}, 1fr))` } : void 0,
|
|
11502
11496
|
children: a
|
|
11503
|
-
}),
|
|
11497
|
+
}), ml = ({ title: e, subtitle: t, action: n, icon: r, iconSize: i = "md", variant: a = "plain", className: o, children: s }) => /* @__PURE__ */ y("section", {
|
|
11504
11498
|
className: (0, X.default)("flex flex-col gap-3", a === "panel" && "sf-section--panel", o),
|
|
11505
11499
|
"aria-label": e,
|
|
11506
11500
|
children: [/* @__PURE__ */ y("div", {
|
|
@@ -11523,13 +11517,13 @@ var jr = (e) => {
|
|
|
11523
11517
|
children: n
|
|
11524
11518
|
})]
|
|
11525
11519
|
}), s]
|
|
11526
|
-
}),
|
|
11520
|
+
}), hl = {
|
|
11527
11521
|
slate: "sf-stat-tone--slate",
|
|
11528
11522
|
emerald: "sf-stat-tone--emerald",
|
|
11529
11523
|
amber: "sf-stat-tone--amber",
|
|
11530
11524
|
red: "sf-stat-tone--red",
|
|
11531
11525
|
blue: "sf-stat-tone--blue"
|
|
11532
|
-
},
|
|
11526
|
+
}, gl = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
|
|
11533
11527
|
role: "list",
|
|
11534
11528
|
"aria-label": "Resumen de métricas",
|
|
11535
11529
|
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),
|
|
@@ -11538,7 +11532,7 @@ var jr = (e) => {
|
|
|
11538
11532
|
role: "listitem",
|
|
11539
11533
|
children: [
|
|
11540
11534
|
e.tone && /* @__PURE__ */ v("span", {
|
|
11541
|
-
className: (0, X.default)("h-1.5 w-1.5 shrink-0 rounded-full",
|
|
11535
|
+
className: (0, X.default)("h-1.5 w-1.5 shrink-0 rounded-full", hl[e.tone]),
|
|
11542
11536
|
"aria-hidden": "true"
|
|
11543
11537
|
}),
|
|
11544
11538
|
/* @__PURE__ */ y("span", {
|
|
@@ -11551,7 +11545,7 @@ var jr = (e) => {
|
|
|
11551
11545
|
})
|
|
11552
11546
|
]
|
|
11553
11547
|
}, t))
|
|
11554
|
-
}),
|
|
11548
|
+
}), _l = ({ header: e, sidebar: t, statBar: n, className: r, children: i }) => /* @__PURE__ */ y("div", {
|
|
11555
11549
|
className: "sf-card flex min-h-[480px] flex-col overflow-hidden bg-[var(--sf-page-bg)]",
|
|
11556
11550
|
role: "region",
|
|
11557
11551
|
"aria-label": "Dashboard",
|
|
@@ -11576,7 +11570,7 @@ var jr = (e) => {
|
|
|
11576
11570
|
children: n
|
|
11577
11571
|
})
|
|
11578
11572
|
]
|
|
11579
|
-
}),
|
|
11573
|
+
}), vl = ({ title: e, onClose: t, headerAction: n, icon: r, iconSize: i = "sm", heading: a, badge: o, rows: s = [], align: c = "stack", actions: l, sectionTitle: u, items: d = [], width: f = 320, className: p }) => {
|
|
11580
11574
|
let m = typeof f == "number" ? `${f}px` : f;
|
|
11581
11575
|
return /* @__PURE__ */ y("aside", {
|
|
11582
11576
|
className: (0, X.default)("sf-detail-side-panel", p),
|
|
@@ -11669,17 +11663,17 @@ var jr = (e) => {
|
|
|
11669
11663
|
})
|
|
11670
11664
|
]
|
|
11671
11665
|
});
|
|
11672
|
-
},
|
|
11666
|
+
}, yl = ({ text: e, tone: t = "info", className: n }) => /* @__PURE__ */ y("div", {
|
|
11673
11667
|
className: (0, X.default)("sf-card-note", t === "warning" && "sf-card-note--warning", n),
|
|
11674
11668
|
role: "note",
|
|
11675
11669
|
children: [/* @__PURE__ */ v(ut, {
|
|
11676
11670
|
className: "sf-card-note__icon",
|
|
11677
11671
|
"aria-hidden": "true"
|
|
11678
11672
|
}), /* @__PURE__ */ v("span", { children: e })]
|
|
11679
|
-
}),
|
|
11673
|
+
}), bl = (e) => e >= 5 ? 5 : e === 4 ? 4 : 3, xl = ({ block: e }) => e.left && e.right ? /* @__PURE__ */ y("div", {
|
|
11680
11674
|
className: "sf-board__split",
|
|
11681
11675
|
children: [e.left, e.right]
|
|
11682
|
-
}) : /* @__PURE__ */ v(_, { children: e.left ?? e.right }),
|
|
11676
|
+
}) : /* @__PURE__ */ v(_, { children: e.left ?? e.right }), Sl = ({ kpis: e = [], notes: t = [], hidden: n = [], hiddenTitle: r = (e) => `${e} indicador(es) no aplican a esta empresa`, detail: i, primary: a, secondary: o }) => {
|
|
11683
11677
|
let s = e.filter((e) => e != null && e !== !1);
|
|
11684
11678
|
return /* @__PURE__ */ y(_, { children: [
|
|
11685
11679
|
(n.length > 0 || t.length > 0) && /* @__PURE__ */ y("div", {
|
|
@@ -11703,32 +11697,32 @@ var jr = (e) => {
|
|
|
11703
11697
|
s.length > 0 && /* @__PURE__ */ v("div", {
|
|
11704
11698
|
className: "sf-board__kpis-area",
|
|
11705
11699
|
children: /* @__PURE__ */ v("div", {
|
|
11706
|
-
className: (0, X.default)("sf-board__kpis", `sf-board__kpis--${
|
|
11700
|
+
className: (0, X.default)("sf-board__kpis", `sf-board__kpis--${bl(s.length)}`),
|
|
11707
11701
|
children: s
|
|
11708
11702
|
})
|
|
11709
11703
|
}),
|
|
11710
11704
|
i,
|
|
11711
|
-
a && /* @__PURE__ */ v(
|
|
11712
|
-
o && /* @__PURE__ */ v(
|
|
11705
|
+
a && /* @__PURE__ */ v(xl, { block: a }),
|
|
11706
|
+
o && /* @__PURE__ */ v(xl, { block: o })
|
|
11713
11707
|
] });
|
|
11714
|
-
},
|
|
11708
|
+
}, Cl = ({ children: e, className: t }) => {
|
|
11715
11709
|
let n = e.filter(Boolean), r = n.length >= 3 ? 3 : 2;
|
|
11716
11710
|
return /* @__PURE__ */ v("div", {
|
|
11717
11711
|
className: (0, X.default)("sf-card-row", `sf-card-row--${r}`, t),
|
|
11718
11712
|
children: n
|
|
11719
11713
|
});
|
|
11720
|
-
},
|
|
11714
|
+
}, wl = (e) => {
|
|
11721
11715
|
let [t, n] = h(0), [r, i] = h(e);
|
|
11722
11716
|
return r !== e && (i(e), n(0)), u(() => {
|
|
11723
11717
|
if (!e) return;
|
|
11724
11718
|
let t = Date.now(), r = window.setInterval(() => n(Math.floor((Date.now() - t) / 1e3)), 1e3);
|
|
11725
11719
|
return () => window.clearInterval(r);
|
|
11726
11720
|
}, [e]), t;
|
|
11727
|
-
},
|
|
11721
|
+
}, Tl = (e) => new Date(e).toLocaleTimeString("es-PE", {
|
|
11728
11722
|
hour: "2-digit",
|
|
11729
11723
|
minute: "2-digit"
|
|
11730
|
-
}),
|
|
11731
|
-
let s =
|
|
11724
|
+
}), El = ({ loading: e, updatedAt: t, live: n, cutoffLabel: r, onRefresh: i, refreshLabel: a, slowAfterSeconds: o }) => {
|
|
11725
|
+
let s = wl(!!e), c = t ? Tl(t) : null, l = c ? `datos de las ${c}` : "";
|
|
11732
11726
|
return e ? l = s >= o ? `calculando… ${s} s` : "calculando…" : n && c && (l = `datos en vivo · ${c}`), /* @__PURE__ */ y("div", {
|
|
11733
11727
|
className: "sf-page-frame__status",
|
|
11734
11728
|
"aria-live": "polite",
|
|
@@ -11752,7 +11746,7 @@ var jr = (e) => {
|
|
|
11752
11746
|
})
|
|
11753
11747
|
]
|
|
11754
11748
|
});
|
|
11755
|
-
},
|
|
11749
|
+
}, Dl = ({ title: e, subtitle: t, mode: n = "range", range: r, onApply: i, fromLabel: a = "Desde", toLabel: o = "Hasta", dayLabel: s = "Día de corte", compareFieldLabel: c = n === "day" ? "Nota" : "Comparar", validate: l, error: u = null, loading: d = !1, stale: f = !1, updatedAt: p = null, live: m = !1, cutoffLabel: g, onRefresh: b, refreshLabel: x = "Actualizar", compareLabel: S = n === "day" ? "" : "con el período anterior de igual duración", pendingLabel: C = n === "day" ? "Pulsa «Aplicar» para consultar el nuevo día" : "Pulsa «Aplicar» para consultar el nuevo rango", applyLabel: w = "Aplicar", filterAriaLabel: T = "Filtro del tablero", slowAfterSeconds: E = 3, className: D, children: O }) => {
|
|
11756
11750
|
let [k, A] = h(null), j = k && k.base.from === r.from && k.base.to === r.to ? k : null, M = j?.draft ?? r, N = j?.error ?? null, P = (e) => A({
|
|
11757
11751
|
base: r,
|
|
11758
11752
|
draft: e,
|
|
@@ -11760,7 +11754,7 @@ var jr = (e) => {
|
|
|
11760
11754
|
}), F = M.from !== r.from || M.to !== r.to;
|
|
11761
11755
|
return /* @__PURE__ */ v("div", {
|
|
11762
11756
|
className: D,
|
|
11763
|
-
children: /* @__PURE__ */ y(
|
|
11757
|
+
children: /* @__PURE__ */ y(_l, {
|
|
11764
11758
|
header: /* @__PURE__ */ y("div", {
|
|
11765
11759
|
className: "sf-page-frame__header",
|
|
11766
11760
|
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h1", {
|
|
@@ -11769,7 +11763,7 @@ var jr = (e) => {
|
|
|
11769
11763
|
}), t && /* @__PURE__ */ v("p", {
|
|
11770
11764
|
className: "sf-page-frame__subtitle",
|
|
11771
11765
|
children: t
|
|
11772
|
-
})] }), /* @__PURE__ */ v(
|
|
11766
|
+
})] }), /* @__PURE__ */ v(El, {
|
|
11773
11767
|
loading: d,
|
|
11774
11768
|
updatedAt: p,
|
|
11775
11769
|
live: m,
|
|
@@ -11842,17 +11836,17 @@ var jr = (e) => {
|
|
|
11842
11836
|
]
|
|
11843
11837
|
})
|
|
11844
11838
|
});
|
|
11845
|
-
},
|
|
11839
|
+
}, Ol = [
|
|
11846
11840
|
70,
|
|
11847
11841
|
55,
|
|
11848
11842
|
40,
|
|
11849
11843
|
25
|
|
11850
|
-
],
|
|
11844
|
+
], kl = ({ shape: e }) => e === "chart" ? /* @__PURE__ */ v(fi, {
|
|
11851
11845
|
variant: "block",
|
|
11852
11846
|
height: 220
|
|
11853
11847
|
}) : /* @__PURE__ */ v("div", {
|
|
11854
11848
|
className: "sf-placeholder__rows",
|
|
11855
|
-
children:
|
|
11849
|
+
children: Ol.map((t) => /* @__PURE__ */ y("div", {
|
|
11856
11850
|
className: "sf-placeholder__row",
|
|
11857
11851
|
children: [/* @__PURE__ */ v(fi, {
|
|
11858
11852
|
variant: "text",
|
|
@@ -11863,7 +11857,7 @@ var jr = (e) => {
|
|
|
11863
11857
|
width: `${t}%`
|
|
11864
11858
|
})]
|
|
11865
11859
|
}, t))
|
|
11866
|
-
}),
|
|
11860
|
+
}), Al = ({ title: e, shape: t = "kpi", state: n = "loading", errorMessage: r = "No se pudo obtener este dato. Vuelve a intentarlo en unos minutos.", onRetry: i, className: a }) => n === "error" ? /* @__PURE__ */ v(ll, {
|
|
11867
11861
|
title: e,
|
|
11868
11862
|
headerSize: "md",
|
|
11869
11863
|
headerDivider: !1,
|
|
@@ -11871,7 +11865,7 @@ var jr = (e) => {
|
|
|
11871
11865
|
errorMessage: r,
|
|
11872
11866
|
onRetry: i,
|
|
11873
11867
|
className: a
|
|
11874
|
-
}) : t === "kpi" ? /* @__PURE__ */ v(
|
|
11868
|
+
}) : t === "kpi" ? /* @__PURE__ */ v(ll, {
|
|
11875
11869
|
padding: "lg",
|
|
11876
11870
|
className: a,
|
|
11877
11871
|
children: /* @__PURE__ */ y("div", {
|
|
@@ -11901,7 +11895,7 @@ var jr = (e) => {
|
|
|
11901
11895
|
]
|
|
11902
11896
|
})]
|
|
11903
11897
|
})
|
|
11904
|
-
}) : /* @__PURE__ */ v(
|
|
11898
|
+
}) : /* @__PURE__ */ v(ll, {
|
|
11905
11899
|
title: e,
|
|
11906
11900
|
headerSize: "md",
|
|
11907
11901
|
headerWrap: !0,
|
|
@@ -11910,14 +11904,14 @@ var jr = (e) => {
|
|
|
11910
11904
|
children: /* @__PURE__ */ v("div", {
|
|
11911
11905
|
role: "status",
|
|
11912
11906
|
"aria-label": `Cargando ${e}`,
|
|
11913
|
-
children: /* @__PURE__ */ v(
|
|
11907
|
+
children: /* @__PURE__ */ v(kl, { shape: t })
|
|
11914
11908
|
})
|
|
11915
|
-
}),
|
|
11909
|
+
}), jl = (e) => {
|
|
11916
11910
|
let t = String(e ?? ""), n = 0;
|
|
11917
11911
|
for (; n < t.length && t.charCodeAt(n) <= 32;) n += 1;
|
|
11918
11912
|
let r = t.slice(n);
|
|
11919
11913
|
return /^[=+\-@]/.test(r) ? `'${t}` : t;
|
|
11920
|
-
},
|
|
11914
|
+
}, Ml = (e) => jl(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """), Nl = (e) => typeof e == "number" && Number.isFinite(e) ? "Number" : "String", Pl = (e, t) => {
|
|
11921
11915
|
if (typeof document > "u") return;
|
|
11922
11916
|
let { columns: n, filename: r = "export.xls" } = t, i = `<?xml version="1.0"?>
|
|
11923
11917
|
<?mso-application progid="Excel.Sheet"?>
|
|
@@ -11930,30 +11924,30 @@ var jr = (e) => {
|
|
|
11930
11924
|
</Styles>
|
|
11931
11925
|
<Worksheet ss:Name="Export">
|
|
11932
11926
|
<Table>
|
|
11933
|
-
<Row>${n.map((e) => `<Cell ss:StyleID="Header"><Data ss:Type="String">${
|
|
11927
|
+
<Row>${n.map((e) => `<Cell ss:StyleID="Header"><Data ss:Type="String">${Ml(e.header)}</Data></Cell>`).join("")}</Row>
|
|
11934
11928
|
${e.map((e) => `<Row>${n.map((t) => {
|
|
11935
|
-
let n = t.getValue(e), r =
|
|
11936
|
-
return `<Cell><Data ss:Type="${r}">${r === "Number" ? String(n) :
|
|
11929
|
+
let n = t.getValue(e), r = Nl(n);
|
|
11930
|
+
return `<Cell><Data ss:Type="${r}">${r === "Number" ? String(n) : Ml(n)}</Data></Cell>`;
|
|
11937
11931
|
}).join("")}</Row>`).join("")}
|
|
11938
11932
|
</Table>
|
|
11939
11933
|
</Worksheet>
|
|
11940
11934
|
</Workbook>`, a = new Blob([i], { type: "application/vnd.ms-excel" }), o = URL.createObjectURL(a), s = document.createElement("a");
|
|
11941
11935
|
s.href = o, s.download = r.endsWith(".xls") || r.endsWith(".xlsx") ? r : `${r}.xls`, s.click(), URL.revokeObjectURL(o);
|
|
11942
|
-
},
|
|
11936
|
+
}, Fl = () => {
|
|
11943
11937
|
let [e, t] = h(null);
|
|
11944
11938
|
return {
|
|
11945
11939
|
open: e,
|
|
11946
11940
|
toggle: (e) => t((t) => t?.id === e.id ? null : e),
|
|
11947
11941
|
close: () => t(null)
|
|
11948
11942
|
};
|
|
11949
|
-
},
|
|
11943
|
+
}, Il = (e, t) => `Mostrando ${e} de ${t} — exporta a Excel para ver la lista completa.`, Ll = (e) => `${e} registro${e === 1 ? "" : "s"}.`, Rl = ({ detail: e, rowMapper: t = (e) => e, subtitle: n = "Registros detrás de la cifra", countLabel: r = (e) => `${e} registros`, previewRows: i = 10, previewNote: a = Il, totalNote: o = Ll, emptyMessage: s = "Sin registros en este caso", closeLabel: c = "Cerrar detalle", exportLabel: l = "Exportar Excel", exportFilename: u = (e, t) => t ? `${e.id}-${t}` : e.id, actions: d }) => {
|
|
11950
11944
|
let f = e.open, [p, m] = h(null);
|
|
11951
11945
|
if (!f) return null;
|
|
11952
11946
|
let g = p?.specId === f.id ? p.groupId : null, _ = f.groups?.find((e) => e.id === g) ?? f.groups?.[0] ?? null, b = _ ? _.rows : f.rows, x = b.map(t), S = f.columns.map((e) => ({
|
|
11953
11947
|
accessorKey: e.key,
|
|
11954
11948
|
header: e.header
|
|
11955
11949
|
})), C = f.groups ? f.groups.reduce((e, t) => e + t.rows.length, 0) : f.rows.length;
|
|
11956
|
-
return /* @__PURE__ */ y(
|
|
11950
|
+
return /* @__PURE__ */ y(ll, {
|
|
11957
11951
|
title: f.title,
|
|
11958
11952
|
subtitle: n,
|
|
11959
11953
|
headerAction: /* @__PURE__ */ y("div", {
|
|
@@ -11988,7 +11982,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
11988
11982
|
label: e.title,
|
|
11989
11983
|
count: e.rows.length
|
|
11990
11984
|
}))
|
|
11991
|
-
}), _.note && /* @__PURE__ */ v(
|
|
11985
|
+
}), _.note && /* @__PURE__ */ v(yl, {
|
|
11992
11986
|
text: _.note,
|
|
11993
11987
|
className: "sf-detail-panel__group-note"
|
|
11994
11988
|
})]
|
|
@@ -12023,7 +12017,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12023
12017
|
size: "sm",
|
|
12024
12018
|
icon: /* @__PURE__ */ v(mt, {}),
|
|
12025
12019
|
disabled: b.length === 0,
|
|
12026
|
-
onClick: () =>
|
|
12020
|
+
onClick: () => Pl(x, {
|
|
12027
12021
|
filename: `${u(f, _?.id ?? null)}.xls`,
|
|
12028
12022
|
columns: f.columns.map((e) => ({
|
|
12029
12023
|
id: e.key,
|
|
@@ -12037,8 +12031,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12037
12031
|
})
|
|
12038
12032
|
]
|
|
12039
12033
|
});
|
|
12040
|
-
},
|
|
12041
|
-
let d =
|
|
12034
|
+
}, zl = (e) => e != null && (e.rows.length > 0 || (e.groups ?? []).some((e) => e.rows.length > 0)), Bl = ({ label: e, value: t, sublabel: n, icon: r, accentTone: i, primary: a = !1, trend: o = null, trendDirection: s = "neutral", trendLabel: c = "vs. período anterior", detail: l, spec: u }) => {
|
|
12035
|
+
let d = zl(u);
|
|
12042
12036
|
return /* @__PURE__ */ v(As, {
|
|
12043
12037
|
layout: "leading-icon",
|
|
12044
12038
|
size: "lg",
|
|
@@ -12056,21 +12050,21 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12056
12050
|
selected: u != null && l.open?.id === u.id,
|
|
12057
12051
|
onClick: d ? () => l.toggle(u) : void 0
|
|
12058
12052
|
});
|
|
12059
|
-
},
|
|
12053
|
+
}, Vl = ({ items: e, detail: t, zeroTone: n = "success", emptyMessage: r = "Nada pendiente" }) => {
|
|
12060
12054
|
let i = e.map((e) => ({
|
|
12061
12055
|
label: e.label,
|
|
12062
12056
|
description: e.description,
|
|
12063
12057
|
value: e.value,
|
|
12064
12058
|
tone: e.count > 0 ? e.tone : n,
|
|
12065
|
-
onClick:
|
|
12059
|
+
onClick: zl(e.spec) ? () => t.toggle(e.spec) : void 0
|
|
12066
12060
|
}));
|
|
12067
|
-
return /* @__PURE__ */ v(
|
|
12061
|
+
return /* @__PURE__ */ v(ll, { children: /* @__PURE__ */ v(el, {
|
|
12068
12062
|
items: i,
|
|
12069
12063
|
showIcon: !0,
|
|
12070
12064
|
showChevron: !0,
|
|
12071
12065
|
emptyMessage: r
|
|
12072
12066
|
}) });
|
|
12073
|
-
},
|
|
12067
|
+
}, Hl = ({ items: e, total: t, totalLabel: n, unit: r = "registros", previewCount: i = 5, emptyText: a, onOpen: o, openLabel: s = "Ver detalle" }) => {
|
|
12074
12068
|
if (t === 0) return /* @__PURE__ */ v("p", {
|
|
12075
12069
|
className: "sf-detail-preview__empty",
|
|
12076
12070
|
children: a
|
|
@@ -12118,7 +12112,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12118
12112
|
}) })
|
|
12119
12113
|
]
|
|
12120
12114
|
});
|
|
12121
|
-
},
|
|
12115
|
+
}, Ul = ({ title: e, icon: t, tone: n = "default", rows: r = [], children: i, className: a, density: o = "md" }) => {
|
|
12122
12116
|
let s = r.length > 0 || !!i;
|
|
12123
12117
|
return /* @__PURE__ */ y("section", {
|
|
12124
12118
|
className: (0, X.default)("sf-detail-section", n !== "default" && `sf-detail-section--${n}`, o === "sm" && "sf-detail-section--sm", a),
|
|
@@ -12159,15 +12153,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12159
12153
|
})]
|
|
12160
12154
|
})]
|
|
12161
12155
|
});
|
|
12162
|
-
},
|
|
12156
|
+
}, Wl = ({ small: e, error: t }) => (0, X.default)("sf-input", "sf-input--otp", e && "sf-input--sm", t && "sf-input--error"), Gl = (e, t) => {
|
|
12163
12157
|
let n = ln(String(e ?? ""), t);
|
|
12164
12158
|
return Array.from({ length: t }, (e, t) => n[t] ?? "");
|
|
12165
|
-
},
|
|
12159
|
+
}, Kl = ({ form: e, name: t, label: n, info: r, required: i, disabled: a, small: o, className: s, length: c = 6, onChange: l }) => {
|
|
12166
12160
|
let u = b({
|
|
12167
12161
|
name: t,
|
|
12168
12162
|
control: e.control
|
|
12169
|
-
}), d = m([]), [f, p] = h(() =>
|
|
12170
|
-
u.field.value !== g && (_(u.field.value), p(
|
|
12163
|
+
}), d = m([]), [f, p] = h(() => Gl(u.field.value, c)), [g, _] = h(u.field.value);
|
|
12164
|
+
u.field.value !== g && (_(u.field.value), p(Gl(u.field.value, c)));
|
|
12171
12165
|
let y = String(t), x = u.fieldState.error?.message ? String(u.fieldState.error.message) : void 0, S = (e) => {
|
|
12172
12166
|
p(e);
|
|
12173
12167
|
let t = e.join("");
|
|
@@ -12211,7 +12205,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12211
12205
|
onBlur: () => u.field.onBlur(),
|
|
12212
12206
|
onChange: (e) => C(t, e.target.value),
|
|
12213
12207
|
onKeyDown: (e) => w(t, e),
|
|
12214
|
-
className:
|
|
12208
|
+
className: Wl({
|
|
12215
12209
|
small: o,
|
|
12216
12210
|
error: !!x,
|
|
12217
12211
|
disabled: a
|
|
@@ -12219,15 +12213,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12219
12213
|
}, t))
|
|
12220
12214
|
})
|
|
12221
12215
|
});
|
|
12222
|
-
},
|
|
12216
|
+
}, ql = (e) => {
|
|
12223
12217
|
let [t, n] = e.slice(0, 10).split("-").map(Number), r = new Date(t, n, 0).getDate();
|
|
12224
12218
|
return `${t}-${String(n).padStart(2, "0")}-${String(r).padStart(2, "0")}`;
|
|
12225
|
-
},
|
|
12219
|
+
}, Jl = ({ 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 }) => {
|
|
12226
12220
|
let f = String(e.watch(t) ?? ""), p = (t, r) => {
|
|
12227
12221
|
if (l === "none") return;
|
|
12228
12222
|
let i = t.slice(0, 10), a = r.slice(0, 10);
|
|
12229
12223
|
if (!Mn(i) || !Mn(a) || a >= i) return;
|
|
12230
|
-
let o = l === "month-end" ?
|
|
12224
|
+
let o = l === "month-end" ? ql(i) : i;
|
|
12231
12225
|
e.setValue(n, o, { shouldValidate: !1 }), u?.(o);
|
|
12232
12226
|
};
|
|
12233
12227
|
return /* @__PURE__ */ y("div", {
|
|
@@ -12252,16 +12246,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12252
12246
|
onChange: (n) => p(String(e.getValues(t) ?? ""), n)
|
|
12253
12247
|
})]
|
|
12254
12248
|
});
|
|
12255
|
-
},
|
|
12249
|
+
}, Yl = (e) => /* @__PURE__ */ v(Rn, {
|
|
12256
12250
|
...e,
|
|
12257
12251
|
utc: !0
|
|
12258
|
-
}),
|
|
12252
|
+
}), Xl = () => ({
|
|
12259
12253
|
start: "",
|
|
12260
12254
|
end: ""
|
|
12261
|
-
}),
|
|
12255
|
+
}), Zl = () => ({
|
|
12262
12256
|
start: "",
|
|
12263
12257
|
end: ""
|
|
12264
|
-
}),
|
|
12258
|
+
}), Ql = 0, $l = () => (Ql += 1, `photo_${Date.now()}_${Ql}`), eu = (e, t) => {
|
|
12265
12259
|
if (!t || t === "*") return !0;
|
|
12266
12260
|
let n = t.replace(/\s/g, "").split(","), r = `.${e.name.split(".").pop()?.toLowerCase() ?? ""}`, i = e.type.toLowerCase();
|
|
12267
12261
|
return n.some((e) => {
|
|
@@ -12273,20 +12267,20 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12273
12267
|
}
|
|
12274
12268
|
return i === t;
|
|
12275
12269
|
});
|
|
12276
|
-
},
|
|
12270
|
+
}, tu = (e, t = !1) => new Promise((n) => {
|
|
12277
12271
|
let r = document.createElement("input");
|
|
12278
12272
|
r.type = "file", r.accept = e, r.multiple = t, r.style.display = "none", r.onchange = () => {
|
|
12279
12273
|
n(Array.from(r.files ?? [])), r.remove();
|
|
12280
12274
|
}, document.body.appendChild(r), r.click();
|
|
12281
|
-
}),
|
|
12282
|
-
id:
|
|
12275
|
+
}), nu = (e) => ({
|
|
12276
|
+
id: $l(),
|
|
12283
12277
|
preview: URL.createObjectURL(e),
|
|
12284
12278
|
file: e
|
|
12285
|
-
}),
|
|
12279
|
+
}), ru = (e) => {
|
|
12286
12280
|
URL.revokeObjectURL(e.preview);
|
|
12287
|
-
},
|
|
12288
|
-
e.forEach(
|
|
12289
|
-
},
|
|
12281
|
+
}, iu = (e) => {
|
|
12282
|
+
e.forEach(ru);
|
|
12283
|
+
}, au = (e) => Array.isArray(e) ? e.filter((e) => typeof e == "object" && !!e && typeof e.id == "string" && typeof e.preview == "string" && e.file instanceof File) : [], ou = (e, t = .92) => new Promise((n, r) => {
|
|
12290
12284
|
let i = URL.createObjectURL(e), a = new Image();
|
|
12291
12285
|
a.onload = () => {
|
|
12292
12286
|
let o = Math.min(a.width, a.height), s = (a.width - o) / 2, c = (a.height - o) / 2, l = document.createElement("canvas");
|
|
@@ -12309,7 +12303,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12309
12303
|
}, a.onerror = () => {
|
|
12310
12304
|
URL.revokeObjectURL(i), r(/* @__PURE__ */ Error("Imagen inválida"));
|
|
12311
12305
|
}, a.src = i;
|
|
12312
|
-
}),
|
|
12306
|
+
}), su = (e) => e.length === 0 ? "Arrastra archivos o haz clic" : e.length === 1 ? e[0].name : `${e.length} archivos seleccionados`, cu = (e) => `${e.name}-${e.lastModified}-${e.size}`, lu = ({ 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: _ }) => {
|
|
12313
12307
|
let x = m(null), S = b({
|
|
12314
12308
|
name: t,
|
|
12315
12309
|
control: e.control
|
|
@@ -12318,7 +12312,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12318
12312
|
return e ? Array.isArray(e) ? e : [e] : [];
|
|
12319
12313
|
})(), L = async (e) => {
|
|
12320
12314
|
if (g) for (let t of e) {
|
|
12321
|
-
let e =
|
|
12315
|
+
let e = cu(t);
|
|
12322
12316
|
O((t) => new Set(t).add(e)), E((t) => ({
|
|
12323
12317
|
...t,
|
|
12324
12318
|
[e]: 0
|
|
@@ -12343,7 +12337,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12343
12337
|
}
|
|
12344
12338
|
}
|
|
12345
12339
|
}, R = (e) => {
|
|
12346
|
-
let t = s * 1024 * 1024, n = e.filter((e) => e.size <= t &&
|
|
12340
|
+
let t = s * 1024 * 1024, n = e.filter((e) => e.size <= t && eu(e, a)), r = e.length - n.length;
|
|
12347
12341
|
if (A(r > 0 ? `${r} archivo(s) no cumplen tipo o tamaño máximo.` : null), o) {
|
|
12348
12342
|
let e = [...I, ...n];
|
|
12349
12343
|
S.field.onChange(e), p?.(e), L(n);
|
|
@@ -12397,7 +12391,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12397
12391
|
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"),
|
|
12398
12392
|
children: [/* @__PURE__ */ v("span", {
|
|
12399
12393
|
className: "sf-file-drop__title",
|
|
12400
|
-
children: C ? "Suelta aquí" : c ??
|
|
12394
|
+
children: C ? "Suelta aquí" : c ?? su(I)
|
|
12401
12395
|
}), /* @__PURE__ */ y("span", {
|
|
12402
12396
|
className: "sf-file-drop__hint",
|
|
12403
12397
|
children: [
|
|
@@ -12412,7 +12406,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12412
12406
|
className: "sf-file-list",
|
|
12413
12407
|
"aria-label": "Archivos seleccionados",
|
|
12414
12408
|
children: I.map((e) => {
|
|
12415
|
-
let t =
|
|
12409
|
+
let t = cu(e), n = T[t], r = D.has(t);
|
|
12416
12410
|
return /* @__PURE__ */ y("li", {
|
|
12417
12411
|
className: "sf-file-list__item",
|
|
12418
12412
|
children: [/* @__PURE__ */ y("span", {
|
|
@@ -12441,7 +12435,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12441
12435
|
]
|
|
12442
12436
|
})
|
|
12443
12437
|
});
|
|
12444
|
-
},
|
|
12438
|
+
}, uu = ({ 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: _ }) => {
|
|
12445
12439
|
let x = m(null), S = b({
|
|
12446
12440
|
name: t,
|
|
12447
12441
|
control: e.control
|
|
@@ -12531,7 +12525,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12531
12525
|
]
|
|
12532
12526
|
})
|
|
12533
12527
|
});
|
|
12534
|
-
},
|
|
12528
|
+
}, du = ({ 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 }) => {
|
|
12535
12529
|
let g = m(null), _ = m(!1), x = m(null), S = m(void 0), C = b({
|
|
12536
12530
|
name: t,
|
|
12537
12531
|
control: e.control
|
|
@@ -12623,11 +12617,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12623
12617
|
})]
|
|
12624
12618
|
})
|
|
12625
12619
|
});
|
|
12626
|
-
},
|
|
12620
|
+
}, fu = ({ 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 }) => {
|
|
12627
12621
|
let S = m(null), C = b({
|
|
12628
12622
|
name: t,
|
|
12629
12623
|
control: e.control
|
|
12630
|
-
}), 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(() =>
|
|
12624
|
+
}), 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(() => au(C.field.value), [C.field.value]), j = p(() => !k && A.length < a, [
|
|
12631
12625
|
k,
|
|
12632
12626
|
a,
|
|
12633
12627
|
A.length
|
|
@@ -12635,7 +12629,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12635
12629
|
u(() => {
|
|
12636
12630
|
N.current = A;
|
|
12637
12631
|
}, [A]), u(() => () => {
|
|
12638
|
-
for (let e of N.current)
|
|
12632
|
+
for (let e of N.current) ru(e);
|
|
12639
12633
|
}, []);
|
|
12640
12634
|
let P = s((e) => {
|
|
12641
12635
|
C.field.onChange(e), _?.(e);
|
|
@@ -12650,7 +12644,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12650
12644
|
D(`Hay imágenes que superan ${o} MB.`);
|
|
12651
12645
|
return;
|
|
12652
12646
|
}
|
|
12653
|
-
let r = a - A.length, i = n.slice(0, r).map((e) =>
|
|
12647
|
+
let r = a - A.length, i = n.slice(0, r).map((e) => nu(e));
|
|
12654
12648
|
if (n.length > r) {
|
|
12655
12649
|
D(`Solo puedes agregar ${r} imagen(es) más.`);
|
|
12656
12650
|
return;
|
|
@@ -12663,7 +12657,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12663
12657
|
A
|
|
12664
12658
|
]), I = s((e) => {
|
|
12665
12659
|
let t = A.find((t) => t.id === e);
|
|
12666
|
-
t &&
|
|
12660
|
+
t && ru(t), P(A.filter((t) => t.id !== e));
|
|
12667
12661
|
}, [P, A]);
|
|
12668
12662
|
return /* @__PURE__ */ v(Z, {
|
|
12669
12663
|
id: w,
|
|
@@ -12735,19 +12729,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12735
12729
|
]
|
|
12736
12730
|
})
|
|
12737
12731
|
});
|
|
12738
|
-
},
|
|
12732
|
+
}, pu = (e) => {
|
|
12739
12733
|
switch (e.kind) {
|
|
12740
|
-
case "photo": return /* @__PURE__ */ v(
|
|
12741
|
-
case "multiPhoto": return /* @__PURE__ */ v(
|
|
12742
|
-
case "signature": return /* @__PURE__ */ v(
|
|
12734
|
+
case "photo": return /* @__PURE__ */ v(uu, { ...e });
|
|
12735
|
+
case "multiPhoto": return /* @__PURE__ */ v(fu, { ...e });
|
|
12736
|
+
case "signature": return /* @__PURE__ */ v(du, { ...e });
|
|
12743
12737
|
case "file": return /* @__PURE__ */ v(Un, { ...e });
|
|
12744
12738
|
default: return null;
|
|
12745
12739
|
}
|
|
12746
|
-
},
|
|
12740
|
+
}, mu = (e) => new Promise((t, n) => {
|
|
12747
12741
|
let r = new Image();
|
|
12748
12742
|
r.addEventListener("load", () => t(r)), r.addEventListener("error", () => n(/* @__PURE__ */ Error("No se pudo cargar la imagen"))), r.setAttribute("crossOrigin", "anonymous"), r.src = e;
|
|
12749
|
-
}),
|
|
12750
|
-
let i = await
|
|
12743
|
+
}), hu = async (e, t, n, r = "image/jpeg") => {
|
|
12744
|
+
let i = await mu(e), a = document.createElement("canvas");
|
|
12751
12745
|
a.width = t.width, a.height = t.height;
|
|
12752
12746
|
let o = a.getContext("2d");
|
|
12753
12747
|
if (!o) throw Error("Canvas no disponible");
|
|
@@ -12760,7 +12754,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12760
12754
|
e(new File([i], n, { type: r }));
|
|
12761
12755
|
}, r, .92);
|
|
12762
12756
|
});
|
|
12763
|
-
},
|
|
12757
|
+
}, gu = ({ imageUrl: e, fileName: t, aspect: n = 1, onCancel: r, onConfirm: i, className: a }) => {
|
|
12764
12758
|
let [o, c] = h({
|
|
12765
12759
|
x: 0,
|
|
12766
12760
|
y: 0
|
|
@@ -12771,7 +12765,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12771
12765
|
m(!0);
|
|
12772
12766
|
try {
|
|
12773
12767
|
let n = t.toLowerCase().endsWith(".png") ? "image/png" : "image/jpeg";
|
|
12774
|
-
i(await
|
|
12768
|
+
i(await hu(e, d, t, n));
|
|
12775
12769
|
} finally {
|
|
12776
12770
|
m(!1);
|
|
12777
12771
|
}
|
|
@@ -12822,7 +12816,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12822
12816
|
})
|
|
12823
12817
|
]
|
|
12824
12818
|
});
|
|
12825
|
-
},
|
|
12819
|
+
}, _u = ({ 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 }) => {
|
|
12826
12820
|
let S = m(null), C = b({
|
|
12827
12821
|
name: t,
|
|
12828
12822
|
control: e.control
|
|
@@ -12851,7 +12845,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12851
12845
|
}
|
|
12852
12846
|
T(!0);
|
|
12853
12847
|
try {
|
|
12854
|
-
let t = await
|
|
12848
|
+
let t = await ou(e);
|
|
12855
12849
|
I(t);
|
|
12856
12850
|
} finally {
|
|
12857
12851
|
T(!1);
|
|
@@ -12943,7 +12937,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12943
12937
|
role: "dialog",
|
|
12944
12938
|
"aria-modal": "true",
|
|
12945
12939
|
"aria-label": "Editor de recorte",
|
|
12946
|
-
children: /* @__PURE__ */ v(
|
|
12940
|
+
children: /* @__PURE__ */ v(gu, {
|
|
12947
12941
|
imageUrl: E.url,
|
|
12948
12942
|
fileName: E.fileName,
|
|
12949
12943
|
aspect: c,
|
|
@@ -12955,7 +12949,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12955
12949
|
})]
|
|
12956
12950
|
})]
|
|
12957
12951
|
});
|
|
12958
|
-
},
|
|
12952
|
+
}, vu = () => [], yu = ({ title: e, description: t, className: n, children: r }) => /* @__PURE__ */ y("section", {
|
|
12959
12953
|
className: (0, X.default)("sf-neutral-map-frame", n),
|
|
12960
12954
|
children: [(e || t) && /* @__PURE__ */ y("div", {
|
|
12961
12955
|
className: "sf-neutral-map-frame__header",
|
|
@@ -12967,11 +12961,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12967
12961
|
children: t
|
|
12968
12962
|
})]
|
|
12969
12963
|
}), r]
|
|
12970
|
-
}),
|
|
12964
|
+
}), bu = ({ tone: e = "info", children: t }) => /* @__PURE__ */ v("p", {
|
|
12971
12965
|
className: (0, X.default)("sf-neutral-map-status", `sf-neutral-map-status--${e}`),
|
|
12972
12966
|
role: e === "error" ? "alert" : "status",
|
|
12973
12967
|
children: t
|
|
12974
|
-
}),
|
|
12968
|
+
}), xu = ({ items: e, className: t }) => /* @__PURE__ */ v("div", {
|
|
12975
12969
|
className: (0, X.default)("sf-map-legend", t),
|
|
12976
12970
|
role: "list",
|
|
12977
12971
|
"aria-label": "Leyenda del mapa",
|
|
@@ -12998,7 +12992,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
12998
12992
|
})
|
|
12999
12993
|
]
|
|
13000
12994
|
}, t))
|
|
13001
|
-
}),
|
|
12995
|
+
}), Su = ({ mapType: e, onMapTypeChange: t, onFullscreen: n, onLayers: r, className: i }) => /* @__PURE__ */ y("div", {
|
|
13002
12996
|
className: (0, X.default)("sf-map-toolbar", i),
|
|
13003
12997
|
children: [
|
|
13004
12998
|
/* @__PURE__ */ y("div", {
|
|
@@ -13036,7 +13030,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13036
13030
|
children: /* @__PURE__ */ v(lt, { "aria-hidden": "true" })
|
|
13037
13031
|
})
|
|
13038
13032
|
]
|
|
13039
|
-
}),
|
|
13033
|
+
}), Cu = ({ title: e, subtitle: t, statusLabel: n, statusColor: r, speedKmh: i, onClick: a, className: o }) => /* @__PURE__ */ y("div", {
|
|
13040
13034
|
className: (0, X.default)("sf-map-vehicle-popup", a && "sf-map-vehicle-popup--interactive", o),
|
|
13041
13035
|
onClick: a,
|
|
13042
13036
|
onKeyDown: (e) => {
|
|
@@ -13076,7 +13070,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13076
13070
|
]
|
|
13077
13071
|
})
|
|
13078
13072
|
]
|
|
13079
|
-
}),
|
|
13073
|
+
}), wu = ({ title: e = "Lo que encontré aquí", items: t, loading: n, error: r, warning: i, onClose: a, className: o }) => {
|
|
13080
13074
|
let s = t.filter((e) => e.value !== void 0 && e.value !== null && e.value !== "");
|
|
13081
13075
|
return /* @__PURE__ */ y("section", {
|
|
13082
13076
|
className: (0, X.default)("sf-map-point-card", o),
|
|
@@ -13130,51 +13124,51 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13130
13124
|
})
|
|
13131
13125
|
]
|
|
13132
13126
|
});
|
|
13133
|
-
},
|
|
13127
|
+
}, Tu = "Maps config not found. Wrap your app with <SfProvider maps={...}>.", Eu = {
|
|
13134
13128
|
lat: -12.0464,
|
|
13135
13129
|
lng: -77.0428
|
|
13136
|
-
},
|
|
13130
|
+
}, Du = 13, Ou = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", ku = "© <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>", Au = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", ju = "Imagen © <a href=\"https://www.esri.com\" target=\"_blank\" rel=\"noreferrer\">Esri</a>, Maxar, Earthstar Geographics", Mu = {
|
|
13137
13131
|
drawing: "basic",
|
|
13138
13132
|
streetView: "none",
|
|
13139
13133
|
clustering: "none",
|
|
13140
13134
|
heatmap: "none"
|
|
13141
|
-
},
|
|
13135
|
+
}, Nu = {
|
|
13142
13136
|
drawing: "basic",
|
|
13143
13137
|
streetView: "interactive",
|
|
13144
13138
|
clustering: "client",
|
|
13145
13139
|
heatmap: "weighted"
|
|
13146
|
-
},
|
|
13140
|
+
}, Pu = "sf-google-maps-script", Fu = ({ apiKey: e, language: t = "es", region: n = "PE", libraries: r = [] }) => {
|
|
13147
13141
|
let i = new URLSearchParams({
|
|
13148
13142
|
key: e,
|
|
13149
13143
|
language: t,
|
|
13150
13144
|
region: n
|
|
13151
13145
|
});
|
|
13152
13146
|
return r.length > 0 && i.set("libraries", r.join(",")), `https://maps.googleapis.com/maps/api/js?${i.toString()}`;
|
|
13153
|
-
},
|
|
13147
|
+
}, Iu = (e) => {
|
|
13154
13148
|
let t = window;
|
|
13155
13149
|
return t.google?.maps ? Promise.resolve(t.google) : (t.__sfGoogleMapsPromise ||= new Promise((n, r) => {
|
|
13156
|
-
let i = document.getElementById(
|
|
13150
|
+
let i = document.getElementById(Pu);
|
|
13157
13151
|
if (i) {
|
|
13158
13152
|
i.addEventListener("load", () => n(t.google ?? {})), i.addEventListener("error", () => r(/* @__PURE__ */ Error("No se pudo cargar Google Maps.")));
|
|
13159
13153
|
return;
|
|
13160
13154
|
}
|
|
13161
13155
|
let a = document.createElement("script");
|
|
13162
|
-
a.id =
|
|
13156
|
+
a.id = Pu, a.src = Fu(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);
|
|
13163
13157
|
}), t.__sfGoogleMapsPromise);
|
|
13164
|
-
},
|
|
13158
|
+
}, Lu = (e, t = "") => {
|
|
13165
13159
|
let n = e.match(/^var\((--[^,)]+)\)$/);
|
|
13166
13160
|
return !n || typeof document > "u" ? t || e : getComputedStyle(document.documentElement).getPropertyValue(n[1]).trim() || t || e;
|
|
13167
|
-
},
|
|
13168
|
-
dLat: e.radiusM /
|
|
13169
|
-
dLng: e.radiusM / (
|
|
13170
|
-
}),
|
|
13171
|
-
let { dLat: t, dLng: n } =
|
|
13161
|
+
}, Ru = 111320, zu = (e) => ({
|
|
13162
|
+
dLat: e.radiusM / Ru,
|
|
13163
|
+
dLng: e.radiusM / (Ru * Math.cos(e.center.lat * Math.PI / 180))
|
|
13164
|
+
}), Bu = (e) => {
|
|
13165
|
+
let { dLat: t, dLng: n } = zu(e);
|
|
13172
13166
|
return {
|
|
13173
13167
|
lat: e.center.lat - t * .62,
|
|
13174
13168
|
lng: e.center.lng + n * .62
|
|
13175
13169
|
};
|
|
13176
|
-
},
|
|
13177
|
-
let { dLat: n, dLng: r } =
|
|
13170
|
+
}, Vu = (e, t = 72) => {
|
|
13171
|
+
let { dLat: n, dLng: r } = zu(e);
|
|
13178
13172
|
return Array.from({ length: t + 1 }, (i, a) => {
|
|
13179
13173
|
let o = a / t * 2 * Math.PI;
|
|
13180
13174
|
return {
|
|
@@ -13182,42 +13176,42 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13182
13176
|
lng: e.center.lng + r * Math.cos(o)
|
|
13183
13177
|
};
|
|
13184
13178
|
});
|
|
13185
|
-
},
|
|
13179
|
+
}, Hu = (e, t) => ({
|
|
13186
13180
|
map: t,
|
|
13187
13181
|
paths: e.points,
|
|
13188
|
-
strokeColor: e.color ??
|
|
13189
|
-
fillColor: e.fillColor ?? e.color ??
|
|
13182
|
+
strokeColor: e.color ?? Lu("var(--sf-map-area-stroke)"),
|
|
13183
|
+
fillColor: e.fillColor ?? e.color ?? Lu("var(--sf-map-area-fill)"),
|
|
13190
13184
|
fillOpacity: .14,
|
|
13191
13185
|
strokeWeight: 2.5
|
|
13192
|
-
}),
|
|
13186
|
+
}), Uu = (e, t) => ({
|
|
13193
13187
|
map: t,
|
|
13194
13188
|
path: e.points,
|
|
13195
|
-
strokeColor: e.color ??
|
|
13189
|
+
strokeColor: e.color ?? Lu("var(--sf-map-route-stroke)"),
|
|
13196
13190
|
strokeWeight: 3.5
|
|
13197
|
-
}),
|
|
13191
|
+
}), Wu = (e, t) => ({
|
|
13198
13192
|
map: t,
|
|
13199
13193
|
center: e.center,
|
|
13200
13194
|
radius: e.radiusM,
|
|
13201
|
-
strokeColor: e.color ??
|
|
13202
|
-
fillColor: e.fillColor ?? e.color ??
|
|
13195
|
+
strokeColor: e.color ?? Lu("var(--sf-map-circle-stroke)"),
|
|
13196
|
+
fillColor: e.fillColor ?? e.color ?? Lu("var(--sf-map-circle-fill)"),
|
|
13203
13197
|
fillOpacity: .16,
|
|
13204
13198
|
strokeWeight: 2,
|
|
13205
13199
|
clickable: !1
|
|
13206
|
-
}),
|
|
13207
|
-
let n = t ? 26 : 14, r = n / 2 - 1.5, i = t ? `<text x="${n / 2}" y="${n / 2}" dy=".35em" text-anchor="middle" font-family="system-ui,Segoe UI,sans-serif" font-size="12" font-weight="700" fill="#fff">${
|
|
13200
|
+
}), Gu = (e) => `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(e)}`, Ku = (e) => Gu(`<svg xmlns="http://www.w3.org/2000/svg" width="30" height="40" viewBox="0 0 24 32"><path fill="${e}" d="M12 0C5.4 0 0 5.3 0 11.9 0 20.8 12 32 12 32s12-11.2 12-20.1C24 5.3 18.6 0 12 0z"/><circle cx="12" cy="12" r="4.6" fill="#fff"/></svg>`), qu = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), Ju = (e, t) => {
|
|
13201
|
+
let n = t ? 26 : 14, r = n / 2 - 1.5, i = t ? `<text x="${n / 2}" y="${n / 2}" dy=".35em" text-anchor="middle" font-family="system-ui,Segoe UI,sans-serif" font-size="12" font-weight="700" fill="#fff">${qu(t)}</text>` : "";
|
|
13208
13202
|
return {
|
|
13209
13203
|
size: n,
|
|
13210
|
-
url:
|
|
13204
|
+
url: Gu(`<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${n}"><circle cx="${n / 2}" cy="${n / 2}" r="${r}" fill="${e}" stroke="#fff" stroke-width="2"/>${i}</svg>`)
|
|
13211
13205
|
};
|
|
13212
|
-
},
|
|
13213
|
-
let i = e.options?.variant === "pin" && r?.Point && r?.Size, a = e.options?.variant === "badge" && r?.Point && r?.Size, o = e.options?.showLabel && e.label, s = a ?
|
|
13206
|
+
}, Yu = Gu("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1\" height=\"1\"/>"), Xu = (e, t, n, r) => {
|
|
13207
|
+
let i = e.options?.variant === "pin" && r?.Point && r?.Size, a = e.options?.variant === "badge" && r?.Point && r?.Size, o = e.options?.showLabel && e.label, s = a ? Ju(e.color ?? (Lu("var(--sf-map-pin-bg)") || "#16a34a"), e.options?.text) : null;
|
|
13214
13208
|
return {
|
|
13215
13209
|
map: t,
|
|
13216
13210
|
position: e.position,
|
|
13217
13211
|
title: e.title ?? e.label,
|
|
13218
13212
|
draggable: !n && e.options?.draggable,
|
|
13219
13213
|
icon: i ? {
|
|
13220
|
-
url:
|
|
13214
|
+
url: Ku(e.color ?? (Lu("var(--sf-map-pin-bg)") || "#16a34a")),
|
|
13221
13215
|
scaledSize: new r.Size(30, 40),
|
|
13222
13216
|
anchor: new r.Point(15, 40),
|
|
13223
13217
|
labelOrigin: new r.Point(15, -14)
|
|
@@ -13235,7 +13229,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13235
13229
|
fontWeight: "600"
|
|
13236
13230
|
} : i || s || !e.label ? void 0 : e.label.slice(0, 1).toUpperCase()
|
|
13237
13231
|
};
|
|
13238
|
-
},
|
|
13232
|
+
}, Zu = ({ config: e, center: t = Eu, zoom: n = 13, markers: r = [], routes: i = [], areas: a = [], circles: o = [], mapType: s = "roadmap", view: c, onViewChange: l, zoomControl: d = !0, height: f = 320, className: p, readOnly: g, onClick: _, onMarkerClick: y, onMarkerDoubleClick: b, onMarkerDrag: x, onMarkerDragEnd: S }) => {
|
|
13239
13233
|
let C = m(null), w = m(null), T = m(/* @__PURE__ */ new Map()), E = m(/* @__PURE__ */ new Map()), D = m(/* @__PURE__ */ new Map()), O = m(/* @__PURE__ */ new Map()), k = m(l);
|
|
13240
13234
|
u(() => {
|
|
13241
13235
|
k.current = l;
|
|
@@ -13272,9 +13266,9 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13272
13266
|
return;
|
|
13273
13267
|
}
|
|
13274
13268
|
let t = !1;
|
|
13275
|
-
return P("loading"),
|
|
13269
|
+
return P("loading"), Iu(e).then((n) => {
|
|
13276
13270
|
t || !C.current || !n.maps?.Map || (w.current = new n.maps.Map(C.current, {
|
|
13277
|
-
center:
|
|
13271
|
+
center: Eu,
|
|
13278
13272
|
zoom: 13,
|
|
13279
13273
|
mapId: e.mapId,
|
|
13280
13274
|
disableDefaultUI: g,
|
|
@@ -13316,16 +13310,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13316
13310
|
}, [N]), u(() => {
|
|
13317
13311
|
if (N !== "ready" || !e?.apiKey || !w.current) return;
|
|
13318
13312
|
let t = !1;
|
|
13319
|
-
return
|
|
13313
|
+
return Iu(e).then((e) => {
|
|
13320
13314
|
let n = e.maps;
|
|
13321
13315
|
t || !n?.Circle || (O.current.forEach((e) => e.forEach((e) => e.setMap?.(null))), O.current.clear(), o.forEach((e) => {
|
|
13322
|
-
let t = w.current, r = e.color ??
|
|
13323
|
-
...
|
|
13316
|
+
let t = w.current, r = e.color ?? Lu("var(--sf-map-circle-stroke)"), i = [new n.Circle({
|
|
13317
|
+
...Wu(e, t),
|
|
13324
13318
|
strokeOpacity: +!e.dashed
|
|
13325
13319
|
})];
|
|
13326
13320
|
e.dashed && i.push(new n.Polyline({
|
|
13327
13321
|
map: t,
|
|
13328
|
-
path:
|
|
13322
|
+
path: Vu(e),
|
|
13329
13323
|
clickable: !1,
|
|
13330
13324
|
strokeOpacity: 0,
|
|
13331
13325
|
icons: [{
|
|
@@ -13341,11 +13335,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13341
13335
|
}]
|
|
13342
13336
|
})), e.label && n.Point && i.push(new n.Marker({
|
|
13343
13337
|
map: t,
|
|
13344
|
-
position:
|
|
13338
|
+
position: Bu(e),
|
|
13345
13339
|
clickable: !1,
|
|
13346
13340
|
zIndex: 5,
|
|
13347
13341
|
icon: {
|
|
13348
|
-
url:
|
|
13342
|
+
url: Yu,
|
|
13349
13343
|
labelOrigin: new n.Point(0, 0)
|
|
13350
13344
|
},
|
|
13351
13345
|
label: {
|
|
@@ -13373,7 +13367,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13373
13367
|
}, []), u(() => {
|
|
13374
13368
|
if (N !== "ready" || !e?.apiKey || !w.current) return;
|
|
13375
13369
|
let t = !1;
|
|
13376
|
-
return
|
|
13370
|
+
return Iu(e).then((e) => {
|
|
13377
13371
|
if (t || !e.maps?.Marker) return;
|
|
13378
13372
|
let n = new Set(r.map((e) => e.id));
|
|
13379
13373
|
T.current.forEach((e, t) => {
|
|
@@ -13382,10 +13376,10 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13382
13376
|
E.current.set(t.id, t);
|
|
13383
13377
|
let n = T.current.get(t.id);
|
|
13384
13378
|
if (n) {
|
|
13385
|
-
n.marker.setPosition?.(t.position), n.marker.setOptions?.(
|
|
13379
|
+
n.marker.setPosition?.(t.position), n.marker.setOptions?.(Xu(t, w.current, g, e.maps));
|
|
13386
13380
|
return;
|
|
13387
13381
|
}
|
|
13388
|
-
let r = new e.maps.Marker(
|
|
13382
|
+
let r = new e.maps.Marker(Xu(t, w.current, g, e.maps)), i = () => E.current.get(t.id) ?? t, a = [
|
|
13389
13383
|
r.addListener?.("click", () => {
|
|
13390
13384
|
A.current.onMarkerClick?.({ marker: i() });
|
|
13391
13385
|
}),
|
|
@@ -13429,7 +13423,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13429
13423
|
]), u(() => {
|
|
13430
13424
|
if (N !== "ready" || !e?.apiKey || !w.current) return;
|
|
13431
13425
|
let t = !1;
|
|
13432
|
-
return
|
|
13426
|
+
return Iu(e).then((e) => {
|
|
13433
13427
|
if (t || !e.maps?.Polyline || !e.maps.Polygon) return;
|
|
13434
13428
|
let n = /* @__PURE__ */ new Set([...a.map((e) => `area:${e.id}`), ...i.map((e) => `route:${e.id}`)]);
|
|
13435
13429
|
D.current.forEach((e, t) => {
|
|
@@ -13437,22 +13431,22 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13437
13431
|
}), a.forEach((t) => {
|
|
13438
13432
|
let n = `area:${t.id}`, r = D.current.get(n);
|
|
13439
13433
|
if (r?.kind === "area") {
|
|
13440
|
-
r.shape.setPaths?.(t.points), r.shape.setOptions?.(
|
|
13434
|
+
r.shape.setPaths?.(t.points), r.shape.setOptions?.(Hu(t, w.current));
|
|
13441
13435
|
return;
|
|
13442
13436
|
}
|
|
13443
13437
|
r?.shape.setMap?.(null), D.current.set(n, {
|
|
13444
13438
|
kind: "area",
|
|
13445
|
-
shape: new e.maps.Polygon(
|
|
13439
|
+
shape: new e.maps.Polygon(Hu(t, w.current))
|
|
13446
13440
|
});
|
|
13447
13441
|
}), i.forEach((t) => {
|
|
13448
13442
|
let n = `route:${t.id}`, r = D.current.get(n);
|
|
13449
13443
|
if (r?.kind === "route") {
|
|
13450
|
-
r.shape.setPath?.(t.points), r.shape.setOptions?.(
|
|
13444
|
+
r.shape.setPath?.(t.points), r.shape.setOptions?.(Uu(t, w.current));
|
|
13451
13445
|
return;
|
|
13452
13446
|
}
|
|
13453
13447
|
r?.shape.setMap?.(null), D.current.set(n, {
|
|
13454
13448
|
kind: "route",
|
|
13455
|
-
shape: new e.maps.Polyline(
|
|
13449
|
+
shape: new e.maps.Polyline(Uu(t, w.current))
|
|
13456
13450
|
});
|
|
13457
13451
|
});
|
|
13458
13452
|
}), () => {
|
|
@@ -13466,7 +13460,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13466
13460
|
]), u(() => {
|
|
13467
13461
|
if (N !== "ready" || !e?.apiKey || !w.current || !_ || g) return;
|
|
13468
13462
|
let t = !1, n;
|
|
13469
|
-
return
|
|
13463
|
+
return Iu(e).then(() => {
|
|
13470
13464
|
let e = w.current;
|
|
13471
13465
|
t || !e?.addListener || (n = e.addListener("click", (e) => {
|
|
13472
13466
|
e.latLng && (e.placeId && e.stop?.(), _({
|
|
@@ -13498,25 +13492,25 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13498
13492
|
"aria-busy": N !== "ready" || void 0
|
|
13499
13493
|
})
|
|
13500
13494
|
});
|
|
13501
|
-
},
|
|
13495
|
+
}, Qu = (e) => ({
|
|
13502
13496
|
id: "google",
|
|
13503
|
-
capabilities:
|
|
13504
|
-
createRenderer: () => (t) => /* @__PURE__ */ v(
|
|
13497
|
+
capabilities: Nu,
|
|
13498
|
+
createRenderer: () => (t) => /* @__PURE__ */ v(Zu, {
|
|
13505
13499
|
...t,
|
|
13506
13500
|
config: e
|
|
13507
13501
|
})
|
|
13508
|
-
}),
|
|
13502
|
+
}), $u = (e) => [e.lat, e.lng], ed = (e) => oe.divIcon({
|
|
13509
13503
|
className: "",
|
|
13510
13504
|
html: `<div class="sf-neutral-map-marker" style="${e ? `--sf-neutral-map-marker-bg:${e};` : ""}"></div>`,
|
|
13511
13505
|
iconSize: [18, 18],
|
|
13512
13506
|
iconAnchor: [9, 9]
|
|
13513
|
-
}),
|
|
13507
|
+
}), td = (e) => oe.divIcon({
|
|
13514
13508
|
className: "",
|
|
13515
13509
|
html: `<div class="sf-map-pin" style="${e ? `--sf-map-pin-bg:${e};` : ""}"><svg viewBox="0 0 24 32" aria-hidden="true"><path d="M12 0C5.4 0 0 5.3 0 11.9 0 20.8 12 32 12 32s12-11.2 12-20.1C24 5.3 18.6 0 12 0z"/><circle cx="12" cy="12" r="4.6"/></svg></div>`,
|
|
13516
13510
|
iconSize: [30, 40],
|
|
13517
13511
|
iconAnchor: [15, 40],
|
|
13518
13512
|
tooltipAnchor: [0, -40]
|
|
13519
|
-
}),
|
|
13513
|
+
}), nd = (e, t) => {
|
|
13520
13514
|
let n = t ? 26 : 14;
|
|
13521
13515
|
return oe.divIcon({
|
|
13522
13516
|
className: "",
|
|
@@ -13525,12 +13519,12 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13525
13519
|
iconAnchor: [n / 2, n / 2],
|
|
13526
13520
|
tooltipAnchor: [0, -n / 2]
|
|
13527
13521
|
});
|
|
13528
|
-
},
|
|
13522
|
+
}, rd = (e) => e.options?.variant === "pin" ? td(e.color) : e.options?.variant === "badge" ? nd(e.color, e.options.text) : ed(e.color), id = (e) => oe.divIcon({
|
|
13529
13523
|
className: "",
|
|
13530
13524
|
html: `<span class="sf-map-circle-label">${e.replace(/</g, "<")}</span>`,
|
|
13531
13525
|
iconSize: void 0,
|
|
13532
13526
|
iconAnchor: [0, 0]
|
|
13533
|
-
}),
|
|
13527
|
+
}), ad = ({ readOnly: e, onClick: t, onViewChange: n }) => (ae({
|
|
13534
13528
|
click(n) {
|
|
13535
13529
|
e || t?.({ location: {
|
|
13536
13530
|
lat: n.latlng.lat,
|
|
@@ -13548,27 +13542,27 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13548
13542
|
zoom: t.getZoom()
|
|
13549
13543
|
});
|
|
13550
13544
|
}
|
|
13551
|
-
}), null),
|
|
13545
|
+
}), null), od = (e, t) => {
|
|
13552
13546
|
let n = e.getCenter();
|
|
13553
13547
|
return e.getZoom() === t.zoom && Math.abs(n.lat - t.center.lat) < 1e-7 && Math.abs(n.lng - t.center.lng) < 1e-7;
|
|
13554
|
-
},
|
|
13548
|
+
}, sd = ({ view: e }) => {
|
|
13555
13549
|
let t = U();
|
|
13556
13550
|
return u(() => {
|
|
13557
|
-
!e ||
|
|
13551
|
+
!e || od(t, e) || t.setView($u(e.center), e.zoom);
|
|
13558
13552
|
}, [t, e]), null;
|
|
13559
|
-
},
|
|
13553
|
+
}, cd = () => {
|
|
13560
13554
|
let e = U();
|
|
13561
13555
|
return u(() => {
|
|
13562
13556
|
if (typeof ResizeObserver > "u") return;
|
|
13563
13557
|
let t = new ResizeObserver(() => e.invalidateSize());
|
|
13564
13558
|
return t.observe(e.getContainer()), () => t.disconnect();
|
|
13565
13559
|
}, [e]), null;
|
|
13566
|
-
},
|
|
13567
|
-
let C = Lo(), w = p(() =>
|
|
13560
|
+
}, ld = ({ center: e = Eu, zoom: t = 13, markers: n = [], routes: r = [], areas: i = [], circles: a = [], mapType: o = "roadmap", view: s, onViewChange: c, zoomControl: l = !0, height: u = 320, className: d, readOnly: f, tileUrl: m = Ou, attribution: h = ku, onClick: g, onMarkerClick: _, onMarkerDoubleClick: b, onMarkerDrag: x, onMarkerDragEnd: S }) => {
|
|
13561
|
+
let C = Lo(), w = p(() => $u(s?.center ?? e), [s?.center, e]), T = typeof u == "number" ? { height: `${u}px` } : { height: u }, E = o === "satellite";
|
|
13568
13562
|
return C ? /* @__PURE__ */ v("div", {
|
|
13569
13563
|
className: d,
|
|
13570
13564
|
style: T,
|
|
13571
|
-
children: /* @__PURE__ */ y(
|
|
13565
|
+
children: /* @__PURE__ */ y(te, {
|
|
13572
13566
|
center: w,
|
|
13573
13567
|
zoom: s?.zoom ?? t,
|
|
13574
13568
|
scrollWheelZoom: !f,
|
|
@@ -13576,54 +13570,54 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13576
13570
|
zoomControl: l,
|
|
13577
13571
|
className: "sf-map-frame",
|
|
13578
13572
|
children: [
|
|
13579
|
-
/* @__PURE__ */ v(
|
|
13580
|
-
attribution: E ?
|
|
13581
|
-
url: E ?
|
|
13573
|
+
/* @__PURE__ */ v(V, {
|
|
13574
|
+
attribution: E ? ju : h,
|
|
13575
|
+
url: E ? Au : m
|
|
13582
13576
|
}, E ? "satellite" : "roadmap"),
|
|
13583
|
-
/* @__PURE__ */ v(
|
|
13577
|
+
/* @__PURE__ */ v(ad, {
|
|
13584
13578
|
readOnly: f,
|
|
13585
13579
|
onClick: g,
|
|
13586
13580
|
onViewChange: c
|
|
13587
13581
|
}),
|
|
13588
|
-
/* @__PURE__ */ v(
|
|
13589
|
-
/* @__PURE__ */ v(
|
|
13590
|
-
i.map((e) => /* @__PURE__ */ v(
|
|
13591
|
-
positions: e.points.map(
|
|
13582
|
+
/* @__PURE__ */ v(sd, { view: s }),
|
|
13583
|
+
/* @__PURE__ */ v(cd, {}),
|
|
13584
|
+
i.map((e) => /* @__PURE__ */ v(re, {
|
|
13585
|
+
positions: e.points.map($u),
|
|
13592
13586
|
pathOptions: {
|
|
13593
|
-
color: e.color ??
|
|
13594
|
-
fillColor: e.fillColor ?? e.color ??
|
|
13587
|
+
color: e.color ?? Lu("var(--sf-map-area-stroke)"),
|
|
13588
|
+
fillColor: e.fillColor ?? e.color ?? Lu("var(--sf-map-area-fill)"),
|
|
13595
13589
|
fillOpacity: .14,
|
|
13596
13590
|
weight: 2.5
|
|
13597
13591
|
}
|
|
13598
13592
|
}, e.id)),
|
|
13599
13593
|
a.map((e) => /* @__PURE__ */ v(ee, {
|
|
13600
|
-
center:
|
|
13594
|
+
center: $u(e.center),
|
|
13601
13595
|
radius: e.radiusM,
|
|
13602
13596
|
bubblingMouseEvents: !1,
|
|
13603
13597
|
pathOptions: {
|
|
13604
|
-
color: e.color ??
|
|
13605
|
-
fillColor: e.fillColor ?? e.color ??
|
|
13598
|
+
color: e.color ?? Lu("var(--sf-map-circle-stroke)"),
|
|
13599
|
+
fillColor: e.fillColor ?? e.color ?? Lu("var(--sf-map-circle-fill)"),
|
|
13606
13600
|
fillOpacity: .16,
|
|
13607
13601
|
weight: 2,
|
|
13608
13602
|
dashArray: e.dashed ? "6 6" : void 0
|
|
13609
13603
|
}
|
|
13610
13604
|
}, e.id)),
|
|
13611
|
-
a.filter((e) => e.label).map((e) => /* @__PURE__ */ v(
|
|
13612
|
-
position:
|
|
13613
|
-
icon:
|
|
13605
|
+
a.filter((e) => e.label).map((e) => /* @__PURE__ */ v(ne, {
|
|
13606
|
+
position: $u(Bu(e)),
|
|
13607
|
+
icon: id(e.label ?? ""),
|
|
13614
13608
|
interactive: !1,
|
|
13615
13609
|
keyboard: !1
|
|
13616
13610
|
}, `${e.id}-label`)),
|
|
13617
|
-
r.map((e) => /* @__PURE__ */ v(
|
|
13618
|
-
positions: e.points.map(
|
|
13611
|
+
r.map((e) => /* @__PURE__ */ v(ie, {
|
|
13612
|
+
positions: e.points.map($u),
|
|
13619
13613
|
pathOptions: {
|
|
13620
|
-
color: e.color ??
|
|
13614
|
+
color: e.color ?? Lu("var(--sf-map-route-stroke)"),
|
|
13621
13615
|
weight: 3.5
|
|
13622
13616
|
}
|
|
13623
13617
|
}, e.id)),
|
|
13624
|
-
n.map((e) => /* @__PURE__ */ v(
|
|
13625
|
-
position:
|
|
13626
|
-
icon:
|
|
13618
|
+
n.map((e) => /* @__PURE__ */ v(ne, {
|
|
13619
|
+
position: $u(e.position),
|
|
13620
|
+
icon: rd(e),
|
|
13627
13621
|
title: e.title ?? e.label,
|
|
13628
13622
|
draggable: !f && e.options?.draggable,
|
|
13629
13623
|
bubblingMouseEvents: !1,
|
|
@@ -13651,7 +13645,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13651
13645
|
});
|
|
13652
13646
|
}
|
|
13653
13647
|
},
|
|
13654
|
-
children: e.options?.showLabel && e.label && /* @__PURE__ */ v(
|
|
13648
|
+
children: e.options?.showLabel && e.label && /* @__PURE__ */ v(H, {
|
|
13655
13649
|
permanent: !0,
|
|
13656
13650
|
direction: "top",
|
|
13657
13651
|
className: "sf-map-marker-label",
|
|
@@ -13666,18 +13660,18 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13666
13660
|
style: T,
|
|
13667
13661
|
children: "Cargando mapa…"
|
|
13668
13662
|
});
|
|
13669
|
-
},
|
|
13663
|
+
}, ud = (e) => ({
|
|
13670
13664
|
id: "leaflet",
|
|
13671
|
-
capabilities:
|
|
13672
|
-
createRenderer: () => (t) => /* @__PURE__ */ v(
|
|
13665
|
+
capabilities: Mu,
|
|
13666
|
+
createRenderer: () => (t) => /* @__PURE__ */ v(ld, {
|
|
13673
13667
|
...t,
|
|
13674
13668
|
tileUrl: e?.tileUrl,
|
|
13675
13669
|
attribution: e?.attribution
|
|
13676
13670
|
})
|
|
13677
|
-
}),
|
|
13678
|
-
let n =
|
|
13679
|
-
return 2 *
|
|
13680
|
-
},
|
|
13671
|
+
}), dd = 6371e3, fd = (e) => e * Math.PI / 180, pd = (e, t) => {
|
|
13672
|
+
let n = fd(t.lat - e.lat), r = fd(t.lng - e.lng), i = fd(e.lat), a = fd(t.lat), o = Math.sin(n / 2) ** 2 + Math.sin(r / 2) ** 2 * Math.cos(i) * Math.cos(a);
|
|
13673
|
+
return 2 * dd * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o));
|
|
13674
|
+
}, md = () => ({
|
|
13681
13675
|
id: "basic",
|
|
13682
13676
|
capabilities: {
|
|
13683
13677
|
distance: "point-to-point",
|
|
@@ -13685,62 +13679,62 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13685
13679
|
},
|
|
13686
13680
|
async calculateDistance(e) {
|
|
13687
13681
|
let t = e.origins[0], n = e.destinations[0];
|
|
13688
|
-
return { distanceMeters: t && n ?
|
|
13682
|
+
return { distanceMeters: t && n ? pd(t, n) : 0 };
|
|
13689
13683
|
}
|
|
13690
|
-
}),
|
|
13684
|
+
}), hd = (e) => ({
|
|
13691
13685
|
lat: e.lat(),
|
|
13692
13686
|
lng: e.lng()
|
|
13693
|
-
}),
|
|
13687
|
+
}), gd = /^unnamed road$/i, _d = /^distrito de\s+/i, vd = /^[23456789CFGHJMPQRVWX]{4,8}\+[23456789CFGHJMPQRVWX]{0,3},?\s*/i, yd = (e) => e?.replace(/^unnamed road,\s*/i, "").replace(vd, "").trim() || void 0, bd = (e, ...t) => {
|
|
13694
13688
|
for (let n of t) {
|
|
13695
13689
|
let t = e.address_components?.find((e) => e.types?.includes(n))?.long_name?.trim();
|
|
13696
|
-
if (t && !(n === "route" &&
|
|
13690
|
+
if (t && !(n === "route" && gd.test(t))) return t;
|
|
13697
13691
|
}
|
|
13698
|
-
},
|
|
13692
|
+
}, xd = (e, t = e.find((e) => bd(e, "route"))) => {
|
|
13699
13693
|
let n = (...t) => {
|
|
13700
13694
|
for (let n of e) {
|
|
13701
|
-
let e =
|
|
13695
|
+
let e = bd(n, ...t);
|
|
13702
13696
|
if (e) return e;
|
|
13703
13697
|
}
|
|
13704
|
-
}, r = t ?
|
|
13698
|
+
}, r = t ? bd(t, "route") : void 0, i = t ? bd(t, "street_number") : void 0, a = e.flatMap((e) => [
|
|
13705
13699
|
"sublocality_level_1",
|
|
13706
13700
|
"sublocality",
|
|
13707
13701
|
"neighborhood"
|
|
13708
|
-
].map((t) =>
|
|
13702
|
+
].map((t) => bd(e, t)).filter(Boolean)), o = a.find((e) => _d.test(e))?.replace(_d, "");
|
|
13709
13703
|
return {
|
|
13710
13704
|
street: r,
|
|
13711
13705
|
number: i,
|
|
13712
13706
|
line: r ? [r, i].filter(Boolean).join(" ") : void 0,
|
|
13713
|
-
neighborhood: a.find((e) => !
|
|
13707
|
+
neighborhood: a.find((e) => !_d.test(e)),
|
|
13714
13708
|
locality: n("locality"),
|
|
13715
|
-
district: o || n("administrative_area_level_3", "locality")?.replace(
|
|
13709
|
+
district: o || n("administrative_area_level_3", "locality")?.replace(_d, ""),
|
|
13716
13710
|
province: n("administrative_area_level_2"),
|
|
13717
13711
|
department: n("administrative_area_level_1"),
|
|
13718
13712
|
country: n("country"),
|
|
13719
13713
|
postalCode: n("postal_code")
|
|
13720
13714
|
};
|
|
13721
|
-
},
|
|
13715
|
+
}, Sd = (e) => {
|
|
13722
13716
|
let t = e.geometry?.location;
|
|
13723
13717
|
if (!t) return null;
|
|
13724
|
-
let n =
|
|
13718
|
+
let n = yd(e.formatted_address), r = n ?? e.place_id ?? "Ubicación Google Maps";
|
|
13725
13719
|
return {
|
|
13726
13720
|
id: e.place_id ?? r,
|
|
13727
13721
|
label: r,
|
|
13728
13722
|
address: n,
|
|
13729
|
-
location:
|
|
13723
|
+
location: hd(t),
|
|
13730
13724
|
provider: "google",
|
|
13731
|
-
parts: e.address_components ?
|
|
13725
|
+
parts: e.address_components ? xd([e]) : void 0,
|
|
13732
13726
|
raw: e
|
|
13733
13727
|
};
|
|
13734
|
-
},
|
|
13728
|
+
}, Cd = (e, t) => {
|
|
13735
13729
|
let n = (e) => e * Math.PI / 180, r = Math.sin(n(t.lat - e.lat) / 2) ** 2 + Math.cos(n(e.lat)) * Math.cos(n(t.lat)) * Math.sin(n(t.lng - e.lng) / 2) ** 2;
|
|
13736
13730
|
return 12742e3 * Math.asin(Math.sqrt(r));
|
|
13737
|
-
},
|
|
13731
|
+
}, wd = /* @__PURE__ */ new Set(["ROOFTOP", "RANGE_INTERPOLATED"]), Td = (e, t) => {
|
|
13738
13732
|
if (t.length === 0) return null;
|
|
13739
|
-
let n = t.filter((e) =>
|
|
13733
|
+
let n = t.filter((e) => bd(e, "route") && e.geometry?.location).map((t) => ({
|
|
13740
13734
|
result: t,
|
|
13741
|
-
punto:
|
|
13742
|
-
distancia:
|
|
13743
|
-
})).sort((e, t) => Number(t.punto) - Number(e.punto) || e.distancia - t.distancia)[0], r = n?.result ?? t[0], i =
|
|
13735
|
+
punto: wd.has(t.geometry?.location_type ?? ""),
|
|
13736
|
+
distancia: Cd(e, hd(t.geometry.location))
|
|
13737
|
+
})).sort((e, t) => Number(t.punto) - Number(e.punto) || e.distancia - t.distancia)[0], r = n?.result ?? t[0], i = yd(r.formatted_address), a = i ?? `${e.lat.toFixed(6)}, ${e.lng.toFixed(6)}`, o = xd(t, n?.result);
|
|
13744
13738
|
return {
|
|
13745
13739
|
id: r.place_id ?? a,
|
|
13746
13740
|
label: a,
|
|
@@ -13753,27 +13747,27 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13753
13747
|
} : o,
|
|
13754
13748
|
raw: r
|
|
13755
13749
|
};
|
|
13756
|
-
},
|
|
13750
|
+
}, Ed = (e) => ({
|
|
13757
13751
|
id: "google",
|
|
13758
13752
|
capabilities: { geocoding: "full" },
|
|
13759
13753
|
async geocode(t) {
|
|
13760
|
-
let n = (await
|
|
13754
|
+
let n = (await Iu(e)).maps?.Geocoder;
|
|
13761
13755
|
return n ? new Promise((e) => {
|
|
13762
13756
|
new n().geocode({ address: t }, (t) => {
|
|
13763
|
-
e((t ?? []).map((e) =>
|
|
13757
|
+
e((t ?? []).map((e) => Sd(e)).filter((e) => !!e));
|
|
13764
13758
|
});
|
|
13765
13759
|
}) : [];
|
|
13766
13760
|
},
|
|
13767
13761
|
async reverseGeocode(t) {
|
|
13768
|
-
let n = (await
|
|
13762
|
+
let n = (await Iu(e)).maps?.Geocoder;
|
|
13769
13763
|
return n ? new Promise((e) => {
|
|
13770
13764
|
new n().geocode({ location: t }, (n) => {
|
|
13771
|
-
e(
|
|
13765
|
+
e(Td(t, n ?? []));
|
|
13772
13766
|
});
|
|
13773
13767
|
}) : null;
|
|
13774
13768
|
},
|
|
13775
13769
|
async placeDetails(t) {
|
|
13776
|
-
let n = (await
|
|
13770
|
+
let n = (await Iu(e)).maps;
|
|
13777
13771
|
if (!n) return null;
|
|
13778
13772
|
!n.places?.PlacesService && n.importLibrary && await n.importLibrary("places").catch(() => void 0);
|
|
13779
13773
|
let r = n.places?.PlacesService;
|
|
@@ -13792,34 +13786,34 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13792
13786
|
e(null);
|
|
13793
13787
|
return;
|
|
13794
13788
|
}
|
|
13795
|
-
let a =
|
|
13789
|
+
let a = Sd({
|
|
13796
13790
|
...i,
|
|
13797
13791
|
place_id: i.place_id ?? t
|
|
13798
13792
|
});
|
|
13799
13793
|
e(a && {
|
|
13800
13794
|
...a,
|
|
13801
13795
|
name: i.name?.trim() || void 0,
|
|
13802
|
-
parts: i.address_components ?
|
|
13796
|
+
parts: i.address_components ? xd([i]) : void 0
|
|
13803
13797
|
});
|
|
13804
13798
|
});
|
|
13805
13799
|
}) : null;
|
|
13806
13800
|
}
|
|
13807
|
-
}),
|
|
13801
|
+
}), Dd = (e) => e.toFixed(6), Od = (e, t, n) => Math.min(Math.max(e, t), n), kd = (e) => Od(e, -90, 90), Ad = (e) => Od(e, -180, 180), jd = (e, t = 0) => {
|
|
13808
13802
|
if (typeof e == "number") return Number.isFinite(e) ? e : t;
|
|
13809
13803
|
let n = Number.parseFloat(e.trim().replace(",", "."));
|
|
13810
13804
|
return Number.isFinite(n) ? n : t;
|
|
13811
|
-
},
|
|
13805
|
+
}, Md = (e) => `${Dd(e.lat)}, ${Dd(e.lng)}`, Nd = (e, t) => {
|
|
13812
13806
|
if (!e || typeof e != "object" || !("lat" in e) || !("lng" in e)) return t;
|
|
13813
|
-
let n =
|
|
13807
|
+
let n = jd(e.lat, t.lat), r = jd(e.lng, t.lng);
|
|
13814
13808
|
return {
|
|
13815
|
-
lat:
|
|
13816
|
-
lng:
|
|
13809
|
+
lat: kd(n),
|
|
13810
|
+
lng: Ad(r)
|
|
13817
13811
|
};
|
|
13818
|
-
},
|
|
13812
|
+
}, Pd = (e, t = "Ubicación") => ({
|
|
13819
13813
|
id: `${e.lat}:${e.lng}`,
|
|
13820
13814
|
position: e,
|
|
13821
13815
|
label: t
|
|
13822
|
-
}),
|
|
13816
|
+
}), Fd = (e) => {
|
|
13823
13817
|
let t = e.road, n = e.house_number;
|
|
13824
13818
|
return {
|
|
13825
13819
|
street: t,
|
|
@@ -13833,7 +13827,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13833
13827
|
country: e.country,
|
|
13834
13828
|
postalCode: e.postcode
|
|
13835
13829
|
};
|
|
13836
|
-
},
|
|
13830
|
+
}, Id = () => ({
|
|
13837
13831
|
id: "nominatim",
|
|
13838
13832
|
capabilities: { geocoding: "basic" },
|
|
13839
13833
|
async geocode(e) {
|
|
@@ -13865,20 +13859,20 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13865
13859
|
label: Go(r.display_name),
|
|
13866
13860
|
address: r.display_name,
|
|
13867
13861
|
name: r.name?.trim() || void 0,
|
|
13868
|
-
parts:
|
|
13862
|
+
parts: Fd(r.address ?? {}),
|
|
13869
13863
|
raw: r
|
|
13870
13864
|
} : t;
|
|
13871
13865
|
} catch {
|
|
13872
13866
|
return t;
|
|
13873
13867
|
}
|
|
13874
13868
|
}
|
|
13875
|
-
}),
|
|
13869
|
+
}), Ld = (e) => ({
|
|
13876
13870
|
id: e.id,
|
|
13877
13871
|
capabilities: { places: e.capabilities.geocoding === "none" ? "none" : "basic" },
|
|
13878
13872
|
searchPlaces(t) {
|
|
13879
13873
|
return e.geocode(t);
|
|
13880
13874
|
}
|
|
13881
|
-
}),
|
|
13875
|
+
}), Rd = () => ({
|
|
13882
13876
|
id: "basic",
|
|
13883
13877
|
capabilities: {
|
|
13884
13878
|
routing: "basic",
|
|
@@ -13896,31 +13890,31 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13896
13890
|
]
|
|
13897
13891
|
};
|
|
13898
13892
|
}
|
|
13899
|
-
}),
|
|
13893
|
+
}), zd = i({}), Bd = (e) => {
|
|
13900
13894
|
let t = e.services?.geocoding ?? e.defaultEngine, n = e.engines.google;
|
|
13901
|
-
return t === "google" && n ?
|
|
13902
|
-
},
|
|
13903
|
-
let t = e.defaultEngine === "google" ?
|
|
13895
|
+
return t === "google" && n ? Ed(n) : Id();
|
|
13896
|
+
}, Vd = (e) => {
|
|
13897
|
+
let t = e.defaultEngine === "google" ? Qu(e.engines.google) : ud(e.engines.leaflet), n = Bd(e);
|
|
13904
13898
|
return {
|
|
13905
13899
|
config: e,
|
|
13906
13900
|
engine: t,
|
|
13907
13901
|
geocodingService: n,
|
|
13908
|
-
placesService:
|
|
13909
|
-
routingService:
|
|
13910
|
-
distanceService:
|
|
13902
|
+
placesService: Ld(n),
|
|
13903
|
+
routingService: Rd(),
|
|
13904
|
+
distanceService: md()
|
|
13911
13905
|
};
|
|
13912
|
-
},
|
|
13913
|
-
let n = p(() => ({ maps: e ?
|
|
13914
|
-
return /* @__PURE__ */ v(
|
|
13906
|
+
}, Hd = ({ maps: e, children: t }) => {
|
|
13907
|
+
let n = p(() => ({ maps: e ? Vd(e) : void 0 }), [e]);
|
|
13908
|
+
return /* @__PURE__ */ v(zd.Provider, {
|
|
13915
13909
|
value: n,
|
|
13916
13910
|
children: t
|
|
13917
13911
|
});
|
|
13918
|
-
},
|
|
13919
|
-
let e =
|
|
13920
|
-
if (!e.maps) throw Error(
|
|
13912
|
+
}, Ud = () => c(zd), Wd = () => {
|
|
13913
|
+
let e = Ud();
|
|
13914
|
+
if (!e.maps) throw Error(Tu);
|
|
13921
13915
|
return e.maps;
|
|
13922
|
-
},
|
|
13923
|
-
let e =
|
|
13916
|
+
}, Gd = () => {
|
|
13917
|
+
let e = Wd(), [t, n] = h(!1), [r, i] = h([]), [a, o] = h(null), c = m(0);
|
|
13924
13918
|
return {
|
|
13925
13919
|
loading: t,
|
|
13926
13920
|
results: r,
|
|
@@ -13944,15 +13938,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13944
13938
|
}
|
|
13945
13939
|
}, [e.geocodingService])
|
|
13946
13940
|
};
|
|
13947
|
-
},
|
|
13948
|
-
let e =
|
|
13941
|
+
}, Kd = () => {
|
|
13942
|
+
let e = Wd();
|
|
13949
13943
|
return p(() => ({
|
|
13950
13944
|
id: e.engine.id,
|
|
13951
13945
|
capabilities: e.engine.capabilities,
|
|
13952
13946
|
renderer: e.engine.createRenderer()
|
|
13953
13947
|
}), [e.engine]);
|
|
13954
|
-
},
|
|
13955
|
-
let e =
|
|
13948
|
+
}, qd = () => Wd().config, Jd = () => {
|
|
13949
|
+
let e = Wd(), [t, n] = h(!1), [r, i] = h(null), [a, o] = h(null), c = m(0), l = s(async (t, r) => {
|
|
13956
13950
|
c.current += 1;
|
|
13957
13951
|
let a = c.current;
|
|
13958
13952
|
n(!0), o(null);
|
|
@@ -13966,7 +13960,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13966
13960
|
address: l?.address ?? s?.address,
|
|
13967
13961
|
parts: {
|
|
13968
13962
|
...s?.parts,
|
|
13969
|
-
...
|
|
13963
|
+
...Yd(l?.parts),
|
|
13970
13964
|
...l?.parts?.line ? { lineDistanceM: void 0 } : {}
|
|
13971
13965
|
}
|
|
13972
13966
|
};
|
|
@@ -13987,11 +13981,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
13987
13981
|
show: u,
|
|
13988
13982
|
clear: s(() => u(null), [u])
|
|
13989
13983
|
};
|
|
13990
|
-
},
|
|
13984
|
+
}, Yd = (e) => Object.fromEntries(Object.entries(e ?? {}).filter(([, e]) => e !== void 0 && e !== "")), Xd = (e) => e && typeof e == "object" && "label" in e ? String(e.label ?? "") : "", Zd = ({ 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 }) => {
|
|
13991
13985
|
let d = b({
|
|
13992
13986
|
name: t,
|
|
13993
13987
|
control: e.control
|
|
13994
|
-
}), { loading: f, results: p, error: m, search: g } =
|
|
13988
|
+
}), { loading: f, results: p, error: m, search: g } = Gd(), [_, x] = h(() => Xd(d.field.value)), [S, C] = h(!1), w = String(t), T = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, E = o || s, D = !E && !f && _.trim().length >= 3, O = () => {
|
|
13995
13989
|
D && (C(!0), g(_));
|
|
13996
13990
|
}, k = (e) => {
|
|
13997
13991
|
d.field.onChange(e), l?.(e);
|
|
@@ -14071,8 +14065,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14071
14065
|
]
|
|
14072
14066
|
})
|
|
14073
14067
|
});
|
|
14074
|
-
},
|
|
14075
|
-
let O =
|
|
14068
|
+
}, Qd = 19, $d = 3, ef = (e, t) => e.zoom === t.zoom && Math.abs(e.center.lat - t.center.lat) < 1e-7 && Math.abs(e.center.lng - t.center.lng) < 1e-7, tf = ({ title: e, description: t, center: n = Eu, zoom: r = 13, markers: i = [], routes: a = [], areas: o = [], circles: s = [], mapType: c = "roadmap", onMapTypeChange: l, showControls: u, recenterTo: d, focus: f, focusZoom: m = 16, legend: g, panel: _, height: b = 360, className: x, readOnly: S, onClick: C, onMarkerClick: w, onMarkerDoubleClick: T, onMarkerDrag: E, onMarkerDragEnd: D }) => {
|
|
14069
|
+
let O = Kd(), k = p(() => O.renderer, [O.renderer]), A = !!u || f !== void 0, j = f ? `${f.lat},${f.lng}` : "", [M, N] = h({
|
|
14076
14070
|
vista: {
|
|
14077
14071
|
center: n,
|
|
14078
14072
|
zoom: r
|
|
@@ -14094,7 +14088,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14094
14088
|
};
|
|
14095
14089
|
}), I = (e) => F((t) => ({
|
|
14096
14090
|
...t,
|
|
14097
|
-
zoom: Math.min(
|
|
14091
|
+
zoom: Math.min(Qd, Math.max($d, t.zoom + e))
|
|
14098
14092
|
})), L = k({
|
|
14099
14093
|
center: n,
|
|
14100
14094
|
zoom: r,
|
|
@@ -14106,7 +14100,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14106
14100
|
height: b,
|
|
14107
14101
|
readOnly: S,
|
|
14108
14102
|
view: A ? P : void 0,
|
|
14109
|
-
onViewChange: A ? (e) => F((t) =>
|
|
14103
|
+
onViewChange: A ? (e) => F((t) => ef(t, e) ? t : e) : void 0,
|
|
14110
14104
|
zoomControl: !u,
|
|
14111
14105
|
onClick: C,
|
|
14112
14106
|
onMarkerClick: w,
|
|
@@ -14114,7 +14108,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14114
14108
|
onMarkerDrag: E,
|
|
14115
14109
|
onMarkerDragEnd: D
|
|
14116
14110
|
}), R = !!l;
|
|
14117
|
-
return /* @__PURE__ */ v(
|
|
14111
|
+
return /* @__PURE__ */ v(yu, {
|
|
14118
14112
|
title: e,
|
|
14119
14113
|
description: t,
|
|
14120
14114
|
className: x,
|
|
@@ -14190,16 +14184,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14190
14184
|
]
|
|
14191
14185
|
})
|
|
14192
14186
|
});
|
|
14193
|
-
},
|
|
14187
|
+
}, nf = ({ form: e, name: t, label: n, info: r, required: i, zoom: a = 13, readOnly: o, disabled: s, className: c, onChange: l, onRefresh: u }) => {
|
|
14194
14188
|
let [d, f] = h(!1), [p, m] = h(null), g = b({
|
|
14195
14189
|
name: t,
|
|
14196
14190
|
control: e.control
|
|
14197
|
-
}), _ = String(t), x = g.fieldState.error?.message ? String(g.fieldState.error.message) : void 0, S = o || s, C =
|
|
14191
|
+
}), _ = String(t), x = g.fieldState.error?.message ? String(g.fieldState.error.message) : void 0, S = o || s, C = Nd(g.field.value, Eu), w = (e) => {
|
|
14198
14192
|
g.field.onChange(e), l?.(e);
|
|
14199
14193
|
}, T = (e, t) => {
|
|
14200
14194
|
w({
|
|
14201
14195
|
...C,
|
|
14202
|
-
[e]:
|
|
14196
|
+
[e]: jd(t, C[e])
|
|
14203
14197
|
});
|
|
14204
14198
|
};
|
|
14205
14199
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -14222,7 +14216,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14222
14216
|
id: `${_}-lat`,
|
|
14223
14217
|
type: "text",
|
|
14224
14218
|
inputMode: "decimal",
|
|
14225
|
-
value:
|
|
14219
|
+
value: Dd(C.lat),
|
|
14226
14220
|
readOnly: S,
|
|
14227
14221
|
disabled: s,
|
|
14228
14222
|
"aria-invalid": !!x || void 0,
|
|
@@ -14242,7 +14236,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14242
14236
|
id: `${_}-lng`,
|
|
14243
14237
|
type: "text",
|
|
14244
14238
|
inputMode: "decimal",
|
|
14245
|
-
value:
|
|
14239
|
+
value: Dd(C.lng),
|
|
14246
14240
|
readOnly: S,
|
|
14247
14241
|
disabled: s,
|
|
14248
14242
|
"aria-invalid": !!x || void 0,
|
|
@@ -14261,8 +14255,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14261
14255
|
onClick: () => {
|
|
14262
14256
|
!navigator.geolocation || d || S || (f(!0), m(null), navigator.geolocation.getCurrentPosition((e) => {
|
|
14263
14257
|
let t = {
|
|
14264
|
-
lat: Number(
|
|
14265
|
-
lng: Number(
|
|
14258
|
+
lat: Number(Dd(e.coords.latitude)),
|
|
14259
|
+
lng: Number(Dd(e.coords.longitude))
|
|
14266
14260
|
};
|
|
14267
14261
|
w(t), m(e.coords.accuracy > 200 ? `Precisión aproximada: ${Math.round(e.coords.accuracy)} m.` : null), f(!1);
|
|
14268
14262
|
}, () => {
|
|
@@ -14283,7 +14277,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14283
14277
|
role: "status",
|
|
14284
14278
|
children: p
|
|
14285
14279
|
}),
|
|
14286
|
-
/* @__PURE__ */ v(
|
|
14280
|
+
/* @__PURE__ */ v(tf, {
|
|
14287
14281
|
center: C,
|
|
14288
14282
|
zoom: a,
|
|
14289
14283
|
height: 220,
|
|
@@ -14295,8 +14289,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14295
14289
|
}],
|
|
14296
14290
|
onClick: (e) => {
|
|
14297
14291
|
w({
|
|
14298
|
-
lat: Number(
|
|
14299
|
-
lng: Number(
|
|
14292
|
+
lat: Number(Dd(e.location.lat)),
|
|
14293
|
+
lng: Number(Dd(e.location.lng))
|
|
14300
14294
|
}), g.field.onBlur();
|
|
14301
14295
|
}
|
|
14302
14296
|
}),
|
|
@@ -14307,19 +14301,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14307
14301
|
]
|
|
14308
14302
|
})
|
|
14309
14303
|
});
|
|
14310
|
-
},
|
|
14304
|
+
}, rf = (e) => /* @__PURE__ */ v(nf, { ...e }), af = (e) => Array.isArray(e) ? e.map((e) => Nd(e, Eu)) : [], of = (e) => e.length === 0 ? "Sin puntos" : e.length === 1 ? "1 punto" : `${e.length} puntos`, sf = "var(--sf-map-area-stroke)", cf = "var(--sf-map-area-fill)", lf = "var(--sf-map-route-stroke)", uf = ({ 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 }) => {
|
|
14311
14305
|
let f = n === "area" ? 3 : 2, p = `Dibuja al menos ${f} puntos para ${n === "area" ? "un área" : "una ruta"}.`, m = b({
|
|
14312
14306
|
name: t,
|
|
14313
14307
|
control: e.control,
|
|
14314
14308
|
rules: { validate: (e) => {
|
|
14315
|
-
let t =
|
|
14309
|
+
let t = af(e).length;
|
|
14316
14310
|
return t === 0 && !a ? !0 : t < f ? p : !0;
|
|
14317
14311
|
} }
|
|
14318
|
-
}), h = String(t), g = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, _ = s || c, x =
|
|
14312
|
+
}), h = String(t), g = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, _ = s || c, x = af(m.field.value), S = x.at(-1) ?? Eu, C = {
|
|
14319
14313
|
id: `${h}-${n}`,
|
|
14320
14314
|
points: x,
|
|
14321
|
-
color: n === "area" ?
|
|
14322
|
-
fillColor: n === "area" ?
|
|
14315
|
+
color: n === "area" ? sf : lf,
|
|
14316
|
+
fillColor: n === "area" ? cf : void 0
|
|
14323
14317
|
}, w = (e) => {
|
|
14324
14318
|
m.field.onChange(e), u?.(e);
|
|
14325
14319
|
}, T = () => w(x.slice(0, -1)), E = () => w([]), D = (e, t, n) => e.map((e, r) => r === t ? n : e), O = (e) => {
|
|
@@ -14352,7 +14346,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14352
14346
|
children: "Limpiar"
|
|
14353
14347
|
})]
|
|
14354
14348
|
}),
|
|
14355
|
-
/* @__PURE__ */ v(
|
|
14349
|
+
/* @__PURE__ */ v(tf, {
|
|
14356
14350
|
center: S,
|
|
14357
14351
|
zoom: o,
|
|
14358
14352
|
height: 260,
|
|
@@ -14361,7 +14355,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14361
14355
|
id: `${h}-point-${t}`,
|
|
14362
14356
|
position: e,
|
|
14363
14357
|
label: String(t + 1),
|
|
14364
|
-
color: n === "area" ?
|
|
14358
|
+
color: n === "area" ? sf : lf,
|
|
14365
14359
|
options: { draggable: !_ }
|
|
14366
14360
|
})),
|
|
14367
14361
|
areas: n === "area" && x.length >= 3 ? [C] : [],
|
|
@@ -14384,7 +14378,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14384
14378
|
className: "sf-map-hint",
|
|
14385
14379
|
"aria-live": "polite",
|
|
14386
14380
|
children: [
|
|
14387
|
-
|
|
14381
|
+
of(x),
|
|
14388
14382
|
" · Clic para añadir. Arrastra un punto para moverlo. Doble clic para eliminar.",
|
|
14389
14383
|
" ",
|
|
14390
14384
|
/* @__PURE__ */ v("span", {
|
|
@@ -14396,38 +14390,38 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14396
14390
|
]
|
|
14397
14391
|
})
|
|
14398
14392
|
});
|
|
14399
|
-
},
|
|
14393
|
+
}, df = (e) => /* @__PURE__ */ v(uf, {
|
|
14400
14394
|
...e,
|
|
14401
14395
|
mode: "area"
|
|
14402
|
-
}),
|
|
14396
|
+
}), ff = (e) => /* @__PURE__ */ v(uf, {
|
|
14403
14397
|
...e,
|
|
14404
14398
|
mode: "route"
|
|
14405
|
-
}),
|
|
14399
|
+
}), pf = (e) => {
|
|
14406
14400
|
switch (e.kind) {
|
|
14407
|
-
case "coordinates": return /* @__PURE__ */ v(
|
|
14408
|
-
case "location": return /* @__PURE__ */ v(
|
|
14409
|
-
case "address": return /* @__PURE__ */ v(
|
|
14410
|
-
case "area": return /* @__PURE__ */ v(
|
|
14411
|
-
case "route": return /* @__PURE__ */ v(
|
|
14401
|
+
case "coordinates": return /* @__PURE__ */ v(rf, { ...e });
|
|
14402
|
+
case "location": return /* @__PURE__ */ v(nf, { ...e });
|
|
14403
|
+
case "address": return /* @__PURE__ */ v(Zd, { ...e });
|
|
14404
|
+
case "area": return /* @__PURE__ */ v(df, { ...e });
|
|
14405
|
+
case "route": return /* @__PURE__ */ v(ff, { ...e });
|
|
14412
14406
|
default: return null;
|
|
14413
14407
|
}
|
|
14414
|
-
},
|
|
14408
|
+
}, mf = /^#[0-9a-fA-F]{6}$/, hf = "#".padEnd(7, "0"), gf = () => {
|
|
14415
14409
|
if (typeof document > "u") return "";
|
|
14416
14410
|
let e = getComputedStyle(document.documentElement).getPropertyValue("--sf-primary").trim();
|
|
14417
|
-
return
|
|
14418
|
-
},
|
|
14411
|
+
return mf.test(e) ? e.toLowerCase() : "";
|
|
14412
|
+
}, _f = (e, t, n) => Math.min(n, Math.max(t, e)), vf = (e, t) => t?.formatValue ? t.formatValue(e) : t?.suffix ? `${e} ${t.suffix}` : String(e), yf = () => [], bf = (e) => Array.isArray(e) ? e.map((e) => String(e ?? "").trim()).filter(Boolean) : [], xf = () => [], Sf = (e) => Array.isArray(e) ? e.map((e) => {
|
|
14419
14413
|
if (typeof e != "object" || !e) return null;
|
|
14420
14414
|
let t = e;
|
|
14421
14415
|
return {
|
|
14422
14416
|
key: String(t.key ?? ""),
|
|
14423
14417
|
value: String(t.value ?? "")
|
|
14424
14418
|
};
|
|
14425
|
-
}).filter((e) => e != null) : [],
|
|
14419
|
+
}).filter((e) => e != null) : [], Cf = (e = 0, t = 100) => ({
|
|
14426
14420
|
start: e,
|
|
14427
14421
|
end: t
|
|
14428
|
-
}),
|
|
14422
|
+
}), wf = (e, t = 0, n = 100) => {
|
|
14429
14423
|
if (e && typeof e == "object" && "start" in e && "end" in e) {
|
|
14430
|
-
let r = e, i =
|
|
14424
|
+
let r = e, i = _f(Number(r.start), t, n), a = _f(Number(r.end), t, n);
|
|
14431
14425
|
return i <= a ? {
|
|
14432
14426
|
start: i,
|
|
14433
14427
|
end: a
|
|
@@ -14436,15 +14430,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14436
14430
|
end: i
|
|
14437
14431
|
};
|
|
14438
14432
|
}
|
|
14439
|
-
return
|
|
14440
|
-
},
|
|
14441
|
-
let n =
|
|
14442
|
-
return
|
|
14443
|
-
},
|
|
14433
|
+
return Cf(t, n);
|
|
14434
|
+
}, Tf = (e, t) => {
|
|
14435
|
+
let n = gf(), r = String(t ?? (n || hf)).trim(), i = mf.test(r) ? r.toLowerCase() : hf, a = String(e ?? i).trim();
|
|
14436
|
+
return mf.test(a) ? a.toLowerCase() : i;
|
|
14437
|
+
}, Ef = (e, t, n) => n <= t ? 0 : Math.round((_f(e, t, n) - t) / (n - t) * 100), Df = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), Of = ({ 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 }) => {
|
|
14444
14438
|
let h = b({
|
|
14445
14439
|
name: t,
|
|
14446
14440
|
control: e.control
|
|
14447
|
-
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S =
|
|
14441
|
+
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = _f(Number(h.field.value ?? a), a, o), C = (e) => {
|
|
14448
14442
|
h.field.onChange(e), p?.(e);
|
|
14449
14443
|
};
|
|
14450
14444
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -14468,17 +14462,17 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14468
14462
|
"aria-invalid": !!_ || void 0,
|
|
14469
14463
|
onBlur: () => h.field.onBlur(),
|
|
14470
14464
|
onChange: (e) => C(Number(e.target.value)),
|
|
14471
|
-
className:
|
|
14465
|
+
className: Df(x)
|
|
14472
14466
|
}), /* @__PURE__ */ v("span", {
|
|
14473
14467
|
className: "sf-slider__value",
|
|
14474
|
-
children:
|
|
14468
|
+
children: vf(S, {
|
|
14475
14469
|
suffix: c,
|
|
14476
14470
|
formatValue: f
|
|
14477
14471
|
})
|
|
14478
14472
|
})]
|
|
14479
14473
|
})
|
|
14480
14474
|
});
|
|
14481
|
-
},
|
|
14475
|
+
}, kf = {
|
|
14482
14476
|
slate: {
|
|
14483
14477
|
wrap: "border-slate-300 bg-white",
|
|
14484
14478
|
button: "bg-slate-50 text-slate-600 hover:bg-slate-100",
|
|
@@ -14499,7 +14493,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14499
14493
|
button: "bg-blue-50 text-blue-700 hover:bg-blue-100",
|
|
14500
14494
|
value: "text-blue-700"
|
|
14501
14495
|
}
|
|
14502
|
-
},
|
|
14496
|
+
}, Af = {
|
|
14503
14497
|
sm: {
|
|
14504
14498
|
button: "h-6 w-6",
|
|
14505
14499
|
icon: "h-3 w-3",
|
|
@@ -14510,13 +14504,13 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14510
14504
|
icon: "h-3.5 w-3.5",
|
|
14511
14505
|
value: "min-w-[2.5rem] px-1.5 text-sm"
|
|
14512
14506
|
}
|
|
14513
|
-
},
|
|
14507
|
+
}, jf = (e, t) => {
|
|
14514
14508
|
let n = (String(t).split(".")[1] ?? "").length;
|
|
14515
14509
|
return Number(e.toFixed(n));
|
|
14516
|
-
},
|
|
14517
|
-
let f =
|
|
14510
|
+
}, Mf = ({ 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 }) => {
|
|
14511
|
+
let f = kf[a], p = Af[o], m = s || c, h = (a) => {
|
|
14518
14512
|
if (m) return;
|
|
14519
|
-
let o = Math.min(r, Math.max(n,
|
|
14513
|
+
let o = Math.min(r, Math.max(n, jf(a, i)));
|
|
14520
14514
|
o !== e && t(o);
|
|
14521
14515
|
}, 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);
|
|
14522
14516
|
return /* @__PURE__ */ y("div", {
|
|
@@ -14552,11 +14546,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14552
14546
|
})
|
|
14553
14547
|
]
|
|
14554
14548
|
});
|
|
14555
|
-
},
|
|
14549
|
+
}, Nf = (e) => (0, X.default)("sf-range-input", e && "pointer-events-none"), Pf = ({ 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 }) => {
|
|
14556
14550
|
let h = b({
|
|
14557
14551
|
name: t,
|
|
14558
14552
|
control: e.control
|
|
14559
|
-
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S =
|
|
14553
|
+
}), g = String(t), _ = h.fieldState.error?.message ? String(h.fieldState.error.message) : void 0, x = l || u, S = wf(h.field.value, a, o), C = (e) => {
|
|
14560
14554
|
h.field.onChange(e), p?.(e);
|
|
14561
14555
|
}, w = {
|
|
14562
14556
|
suffix: c,
|
|
@@ -14574,7 +14568,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14574
14568
|
children: [
|
|
14575
14569
|
/* @__PURE__ */ v("span", {
|
|
14576
14570
|
className: "sf-slider__value sf-slider__value--sm",
|
|
14577
|
-
children:
|
|
14571
|
+
children: vf(S.start, w)
|
|
14578
14572
|
}),
|
|
14579
14573
|
/* @__PURE__ */ y("div", {
|
|
14580
14574
|
className: "grid flex-1 gap-2",
|
|
@@ -14596,7 +14590,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14596
14590
|
end: Math.max(t, S.end)
|
|
14597
14591
|
});
|
|
14598
14592
|
},
|
|
14599
|
-
className:
|
|
14593
|
+
className: Nf(x)
|
|
14600
14594
|
}), /* @__PURE__ */ v("input", {
|
|
14601
14595
|
id: `${g}-end`,
|
|
14602
14596
|
type: "range",
|
|
@@ -14615,21 +14609,21 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14615
14609
|
end: t
|
|
14616
14610
|
});
|
|
14617
14611
|
},
|
|
14618
|
-
className:
|
|
14612
|
+
className: Nf(x)
|
|
14619
14613
|
})]
|
|
14620
14614
|
}),
|
|
14621
14615
|
/* @__PURE__ */ v("span", {
|
|
14622
14616
|
className: "sf-slider__value sf-slider__value--sm",
|
|
14623
|
-
children:
|
|
14617
|
+
children: vf(S.end, w)
|
|
14624
14618
|
})
|
|
14625
14619
|
]
|
|
14626
14620
|
})
|
|
14627
14621
|
});
|
|
14628
|
-
},
|
|
14622
|
+
}, Ff = ({ form: e, name: t, label: n, info: r, required: i, min: a = 0, max: o = 100, suffix: s, className: c, formatValue: l, onRefresh: u }) => {
|
|
14629
14623
|
let d = b({
|
|
14630
14624
|
name: t,
|
|
14631
14625
|
control: e.control
|
|
14632
|
-
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m =
|
|
14626
|
+
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = _f(Number(d.field.value ?? a), a, o), h = Ef(m, a, o);
|
|
14633
14627
|
return /* @__PURE__ */ v(Z, {
|
|
14634
14628
|
id: f,
|
|
14635
14629
|
label: n,
|
|
@@ -14652,21 +14646,21 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14652
14646
|
})
|
|
14653
14647
|
}), /* @__PURE__ */ v("span", {
|
|
14654
14648
|
className: "sf-progress-bar__value",
|
|
14655
|
-
children:
|
|
14649
|
+
children: vf(m, {
|
|
14656
14650
|
suffix: s,
|
|
14657
14651
|
formatValue: l
|
|
14658
14652
|
})
|
|
14659
14653
|
})]
|
|
14660
14654
|
})
|
|
14661
14655
|
});
|
|
14662
|
-
},
|
|
14656
|
+
}, If = {
|
|
14663
14657
|
default: "sf-progress-bar-readonly__fill--default",
|
|
14664
14658
|
success: "sf-progress-bar-readonly__fill--success",
|
|
14665
14659
|
warning: "sf-progress-bar-readonly__fill--warning",
|
|
14666
14660
|
danger: "sf-progress-bar-readonly__fill--danger",
|
|
14667
14661
|
info: "sf-progress-bar-readonly__fill--info"
|
|
14668
|
-
},
|
|
14669
|
-
let u =
|
|
14662
|
+
}, Lf = ({ 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 }) => {
|
|
14663
|
+
let u = _f(e, t, n), d = Ef(u, t, n), f = vf(u, {
|
|
14670
14664
|
suffix: a,
|
|
14671
14665
|
formatValue: o
|
|
14672
14666
|
});
|
|
@@ -14680,7 +14674,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14680
14674
|
/* @__PURE__ */ v("div", {
|
|
14681
14675
|
className: "sf-progress-bar-readonly__track",
|
|
14682
14676
|
children: /* @__PURE__ */ v("div", {
|
|
14683
|
-
className: (0, X.default)("sf-progress-bar-readonly__fill",
|
|
14677
|
+
className: (0, X.default)("sf-progress-bar-readonly__fill", If[s]),
|
|
14684
14678
|
style: { width: `${d}%` },
|
|
14685
14679
|
role: "progressbar",
|
|
14686
14680
|
"aria-label": r ?? "Progreso",
|
|
@@ -14695,11 +14689,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14695
14689
|
})
|
|
14696
14690
|
]
|
|
14697
14691
|
});
|
|
14698
|
-
},
|
|
14692
|
+
}, Rf = ({ 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 }) => {
|
|
14699
14693
|
let [f, p] = h(0), m = b({
|
|
14700
14694
|
name: t,
|
|
14701
14695
|
control: e.control
|
|
14702
|
-
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, y = o || s, x =
|
|
14696
|
+
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, y = o || s, x = zf(Number(m.field.value ?? 0), a), S = f || x, C = (e) => {
|
|
14703
14697
|
m.field.onChange(e), u?.(e), m.field.onBlur();
|
|
14704
14698
|
}, w = (e, t) => {
|
|
14705
14699
|
if (y) return;
|
|
@@ -14739,12 +14733,12 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14739
14733
|
}, e))
|
|
14740
14734
|
})
|
|
14741
14735
|
});
|
|
14742
|
-
},
|
|
14736
|
+
}, zf = (e, t) => !Number.isFinite(e) || e < 0 ? 0 : Math.min(t, Math.round(e)), Bf = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
|
|
14743
14737
|
let d = b({
|
|
14744
14738
|
name: t,
|
|
14745
14739
|
control: e.control
|
|
14746
|
-
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h =
|
|
14747
|
-
let t =
|
|
14740
|
+
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = Tf(d.field.value), g = (e) => {
|
|
14741
|
+
let t = Tf(e, h);
|
|
14748
14742
|
d.field.onChange(t), l?.(t);
|
|
14749
14743
|
};
|
|
14750
14744
|
return /* @__PURE__ */ v(Z, {
|
|
@@ -14787,11 +14781,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14787
14781
|
})]
|
|
14788
14782
|
})
|
|
14789
14783
|
});
|
|
14790
|
-
},
|
|
14784
|
+
}, Vf = ({ 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 }) => {
|
|
14791
14785
|
let [f, p] = h(""), m = b({
|
|
14792
14786
|
name: t,
|
|
14793
14787
|
control: e.control
|
|
14794
|
-
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, x = s || c, S =
|
|
14788
|
+
}), g = String(t), _ = m.fieldState.error?.message ? String(m.fieldState.error.message) : void 0, x = s || c, S = bf(m.field.value), C = o != null && S.length >= o, w = (e) => {
|
|
14795
14789
|
m.field.onChange(e), u?.(e);
|
|
14796
14790
|
}, T = () => {
|
|
14797
14791
|
let e = f.trim();
|
|
@@ -14843,11 +14837,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14843
14837
|
})]
|
|
14844
14838
|
})
|
|
14845
14839
|
});
|
|
14846
|
-
},
|
|
14840
|
+
}, Hf = ({ form: e, name: t, label: n, info: r, required: i, readOnly: a, disabled: o, small: s, className: c, onChange: l, onRefresh: u }) => {
|
|
14847
14841
|
let d = b({
|
|
14848
14842
|
name: t,
|
|
14849
14843
|
control: e.control
|
|
14850
|
-
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h =
|
|
14844
|
+
}), f = String(t), p = d.fieldState.error?.message ? String(d.fieldState.error.message) : void 0, m = a || o, h = Sf(d.field.value), g = (e) => {
|
|
14851
14845
|
d.field.onChange(e), l?.(e);
|
|
14852
14846
|
}, _ = (e, t, n) => {
|
|
14853
14847
|
g(h.map((r, i) => i === e ? {
|
|
@@ -14932,7 +14926,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14932
14926
|
})]
|
|
14933
14927
|
})
|
|
14934
14928
|
});
|
|
14935
|
-
},
|
|
14929
|
+
}, Uf = ({ items: e, onReorder: t, className: n }) => {
|
|
14936
14930
|
let [r, i] = h(null), a = (n) => (a) => {
|
|
14937
14931
|
if (a.preventDefault(), !r) return;
|
|
14938
14932
|
let o = e.findIndex((e) => e.id === r);
|
|
@@ -14958,7 +14952,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
14958
14952
|
})]
|
|
14959
14953
|
}, e.id))
|
|
14960
14954
|
});
|
|
14961
|
-
},
|
|
14955
|
+
}, Wf = ({ value: e, onChange: t, options: n, name: r = "card-radio-group", className: i, ariaLabel: a = "Opciones" }) => /* @__PURE__ */ v("div", {
|
|
14962
14956
|
className: (0, X.default)("sf-card-radio-group", i),
|
|
14963
14957
|
role: "radiogroup",
|
|
14964
14958
|
"aria-label": a,
|
|
@@ -15003,7 +14997,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15003
14997
|
]
|
|
15004
14998
|
}, n.value);
|
|
15005
14999
|
})
|
|
15006
|
-
}),
|
|
15000
|
+
}), Gf = ({ value: e, onChange: t, zones: n, label: r, disabled: i, className: a }) => {
|
|
15007
15001
|
let o = Math.max(0, n.findIndex((t) => t.value === e)), s = n[o], c = n.length > 1 ? o / (n.length - 1) * 100 : 0;
|
|
15008
15002
|
return /* @__PURE__ */ y("div", {
|
|
15009
15003
|
className: (0, X.default)("sf-semantic-slider", a),
|
|
@@ -15034,19 +15028,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15034
15028
|
})
|
|
15035
15029
|
]
|
|
15036
15030
|
});
|
|
15037
|
-
},
|
|
15031
|
+
}, Kf = {
|
|
15038
15032
|
slate: "var(--sf-metric-tone-slate)",
|
|
15039
15033
|
emerald: "var(--sf-metric-tone-emerald)",
|
|
15040
15034
|
amber: "var(--sf-metric-tone-amber)",
|
|
15041
15035
|
red: "var(--sf-metric-tone-red)",
|
|
15042
15036
|
blue: "var(--sf-metric-tone-blue)"
|
|
15043
|
-
},
|
|
15037
|
+
}, qf = [
|
|
15044
15038
|
"slate",
|
|
15045
15039
|
"blue",
|
|
15046
15040
|
"amber",
|
|
15047
15041
|
"emerald",
|
|
15048
15042
|
"red"
|
|
15049
|
-
],
|
|
15043
|
+
], Jf = ({ segments: e, onChange: t, unit: n, valueFormat: r, className: i }) => {
|
|
15050
15044
|
let a = m(null), o = m(null), [s, c] = h(null), l = e.reduce((e, t) => e + t.value, 0), u = r ?? ((e) => `${e.toLocaleString("es-PE")}${n ? ` ${n}` : ""}`), d = (n, r, i) => {
|
|
15051
15045
|
t && t(e.map((e, t) => t === n ? {
|
|
15052
15046
|
...e,
|
|
@@ -15088,14 +15082,14 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15088
15082
|
ref: a,
|
|
15089
15083
|
className: "sf-allocation-bar__track",
|
|
15090
15084
|
children: e.map((n, r) => {
|
|
15091
|
-
let i = l > 0 ? n.value / l * 100 : 0, a = b[r], o = n.tone ??
|
|
15085
|
+
let i = l > 0 ? n.value / l * 100 : 0, a = b[r], o = n.tone ?? qf[r % qf.length], c = r === e.length - 1, d = c ? 0 : n.value + e[r + 1].value, m = d > 0 ? Math.round(n.value / d * 100) : 50;
|
|
15092
15086
|
return /* @__PURE__ */ y("div", {
|
|
15093
15087
|
className: "contents",
|
|
15094
15088
|
children: [/* @__PURE__ */ v("div", {
|
|
15095
15089
|
className: "sf-allocation-bar__seg",
|
|
15096
15090
|
style: {
|
|
15097
15091
|
width: `${i}%`,
|
|
15098
|
-
backgroundColor:
|
|
15092
|
+
backgroundColor: Kf[o]
|
|
15099
15093
|
},
|
|
15100
15094
|
title: `${n.label} · ${u(n.value)} (${Math.round(i)}%)`
|
|
15101
15095
|
}), !c && t && /* @__PURE__ */ v("div", {
|
|
@@ -15125,7 +15119,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15125
15119
|
children: [
|
|
15126
15120
|
/* @__PURE__ */ v("span", {
|
|
15127
15121
|
className: "sf-allocation-bar__label-dot",
|
|
15128
|
-
style: { backgroundColor:
|
|
15122
|
+
style: { backgroundColor: Kf[t.tone ?? qf[e.indexOf(t) % qf.length]] },
|
|
15129
15123
|
"aria-hidden": "true"
|
|
15130
15124
|
}),
|
|
15131
15125
|
t.label,
|
|
@@ -15139,11 +15133,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15139
15133
|
})
|
|
15140
15134
|
})]
|
|
15141
15135
|
});
|
|
15142
|
-
},
|
|
15136
|
+
}, Yf = (e) => new Date(e).toLocaleTimeString("es-PE", {
|
|
15143
15137
|
hour: "2-digit",
|
|
15144
15138
|
minute: "2-digit"
|
|
15145
|
-
}),
|
|
15146
|
-
let u = o ??
|
|
15139
|
+
}), Xf = ({ value: e, onChange: t, min: n, max: r, step: i, marks: a, formatValue: o, label: s, disabled: c, className: l }) => {
|
|
15140
|
+
let u = o ?? Yf, d = r > n ? Math.min(100, Math.max(0, (e - n) / (r - n) * 100)) : 0, f = i ?? Math.max(1, Math.round((r - n) / 200));
|
|
15147
15141
|
return /* @__PURE__ */ y("div", {
|
|
15148
15142
|
className: (0, X.default)("sf-temporal-scrub", l),
|
|
15149
15143
|
children: [s && /* @__PURE__ */ v("p", {
|
|
@@ -15185,7 +15179,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15185
15179
|
]
|
|
15186
15180
|
})]
|
|
15187
15181
|
});
|
|
15188
|
-
},
|
|
15182
|
+
}, Zf = {
|
|
15189
15183
|
group: {
|
|
15190
15184
|
label: "Grupo / Entidad",
|
|
15191
15185
|
labelShort: "GRP",
|
|
@@ -15204,7 +15198,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15204
15198
|
rowClass: "sf-org-tree-row--role",
|
|
15205
15199
|
barClass: "sf-org-tree-bar--role"
|
|
15206
15200
|
}
|
|
15207
|
-
},
|
|
15201
|
+
}, Qf = (e) => {
|
|
15208
15202
|
let t = /* @__PURE__ */ new Map(), n = new Set(e.map((e) => e.id));
|
|
15209
15203
|
for (let n of e) {
|
|
15210
15204
|
let e = n.parentId == null || n.parentId === "" ? null : n.parentId, r = t.get(e) ?? [];
|
|
@@ -15231,16 +15225,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15231
15225
|
hasChildren: !1
|
|
15232
15226
|
});
|
|
15233
15227
|
return r;
|
|
15234
|
-
},
|
|
15228
|
+
}, $f = (e, t = Zf) => t[e] ?? Zf[e] ?? null, ep = (e) => e.length, tp = (e) => {
|
|
15235
15229
|
let t = new Set(e.map((e) => e.id));
|
|
15236
15230
|
return e.filter((e) => {
|
|
15237
15231
|
let n = e.parentId == null || e.parentId === "" ? null : e.parentId;
|
|
15238
15232
|
return n == null || !t.has(n);
|
|
15239
15233
|
});
|
|
15240
|
-
},
|
|
15234
|
+
}, np = ({ type: e, className: t }) => v(e === "group" ? wt : e === "role" ? Ze : Xe, {
|
|
15241
15235
|
className: t,
|
|
15242
15236
|
"aria-hidden": "true"
|
|
15243
|
-
}),
|
|
15237
|
+
}), rp = ({ 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 = Zf, onRenderNode: _, maxHeight: b = 480, className: x }) => {
|
|
15244
15238
|
let [S, C] = h(/* @__PURE__ */ new Set()), [w, T] = h({
|
|
15245
15239
|
visible: !1,
|
|
15246
15240
|
x: 0,
|
|
@@ -15263,7 +15257,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15263
15257
|
window.removeEventListener("mousedown", e), window.removeEventListener("keydown", t);
|
|
15264
15258
|
};
|
|
15265
15259
|
}, [w.visible]);
|
|
15266
|
-
let D = p(() =>
|
|
15260
|
+
let D = p(() => Qf(e), [e]), O = s((e) => {
|
|
15267
15261
|
let t = e.parentId == null || e.parentId === "" ? null : e.parentId;
|
|
15268
15262
|
for (; t != null;) {
|
|
15269
15263
|
if (S.has(t)) return !0;
|
|
@@ -15350,7 +15344,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15350
15344
|
className: "sf-org-tree__empty",
|
|
15351
15345
|
children: "Sin nodos"
|
|
15352
15346
|
}), k.map((e) => {
|
|
15353
|
-
let t =
|
|
15347
|
+
let t = $f(e.type, g);
|
|
15354
15348
|
return /* @__PURE__ */ v("li", {
|
|
15355
15349
|
role: "treeitem",
|
|
15356
15350
|
"aria-level": e.depth + 1,
|
|
@@ -15370,7 +15364,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15370
15364
|
tabIndex: e.hasChildren ? 0 : -1,
|
|
15371
15365
|
children: S.has(e.id) ? /* @__PURE__ */ v(vt, { className: "h-4 w-4" }) : /* @__PURE__ */ v(bt, { className: "h-4 w-4" })
|
|
15372
15366
|
}),
|
|
15373
|
-
/* @__PURE__ */ v(
|
|
15367
|
+
/* @__PURE__ */ v(np, {
|
|
15374
15368
|
type: e.type,
|
|
15375
15369
|
className: "h-4 w-4 shrink-0 opacity-70"
|
|
15376
15370
|
}),
|
|
@@ -15455,7 +15449,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15455
15449
|
})
|
|
15456
15450
|
]
|
|
15457
15451
|
});
|
|
15458
|
-
},
|
|
15452
|
+
}, ip = {
|
|
15459
15453
|
street: {
|
|
15460
15454
|
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
|
15461
15455
|
attribution: "© <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noreferrer\">OpenStreetMap</a>"
|
|
@@ -15464,27 +15458,27 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15464
15458
|
url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
|
|
15465
15459
|
attribution: "Tiles © Esri — Source: Esri, Maxar, Earthstar Geographics, and the GIS User Community"
|
|
15466
15460
|
}
|
|
15467
|
-
},
|
|
15461
|
+
}, ap = {
|
|
15468
15462
|
default: "Nodo",
|
|
15469
15463
|
nap: "NAP",
|
|
15470
15464
|
olt: "OLT",
|
|
15471
15465
|
splitter: "Splitter"
|
|
15472
|
-
},
|
|
15466
|
+
}, op = {
|
|
15473
15467
|
default: "var(--sf-accent)",
|
|
15474
15468
|
nap: "var(--sf-network-kind-nap)",
|
|
15475
15469
|
olt: "var(--sf-network-kind-olt)",
|
|
15476
15470
|
splitter: "var(--sf-network-kind-splitter)"
|
|
15477
|
-
},
|
|
15471
|
+
}, sp = {
|
|
15478
15472
|
normal: "var(--sf-network-status-normal)",
|
|
15479
15473
|
warning: "var(--sf-network-status-warning)",
|
|
15480
15474
|
critical: "var(--sf-network-status-critical)",
|
|
15481
15475
|
maintenance: "var(--sf-network-status-maintenance)"
|
|
15482
|
-
},
|
|
15476
|
+
}, cp = {
|
|
15483
15477
|
normal: "Normal",
|
|
15484
15478
|
warning: "Advertencia",
|
|
15485
15479
|
critical: "Crítico",
|
|
15486
15480
|
maintenance: "Mantenimiento"
|
|
15487
|
-
},
|
|
15481
|
+
}, lp = {
|
|
15488
15482
|
backbone: {
|
|
15489
15483
|
color: "var(--sf-network-edge-backbone)",
|
|
15490
15484
|
weight: 2.5
|
|
@@ -15498,7 +15492,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15498
15492
|
weight: 1.5,
|
|
15499
15493
|
dashArray: "6 4"
|
|
15500
15494
|
}
|
|
15501
|
-
},
|
|
15495
|
+
}, up = Lu, dp = (e) => {
|
|
15502
15496
|
if (!Array.isArray(e)) return [];
|
|
15503
15497
|
let t = [];
|
|
15504
15498
|
for (let n of e) {
|
|
@@ -15507,24 +15501,24 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15507
15501
|
if (!r) continue;
|
|
15508
15502
|
let i = Number(e.lat), a = Number(e.lng);
|
|
15509
15503
|
if (!Number.isFinite(i) || !Number.isFinite(a)) continue;
|
|
15510
|
-
let o = String(e.status ?? "normal"), s = o in
|
|
15504
|
+
let o = String(e.status ?? "normal"), s = o in sp ? o : "normal", c = {
|
|
15511
15505
|
id: r,
|
|
15512
15506
|
label: String(e.label ?? ""),
|
|
15513
15507
|
lat: i,
|
|
15514
15508
|
lng: a,
|
|
15515
15509
|
status: s
|
|
15516
15510
|
}, l = e.kind == null ? r.startsWith("nap:") ? "nap" : "default" : String(e.kind);
|
|
15517
|
-
l in
|
|
15511
|
+
l in ap && (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);
|
|
15518
15512
|
}
|
|
15519
15513
|
return t;
|
|
15520
|
-
},
|
|
15514
|
+
}, fp = (e) => {
|
|
15521
15515
|
if (!Array.isArray(e)) return [];
|
|
15522
15516
|
let t = [];
|
|
15523
15517
|
for (let n of e) {
|
|
15524
15518
|
if (typeof n != "object" || !n) continue;
|
|
15525
15519
|
let e = n, r = String(e.from ?? ""), i = String(e.to ?? "");
|
|
15526
15520
|
if (!r || !i) continue;
|
|
15527
|
-
let a = String(e.type ?? "backbone"), o = a in
|
|
15521
|
+
let a = String(e.type ?? "backbone"), o = a in lp ? a : "backbone";
|
|
15528
15522
|
t.push({
|
|
15529
15523
|
from: r,
|
|
15530
15524
|
to: i,
|
|
@@ -15532,7 +15526,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15532
15526
|
});
|
|
15533
15527
|
}
|
|
15534
15528
|
return t;
|
|
15535
|
-
},
|
|
15529
|
+
}, pp = (e) => {
|
|
15536
15530
|
let t = {
|
|
15537
15531
|
normal: 0,
|
|
15538
15532
|
warning: 0,
|
|
@@ -15541,18 +15535,18 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15541
15535
|
};
|
|
15542
15536
|
for (let n of e) t[n.status] += 1;
|
|
15543
15537
|
return t;
|
|
15544
|
-
},
|
|
15538
|
+
}, mp = (e) => {
|
|
15545
15539
|
if (e.length === 0) return null;
|
|
15546
15540
|
let t = e.map((e) => e.lat), n = e.map((e) => e.lng);
|
|
15547
15541
|
return [[Math.min(...t), Math.min(...n)], [Math.max(...t), Math.max(...n)]];
|
|
15548
|
-
},
|
|
15542
|
+
}, hp = (e) => Object.fromEntries(e.map((e) => [e.id, [e.lat, e.lng]])), gp = (e, t) => e.flatMap((e) => {
|
|
15549
15543
|
let n = t[e.from], r = t[e.to];
|
|
15550
15544
|
return !n || !r ? [] : [{
|
|
15551
15545
|
edge: e,
|
|
15552
15546
|
line: [n, r]
|
|
15553
15547
|
}];
|
|
15554
|
-
}),
|
|
15555
|
-
let i =
|
|
15548
|
+
}), _p = ({ nodes: e, edges: t = [], placement: n = "bottom-left", className: r }) => {
|
|
15549
|
+
let i = pp(e), a = Array.from(new Set(t.map((e) => e.type ?? "backbone")));
|
|
15556
15550
|
return /* @__PURE__ */ y("div", {
|
|
15557
15551
|
className: (0, X.default)("sf-network-legend", n === "bottom-right" ? "sf-network-legend--right" : "sf-network-legend--left", r),
|
|
15558
15552
|
role: "region",
|
|
@@ -15564,15 +15558,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15564
15558
|
}),
|
|
15565
15559
|
/* @__PURE__ */ v("ul", {
|
|
15566
15560
|
className: "space-y-1",
|
|
15567
|
-
children: Object.keys(
|
|
15561
|
+
children: Object.keys(cp).map((e) => /* @__PURE__ */ y("li", {
|
|
15568
15562
|
className: "sf-network-legend__item",
|
|
15569
15563
|
children: [/* @__PURE__ */ y("span", {
|
|
15570
15564
|
className: "flex items-center gap-2",
|
|
15571
15565
|
children: [/* @__PURE__ */ v("span", {
|
|
15572
15566
|
className: "inline-block h-2.5 w-2.5 rounded-full",
|
|
15573
|
-
style: { background:
|
|
15567
|
+
style: { background: sp[e] },
|
|
15574
15568
|
"aria-hidden": "true"
|
|
15575
|
-
}),
|
|
15569
|
+
}), cp[e]]
|
|
15576
15570
|
}), /* @__PURE__ */ v("span", {
|
|
15577
15571
|
className: "sf-network-legend__count",
|
|
15578
15572
|
children: i[e]
|
|
@@ -15585,7 +15579,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15585
15579
|
}), /* @__PURE__ */ v("ul", {
|
|
15586
15580
|
className: "space-y-1",
|
|
15587
15581
|
children: a.map((e) => {
|
|
15588
|
-
let t =
|
|
15582
|
+
let t = lp[e ?? "backbone"];
|
|
15589
15583
|
return /* @__PURE__ */ y("li", {
|
|
15590
15584
|
className: "sf-network-legend__item sf-network-legend__item--edge",
|
|
15591
15585
|
children: [/* @__PURE__ */ v("span", {
|
|
@@ -15605,19 +15599,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15605
15599
|
})
|
|
15606
15600
|
]
|
|
15607
15601
|
});
|
|
15608
|
-
},
|
|
15609
|
-
let n = e.status, r = e.kind ?? "default", i = r === "nap" ? "NAP" : e.value == null ? e.icon ??
|
|
15602
|
+
}, vp = [-12.0464, -77.0428], yp = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """), bp = (e, t) => {
|
|
15603
|
+
let n = e.status, r = e.kind ?? "default", i = r === "nap" ? "NAP" : e.value == null ? e.icon ?? ap[r].slice(0, 3).toUpperCase() : `${e.value}%`, a = yp(e.label.length > 40 ? `${e.label.slice(0, 37)}…` : e.label), o = t ? " sf-network-marker--selected" : "";
|
|
15610
15604
|
return oe.divIcon({
|
|
15611
15605
|
className: "sf-network-marker-root",
|
|
15612
15606
|
iconAnchor: [24, 42],
|
|
15613
15607
|
iconSize: [48, 48],
|
|
15614
15608
|
html: `<div class="sf-network-marker${o}">
|
|
15615
15609
|
<div class="sf-network-marker__label">${a}</div>
|
|
15616
|
-
<div class="sf-network-marker__dot sf-network-marker__dot--status-${n} sf-network-marker__dot--kind-${r}">${
|
|
15610
|
+
<div class="sf-network-marker__dot sf-network-marker__dot--status-${n} sf-network-marker__dot--kind-${r}">${yp(String(i))}</div>
|
|
15617
15611
|
</div>`
|
|
15618
15612
|
});
|
|
15619
|
-
},
|
|
15620
|
-
let t = U(), n =
|
|
15613
|
+
}, xp = ({ nodes: e }) => {
|
|
15614
|
+
let t = U(), n = mp(e);
|
|
15621
15615
|
return u(() => {
|
|
15622
15616
|
n && t.fitBounds(n, {
|
|
15623
15617
|
padding: [32, 32],
|
|
@@ -15628,8 +15622,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15628
15622
|
t,
|
|
15629
15623
|
e
|
|
15630
15624
|
]), null;
|
|
15631
|
-
},
|
|
15632
|
-
let g = Lo(), [_, b] = h("street"), x = l ?? _, S =
|
|
15625
|
+
}, Sp = ({ nodes: e, edges: t = [], center: n = vp, 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 }) => {
|
|
15626
|
+
let g = Lo(), [_, b] = h("street"), x = l ?? _, S = ip[x], C = p(() => hp(e), [e]), w = p(() => gp(t, C), [t, C]), T = (e) => {
|
|
15633
15627
|
l === void 0 && b(e), u?.(e);
|
|
15634
15628
|
};
|
|
15635
15629
|
return /* @__PURE__ */ y("div", {
|
|
@@ -15638,31 +15632,31 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15638
15632
|
role: "region",
|
|
15639
15633
|
"aria-label": f,
|
|
15640
15634
|
children: [
|
|
15641
|
-
g ? /* @__PURE__ */ y(
|
|
15635
|
+
g ? /* @__PURE__ */ y(te, {
|
|
15642
15636
|
center: n,
|
|
15643
15637
|
zoom: r,
|
|
15644
15638
|
scrollWheelZoom: !0,
|
|
15645
15639
|
className: "h-full w-full",
|
|
15646
15640
|
children: [
|
|
15647
|
-
/* @__PURE__ */ v(
|
|
15641
|
+
/* @__PURE__ */ v(V, {
|
|
15648
15642
|
attribution: S.attribution,
|
|
15649
15643
|
url: S.url
|
|
15650
15644
|
}),
|
|
15651
|
-
c && e.length > 0 && /* @__PURE__ */ v(
|
|
15645
|
+
c && e.length > 0 && /* @__PURE__ */ v(xp, { nodes: e }),
|
|
15652
15646
|
w.map(({ edge: e, line: t }) => {
|
|
15653
|
-
let n =
|
|
15654
|
-
return /* @__PURE__ */ v(
|
|
15647
|
+
let n = lp[e.type ?? "backbone"];
|
|
15648
|
+
return /* @__PURE__ */ v(ie, {
|
|
15655
15649
|
positions: t,
|
|
15656
15650
|
pathOptions: {
|
|
15657
|
-
color:
|
|
15651
|
+
color: up(n.color),
|
|
15658
15652
|
weight: n.weight,
|
|
15659
15653
|
dashArray: n.dashArray
|
|
15660
15654
|
}
|
|
15661
15655
|
}, `${e.from}-${e.to}-${e.type ?? "backbone"}`);
|
|
15662
15656
|
}),
|
|
15663
|
-
e.map((e) => /* @__PURE__ */ v(
|
|
15657
|
+
e.map((e) => /* @__PURE__ */ v(ne, {
|
|
15664
15658
|
position: C[e.id],
|
|
15665
|
-
icon:
|
|
15659
|
+
icon: bp(e, e.id === a),
|
|
15666
15660
|
title: e.label,
|
|
15667
15661
|
alt: `${e.label}, estado ${e.status}`,
|
|
15668
15662
|
keyboard: !!o,
|
|
@@ -15686,17 +15680,17 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15686
15680
|
children: e === "street" ? "Mapa" : "Satélite"
|
|
15687
15681
|
}, e))
|
|
15688
15682
|
}),
|
|
15689
|
-
s && e.length > 0 && /* @__PURE__ */ v(
|
|
15683
|
+
s && e.length > 0 && /* @__PURE__ */ v(_p, {
|
|
15690
15684
|
nodes: e,
|
|
15691
15685
|
edges: t
|
|
15692
15686
|
})
|
|
15693
15687
|
]
|
|
15694
15688
|
});
|
|
15695
|
-
},
|
|
15689
|
+
}, Cp = {
|
|
15696
15690
|
edit: "sf-audit-timeline__icon-wrap--edit",
|
|
15697
15691
|
sync: "sf-audit-timeline__icon-wrap--sync",
|
|
15698
15692
|
create: "sf-audit-timeline__icon-wrap--create"
|
|
15699
|
-
},
|
|
15693
|
+
}, wp = ({ items: e, sectionTitle: t = "Historial de movimientos", eventCountLabel: n, ariaLabel: r = "Historial de movimientos", emptyMessage: i = "Sin eventos", className: a }) => {
|
|
15700
15694
|
let o = n ?? `${e.length} evento${e.length === 1 ? "" : "s"}`;
|
|
15701
15695
|
return /* @__PURE__ */ y("section", {
|
|
15702
15696
|
className: (0, X.default)("sf-audit-timeline", a),
|
|
@@ -15735,11 +15729,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15735
15729
|
/* @__PURE__ */ v("div", {
|
|
15736
15730
|
className: "sf-audit-timeline__marker",
|
|
15737
15731
|
children: t.icon ? /* @__PURE__ */ v("span", {
|
|
15738
|
-
className: (0, X.default)("sf-audit-timeline__icon-wrap",
|
|
15732
|
+
className: (0, X.default)("sf-audit-timeline__icon-wrap", Cp[r]),
|
|
15739
15733
|
"aria-hidden": "true",
|
|
15740
15734
|
children: t.icon
|
|
15741
15735
|
}) : /* @__PURE__ */ v("span", {
|
|
15742
|
-
className: (0, X.default)("sf-audit-timeline__icon-wrap",
|
|
15736
|
+
className: (0, X.default)("sf-audit-timeline__icon-wrap", Cp[r]),
|
|
15743
15737
|
"aria-hidden": "true"
|
|
15744
15738
|
})
|
|
15745
15739
|
}),
|
|
@@ -15775,16 +15769,16 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15775
15769
|
})]
|
|
15776
15770
|
})]
|
|
15777
15771
|
});
|
|
15778
|
-
},
|
|
15772
|
+
}, Tp = {
|
|
15779
15773
|
info: "sf-record-list__icon--info",
|
|
15780
15774
|
warning: "sf-record-list__icon--warning",
|
|
15781
15775
|
success: "sf-record-list__icon--success",
|
|
15782
15776
|
neutral: "sf-record-list__icon--neutral"
|
|
15783
|
-
},
|
|
15777
|
+
}, Ep = ({ icon: e, iconTone: t = "info", title: n, subtitle: r, badge: i, actions: a, className: o }) => /* @__PURE__ */ y("article", {
|
|
15784
15778
|
className: (0, X.default)("sf-record-list__item", o),
|
|
15785
15779
|
children: [
|
|
15786
15780
|
e && /* @__PURE__ */ v("span", {
|
|
15787
|
-
className: (0, X.default)("sf-record-list__icon",
|
|
15781
|
+
className: (0, X.default)("sf-record-list__icon", Tp[t]),
|
|
15788
15782
|
"aria-hidden": "true",
|
|
15789
15783
|
children: e
|
|
15790
15784
|
}),
|
|
@@ -15809,7 +15803,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15809
15803
|
children: a
|
|
15810
15804
|
})
|
|
15811
15805
|
]
|
|
15812
|
-
}),
|
|
15806
|
+
}), Dp = ({ title: e, action: t, items: n, className: r, ariaLabel: i }) => /* @__PURE__ */ y("section", {
|
|
15813
15807
|
className: (0, X.default)("sf-record-list", r),
|
|
15814
15808
|
"aria-label": i ?? (typeof e == "string" ? e : void 0),
|
|
15815
15809
|
children: [(e || t) && /* @__PURE__ */ y("div", {
|
|
@@ -15823,9 +15817,9 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15823
15817
|
})]
|
|
15824
15818
|
}), /* @__PURE__ */ v("div", {
|
|
15825
15819
|
className: "sf-record-list__items",
|
|
15826
|
-
children: n.map((e, t) => /* @__PURE__ */ v(
|
|
15820
|
+
children: n.map((e, t) => /* @__PURE__ */ v(Ep, { ...e }, e.id ?? t))
|
|
15827
15821
|
})]
|
|
15828
|
-
}),
|
|
15822
|
+
}), Op = ({ label: e, pulse: t = !0, className: n }) => /* @__PURE__ */ y("span", {
|
|
15829
15823
|
className: (0, X.default)("sf-live-chip", n),
|
|
15830
15824
|
children: [/* @__PURE__ */ v("span", {
|
|
15831
15825
|
className: (0, X.default)("sf-live-chip__dot", t && "sf-live-chip__dot--pulse"),
|
|
@@ -15834,12 +15828,12 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15834
15828
|
className: "sf-live-chip__label",
|
|
15835
15829
|
children: e
|
|
15836
15830
|
})]
|
|
15837
|
-
}),
|
|
15831
|
+
}), kp = {
|
|
15838
15832
|
default: "var(--sf-text, #1B2A38)",
|
|
15839
15833
|
success: "#1F8A4C",
|
|
15840
15834
|
warning: "#C76A12",
|
|
15841
15835
|
danger: "#C0392B"
|
|
15842
|
-
},
|
|
15836
|
+
}, Ap = {
|
|
15843
15837
|
display: "flex",
|
|
15844
15838
|
alignItems: "center",
|
|
15845
15839
|
justifyContent: "space-between",
|
|
@@ -15850,110 +15844,110 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15850
15844
|
border: "1px solid var(--sf-border, #E2E8EC)",
|
|
15851
15845
|
borderRadius: 13,
|
|
15852
15846
|
boxShadow: "0 1px 3px rgba(12,33,49,.06), 0 1px 2px rgba(12,33,49,.04)"
|
|
15853
|
-
},
|
|
15847
|
+
}, jp = {
|
|
15854
15848
|
display: "flex",
|
|
15855
15849
|
alignItems: "center",
|
|
15856
15850
|
gap: 14,
|
|
15857
15851
|
flexWrap: "wrap"
|
|
15858
|
-
},
|
|
15852
|
+
}, Mp = {
|
|
15859
15853
|
width: 1,
|
|
15860
15854
|
height: 20,
|
|
15861
15855
|
background: "var(--sf-border, #DCE3E7)"
|
|
15862
|
-
},
|
|
15856
|
+
}, Np = {
|
|
15863
15857
|
fontSize: 13,
|
|
15864
15858
|
fontWeight: 600,
|
|
15865
15859
|
color: "var(--sf-text-subtle, #8A98A4)"
|
|
15866
|
-
},
|
|
15860
|
+
}, Pp = {
|
|
15867
15861
|
fontSize: 15,
|
|
15868
15862
|
fontWeight: 800,
|
|
15869
15863
|
color: "var(--sf-text, #1B2A38)",
|
|
15870
15864
|
fontVariantNumeric: "tabular-nums"
|
|
15871
|
-
},
|
|
15865
|
+
}, Fp = {
|
|
15872
15866
|
fontSize: 12.5,
|
|
15873
15867
|
fontWeight: 800,
|
|
15874
15868
|
color: "#C76A12"
|
|
15875
|
-
},
|
|
15869
|
+
}, Ip = {
|
|
15876
15870
|
fontSize: 13,
|
|
15877
15871
|
fontWeight: 700,
|
|
15878
15872
|
color: "var(--sf-text-subtle, #5C7180)"
|
|
15879
|
-
},
|
|
15873
|
+
}, Lp = {
|
|
15880
15874
|
display: "flex",
|
|
15881
15875
|
alignItems: "center",
|
|
15882
15876
|
gap: 22,
|
|
15883
15877
|
margin: 0
|
|
15884
|
-
},
|
|
15878
|
+
}, Rp = {
|
|
15885
15879
|
display: "flex",
|
|
15886
15880
|
alignItems: "baseline",
|
|
15887
15881
|
gap: 6
|
|
15888
|
-
},
|
|
15882
|
+
}, zp = {
|
|
15889
15883
|
fontSize: 10.5,
|
|
15890
15884
|
fontWeight: 700,
|
|
15891
15885
|
letterSpacing: ".05em",
|
|
15892
15886
|
textTransform: "uppercase",
|
|
15893
15887
|
color: "var(--sf-text-subtle, #8A98A4)"
|
|
15894
|
-
},
|
|
15888
|
+
}, Bp = ({ liveLabel: e, metrics: t, nextDeparture: n, className: r, ariaLabel: i = "Estado en vivo" }) => /* @__PURE__ */ y("section", {
|
|
15895
15889
|
className: (0, X.default)("sf-live-status-bar", r),
|
|
15896
15890
|
"aria-label": i,
|
|
15897
|
-
style:
|
|
15891
|
+
style: Ap,
|
|
15898
15892
|
children: [/* @__PURE__ */ y("div", {
|
|
15899
|
-
style:
|
|
15893
|
+
style: jp,
|
|
15900
15894
|
children: [
|
|
15901
|
-
/* @__PURE__ */ v(
|
|
15895
|
+
/* @__PURE__ */ v(Op, { label: "En vivo" }),
|
|
15902
15896
|
/* @__PURE__ */ v("span", {
|
|
15903
|
-
style:
|
|
15897
|
+
style: Ip,
|
|
15904
15898
|
children: e
|
|
15905
15899
|
}),
|
|
15906
15900
|
n && /* @__PURE__ */ y(_, { children: [
|
|
15907
15901
|
/* @__PURE__ */ v("span", {
|
|
15908
|
-
style:
|
|
15902
|
+
style: Mp,
|
|
15909
15903
|
"aria-hidden": "true"
|
|
15910
15904
|
}),
|
|
15911
15905
|
/* @__PURE__ */ v("span", {
|
|
15912
|
-
style:
|
|
15906
|
+
style: Np,
|
|
15913
15907
|
children: n.label ?? "Próxima salida"
|
|
15914
15908
|
}),
|
|
15915
15909
|
/* @__PURE__ */ v("span", {
|
|
15916
|
-
style:
|
|
15910
|
+
style: Pp,
|
|
15917
15911
|
children: n.time
|
|
15918
15912
|
}),
|
|
15919
15913
|
n.countdown != null && /* @__PURE__ */ v("span", {
|
|
15920
|
-
style:
|
|
15914
|
+
style: Fp,
|
|
15921
15915
|
children: n.countdown
|
|
15922
15916
|
})
|
|
15923
15917
|
] })
|
|
15924
15918
|
]
|
|
15925
15919
|
}), /* @__PURE__ */ v("dl", {
|
|
15926
|
-
style:
|
|
15920
|
+
style: Lp,
|
|
15927
15921
|
children: t.map((e, t) => /* @__PURE__ */ y("div", {
|
|
15928
|
-
style:
|
|
15922
|
+
style: Rp,
|
|
15929
15923
|
children: [/* @__PURE__ */ v("dd", {
|
|
15930
15924
|
style: {
|
|
15931
15925
|
margin: 0,
|
|
15932
15926
|
fontSize: 20,
|
|
15933
15927
|
fontWeight: 800,
|
|
15934
15928
|
fontVariantNumeric: "tabular-nums",
|
|
15935
|
-
color:
|
|
15929
|
+
color: kp[e.accent ?? "default"]
|
|
15936
15930
|
},
|
|
15937
15931
|
children: e.value
|
|
15938
15932
|
}), /* @__PURE__ */ v("dt", {
|
|
15939
|
-
style:
|
|
15933
|
+
style: zp,
|
|
15940
15934
|
children: e.label
|
|
15941
15935
|
})]
|
|
15942
15936
|
}, e.id ?? `${e.label}-${t}`))
|
|
15943
15937
|
})]
|
|
15944
|
-
}),
|
|
15938
|
+
}), Vp = {
|
|
15945
15939
|
success: "sf-timeline__dot--success",
|
|
15946
15940
|
warning: "sf-timeline__dot--warning",
|
|
15947
15941
|
danger: "sf-timeline__dot--danger",
|
|
15948
15942
|
info: "sf-timeline__dot--info",
|
|
15949
15943
|
default: "sf-timeline__dot--default"
|
|
15950
|
-
},
|
|
15944
|
+
}, Hp = {
|
|
15951
15945
|
success: "sf-timeline__icon-wrap--success",
|
|
15952
15946
|
warning: "sf-timeline__icon-wrap--warning",
|
|
15953
15947
|
danger: "sf-timeline__icon-wrap--danger",
|
|
15954
15948
|
info: "sf-timeline__icon-wrap--info",
|
|
15955
15949
|
default: "sf-timeline__icon-wrap--default"
|
|
15956
|
-
},
|
|
15950
|
+
}, Up = ({ items: e, ariaLabel: t = "Línea de tiempo", emptyMessage: n = "Sin eventos", className: r }) => /* @__PURE__ */ y("ol", {
|
|
15957
15951
|
className: (0, X.default)("sf-timeline", r),
|
|
15958
15952
|
"aria-label": t,
|
|
15959
15953
|
children: [e.length === 0 && /* @__PURE__ */ v("li", {
|
|
@@ -15972,11 +15966,11 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15972
15966
|
/* @__PURE__ */ v("div", {
|
|
15973
15967
|
className: "sf-timeline__marker",
|
|
15974
15968
|
children: t.icon ? /* @__PURE__ */ v("span", {
|
|
15975
|
-
className: (0, X.default)("sf-timeline__icon-wrap",
|
|
15969
|
+
className: (0, X.default)("sf-timeline__icon-wrap", Hp[r]),
|
|
15976
15970
|
"aria-hidden": "true",
|
|
15977
15971
|
children: t.icon
|
|
15978
15972
|
}) : /* @__PURE__ */ v("span", {
|
|
15979
|
-
className: (0, X.default)("sf-timeline__dot",
|
|
15973
|
+
className: (0, X.default)("sf-timeline__dot", Vp[r]),
|
|
15980
15974
|
"aria-hidden": "true"
|
|
15981
15975
|
})
|
|
15982
15976
|
}),
|
|
@@ -15999,7 +15993,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
15999
15993
|
]
|
|
16000
15994
|
}, t.id ?? n);
|
|
16001
15995
|
})]
|
|
16002
|
-
}),
|
|
15996
|
+
}), Wp = ({ items: e, autoPlay: t = !1, intervalMs: n = 4e3, showDots: r = !0, showArrows: i = !0, className: a }) => {
|
|
16003
15997
|
let o = m(null), [c, l] = h(0), d = s((t) => {
|
|
16004
15998
|
let n = o.current;
|
|
16005
15999
|
if (!n || e.length === 0) return;
|
|
@@ -16061,7 +16055,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16061
16055
|
})
|
|
16062
16056
|
]
|
|
16063
16057
|
});
|
|
16064
|
-
},
|
|
16058
|
+
}, Gp = ({ src: e, alt: t, aspectRatio: n = "16/9", fit: r = "cover", overlay: i = "none", children: a, rounded: o = !0, loading: s = "lazy", fallback: c, className: l, imgProps: u }) => {
|
|
16065
16059
|
let [d, f] = h(!1), p = !!e && !d;
|
|
16066
16060
|
return /* @__PURE__ */ y("div", {
|
|
16067
16061
|
className: (0, X.default)("sf-media-panel", o && "sf-media-panel--rounded", l),
|
|
@@ -16088,19 +16082,19 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16088
16082
|
})
|
|
16089
16083
|
]
|
|
16090
16084
|
});
|
|
16091
|
-
},
|
|
16085
|
+
}, Kp = {
|
|
16092
16086
|
top: 8,
|
|
16093
16087
|
right: 8,
|
|
16094
16088
|
left: 0,
|
|
16095
16089
|
bottom: 0
|
|
16096
|
-
},
|
|
16090
|
+
}, qp = {
|
|
16097
16091
|
top: 20,
|
|
16098
16092
|
right: 8,
|
|
16099
16093
|
left: 0,
|
|
16100
16094
|
bottom: 0
|
|
16101
|
-
},
|
|
16095
|
+
}, Jp = (e, t) => {
|
|
16102
16096
|
if (t !== "none") return e.stackId ?? "sf-stack";
|
|
16103
|
-
},
|
|
16097
|
+
}, Yp = (e) => e?.map((e, t) => {
|
|
16104
16098
|
let n = e.color ?? "var(--sf-chart-reference)", r = {
|
|
16105
16099
|
stroke: n,
|
|
16106
16100
|
strokeDasharray: e.strokeDasharray ?? "4 4",
|
|
@@ -16131,7 +16125,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16131
16125
|
}
|
|
16132
16126
|
})
|
|
16133
16127
|
}, `ref-${t}`);
|
|
16134
|
-
}),
|
|
16128
|
+
}), Xp = ({ 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, orientation: d = "vertical", stacking: f = "none", unit: m, yDomain: h, xAxisFormat: g, yAxisFormat: b, tooltipFormat: x, valueLabelFormat: S, showValueLabels: C = !1, referenceLines: w, onDataPointClick: T }) => {
|
|
16135
16129
|
let E = e === "bar" && d === "horizontal", D = e === "line" ? "none" : f, O = D === "stacked-100", k = p(() => O ? gs(t, r) : t, [
|
|
16136
16130
|
t,
|
|
16137
16131
|
r,
|
|
@@ -16166,7 +16160,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16166
16160
|
0,
|
|
16167
16161
|
0
|
|
16168
16162
|
],
|
|
16169
|
-
stackId:
|
|
16163
|
+
stackId: Jp(e, D),
|
|
16170
16164
|
maxBarSize: D === "none" ? 48 : void 0,
|
|
16171
16165
|
children: z(e.key)
|
|
16172
16166
|
}, e.key))
|
|
@@ -16202,7 +16196,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16202
16196
|
fill: n,
|
|
16203
16197
|
fillOpacity: .15,
|
|
16204
16198
|
strokeWidth: 2,
|
|
16205
|
-
stackId:
|
|
16199
|
+
stackId: Jp(e, D),
|
|
16206
16200
|
children: z(e.key)
|
|
16207
16201
|
}, e.key);
|
|
16208
16202
|
})
|
|
@@ -16219,7 +16213,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16219
16213
|
children: /* @__PURE__ */ y(B, {
|
|
16220
16214
|
data: k,
|
|
16221
16215
|
layout: E ? "vertical" : "horizontal",
|
|
16222
|
-
margin: C ?
|
|
16216
|
+
margin: C ? qp : Kp,
|
|
16223
16217
|
onClick: R,
|
|
16224
16218
|
children: [
|
|
16225
16219
|
c && /* @__PURE__ */ v(ue, {
|
|
@@ -16257,7 +16251,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16257
16251
|
formatter: L
|
|
16258
16252
|
}),
|
|
16259
16253
|
u && /* @__PURE__ */ v(pe, { wrapperStyle: ds }),
|
|
16260
|
-
|
|
16254
|
+
Yp(w),
|
|
16261
16255
|
ee()
|
|
16262
16256
|
]
|
|
16263
16257
|
})
|
|
@@ -16267,7 +16261,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16267
16261
|
children: o
|
|
16268
16262
|
})
|
|
16269
16263
|
});
|
|
16270
|
-
},
|
|
16264
|
+
}, Zp = ({ items: e, className: t }) => /* @__PURE__ */ v("ul", {
|
|
16271
16265
|
className: (0, X.default)("sf-chart-legend", t),
|
|
16272
16266
|
children: e.map((e) => /* @__PURE__ */ y("li", {
|
|
16273
16267
|
className: "sf-chart-legend__item",
|
|
@@ -16277,7 +16271,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16277
16271
|
"aria-hidden": "true"
|
|
16278
16272
|
}), e.label]
|
|
16279
16273
|
}, e.label))
|
|
16280
|
-
}),
|
|
16274
|
+
}), Qp = ({ x: e, y: t, payload: n, data: r, showValues: i, format: a, color: o }) => {
|
|
16281
16275
|
let s = r.find((e) => e.label === n.value);
|
|
16282
16276
|
return /* @__PURE__ */ y("g", { children: [/* @__PURE__ */ v("text", {
|
|
16283
16277
|
x: e,
|
|
@@ -16298,7 +16292,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16298
16292
|
},
|
|
16299
16293
|
children: a(s.value, s.key)
|
|
16300
16294
|
})] });
|
|
16301
|
-
},
|
|
16295
|
+
}, $p = ({ data: e, max: t = 100, color: n, height: r = 280, ariaLabel: i = "Diagnóstico", emptyMessage: a = "Sin datos para mostrar", className: o, showTooltip: s = !0, showLegend: c = !1, showValues: l = !1, valueFormat: u }) => {
|
|
16302
16296
|
let d = e.length > 0, f = cs({ color: n }, 0), p = u ?? ps();
|
|
16303
16297
|
return /* @__PURE__ */ v("div", {
|
|
16304
16298
|
className: (0, X.default)("sf-chart", o),
|
|
@@ -16315,7 +16309,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16315
16309
|
/* @__PURE__ */ v(_e, { stroke: "var(--sf-chart-grid)" }),
|
|
16316
16310
|
/* @__PURE__ */ v(ge, {
|
|
16317
16311
|
dataKey: "label",
|
|
16318
|
-
tick: /* @__PURE__ */ v(
|
|
16312
|
+
tick: /* @__PURE__ */ v(Qp, {
|
|
16319
16313
|
x: 0,
|
|
16320
16314
|
y: 0,
|
|
16321
16315
|
payload: { value: "" },
|
|
@@ -16353,8 +16347,8 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16353
16347
|
children: a
|
|
16354
16348
|
})
|
|
16355
16349
|
});
|
|
16356
|
-
},
|
|
16357
|
-
let l = o ?? ps(i), u = Math.abs(e - t) || Math.abs(t) * .1 || 1, d = n ?? Math.min(e, t) - u * .5, f = r ?? Math.max(e, t) + u * .5, p = (e) => f > d ?
|
|
16350
|
+
}, em = (e) => Math.min(100, Math.max(0, e)), tm = ({ value: e, average: t, min: n, max: r, unit: i, label: a, valueFormat: o, direction: s = "down-good", className: c }) => {
|
|
16351
|
+
let l = o ?? ps(i), u = Math.abs(e - t) || Math.abs(t) * .1 || 1, d = n ?? Math.min(e, t) - u * .5, f = r ?? Math.max(e, t) + u * .5, p = (e) => f > d ? em((e - d) / (f - d) * 100) : 50, m = p(e), h = p(t), g = t === 0 ? 0 : (e - t) / Math.abs(t) * 100, _ = s === "neutral" ? null : s === "down-good" ? g <= 0 : g >= 0, b = Math.abs(g) >= .5;
|
|
16358
16352
|
return /* @__PURE__ */ y("div", {
|
|
16359
16353
|
className: (0, X.default)("sf-deviation-band", c),
|
|
16360
16354
|
children: [
|
|
@@ -16394,7 +16388,7 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16394
16388
|
})
|
|
16395
16389
|
]
|
|
16396
16390
|
});
|
|
16397
|
-
},
|
|
16391
|
+
}, nm = (e, { initialPageSize: t = 10 } = {}) => {
|
|
16398
16392
|
let [n, r] = h(""), [i, a] = h(0), [o, s] = h(t), c = p(() => {
|
|
16399
16393
|
let t = n.trim().toLowerCase();
|
|
16400
16394
|
return t ? e.filter((e) => Object.values(e).some((e) => String(e ?? "").toLowerCase().includes(t))) : e;
|
|
@@ -16421,37 +16415,37 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16421
16415
|
]),
|
|
16422
16416
|
totalItems: l
|
|
16423
16417
|
};
|
|
16424
|
-
},
|
|
16425
|
-
let n =
|
|
16418
|
+
}, rm = (e) => String(e ?? "").normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim(), im = (e) => typeof e == "string" || typeof e == "number", am = (e, t) => {
|
|
16419
|
+
let n = rm(t);
|
|
16426
16420
|
return typeof t == "number" && (n = `#${n}`), e.toLowerCase().endsWith("codigo") && !n.startsWith("#") && (n = `.${n}`), n;
|
|
16427
|
-
},
|
|
16421
|
+
}, om = (e, t, n) => {
|
|
16428
16422
|
if (t?.length) return [...t];
|
|
16429
16423
|
let r = new Set(n), i = [];
|
|
16430
|
-
for (let t in e) r.has(t) ||
|
|
16424
|
+
for (let t in e) r.has(t) || im(e[t]) && i.push(t);
|
|
16431
16425
|
return i;
|
|
16432
|
-
},
|
|
16433
|
-
let r = "", i =
|
|
16426
|
+
}, sm = (e, t, n) => {
|
|
16427
|
+
let r = "", i = om(e, t, n);
|
|
16434
16428
|
for (let t of i) {
|
|
16435
16429
|
let n = e[t];
|
|
16436
|
-
if (!
|
|
16437
|
-
let i =
|
|
16430
|
+
if (!im(n)) continue;
|
|
16431
|
+
let i = am(t, n);
|
|
16438
16432
|
i && (r += `${i} `);
|
|
16439
16433
|
}
|
|
16440
16434
|
return r;
|
|
16441
|
-
},
|
|
16435
|
+
}, cm = (e) => {
|
|
16442
16436
|
let t = e.split(";"), n = [];
|
|
16443
16437
|
for (let e of t) {
|
|
16444
|
-
let t =
|
|
16438
|
+
let t = rm(e);
|
|
16445
16439
|
t.length >= 2 && n.push(t);
|
|
16446
16440
|
}
|
|
16447
16441
|
return n;
|
|
16448
|
-
},
|
|
16449
|
-
let [n, r] = h(""), i = l(n), a = t?.filters, o = t?.searchableKeys, s = t?.ignoredKeys, c = p(() =>
|
|
16442
|
+
}, lm = (e, t) => {
|
|
16443
|
+
let [n, r] = h(""), i = l(n), a = t?.filters, o = t?.searchableKeys, s = t?.ignoredKeys, c = p(() => cm(i), [i]), u = p(() => {
|
|
16450
16444
|
if (!e?.length) return [];
|
|
16451
16445
|
let t = [];
|
|
16452
16446
|
for (let n of e) t.push({
|
|
16453
16447
|
item: n,
|
|
16454
|
-
searchIndex:
|
|
16448
|
+
searchIndex: sm(n, o, s)
|
|
16455
16449
|
});
|
|
16456
16450
|
return t;
|
|
16457
16451
|
}, [
|
|
@@ -16493,15 +16487,15 @@ ${e.map((e) => `<Row>${n.map((t) => {
|
|
|
16493
16487
|
};
|
|
16494
16488
|
//#endregion
|
|
16495
16489
|
//#region src/hooks/useArrayPaginator.ts
|
|
16496
|
-
function
|
|
16490
|
+
function um(e, t, n) {
|
|
16497
16491
|
if (t <= 0) return [];
|
|
16498
16492
|
let r = Math.max(0, n);
|
|
16499
16493
|
return r >= e.length ? [] : e.slice(r, r + t);
|
|
16500
16494
|
}
|
|
16501
|
-
var
|
|
16495
|
+
var dm = (e, t, n) => {
|
|
16502
16496
|
let r = e?.[n], i = t?.[n];
|
|
16503
16497
|
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" });
|
|
16504
|
-
},
|
|
16498
|
+
}, fm = (e, t) => {
|
|
16505
16499
|
let [n, r] = h([]), [i, a] = h(() => ({
|
|
16506
16500
|
limit: Math.max(1, t?.limit ?? 100),
|
|
16507
16501
|
offset: 0
|
|
@@ -16514,7 +16508,7 @@ var sm = (e, t, n) => {
|
|
|
16514
16508
|
if (e.length === 0) return [];
|
|
16515
16509
|
let r = [...e];
|
|
16516
16510
|
if (n.length > 0) {
|
|
16517
|
-
let e = t?.onSortFunc ??
|
|
16511
|
+
let e = t?.onSortFunc ?? dm, i = t?.strictSort ?? !1;
|
|
16518
16512
|
r.sort((t, r) => {
|
|
16519
16513
|
for (let { id: a, desc: o } of n) {
|
|
16520
16514
|
if (i && (!(typeof t == "object" && t) || !(typeof r == "object" && r) || !(a in t) || !(a in r))) continue;
|
|
@@ -16524,7 +16518,7 @@ var sm = (e, t, n) => {
|
|
|
16524
16518
|
return 0;
|
|
16525
16519
|
});
|
|
16526
16520
|
}
|
|
16527
|
-
return
|
|
16521
|
+
return um(r, o, c);
|
|
16528
16522
|
}, [
|
|
16529
16523
|
e,
|
|
16530
16524
|
o,
|
|
@@ -16543,7 +16537,7 @@ var sm = (e, t, n) => {
|
|
|
16543
16537
|
onSortChange: r,
|
|
16544
16538
|
pageData: u
|
|
16545
16539
|
};
|
|
16546
|
-
},
|
|
16540
|
+
}, pm = (e, t) => {
|
|
16547
16541
|
if (typeof window > "u") return t;
|
|
16548
16542
|
try {
|
|
16549
16543
|
let n = window.localStorage.getItem(e);
|
|
@@ -16551,8 +16545,8 @@ var sm = (e, t, n) => {
|
|
|
16551
16545
|
} catch {
|
|
16552
16546
|
return t;
|
|
16553
16547
|
}
|
|
16554
|
-
},
|
|
16555
|
-
let [n, r] = h(() =>
|
|
16548
|
+
}, mm = (e, t) => {
|
|
16549
|
+
let [n, r] = h(() => pm(e, t));
|
|
16556
16550
|
return [n, (t) => {
|
|
16557
16551
|
r((n) => {
|
|
16558
16552
|
let r = typeof t == "function" ? t(n) : t;
|
|
@@ -16562,82 +16556,82 @@ var sm = (e, t, n) => {
|
|
|
16562
16556
|
return r;
|
|
16563
16557
|
});
|
|
16564
16558
|
}];
|
|
16565
|
-
},
|
|
16559
|
+
}, hm = (e) => typeof window > "u" ? null : new URL(window.location.href).searchParams.get(e), gm = (e, t) => {
|
|
16566
16560
|
if (typeof window > "u") return;
|
|
16567
16561
|
let n = new URL(window.location.href);
|
|
16568
16562
|
t != null && t !== "" ? n.searchParams.set(e, t) : n.searchParams.delete(e), window.history.replaceState(null, "", n.toString());
|
|
16569
|
-
},
|
|
16570
|
-
|
|
16571
|
-
},
|
|
16563
|
+
}, _m = (e) => {
|
|
16564
|
+
gm(e, null);
|
|
16565
|
+
}, vm = (e, t) => {
|
|
16572
16566
|
let [n, r] = h(() => {
|
|
16573
16567
|
let n = typeof e == "function" ? e() : e;
|
|
16574
16568
|
if (!t) return n;
|
|
16575
|
-
let r =
|
|
16576
|
-
return r == null || r === "" ? (
|
|
16569
|
+
let r = hm(t);
|
|
16570
|
+
return r == null || r === "" ? (gm(t, n), n) : r;
|
|
16577
16571
|
});
|
|
16578
16572
|
return [n, (e) => {
|
|
16579
16573
|
r((n) => {
|
|
16580
16574
|
let r = typeof e == "function" ? e(n) : e;
|
|
16581
|
-
return t &&
|
|
16575
|
+
return t && gm(t, r), r;
|
|
16582
16576
|
});
|
|
16583
16577
|
}];
|
|
16584
|
-
},
|
|
16578
|
+
}, ym = () => {
|
|
16585
16579
|
let e = globalThis.process?.env?.NODE_ENV;
|
|
16586
16580
|
return e != null && e === "development";
|
|
16587
|
-
},
|
|
16581
|
+
}, bm = (e, t) => {
|
|
16588
16582
|
let n = x({
|
|
16589
16583
|
resolver: De(e),
|
|
16590
16584
|
defaultValues: t?.defaultValues
|
|
16591
16585
|
}), r = (e, t) => n.handleSubmit(e, (e, n) => {
|
|
16592
|
-
|
|
16586
|
+
ym() && console.log(e), t?.(e, n);
|
|
16593
16587
|
});
|
|
16594
16588
|
return {
|
|
16595
16589
|
...n,
|
|
16596
16590
|
handleSubmit: r
|
|
16597
16591
|
};
|
|
16598
|
-
},
|
|
16599
|
-
let t =
|
|
16592
|
+
}, xm = (e) => {
|
|
16593
|
+
let t = jl(e);
|
|
16600
16594
|
return /[",\n\r]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
|
|
16601
|
-
},
|
|
16595
|
+
}, Sm = (e, t) => {
|
|
16602
16596
|
if (typeof document > "u") return;
|
|
16603
|
-
let n = `\uFEFF${[t.columns.map((e) =>
|
|
16597
|
+
let n = `\uFEFF${[t.columns.map((e) => xm(e.header)).join(","), ...e.map((e) => t.columns.map((t) => xm(t.getValue(e))).join(","))].join("\n")}`, r = new Blob([n], { type: "text/csv;charset=utf-8" }), i = URL.createObjectURL(r), a = document.createElement("a");
|
|
16604
16598
|
a.href = i, a.download = t.filename ?? "export.csv", a.click(), URL.revokeObjectURL(i);
|
|
16605
|
-
},
|
|
16599
|
+
}, Cm = "Este campo es requerido", wm = "Introduce una dirección de correo electrónico válida", Tm = "El correo electrónico es obligatorio", Em = "El valor de este campo es inválido", Dm = "Introduce un número de celular válido", Om = (e) => e == null ? null : typeof e == "string" ? e.trim() === "" ? null : e.trim() : e, km = (e = Cm) => G.string().transform(Om).required(e), Am = () => G.string().transform(Om).default(null).nullable(), jm = (e = Tm) => G.string().transform(Om).email(wm).required(e), Mm = (e = wm) => G.string().transform(Om).test("emailTest", e, (e) => e == null || e === "" || G.string().email().isValidSync(e)).default(null).nullable(), Nm = (e, t = Em, n = Cm) => G.string().transform(Om).trim().test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).required(n), Pm = (e, t = Em) => G.string().transform(Om).test("rgxValidation", t, (t) => t == null || t === "" || t.match(e) != null).default(null).nullable(), Fm = (e) => {
|
|
16606
16600
|
let t = e?.minLength == null ? void 0 : Math.max(1, e.minLength);
|
|
16607
16601
|
return {
|
|
16608
16602
|
minLength: t,
|
|
16609
16603
|
maxLength: e?.maxLength == null ? void 0 : Math.max(t ?? 1, e.maxLength)
|
|
16610
16604
|
};
|
|
16611
|
-
},
|
|
16612
|
-
let { minLength: t, maxLength: n } =
|
|
16605
|
+
}, Im = (e) => {
|
|
16606
|
+
let { minLength: t, maxLength: n } = Fm(e), r = /^[0-9]+$/, i = G.string().transform(Om).test("rgxValidation", (e, t) => e == null || e === "" || e.match(r) != null || t.createError({ message: "El campo debe contener solo caracteres numéricos" }));
|
|
16613
16607
|
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;
|
|
16614
|
-
},
|
|
16608
|
+
}, Lm = (e) => Im(e).required(Cm), Rm = (e) => Im(e).default(null).nullable(), zm = (e = Cm) => G.boolean().typeError("El tipo de dato debe ser booleano").required(e), Bm = () => G.boolean().typeError("El tipo de dato debe ser booleano").default(null).nullable(), Vm = (e, t) => t == null || t === "" ? null : Number.isNaN(e) ? void 0 : e, Hm = (e = Cm) => G.number().transform(Vm).typeError("Debe ser numérico").required(e), Um = () => G.number().transform(Vm).typeError("Debe ser numérico").default(null).nullable().notRequired(), Wm = (e = Cm) => G.number().transform(Vm).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").required(e), Gm = (e = Cm) => Wm(e).integer("Este campo debe ser un número entero"), Km = () => G.number().transform(Vm).typeError("Este campo debe ser un valor número").min(0, "Este campo debe ser un valor número positivo").default(null).nullable(), qm = () => Km().integer("Este campo debe ser un número entero"), Jm = (e) => {
|
|
16615
16609
|
let t = /^(?:\+51)\s?[0-9]{3}\s?[0-9]{3}\s?[0-9]{3}$/;
|
|
16616
16610
|
return G.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);
|
|
16617
|
-
},
|
|
16618
|
-
transformNullIfEmpty:
|
|
16619
|
-
requiredString:
|
|
16620
|
-
nullableString:
|
|
16621
|
-
requiredEmail:
|
|
16622
|
-
nullableEmail:
|
|
16623
|
-
requiredMatchString:
|
|
16624
|
-
nullableOrMatchString:
|
|
16625
|
-
requiredStringNumbersOnly:
|
|
16626
|
-
nullableStringNumbersOnly:
|
|
16627
|
-
requiredBoolean:
|
|
16628
|
-
nullableBoolean:
|
|
16629
|
-
requiredNumber:
|
|
16630
|
-
nullableNumber:
|
|
16631
|
-
requiredPositiveNumber:
|
|
16632
|
-
requiredPositiveInteger:
|
|
16633
|
-
nullablePositiveNumber:
|
|
16634
|
-
nullablePositiveInteger:
|
|
16635
|
-
nullableCelular:
|
|
16636
|
-
requiredCelular:
|
|
16637
|
-
requiredStringArray:
|
|
16638
|
-
nullableStringArray:
|
|
16639
|
-
},
|
|
16611
|
+
}, Ym = (e = Dm) => Jm(e).nullable(), Xm = (e = Dm) => Jm(e).required(Cm), Zm = (e = Cm) => G.array().of(km()).min(1, "Debe contener al menos un elemento").required(e), Qm = () => G.array().of(Am()).default(null).nullable(), $m = {
|
|
16612
|
+
transformNullIfEmpty: Om,
|
|
16613
|
+
requiredString: km,
|
|
16614
|
+
nullableString: Am,
|
|
16615
|
+
requiredEmail: jm,
|
|
16616
|
+
nullableEmail: Mm,
|
|
16617
|
+
requiredMatchString: Nm,
|
|
16618
|
+
nullableOrMatchString: Pm,
|
|
16619
|
+
requiredStringNumbersOnly: Lm,
|
|
16620
|
+
nullableStringNumbersOnly: Rm,
|
|
16621
|
+
requiredBoolean: zm,
|
|
16622
|
+
nullableBoolean: Bm,
|
|
16623
|
+
requiredNumber: Hm,
|
|
16624
|
+
nullableNumber: Um,
|
|
16625
|
+
requiredPositiveNumber: Wm,
|
|
16626
|
+
requiredPositiveInteger: Gm,
|
|
16627
|
+
nullablePositiveNumber: Km,
|
|
16628
|
+
nullablePositiveInteger: qm,
|
|
16629
|
+
nullableCelular: Ym,
|
|
16630
|
+
requiredCelular: Xm,
|
|
16631
|
+
requiredStringArray: Zm,
|
|
16632
|
+
nullableStringArray: Qm
|
|
16633
|
+
}, eh = (e) => G.object().shape(e($m));
|
|
16640
16634
|
//#endregion
|
|
16641
|
-
export { ui as AccessDenied, ha as Accordion, ei as ActionButton, zr as ActiveFiltersBar,
|
|
16635
|
+
export { ui as AccessDenied, ha as Accordion, ei as ActionButton, zr as ActiveFiltersBar, Zd as AddressSearchInput, ni as Alert, Qc as AlertLane, Yc as AlertRowList, el as AlertSummaryList, Jf as AllocationBar, Oo as AppBarContainer, Do as AppShell, Co as AppsGridIcon, df as AreaInput, En as AsyncCardSelect, Ar as AsyncCustomTable, wn as AsyncSearchSelect, kn as AsyncSearchTableSelect, wp as AuditTimeline, za as Avatar, Ba as AvatarGroup, Ua as Badge, an as BooleanCheckbox, pa as Breadcrumb, $ as Button, Yr as ButtonGroup, ss as CHART_SERIES_COLORS, cn as COUNTRY_DIAL_CODES, sn as CURRENCY_SYMBOLS, _c as Calendar, yl as CardNote, Wf as CardRadioGroup, Tn as CardSelect, Wp as Carousel, Xp as Chart, Zp as ChartLegend, $t as Checkbox, en as CheckboxGroup, Vo as CodeEditor, Bf as ColorInput, Ji as CommandPalette, rl as ComparisonTable, Ci as ConfirmDialog, Ii as ContextMenuProvider, rf as CoordinatesInput, _n as CurrencyInput, kr as CustomTable, lr as DEFAULT_PAGE_SIZE_OPTIONS, Sl as DashboardBoard, ll as DashboardCard, Cl as DashboardCardRow, pl as DashboardGrid, _l as DashboardLayout, Dl as DashboardPageFrame, Al as DashboardPlaceholder, ml as DashboardSection, gl as DashboardStatBar, Lt as DateInput, Ht as DatePicker, Jl as DateRangeFields, Rn as DateRangeInput, Yl as DateRangeUtcInput, yo as DateWeekStrip, Rl as DetailPanel, Hl as DetailPreviewList, Ul as DetailSection, vl as DetailSidePanel, tm as DeviationBand, $p as DiagnosticRadar, Gn as DisplayField, fn as DniInput, zc as DonutBreakdown, Fc as DonutGauge, Ic as DonutGaugeRow, Wi as Drawer, Vl as DrilldownAlertList, Bl as DrilldownKPICard, Oi as DropdownMenu, ki as DropdownMenuItem, Gr as EditableDataGrid, ri as EmptyState, Zs as EntityCard, $s as EntityCardGrid, ai as ErrorView, Wc as EventLog, tl as EvidenceFootnote, Jr as ExpandableTableSection, Z as FieldLayout, lu as FileDropInput, Un as FileInput, Aa as FilterBar, Ma as FilterBarDate, ja as FilterBarField, Na as FilterBarSelect, Pa as FilterBarText, Qr as FormActions, Da as FormWizard, ca as HeightProvider, Pt as Input, La as ItineraryEditor, As as KPICard, Ms as KPIGrid, Hf as KeyValueInput, Op as LiveChip, lo as LiveRouteBoard, Bp as LiveStatusBar, ci as LoadingView, nf as LocationPicker, Uo as MIN_MAP_GEOCODER_QUERY_LENGTH, uc as MONTH_NAMES, Fa as MaestroLayout, yu as MapFrame, xu as MapLegend, os as MapPicker, wu as MapPointCard, bu as MapStatus, Su as MapToolbar, Cu as MapVehiclePopup, tf as MapView, ka as MasterDetailLayout, Oa as MasterDetailListItem, Gp as MediaPanel, Ti as MessageDialog, Vs as MetricBarList, Bs as MetricBarRow, xi as Modal, ac as ModuleCard, oc as ModuleCardGrid, fu as MultiPhotoInput, ip as NETWORK_BASEMAPS, lp as NETWORK_EDGE_STYLES, op as NETWORK_KIND_COLORS, ap as NETWORK_KIND_LABELS, sp as NETWORK_STATUS_COLORS, cp as NETWORK_STATUS_LABELS, mr as NUMBER_FILTER_OPS, _p as NetworkLegend, Sp as NetworkMap, Vi as NotificationBell, It as NumberInput, Mf as NumberStepper, Zf as ORG_TREE_DEFAULT_THEMES, Ai as OptionItem, rp as OrgTree, Kl as OtpInput, Zi as PageContainer, $i as PageHeader, fr as Pagination, ar as PaginationRangeInput, Za as PassengerBoardCard, Wt as PasswordInput, hn as PhoneInput, _u as PhotoCropInput, uu as PhotoInput, Rt as Popover, Xi as ProductTour, Ff as ProgressBar, Lf as ProgressBarReadonly, zi as QRView, Ls as QuickActionGrid, Is as QuickActionTile, tn as RadioGroup, Pf as RangeSliderInput, Rf as RatingInput, nc as RecommendationCard, Dp as RecordList, Ep as RecordListItem, li as RetryBlock, Fo as RichTextEditor, ff as RouteInput, Zr as RowActions, pn as RucInput, Eu as SF_DEFAULT_MAP_CENTER, Du as SF_DEFAULT_MAP_ZOOM, Nu as SF_GOOGLE_ENGINE_CAPABILITIES, Mu as SF_LEAFLET_ENGINE_CAPABILITIES, Tu as SF_MAPS_CONFIG_ERROR, ku as SF_OSM_ATTRIBUTION, Ou as SF_OSM_TILE_URL, ju as SF_SATELLITE_ATTRIBUTION, Au as SF_SATELLITE_TILE_URL, pr as STRING_FILTER_OPS, ga as ScrollArea, Sn as SearchSelect, On as SearchTableSelect, Qt as Select, Gf as SemanticSlider, fa as Separator, Hd as SfProvider, Gi as Sheet, ea as SidePanel, oa as SidePanelContainer, du as SignaturePad, fi as Skeleton, Of as SliderInput, Bn as SmartDateInput, vn as SmartInput, pf as SmartMapInput, pu as SmartMediaInput, An as SmartSelect, Uf as SortableList, _s as Sparkline, si as Spinner, Fs as SplitBar, lc as StatCard, wa as Stepper, _a as SummaryItem, wo as SyncIcon, ji as TabMenuOption, Rr as TableColumnSettings, vr as TableFiltersPanel, Qi as TablePageLayout, yr as TableSortingPanel, ta as Tabs, Vf as TagsInput, Xf as TemporalScrub, Ft as TextArea, zn as TimeRangeInput, Up as Timeline, vi as ToastProvider, nn as Toggle, rn as ToggleCard, Xr as ToolbarButton, Hi as Tooltip, sc as TramoCard, Zt as Transfer, Yt as TreeSelect, uo as UnitSelector, ua as Visibility, da as Visivility, dc as WEEKDAY_LABELS, So as WeekdayToggleStrip, on as YesNoSelect, Va as badgeClassName, Ha as badgeDotClassName, Hr as buildActiveFilterChips, ps as buildDefaultFormatter, mc as buildMonthGrid, Qf as buildOrgTreeRows, Xt as buttonClassName, Ln as calcTimeDuration, _f as clampNumber, Ro as codeEditorClassName, _r as columnFilterFn, pp as countNetworkStatus, ep as countOrgTreeNodes, eh as createFormSchema, er as createLocalStorageAsyncStateStore, nu as createPhotoItem, ou as cropImageToSquare, dm as defaultOnSortFunc, zl as detailHasRows, Xl as emptyDateRange, xf as emptyKeyValuePairs, Cf as emptyNumberRange, vu as emptyPhotoItems, yf as emptyTags, Zl as emptyTimeRange, Sm as exportTableCsv, Pl as exportTableXlsx, Q as fieldClassName, Vr as formatColumnFilterValue, Go as formatMapGeocoderLabel, vf as formatSliderLabel, Pn as fromUtcDateIso, gr as inferInitialFilterValue, jt as inputFocusTransition, Wr as isBlankRow, hr as isColumnFilterValue, Mn as isValidDateString, eu as isValidFileType, gp as networkEdgeLines, mp as networkMapBounds, hp as networkNodePositions, $l as nextPhotoId, Fn as normalizeDateRange, Tf as normalizeHexColor, Sf as normalizeKeyValuePairs, fp as normalizeNetworkEdges, dp as normalizeNetworkNodes, wf as normalizeNumberRange, au as normalizePhotoItems, bf as normalizeTags, In as normalizeTimeRange, Bm as nullableBoolean, Ym as nullableCelular, Mm as nullableEmail, Um as nullableNumber, Pm as nullableOrMatchString, qm as nullablePositiveInteger, Km as nullablePositiveNumber, Am as nullableString, Qm as nullableStringArray, Rm as nullableStringNumbersOnly, tp as orgTreeRootNodes, pc as parseYMD, Ef as progressPercent, hs as rawValueKey, hm as readQueryValue, _m as removeQueryValue, zm as requiredBoolean, Xm as requiredCelular, jm as requiredEmail, Nm as requiredMatchString, Hm as requiredNumber, Gm as requiredPositiveInteger, Wm as requiredPositiveNumber, km as requiredString, Zm as requiredStringArray, Lm as requiredStringNumbersOnly, $f as resolveOrgTreeTheme, cs as resolveSeriesColor, ru as revokePhotoPreview, iu as revokePhotoPreviews, ln as sanitizeDigits, Wo as searchMapAddresses, kd as sfClampLatitude, Ad as sfClampLongitude, Dd as sfFormatCoordinate, Md as sfLatLngToString, Pd as sfMarkerFromLatLng, Nd as sfNormalizeLatLng, jd as sfParseCoordinate, tu as showFilePicker, Mt as textareaClassName, mo as toIsoDate, jn as toLocalDateYMD, fc as toLocalYMD, gs as toStacked100Data, Jt as toStringArray, Nn as toUtcDateIso, Om as transformNullIfEmpty, gm as updateQueryValue, Gd as useAddressSearch, fm as useArrayPaginator, Cn as useAsyncOptions, Mi as useClickAway, la as useContainerHeight, Ri as useContextMenu, bm as useCustomForm, jr as useCustomTableController, Fl as useDetailPanel, Di as useDropdownClose, lm as useFilterData, Ea as useFormWizard, Lo as useIsClient, nm as useMaestroFilter, Kd as useMapEngine, qd as useMapsConfig, Si as useModal, vm as useQueryStringState, Jd as useReverseGeocode, Ud as useSf, Wd as useSfMaps, ia as useSidePanelContainer, na as useSidePanelHandle, mm as useStoredState, Ir as useTableColumnSettings, yi as useToast, dn as validateDni, un as validateRuc, $m as validators };
|
|
16642
16636
|
|
|
16643
16637
|
//# sourceMappingURL=sf-ui.js.map
|