vue-data-ui 3.22.14 → 3.23.1

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 (229) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +13 -1
  3. package/dist/{Arrow-Ci7Burxz.js → Arrow-CF0VFcBH.js} +1 -1
  4. package/dist/{BaseDraggableDialog-hyW32gLf.js → BaseDraggableDialog-LoqqwRtV.js} +2 -2
  5. package/dist/{BaseIcon-DJbOzCDs.js → BaseIcon-BfndwIWE.js} +4 -3
  6. package/dist/{BaseLegendToggle-DJU4VsLO.js → BaseLegendToggle-DZVucLnv.js} +1 -1
  7. package/dist/{BaseZoomControls-CwhpsHIL.js → BaseZoomControls-BZvCnZEi.js} +2 -2
  8. package/dist/{ColorPicker-BVWrKEQl.js → ColorPicker--ayG2YHf.js} +2 -2
  9. package/dist/{DataTable-rIsBpJMt.js → DataTable-BbKgJ5UI.js} +2 -2
  10. package/dist/HillActions-BD9j_sOU.js +187 -0
  11. package/dist/{Legend-DSPDFP3n.js → Legend-CQxUgOd-.js} +2 -2
  12. package/dist/{NonSvgPenAndPaper-DZyYthbM.js → NonSvgPenAndPaper-4ypecDg1.js} +22 -22
  13. package/dist/{PackageVersion-BUmadjVO.js → PackageVersion-D6d8SCp9.js} +1 -1
  14. package/dist/{PenAndPaper-D--sbRMA.js → PenAndPaper-DAE-tnEQ.js} +14 -14
  15. package/dist/{Shape-Dmh9jBFh.js → Shape-C21CMlWS.js} +3 -3
  16. package/dist/Slicer-CIk57nL4.js +1163 -0
  17. package/dist/{SlicerPreview-CCIb3v8u.js → SlicerPreview-wUw1hFwe.js} +384 -370
  18. package/dist/{SparkTooltip-GjWLZ39s.js → SparkTooltip-CjsbIhzi.js} +6 -6
  19. package/dist/Title-BE3qg9xl.js +87 -0
  20. package/dist/{Tooltip-CEbqzIhL.js → Tooltip-DhjyfHwz.js} +2 -2
  21. package/dist/{UserOptions-BknvMNU1.js → UserOptions-Dt98of5H.js} +2 -2
  22. package/dist/components/arrow.js +1 -1
  23. package/dist/components/vue-ui-3d-bar.js +1 -1
  24. package/dist/components/vue-ui-accordion.js +1 -1
  25. package/dist/components/vue-ui-age-pyramid.js +1 -1
  26. package/dist/components/vue-ui-annotator.js +1 -1
  27. package/dist/components/vue-ui-bullet.js +1 -1
  28. package/dist/components/vue-ui-bump.js +1 -1
  29. package/dist/components/vue-ui-candlestick.js +1 -1
  30. package/dist/components/vue-ui-carousel-table.js +1 -1
  31. package/dist/components/vue-ui-chestnut.js +1 -1
  32. package/dist/components/vue-ui-chord.js +1 -1
  33. package/dist/components/vue-ui-circle-pack.js +1 -1
  34. package/dist/components/vue-ui-cursor.js +1 -1
  35. package/dist/components/vue-ui-dag.js +1 -1
  36. package/dist/components/vue-ui-dashboard.js +1 -1
  37. package/dist/components/vue-ui-digits.js +1 -1
  38. package/dist/components/vue-ui-donut-evolution.js +1 -1
  39. package/dist/components/vue-ui-donut.js +1 -1
  40. package/dist/components/vue-ui-dumbbell.js +1 -1
  41. package/dist/components/vue-ui-flow.js +1 -1
  42. package/dist/components/vue-ui-funnel.js +1 -1
  43. package/dist/components/vue-ui-galaxy.js +1 -1
  44. package/dist/components/vue-ui-gauge.js +1 -1
  45. package/dist/components/vue-ui-geo.js +1 -1
  46. package/dist/components/vue-ui-gizmo.js +1 -1
  47. package/dist/components/vue-ui-heatmap.js +1 -1
  48. package/dist/components/vue-ui-hill.js +2 -0
  49. package/dist/components/vue-ui-history-plot.js +1 -1
  50. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  51. package/dist/components/vue-ui-icon.js +1 -1
  52. package/dist/components/vue-ui-kpi.js +1 -1
  53. package/dist/components/vue-ui-mini-loader.js +1 -1
  54. package/dist/components/vue-ui-molecule.js +1 -1
  55. package/dist/components/vue-ui-mood-radar.js +1 -1
  56. package/dist/components/vue-ui-nested-donuts.js +1 -1
  57. package/dist/components/vue-ui-onion.js +1 -1
  58. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  59. package/dist/components/vue-ui-quadrant.js +1 -1
  60. package/dist/components/vue-ui-quick-chart.js +1 -1
  61. package/dist/components/vue-ui-radar.js +1 -1
  62. package/dist/components/vue-ui-rating.js +1 -1
  63. package/dist/components/vue-ui-relation-circle.js +1 -1
  64. package/dist/components/vue-ui-ridgeline.js +1 -1
  65. package/dist/components/vue-ui-rings.js +1 -1
  66. package/dist/components/vue-ui-scatter.js +1 -1
  67. package/dist/components/vue-ui-skeleton.js +1 -1
  68. package/dist/components/vue-ui-smiley.js +1 -1
  69. package/dist/components/vue-ui-spark-trend.js +1 -1
  70. package/dist/components/vue-ui-sparkbar.js +1 -1
  71. package/dist/components/vue-ui-sparkgauge.js +1 -1
  72. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  73. package/dist/components/vue-ui-sparkline.js +1 -1
  74. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  75. package/dist/components/vue-ui-stackbar.js +1 -1
  76. package/dist/components/vue-ui-stackline.js +1 -1
  77. package/dist/components/vue-ui-strip-plot.js +1 -1
  78. package/dist/components/vue-ui-table-heatmap.js +1 -1
  79. package/dist/components/vue-ui-table-sparkline.js +1 -1
  80. package/dist/components/vue-ui-table.js +1 -1
  81. package/dist/components/vue-ui-thermometer.js +1 -1
  82. package/dist/components/vue-ui-timer.js +1 -1
  83. package/dist/components/vue-ui-tiremarks.js +1 -1
  84. package/dist/components/vue-ui-treemap.js +1 -1
  85. package/dist/components/vue-ui-vertical-bar.js +1 -1
  86. package/dist/components/vue-ui-waffle.js +1 -1
  87. package/dist/components/vue-ui-wheel.js +1 -1
  88. package/dist/components/vue-ui-word-cloud.js +1 -1
  89. package/dist/components/vue-ui-world.js +1 -1
  90. package/dist/components/vue-ui-xy-canvas.js +1 -1
  91. package/dist/components/vue-ui-xy.js +1 -1
  92. package/dist/composables.js +1 -1
  93. package/dist/{dom-to-png-BbPRUKX6.js → dom-to-png-BYIvdTe8.js} +1 -1
  94. package/dist/exposedLib-C0DPCgFj.js +28 -0
  95. package/dist/{geoProjections-BCP_PoiB.js → geoProjections-CEo3dVaL.js} +1 -1
  96. package/dist/{img-zY7_pJz1.js → img-Bnokohej.js} +1 -1
  97. package/dist/{labelUtils-DYdYmN_Q.js → labelUtils-BeVpDvTJ.js} +1 -1
  98. package/dist/{lib-C-QGo8GG.js → lib-Bttd6u5E.js} +27 -12
  99. package/dist/{package-QmuZcjWs.js → package-KvlL5CqE.js} +1 -1
  100. package/dist/{pdf-CuSS-5_j.js → pdf-CVIDfCrS.js} +1 -1
  101. package/dist/{render-common-DasqIYp9.js → render-common-oDYGTc5P.js} +21 -21
  102. package/dist/ssr/vue-ui-donut.js +1 -1
  103. package/dist/ssr/vue-ui-xy.js +1 -1
  104. package/dist/ssr.js +2 -2
  105. package/dist/style.css +1 -1
  106. package/dist/types/vue-data-ui.d.ts +496 -0
  107. package/dist/types/vue-ui-hill.d.ts +90 -0
  108. package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +122 -0
  109. package/dist/{useConfig-C0V0eG7L.js → useConfig-D3scuR88.js} +774 -477
  110. package/dist/useHints-Dq_w2E8B.js +66 -0
  111. package/dist/{useNestedProp-BYfiWVP8.js → useNestedProp-vPNvh7rV.js} +5 -3
  112. package/dist/{useObjectBindings-Djwpii4d.js → useObjectBindings-Brg8mm5J.js} +3 -2
  113. package/dist/{usePrinter-C5ordS-4.js → usePrinter-DN5bYhTG.js} +2 -2
  114. package/dist/{useSvgExport-Ba9qBr9M.js → useSvgExport-DH-FfcqQ.js} +1 -1
  115. package/dist/{useTimeLabels-B9CEuiLZ.js → useTimeLabels-d2f-W1L4.js} +2 -4
  116. package/dist/{useTooltipPosition-BsRysTrw.js → useTooltipPosition-DifeoeQW.js} +13 -13
  117. package/dist/useTransitions-g_zBREk2.js +39 -0
  118. package/dist/utils.js +14 -14
  119. package/dist/{vue-data-ui-D3jZ4lg1.js → vue-data-ui-DGWDPCwC.js} +85 -81
  120. package/dist/vue-data-ui.js +77 -76
  121. package/dist/vue-ui-3d-bar-C_Su9fve.js +1849 -0
  122. package/dist/{vue-ui-accordion-FimGHtuy.js → vue-ui-accordion-BxGriZik.js} +4 -4
  123. package/dist/vue-ui-age-pyramid-D4k1MkAL.js +1264 -0
  124. package/dist/vue-ui-annotator-CCtnM8Rv.js +2886 -0
  125. package/dist/vue-ui-bullet-DLZr2Uk8.js +724 -0
  126. package/dist/{vue-ui-bump-CG3WTTFy.js → vue-ui-bump-CcdzJZ9n.js} +334 -297
  127. package/dist/{vue-ui-candlestick-C3smYvQA.js → vue-ui-candlestick-EEEt7ORC.js} +468 -442
  128. package/dist/vue-ui-carousel-table-BicIpNAD.js +463 -0
  129. package/dist/{vue-ui-chestnut-i7FYoqi8.js → vue-ui-chestnut-BI7mC5dd.js} +523 -497
  130. package/dist/{vue-ui-chord-DCZo55QA.js → vue-ui-chord-DXaq8ZMu.js} +432 -426
  131. package/dist/vue-ui-circle-pack-XHJBMG51.js +1659 -0
  132. package/dist/{vue-ui-cursor-DEf_l0Xc.js → vue-ui-cursor-BqHr0n1Z.js} +61 -61
  133. package/dist/{vue-ui-dag-beo3-quD.js → vue-ui-dag-jMLVoQkb.js} +677 -674
  134. package/dist/vue-ui-dashboard-DVAUFETR.js +520 -0
  135. package/dist/{vue-ui-digits-BnMqGAhl.js → vue-ui-digits-Dy4gG6qm.js} +59 -51
  136. package/dist/vue-ui-donut-C0cWRLbU.js +2441 -0
  137. package/dist/{vue-ui-donut-Cr0uTWGk.js → vue-ui-donut-CYpxGBhl.js} +117 -116
  138. package/dist/{vue-ui-donut-evolution-D54NP3FP.js → vue-ui-donut-evolution-DwR47A2r.js} +534 -448
  139. package/dist/vue-ui-dumbbell-DxVbRjKR.js +1582 -0
  140. package/dist/{vue-ui-flow-CnateJjc.js → vue-ui-flow-DWaZF4FS.js} +415 -407
  141. package/dist/vue-ui-funnel-Bmpx5GHR.js +797 -0
  142. package/dist/vue-ui-galaxy-CWBP9oH9.js +1111 -0
  143. package/dist/vue-ui-gauge-ByE_txav.js +953 -0
  144. package/dist/{vue-ui-geo-DnO1RIFR.js → vue-ui-geo-ZA7CBy8f.js} +372 -357
  145. package/dist/{vue-ui-gizmo-DyxeSKIk.js → vue-ui-gizmo-SQCou0bQ.js} +57 -49
  146. package/dist/{vue-ui-heatmap-6Ja5LKYE.js → vue-ui-heatmap-CHd9gs_p.js} +473 -465
  147. package/dist/vue-ui-hill-BT183G-_.js +1768 -0
  148. package/dist/vue-ui-history-plot-BwnlC1mx.js +1723 -0
  149. package/dist/vue-ui-horizontal-bar-BUar2HUH.js +1733 -0
  150. package/dist/vue-ui-kpi-BF_9WWoo.js +104 -0
  151. package/dist/vue-ui-mini-loader-CvfukjXi.js +133 -0
  152. package/dist/vue-ui-molecule-Bi2CKHer.js +958 -0
  153. package/dist/{vue-ui-mood-radar-TWo57SKD.js → vue-ui-mood-radar-_zpbmvJs.js} +349 -341
  154. package/dist/{vue-ui-nested-donuts-W0TpPXIQ.js → vue-ui-nested-donuts-qHZAJ70u.js} +452 -416
  155. package/dist/vue-ui-onion-CB5RYIy5.js +1258 -0
  156. package/dist/vue-ui-parallel-coordinate-plot-BUwt-apg.js +1455 -0
  157. package/dist/{vue-ui-quadrant-BM9VLDcC.js → vue-ui-quadrant-CoROD3er.js} +636 -628
  158. package/dist/vue-ui-quick-chart-BcH7eY4-.js +2397 -0
  159. package/dist/{vue-ui-radar-BVz6Uq2k.js → vue-ui-radar-DGbaXGme.js} +380 -334
  160. package/dist/vue-ui-rating-Bo3zD3yW.js +360 -0
  161. package/dist/vue-ui-relation-circle-DaU1eTsG.js +925 -0
  162. package/dist/vue-ui-ridgeline-BCaGcyfk.js +1664 -0
  163. package/dist/{vue-ui-rings-DEZrfBYX.js → vue-ui-rings-BJUBn8_b.js} +450 -424
  164. package/dist/{vue-ui-scatter-owaIOpD0.js → vue-ui-scatter-Pcft1bUt.js} +721 -702
  165. package/dist/{vue-ui-skeleton-Cxszgax7.js → vue-ui-skeleton-EeJcGbCo.js} +395 -387
  166. package/dist/{vue-ui-smiley-DZBPvVeN.js → vue-ui-smiley-D0gibt5c.js} +128 -120
  167. package/dist/{vue-ui-spark-trend-CW4cLUqP.js → vue-ui-spark-trend-BRoQ7JpQ.js} +132 -117
  168. package/dist/{vue-ui-sparkbar-DeSSqv4v.js → vue-ui-sparkbar-DFp2k7-7.js} +119 -111
  169. package/dist/{vue-ui-sparkgauge-VSiPVgUQ.js → vue-ui-sparkgauge-D0Bq85Hs.js} +76 -68
  170. package/dist/vue-ui-sparkhistogram-BPln7v63.js +590 -0
  171. package/dist/{vue-ui-sparkline-DyZdAQMl.js → vue-ui-sparkline-C6Q45Dqp.js} +391 -365
  172. package/dist/vue-ui-sparkstackbar-CjK4bcQg.js +692 -0
  173. package/dist/vue-ui-stackbar-Ca8EPf3e.js +2353 -0
  174. package/dist/vue-ui-stackline-Pz5WWlWT.js +2467 -0
  175. package/dist/{vue-ui-strip-plot-BquHFKHA.js → vue-ui-strip-plot-Dw4MGDSO.js} +508 -487
  176. package/dist/vue-ui-table-Bjg-ujJu.js +1352 -0
  177. package/dist/vue-ui-table-heatmap-ljeYW8Wc.js +364 -0
  178. package/dist/{vue-ui-table-sparkline-CyGqW88t.js → vue-ui-table-sparkline-iRFmtK5S.js} +207 -181
  179. package/dist/vue-ui-thermometer-D8uiOaeA.js +777 -0
  180. package/dist/{vue-ui-timer-BVjydam-.js → vue-ui-timer-CYw983oL.js} +66 -58
  181. package/dist/vue-ui-tiremarks-CekiW2Ru.js +559 -0
  182. package/dist/vue-ui-treemap-h4VbnqPA.js +1760 -0
  183. package/dist/vue-ui-waffle-cu0w_s6L.js +1412 -0
  184. package/dist/{vue-ui-wheel-D-VVxvxY.js → vue-ui-wheel-tLvJadk5.js} +225 -217
  185. package/dist/{vue-ui-word-cloud-CcRch2t2.js → vue-ui-word-cloud-BjpGSsod.js} +440 -432
  186. package/dist/{vue-ui-world-BJq4PZqF.js → vue-ui-world-B4fCS3jN.js} +350 -342
  187. package/dist/{vue-ui-xy-D64AB5Qy.js → vue-ui-xy-7ZT9IRD8.js} +1639 -1595
  188. package/dist/{vue-ui-xy-canvas-mDqjPtxh.js → vue-ui-xy-canvas-BnLEwBpi.js} +459 -431
  189. package/dist/{vue-ui-xy-B8XBn08L.js → vue-ui-xy-gyNS0yH0.js} +216 -213
  190. package/dist/vue_ui_hill-dnltu0L-.js +368 -0
  191. package/package.json +4 -4
  192. package/dist/Slicer-JdCzBeYM.js +0 -1149
  193. package/dist/Title-Thf71-8D.js +0 -87
  194. package/dist/exposedLib-CfZhN94x.js +0 -25
  195. package/dist/useAutoSizeLabelsInsideViewbox-CSzmRywi.js +0 -50
  196. package/dist/useMountedDelay-BAjrhRJb.js +0 -14
  197. package/dist/vue-ui-3d-bar-D9-jAA5Z.js +0 -1824
  198. package/dist/vue-ui-age-pyramid-D4f-Agb7.js +0 -1246
  199. package/dist/vue-ui-annotator-P9E8hpJl.js +0 -2905
  200. package/dist/vue-ui-bullet-CKg0bShN.js +0 -709
  201. package/dist/vue-ui-carousel-table-BD_fxykj.js +0 -455
  202. package/dist/vue-ui-circle-pack--DUVDQx3.js +0 -1610
  203. package/dist/vue-ui-dashboard-mGLvP0UA.js +0 -512
  204. package/dist/vue-ui-donut-BCLG16Vb.js +0 -2418
  205. package/dist/vue-ui-dumbbell-DZ78WASa.js +0 -1564
  206. package/dist/vue-ui-funnel-DSpUMyDO.js +0 -781
  207. package/dist/vue-ui-galaxy-CxKafV1X.js +0 -1076
  208. package/dist/vue-ui-gauge-CegUK3FD.js +0 -925
  209. package/dist/vue-ui-history-plot-XOexkxeI.js +0 -1725
  210. package/dist/vue-ui-horizontal-bar-BCTdLxjK.js +0 -1689
  211. package/dist/vue-ui-kpi-EenGDZ-l.js +0 -96
  212. package/dist/vue-ui-mini-loader-CA7XxPk7.js +0 -125
  213. package/dist/vue-ui-molecule-5rpD2mlK.js +0 -932
  214. package/dist/vue-ui-onion-CDC9AGh1.js +0 -1199
  215. package/dist/vue-ui-parallel-coordinate-plot-DUOI7HoD.js +0 -1412
  216. package/dist/vue-ui-quick-chart-B8XCKef-.js +0 -2443
  217. package/dist/vue-ui-rating-B7ApWpIJ.js +0 -352
  218. package/dist/vue-ui-relation-circle-LVOR5VZ6.js +0 -917
  219. package/dist/vue-ui-ridgeline-BlyzSJHc.js +0 -1627
  220. package/dist/vue-ui-sparkhistogram-B5252IVr.js +0 -575
  221. package/dist/vue-ui-sparkstackbar-CiLgNzaI.js +0 -674
  222. package/dist/vue-ui-stackbar-Bwz6Z7M4.js +0 -2322
  223. package/dist/vue-ui-stackline-DX3YDRSg.js +0 -2427
  224. package/dist/vue-ui-table-DEhy61ln.js +0 -1339
  225. package/dist/vue-ui-table-heatmap-1LTxQfQX.js +0 -338
  226. package/dist/vue-ui-thermometer-CNvTQJUq.js +0 -769
  227. package/dist/vue-ui-tiremarks-3ZBAE8SA.js +0 -551
  228. package/dist/vue-ui-treemap-FqqXQvZw.js +0 -1727
  229. package/dist/vue-ui-waffle-B37Yx9uw.js +0 -1367
