vue-data-ui 3.15.2 → 3.15.3
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/{Arrow-BlksSfiH.js → Arrow-Dng9G5hr.js} +1 -1
- package/dist/{BaseDraggableDialog-E33gMvkf.js → BaseDraggableDialog-BXIITt8m.js} +2 -2
- package/dist/{BaseIcon-UMhVxbLi.js → BaseIcon-COEWBdOr.js} +1 -1
- package/dist/{BaseLegendToggle-C7HjMSKe.js → BaseLegendToggle-aDygzw7d.js} +1 -1
- package/dist/{BaseZoomControls-BSKhy9Em.js → BaseZoomControls-DkJaGyAv.js} +2 -2
- package/dist/{ColorPicker-BlmZVMy-.js → ColorPicker-B-5UbA1C.js} +2 -2
- package/dist/{DataTable-CetPvrxa.js → DataTable-C-gJ3cD_.js} +2 -2
- package/dist/{Legend-BmSuOSGO.js → Legend-9T2e7Hm_.js} +2 -2
- package/dist/{NonSvgPenAndPaper-CxAAQbRx.js → NonSvgPenAndPaper-CfTb5Sfu.js} +3 -3
- package/dist/{PackageVersion-B6IEJQ5U.js → PackageVersion-D4g_IquI.js} +1 -1
- package/dist/{PenAndPaper-NY4eJxOT.js → PenAndPaper-faw-s7Iq.js} +3 -3
- package/dist/{Shape-BJqALJx8.js → Shape-DkzPeTe-.js} +1 -1
- package/dist/{Slicer-Dpw8jgzq.js → Slicer-CuuGle3L.js} +2 -2
- package/dist/{SlicerPreview-CmCzvLqB.js → SlicerPreview-YFFNdBJ2.js} +2 -2
- package/dist/{SparkTooltip-0RaBXTYZ.js → SparkTooltip-BYr36r63.js} +1 -1
- package/dist/{Title-CPGrE3wX.js → Title-BeDyPVX2.js} +1 -1
- package/dist/{Tooltip-CEm9BzOh.js → Tooltip-CIAWAT6H.js} +1 -1
- package/dist/{UserOptions-zrLwMf40.js → UserOptions-DwAVLo4U.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{dom-to-png-D6oiYaax.js → dom-to-png-CcSQTrWW.js} +1 -1
- package/dist/{img-B3Q1YZJp.js → img-atDFcrvY.js} +1 -1
- package/dist/{labelUtils-BhtETZBR.js → labelUtils-BLs1JiJ2.js} +1 -1
- package/dist/{lib-swBj76n5.js → lib-BLeQNY56.js} +3 -3
- package/dist/{pdf-C4seG1qk.js → pdf-CGjQTspF.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +8 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-Bb2gcOS8.js → useAutoSizeLabelsInsideViewbox-BKJ0MI0P.js} +1 -1
- package/dist/{useNestedProp-C4DkSVBD.js → useNestedProp-VrHe63vz.js} +73 -65
- package/dist/{usePrinter-QiKp5Ju-.js → usePrinter-2GkN2e42.js} +2 -2
- package/dist/{vue-data-ui-BDNyFPFq.js → vue-data-ui-DkeOB9mM.js} +68 -68
- package/dist/vue-data-ui.js +73 -73
- package/dist/{vue-ui-3d-bar-DUzNF952.js → vue-ui-3d-bar-C0TcvC9o.js} +6 -6
- package/dist/{vue-ui-accordion-BThBDDTd.js → vue-ui-accordion-usMGjw6s.js} +3 -3
- package/dist/{vue-ui-age-pyramid-r-KmE7L4.js → vue-ui-age-pyramid-C8_yYbNZ.js} +6 -6
- package/dist/{vue-ui-annotator-DDQwL0bi.js → vue-ui-annotator-BCQCra1E.js} +7 -7
- package/dist/{vue-ui-bullet-DAVzj8Zi.js → vue-ui-bullet-DJ6vIjdU.js} +7 -7
- package/dist/{vue-ui-bump-B9E1erCP.js → vue-ui-bump-XbrL_bBd.js} +6 -6
- package/dist/{vue-ui-candlestick-CPxzel3w.js → vue-ui-candlestick-C833ORoI.js} +7 -7
- package/dist/{vue-ui-carousel-table-GDTvdXbd.js → vue-ui-carousel-table-BALTo2Z7.js} +4 -4
- package/dist/{vue-ui-chestnut-iD_E54CN.js → vue-ui-chestnut-DGbH1-Ga.js} +5 -5
- package/dist/{vue-ui-chord-BC4tguYt.js → vue-ui-chord-DB6y88Sg.js} +8 -8
- package/dist/{vue-ui-circle-pack-B-CPGgdt.js → vue-ui-circle-pack-YawRN0q8.js} +6 -6
- package/dist/{vue-ui-cursor-IT1xvbk2.js → vue-ui-cursor-LMMcULMs.js} +3 -3
- package/dist/{vue-ui-dag-DCdotQVD.js → vue-ui-dag-BNZGhTGM.js} +7 -7
- package/dist/{vue-ui-dashboard-Cq-7-wma.js → vue-ui-dashboard-BL8Uh0Qy.js} +69 -69
- package/dist/{vue-ui-digits-dKBfRE21.js → vue-ui-digits-Bm7Gi-y7.js} +2 -2
- package/dist/{vue-ui-donut-DZEkSIQ1.js → vue-ui-donut-BMmxBiNv.js} +10 -10
- package/dist/{vue-ui-donut-evolution-CcrcrKF2.js → vue-ui-donut-evolution-l8LHismR.js} +9 -9
- package/dist/{vue-ui-dumbbell-D6rsNu3I.js → vue-ui-dumbbell-Fa9k4qOC.js} +7 -7
- package/dist/{vue-ui-flow-CfEK1WcS.js → vue-ui-flow-CVqmmkWX.js} +7 -7
- package/dist/{vue-ui-funnel-Cdh7YjHo.js → vue-ui-funnel-BOJaYUeH.js} +6 -6
- package/dist/{vue-ui-galaxy-BV20Wouf.js → vue-ui-galaxy-GqCJprpj.js} +9 -9
- package/dist/{vue-ui-gauge-CmV6TYbP.js → vue-ui-gauge-DHvhoWf2.js} +7 -7
- package/dist/{vue-ui-geo-Cx8Kl369.js → vue-ui-geo-B3bUuv05.js} +7 -7
- package/dist/{vue-ui-gizmo-DjW_Zk-I.js → vue-ui-gizmo-D00rKRGe.js} +3 -3
- package/dist/{vue-ui-heatmap-CmYavjF_.js → vue-ui-heatmap-qX84lW7F.js} +7 -7
- package/dist/{vue-ui-history-plot-B6RR5_Pr.js → vue-ui-history-plot-DhhNYSSG.js} +8 -8
- package/dist/{vue-ui-horizontal-bar-YurxCHIZ.js → vue-ui-horizontal-bar-DosR6PqD.js} +10 -10
- package/dist/{vue-ui-kpi-FS4ErjR6.js → vue-ui-kpi-BEQcRj0e.js} +3 -3
- package/dist/{vue-ui-mini-loader-BJF-5BUy.js → vue-ui-mini-loader-D8JsHpPb.js} +2 -2
- package/dist/{vue-ui-molecule-USv-Zjga.js → vue-ui-molecule-1HPy1EzW.js} +5 -5
- package/dist/{vue-ui-mood-radar-CH7gUd3S.js → vue-ui-mood-radar-BmbH778F.js} +7 -7
- package/dist/{vue-ui-nested-donuts-FJhK_VCm.js → vue-ui-nested-donuts-D_JqvcIN.js} +9 -9
- package/dist/{vue-ui-onion-BkB7pI6J.js → vue-ui-onion-DrzdWiyM.js} +10 -10
- package/dist/{vue-ui-parallel-coordinate-plot-BcKuTS5G.js → vue-ui-parallel-coordinate-plot-B_QUbkNH.js} +9 -9
- package/dist/{vue-ui-quadrant-Fa0Ql-oe.js → vue-ui-quadrant-unMxfMdL.js} +9 -9
- package/dist/{vue-ui-quick-chart-BoZswYC4.js → vue-ui-quick-chart-CVYTqhqB.js} +7 -7
- package/dist/{vue-ui-radar-BVQtbLQl.js → vue-ui-radar-BmWRXE90.js} +9 -9
- package/dist/{vue-ui-rating-C_53Yh-e.js → vue-ui-rating-BSJ9y_nW.js} +2 -2
- package/dist/{vue-ui-relation-circle-BKCKaCiY.js → vue-ui-relation-circle-EBQ2E0PS.js} +7 -7
- package/dist/{vue-ui-ridgeline-DGVeoRL_.js → vue-ui-ridgeline-DWmoCq84.js} +9 -9
- package/dist/{vue-ui-rings-CzohTeZg.js → vue-ui-rings-DKJTb5E2.js} +10 -10
- package/dist/{vue-ui-scatter-Be9GWl3l.js → vue-ui-scatter-vmbmfTpn.js} +9 -9
- package/dist/{vue-ui-skeleton-smOfSmjU.js → vue-ui-skeleton-ByLmde-M.js} +3 -3
- package/dist/{vue-ui-smiley-BfleoYld.js → vue-ui-smiley-CP9iisPH.js} +2 -2
- package/dist/{vue-ui-spark-trend-_3ELEmlz.js → vue-ui-spark-trend-BdbKTdDf.js} +3 -3
- package/dist/{vue-ui-sparkbar-COFbNvl8.js → vue-ui-sparkbar-YHQ4p8kR.js} +3 -3
- package/dist/{vue-ui-sparkgauge-BVj5aBtN.js → vue-ui-sparkgauge-Dj8V5lP-.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-BpIUtNbm.js → vue-ui-sparkhistogram-CayH9KXh.js} +4 -4
- package/dist/vue-ui-sparkline-fH5RHCuU.js +1285 -0
- package/dist/{vue-ui-sparkstackbar-Di1Z6CpX.js → vue-ui-sparkstackbar-BRrXZ3HD.js} +4 -4
- package/dist/{vue-ui-stackbar-DfpvPPd1.js → vue-ui-stackbar-Cr4rjhgI.js} +10 -10
- package/dist/{vue-ui-stackline-pnbcfPu2.js → vue-ui-stackline-BMWGoqHH.js} +10 -10
- package/dist/{vue-ui-strip-plot-CO47pgaw.js → vue-ui-strip-plot-BT9wTw3K.js} +7 -7
- package/dist/{vue-ui-table-DuVmmM6H.js → vue-ui-table-CDSrL5c3.js} +5 -5
- package/dist/{vue-ui-table-heatmap-DbXrKnjX.js → vue-ui-table-heatmap-ZwN9ddMi.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CuJ7Zsve.js → vue-ui-table-sparkline-C-Z-j9eE.js} +4 -4
- package/dist/{vue-ui-thermometer-BRcNwZEw.js → vue-ui-thermometer-Bj3Ohkoi.js} +7 -7
- package/dist/{vue-ui-timer-D7msujhO.js → vue-ui-timer-BIbxNB8x.js} +5 -5
- package/dist/{vue-ui-tiremarks-hx9IfotL.js → vue-ui-tiremarks-C9YPABM6.js} +6 -6
- package/dist/{vue-ui-treemap-DWMchmZj.js → vue-ui-treemap-DLteVJzt.js} +9 -9
- package/dist/{vue-ui-waffle-MXpJ2_j4.js → vue-ui-waffle-DKX02YVy.js} +10 -10
- package/dist/{vue-ui-wheel-rw2QWGiJ.js → vue-ui-wheel-DAQnwoZW.js} +6 -6
- package/dist/{vue-ui-word-cloud-COBNp3Nn.js → vue-ui-word-cloud-3dO7FOUK.js} +7 -7
- package/dist/{vue-ui-world-D3B9gr4m.js → vue-ui-world-PReATjuv.js} +7 -7
- package/dist/{vue-ui-xy-CnJ3_k9V.js → vue-ui-xy-Bpoi_CZC.js} +10 -10
- package/dist/{vue-ui-xy-canvas-By2yRWCx.js → vue-ui-xy-canvas-BlY9IPhZ.js} +11 -11
- package/package.json +4 -3
- package/dist/vue-ui-sparkline-CgYlQI65.js +0 -856
|
@@ -0,0 +1,1285 @@
|
|
|
1
|
+
import { ref as S, onMounted as He, onBeforeUnmount as Be, computed as b, watch as G, nextTick as K, createElementBlock as A, createCommentVNode as N, openBlock as g, Fragment as Le, renderList as Fe, createElementVNode as M, defineAsyncComponent as rt, toRefs as Bt, shallowRef as ut, watchEffect as Rt, normalizeStyle as ae, renderSlot as pe, createBlock as Ne, normalizeProps as st, guardReactiveProps as it, toDisplayString as _e, unref as p, createVNode as Dt, withCtx as zt, createTextVNode as Ot } from "vue";
|
|
2
|
+
import { c as qt, t as ct, aB as qe, o as dt, g as vt, l as Vt, h as Te, n as Wt, ap as Gt, A as Ve, C as ht, X as jt, s as Ie, Q as ft, a as We, d as Ge, aC as Yt } from "./lib-BLeQNY56.js";
|
|
3
|
+
import { t as Xt, u as Ut } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Kt, a as je } from "./useNestedProp-VrHe63vz.js";
|
|
5
|
+
import { u as Ht, B as Zt } from "./BaseScanner-BMpwQAfz.js";
|
|
6
|
+
import { u as Jt } from "./useThemeCheck-D1ZYXUwG.js";
|
|
7
|
+
import { u as Qt } from "./useTimeLabels-C-A2uZKi.js";
|
|
8
|
+
import { u as ea } from "./useChartAccessibility-9icAAmYg.js";
|
|
9
|
+
import { _ as ta } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
+
function aa() {
|
|
11
|
+
const e = S(!1);
|
|
12
|
+
return He(() => {
|
|
13
|
+
const t = window.matchMedia("(prefers-reduced-motion: reduce)"), l = () => {
|
|
14
|
+
e.value = t.matches;
|
|
15
|
+
};
|
|
16
|
+
l(), t.addEventListener("change", l), Be(() => {
|
|
17
|
+
t.removeEventListener("change", l);
|
|
18
|
+
});
|
|
19
|
+
}), e;
|
|
20
|
+
}
|
|
21
|
+
const kt = { style: { line: { color: "#2A2929" }, area: { color: "#65698E" }, bar: { color: "#2A2929" } } }, At = { style: { backgroundColor: "#1A1A1A", zeroLine: { color: "#5A5A5A" }, line: { color: "#65698E" }, area: { color: "#8D99AE" }, bar: { color: "#65698E" }, plot: { stroke: "#1A1A1A" }, verticalIndicator: { color: "#8A8A8A" }, dataLabel: { color: "#CCCCCC" }, title: { color: "#CCCCCC" }, tooltip: { backgroundColor: "#1A1A1A", backgroundOpacity: 70, color: "#CCCCCC", borderColor: "#3A3A3A" } } }, wt = { style: { backgroundColor: "#1A1A1A", zeroLine: { color: "#5A5A5A" }, plot: { stroke: "#1A1A1A" }, verticalIndicator: { color: "#8A8A8A" }, dataLabel: { color: "#CCCCCC" }, title: { color: "#CCCCCC" }, tooltip: { color: "#CCCCCC", backgroundColor: "#1A1A1A", borderColor: "#5A5A5A", backgroundOpacity: 70 } } }, Ct = { style: { backgroundColor: "#FFF8E1", line: { color: "#D32F2F" }, bar: { color: "#D32F2F", borderRadius: 0 }, zeroLine: { color: "#5D4037" }, plot: { stroke: "#FFF8E1" }, verticalIndicator: { color: "#FF9800" }, dataLabel: { color: "#424242" }, title: { color: "#424242" }, area: { color: "#E64A19" }, tooltip: { backgroundColor: "#FFECB3", backgroundOpacity: 30, color: "#424242", borderColor: "#FF8A65" } } }, xt = { style: { backgroundColor: "#1E1E1E", line: { color: "#D32F2F" }, bar: { color: "#D32F2F", borderRadius: 0 }, zeroLine: { color: "#5D4037" }, plot: { stroke: "#1E1E1E" }, verticalIndicator: { color: "#B71C1C" }, dataLabel: { color: "#BDBDBD" }, title: { color: "#BDBDBD" }, area: { color: "#E64A19" }, tooltip: { backgroundColor: "#1E1E1E", backgroundOpacity: 30, color: "#FFF8E1", borderColor: "#FF8A65" } } }, Lt = { style: { backgroundColor: "#1A1A1A", line: { color: "#66CC66" }, bar: { color: "#66CC66", borderRadius: 0 }, zeroLine: { color: "#5F6A5F" }, plot: { stroke: "#1A1A1A" }, verticalIndicator: { color: "#66CC66" }, dataLabel: { color: "#AACCAA" }, title: { color: "#66CC66" }, area: { color: "#66CC66" }, tooltip: { backgroundColor: "#2A2F2A", color: "#AACCAA", borderColor: "#66CC66" } } }, Mt = { style: { backgroundColor: "#fbfafa", line: { color: "#B9B99D", smooth: !0 }, bar: { color: "#B9B99D", borderRadius: 3 }, zeroLine: { strokeWidth: 0 }, plot: { stroke: "#fbfafa" }, verticalIndicator: { color: "#B9B99D" }, dataLabel: { color: "#A0AC94" }, title: { color: "#8A9892" }, area: { color: "#B9B99D" }, tooltip: { backgroundColor: "#fbfafa", color: "#8A9892" } } }, St = { style: { backgroundColor: "#f6f6fb", line: { color: "#4A6A75" }, bar: { color: "#4A6A75", borderRadius: 0 }, zeroLine: { color: "#9FA9BE" }, plot: { stroke: "#f6f6fb" }, verticalIndicator: { color: "#4A6A75" }, dataLabel: { color: "#61747E" }, title: { color: "#50606C" }, area: { color: "#4A6A75" }, tooltip: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, $t = {
|
|
22
|
+
default: {},
|
|
23
|
+
minimal: kt,
|
|
24
|
+
minimalDark: At,
|
|
25
|
+
dark: wt,
|
|
26
|
+
celebration: Ct,
|
|
27
|
+
celebrationNight: xt,
|
|
28
|
+
hack: Lt,
|
|
29
|
+
zen: Mt,
|
|
30
|
+
concrete: St
|
|
31
|
+
}, fl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
32
|
+
__proto__: null,
|
|
33
|
+
celebration: Ct,
|
|
34
|
+
celebrationNight: xt,
|
|
35
|
+
concrete: St,
|
|
36
|
+
dark: wt,
|
|
37
|
+
default: $t,
|
|
38
|
+
hack: Lt,
|
|
39
|
+
minimal: kt,
|
|
40
|
+
minimalDark: At,
|
|
41
|
+
zen: Mt
|
|
42
|
+
}, Symbol.toStringTag, { value: "Module" })), la = {
|
|
43
|
+
key: 0,
|
|
44
|
+
style: { "pointer-events": "none" }
|
|
45
|
+
}, na = ["r", "fill", "filter"], oa = ["begin", "dur", "repeatCount", "fill", "calcMode", "keySplines", "keyTimes", "keyPoints"], ra = ["href"], ua = ["dur", "repeatCount", "fill", "values"], sa = ["r", "fill"], ia = ["begin", "dur", "repeatCount", "calcMode", "keySplines", "keyTimes", "keyPoints"], ca = ["href"], da = ["dur", "repeatCount"], va = {
|
|
46
|
+
__name: "SparklinePulse",
|
|
47
|
+
props: {
|
|
48
|
+
uid: { type: String, required: !0 },
|
|
49
|
+
svgRef: { type: Object, default: null },
|
|
50
|
+
pulsePathId: { type: String, required: !0 },
|
|
51
|
+
pulsePathLength: { type: Number, required: !0 },
|
|
52
|
+
pulseDur: { type: String, required: !0 },
|
|
53
|
+
pulseBegin: { type: String, required: !0 },
|
|
54
|
+
pulseRepeatCount: { type: String, required: !0 },
|
|
55
|
+
pulseFillMode: { type: String, default: void 0 },
|
|
56
|
+
pulseKeyPoints: { type: String, required: !0 },
|
|
57
|
+
pulseMotion: { type: Object, required: !0 },
|
|
58
|
+
pulse: { type: Object, required: !0 },
|
|
59
|
+
pulseTrail: { type: Object, required: !0 },
|
|
60
|
+
pulseTrailLength: { type: Number, required: !0 },
|
|
61
|
+
prefersReducedMotion: { type: Boolean, required: !0 },
|
|
62
|
+
loading: { type: Boolean, required: !0 },
|
|
63
|
+
isBar: { type: Boolean, required: !0 }
|
|
64
|
+
},
|
|
65
|
+
setup(e) {
|
|
66
|
+
const t = e, l = b(() => Math.min(t.pulseTrailLength, 45)), u = b(() => !!t.pulse?.show && !t.isBar && !t.prefersReducedMotion && !t.loading && Number(t.pulsePathLength) > 0);
|
|
67
|
+
function o() {
|
|
68
|
+
const i = t.svgRef?.value;
|
|
69
|
+
i && (typeof i.pauseAnimations == "function" && i.pauseAnimations(), typeof i.setCurrentTime == "function" && i.setCurrentTime(0), typeof i.unpauseAnimations == "function" && i.unpauseAnimations());
|
|
70
|
+
}
|
|
71
|
+
function c(i, w) {
|
|
72
|
+
if (typeof i != "string") return i;
|
|
73
|
+
const h = i.trim().match(/^([\d.]+)\s*(ms|s)$/);
|
|
74
|
+
if (!h) return i;
|
|
75
|
+
const y = Number(h[1]), $ = h[2];
|
|
76
|
+
return Number.isNaN(y) ? i : `${y + w}${$}`;
|
|
77
|
+
}
|
|
78
|
+
function d(i) {
|
|
79
|
+
return (l.value - i) / l.value * t.pulse.radius;
|
|
80
|
+
}
|
|
81
|
+
function f(i) {
|
|
82
|
+
const w = t.pulse.trail.opacity, h = (l.value - i) / l.value, y = i === 0 ? 1 : h * w;
|
|
83
|
+
return `0;${y};${y};0`;
|
|
84
|
+
}
|
|
85
|
+
return G(
|
|
86
|
+
() => t.loading,
|
|
87
|
+
async (i) => {
|
|
88
|
+
if (i) {
|
|
89
|
+
o();
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
await K(), o();
|
|
93
|
+
}
|
|
94
|
+
), G(
|
|
95
|
+
() => t.pulsePathId,
|
|
96
|
+
async () => {
|
|
97
|
+
await K(), o();
|
|
98
|
+
}
|
|
99
|
+
), Be(() => {
|
|
100
|
+
o();
|
|
101
|
+
}), (i, w) => u.value ? (g(), A("g", la, [
|
|
102
|
+
(g(!0), A(Le, null, Fe(l.value, (h, y) => (g(), A(Le, null, [
|
|
103
|
+
y % 3 === 0 ? (g(), A("circle", {
|
|
104
|
+
key: `sparkline_dot_${y}_${e.pulsePathId}`,
|
|
105
|
+
r: d(y),
|
|
106
|
+
fill: e.pulse.color,
|
|
107
|
+
filter: `url(#sparkline_pulse_glow_${e.uid})`,
|
|
108
|
+
opacity: "0"
|
|
109
|
+
}, [
|
|
110
|
+
M("animateMotion", {
|
|
111
|
+
begin: c(e.pulseBegin, y * 10),
|
|
112
|
+
dur: e.pulseDur,
|
|
113
|
+
repeatCount: e.pulseRepeatCount,
|
|
114
|
+
fill: e.pulseFillMode,
|
|
115
|
+
calcMode: e.pulseMotion.calcMode,
|
|
116
|
+
keySplines: e.pulseMotion.keySplines || void 0,
|
|
117
|
+
keyTimes: e.pulseMotion.keyTimes || void 0,
|
|
118
|
+
keyPoints: e.pulseKeyPoints,
|
|
119
|
+
rotate: "auto"
|
|
120
|
+
}, [
|
|
121
|
+
M("mpath", {
|
|
122
|
+
href: `#${e.pulsePathId}`
|
|
123
|
+
}, null, 8, ra)
|
|
124
|
+
], 8, oa),
|
|
125
|
+
M("animate", {
|
|
126
|
+
attributeName: "opacity",
|
|
127
|
+
dur: e.pulseDur,
|
|
128
|
+
repeatCount: e.pulseRepeatCount,
|
|
129
|
+
fill: e.pulseFillMode,
|
|
130
|
+
values: f(y),
|
|
131
|
+
keyTimes: "0;0.1;0.9;1"
|
|
132
|
+
}, null, 8, ua)
|
|
133
|
+
], 8, na)) : N("", !0)
|
|
134
|
+
], 64))), 256)),
|
|
135
|
+
(g(), A("circle", {
|
|
136
|
+
key: `sparkline_halo_${e.pulsePathId}`,
|
|
137
|
+
r: Math.max(e.pulse.radius * 1.3),
|
|
138
|
+
fill: e.pulse.color,
|
|
139
|
+
opacity: "0"
|
|
140
|
+
}, [
|
|
141
|
+
M("animateMotion", {
|
|
142
|
+
begin: e.pulseBegin,
|
|
143
|
+
dur: e.pulseDur,
|
|
144
|
+
repeatCount: e.pulseRepeatCount,
|
|
145
|
+
calcMode: e.pulseMotion.calcMode,
|
|
146
|
+
keySplines: e.pulseMotion.keySplines || void 0,
|
|
147
|
+
keyTimes: e.pulseMotion.keyTimes || void 0,
|
|
148
|
+
keyPoints: e.pulseKeyPoints,
|
|
149
|
+
rotate: "auto"
|
|
150
|
+
}, [
|
|
151
|
+
M("mpath", {
|
|
152
|
+
href: `#${e.pulsePathId}`
|
|
153
|
+
}, null, 8, ca)
|
|
154
|
+
], 8, ia),
|
|
155
|
+
M("animate", {
|
|
156
|
+
attributeName: "opacity",
|
|
157
|
+
values: "0;0.35;0.35;0",
|
|
158
|
+
keyTimes: "0;0.15;0.85;1",
|
|
159
|
+
dur: e.pulseDur,
|
|
160
|
+
repeatCount: e.pulseRepeatCount
|
|
161
|
+
}, null, 8, da)
|
|
162
|
+
], 8, sa))
|
|
163
|
+
])) : N("", !0);
|
|
164
|
+
}
|
|
165
|
+
}, Ee = {
|
|
166
|
+
canvas: null,
|
|
167
|
+
ctx: null
|
|
168
|
+
};
|
|
169
|
+
function ha() {
|
|
170
|
+
if (typeof document > "u")
|
|
171
|
+
throw new Error("color-utils: document is not available (browser-only).");
|
|
172
|
+
if (!Ee.canvas) {
|
|
173
|
+
const e = document.createElement("canvas");
|
|
174
|
+
e.width = 1, e.height = 1;
|
|
175
|
+
const t = e.getContext("2d", { willReadFrequently: !0 });
|
|
176
|
+
if (!t)
|
|
177
|
+
throw new Error("color-utils: unable to get 2D canvas context.");
|
|
178
|
+
Ee.canvas = e, Ee.ctx = t;
|
|
179
|
+
}
|
|
180
|
+
return Ee.ctx;
|
|
181
|
+
}
|
|
182
|
+
function fa(e) {
|
|
183
|
+
return e < 0 ? 0 : e > 255 ? 255 : Math.round(e);
|
|
184
|
+
}
|
|
185
|
+
function Je(e) {
|
|
186
|
+
return e < 0 ? 0 : e > 1 ? 1 : e;
|
|
187
|
+
}
|
|
188
|
+
function pa(e, t = null) {
|
|
189
|
+
if (typeof e != "string" || e.trim().length === 0)
|
|
190
|
+
throw new Error("colorToRgba: inputColor must be a non-empty string.");
|
|
191
|
+
const l = e.trim();
|
|
192
|
+
if (l.toLowerCase() === "transparent")
|
|
193
|
+
return { red: 0, green: 0, blue: 0, alpha: 0 };
|
|
194
|
+
const u = ga(l, t), o = ha();
|
|
195
|
+
o.clearRect(0, 0, 1, 1), o.fillStyle = "#000";
|
|
196
|
+
const c = o.fillStyle;
|
|
197
|
+
if (o.fillStyle = u, o.fillStyle === c && !ya(u))
|
|
198
|
+
throw new Error(`colorToRgba: unsupported or invalid color "${e}".`);
|
|
199
|
+
o.fillRect(0, 0, 1, 1);
|
|
200
|
+
const f = o.getImageData(0, 0, 1, 1).data;
|
|
201
|
+
return {
|
|
202
|
+
red: f[0],
|
|
203
|
+
green: f[1],
|
|
204
|
+
blue: f[2],
|
|
205
|
+
alpha: f[3] / 255
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
function pt(e, t = null) {
|
|
209
|
+
if (!Array.isArray(e) || e.length === 0)
|
|
210
|
+
throw new Error("colorsToRgba: colors must be a non-empty array.");
|
|
211
|
+
const l = new Array(e.length);
|
|
212
|
+
for (let u = 0; u < e.length; u += 1)
|
|
213
|
+
l[u] = pa(e[u], t);
|
|
214
|
+
return l;
|
|
215
|
+
}
|
|
216
|
+
function ga(e, t = null) {
|
|
217
|
+
return e !== "currentColor" || typeof window > "u" || !t ? e : window.getComputedStyle(t).color || e;
|
|
218
|
+
}
|
|
219
|
+
function ya(e) {
|
|
220
|
+
const t = e.trim().toLowerCase();
|
|
221
|
+
return t === "black" || t === "#000" || t === "#000000" || t === "rgb(0, 0, 0)" || t === "rgba(0, 0, 0, 1)" || t === "rgba(0, 0, 0, 0)";
|
|
222
|
+
}
|
|
223
|
+
function ge(e) {
|
|
224
|
+
const t = Je(e / 255);
|
|
225
|
+
return t <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
|
|
226
|
+
}
|
|
227
|
+
function Ye(e) {
|
|
228
|
+
const t = Je(e);
|
|
229
|
+
let l;
|
|
230
|
+
return t <= 31308e-7 ? l = t * 12.92 : l = 1.055 * Math.pow(t, 1 / 2.4) - 0.055, fa(l * 255);
|
|
231
|
+
}
|
|
232
|
+
function gt(e, t, l, u) {
|
|
233
|
+
const o = Je(l);
|
|
234
|
+
if (u === "linearRGB") {
|
|
235
|
+
const c = ge(e.red), d = ge(e.green), f = ge(e.blue), i = ge(t.red), w = ge(t.green), h = ge(t.blue), y = c + (i - c) * o, $ = d + (w - d) * o, _ = f + (h - f) * o;
|
|
236
|
+
return {
|
|
237
|
+
red: Ye(y),
|
|
238
|
+
green: Ye($),
|
|
239
|
+
blue: Ye(_),
|
|
240
|
+
alpha: e.alpha + (t.alpha - e.alpha) * o
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
return {
|
|
244
|
+
red: e.red + (t.red - e.red) * o,
|
|
245
|
+
green: e.green + (t.green - e.green) * o,
|
|
246
|
+
blue: e.blue + (t.blue - e.blue) * o,
|
|
247
|
+
alpha: e.alpha + (t.alpha - e.alpha) * o
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
function q(e, t, l) {
|
|
251
|
+
let u = e;
|
|
252
|
+
return u < t && (u = t), u > l && (u = l), u;
|
|
253
|
+
}
|
|
254
|
+
function H(e, t) {
|
|
255
|
+
const l = Math.pow(10, t);
|
|
256
|
+
return Math.round(e * l) / l;
|
|
257
|
+
}
|
|
258
|
+
function le(e) {
|
|
259
|
+
return Number.isFinite(e) ? e.toString() : "0";
|
|
260
|
+
}
|
|
261
|
+
function Xe(e) {
|
|
262
|
+
const l = q(e, 0, 255).toString(16);
|
|
263
|
+
return l.length === 1 ? "0" + l : l;
|
|
264
|
+
}
|
|
265
|
+
function ma(e) {
|
|
266
|
+
if (typeof e != "string") return;
|
|
267
|
+
const t = Number.parseFloat(e);
|
|
268
|
+
return Number.isFinite(t) ? t : void 0;
|
|
269
|
+
}
|
|
270
|
+
function ba(e, t, l, u = !0) {
|
|
271
|
+
const o = l - t;
|
|
272
|
+
if (o === 0) return 0;
|
|
273
|
+
const c = (e - t) / o;
|
|
274
|
+
return u ? q(c, 0, 1) : c;
|
|
275
|
+
}
|
|
276
|
+
const yt = "http://www.w3.org/2000/svg";
|
|
277
|
+
function ka(e) {
|
|
278
|
+
if (typeof document > "u")
|
|
279
|
+
throw new Error("SvgPathGradientAsync: document is not available (browser-only implementation).");
|
|
280
|
+
const t = document.createElementNS(yt, "svg");
|
|
281
|
+
t.setAttribute("width", "0"), t.setAttribute("height", "0"), t.setAttribute("viewBox", "0 0 0 0"), t.style.position = "absolute", t.style.left = "-10000px", t.style.top = "-10000px", t.style.visibility = "hidden", t.style.pointerEvents = "none";
|
|
282
|
+
const l = document.createElementNS(yt, "path");
|
|
283
|
+
return e === "M " && (e = "M 0,0"), l.setAttribute("d", e), t.appendChild(l), document.body.appendChild(t), { svgElement: t, pathElement: l };
|
|
284
|
+
}
|
|
285
|
+
function Ue(e) {
|
|
286
|
+
if (e)
|
|
287
|
+
try {
|
|
288
|
+
e.svgElement?.remove?.();
|
|
289
|
+
} catch {
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
function Aa(e, t, l) {
|
|
293
|
+
if (typeof l == "number" && l > 0)
|
|
294
|
+
return l;
|
|
295
|
+
let u = t * 0.75;
|
|
296
|
+
u < 0.5 && (u = 0.5), u > 8 && (u = 8);
|
|
297
|
+
const o = e / 2;
|
|
298
|
+
return u > o && o > 0 && (u = o), u <= 0 && (u = 1), u;
|
|
299
|
+
}
|
|
300
|
+
function wa(e, t, l) {
|
|
301
|
+
if (typeof t == "number" && t >= 1)
|
|
302
|
+
return Math.floor(t);
|
|
303
|
+
const u = typeof l == "number" && l > 0 ? l : 2, o = Math.ceil(e / u);
|
|
304
|
+
return o < 1 ? 1 : o;
|
|
305
|
+
}
|
|
306
|
+
function Ca(e, t, l, u, o, c) {
|
|
307
|
+
const d = l - t;
|
|
308
|
+
let f = Math.ceil(d / u) + 1;
|
|
309
|
+
f < 2 && (f = 2), f > c && (f = c);
|
|
310
|
+
const i = f > 1 ? d / (f - 1) : 0, w = e.getPointAtLength(t);
|
|
311
|
+
let h = `M ${le(H(w.x, o))} ${le(
|
|
312
|
+
H(w.y, o)
|
|
313
|
+
)}`;
|
|
314
|
+
for (let y = 1; y < f; y += 1) {
|
|
315
|
+
const $ = t + y * i, _ = e.getPointAtLength($);
|
|
316
|
+
h += ` L ${le(H(_.x, o))} ${le(
|
|
317
|
+
H(_.y, o)
|
|
318
|
+
)}`;
|
|
319
|
+
}
|
|
320
|
+
return h;
|
|
321
|
+
}
|
|
322
|
+
function xa(e, t, l, u, o, c) {
|
|
323
|
+
const d = l - t;
|
|
324
|
+
let f = Math.ceil(d / u) + 1;
|
|
325
|
+
f < 2 && (f = 2), f > c && (f = c);
|
|
326
|
+
const i = f > 1 ? d / (f - 1) : 0, w = e.getPointAtLength(t);
|
|
327
|
+
let h = w.x, y = w.x, $ = w.y, _ = w.y, a = `M ${le(H(w.x, o))} ${le(
|
|
328
|
+
H(w.y, o)
|
|
329
|
+
)}`;
|
|
330
|
+
for (let z = 1; z < f; z += 1) {
|
|
331
|
+
const ne = t + z * i, k = e.getPointAtLength(ne);
|
|
332
|
+
k.x < h && (h = k.x), k.x > y && (y = k.x), k.y < $ && ($ = k.y), k.y > _ && (_ = k.y), a += ` L ${le(H(k.x, o))} ${le(
|
|
333
|
+
H(k.y, o)
|
|
334
|
+
)}`;
|
|
335
|
+
}
|
|
336
|
+
return {
|
|
337
|
+
pathData: a,
|
|
338
|
+
bounds: { minX: h, maxX: y, minY: $, maxY: _ }
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
function La(e) {
|
|
342
|
+
if (e.length === 1) return [{ position: 0, rgba: e[0] }];
|
|
343
|
+
const t = new Array(e.length), l = e.length - 1;
|
|
344
|
+
for (let u = 0; u < e.length; u += 1)
|
|
345
|
+
t[u] = { position: u / l, rgba: e[u] };
|
|
346
|
+
return t;
|
|
347
|
+
}
|
|
348
|
+
function Ma(e, t, l, u) {
|
|
349
|
+
const o = q(t, 0, 1);
|
|
350
|
+
let c = u;
|
|
351
|
+
for (c < 0 && (c = 0), c > e.length - 2 && (c = e.length - 2); c > 0 && o < e[c].position; ) c -= 1;
|
|
352
|
+
for (; c < e.length - 2 && o > e[c + 1].position; ) c += 1;
|
|
353
|
+
const d = e[c], f = e[c + 1], i = f.position - d.position, w = i > 0 ? (o - d.position) / i : 0, h = Sa(d.rgba, f.rgba, w, l);
|
|
354
|
+
return Ze(h);
|
|
355
|
+
}
|
|
356
|
+
function Sa(e, t, l, u) {
|
|
357
|
+
const o = q(l, 0, 1);
|
|
358
|
+
if (u === "linearRGB") {
|
|
359
|
+
const c = ye(e.red), d = ye(e.green), f = ye(e.blue), i = ye(t.red), w = ye(t.green), h = ye(t.blue), y = c + (i - c) * o, $ = d + (w - d) * o, _ = f + (h - f) * o;
|
|
360
|
+
return {
|
|
361
|
+
red: Ke(y),
|
|
362
|
+
green: Ke($),
|
|
363
|
+
blue: Ke(_),
|
|
364
|
+
alpha: e.alpha + (t.alpha - e.alpha) * o
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
return {
|
|
368
|
+
red: e.red + (t.red - e.red) * o,
|
|
369
|
+
green: e.green + (t.green - e.green) * o,
|
|
370
|
+
blue: e.blue + (t.blue - e.blue) * o,
|
|
371
|
+
alpha: e.alpha + (t.alpha - e.alpha) * o
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
function ye(e) {
|
|
375
|
+
const t = q(e / 255, 0, 1);
|
|
376
|
+
return t <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
|
|
377
|
+
}
|
|
378
|
+
function Ke(e) {
|
|
379
|
+
const t = q(e, 0, 1);
|
|
380
|
+
let l;
|
|
381
|
+
t <= 31308e-7 ? l = t * 12.92 : l = 1.055 * Math.pow(t, 1 / 2.4) - 0.055;
|
|
382
|
+
const u = Math.round(l * 255);
|
|
383
|
+
return q(u, 0, 255);
|
|
384
|
+
}
|
|
385
|
+
function Ze(e) {
|
|
386
|
+
const t = q(e.alpha, 0, 1), l = q(Math.round(e.red), 0, 255), u = q(Math.round(e.green), 0, 255), o = q(Math.round(e.blue), 0, 255);
|
|
387
|
+
if (t >= 1)
|
|
388
|
+
return `#${Xe(l)}${Xe(u)}${Xe(o)}`;
|
|
389
|
+
const c = H(t, 4).toString();
|
|
390
|
+
return `rgba(${l}, ${u}, ${o}, ${c})`;
|
|
391
|
+
}
|
|
392
|
+
function $a(e) {
|
|
393
|
+
const t = e.fill ?? "none";
|
|
394
|
+
let l = `fill="${Z(t)}"`;
|
|
395
|
+
const u = Object.keys(e);
|
|
396
|
+
for (let o = 0; o < u.length; o += 1) {
|
|
397
|
+
const c = u[o];
|
|
398
|
+
if (c === "stroke" || c === "d") continue;
|
|
399
|
+
const d = e[c];
|
|
400
|
+
l += ` ${c}="${Z(d)}"`;
|
|
401
|
+
}
|
|
402
|
+
return l;
|
|
403
|
+
}
|
|
404
|
+
function mt(e, t, l) {
|
|
405
|
+
return `<path d="${Z(e)}" stroke="${Z(t)}" ${l} />`;
|
|
406
|
+
}
|
|
407
|
+
function Pa(e) {
|
|
408
|
+
const t = [], l = e.segmentAttributeMap.fill ?? "none";
|
|
409
|
+
t.push(`fill="${Z(l)}"`), t.push(`stroke="${Z(e.stroke)}"`);
|
|
410
|
+
for (const u of Object.keys(e.segmentAttributeMap)) {
|
|
411
|
+
if (u === "stroke" || u === "d") continue;
|
|
412
|
+
const o = e.segmentAttributeMap[u];
|
|
413
|
+
t.push(`${u}="${Z(o)}"`);
|
|
414
|
+
}
|
|
415
|
+
return `<path d="${Z(e.pathData)}" ${t.join(" ")} />`;
|
|
416
|
+
}
|
|
417
|
+
function bt(e, t) {
|
|
418
|
+
const l = [];
|
|
419
|
+
for (const o of Object.keys(t))
|
|
420
|
+
l.push(`${o}="${Z(t[o])}"`);
|
|
421
|
+
return `<g data-svg-path-gradient="true"${l.length ? " " + l.join(" ") : ""}>${e.join("")}</g>`;
|
|
422
|
+
}
|
|
423
|
+
function Z(e) {
|
|
424
|
+
return String(e).replaceAll("&", "&").replaceAll('"', """).replaceAll("<", "<").replaceAll(">", ">");
|
|
425
|
+
}
|
|
426
|
+
function Na(e, t = null, l = {}) {
|
|
427
|
+
return new Promise((u, o) => {
|
|
428
|
+
let c = null;
|
|
429
|
+
try {
|
|
430
|
+
if (!e || typeof e != "string")
|
|
431
|
+
throw new Error("SvgPathGradientAsync: pathData must be a non-empty string.");
|
|
432
|
+
const d = l.temperatureMode ?? null;
|
|
433
|
+
if (d === null && (!Array.isArray(t) || t.length === 0))
|
|
434
|
+
throw new Error("SvgPathGradientAsync: colors must be a non-empty array when temperatureMode is not enabled.");
|
|
435
|
+
if ((l.returnMode ?? "string") !== "string")
|
|
436
|
+
throw new Error('SvgPathGradientAsync: only returnMode="string" is supported for the async version.');
|
|
437
|
+
const i = typeof l.decimalPlaces == "number" ? l.decimalPlaces : 3, w = typeof l.flattenTolerance == "number" && l.flattenTolerance > 0 ? l.flattenTolerance : 0.25, h = l.attrs ? { ...l.attrs } : {}, y = l.groupAttrs ? { ...l.groupAttrs } : {}, $ = ma(h["stroke-width"]), _ = typeof l.strokeWidth == "number" && l.strokeWidth > 0 ? l.strokeWidth : typeof $ == "number" && $ > 0 ? $ : 1;
|
|
438
|
+
c = ka(e);
|
|
439
|
+
const a = c.pathElement, z = a.getTotalLength(), ne = d === null ? pt(t, l.colorReferenceElement) : [];
|
|
440
|
+
if (d === null && (!(z > 0) || ne.length === 1)) {
|
|
441
|
+
const P = Ze(ne[0]), I = bt(
|
|
442
|
+
[
|
|
443
|
+
Pa({
|
|
444
|
+
pathData: e,
|
|
445
|
+
stroke: P,
|
|
446
|
+
segmentAttributeMap: h
|
|
447
|
+
})
|
|
448
|
+
],
|
|
449
|
+
y
|
|
450
|
+
);
|
|
451
|
+
Ue(c), u(I);
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
454
|
+
const k = l.colorSpace ?? "linearRGB";
|
|
455
|
+
if (d !== null) {
|
|
456
|
+
const P = l.temperatureColors;
|
|
457
|
+
if (!Array.isArray(P) || P.length !== 2)
|
|
458
|
+
throw new Error("SvgPathGradientAsync: temperatureColors must be a tuple of exactly 2 colors when temperatureMode is enabled.");
|
|
459
|
+
}
|
|
460
|
+
const J = d !== null ? pt(l.temperatureColors, l.colorReferenceElement) : null, oe = d === null ? (() => {
|
|
461
|
+
const P = La(ne), I = new Array(P.length);
|
|
462
|
+
for (let X = 0; X < P.length; X += 1)
|
|
463
|
+
I[X] = { position: P[X].position, rgba: P[X].rgba };
|
|
464
|
+
return I;
|
|
465
|
+
})() : [], ie = Aa(z, _, l.maxSegmentLength), Q = wa(z, l.segments, ie), T = z / Q;
|
|
466
|
+
let ce = typeof l.overlap == "number" && l.overlap >= 0 ? l.overlap : _ * 0.5;
|
|
467
|
+
const re = T * 0.45;
|
|
468
|
+
ce > re && (ce = re);
|
|
469
|
+
const Me = typeof l.samplePointLimitPerSegment == "number" && l.samplePointLimitPerSegment > 10 ? l.samplePointLimitPerSegment : 250, Se = $a(h), de = [], $e = d !== null ? [] : null, ue = d !== null ? [] : null;
|
|
470
|
+
let ee = 0;
|
|
471
|
+
const me = d === null ? oe.length - 2 : 0;
|
|
472
|
+
let Y = 0;
|
|
473
|
+
const be = () => {
|
|
474
|
+
const P = performance.now(), I = typeof l.frameBudgetMs == "number" ? l.frameBudgetMs : 8;
|
|
475
|
+
for (; Y < Q && performance.now() - P < I; ) {
|
|
476
|
+
const D = Y * T, O = (Y + 1) * T;
|
|
477
|
+
let E = D, F = O;
|
|
478
|
+
if (Y !== 0 && (E = D - ce), Y !== Q - 1 && (F = O + ce), E = q(E, 0, z), F = q(F, 0, z), F > E)
|
|
479
|
+
if (d !== null) {
|
|
480
|
+
const B = xa(
|
|
481
|
+
a,
|
|
482
|
+
E,
|
|
483
|
+
F,
|
|
484
|
+
w,
|
|
485
|
+
i,
|
|
486
|
+
Me
|
|
487
|
+
);
|
|
488
|
+
$e.push(B.pathData), ue.push(B.bounds);
|
|
489
|
+
} else {
|
|
490
|
+
const R = (E + F) * 0.5 / z;
|
|
491
|
+
for (; ee < me && R > oe[ee + 1].position; )
|
|
492
|
+
ee += 1;
|
|
493
|
+
const j = Ma(
|
|
494
|
+
oe,
|
|
495
|
+
R,
|
|
496
|
+
k,
|
|
497
|
+
ee
|
|
498
|
+
), V = Ca(
|
|
499
|
+
a,
|
|
500
|
+
E,
|
|
501
|
+
F,
|
|
502
|
+
w,
|
|
503
|
+
i,
|
|
504
|
+
Me
|
|
505
|
+
);
|
|
506
|
+
de.push(
|
|
507
|
+
mt(V, j, Se)
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
Y += 1;
|
|
511
|
+
}
|
|
512
|
+
if (Y < Q) {
|
|
513
|
+
requestAnimationFrame(be);
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
if (d !== null) {
|
|
517
|
+
let D = Number.POSITIVE_INFINITY, O = Number.NEGATIVE_INFINITY;
|
|
518
|
+
for (let B = 0; B < ue.length; B += 1) {
|
|
519
|
+
const R = ue[B], j = d === "vertical" ? R.minY : R.minX, V = d === "vertical" ? R.maxY : R.maxX;
|
|
520
|
+
j < D && (D = j), V > O && (O = V);
|
|
521
|
+
}
|
|
522
|
+
const E = J[0], F = J[1];
|
|
523
|
+
de.length = 0;
|
|
524
|
+
for (let B = 0; B < ue.length; B += 1) {
|
|
525
|
+
const R = ue[B], j = d === "vertical" ? R.minY : R.minX, V = d === "vertical" ? R.maxY : R.maxX, ke = (j + V) * 0.5, Ae = ba(ke, D, O, !0), se = d === "vertical" ? gt(E, F, Ae, k) : gt(F, E, Ae, k), we = Ze(se), Pe = $e[B];
|
|
526
|
+
de.push(
|
|
527
|
+
mt(Pe, we, Se)
|
|
528
|
+
);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
const X = bt(de, y);
|
|
532
|
+
Ue(c), u(X);
|
|
533
|
+
};
|
|
534
|
+
requestAnimationFrame(be);
|
|
535
|
+
} catch (d) {
|
|
536
|
+
Ue(c), o(d);
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
const _a = ["innerHTML"], Ta = {
|
|
541
|
+
__name: "SparklineGradientPath",
|
|
542
|
+
props: {
|
|
543
|
+
svgPathData: { type: String, required: !0 },
|
|
544
|
+
enabled: { type: Boolean, required: !0 },
|
|
545
|
+
strokeWidth: { type: Number, required: !0 },
|
|
546
|
+
highColor: { type: String, required: !0 },
|
|
547
|
+
lowColor: { type: String, required: !0 },
|
|
548
|
+
segments: { type: Number, required: !0 }
|
|
549
|
+
},
|
|
550
|
+
setup(e) {
|
|
551
|
+
const t = e, l = S("");
|
|
552
|
+
let u = 0;
|
|
553
|
+
return G(
|
|
554
|
+
() => [
|
|
555
|
+
t.enabled,
|
|
556
|
+
t.svgPathData,
|
|
557
|
+
t.strokeWidth,
|
|
558
|
+
t.highColor,
|
|
559
|
+
t.lowColor,
|
|
560
|
+
t.segments
|
|
561
|
+
],
|
|
562
|
+
async ([o]) => {
|
|
563
|
+
const c = ++u;
|
|
564
|
+
if (!o) {
|
|
565
|
+
l.value = "";
|
|
566
|
+
return;
|
|
567
|
+
}
|
|
568
|
+
const d = await Na(t.svgPathData, null, {
|
|
569
|
+
segments: t.segments,
|
|
570
|
+
temperatureMode: "vertical",
|
|
571
|
+
temperatureColors: [t.highColor, t.lowColor],
|
|
572
|
+
attrs: {
|
|
573
|
+
"stroke-width": t.strokeWidth,
|
|
574
|
+
"stroke-linecap": "round",
|
|
575
|
+
"stroke-linejoin": "round"
|
|
576
|
+
},
|
|
577
|
+
groupAttrs: { class: "vue-ui-sparkline-gradient" }
|
|
578
|
+
});
|
|
579
|
+
c === u && (l.value = d);
|
|
580
|
+
},
|
|
581
|
+
{ immediate: !0 }
|
|
582
|
+
), (o, c) => (g(), A("g", { innerHTML: l.value }, null, 8, _a));
|
|
583
|
+
}
|
|
584
|
+
}, Ia = ["id"], Ea = ["xmlns", "viewBox"], Fa = ["width", "height"], Ba = ["id"], Ra = ["stop-color"], Da = ["stop-color"], za = ["id"], Oa = ["stop-color"], qa = ["stop-color"], Va = ["id"], Wa = ["stop-color"], Ga = ["stop-color"], ja = ["id"], Ya = { key: 1 }, Xa = ["d", "fill"], Ua = ["d", "fill"], Ka = ["id", "d", "stroke", "stroke-width"], Ha = ["id", "d", "stroke", "stroke-width"], Za = ["x", "y", "width", "height", "fill", "rx"], Ja = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Qa = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], el = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], tl = ["x", "y", "font-size", "font-weight", "fill"], al = ["x", "y", "height", "width", "onMouseenter", "onMouseleave", "onClick"], ll = {
|
|
585
|
+
__name: "vue-ui-sparkline",
|
|
586
|
+
props: {
|
|
587
|
+
config: {
|
|
588
|
+
type: Object,
|
|
589
|
+
default() {
|
|
590
|
+
return {};
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
dataset: {
|
|
594
|
+
type: Array,
|
|
595
|
+
default() {
|
|
596
|
+
return [];
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
showInfo: {
|
|
600
|
+
type: Boolean,
|
|
601
|
+
default: !0
|
|
602
|
+
},
|
|
603
|
+
selectedIndex: {
|
|
604
|
+
type: Number,
|
|
605
|
+
default: void 0
|
|
606
|
+
},
|
|
607
|
+
heightRatio: {
|
|
608
|
+
type: Number,
|
|
609
|
+
default: 1
|
|
610
|
+
},
|
|
611
|
+
forcedPadding: {
|
|
612
|
+
type: Number,
|
|
613
|
+
default: 30
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
emits: ["hoverIndex", "selectDatapoint"],
|
|
617
|
+
setup(e, { emit: t }) {
|
|
618
|
+
const l = rt(() => import("./PackageVersion-D4g_IquI.js")), u = rt(() => import("./SparkTooltip-BYr36r63.js")), { vue_ui_sparkline: o } = Kt(), { isThemeValid: c, warnInvalidTheme: d } = Jt(), f = aa(), i = e, w = b(() => Array.isArray(i.dataset) && i.dataset.length > 0), h = S(qt()), y = S(null), $ = S(null), _ = S(null), a = S(Q());
|
|
619
|
+
function z(n) {
|
|
620
|
+
return i.config?.skeletonDataset && Array.isArray(i.config.skeletonDataset) ? i.config.skeletonDataset.map((r) => ({ period: "-", value: r })) : Yt(n).map((r) => ({ period: "-", value: r }));
|
|
621
|
+
}
|
|
622
|
+
const ne = b(() => ct({
|
|
623
|
+
defaultConfig: {
|
|
624
|
+
gradientPath: { show: !1 },
|
|
625
|
+
style: {
|
|
626
|
+
backgroundColor: "#99999930",
|
|
627
|
+
scaleMin: 0,
|
|
628
|
+
scaleMax: null,
|
|
629
|
+
animation: { show: !1 },
|
|
630
|
+
line: { color: "#AAAAAA", pulse: { show: !1 } },
|
|
631
|
+
bar: { color: "#AAAAAA" },
|
|
632
|
+
area: { color: "#CACACA" },
|
|
633
|
+
zeroLine: { color: "#6A6A6A" },
|
|
634
|
+
dataLabel: { show: !1 },
|
|
635
|
+
tooltip: { show: !1 }
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
userConfig: a.value.skeletonConfig ?? {}
|
|
639
|
+
})), { loading: k, FINAL_DATASET: J, manualLoading: oe } = Ht({
|
|
640
|
+
...Bt(i),
|
|
641
|
+
FINAL_CONFIG: a,
|
|
642
|
+
prepareConfig: Q,
|
|
643
|
+
callback: () => {
|
|
644
|
+
Promise.resolve().then(async () => {
|
|
645
|
+
await K(), ke();
|
|
646
|
+
});
|
|
647
|
+
},
|
|
648
|
+
skeletonDataset: z(12),
|
|
649
|
+
skeletonConfig: ct({
|
|
650
|
+
defaultConfig: a.value,
|
|
651
|
+
userConfig: ne.value
|
|
652
|
+
})
|
|
653
|
+
}), { svgRef: ie } = ea({ config: a.value.style.title });
|
|
654
|
+
function Q() {
|
|
655
|
+
const n = je({
|
|
656
|
+
userConfig: i.config,
|
|
657
|
+
defaultConfig: o
|
|
658
|
+
});
|
|
659
|
+
let r = {};
|
|
660
|
+
const s = n.theme;
|
|
661
|
+
if (s)
|
|
662
|
+
if (!c.value(n))
|
|
663
|
+
d(n), r = n;
|
|
664
|
+
else {
|
|
665
|
+
const v = je({
|
|
666
|
+
userConfig: $t[s] || i.config,
|
|
667
|
+
defaultConfig: n
|
|
668
|
+
});
|
|
669
|
+
r = {
|
|
670
|
+
...je({
|
|
671
|
+
userConfig: i.config,
|
|
672
|
+
defaultConfig: v
|
|
673
|
+
})
|
|
674
|
+
};
|
|
675
|
+
}
|
|
676
|
+
else
|
|
677
|
+
r = n;
|
|
678
|
+
return r;
|
|
679
|
+
}
|
|
680
|
+
const T = b(() => a.value?.style?.line.pulse || {}), ce = b(() => `${Math.max(200, Number(T.value.durationMs) || 4e3) / 1e3}s`), re = S(0), Me = b(() => T.value?.begin || "0ms"), Se = S("0;1"), de = b(() => T.value?.loop === !1 ? "1" : "indefinite"), $e = b(() => T.value?.loop === !1 ? "freeze" : void 0), ue = b(() => T.value.trail.show && be.value.lengthPx || 1), ee = b(() => !!T.value?.show && !U.value && !f.value && !k.value && (C.value?.length || 0) > 1);
|
|
681
|
+
function me() {
|
|
682
|
+
if (!ee.value) {
|
|
683
|
+
re.value = 0;
|
|
684
|
+
return;
|
|
685
|
+
}
|
|
686
|
+
const n = ie.value;
|
|
687
|
+
if (!n) return;
|
|
688
|
+
const r = `#${se.value}`, s = n.querySelector?.(r);
|
|
689
|
+
if (s && typeof s.getTotalLength == "function") {
|
|
690
|
+
const v = s.getTotalLength();
|
|
691
|
+
Number.isFinite(v) && v > 0 && (re.value = v);
|
|
692
|
+
return;
|
|
693
|
+
}
|
|
694
|
+
requestAnimationFrame(() => {
|
|
695
|
+
const v = n.querySelector?.(r);
|
|
696
|
+
if (v && typeof v.getTotalLength == "function") {
|
|
697
|
+
const W = v.getTotalLength();
|
|
698
|
+
Number.isFinite(W) && W > 0 && (re.value = W);
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
const Y = b(() => {
|
|
703
|
+
const n = T.value?.easing || "ease-in-out", r = {
|
|
704
|
+
ease: [0.25, 0.1, 0.25, 1],
|
|
705
|
+
"ease-in": [0.42, 0, 1, 1],
|
|
706
|
+
"ease-out": [0, 0, 0.58, 1],
|
|
707
|
+
"ease-in-out": [0.42, 0, 0.58, 1]
|
|
708
|
+
};
|
|
709
|
+
return n === "linear" ? {
|
|
710
|
+
calcMode: "linear",
|
|
711
|
+
keySplines: null,
|
|
712
|
+
keyTimes: "0;1"
|
|
713
|
+
} : n === "steps" ? {
|
|
714
|
+
calcMode: "discrete",
|
|
715
|
+
keySplines: null,
|
|
716
|
+
keyTimes: "0;1"
|
|
717
|
+
} : {
|
|
718
|
+
calcMode: "spline",
|
|
719
|
+
keySplines: (n === "cubic-bezier" ? Array.isArray(T.value?.cubicBezier) && T.value.cubicBezier.length === 4 ? T.value.cubicBezier : [0.4, 0, 0.2, 1] : r[n] || r["ease-in-out"]).join(" "),
|
|
720
|
+
keyTimes: "0;1"
|
|
721
|
+
};
|
|
722
|
+
}), be = b(() => {
|
|
723
|
+
const n = T.value?.trail || {}, r = a.value.style.line.strokeWidth || 1;
|
|
724
|
+
return {
|
|
725
|
+
show: n.show !== !1,
|
|
726
|
+
lengthPx: n.length,
|
|
727
|
+
width: Math.max(1, Number(n.strokeWidth) || r * 2.2),
|
|
728
|
+
opacity: Math.min(1, Math.max(0, Number(n.opacity) ?? 0.6)),
|
|
729
|
+
fadeIn: 0.5,
|
|
730
|
+
fadeOut: 0.2
|
|
731
|
+
};
|
|
732
|
+
}), P = b(() => qe({
|
|
733
|
+
data: J.value,
|
|
734
|
+
threshold: a.value.downsample.threshold
|
|
735
|
+
}));
|
|
736
|
+
G(() => i.config, (n) => {
|
|
737
|
+
k.value || (a.value = Q()), et(), m.value.chartWidth = a.value.style.chartWidth;
|
|
738
|
+
}, { deep: !0 }), G(() => i.dataset, (n) => {
|
|
739
|
+
Array.isArray(n) && n.length > 0 && (oe.value = !1), I.value = qe({
|
|
740
|
+
data: J.value.map((r) => ({
|
|
741
|
+
...r,
|
|
742
|
+
value: [void 0].includes(r.value) ? null : r.value
|
|
743
|
+
})),
|
|
744
|
+
threshold: a.value.downsample.threshold
|
|
745
|
+
});
|
|
746
|
+
}, { deep: !0 });
|
|
747
|
+
const I = S(X());
|
|
748
|
+
function X() {
|
|
749
|
+
return qe({
|
|
750
|
+
data: J.value.map((n) => a.value.style.animation.show && J.value.length > 1 ? {
|
|
751
|
+
...n,
|
|
752
|
+
value: null
|
|
753
|
+
} : {
|
|
754
|
+
...n,
|
|
755
|
+
value: [void 0].includes(n.value) ? null : n.value
|
|
756
|
+
}),
|
|
757
|
+
threshold: a.value.downsample.threshold
|
|
758
|
+
});
|
|
759
|
+
}
|
|
760
|
+
const D = ut(null), O = ut(null), E = S(!1), F = S(0), B = S([]), R = S(""), j = b(() => {
|
|
761
|
+
const r = (P.value || []).map((W) => `${W.period}::${Number.isFinite(W.value) ? W.value : 0}`).join("|"), s = a.value?.style?.animation || {}, v = !!a.value?.gradientPath?.show;
|
|
762
|
+
return `${r}#${!!s.show}#${s.animationFrames || 0}#${v}`;
|
|
763
|
+
});
|
|
764
|
+
function V() {
|
|
765
|
+
F.value && (cancelAnimationFrame(F.value), F.value = 0), B.value.forEach((n) => clearTimeout(n)), B.value = [], E.value = !1;
|
|
766
|
+
}
|
|
767
|
+
function ke() {
|
|
768
|
+
const n = a.value?.style?.animation || {}, r = P.value || [], s = j.value, v = !!a.value.gradientPath.show;
|
|
769
|
+
if (s && s === R.value && (E.value || I.value.length === r.length))
|
|
770
|
+
return;
|
|
771
|
+
if (V(), v || !n.show || k.value || r.length <= 1) {
|
|
772
|
+
I.value = r, R.value = s;
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
E.value = !0, R.value = s, I.value = [];
|
|
776
|
+
const W = Math.max(1, Number(n.animationFrames) || 1), Et = Math.max(1, Math.floor(W / r.length));
|
|
777
|
+
let Oe = 0;
|
|
778
|
+
const ot = () => {
|
|
779
|
+
if (s !== j.value) {
|
|
780
|
+
V();
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
if (Oe < r.length) {
|
|
784
|
+
I.value.push(r[Oe]);
|
|
785
|
+
const Ft = setTimeout(() => {
|
|
786
|
+
F.value = requestAnimationFrame(ot);
|
|
787
|
+
}, Et);
|
|
788
|
+
B.value.push(Ft), Oe += 1;
|
|
789
|
+
} else
|
|
790
|
+
I.value = r, V();
|
|
791
|
+
};
|
|
792
|
+
F.value = requestAnimationFrame(ot);
|
|
793
|
+
}
|
|
794
|
+
G(j, () => {
|
|
795
|
+
ke();
|
|
796
|
+
}), He(() => {
|
|
797
|
+
et(), ke();
|
|
798
|
+
}), Be(() => {
|
|
799
|
+
V();
|
|
800
|
+
});
|
|
801
|
+
const Ae = S(0);
|
|
802
|
+
G(
|
|
803
|
+
() => k.value,
|
|
804
|
+
async (n) => {
|
|
805
|
+
n || (await K(), Ae.value += 1);
|
|
806
|
+
}
|
|
807
|
+
), G(
|
|
808
|
+
() => E.value,
|
|
809
|
+
async (n) => {
|
|
810
|
+
n || k.value || (await K(), Ae.value += 1);
|
|
811
|
+
}
|
|
812
|
+
);
|
|
813
|
+
const se = b(() => `sparkline_line_path_${h.value}`), we = S(!0);
|
|
814
|
+
async function Pe() {
|
|
815
|
+
we.value = !1, await K(), we.value = !0, await K(), me();
|
|
816
|
+
}
|
|
817
|
+
const Qe = b(() => !!a.value.debug);
|
|
818
|
+
function et() {
|
|
819
|
+
if (dt(i.dataset) ? (vt({
|
|
820
|
+
componentName: "VueUiSparkline",
|
|
821
|
+
type: "dataset",
|
|
822
|
+
debug: Qe.value
|
|
823
|
+
}), oe.value = !0) : i.dataset.forEach((n, r) => {
|
|
824
|
+
Vt({
|
|
825
|
+
datasetObject: n,
|
|
826
|
+
requiredAttributes: ["period", "value"]
|
|
827
|
+
}).forEach((s) => {
|
|
828
|
+
vt({
|
|
829
|
+
componentName: "VueUiSparkline",
|
|
830
|
+
type: "datasetSerieAttribute",
|
|
831
|
+
property: s,
|
|
832
|
+
index: r,
|
|
833
|
+
debug: Qe.value
|
|
834
|
+
});
|
|
835
|
+
});
|
|
836
|
+
}), dt(i.dataset) || (oe.value = a.value.loading), a.value.responsive) {
|
|
837
|
+
const n = Xt(() => {
|
|
838
|
+
const { width: r, height: s } = Ut({
|
|
839
|
+
chart: y.value,
|
|
840
|
+
title: a.value.style.title.show && i.showInfo ? $.value : null,
|
|
841
|
+
source: _.value
|
|
842
|
+
});
|
|
843
|
+
requestAnimationFrame(() => {
|
|
844
|
+
m.value.width = r, m.value.height = s, m.value.chartWidth = a.value.style.chartWidth / 500 * r, m.value.padding = i.forcedPadding / 500 * r;
|
|
845
|
+
});
|
|
846
|
+
});
|
|
847
|
+
D.value && (O.value && D.value.unobserve(O.value), D.value.disconnect()), D.value = new ResizeObserver(n), O.value = y.value.parentNode, D.value.observe(O.value);
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
Be(() => {
|
|
851
|
+
D.value && (O.value && D.value.unobserve(O.value), D.value.disconnect());
|
|
852
|
+
});
|
|
853
|
+
const m = S({
|
|
854
|
+
height: 80 * i.heightRatio,
|
|
855
|
+
width: 500,
|
|
856
|
+
chartWidth: a.value.style.chartWidth,
|
|
857
|
+
padding: i.forcedPadding
|
|
858
|
+
}), Re = t, x = b(() => {
|
|
859
|
+
const { top: n, right: r, bottom: s, left: v } = a.value.style.padding;
|
|
860
|
+
return {
|
|
861
|
+
top: n,
|
|
862
|
+
left: v,
|
|
863
|
+
right: m.value.width - r,
|
|
864
|
+
bottom: m.value.height - s,
|
|
865
|
+
start: i.showInfo && a.value.style.dataLabel.show && a.value.style.dataLabel.position === "left" ? m.value.width - m.value.chartWidth + v : m.value.padding + v,
|
|
866
|
+
width: i.showInfo && a.value.style.dataLabel.show ? m.value.chartWidth - v - r : m.value.width - m.value.padding - v - r,
|
|
867
|
+
height: m.value.height - n - s
|
|
868
|
+
};
|
|
869
|
+
}), De = b(() => [null, void 0].includes(a.value.style.scaleMin) ? Math.min(...I.value.map((n) => isNaN(n.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(n.value) ? 0 : n.value || 0)) : a.value.style.scaleMin), Pt = b(() => [null, void 0].includes(a.value.style.scaleMax) ? Math.max(...I.value.map((n) => isNaN(n.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(n.value) ? 0 : n.value || 0)) : a.value.style.scaleMax), Ce = b(() => {
|
|
870
|
+
const n = De.value >= 0 ? 0 : De.value;
|
|
871
|
+
return Math.abs(n);
|
|
872
|
+
}), tt = b(() => Pt.value + Ce.value), ve = b(() => x.value.bottom - x.value.height * ze(Ce.value));
|
|
873
|
+
function ze(n) {
|
|
874
|
+
return isNaN(n / tt.value) ? 0 : n / tt.value;
|
|
875
|
+
}
|
|
876
|
+
const he = b(() => P.value.length - 1 || 1), xe = S([]);
|
|
877
|
+
let at = 0;
|
|
878
|
+
Rt(() => {
|
|
879
|
+
const n = ++at;
|
|
880
|
+
(async () => {
|
|
881
|
+
const r = await Qt({
|
|
882
|
+
values: P.value.map((s) => s.period),
|
|
883
|
+
maxDatapoints: P.value.length,
|
|
884
|
+
formatter: a.value.style.dataLabel.datetimeFormatter,
|
|
885
|
+
start: 0,
|
|
886
|
+
end: P.value.length
|
|
887
|
+
});
|
|
888
|
+
n === at && (xe.value = r);
|
|
889
|
+
})();
|
|
890
|
+
});
|
|
891
|
+
const C = b(() => I.value.map((n, r) => {
|
|
892
|
+
const s = isNaN(n.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(n.value) ? 0 : n.value || 0, v = x.value.width / he.value;
|
|
893
|
+
return {
|
|
894
|
+
absoluteValue: s,
|
|
895
|
+
period: xe.value && xe.value[r] && xe.value[r].text ? xe.value[r].text : n.period,
|
|
896
|
+
plotValue: s + Ce.value,
|
|
897
|
+
toMax: ze(s + Ce.value),
|
|
898
|
+
x: x.value.start + r * v,
|
|
899
|
+
y: x.value.bottom - x.value.height * ze(s + Ce.value),
|
|
900
|
+
id: `plot_${h.value}_${r}`,
|
|
901
|
+
color: U.value ? a.value.style.bar.color : a.value.style.area.useGradient ? Te(a.value.style.line.color, 0.05 * (1 - r / he.value)) : a.value.style.line.color,
|
|
902
|
+
width: v
|
|
903
|
+
};
|
|
904
|
+
})), Nt = b(() => {
|
|
905
|
+
const n = { x: C.value[0].x || 0, y: (m.value.height || 0) - 6 }, r = { x: C.value[C.value.length - 1].x || 0, y: (m.value.height || 0) - 6 }, s = [];
|
|
906
|
+
return C.value.forEach((v) => {
|
|
907
|
+
s.push(`${v.x || 0},${v.y || 0} `);
|
|
908
|
+
}), [n.x, n.y, ...s, r.x, r.y].toString();
|
|
909
|
+
}), L = S(void 0), fe = S(void 0);
|
|
910
|
+
function _t(n, r) {
|
|
911
|
+
a.value.events.datapointEnter && a.value.events.datapointEnter({ datapoint: n, seriesIndex: r }), L.value = n, fe.value || (fe.value = n), Re("hoverIndex", { index: r });
|
|
912
|
+
}
|
|
913
|
+
function Tt(n, r) {
|
|
914
|
+
a.value.events.datapointLeave && a.value.events.datapointLeave({ datapoint: n, seriesIndex: r }), fe.value = L.value, L.value = void 0, Re("hoverIndex", { index: void 0 });
|
|
915
|
+
}
|
|
916
|
+
const te = b(() => {
|
|
917
|
+
if (w.value) {
|
|
918
|
+
const n = C.value.map((s) => s.absoluteValue), r = n.reduce((s, v) => s + v, 0);
|
|
919
|
+
return {
|
|
920
|
+
latest: C.value[C.value.length - 1] ? C.value[C.value.length - 1].absoluteValue : 0,
|
|
921
|
+
sum: r,
|
|
922
|
+
average: r / C.value.length,
|
|
923
|
+
median: Gt(n),
|
|
924
|
+
trend: Wt(C.value.map(({ x: s, y: v, absoluteValue: W }) => ({
|
|
925
|
+
x: s,
|
|
926
|
+
y: v,
|
|
927
|
+
value: W
|
|
928
|
+
}))).trend
|
|
929
|
+
};
|
|
930
|
+
} else
|
|
931
|
+
return {
|
|
932
|
+
latest: null,
|
|
933
|
+
sum: null,
|
|
934
|
+
average: null,
|
|
935
|
+
median: null,
|
|
936
|
+
trend: null
|
|
937
|
+
};
|
|
938
|
+
}), lt = b(() => w.value ? a.value.style.dataLabel.valueType === "latest" ? te.value.latest : a.value.style.dataLabel.valueType === "sum" ? te.value.sum : a.value.style.dataLabel.valueType === "average" ? te.value.average : 0 : 0), U = b(() => a.value.type && a.value.type === "bar");
|
|
939
|
+
function It(n, r) {
|
|
940
|
+
a.value.events.datapointClick && a.value.events.datapointClick({ datapoint: n, seriesIndex: r }), Re("selectDatapoint", { datapoint: n, index: r });
|
|
941
|
+
}
|
|
942
|
+
const nt = b(() => U.value || !a.value.gradientPath.show ? "" : `M ${(a.value.style.line.smooth ? Ve(C.value) : ht(C.value)) || "0,0"}`);
|
|
943
|
+
return G(
|
|
944
|
+
() => [
|
|
945
|
+
ee.value,
|
|
946
|
+
se.value,
|
|
947
|
+
C.value.length,
|
|
948
|
+
m.value.width,
|
|
949
|
+
m.value.height,
|
|
950
|
+
a.value?.style?.line?.smooth
|
|
951
|
+
],
|
|
952
|
+
async () => {
|
|
953
|
+
await K(), me();
|
|
954
|
+
},
|
|
955
|
+
{ immediate: !0 }
|
|
956
|
+
), He(async () => {
|
|
957
|
+
await K(), me();
|
|
958
|
+
}), G(
|
|
959
|
+
() => k.value,
|
|
960
|
+
async (n) => {
|
|
961
|
+
n || await Pe();
|
|
962
|
+
}
|
|
963
|
+
), G(
|
|
964
|
+
() => E.value,
|
|
965
|
+
async (n) => {
|
|
966
|
+
n || k.value || await Pe();
|
|
967
|
+
}
|
|
968
|
+
), (n, r) => (g(), A("div", {
|
|
969
|
+
ref_key: "sparklineChart",
|
|
970
|
+
ref: y,
|
|
971
|
+
class: "vue-data-ui-component vue-ui-sparkline",
|
|
972
|
+
id: h.value,
|
|
973
|
+
style: ae(`width:100%;font-family:${a.value.style.fontFamily};`)
|
|
974
|
+
}, [
|
|
975
|
+
pe(n.$slots, "before", st(it({
|
|
976
|
+
selected: L.value,
|
|
977
|
+
latest: te.value.latest,
|
|
978
|
+
sum: te.value.sum,
|
|
979
|
+
average: te.value.average,
|
|
980
|
+
median: te.value.median,
|
|
981
|
+
trend: te.value.trend
|
|
982
|
+
})), void 0, !0),
|
|
983
|
+
a.value.style.title.show && e.showInfo ? (g(), A("div", {
|
|
984
|
+
key: 0,
|
|
985
|
+
ref_key: "chartTitle",
|
|
986
|
+
ref: $,
|
|
987
|
+
class: "vue-ui-sparkline-title",
|
|
988
|
+
style: ae(`display:flex;align-items:center;width:100%;color:${a.value.style.title.color};background:${a.value.style.backgroundColor};justify-content:${a.value.style.title.textAlign === "left" ? "flex-start" : a.value.style.title.textAlign === "right" ? "flex-end" : "center"};height:${a.value.style.title.fontSize * 2}px;font-size:${a.value.style.title.fontSize}px;font-weight:${a.value.style.title.bold ? "bold" : "normal"};`)
|
|
989
|
+
}, [
|
|
990
|
+
M("span", {
|
|
991
|
+
style: ae(`padding:${a.value.style.title.textAlign === "left" ? "0 0 0 12px" : a.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
|
|
992
|
+
}, _e(L.value ? L.value.period : a.value.style.title.text), 5)
|
|
993
|
+
], 4)) : N("", !0),
|
|
994
|
+
(g(), A("svg", {
|
|
995
|
+
ref_key: "svgRef",
|
|
996
|
+
ref: ie,
|
|
997
|
+
xmlns: p(jt),
|
|
998
|
+
viewBox: `0 0 ${m.value.width} ${m.value.height}`,
|
|
999
|
+
style: ae(`background:${a.value.style.backgroundColor};overflow:visible`),
|
|
1000
|
+
onMouseleave: r[0] || (r[0] = (s) => fe.value = void 0)
|
|
1001
|
+
}, [
|
|
1002
|
+
Dt(p(l)),
|
|
1003
|
+
n.$slots["chart-background"] ? (g(), A("foreignObject", {
|
|
1004
|
+
key: 0,
|
|
1005
|
+
x: 0,
|
|
1006
|
+
y: 0,
|
|
1007
|
+
width: m.value.width <= 0 ? 10 : m.value.width,
|
|
1008
|
+
height: m.value.height <= 0 ? 10 : m.value.height,
|
|
1009
|
+
style: {
|
|
1010
|
+
pointerEvents: "none"
|
|
1011
|
+
}
|
|
1012
|
+
}, [
|
|
1013
|
+
pe(n.$slots, "chart-background", {}, void 0, !0)
|
|
1014
|
+
], 8, Fa)) : N("", !0),
|
|
1015
|
+
M("defs", null, [
|
|
1016
|
+
M("linearGradient", {
|
|
1017
|
+
x1: "0%",
|
|
1018
|
+
y1: "0%",
|
|
1019
|
+
x2: "100%",
|
|
1020
|
+
y2: "0%",
|
|
1021
|
+
id: `sparkline_gradient_${h.value}`
|
|
1022
|
+
}, [
|
|
1023
|
+
M("stop", {
|
|
1024
|
+
offset: "0%",
|
|
1025
|
+
"stop-color": p(Ie)(p(Te)(a.value.style.area.color, 0.05), a.value.style.area.opacity)
|
|
1026
|
+
}, null, 8, Ra),
|
|
1027
|
+
M("stop", {
|
|
1028
|
+
offset: "100%",
|
|
1029
|
+
"stop-color": p(Ie)(a.value.style.area.color, a.value.style.area.opacity)
|
|
1030
|
+
}, null, 8, Da)
|
|
1031
|
+
], 8, Ba),
|
|
1032
|
+
M("linearGradient", {
|
|
1033
|
+
x2: "0%",
|
|
1034
|
+
y2: "100%",
|
|
1035
|
+
id: `sparkline_bar_gradient_pos_${h.value}`
|
|
1036
|
+
}, [
|
|
1037
|
+
M("stop", {
|
|
1038
|
+
offset: "0%",
|
|
1039
|
+
"stop-color": a.value.style.bar.color
|
|
1040
|
+
}, null, 8, Oa),
|
|
1041
|
+
M("stop", {
|
|
1042
|
+
offset: "100%",
|
|
1043
|
+
"stop-color": p(Te)(a.value.style.bar.color, 0.05)
|
|
1044
|
+
}, null, 8, qa)
|
|
1045
|
+
], 8, za),
|
|
1046
|
+
M("linearGradient", {
|
|
1047
|
+
x2: "0%",
|
|
1048
|
+
y2: "100%",
|
|
1049
|
+
id: `sparkline_bar_gradient_neg_${h.value}`
|
|
1050
|
+
}, [
|
|
1051
|
+
M("stop", {
|
|
1052
|
+
offset: "0%",
|
|
1053
|
+
"stop-color": p(Te)(a.value.style.bar.color, 0.05)
|
|
1054
|
+
}, null, 8, Wa),
|
|
1055
|
+
M("stop", {
|
|
1056
|
+
offset: "100%",
|
|
1057
|
+
"stop-color": a.value.style.bar.color
|
|
1058
|
+
}, null, 8, Ga)
|
|
1059
|
+
], 8, Va),
|
|
1060
|
+
M("filter", {
|
|
1061
|
+
id: `sparkline_pulse_glow_${h.value}`,
|
|
1062
|
+
filterUnits: "userSpaceOnUse",
|
|
1063
|
+
x: "-50",
|
|
1064
|
+
y: "-50",
|
|
1065
|
+
width: "100",
|
|
1066
|
+
height: "100"
|
|
1067
|
+
}, [...r[1] || (r[1] = [
|
|
1068
|
+
M("feGaussianBlur", {
|
|
1069
|
+
in: "SourceGraphic",
|
|
1070
|
+
stdDeviation: "3",
|
|
1071
|
+
result: "blur"
|
|
1072
|
+
}, null, -1),
|
|
1073
|
+
M("feMerge", null, [
|
|
1074
|
+
M("feMergeNode", { in: "blur" }),
|
|
1075
|
+
M("feMergeNode", { in: "SourceGraphic" })
|
|
1076
|
+
], -1)
|
|
1077
|
+
])], 8, ja)
|
|
1078
|
+
]),
|
|
1079
|
+
a.value.style.area.show && !U.value && C.value[0] && C.value.length > 1 ? (g(), A("g", Ya, [
|
|
1080
|
+
a.value.style.line.smooth ? (g(), A("path", {
|
|
1081
|
+
key: 0,
|
|
1082
|
+
class: "vue-ui-sparkline-area",
|
|
1083
|
+
d: `M ${C.value[0].x},${x.value.bottom} ${p(Ve)(C.value)} L ${C.value.at(-1).x},${x.value.bottom} Z`,
|
|
1084
|
+
fill: a.value.style.area.useGradient ? `url(#sparkline_gradient_${h.value})` : p(Ie)(a.value.style.area.color, a.value.style.area.opacity),
|
|
1085
|
+
"stroke-linecap": "round",
|
|
1086
|
+
"stroke-linejoin": "round",
|
|
1087
|
+
style: ae({
|
|
1088
|
+
transition: p(k) ? void 0 : "all 0.2s"
|
|
1089
|
+
})
|
|
1090
|
+
}, null, 12, Xa)) : (g(), A("path", {
|
|
1091
|
+
key: 1,
|
|
1092
|
+
class: "vue-ui-sparkline-area",
|
|
1093
|
+
d: `M${Nt.value}Z`,
|
|
1094
|
+
fill: a.value.style.area.useGradient ? `url(#sparkline_gradient_${h.value})` : p(Ie)(a.value.style.area.color, a.value.style.area.opacity),
|
|
1095
|
+
"stroke-linecap": "round",
|
|
1096
|
+
"stroke-linejoin": "round",
|
|
1097
|
+
style: ae({
|
|
1098
|
+
transition: p(k) ? void 0 : "all 0.2s"
|
|
1099
|
+
})
|
|
1100
|
+
}, null, 12, Ua))
|
|
1101
|
+
])) : N("", !0),
|
|
1102
|
+
a.value.style.line.smooth && !U.value ? (g(), A("path", {
|
|
1103
|
+
key: 2,
|
|
1104
|
+
class: "vue-ui-sparkline-path",
|
|
1105
|
+
id: se.value,
|
|
1106
|
+
d: `M ${p(Ve)(C.value) || "0,0"}`,
|
|
1107
|
+
stroke: a.value.style.line.color,
|
|
1108
|
+
fill: "none",
|
|
1109
|
+
"stroke-width": a.value.style.line.strokeWidth,
|
|
1110
|
+
"stroke-linecap": "round",
|
|
1111
|
+
"stroke-linejoin": "round",
|
|
1112
|
+
style: ae({
|
|
1113
|
+
transition: p(k) ? void 0 : "all 0.2s"
|
|
1114
|
+
})
|
|
1115
|
+
}, null, 12, Ka)) : N("", !0),
|
|
1116
|
+
!a.value.style.line.smooth && !U.value ? (g(), A("path", {
|
|
1117
|
+
key: 3,
|
|
1118
|
+
class: "vue-ui-sparkline-path",
|
|
1119
|
+
id: se.value,
|
|
1120
|
+
d: `M ${p(ht)(C.value) || "0,0"}`,
|
|
1121
|
+
stroke: a.value.style.line.color,
|
|
1122
|
+
fill: "none",
|
|
1123
|
+
"stroke-width": a.value.style.line.strokeWidth,
|
|
1124
|
+
"stroke-linecap": "round",
|
|
1125
|
+
"stroke-linejoin": "round",
|
|
1126
|
+
style: ae({
|
|
1127
|
+
transition: p(k) ? void 0 : "all 0.2s"
|
|
1128
|
+
})
|
|
1129
|
+
}, null, 12, Ha)) : N("", !0),
|
|
1130
|
+
nt.value ? (g(), Ne(Ta, {
|
|
1131
|
+
key: 4,
|
|
1132
|
+
svgPathData: nt.value,
|
|
1133
|
+
enabled: a.value.gradientPath.show && !U.value,
|
|
1134
|
+
strokeWidth: a.value.style.line.strokeWidth,
|
|
1135
|
+
highColor: a.value.gradientPath.colors.high,
|
|
1136
|
+
lowColor: a.value.gradientPath.colors.low,
|
|
1137
|
+
segments: a.value.gradientPath.segments
|
|
1138
|
+
}, null, 8, ["svgPathData", "enabled", "strokeWidth", "highColor", "lowColor", "segments"])) : N("", !0),
|
|
1139
|
+
we.value && ee.value ? (g(), Ne(va, {
|
|
1140
|
+
key: 5,
|
|
1141
|
+
uid: h.value,
|
|
1142
|
+
svgRef: p(ie),
|
|
1143
|
+
pulsePathId: se.value,
|
|
1144
|
+
pulsePathLength: re.value,
|
|
1145
|
+
pulseDur: ce.value,
|
|
1146
|
+
pulseBegin: Me.value,
|
|
1147
|
+
pulseRepeatCount: de.value,
|
|
1148
|
+
pulseFillMode: $e.value,
|
|
1149
|
+
pulseKeyPoints: Se.value,
|
|
1150
|
+
pulseMotion: Y.value,
|
|
1151
|
+
pulse: T.value,
|
|
1152
|
+
pulseTrail: be.value,
|
|
1153
|
+
pulseTrailLength: ue.value,
|
|
1154
|
+
prefersReducedMotion: p(f),
|
|
1155
|
+
loading: p(k),
|
|
1156
|
+
isBar: U.value
|
|
1157
|
+
}, null, 8, ["uid", "svgRef", "pulsePathId", "pulsePathLength", "pulseDur", "pulseBegin", "pulseRepeatCount", "pulseFillMode", "pulseKeyPoints", "pulseMotion", "pulse", "pulseTrail", "pulseTrailLength", "prefersReducedMotion", "loading", "isBar"])) : N("", !0),
|
|
1158
|
+
(g(!0), A(Le, null, Fe(C.value, (s, v) => (g(), A("g", null, [
|
|
1159
|
+
U.value ? (g(), A("rect", {
|
|
1160
|
+
key: 0,
|
|
1161
|
+
x: s.x - s.width / 2,
|
|
1162
|
+
y: isNaN(s.absoluteValue > 0 ? s.y : ve.value) ? 0 : s.absoluteValue > 0 ? s.y : ve.value,
|
|
1163
|
+
width: s.width,
|
|
1164
|
+
height: isNaN(Math.abs(s.y - ve.value)) ? 0 : Math.abs(s.y - ve.value),
|
|
1165
|
+
fill: s.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${h.value})` : `url(#sparkline_bar_gradient_neg_${h.value})`,
|
|
1166
|
+
rx: a.value.style.bar.borderRadius
|
|
1167
|
+
}, null, 8, Za)) : N("", !0),
|
|
1168
|
+
a.value.style.verticalIndicator.show && (L.value && s.id === L.value.id || e.selectedIndex === v) ? (g(), A("line", {
|
|
1169
|
+
key: 1,
|
|
1170
|
+
x1: s.x,
|
|
1171
|
+
x2: s.x,
|
|
1172
|
+
y1: x.value.top - 6,
|
|
1173
|
+
y2: x.value.bottom,
|
|
1174
|
+
stroke: a.value.style.verticalIndicator.color || s.color,
|
|
1175
|
+
"stroke-width": a.value.style.verticalIndicator.strokeWidth,
|
|
1176
|
+
"stroke-linecap": "round",
|
|
1177
|
+
"stroke-dasharray": a.value.style.verticalIndicator.strokeDasharray || 0
|
|
1178
|
+
}, null, 8, Ja)) : N("", !0)
|
|
1179
|
+
]))), 256)),
|
|
1180
|
+
De.value < 0 ? (g(), A("line", {
|
|
1181
|
+
key: 6,
|
|
1182
|
+
x1: x.value.start,
|
|
1183
|
+
x2: x.value.start + x.value.width,
|
|
1184
|
+
y1: p(ft)(ve.value, x.value.bottom),
|
|
1185
|
+
y2: p(ft)(ve.value, x.value.bottom),
|
|
1186
|
+
stroke: a.value.style.zeroLine.color,
|
|
1187
|
+
"stroke-dasharray": a.value.style.zeroLine.strokeWidth * 2,
|
|
1188
|
+
"stroke-width": a.value.style.zeroLine.strokeWidth,
|
|
1189
|
+
"stroke-linecap": "round"
|
|
1190
|
+
}, null, 8, Qa)) : N("", !0),
|
|
1191
|
+
a.value.style.plot.show ? (g(!0), A(Le, { key: 7 }, Fe(C.value, (s, v) => (g(), A("g", null, [
|
|
1192
|
+
L.value && s.id === L.value.id || e.selectedIndex === v || p(J).length === 1 ? (g(), A("circle", {
|
|
1193
|
+
key: 0,
|
|
1194
|
+
cx: s.x,
|
|
1195
|
+
cy: s.y,
|
|
1196
|
+
r: a.value.style.plot.radius,
|
|
1197
|
+
fill: s.color,
|
|
1198
|
+
stroke: a.value.style.plot.stroke,
|
|
1199
|
+
"stroke-width": a.value.style.plot.strokeWidth
|
|
1200
|
+
}, null, 8, el)) : N("", !0)
|
|
1201
|
+
]))), 256)) : N("", !0),
|
|
1202
|
+
e.showInfo && a.value.style.dataLabel.show ? (g(), A("text", {
|
|
1203
|
+
key: 8,
|
|
1204
|
+
x: a.value.style.dataLabel.position === "left" ? 12 + a.value.style.dataLabel.offsetX : x.value.width + 12 + a.value.style.dataLabel.offsetX,
|
|
1205
|
+
y: m.value.height / 2 + a.value.style.dataLabel.fontSize / 2.5 + a.value.style.dataLabel.offsetY,
|
|
1206
|
+
"font-size": a.value.style.dataLabel.fontSize,
|
|
1207
|
+
"font-weight": a.value.style.dataLabel.bold ? "bold" : "normal",
|
|
1208
|
+
fill: a.value.style.dataLabel.color
|
|
1209
|
+
}, _e(L.value ? p(We)(
|
|
1210
|
+
a.value.style.dataLabel.formatter,
|
|
1211
|
+
L.value.absoluteValue,
|
|
1212
|
+
p(Ge)({ p: a.value.style.dataLabel.prefix, v: L.value.absoluteValue, s: a.value.style.dataLabel.suffix, r: a.value.style.dataLabel.roundingValue }),
|
|
1213
|
+
{ datapoint: L.value }
|
|
1214
|
+
) : p(We)(
|
|
1215
|
+
a.value.style.dataLabel.formatter,
|
|
1216
|
+
lt.value,
|
|
1217
|
+
p(Ge)({ p: a.value.style.dataLabel.prefix, v: lt.value, s: a.value.style.dataLabel.suffix, r: a.value.style.dataLabel.roundingValue })
|
|
1218
|
+
)), 9, tl)) : N("", !0),
|
|
1219
|
+
(g(!0), A(Le, null, Fe(C.value, (s, v) => (g(), A("rect", {
|
|
1220
|
+
x: s.x - (x.value.width / (he.value + 1) > m.value.padding ? m.value.padding : x.value.width / (he.value + 1)) / 2,
|
|
1221
|
+
y: x.value.top - 6,
|
|
1222
|
+
height: x.value.height + 6,
|
|
1223
|
+
width: x.value.width / (he.value + 1) > m.value.padding ? m.value.padding : x.value.width / (he.value + 1),
|
|
1224
|
+
fill: "transparent",
|
|
1225
|
+
onMouseenter: () => _t(s, v),
|
|
1226
|
+
onMouseleave: () => Tt(s, v),
|
|
1227
|
+
onClick: () => It(s, v)
|
|
1228
|
+
}, null, 40, al))), 256)),
|
|
1229
|
+
pe(n.$slots, "svg", { svg: m.value }, void 0, !0)
|
|
1230
|
+
], 44, Ea)),
|
|
1231
|
+
L.value && a.value.style.tooltip.show ? (g(), Ne(p(u), {
|
|
1232
|
+
key: 1,
|
|
1233
|
+
x: L.value.x,
|
|
1234
|
+
y: L.value.y,
|
|
1235
|
+
prevX: fe.value.x,
|
|
1236
|
+
prevY: fe.value.y,
|
|
1237
|
+
offsetY: a.value.style.plot.radius * 3 + a.value.style.tooltip.offsetY,
|
|
1238
|
+
svgRef: p(ie),
|
|
1239
|
+
background: a.value.style.tooltip.backgroundColor,
|
|
1240
|
+
color: a.value.style.tooltip.color,
|
|
1241
|
+
fontSize: a.value.style.tooltip.fontSize,
|
|
1242
|
+
borderWidth: a.value.style.tooltip.borderWidth,
|
|
1243
|
+
borderColor: a.value.style.tooltip.borderColor,
|
|
1244
|
+
borderRadius: a.value.style.tooltip.borderRadius,
|
|
1245
|
+
backgroundOpacity: a.value.style.tooltip.backgroundOpacity
|
|
1246
|
+
}, {
|
|
1247
|
+
default: zt(() => [
|
|
1248
|
+
pe(n.$slots, "tooltip", st(it({ ...L.value })), () => [
|
|
1249
|
+
Ot(_e(L.value.period) + ": " + _e(p(We)(
|
|
1250
|
+
a.value.style.dataLabel.formatter,
|
|
1251
|
+
L.value.absoluteValue,
|
|
1252
|
+
p(Ge)({
|
|
1253
|
+
p: a.value.style.dataLabel.prefix,
|
|
1254
|
+
v: L.value.absoluteValue,
|
|
1255
|
+
s: a.value.style.dataLabel.suffix,
|
|
1256
|
+
r: a.value.style.dataLabel.roundingValue
|
|
1257
|
+
}),
|
|
1258
|
+
{ datapoint: L.value }
|
|
1259
|
+
)), 1)
|
|
1260
|
+
], !0)
|
|
1261
|
+
]),
|
|
1262
|
+
_: 3
|
|
1263
|
+
}, 8, ["x", "y", "prevX", "prevY", "offsetY", "svgRef", "background", "color", "fontSize", "borderWidth", "borderColor", "borderRadius", "backgroundOpacity"])) : N("", !0),
|
|
1264
|
+
n.$slots.source ? (g(), A("div", {
|
|
1265
|
+
key: 2,
|
|
1266
|
+
ref_key: "source",
|
|
1267
|
+
ref: _,
|
|
1268
|
+
dir: "auto"
|
|
1269
|
+
}, [
|
|
1270
|
+
pe(n.$slots, "source", {}, void 0, !0)
|
|
1271
|
+
], 512)) : N("", !0),
|
|
1272
|
+
pe(n.$slots, "skeleton", {}, () => [
|
|
1273
|
+
p(k) ? (g(), Ne(Zt, { key: 0 })) : N("", !0)
|
|
1274
|
+
], !0)
|
|
1275
|
+
], 12, Ia));
|
|
1276
|
+
}
|
|
1277
|
+
}, nl = /* @__PURE__ */ ta(ll, [["__scopeId", "data-v-f8230890"]]), pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1278
|
+
__proto__: null,
|
|
1279
|
+
default: nl
|
|
1280
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1281
|
+
export {
|
|
1282
|
+
fl as a,
|
|
1283
|
+
pl as b,
|
|
1284
|
+
nl as v
|
|
1285
|
+
};
|