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