vue-data-ui 3.26.3 → 3.26.5

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 (179) hide show
  1. package/dist/{Arrow-Bt3aGRMb.js → Arrow-BQbcOtfC.js} +1 -1
  2. package/dist/{BaseDraggableDialog-C1Slb3Yh.js → BaseDraggableDialog-BCFCiP_6.js} +2 -2
  3. package/dist/{BaseIcon-BV75ei8X.js → BaseIcon-CIK6Sqo3.js} +1 -1
  4. package/dist/{BaseLegendToggle-DtS_Oj3B.js → BaseLegendToggle-Doa5rYP2.js} +1 -1
  5. package/dist/{BaseZoomControls-DIhoeyZu.js → BaseZoomControls-BGQM8B5F.js} +2 -2
  6. package/dist/{ColorPicker--Y89hTnE.js → ColorPicker-Cb7qpvFt.js} +2 -2
  7. package/dist/{DataTable-DX5fToAo.js → DataTable-B6LDCXBz.js} +2 -2
  8. package/dist/{HillActions-D6weVdns.js → HillActions-CwdgCb7Q.js} +1 -1
  9. package/dist/{Legend-Dv90gh-6.js → Legend-D9FGXIbQ.js} +2 -2
  10. package/dist/{NonSvgPenAndPaper-D2BM5C1-.js → NonSvgPenAndPaper-9T4MSwXC.js} +3 -3
  11. package/dist/{PackageVersion-DDtcwca2.js → PackageVersion-CslTvFsC.js} +1 -1
  12. package/dist/{PenAndPaper-DkQ4sEhs.js → PenAndPaper-C1EcBgJW.js} +3 -3
  13. package/dist/{Shape-B_kDj1gF.js → Shape-BZgQLgu5.js} +1 -1
  14. package/dist/{SlicerPreview-BgyIezm0.js → SlicerPreview-DyYv_G-_.js} +2 -2
  15. package/dist/{SparkTooltip-BNpyQ021.js → SparkTooltip-D4cRlyuq.js} +1 -1
  16. package/dist/{Title-C2JKI5td.js → Title-Bd98RysU.js} +1 -1
  17. package/dist/{Tooltip-2NAb_Rrx.js → Tooltip-DmQeI5WE.js} +1 -1
  18. package/dist/{UserOptions-Dgn3StKw.js → UserOptions-B_yBcZ1-.js} +2 -2
  19. package/dist/components/arrow.js +1 -1
  20. package/dist/components/vue-ui-3d-bar.js +1 -1
  21. package/dist/components/vue-ui-accordion.js +1 -1
  22. package/dist/components/vue-ui-age-pyramid.js +1 -1
  23. package/dist/components/vue-ui-annotator.js +1 -1
  24. package/dist/components/vue-ui-bullet.js +1 -1
  25. package/dist/components/vue-ui-bump.js +1 -1
  26. package/dist/components/vue-ui-candlestick.js +1 -1
  27. package/dist/components/vue-ui-carousel-table.js +1 -1
  28. package/dist/components/vue-ui-chestnut.js +1 -1
  29. package/dist/components/vue-ui-chord.js +1 -1
  30. package/dist/components/vue-ui-circle-pack.js +1 -1
  31. package/dist/components/vue-ui-cursor.js +1 -1
  32. package/dist/components/vue-ui-dag.js +1 -1
  33. package/dist/components/vue-ui-dashboard.js +1 -1
  34. package/dist/components/vue-ui-digits.js +1 -1
  35. package/dist/components/vue-ui-donut-evolution.js +1 -1
  36. package/dist/components/vue-ui-donut.js +1 -1
  37. package/dist/components/vue-ui-dumbbell.js +1 -1
  38. package/dist/components/vue-ui-flow.js +1 -1
  39. package/dist/components/vue-ui-funnel.js +1 -1
  40. package/dist/components/vue-ui-galaxy.js +1 -1
  41. package/dist/components/vue-ui-gauge.js +1 -1
  42. package/dist/components/vue-ui-geo.js +1 -1
  43. package/dist/components/vue-ui-gizmo.js +1 -1
  44. package/dist/components/vue-ui-heatmap.js +1 -1
  45. package/dist/components/vue-ui-hill.js +1 -1
  46. package/dist/components/vue-ui-history-plot.js +1 -1
  47. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  48. package/dist/components/vue-ui-icon.js +1 -1
  49. package/dist/components/vue-ui-kpi.js +1 -1
  50. package/dist/components/vue-ui-label.js +1 -1
  51. package/dist/components/vue-ui-mini-loader.js +1 -1
  52. package/dist/components/vue-ui-molecule.js +1 -1
  53. package/dist/components/vue-ui-mood-radar.js +1 -1
  54. package/dist/components/vue-ui-nested-donuts.js +1 -1
  55. package/dist/components/vue-ui-onion.js +1 -1
  56. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  57. package/dist/components/vue-ui-quadrant.js +1 -1
  58. package/dist/components/vue-ui-quick-chart.js +1 -1
  59. package/dist/components/vue-ui-radar.js +1 -1
  60. package/dist/components/vue-ui-rating.js +1 -1
  61. package/dist/components/vue-ui-relation-circle.js +1 -1
  62. package/dist/components/vue-ui-ridgeline.js +1 -1
  63. package/dist/components/vue-ui-rings.js +1 -1
  64. package/dist/components/vue-ui-scatter.js +1 -1
  65. package/dist/components/vue-ui-skeleton.js +1 -1
  66. package/dist/components/vue-ui-smiley.js +1 -1
  67. package/dist/components/vue-ui-spark-trend.js +1 -1
  68. package/dist/components/vue-ui-sparkbar.js +1 -1
  69. package/dist/components/vue-ui-sparkgauge.js +1 -1
  70. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  71. package/dist/components/vue-ui-sparkline.js +1 -1
  72. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  73. package/dist/components/vue-ui-stackbar.js +1 -1
  74. package/dist/components/vue-ui-stackline.js +1 -1
  75. package/dist/components/vue-ui-strip-plot.js +1 -1
  76. package/dist/components/vue-ui-table-heatmap.js +1 -1
  77. package/dist/components/vue-ui-table-sparkline.js +1 -1
  78. package/dist/components/vue-ui-table.js +1 -1
  79. package/dist/components/vue-ui-thermometer.js +1 -1
  80. package/dist/components/vue-ui-timer.js +1 -1
  81. package/dist/components/vue-ui-tiremarks.js +1 -1
  82. package/dist/components/vue-ui-treemap.js +1 -1
  83. package/dist/components/vue-ui-vertical-bar.js +1 -1
  84. package/dist/components/vue-ui-waffle.js +1 -1
  85. package/dist/components/vue-ui-wheel.js +1 -1
  86. package/dist/components/vue-ui-word-cloud.js +1 -1
  87. package/dist/components/vue-ui-world.js +1 -1
  88. package/dist/components/vue-ui-xy-canvas.js +1 -1
  89. package/dist/components/vue-ui-xy.js +1 -1
  90. package/dist/{dom-to-png-DKdtTkNC.js → dom-to-png-B_RJohlM.js} +1 -1
  91. package/dist/{exposedLib-DN6QRAx2.js → exposedLib-C-JlvWAt.js} +1 -1
  92. package/dist/{img-CaIaBHA0.js → img-KURaWjZI.js} +1 -1
  93. package/dist/{labelUtils-CD5XzcAo.js → labelUtils-DShv2Mbg.js} +1 -1
  94. package/dist/{lib-CklJ7rIN.js → lib-TWIH5fGr.js} +4 -4
  95. package/dist/{package-DDthpXJc.js → package-DbTqd5lc.js} +1 -1
  96. package/dist/{pdf-6hacmnKW.js → pdf-CLl24Afl.js} +1 -1
  97. package/dist/{render-common-CF9qAkaI.js → render-common-CKv-jztN.js} +2 -2
  98. package/dist/ssr/vue-ui-donut.js +1 -1
  99. package/dist/ssr/vue-ui-xy.js +1 -1
  100. package/dist/ssr.js +2 -2
  101. package/dist/style.css +1 -1
  102. package/dist/types/vue-data-ui.d.ts +10 -1
  103. package/dist/{useNestedProp-Tc9i6ZcN.js → useNestedProp-BxOdWM0c.js} +1 -1
  104. package/dist/{usePrinter-Dp3X1vqr.js → usePrinter-8Y1Rju0Y.js} +2 -2
  105. package/dist/utils.js +2 -2
  106. package/dist/{vue-data-ui-DZ_ypVjD.js → vue-data-ui-C3G5Zdl5.js} +70 -70
  107. package/dist/vue-data-ui.js +73 -73
  108. package/dist/{vue-ui-3d-bar-AE72RbGo.js → vue-ui-3d-bar-Cl6-fBV8.js} +6 -6
  109. package/dist/{vue-ui-accordion-15kKhkup.js → vue-ui-accordion-AyyZDab3.js} +3 -3
  110. package/dist/{vue-ui-age-pyramid-BprwHR2l.js → vue-ui-age-pyramid-DOtWAL8s.js} +6 -6
  111. package/dist/{vue-ui-annotator-J4Wo2_DR.js → vue-ui-annotator-BCVjlojM.js} +6 -6
  112. package/dist/{vue-ui-bullet-jJk6aC2d.js → vue-ui-bullet-B_1Ctjvq.js} +7 -7
  113. package/dist/{vue-ui-bump-DDek6Y8i.js → vue-ui-bump-kOK6x4al.js} +6 -6
  114. package/dist/{vue-ui-candlestick-C_T-4PvR.js → vue-ui-candlestick-KvhjbAxt.js} +7 -7
  115. package/dist/{vue-ui-carousel-table-pbg0DNs-.js → vue-ui-carousel-table-ArMiO0cG.js} +4 -4
  116. package/dist/{vue-ui-chestnut-BIZo9bFQ.js → vue-ui-chestnut-DSM0U27X.js} +5 -5
  117. package/dist/{vue-ui-chord-1a-LgYke.js → vue-ui-chord-64akfaem.js} +8 -8
  118. package/dist/{vue-ui-circle-pack-DnxnFOLU.js → vue-ui-circle-pack-CaR_aNEh.js} +6 -6
  119. package/dist/{vue-ui-cursor-B1G3bO3u.js → vue-ui-cursor-DCgqYZiz.js} +3 -3
  120. package/dist/{vue-ui-dag-BJH34mhH.js → vue-ui-dag-8uKK0Rlp.js} +7 -7
  121. package/dist/{vue-ui-dashboard-BxrQFKw2.js → vue-ui-dashboard-DeccYtSY.js} +69 -69
  122. package/dist/{vue-ui-digits-COK65t4o.js → vue-ui-digits-BvK7bVuJ.js} +3 -3
  123. package/dist/{vue-ui-donut-CsBzv7rk.js → vue-ui-donut-8joMj08Z.js} +2 -2
  124. package/dist/{vue-ui-donut-LulYXjY-.js → vue-ui-donut-CvbfzzdT.js} +10 -10
  125. package/dist/{vue-ui-donut-evolution-CrwqKE7G.js → vue-ui-donut-evolution-DgITf95R.js} +9 -9
  126. package/dist/{vue-ui-dumbbell-D2j6gJAr.js → vue-ui-dumbbell-U2L4ZYhB.js} +7 -7
  127. package/dist/{vue-ui-flow-BGb7lpAW.js → vue-ui-flow-DD20fJu_.js} +7 -7
  128. package/dist/{vue-ui-funnel-CJfc8cXT.js → vue-ui-funnel-Cx8hVlZV.js} +6 -6
  129. package/dist/{vue-ui-galaxy-CA2FF651.js → vue-ui-galaxy-VZFZnHPv.js} +9 -9
  130. package/dist/{vue-ui-gauge-D9Ek-tFP.js → vue-ui-gauge-Copa7G58.js} +6 -6
  131. package/dist/{vue-ui-geo-rtEZJFHY.js → vue-ui-geo-DeDQ6ubl.js} +7 -7
  132. package/dist/{vue-ui-gizmo-B_SU2Jgd.js → vue-ui-gizmo-D5oUKIsP.js} +3 -3
  133. package/dist/{vue-ui-heatmap-BySwsSk3.js → vue-ui-heatmap-BukWtNsd.js} +27 -20
  134. package/dist/{vue-ui-hill-Cxf-0GE7.js → vue-ui-hill-DONFacXR.js} +6 -6
  135. package/dist/{vue-ui-history-plot-BZtZ_398.js → vue-ui-history-plot-BMy_y9S6.js} +8 -8
  136. package/dist/{vue-ui-horizontal-bar-DsdB1Lke.js → vue-ui-horizontal-bar-bcPSs999.js} +10 -10
  137. package/dist/{vue-ui-kpi--YE_hJM-.js → vue-ui-kpi-Bol0OWs3.js} +3 -3
  138. package/dist/{vue-ui-label-DfBFm4hK.js → vue-ui-label-cwjXaEDQ.js} +3 -3
  139. package/dist/{vue-ui-mini-loader-pzS7SsP4.js → vue-ui-mini-loader-kdpasmXb.js} +2 -2
  140. package/dist/{vue-ui-molecule-CIm_6t6E.js → vue-ui-molecule-BiAI5lbh.js} +5 -5
  141. package/dist/{vue-ui-mood-radar-ki4ZlohZ.js → vue-ui-mood-radar-f4xXkiBs.js} +7 -7
  142. package/dist/{vue-ui-nested-donuts-Ctbq_pnj.js → vue-ui-nested-donuts-ZmGGEvRk.js} +9 -9
  143. package/dist/{vue-ui-onion-DjznoyvR.js → vue-ui-onion-D6IKPpL-.js} +9 -9
  144. package/dist/{vue-ui-parallel-coordinate-plot-CW27xBHo.js → vue-ui-parallel-coordinate-plot-BbfModz3.js} +9 -9
  145. package/dist/{vue-ui-quadrant-D9270b-4.js → vue-ui-quadrant-CueHa1Pm.js} +9 -9
  146. package/dist/{vue-ui-quick-chart-BwA8ZYnt.js → vue-ui-quick-chart-C8ZxX1Zw.js} +7 -7
  147. package/dist/{vue-ui-radar-CIqWnSkX.js → vue-ui-radar-BcD7Zqvb.js} +8 -8
  148. package/dist/{vue-ui-rating-BYLWm5aG.js → vue-ui-rating-V_OnJN9Y.js} +2 -2
  149. package/dist/{vue-ui-relation-circle-DfcHFOBp.js → vue-ui-relation-circle-DlN4r83K.js} +6 -6
  150. package/dist/{vue-ui-ridgeline-BK23FH_o.js → vue-ui-ridgeline-BlQnTWXi.js} +9 -9
  151. package/dist/{vue-ui-rings-Bo7e_oIT.js → vue-ui-rings-Bf9IKwDr.js} +10 -10
  152. package/dist/{vue-ui-scatter-B2qUgPxs.js → vue-ui-scatter-arPbS9MH.js} +9 -9
  153. package/dist/{vue-ui-skeleton--bojbC6J.js → vue-ui-skeleton-dyXWT6JX.js} +3 -3
  154. package/dist/{vue-ui-smiley-qHvZQJcB.js → vue-ui-smiley-w6nH1I0E.js} +2 -2
  155. package/dist/{vue-ui-spark-trend-DUWAGYCO.js → vue-ui-spark-trend-Bso9bwmY.js} +3 -3
  156. package/dist/{vue-ui-sparkbar-DIN_e8Hd.js → vue-ui-sparkbar-CL06Yt56.js} +3 -3
  157. package/dist/{vue-ui-sparkgauge-CAC8JU-B.js → vue-ui-sparkgauge-BHDM5Hbr.js} +3 -3
  158. package/dist/{vue-ui-sparkhistogram-hSkVMj5Q.js → vue-ui-sparkhistogram-3Tw8PEms.js} +4 -4
  159. package/dist/{vue-ui-sparkline-BosCT_mQ.js → vue-ui-sparkline-znaswFQj.js} +3 -3
  160. package/dist/{vue-ui-sparkstackbar-DB4FwqUL.js → vue-ui-sparkstackbar-BOzVoWoa.js} +4 -4
  161. package/dist/vue-ui-stackbar-BTOvMsP8.js +2755 -0
  162. package/dist/{vue-ui-stackline-D9USdD0o.js → vue-ui-stackline-qcLrNL09.js} +10 -10
  163. package/dist/{vue-ui-strip-plot-CCnX8Iaq.js → vue-ui-strip-plot-BLNaCPm8.js} +7 -7
  164. package/dist/{vue-ui-table-Wjqv8Y_Y.js → vue-ui-table-D295mJIf.js} +5 -5
  165. package/dist/{vue-ui-table-heatmap-Bu9RiTU0.js → vue-ui-table-heatmap-CXeMKqKz.js} +5 -5
  166. package/dist/{vue-ui-table-sparkline-82kb3CVs.js → vue-ui-table-sparkline-BYuwQrwA.js} +4 -4
  167. package/dist/{vue-ui-thermometer-B4VN0-6d.js → vue-ui-thermometer-BwJ0oF-H.js} +6 -6
  168. package/dist/{vue-ui-timer-8xeqZhkj.js → vue-ui-timer-BULpjYiI.js} +5 -5
  169. package/dist/{vue-ui-tiremarks-B6eWE0Q8.js → vue-ui-tiremarks-B7bTeU8h.js} +6 -6
  170. package/dist/{vue-ui-treemap-C0ll73wT.js → vue-ui-treemap-DkqDz9W4.js} +9 -9
  171. package/dist/{vue-ui-waffle-Cw8O3BUF.js → vue-ui-waffle-Cn7WBzqh.js} +10 -10
  172. package/dist/{vue-ui-wheel-B0eYItCQ.js → vue-ui-wheel-Cy7kBvEx.js} +6 -6
  173. package/dist/{vue-ui-word-cloud-D0zkMkNk.js → vue-ui-word-cloud-tRqc2ZMR.js} +7 -7
  174. package/dist/{vue-ui-world-CRhkj77G.js → vue-ui-world-B755-zji.js} +7 -7
  175. package/dist/{vue-ui-xy-CXLKh2F2.js → vue-ui-xy-BiHIJ7rK.js} +2 -2
  176. package/dist/{vue-ui-xy-DFczQEnY.js → vue-ui-xy-DWYTZz_v.js} +10 -10
  177. package/dist/{vue-ui-xy-canvas-NzaEYHDR.js → vue-ui-xy-canvas-DGuMC_Rf.js} +11 -11
  178. package/package.json +2 -2
  179. package/dist/vue-ui-stackbar-COywI2qU.js +0 -2660