@@ -0,0 +1,2467 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { $ as t, Bt as n, D as r, Gt as i, Jt as a, Kt as o, M as s, Ot as c, P as l, Pt as u, S as d, St as f, V as p, Wt as m, X as h, _ as g, b as _, c as ee, ct as te, dt as ne, i as v, jt as re, ot as ie, pt as ae, q as oe, t as se, tt as ce, v as le, w as ue, xt as de, z as fe } from "./lib-Bttd6u5E.js";
3
+ import { n as pe, t as me } from "./useHints-Dq_w2E8B.js";
4
+ import { n as he, r as ge, t as _e } from "./useTimeLabels-d2f-W1L4.js";
5
+ import { t as ve } from "./useConfig-D3scuR88.js";
6
+ import { t as ye } from "./usePrinter-DN5bYhTG.js";
7
+ import { n as be, t as xe } from "./BaseScanner-DZvpgOjM.js";
8
+ import { t as Se } from "./useSvgExport-DH-FfcqQ.js";
9
+ import { t as Ce } from "./useNestedProp-vPNvh7rV.js";
10
+ import { t as we } from "./useThemeCheck-C43Tcqmk.js";
11
+ import { t as Te } from "./useTransitions-g_zBREk2.js";
12
+ import { t as Ee } from "./useStableElementSize-C7KADDKj.js";
13
+ import { t as De } from "./useTimeLabelCollider-AEcY4Ioe.js";
14
+ import { t as Oe } from "./img-Bnokohej.js";
15
+ import { n as ke } from "./Title-BE3qg9xl.js";
16
+ import { t as Ae } from "./Shape-C21CMlWS.js";
17
+ import { t as je } from "./_plugin-vue_export-helper-B3ysoDQm.js";
18
+ import { l as Me, t as Ne } from "./useResponsive-ZtArZtUf.js";
19
+ import { t as Pe } from "./DefGrad-DVBqDjhO.js";
20
+ import { t as Fe } from "./SlicerPreview-wUw1hFwe.js";
21
+ import { t as Ie } from "./BaseLegendToggle-DZVucLnv.js";
22
+ import { t as Le } from "./A11yDataTable-DdRsVULz.js";
23
+ import { t as Re } from "./useUserOptionState-DK-_1ddE.js";
24
+ import { t as ze } from "./useChartAccessibility-DYqac8yF.js";
25
+ import { t as Be } from "./Legend-CQxUgOd-.js";
26
+ import { t as Ve } from "./vue_ui_stackline-DQqKPA9z.js";
27
+ import { Fragment as y, Teleport as He, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createSlots as Ue, createTextVNode as We, createVNode as Ge, defineAsyncComponent as Ke, guardReactiveProps as T, mergeProps as qe, nextTick as Je, normalizeClass as Ye, normalizeProps as E, normalizeStyle as Xe, onBeforeUnmount as Ze, onMounted as Qe, openBlock as D, ref as O, renderList as k, renderSlot as A, resolveDynamicComponent as $e, shallowRef as et, toDisplayString as j, toRefs as tt, unref as M, useSlots as nt, watch as rt, watchEffect as it, withCtx as N } from "vue";
28
+ //#region src/components/vue-ui-stackline.vue
29
+ var at = /* @__PURE__ */ e({ default: () => Ht }), ot = ["id"], st = ["id"], ct = ["id"], lt = { style: { position: "relative" } }, ut = [
30
+ "aria-describedby",
31
+ "xmlns",
32
+ "viewBox"
33
+ ], dt = { key: 0 }, ft = [
34
+ "x",
35
+ "y",
36
+ "width",
37
+ "height"
38
+ ], pt = { key: 1 }, mt = [
39
+ "x1",
40
+ "x2",
41
+ "y1",
42
+ "y2",
43
+ "stroke",
44
+ "stroke-width",
45
+ "stroke-dasharray"
46
+ ], ht = [
47
+ "x1",
48
+ "x2",
49
+ "y1",
50
+ "y2",
51
+ "stroke",
52
+ "stroke-width",
53
+ "stroke-dasharray"
54
+ ], gt = [
55
+ "x1",
56
+ "x2",
57
+ "y1",
58
+ "y2",
59
+ "stroke",
60
+ "stroke-width"
61
+ ], _t = [
62
+ "x1",
63
+ "x2",
64
+ "y1",
65
+ "y2",
66
+ "stroke",
67
+ "stroke-width"
68
+ ], vt = [
69
+ "x",
70
+ "y",
71
+ "font-size",
72
+ "fill",
73
+ "font-weight"
74
+ ], yt = [
75
+ "transform",
76
+ "font-size",
77
+ "fill",
78
+ "font-weight"
79
+ ], bt = [
80
+ "x",
81
+ "y",
82
+ "width",
83
+ "height",
84
+ "stroke",
85
+ "stroke-width",
86
+ "stroke-linecap",
87
+ "stroke-linejoin",
88
+ "stroke-dasharray"
89
+ ], xt = [
90
+ "d",
91
+ "fill",
92
+ "opacity"
93
+ ], St = [
94
+ "d",
95
+ "stroke",
96
+ "stroke-width"
97
+ ], Ct = [
98
+ "x1",
99
+ "x2",
100
+ "y1",
101
+ "y2",
102
+ "stroke"
103
+ ], wt = [
104
+ "transform",
105
+ "font-size",
106
+ "font-weight",
107
+ "fill",
108
+ "text-anchor"
109
+ ], Tt = { key: 0 }, Et = { key: 1 }, Dt = [
110
+ "text-anchor",
111
+ "font-size",
112
+ "font-weight",
113
+ "fill",
114
+ "transform",
115
+ "onClick"
116
+ ], Ot = [
117
+ "text-anchor",
118
+ "font-size",
119
+ "fill",
120
+ "transform",
121
+ "innerHTML",
122
+ "onClick"
123
+ ], kt = [
124
+ "x",
125
+ "y",
126
+ "height",
127
+ "width",
128
+ "fill"
129
+ ], At = { key: 0 }, jt = [
130
+ "x1",
131
+ "x2",
132
+ "y1",
133
+ "y2",
134
+ "stroke",
135
+ "stroke-width",
136
+ "stroke-dasharray"
137
+ ], Mt = { key: 0 }, Nt = [
138
+ "transform",
139
+ "font-size",
140
+ "fill",
141
+ "font-weight"
142
+ ], Pt = [
143
+ "transform",
144
+ "font-size",
145
+ "font-weight",
146
+ "fill"
147
+ ], Ft = ["data-start", "data-end"], It = {
148
+ key: 0,
149
+ style: {
150
+ position: "absolute",
151
+ top: "100%",
152
+ left: "0",
153
+ width: "100%"
154
+ },
155
+ "data-dom-to-png-ignore": "",
156
+ "aria-hidden": "true"
157
+ }, Lt = {
158
+ key: 5,
159
+ class: "vue-data-ui-watermark"
160
+ }, Rt = ["onClick"], zt = ["innerHTML"], Bt = ["innerHTML"], Vt = ["id"], Ht = /*#__PURE__*/ je({
161
+ __name: "vue-ui-stackline",
162
+ props: {
163
+ config: {
164
+ type: Object,
165
+ default() {
166
+ return {};
167
+ }
168
+ },
169
+ dataset: {
170
+ type: Array,
171
+ default() {
172
+ return [];
173
+ }
174
+ },
175
+ selectedXIndex: {
176
+ type: Number,
177
+ default: void 0
178
+ }
179
+ },
180
+ emits: [
181
+ "selectDatapoint",
182
+ "selectLegend",
183
+ "selectTimeLabel",
184
+ "selectX",
185
+ "copyAlt"
186
+ ],
187
+ setup(e, { expose: je, emit: at }) {
188
+ let Ht = Ke(() => import("./Tooltip-DhjyfHwz.js")), Ut = Ke(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), Wt = Ke(() => import("./vue-ui-accordion-BxGriZik.js").then((e) => e.n)), Gt = Ke(() => import("./DataTable-BbKgJ5UI.js")), Kt = Ke(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), qt = Ke(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), Jt = Ke(() => import("./PackageVersion-D6d8SCp9.js").then((e) => e.t)), Yt = Ke(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), { vue_ui_stackline: Xt } = ve(), { isThemeValid: Zt, warnInvalidTheme: Qt } = we(), $t = nt(), P = e, F = at, en = b({
189
+ get() {
190
+ return !!P.dataset && P.dataset.length;
191
+ },
192
+ set(e) {
193
+ return e;
194
+ }
195
+ }), tn = O(null), I = O(oe()), nn = O(!1), L = O([]), rn = O(0), an = O(null), on = O(null), sn = O(null), cn = O(null), ln = O(null), un = O(!1), dn = O(!1), fn = O(0), pn = O(0), mn = O(0), hn = O(!1), gn = O(null), _n = O(null), vn = O(!1), yn = O(!1), bn = O(!1), xn = O(null), Sn = O(null), Cn = O(null), wn = O(null), Tn = O(null), En = et(null), Dn = O(!1), On = O(0), kn = O(0), R = O(null), An = O({
196
+ x: 0,
197
+ y: 0
198
+ }), jn = O("pointer"), Mn = Ee({
199
+ elementRef: En,
200
+ minimumWidth: 2,
201
+ minimumHeight: 2,
202
+ stableFramesRequired: 2,
203
+ once: !1,
204
+ onSizeAccepted: () => {
205
+ Fn();
206
+ }
207
+ });
208
+ function Nn() {
209
+ En.value = tn.value?.parentNode ?? null;
210
+ }
211
+ function Pn() {
212
+ return new Promise((e) => {
213
+ requestAnimationFrame(() => {
214
+ requestAnimationFrame(e);
215
+ });
216
+ });
217
+ }
218
+ async function Fn() {
219
+ let e = ++kn.value;
220
+ Dn.value = !1, await Je(), await Pn(), await Pn(), e === kn.value && (On.value += 1, Dn.value = !0);
221
+ }
222
+ let In = O(null), Ln = O(!1);
223
+ function Rn() {
224
+ Ln.value = !Ln.value;
225
+ }
226
+ Qe(() => {
227
+ Nn(), Mn.start(), hn.value = !0, cr(), Fn();
228
+ });
229
+ let z = O(Yn());
230
+ pe({
231
+ config: () => z.value,
232
+ dataset: () => P.dataset,
233
+ component: "VueUiStackline",
234
+ rules: [
235
+ me.emptyArray,
236
+ {
237
+ test: (e) => e.some((e) => e.series.length > 200),
238
+ message: [
239
+ "👀 Some series have > 200 datapoints, which can impact performance. Consider:",
240
+ "",
241
+ "▶️ Aggregating data to larger time units, to reduce the number of datapoints.",
242
+ "",
243
+ "▶️ Using filters to constraint the data to a specific time range."
244
+ ]
245
+ },
246
+ {
247
+ test: (e) => e.length > 6,
248
+ message: [
249
+ "👀 The number of series > 6, which can make the chart hard to read. Consider:",
250
+ "",
251
+ "▶️ Grouping small values into an \"Other\" category.",
252
+ "",
253
+ "▶️ Using filters to let users choose a maximum number of series to display."
254
+ ]
255
+ }
256
+ ]
257
+ });
258
+ let { transitionEnabled: zn } = Te({
259
+ config: () => z.value.transitions,
260
+ dataset: () => P.dataset
261
+ }), B = b(() => z.value.userOptions.useCursorPointer), Bn = b(() => a({
262
+ defaultConfig: {
263
+ userOptions: { show: !1 },
264
+ useCssAnimation: !1,
265
+ table: { show: !1 },
266
+ tooltip: { show: !1 },
267
+ style: { chart: {
268
+ backgroundColor: "#99999930",
269
+ lines: {
270
+ totalValues: { show: !1 },
271
+ dataLabels: { show: !1 }
272
+ },
273
+ grid: {
274
+ frame: { stroke: "#6A6A6A" },
275
+ scale: {
276
+ scaleMin: 0,
277
+ scaleMax: 144
278
+ },
279
+ x: {
280
+ axisColor: "#6A6A6A",
281
+ linesColor: "#6A6A6A",
282
+ axisName: { show: !1 },
283
+ timeLabels: { show: !1 }
284
+ },
285
+ y: {
286
+ axisColor: "#6A6A6A",
287
+ linesColor: "#6A6A6A",
288
+ axisName: { show: !1 },
289
+ axisLabels: { show: !1 }
290
+ }
291
+ },
292
+ legend: { backgroundColor: "transparent" },
293
+ padding: {
294
+ left: 24,
295
+ right: 24,
296
+ bottom: 12
297
+ },
298
+ zoom: {
299
+ show: !1,
300
+ startIndex: null,
301
+ endIndex: null,
302
+ keepState: !1
303
+ }
304
+ } }
305
+ },
306
+ userConfig: z.value.skeletonConfig ?? {}
307
+ })), { loading: Vn, FINAL_DATASET: Hn, manualLoading: Un } = be({
308
+ ...tt(P),
309
+ FINAL_CONFIG: z,
310
+ prepareConfig: Yn,
311
+ callback: () => {
312
+ Promise.resolve().then(async () => {
313
+ (!z.value.style.chart.zoom.keepState || !ei.value || q.value.start === 0 && q.value.end === 0) && await ni();
314
+ });
315
+ },
316
+ skeletonDataset: P.config?.skeletonDataset ?? [{
317
+ name: "",
318
+ series: [
319
+ 3,
320
+ 2,
321
+ 1,
322
+ 5,
323
+ 13,
324
+ 21,
325
+ 8,
326
+ 89,
327
+ 34,
328
+ 55
329
+ ],
330
+ color: "#8A8A8A"
331
+ }, {
332
+ name: "",
333
+ series: [
334
+ 1,
335
+ 2,
336
+ 3,
337
+ 5,
338
+ 8,
339
+ 13,
340
+ 21,
341
+ 34,
342
+ 55,
343
+ 89
344
+ ],
345
+ color: "#CACACA"
346
+ }],
347
+ skeletonConfig: a({
348
+ defaultConfig: z.value,
349
+ userConfig: Bn.value
350
+ })
351
+ }), { userOptionsVisible: Wn, setUserOptionsVisibility: Gn, keepUserOptionState: Kn } = Re({ config: z.value }), { svgRef: V } = ze({ config: z.value.style.chart.title });
352
+ function qn() {
353
+ vn.value = !0, Gn(!0);
354
+ }
355
+ function Jn() {
356
+ Gn(!1), vn.value = !1, R.value = null, jn.value = "pointer", nn.value = !1, $.value = null, F("selectX", {
357
+ index: null,
358
+ indexLabel: null,
359
+ dataset: null
360
+ });
361
+ }
362
+ function Yn() {
363
+ let e = Ce({
364
+ userConfig: P.config,
365
+ defaultConfig: Xt
366
+ }), t = {}, n = e.theme;
367
+ if (n) if (!Zt.value(e)) Qt(e), t = e;
368
+ else {
369
+ let r = Ce({
370
+ userConfig: Ve[n] || P.config,
371
+ defaultConfig: e
372
+ });
373
+ t = {
374
+ ...Ce({
375
+ userConfig: P.config,
376
+ defaultConfig: r
377
+ }),
378
+ customPalette: e.customPalette.length ? e.customPalette : o[n] || u
379
+ };
380
+ }
381
+ else t = e;
382
+ return t;
383
+ }
384
+ let Xn = b(() => z.value.style.chart.lines.dataLabels.hideUnderValue !== null), Zn = b(() => z.value.style.chart.lines.dataLabels.hideUnderPercentage !== null);
385
+ rt(() => P.config, (e) => {
386
+ Vn.value || (z.value = Yn()), Wn.value = !z.value.userOptions.showOnChartHover, cr({ resetSlicer: !z.value.style.chart.zoom.keepState }), fn.value += 1, pn.value += 1, mn.value += 1, H.value.dataLabels.show = z.value.style.chart.lines.dataLabels.show, H.value.showTable = z.value.table.show, H.value.showTooltip = z.value.style.chart.tooltip.show, U.value.width = z.value.style.chart.width, U.value.height = z.value.style.chart.height, U.value.paddingRatio = {
387
+ top: z.value.style.chart.padding.top / z.value.style.chart.height,
388
+ right: z.value.style.chart.padding.right / z.value.style.chart.width,
389
+ bottom: z.value.style.chart.padding.bottom / z.value.style.chart.height,
390
+ left: z.value.style.chart.padding.left / z.value.style.chart.width
391
+ }, Nn(), Fn(), !z.value.style.chart.zoom.keepState || !ei.value || q.value.start === 0 && q.value.end === 0 ? ni() : wr();
392
+ }, { deep: !0 }), rt(() => P.dataset, (e) => {
393
+ Array.isArray(e) && e.length > 0 && (Un.value = !1), z.value.style.chart.zoom.keepState ? wr() : Dr(), Nn(), Fn();
394
+ }, { deep: !0 });
395
+ let H = O({
396
+ dataLabels: { show: z.value.style.chart.lines.dataLabels.show },
397
+ showTable: z.value.table.show,
398
+ showTooltip: z.value.style.chart.tooltip.show
399
+ });
400
+ rt(z, () => {
401
+ H.value = {
402
+ dataLabels: { show: z.value.style.chart.lines.dataLabels.show },
403
+ showTable: z.value.table.show,
404
+ showTooltip: z.value.style.chart.tooltip.show
405
+ };
406
+ }, { immediate: !0 });
407
+ let { isPrinting: Qn, isImaging: $n, generatePdf: er, generateImage: tr } = ye({
408
+ elementId: `stackline_${I.value}`,
409
+ fileName: z.value.style.chart.title.text || "vue-ui-stackline",
410
+ options: z.value.userOptions.print
411
+ }), nr = b(() => z.value.userOptions.show && !z.value.style.chart.title.text), U = O({
412
+ width: z.value.style.chart.width,
413
+ height: z.value.style.chart.height,
414
+ paddingRatio: {
415
+ top: z.value.style.chart.padding.top / z.value.style.chart.height,
416
+ right: z.value.style.chart.padding.right / z.value.style.chart.width,
417
+ bottom: z.value.style.chart.padding.bottom / z.value.style.chart.height,
418
+ left: z.value.style.chart.padding.left / z.value.style.chart.width
419
+ }
420
+ }), rr = b(() => ue(z.value.customPalette)), ir = et(null), ar = et(null), or = O(null), sr = b(() => !!z.value.debug);
421
+ function cr({ resetSlicer: e = !0 } = {}) {
422
+ if (re(P.dataset) ? (ce({
423
+ componentName: "VueUiStackline",
424
+ type: "dataset",
425
+ debug: sr.value
426
+ }), Un.value = !0) : P.dataset.forEach((e, t) => {
427
+ ae({
428
+ datasetObject: e,
429
+ requiredAttributes: ["name", "series"]
430
+ }).forEach((e) => {
431
+ en.value = !1, ce({
432
+ componentName: "VueUiStackline",
433
+ type: "datasetSerieAttribute",
434
+ property: e,
435
+ index: t,
436
+ debug: sr.value
437
+ }), Un.value = !0;
438
+ });
439
+ }), re(P.dataset) || (Un.value = z.value.loading), setTimeout(() => {
440
+ dn.value = !0;
441
+ }, 10), z.value.responsive) {
442
+ let e = Me(() => {
443
+ dn.value = !1;
444
+ let { width: e, height: t } = Ne({
445
+ chart: tn.value,
446
+ noTitle: cn.value,
447
+ title: z.value.style.chart.title.text ? an.value : null,
448
+ legend: z.value.style.chart.legend.show ? on.value : null,
449
+ slicer: z.value.style.chart.zoom.show && K.value > 6 ? sn.value.$el : null,
450
+ source: ln.value
451
+ });
452
+ requestAnimationFrame(() => {
453
+ U.value.width = e, U.value.height = t - 12, clearTimeout(or.value), or.value = setTimeout(() => {
454
+ dn.value = !0;
455
+ }, 10);
456
+ });
457
+ });
458
+ ir.value && (ar.value && ir.value.unobserve(ar.value), ir.value.disconnect()), ir.value = new ResizeObserver(e), ar.value = tn.value.parentNode, ir.value.observe(ar.value);
459
+ }
460
+ e && ni();
461
+ }
462
+ Ze(() => {
463
+ Mn.stop(), ir.value && (ar.value && ir.value.unobserve(ar.value), ir.value.disconnect());
464
+ });
465
+ let lr = b(() => z.value.style.chart.grid.y.position === "right");
466
+ function ur() {
467
+ let e = 0;
468
+ Cn.value && (e = Array.from(Cn.value.querySelectorAll("text")).reduce((e, t) => {
469
+ let n = t.getComputedTextLength();
470
+ return n > e ? n : e;
471
+ }, 0));
472
+ let t = Sn.value ? Sn.value.getBoundingClientRect().width + z.value.style.chart.grid.y.axisName.fontSize + z.value.style.chart.grid.y.axisName.offsetX : 0;
473
+ return {
474
+ left: lr.value ? 0 : e + t,
475
+ right: lr.value ? e + t : 0,
476
+ scaleLabelsWidth: e,
477
+ yAxisLabelWidth: t
478
+ };
479
+ }
480
+ let dr = O(0), fr = O(0), pr = O(0);
481
+ function mr() {
482
+ let e = wn.value;
483
+ if (!e) {
484
+ fr.value = 0;
485
+ return;
486
+ }
487
+ try {
488
+ let t = e.getBBox();
489
+ fr.value = Number.isFinite(t?.height) ? t.height : 0;
490
+ } catch {
491
+ fr.value = 0;
492
+ }
493
+ }
494
+ function hr() {
495
+ pr.value && cancelAnimationFrame(pr.value), pr.value = requestAnimationFrame(() => {
496
+ requestAnimationFrame(() => {
497
+ mr();
498
+ });
499
+ });
500
+ }
501
+ Ze(() => {
502
+ pr.value && cancelAnimationFrame(pr.value), fr.value = 0, dr.value = 0;
503
+ });
504
+ let gr = b(() => {
505
+ let e = 0;
506
+ if (xn.value) try {
507
+ e = xn.value.getBBox().height;
508
+ } catch {
509
+ e = 0;
510
+ }
511
+ let t = z.value.style.chart.grid.x.timeLabels.show ? fr.value : 0;
512
+ return e + t;
513
+ }), W = b(() => {
514
+ On.value;
515
+ let { height: e, width: t } = U.value, { right: n } = U.value.paddingRatio, r = z.value.style.chart.lines.totalValues.show && P.dataset && P.dataset.length > 1 ? z.value.style.chart.lines.totalValues.fontSize * 1.3 : 0, i = 0, a = 0, o = 0, s = 0;
516
+ if (z.value.style.chart.grid.y.axisLabels.show) {
517
+ let e = ur();
518
+ i = e.left, a = e.right, o = e.scaleLabelsWidth, s = e.yAxisLabelWidth;
519
+ }
520
+ let c = z.value.style.chart.padding.top + r, l = t - t * n - dr.value - a, u = e - z.value.style.chart.padding.bottom - gr.value - r, d = z.value.style.chart.padding.left + i, f = t - d - t * n - dr.value - a, p = e - c - z.value.style.chart.padding.bottom - gr.value - r;
521
+ return {
522
+ chartHeight: Math.max(0, e),
523
+ chartWidth: Math.max(0, t),
524
+ top: c,
525
+ right: Math.max(0, l),
526
+ bottom: Math.max(0, u),
527
+ left: Math.max(0, d),
528
+ width: Math.max(0, f),
529
+ height: Math.max(0, p),
530
+ offsetLeftAxis: i,
531
+ offsetRightAxis: a,
532
+ scaleLabelsWidth: o,
533
+ yAxisLabelWidth: s
534
+ };
535
+ }), _r = b(() => {
536
+ let { left: e, top: t, width: n, height: r } = W.value, i = q.value.start, a = q.value.end, o = Math.max(1, a - i), s = Math.max(0, Math.min(o, (J.value.start ?? i) - i)), c = Math.max(0, Math.min(o, (J.value.end ?? a) - i)), l = Math.max(0, c - s), u = {
537
+ fill: z.value.style.chart.zoom.preview.fill,
538
+ stroke: z.value.style.chart.zoom.preview.stroke,
539
+ "stroke-width": z.value.style.chart.zoom.preview.strokeWidth,
540
+ "stroke-dasharray": z.value.style.chart.zoom.preview.strokeDasharray,
541
+ "stroke-linecap": "round",
542
+ "stroke-linejoin": "round",
543
+ style: {
544
+ pointerEvents: "none",
545
+ transition: "none !important",
546
+ animation: "none !important"
547
+ }
548
+ }, d = n / o;
549
+ return {
550
+ x: e + s * d,
551
+ y: t,
552
+ width: l * d,
553
+ height: r,
554
+ ...u
555
+ };
556
+ }), G = b(() => Hn.value.map((e, t) => {
557
+ let n = oe(), r = d(e.color) || rr.value[t] || u[t] || u[t % u.length];
558
+ return {
559
+ ...e,
560
+ shape: e.shape || "circle",
561
+ standalone: !!e.standalone,
562
+ series: JSON.parse(JSON.stringify(e.series)).map((e) => z.value.style.chart.lines.distributed ? Math.abs(e) : e),
563
+ seriesSource: e.series,
564
+ signedSeries: e.series.map((e) => e >= 0 ? 1 : -1),
565
+ absoluteIndex: t,
566
+ id: n,
567
+ color: r
568
+ };
569
+ })), vr = b(() => G.value.filter((e) => !L.value.includes(e.id) && !e.standalone)), yr = b(() => G.value.filter((e) => !L.value.includes(e.id) && e.standalone)), K = b(() => {
570
+ let e = Math.max(...G.value.filter((e) => !L.value.includes(e.id)).map((e) => e.series.length));
571
+ return isFinite(e) ? e : Math.max(...G.value.map((e) => e.series.length));
572
+ });
573
+ function br(e) {
574
+ In.value = e;
575
+ }
576
+ let q = O({
577
+ start: 0,
578
+ end: Math.max(...Hn.value.map((e) => e.series.length))
579
+ }), J = O({
580
+ start: 0,
581
+ end: Math.max(...Hn.value.map((e) => e.series.length))
582
+ });
583
+ function xr(e) {
584
+ return (q.value.start ?? 0) + (e ?? 0);
585
+ }
586
+ let Sr = b(() => z.value.style.chart.zoom.preview.enable && (J.value.start !== q.value.start || J.value.end !== q.value.end));
587
+ function Cr(e, t) {
588
+ J.value[e] = t;
589
+ }
590
+ function wr() {
591
+ let e = K.value, t = Math.max(0, Math.min(q.value.start ?? 0, e - 1)), n = Math.max(t + 1, Math.min(q.value.end ?? e, e));
592
+ (!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), q.value.start = t, q.value.end = n, J.value.start = t, J.value.end = n, sn.value && (sn.value.setStartValue(t), sn.value.setEndValue(n));
593
+ }
594
+ let Tr = O(null);
595
+ function Er() {
596
+ return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
597
+ }
598
+ Ze(() => {
599
+ Tr.value && cancelAnimationFrame(Tr.value);
600
+ });
601
+ async function Dr({ force: e = !1 } = {}) {
602
+ if (z.value.style.chart.zoom.keepState && !e && ei.value && (q.value.start !== 0 || q.value.end !== 0)) {
603
+ wr();
604
+ return;
605
+ }
606
+ ni(), await Je(), Tr.value && cancelAnimationFrame(Tr.value), Tr.value = requestAnimationFrame(async () => {
607
+ await Er(), ni();
608
+ });
609
+ }
610
+ let Or = b(() => Math.max(0, W.value.width / (q.value.end - q.value.start))), kr = b(() => m(vr.value.map((e) => ({
611
+ ...e,
612
+ series: e.series.map((e) => e ?? 0)
613
+ }))).slice(q.value.start, q.value.end)), Ar = b(() => L.value.length === G.value.length), jr = b(() => {
614
+ if (!z.value.style.chart.zoom.minimap.show) return [];
615
+ let e = G.value.filter((e) => Ar.value ? !0 : !L.value.includes(e.id) && !e.standalone);
616
+ if (e.length) return m(e.map((e) => ({
617
+ ...e,
618
+ series: (e.series || []).map((e) => e ?? 0)
619
+ })));
620
+ let t = yr.value;
621
+ if (!t.length) return [];
622
+ let n = Math.max(...t.map((e) => e.series.length || 0));
623
+ return Array.from({ length: n }, (e, n) => t.reduce((e, t) => e + Math.abs(t.series[n] ?? 0), 0));
624
+ }), Mr = b(() => {
625
+ if (!z.value.style.chart.zoom.minimap.show) return [];
626
+ let e = G.value.filter((e) => Ar.value ? !0 : !L.value.includes(e.id) && !e.standalone), t = yr.value, n = e.length ? [{
627
+ name: "",
628
+ series: jr.value,
629
+ color: "#000000",
630
+ isVisible: !0
631
+ }] : [], r = t.map((e) => ({
632
+ name: e.name || "",
633
+ series: (e.series || []).map((e) => e ?? 0),
634
+ color: e.color,
635
+ isVisible: !0
636
+ }));
637
+ return n.concat(r);
638
+ }), Nr = b(() => m(vr.value.filter((e) => !L.value.includes(e.id)).map((e) => ({
639
+ ...e,
640
+ series: e.series.map((t, n) => {
641
+ let r = t ?? 0;
642
+ return e.signedSeries[n] === -1 && r >= 0 ? -r : r;
643
+ })
644
+ }))).slice(q.value.start, q.value.end)), Pr = b(() => {
645
+ let e = vr.value.filter((e) => !L.value.includes(e.id));
646
+ return {
647
+ positive: m(e.map((e) => ({
648
+ ...e,
649
+ series: e.series.slice(q.value.start, q.value.end).map((e) => (e ?? 0) >= 0 ? e ?? 0 : 0)
650
+ }))),
651
+ negative: m(e.map((e) => ({
652
+ ...e,
653
+ series: e.series.slice(q.value.start, q.value.end).map((e) => (e ?? 0) < 0 ? e ?? 0 : 0)
654
+ })))
655
+ };
656
+ }), Fr = b(() => {
657
+ let e = Math.max(0, q.value.end - q.value.start), t = Array(e).fill(0), n = Array(e).fill(0);
658
+ return yr.value.forEach((r) => {
659
+ for (let i = 0; i < e; i += 1) {
660
+ let e = r.series[q.value.start + i] ?? 0;
661
+ e > 0 && (t[i] = Math.max(t[i], e)), e < 0 && (n[i] = Math.min(n[i], e));
662
+ }
663
+ }), {
664
+ positive: t,
665
+ negative: n
666
+ };
667
+ }), Ir = b(() => Nr.value.map((e, t) => ({
668
+ value: e,
669
+ sign: e >= 0 ? 1 : -1
670
+ })));
671
+ function Lr() {
672
+ return { y0: zr.value?.[0]?.zero ?? W.value.bottom };
673
+ }
674
+ function Rr(e) {
675
+ let { y0: t } = Lr(), n = z.value.style.chart.lines.totalValues, r = Math.max(2, n.fontSize * 1.3 + n.offsetY), i = (e) => Math.min(Math.max(e, W.value.top - z.value.style.chart.lines.totalValues.fontSize * 1.3), W.value.bottom + z.value.style.chart.lines.totalValues.fontSize * 2);
676
+ if ((Ir.value?.[e]?.value ?? 0) >= 0 || z.value.style.chart.lines.distributed) {
677
+ let n = Infinity;
678
+ for (let t of Y.value || []) {
679
+ let r = t?.series?.[e], i = t?.topY?.[e];
680
+ (r ?? 0) > 0 && Number.isFinite(i) && i < n && (n = i);
681
+ }
682
+ return i((Number.isFinite(n) ? n : t) - r - z.value.style.chart.lines.totalValues.offsetY);
683
+ }
684
+ {
685
+ let a = -Infinity;
686
+ for (let t of Y.value || []) {
687
+ let n = t?.series?.[e], r = t?.topY?.[e];
688
+ (n ?? 0) < 0 && Number.isFinite(r) && r > a && (a = r);
689
+ }
690
+ return i((Number.isFinite(a) ? a : t) + r + n.fontSize * .7 + z.value.style.chart.lines.totalValues.offsetY);
691
+ }
692
+ }
693
+ let zr = b(() => {
694
+ let e = Math.max(...Pr.value.positive, 0), t = Math.min(...Pr.value.negative, 0), n = Math.max(...Fr.value.positive, 0), r = Math.min(...Fr.value.negative, 0), i = Math.max(e, n), a = Math.min(t, r), o = [
695
+ -Infinity,
696
+ Infinity,
697
+ NaN,
698
+ void 0,
699
+ null
700
+ ].includes(a) ? 0 : a, s = z.value.style.chart.grid.scale.scaleMin, c = z.value.style.chart.grid.scale.scaleMax, l = !z.value.style.chart.lines.distributed && (s !== null || c !== null), u = s !== null && !z.value.style.chart.lines.distributed ? s : o > 0 ? 0 : o, d = c !== null && !z.value.style.chart.lines.distributed ? c : i < 0 ? 0 : i, f = l ? le(u, d, z.value.style.chart.grid.scale.ticks) : g(u, d, z.value.style.chart.grid.scale.ticks), p = Math.abs(Number(f.min) || 0), m = (Number(f.max) || 0) + p, h = m === 0 || !Number.isFinite(m) ? 1 : m, _ = Array.isArray(f.ticks) && f.ticks.length ? f.ticks : [0], ee = W.value.bottom - W.value.height * (p / h);
701
+ return _.map((e) => {
702
+ let t = Number(e) || 0, n = W.value.bottom - W.value.height * ((t + p) / h);
703
+ return {
704
+ zero: ee,
705
+ y: n,
706
+ x: lr.value ? X.value.right + 8 : X.value.left - 8,
707
+ value: t
708
+ };
709
+ });
710
+ }), Br = O([]), Vr = O([]), Hr = 0;
711
+ it(() => {
712
+ let e = ++Hr;
713
+ (async () => {
714
+ let t = await _e({
715
+ values: z.value.style.chart.grid.x.timeLabels.values,
716
+ maxDatapoints: K.value,
717
+ formatter: z.value.style.chart.grid.x.timeLabels.datetimeFormatter,
718
+ start: q.value.start,
719
+ end: q.value.end
720
+ });
721
+ e === Hr && (Br.value = t);
722
+ })();
723
+ });
724
+ let Ur = 0;
725
+ it(() => {
726
+ let e = ++Ur;
727
+ (async () => {
728
+ let t = await _e({
729
+ values: z.value.style.chart.grid.x.timeLabels.values,
730
+ maxDatapoints: K.value,
731
+ formatter: z.value.style.chart.grid.x.timeLabels.datetimeFormatter,
732
+ start: 0,
733
+ end: K.value
734
+ });
735
+ e === Ur && (Vr.value = t);
736
+ })();
737
+ });
738
+ let Wr = b(() => {
739
+ let e = z.value.style.chart.grid.x.timeLabels.modulo;
740
+ return Br.value.length ? Math.min(e, [...new Set(Br.value.map((e) => e.text))].length) : e;
741
+ }), Gr = b(() => {
742
+ let e = z.value.style.chart.grid.x.timeLabels, t = Br.value || [], n = Vr.value || [], r = q.value.start ?? 0, i = $.value, a = K.value, o = t.map((e) => e?.text ?? ""), s = n.map((e) => e?.text ?? "");
743
+ return ee(!!e.showOnlyFirstAndLast, !!e.showOnlyAtModulo, Math.max(1, Wr.value || 1), o, s, r, i, a);
744
+ });
745
+ it(() => {
746
+ z.value.style.chart.grid.x.timeLabels.show, z.value.style.chart.grid.x.timeLabels.fontSize, z.value.style.chart.grid.x.timeLabels.rotation, z.value.style.chart.grid.x.timeLabels.offsetY, (Gr.value || []).map((e) => e?.text ?? "").join("|"), U.value.width, U.value.height, wn.value, xn.value, hr();
747
+ }, { flush: "post" });
748
+ let Kr = O({
749
+ months: [],
750
+ shortMonths: [],
751
+ days: [],
752
+ shortDays: []
753
+ }), qr = 0;
754
+ it(() => {
755
+ let e = ++qr, t = z.value.style.chart.grid.x.timeLabels.datetimeFormatter;
756
+ (async () => {
757
+ let n = await ge(t.locale).catch(() => ge("en"));
758
+ e === qr && (Kr.value = n.data);
759
+ })();
760
+ });
761
+ let Jr = b(() => {
762
+ let e = z.value.style.chart.grid.x.timeLabels.datetimeFormatter, t = he({
763
+ useUTC: e.useUTC,
764
+ locale: Kr.value,
765
+ januaryAsYear: e.januaryAsYear
766
+ });
767
+ return (e, n) => {
768
+ let r = z.value.style.chart.grid.x.timeLabels.values?.[e];
769
+ return r == null ? "" : t.formatDate(new Date(r), n);
770
+ };
771
+ }), Yr = b(() => (z.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
772
+ text: Jr.value(t, z.value.style.chart.zoom.timeFormat),
773
+ absoluteIndex: t
774
+ }))), Xr = b(() => (z.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
775
+ text: Jr.value(t, z.value.style.chart.tooltip.timeFormat),
776
+ absoluteIndex: t
777
+ }))), Zr = b(() => {
778
+ if (!en.value && !Vn.value) return [];
779
+ let e = W.value.height, t = zr.value[0] ? zr.value[0].zero : W.value.bottom, n = q.value.start ?? 0, r = q.value.end ?? 0, i = Math.max(1, r - n), a = Math.max(...Pr.value.positive, 0), o = Math.min(...Pr.value.negative, 0), s = Math.max(...Fr.value.positive, 0), c = Math.min(...Fr.value.negative, 0), l = Math.max(a, s), u = Math.min(o, c), { min: d, max: f } = !z.value.style.chart.lines.distributed && (z.value.style.chart.grid.scale.scaleMax !== null || z.value.style.chart.grid.scale.scaleMin !== null) ? le(z.value.style.chart.grid.scale.scaleMin === null ? u > 0 ? 0 : u : z.value.style.chart.grid.scale.scaleMin, z.value.style.chart.grid.scale.scaleMax === null ? l < 0 ? 0 : l : z.value.style.chart.grid.scale.scaleMax, z.value.style.chart.grid.scale.ticks) : g(z.value.style.chart.grid.scale.scaleMin === null ? u > 0 ? 0 : u : z.value.style.chart.grid.scale.scaleMin, z.value.style.chart.grid.scale.scaleMax === null ? l < 0 ? 0 : l : z.value.style.chart.grid.scale.scaleMax, z.value.style.chart.grid.scale.ticks), p = f + (d >= 0 ? 0 : Math.abs(d)) || 1, m = Array(i).fill(0), h = Array(i).fill(0), _ = (e) => i <= 1 ? W.value.left + W.value.width / 2 : W.value.left + e / (i - 1) * W.value.width;
780
+ return G.value.filter((e) => !L.value.includes(e.id)).map((r) => {
781
+ let a = [], o = [], s = [], c = Array(i).fill(null), l = Array(i).fill(null);
782
+ for (let u = 0; u < i; u += 1) {
783
+ let i = n + u, d = r.series?.[i], f = r.signedSeries?.[i], g = d == null || Number.isNaN(d) ? 0 : d, _ = r.standalone ? g / p : z.value.style.chart.lines.distributed ? g / (kr.value[u] || 1) : g / p;
784
+ if (g >= 0) {
785
+ let n = e * Math.abs(_);
786
+ if (r.standalone) c[u] = t, l[u] = t - n;
787
+ else {
788
+ let e = m[u], r = e + n;
789
+ c[u] = t - e, l[u] = t - r, m[u] = r;
790
+ }
791
+ } else {
792
+ let n = e * Math.abs(_);
793
+ if (r.standalone) c[u] = t, l[u] = t + n;
794
+ else {
795
+ let e = h[u], r = e + n;
796
+ c[u] = t + e, l[u] = t + r, h[u] = r;
797
+ }
798
+ }
799
+ a.push(u), o.push(g), s.push(f ?? (g >= 0 ? 1 : -1));
800
+ }
801
+ let u = a.map((e) => ({
802
+ x: _(e),
803
+ y: l[e]
804
+ })), d = u.map((e) => e.x), f = o.reduce((e, t) => e + Math.abs(t || 0), 0), g = f === 0 ? 1 : f, ee = o.map((e, t) => {
805
+ if (z.value.style.chart.lines.distributed && !r.standalone) {
806
+ let n = a[t], r = kr.value[n] || 1;
807
+ return (e || 0) / r;
808
+ }
809
+ return (e || 0) / g;
810
+ });
811
+ return {
812
+ ...r,
813
+ x: d,
814
+ points: u,
815
+ baseY: a.map((e) => c[e]),
816
+ topY: a.map((e) => l[e]),
817
+ series: o,
818
+ signedSeries: s,
819
+ proportions: ee,
820
+ rel: a,
821
+ fullSeries: Array.isArray(r.fullSeries) ? r.fullSeries : r.series
822
+ };
823
+ });
824
+ }), Y = b(() => {
825
+ let e = (e) => typeof e == "string" ? e.replace(/^M\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*,?\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*/i, "").trim() : "", t = Math.max(...Pr.value.positive, 0), n = Math.min(...Pr.value.negative, 0), r = Math.max(...Fr.value.positive, 0), i = Math.min(...Fr.value.negative, 0), a = Math.max(t, r), o = Math.min(n, i), s = !z.value.style.chart.lines.distributed && (z.value.style.chart.grid.scale.scaleMax !== null || z.value.style.chart.grid.scale.scaleMin !== null) ? le(z.value.style.chart.grid.scale.scaleMin === null ? o > 0 ? 0 : o : z.value.style.chart.grid.scale.scaleMin, z.value.style.chart.grid.scale.scaleMax === null ? a < 0 ? 0 : a : z.value.style.chart.grid.scale.scaleMax, z.value.style.chart.grid.scale.ticks) : g(z.value.style.chart.grid.scale.scaleMin === null ? o > 0 ? 0 : o : z.value.style.chart.grid.scale.scaleMin, z.value.style.chart.grid.scale.scaleMax === null ? a < 0 ? 0 : a : z.value.style.chart.grid.scale.scaleMax, z.value.style.chart.grid.scale.ticks), c = Number(s.min) || 0, u = Number(s.max) || 0, d = Math.abs(c), f = u + d || 1, m = (e) => {
826
+ if (z.value.style.chart.lines.distributed) {
827
+ let t = Math.max(0, Math.min(1, e));
828
+ return minimapH - minimapH * t;
829
+ }
830
+ return clampY(minimapH - minimapH * (((e ?? 0) + d) / f));
831
+ };
832
+ return Zr.value.map((t) => {
833
+ let n = t.x.length, r = Array.isArray(t.fullSeries) ? t.fullSeries : t.series, i = ({ left: e = 0, unitW: t }) => {
834
+ let n = r.length;
835
+ return !Number.isFinite(t) || t <= 0 || n <= 0 ? [] : n === 1 ? [e + t * .5] : r.map((n, r) => e + r * t);
836
+ }, a = ({ minimapH: e }) => !Number.isFinite(e) || e <= 0 ? [] : r.map((t) => m(t || 0, e)), o = ({ minimapH: e }) => {
837
+ if (!Number.isFinite(e) || e <= 0) return [];
838
+ let t = m(0, e);
839
+ return r.map(() => t);
840
+ };
841
+ if (n === 0) return {
842
+ ...t,
843
+ points: [],
844
+ smoothPath: "",
845
+ straightPath: "",
846
+ smoothArea: "",
847
+ straightArea: "",
848
+ xMinimap: i,
849
+ yMinimap: a,
850
+ yMinimapBase: o
851
+ };
852
+ let s = t.x.map((e, n) => ({
853
+ x: e,
854
+ y: t.topY[n]
855
+ })), c = t.x.map((e, n) => ({
856
+ x: e,
857
+ y: t.baseY[n]
858
+ })), u = n >= 2 ? l(s) : `M${s[0].x},${s[0].y}`, d = n >= 2 ? p(s) : `M${s[0].x},${s[0].y}`, f = n >= 2 ? `M${e(u)}` : u, h = n >= 2 ? `M${e(d)}` : d, g = "", _ = "";
859
+ if (z.value.style.chart.lines.useArea && n >= 2) {
860
+ let t = l([...c].reverse()), n = p([...c].reverse()), r = c[c.length - 1];
861
+ g = `M${s[0].x},${s[0].y} ${e(u)} L${r.x},${r.y} ${e(t)} Z`, _ = `M${s[0].x},${s[0].y} ${e(d)} L${r.x},${r.y} ${e(n)} Z`;
862
+ }
863
+ return {
864
+ ...t,
865
+ points: s,
866
+ smoothPath: f,
867
+ straightPath: h,
868
+ smoothArea: g,
869
+ straightArea: _,
870
+ xMinimap: i,
871
+ yMinimap: a,
872
+ yMinimapBase: o
873
+ };
874
+ });
875
+ }), Qr = b(() => $.value === null || $.value === void 0 ? null : {
876
+ timeLabel: yi($.value),
877
+ absoluteIndex: $.value + q.value.start,
878
+ seriesIndex: $.value,
879
+ datapoint: vi.value,
880
+ series: Y.value,
881
+ config: z.value
882
+ }), $r = O(!1), ei = O(!1);
883
+ function ti(e) {
884
+ let t = K.value;
885
+ return e > t ? t : e < 0 || e < q.value.start ? z.value.style.chart.zoom.startIndex === null ? 1 : q.value.start + 1 : e;
886
+ }
887
+ function ni() {
888
+ if (!$r.value) {
889
+ $r.value = !0;
890
+ try {
891
+ let { startIndex: e, endIndex: t, keepState: n } = z.value.style.chart.zoom, r = n ? Math.max(0, K.value) : K.value;
892
+ if (n && r <= 0) return;
893
+ let i = e ?? 0, a = t == null ? r : Math.min(ti(t + 1), r);
894
+ oi.value = !0, q.value.start = i, q.value.end = a, J.value.start = i, J.value.end = a, wr(), ei.value = !0;
895
+ } finally {
896
+ queueMicrotask(() => {
897
+ oi.value = !1;
898
+ }), $r.value = !1;
899
+ }
900
+ }
901
+ }
902
+ function ri(e) {
903
+ $r.value || oi.value || e !== q.value.start && (q.value.start = e, J.value.start = e, wr());
904
+ }
905
+ function ii(e) {
906
+ if ($r.value || oi.value) return;
907
+ let t = ti(e);
908
+ t !== q.value.end && (q.value.end = t, J.value.end = t, wr());
909
+ }
910
+ let X = b(() => ({
911
+ left: W.value.left,
912
+ right: W.value.right,
913
+ width: W.value.width
914
+ })), ai = b(() => {
915
+ let e = z.value.style.chart.grid.y.axisLabels, { prefix: t, suffix: n } = z.value.style.chart.lines.dataLabels;
916
+ return zr.value.map((r) => String(v(e.formatter, r.value, h({
917
+ p: t,
918
+ v: r.value,
919
+ s: n,
920
+ r: e.rounding
921
+ }), { datapoint: r }) ?? "")).join("|");
922
+ });
923
+ rt([
924
+ ai,
925
+ () => z.value.style.chart.grid.y.axisLabels.show,
926
+ () => z.value.style.chart.grid.y.axisLabels.fontSize,
927
+ () => z.value.style.chart.grid.y.axisLabels.bold,
928
+ () => z.value.style.chart.grid.y.position
929
+ ], () => {
930
+ z.value.style.chart.grid.y.axisLabels.show && Fn();
931
+ }, { flush: "post" });
932
+ let oi = O(!1), si = b(() => U.value.width), ci = b(() => U.value.height);
933
+ De({
934
+ timeLabelsEls: wn,
935
+ timeLabels: Br,
936
+ slicer: q,
937
+ configRef: z,
938
+ rotationPath: [
939
+ "style",
940
+ "chart",
941
+ "grid",
942
+ "x",
943
+ "timeLabels",
944
+ "rotation"
945
+ ],
946
+ autoRotatePath: [
947
+ "style",
948
+ "chart",
949
+ "grid",
950
+ "x",
951
+ "timeLabels",
952
+ "autoRotate",
953
+ "enable"
954
+ ],
955
+ isAutoSize: !1,
956
+ width: si,
957
+ height: ci,
958
+ rotation: z.value.style.chart.grid.x.timeLabels.autoRotate.angle
959
+ });
960
+ let li = O(null);
961
+ function ui(e) {
962
+ let t = V.value;
963
+ if (!t) return null;
964
+ if (t.createSVGPoint && t.getScreenCTM) {
965
+ let n = t.createSVGPoint();
966
+ n.x = e.clientX, n.y = e.clientY;
967
+ let r = t.getScreenCTM();
968
+ if (r) {
969
+ let e = n.matrixTransform(r.inverse());
970
+ return {
971
+ x: e.x,
972
+ y: e.y,
973
+ ok: !0
974
+ };
975
+ }
976
+ }
977
+ let n = t.getBoundingClientRect(), r = t.viewBox?.baseVal || {
978
+ x: 0,
979
+ y: 0,
980
+ width: n.width,
981
+ height: n.height
982
+ }, i = Math.min(n.width / r.width, n.height / r.height), a = r.width * i, o = r.height * i, s = (n.width - a) / 2, c = (n.height - o) / 2;
983
+ return {
984
+ x: (e.clientX - n.left - s) / i + r.x,
985
+ y: (e.clientY - n.top - c) / i + r.y,
986
+ ok: !0
987
+ };
988
+ }
989
+ let di = 0, Z = b(() => Math.max(1, q.value.end - q.value.start)), fi = b(() => Z.value > 1 ? W.value.width / (Z.value - 1) : 0);
990
+ function Q(e) {
991
+ return Z.value <= 1 ? W.value.left + W.value.width / 2 : W.value.left + e * fi.value;
992
+ }
993
+ function pi(e) {
994
+ if (Z.value <= 1) return {
995
+ x: W.value.left,
996
+ width: W.value.width
997
+ };
998
+ let t = e === 0 ? W.value.left : (Q(e - 1) + Q(e)) / 2, n = e === Z.value - 1 ? W.value.left + W.value.width : (Q(e) + Q(e + 1)) / 2;
999
+ return {
1000
+ x: t,
1001
+ width: Math.max(0, n - t)
1002
+ };
1003
+ }
1004
+ function mi(e) {
1005
+ Ln.value || (di && cancelAnimationFrame(di), di = requestAnimationFrame(() => {
1006
+ di = 0;
1007
+ let t = ui(e);
1008
+ if (!t || !V.value) {
1009
+ _i();
1010
+ return;
1011
+ }
1012
+ let { left: n, right: r, top: i, bottom: a } = W.value;
1013
+ if (t.x < n || t.x > r || t.y < i || t.y > a) {
1014
+ _i();
1015
+ return;
1016
+ }
1017
+ let o = 0;
1018
+ if (Z.value > 1) {
1019
+ let e = (t.x - n) / fi.value;
1020
+ o = Math.round(e);
1021
+ } else o = 0;
1022
+ o < 0 && (o = 0), o > Z.value - 1 && (o = Z.value - 1), li.value !== o && (li.value = o, xi(!0, o));
1023
+ }));
1024
+ }
1025
+ function hi(e) {
1026
+ let t = ui(e);
1027
+ if (!t || !V.value) return;
1028
+ let { left: n, right: r, top: i, bottom: a } = W.value;
1029
+ if (t.x < n || t.x > r || t.y < i || t.y > a) return;
1030
+ let o = 0;
1031
+ if (Z.value > 1) {
1032
+ let e = (t.x - n) / fi.value;
1033
+ o = Math.round(e);
1034
+ } else o = 0;
1035
+ o < 0 && (o = 0), o > Z.value - 1 && (o = Z.value - 1), ta({
1036
+ seriesIndex: o,
1037
+ datapoint: qi(o)
1038
+ }), gi(o);
1039
+ }
1040
+ function gi(e) {
1041
+ let t = JSON.parse(JSON.stringify(Y.value)).map((t) => ({
1042
+ name: t.name,
1043
+ value: t.series[e] === 0 ? 0 : t.series[e] || null,
1044
+ proportion: t.proportions[e] || null,
1045
+ color: t.color,
1046
+ id: t.id
1047
+ }));
1048
+ z.value.events.datapointClick && z.value.events.datapointClick({
1049
+ datapoint: t,
1050
+ seriesIndex: e + q.value.start
1051
+ }), F("selectDatapoint", {
1052
+ datapoint: t,
1053
+ period: Br.value[e]
1054
+ });
1055
+ }
1056
+ rt(() => [
1057
+ q.value.start,
1058
+ q.value.end,
1059
+ Y.value.length
1060
+ ], () => {
1061
+ let e = Z.value;
1062
+ if ($.value != null) {
1063
+ if (e <= 0) {
1064
+ $.value = null;
1065
+ return;
1066
+ }
1067
+ $.value < 0 && ($.value = 0), $.value > e - 1 && ($.value = e - 1);
1068
+ }
1069
+ });
1070
+ function _i() {
1071
+ di &&= (cancelAnimationFrame(di), 0), li.value = null, xi(!1, null);
1072
+ }
1073
+ let $ = O(null), vi = b(() => {
1074
+ let e = $.value, t = e == null ? null : xr(e);
1075
+ return Y.value.map((n) => ({
1076
+ slotAbsoluteIndex: n.absoluteIndex,
1077
+ shape: n.shape || "circle",
1078
+ name: n.name,
1079
+ color: n.color,
1080
+ value: e == null ? null : n.series.find((t, n) => n === e),
1081
+ sourceValue: t == null ? null : n.seriesSource?.[t],
1082
+ comments: n.comments || [],
1083
+ id: n.id,
1084
+ standalone: !!n.standalone
1085
+ }));
1086
+ });
1087
+ function yi(e) {
1088
+ if (e == null || !z.value.style.chart.tooltip.showTimeLabel) return null;
1089
+ let t = Br.value?.[e]?.text || null, n = Xr.value?.[e]?.text || null, r = Vr.value?.[e]?.text || null;
1090
+ return z.value.style.chart.tooltip.useDefaultTimeFormat ? t : n || r;
1091
+ }
1092
+ let bi = b(() => {
1093
+ let e = z.value.style.chart.tooltip.customFormat, t = [...vi.value].reverse(), n = t.filter((e) => !e.standalone), r = t.filter((e) => e.standalone), i = n.map((e) => e.value).filter((e) => f(e) && e !== null).reduce((e, t) => Math.abs(e) + Math.abs(t), 0);
1094
+ if (de(e) && te(() => e({
1095
+ absoluteIndex: $.value + q.value.start,
1096
+ seriesIndex: $.value,
1097
+ datapoint: vi.value,
1098
+ series: G.value,
1099
+ config: z.value
1100
+ }))) return e({
1101
+ absoluteIndex: $.value + q.value.start,
1102
+ seriesIndex: $.value,
1103
+ datapoint: vi.value,
1104
+ series: G.value,
1105
+ config: z.value
1106
+ });
1107
+ let { showValue: a, showTotal: o, totalTranslation: c, showPercentage: l, borderColor: u, roundingValue: d, roundingPercentage: p } = z.value.style.chart.tooltip, m = (e) => !e.shape || ![
1108
+ "star",
1109
+ "triangle",
1110
+ "square",
1111
+ "diamond",
1112
+ "pentagon",
1113
+ "hexagon"
1114
+ ].includes(e.shape) ? `<svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="${z.value.style.chart.tooltip.backgroundColor}" stroke-width="1" fill="${e.color}" /></svg>` : e.shape === "star" ? `<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><polygon stroke="${z.value.style.chart.tooltip.backgroundColor}" stroke-width="1" fill="${e.color}" points="${fe({
1115
+ plot: {
1116
+ x: 6,
1117
+ y: 6
1118
+ },
1119
+ radius: 5
1120
+ })}" /></svg>` : e.shape === "triangle" ? `<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${s({
1121
+ plot: {
1122
+ x: 6,
1123
+ y: 6
1124
+ },
1125
+ radius: 6,
1126
+ sides: 3,
1127
+ rotation: .52
1128
+ }).path}" fill="${e.color}" stroke="${z.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : e.shape === "square" ? `<svg viewBox="0 0 12 12" height="14" width="14"><path d="${s({
1129
+ plot: {
1130
+ x: 6,
1131
+ y: 6
1132
+ },
1133
+ radius: 6,
1134
+ sides: 4,
1135
+ rotation: .8
1136
+ }).path}" fill="${e.color}" stroke="${z.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : e.shape === "diamond" ? `<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${s({
1137
+ plot: {
1138
+ x: 6,
1139
+ y: 6
1140
+ },
1141
+ radius: 5,
1142
+ sides: 4,
1143
+ rotation: 0
1144
+ }).path}" fill="${e.color}" stroke="${z.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : e.shape === "pentagon" ? `<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${s({
1145
+ plot: {
1146
+ x: 6,
1147
+ y: 6
1148
+ },
1149
+ radius: 5,
1150
+ sides: 5,
1151
+ rotation: .95
1152
+ }).path}" fill="${e.color}" stroke="${z.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>` : `<svg viewBox="0 0 12 12" height="14" width="14" style="overflow:visible"><path d="${s({
1153
+ plot: {
1154
+ x: 6,
1155
+ y: 6
1156
+ },
1157
+ radius: 5,
1158
+ sides: 6,
1159
+ rotation: 0
1160
+ }).path}" fill="${e.color}" stroke="${z.value.style.chart.tooltip.backgroundColor}" stroke-width="1" /></svg>`, g = (e, t) => {
1161
+ let n = t ? h({
1162
+ v: isNaN((e.value ?? 0) / (i || 1)) ? 0 : Math.abs(e.value ?? 0) / (i || 1) * 100,
1163
+ s: "%",
1164
+ r: p
1165
+ }) : "", r = a && t ? "(" : "", o = a && t ? ")" : "";
1166
+ return `
1167
+ <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
1168
+ <div style="width:20px;height:20px;display:flex;align-items:center;justify-content:center;">${m(e)}</div>
1169
+ ${e.name}${a || t ? ":" : ""}
1170
+ ${a ? v(z.value.style.chart.lines.dataLabels.formatter, e.sourceValue, h({
1171
+ p: z.value.style.chart.lines.dataLabels.prefix,
1172
+ v: e.sourceValue,
1173
+ s: z.value.style.chart.lines.dataLabels.suffix,
1174
+ r: d
1175
+ }, { datapoint: e })) : ""} ${r}${n}${o}
1176
+ </div>
1177
+ `;
1178
+ }, _ = "", ee = yi($.value);
1179
+ return ee && (_ += `<div style="width:100%;text-align:center;border-bottom:1px solid ${u};padding-bottom:6px;margin-bottom:3px;">${ee}</div>`), o && n.length > 1 && (_ += `<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
1180
+ <span>${c}:</span>
1181
+ <span>${v(z.value.style.chart.lines.dataLabels.formatter, ie(i), h({
1182
+ p: z.value.style.chart.lines.dataLabels.prefix,
1183
+ v: ie(i),
1184
+ s: z.value.style.chart.lines.dataLabels.suffix,
1185
+ r: d
1186
+ }), { datapoint: {
1187
+ name: c,
1188
+ value: ie(i)
1189
+ } })}</span>
1190
+ </div>`), n.forEach((e) => {
1191
+ _ += g(e, l);
1192
+ }), r.length && (_ += `<div style="border-top:1px solid ${vr.value.length ? u : "transparent"}; margin:${vr.value.length ? "6px 0" : "0"};"></div>`, r.forEach((e) => {
1193
+ _ += g(e, !1);
1194
+ })), `<div>${_}</div>`;
1195
+ });
1196
+ function xi(e, t = null, n = "pointer") {
1197
+ if (Ar.value) return;
1198
+ jn.value = n, nn.value = e;
1199
+ let r = Y.value.map((e) => ({
1200
+ name: e.name,
1201
+ value: [
1202
+ null,
1203
+ void 0,
1204
+ NaN
1205
+ ].includes(e.series[t]) ? null : e.series[t],
1206
+ color: e.color
1207
+ }));
1208
+ e ? (R.value = t, $.value = t, ta({
1209
+ seriesIndex: t,
1210
+ datapoint: r
1211
+ }), z.value.events.datapointEnter && z.value.events.datapointEnter({
1212
+ datapoint: r,
1213
+ seriesIndex: t + q.value.start
1214
+ })) : (R.value = null, $.value = null, F("selectX", {
1215
+ index: null,
1216
+ indexLabel: null,
1217
+ dataset: null
1218
+ }), z.value.events.datapointLeave && z.value.events.datapointLeave({
1219
+ datapoint: r,
1220
+ seriesIndex: t + q.value.start
1221
+ }));
1222
+ }
1223
+ function Si(e, t) {
1224
+ let n = JSON.parse(JSON.stringify(Y.value)).map((e) => ({
1225
+ name: e.name,
1226
+ value: e.series[t] === 0 ? 0 : (e.signedSeries[t] === -1 && e.series[t] >= 0 ? -e.series[t] : e.series[t]) || null,
1227
+ proportion: e.proportions[t] || null,
1228
+ color: e.color,
1229
+ id: e.id
1230
+ }));
1231
+ F("selectTimeLabel", {
1232
+ datapoint: n,
1233
+ absoluteIndex: e.absoluteIndex,
1234
+ label: e.text
1235
+ });
1236
+ }
1237
+ function Ci() {
1238
+ L.value.length ? L.value = [] : Ti.value.forEach((e) => {
1239
+ L.value.push(e.id);
1240
+ }), F("selectLegend", Y.value);
1241
+ }
1242
+ function wi(e) {
1243
+ if (L.value.includes(e.id)) L.value = L.value.filter((t) => t !== e.id);
1244
+ else {
1245
+ if (L.value.length === G.value.length - 1) return;
1246
+ L.value.push(e.id);
1247
+ }
1248
+ F("selectLegend", Y.value);
1249
+ }
1250
+ let Ti = b(() => G.value.map((e) => ({
1251
+ ...e,
1252
+ opacity: L.value.includes(e.id) ? .5 : 1,
1253
+ segregate: () => wi(e),
1254
+ isSegregated: L.value.includes(e.id)
1255
+ }))), Ei = b(() => ({
1256
+ cy: "stackline-legend",
1257
+ backgroundColor: z.value.style.chart.legend.backgroundColor,
1258
+ color: z.value.style.chart.legend.color,
1259
+ fontSize: z.value.style.chart.legend.fontSize,
1260
+ paddingBottom: 12,
1261
+ fontWeight: z.value.style.chart.legend.bold ? "bold" : ""
1262
+ }));
1263
+ function Di(e) {
1264
+ return G.value.length ? G.value.find((t) => t.name === e) || (z.value.debug && console.warn(`VueUiStackline - Series name not found "${e}"`), null) : (z.value.debug && console.warn("VueUiStackline - There are no series to show."), null);
1265
+ }
1266
+ function Oi(e) {
1267
+ let t = Di(e);
1268
+ t !== null && L.value.includes(t.id) && wi({ id: t.id });
1269
+ }
1270
+ function ki(e) {
1271
+ let t = Di(e);
1272
+ t !== null && (L.value.includes(t.id) || wi({ id: t.id }));
1273
+ }
1274
+ let Ai = b(() => {
1275
+ if (Y.value.length === 0) return {
1276
+ head: [],
1277
+ body: [],
1278
+ config: {},
1279
+ columnNames: []
1280
+ };
1281
+ let e = Y.value.map(({ name: e, color: t }) => ({
1282
+ label: e,
1283
+ color: t
1284
+ })), t = [];
1285
+ return Gr.value.forEach((e) => {
1286
+ let n = e.absoluteIndex, r = [z.value.style.chart.grid.x.timeLabels.values?.[n] ? e.text : n + 1];
1287
+ G.value.forEach((e) => {
1288
+ let t = e.series?.[n], i = Number((t ?? 0).toFixed(z.value.table.td.roundingValue));
1289
+ r.push(i);
1290
+ }), t.push(r);
1291
+ }), {
1292
+ head: e,
1293
+ body: t
1294
+ };
1295
+ });
1296
+ function ji(e = null) {
1297
+ let n = [
1298
+ [z.value.style.chart.title.text],
1299
+ [z.value.style.chart.title.subtitle.text],
1300
+ [""]
1301
+ ], i = ["", ...Ai.value.head.map((e) => e.label)], a = Ai.value.body, o = n.concat([i]).concat(a), s = r(o);
1302
+ e ? e(s) : t({
1303
+ csvContent: s,
1304
+ title: z.value.style.chart.title.text || "vue-ui-stackline"
1305
+ });
1306
+ }
1307
+ let Mi = b(() => {
1308
+ let e = [""].concat(Y.value.map((e) => e.name), " <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2\" /></svg>"), t = [], n = Math.max(0, q.value.end - q.value.start);
1309
+ for (let e = 0; e < n; e += 1) {
1310
+ let n = xr(e), r = z.value.style.chart.grid.x.timeLabels.values?.[n] ? Br.value?.[e]?.text ?? n + 1 : n + 1, i = Y.value.map((t) => {
1311
+ let n = t.series?.[e] ?? 0;
1312
+ return Number(n.toFixed(z.value.table.td.roundingValue));
1313
+ }), a = Y.value.filter((e) => !e.standalone).map((t) => t.series?.[e] ?? 0).reduce((e, t) => e + t, 0);
1314
+ t.push([r].concat(i, Number(a.toFixed(z.value.table.td.roundingValue))));
1315
+ }
1316
+ return {
1317
+ head: e,
1318
+ body: t,
1319
+ config: {
1320
+ th: {
1321
+ backgroundColor: z.value.table.th.backgroundColor,
1322
+ color: z.value.table.th.color,
1323
+ outline: z.value.table.th.outline
1324
+ },
1325
+ td: {
1326
+ backgroundColor: z.value.table.td.backgroundColor,
1327
+ color: z.value.table.td.color,
1328
+ outline: z.value.table.td.outline
1329
+ },
1330
+ breakpoint: z.value.table.responsiveBreakpoint
1331
+ },
1332
+ colNames: [z.value.table.columnNames.period].concat(Y.value.map((e) => e.name), z.value.table.columnNames.total)
1333
+ };
1334
+ }), Ni = b(() => z.value.style.chart.backgroundColor), Pi = b(() => z.value.style.chart.legend), Fi = b(() => z.value.style.chart.title), { exportSvg: Ii, getSvg: Li } = Se({
1335
+ svg: V,
1336
+ title: Fi,
1337
+ legend: Pi,
1338
+ legendItems: Ti,
1339
+ backgroundColor: Ni
1340
+ });
1341
+ async function Ri({ isCb: e }) {
1342
+ bn.value = !0, await Je();
1343
+ try {
1344
+ if (e) {
1345
+ let { blob: e, url: t, text: n, dataUrl: r } = await Li();
1346
+ await Promise.resolve(z.value.userOptions.callbacks.svg({
1347
+ blob: e,
1348
+ url: t,
1349
+ text: n,
1350
+ dataUrl: r
1351
+ }));
1352
+ } else await Promise.resolve(Ii());
1353
+ } finally {
1354
+ bn.value = !1;
1355
+ }
1356
+ }
1357
+ async function zi({ scale: e = 2 } = {}) {
1358
+ if (!tn.value) return;
1359
+ let { imageUri: t, base64: n } = await Oe({
1360
+ domElement: tn.value,
1361
+ base64: !0,
1362
+ img: !0,
1363
+ scale: e
1364
+ }), r = tn.value.getBoundingClientRect(), i = {
1365
+ width: r.width,
1366
+ height: r.height,
1367
+ aspectRatio: r.height ? r.width / r.height : 0
1368
+ }, a = await ne(t, e) ?? i;
1369
+ return {
1370
+ imageUri: t,
1371
+ base64: n,
1372
+ title: z.value.style.chart.title.text,
1373
+ ...a
1374
+ };
1375
+ }
1376
+ let Bi = b(() => {
1377
+ let e = z.value.table.useDialog && !z.value.table.show, t = H.value.showTable;
1378
+ return {
1379
+ component: e ? Yt : Wt,
1380
+ title: `${z.value.style.chart.title.text}${z.value.style.chart.title.subtitle.text ? `: ${z.value.style.chart.title.subtitle.text}` : ""}`,
1381
+ props: e ? {
1382
+ backgroundColor: z.value.table.th.backgroundColor,
1383
+ color: z.value.table.th.color,
1384
+ headerColor: z.value.table.th.color,
1385
+ headerBg: z.value.table.th.backgroundColor,
1386
+ isFullscreen: un.value,
1387
+ fullscreenParent: tn.value,
1388
+ forcedWidth: Math.min(800, window.innerWidth * .8),
1389
+ isCursorPointer: B.value
1390
+ } : {
1391
+ hideDetails: !0,
1392
+ config: {
1393
+ open: t,
1394
+ maxHeight: 1e4,
1395
+ body: {
1396
+ backgroundColor: z.value.style.chart.backgroundColor,
1397
+ color: z.value.style.chart.color
1398
+ },
1399
+ head: {
1400
+ backgroundColor: z.value.style.chart.backgroundColor,
1401
+ color: z.value.style.chart.color
1402
+ }
1403
+ }
1404
+ }
1405
+ };
1406
+ });
1407
+ rt(() => H.value.showTable, (e) => {
1408
+ z.value.table.show || (e && z.value.table.useDialog && gn.value ? gn.value.open() : "close" in gn.value && gn.value.close());
1409
+ });
1410
+ function Vi() {
1411
+ H.value.showTable = !1, _n.value && _n.value.setTableIconState(!1);
1412
+ }
1413
+ function Hi(e) {
1414
+ un.value = e, rn.value += 1;
1415
+ }
1416
+ function Ui() {
1417
+ H.value.showTable = !H.value.showTable;
1418
+ }
1419
+ function Wi() {
1420
+ H.value.dataLabels.show = !H.value.dataLabels.show;
1421
+ }
1422
+ function Gi() {
1423
+ H.value.showTooltip = !H.value.showTooltip;
1424
+ }
1425
+ function Ki() {
1426
+ return Y.value;
1427
+ }
1428
+ function qi(e) {
1429
+ let t = e ?? 0, n = xr(t);
1430
+ return JSON.parse(JSON.stringify(Y.value)).map((e) => {
1431
+ let r = e.series[t], i = e.signedSeries?.[t], a = r === 0 ? 0 : (i === -1 && r >= 0 ? -r : r) || null;
1432
+ return {
1433
+ name: e.name,
1434
+ absoluteIndex: e.absoluteIndex,
1435
+ value: a,
1436
+ proportion: e.proportions?.[t] || null,
1437
+ color: e.color,
1438
+ id: e.id,
1439
+ timeLabel: Vr.value?.[n] || null
1440
+ };
1441
+ });
1442
+ }
1443
+ let Ji = b(() => Array(K.value).fill(0).map((e, t) => qi(t)));
1444
+ rt(() => P.selectedXIndex, (e) => {
1445
+ if ([null, void 0].includes(P.selectedXIndex)) {
1446
+ $.value = null;
1447
+ return;
1448
+ }
1449
+ let t = e - q.value.start;
1450
+ t < 0 || e >= q.value.end ? $.value = null : $.value = t ?? null;
1451
+ }, { immediate: !0 });
1452
+ let Yi = b(() => {
1453
+ if (z.value.style.chart.lines.distributed) return {
1454
+ min: -1,
1455
+ max: 1
1456
+ };
1457
+ let e = vr.value, t = yr.value, n = Math.max(1, ...[...e, ...t].map((e) => e.series?.length || 0)), r = Array(n).fill(0), i = Array(n).fill(0);
1458
+ e.forEach((e) => {
1459
+ for (let t = 0; t < n; t += 1) {
1460
+ let n = e.series[t] ?? 0;
1461
+ n >= 0 ? r[t] += n : i[t] += n;
1462
+ }
1463
+ });
1464
+ let a = Array(n).fill(0), o = Array(n).fill(0);
1465
+ t.forEach((e) => {
1466
+ for (let t = 0; t < n; t += 1) {
1467
+ let n = e.series[t] ?? 0;
1468
+ n > 0 && (a[t] = Math.max(a[t], n)), n < 0 && (o[t] = Math.min(o[t], n));
1469
+ }
1470
+ });
1471
+ let s = Math.max(0, ...r, ...a), c = Math.min(0, ...i, ...o), l = z.value.style.chart.grid.scale.scaleMin, u = z.value.style.chart.grid.scale.scaleMax, d = z.value.style.chart.grid.scale.ticks, f = !z.value.style.chart.lines.distributed && (l !== null || u !== null) ? le(l === null ? c > 0 ? 0 : c : l, u === null ? s < 0 ? 0 : s : u, d) : g(l === null ? c > 0 ? 0 : c : l, u === null ? s < 0 ? 0 : s : u, d);
1472
+ return {
1473
+ min: Number(f.min) || 0,
1474
+ max: Number(f.max) || 0
1475
+ };
1476
+ });
1477
+ function Xi({ minimapH: e, unitW: t }) {
1478
+ let n = (e) => typeof e == "string" ? e.replace(/^M\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*,?\s*[-+]?[\d.]+(?:e[-+]?\d+)?\s*/i, "").trim() : "";
1479
+ if (!Number.isFinite(e) || e <= 0 || !Number.isFinite(t) || t <= 0) return "";
1480
+ let r = Y.value.filter((e) => !e.standalone), i = Y.value.filter((e) => e.standalone), a = Math.max(0, ...Y.value.map((e) => Array.isArray(e.fullSeries) ? e.fullSeries.length : e.series.length));
1481
+ if (a <= 0) return "";
1482
+ let o = a === 1 ? [t * .5] : Array.from({ length: a }, (e, n) => n * t);
1483
+ if (z.value.style.chart.lines.distributed) {
1484
+ let t = Array.from({ length: a }, (e, t) => {
1485
+ let n = 0;
1486
+ return r.forEach((e) => {
1487
+ let r = (Array.isArray(e.fullSeries) ? e.fullSeries : e.series)?.[t];
1488
+ r != null && !Number.isNaN(r) && (n += Math.abs(r));
1489
+ }), n || 1;
1490
+ }), s = (t) => e - e * Math.max(0, Math.min(1, t || 0)), c = [], u = Array(a).fill(0);
1491
+ return r.forEach((e) => {
1492
+ let r = Array.isArray(e.fullSeries) ? e.fullSeries : e.series, i = Array(a), d = Array(a);
1493
+ for (let e = 0; e < a; e += 1) {
1494
+ let n = r?.[e], a = n == null || Number.isNaN(n) ? 0 : Math.abs(n) / t[e];
1495
+ d[e] = u[e], u[e] += a, i[e] = u[e];
1496
+ }
1497
+ let f = i.map(s), m = d.map(s), h = o.map((e, t) => ({
1498
+ x: e,
1499
+ y: f[t]
1500
+ })), g = o.map((e, t) => ({
1501
+ x: e,
1502
+ y: m[t]
1503
+ })), _ = l(h), ee = l([...g].reverse()), te = p(h), ne = p([...g].reverse()), v = g[g.length - 1];
1504
+ if (z.value.style.chart.lines.useArea) {
1505
+ let t = z.value.style.chart.lines.smooth ? `M${h[0].x},${h[0].y} ${n(_)} L${v.x},${v.y} ${n(ee)} Z` : `M${h[0].x},${h[0].y} ${n(te)} L${v.x},${v.y} ${n(ne)} Z`;
1506
+ c.push(`<path d="${t}"
1507
+ fill="${$t.pattern ? `url(#pattern_${I.value}_${e.absoluteIndex})` : (z.value.style.chart.lines.gradient.show, e.color)}"
1508
+ opacity="${z.value.style.chart.lines.areaOpacity}"
1509
+ stroke="none" />`);
1510
+ }
1511
+ let re = z.value.style.chart.lines.smooth ? `M${h[0].x},${h[0].y} ${n(_)}` : `M${h[0].x},${h[0].y} ${n(te)}`;
1512
+ c.push(`<path d="${re}"
1513
+ fill="none"
1514
+ stroke="${e.color}"
1515
+ stroke-width="${z.value.style.chart.lines.strokeWidth}"
1516
+ stroke-linecap="round" />`);
1517
+ }), i.length && i.forEach((e) => {
1518
+ let r = Array.isArray(e.fullSeries) ? e.fullSeries : e.series, i = Array.from({ length: a }, (e, n) => s(Math.abs(r?.[n] ?? 0) / t[n])), u = o.map((e, t) => ({
1519
+ x: e,
1520
+ y: i[t]
1521
+ })), d = l(u), f = p(u), m = z.value.style.chart.lines.smooth ? `M${u[0].x},${u[0].y} ${n(d)}` : `M${u[0].x},${u[0].y} ${n(f)}`;
1522
+ c.push(`<path d="${m}"
1523
+ fill="none"
1524
+ stroke="${e.color}"
1525
+ stroke-width="${z.value.style.chart.lines.strokeWidth}"
1526
+ stroke-linecap="round" />`);
1527
+ }), c.join("");
1528
+ }
1529
+ let s = Yi.value.min, c = Yi.value.max, u = Math.abs(s), d = c + u || 1, f = (t) => Math.max(0, Math.min(e, t)), m = (t) => f(e - e * (((t ?? 0) + u) / d)), h = [];
1530
+ if (r.length) {
1531
+ let e = Array(a).fill(0), t = Array(a).fill(0);
1532
+ r.forEach((r) => {
1533
+ let i = Array.isArray(r.fullSeries) ? r.fullSeries : r.series, s = Array(a), c = Array(a);
1534
+ for (let n = 0; n < a; n += 1) {
1535
+ let r = i?.[n] ?? 0;
1536
+ r >= 0 ? (c[n] = e[n], e[n] += r, s[n] = e[n]) : (c[n] = t[n], t[n] += r, s[n] = t[n]);
1537
+ }
1538
+ let u = s.map(m), d = c.map(m), f = o.map((e, t) => ({
1539
+ x: e,
1540
+ y: u[t]
1541
+ })), g = o.map((e, t) => ({
1542
+ x: e,
1543
+ y: d[t]
1544
+ })), _ = l(f), ee = l([...g].reverse()), te = p(f), ne = p([...g].reverse()), v = g[g.length - 1];
1545
+ if (z.value.style.chart.lines.useArea) {
1546
+ let e = z.value.style.chart.lines.smooth ? `M${f[0].x},${f[0].y} ${n(_)} L${v.x},${v.y} ${n(ee)} Z` : `M${f[0].x},${f[0].y} ${n(te)} L${v.x},${v.y} ${n(ne)} Z`;
1547
+ h.push(`<path d="${e}"
1548
+ fill="${$t.pattern ? `url(#pattern_${I.value}_${r.absoluteIndex})` : (z.value.style.chart.lines.gradient.show, r.color)}"
1549
+ opacity="${z.value.style.chart.lines.areaOpacity}"
1550
+ stroke="none" />`);
1551
+ }
1552
+ let re = z.value.style.chart.lines.smooth ? `M${f[0].x},${f[0].y} ${n(_)}` : `M${f[0].x},${f[0].y} ${n(te)}`;
1553
+ h.push(`<path d="${re}"
1554
+ fill="none"
1555
+ stroke="${r.color}"
1556
+ stroke-width="${z.value.style.chart.lines.strokeWidth}"
1557
+ stroke-linecap="round" />`);
1558
+ });
1559
+ }
1560
+ return i.length && i.forEach((e) => {
1561
+ let t = (Array.isArray(e.fullSeries) ? e.fullSeries : e.series).map(m), r = o.map((e, n) => ({
1562
+ x: e,
1563
+ y: t[n]
1564
+ })), i = l(r), a = p(r), s = z.value.style.chart.lines.smooth ? `M${r[0].x},${r[0].y} ${n(i)}` : `M${r[0].x},${r[0].y} ${n(a)}`;
1565
+ h.push(`<path d="${s}"
1566
+ fill="none"
1567
+ stroke="${e.color}"
1568
+ stroke-width="${z.value.style.chart.lines.strokeWidth}"
1569
+ stroke-linecap="round" />`);
1570
+ }), h.join("");
1571
+ }
1572
+ function Zi(e, t) {
1573
+ let n = z.value.style.chart.lines, r = n.dataLabels;
1574
+ return n.showDistributedPercentage && n.distributed ? Zn.value ? t === 0 ? !r.hideEmptyPercentages : Math.abs(t) * 100 >= r.hideUnderPercentage : !r.hideEmptyPercentages || Math.abs(t) > 0 : Zn.value ? (Xn.value && sr.value && console.warn("Vue Data UI - VueUiStackline - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case."), Math.abs(e) > Qi.value * r.hideUnderPercentage / 100) : Xn.value ? Math.abs(e) >= r.hideUnderValue : !r.hideEmptyValues || e !== 0;
1575
+ }
1576
+ let Qi = b(() => Math.max(...Y.value.flatMap((e) => e.series)));
1577
+ function $i(e, t, n, r, i) {
1578
+ let a = i === -1 && e >= 0 ? -e : e;
1579
+ return v(z.value.style.chart.lines.dataLabels.formatter, a, h({
1580
+ p: z.value.style.chart.lines.dataLabels.prefix,
1581
+ v: a,
1582
+ s: z.value.style.chart.lines.dataLabels.suffix,
1583
+ r: z.value.style.chart.lines.dataLabels.rounding
1584
+ }), {
1585
+ datapoint: t,
1586
+ seriesIndex: n,
1587
+ datapointIndex: r
1588
+ });
1589
+ }
1590
+ function ea(e, t, n, r) {
1591
+ return v(z.value.style.chart.lines.dataLabels.formatter, e, h({
1592
+ v: isNaN(e) ? 0 : e,
1593
+ s: "%",
1594
+ r: z.value.style.chart.lines.dataLabels.rounding
1595
+ }), {
1596
+ datapoint: t,
1597
+ seriesIndex: n,
1598
+ datapointIndex: r
1599
+ });
1600
+ }
1601
+ function ta({ seriesIndex: e, datapoint: t }) {
1602
+ let n = q.value.start + e;
1603
+ F("selectX", {
1604
+ dataset: t,
1605
+ index: n,
1606
+ indexLabel: z.value.style.chart.grid.x.timeLabels.values[n]
1607
+ });
1608
+ }
1609
+ function na(e) {
1610
+ if (e?.stage === "start") {
1611
+ yn.value = !0;
1612
+ return;
1613
+ }
1614
+ if (e?.stage === "end") {
1615
+ yn.value = !1;
1616
+ return;
1617
+ }
1618
+ tr();
1619
+ }
1620
+ async function ra() {
1621
+ if (F("copyAlt", {
1622
+ config: z.value,
1623
+ dataset: Y.value
1624
+ }), !z.value.userOptions.callbacks.altCopy) {
1625
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1626
+ return;
1627
+ }
1628
+ await Promise.resolve(z.value.userOptions.callbacks.altCopy({
1629
+ config: z.value,
1630
+ dataset: Y.value
1631
+ }));
1632
+ }
1633
+ let ia = O(!1);
1634
+ function aa() {
1635
+ R.value = null, ia.value = !0;
1636
+ }
1637
+ function oa() {
1638
+ R.value = null, jn.value = "pointer", nn.value = !1, $.value = null, F("selectX", {
1639
+ index: null,
1640
+ indexLabel: null,
1641
+ dataset: null
1642
+ }), ia.value = !1;
1643
+ }
1644
+ function sa(e) {
1645
+ if (!V.value || Ln.value || document.activeElement !== V.value || Ar.value || !Z.value) return;
1646
+ let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
1647
+ if (!t && !n && !r && !i) return;
1648
+ if (e.preventDefault(), e.stopPropagation(), i) {
1649
+ R.value = null, jn.value = "pointer", nn.value = !1, $.value = null, F("selectX", {
1650
+ index: null,
1651
+ indexLabel: null,
1652
+ dataset: null
1653
+ });
1654
+ return;
1655
+ }
1656
+ if (r) {
1657
+ if (R.value === null) return;
1658
+ gi(R.value);
1659
+ return;
1660
+ }
1661
+ let a = R.value, o = li.value, s = a !== null && a >= 0 && a < Z.value, c = o !== null && o >= 0 && o < Z.value;
1662
+ s ? n ? (a += 1, a >= Z.value && (a = 0)) : t && (--a, a < 0 && (a = Z.value - 1)) : c ? (a = n ? o + 1 : o - 1, a >= Z.value && (a = 0), a < 0 && (a = Z.value - 1)) : a = n ? 0 : Z.value - 1, R.value = a, ca(a), xi(!0, a, "keyboard");
1663
+ }
1664
+ function ca(e) {
1665
+ if (!Number.isFinite(e) || !V.value) return;
1666
+ let t = W.value.left + e * fi.value, n = W.value.top + W.value.height / 2, r = i(t, n, V.value);
1667
+ r && (An.value = r);
1668
+ }
1669
+ let la = b(() => ({
1670
+ headers: Mi.value?.colNames ?? [],
1671
+ rows: Mi.value?.body ?? []
1672
+ }));
1673
+ return je({
1674
+ getData: Ki,
1675
+ getImage: zi,
1676
+ generatePdf: er,
1677
+ generateCsv: ji,
1678
+ generateImage: tr,
1679
+ generateSvg: Ri,
1680
+ hideSeries: ki,
1681
+ showSeries: Oi,
1682
+ toggleTable: Ui,
1683
+ toggleLabels: Wi,
1684
+ toggleTooltip: Gi,
1685
+ toggleAnnotator: Rn,
1686
+ toggleFullscreen: Hi,
1687
+ copyAlt: ra
1688
+ }), (t, r) => (D(), C("div", {
1689
+ id: `stackline_${I.value}`,
1690
+ ref_key: "stacklineChart",
1691
+ ref: tn,
1692
+ class: Ye({
1693
+ "vue-data-ui-component": !0,
1694
+ "vue-ui-stackline": !0,
1695
+ "vue-data-ui-wrapper-fullscreen": un.value
1696
+ }),
1697
+ style: Xe(`background:${z.value.style.chart.backgroundColor};color:${z.value.style.chart.color};font-family:${z.value.style.fontFamily}; position: relative; ${z.value.responsive ? "height: 100%" : ""}`),
1698
+ onMouseenter: qn,
1699
+ onMouseleave: Jn
1700
+ }, [
1701
+ w("div", {
1702
+ id: `chart-instructions-${I.value}`,
1703
+ class: "sr-only"
1704
+ }, [w("p", null, j(z.value.a11y.translations.keyboardNavigation), 1)], 8, st),
1705
+ la.value?.rows?.length ? (D(), x(Le, {
1706
+ key: 0,
1707
+ uid: I.value,
1708
+ head: la.value.headers,
1709
+ body: la.value.rows,
1710
+ notice: z.value.a11y.translations.tableAvailable,
1711
+ caption: z.value.a11y.translations.tableCaption
1712
+ }, null, 8, [
1713
+ "uid",
1714
+ "head",
1715
+ "body",
1716
+ "notice",
1717
+ "caption"
1718
+ ])) : S("", !0),
1719
+ z.value.userOptions.buttons.annotator ? (D(), x(M(Kt), {
1720
+ key: 1,
1721
+ svgRef: M(V),
1722
+ backgroundColor: z.value.style.chart.backgroundColor,
1723
+ color: z.value.style.chart.color,
1724
+ active: Ln.value,
1725
+ isCursorPointer: B.value,
1726
+ onClose: Rn
1727
+ }, {
1728
+ "annotator-action-close": N(() => [A(t.$slots, "annotator-action-close", {}, void 0, !0)]),
1729
+ "annotator-action-color": N(({ color: e }) => [A(t.$slots, "annotator-action-color", E(T({ color: e })), void 0, !0)]),
1730
+ "annotator-action-draw": N(({ mode: e }) => [A(t.$slots, "annotator-action-draw", E(T({ mode: e })), void 0, !0)]),
1731
+ "annotator-action-undo": N(({ disabled: e }) => [A(t.$slots, "annotator-action-undo", E(T({ disabled: e })), void 0, !0)]),
1732
+ "annotator-action-redo": N(({ disabled: e }) => [A(t.$slots, "annotator-action-redo", E(T({ disabled: e })), void 0, !0)]),
1733
+ "annotator-action-delete": N(({ disabled: e }) => [A(t.$slots, "annotator-action-delete", E(T({ disabled: e })), void 0, !0)]),
1734
+ _: 3
1735
+ }, 8, [
1736
+ "svgRef",
1737
+ "backgroundColor",
1738
+ "color",
1739
+ "active",
1740
+ "isCursorPointer"
1741
+ ])) : S("", !0),
1742
+ A(t.$slots, "userConfig", {}, void 0, !0),
1743
+ nr.value ? (D(), C("div", {
1744
+ key: 2,
1745
+ ref_key: "noTitle",
1746
+ ref: cn,
1747
+ class: "vue-data-ui-no-title-space",
1748
+ style: "height:36px; width: 100%;background:transparent"
1749
+ }, null, 512)) : S("", !0),
1750
+ z.value.style.chart.title.text ? (D(), C("div", {
1751
+ key: 3,
1752
+ ref_key: "chartTitle",
1753
+ ref: an,
1754
+ style: "width:100%;background:transparent;"
1755
+ }, [(D(), x(ke, {
1756
+ key: `title_${fn.value}`,
1757
+ config: {
1758
+ title: {
1759
+ cy: "stackline-title",
1760
+ ...z.value.style.chart.title
1761
+ },
1762
+ subtitle: {
1763
+ cy: "stackline-subtitle",
1764
+ ...z.value.style.chart.title.subtitle
1765
+ }
1766
+ }
1767
+ }, null, 8, ["config"]))], 512)) : S("", !0),
1768
+ w("div", { id: `legend-top-${I.value}` }, null, 8, ct),
1769
+ z.value.userOptions.show && en.value && (M(Kn) || M(Wn)) ? (D(), x(M(qt), {
1770
+ ref_key: "userOptionsRef",
1771
+ ref: _n,
1772
+ key: `user_option_${rn.value}`,
1773
+ backgroundColor: z.value.style.chart.backgroundColor,
1774
+ color: z.value.style.chart.color,
1775
+ isPrinting: M(Qn),
1776
+ isImaging: M($n),
1777
+ uid: I.value,
1778
+ hasTooltip: z.value.style.chart.tooltip.show && z.value.userOptions.buttons.tooltip,
1779
+ hasPdf: z.value.userOptions.buttons.pdf,
1780
+ hasImg: z.value.userOptions.buttons.img,
1781
+ hasSvg: z.value.userOptions.buttons.svg,
1782
+ hasXls: z.value.userOptions.buttons.csv,
1783
+ hasTable: z.value.userOptions.buttons.table,
1784
+ hasLabel: z.value.userOptions.buttons.labels,
1785
+ hasFullscreen: z.value.userOptions.buttons.fullscreen,
1786
+ hasAltCopy: z.value.userOptions.buttons.altCopy,
1787
+ isFullscreen: un.value,
1788
+ chartElement: tn.value,
1789
+ position: z.value.userOptions.position,
1790
+ isTooltip: H.value.showTooltip,
1791
+ titles: { ...z.value.userOptions.buttonTitles },
1792
+ hasAnnotator: z.value.userOptions.buttons.annotator,
1793
+ isAnnotation: Ln.value,
1794
+ callbacks: z.value.userOptions.callbacks,
1795
+ printScale: z.value.userOptions.print.scale,
1796
+ tableDialog: z.value.table.useDialog,
1797
+ isCursorPointer: B.value,
1798
+ onToggleFullscreen: Hi,
1799
+ onGeneratePdf: M(er),
1800
+ onGenerateCsv: ji,
1801
+ onGenerateImage: na,
1802
+ onGenerateSvg: Ri,
1803
+ onToggleTable: Ui,
1804
+ onToggleLabels: Wi,
1805
+ onToggleTooltip: Gi,
1806
+ onToggleAnnotator: Rn,
1807
+ onCopyAlt: ra,
1808
+ style: Xe({ visibility: M(Kn) ? M(Wn) ? "visible" : "hidden" : "visible" })
1809
+ }, Ue({ _: 2 }, [
1810
+ t.$slots.menuIcon ? {
1811
+ name: "menuIcon",
1812
+ fn: N(({ isOpen: e, color: n }) => [A(t.$slots, "menuIcon", E(T({
1813
+ isOpen: e,
1814
+ color: n
1815
+ })), void 0, !0)]),
1816
+ key: "0"
1817
+ } : void 0,
1818
+ t.$slots.optionTooltip ? {
1819
+ name: "optionTooltip",
1820
+ fn: N(() => [A(t.$slots, "optionTooltip", {}, void 0, !0)]),
1821
+ key: "1"
1822
+ } : void 0,
1823
+ t.$slots.optionPdf ? {
1824
+ name: "optionPdf",
1825
+ fn: N(() => [A(t.$slots, "optionPdf", {}, void 0, !0)]),
1826
+ key: "2"
1827
+ } : void 0,
1828
+ t.$slots.optionCsv ? {
1829
+ name: "optionCsv",
1830
+ fn: N(() => [A(t.$slots, "optionCsv", {}, void 0, !0)]),
1831
+ key: "3"
1832
+ } : void 0,
1833
+ t.$slots.optionImg ? {
1834
+ name: "optionImg",
1835
+ fn: N(() => [A(t.$slots, "optionImg", {}, void 0, !0)]),
1836
+ key: "4"
1837
+ } : void 0,
1838
+ t.$slots.optionSvg ? {
1839
+ name: "optionSvg",
1840
+ fn: N(() => [A(t.$slots, "optionSvg", {}, void 0, !0)]),
1841
+ key: "5"
1842
+ } : void 0,
1843
+ t.$slots.optionTable ? {
1844
+ name: "optionTable",
1845
+ fn: N(() => [A(t.$slots, "optionTable", {}, void 0, !0)]),
1846
+ key: "6"
1847
+ } : void 0,
1848
+ t.$slots.optionLabels ? {
1849
+ name: "optionLabels",
1850
+ fn: N(() => [A(t.$slots, "optionLabels", {}, void 0, !0)]),
1851
+ key: "7"
1852
+ } : void 0,
1853
+ t.$slots.optionFullscreen ? {
1854
+ name: "optionFullscreen",
1855
+ fn: N(({ toggleFullscreen: e, isFullscreen: n }) => [A(t.$slots, "optionFullscreen", E(T({
1856
+ toggleFullscreen: e,
1857
+ isFullscreen: n
1858
+ })), void 0, !0)]),
1859
+ key: "8"
1860
+ } : void 0,
1861
+ t.$slots.optionAnnotator ? {
1862
+ name: "optionAnnotator",
1863
+ fn: N(({ toggleAnnotator: e, isAnnotator: n }) => [A(t.$slots, "optionAnnotator", E(T({
1864
+ toggleAnnotator: e,
1865
+ isAnnotator: n
1866
+ })), void 0, !0)]),
1867
+ key: "9"
1868
+ } : void 0,
1869
+ t.$slots.optionAltCopy ? {
1870
+ name: "optionAltCopy",
1871
+ fn: N(({ altCopy: e }) => [A(t.$slots, "optionAltCopy", E(T({ altCopy: e })), void 0, !0)]),
1872
+ key: "10"
1873
+ } : void 0,
1874
+ t.$slots["custom-menu-before"] ? {
1875
+ name: "custom-menu-before",
1876
+ fn: N(() => [A(t.$slots, "custom-menu-before", {}, void 0, !0)]),
1877
+ key: "11"
1878
+ } : void 0,
1879
+ t.$slots["custom-menu-after"] ? {
1880
+ name: "custom-menu-after",
1881
+ fn: N(() => [A(t.$slots, "custom-menu-after", {}, void 0, !0)]),
1882
+ key: "12"
1883
+ } : void 0
1884
+ ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : S("", !0),
1885
+ w("div", lt, [(D(), C("svg", {
1886
+ ref_key: "svgRef",
1887
+ ref: V,
1888
+ "aria-describedby": `chart-instructions-${I.value}`,
1889
+ xmlns: M(se),
1890
+ viewBox: `0 0 ${W.value.chartWidth <= 0 ? 10 : W.value.chartWidth} ${W.value.chartHeight <= 0 ? 10 : W.value.chartHeight}`,
1891
+ class: Ye({
1892
+ "vue-data-ui-loading": M(Vn),
1893
+ "vue-data-ui-fullscreen--on": un.value,
1894
+ "vue-data-ui-fulscreen--off": !un.value,
1895
+ "vue-data-ui-no-transition": !M(zn)
1896
+ }),
1897
+ style: Xe(`max-width:100%;overflow:visible;background:transparent;color:${z.value.style.chart.color}`),
1898
+ role: "img",
1899
+ "aria-live": "polite",
1900
+ tabindex: "0",
1901
+ preserveAspectRatio: "xMidYMid",
1902
+ onMousemove: mi,
1903
+ onMouseleave: _i,
1904
+ onClick: hi,
1905
+ onFocus: aa,
1906
+ onBlur: oa,
1907
+ onKeydown: sa
1908
+ }, [
1909
+ Ge(M(Jt)),
1910
+ (D(!0), C(y, null, k(vr.value, (e) => (D(), C(y, null, [t.$slots.pattern ? (D(), C("defs", dt, [A(t.$slots, "pattern", qe({ ref_for: !0 }, {
1911
+ seriesIndex: e.absoluteIndex,
1912
+ patternId: `pattern_${I.value}_${e.absoluteIndex}`
1913
+ }), void 0, !0)])) : S("", !0)], 64))), 256)),
1914
+ t.$slots["chart-background"] ? (D(), C("foreignObject", {
1915
+ key: 0,
1916
+ x: X.value.left,
1917
+ y: W.value.top,
1918
+ width: X.value.width,
1919
+ height: W.value.height,
1920
+ style: { pointerEvents: "none" }
1921
+ }, [A(t.$slots, "chart-background", {}, void 0, !0)], 8, ft)) : S("", !0),
1922
+ z.value.style.chart.lines.gradient.show ? (D(), C("defs", pt, [(D(!0), C(y, null, k(Y.value, (e, t) => (D(), x(Pe, {
1923
+ t: "linear",
1924
+ id: `gradient_${e.id}`,
1925
+ key: `gradient_${e.id}_${t}`,
1926
+ x1: "0%",
1927
+ y1: "0%",
1928
+ x2: "0%",
1929
+ y2: "100%",
1930
+ stops: [[
1931
+ "0%",
1932
+ e.color,
1933
+ 1
1934
+ ], [
1935
+ "100%",
1936
+ M(c)(e.color, z.value.style.chart.lines.gradient.intensity / 100),
1937
+ 1
1938
+ ]]
1939
+ }, null, 8, ["id", "stops"]))), 128))])) : S("", !0),
1940
+ z.value.style.chart.grid.x.showHorizontalLines ? (D(!0), C(y, { key: 2 }, k(zr.value, (e, t) => (D(), C("line", {
1941
+ x1: X.value.left,
1942
+ x2: X.value.right,
1943
+ y1: e.y,
1944
+ y2: e.y,
1945
+ stroke: z.value.style.chart.grid.x.linesColor,
1946
+ "stroke-width": z.value.style.chart.grid.x.linesThickness,
1947
+ "stroke-dasharray": z.value.style.chart.grid.x.linesStrokeDasharray,
1948
+ "stroke-linecap": "round"
1949
+ }, null, 8, mt))), 256)) : S("", !0),
1950
+ z.value.style.chart.grid.y.showVerticalLines ? (D(!0), C(y, { key: 3 }, k(q.value.end - q.value.start, (e, t) => (D(), C("line", {
1951
+ x1: Q(t),
1952
+ x2: Q(t),
1953
+ y1: W.value.top,
1954
+ y2: W.value.bottom,
1955
+ stroke: z.value.style.chart.grid.y.linesColor,
1956
+ "stroke-width": z.value.style.chart.grid.y.linesThickness,
1957
+ "stroke-dasharray": z.value.style.chart.grid.y.linesStrokeDasharray,
1958
+ "stroke-linecap": "round"
1959
+ }, null, 8, ht))), 256)) : S("", !0),
1960
+ z.value.style.chart.grid.x.showAxis ? (D(), C("line", {
1961
+ key: 4,
1962
+ x1: X.value.left,
1963
+ x2: X.value.right,
1964
+ y1: W.value.bottom,
1965
+ y2: W.value.bottom,
1966
+ stroke: z.value.style.chart.grid.x.axisColor,
1967
+ "stroke-width": z.value.style.chart.grid.x.axisThickness,
1968
+ "stroke-linecap": "round",
1969
+ "stroke-linejoin": "round"
1970
+ }, null, 8, gt)) : S("", !0),
1971
+ z.value.style.chart.grid.y.showAxis && !z.value.style.chart.lines.distributed ? (D(), C("line", {
1972
+ key: 5,
1973
+ x1: lr.value ? X.value.right : X.value.left,
1974
+ x2: lr.value ? X.value.right : X.value.left,
1975
+ y1: W.value.top,
1976
+ y2: W.value.bottom,
1977
+ stroke: z.value.style.chart.grid.y.axisColor,
1978
+ "stroke-width": z.value.style.chart.grid.y.axisThickness,
1979
+ "stroke-linecap": "round",
1980
+ "stroke-linejoin": "round"
1981
+ }, null, 8, _t)) : S("", !0),
1982
+ z.value.style.chart.grid.x.axisName.show && z.value.style.chart.grid.x.axisName.text ? (D(), C("text", {
1983
+ key: 6,
1984
+ ref_key: "xAxisLabel",
1985
+ ref: xn,
1986
+ x: W.value.left + W.value.width / 2,
1987
+ y: W.value.chartHeight - 3,
1988
+ "font-size": z.value.style.chart.grid.x.axisName.fontSize,
1989
+ fill: z.value.style.chart.grid.x.axisName.color,
1990
+ "font-weight": z.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
1991
+ "text-anchor": "middle"
1992
+ }, j(z.value.style.chart.grid.x.axisName.text), 9, vt)) : S("", !0),
1993
+ z.value.style.chart.grid.y.axisName.show && z.value.style.chart.grid.y.axisName.text ? (D(), C("text", {
1994
+ key: 7,
1995
+ ref_key: "yAxisLabel",
1996
+ ref: Sn,
1997
+ transform: `translate(${lr.value ? W.value.chartWidth - z.value.style.chart.grid.y.axisName.fontSize / 2 - z.value.style.chart.grid.y.axisName.offsetX : z.value.style.chart.grid.y.axisName.fontSize + z.value.style.chart.grid.y.axisName.offsetX}, ${W.value.top + W.value.height / 2}) rotate(-90)`,
1998
+ "font-size": z.value.style.chart.grid.y.axisName.fontSize,
1999
+ fill: z.value.style.chart.grid.y.axisName.color,
2000
+ "font-weight": z.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
2001
+ "text-anchor": "middle"
2002
+ }, j(z.value.style.chart.grid.y.axisName.text), 9, yt)) : S("", !0),
2003
+ z.value.style.chart.grid.frame.show ? (D(), C("rect", {
2004
+ key: 8,
2005
+ style: {
2006
+ pointerEvents: "none",
2007
+ transition: "none",
2008
+ animation: "none !important"
2009
+ },
2010
+ x: X.value.left,
2011
+ y: W.value.top,
2012
+ width: X.value.width,
2013
+ height: W.value.height,
2014
+ fill: "transparent",
2015
+ stroke: z.value.style.chart.grid.frame.stroke,
2016
+ "stroke-width": z.value.style.chart.grid.frame.strokeWidth,
2017
+ "stroke-linecap": z.value.style.chart.grid.frame.strokeLinecap,
2018
+ "stroke-linejoin": z.value.style.chart.grid.frame.strokeLinejoin,
2019
+ "stroke-dasharray": z.value.style.chart.grid.frame.strokeDasharray
2020
+ }, null, 8, bt)) : S("", !0),
2021
+ (D(!0), C(y, null, k(Y.value, (e) => (D(), C(y, null, [z.value.style.chart.lines.useArea && !e.standalone ? (D(), C("path", {
2022
+ key: 0,
2023
+ d: z.value.style.chart.lines.smooth ? e.smoothArea : e.straightArea,
2024
+ fill: t.$slots.pattern ? `url(#pattern_${I.value}_${e.absoluteIndex})` : z.value.style.chart.lines.gradient.show ? `url(#gradient_${e.id})` : e.color,
2025
+ opacity: z.value.style.chart.lines.areaOpacity,
2026
+ class: Ye({ "vue-data-ui-transition": M(zn) })
2027
+ }, null, 10, xt)) : S("", !0)], 64))), 256)),
2028
+ (D(!0), C(y, null, k(Y.value, (e) => (D(), C("path", {
2029
+ d: z.value.style.chart.lines.smooth ? e.smoothPath : e.straightPath,
2030
+ stroke: z.value.style.chart.lines.path.useSerieColor ? e.color : z.value.style.chart.lines.path.stroke,
2031
+ "stroke-width": z.value.style.chart.lines.strokeWidth,
2032
+ fill: "none",
2033
+ "stroke-linecap": "round",
2034
+ class: Ye({ "vue-data-ui-transition": M(zn) })
2035
+ }, null, 10, St))), 256)),
2036
+ z.value.style.chart.grid.y.axisLabels.show && !z.value.style.chart.lines.distributed ? (D(), C("g", {
2037
+ key: 9,
2038
+ ref_key: "scaleLabels",
2039
+ ref: Cn
2040
+ }, [(D(!0), C(y, null, k(zr.value, (e, t) => (D(), C("line", {
2041
+ key: `ytick_${t}`,
2042
+ class: Ye({ "vue-data-ui-transition": M(zn) }),
2043
+ x1: lr.value ? X.value.right : X.value.left,
2044
+ x2: lr.value ? X.value.right + 6 : X.value.left - 6,
2045
+ y1: e.y,
2046
+ y2: e.y,
2047
+ stroke: z.value.style.chart.grid.x.axisColor,
2048
+ "stroke-width": 1
2049
+ }, null, 10, Ct))), 128)), (D(!0), C(y, null, k(zr.value, (e, t) => (D(), C("text", {
2050
+ class: Ye({ "vue-data-ui-transition": M(zn) }),
2051
+ transform: `translate(${e.x}, ${e.y + z.value.style.chart.grid.y.axisLabels.fontSize / 3})`,
2052
+ "font-size": z.value.style.chart.grid.y.axisLabels.fontSize,
2053
+ "font-weight": z.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
2054
+ fill: z.value.style.chart.grid.y.axisLabels.color,
2055
+ "text-anchor": lr.value ? "start" : "end"
2056
+ }, j(M(v)(z.value.style.chart.grid.y.axisLabels.formatter, e.value, M(h)({
2057
+ p: z.value.style.chart.lines.dataLabels.prefix,
2058
+ v: e.value,
2059
+ s: z.value.style.chart.lines.dataLabels.suffix,
2060
+ r: z.value.style.chart.grid.y.axisLabels.rounding
2061
+ }), { datapoint: e })), 11, wt))), 256))], 512)) : S("", !0),
2062
+ z.value.style.chart.grid.x.timeLabels.show ? (D(), C("g", {
2063
+ key: 10,
2064
+ ref_key: "timeLabelsEls",
2065
+ ref: wn
2066
+ }, [t.$slots["time-label"] ? (D(), C("g", Tt, [(D(!0), C(y, null, k(Gr.value, (e, n) => (D(), C("g", null, [A(t.$slots, "time-label", qe({ ref_for: !0 }, {
2067
+ x: W.value.left + Or.value * n + Or.value / 2,
2068
+ y: W.value.bottom + z.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + z.value.style.chart.grid.x.timeLabels.offsetY,
2069
+ fontSize: z.value.style.chart.grid.x.timeLabels.fontSize,
2070
+ fill: z.value.style.chart.grid.x.timeLabels.color,
2071
+ transform: `translate(${W.value.left + Or.value * n + Or.value / 2}, ${W.value.bottom + z.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + z.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${z.value.style.chart.grid.x.timeLabels.rotation})`,
2072
+ absoluteIndex: e.absoluteIndex,
2073
+ content: e.text,
2074
+ textAnchor: z.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : z.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
2075
+ show: !0
2076
+ }), void 0, !0)]))), 256))])) : (D(), C("g", Et, [(D(!0), C(y, null, k(Gr.value, (e, n) => (D(), C("g", null, [String(e.text).includes("\n") ? (D(), C("text", {
2077
+ key: n + "-multi",
2078
+ "text-anchor": z.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : z.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
2079
+ "font-size": z.value.style.chart.grid.x.timeLabels.fontSize,
2080
+ fill: z.value.style.chart.grid.x.timeLabels.color,
2081
+ transform: `
2082
+ translate(
2083
+ ${Q(n)},
2084
+ ${W.value.bottom + z.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + z.value.style.chart.grid.x.timeLabels.offsetY}
2085
+ ),
2086
+ rotate(${z.value.style.chart.grid.x.timeLabels.rotation})
2087
+ `,
2088
+ style: Xe({ cursor: B.value ? "pointer" : "default" }),
2089
+ innerHTML: t.createTSpansFromLineBreaksOnX({
2090
+ content: String(e.text),
2091
+ fontSize: z.value.style.chart.grid.x.timeLabels.fontSize,
2092
+ fill: z.value.style.chart.grid.x.timeLabels.color,
2093
+ x: 0,
2094
+ y: 0
2095
+ }),
2096
+ onClick: () => Si(e, n)
2097
+ }, null, 12, Ot)) : (D(), C("text", {
2098
+ class: "vue-data-ui-time-label",
2099
+ key: n,
2100
+ "text-anchor": z.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : z.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
2101
+ "font-size": z.value.style.chart.grid.x.timeLabels.fontSize,
2102
+ "font-weight": z.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
2103
+ fill: z.value.style.chart.grid.x.timeLabels.color,
2104
+ transform: `translate(${Q(n)}, ${W.value.bottom + z.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + z.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${z.value.style.chart.grid.x.timeLabels.rotation})`,
2105
+ style: Xe({ cursor: B.value ? "pointer" : "default" }),
2106
+ onClick: () => Si(e, n)
2107
+ }, j(e.text), 13, Dt))]))), 256))]))], 512)) : S("", !0),
2108
+ (vn.value || ![null, void 0].includes($.value)) && !z.value.style.chart.highlighter.useLine ? (D(!0), C(y, { key: 11 }, k(q.value.end - q.value.start, (e, t) => (D(), C("g", { key: `tooltip_trap_highlighter_${t}` }, [w("rect", {
2109
+ x: pi(t).x,
2110
+ y: W.value.top,
2111
+ height: W.value.height,
2112
+ width: pi(t).width,
2113
+ fill: [In.value, $.value].includes(t) ? M(n)(z.value.style.chart.highlighter.color, z.value.style.chart.highlighter.opacity) : "transparent",
2114
+ style: {
2115
+ transition: "none !important",
2116
+ animation: "none !important"
2117
+ }
2118
+ }, null, 8, kt)]))), 128)) : S("", !0),
2119
+ (vn.value || ![null, void 0].includes($.value)) && z.value.style.chart.highlighter.useLine ? (D(), C(y, { key: 12 }, [![null, void 0].includes($.value) || ![null, void 0].includes(In.value) ? (D(), C("g", At, [w("line", {
2120
+ x1: Q(($.value ?? In.value) || 0),
2121
+ x2: Q(($.value ?? In.value) || 0),
2122
+ y1: M(ie)(W.value.top),
2123
+ y2: M(ie)(W.value.bottom),
2124
+ stroke: z.value.style.chart.highlighter.color,
2125
+ "stroke-width": z.value.style.chart.highlighter.lineWidth,
2126
+ "stroke-dasharray": z.value.style.chart.highlighter.lineDasharray,
2127
+ "stroke-linecap": "round",
2128
+ style: {
2129
+ transition: "none !important",
2130
+ animation: "none !important",
2131
+ "pointer-events": "none"
2132
+ }
2133
+ }, null, 8, jt)])) : S("", !0)], 64)) : S("", !0),
2134
+ (D(!0), C(y, null, k(Y.value, (e) => (D(), C(y, { key: `shp_sel_${e.id}` }, [vn.value && q.value.end - q.value.start > z.value.style.chart.lines.dot.hideAboveMaxSerieLength ? (D(), C("g", Mt, [$.value == null ? S("", !0) : (D(), C(y, { key: 0 }, [e.rel.includes($.value) && e.fullSeries?.[q.value.start + $.value] != null && !Number.isNaN(e.fullSeries?.[q.value.start + $.value]) ? (D(), x(Ae, {
2135
+ key: 0,
2136
+ shape: [
2137
+ "triangle",
2138
+ "square",
2139
+ "diamond",
2140
+ "pentagon",
2141
+ "hexagon",
2142
+ "star"
2143
+ ].includes(e.shape) ? e.shape : "circle",
2144
+ color: z.value.style.chart.lines.dot.useSerieColor ? e.color : z.value.style.chart.lines.dot.fill,
2145
+ plot: {
2146
+ x: M(_)(e.points[e.rel.indexOf($.value)].x),
2147
+ y: M(_)(e.points[e.rel.indexOf($.value)].y)
2148
+ },
2149
+ radius: z.value.style.chart.lines.dot.radius * 1.3,
2150
+ stroke: z.value.style.chart.lines.dot.useSerieColor ? z.value.style.chart.lines.dot.stroke : e.color,
2151
+ strokeWidth: z.value.style.chart.lines.dot.strokeWidth,
2152
+ still: M(Vn),
2153
+ class: Ye({ "vue-data-ui-transition": M(zn) })
2154
+ }, null, 8, [
2155
+ "shape",
2156
+ "color",
2157
+ "plot",
2158
+ "radius",
2159
+ "stroke",
2160
+ "strokeWidth",
2161
+ "still",
2162
+ "class"
2163
+ ])) : S("", !0)], 64))])) : S("", !0)], 64))), 128)),
2164
+ (D(!0), C(y, null, k(Y.value, (e) => (D(), C(y, { key: `shp_${e.id}` }, [q.value.end - q.value.start < z.value.style.chart.lines.dot.hideAboveMaxSerieLength ? (D(!0), C(y, { key: 0 }, k(e.points, (t, n) => (D(), C("g", { key: `shp_${e.id}_${q.value.start + n}` }, [e.fullSeries?.[q.value.start + e.rel[n]] != null && !Number.isNaN(e.fullSeries?.[q.value.start + e.rel[n]]) ? (D(), x(Ae, {
2165
+ key: 0,
2166
+ shape: [
2167
+ "triangle",
2168
+ "square",
2169
+ "diamond",
2170
+ "pentagon",
2171
+ "hexagon",
2172
+ "star"
2173
+ ].includes(e.shape) ? e.shape : "circle",
2174
+ color: z.value.style.chart.lines.dot.useSerieColor ? e.color : z.value.style.chart.lines.dot.fill,
2175
+ plot: {
2176
+ x: t.x,
2177
+ y: t.y
2178
+ },
2179
+ radius: vn.value && $.value === e.rel[n] ? z.value.style.chart.lines.dot.radius * 1.3 : z.value.style.chart.lines.dot.radius,
2180
+ stroke: z.value.style.chart.lines.dot.useSerieColor ? z.value.style.chart.lines.dot.stroke : e.color,
2181
+ strokeWidth: z.value.style.chart.lines.dot.strokeWidth,
2182
+ still: M(Vn),
2183
+ class: Ye({ "vue-data-ui-transition": M(zn) })
2184
+ }, null, 8, [
2185
+ "shape",
2186
+ "color",
2187
+ "plot",
2188
+ "radius",
2189
+ "stroke",
2190
+ "strokeWidth",
2191
+ "still",
2192
+ "class"
2193
+ ])) : S("", !0)]))), 128)) : S("", !0)], 64))), 128)),
2194
+ H.value.dataLabels.show && z.value.style.chart.lines.dataLabels.hideAboveMaxSerieLength > q.value.end - q.value.start ? (D(), C(y, { key: 13 }, [(D(!0), C(y, null, k(Y.value, (e, t) => (D(), C("g", { key: `dl_${e.id}` }, [(D(!0), C(y, null, k(e.points, (n, r) => (D(), C(y, { key: `dp_${e.id}_${q.value.start + r}` }, [Zi(e.series[r], e.proportions[r]) ? (D(), C("text", {
2195
+ key: 0,
2196
+ class: Ye({ "vue-data-ui-transition": M(zn) }),
2197
+ transform: `translate(${n.x}, ${n.y + (e.series[r] >= 0 ? -z.value.style.chart.lines.dataLabels.fontSize / 2 + z.value.style.chart.lines.dataLabels.offsetY : z.value.style.chart.lines.dataLabels.fontSize * 1.2 - z.value.style.chart.lines.dataLabels.offsetY)})`,
2198
+ "font-size": z.value.style.chart.lines.dataLabels.fontSize,
2199
+ fill: z.value.style.chart.lines.dataLabels.color,
2200
+ "font-weight": z.value.style.chart.lines.dataLabels.bold ? "bold" : "normal",
2201
+ "text-anchor": "middle"
2202
+ }, j(z.value.style.chart.lines.showDistributedPercentage && z.value.style.chart.lines.distributed ? ea(e.proportions[r] * 100, e, t, e.rel[r]) : $i(e.series[r], e, t, e.rel[r], e.signedSeries[r])), 11, Nt)) : S("", !0)], 64))), 128))]))), 128)), z.value.style.chart.lines.totalValues.show && Y.value.length > 1 ? (D(), C("g", {
2203
+ key: 0,
2204
+ ref_key: "sumTop",
2205
+ ref: Tn
2206
+ }, [(D(!0), C(y, null, k(Ir.value, (e, t) => (D(), C(y, { key: `total_l_${t + q.value.start}` }, [!z.value.style.chart.lines.dataLabels.hideEmptyValues || e.value !== 0 ? (D(), C("text", {
2207
+ key: 0,
2208
+ class: Ye({ "vue-data-ui-transition": M(zn) }),
2209
+ transform: `translate(${Q(t)}, ${Rr(t)})`,
2210
+ "text-anchor": "middle",
2211
+ "font-size": z.value.style.chart.lines.totalValues.fontSize,
2212
+ "font-weight": z.value.style.chart.lines.totalValues.bold ? "bold" : "normal",
2213
+ fill: z.value.style.chart.lines.totalValues.color
2214
+ }, j($i(e.value, e, t, t, e.sign)), 11, Pt)) : S("", !0)], 64))), 128))], 512)) : S("", !0)], 64)) : S("", !0),
2215
+ Sr.value ? (D(), C("rect", qe({ key: 14 }, _r.value, {
2216
+ "data-start": q.value.start,
2217
+ "data-end": q.value.end
2218
+ }), null, 16, Ft)) : S("", !0),
2219
+ A(t.$slots, "svg", { svg: {
2220
+ drawingArea: W.value,
2221
+ data: Y.value,
2222
+ isPrintingImg: M(Qn) || M($n) || yn.value,
2223
+ isPrintingSvg: bn.value
2224
+ } }, void 0, !0)
2225
+ ], 46, ut)), t.$slots.hint ? (D(), C("div", It, [A(t.$slots, "hint", E(T({
2226
+ hint: z.value.a11y.translations.keyboardNavigation,
2227
+ isVisible: ia.value
2228
+ })), void 0, !0)])) : S("", !0)]),
2229
+ t.$slots.watermark ? (D(), C("div", Lt, [A(t.$slots, "watermark", E(T({ isPrinting: M(Qn) || M($n) || yn.value || bn.value })), void 0, !0)])) : S("", !0),
2230
+ hn.value && (z.value.style.chart.legend.show || t.$slots.legend) ? (D(), x(He, {
2231
+ key: 6,
2232
+ to: z.value.style.chart.legend.position === "top" ? `#legend-top-${I.value}` : `#legend-bottom-${I.value}`
2233
+ }, [w("div", {
2234
+ ref_key: "chartLegend",
2235
+ ref: on
2236
+ }, [A(t.$slots, "legend", { legend: Ti.value }, () => [z.value.style.chart.legend.show ? (D(), x(Be, {
2237
+ key: 0,
2238
+ legendSet: Ti.value,
2239
+ config: Ei.value,
2240
+ isCursorPointer: B.value,
2241
+ onClickMarker: r[0] ||= ({ legend: e }) => e.segregate()
2242
+ }, Ue({
2243
+ item: N(({ legend: e }) => [M(Vn) ? S("", !0) : (D(), C("div", {
2244
+ key: 0,
2245
+ onClick: (t) => e.segregate(),
2246
+ style: Xe(`opacity:${L.value.includes(e.id) ? .5 : 1}`)
2247
+ }, j(e.name), 13, Rt))]),
2248
+ legendToggle: N(() => [Ti.value.length > 2 && z.value.style.chart.legend.selectAllToggle.show && !M(Vn) ? (D(), x(Ie, {
2249
+ key: 0,
2250
+ backgroundColor: z.value.style.chart.legend.selectAllToggle.backgroundColor,
2251
+ color: z.value.style.chart.legend.selectAllToggle.color,
2252
+ fontSize: z.value.style.chart.legend.fontSize,
2253
+ checked: L.value.length > 0,
2254
+ isCursorPointer: B.value,
2255
+ onToggle: Ci
2256
+ }, null, 8, [
2257
+ "backgroundColor",
2258
+ "color",
2259
+ "fontSize",
2260
+ "checked",
2261
+ "isCursorPointer"
2262
+ ])) : S("", !0)]),
2263
+ _: 2
2264
+ }, [t.$slots.pattern ? {
2265
+ name: "legend-pattern",
2266
+ fn: N(({ legend: e, index: t }) => [Ge(Ae, {
2267
+ shape: e.shape,
2268
+ radius: 30,
2269
+ stroke: "none",
2270
+ plot: {
2271
+ x: 30,
2272
+ y: 30
2273
+ },
2274
+ fill: `url(#pattern_${I.value}_${t})`
2275
+ }, null, 8, ["shape", "fill"])]),
2276
+ key: "0"
2277
+ } : void 0]), 1032, [
2278
+ "legendSet",
2279
+ "config",
2280
+ "isCursorPointer"
2281
+ ])) : S("", !0)], !0)], 512)], 8, ["to"])) : S("", !0),
2282
+ en.value && z.value.userOptions.buttons.table ? (D(), x($e(Bi.value.component), qe({ key: 7 }, Bi.value.props, {
2283
+ ref_key: "tableUnit",
2284
+ ref: gn,
2285
+ onClose: Vi
2286
+ }), Ue({
2287
+ content: N(() => [Ge(M(Gt), {
2288
+ colNames: Mi.value.colNames,
2289
+ head: Mi.value.head,
2290
+ body: Mi.value.body,
2291
+ config: Mi.value.config,
2292
+ title: z.value.table.useDialog ? "" : Bi.value.title,
2293
+ withCloseButton: !z.value.table.useDialog,
2294
+ isCursorPointer: B.value,
2295
+ onClose: Vi
2296
+ }, {
2297
+ th: N(({ th: e }) => [w("div", { innerHTML: e }, null, 8, zt)]),
2298
+ td: N(({ td: e }) => [We(j(isNaN(Number(e)) ? e : M(h)({
2299
+ p: z.value.style.chart.lines.dataLabels.prefix,
2300
+ v: e,
2301
+ s: z.value.style.chart.lines.dataLabels.suffix,
2302
+ r: z.value.table.td.roundingValue
2303
+ })), 1)]),
2304
+ _: 1
2305
+ }, 8, [
2306
+ "colNames",
2307
+ "head",
2308
+ "body",
2309
+ "config",
2310
+ "title",
2311
+ "withCloseButton",
2312
+ "isCursorPointer"
2313
+ ])]),
2314
+ _: 2
2315
+ }, [z.value.table.useDialog ? {
2316
+ name: "title",
2317
+ fn: N(() => [We(j(Bi.value.title), 1)]),
2318
+ key: "0"
2319
+ } : void 0, z.value.table.useDialog ? {
2320
+ name: "actions",
2321
+ fn: N(() => [w("button", {
2322
+ tabindex: "0",
2323
+ class: "vue-ui-user-options-button",
2324
+ onClick: r[1] ||= (e) => ji(z.value.userOptions.callbacks.csv),
2325
+ style: Xe({ cursor: B.value ? "pointer" : "default" })
2326
+ }, [Ge(M(Ut), {
2327
+ name: "fileCsv",
2328
+ stroke: Bi.value.props.color
2329
+ }, null, 8, ["stroke"])], 4)]),
2330
+ key: "1"
2331
+ } : void 0]), 1040)) : S("", !0),
2332
+ z.value.style.chart.zoom.show && en.value && ei.value && K.value > 6 ? (D(), x(Fe, {
2333
+ key: 8,
2334
+ ref_key: "chartSlicer",
2335
+ ref: sn,
2336
+ "data-dom-to-png-ignore-layout": "",
2337
+ allMinimaps: Mr.value,
2338
+ background: z.value.style.chart.zoom.color,
2339
+ borderColor: z.value.style.chart.backgroundColor,
2340
+ customFormat: z.value.style.chart.zoom.customFormat,
2341
+ cutNullValues: !1,
2342
+ enableRangeHandles: z.value.style.chart.zoom.enableRangeHandles,
2343
+ enableSelectionDrag: z.value.style.chart.zoom.enableSelectionDrag,
2344
+ end: q.value.end,
2345
+ focusOnDrag: z.value.style.chart.zoom.focusOnDrag,
2346
+ focusRangeRatio: z.value.style.chart.zoom.focusRangeRatio,
2347
+ fontSize: z.value.style.chart.zoom.fontSize,
2348
+ immediate: !z.value.style.chart.zoom.preview.enable,
2349
+ inputColor: z.value.style.chart.zoom.color,
2350
+ isPreview: Sr.value,
2351
+ labelLeft: z.value.style.chart.grid.x.timeLabels.values[q.value.start] ? Br.value?.[0]?.text ?? "" : "",
2352
+ labelRight: z.value.style.chart.grid.x.timeLabels.values[q.value.end - 1] ? Br.value?.at(-1)?.text ?? "" : "",
2353
+ max: Math.max(...e.dataset.map((e) => e.series.length)),
2354
+ min: 0,
2355
+ minimap: jr.value,
2356
+ minimapCompact: z.value.style.chart.zoom.minimap.compact,
2357
+ minimapFrameColor: z.value.style.chart.zoom.minimap.frameColor,
2358
+ minimapIndicatorColor: z.value.style.chart.zoom.minimap.indicatorColor,
2359
+ minimapMerged: !1,
2360
+ minimapSelectedColor: z.value.style.chart.zoom.minimap.selectedColor,
2361
+ minimapSelectedColorOpacity: z.value.style.chart.zoom.minimap.selectedColorOpacity,
2362
+ minimapSelectedIndex: $.value,
2363
+ minimapSelectionRadius: 1,
2364
+ preciseLabels: Yr.value.length ? Yr.value : Vr.value,
2365
+ refreshEndPoint: z.value.style.chart.zoom.endIndex === null ? Math.max(...e.dataset.map((e) => e.series.length)) : z.value.style.chart.zoom.endIndex + 1,
2366
+ refreshStartPoint: z.value.style.chart.zoom.startIndex === null ? 0 : z.value.style.chart.zoom.startIndex,
2367
+ selectColor: z.value.style.chart.zoom.highlightColor,
2368
+ selectedSeries: Ji.value,
2369
+ smoothMinimap: !1,
2370
+ start: q.value.start,
2371
+ textColor: z.value.style.chart.color,
2372
+ timeLabels: Vr.value,
2373
+ usePreciseLabels: z.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !z.value.style.chart.zoom.useDefaultFormat,
2374
+ valueEnd: q.value.end,
2375
+ valueStart: q.value.start,
2376
+ verticalHandles: z.value.style.chart.zoom.minimap.verticalHandles,
2377
+ maxWidth: z.value.style.chart.zoom.maxWidth,
2378
+ minimapLeftInsetRatio: W.value.chartWidth > 0 && z.value.style.chart.zoom.autoFit ? W.value.left / W.value.chartWidth : null,
2379
+ minimapRightInsetRatio: W.value.chartWidth > 0 && z.value.style.chart.zoom.autoFit ? (W.value.chartWidth - W.value.right) / W.value.chartWidth : null,
2380
+ isCursorPointer: B.value,
2381
+ additionalMinimapHeight: z.value.style.chart.zoom.minimap.additionalHeight,
2382
+ handleType: z.value.style.chart.zoom.minimap.handleType,
2383
+ handleIconColor: z.value.style.chart.zoom.minimap.handleIconColor,
2384
+ handleBorderWidth: z.value.style.chart.zoom.minimap.handleBorderWidth,
2385
+ handleBorderColor: z.value.style.chart.zoom.minimap.handleBorderColor,
2386
+ handleFill: z.value.style.chart.zoom.minimap.handleFill,
2387
+ handleWidth: z.value.style.chart.zoom.minimap.handleWidth,
2388
+ "onUpdate:end": ii,
2389
+ "onUpdate:start": ri,
2390
+ onTrapMouse: br,
2391
+ onReset: r[2] ||= () => Dr({ force: !0 }),
2392
+ onFutureEnd: r[3] ||= (e) => Cr("end", e),
2393
+ onFutureStart: r[4] ||= (e) => Cr("start", e)
2394
+ }, {
2395
+ "reset-action": N(({ reset: e }) => [A(t.$slots, "reset-action", E(T({ reset: e })), void 0, !0)]),
2396
+ slotMap: N(({ width: e, height: t, unitW: n }) => [w("g", { innerHTML: Xi({
2397
+ minimapW: e,
2398
+ minimapH: t,
2399
+ unitW: n
2400
+ }) }, null, 8, Bt)]),
2401
+ _: 3
2402
+ }, 8, /* @__PURE__ */ "allMinimaps.background.borderColor.customFormat.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.start.textColor.timeLabels.usePreciseLabels.valueEnd.valueStart.verticalHandles.maxWidth.minimapLeftInsetRatio.minimapRightInsetRatio.isCursorPointer.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth".split("."))) : S("", !0),
2403
+ w("div", { id: `legend-bottom-${I.value}` }, null, 8, Vt),
2404
+ Ge(M(Ht), {
2405
+ teleportTo: z.value.style.chart.tooltip.teleportTo,
2406
+ show: H.value.showTooltip && nn.value,
2407
+ backgroundColor: z.value.style.chart.tooltip.backgroundColor,
2408
+ color: z.value.style.chart.tooltip.color,
2409
+ fontSize: z.value.style.chart.tooltip.fontSize,
2410
+ borderRadius: z.value.style.chart.tooltip.borderRadius,
2411
+ borderColor: z.value.style.chart.tooltip.borderColor,
2412
+ borderWidth: z.value.style.chart.tooltip.borderWidth,
2413
+ backgroundOpacity: z.value.style.chart.tooltip.backgroundOpacity,
2414
+ position: z.value.style.chart.tooltip.position,
2415
+ offsetX: z.value.style.chart.tooltip.offsetX,
2416
+ offsetY: z.value.style.chart.tooltip.offsetY,
2417
+ parent: tn.value,
2418
+ content: bi.value,
2419
+ isFullscreen: un.value,
2420
+ isCustom: z.value.style.chart.tooltip.customFormat && typeof z.value.style.chart.tooltip.customFormat == "function",
2421
+ smooth: z.value.style.chart.tooltip.smooth,
2422
+ backdropFilter: z.value.style.chart.tooltip.backdropFilter,
2423
+ smoothForce: z.value.style.chart.tooltip.smoothForce,
2424
+ smoothSnapThreshold: z.value.style.chart.tooltip.smoothSnapThreshold,
2425
+ isA11yMode: jn.value === "keyboard",
2426
+ a11yPosition: An.value
2427
+ }, {
2428
+ "tooltip-before": N(() => [A(t.$slots, "tooltip-before", E(T({ ...Qr.value })), void 0, !0)]),
2429
+ tooltip: N(() => [A(t.$slots, "tooltip", E(T({ ...Qr.value })), void 0, !0)]),
2430
+ "tooltip-after": N(() => [A(t.$slots, "tooltip-after", E(T({ ...Qr.value })), void 0, !0)]),
2431
+ _: 3
2432
+ }, 8, [
2433
+ "teleportTo",
2434
+ "show",
2435
+ "backgroundColor",
2436
+ "color",
2437
+ "fontSize",
2438
+ "borderRadius",
2439
+ "borderColor",
2440
+ "borderWidth",
2441
+ "backgroundOpacity",
2442
+ "position",
2443
+ "offsetX",
2444
+ "offsetY",
2445
+ "parent",
2446
+ "content",
2447
+ "isFullscreen",
2448
+ "isCustom",
2449
+ "smooth",
2450
+ "backdropFilter",
2451
+ "smoothForce",
2452
+ "smoothSnapThreshold",
2453
+ "isA11yMode",
2454
+ "a11yPosition"
2455
+ ]),
2456
+ t.$slots.source ? (D(), C("div", {
2457
+ key: 9,
2458
+ ref_key: "source",
2459
+ ref: ln,
2460
+ dir: "auto"
2461
+ }, [A(t.$slots, "source", {}, void 0, !0)], 512)) : S("", !0),
2462
+ A(t.$slots, "skeleton", {}, () => [M(Vn) ? (D(), x(xe, { key: 0 })) : S("", !0)], !0)
2463
+ ], 46, ot));
2464
+ }
2465
+ }, [["__scopeId", "data-v-9f4fff5f"]]);
2466
+ //#endregion
2467
+ export { at as n, Ht as t };