vue-data-ui 3.16.3 → 3.16.4
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/{PackageVersion-DTMK4Sxp.js → PackageVersion-1BHnPIBZ.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-age-pyramid.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-kpi.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-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-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-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.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{vue-data-ui-aaiQyff_.js → vue-data-ui-D28lrXzG.js} +60 -60
- package/dist/vue-data-ui.js +60 -60
- package/dist/{vue-ui-3d-bar-6Orm7dBW.js → vue-ui-3d-bar-BOrQb1Zm.js} +1 -1
- package/dist/{vue-ui-age-pyramid-BBhea9rK.js → vue-ui-age-pyramid-txthNdz1.js} +1 -1
- package/dist/{vue-ui-bullet-BkehDcCq.js → vue-ui-bullet-BboXC-yM.js} +1 -1
- package/dist/{vue-ui-bump-Blrjd7uJ.js → vue-ui-bump-oRhoxgeR.js} +1 -1
- package/dist/{vue-ui-candlestick-6Op5ajNE.js → vue-ui-candlestick-RAgVO1Hl.js} +1 -1
- package/dist/{vue-ui-carousel-table-FnDUTYU9.js → vue-ui-carousel-table-BFqP05En.js} +1 -1
- package/dist/{vue-ui-chestnut-BXlDXANA.js → vue-ui-chestnut-ComiA10N.js} +1 -1
- package/dist/{vue-ui-chord-BFjsmQrI.js → vue-ui-chord-D9dLOTr5.js} +1 -1
- package/dist/{vue-ui-circle-pack-CTaG4Sjw.js → vue-ui-circle-pack-pqOFrf-X.js} +1 -1
- package/dist/{vue-ui-cursor-C60X0cfA.js → vue-ui-cursor-BmAytuMu.js} +1 -1
- package/dist/{vue-ui-dag-BjaYW6LU.js → vue-ui-dag-CuJNCfFw.js} +1 -1
- package/dist/{vue-ui-dashboard-8yFAKIdS.js → vue-ui-dashboard-DDuu-xwh.js} +57 -57
- package/dist/{vue-ui-digits-CFqwcQDp.js → vue-ui-digits-DYKnwhao.js} +1 -1
- package/dist/{vue-ui-donut-CcXMIU5e.js → vue-ui-donut-CbD2wI-a.js} +1 -1
- package/dist/{vue-ui-donut-evolution-D_dHDull.js → vue-ui-donut-evolution-BdA0k4Eg.js} +1 -1
- package/dist/{vue-ui-dumbbell-CuRrHdyZ.js → vue-ui-dumbbell-CPbXszE_.js} +1 -1
- package/dist/{vue-ui-flow-CUL8n2QX.js → vue-ui-flow-RyxU8f22.js} +1 -1
- package/dist/{vue-ui-funnel-WyskZmfo.js → vue-ui-funnel-Cda_iN_h.js} +1 -1
- package/dist/{vue-ui-galaxy-CE2uP4Sh.js → vue-ui-galaxy-BNUPKqkV.js} +1 -1
- package/dist/{vue-ui-gauge--c7HiLxL.js → vue-ui-gauge-CihaQBsc.js} +1 -1
- package/dist/{vue-ui-geo-B2wXUa-9.js → vue-ui-geo-Da95dDom.js} +1 -1
- package/dist/{vue-ui-gizmo-UXGGCMcf.js → vue-ui-gizmo-DzHN0cW5.js} +1 -1
- package/dist/{vue-ui-heatmap-D8oeN8E_.js → vue-ui-heatmap-DqQiO1Oz.js} +1 -1
- package/dist/{vue-ui-history-plot-Cfxm9Baf.js → vue-ui-history-plot-DqeaH_61.js} +1 -1
- package/dist/{vue-ui-horizontal-bar-C5iWeO6u.js → vue-ui-horizontal-bar-CX6TPm9_.js} +1 -1
- package/dist/{vue-ui-kpi-B8PqMSoW.js → vue-ui-kpi-OxZqguE4.js} +1 -1
- package/dist/{vue-ui-molecule-D3_zGag1.js → vue-ui-molecule-CTm126iW.js} +1 -1
- package/dist/{vue-ui-mood-radar-AjtdTfsY.js → vue-ui-mood-radar-C0E6bq6E.js} +1 -1
- package/dist/{vue-ui-nested-donuts-CufH58ng.js → vue-ui-nested-donuts-Bh0ZICKK.js} +1 -1
- package/dist/{vue-ui-onion-BZHbTiT3.js → vue-ui-onion-QsjwjlCa.js} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-7MLMSc7M.js → vue-ui-parallel-coordinate-plot-wJcWVLAC.js} +1 -1
- package/dist/{vue-ui-quadrant-CUd64mux.js → vue-ui-quadrant-lJ7T6q87.js} +1 -1
- package/dist/{vue-ui-quick-chart-DtWig7op.js → vue-ui-quick-chart-CEMQYbSC.js} +1 -1
- package/dist/{vue-ui-radar-3DZlLt0W.js → vue-ui-radar-d7b-Y40r.js} +1 -1
- package/dist/{vue-ui-relation-circle-DtNVikp0.js → vue-ui-relation-circle-_PoDqM8x.js} +1 -1
- package/dist/{vue-ui-ridgeline-yE_vP2VB.js → vue-ui-ridgeline-BU_EA8-u.js} +1 -1
- package/dist/{vue-ui-rings-0cvfKey4.js → vue-ui-rings-BQKtt-FQ.js} +1 -1
- package/dist/{vue-ui-scatter-Bxlj4PyZ.js → vue-ui-scatter-Bh95G7ZD.js} +1 -1
- package/dist/{vue-ui-skeleton-C4KjaDNQ.js → vue-ui-skeleton-BIw-u4zp.js} +1 -1
- package/dist/{vue-ui-spark-trend-C46YfT0J.js → vue-ui-spark-trend-D4QxExdm.js} +1 -1
- package/dist/{vue-ui-sparkbar-9jlaVtT1.js → vue-ui-sparkbar-BmiEOs4E.js} +1 -1
- package/dist/{vue-ui-sparkgauge-D9_fYGM6.js → vue-ui-sparkgauge-hwEkTICS.js} +1 -1
- package/dist/{vue-ui-sparkhistogram-DF8y017b.js → vue-ui-sparkhistogram-DEkO_5i3.js} +1 -1
- package/dist/{vue-ui-sparkline-C4mZ6GmQ.js → vue-ui-sparkline-DFnG0CrA.js} +458 -458
- package/dist/{vue-ui-sparkstackbar-D7AGReBK.js → vue-ui-sparkstackbar-CQqUPbkU.js} +1 -1
- package/dist/{vue-ui-stackbar-CWseWooY.js → vue-ui-stackbar-BcP_TA9R.js} +1 -1
- package/dist/{vue-ui-stackline-CCHtER37.js → vue-ui-stackline-Bnuj-z-G.js} +1 -1
- package/dist/{vue-ui-strip-plot-d6DjlkDf.js → vue-ui-strip-plot-B-tszwir.js} +1 -1
- package/dist/{vue-ui-table-BucTndCA.js → vue-ui-table-BVQyX-Yx.js} +2 -2
- package/dist/{vue-ui-table-sparkline-BqYyMreS.js → vue-ui-table-sparkline-DHjZyVAg.js} +1 -1
- package/dist/{vue-ui-thermometer-eGZo5cfd.js → vue-ui-thermometer-ZED83TXZ.js} +1 -1
- package/dist/{vue-ui-timer-CZNtC31b.js → vue-ui-timer-Xg7H9EaE.js} +1 -1
- package/dist/{vue-ui-tiremarks-DLdAn9OG.js → vue-ui-tiremarks-BDoU-BcX.js} +1 -1
- package/dist/{vue-ui-treemap-aXYya4cc.js → vue-ui-treemap-BcS1k9hJ.js} +1 -1
- package/dist/{vue-ui-waffle-DZTSuhOI.js → vue-ui-waffle-CSvzbC5u.js} +1 -1
- package/dist/{vue-ui-wheel-DuuDKbZ8.js → vue-ui-wheel-BrLKEar8.js} +1 -1
- package/dist/{vue-ui-word-cloud-CD4r9vs5.js → vue-ui-word-cloud-D05ZR0u7.js} +1 -1
- package/dist/{vue-ui-world-DzllEOCk.js → vue-ui-world-CtPJIK5c.js} +1 -1
- package/dist/{vue-ui-xy-tirrubIL.js → vue-ui-xy-5mNo0EDu.js} +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { computed as p, watch as z, nextTick as te, onBeforeUnmount as
|
|
2
|
-
import { j as
|
|
3
|
-
import { t as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import
|
|
12
|
-
import { A as
|
|
13
|
-
import { _ as
|
|
14
|
-
const
|
|
1
|
+
import { computed as p, watch as z, nextTick as te, onBeforeUnmount as ot, openBlock as f, createElementBlock as g, Fragment as Z, renderList as ge, createElementVNode as M, createCommentVNode as L, ref as C, defineAsyncComponent as yt, toRefs as qt, shallowRef as mt, onMounted as bt, watchEffect as Gt, normalizeStyle as H, toDisplayString as Le, createBlock as _e, renderSlot as pe, normalizeProps as Ze, guardReactiveProps as Je, unref as b, createVNode as Ot, withCtx as jt, createTextVNode as zt } from "vue";
|
|
2
|
+
import { j as Yt, t as kt, aD as Qe, o as wt, q as xt, r as Xt, v as Fe, Y as Kt, ap as Ut, c as $t, b as Ht, O as Zt, N as Jt, s as Qt, X as ea, u as Ve, V as ta, G as St, k as et, l as tt, aE as aa } from "./lib-DBptbyyI.js";
|
|
3
|
+
import { t as la, u as na } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as ra } from "./useConfig-CpJA0VZa.js";
|
|
5
|
+
import { u as ua, B as oa } from "./BaseScanner-BhhkKVoj.js";
|
|
6
|
+
import { u as at } from "./useNestedProp-Bf5XFbs8.js";
|
|
7
|
+
import { u as sa } from "./useThemeCheck-D1ZYXUwG.js";
|
|
8
|
+
import { u as ia } from "./useTimeLabels-C-A2uZKi.js";
|
|
9
|
+
import { u as da } from "./useChartAccessibility-9icAAmYg.js";
|
|
10
|
+
import { u as ca } from "./usePrefersMotion-CUKm8_t8.js";
|
|
11
|
+
import va from "./vue_ui_sparkline-CQ8DJVJx.js";
|
|
12
|
+
import { A as ha } from "./A11yDataTable-KcVAX2cP.js";
|
|
13
|
+
import { _ as fa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const pa = {
|
|
15
15
|
key: 0,
|
|
16
16
|
style: { "pointer-events": "none" }
|
|
17
|
-
},
|
|
17
|
+
}, ga = ["r", "fill", "filter"], ya = ["begin", "dur", "repeatCount", "fill", "calcMode", "keySplines", "keyTimes", "keyPoints"], ma = ["href"], ba = ["dur", "repeatCount", "fill", "values"], ka = ["r", "fill"], wa = ["begin", "dur", "repeatCount", "calcMode", "keySplines", "keyTimes", "keyPoints"], xa = ["href"], $a = ["dur", "repeatCount"], Sa = {
|
|
18
18
|
__name: "SparklinePulse",
|
|
19
19
|
props: {
|
|
20
20
|
uid: { type: String, required: !0 },
|
|
@@ -40,18 +40,18 @@ const ha = {
|
|
|
40
40
|
const i = a.svgRef?.value;
|
|
41
41
|
i && (typeof i.pauseAnimations == "function" && i.pauseAnimations(), typeof i.setCurrentTime == "function" && i.setCurrentTime(0), typeof i.unpauseAnimations == "function" && i.unpauseAnimations());
|
|
42
42
|
}
|
|
43
|
-
function d(i,
|
|
43
|
+
function d(i, S) {
|
|
44
44
|
if (typeof i != "string") return i;
|
|
45
45
|
const v = i.trim().match(/^([\d.]+)\s*(ms|s)$/);
|
|
46
46
|
if (!v) return i;
|
|
47
|
-
const w = Number(v[1]),
|
|
48
|
-
return Number.isNaN(w) ? i : `${w +
|
|
47
|
+
const w = Number(v[1]), I = v[2];
|
|
48
|
+
return Number.isNaN(w) ? i : `${w + S}${I}`;
|
|
49
49
|
}
|
|
50
50
|
function h(i) {
|
|
51
51
|
return (n.value - i) / n.value * a.pulse.radius;
|
|
52
52
|
}
|
|
53
53
|
function y(i) {
|
|
54
|
-
const
|
|
54
|
+
const S = a.pulse.trail.opacity, v = (n.value - i) / n.value, w = i === 0 ? 1 : v * S;
|
|
55
55
|
return `0;${w};${w};0`;
|
|
56
56
|
}
|
|
57
57
|
return z(
|
|
@@ -68,10 +68,10 @@ const ha = {
|
|
|
68
68
|
async () => {
|
|
69
69
|
await te(), o();
|
|
70
70
|
}
|
|
71
|
-
),
|
|
71
|
+
), ot(() => {
|
|
72
72
|
o();
|
|
73
|
-
}), (i,
|
|
74
|
-
(f(!0), g(Z, null,
|
|
73
|
+
}), (i, S) => s.value ? (f(), g("g", pa, [
|
|
74
|
+
(f(!0), g(Z, null, ge(n.value, (v, w) => (f(), g(Z, null, [
|
|
75
75
|
w % 3 === 0 ? (f(), g("circle", {
|
|
76
76
|
key: `sparkline_dot_${w}_${e.pulsePathId}`,
|
|
77
77
|
r: h(w),
|
|
@@ -79,7 +79,7 @@ const ha = {
|
|
|
79
79
|
filter: `url(#sparkline_pulse_glow_${e.uid})`,
|
|
80
80
|
opacity: "0"
|
|
81
81
|
}, [
|
|
82
|
-
|
|
82
|
+
M("animateMotion", {
|
|
83
83
|
begin: d(e.pulseBegin, w * 10),
|
|
84
84
|
dur: e.pulseDur,
|
|
85
85
|
repeatCount: e.pulseRepeatCount,
|
|
@@ -90,19 +90,19 @@ const ha = {
|
|
|
90
90
|
keyPoints: e.pulseKeyPoints,
|
|
91
91
|
rotate: "auto"
|
|
92
92
|
}, [
|
|
93
|
-
|
|
93
|
+
M("mpath", {
|
|
94
94
|
href: `#${e.pulsePathId}`
|
|
95
|
-
}, null, 8,
|
|
96
|
-
], 8,
|
|
97
|
-
|
|
95
|
+
}, null, 8, ma)
|
|
96
|
+
], 8, ya),
|
|
97
|
+
M("animate", {
|
|
98
98
|
attributeName: "opacity",
|
|
99
99
|
dur: e.pulseDur,
|
|
100
100
|
repeatCount: e.pulseRepeatCount,
|
|
101
101
|
fill: e.pulseFillMode,
|
|
102
102
|
values: y(w),
|
|
103
103
|
keyTimes: "0;0.1;0.9;1"
|
|
104
|
-
}, null, 8,
|
|
105
|
-
], 8,
|
|
104
|
+
}, null, 8, ba)
|
|
105
|
+
], 8, ga)) : L("", !0)
|
|
106
106
|
], 64))), 256)),
|
|
107
107
|
(f(), g("circle", {
|
|
108
108
|
key: `sparkline_halo_${e.pulsePathId}`,
|
|
@@ -110,7 +110,7 @@ const ha = {
|
|
|
110
110
|
fill: e.pulse.color,
|
|
111
111
|
opacity: "0"
|
|
112
112
|
}, [
|
|
113
|
-
|
|
113
|
+
M("animateMotion", {
|
|
114
114
|
begin: e.pulseBegin,
|
|
115
115
|
dur: e.pulseDur,
|
|
116
116
|
repeatCount: e.pulseRepeatCount,
|
|
@@ -120,53 +120,53 @@ const ha = {
|
|
|
120
120
|
keyPoints: e.pulseKeyPoints,
|
|
121
121
|
rotate: "auto"
|
|
122
122
|
}, [
|
|
123
|
-
|
|
123
|
+
M("mpath", {
|
|
124
124
|
href: `#${e.pulsePathId}`
|
|
125
|
-
}, null, 8,
|
|
126
|
-
], 8,
|
|
127
|
-
|
|
125
|
+
}, null, 8, xa)
|
|
126
|
+
], 8, wa),
|
|
127
|
+
M("animate", {
|
|
128
128
|
attributeName: "opacity",
|
|
129
129
|
values: "0;0.35;0.35;0",
|
|
130
130
|
keyTimes: "0;0.15;0.85;1",
|
|
131
131
|
dur: e.pulseDur,
|
|
132
132
|
repeatCount: e.pulseRepeatCount
|
|
133
|
-
}, null, 8,
|
|
134
|
-
], 8,
|
|
133
|
+
}, null, 8, $a)
|
|
134
|
+
], 8, ka))
|
|
135
135
|
])) : L("", !0);
|
|
136
136
|
}
|
|
137
|
-
},
|
|
137
|
+
}, We = {
|
|
138
138
|
canvas: null,
|
|
139
139
|
ctx: null
|
|
140
140
|
};
|
|
141
|
-
function
|
|
141
|
+
function Ma() {
|
|
142
142
|
if (typeof document > "u")
|
|
143
143
|
throw new Error("color-utils: document is not available (browser-only).");
|
|
144
|
-
if (!
|
|
144
|
+
if (!We.canvas) {
|
|
145
145
|
const e = document.createElement("canvas");
|
|
146
146
|
e.width = 1, e.height = 1;
|
|
147
147
|
const a = e.getContext("2d", { willReadFrequently: !0 });
|
|
148
148
|
if (!a)
|
|
149
149
|
throw new Error("color-utils: unable to get 2D canvas context.");
|
|
150
|
-
|
|
150
|
+
We.canvas = e, We.ctx = a;
|
|
151
151
|
}
|
|
152
|
-
return
|
|
152
|
+
return We.ctx;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Aa(e) {
|
|
155
155
|
return e < 0 ? 0 : e > 255 ? 255 : Math.round(e);
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function it(e) {
|
|
158
158
|
return e < 0 ? 0 : e > 1 ? 1 : e;
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Ca(e, a = null) {
|
|
161
161
|
if (typeof e != "string" || e.trim().length === 0)
|
|
162
162
|
throw new Error("colorToRgba: inputColor must be a non-empty string.");
|
|
163
163
|
const n = e.trim();
|
|
164
164
|
if (n.toLowerCase() === "transparent")
|
|
165
165
|
return { red: 0, green: 0, blue: 0, alpha: 0 };
|
|
166
|
-
const s =
|
|
166
|
+
const s = La(n, a), o = Ma();
|
|
167
167
|
o.clearRect(0, 0, 1, 1), o.fillStyle = "#000";
|
|
168
168
|
const d = o.fillStyle;
|
|
169
|
-
if (o.fillStyle = s, o.fillStyle === d && !
|
|
169
|
+
if (o.fillStyle = s, o.fillStyle === d && !_a(s))
|
|
170
170
|
throw new Error(`colorToRgba: unsupported or invalid color "${e}".`);
|
|
171
171
|
o.fillRect(0, 0, 1, 1);
|
|
172
172
|
const y = o.getImageData(0, 0, 1, 1).data;
|
|
@@ -182,33 +182,33 @@ function Mt(e, a = null) {
|
|
|
182
182
|
throw new Error("colorsToRgba: colors must be a non-empty array.");
|
|
183
183
|
const n = new Array(e.length);
|
|
184
184
|
for (let s = 0; s < e.length; s += 1)
|
|
185
|
-
n[s] =
|
|
185
|
+
n[s] = Ca(e[s], a);
|
|
186
186
|
return n;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function La(e, a = null) {
|
|
189
189
|
return e !== "currentColor" || typeof window > "u" || !a ? e : window.getComputedStyle(a).color || e;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function _a(e) {
|
|
192
192
|
const a = e.trim().toLowerCase();
|
|
193
193
|
return a === "black" || a === "#000" || a === "#000000" || a === "rgb(0, 0, 0)" || a === "rgba(0, 0, 0, 1)" || a === "rgba(0, 0, 0, 0)";
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
const a =
|
|
195
|
+
function xe(e) {
|
|
196
|
+
const a = it(e / 255);
|
|
197
197
|
return a <= 0.04045 ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4);
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
const a =
|
|
199
|
+
function lt(e) {
|
|
200
|
+
const a = it(e);
|
|
201
201
|
let n;
|
|
202
|
-
return a <= 31308e-7 ? n = a * 12.92 : n = 1.055 * Math.pow(a, 1 / 2.4) - 0.055,
|
|
202
|
+
return a <= 31308e-7 ? n = a * 12.92 : n = 1.055 * Math.pow(a, 1 / 2.4) - 0.055, Aa(n * 255);
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
const o =
|
|
204
|
+
function At(e, a, n, s) {
|
|
205
|
+
const o = it(n);
|
|
206
206
|
if (s === "linearRGB") {
|
|
207
|
-
const d =
|
|
207
|
+
const d = xe(e.red), h = xe(e.green), y = xe(e.blue), i = xe(a.red), S = xe(a.green), v = xe(a.blue), w = d + (i - d) * o, I = h + (S - h) * o, B = y + (v - y) * o;
|
|
208
208
|
return {
|
|
209
|
-
red:
|
|
210
|
-
green:
|
|
211
|
-
blue:
|
|
209
|
+
red: lt(w),
|
|
210
|
+
green: lt(I),
|
|
211
|
+
blue: lt(B),
|
|
212
212
|
alpha: e.alpha + (a.alpha - e.alpha) * o
|
|
213
213
|
};
|
|
214
214
|
}
|
|
@@ -227,41 +227,41 @@ function ae(e, a) {
|
|
|
227
227
|
const n = Math.pow(10, a);
|
|
228
228
|
return Math.round(e * n) / n;
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function ie(e) {
|
|
231
231
|
return Number.isFinite(e) ? e.toString() : "0";
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function nt(e) {
|
|
234
234
|
const n = j(e, 0, 255).toString(16);
|
|
235
235
|
return n.length === 1 ? "0" + n : n;
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Pa(e) {
|
|
238
238
|
if (typeof e != "string") return;
|
|
239
239
|
const a = Number.parseFloat(e);
|
|
240
240
|
return Number.isFinite(a) ? a : void 0;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Na(e, a, n, s = !0) {
|
|
243
243
|
const o = n - a;
|
|
244
244
|
if (o === 0) return 0;
|
|
245
245
|
const d = (e - a) / o;
|
|
246
246
|
return s ? j(d, 0, 1) : d;
|
|
247
247
|
}
|
|
248
|
-
const
|
|
249
|
-
function
|
|
248
|
+
const Ct = "http://www.w3.org/2000/svg";
|
|
249
|
+
function Ia(e) {
|
|
250
250
|
if (typeof document > "u")
|
|
251
251
|
throw new Error("SvgPathGradientAsync: document is not available (browser-only implementation).");
|
|
252
|
-
const a = document.createElementNS(
|
|
252
|
+
const a = document.createElementNS(Ct, "svg");
|
|
253
253
|
a.setAttribute("width", "0"), a.setAttribute("height", "0"), a.setAttribute("viewBox", "0 0 0 0"), a.style.position = "absolute", a.style.left = "-10000px", a.style.top = "-10000px", a.style.visibility = "hidden", a.style.pointerEvents = "none";
|
|
254
|
-
const n = document.createElementNS(
|
|
254
|
+
const n = document.createElementNS(Ct, "path");
|
|
255
255
|
return e === "M " && (e = "M 0,0"), n.setAttribute("d", e), a.appendChild(n), document.body.appendChild(a), { svgElement: a, pathElement: n };
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function rt(e) {
|
|
258
258
|
if (e)
|
|
259
259
|
try {
|
|
260
260
|
e.svgElement?.remove?.();
|
|
261
261
|
} catch {
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function Ta(e, a, n) {
|
|
265
265
|
if (typeof n == "number" && n > 0)
|
|
266
266
|
return n;
|
|
267
267
|
let s = a * 0.75;
|
|
@@ -269,70 +269,70 @@ function Na(e, a, n) {
|
|
|
269
269
|
const o = e / 2;
|
|
270
270
|
return s > o && o > 0 && (s = o), s <= 0 && (s = 1), s;
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Ra(e, a, n) {
|
|
273
273
|
if (typeof a == "number" && a >= 1)
|
|
274
274
|
return Math.floor(a);
|
|
275
275
|
const s = typeof n == "number" && n > 0 ? n : 2, o = Math.ceil(e / s);
|
|
276
276
|
return o < 1 ? 1 : o;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Ba(e, a, n, s, o, d) {
|
|
279
279
|
const h = n - a;
|
|
280
280
|
let y = Math.ceil(h / s) + 1;
|
|
281
281
|
y < 2 && (y = 2), y > d && (y = d);
|
|
282
|
-
const i = y > 1 ? h / (y - 1) : 0,
|
|
283
|
-
let v = `M ${
|
|
284
|
-
ae(
|
|
282
|
+
const i = y > 1 ? h / (y - 1) : 0, S = e.getPointAtLength(a);
|
|
283
|
+
let v = `M ${ie(ae(S.x, o))} ${ie(
|
|
284
|
+
ae(S.y, o)
|
|
285
285
|
)}`;
|
|
286
286
|
for (let w = 1; w < y; w += 1) {
|
|
287
|
-
const
|
|
288
|
-
v += ` L ${
|
|
289
|
-
ae(
|
|
287
|
+
const I = a + w * i, B = e.getPointAtLength(I);
|
|
288
|
+
v += ` L ${ie(ae(B.x, o))} ${ie(
|
|
289
|
+
ae(B.y, o)
|
|
290
290
|
)}`;
|
|
291
291
|
}
|
|
292
292
|
return v;
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function Da(e, a, n, s, o, d) {
|
|
295
295
|
const h = n - a;
|
|
296
296
|
let y = Math.ceil(h / s) + 1;
|
|
297
297
|
y < 2 && (y = 2), y > d && (y = d);
|
|
298
|
-
const i = y > 1 ? h / (y - 1) : 0,
|
|
299
|
-
let v =
|
|
300
|
-
ae(
|
|
298
|
+
const i = y > 1 ? h / (y - 1) : 0, S = e.getPointAtLength(a);
|
|
299
|
+
let v = S.x, w = S.x, I = S.y, B = S.y, W = `M ${ie(ae(S.x, o))} ${ie(
|
|
300
|
+
ae(S.y, o)
|
|
301
301
|
)}`;
|
|
302
|
-
for (let
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
ae(
|
|
302
|
+
for (let _ = 1; _ < y; _ += 1) {
|
|
303
|
+
const t = a + _ * i, E = e.getPointAtLength(t);
|
|
304
|
+
E.x < v && (v = E.x), E.x > w && (w = E.x), E.y < I && (I = E.y), E.y > B && (B = E.y), W += ` L ${ie(ae(E.x, o))} ${ie(
|
|
305
|
+
ae(E.y, o)
|
|
306
306
|
)}`;
|
|
307
307
|
}
|
|
308
308
|
return {
|
|
309
309
|
pathData: W,
|
|
310
|
-
bounds: { minX: v, maxX: w, minY:
|
|
310
|
+
bounds: { minX: v, maxX: w, minY: I, maxY: B }
|
|
311
311
|
};
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function Ea(e) {
|
|
314
314
|
if (e.length === 1) return [{ position: 0, rgba: e[0] }];
|
|
315
315
|
const a = new Array(e.length), n = e.length - 1;
|
|
316
316
|
for (let s = 0; s < e.length; s += 1)
|
|
317
317
|
a[s] = { position: s / n, rgba: e[s] };
|
|
318
318
|
return a;
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Fa(e, a, n, s) {
|
|
321
321
|
const o = j(a, 0, 1);
|
|
322
322
|
let d = s;
|
|
323
323
|
for (d < 0 && (d = 0), d > e.length - 2 && (d = e.length - 2); d > 0 && o < e[d].position; ) d -= 1;
|
|
324
324
|
for (; d < e.length - 2 && o > e[d + 1].position; ) d += 1;
|
|
325
|
-
const h = e[d], y = e[d + 1], i = y.position - h.position,
|
|
326
|
-
return
|
|
325
|
+
const h = e[d], y = e[d + 1], i = y.position - h.position, S = i > 0 ? (o - h.position) / i : 0, v = Va(h.rgba, y.rgba, S, n);
|
|
326
|
+
return st(v);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function Va(e, a, n, s) {
|
|
329
329
|
const o = j(n, 0, 1);
|
|
330
330
|
if (s === "linearRGB") {
|
|
331
|
-
const d =
|
|
331
|
+
const d = $e(e.red), h = $e(e.green), y = $e(e.blue), i = $e(a.red), S = $e(a.green), v = $e(a.blue), w = d + (i - d) * o, I = h + (S - h) * o, B = y + (v - y) * o;
|
|
332
332
|
return {
|
|
333
|
-
red:
|
|
334
|
-
green:
|
|
335
|
-
blue:
|
|
333
|
+
red: ut(w),
|
|
334
|
+
green: ut(I),
|
|
335
|
+
blue: ut(B),
|
|
336
336
|
alpha: e.alpha + (a.alpha - e.alpha) * o
|
|
337
337
|
};
|
|
338
338
|
}
|
|
@@ -343,25 +343,25 @@ function Ea(e, a, n, s) {
|
|
|
343
343
|
alpha: e.alpha + (a.alpha - e.alpha) * o
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function $e(e) {
|
|
347
347
|
const a = j(e / 255, 0, 1);
|
|
348
348
|
return a <= 0.04045 ? a / 12.92 : Math.pow((a + 0.055) / 1.055, 2.4);
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function ut(e) {
|
|
351
351
|
const a = j(e, 0, 1);
|
|
352
352
|
let n;
|
|
353
353
|
a <= 31308e-7 ? n = a * 12.92 : n = 1.055 * Math.pow(a, 1 / 2.4) - 0.055;
|
|
354
354
|
const s = Math.round(n * 255);
|
|
355
355
|
return j(s, 0, 255);
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function st(e) {
|
|
358
358
|
const a = j(e.alpha, 0, 1), n = j(Math.round(e.red), 0, 255), s = j(Math.round(e.green), 0, 255), o = j(Math.round(e.blue), 0, 255);
|
|
359
359
|
if (a >= 1)
|
|
360
|
-
return `#${
|
|
360
|
+
return `#${nt(n)}${nt(s)}${nt(o)}`;
|
|
361
361
|
const d = ae(a, 4).toString();
|
|
362
362
|
return `rgba(${n}, ${s}, ${o}, ${d})`;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function Wa(e) {
|
|
365
365
|
const a = e.fill ?? "none";
|
|
366
366
|
let n = `fill="${le(a)}"`;
|
|
367
367
|
const s = Object.keys(e);
|
|
@@ -373,10 +373,10 @@ function Fa(e) {
|
|
|
373
373
|
}
|
|
374
374
|
return n;
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function Lt(e, a, n) {
|
|
377
377
|
return `<path d="${le(e)}" stroke="${le(a)}" ${n} />`;
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function qa(e) {
|
|
380
380
|
const a = [], n = e.segmentAttributeMap.fill ?? "none";
|
|
381
381
|
a.push(`fill="${le(n)}"`), a.push(`stroke="${le(e.stroke)}"`);
|
|
382
382
|
for (const s of Object.keys(e.segmentAttributeMap)) {
|
|
@@ -386,7 +386,7 @@ function Va(e) {
|
|
|
386
386
|
}
|
|
387
387
|
return `<path d="${le(e.pathData)}" ${a.join(" ")} />`;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function _t(e, a) {
|
|
390
390
|
const n = [];
|
|
391
391
|
for (const o of Object.keys(a))
|
|
392
392
|
n.push(`${o}="${le(a[o])}"`);
|
|
@@ -395,7 +395,7 @@ function Lt(e, a) {
|
|
|
395
395
|
function le(e) {
|
|
396
396
|
return String(e).replaceAll("&", "&").replaceAll('"', """).replaceAll("<", "<").replaceAll(">", ">");
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function Ga(e, a = null, n = {}) {
|
|
399
399
|
return new Promise((s, o) => {
|
|
400
400
|
let d = null;
|
|
401
401
|
try {
|
|
@@ -406,110 +406,110 @@ function Wa(e, a = null, n = {}) {
|
|
|
406
406
|
throw new Error("SvgPathGradientAsync: colors must be a non-empty array when temperatureMode is not enabled.");
|
|
407
407
|
if ((n.returnMode ?? "string") !== "string")
|
|
408
408
|
throw new Error('SvgPathGradientAsync: only returnMode="string" is supported for the async version.');
|
|
409
|
-
const i = typeof n.decimalPlaces == "number" ? n.decimalPlaces : 3,
|
|
410
|
-
d =
|
|
411
|
-
const W = d.pathElement,
|
|
412
|
-
if (h === null && (!(
|
|
413
|
-
const
|
|
409
|
+
const i = typeof n.decimalPlaces == "number" ? n.decimalPlaces : 3, S = typeof n.flattenTolerance == "number" && n.flattenTolerance > 0 ? n.flattenTolerance : 0.25, v = n.attrs ? { ...n.attrs } : {}, w = n.groupAttrs ? { ...n.groupAttrs } : {}, I = Pa(v["stroke-width"]), B = typeof n.strokeWidth == "number" && n.strokeWidth > 0 ? n.strokeWidth : typeof I == "number" && I > 0 ? I : 1;
|
|
410
|
+
d = Ia(e);
|
|
411
|
+
const W = d.pathElement, _ = W.getTotalLength(), t = h === null ? Mt(a, n.colorReferenceElement) : [];
|
|
412
|
+
if (h === null && (!(_ > 0) || t.length === 1)) {
|
|
413
|
+
const G = st(t[0]), J = _t(
|
|
414
414
|
[
|
|
415
|
-
|
|
415
|
+
qa({
|
|
416
416
|
pathData: e,
|
|
417
|
-
stroke:
|
|
417
|
+
stroke: G,
|
|
418
418
|
segmentAttributeMap: v
|
|
419
419
|
})
|
|
420
420
|
],
|
|
421
421
|
w
|
|
422
422
|
);
|
|
423
|
-
|
|
423
|
+
rt(d), s(J);
|
|
424
424
|
return;
|
|
425
425
|
}
|
|
426
|
-
const
|
|
426
|
+
const E = n.colorSpace ?? "linearRGB";
|
|
427
427
|
if (h !== null) {
|
|
428
|
-
const
|
|
429
|
-
if (!Array.isArray(
|
|
428
|
+
const G = n.temperatureColors;
|
|
429
|
+
if (!Array.isArray(G) || G.length !== 2)
|
|
430
430
|
throw new Error("SvgPathGradientAsync: temperatureColors must be a tuple of exactly 2 colors when temperatureMode is enabled.");
|
|
431
431
|
}
|
|
432
|
-
const
|
|
433
|
-
const
|
|
434
|
-
for (let
|
|
435
|
-
|
|
436
|
-
return
|
|
437
|
-
})() : [],
|
|
438
|
-
let
|
|
439
|
-
const
|
|
440
|
-
|
|
441
|
-
const
|
|
442
|
-
let
|
|
443
|
-
const
|
|
444
|
-
let
|
|
445
|
-
const
|
|
446
|
-
const
|
|
447
|
-
for (;
|
|
448
|
-
const
|
|
449
|
-
let
|
|
450
|
-
if (
|
|
432
|
+
const Pe = h !== null ? Mt(n.temperatureColors, n.colorReferenceElement) : null, P = h === null ? (() => {
|
|
433
|
+
const G = Ea(t), J = new Array(G.length);
|
|
434
|
+
for (let q = 0; q < G.length; q += 1)
|
|
435
|
+
J[q] = { position: G[q].position, rgba: G[q].rgba };
|
|
436
|
+
return J;
|
|
437
|
+
})() : [], de = Ta(_, B, n.maxSegmentLength), ne = Ra(_, n.segments, de), X = _ / ne;
|
|
438
|
+
let re = typeof n.overlap == "number" && n.overlap >= 0 ? n.overlap : B * 0.5;
|
|
439
|
+
const V = X * 0.45;
|
|
440
|
+
re > V && (re = V);
|
|
441
|
+
const Ne = typeof n.samplePointLimitPerSegment == "number" && n.samplePointLimitPerSegment > 10 ? n.samplePointLimitPerSegment : 250, ce = Wa(v), ye = [], Ie = h !== null ? [] : null, ve = h !== null ? [] : null;
|
|
442
|
+
let me = 0;
|
|
443
|
+
const qe = h === null ? P.length - 2 : 0;
|
|
444
|
+
let Y = 0;
|
|
445
|
+
const be = () => {
|
|
446
|
+
const G = performance.now(), J = typeof n.frameBudgetMs == "number" ? n.frameBudgetMs : 8;
|
|
447
|
+
for (; Y < ne && performance.now() - G < J; ) {
|
|
448
|
+
const F = Y * X, ue = (Y + 1) * X;
|
|
449
|
+
let N = F, D = ue;
|
|
450
|
+
if (Y !== 0 && (N = F - re), Y !== ne - 1 && (D = ue + re), N = j(N, 0, _), D = j(D, 0, _), D > N)
|
|
451
451
|
if (h !== null) {
|
|
452
|
-
const
|
|
452
|
+
const T = Da(
|
|
453
453
|
W,
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
454
|
+
N,
|
|
455
|
+
D,
|
|
456
|
+
S,
|
|
457
457
|
i,
|
|
458
|
-
|
|
458
|
+
Ne
|
|
459
459
|
);
|
|
460
|
-
|
|
460
|
+
Ie.push(T.pathData), ve.push(T.bounds);
|
|
461
461
|
} else {
|
|
462
|
-
const
|
|
463
|
-
for (;
|
|
464
|
-
|
|
465
|
-
const K =
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
D,
|
|
469
|
-
ge
|
|
470
|
-
), U = Ia(
|
|
471
|
-
W,
|
|
472
|
-
B,
|
|
462
|
+
const R = (N + D) * 0.5 / _;
|
|
463
|
+
for (; me < qe && R > P[me + 1].position; )
|
|
464
|
+
me += 1;
|
|
465
|
+
const K = Fa(
|
|
466
|
+
P,
|
|
467
|
+
R,
|
|
473
468
|
E,
|
|
474
|
-
|
|
469
|
+
me
|
|
470
|
+
), U = Ba(
|
|
471
|
+
W,
|
|
472
|
+
N,
|
|
473
|
+
D,
|
|
474
|
+
S,
|
|
475
475
|
i,
|
|
476
|
-
|
|
476
|
+
Ne
|
|
477
477
|
);
|
|
478
|
-
|
|
479
|
-
|
|
478
|
+
ye.push(
|
|
479
|
+
Lt(U, K, ce)
|
|
480
480
|
);
|
|
481
481
|
}
|
|
482
|
-
|
|
482
|
+
Y += 1;
|
|
483
483
|
}
|
|
484
|
-
if (
|
|
485
|
-
requestAnimationFrame(
|
|
484
|
+
if (Y < ne) {
|
|
485
|
+
requestAnimationFrame(be);
|
|
486
486
|
return;
|
|
487
487
|
}
|
|
488
488
|
if (h !== null) {
|
|
489
|
-
let
|
|
490
|
-
for (let
|
|
491
|
-
const
|
|
492
|
-
K <
|
|
489
|
+
let F = Number.POSITIVE_INFINITY, ue = Number.NEGATIVE_INFINITY;
|
|
490
|
+
for (let T = 0; T < ve.length; T += 1) {
|
|
491
|
+
const R = ve[T], K = h === "vertical" ? R.minY : R.minX, U = h === "vertical" ? R.maxY : R.maxX;
|
|
492
|
+
K < F && (F = K), U > ue && (ue = U);
|
|
493
493
|
}
|
|
494
|
-
const
|
|
495
|
-
|
|
496
|
-
for (let
|
|
497
|
-
const
|
|
498
|
-
|
|
499
|
-
|
|
494
|
+
const N = Pe[0], D = Pe[1];
|
|
495
|
+
ye.length = 0;
|
|
496
|
+
for (let T = 0; T < ve.length; T += 1) {
|
|
497
|
+
const R = ve[T], K = h === "vertical" ? R.minY : R.minX, U = h === "vertical" ? R.maxY : R.maxX, Se = (K + U) * 0.5, he = Na(Se, F, ue, !0), Me = h === "vertical" ? At(N, D, he, E) : At(D, N, he, E), Te = st(Me), fe = Ie[T];
|
|
498
|
+
ye.push(
|
|
499
|
+
Lt(fe, Te, ce)
|
|
500
500
|
);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
const
|
|
504
|
-
|
|
503
|
+
const q = _t(ye, w);
|
|
504
|
+
rt(d), s(q);
|
|
505
505
|
};
|
|
506
|
-
requestAnimationFrame(
|
|
506
|
+
requestAnimationFrame(be);
|
|
507
507
|
} catch (h) {
|
|
508
|
-
|
|
508
|
+
rt(d), o(h);
|
|
509
509
|
}
|
|
510
510
|
});
|
|
511
511
|
}
|
|
512
|
-
const
|
|
512
|
+
const Oa = ["innerHTML"], ja = {
|
|
513
513
|
__name: "SparklineGradientPath",
|
|
514
514
|
props: {
|
|
515
515
|
svgPathData: { type: String, required: !0 },
|
|
@@ -537,7 +537,7 @@ const qa = ["innerHTML"], Ga = {
|
|
|
537
537
|
n.value = "";
|
|
538
538
|
return;
|
|
539
539
|
}
|
|
540
|
-
const h = await
|
|
540
|
+
const h = await Ga(a.svgPathData, null, {
|
|
541
541
|
segments: a.segments,
|
|
542
542
|
temperatureMode: "vertical",
|
|
543
543
|
temperatureColors: [a.highColor, a.lowColor],
|
|
@@ -551,14 +551,14 @@ const qa = ["innerHTML"], Ga = {
|
|
|
551
551
|
d === s && (n.value = h);
|
|
552
552
|
},
|
|
553
553
|
{ immediate: !0 }
|
|
554
|
-
), (o, d) => (f(), g("g", { innerHTML: n.value }, null, 8,
|
|
554
|
+
), (o, d) => (f(), g("g", { innerHTML: n.value }, null, 8, Oa));
|
|
555
555
|
}
|
|
556
|
-
},
|
|
556
|
+
}, za = ["id"], Ya = ["id"], Xa = { style: { position: "relative" } }, Ka = ["xmlns", "viewBox", "aria-describedby"], Ua = ["width", "height"], Ha = ["id"], Za = ["stop-color"], Ja = ["stop-color"], Qa = ["id"], el = ["stop-color"], tl = ["stop-color"], al = ["id"], ll = ["stop-color"], nl = ["stop-color"], rl = ["id"], ul = ["id"], ol = ["stop-color", "offset"], sl = { key: 1 }, il = ["d", "fill"], dl = ["d", "fill"], cl = ["id", "d", "stroke-width"], vl = ["d", "stroke", "stroke-width", "stroke-dasharray"], hl = ["d", "stroke", "stroke-width"], fl = ["id", "d", "stroke-width"], pl = ["d", "stroke", "stroke-width", "stroke-dasharray"], gl = ["d", "stroke", "stroke-width"], yl = ["x", "y", "width", "height", "fill", "rx"], ml = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], bl = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], kl = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], wl = ["x", "y", "font-size", "font-weight", "fill"], xl = ["x", "y", "height", "width", "onMouseenter", "onMouseleave", "onClick"], $l = {
|
|
557
557
|
key: 0,
|
|
558
558
|
style: { position: "absolute", top: "100%", left: "0", width: "100%" },
|
|
559
559
|
"data-dom-to-png-ignore": "",
|
|
560
560
|
"aria-hidden": "true"
|
|
561
|
-
},
|
|
561
|
+
}, Sl = {
|
|
562
562
|
__name: "vue-ui-sparkline",
|
|
563
563
|
props: {
|
|
564
564
|
config: {
|
|
@@ -592,11 +592,11 @@ const qa = ["innerHTML"], Ga = {
|
|
|
592
592
|
},
|
|
593
593
|
emits: ["hoverIndex", "selectDatapoint"],
|
|
594
594
|
setup(e, { emit: a }) {
|
|
595
|
-
const n =
|
|
596
|
-
function
|
|
597
|
-
return i.config?.skeletonDataset && Array.isArray(i.config.skeletonDataset) ? i.config.skeletonDataset.map((u) => ({ period: "-", value: u })) :
|
|
595
|
+
const n = yt(() => import("./PackageVersion-1BHnPIBZ.js")), s = yt(() => import("./SparkTooltip-BorBpltj.js")), { vue_ui_sparkline: o } = ra(), { isThemeValid: d, warnInvalidTheme: h } = sa(), y = ca(), i = e, S = p(() => Array.isArray(i.dataset) && i.dataset.length > 0), v = C(Yt()), w = C(null), I = C(null), B = C(null), W = C(null), _ = C(null), t = C(re());
|
|
596
|
+
function E(l) {
|
|
597
|
+
return i.config?.skeletonDataset && Array.isArray(i.config.skeletonDataset) ? i.config.skeletonDataset.map((u) => ({ period: "-", value: u })) : aa(l).map((u) => ({ period: "-", value: u }));
|
|
598
598
|
}
|
|
599
|
-
const
|
|
599
|
+
const Pe = p(() => kt({
|
|
600
600
|
defaultConfig: {
|
|
601
601
|
gradientPath: { show: !1 },
|
|
602
602
|
temperatureColors: { show: !1 },
|
|
@@ -614,23 +614,23 @@ const qa = ["innerHTML"], Ga = {
|
|
|
614
614
|
}
|
|
615
615
|
},
|
|
616
616
|
userConfig: t.value.skeletonConfig ?? {}
|
|
617
|
-
})), { loading: P, FINAL_DATASET:
|
|
618
|
-
...
|
|
617
|
+
})), { loading: P, FINAL_DATASET: de, manualLoading: ne } = ua({
|
|
618
|
+
...qt(i),
|
|
619
619
|
FINAL_CONFIG: t,
|
|
620
|
-
prepareConfig:
|
|
620
|
+
prepareConfig: re,
|
|
621
621
|
callback: () => {
|
|
622
622
|
Promise.resolve().then(async () => {
|
|
623
|
-
await te(),
|
|
623
|
+
await te(), Me();
|
|
624
624
|
});
|
|
625
625
|
},
|
|
626
|
-
skeletonDataset:
|
|
627
|
-
skeletonConfig:
|
|
626
|
+
skeletonDataset: E(12),
|
|
627
|
+
skeletonConfig: kt({
|
|
628
628
|
defaultConfig: t.value,
|
|
629
|
-
userConfig:
|
|
629
|
+
userConfig: Pe.value
|
|
630
630
|
})
|
|
631
|
-
}), { svgRef:
|
|
632
|
-
function
|
|
633
|
-
const l =
|
|
631
|
+
}), { svgRef: X } = da({ config: t.value.style.title });
|
|
632
|
+
function re() {
|
|
633
|
+
const l = at({
|
|
634
634
|
userConfig: i.config,
|
|
635
635
|
defaultConfig: o
|
|
636
636
|
});
|
|
@@ -640,12 +640,12 @@ const qa = ["innerHTML"], Ga = {
|
|
|
640
640
|
if (!d.value(l))
|
|
641
641
|
h(l), u = l;
|
|
642
642
|
else {
|
|
643
|
-
const c =
|
|
644
|
-
userConfig:
|
|
643
|
+
const c = at({
|
|
644
|
+
userConfig: va[r] || i.config,
|
|
645
645
|
defaultConfig: l
|
|
646
646
|
});
|
|
647
647
|
u = {
|
|
648
|
-
...
|
|
648
|
+
...at({
|
|
649
649
|
userConfig: i.config,
|
|
650
650
|
defaultConfig: c
|
|
651
651
|
})
|
|
@@ -655,30 +655,30 @@ const qa = ["innerHTML"], Ga = {
|
|
|
655
655
|
u = l;
|
|
656
656
|
return u;
|
|
657
657
|
}
|
|
658
|
-
const
|
|
659
|
-
function
|
|
660
|
-
if (!
|
|
661
|
-
|
|
658
|
+
const V = p(() => t.value?.style?.line.pulse || {}), Ne = p(() => `${Math.max(200, Number(V.value.durationMs) || 4e3) / 1e3}s`), ce = C(0), ye = p(() => V.value?.begin || "0ms"), Ie = C("0;1"), ve = p(() => V.value?.loop === !1 ? "1" : "indefinite"), me = p(() => V.value?.loop === !1 ? "freeze" : void 0), qe = p(() => V.value.trail.show && J.value.lengthPx || 1), Y = p(() => !!V.value?.show && !O.value && !y.value && !P.value && (m.value?.length || 0) > 1);
|
|
659
|
+
function be() {
|
|
660
|
+
if (!Y.value) {
|
|
661
|
+
ce.value = 0;
|
|
662
662
|
return;
|
|
663
663
|
}
|
|
664
|
-
const l =
|
|
664
|
+
const l = X.value;
|
|
665
665
|
if (!l) return;
|
|
666
|
-
const u = `#${
|
|
666
|
+
const u = `#${fe.value}`, r = l.querySelector?.(u);
|
|
667
667
|
if (r && typeof r.getTotalLength == "function") {
|
|
668
668
|
const c = r.getTotalLength();
|
|
669
|
-
Number.isFinite(c) && c > 0 && (
|
|
669
|
+
Number.isFinite(c) && c > 0 && (ce.value = c);
|
|
670
670
|
return;
|
|
671
671
|
}
|
|
672
672
|
requestAnimationFrame(() => {
|
|
673
673
|
const c = l.querySelector?.(u);
|
|
674
674
|
if (c && typeof c.getTotalLength == "function") {
|
|
675
675
|
const k = c.getTotalLength();
|
|
676
|
-
Number.isFinite(k) && k > 0 && (
|
|
676
|
+
Number.isFinite(k) && k > 0 && (ce.value = k);
|
|
677
677
|
}
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
|
-
const
|
|
681
|
-
const l =
|
|
680
|
+
const G = p(() => {
|
|
681
|
+
const l = V.value?.easing || "ease-in-out", u = {
|
|
682
682
|
ease: [0.25, 0.1, 0.25, 1],
|
|
683
683
|
"ease-in": [0.42, 0, 1, 1],
|
|
684
684
|
"ease-out": [0, 0, 0.58, 1],
|
|
@@ -694,11 +694,11 @@ const qa = ["innerHTML"], Ga = {
|
|
|
694
694
|
keyTimes: "0;1"
|
|
695
695
|
} : {
|
|
696
696
|
calcMode: "spline",
|
|
697
|
-
keySplines: (l === "cubic-bezier" ? Array.isArray(
|
|
697
|
+
keySplines: (l === "cubic-bezier" ? Array.isArray(V.value?.cubicBezier) && V.value.cubicBezier.length === 4 ? V.value.cubicBezier : [0.4, 0, 0.2, 1] : u[l] || u["ease-in-out"]).join(" "),
|
|
698
698
|
keyTimes: "0;1"
|
|
699
699
|
};
|
|
700
|
-
}),
|
|
701
|
-
const l =
|
|
700
|
+
}), J = p(() => {
|
|
701
|
+
const l = V.value?.trail || {}, u = t.value.style.line.strokeWidth || 1;
|
|
702
702
|
return {
|
|
703
703
|
show: l.show !== !1,
|
|
704
704
|
lengthPx: l.length,
|
|
@@ -707,25 +707,25 @@ const qa = ["innerHTML"], Ga = {
|
|
|
707
707
|
fadeIn: 0.5,
|
|
708
708
|
fadeOut: 0.2
|
|
709
709
|
};
|
|
710
|
-
}),
|
|
711
|
-
data:
|
|
710
|
+
}), q = p(() => Qe({
|
|
711
|
+
data: de.value,
|
|
712
712
|
threshold: t.value.downsample.threshold
|
|
713
713
|
}));
|
|
714
714
|
z(() => i.config, (l) => {
|
|
715
|
-
P.value || (t.value =
|
|
715
|
+
P.value || (t.value = re()), vt(), x.value.chartWidth = t.value.style.chartWidth;
|
|
716
716
|
}, { deep: !0 }), z(() => i.dataset, (l) => {
|
|
717
|
-
Array.isArray(l) && l.length > 0 && (
|
|
718
|
-
data:
|
|
717
|
+
Array.isArray(l) && l.length > 0 && (ne.value = !1), F.value = Qe({
|
|
718
|
+
data: de.value.map((u) => ({
|
|
719
719
|
...u,
|
|
720
720
|
value: [void 0].includes(u.value) ? null : u.value
|
|
721
721
|
})),
|
|
722
722
|
threshold: t.value.downsample.threshold
|
|
723
723
|
});
|
|
724
724
|
}, { deep: !0 });
|
|
725
|
-
const
|
|
726
|
-
function
|
|
727
|
-
return
|
|
728
|
-
data:
|
|
725
|
+
const F = C(ue());
|
|
726
|
+
function ue() {
|
|
727
|
+
return Qe({
|
|
728
|
+
data: de.value.map((l) => t.value.style.animation.show && de.value.length > 1 ? {
|
|
729
729
|
...l,
|
|
730
730
|
value: null
|
|
731
731
|
} : {
|
|
@@ -735,105 +735,105 @@ const qa = ["innerHTML"], Ga = {
|
|
|
735
735
|
threshold: t.value.downsample.threshold
|
|
736
736
|
});
|
|
737
737
|
}
|
|
738
|
-
const
|
|
739
|
-
const u = (
|
|
738
|
+
const N = mt(null), D = mt(null), T = C(!1), R = C(0), K = C([]), U = C(""), Se = p(() => {
|
|
739
|
+
const u = (q.value || []).map((k) => `${k.period}::${Number.isFinite(k.value) ? k.value : 0}`).join("|"), r = t.value?.style?.animation || {}, c = !!t.value?.gradientPath?.show && !t.value.temperatureColors.show;
|
|
740
740
|
return `${u}#${!!r.show}#${r.animationFrames || 0}#${c}`;
|
|
741
741
|
});
|
|
742
|
-
function
|
|
743
|
-
|
|
742
|
+
function he() {
|
|
743
|
+
R.value && (cancelAnimationFrame(R.value), R.value = 0), K.value.forEach((l) => clearTimeout(l)), K.value = [], T.value = !1;
|
|
744
744
|
}
|
|
745
|
-
function
|
|
746
|
-
const l = t.value?.style?.animation || {}, u =
|
|
747
|
-
if (r && r ===
|
|
745
|
+
function Me() {
|
|
746
|
+
const l = t.value?.style?.animation || {}, u = q.value || [], r = Se.value, c = !!t.value.gradientPath.show && !t.value.temperatureColors.show;
|
|
747
|
+
if (r && r === U.value && (T.value || F.value.length === u.length))
|
|
748
748
|
return;
|
|
749
|
-
if (
|
|
750
|
-
|
|
749
|
+
if (he(), c || !l.show || P.value || u.length <= 1) {
|
|
750
|
+
F.value = u, U.value = r;
|
|
751
751
|
return;
|
|
752
752
|
}
|
|
753
|
-
|
|
754
|
-
const k = Math.max(1, Number(l.animationFrames) || 1),
|
|
753
|
+
T.value = !0, U.value = r, F.value = [];
|
|
754
|
+
const k = Math.max(1, Number(l.animationFrames) || 1), He = Math.max(1, Math.floor(k / u.length));
|
|
755
755
|
let ee = 0;
|
|
756
|
-
const
|
|
757
|
-
if (r !==
|
|
758
|
-
|
|
756
|
+
const De = () => {
|
|
757
|
+
if (r !== Se.value) {
|
|
758
|
+
he();
|
|
759
759
|
return;
|
|
760
760
|
}
|
|
761
761
|
if (ee < u.length) {
|
|
762
|
-
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
},
|
|
766
|
-
|
|
762
|
+
F.value.push(u[ee]);
|
|
763
|
+
const Ee = setTimeout(() => {
|
|
764
|
+
R.value = requestAnimationFrame(De);
|
|
765
|
+
}, He);
|
|
766
|
+
K.value.push(Ee), ee += 1;
|
|
767
767
|
} else
|
|
768
|
-
|
|
768
|
+
F.value = u, he();
|
|
769
769
|
};
|
|
770
|
-
|
|
770
|
+
R.value = requestAnimationFrame(De);
|
|
771
771
|
}
|
|
772
|
-
z(
|
|
773
|
-
|
|
774
|
-
}),
|
|
775
|
-
|
|
776
|
-
}),
|
|
777
|
-
|
|
772
|
+
z(Se, () => {
|
|
773
|
+
Me();
|
|
774
|
+
}), bt(() => {
|
|
775
|
+
vt(), Me();
|
|
776
|
+
}), ot(() => {
|
|
777
|
+
he();
|
|
778
778
|
});
|
|
779
|
-
const
|
|
779
|
+
const Te = C(0);
|
|
780
780
|
z(
|
|
781
781
|
() => P.value,
|
|
782
782
|
async (l) => {
|
|
783
|
-
l || (await te(),
|
|
783
|
+
l || (await te(), Te.value += 1);
|
|
784
784
|
}
|
|
785
785
|
), z(
|
|
786
|
-
() =>
|
|
786
|
+
() => T.value,
|
|
787
787
|
async (l) => {
|
|
788
|
-
l || P.value || (await te(),
|
|
788
|
+
l || P.value || (await te(), Te.value += 1);
|
|
789
789
|
}
|
|
790
790
|
);
|
|
791
|
-
const
|
|
792
|
-
async function
|
|
793
|
-
|
|
791
|
+
const fe = p(() => `sparkline_line_path_${v.value}`), Ge = C(!0);
|
|
792
|
+
async function dt() {
|
|
793
|
+
Ge.value = !1, await te(), Ge.value = !0, await te(), be();
|
|
794
794
|
}
|
|
795
|
-
const
|
|
796
|
-
function
|
|
797
|
-
if (
|
|
795
|
+
const ct = p(() => !!t.value.debug);
|
|
796
|
+
function vt() {
|
|
797
|
+
if (wt(i.dataset) ? (xt({
|
|
798
798
|
componentName: "VueUiSparkline",
|
|
799
799
|
type: "dataset",
|
|
800
|
-
debug:
|
|
801
|
-
}),
|
|
802
|
-
|
|
800
|
+
debug: ct.value
|
|
801
|
+
}), ne.value = !0) : i.dataset.forEach((l, u) => {
|
|
802
|
+
Xt({
|
|
803
803
|
datasetObject: l,
|
|
804
804
|
requiredAttributes: ["period", "value"]
|
|
805
805
|
}).forEach((r) => {
|
|
806
|
-
|
|
806
|
+
xt({
|
|
807
807
|
componentName: "VueUiSparkline",
|
|
808
808
|
type: "datasetSerieAttribute",
|
|
809
809
|
property: r,
|
|
810
810
|
index: u,
|
|
811
|
-
debug:
|
|
811
|
+
debug: ct.value
|
|
812
812
|
});
|
|
813
813
|
});
|
|
814
|
-
}),
|
|
815
|
-
const l =
|
|
816
|
-
const { width: u, height: r } =
|
|
814
|
+
}), wt(i.dataset) || (ne.value = t.value.loading), t.value.responsive) {
|
|
815
|
+
const l = la(() => {
|
|
816
|
+
const { width: u, height: r } = na({
|
|
817
817
|
chart: w.value,
|
|
818
|
-
title: t.value.style.title.show && i.showInfo ?
|
|
819
|
-
source:
|
|
818
|
+
title: t.value.style.title.show && i.showInfo ? I.value : null,
|
|
819
|
+
source: B.value
|
|
820
820
|
});
|
|
821
821
|
requestAnimationFrame(() => {
|
|
822
822
|
x.value.width = u, x.value.height = r, x.value.chartWidth = t.value.style.chartWidth / 500 * u, x.value.padding = i.forcedPadding / 500 * u;
|
|
823
823
|
});
|
|
824
824
|
});
|
|
825
|
-
|
|
825
|
+
N.value && (D.value && N.value.unobserve(D.value), N.value.disconnect()), N.value = new ResizeObserver(l), D.value = w.value.parentNode, N.value.observe(D.value);
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
|
-
|
|
829
|
-
|
|
828
|
+
ot(() => {
|
|
829
|
+
N.value && (D.value && N.value.unobserve(D.value), N.value.disconnect());
|
|
830
830
|
});
|
|
831
831
|
const x = C({
|
|
832
832
|
height: 80 * i.heightRatio,
|
|
833
833
|
width: 500,
|
|
834
834
|
chartWidth: t.value.style.chartWidth,
|
|
835
835
|
padding: i.forcedPadding
|
|
836
|
-
}),
|
|
836
|
+
}), Re = a, A = p(() => {
|
|
837
837
|
const { top: l, right: u, bottom: r, left: c } = t.value.style.padding;
|
|
838
838
|
return {
|
|
839
839
|
top: l,
|
|
@@ -844,30 +844,30 @@ const qa = ["innerHTML"], Ga = {
|
|
|
844
844
|
width: i.showInfo && t.value.style.dataLabel.show ? x.value.chartWidth - c - u : x.value.width - x.value.padding - c - u,
|
|
845
845
|
height: x.value.height - l - r
|
|
846
846
|
};
|
|
847
|
-
}), Oe = p(() => [null, void 0].includes(t.value.style.scaleMin) ? Math.min(...
|
|
847
|
+
}), Oe = p(() => [null, void 0].includes(t.value.style.scaleMin) ? Math.min(...F.value.map((l) => isNaN(l.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(l.value) ? 0 : l.value || 0)) : t.value.style.scaleMin), Pt = p(() => [null, void 0].includes(t.value.style.scaleMax) ? Math.max(...F.value.map((l) => isNaN(l.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(l.value) ? 0 : l.value || 0)) : t.value.style.scaleMax), Ae = p(() => {
|
|
848
848
|
const l = Oe.value >= 0 ? 0 : Oe.value;
|
|
849
849
|
return Math.abs(l);
|
|
850
|
-
}),
|
|
850
|
+
}), ht = p(() => Pt.value + Ae.value), ke = p(() => A.value.bottom - A.value.height * je(Ae.value));
|
|
851
851
|
function je(l) {
|
|
852
|
-
return isNaN(l /
|
|
852
|
+
return isNaN(l / ht.value) ? 0 : l / ht.value;
|
|
853
853
|
}
|
|
854
|
-
const
|
|
855
|
-
let
|
|
856
|
-
|
|
857
|
-
const l = ++
|
|
854
|
+
const we = p(() => q.value.length - 1 || 1), Ce = C([]);
|
|
855
|
+
let ft = 0;
|
|
856
|
+
Gt(() => {
|
|
857
|
+
const l = ++ft;
|
|
858
858
|
(async () => {
|
|
859
|
-
const u = await
|
|
860
|
-
values:
|
|
861
|
-
maxDatapoints:
|
|
859
|
+
const u = await ia({
|
|
860
|
+
values: q.value.map((r) => r.period),
|
|
861
|
+
maxDatapoints: q.value.length,
|
|
862
862
|
formatter: t.value.style.dataLabel.datetimeFormatter,
|
|
863
863
|
start: 0,
|
|
864
|
-
end:
|
|
864
|
+
end: q.value.length
|
|
865
865
|
});
|
|
866
|
-
l ===
|
|
866
|
+
l === ft && (Ce.value = u);
|
|
867
867
|
})();
|
|
868
868
|
});
|
|
869
|
-
const m = p(() =>
|
|
870
|
-
const r = isNaN(l.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(l.value) ? 0 : l.value || 0, c = A.value.width /
|
|
869
|
+
const m = p(() => F.value.map((l, u) => {
|
|
870
|
+
const r = isNaN(l.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(l.value) ? 0 : l.value || 0, c = A.value.width / we.value;
|
|
871
871
|
return {
|
|
872
872
|
value: l.value,
|
|
873
873
|
absoluteValue: r,
|
|
@@ -877,30 +877,30 @@ const qa = ["innerHTML"], Ga = {
|
|
|
877
877
|
x: A.value.start + u * c,
|
|
878
878
|
y: A.value.bottom - A.value.height * je(r + Ae.value),
|
|
879
879
|
id: `plot_${v.value}_${u}`,
|
|
880
|
-
color: O.value ? t.value.style.bar.color : t.value.style.area.useGradient ?
|
|
880
|
+
color: O.value ? t.value.style.bar.color : t.value.style.area.useGradient ? Fe(t.value.style.line.color, 0.05 * (1 - u / we.value)) : t.value.style.line.color,
|
|
881
881
|
width: c
|
|
882
882
|
};
|
|
883
|
-
})),
|
|
883
|
+
})), Nt = p(() => i.selectedIndex !== void 0 && i.selectedIndex !== null && i.selectedIndex >= 0 && i.selectedIndex < m.value.length ? i.selectedIndex : _.value !== void 0 && _.value !== null && _.value >= 0 && _.value < m.value.length ? _.value : null), It = p(() => {
|
|
884
884
|
const l = { x: m.value[0].x || 0, y: (x.value.height || 0) - 6 }, u = { x: m.value[m.value.length - 1].x || 0, y: (x.value.height || 0) - 6 }, r = [];
|
|
885
885
|
return m.value.forEach((c) => {
|
|
886
886
|
r.push(`${c.x || 0},${c.y || 0} `);
|
|
887
887
|
}), [l.x, l.y, ...r, u.x, u.y].toString();
|
|
888
|
-
}), $ = C(void 0),
|
|
889
|
-
function
|
|
890
|
-
t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: l, seriesIndex: u }), W.value = u, $.value = l,
|
|
888
|
+
}), $ = C(void 0), oe = C(void 0);
|
|
889
|
+
function ze(l, u) {
|
|
890
|
+
t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: l, seriesIndex: u }), _.value = u, W.value = u, $.value = l, oe.value || (oe.value = l), Re("hoverIndex", { index: u });
|
|
891
891
|
}
|
|
892
|
-
function
|
|
893
|
-
t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: l, seriesIndex: u }),
|
|
892
|
+
function Tt(l, u) {
|
|
893
|
+
t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: l, seriesIndex: u }), oe.value = $.value, $.value = void 0, _.value = null, W.value = null, Re("hoverIndex", { index: void 0 });
|
|
894
894
|
}
|
|
895
|
-
const
|
|
896
|
-
if (
|
|
895
|
+
const se = p(() => {
|
|
896
|
+
if (S.value) {
|
|
897
897
|
const l = m.value.map((r) => r.absoluteValue), u = l.reduce((r, c) => r + c, 0);
|
|
898
898
|
return {
|
|
899
899
|
latest: m.value[m.value.length - 1] ? m.value[m.value.length - 1].absoluteValue : 0,
|
|
900
900
|
sum: u,
|
|
901
901
|
average: u / m.value.length,
|
|
902
|
-
median:
|
|
903
|
-
trend:
|
|
902
|
+
median: Ut(l),
|
|
903
|
+
trend: Kt(m.value.map(({ x: r, y: c, absoluteValue: k }) => ({
|
|
904
904
|
x: r,
|
|
905
905
|
y: c,
|
|
906
906
|
value: k
|
|
@@ -914,72 +914,72 @@ const qa = ["innerHTML"], Ga = {
|
|
|
914
914
|
median: null,
|
|
915
915
|
trend: null
|
|
916
916
|
};
|
|
917
|
-
}),
|
|
918
|
-
function
|
|
919
|
-
t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: l, seriesIndex: u }),
|
|
917
|
+
}), pt = p(() => S.value ? t.value.style.dataLabel.valueType === "latest" ? se.value.latest : t.value.style.dataLabel.valueType === "sum" ? se.value.sum : t.value.style.dataLabel.valueType === "average" ? se.value.average : 0 : 0), O = p(() => t.value.type && t.value.type === "bar");
|
|
918
|
+
function Rt(l, u) {
|
|
919
|
+
t.value.events.datapointClick && t.value.events.datapointClick({ datapoint: l, seriesIndex: u }), Re("selectDatapoint", { datapoint: l, index: u });
|
|
920
920
|
}
|
|
921
|
-
const
|
|
921
|
+
const Be = p(() => Array.isArray(t.value.style.line.dashIndices) && t.value.style.line.dashIndices.length > 0), Ye = p(() => O.value ? "" : $t(m.value)), Xe = p(() => O.value ? "" : Ht(m.value)), Bt = p(() => O.value || !Be.value ? [] : Zt(
|
|
922
922
|
m.value,
|
|
923
923
|
t.value.style.line.dashIndices
|
|
924
|
-
)),
|
|
924
|
+
)), Dt = p(() => O.value || !Be.value ? [] : Jt(
|
|
925
925
|
m.value,
|
|
926
926
|
t.value.style.line.dashIndices
|
|
927
|
-
)),
|
|
927
|
+
)), gt = p(() => O.value || !t.value.gradientPath.show || t.value.temperatureColors.show ? "" : `M ${(t.value.style.line.smooth ? Ye.value : Xe.value) || "0,0"}`), Q = p(() => !t.value.temperatureColors.show || t.value.temperatureColors.colors.length === 0 ? null : t.value.temperatureColors.colors.map((l) => Qt(l)));
|
|
928
928
|
z(
|
|
929
929
|
() => [
|
|
930
|
-
|
|
931
|
-
|
|
930
|
+
Y.value,
|
|
931
|
+
fe.value,
|
|
932
932
|
m.value.length,
|
|
933
933
|
x.value.width,
|
|
934
934
|
x.value.height,
|
|
935
935
|
t.value?.style?.line?.smooth
|
|
936
936
|
],
|
|
937
937
|
async () => {
|
|
938
|
-
await te(),
|
|
938
|
+
await te(), be();
|
|
939
939
|
},
|
|
940
940
|
{ immediate: !0 }
|
|
941
|
-
),
|
|
942
|
-
await te(),
|
|
941
|
+
), bt(async () => {
|
|
942
|
+
await te(), be();
|
|
943
943
|
}), z(
|
|
944
944
|
() => P.value,
|
|
945
945
|
async (l) => {
|
|
946
|
-
l || await
|
|
946
|
+
l || await dt();
|
|
947
947
|
}
|
|
948
948
|
), z(
|
|
949
|
-
() =>
|
|
949
|
+
() => T.value,
|
|
950
950
|
async (l) => {
|
|
951
|
-
l || P.value || await
|
|
951
|
+
l || P.value || await dt();
|
|
952
952
|
}
|
|
953
953
|
), z(
|
|
954
954
|
() => i.selectedIndex,
|
|
955
955
|
(l) => {
|
|
956
956
|
if (l == null || l < 0 || l >= m.value.length) return;
|
|
957
957
|
const u = m.value[l];
|
|
958
|
-
u && (W.value = l,
|
|
958
|
+
u && (_.value = l, W.value = l, $.value = u);
|
|
959
959
|
}
|
|
960
960
|
);
|
|
961
|
-
const
|
|
962
|
-
function
|
|
963
|
-
W.value = null, $.value ||
|
|
961
|
+
const Ke = C(!1);
|
|
962
|
+
function Et() {
|
|
963
|
+
W.value = null, $.value || ze(m.value.at(-1), m.value.length - 1), Ke.value = !0;
|
|
964
964
|
}
|
|
965
|
-
function
|
|
966
|
-
W.value = null,
|
|
965
|
+
function Ft() {
|
|
966
|
+
W.value = null, oe.value = $.value, $.value = void 0, Re("hoverIndex", { index: void 0 }), Ke.value = !1;
|
|
967
967
|
}
|
|
968
|
-
function
|
|
969
|
-
if (!
|
|
970
|
-
|
|
968
|
+
function Vt(l) {
|
|
969
|
+
if (!X.value || document.activeElement !== X.value) return;
|
|
970
|
+
oe.value = $.value;
|
|
971
971
|
const u = l.key === "ArrowLeft", r = l.key === "ArrowRight";
|
|
972
972
|
if (!u && !r) return;
|
|
973
973
|
const c = m.value.length;
|
|
974
974
|
if (!c) return;
|
|
975
975
|
l.preventDefault(), l.stopPropagation();
|
|
976
976
|
let k = W.value;
|
|
977
|
-
const
|
|
978
|
-
|
|
979
|
-
const
|
|
980
|
-
|
|
977
|
+
const He = k !== null && k >= 0 && k < c, ee = $.value ? m.value.findIndex((Wt) => Wt.id === $.value.id) : -1, De = ee !== null && ee >= 0 && ee < c;
|
|
978
|
+
He ? r ? (k += 1, k >= c && (k = 0)) : u && (k -= 1, k < 0 && (k = c - 1)) : De ? (k = r ? ee + 1 : ee - 1, k >= c && (k = 0), k < 0 && (k = c - 1)) : r ? k = 0 : k = c - 1;
|
|
979
|
+
const Ee = m.value[k];
|
|
980
|
+
Ee && (W.value = k, ze(Ee, k));
|
|
981
981
|
}
|
|
982
|
-
const
|
|
982
|
+
const Ue = p(() => {
|
|
983
983
|
const l = [
|
|
984
984
|
t.value.translations.period,
|
|
985
985
|
t.value.translations.value
|
|
@@ -993,52 +993,52 @@ const qa = ["innerHTML"], Ga = {
|
|
|
993
993
|
id: v.value,
|
|
994
994
|
style: H(`width:100%;font-family:${t.value.style.fontFamily};`)
|
|
995
995
|
}, [
|
|
996
|
-
|
|
996
|
+
M("p", {
|
|
997
997
|
id: `chart-instructions-${v.value}`,
|
|
998
998
|
class: "sr-only"
|
|
999
|
-
}, Le(t.value.a11y.translations.keyboardNavigation), 9,
|
|
1000
|
-
|
|
999
|
+
}, Le(t.value.a11y.translations.keyboardNavigation), 9, Ya),
|
|
1000
|
+
Ue.value?.rows?.length ? (f(), _e(ha, {
|
|
1001
1001
|
key: 0,
|
|
1002
1002
|
uid: v.value,
|
|
1003
|
-
head:
|
|
1004
|
-
body:
|
|
1003
|
+
head: Ue.value.headers,
|
|
1004
|
+
body: Ue.value.rows,
|
|
1005
1005
|
notice: t.value.a11y.translations.tableAvailable,
|
|
1006
1006
|
caption: t.value.a11y.translations.tableCaption
|
|
1007
1007
|
}, null, 8, ["uid", "head", "body", "notice", "caption"])) : L("", !0),
|
|
1008
|
-
|
|
1008
|
+
pe(l.$slots, "before", Ze(Je({
|
|
1009
1009
|
selected: $.value,
|
|
1010
|
-
latest:
|
|
1011
|
-
sum:
|
|
1012
|
-
average:
|
|
1013
|
-
median:
|
|
1014
|
-
trend:
|
|
1010
|
+
latest: se.value.latest,
|
|
1011
|
+
sum: se.value.sum,
|
|
1012
|
+
average: se.value.average,
|
|
1013
|
+
median: se.value.median,
|
|
1014
|
+
trend: se.value.trend
|
|
1015
1015
|
})), void 0, !0),
|
|
1016
1016
|
t.value.style.title.show && e.showInfo ? (f(), g("div", {
|
|
1017
1017
|
key: 1,
|
|
1018
1018
|
ref_key: "chartTitle",
|
|
1019
|
-
ref:
|
|
1019
|
+
ref: I,
|
|
1020
1020
|
class: "vue-ui-sparkline-title",
|
|
1021
1021
|
style: H(`display:flex;align-items:center;width:100%;color:${t.value.style.title.color};background:${t.value.style.backgroundColor};justify-content:${t.value.style.title.textAlign === "left" ? "flex-start" : t.value.style.title.textAlign === "right" ? "flex-end" : "center"};height:${t.value.style.title.fontSize * 2}px;font-size:${t.value.style.title.fontSize}px;font-weight:${t.value.style.title.bold ? "bold" : "normal"};`)
|
|
1022
1022
|
}, [
|
|
1023
|
-
|
|
1023
|
+
M("span", {
|
|
1024
1024
|
style: H(`padding:${t.value.style.title.textAlign === "left" ? "0 0 0 12px" : t.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
|
|
1025
1025
|
}, Le($.value ? $.value.period : t.value.style.title.text), 5)
|
|
1026
1026
|
], 4)) : L("", !0),
|
|
1027
|
-
|
|
1027
|
+
M("div", Xa, [
|
|
1028
1028
|
(f(), g("svg", {
|
|
1029
1029
|
ref_key: "svgRef",
|
|
1030
|
-
ref:
|
|
1031
|
-
xmlns: b(
|
|
1030
|
+
ref: X,
|
|
1031
|
+
xmlns: b(ea),
|
|
1032
1032
|
viewBox: `0 0 ${x.value.width} ${x.value.height}`,
|
|
1033
1033
|
style: H(`background:${t.value.style.backgroundColor};overflow:visible;direction:ltr`),
|
|
1034
1034
|
tabindex: "0",
|
|
1035
1035
|
"aria-describedby": `chart-instructions-${v.value}`,
|
|
1036
|
-
onMouseleave: u[0] || (u[0] = (r) =>
|
|
1037
|
-
onFocus:
|
|
1038
|
-
onBlur:
|
|
1039
|
-
onKeydown:
|
|
1036
|
+
onMouseleave: u[0] || (u[0] = (r) => oe.value = void 0),
|
|
1037
|
+
onFocus: Et,
|
|
1038
|
+
onBlur: Ft,
|
|
1039
|
+
onKeydown: Vt
|
|
1040
1040
|
}, [
|
|
1041
|
-
|
|
1041
|
+
Ot(b(n)),
|
|
1042
1042
|
l.$slots["chart-background"] ? (f(), g("foreignObject", {
|
|
1043
1043
|
key: 0,
|
|
1044
1044
|
x: 0,
|
|
@@ -1049,54 +1049,54 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1049
1049
|
pointerEvents: "none"
|
|
1050
1050
|
}
|
|
1051
1051
|
}, [
|
|
1052
|
-
|
|
1053
|
-
], 8,
|
|
1054
|
-
|
|
1055
|
-
|
|
1052
|
+
pe(l.$slots, "chart-background", {}, void 0, !0)
|
|
1053
|
+
], 8, Ua)) : L("", !0),
|
|
1054
|
+
M("defs", null, [
|
|
1055
|
+
M("linearGradient", {
|
|
1056
1056
|
x1: "0%",
|
|
1057
1057
|
y1: "0%",
|
|
1058
1058
|
x2: "100%",
|
|
1059
1059
|
y2: "0%",
|
|
1060
1060
|
id: `sparkline_gradient_${v.value}`
|
|
1061
1061
|
}, [
|
|
1062
|
-
|
|
1062
|
+
M("stop", {
|
|
1063
1063
|
offset: "0%",
|
|
1064
|
-
"stop-color": b(
|
|
1065
|
-
}, null, 8,
|
|
1066
|
-
|
|
1064
|
+
"stop-color": b(Ve)(b(Fe)(t.value.style.area.color, 0.05), t.value.style.area.opacity)
|
|
1065
|
+
}, null, 8, Za),
|
|
1066
|
+
M("stop", {
|
|
1067
1067
|
offset: "100%",
|
|
1068
|
-
"stop-color": b(
|
|
1069
|
-
}, null, 8,
|
|
1070
|
-
], 8,
|
|
1071
|
-
|
|
1068
|
+
"stop-color": b(Ve)(t.value.style.area.color, t.value.style.area.opacity)
|
|
1069
|
+
}, null, 8, Ja)
|
|
1070
|
+
], 8, Ha),
|
|
1071
|
+
M("linearGradient", {
|
|
1072
1072
|
x2: "0%",
|
|
1073
1073
|
y2: "100%",
|
|
1074
1074
|
id: `sparkline_bar_gradient_pos_${v.value}`
|
|
1075
1075
|
}, [
|
|
1076
|
-
|
|
1076
|
+
M("stop", {
|
|
1077
1077
|
offset: "0%",
|
|
1078
1078
|
"stop-color": t.value.style.bar.color
|
|
1079
|
-
}, null, 8,
|
|
1080
|
-
|
|
1079
|
+
}, null, 8, el),
|
|
1080
|
+
M("stop", {
|
|
1081
1081
|
offset: "100%",
|
|
1082
|
-
"stop-color": b(
|
|
1083
|
-
}, null, 8,
|
|
1084
|
-
], 8,
|
|
1085
|
-
|
|
1082
|
+
"stop-color": b(Fe)(t.value.style.bar.color, 0.05)
|
|
1083
|
+
}, null, 8, tl)
|
|
1084
|
+
], 8, Qa),
|
|
1085
|
+
M("linearGradient", {
|
|
1086
1086
|
x2: "0%",
|
|
1087
1087
|
y2: "100%",
|
|
1088
1088
|
id: `sparkline_bar_gradient_neg_${v.value}`
|
|
1089
1089
|
}, [
|
|
1090
|
-
|
|
1090
|
+
M("stop", {
|
|
1091
1091
|
offset: "0%",
|
|
1092
|
-
"stop-color": b(
|
|
1093
|
-
}, null, 8,
|
|
1094
|
-
|
|
1092
|
+
"stop-color": b(Fe)(t.value.style.bar.color, 0.05)
|
|
1093
|
+
}, null, 8, ll),
|
|
1094
|
+
M("stop", {
|
|
1095
1095
|
offset: "100%",
|
|
1096
1096
|
"stop-color": t.value.style.bar.color
|
|
1097
|
-
}, null, 8,
|
|
1098
|
-
], 8,
|
|
1099
|
-
|
|
1097
|
+
}, null, 8, nl)
|
|
1098
|
+
], 8, al),
|
|
1099
|
+
M("filter", {
|
|
1100
1100
|
id: `sparkline_pulse_glow_${v.value}`,
|
|
1101
1101
|
filterUnits: "userSpaceOnUse",
|
|
1102
1102
|
x: "-50",
|
|
@@ -1104,62 +1104,62 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1104
1104
|
width: "100",
|
|
1105
1105
|
height: "100"
|
|
1106
1106
|
}, [...u[1] || (u[1] = [
|
|
1107
|
-
|
|
1107
|
+
M("feGaussianBlur", {
|
|
1108
1108
|
in: "SourceGraphic",
|
|
1109
1109
|
stdDeviation: "3",
|
|
1110
1110
|
result: "blur"
|
|
1111
1111
|
}, null, -1),
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1112
|
+
M("feMerge", null, [
|
|
1113
|
+
M("feMergeNode", { in: "blur" }),
|
|
1114
|
+
M("feMergeNode", { in: "SourceGraphic" })
|
|
1115
1115
|
], -1)
|
|
1116
|
-
])], 8,
|
|
1116
|
+
])], 8, rl),
|
|
1117
1117
|
t.value.temperatureColors.show && Q.value ? (f(), g("linearGradient", {
|
|
1118
1118
|
key: 0,
|
|
1119
1119
|
id: `temperature_grad_sparkline_${v.value}`,
|
|
1120
1120
|
gradientTransform: "rotate(90)"
|
|
1121
1121
|
}, [
|
|
1122
|
-
(f(!0), g(Z, null,
|
|
1122
|
+
(f(!0), g(Z, null, ge(Q.value, (r, c) => (f(), g("stop", {
|
|
1123
1123
|
key: `temperature_grad_stop_${c}_${v.value}`,
|
|
1124
1124
|
"stop-color": r,
|
|
1125
|
-
offset: b(
|
|
1126
|
-
}, null, 8,
|
|
1127
|
-
], 8,
|
|
1125
|
+
offset: b(ta)(c, Q.value.length)
|
|
1126
|
+
}, null, 8, ol))), 128))
|
|
1127
|
+
], 8, ul)) : L("", !0)
|
|
1128
1128
|
]),
|
|
1129
|
-
t.value.style.area.show && !O.value && m.value[0] && m.value.length > 1 ? (f(), g("g",
|
|
1129
|
+
t.value.style.area.show && !O.value && m.value[0] && m.value.length > 1 ? (f(), g("g", sl, [
|
|
1130
1130
|
t.value.style.line.smooth ? (f(), g("path", {
|
|
1131
1131
|
key: 0,
|
|
1132
1132
|
class: "vue-ui-sparkline-area",
|
|
1133
|
-
d: `M ${m.value[0].x},${A.value.bottom} ${b(
|
|
1134
|
-
fill: t.value.style.area.useGradient ? `url(#sparkline_gradient_${v.value})` : b(
|
|
1133
|
+
d: `M ${m.value[0].x},${A.value.bottom} ${b($t)(m.value)} L ${m.value.at(-1).x},${A.value.bottom} Z`,
|
|
1134
|
+
fill: t.value.style.area.useGradient ? `url(#sparkline_gradient_${v.value})` : b(Ve)(t.value.style.area.color, t.value.style.area.opacity),
|
|
1135
1135
|
"stroke-linecap": "round",
|
|
1136
1136
|
"stroke-linejoin": "round",
|
|
1137
1137
|
style: H({
|
|
1138
1138
|
transition: b(P) ? void 0 : "all 0.2s"
|
|
1139
1139
|
})
|
|
1140
|
-
}, null, 12,
|
|
1140
|
+
}, null, 12, il)) : (f(), g("path", {
|
|
1141
1141
|
key: 1,
|
|
1142
1142
|
class: "vue-ui-sparkline-area",
|
|
1143
|
-
d: `M${
|
|
1144
|
-
fill: t.value.style.area.useGradient ? `url(#sparkline_gradient_${v.value})` : b(
|
|
1143
|
+
d: `M${It.value}Z`,
|
|
1144
|
+
fill: t.value.style.area.useGradient ? `url(#sparkline_gradient_${v.value})` : b(Ve)(t.value.style.area.color, t.value.style.area.opacity),
|
|
1145
1145
|
"stroke-linecap": "round",
|
|
1146
1146
|
"stroke-linejoin": "round",
|
|
1147
1147
|
style: H({
|
|
1148
1148
|
transition: b(P) ? void 0 : "all 0.2s"
|
|
1149
1149
|
})
|
|
1150
|
-
}, null, 12,
|
|
1150
|
+
}, null, 12, dl))
|
|
1151
1151
|
])) : L("", !0),
|
|
1152
1152
|
t.value.style.line.smooth && !O.value ? (f(), g(Z, { key: 2 }, [
|
|
1153
|
-
|
|
1154
|
-
id:
|
|
1155
|
-
d: `M ${
|
|
1153
|
+
M("path", {
|
|
1154
|
+
id: fe.value,
|
|
1155
|
+
d: `M ${Ye.value || "0,0"}`,
|
|
1156
1156
|
fill: "none",
|
|
1157
1157
|
stroke: "transparent",
|
|
1158
1158
|
"stroke-width": t.value.style.line.strokeWidth,
|
|
1159
1159
|
"stroke-linecap": "round",
|
|
1160
1160
|
"stroke-linejoin": "round"
|
|
1161
|
-
}, null, 8,
|
|
1162
|
-
|
|
1161
|
+
}, null, 8, cl),
|
|
1162
|
+
Be.value ? (f(!0), g(Z, { key: 0 }, ge(Bt.value, (r) => (f(), g("path", {
|
|
1163
1163
|
key: r.path,
|
|
1164
1164
|
class: "vue-ui-sparkline-path",
|
|
1165
1165
|
d: `M ${r.path}`,
|
|
@@ -1172,10 +1172,10 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1172
1172
|
style: H({
|
|
1173
1173
|
transition: b(P) ? void 0 : "all 0.2s"
|
|
1174
1174
|
})
|
|
1175
|
-
}, null, 12,
|
|
1175
|
+
}, null, 12, vl))), 128)) : (f(), g("path", {
|
|
1176
1176
|
key: 1,
|
|
1177
1177
|
class: "vue-ui-sparkline-path",
|
|
1178
|
-
d: `M ${
|
|
1178
|
+
d: `M ${Ye.value || "0,0"}`,
|
|
1179
1179
|
stroke: Q.value ? `url(#temperature_grad_sparkline_${v.value})` : t.value.style.line.color,
|
|
1180
1180
|
fill: "none",
|
|
1181
1181
|
"stroke-width": t.value.style.line.strokeWidth,
|
|
@@ -1184,19 +1184,19 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1184
1184
|
style: H({
|
|
1185
1185
|
transition: b(P) ? void 0 : "all 0.2s"
|
|
1186
1186
|
})
|
|
1187
|
-
}, null, 12,
|
|
1187
|
+
}, null, 12, hl))
|
|
1188
1188
|
], 64)) : L("", !0),
|
|
1189
1189
|
!t.value.style.line.smooth && !O.value ? (f(), g(Z, { key: 3 }, [
|
|
1190
|
-
|
|
1191
|
-
id:
|
|
1192
|
-
d: `M ${
|
|
1190
|
+
M("path", {
|
|
1191
|
+
id: fe.value,
|
|
1192
|
+
d: `M ${Xe.value || "0,0"}`,
|
|
1193
1193
|
fill: "none",
|
|
1194
1194
|
stroke: "transparent",
|
|
1195
1195
|
"stroke-width": t.value.style.line.strokeWidth,
|
|
1196
1196
|
"stroke-linecap": "round",
|
|
1197
1197
|
"stroke-linejoin": "round"
|
|
1198
|
-
}, null, 8,
|
|
1199
|
-
|
|
1198
|
+
}, null, 8, fl),
|
|
1199
|
+
Be.value ? (f(!0), g(Z, { key: 0 }, ge(Dt.value, (r) => (f(), g("path", {
|
|
1200
1200
|
key: r.path,
|
|
1201
1201
|
class: "vue-ui-sparkline-path",
|
|
1202
1202
|
d: `M ${r.path}`,
|
|
@@ -1209,10 +1209,10 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1209
1209
|
style: H({
|
|
1210
1210
|
transition: b(P) ? void 0 : "all 0.2s"
|
|
1211
1211
|
})
|
|
1212
|
-
}, null, 12,
|
|
1212
|
+
}, null, 12, pl))), 128)) : (f(), g("path", {
|
|
1213
1213
|
key: 1,
|
|
1214
1214
|
class: "vue-ui-sparkline-path",
|
|
1215
|
-
d: `M ${
|
|
1215
|
+
d: `M ${Xe.value || "0,0"}`,
|
|
1216
1216
|
stroke: Q.value ? `url(#temperature_grad_sparkline_${v.value})` : t.value.style.line.color,
|
|
1217
1217
|
fill: "none",
|
|
1218
1218
|
"stroke-width": t.value.style.line.strokeWidth,
|
|
@@ -1221,47 +1221,47 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1221
1221
|
style: H({
|
|
1222
1222
|
transition: b(P) ? void 0 : "all 0.2s"
|
|
1223
1223
|
})
|
|
1224
|
-
}, null, 12,
|
|
1224
|
+
}, null, 12, gl))
|
|
1225
1225
|
], 64)) : L("", !0),
|
|
1226
|
-
|
|
1226
|
+
gt.value && !Q.value ? (f(), _e(ja, {
|
|
1227
1227
|
key: 4,
|
|
1228
|
-
svgPathData:
|
|
1228
|
+
svgPathData: gt.value,
|
|
1229
1229
|
enabled: t.value.gradientPath.show && !O.value && !Q.value,
|
|
1230
1230
|
strokeWidth: t.value.style.line.strokeWidth,
|
|
1231
1231
|
highColor: t.value.gradientPath.colors.high,
|
|
1232
1232
|
lowColor: t.value.gradientPath.colors.low,
|
|
1233
1233
|
segments: t.value.gradientPath.segments
|
|
1234
1234
|
}, null, 8, ["svgPathData", "enabled", "strokeWidth", "highColor", "lowColor", "segments"])) : L("", !0),
|
|
1235
|
-
|
|
1235
|
+
Ge.value && Y.value ? (f(), _e(Sa, {
|
|
1236
1236
|
key: 5,
|
|
1237
1237
|
uid: v.value,
|
|
1238
|
-
svgRef: b(
|
|
1239
|
-
pulsePathId:
|
|
1240
|
-
pulsePathLength:
|
|
1241
|
-
pulseDur:
|
|
1242
|
-
pulseBegin:
|
|
1243
|
-
pulseRepeatCount:
|
|
1244
|
-
pulseFillMode:
|
|
1245
|
-
pulseKeyPoints:
|
|
1246
|
-
pulseMotion:
|
|
1247
|
-
pulse:
|
|
1248
|
-
pulseTrail:
|
|
1249
|
-
pulseTrailLength:
|
|
1238
|
+
svgRef: b(X),
|
|
1239
|
+
pulsePathId: fe.value,
|
|
1240
|
+
pulsePathLength: ce.value,
|
|
1241
|
+
pulseDur: Ne.value,
|
|
1242
|
+
pulseBegin: ye.value,
|
|
1243
|
+
pulseRepeatCount: ve.value,
|
|
1244
|
+
pulseFillMode: me.value,
|
|
1245
|
+
pulseKeyPoints: Ie.value,
|
|
1246
|
+
pulseMotion: G.value,
|
|
1247
|
+
pulse: V.value,
|
|
1248
|
+
pulseTrail: J.value,
|
|
1249
|
+
pulseTrailLength: qe.value,
|
|
1250
1250
|
prefersReducedMotion: b(y),
|
|
1251
1251
|
loading: b(P),
|
|
1252
1252
|
isBar: O.value
|
|
1253
1253
|
}, null, 8, ["uid", "svgRef", "pulsePathId", "pulsePathLength", "pulseDur", "pulseBegin", "pulseRepeatCount", "pulseFillMode", "pulseKeyPoints", "pulseMotion", "pulse", "pulseTrail", "pulseTrailLength", "prefersReducedMotion", "loading", "isBar"])) : L("", !0),
|
|
1254
|
-
(f(!0), g(Z, null,
|
|
1254
|
+
(f(!0), g(Z, null, ge(m.value, (r, c) => (f(), g("g", null, [
|
|
1255
1255
|
O.value ? (f(), g("rect", {
|
|
1256
1256
|
key: 0,
|
|
1257
1257
|
x: r.x - r.width / 2,
|
|
1258
|
-
y: isNaN(r.absoluteValue > 0 ? r.y :
|
|
1258
|
+
y: isNaN(r.absoluteValue > 0 ? r.y : ke.value) ? 0 : r.absoluteValue > 0 ? r.y : ke.value,
|
|
1259
1259
|
width: r.width,
|
|
1260
|
-
height: isNaN(Math.abs(r.y -
|
|
1260
|
+
height: isNaN(Math.abs(r.y - ke.value)) ? 0 : Math.abs(r.y - ke.value),
|
|
1261
1261
|
fill: r.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${v.value})` : `url(#sparkline_bar_gradient_neg_${v.value})`,
|
|
1262
1262
|
rx: t.value.style.bar.borderRadius
|
|
1263
|
-
}, null, 8,
|
|
1264
|
-
t.value.style.verticalIndicator.show && ($.value && r.id === $.value.id ||
|
|
1263
|
+
}, null, 8, yl)) : L("", !0),
|
|
1264
|
+
t.value.style.verticalIndicator.show && ($.value && r.id === $.value.id || Nt.value === c) ? (f(), g("line", {
|
|
1265
1265
|
key: 1,
|
|
1266
1266
|
x1: r.x,
|
|
1267
1267
|
x2: r.x,
|
|
@@ -1271,21 +1271,21 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1271
1271
|
"stroke-width": t.value.style.verticalIndicator.strokeWidth,
|
|
1272
1272
|
"stroke-linecap": "round",
|
|
1273
1273
|
"stroke-dasharray": t.value.style.verticalIndicator.strokeDasharray || 0
|
|
1274
|
-
}, null, 8,
|
|
1274
|
+
}, null, 8, ml)) : L("", !0)
|
|
1275
1275
|
]))), 256)),
|
|
1276
1276
|
Oe.value < 0 ? (f(), g("line", {
|
|
1277
1277
|
key: 6,
|
|
1278
1278
|
x1: A.value.start,
|
|
1279
1279
|
x2: A.value.start + A.value.width,
|
|
1280
|
-
y1: b(
|
|
1281
|
-
y2: b(
|
|
1280
|
+
y1: b(St)(ke.value, A.value.bottom),
|
|
1281
|
+
y2: b(St)(ke.value, A.value.bottom),
|
|
1282
1282
|
stroke: t.value.style.zeroLine.color,
|
|
1283
1283
|
"stroke-dasharray": t.value.style.zeroLine.strokeWidth * 2,
|
|
1284
1284
|
"stroke-width": t.value.style.zeroLine.strokeWidth,
|
|
1285
1285
|
"stroke-linecap": "round"
|
|
1286
|
-
}, null, 8,
|
|
1287
|
-
t.value.style.plot.show ? (f(!0), g(Z, { key: 7 },
|
|
1288
|
-
$.value && r.id === $.value.id || e.selectedIndex === c || b(
|
|
1286
|
+
}, null, 8, bl)) : L("", !0),
|
|
1287
|
+
t.value.style.plot.show ? (f(!0), g(Z, { key: 7 }, ge(m.value, (r, c) => (f(), g("g", null, [
|
|
1288
|
+
$.value && r.id === $.value.id || e.selectedIndex === c || b(de).length === 1 ? (f(), g("circle", {
|
|
1289
1289
|
key: 0,
|
|
1290
1290
|
cx: r.x,
|
|
1291
1291
|
cy: r.y,
|
|
@@ -1293,7 +1293,7 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1293
1293
|
fill: r.color,
|
|
1294
1294
|
stroke: t.value.style.plot.stroke,
|
|
1295
1295
|
"stroke-width": t.value.style.plot.strokeWidth
|
|
1296
|
-
}, null, 8,
|
|
1296
|
+
}, null, 8, kl)) : L("", !0)
|
|
1297
1297
|
]))), 256)) : L("", !0),
|
|
1298
1298
|
e.showInfo && t.value.style.dataLabel.show ? (f(), g("text", {
|
|
1299
1299
|
key: 8,
|
|
@@ -1302,40 +1302,40 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1302
1302
|
"font-size": t.value.style.dataLabel.fontSize,
|
|
1303
1303
|
"font-weight": t.value.style.dataLabel.bold ? "bold" : "normal",
|
|
1304
1304
|
fill: t.value.style.dataLabel.color
|
|
1305
|
-
}, Le($.value ? b(
|
|
1305
|
+
}, Le($.value ? b(et)(
|
|
1306
1306
|
t.value.style.dataLabel.formatter,
|
|
1307
1307
|
$.value.absoluteValue,
|
|
1308
|
-
b(
|
|
1308
|
+
b(tt)({ p: t.value.style.dataLabel.prefix, v: $.value.absoluteValue, s: t.value.style.dataLabel.suffix, r: t.value.style.dataLabel.roundingValue }),
|
|
1309
1309
|
{ datapoint: $.value }
|
|
1310
|
-
) : b(
|
|
1310
|
+
) : b(et)(
|
|
1311
1311
|
t.value.style.dataLabel.formatter,
|
|
1312
|
-
|
|
1313
|
-
b(
|
|
1314
|
-
)), 9,
|
|
1315
|
-
(f(!0), g(Z, null,
|
|
1316
|
-
x: r.x - (A.value.width / (
|
|
1312
|
+
pt.value,
|
|
1313
|
+
b(tt)({ p: t.value.style.dataLabel.prefix, v: pt.value, s: t.value.style.dataLabel.suffix, r: t.value.style.dataLabel.roundingValue })
|
|
1314
|
+
)), 9, wl)) : L("", !0),
|
|
1315
|
+
(f(!0), g(Z, null, ge(m.value, (r, c) => (f(), g("rect", {
|
|
1316
|
+
x: r.x - (A.value.width / (we.value + 1) > x.value.padding ? x.value.padding : A.value.width / (we.value + 1)) / 2,
|
|
1317
1317
|
y: A.value.top - 6,
|
|
1318
1318
|
height: A.value.height + 6,
|
|
1319
|
-
width: A.value.width / (
|
|
1319
|
+
width: A.value.width / (we.value + 1) > x.value.padding ? x.value.padding : A.value.width / (we.value + 1),
|
|
1320
1320
|
fill: "transparent",
|
|
1321
|
-
onMouseenter: () =>
|
|
1322
|
-
onMouseleave: () =>
|
|
1323
|
-
onClick: () =>
|
|
1324
|
-
}, null, 40,
|
|
1325
|
-
|
|
1326
|
-
], 44,
|
|
1327
|
-
l.$slots.hint ? (f(), g("div",
|
|
1328
|
-
|
|
1321
|
+
onMouseenter: () => ze(r, c),
|
|
1322
|
+
onMouseleave: () => Tt(r, c),
|
|
1323
|
+
onClick: () => Rt(r, c)
|
|
1324
|
+
}, null, 40, xl))), 256)),
|
|
1325
|
+
pe(l.$slots, "svg", { svg: x.value }, void 0, !0)
|
|
1326
|
+
], 44, Ka)),
|
|
1327
|
+
l.$slots.hint ? (f(), g("div", $l, [
|
|
1328
|
+
pe(l.$slots, "hint", Ze(Je({ hint: t.value.a11y.translations.keyboardNavigation, isVisible: Ke.value })), void 0, !0)
|
|
1329
1329
|
])) : L("", !0)
|
|
1330
1330
|
]),
|
|
1331
1331
|
$.value && t.value.style.tooltip.show ? (f(), _e(b(s), {
|
|
1332
1332
|
key: 2,
|
|
1333
1333
|
x: $.value.x,
|
|
1334
1334
|
y: $.value.y,
|
|
1335
|
-
prevX:
|
|
1336
|
-
prevY:
|
|
1335
|
+
prevX: oe.value.x,
|
|
1336
|
+
prevY: oe.value.y,
|
|
1337
1337
|
offsetY: t.value.style.plot.radius * 3 + t.value.style.tooltip.offsetY,
|
|
1338
|
-
svgRef: b(
|
|
1338
|
+
svgRef: b(X),
|
|
1339
1339
|
background: t.value.style.tooltip.backgroundColor,
|
|
1340
1340
|
color: t.value.style.tooltip.color,
|
|
1341
1341
|
fontSize: t.value.style.tooltip.fontSize,
|
|
@@ -1344,12 +1344,12 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1344
1344
|
borderRadius: t.value.style.tooltip.borderRadius,
|
|
1345
1345
|
backgroundOpacity: t.value.style.tooltip.backgroundOpacity
|
|
1346
1346
|
}, {
|
|
1347
|
-
default:
|
|
1348
|
-
|
|
1349
|
-
|
|
1347
|
+
default: jt(() => [
|
|
1348
|
+
pe(l.$slots, "tooltip", Ze(Je({ ...$.value })), () => [
|
|
1349
|
+
zt(Le($.value.period) + ": " + Le(b(et)(
|
|
1350
1350
|
t.value.style.dataLabel.formatter,
|
|
1351
1351
|
$.value.absoluteValue,
|
|
1352
|
-
b(
|
|
1352
|
+
b(tt)({
|
|
1353
1353
|
p: t.value.style.dataLabel.prefix,
|
|
1354
1354
|
v: $.value.absoluteValue,
|
|
1355
1355
|
s: t.value.style.dataLabel.suffix,
|
|
@@ -1364,17 +1364,17 @@ const qa = ["innerHTML"], Ga = {
|
|
|
1364
1364
|
l.$slots.source ? (f(), g("div", {
|
|
1365
1365
|
key: 3,
|
|
1366
1366
|
ref_key: "source",
|
|
1367
|
-
ref:
|
|
1367
|
+
ref: B,
|
|
1368
1368
|
dir: "auto"
|
|
1369
1369
|
}, [
|
|
1370
|
-
|
|
1370
|
+
pe(l.$slots, "source", {}, void 0, !0)
|
|
1371
1371
|
], 512)) : L("", !0),
|
|
1372
|
-
|
|
1373
|
-
b(P) ? (f(), _e(
|
|
1372
|
+
pe(l.$slots, "skeleton", {}, () => [
|
|
1373
|
+
b(P) ? (f(), _e(oa, { key: 0 })) : L("", !0)
|
|
1374
1374
|
], !0)
|
|
1375
|
-
], 12,
|
|
1375
|
+
], 12, za));
|
|
1376
1376
|
}
|
|
1377
|
-
},
|
|
1377
|
+
}, Fl = /* @__PURE__ */ fa(Sl, [["__scopeId", "data-v-0b583ff2"]]);
|
|
1378
1378
|
export {
|
|
1379
|
-
|
|
1379
|
+
Fl as default
|
|
1380
1380
|
};
|