@@ -0,0 +1,2755 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { $ as t, $t as n, Ct as r, D as a, Et as o, J as s, Pt as c, Qt as l, Rt as u, S as d, Vt as f, X as ee, Y as te, Zt as ne, _ as re, at as ie, c as ae, et as oe, ft as se, gt as ce, ht as le, i as ue, nt as de, r as fe, t as pe, tn as me, ut as he, v as ge, vt as _e, w as ve } from "./lib-TWIH5fGr.js";
3
+ import { n as ye, t as be } from "./useHints-Dq_w2E8B.js";
4
+ import { n as xe, r as Se, t as Ce } from "./useTimeLabels-d2f-W1L4.js";
5
+ import { t as we } from "./useConfig-DObkR9Aa.js";
6
+ import { t as Te } from "./usePrinter-8Y1Rju0Y.js";
7
+ import { n as Ee, t as De } from "./BaseScanner-Dzc8VT3j.js";
8
+ import { t as Oe } from "./useNestedProp-BxOdWM0c.js";
9
+ import { t as ke } from "./useThemeCheck-C43Tcqmk.js";
10
+ import { t as Ae } from "./useChartExport-iwOqiIWX.js";
11
+ import { t as je } from "./useTransitions-g_zBREk2.js";
12
+ import { t as Me } from "./useStableElementSize-C7KADDKj.js";
13
+ import { t as Ne } from "./useTimeLabelCollider-AEcY4Ioe.js";
14
+ import { t as Pe } from "./img-KURaWjZI.js";
15
+ import { n as Fe } from "./Title-Bd98RysU.js";
16
+ import { t as Ie } from "./Shape-BZgQLgu5.js";
17
+ import { t as Le } from "./_plugin-vue_export-helper-B3ysoDQm.js";
18
+ import { l as Re, t as ze } from "./useResponsive-ZtArZtUf.js";
19
+ import { t as Be } from "./DefGrad-DVBqDjhO.js";
20
+ import { t as Ve } from "./SlicerPreview-DyYv_G-_.js";
21
+ import { t as He } from "./BaseLegendToggle-Doa5rYP2.js";
22
+ import { t as Ue } from "./A11yDataTable-DdRsVULz.js";
23
+ import { t as We } from "./useUserOptionState-DK-_1ddE.js";
24
+ import { t as Ge } from "./useChartAccessibility-DYqac8yF.js";
25
+ import { t as Ke } from "./Legend-D9FGXIbQ.js";
26
+ import { t as qe } from "./vue_ui_stackbar-DdjDL6aq.js";
27
+ import { Fragment as p, Teleport as Je, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as Ye, createSlots as Xe, createTextVNode as Ze, createVNode as Qe, defineAsyncComponent as $e, guardReactiveProps as v, mergeProps as et, nextTick as tt, normalizeClass as y, normalizeProps as b, normalizeStyle as x, onBeforeUnmount as nt, onMounted as rt, openBlock as S, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as it, shallowRef as at, toDisplayString as E, toRefs as ot, unref as D, useSlots as st, watch as ct, watchEffect as lt, withCtx as O } from "vue";
28
+ //#region src/components/vue-ui-stackbar.vue
29
+ var ut = /* @__PURE__ */ e({ default: () => mn }), dt = ["id"], ft = ["id"], pt = ["id"], mt = { style: { position: "relative" } }, ht = [
30
+ "xmlns",
31
+ "aria-describedby",
32
+ "viewBox"
33
+ ], gt = [
34
+ "x",
35
+ "y",
36
+ "width",
37
+ "height"
38
+ ], _t = { key: 1 }, vt = { key: 2 }, yt = ["id"], bt = [
39
+ "x",
40
+ "y",
41
+ "width",
42
+ "height",
43
+ "rx"
44
+ ], xt = [
45
+ "x",
46
+ "y",
47
+ "width",
48
+ "height",
49
+ "stroke",
50
+ "stroke-width",
51
+ "stroke-linecap",
52
+ "stroke-linejoin",
53
+ "stroke-dasharray"
54
+ ], St = [
55
+ "x1",
56
+ "x2",
57
+ "y1",
58
+ "y2",
59
+ "stroke",
60
+ "stroke-width",
61
+ "stroke-dasharray"
62
+ ], Ct = [
63
+ "x1",
64
+ "x2",
65
+ "y1",
66
+ "y2",
67
+ "stroke",
68
+ "stroke-width",
69
+ "stroke-dasharray"
70
+ ], wt = [
71
+ "x1",
72
+ "x2",
73
+ "y1",
74
+ "y2",
75
+ "stroke",
76
+ "stroke-width",
77
+ "stroke-dasharray"
78
+ ], Tt = [
79
+ "x1",
80
+ "x2",
81
+ "y1",
82
+ "y2",
83
+ "stroke",
84
+ "stroke-width",
85
+ "stroke-dasharray"
86
+ ], Et = { key: 0 }, Dt = [
87
+ "x",
88
+ "y",
89
+ "height",
90
+ "clip-path",
91
+ "width",
92
+ "fill",
93
+ "stroke",
94
+ "stroke-width"
95
+ ], Ot = { key: 0 }, kt = [
96
+ "x",
97
+ "y",
98
+ "height",
99
+ "clip-path",
100
+ "width",
101
+ "fill",
102
+ "stroke",
103
+ "stroke-width"
104
+ ], At = [
105
+ "x",
106
+ "y",
107
+ "width",
108
+ "clip-path",
109
+ "height",
110
+ "fill",
111
+ "stroke",
112
+ "stroke-width"
113
+ ], jt = { key: 0 }, Mt = [
114
+ "x",
115
+ "y",
116
+ "width",
117
+ "clip-path",
118
+ "height",
119
+ "fill",
120
+ "stroke",
121
+ "stroke-width"
122
+ ], Nt = [
123
+ "x1",
124
+ "x2",
125
+ "y1",
126
+ "y2",
127
+ "stroke",
128
+ "stroke-width"
129
+ ], Pt = [
130
+ "x1",
131
+ "x2",
132
+ "y1",
133
+ "y2",
134
+ "stroke",
135
+ "stroke-width"
136
+ ], Ft = [
137
+ "x",
138
+ "y",
139
+ "font-size",
140
+ "fill",
141
+ "font-weight"
142
+ ], It = [
143
+ "transform",
144
+ "font-size",
145
+ "fill",
146
+ "font-weight"
147
+ ], Lt = [
148
+ "transform",
149
+ "font-size",
150
+ "fill",
151
+ "font-weight"
152
+ ], Rt = [
153
+ "transform",
154
+ "font-size",
155
+ "font-weight",
156
+ "fill"
157
+ ], zt = [
158
+ "transform",
159
+ "font-size",
160
+ "fill",
161
+ "font-weight"
162
+ ], Bt = [
163
+ "transform",
164
+ "font-size",
165
+ "font-weight",
166
+ "fill"
167
+ ], Vt = ["stroke", "d"], Ht = [
168
+ "transform",
169
+ "font-size",
170
+ "font-weight",
171
+ "fill",
172
+ "text-anchor"
173
+ ], Ut = ["d", "stroke"], Wt = [
174
+ "font-size",
175
+ "font-weight",
176
+ "fill",
177
+ "text-anchor",
178
+ "transform"
179
+ ], Gt = { key: 0 }, Kt = { key: 1 }, qt = [
180
+ "text-anchor",
181
+ "font-size",
182
+ "font-weight",
183
+ "fill",
184
+ "transform",
185
+ "onClick"
186
+ ], Jt = [
187
+ "text-anchor",
188
+ "font-size",
189
+ "fill",
190
+ "transform",
191
+ "innerHTML",
192
+ "onClick"
193
+ ], Yt = { key: 0 }, Xt = { key: 1 }, Zt = [
194
+ "font-size",
195
+ "font-weight",
196
+ "fill",
197
+ "stroke",
198
+ "transform",
199
+ "onClick"
200
+ ], Qt = [
201
+ "font-size",
202
+ "font-weight",
203
+ "fill",
204
+ "transform",
205
+ "onClick",
206
+ "innerHTML"
207
+ ], $t = [
208
+ "x",
209
+ "y",
210
+ "width",
211
+ "height",
212
+ "onClick",
213
+ "onMouseenter",
214
+ "onMouseleave",
215
+ "fill"
216
+ ], en = [
217
+ "x",
218
+ "y",
219
+ "width",
220
+ "height",
221
+ "onClick",
222
+ "onMouseenter",
223
+ "onMouseleave",
224
+ "fill"
225
+ ], tn = [
226
+ "x",
227
+ "y",
228
+ "width",
229
+ "height",
230
+ "fill",
231
+ "fill-opacity",
232
+ "stroke",
233
+ "stroke-opacity",
234
+ "stroke-width",
235
+ "stroke-dasharray"
236
+ ], nn = ["data-start", "data-end"], rn = {
237
+ key: 0,
238
+ style: {
239
+ position: "absolute",
240
+ top: "100%",
241
+ left: "0",
242
+ width: "100%"
243
+ },
244
+ "data-dom-to-png-ignore": "",
245
+ "aria-hidden": "true"
246
+ }, an = {
247
+ key: 4,
248
+ class: "vue-data-ui-watermark"
249
+ }, on = { key: 0 }, sn = ["id"], cn = [
250
+ "x",
251
+ "y",
252
+ "width",
253
+ "height",
254
+ "rx"
255
+ ], ln = [
256
+ "x",
257
+ "y",
258
+ "height",
259
+ "width",
260
+ "fill",
261
+ "stroke",
262
+ "clip-path"
263
+ ], un = ["id"], dn = ["onClick"], fn = { key: 0 }, pn = { key: 1 }, mn = /*#__PURE__*/ Le({
264
+ __name: "vue-ui-stackbar",
265
+ props: {
266
+ config: {
267
+ type: Object,
268
+ default() {
269
+ return {};
270
+ }
271
+ },
272
+ dataset: {
273
+ type: Array,
274
+ default() {
275
+ return [];
276
+ }
277
+ },
278
+ selectedXIndex: {
279
+ type: Number,
280
+ default: void 0
281
+ },
282
+ zoomState: {
283
+ type: Object,
284
+ default: null
285
+ }
286
+ },
287
+ emits: [
288
+ "selectDatapoint",
289
+ "selectLegend",
290
+ "selectTimeLabel",
291
+ "selectX",
292
+ "zoomStart",
293
+ "zoomEnd",
294
+ "zoomReset",
295
+ "update:zoomState",
296
+ "copyAlt"
297
+ ],
298
+ setup(e, { expose: Le, emit: ut }) {
299
+ let mn = $e(() => import("./Tooltip-DmQeI5WE.js")), hn = $e(() => import("./BaseIcon-CIK6Sqo3.js").then((e) => e.n)), gn = $e(() => import("./vue-ui-accordion-AyyZDab3.js").then((e) => e.n)), _n = $e(() => import("./DataTable-B6LDCXBz.js")), vn = $e(() => import("./PenAndPaper-C1EcBgJW.js").then((e) => e.t)), yn = $e(() => import("./UserOptions-B_yBcZ1-.js").then((e) => e.n)), bn = $e(() => import("./PackageVersion-CslTvFsC.js").then((e) => e.t)), xn = $e(() => import("./BaseDraggableDialog-BCFCiP_6.js").then((e) => e.n)), { vue_ui_stackbar: Sn } = we(), { isThemeValid: Cn, warnInvalidTheme: wn } = ke(), Tn = st(), k = e, A = ut, En = m({
300
+ get() {
301
+ return !!k.dataset && k.dataset.length;
302
+ },
303
+ set(e) {
304
+ return e;
305
+ }
306
+ }), j = C(null), M = C(ee()), Dn = C(!1), On = C(null), kn = C(""), N = C([]), An = C(0), jn = C(null), Mn = C(null), Nn = C(null), Pn = C(null), Fn = C(!1), P = C(null), In = C(!1), Ln = C(0), Rn = C(0), zn = C(0), Bn = C(!1), Vn = C(null), Hn = C(null), Un = C(null), Wn = C(null), Gn = C(null), Kn = C(null), qn = C(null), Jn = C(null), Yn = at(null), Xn = C(!1), Zn = C(0), Qn = C(0), F = C(null), $n = C({
307
+ x: 0,
308
+ y: 0
309
+ }), er = C("pointer"), tr = Me({
310
+ elementRef: Yn,
311
+ minimumWidth: 2,
312
+ minimumHeight: 2,
313
+ stableFramesRequired: 2,
314
+ once: !1,
315
+ onSizeAccepted: () => {
316
+ ir();
317
+ }
318
+ });
319
+ function nr() {
320
+ Yn.value = j.value?.parentNode ?? null;
321
+ }
322
+ function rr() {
323
+ return new Promise((e) => {
324
+ requestAnimationFrame(() => {
325
+ requestAnimationFrame(e);
326
+ });
327
+ });
328
+ }
329
+ async function ir() {
330
+ let e = ++Qn.value;
331
+ Xn.value = !1, await tt(), await rr(), await rr(), e === Qn.value && (Zn.value += 1, Xn.value = !0);
332
+ }
333
+ let ar = C(null);
334
+ rt(() => {
335
+ Bn.value = !0, nr(), tr.start(), jr();
336
+ });
337
+ let I = C(gr()), L = m(() => I.value.userOptions), R = m(() => I.value.style.chart.grid), z = m(() => I.value.style.chart.bars), B = m(() => I.value.style.chart.grid.x.timeLabels), V = m(() => I.value.style.chart.tooltip), H = m(() => I.value.style.chart);
338
+ ye({
339
+ config: () => I.value,
340
+ dataset: () => k.dataset,
341
+ component: "VueUiStackbar",
342
+ rules: [
343
+ be.emptyArray,
344
+ {
345
+ test: (e) => e.some((e) => e.series.length > 60),
346
+ message: [
347
+ "👀 Some series have > 60 datapoints. Consider",
348
+ "",
349
+ "▶️ Using VueUiStackline instead, for better readability.",
350
+ "",
351
+ "▶️ Aggregating data to larger time units, to reduce the number of datapoints.",
352
+ "",
353
+ "▶️ Using filters to constraint the data to a specific time range."
354
+ ]
355
+ },
356
+ {
357
+ test: (e) => e.length > 6,
358
+ message: [
359
+ "👀 The number of series > 6, which can make the chart hard to read. Consider:",
360
+ "",
361
+ "▶️ Grouping small values into an \"Other\" category.",
362
+ "",
363
+ "▶️ Using filters to let users choose a maximum number of series to display."
364
+ ]
365
+ }
366
+ ]
367
+ });
368
+ let { transitionEnabled: or } = je({
369
+ config: () => I.value.transitions,
370
+ dataset: () => k.dataset
371
+ }), U = m(() => I.value.userOptions.useCursorPointer), sr = m(() => me({
372
+ defaultConfig: {
373
+ userOptions: { show: !1 },
374
+ useCssAnimation: !1,
375
+ table: { show: !1 },
376
+ tooltip: { show: !1 },
377
+ style: { chart: {
378
+ backgroundColor: "#99999930",
379
+ bars: {
380
+ totalValues: { show: !1 },
381
+ dataLabels: { show: !1 }
382
+ },
383
+ grid: {
384
+ frame: { stroke: "#6A6A6A" },
385
+ scale: {
386
+ scaleMin: 0,
387
+ scaleMax: 40
388
+ },
389
+ x: {
390
+ axisColor: "#6A6A6A",
391
+ linesColor: "#6A6A6A",
392
+ axisName: { show: !1 },
393
+ timeLabels: { show: !1 }
394
+ },
395
+ y: {
396
+ axisColor: "#6A6A6A",
397
+ linesColor: "#6A6A6A",
398
+ axisName: { show: !1 },
399
+ axisLabels: { show: !1 }
400
+ }
401
+ },
402
+ legend: { backgroundColor: "transparent" },
403
+ padding: {
404
+ left: 24,
405
+ right: 24,
406
+ bottom: 12
407
+ },
408
+ zoom: {
409
+ show: !1,
410
+ startIndex: null,
411
+ endIndex: null
412
+ }
413
+ } }
414
+ },
415
+ userConfig: I.value.skeletonConfig ?? {}
416
+ })), { loading: cr, FINAL_DATASET: lr, manualLoading: ur } = Ee({
417
+ ...ot(k),
418
+ FINAL_CONFIG: I,
419
+ prepareConfig: gr,
420
+ callback: () => {
421
+ Promise.resolve().then(async () => {
422
+ (!H.value.zoom.keepState || !ja.value || Y.value.start === 0 && Y.value.end === 0) && await Ma();
423
+ });
424
+ },
425
+ skeletonDataset: k.config?.skeletonDataset ?? [{
426
+ name: "",
427
+ series: [
428
+ 2,
429
+ 3,
430
+ 5,
431
+ 8,
432
+ 13,
433
+ 21
434
+ ],
435
+ color: "#BABABA"
436
+ }, {
437
+ name: "",
438
+ series: [
439
+ 1,
440
+ 2,
441
+ 3,
442
+ 5,
443
+ 8,
444
+ 13
445
+ ],
446
+ color: "#CACACA"
447
+ }],
448
+ skeletonConfig: me({
449
+ defaultConfig: I.value,
450
+ userConfig: sr.value
451
+ })
452
+ }), { userOptionsVisible: dr, setUserOptionsVisibility: fr, keepUserOptionState: pr } = We({ config: I.value }), { svgRef: W } = Ge({ config: H.value.title });
453
+ function mr() {
454
+ fr(!0);
455
+ }
456
+ function hr() {
457
+ fr(!1), A("selectX", {
458
+ index: null,
459
+ indexLabel: null,
460
+ dataset: null
461
+ }), P.value = null, F.value = null, Dn.value = !1;
462
+ }
463
+ function gr() {
464
+ let e = Oe({
465
+ userConfig: k.config,
466
+ defaultConfig: Sn
467
+ }), t = {};
468
+ k.config && r(k.config, "style.chart.grid.x.timeLabels.showFirstAndLast") && (e.style.chart.grid.x.timeLabels.showFirstAndLast = !!k.config.style.chart.grid.x.timeLabels.showFirstAndLast);
469
+ let a = e.theme;
470
+ if (a) {
471
+ if (!Cn.value(e)) wn(e), t = e;
472
+ else {
473
+ let r = Oe({
474
+ userConfig: qe[a] || k.config,
475
+ defaultConfig: e
476
+ });
477
+ t = {
478
+ ...Oe({
479
+ userConfig: k.config,
480
+ defaultConfig: r
481
+ }),
482
+ customPalette: e.customPalette.length ? e.customPalette : n[a] || f
483
+ };
484
+ }
485
+ } else t = e;
486
+ return t;
487
+ }
488
+ let _r = m(() => z.value.dataLabels.hideUnderValue != null), vr = m(() => z.value.dataLabels.hideUnderPercentage != null);
489
+ function yr(e) {
490
+ let t = oe(e);
491
+ return t?.style?.chart && delete t.style.chart.tooltip, JSON.stringify(t);
492
+ }
493
+ let br = yr(k.config);
494
+ ct(() => k.config, (e, t) => {
495
+ let n = yr(e), r = n !== br;
496
+ br = n;
497
+ let a = gr();
498
+ if (!r) {
499
+ I.value.style.chart.tooltip = a.style.chart.tooltip, G.value.showTooltip = I.value.style.chart.tooltip.show;
500
+ return;
501
+ }
502
+ cr.value || (I.value = a), dr.value = !I.value.userOptions.showOnChartHover, G.value.dataLabels.show = z.value.dataLabels.show, G.value.showTable = I.value.table.show, G.value.showTooltip = V.value.show, jr({ resetSlicer: !H.value.zoom.keepState }), Ln.value += 1, Rn.value += 1, zn.value += 1, nr(), !H.value.zoom.keepState || !ja.value || Y.value.start === 0 && Y.value.end === 0 ? Ma() : ui();
503
+ }, { deep: !0 }), ct(() => k.dataset, (e) => {
504
+ Array.isArray(e) && e.length > 0 && (ur.value = !1), nr(), H.value.zoom.keepState ? ui() : pi();
505
+ }, { deep: !0 });
506
+ let G = C({
507
+ dataLabels: { show: z.value.dataLabels.show },
508
+ showTable: I.value.table.show,
509
+ showTooltip: V.value.show
510
+ });
511
+ ct(I, () => {
512
+ G.value = {
513
+ dataLabels: { show: z.value.dataLabels.show },
514
+ showTable: I.value.table.show,
515
+ showTooltip: V.value.show
516
+ };
517
+ }, { immediate: !0 });
518
+ let { isPrinting: xr, isImaging: Sr, generatePdf: Cr, generateImage: wr } = Te({
519
+ elementId: `stackbar_${M.value}`,
520
+ fileName: H.value.title.text || "vue-ui-stackbar",
521
+ options: I.value.userOptions.print
522
+ }), Tr = C({
523
+ width: H.value.width,
524
+ height: H.value.height,
525
+ paddingRatio: {
526
+ top: H.value.padding.top / H.value.height,
527
+ right: H.value.padding.right / H.value.width,
528
+ bottom: H.value.padding.bottom / H.value.height,
529
+ left: H.value.padding.left / H.value.width
530
+ }
531
+ }), Er = m(() => ve(I.value.customPalette)), Dr = at(null), Or = at(null), kr = C(null), Ar = m(() => I.value.debug);
532
+ function jr({ resetSlicer: e = !0 } = {}) {
533
+ if (u(k.dataset) ? (ie({
534
+ componentName: "VueUiStackbar",
535
+ type: "dataset",
536
+ debug: Ar.value
537
+ }), ur.value = !0) : k.dataset.forEach((e, t) => {
538
+ _e({
539
+ datasetObject: e,
540
+ requiredAttributes: ["name", "series"]
541
+ }).forEach((e) => {
542
+ En.value = !1, ie({
543
+ componentName: "VueUiStackbar",
544
+ type: "datasetSerieAttribute",
545
+ property: e,
546
+ index: t,
547
+ debug: Ar.value
548
+ }), ur.value = !0;
549
+ });
550
+ }), u(k.dataset) || (ur.value = I.value.loading), setTimeout(() => {
551
+ In.value = !0;
552
+ }, 10), I.value.responsive) {
553
+ let e = Re(() => {
554
+ In.value = !1;
555
+ let { width: e, height: t } = ze({
556
+ chart: j.value,
557
+ title: H.value.title.text ? jn.value : null,
558
+ legend: H.value.legend.show ? Mn.value : null,
559
+ slicer: H.value.zoom.show && J.value > 6 ? Nn.value.$el : null,
560
+ source: Pn.value
561
+ });
562
+ requestAnimationFrame(() => {
563
+ Tr.value.width = e, Tr.value.height = t - 12, clearTimeout(kr.value), kr.value = setTimeout(() => {
564
+ In.value = !0;
565
+ }, 10);
566
+ });
567
+ });
568
+ Dr.value && (Or.value && Dr.value.unobserve(Or.value), Dr.value.disconnect()), Dr.value = new ResizeObserver(e), Or.value = j.value.parentNode, Dr.value.observe(Or.value);
569
+ }
570
+ ir(), e && Ma();
571
+ }
572
+ nt(() => {
573
+ tr.stop(), Dr.value && (Or.value && Dr.value.unobserve(Or.value), Dr.value.disconnect());
574
+ });
575
+ let Mr = m(() => R.value.y.position === "right");
576
+ function Nr() {
577
+ let e = 0;
578
+ I.value.orientation === "vertical" && Gn.value && (e = Array.from(Gn.value.querySelectorAll("text")).reduce((e, t) => {
579
+ let n = t.getComputedTextLength();
580
+ return n > e ? n : e;
581
+ }, 0)), I.value.orientation === "horizontal" && Kn.value && (e = Array.from(Kn.value.querySelectorAll("text")).reduce((e, t) => {
582
+ let n = t.getComputedTextLength();
583
+ return n > e ? n : e;
584
+ }, 0));
585
+ let t = Wn.value ? Wn.value.getBoundingClientRect().width + R.value.y.axisName.fontSize + R.value.y.axisName.offsetX : 0;
586
+ return {
587
+ left: Mr.value ? 0 : e + t,
588
+ right: Mr.value ? e + t : 0,
589
+ scaleLabelsWidth: e,
590
+ yAxisLabelWidth: t
591
+ };
592
+ }
593
+ let Pr = C(0), Fr = C(0), Ir = Re((e) => {
594
+ Fr.value = e + z.value.totalValues.fontSize;
595
+ }, 100);
596
+ function Lr() {
597
+ if (I.value.orientation !== "horizontal") return 0;
598
+ let e = Jn.value;
599
+ if (!e) return 0;
600
+ let t = Array.from(e.querySelectorAll("text"));
601
+ if (!t.length) return 0;
602
+ let n = -Infinity;
603
+ for (let e of t) try {
604
+ let t = e.getBBox(), r = t.x + t.width;
605
+ r > n && (n = r);
606
+ } catch {}
607
+ return Math.max(0, n - (K.value?.right ?? 0));
608
+ }
609
+ lt((e) => {
610
+ if (I.value.orientation !== "horizontal") return;
611
+ let t = Jn.value;
612
+ if (!t) return;
613
+ let n = () => {
614
+ let e = Lr();
615
+ Ir(e);
616
+ };
617
+ n();
618
+ let r = new ResizeObserver(n);
619
+ r.observe(t);
620
+ let a = new MutationObserver(n);
621
+ a.observe(t, {
622
+ childList: !0,
623
+ subtree: !0,
624
+ characterData: !0
625
+ }), e(() => {
626
+ r.disconnect(), a.disconnect();
627
+ });
628
+ }), nt(() => {
629
+ Pr.value = 0, Fr.value = 0;
630
+ });
631
+ let Rr = C(0), zr = C(0);
632
+ function Br(e) {
633
+ let t = Number.isFinite(e) ? e : 0;
634
+ Rr.value !== t && (Rr.value = t);
635
+ }
636
+ function Vr() {
637
+ let e = I.value.orientation === "vertical" ? Kn.value : Gn.value;
638
+ if (!e) {
639
+ Br(0);
640
+ return;
641
+ }
642
+ try {
643
+ Br(e.getBBox()?.height);
644
+ } catch {
645
+ Br(0);
646
+ }
647
+ }
648
+ function Hr() {
649
+ zr.value && cancelAnimationFrame(zr.value), zr.value = requestAnimationFrame(() => {
650
+ requestAnimationFrame(() => {
651
+ Vr();
652
+ });
653
+ });
654
+ }
655
+ nt(() => {
656
+ zr.value && cancelAnimationFrame(zr.value);
657
+ });
658
+ let Ur = m(() => {
659
+ let e = 0;
660
+ if (Un.value) try {
661
+ e = Un.value.getBBox().height;
662
+ } catch {
663
+ e = 0;
664
+ }
665
+ let t = B.value.show ? Rr.value : 0;
666
+ return e + t;
667
+ }), K = m(() => {
668
+ Zn.value;
669
+ let { height: e, width: t } = Tr.value, { right: n } = Tr.value.paddingRatio, r = z.value.totalValues.show && k.dataset && k.dataset.length > 1 ? z.value.totalValues.fontSize * 1.3 : 0, a = 0, o = 0, s = 0, c = 0;
670
+ if (R.value.y.axisLabels.show) {
671
+ let e = Nr();
672
+ a = e.left, o = e.right, s = e.scaleLabelsWidth, c = e.yAxisLabelWidth;
673
+ }
674
+ let l = H.value.padding.top + r, u = t - t * n - Fr.value - o, d = e - H.value.padding.bottom - Ur.value - r, f = H.value.padding.left + a, ee = t - f - t * n - Fr.value - o, te = e - l - H.value.padding.bottom - Ur.value - r;
675
+ return {
676
+ chartHeight: e,
677
+ chartWidth: t,
678
+ top: l,
679
+ right: u,
680
+ bottom: d,
681
+ left: f,
682
+ width: Math.max(0, ee),
683
+ height: Math.max(0, te),
684
+ offsetLeft: a,
685
+ offsetRightAxis: o,
686
+ scaleLabelsWidth: s,
687
+ yAxisLabelWidth: c
688
+ };
689
+ }), Wr = m(() => {
690
+ let { left: e, top: t, width: n, height: r } = K.value, a = Y.value.start, o = Y.value.end, s = Math.max(1, o - a), c = Math.max(0, Math.min(s, (X.value.start ?? a) - a)), l = Math.max(0, Math.min(s, (X.value.end ?? o) - a)), u = Math.max(0, l - c), d = {
691
+ fill: H.value.zoom.preview.fill,
692
+ stroke: H.value.zoom.preview.stroke,
693
+ "stroke-width": H.value.zoom.preview.strokeWidth,
694
+ "stroke-dasharray": H.value.zoom.preview.strokeDasharray,
695
+ "stroke-linecap": "round",
696
+ "stroke-linejoin": "round",
697
+ style: {
698
+ pointerEvents: "none",
699
+ transition: "none !important",
700
+ animation: "none !important"
701
+ }
702
+ };
703
+ if (I.value.orientation === "horizontal") {
704
+ let a = r / s;
705
+ return {
706
+ x: e,
707
+ y: t + c * a,
708
+ width: n,
709
+ height: u * a,
710
+ ...d
711
+ };
712
+ }
713
+ {
714
+ let a = n / s;
715
+ return {
716
+ x: e + c * a,
717
+ y: t,
718
+ width: u * a,
719
+ height: r,
720
+ ...d
721
+ };
722
+ }
723
+ }), q = m(() => lr.value.map((e, t) => {
724
+ let n = ee(), r = String(e.key ?? e.id ?? e.name ?? n), a = d(e.color) || Er.value[t] || f[t] || f[t % f.length];
725
+ return {
726
+ ...e,
727
+ datasetKey: r,
728
+ series: JSON.parse(JSON.stringify(e.series)).map((e) => z.value.distributed ? Math.abs(e) : e),
729
+ signedSeries: e.series.map((e) => e >= 0 ? 1 : -1),
730
+ absoluteIndex: t,
731
+ id: n,
732
+ color: a
733
+ };
734
+ })), J = m(() => {
735
+ let e = Math.max(...q.value.filter((e) => !N.value.includes(e.id)).map((e) => e.series.length));
736
+ return isFinite(e) ? e : Math.max(...q.value.map((e) => e.series.length));
737
+ });
738
+ function Gr(e) {
739
+ ar.value = e;
740
+ }
741
+ let Y = C({
742
+ start: 0,
743
+ end: Math.max(...lr.value.map((e) => e.series.length))
744
+ }), X = C({
745
+ start: 0,
746
+ end: Math.max(...lr.value.map((e) => e.series.length))
747
+ }), Kr = C(!1), qr = C(!1), Jr = C(null), Yr = C(null), Xr = C(null), Zr = C(!1), Qr = C({
748
+ time: 0,
749
+ x: 0,
750
+ y: 0,
751
+ pointerType: null
752
+ }), $r = m(() => H.value.zoom?.dragToZoom), ei = m(() => $r.value.show && En.value && ja.value && J.value > 1 && !cr.value), ti = null, ni = {}, ri = m(() => H.value.zoom.preview.enable && (X.value.start !== Y.value.start || X.value.end !== Y.value.end));
753
+ function ii(e, t) {
754
+ X.value[e] = t;
755
+ }
756
+ function ai(e, t = Y.value) {
757
+ if (!e || typeof e != "object") return null;
758
+ let n = e.start !== void 0 && e.start !== null, r = e.end !== void 0 && e.end !== null;
759
+ if (!n && !r) return null;
760
+ let a = Number(n ? e.start : t.start), o = Number(r ? e.end : t.end);
761
+ return !Number.isFinite(a) || !Number.isFinite(o) ? null : {
762
+ start: a,
763
+ end: o
764
+ };
765
+ }
766
+ function oi(e) {
767
+ let t = ai(e);
768
+ t && A("update:zoomState", t);
769
+ }
770
+ function si() {
771
+ ti &&= (cancelAnimationFrame(ti), null), ni = {};
772
+ }
773
+ function ci(e) {
774
+ let t = ai(e);
775
+ if (!t) return null;
776
+ let { start: n, end: r } = t;
777
+ return (n !== Number(Y.value.start) || r !== Number(Y.value.end)) && (si(), Y.value = {
778
+ start: n,
779
+ end: r
780
+ }, X.value = {
781
+ start: n,
782
+ end: r
783
+ }, ui()), {
784
+ start: Number(Y.value.start),
785
+ end: Number(Y.value.end)
786
+ };
787
+ }
788
+ function li(e) {
789
+ let t = ci(e);
790
+ return t ? (A("update:zoomState", t), t) : null;
791
+ }
792
+ function ui() {
793
+ let e = J.value, t = Math.max(0, Math.min(Y.value.start ?? 0, e - 1)), n = Math.max(t + 1, Math.min(Y.value.end ?? e, e));
794
+ (!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), Y.value.start = t, Y.value.end = n, X.value.start = t, X.value.end = n, Nn.value && Nn.value.setRangeValues(t, n);
795
+ }
796
+ let di = C(null);
797
+ function fi() {
798
+ return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
799
+ }
800
+ nt(() => {
801
+ di.value && cancelAnimationFrame(di.value), si(), to();
802
+ });
803
+ async function pi({ force: e = !1, publish: t = !1 } = {}) {
804
+ if (H.value.zoom.keepState && !e && ja.value && (Y.value.start !== 0 || Y.value.end !== 0)) {
805
+ ui();
806
+ return;
807
+ }
808
+ let n = !e;
809
+ Ma(n), await tt(), di.value && cancelAnimationFrame(di.value), di.value = requestAnimationFrame(async () => {
810
+ await fi(), Ma(n), di.value = null, t && (oi({
811
+ start: Number(Y.value.start),
812
+ end: Number(Y.value.end)
813
+ }), A("zoomReset"));
814
+ });
815
+ }
816
+ let Z = m(() => {
817
+ let e;
818
+ return e = I.value.orientation === "vertical" ? K.value.width / (Y.value.end - Y.value.start) : K.value.height / (Y.value.end - Y.value.start), e <= 0 ? 0 : e;
819
+ }), mi = m(() => ne(q.value.filter((e) => !N.value.includes(e.id))).slice(Y.value.start, Y.value.end)), hi = m(() => N.value.length === q.value.length), gi = m(() => H.value.zoom.minimap.show ? ne(q.value.map((e) => ({
820
+ ...e,
821
+ series: e.series.map((e) => e ?? 0)
822
+ })).filter((e) => hi.value ? !0 : !N.value.includes(e.id))) : []), _i = m(() => H.value.zoom.minimap.show ? [{
823
+ name: "",
824
+ series: gi.value,
825
+ color: "#000000",
826
+ isVisible: !0
827
+ }] : []), vi = m(() => ne(q.value.filter((e) => !N.value.includes(e.id)).map((e) => ({
828
+ ...e,
829
+ series: e.series.map((t, n) => e.signedSeries[n] === -1 && t >= 0 ? -t : t)
830
+ }))).slice(Y.value.start, Y.value.end)), yi = m(() => {
831
+ let e = q.value.filter((e) => !N.value.includes(e.id));
832
+ return {
833
+ positive: ne(e.map((e) => ({
834
+ ...e,
835
+ series: e.series.slice(Y.value.start, Y.value.end).map((e) => e >= 0 ? e : 0)
836
+ }))),
837
+ negative: ne(e.map((e) => ({
838
+ ...e,
839
+ series: e.series.slice(Y.value.start, Y.value.end).map((e) => e < 0 ? e : 0)
840
+ })))
841
+ };
842
+ }), bi = m(() => {
843
+ let e = R.value.scale.scaleMax !== null && !z.value.distributed ? R.value.scale.scaleMax : Math.max(...yi.value.positive), t = Math.min(...yi.value.negative), n = R.value.scale.scaleMin !== null && !z.value.distributed ? R.value.scale.scaleMin : [
844
+ -Infinity,
845
+ Infinity,
846
+ NaN,
847
+ void 0,
848
+ null
849
+ ].includes(t) ? 0 : t;
850
+ return !z.value.distributed && (R.value.scale.scaleMax !== null || R.value.scale.scaleMin !== null) ? ge(n > 0 ? 0 : n, e < 0 ? 0 : e, R.value.scale.ticks) : re(n > 0 ? 0 : n, e < 0 ? 0 : e, R.value.scale.ticks);
851
+ }), xi = m(() => bi.value.ticks), Q = m(() => {
852
+ let e = bi.value, t = e.max + Math.abs(e.min);
853
+ return xi.value.map((n) => ({
854
+ zero: K.value.bottom - K.value.height * (Math.abs(e.min) / t),
855
+ y: K.value.bottom - K.value.height * ((n + Math.abs(e.min)) / t),
856
+ x: Mr.value ? K.value.right + 8 : K.value.left - 8,
857
+ horizontal_zero: K.value.left + K.value.width * (Math.abs(e.min) / t),
858
+ horizontal_x: K.value.left + K.value.width * ((n + Math.abs(e.min)) / t),
859
+ horizontal_y: K.value.bottom - 8,
860
+ value: n
861
+ }));
862
+ }), Si = m(() => {
863
+ let e = R.value.y.axisLabels, { prefix: n, suffix: r } = z.value.dataLabels;
864
+ return xi.value.map((a) => String(ue(e.formatter, a, t({
865
+ p: n,
866
+ v: a,
867
+ s: r,
868
+ r: e.rounding
869
+ }), { datapoint: { value: a } }) ?? "")).join("|");
870
+ });
871
+ ct(() => [
872
+ Si.value,
873
+ I.value.orientation,
874
+ R.value.y.axisLabels.show,
875
+ R.value.y.axisLabels.fontSize,
876
+ R.value.y.axisLabels.bold,
877
+ R.value.y.position
878
+ ], () => {
879
+ R.value.y.axisLabels.show && ir();
880
+ }, { flush: "post" });
881
+ let Ci = C([]), wi = C([]), Ti = 0;
882
+ lt(() => {
883
+ let e = ++Ti;
884
+ (async () => {
885
+ let t = await Ce({
886
+ values: B.value.values,
887
+ maxDatapoints: J.value,
888
+ formatter: B.value.datetimeFormatter,
889
+ start: Y.value.start,
890
+ end: Y.value.end
891
+ });
892
+ e === Ti && (Ci.value = t);
893
+ })();
894
+ });
895
+ let Ei = 0;
896
+ lt(() => {
897
+ let e = ++Ei;
898
+ (async () => {
899
+ let t = await Ce({
900
+ values: B.value.values,
901
+ maxDatapoints: J.value,
902
+ formatter: B.value.datetimeFormatter,
903
+ start: 0,
904
+ end: J.value
905
+ });
906
+ e === Ei && (wi.value = t);
907
+ })();
908
+ });
909
+ let Di = m(() => {
910
+ let e = Math.max(1, Math.floor(Number(B.value.modulo) || 1)), t = (Ci.value || []).map((e) => e?.text ?? ""), n = (wi.value || []).map((e) => e?.text ?? ""), r = Y.value.start ?? 0, a = r > 0 || t.length < n.length;
911
+ return le({
912
+ configuredModulo: e,
913
+ visibleTexts: t,
914
+ allTexts: n,
915
+ startAbs: r,
916
+ isZoomed: a
917
+ });
918
+ });
919
+ function Oi(e) {
920
+ let t = B.value, n = Ci.value || [], r = wi.value || [], a = Y.value.start ?? 0, o = J.value, s = n.map((e) => e?.text ?? ""), c = r.map((e) => e?.text ?? ""), l = ae(!!t.showOnlyFirstAndLast, !!t.showOnlyAtModulo, Di.value, s, c, a, e, o);
921
+ if (!t.showFirstAndLast || t.showOnlyFirstAndLast || !l.length) return l;
922
+ let u = l.length - 1;
923
+ return l.map((e, t) => t !== 0 && t !== u ? e : {
924
+ ...e,
925
+ text: s[t] ?? ""
926
+ });
927
+ }
928
+ let ki = m(() => Oi(P.value)), Ai = m(() => Oi(null));
929
+ lt(() => {
930
+ I.value.orientation, B.value.show, B.value.fontSize, B.value.rotation, B.value.offsetY, Ai.value?.map((e) => e?.text ?? "").join("|"), Si.value, Tr.value.width, Tr.value.height, Kn.value, Gn.value, Un.value, Hr();
931
+ }, { flush: "post" });
932
+ let ji = C({
933
+ months: [],
934
+ shortMonths: [],
935
+ days: [],
936
+ shortDays: []
937
+ }), Mi = 0;
938
+ lt(() => {
939
+ let e = ++Mi, t = B.value.datetimeFormatter;
940
+ (async () => {
941
+ let n = await Se(t.locale).catch(() => Se("en"));
942
+ e === Mi && (ji.value = n.data);
943
+ })();
944
+ });
945
+ let Ni = m(() => {
946
+ let e = B.value.datetimeFormatter, t = xe({
947
+ useUTC: e.useUTC,
948
+ locale: ji.value,
949
+ januaryAsYear: e.januaryAsYear
950
+ });
951
+ return (e, n) => {
952
+ let r = B.value.values?.[e];
953
+ return r == null ? "" : t.formatDate(new Date(r), n);
954
+ };
955
+ }), Pi = m(() => (B.value.values || []).map((e, t) => ({
956
+ text: Ni.value(t, H.value.zoom.timeFormat),
957
+ absoluteIndex: t
958
+ }))), Fi = m(() => (B.value.values || []).map((e, t) => ({
959
+ text: Ni.value(t, V.value.timeFormat),
960
+ absoluteIndex: t
961
+ }))), Ii = m(() => {
962
+ let e = /* @__PURE__ */ new Map();
963
+ return (B.value.values || []).forEach((t) => {
964
+ if ([
965
+ null,
966
+ void 0,
967
+ ""
968
+ ].includes(t)) return;
969
+ let n = String(t);
970
+ e.set(n, (e.get(n) || 0) + 1);
971
+ }), e;
972
+ });
973
+ function Li(e) {
974
+ let t = (B.value.values || [])[e];
975
+ if ([
976
+ null,
977
+ void 0,
978
+ ""
979
+ ].includes(t)) return `fallback-${e}`;
980
+ let n = String(t);
981
+ return (Ii.value.get(n) || 0) > 1 ? `${n}-${e}` : n;
982
+ }
983
+ function Ri(e, t) {
984
+ return `${e.datasetKey}:${Li(t)}`;
985
+ }
986
+ let $ = m(() => {
987
+ if (!En.value && !cr.value) return [];
988
+ let e = Array(J.value).fill(0), t = Array(J.value).fill(0), n = Array(J.value).fill(0), r = Array(J.value).fill(0), a = Math.max(...yi.value.positive) || 0, o = Math.min(...yi.value.negative), s = [
989
+ -Infinity,
990
+ Infinity,
991
+ NaN,
992
+ void 0,
993
+ null
994
+ ].includes(o) ? 0 : o, { min: c, max: l } = !z.value.distributed && (R.value.scale.scaleMax !== null || R.value.scale.scaleMin !== null) ? ge(R.value.scale.scaleMin === null ? s > 0 ? 0 : s : R.value.scale.scaleMin, R.value.scale.scaleMax === null ? a < 0 ? 0 : a : R.value.scale.scaleMax, R.value.scale.ticks) : re(R.value.scale.scaleMin === null ? s > 0 ? 0 : s : R.value.scale.scaleMin, R.value.scale.scaleMax === null ? a < 0 ? 0 : a : R.value.scale.scaleMax, R.value.scale.ticks), u = l + (c >= 0 ? 0 : Math.abs(c)) || 1, d = K.value.height, f = K.value.width, ee = Q.value[0] ? Q.value[0].zero : K.value.bottom, te = Q.value[0] ? Q.value[0].horizontal_zero : K.value.left, ne = Array(gi.value.length).fill(0), ie = Array(gi.value.length).fill(0);
995
+ return q.value.filter((e) => !N.value.includes(e.id)).map((a) => {
996
+ let o = a.series.slice(), s = o.map((e, t) => ne[t]), c = o.map((e, t) => ie[t]);
997
+ o.forEach((e, t) => {
998
+ (Number(e) || 0) >= 0 ? ne[t] += Number(e) || 0 : ie[t] += Math.abs(Number(e) || 0);
999
+ });
1000
+ let l = a.series.slice(Y.value.start, Y.value.end), re = a.signedSeries.slice(Y.value.start, Y.value.end), ae = l.map((e, t) => Ri(a, Y.value.start + t)), oe = o.map((e, t) => Ri(a, t)), se = l.map((e, t) => K.value.left + Z.value * t + Z.value * z.value.gapRatio / 4), ce = (gi.value || []).filter(Number.isFinite), le = ce.length ? Math.max(...ce) : 0, ue = ce.length ? Math.min(...ce) : 0;
1001
+ function de({ minimapH: e }) {
1002
+ let t = 1e-9, n = le > 0;
1003
+ if (n && ue < 0) {
1004
+ let n = Math.max(le, Math.abs(ue)) || t;
1005
+ return {
1006
+ pxPerUnit: e / 2 / n,
1007
+ zero: e / 2
1008
+ };
1009
+ }
1010
+ return n ? {
1011
+ pxPerUnit: e / Math.max(t, le),
1012
+ zero: e
1013
+ } : {
1014
+ pxPerUnit: e / Math.max(t, Math.abs(ue)),
1015
+ zero: 0
1016
+ };
1017
+ }
1018
+ let fe = ({ left: e, unitW: t }) => {
1019
+ let n = t * (z.value.gapRatio / 4);
1020
+ return o.map((r, a) => e + t * a + n);
1021
+ }, pe = l.map((e, t) => K.value.top + Z.value * t + Z.value * z.value.gapRatio / 4), me = l.map((t, r) => {
1022
+ let a = z.value.distributed ? (t || 0) / mi.value[r] : (t || 0) / u, o, s;
1023
+ return t > 0 ? (s = d * a, o = ee - s - e[r], e[r] += s) : (s = d * a, o = ee + n[r], n[r] += Math.abs(s)), o;
1024
+ }), he = ({ minimapH: e }) => {
1025
+ if (z.value.distributed) return o.map((t, n) => {
1026
+ let r = Math.abs(Number(t) || 0), a = Math.abs(gi.value?.[n] || 0) || 1e-9;
1027
+ return e - (s[n] + r) / a * e;
1028
+ });
1029
+ let { pxPerUnit: t, zero: n } = de({ minimapH: e });
1030
+ return o.map((e, r) => {
1031
+ let a = Number(e) || 0;
1032
+ return a >= 0 ? n - (s[r] + a) * t : n + c[r] * t;
1033
+ });
1034
+ }, ge = l.map((e, n) => {
1035
+ let a = z.value.distributed ? (e || 0) / mi.value[n] : (e || 0) / u, o, s;
1036
+ return e > 0 ? (s = f * a, o = te + t[n], t[n] += s) : (s = f * a, o = te - Math.abs(s) - r[n], r[n] += Math.abs(s)), o;
1037
+ }), _e = l.map((e, t) => {
1038
+ let n = z.value.distributed ? (e || 0) / mi.value[t] : (e || 0) / u;
1039
+ return e > 0 ? d * n : d * Math.abs(n);
1040
+ }), ve = ({ minimapH: e }) => {
1041
+ if (z.value.distributed) return o.map((t, n) => Math.abs(Number(t) || 0) / (Math.abs(gi.value?.[n] || 0) || 1e-9) * e);
1042
+ let { pxPerUnit: t } = de({ minimapH: e });
1043
+ return o.map((e) => Math.abs(Number(e) || 0) * t);
1044
+ }, ye = l.map((e, t) => {
1045
+ let n = z.value.distributed ? (e || 0) / mi.value[t] : (e || 0) / u;
1046
+ return e > 0 ? f * n : f * Math.abs(n);
1047
+ }), be = l.map((e) => Math.abs(e)).reduce((e, t) => e + t, 0);
1048
+ return {
1049
+ ...a,
1050
+ proportions: l.map((e, t) => z.value.distributed ? (e || 0) / mi.value[t] : (e || 0) / be),
1051
+ series: l,
1052
+ signedSeries: re,
1053
+ rectKeys: ae,
1054
+ minimapRectKeys: oe,
1055
+ x: se,
1056
+ y: me,
1057
+ height: _e,
1058
+ horizontal_width: ye,
1059
+ horizontal_y: pe,
1060
+ horizontal_x: ge,
1061
+ xMinimap: fe,
1062
+ yMinimap: he,
1063
+ heightMinimap: ve
1064
+ };
1065
+ });
1066
+ }), zi = m(() => {
1067
+ if (!(Number(z.value.borderRadius) > 0)) return [];
1068
+ let e = $.value;
1069
+ if (!e.length) return [];
1070
+ let t = I.value.orientation === "vertical", n = Math.max(0, Z.value * (1 - z.value.gapRatio / 2));
1071
+ if (!Number.isFinite(n) || n <= 0) return [];
1072
+ let r = Math.max(0, Y.value.end - Y.value.start);
1073
+ return Array.from({ length: r }, (r, a) => {
1074
+ let o = Infinity, s = -Infinity, c = NaN;
1075
+ for (let n of e) {
1076
+ let e = Number(n.series[a]);
1077
+ if (!Number.isFinite(e) || e === 0) continue;
1078
+ let r = Number(t ? n.y[a] : n.horizontal_x[a]), l = Number(t ? n.height[a] : n.horizontal_width[a]), u = Number(t ? n.x[a] : n.horizontal_y[a]);
1079
+ !Number.isFinite(r) || !Number.isFinite(l) || l <= 0 || !Number.isFinite(u) || (o = Math.min(o, r), s = Math.max(s, r + l), c = u);
1080
+ }
1081
+ if (!Number.isFinite(o) || !Number.isFinite(s)) return null;
1082
+ let l = t ? c : o, u = t ? o : c, d = t ? n : s - o, f = t ? s - o : n;
1083
+ return {
1084
+ x: l,
1085
+ y: u,
1086
+ width: d,
1087
+ height: f,
1088
+ rx: Math.min(Number(z.value.borderRadius), d / 2, f / 2)
1089
+ };
1090
+ });
1091
+ });
1092
+ function Bi(e) {
1093
+ if (zi.value[e]) return `url(#stackbar-outer-clip-${M.value}-${Y.value.start + e})`;
1094
+ }
1095
+ function Vi({ minimapH: e, unitW: t }) {
1096
+ let n = Number(z.value.borderRadius);
1097
+ if (!(n > 0) || !Number.isFinite(e) || !Number.isFinite(t) || e <= 0 || t <= 0) return [];
1098
+ let r = $.value.map((t) => ({
1099
+ y: t.yMinimap({ minimapH: e }),
1100
+ height: t.heightMinimap({ minimapH: e })
1101
+ })), a = t * (1 - z.value.gapRatio / 2), o = t * (z.value.gapRatio / 4);
1102
+ return Array.from({ length: J.value }, (s, c) => {
1103
+ let l = c === 0 || c === J.value - 1 ? a / 2 : a, u = c === 0 ? 0 : c * t + o - t / 2, d = Infinity, f = -Infinity;
1104
+ for (let t of r) {
1105
+ let n = Number(t.y[c]), r = Number(t.height[c]);
1106
+ if (!Number.isFinite(n) || !Number.isFinite(r) || r <= 0) continue;
1107
+ let a = Math.max(0, Math.min(e, n));
1108
+ d = Math.min(d, a), f = Math.max(f, a + r);
1109
+ }
1110
+ return !Number.isFinite(d) || !Number.isFinite(f) || !(f > d) || !(l > 0) ? null : {
1111
+ x: u,
1112
+ y: d,
1113
+ width: l,
1114
+ height: f - d,
1115
+ rx: Math.min(n, l / 2, (f - d) / 2)
1116
+ };
1117
+ });
1118
+ }
1119
+ let Hi = m(() => vi.value.map((e, t) => ({
1120
+ value: e,
1121
+ sign: e >= 0 ? 1 : -1
1122
+ })));
1123
+ function Ui(e, n, r, a, o) {
1124
+ let s = o === -1 && e >= 0 ? -e : e;
1125
+ return ue(z.value.dataLabels.formatter, s, t({
1126
+ p: z.value.dataLabels.prefix,
1127
+ v: s,
1128
+ s: z.value.dataLabels.suffix,
1129
+ r: z.value.dataLabels.rounding
1130
+ }), {
1131
+ datapoint: n,
1132
+ seriesIndex: r,
1133
+ datapointIndex: a
1134
+ });
1135
+ }
1136
+ function Wi(e, n, r, a) {
1137
+ return ue(z.value.dataLabels.formatter, e, t({
1138
+ v: isNaN(e) ? 0 : e,
1139
+ s: "%",
1140
+ r: z.value.dataLabels.rounding
1141
+ }), {
1142
+ datapoint: n,
1143
+ seriesIndex: r,
1144
+ datapointIndex: a
1145
+ });
1146
+ }
1147
+ function Gi(e) {
1148
+ let t = JSON.parse(JSON.stringify($.value)).map((t) => ({
1149
+ name: t.name,
1150
+ value: t.series[e] === 0 ? 0 : t.series[e] || null,
1151
+ proportion: t.proportions[e] || null,
1152
+ color: t.color,
1153
+ id: t.id
1154
+ }));
1155
+ I.value.events.datapointClick && I.value.events.datapointClick({
1156
+ datapoint: t,
1157
+ seriesIndex: e + Y.value.start
1158
+ }), A("selectDatapoint", {
1159
+ datapoint: t,
1160
+ period: Ci.value[e]
1161
+ });
1162
+ }
1163
+ function Ki(e) {
1164
+ return JSON.parse(JSON.stringify($.value)).map((t) => ({
1165
+ name: t.name,
1166
+ absoluteIndex: t.absoluteIndex,
1167
+ value: t.series[e] === 0 ? 0 : (t.signedSeries[e] === -1 && t.series[e] >= 0 ? -t.series[e] : t.series[e]) || null,
1168
+ proportion: t.proportions[e] || null,
1169
+ color: t.color,
1170
+ id: t.id,
1171
+ timeLabel: wi.value[e]
1172
+ }));
1173
+ }
1174
+ function qi(e) {
1175
+ if (I.value.events.datapointLeave) {
1176
+ let t = Ki(e);
1177
+ I.value.events.datapointLeave({
1178
+ datapoint: t,
1179
+ seriesIndex: e + Y.value.start
1180
+ });
1181
+ }
1182
+ Dn.value = !1, P.value = null, F.value === e && (F.value = null);
1183
+ }
1184
+ let Ji = m(() => Array(J.value).fill(0).map((e, t) => Ki(t)));
1185
+ ct(() => k.selectedXIndex, (e) => {
1186
+ if ([null, void 0].includes(k.selectedXIndex)) {
1187
+ P.value = null;
1188
+ return;
1189
+ }
1190
+ let t = e - Y.value.start;
1191
+ t < 0 || e >= Y.value.end ? P.value = null : P.value = t ?? null;
1192
+ }, { immediate: !0 });
1193
+ function Yi(e) {
1194
+ if (!V.value.showTimeLabel) return null;
1195
+ let t = Ci.value?.[e]?.text || null, n = Fi.value?.[e]?.text || null, r = wi.value?.[e]?.text || null;
1196
+ return V.value.useDefaultTimeFormat ? t : n || r;
1197
+ }
1198
+ function Xi(e, n = "pointer") {
1199
+ if (hi.value) return;
1200
+ er.value = n, F.value = e, P.value = e, Dn.value = !0;
1201
+ let r = V.value.customFormat, a = Ki(e);
1202
+ La({
1203
+ seriesIndex: e,
1204
+ datapoint: a
1205
+ }), I.value.events.datapointEnter && I.value.events.datapointEnter({
1206
+ datapoint: a,
1207
+ seriesIndex: e + Y.value.start
1208
+ }), On.value = {
1209
+ timeLabel: Yi(e),
1210
+ datapoint: a,
1211
+ seriesIndex: e,
1212
+ config: I.value,
1213
+ series: $.value
1214
+ };
1215
+ let s = a.map((e) => Math.abs(e.value)).reduce((e, t) => e + t, 0), c = a.map((e) => he(e.value)).reduce((e, t) => e + t, 0);
1216
+ if (o(r) && se(() => r({
1217
+ seriesIndex: e,
1218
+ datapoint: a,
1219
+ series: $.value,
1220
+ config: I.value
1221
+ }))) kn.value = r({
1222
+ seriesIndex: e,
1223
+ datapoint: a,
1224
+ series: $.value,
1225
+ config: I.value
1226
+ });
1227
+ else {
1228
+ let { showValue: n, showTotal: r, totalTranslation: o, showPercentage: l, borderColor: u, roundingValue: d, roundingPercentage: f } = V.value, ee = "", te = Yi(e);
1229
+ te && (ee += `<div style="width:100%;text-align:center;border-bottom:1px solid ${u};padding-bottom:6px;margin-bottom:3px;">${te}</div>`), r && (ee += `<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
1230
+ <span>${o}:</span>
1231
+ <span>
1232
+ ${ue(z.value.dataLabels.formatter, c, t({
1233
+ p: z.value.dataLabels.prefix,
1234
+ v: c,
1235
+ s: z.value.dataLabels.suffix,
1236
+ r: d
1237
+ }), { datapoint: {
1238
+ name: o,
1239
+ value: c
1240
+ } })}
1241
+ </span>
1242
+ </div>`);
1243
+ let ne = [n && l ? "(" : "", n && l ? ")" : ""];
1244
+ a.reverse().forEach((e) => {
1245
+ ee += `
1246
+ <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
1247
+ <svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${z.value.gradient.show ? `url(#gradient_${e.id})` : e.color}"/>${Tn.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${M.value}_${e.absoluteIndex})"/>` : ""}</svg>
1248
+ ${e.name}${n || l ? ":" : ""} ${n ? ue(z.value.dataLabels.formatter, e.value, t({
1249
+ p: z.value.dataLabels.prefix,
1250
+ v: e.value,
1251
+ s: z.value.dataLabels.suffix,
1252
+ r: d
1253
+ }, { datapoint: e })) : ""} ${ne[0]}${l ? t({
1254
+ v: isNaN(e.value / s) ? 0 : Math.abs(e.value) / s * 100,
1255
+ s: "%",
1256
+ r: f
1257
+ }) : ""}${ne[1]}
1258
+ </div>
1259
+ `;
1260
+ }), kn.value = `<div>${ee}</div>`;
1261
+ }
1262
+ }
1263
+ let Zi = m(() => Tr.value.width), Qi = m(() => Tr.value.height);
1264
+ Ne({
1265
+ timeLabelsEls: I.value.orientation === "vertical" ? Kn : Gn,
1266
+ timeLabels: Ci,
1267
+ slicer: Y,
1268
+ configRef: I,
1269
+ rotationPath: [
1270
+ "style",
1271
+ "chart",
1272
+ "grid",
1273
+ "x",
1274
+ "timeLabels",
1275
+ "rotation"
1276
+ ],
1277
+ autoRotatePath: [
1278
+ "style",
1279
+ "chart",
1280
+ "grid",
1281
+ "x",
1282
+ "timeLabels",
1283
+ "autoRotate",
1284
+ "enable"
1285
+ ],
1286
+ isAutoSize: !1,
1287
+ width: Zi,
1288
+ height: Qi,
1289
+ rotation: B.value.autoRotate.angle
1290
+ });
1291
+ function $i(e) {
1292
+ Fn.value = e, An.value += 1;
1293
+ }
1294
+ function ea() {
1295
+ G.value.showTable = !G.value.showTable;
1296
+ }
1297
+ function ta() {
1298
+ G.value.dataLabels.show = !G.value.dataLabels.show;
1299
+ }
1300
+ function na() {
1301
+ G.value.showTooltip = !G.value.showTooltip;
1302
+ }
1303
+ function ra() {
1304
+ return $.value;
1305
+ }
1306
+ let ia = m(() => {
1307
+ if ($.value.length === 0) return {
1308
+ head: [],
1309
+ body: [],
1310
+ config: {},
1311
+ columnNames: []
1312
+ };
1313
+ let e = $.value.map(({ name: e, color: t }) => ({
1314
+ label: e,
1315
+ color: t
1316
+ })), t = [];
1317
+ return Ci.value.forEach((e) => {
1318
+ let n = [B.value.values[e.absoluteIndex] ? e.text : i + 1];
1319
+ q.value.forEach((t) => {
1320
+ n.push(Number((t.series[e.absoluteIndex] || 0).toFixed(I.value.table.td.roundingValue)));
1321
+ }), t.push(n);
1322
+ }), {
1323
+ head: e,
1324
+ body: t
1325
+ };
1326
+ });
1327
+ function aa(e = null) {
1328
+ let t = [
1329
+ [H.value.title.text],
1330
+ [H.value.title.subtitle.text],
1331
+ [""]
1332
+ ], n = ["", ...ia.value.head.map((e) => e.label)], r = ia.value.body, o = t.concat([n]).concat(r), s = a(o);
1333
+ e ? e(s) : de({
1334
+ csvContent: s,
1335
+ title: H.value.title.text || "vue-ui-stackbar"
1336
+ });
1337
+ }
1338
+ let oa = m(() => {
1339
+ let e = [""].concat($.value.map((e) => e.name), "__SUM__"), t = [], n = Y.value.end - Y.value.start;
1340
+ for (let e = 0; e < n; e += 1) {
1341
+ let n = Y.value.start + e, r = $.value.map((t) => t.series[e] ?? 0).reduce((e, t) => e + t, 0);
1342
+ t.push([B.value.values[n] && Ci.value[e]?.text || n + 1].concat($.value.map((t) => (t.series[e] ?? 0).toFixed(I.value.table.td.roundingValue)), (r ?? 0).toFixed(I.value.table.td.roundingValue)));
1343
+ }
1344
+ let r = {
1345
+ th: {
1346
+ backgroundColor: I.value.table.th.backgroundColor,
1347
+ color: I.value.table.th.color,
1348
+ outline: I.value.table.th.outline
1349
+ },
1350
+ td: {
1351
+ backgroundColor: I.value.table.td.backgroundColor,
1352
+ color: I.value.table.td.color,
1353
+ outline: I.value.table.td.outline
1354
+ },
1355
+ breakpoint: I.value.table.responsiveBreakpoint
1356
+ }, a = [I.value.table.columnNames.period].concat($.value.map((e) => e.name), I.value.table.columnNames.total);
1357
+ return {
1358
+ head: e,
1359
+ body: t.slice(0, Y.value.end - Y.value.start),
1360
+ config: r,
1361
+ colNames: a
1362
+ };
1363
+ });
1364
+ function sa() {
1365
+ N.value.length ? N.value = [] : fa.value.forEach((e) => {
1366
+ N.value.push(e.id);
1367
+ }), A("selectLegend", $.value);
1368
+ }
1369
+ function ca(e) {
1370
+ if (N.value.includes(e.id)) N.value = N.value.filter((t) => t !== e.id);
1371
+ else {
1372
+ if (N.value.length === q.value.length - 1) return;
1373
+ N.value.push(e.id);
1374
+ }
1375
+ A("selectLegend", $.value);
1376
+ }
1377
+ function la(e) {
1378
+ return q.value.length ? q.value.find((t) => t.name === e) || (Ar.value && console.warn(`VueUiStackbar - Series name not found "${e}"`), null) : (Ar.value && console.warn("VueUiStackbar - There are no series to show."), null);
1379
+ }
1380
+ function ua(e) {
1381
+ let t = la(e);
1382
+ t !== null && N.value.includes(t.id) && ca({ id: t.id });
1383
+ }
1384
+ function da(e) {
1385
+ let t = la(e);
1386
+ t !== null && (N.value.includes(t.id) || ca({ id: t.id }));
1387
+ }
1388
+ let fa = m(() => q.value.map((e, t) => ({
1389
+ ...e,
1390
+ shape: "square"
1391
+ })).map((e) => ({
1392
+ ...e,
1393
+ opacity: N.value.includes(e.id) ? .5 : 1,
1394
+ segregate: () => ca(e),
1395
+ isSegregated: N.value.includes(e.id)
1396
+ }))), pa = m(() => ({
1397
+ cy: "stackbar-legend",
1398
+ backgroundColor: H.value.legend.backgroundColor,
1399
+ color: H.value.legend.color,
1400
+ fontSize: H.value.legend.fontSize,
1401
+ paddingBottom: 12,
1402
+ fontWeight: H.value.legend.bold ? "bold" : ""
1403
+ })), ma = C(!1);
1404
+ function ha() {
1405
+ ma.value = !ma.value;
1406
+ }
1407
+ function ga(e, t) {
1408
+ let n = JSON.parse(JSON.stringify($.value)).map((e) => ({
1409
+ name: e.name,
1410
+ value: e.series[t] === 0 ? 0 : (e.signedSeries[t] === -1 && e.series[t] >= 0 ? -e.series[t] : e.series[t]) || null,
1411
+ proportion: e.proportions[t] || null,
1412
+ color: e.color,
1413
+ id: e.id
1414
+ }));
1415
+ A("selectTimeLabel", {
1416
+ datapoint: n,
1417
+ absoluteIndex: e.absoluteIndex,
1418
+ label: e.text
1419
+ });
1420
+ }
1421
+ let _a = m(() => Math.max(...$.value.flatMap((e) => e.series)));
1422
+ function va(e, t) {
1423
+ return z.value.showDistributedPercentage && z.value.distributed ? vr.value ? t * 100 >= z.value.dataLabels.hideUnderPercentage : !z.value.dataLabels.hideEmptyPercentages || t > 0 : vr.value ? (_r.value && Ar.value && console.warn("Vue Data UI - VueUiStackbar - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case."), e > _a.value * z.value.dataLabels.hideUnderPercentage / 100) : _r.value ? Math.abs(e) >= z.value.dataLabels.hideUnderValue : !z.value.dataLabels.hideEmptyValues || e !== 0;
1424
+ }
1425
+ async function ya({ scale: e = 2 } = {}) {
1426
+ if (!j.value) return;
1427
+ let { imageUri: t, base64: n } = await Pe({
1428
+ domElement: j.value,
1429
+ base64: !0,
1430
+ img: !0,
1431
+ scale: e
1432
+ }), r = j.value.getBoundingClientRect(), a = {
1433
+ width: r.width,
1434
+ height: r.height,
1435
+ aspectRatio: r.height ? r.width / r.height : 0
1436
+ }, o = await ce(t, e) ?? a;
1437
+ return {
1438
+ imageUri: t,
1439
+ base64: n,
1440
+ title: H.value.title.text,
1441
+ ...o
1442
+ };
1443
+ }
1444
+ let ba = m(() => {
1445
+ let e = I.value.table.useDialog && !I.value.table.show, t = G.value.showTable;
1446
+ return {
1447
+ component: e ? xn : gn,
1448
+ title: `${H.value.title.text}${H.value.title.subtitle.text ? `: ${H.value.title.subtitle.text}` : ""}`,
1449
+ props: e ? {
1450
+ backgroundColor: I.value.table.th.backgroundColor,
1451
+ color: I.value.table.th.color,
1452
+ headerColor: I.value.table.th.color,
1453
+ headerBg: I.value.table.th.backgroundColor,
1454
+ isFullscreen: Fn.value,
1455
+ fullscreenParent: j.value,
1456
+ forcedWidth: Math.min(800, window.innerWidth * .8),
1457
+ isCursorPointer: U.value
1458
+ } : {
1459
+ hideDetails: !0,
1460
+ config: {
1461
+ open: t,
1462
+ maxHeight: 1e4,
1463
+ body: {
1464
+ backgroundColor: H.value.backgroundColor,
1465
+ color: H.value.color
1466
+ },
1467
+ head: {
1468
+ backgroundColor: H.value.backgroundColor,
1469
+ color: H.value.color
1470
+ }
1471
+ }
1472
+ }
1473
+ };
1474
+ });
1475
+ ct(() => G.value.showTable, (e) => {
1476
+ I.value.table.show || (e && I.value.table.useDialog && Vn.value ? Vn.value.open() : "close" in Vn.value && Vn.value.close());
1477
+ });
1478
+ function xa() {
1479
+ G.value.showTable = !1, Hn.value && Hn.value.setTableIconState(!1);
1480
+ }
1481
+ let Sa = m(() => H.value.backgroundColor), Ca = m(() => H.value.legend), wa = m(() => H.value.title), { isCallbackImaging: Ta, isCallbackSvg: Ea, generateSvg: Da, onGenerateImage: Oa } = Ae({
1482
+ svg: W,
1483
+ title: wa,
1484
+ legend: Ca,
1485
+ legendItems: fa,
1486
+ backgroundColor: Sa,
1487
+ getSvgCallback: () => I.value.userOptions.callbacks.svg,
1488
+ generateImage: wr
1489
+ });
1490
+ function ka(e, t = Y.value.start) {
1491
+ let n = J.value, r = Number(t);
1492
+ return e > n ? n : e < 0 || e <= r ? Math.min(r + 1, n) : e;
1493
+ }
1494
+ let Aa = C(!1), ja = C(!1);
1495
+ function Ma(e = !0) {
1496
+ if (!Aa.value) {
1497
+ Aa.value = !0;
1498
+ try {
1499
+ let { startIndex: t, endIndex: n, keepState: r } = H.value.zoom, a = r ? Math.max(0, J.value) : J.value;
1500
+ if (r && a <= 0) return;
1501
+ let o = t ?? 0, s = n == null ? a : Math.min(ka(n + 1, o), a);
1502
+ Na.value = !0, Y.value.start = o, Y.value.end = s, X.value.start = o, X.value.end = s, ui(), ja.value = !0, e && k.zoomState && ci(k.zoomState);
1503
+ } finally {
1504
+ queueMicrotask(() => {
1505
+ Na.value = !1;
1506
+ }), Aa.value = !1;
1507
+ }
1508
+ }
1509
+ }
1510
+ let Na = C(!1);
1511
+ ct([() => k.zoomState, ja], ([e, t]) => {
1512
+ t && e && ci(e);
1513
+ }, {
1514
+ deep: !0,
1515
+ immediate: !0
1516
+ });
1517
+ function Pa(e) {
1518
+ ni = {
1519
+ ...ni,
1520
+ ...e
1521
+ }, ti && cancelAnimationFrame(ti), ti = requestAnimationFrame(() => {
1522
+ let e = {
1523
+ ...Y.value,
1524
+ ...ni
1525
+ };
1526
+ ni = {}, ti = null, Y.value = e, X.value = { ...e }, ui(), oi({
1527
+ start: Number(Y.value.start),
1528
+ end: Number(Y.value.end)
1529
+ });
1530
+ });
1531
+ }
1532
+ function Fa(e) {
1533
+ if (Aa.value || Na.value) return;
1534
+ let t = Number(e);
1535
+ Number.isFinite(t) && (A("zoomStart", {
1536
+ index: t,
1537
+ isZoom: t !== 0
1538
+ }), t !== Y.value.start && Pa({ start: t }));
1539
+ }
1540
+ function Ia(e) {
1541
+ if (Aa.value || Na.value) return;
1542
+ let t = ni.start === void 0 ? Y.value.start : ni.start, n = ka(Number(e), t);
1543
+ Number.isFinite(n) && (A("zoomEnd", {
1544
+ index: n,
1545
+ isZoom: n !== J.value
1546
+ }), (n !== Y.value.end || ni.start !== void 0) && Pa({ end: n }));
1547
+ }
1548
+ function La({ seriesIndex: e, datapoint: t }) {
1549
+ let n = Y.value.start + e;
1550
+ A("selectX", {
1551
+ dataset: t,
1552
+ index: n,
1553
+ indexLabel: B.value.values[n]
1554
+ });
1555
+ }
1556
+ function Ra() {
1557
+ return { y0: Q.value?.[0]?.zero ?? K.value.bottom };
1558
+ }
1559
+ function za(e) {
1560
+ let { y0: t } = Ra(), n = z.value.totalValues, r = Math.max(2, n.fontSize * .3 + n.offsetY), a = Infinity, o = !1;
1561
+ for (let t of $.value || []) {
1562
+ let n = t?.series?.[e] ?? 0, r = t?.height?.[e] ?? 0, s = t?.y?.[e];
1563
+ n > 0 && r > 0 && Number.isFinite(s) && (o = !0, s < a && (a = s));
1564
+ }
1565
+ let s = (o && Number.isFinite(a) ? a : t) - r;
1566
+ return Math.min(Math.max(s, 0), K.value.bottom);
1567
+ }
1568
+ function Ba(e) {
1569
+ let { x0: t } = Ra(), n = Math.max(2, z.value.totalValues.fontSize * .3 + z.value.totalValues.offsetX), r = -Infinity, a = !1;
1570
+ for (let t of $.value || []) {
1571
+ let n = t?.series?.[e] ?? 0, o = t?.horizontal_x?.[e], s = t?.horizontal_width?.[e], c = Number.isFinite(s) ? Math.max(0, s) : 0;
1572
+ Number.isFinite(o) && n > 0 && c > 0 && (a = !0, r = Math.max(r, o + c));
1573
+ }
1574
+ return (a && Number.isFinite(r) ? r : t) + n;
1575
+ }
1576
+ async function Va() {
1577
+ if (A("copyAlt", {
1578
+ config: I.value,
1579
+ dataset: $.value
1580
+ }), !I.value.userOptions.callbacks.altCopy) {
1581
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1582
+ return;
1583
+ }
1584
+ await Promise.resolve(I.value.userOptions.callbacks.altCopy({
1585
+ config: I.value,
1586
+ dataset: $.value
1587
+ }));
1588
+ }
1589
+ let Ha = C(!1);
1590
+ function Ua() {
1591
+ F.value = null, Ha.value = !0;
1592
+ }
1593
+ function Wa() {
1594
+ qr.value = !1, F.value = null, Dn.value = !1, P.value = null, A("selectX", {
1595
+ index: null,
1596
+ indexLabel: null,
1597
+ dataset: null
1598
+ }), Ha.value = !1;
1599
+ }
1600
+ function Ga(e) {
1601
+ let t = W.value;
1602
+ if (!t) return null;
1603
+ if (t.createSVGPoint && t.getScreenCTM) {
1604
+ let n = t.createSVGPoint();
1605
+ n.x = e.clientX, n.y = e.clientY;
1606
+ let r = t.getScreenCTM();
1607
+ if (r) {
1608
+ let e = n.matrixTransform(r.inverse());
1609
+ return {
1610
+ x: e.x,
1611
+ y: e.y
1612
+ };
1613
+ }
1614
+ }
1615
+ let n = t.getBoundingClientRect(), r = t.viewBox?.baseVal || {
1616
+ x: 0,
1617
+ y: 0,
1618
+ width: n.width,
1619
+ height: n.height
1620
+ }, a = Math.min(n.width / r.width, n.height / r.height);
1621
+ if (!Number.isFinite(a) || a <= 0) return null;
1622
+ let o = r.width * a, s = r.height * a, c = (n.width - o) / 2, l = (n.height - s) / 2;
1623
+ return {
1624
+ x: (e.clientX - n.left - c) / a + r.x,
1625
+ y: (e.clientY - n.top - l) / a + r.y
1626
+ };
1627
+ }
1628
+ let Ka = m(() => I.value.orientation === "horizontal"), qa = m(() => {
1629
+ if (!Kr.value || Jr.value == null || Yr.value == null) return null;
1630
+ let e = Math.min(Jr.value, Yr.value), t = Math.abs(Yr.value - Jr.value);
1631
+ return Ka.value ? {
1632
+ x: K.value.left,
1633
+ y: e,
1634
+ width: K.value.width,
1635
+ height: t
1636
+ } : {
1637
+ x: e,
1638
+ y: K.value.top,
1639
+ width: t,
1640
+ height: K.value.height
1641
+ };
1642
+ }), Ja = m(() => ja.value ? Number(Y.value.start) !== 0 || Number(Y.value.end) !== Number(J.value) : !1);
1643
+ function Ya() {
1644
+ return Ka.value ? K.value.top : K.value.left;
1645
+ }
1646
+ function Xa() {
1647
+ return Ka.value ? K.value.bottom : K.value.right;
1648
+ }
1649
+ function Za() {
1650
+ return Ka.value ? K.value.height : K.value.width;
1651
+ }
1652
+ function Qa(e) {
1653
+ return Ka.value ? e.y : e.x;
1654
+ }
1655
+ function $a(e) {
1656
+ return Math.min(Math.max(e, Ya()), Xa());
1657
+ }
1658
+ function eo() {
1659
+ P.value = null, ar.value = null, F.value = null, er.value = "pointer", Dn.value = !1;
1660
+ }
1661
+ function to(e) {
1662
+ let t = e?.pointerId == null ? Xr.value : e.pointerId;
1663
+ t != null && W.value?.hasPointerCapture?.(t) && W.value.releasePointerCapture(t), Kr.value = !1, Jr.value = null, Yr.value = null, Xr.value = null;
1664
+ }
1665
+ function no() {
1666
+ Zr.value = !0, setTimeout(() => {
1667
+ Zr.value = !1;
1668
+ }, 0);
1669
+ }
1670
+ function ro(e) {
1671
+ Zr.value && (Zr.value = !1, e.preventDefault(), e.stopPropagation());
1672
+ }
1673
+ function io(e) {
1674
+ if (!ei.value || !Ja.value || !e) return !1;
1675
+ let t = Date.now(), n = e.pointerType || "mouse", r = Qr.value, a = n === "touch" ? 450 : 350, o = n === "touch" ? 28 : 10, s = Math.hypot(e.clientX - r.x, e.clientY - r.y);
1676
+ return r.time > 0 && r.pointerType === n && t - r.time <= a && s <= o ? (Qr.value = {
1677
+ time: 0,
1678
+ x: 0,
1679
+ y: 0,
1680
+ pointerType: null
1681
+ }, no(), to(e), pi({
1682
+ force: !0,
1683
+ publish: !0
1684
+ }), !0) : (Qr.value = {
1685
+ time: t,
1686
+ x: e.clientX,
1687
+ y: e.clientY,
1688
+ pointerType: n
1689
+ }, !1);
1690
+ }
1691
+ function ao(e) {
1692
+ let t = Math.max(0, Number(Y.value.end) - Number(Y.value.start));
1693
+ if (t <= 0 || Z.value <= 0) return null;
1694
+ let n = Math.floor(($a(e) - Ya()) / Z.value);
1695
+ return Math.max(0, Math.min(t - 1, n));
1696
+ }
1697
+ function oo(e, t) {
1698
+ let n = ao(e), r = ao(t);
1699
+ if (n == null || r == null) return null;
1700
+ let a = Math.min(n, r), o = Math.max(n, r);
1701
+ return o <= a ? null : {
1702
+ start: Number(Y.value.start) + a,
1703
+ end: Number(Y.value.start) + o + 1
1704
+ };
1705
+ }
1706
+ function so(e) {
1707
+ let t = li(e);
1708
+ return t ? (A("zoomStart", {
1709
+ index: t.start,
1710
+ isZoom: t.start !== 0
1711
+ }), A("zoomEnd", {
1712
+ index: t.end,
1713
+ isZoom: t.end !== J.value
1714
+ }), t) : null;
1715
+ }
1716
+ function co(e) {
1717
+ if (!ei.value || ma.value || e.button !== void 0 && e.button !== 0 || Xr.value != null && e.pointerId !== Xr.value) return;
1718
+ let t = Ga(e);
1719
+ if (!t) return;
1720
+ let { left: n, right: r, top: a, bottom: o } = K.value;
1721
+ if (t.x < n || t.x > r || t.y < a || t.y > o || Number(Y.value.end) - Number(Y.value.start) <= 1) return;
1722
+ qr.value = !0, W.value?.focus?.({ preventScroll: !0 }), eo();
1723
+ let s = $a(Qa(t));
1724
+ Xr.value = e.pointerId, Kr.value = !0, Jr.value = s, Yr.value = s;
1725
+ }
1726
+ function lo(e) {
1727
+ if (!ei.value || !Kr.value || Xr.value != null && e.pointerId !== Xr.value) return;
1728
+ let t = Ga(e);
1729
+ t && (Yr.value = $a(Qa(t)), Jr.value != null && Math.abs(Yr.value - Jr.value) >= 2 && !W.value?.hasPointerCapture?.(e.pointerId) && W.value?.setPointerCapture?.(e.pointerId));
1730
+ }
1731
+ function uo(e) {
1732
+ if (!ei.value || !Kr.value || Xr.value != null && e.pointerId !== Xr.value) return;
1733
+ let t = Ga(e);
1734
+ t && (Yr.value = $a(Qa(t)));
1735
+ let n = Jr.value, r = Yr.value;
1736
+ if ((n == null || r == null ? 0 : Math.abs(r - n)) < Math.max(4, Za() * .01)) {
1737
+ if (io(e)) return;
1738
+ to(e);
1739
+ return;
1740
+ }
1741
+ let a = oo(n, r);
1742
+ if (!a) {
1743
+ to(e);
1744
+ return;
1745
+ }
1746
+ to(e), so(a) && (Qr.value = {
1747
+ time: 0,
1748
+ x: 0,
1749
+ y: 0,
1750
+ pointerType: null
1751
+ }, eo(), no());
1752
+ }
1753
+ function fo(e) {
1754
+ if (!W.value || ma.value || document.activeElement !== W.value || (qr.value = !1, hi.value) || !Y.value.end && Y.value.end !== 0) return;
1755
+ let t = I.value.orientation === "vertical", n = I.value.orientation === "horizontal", r = t && e.key === "ArrowLeft" || n && e.key === "ArrowUp", a = t && e.key === "ArrowRight" || n && e.key === "ArrowDown", o = e.key === "Enter" || e.key === " ", s = e.key === "Escape";
1756
+ if (!r && !a && !o && !s) return;
1757
+ let c = Y.value.end - Y.value.start;
1758
+ if (c <= 0) return;
1759
+ if (e.preventDefault(), e.stopPropagation(), s) {
1760
+ if (ei.value && (Ja.value || Kr.value)) {
1761
+ to(), pi({
1762
+ force: !0,
1763
+ publish: !0
1764
+ });
1765
+ return;
1766
+ }
1767
+ F.value = null, Dn.value = !1, P.value = null, A("selectX", {
1768
+ index: null,
1769
+ indexLabel: null,
1770
+ dataset: null
1771
+ });
1772
+ return;
1773
+ }
1774
+ if (o) {
1775
+ if (F.value === null) return;
1776
+ Gi(F.value);
1777
+ return;
1778
+ }
1779
+ let l = F.value, u = P.value;
1780
+ l !== null && l >= 0 && l < c ? a ? (l += 1, l >= c && (l = 0)) : r && (--l, l < 0 && (l = c - 1)) : u !== null && u >= 0 && u < c ? (l = a ? u + 1 : u - 1, l >= c && (l = 0), l < 0 && (l = c - 1)) : l = a ? 0 : c - 1, F.value = l, po(l), Xi(l, "keyboard");
1781
+ }
1782
+ function po(e) {
1783
+ if (!Number.isFinite(e)) return;
1784
+ let t, n;
1785
+ I.value.orientation === "vertical" ? (t = K.value.left + e * Z.value + Z.value / 2, n = K.value.top + K.value.height / 2) : (t = K.value.left + K.value.width / 2, n = K.value.top + e * Z.value + Z.value / 2);
1786
+ let r = l(t, n, W.value);
1787
+ r && ($n.value = r);
1788
+ }
1789
+ let mo = m(() => ({
1790
+ headers: oa.value?.colNames ?? [],
1791
+ rows: oa.value?.body ?? []
1792
+ }));
1793
+ return Le({
1794
+ getData: ra,
1795
+ getImage: ya,
1796
+ generatePdf: Cr,
1797
+ generateCsv: aa,
1798
+ generateImage: wr,
1799
+ generateSvg: Da,
1800
+ hideSeries: da,
1801
+ showSeries: ua,
1802
+ toggleTable: ea,
1803
+ toggleLabels: ta,
1804
+ toggleTooltip: na,
1805
+ toggleAnnotator: ha,
1806
+ toggleFullscreen: $i,
1807
+ copyAlt: Va,
1808
+ resetZoom: () => pi({
1809
+ force: !0,
1810
+ publish: !0
1811
+ }),
1812
+ setZoomState: li
1813
+ }), (n, r) => (S(), _("div", {
1814
+ id: `stackbar_${M.value}`,
1815
+ ref_key: "stackbarChart",
1816
+ ref: j,
1817
+ class: y({
1818
+ "vue-data-ui-component": !0,
1819
+ "vue-ui-stackbar": !0,
1820
+ "vue-data-ui-wrapper-fullscreen": Fn.value
1821
+ }),
1822
+ style: x(`background:${H.value.backgroundColor};color:${H.value.color};font-family:${I.value.style.fontFamily}; position: relative; ${I.value.responsive ? "height: 100%" : ""}`),
1823
+ onMouseenter: mr,
1824
+ onMouseleave: hr
1825
+ }, [
1826
+ Ye("div", {
1827
+ id: `chart-instructions-${M.value}`,
1828
+ class: "sr-only"
1829
+ }, [Ye("p", null, E(I.value.a11y.translations.keyboardNavigation), 1)], 8, ft),
1830
+ mo.value?.rows?.length ? (S(), h(Ue, {
1831
+ key: 0,
1832
+ uid: M.value,
1833
+ head: mo.value.headers,
1834
+ body: mo.value.rows,
1835
+ notice: I.value.a11y.translations.tableAvailable,
1836
+ caption: I.value.a11y.translations.tableCaption
1837
+ }, null, 8, [
1838
+ "uid",
1839
+ "head",
1840
+ "body",
1841
+ "notice",
1842
+ "caption"
1843
+ ])) : g("", !0),
1844
+ L.value.buttons.annotator ? (S(), h(D(vn), {
1845
+ key: 1,
1846
+ svgRef: D(W),
1847
+ backgroundColor: H.value.backgroundColor,
1848
+ color: H.value.color,
1849
+ active: ma.value,
1850
+ isCursorPointer: U.value,
1851
+ palette: L.value.annotatorPalette,
1852
+ onClose: ha
1853
+ }, {
1854
+ "annotator-action-close": O(() => [T(n.$slots, "annotator-action-close", {}, void 0, !0)]),
1855
+ "annotator-action-color": O(({ color: e }) => [T(n.$slots, "annotator-action-color", b(v({ color: e })), void 0, !0)]),
1856
+ "annotator-action-draw": O(({ mode: e }) => [T(n.$slots, "annotator-action-draw", b(v({ mode: e })), void 0, !0)]),
1857
+ "annotator-action-undo": O(({ disabled: e }) => [T(n.$slots, "annotator-action-undo", b(v({ disabled: e })), void 0, !0)]),
1858
+ "annotator-action-redo": O(({ disabled: e }) => [T(n.$slots, "annotator-action-redo", b(v({ disabled: e })), void 0, !0)]),
1859
+ "annotator-action-delete": O(({ disabled: e }) => [T(n.$slots, "annotator-action-delete", b(v({ disabled: e })), void 0, !0)]),
1860
+ _: 3
1861
+ }, 8, [
1862
+ "svgRef",
1863
+ "backgroundColor",
1864
+ "color",
1865
+ "active",
1866
+ "isCursorPointer",
1867
+ "palette"
1868
+ ])) : g("", !0),
1869
+ T(n.$slots, "userConfig", {}, void 0, !0),
1870
+ H.value.title.text ? (S(), _("div", {
1871
+ key: 2,
1872
+ ref_key: "chartTitle",
1873
+ ref: jn,
1874
+ style: "width:100%;background:transparent;padding-bottom:24px"
1875
+ }, [(S(), h(Fe, {
1876
+ key: `title_${Ln.value}`,
1877
+ config: {
1878
+ title: {
1879
+ cy: "stackbar-title",
1880
+ ...H.value.title
1881
+ },
1882
+ subtitle: {
1883
+ cy: "stackbar-subtitle",
1884
+ ...H.value.title.subtitle
1885
+ }
1886
+ }
1887
+ }, null, 8, ["config"]))], 512)) : g("", !0),
1888
+ Ye("div", { id: `legend-top-${M.value}` }, null, 8, pt),
1889
+ L.value.show && En.value && (D(pr) || D(dr)) ? (S(), h(D(yn), {
1890
+ ref_key: "userOptionsRef",
1891
+ ref: Hn,
1892
+ key: `user_option_${An.value}`,
1893
+ backgroundColor: H.value.backgroundColor,
1894
+ color: H.value.color,
1895
+ isPrinting: D(xr),
1896
+ isImaging: D(Sr),
1897
+ uid: M.value,
1898
+ hasTooltip: V.value.show && L.value.buttons.tooltip,
1899
+ hasPdf: L.value.buttons.pdf,
1900
+ hasImg: L.value.buttons.img,
1901
+ hasSvg: L.value.buttons.svg,
1902
+ hasXls: L.value.buttons.csv,
1903
+ hasTable: L.value.buttons.table,
1904
+ hasLabel: L.value.buttons.labels,
1905
+ hasFullscreen: L.value.buttons.fullscreen,
1906
+ hasAltCopy: L.value.buttons.altCopy,
1907
+ isFullscreen: Fn.value,
1908
+ chartElement: j.value,
1909
+ position: L.value.position,
1910
+ isTooltip: G.value.showTooltip,
1911
+ titles: { ...L.value.buttonTitles },
1912
+ hasAnnotator: L.value.buttons.annotator,
1913
+ isAnnotation: ma.value,
1914
+ callbacks: L.value.callbacks,
1915
+ printScale: L.value.print.scale,
1916
+ tableDialog: I.value.table.useDialog,
1917
+ isCursorPointer: U.value,
1918
+ onToggleFullscreen: $i,
1919
+ onGeneratePdf: D(Cr),
1920
+ onGenerateCsv: aa,
1921
+ onGenerateImage: D(Oa),
1922
+ onGenerateSvg: D(Da),
1923
+ onToggleTable: ea,
1924
+ onToggleLabels: ta,
1925
+ onToggleTooltip: na,
1926
+ onToggleAnnotator: ha,
1927
+ onCopyAlt: Va,
1928
+ style: x({ visibility: D(pr) ? D(dr) ? "visible" : "hidden" : "visible" })
1929
+ }, Xe({ _: 2 }, [
1930
+ n.$slots.menuIcon ? {
1931
+ name: "menuIcon",
1932
+ fn: O(({ isOpen: e, color: t }) => [T(n.$slots, "menuIcon", b(v({
1933
+ isOpen: e,
1934
+ color: t
1935
+ })), void 0, !0)]),
1936
+ key: "0"
1937
+ } : void 0,
1938
+ n.$slots.optionTooltip ? {
1939
+ name: "optionTooltip",
1940
+ fn: O(() => [T(n.$slots, "optionTooltip", {}, void 0, !0)]),
1941
+ key: "1"
1942
+ } : void 0,
1943
+ n.$slots.optionPdf ? {
1944
+ name: "optionPdf",
1945
+ fn: O(() => [T(n.$slots, "optionPdf", {}, void 0, !0)]),
1946
+ key: "2"
1947
+ } : void 0,
1948
+ n.$slots.optionCsv ? {
1949
+ name: "optionCsv",
1950
+ fn: O(() => [T(n.$slots, "optionCsv", {}, void 0, !0)]),
1951
+ key: "3"
1952
+ } : void 0,
1953
+ n.$slots.optionImg ? {
1954
+ name: "optionImg",
1955
+ fn: O(() => [T(n.$slots, "optionImg", {}, void 0, !0)]),
1956
+ key: "4"
1957
+ } : void 0,
1958
+ n.$slots.optionSvg ? {
1959
+ name: "optionSvg",
1960
+ fn: O(() => [T(n.$slots, "optionSvg", {}, void 0, !0)]),
1961
+ key: "5"
1962
+ } : void 0,
1963
+ n.$slots.optionTable ? {
1964
+ name: "optionTable",
1965
+ fn: O(() => [T(n.$slots, "optionTable", {}, void 0, !0)]),
1966
+ key: "6"
1967
+ } : void 0,
1968
+ n.$slots.optionLabels ? {
1969
+ name: "optionLabels",
1970
+ fn: O(() => [T(n.$slots, "optionLabels", {}, void 0, !0)]),
1971
+ key: "7"
1972
+ } : void 0,
1973
+ n.$slots.optionFullscreen ? {
1974
+ name: "optionFullscreen",
1975
+ fn: O(({ toggleFullscreen: e, isFullscreen: t }) => [T(n.$slots, "optionFullscreen", b(v({
1976
+ toggleFullscreen: e,
1977
+ isFullscreen: t
1978
+ })), void 0, !0)]),
1979
+ key: "8"
1980
+ } : void 0,
1981
+ n.$slots.optionAnnotator ? {
1982
+ name: "optionAnnotator",
1983
+ fn: O(({ toggleAnnotator: e, isAnnotator: t }) => [T(n.$slots, "optionAnnotator", b(v({
1984
+ toggleAnnotator: e,
1985
+ isAnnotator: t
1986
+ })), void 0, !0)]),
1987
+ key: "9"
1988
+ } : void 0,
1989
+ n.$slots.optionAltCopy ? {
1990
+ name: "optionAltCopy",
1991
+ fn: O(({ altCopy: e }) => [T(n.$slots, "optionAltCopy", b(v({ altCopy: e })), void 0, !0)]),
1992
+ key: "10"
1993
+ } : void 0,
1994
+ n.$slots["custom-menu-before"] ? {
1995
+ name: "custom-menu-before",
1996
+ fn: O(() => [T(n.$slots, "custom-menu-before", {}, void 0, !0)]),
1997
+ key: "11"
1998
+ } : void 0,
1999
+ n.$slots["custom-menu-after"] ? {
2000
+ name: "custom-menu-after",
2001
+ fn: O(() => [T(n.$slots, "custom-menu-after", {}, void 0, !0)]),
2002
+ key: "12"
2003
+ } : void 0
2004
+ ]), 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.onGenerateImage.onGenerateSvg.style".split("."))) : g("", !0),
2005
+ Ye("div", mt, [(S(), _("svg", {
2006
+ ref_key: "svgRef",
2007
+ ref: W,
2008
+ xmlns: D(pe),
2009
+ "aria-describedby": `chart-instructions-${M.value}`,
2010
+ viewBox: `0 0 ${K.value.chartWidth <= 0 ? 10 : K.value.chartWidth} ${K.value.chartHeight <= 0 ? 10 : K.value.chartHeight}`,
2011
+ class: y({
2012
+ "vue-data-ui-loading": D(cr),
2013
+ "vue-data-ui-fullscreen--on": Fn.value,
2014
+ "vue-data-ui-fulscreen--off": !Fn.value,
2015
+ "vue-data-ui-no-transition": !D(or),
2016
+ "vue-ui-stackbar-chart-zoom-pointer-focus": ei.value && qr.value
2017
+ }),
2018
+ style: x({
2019
+ maxWidth: "100%",
2020
+ overflow: "visible",
2021
+ background: "transparent",
2022
+ color: H.value.color,
2023
+ cursor: ei.value ? Kr.value ? Ka.value ? "row-resize" : "col-resize" : "crosshair" : void 0,
2024
+ touchAction: ei.value ? Ka.value ? "pan-x" : "pan-y" : void 0,
2025
+ userSelect: ei.value ? "none" : void 0
2026
+ }),
2027
+ tabindex: "0",
2028
+ onFocus: Ua,
2029
+ onBlur: Wa,
2030
+ onKeydown: fo,
2031
+ onPointerdown: co,
2032
+ onPointermove: lo,
2033
+ onPointerup: uo,
2034
+ onPointercancel: to,
2035
+ onClickCapture: ro
2036
+ }, [
2037
+ Qe(D(bn)),
2038
+ n.$slots["chart-background"] ? (S(), _("foreignObject", {
2039
+ key: 0,
2040
+ x: K.value.left,
2041
+ y: K.value.top,
2042
+ width: K.value.width <= 0 ? 10 : K.value.width,
2043
+ height: K.value.height <= 0 ? 10 : K.value.height,
2044
+ style: { pointerEvents: "none" }
2045
+ }, [T(n.$slots, "chart-background", {}, void 0, !0)], 8, gt)) : g("", !0),
2046
+ z.value.gradient.show ? (S(), _("defs", _t, [(S(!0), _(p, null, w($.value, (e, t) => (S(), h(Be, {
2047
+ t: "linear",
2048
+ id: `gradient_${e.id}`,
2049
+ key: `gradient_${e.id}_${t}`,
2050
+ x1: "0%",
2051
+ y1: "0%",
2052
+ x2: "0%",
2053
+ y2: "100%",
2054
+ stops: [
2055
+ [
2056
+ "0%",
2057
+ e.color,
2058
+ 1
2059
+ ],
2060
+ [
2061
+ "61.8%",
2062
+ D(c)(e.color, z.value.gradient.intensity / 100),
2063
+ 1
2064
+ ],
2065
+ [
2066
+ "100%",
2067
+ e.color,
2068
+ 1
2069
+ ]
2070
+ ]
2071
+ }, null, 8, ["id", "stops"]))), 128))])) : g("", !0),
2072
+ zi.value.length ? (S(), _("defs", vt, [(S(!0), _(p, null, w(zi.value, (e, t) => (S(), _(p, { key: `stackbar-outer-clip-${t}` }, [e ? (S(), _("clipPath", {
2073
+ key: 0,
2074
+ id: `stackbar-outer-clip-${M.value}-${Y.value.start + t}`,
2075
+ clipPathUnits: "userSpaceOnUse"
2076
+ }, [Ye("rect", {
2077
+ x: e.x,
2078
+ y: e.y,
2079
+ width: e.width,
2080
+ height: e.height,
2081
+ rx: e.rx
2082
+ }, null, 8, bt)], 8, yt)) : g("", !0)], 64))), 128))])) : g("", !0),
2083
+ R.value.frame.show ? (S(), _("rect", {
2084
+ key: 3,
2085
+ style: {
2086
+ pointerEvents: "none",
2087
+ transition: "none",
2088
+ animation: "none !important"
2089
+ },
2090
+ x: Math.max(0, K.value.left),
2091
+ y: Math.max(0, K.value.top),
2092
+ width: Math.max(0, K.value.width),
2093
+ height: Math.max(0, K.value.height),
2094
+ fill: "transparent",
2095
+ stroke: R.value.frame.stroke,
2096
+ "stroke-width": R.value.frame.strokeWidth,
2097
+ "stroke-linecap": R.value.frame.strokeLinecap,
2098
+ "stroke-linejoin": R.value.frame.strokeLinejoin,
2099
+ "stroke-dasharray": R.value.frame.strokeDasharray
2100
+ }, null, 8, xt)) : g("", !0),
2101
+ R.value.x.showHorizontalLines && I.value.orientation === "vertical" ? (S(!0), _(p, { key: 4 }, w(Q.value, (e, t) => (S(), _("line", {
2102
+ x1: K.value.left,
2103
+ x2: K.value.right,
2104
+ y1: e.y,
2105
+ y2: e.y,
2106
+ stroke: R.value.x.linesColor,
2107
+ "stroke-width": R.value.x.linesThickness,
2108
+ "stroke-dasharray": R.value.x.linesStrokeDasharray,
2109
+ "stroke-linecap": "round"
2110
+ }, null, 8, St))), 256)) : g("", !0),
2111
+ R.value.x.showHorizontalLines && I.value.orientation === "horizontal" ? (S(!0), _(p, { key: 5 }, w(Y.value.end - Y.value.start + 1, (e, t) => (S(), _("line", {
2112
+ x1: K.value.left,
2113
+ x2: K.value.right,
2114
+ y1: K.value.top + Z.value * t,
2115
+ y2: K.value.top + Z.value * t,
2116
+ stroke: R.value.x.linesColor,
2117
+ "stroke-width": R.value.x.linesThickness,
2118
+ "stroke-dasharray": R.value.x.linesStrokeDasharray,
2119
+ "stroke-linecap": "round"
2120
+ }, null, 8, Ct))), 256)) : g("", !0),
2121
+ R.value.y.showVerticalLines && I.value.orientation === "vertical" ? (S(!0), _(p, { key: 6 }, w(Y.value.end - Y.value.start + 1, (e, t) => (S(), _("line", {
2122
+ x1: K.value.left + Z.value * t,
2123
+ x2: K.value.left + Z.value * t,
2124
+ y1: K.value.top,
2125
+ y2: K.value.bottom,
2126
+ stroke: R.value.y.linesColor,
2127
+ "stroke-width": R.value.y.linesThickness,
2128
+ "stroke-dasharray": R.value.y.linesStrokeDasharray,
2129
+ "stroke-linecap": "round"
2130
+ }, null, 8, wt))), 256)) : g("", !0),
2131
+ R.value.y.showVerticalLines && I.value.orientation === "horizontal" ? (S(!0), _(p, { key: 7 }, w(Q.value, (e, t) => (S(), _("line", {
2132
+ x1: e.horizontal_x,
2133
+ x2: e.horizontal_x,
2134
+ y1: K.value.top,
2135
+ y2: K.value.bottom,
2136
+ stroke: R.value.y.linesColor,
2137
+ "stroke-width": R.value.y.linesThickness,
2138
+ "stroke-dasharray": R.value.y.linesStrokeDasharray,
2139
+ "stroke-linecap": "round"
2140
+ }, null, 8, Tt))), 256)) : g("", !0),
2141
+ (S(!0), _(p, null, w($.value, (e, t) => (S(), _("g", { key: `stackbar-group-${e.datasetKey}-${t}-${M.value}` }, [n.$slots.pattern ? (S(), _("defs", Et, [T(n.$slots, "pattern", et({ ref_for: !0 }, {
2142
+ seriesIndex: e.absoluteIndex,
2143
+ patternId: `pattern_${M.value}_${e.absoluteIndex}`
2144
+ }), void 0, !0)])) : g("", !0), I.value.orientation === "vertical" ? (S(), _(p, { key: 1 }, [(S(!0), _(p, null, w(e.x, (t, n) => (S(), _("rect", {
2145
+ key: `stackbar-rect-${e.rectKeys[n]}`,
2146
+ x: t,
2147
+ y: D(he)(e.y[n]),
2148
+ height: e.height[n] < 0 ? 1e-4 : e.height[n] || 0,
2149
+ rx: 0,
2150
+ "clip-path": Bi(n),
2151
+ width: Z.value * (1 - z.value.gapRatio / 2),
2152
+ fill: z.value.gradient.show ? `url(#gradient_${e.id})` : e.color,
2153
+ stroke: H.value.backgroundColor,
2154
+ "stroke-width": z.value.strokeWidth,
2155
+ "stroke-linecap": "round",
2156
+ "stroke-linejoin": "miter",
2157
+ class: y({ "vue-data-ui-bar-transition": In.value })
2158
+ }, null, 10, Dt))), 128)), n.$slots.pattern ? (S(), _("g", Ot, [(S(!0), _(p, null, w(e.x, (t, n) => (S(), _("rect", {
2159
+ key: `stackbar-pattern-rect-${e.rectKeys[n]}`,
2160
+ x: t,
2161
+ y: D(he)(e.y[n]),
2162
+ height: e.height[n] < 0 ? 1e-4 : e.height[n] || 0,
2163
+ rx: 0,
2164
+ "clip-path": Bi(n),
2165
+ width: Z.value * (1 - z.value.gapRatio / 2),
2166
+ fill: `url(#pattern_${M.value}_${e.absoluteIndex})`,
2167
+ stroke: H.value.backgroundColor,
2168
+ "stroke-width": z.value.strokeWidth,
2169
+ "stroke-linecap": "round",
2170
+ "stroke-linejoin": "miter",
2171
+ class: y({ "vue-data-ui-bar-transition": In.value })
2172
+ }, null, 10, kt))), 128))])) : g("", !0)], 64)) : (S(), _(p, { key: 2 }, [(S(!0), _(p, null, w(e.horizontal_x, (t, n) => (S(), _("rect", {
2173
+ key: `stackbar-rect-${e.rectKeys[n]}`,
2174
+ x: D(he)(t, K.value.left),
2175
+ y: e.horizontal_y[n] < 0 ? 0 : e.horizontal_y[n],
2176
+ width: D(he)(e.horizontal_width[n] < 0 ? 1e-4 : e.horizontal_width[n]),
2177
+ rx: 0,
2178
+ "clip-path": Bi(n),
2179
+ height: Z.value * (1 - z.value.gapRatio / 2),
2180
+ fill: z.value.gradient.show ? `url(#gradient_${e.id})` : e.color,
2181
+ stroke: H.value.backgroundColor,
2182
+ "stroke-width": z.value.strokeWidth,
2183
+ "stroke-linecap": "round",
2184
+ "stroke-linejoin": "miter",
2185
+ class: y({ "vue-data-ui-bar-transition": In.value })
2186
+ }, null, 10, At))), 128)), n.$slots.pattern ? (S(), _("g", jt, [(S(!0), _(p, null, w(e.horizontal_x, (t, n) => (S(), _("rect", {
2187
+ key: `stackbar-pattern-rect-${e.rectKeys[n]}`,
2188
+ x: D(he)(t, K.value.left),
2189
+ y: e.horizontal_y[n] < 0 ? 0 : e.horizontal_y[n],
2190
+ width: D(he)(e.horizontal_width[n] < 0 ? 1e-4 : e.horizontal_width[n]),
2191
+ rx: 0,
2192
+ "clip-path": Bi(n),
2193
+ height: Z.value * (1 - z.value.gapRatio / 2),
2194
+ fill: `url(#pattern_${M.value}_${e.absoluteIndex})`,
2195
+ stroke: H.value.backgroundColor,
2196
+ "stroke-width": z.value.strokeWidth,
2197
+ "stroke-linecap": "round",
2198
+ "stroke-linejoin": "miter",
2199
+ class: y({ "vue-data-ui-bar-transition": In.value })
2200
+ }, null, 10, Mt))), 128))])) : g("", !0)], 64))]))), 128)),
2201
+ R.value.x.showAxis ? (S(), _("line", {
2202
+ key: 8,
2203
+ x1: K.value.left,
2204
+ x2: K.value.right,
2205
+ y1: K.value.bottom,
2206
+ y2: K.value.bottom,
2207
+ stroke: R.value.x.axisColor,
2208
+ "stroke-width": R.value.x.axisThickness,
2209
+ "stroke-linecap": "round",
2210
+ "stroke-linejoin": "round"
2211
+ }, null, 8, Nt)) : g("", !0),
2212
+ R.value.y.showAxis && !z.value.distributed ? (S(), _("line", {
2213
+ key: 9,
2214
+ x1: Mr.value ? K.value.right : K.value.left,
2215
+ x2: Mr.value ? K.value.right : K.value.left,
2216
+ y1: K.value.top,
2217
+ y2: K.value.bottom,
2218
+ stroke: R.value.y.axisColor,
2219
+ "stroke-width": R.value.y.axisThickness,
2220
+ "stroke-linecap": "round",
2221
+ "stroke-linejoin": "round"
2222
+ }, null, 8, Pt)) : g("", !0),
2223
+ R.value.x.axisName.show && R.value.x.axisName.text ? (S(), _("text", {
2224
+ key: 10,
2225
+ ref_key: "xAxisLabel",
2226
+ ref: Un,
2227
+ x: K.value.left + K.value.width / 2,
2228
+ y: K.value.chartHeight - 3,
2229
+ "font-size": R.value.x.axisName.fontSize,
2230
+ fill: R.value.x.axisName.color,
2231
+ "font-weight": R.value.x.axisName.bold ? "bold" : "normal",
2232
+ "text-anchor": "middle"
2233
+ }, E(R.value.x.axisName.text), 9, Ft)) : g("", !0),
2234
+ R.value.y.axisName.show && R.value.y.axisName.text ? (S(), _("text", {
2235
+ key: 11,
2236
+ ref_key: "yAxisLabel",
2237
+ ref: Wn,
2238
+ transform: `translate(${Mr.value ? Tr.value.width - R.value.y.axisName.fontSize / 2 - R.value.y.axisName.offsetX : R.value.y.axisName.fontSize + R.value.y.axisName.offsetX}, ${K.value.top + K.value.height / 2}) rotate(-90)`,
2239
+ "font-size": R.value.y.axisName.fontSize,
2240
+ fill: R.value.y.axisName.color,
2241
+ "font-weight": R.value.y.axisName.bold ? "bold" : "normal",
2242
+ "text-anchor": "middle"
2243
+ }, E(R.value.y.axisName.text), 9, It)) : g("", !0),
2244
+ G.value.dataLabels.show && I.value.orientation === "vertical" ? (S(), _(p, { key: 12 }, [(S(!0), _(p, null, w($.value, (e, t) => (S(), _("g", { key: `dp_${e.id}` }, [(S(!0), _(p, null, w(e.x, (n, r) => (S(), _(p, { key: `rect_${e.id}_${Y.value.start + r}` }, [va(e.series[r], e.proportions[r]) ? (S(), _("text", {
2245
+ key: 0,
2246
+ class: y({ "vue-data-ui-transition": D(or) }),
2247
+ transform: `translate(${n + Z.value * (1 - z.value.gapRatio / 2) / 2}, ${e.y[r] + e.height[r] / 2 + z.value.dataLabels.fontSize / 3})`,
2248
+ "font-size": z.value.dataLabels.fontSize,
2249
+ fill: z.value.dataLabels.adaptColorToBackground ? D(fe)(e.color) : z.value.dataLabels.color,
2250
+ "font-weight": z.value.dataLabels.bold ? "bold" : "normal",
2251
+ "text-anchor": "middle"
2252
+ }, E(z.value.showDistributedPercentage && z.value.distributed ? Wi(e.proportions[r] * 100, e, t, r) : Ui(e.series[r], e, t, r, e.signedSeries[r])), 11, Lt)) : g("", !0)], 64))), 128))]))), 128)), z.value.totalValues.show && $.value.length > 1 ? (S(), _("g", {
2253
+ key: 0,
2254
+ ref_key: "sumTop",
2255
+ ref: qn
2256
+ }, [(S(!0), _(p, null, w(Hi.value, (e, t) => (S(), _(p, { key: `tl_${t + Y.value.start}` }, [!z.value.dataLabels.hideEmptyValues || e.value !== 0 ? (S(), _("text", {
2257
+ key: 0,
2258
+ class: y({ "vue-data-ui-transition": D(or) }),
2259
+ transform: `translate(${K.value.left + Z.value * t + Z.value / 2}, ${za(t)})`,
2260
+ "text-anchor": "middle",
2261
+ "font-size": z.value.totalValues.fontSize,
2262
+ "font-weight": z.value.totalValues.bold ? "bold" : "normal",
2263
+ fill: z.value.totalValues.color
2264
+ }, E(Ui(e.value, e, t, e.sign)), 11, Rt)) : g("", !0)], 64))), 128))], 512)) : g("", !0)], 64)) : g("", !0),
2265
+ G.value.dataLabels.show && I.value.orientation === "horizontal" ? (S(), _(p, { key: 13 }, [(S(!0), _(p, null, w($.value, (e, t) => (S(), _("g", null, [(S(!0), _(p, null, w(e.horizontal_x, (n, r) => (S(), _(p, null, [va(e.series[r], e.proportions[r]) ? (S(), _("text", {
2266
+ key: 0,
2267
+ class: y({ "vue-data-ui-transition": D(or) }),
2268
+ transform: `translate(${n + (e.horizontal_width[r] < 0 ? 1e-4 : e.horizontal_width[r]) / 2}, ${e.horizontal_y[r] + Z.value * (1 - z.value.gapRatio / 2) / 2 + z.value.dataLabels.fontSize / 3})`,
2269
+ "font-size": z.value.dataLabels.fontSize,
2270
+ fill: z.value.dataLabels.adaptColorToBackground ? D(fe)(e.color) : z.value.dataLabels.color,
2271
+ "font-weight": z.value.dataLabels.bold ? "bold" : "normal",
2272
+ "text-anchor": "middle"
2273
+ }, E(z.value.showDistributedPercentage && z.value.distributed ? Wi(e.proportions[r] * 100, e, t, r) : Ui(e.series[r], e, t, r, e.signedSeries[r])), 11, zt)) : g("", !0)], 64))), 256))]))), 256)), z.value.totalValues.show && $.value.length > 1 ? (S(), _("g", {
2274
+ key: 0,
2275
+ ref_key: "sumRight",
2276
+ ref: Jn
2277
+ }, [(S(!0), _(p, null, w(Hi.value, (e, t) => (S(), _(p, null, [!z.value.dataLabels.hideEmptyValues || e.value !== 0 ? (S(), _("text", {
2278
+ key: 0,
2279
+ class: y({ "vue-data-ui-transition": D(or) }),
2280
+ transform: `translate(${Ba(t)}, ${K.value.top + Z.value * t + Z.value / 2 + z.value.totalValues.fontSize / 3})`,
2281
+ "text-anchor": "start",
2282
+ "font-size": z.value.totalValues.fontSize,
2283
+ "font-weight": z.value.totalValues.bold ? "bold" : "normal",
2284
+ fill: z.value.totalValues.color
2285
+ }, E(Ui(e.value, e, t, e.sign)), 11, Bt)) : g("", !0)], 64))), 256))], 512)) : g("", !0)], 64)) : g("", !0),
2286
+ R.value.y.axisLabels.show && !z.value.distributed && I.value.orientation === "vertical" ? (S(), _("g", {
2287
+ key: 14,
2288
+ ref_key: "scaleLabels",
2289
+ ref: Gn
2290
+ }, [(S(!0), _(p, null, w(Q.value, (e, t) => (S(), _("path", {
2291
+ key: `ty_${t}`,
2292
+ stroke: R.value.x.axisColor,
2293
+ class: y({ "vue-data-ui-transition": D(or) }),
2294
+ d: `M${Mr.value ? K.value.right : K.value.left},${e.y} ${Mr.value ? K.value.right + 6 : K.value.left - 6},${e.y}`,
2295
+ "stroke-width": 1,
2296
+ "stroke-linecap": "round"
2297
+ }, null, 10, Vt))), 128)), (S(!0), _(p, null, w(Q.value, (e, n) => (S(), _("text", {
2298
+ class: y({ "vue-data-ui-transition": D(or) }),
2299
+ key: `tl_${n}`,
2300
+ transform: `translate(${e.x}, ${e.y + R.value.y.axisLabels.fontSize / 3})`,
2301
+ "font-size": R.value.y.axisLabels.fontSize,
2302
+ "font-weight": R.value.y.axisLabels.bold ? "bold" : "normal",
2303
+ fill: R.value.y.axisLabels.color,
2304
+ "text-anchor": Mr.value ? "start" : "end"
2305
+ }, E(D(ue)(R.value.y.axisLabels.formatter, e.value, D(t)({
2306
+ p: z.value.dataLabels.prefix,
2307
+ v: e.value,
2308
+ s: z.value.dataLabels.suffix,
2309
+ r: R.value.y.axisLabels.rounding
2310
+ }), { datapoint: e })), 11, Ht))), 128))], 512)) : g("", !0),
2311
+ R.value.y.axisLabels.show && !z.value.distributed && I.value.orientation === "horizontal" ? (S(), _("g", {
2312
+ key: 15,
2313
+ ref_key: "scaleLabels",
2314
+ ref: Gn
2315
+ }, [(S(!0), _(p, null, w(Q.value, (e, t) => (S(), _("path", {
2316
+ key: `scy_${t}`,
2317
+ d: `M${e.horizontal_x},${K.value.bottom} ${e.horizontal_x},${K.value.bottom + 6}`,
2318
+ class: y({ "vue-data-ui-transition": D(or) }),
2319
+ stroke: R.value.x.axisColor,
2320
+ "stroke-width": 1,
2321
+ "stroke-linecap": "round"
2322
+ }, null, 10, Ut))), 128)), (S(!0), _(p, null, w(Q.value, (e, n) => (S(), _("text", {
2323
+ class: y(["vue-data-ui-time-label", { "vue-data-ui-transition": D(or) }]),
2324
+ key: `tly_${n}`,
2325
+ "font-size": B.value.fontSize,
2326
+ "font-weight": R.value.y.axisLabels.bold ? "bold" : "normal",
2327
+ fill: R.value.y.axisLabels.color,
2328
+ "text-anchor": B.value.rotation > 0 ? "start" : B.value.rotation < 0 ? "end" : "middle",
2329
+ transform: `translate(${e.horizontal_x}, ${K.value.bottom + B.value.fontSize * 1.3 + B.value.offsetY}), rotate(${B.value.rotation})`
2330
+ }, E(D(ue)(R.value.y.axisLabels.formatter, e.value, D(t)({
2331
+ p: z.value.dataLabels.prefix,
2332
+ v: e.value,
2333
+ s: z.value.dataLabels.suffix,
2334
+ r: R.value.y.axisLabels.rounding
2335
+ }), { datapoint: e })), 11, Wt))), 128))], 512)) : g("", !0),
2336
+ B.value.show && I.value.orientation === "vertical" ? (S(), _("g", {
2337
+ key: 16,
2338
+ ref_key: "timeLabelsEls",
2339
+ ref: Kn
2340
+ }, [n.$slots["time-label"] ? (S(), _("g", Gt, [(S(!0), _(p, null, w(ki.value, (e, t) => (S(), _("g", null, [T(n.$slots, "time-label", et({ ref_for: !0 }, {
2341
+ x: K.value.left + Z.value * t + Z.value / 2,
2342
+ y: K.value.bottom + R.value.x.timeLabels.fontSize * 1.3 + R.value.x.timeLabels.offsetY,
2343
+ fontSize: R.value.x.timeLabels.fontSize,
2344
+ fill: R.value.x.timeLabels.color,
2345
+ transform: `translate(${K.value.left + Z.value * t + Z.value / 2}, ${K.value.bottom + B.value.fontSize * 1.3 + B.value.offsetY}), rotate(${B.value.rotation})`,
2346
+ absoluteIndex: e.absoluteIndex,
2347
+ content: e.text,
2348
+ textAnchor: R.value.x.timeLabels.rotation > 0 ? "start" : R.value.x.timeLabels.rotation < 0 ? "end" : "middle",
2349
+ show: !0
2350
+ }), void 0, !0)]))), 256))])) : (S(), _("g", Kt, [(S(!0), _(p, null, w(ki.value, (e, t) => (S(), _("g", null, [String(e.text).includes("\n") ? (S(), _("text", {
2351
+ class: y({ "vue-data-ui-transition": D(or) }),
2352
+ key: t + "-multi",
2353
+ "text-anchor": R.value.x.timeLabels.rotation > 0 ? "start" : R.value.x.timeLabels.rotation < 0 ? "end" : "middle",
2354
+ "font-size": R.value.x.timeLabels.fontSize,
2355
+ fill: R.value.x.timeLabels.color,
2356
+ transform: `
2357
+ translate(
2358
+ ${K.value.left + Z.value * t + Z.value / 2},
2359
+ ${K.value.bottom + B.value.fontSize * 1.3 + B.value.offsetY}
2360
+ ),
2361
+ rotate(${B.value.rotation})
2362
+ `,
2363
+ style: x({ cursor: U.value ? "pointer" : "default" }),
2364
+ innerHTML: D(s)({
2365
+ content: String(e.text),
2366
+ fontSize: R.value.x.timeLabels.fontSize,
2367
+ fill: R.value.x.timeLabels.color,
2368
+ x: 0,
2369
+ y: 0
2370
+ }),
2371
+ onClick: () => ga(e, t)
2372
+ }, null, 14, Jt)) : (S(), _("text", {
2373
+ class: "vue-data-ui-time-label",
2374
+ key: t,
2375
+ "text-anchor": R.value.x.timeLabels.rotation > 0 ? "start" : R.value.x.timeLabels.rotation < 0 ? "end" : "middle",
2376
+ "font-size": R.value.x.timeLabels.fontSize,
2377
+ "font-weight": R.value.x.timeLabels.bold ? "bold" : "normal",
2378
+ fill: R.value.x.timeLabels.color,
2379
+ transform: `translate(${K.value.left + Z.value * t + Z.value / 2}, ${K.value.bottom + B.value.fontSize * 1.3 + B.value.offsetY}), rotate(${B.value.rotation})`,
2380
+ style: x({ cursor: U.value ? "pointer" : "default" }),
2381
+ onClick: () => ga(e, t)
2382
+ }, E(e.text), 13, qt))]))), 256))]))], 512)) : g("", !0),
2383
+ B.value.show && I.value.orientation === "horizontal" ? (S(), _("g", {
2384
+ key: 17,
2385
+ ref_key: "timeLabelsEls",
2386
+ ref: Kn
2387
+ }, [n.$slots["time-label"] ? (S(), _("g", Yt, [(S(!0), _(p, null, w(ki.value, (e, t) => (S(), _("g", null, [T(n.$slots, "time-label", et({ ref_for: !0 }, {
2388
+ x: K.value.left - 8,
2389
+ y: K.value.top + Z.value * t + Z.value / 2 + R.value.y.axisLabels.fontSize / 3,
2390
+ fontSize: R.value.x.timeLabels.fontSize,
2391
+ fill: R.value.x.timeLabels.color,
2392
+ transform: null,
2393
+ absoluteIndex: e.absoluteIndex,
2394
+ content: e.text,
2395
+ textAnchor: "end",
2396
+ show: !0
2397
+ }), void 0, !0)]))), 256))])) : (S(), _("g", Xt, [(S(!0), _(p, null, w(ki.value, (e, t) => (S(), _("g", null, [String(e.text).includes("\n") ? (S(), _("text", {
2398
+ key: 1,
2399
+ "text-anchor": "end",
2400
+ "font-size": R.value.y.axisLabels.fontSize,
2401
+ "font-weight": R.value.y.axisLabels.bold ? "bold" : "normal",
2402
+ fill: R.value.y.axisLabels.color,
2403
+ transform: `translate(${K.value.left - 8}, ${K.value.top + Z.value * t + Z.value / 2 + R.value.y.axisLabels.fontSize / 3})`,
2404
+ style: x({ cursor: U.value ? "pointer" : "default" }),
2405
+ onClick: () => ga(e, t),
2406
+ innerHTML: D(te)({
2407
+ content: String(e.text),
2408
+ fontSize: R.value.y.axisLabels.fontSize,
2409
+ fill: R.value.y.axisLabels.color,
2410
+ stroke: H.value.backgroundColor,
2411
+ x: K.value.left - 8,
2412
+ y: 0
2413
+ })
2414
+ }, null, 12, Qt)) : (S(), _("text", {
2415
+ key: 0,
2416
+ "text-anchor": "end",
2417
+ "font-size": R.value.y.axisLabels.fontSize,
2418
+ "font-weight": R.value.y.axisLabels.bold ? "bold" : "normal",
2419
+ fill: R.value.y.axisLabels.color,
2420
+ stroke: H.value.backgroundColor,
2421
+ "stroke-linecap": "round",
2422
+ "stroke-linejoin": "round",
2423
+ "stroke-width": "3",
2424
+ "paint-order": "stroke fill",
2425
+ transform: `translate(${K.value.left - 8}, ${K.value.top + Z.value * t + Z.value / 2 + R.value.y.axisLabels.fontSize / 3})`,
2426
+ style: x({ cursor: U.value ? "pointer" : "default" }),
2427
+ onClick: () => ga(e, t)
2428
+ }, E(e.text), 13, Zt))]))), 256))]))], 512)) : g("", !0),
2429
+ G.value.showTooltip && I.value.orientation === "vertical" ? (S(!0), _(p, { key: 18 }, w(Y.value.end - Y.value.start, (e, t) => (S(), _("rect", {
2430
+ x: K.value.left + t * Z.value,
2431
+ y: K.value.top,
2432
+ width: Z.value,
2433
+ height: K.value.height < 0 ? 0 : K.value.height,
2434
+ onClick: () => Gi(t),
2435
+ onMouseenter: () => Xi(t, "pointer"),
2436
+ onMouseleave: () => qi(t),
2437
+ fill: t === P.value || t === ar.value ? H.value.highlighter.color : "transparent",
2438
+ style: x({ opacity: H.value.highlighter.opacity / 100 })
2439
+ }, null, 44, $t))), 256)) : g("", !0),
2440
+ G.value.showTooltip && I.value.orientation === "horizontal" ? (S(!0), _(p, { key: 19 }, w(Y.value.end - Y.value.start, (e, t) => (S(), _("rect", {
2441
+ x: K.value.left,
2442
+ y: K.value.top + t * Z.value,
2443
+ width: K.value.width < 0 ? 0 : K.value.width,
2444
+ height: Z.value,
2445
+ onClick: () => Gi(t),
2446
+ onMouseenter: () => Xi(t, "pointer"),
2447
+ onMouseleave: () => qi(t),
2448
+ fill: t === P.value || t === ar.value ? H.value.highlighter.color : "transparent",
2449
+ style: x({ opacity: H.value.highlighter.opacity / 100 })
2450
+ }, null, 44, en))), 256)) : g("", !0),
2451
+ qa.value ? (S(), _("rect", {
2452
+ key: 20,
2453
+ x: qa.value.x,
2454
+ y: qa.value.y,
2455
+ width: qa.value.width,
2456
+ height: qa.value.height,
2457
+ fill: $r.value.selection.fill,
2458
+ "fill-opacity": $r.value.selection.fillOpacity,
2459
+ stroke: $r.value.selection.stroke,
2460
+ "stroke-opacity": $r.value.selection.strokeOpacity,
2461
+ "stroke-width": $r.value.selection.strokeWidth,
2462
+ "stroke-dasharray": $r.value.selection.strokeDasharray,
2463
+ "stroke-linecap": "round",
2464
+ "stroke-linejoin": "round",
2465
+ "pointer-events": "none"
2466
+ }, null, 8, tn)) : g("", !0),
2467
+ ri.value ? (S(), _("rect", et({ key: 21 }, Wr.value, {
2468
+ "data-start": Y.value.start,
2469
+ "data-end": Y.value.end
2470
+ }), null, 16, nn)) : g("", !0),
2471
+ T(n.$slots, "svg", { svg: {
2472
+ drawingArea: K.value,
2473
+ slicer: Y.value,
2474
+ data: $.value,
2475
+ isPrintingImg: D(xr) || D(Sr) || D(Ta),
2476
+ isPrintingSvg: D(Ea),
2477
+ barWidth: Z.value
2478
+ } }, void 0, !0)
2479
+ ], 46, ht)), n.$slots.hint ? (S(), _("div", rn, [T(n.$slots, "hint", b(v({
2480
+ hint: I.value.a11y.translations.keyboardNavigation,
2481
+ isVisible: Ha.value
2482
+ })), void 0, !0)])) : g("", !0)]),
2483
+ n.$slots.watermark ? (S(), _("div", an, [T(n.$slots, "watermark", b(v({ isPrinting: D(xr) || D(Sr) || D(Ta) || D(Ea) })), void 0, !0)])) : g("", !0),
2484
+ H.value.zoom.show && En.value && ja.value && J.value > 6 ? (S(), h(Ve, {
2485
+ key: 5,
2486
+ ref_key: "chartSlicer",
2487
+ ref: Nn,
2488
+ "data-dom-to-png-ignore-layout": "",
2489
+ allMinimaps: _i.value,
2490
+ background: H.value.zoom.color,
2491
+ borderColor: H.value.backgroundColor,
2492
+ customFormat: H.value.zoom.customFormat,
2493
+ cutNullValues: !1,
2494
+ forceZeroCenter: !0,
2495
+ enableRangeHandles: H.value.zoom.enableRangeHandles,
2496
+ enableSelectionDrag: H.value.zoom.enableSelectionDrag,
2497
+ end: Y.value.end,
2498
+ focusOnDrag: H.value.zoom.focusOnDrag,
2499
+ focusRangeRatio: H.value.zoom.focusRangeRatio,
2500
+ fontSize: H.value.zoom.fontSize,
2501
+ immediate: !H.value.zoom.preview.enable,
2502
+ inputColor: H.value.zoom.color,
2503
+ isPreview: ri.value,
2504
+ labelLeft: B.value.values[Y.value.start] ? Ci.value?.[0]?.text ?? "" : "",
2505
+ labelRight: B.value.values[Y.value.end - 1] ? Ci.value?.at(-1)?.text ?? "" : "",
2506
+ max: Math.max(...e.dataset.map((e) => e.series.length)),
2507
+ min: 0,
2508
+ minimap: gi.value,
2509
+ minimapCompact: H.value.zoom.minimap.compact,
2510
+ minimapFrameColor: H.value.zoom.minimap.frameColor,
2511
+ minimapIndicatorColor: H.value.zoom.minimap.indicatorColor,
2512
+ minimapMerged: !1,
2513
+ minimapSelectedColor: H.value.zoom.minimap.selectedColor,
2514
+ minimapSelectedColorOpacity: H.value.zoom.minimap.selectedColorOpacity,
2515
+ minimapSelectedIndex: P.value,
2516
+ minimapSelectionRadius: 1,
2517
+ preciseLabels: Pi.value.length ? Pi.value : wi.value,
2518
+ refreshEndPoint: H.value.zoom.endIndex === null ? Math.max(...e.dataset.map((e) => e.series.length)) : H.value.zoom.endIndex + 1,
2519
+ refreshStartPoint: H.value.zoom.startIndex === null ? 0 : H.value.zoom.startIndex,
2520
+ selectColor: H.value.zoom.highlightColor,
2521
+ selectedSeries: Ji.value,
2522
+ smoothMinimap: !1,
2523
+ start: Y.value.start,
2524
+ textColor: H.value.color,
2525
+ timeLabels: wi.value,
2526
+ usePreciseLabels: B.value.datetimeFormatter.enable && !H.value.zoom.useDefaultFormat,
2527
+ valueEnd: Y.value.end,
2528
+ valueStart: Y.value.start,
2529
+ verticalHandles: H.value.zoom.minimap.verticalHandles,
2530
+ maxWidth: H.value.zoom.maxWidth,
2531
+ minimapLeftInsetRatio: K.value.chartWidth > 0 && H.value.zoom.autoFit ? K.value.left / K.value.chartWidth : null,
2532
+ minimapRightInsetRatio: K.value.chartWidth > 0 && H.value.zoom.autoFit ? (K.value.chartWidth - K.value.right) / K.value.chartWidth : null,
2533
+ isCursorPointer: U.value,
2534
+ additionalMinimapHeight: H.value.zoom.minimap.additionalHeight,
2535
+ handleType: H.value.zoom.minimap.handleType,
2536
+ handleIconColor: H.value.zoom.minimap.handleIconColor,
2537
+ handleBorderWidth: H.value.zoom.minimap.handleBorderWidth,
2538
+ handleBorderColor: H.value.zoom.minimap.handleBorderColor,
2539
+ handleFill: H.value.zoom.minimap.handleFill,
2540
+ handleWidth: H.value.zoom.minimap.handleWidth,
2541
+ "onUpdate:end": Ia,
2542
+ "onUpdate:start": Fa,
2543
+ onTrapMouse: Gr,
2544
+ onReset: r[0] ||= () => pi({
2545
+ force: !0,
2546
+ publish: !0
2547
+ }),
2548
+ onFutureEnd: r[1] ||= (e) => ii("end", e),
2549
+ onFutureStart: r[2] ||= (e) => ii("start", e)
2550
+ }, {
2551
+ "reset-action": O(({ reset: e }) => [T(n.$slots, "reset-action", b(v({ reset: e })), void 0, !0)]),
2552
+ slotMap: O(({ width: e, height: t, unitW: n }) => [Number(z.value.borderRadius) > 0 ? (S(), _("defs", on, [(S(!0), _(p, null, w(Vi({
2553
+ minimapH: t,
2554
+ unitW: n
2555
+ }), (e, t) => (S(), _(p, { key: `stackbar-minimap-outer-clip-${t}` }, [e ? (S(), _("clipPath", {
2556
+ key: 0,
2557
+ id: `stackbar-minimap-outer-clip-${M.value}-${t}`,
2558
+ clipPathUnits: "userSpaceOnUse"
2559
+ }, [Ye("rect", {
2560
+ x: e.x,
2561
+ y: e.y,
2562
+ width: e.width,
2563
+ height: e.height,
2564
+ rx: e.rx
2565
+ }, null, 8, cn)], 8, sn)) : g("", !0)], 64))), 128))])) : g("", !0), (S(!0), _(p, null, w($.value, (e) => (S(), _("g", { key: e.id }, [(S(!0), _(p, null, w(e.xMinimap({
2566
+ left: 0,
2567
+ unitW: n
2568
+ }), (r, a) => (S(), _("rect", {
2569
+ key: `minimap-rect-${e.minimapRectKeys[a]}`,
2570
+ x: a === 0 ? r - n * (z.value.gapRatio / 4) : r - n / 2,
2571
+ y: Math.max(0, Math.min(t, e.yMinimap({ minimapH: t })[a])),
2572
+ height: e.heightMinimap({ minimapH: t })[a],
2573
+ width: [0, J.value - 1].includes(a) ? n * (1 - z.value.gapRatio / 2) / 2 : n * (1 - z.value.gapRatio / 2),
2574
+ fill: z.value.gradient.show ? `url(#gradient_${e.id})` : e.color,
2575
+ stroke: H.value.backgroundColor,
2576
+ "stroke-width": .5,
2577
+ rx: "0",
2578
+ "clip-path": Number(z.value.borderRadius) > 0 ? `url(#stackbar-minimap-outer-clip-${M.value}-${a})` : void 0,
2579
+ "stroke-linecap": "butt",
2580
+ "stroke-linejoin": "miter",
2581
+ style: x({ opacity: a >= X.value.start && a <= X.value.end ? 1 : .62 })
2582
+ }, null, 12, ln))), 128))]))), 128))]),
2583
+ _: 3
2584
+ }, 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("."))) : g("", !0),
2585
+ Qe(D(mn), {
2586
+ teleportTo: V.value.teleportTo,
2587
+ show: G.value.showTooltip && Dn.value,
2588
+ backgroundColor: V.value.backgroundColor,
2589
+ color: V.value.color,
2590
+ fontSize: V.value.fontSize,
2591
+ borderRadius: V.value.borderRadius,
2592
+ borderColor: V.value.borderColor,
2593
+ borderWidth: V.value.borderWidth,
2594
+ backgroundOpacity: V.value.backgroundOpacity,
2595
+ position: V.value.position,
2596
+ offsetX: V.value.offsetX,
2597
+ offsetY: V.value.offsetY,
2598
+ parent: j.value,
2599
+ content: kn.value,
2600
+ isFullscreen: Fn.value,
2601
+ isCustom: D(o)(V.value.customFormat),
2602
+ smooth: V.value.smooth,
2603
+ backdropFilter: V.value.backdropFilter,
2604
+ smoothForce: V.value.smoothForce,
2605
+ smoothSnapThreshold: V.value.smoothSnapThreshold,
2606
+ isA11yMode: er.value === "keyboard",
2607
+ a11yPosition: $n.value
2608
+ }, {
2609
+ "tooltip-before": O(() => [T(n.$slots, "tooltip-before", b(v({ ...On.value })), void 0, !0)]),
2610
+ tooltip: O(() => [T(n.$slots, "tooltip", b(v({ ...On.value })), void 0, !0)]),
2611
+ "tooltip-after": O(() => [T(n.$slots, "tooltip-after", b(v({ ...On.value })), void 0, !0)]),
2612
+ _: 3
2613
+ }, 8, [
2614
+ "teleportTo",
2615
+ "show",
2616
+ "backgroundColor",
2617
+ "color",
2618
+ "fontSize",
2619
+ "borderRadius",
2620
+ "borderColor",
2621
+ "borderWidth",
2622
+ "backgroundOpacity",
2623
+ "position",
2624
+ "offsetX",
2625
+ "offsetY",
2626
+ "parent",
2627
+ "content",
2628
+ "isFullscreen",
2629
+ "isCustom",
2630
+ "smooth",
2631
+ "backdropFilter",
2632
+ "smoothForce",
2633
+ "smoothSnapThreshold",
2634
+ "isA11yMode",
2635
+ "a11yPosition"
2636
+ ]),
2637
+ Ye("div", { id: `legend-bottom-${M.value}` }, null, 8, un),
2638
+ Bn.value && (Ca.value.show || n.$slots.legend) ? (S(), h(Je, {
2639
+ key: 6,
2640
+ to: Ca.value.position === "top" ? `#legend-top-${M.value}` : `#legend-bottom-${M.value}`
2641
+ }, [Ye("div", {
2642
+ ref_key: "chartLegend",
2643
+ ref: Mn
2644
+ }, [T(n.$slots, "legend", { legend: fa.value }, () => [Ca.value.show ? (S(), h(Ke, {
2645
+ key: 0,
2646
+ legendSet: fa.value,
2647
+ config: pa.value,
2648
+ isCursorPointer: U.value,
2649
+ onClickMarker: r[3] ||= ({ legend: e }) => e.segregate()
2650
+ }, Xe({
2651
+ item: O(({ legend: e }) => [D(cr) ? g("", !0) : (S(), _("div", {
2652
+ key: 0,
2653
+ onClick: (t) => e.segregate(),
2654
+ style: x(`opacity:${N.value.includes(e.id) ? .5 : 1}`)
2655
+ }, E(e.name), 13, dn))]),
2656
+ legendToggle: O(() => [fa.value.length > 2 && Ca.value.selectAllToggle.show && !D(cr) ? (S(), h(He, {
2657
+ key: 0,
2658
+ backgroundColor: Ca.value.selectAllToggle.backgroundColor,
2659
+ color: Ca.value.selectAllToggle.color,
2660
+ fontSize: Ca.value.fontSize,
2661
+ checked: N.value.length > 0,
2662
+ isCursorPointer: U.value,
2663
+ onToggle: sa
2664
+ }, null, 8, [
2665
+ "backgroundColor",
2666
+ "color",
2667
+ "fontSize",
2668
+ "checked",
2669
+ "isCursorPointer"
2670
+ ])) : g("", !0)]),
2671
+ _: 2
2672
+ }, [n.$slots.pattern ? {
2673
+ name: "legend-pattern",
2674
+ fn: O(({ legend: e, index: t }) => [Qe(Ie, {
2675
+ shape: e.shape,
2676
+ radius: 30,
2677
+ stroke: "none",
2678
+ plot: {
2679
+ x: 30,
2680
+ y: 30
2681
+ },
2682
+ fill: `url(#pattern_${M.value}_${t})`
2683
+ }, null, 8, ["shape", "fill"])]),
2684
+ key: "0"
2685
+ } : void 0]), 1032, [
2686
+ "legendSet",
2687
+ "config",
2688
+ "isCursorPointer"
2689
+ ])) : g("", !0)], !0)], 512)], 8, ["to"])) : g("", !0),
2690
+ n.$slots.source ? (S(), _("div", {
2691
+ key: 7,
2692
+ ref_key: "source",
2693
+ ref: Pn,
2694
+ dir: "auto"
2695
+ }, [T(n.$slots, "source", {}, void 0, !0)], 512)) : g("", !0),
2696
+ En.value && L.value.buttons.table ? (S(), h(it(ba.value.component), et({ key: 8 }, ba.value.props, {
2697
+ ref_key: "tableUnit",
2698
+ ref: Vn,
2699
+ onClose: xa
2700
+ }), Xe({
2701
+ content: O(() => [Qe(D(_n), {
2702
+ colNames: oa.value.colNames,
2703
+ head: oa.value.head,
2704
+ body: oa.value.body,
2705
+ config: oa.value.config,
2706
+ title: I.value.table.useDialog ? "" : ba.value.title,
2707
+ withCloseButton: !I.value.table.useDialog,
2708
+ isCursorPointer: U.value,
2709
+ onClose: xa
2710
+ }, {
2711
+ th: O(({ th: e }) => [e === "__SUM__" ? (S(), _("div", fn, [Qe(D(hn), {
2712
+ name: "sigma",
2713
+ stroke: oa.value.config.th.color,
2714
+ size: 16
2715
+ }, null, 8, ["stroke"])])) : (S(), _("div", pn, E(e), 1))]),
2716
+ td: O(({ td: e }) => [Ze(E(isNaN(Number(e)) ? e : D(t)({
2717
+ p: z.value.dataLabels.prefix,
2718
+ v: e,
2719
+ s: z.value.dataLabels.suffix,
2720
+ r: I.value.table.td.roundingValue
2721
+ })), 1)]),
2722
+ _: 1
2723
+ }, 8, [
2724
+ "colNames",
2725
+ "head",
2726
+ "body",
2727
+ "config",
2728
+ "title",
2729
+ "withCloseButton",
2730
+ "isCursorPointer"
2731
+ ])]),
2732
+ _: 2
2733
+ }, [I.value.table.useDialog ? {
2734
+ name: "title",
2735
+ fn: O(() => [Ze(E(ba.value.title), 1)]),
2736
+ key: "0"
2737
+ } : void 0, I.value.table.useDialog ? {
2738
+ name: "actions",
2739
+ fn: O(() => [Ye("button", {
2740
+ tabindex: "0",
2741
+ class: "vue-ui-user-options-button",
2742
+ onClick: r[4] ||= (e) => aa(L.value.callbacks.csv),
2743
+ style: x({ cursor: U.value ? "pointer" : "default" })
2744
+ }, [Qe(D(hn), {
2745
+ name: "fileCsv",
2746
+ stroke: ba.value.props.color
2747
+ }, null, 8, ["stroke"])], 4)]),
2748
+ key: "1"
2749
+ } : void 0]), 1040)) : g("", !0),
2750
+ T(n.$slots, "skeleton", {}, () => [D(cr) ? (S(), h(De, { key: 0 })) : g("", !0)], !0)
2751
+ ], 46, dt));
2752
+ }
2753
+ }, [["__scopeId", "data-v-f59c5e45"]]);
2754
+ //#endregion
2755
+ export { ut as n, mn as t };