vue-data-ui 3.7.2 → 3.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/{PackageVersion-ChF5viKP.js → PackageVersion-BEYRLPkk.js} +1 -1
  2. package/dist/{Title-DfFUb9hd.js → Title-C-XBwSUb.js} +1 -1
  3. package/dist/components/vue-ui-3d-bar.js +1 -1
  4. package/dist/components/vue-ui-accordion.js +1 -1
  5. package/dist/components/vue-ui-age-pyramid.js +1 -1
  6. package/dist/components/vue-ui-annotator.js +1 -1
  7. package/dist/components/vue-ui-bullet.js +1 -1
  8. package/dist/components/vue-ui-candlestick.js +1 -1
  9. package/dist/components/vue-ui-carousel-table.js +1 -1
  10. package/dist/components/vue-ui-chestnut.js +1 -1
  11. package/dist/components/vue-ui-chord.js +1 -1
  12. package/dist/components/vue-ui-circle-pack.js +1 -1
  13. package/dist/components/vue-ui-cursor.js +1 -1
  14. package/dist/components/vue-ui-dashboard.js +1 -1
  15. package/dist/components/vue-ui-digits.js +1 -1
  16. package/dist/components/vue-ui-donut-evolution.js +1 -1
  17. package/dist/components/vue-ui-donut.js +1 -1
  18. package/dist/components/vue-ui-dumbbell.js +1 -1
  19. package/dist/components/vue-ui-flow.js +1 -1
  20. package/dist/components/vue-ui-funnel.js +1 -1
  21. package/dist/components/vue-ui-galaxy.js +1 -1
  22. package/dist/components/vue-ui-gauge.js +1 -1
  23. package/dist/components/vue-ui-gizmo.js +1 -1
  24. package/dist/components/vue-ui-heatmap.js +1 -1
  25. package/dist/components/vue-ui-history-plot.js +1 -1
  26. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  27. package/dist/components/vue-ui-kpi.js +1 -1
  28. package/dist/components/vue-ui-mini-loader.js +1 -1
  29. package/dist/components/vue-ui-molecule.js +1 -1
  30. package/dist/components/vue-ui-mood-radar.js +1 -1
  31. package/dist/components/vue-ui-nested-donuts.js +1 -1
  32. package/dist/components/vue-ui-onion.js +1 -1
  33. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  34. package/dist/components/vue-ui-quadrant.js +1 -1
  35. package/dist/components/vue-ui-quick-chart.js +1 -1
  36. package/dist/components/vue-ui-radar.js +1 -1
  37. package/dist/components/vue-ui-rating.js +1 -1
  38. package/dist/components/vue-ui-relation-circle.js +1 -1
  39. package/dist/components/vue-ui-ridgeline.js +1 -1
  40. package/dist/components/vue-ui-rings.js +1 -1
  41. package/dist/components/vue-ui-scatter.js +1 -1
  42. package/dist/components/vue-ui-skeleton.js +1 -1
  43. package/dist/components/vue-ui-smiley.js +1 -1
  44. package/dist/components/vue-ui-spark-trend.js +1 -1
  45. package/dist/components/vue-ui-sparkbar.js +1 -1
  46. package/dist/components/vue-ui-sparkgauge.js +1 -1
  47. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  48. package/dist/components/vue-ui-sparkline.js +1 -1
  49. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  50. package/dist/components/vue-ui-stackbar.js +1 -1
  51. package/dist/components/vue-ui-stackline.js +1 -1
  52. package/dist/components/vue-ui-strip-plot.js +1 -1
  53. package/dist/components/vue-ui-table-heatmap.js +1 -1
  54. package/dist/components/vue-ui-table-sparkline.js +1 -1
  55. package/dist/components/vue-ui-table.js +1 -1
  56. package/dist/components/vue-ui-thermometer.js +1 -1
  57. package/dist/components/vue-ui-timer.js +1 -1
  58. package/dist/components/vue-ui-tiremarks.js +1 -1
  59. package/dist/components/vue-ui-treemap.js +1 -1
  60. package/dist/components/vue-ui-vertical-bar.js +1 -1
  61. package/dist/components/vue-ui-waffle.js +1 -1
  62. package/dist/components/vue-ui-wheel.js +1 -1
  63. package/dist/components/vue-ui-word-cloud.js +1 -1
  64. package/dist/components/vue-ui-world.js +1 -1
  65. package/dist/components/vue-ui-xy-canvas.js +1 -1
  66. package/dist/components/vue-ui-xy.js +1 -1
  67. package/dist/style.css +1 -1
  68. package/dist/types/vue-data-ui.d.ts +8 -2
  69. package/dist/{useNestedProp-CWo6bftQ.js → useNestedProp-BaGpMaAh.js} +7 -1
  70. package/dist/{vue-data-ui-BJ4MpiMs.js → vue-data-ui-D1M9qwkt.js} +65 -65
  71. package/dist/vue-data-ui.js +66 -66
  72. package/dist/{vue-ui-3d-bar-B6gmSXdI.js → vue-ui-3d-bar-CoCbgOJO.js} +3 -3
  73. package/dist/{vue-ui-accordion-DSdZUn2C.js → vue-ui-accordion-D5cPubW1.js} +1 -1
  74. package/dist/{vue-ui-age-pyramid-DcNw2mcF.js → vue-ui-age-pyramid-DEUhypFN.js} +3 -3
  75. package/dist/{vue-ui-annotator-DRaH8hXn.js → vue-ui-annotator-DtD0jPWt.js} +2 -2
  76. package/dist/{vue-ui-bullet-BQ7aEBcL.js → vue-ui-bullet-7qjgalGO.js} +3 -3
  77. package/dist/{vue-ui-candlestick-D1gnLq1W.js → vue-ui-candlestick-Bnm1B432.js} +3 -3
  78. package/dist/{vue-ui-carousel-table-Csgs4BQP.js → vue-ui-carousel-table-BLUxWLuW.js} +2 -2
  79. package/dist/{vue-ui-chestnut-CdDGipKT.js → vue-ui-chestnut-BP4oNfqg.js} +2 -2
  80. package/dist/{vue-ui-chord-CFXX3Zr6.js → vue-ui-chord-BMAajT3t.js} +3 -3
  81. package/dist/vue-ui-circle-pack-gWCG8aBq.js +868 -0
  82. package/dist/{vue-ui-cursor-BMe8ZiV6.js → vue-ui-cursor-CC7T1GfH.js} +1 -1
  83. package/dist/{vue-ui-dashboard-5m_85qb6.js → vue-ui-dashboard-BMHV5DBC.js} +67 -66
  84. package/dist/{vue-ui-digits-D382I0-w.js → vue-ui-digits-rtZhtT7Q.js} +1 -1
  85. package/dist/{vue-ui-donut-evolution-CQvFPqd-.js → vue-ui-donut-evolution-4jLjTu8o.js} +3 -3
  86. package/dist/{vue-ui-donut-BedgcXDU.js → vue-ui-donut-kXNdqByu.js} +3 -3
  87. package/dist/{vue-ui-dumbbell-eEEyZSqh.js → vue-ui-dumbbell-CHUrDJ5v.js} +3 -3
  88. package/dist/{vue-ui-flow-BdpgSvoa.js → vue-ui-flow-BgrCtFbB.js} +3 -3
  89. package/dist/{vue-ui-funnel-GUKwgO3W.js → vue-ui-funnel-kh_nHQ_d.js} +3 -3
  90. package/dist/{vue-ui-galaxy-CdxZ4Baa.js → vue-ui-galaxy-q61N1Ca1.js} +3 -3
  91. package/dist/{vue-ui-gauge-DjaJ4Xpc.js → vue-ui-gauge--vrEx1Q7.js} +3 -3
  92. package/dist/{vue-ui-gizmo-W_gbv96q.js → vue-ui-gizmo-Dz9zqNx3.js} +2 -2
  93. package/dist/{vue-ui-heatmap-CYGsuTff.js → vue-ui-heatmap-C7_RtGNx.js} +4 -4
  94. package/dist/{vue-ui-history-plot-BYFktgOz.js → vue-ui-history-plot-Bm2VFF17.js} +3 -3
  95. package/dist/vue-ui-horizontal-bar-00ME25d_.js +1429 -0
  96. package/dist/{vue-ui-kpi-CKMZDc3n.js → vue-ui-kpi-PyPAVDAf.js} +2 -2
  97. package/dist/{vue-ui-mini-loader-BN72OfS0.js → vue-ui-mini-loader-CRcsZUk3.js} +1 -1
  98. package/dist/{vue-ui-molecule-CNPl7cDa.js → vue-ui-molecule-YqIXct4B.js} +2 -2
  99. package/dist/{vue-ui-mood-radar-DDX1ZcNv.js → vue-ui-mood-radar-DpFJ58Of.js} +3 -3
  100. package/dist/{vue-ui-nested-donuts-DMWnKHkn.js → vue-ui-nested-donuts-QOkMLnTa.js} +3 -3
  101. package/dist/{vue-ui-onion-DuBZ9xjf.js → vue-ui-onion-BeR46Y3m.js} +3 -3
  102. package/dist/{vue-ui-parallel-coordinate-plot-BcSk-NfI.js → vue-ui-parallel-coordinate-plot-CqqaOF3n.js} +3 -3
  103. package/dist/{vue-ui-quadrant-gEIeFkmc.js → vue-ui-quadrant-D7Gv09be.js} +3 -3
  104. package/dist/{vue-ui-quick-chart-CX62youq.js → vue-ui-quick-chart-DCAB-JpR.js} +2 -2
  105. package/dist/{vue-ui-radar-BQZGLL3S.js → vue-ui-radar-BVz8gkrT.js} +3 -3
  106. package/dist/{vue-ui-rating-DtzmtJwF.js → vue-ui-rating-DFSztiJk.js} +1 -1
  107. package/dist/{vue-ui-relation-circle-DWY-Cc7i.js → vue-ui-relation-circle-BvDGkAhO.js} +3 -3
  108. package/dist/{vue-ui-ridgeline-wQogWUH2.js → vue-ui-ridgeline-BER8WtYP.js} +3 -3
  109. package/dist/{vue-ui-rings-CvXJ828s.js → vue-ui-rings-BC4kVZO9.js} +3 -3
  110. package/dist/{vue-ui-scatter-BS1T_X1W.js → vue-ui-scatter-Cj_nwUQe.js} +3 -3
  111. package/dist/{vue-ui-skeleton-Bi9Pn6dP.js → vue-ui-skeleton-pbQFe1ZR.js} +2 -2
  112. package/dist/{vue-ui-smiley-OYyM-ukP.js → vue-ui-smiley-DXOpLaan.js} +1 -1
  113. package/dist/{vue-ui-spark-trend-D_hRfUDW.js → vue-ui-spark-trend-CCD59vRH.js} +2 -2
  114. package/dist/{vue-ui-sparkbar-85QlCiDC.js → vue-ui-sparkbar-B3XicXOw.js} +19 -15
  115. package/dist/{vue-ui-sparkgauge-DEqIqSn_.js → vue-ui-sparkgauge-BUIEKt3Z.js} +2 -2
  116. package/dist/{vue-ui-sparkhistogram-DtM3am-n.js → vue-ui-sparkhistogram-DOi-0q9p.js} +2 -2
  117. package/dist/{vue-ui-sparkline-BA7iYfR2.js → vue-ui-sparkline-CUzBxJZc.js} +2 -2
  118. package/dist/{vue-ui-sparkstackbar-sLareV67.js → vue-ui-sparkstackbar-BQZVQ_JH.js} +2 -2
  119. package/dist/{vue-ui-stackbar-LdHgI3MV.js → vue-ui-stackbar-DJRAGeUd.js} +3 -3
  120. package/dist/{vue-ui-stackline-ByukLAi3.js → vue-ui-stackline-D7SfgedR.js} +3 -3
  121. package/dist/{vue-ui-strip-plot-DVPy0eTe.js → vue-ui-strip-plot-Bt_bGY52.js} +3 -3
  122. package/dist/{vue-ui-table-mP7agibA.js → vue-ui-table-AqUmxgT5.js} +3 -3
  123. package/dist/{vue-ui-table-heatmap-vQEFrjCX.js → vue-ui-table-heatmap-BbyoCxwN.js} +1 -1
  124. package/dist/{vue-ui-table-sparkline-B0F7fFcb.js → vue-ui-table-sparkline-C4pm7LI9.js} +2 -2
  125. package/dist/{vue-ui-thermometer-B7E0zgO2.js → vue-ui-thermometer-Xh1Bnwhw.js} +3 -3
  126. package/dist/{vue-ui-timer-DTiV6ift.js → vue-ui-timer-BtI2vXFo.js} +3 -3
  127. package/dist/{vue-ui-tiremarks-CpaQB_6L.js → vue-ui-tiremarks-DtPAl8zg.js} +3 -3
  128. package/dist/{vue-ui-treemap-q_IPAEdy.js → vue-ui-treemap-BivBPd1f.js} +3 -3
  129. package/dist/{vue-ui-waffle-C3CJUG33.js → vue-ui-waffle-Diw2vY76.js} +3 -3
  130. package/dist/{vue-ui-wheel-D5E3I8Cu.js → vue-ui-wheel-KdYtvamL.js} +3 -3
  131. package/dist/{vue-ui-word-cloud-DIu7QPVH.js → vue-ui-word-cloud-B5W6ae-y.js} +3 -3
  132. package/dist/{vue-ui-world-Z-h0J5T8.js → vue-ui-world-D5IEhVC2.js} +2 -2
  133. package/dist/{vue-ui-xy-DXk2RT8d.js → vue-ui-xy-DI0siwIM.js} +4 -4
  134. package/dist/{vue-ui-xy-canvas-Cr13t9M5.js → vue-ui-xy-canvas-CGuAhUPl.js} +3 -3
  135. package/package.json +1 -1
  136. package/dist/vue-ui-circle-pack-Bu8VNQRl.js +0 -832
  137. package/dist/vue-ui-vertical-bar-BeVsAeU-.js +0 -1271
@@ -0,0 +1,1429 @@
1
+ import { useCssVars as ma, defineAsyncComponent as te, useSlots as Ca, computed as d, ref as s, toRefs as ka, watch as ae, onBeforeUnmount as _a, onMounted as Ne, createElementBlock as u, openBlock as n, unref as i, normalizeStyle as h, normalizeClass as J, createBlock as Q, createCommentVNode as y, renderSlot as g, createVNode as le, withCtx as p, normalizeProps as N, guardReactiveProps as O, createSlots as pe, createElementVNode as r, toDisplayString as v, Fragment as z, renderList as E, mergeProps as gt, resolveDynamicComponent as xa, withKeys as wa, createTextVNode as yt, nextTick as Oe } from "vue";
2
+ import { c as $a, t as La, i as Aa, p as Z, W as ze, j as Ta, g as ue, o as Ee, M as P, l as Ie, a as se, d as W, X as Sa, s as Ve, h as Fa, u as Pa, q as Da, x as Ba, R as Na } from "./lib-C5BH09_g.js";
3
+ import { t as Oa, u as za } from "./useResponsive-DfdjqQps.js";
4
+ import { u as Ea, a as Me } from "./useNestedProp-BaGpMaAh.js";
5
+ import { u as Ia, B as Va } from "./BaseScanner-BgWxam9d.js";
6
+ import { u as Ma } from "./usePrinter-DCJzEiS8.js";
7
+ import { u as Ra } from "./useSvgExport-DrjCWun4.js";
8
+ import { u as Ua } from "./useThemeCheck-DGJ31Vi5.js";
9
+ import { u as Ga } from "./useTableResponsive-Cbx-ACcP.js";
10
+ import { u as Wa } from "./useUserOptionState-BIvW1Kz7.js";
11
+ import { u as Xa } from "./useChartAccessibility-9icAAmYg.js";
12
+ import mt from "./Legend-Web3GjlR.js";
13
+ import Ha from "./vue-ui-accordion-D5cPubW1.js";
14
+ import ja from "./Title-C-XBwSUb.js";
15
+ import { _ as Ct } from "./Shape-DE6X_t31.js";
16
+ import qa from "./img-DUzJeMlr.js";
17
+ import { _ as Ya } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
+ const kt = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", layout: { separators: { color: "#4A4A4A" }, bars: { dataLabels: { color: "#CCCCCC" }, nameLabels: { color: "#CCCCCC" }, parentLabels: { color: "#CCCCCC" } }, highlighter: { color: "#CCCCCC" } }, legend: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, title: { color: "#CCCCCC", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#1A1A1A", backgroundOpacity: 70, color: "#CCCCCC", borderColor: "#5A5A5A" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, td: { backgroundColor: "#1A1A1A", color: "#CCCCCC" } } }, _t = { style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", layout: { bars: { borderRadius: 0, useGradient: !1, dataLabels: { color: "#424242" }, nameLabels: { color: "#424242" }, parentLabels: { color: "#424242" } }, highlighter: { color: "#FF8A65" }, separators: { show: !1 } }, legend: { backgroundColor: "#FFF8E1", color: "#424242" }, title: { color: "#424242", subtitle: { color: "#757575" } }, tooltip: { backgroundColor: "#FFECB3", backgroundOpacity: 30, color: "#424242", borderColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#FFF8E1", color: "#424242" }, td: { backgroundColor: "#FFF8E1", color: "#424242" } } }, xt = { style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", layout: { bars: { borderRadius: 0, useGradient: !1, dataLabels: { color: "#BDBDBD" }, nameLabels: { color: "#BDBDBD" }, parentLabels: { color: "#FFF8E1" } }, highlighter: { color: "#FF8A65" }, separators: { show: !1 } }, legend: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } }, tooltip: { backgroundColor: "#1E1E1E", backgroundOpacity: 30, color: "#FFF8E1", borderColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, td: { backgroundColor: "#1E1E1E", color: "#BDBDBD" } } }, wt = { style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", layout: { bars: { borderRadius: 0, useGradient: !1, dataLabels: { color: "#AACCAA" }, nameLabels: { color: "#99CC99" }, parentLabels: { color: "#99CC99" } }, highlighter: { color: "#66CC66" }, separators: { show: !1 } }, legend: { backgroundColor: "#1A1A1A", color: "#99AA99" }, title: { color: "#66CC66", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#2A2F2A", color: "#AACCAA", borderColor: "#66CC66" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#99AA99" }, td: { backgroundColor: "#1A1A1A", color: "#AACCAA" } } }, $t = { style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", layout: { bars: { borderRadius: 8, useGradient: !0, dataLabels: { color: "#A0AC94" }, nameLabels: { color: "#8A9892" }, parentLabels: { color: "#8A9892" } }, highlighter: { color: "#8F837A" }, separators: { show: !1 } }, legend: { backgroundColor: "#fbfafa", color: "#99AA99" }, title: { color: "#8A9892", subtitle: { color: "#99AA99" } }, tooltip: { backgroundColor: "#fbfafa", color: "#8A9892" } } }, table: { th: { backgroundColor: "#fbfafa", color: "#8F837A" }, td: { backgroundColor: "#fbfafa", color: "#8F837A" } } }, Lt = { style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", layout: { bars: { borderRadius: 0, useGradient: !0, dataLabels: { color: "#61747E" }, nameLabels: { color: "#8A9892" }, parentLabels: { color: "#8A9892" } }, highlighter: { color: "#50606C" }, separators: { show: !0, color: "#DEE1DE" } }, legend: { backgroundColor: "#f6f6fb", color: "#61747E" }, title: { color: "#50606C", subtitle: { color: "#718890" } }, tooltip: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, table: { th: { backgroundColor: "#f6f6fb", color: "#50606C" }, td: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, At = {
19
+ default: {},
20
+ dark: kt,
21
+ celebration: _t,
22
+ celebrationNight: xt,
23
+ hack: wt,
24
+ zen: $t,
25
+ concrete: Lt
26
+ }, no = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
27
+ __proto__: null,
28
+ celebration: _t,
29
+ celebrationNight: xt,
30
+ concrete: Lt,
31
+ dark: kt,
32
+ default: At,
33
+ hack: wt,
34
+ zen: $t
35
+ }, Symbol.toStringTag, { value: "Module" })), Ka = ["id"], Ja = ["onClick"], Qa = ["xmlns", "viewBox"], Za = ["width", "height"], el = ["id"], tl = ["stop-color"], al = ["stop-color"], ll = { key: 1 }, ol = ["x", "y", "width", "height", "fill", "rx"], nl = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], rl = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], ul = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], sl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], il = { class: "vue-ui-horizontal-bar-parent-label" }, cl = ["y", "height", "width", "fill"], dl = ["y", "font-size", "fill", "x", "font-weight"], vl = ["y", "font-size", "fill", "x", "font-weight"], hl = { class: "vue-ui-horizontal-bar-child-label" }, pl = ["x", "y", "font-size", "font-weight"], fl = { class: "vue-ui-horizontal-bar-child-label" }, bl = ["x", "y", "font-size", "fill", "font-weight"], gl = { class: "vue-ui-horizontal-bar-child-label" }, yl = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], ml = ["y", "width", "height", "fill", "onMouseenter", "onMouseleave", "onClick"], Cl = {
36
+ key: 5,
37
+ class: "vue-data-ui-watermark"
38
+ }, kl = ["onClick"], _l = { style: "width:100%;padding-top: 36px;position:relative" }, xl = { class: "vue-ui-data-table" }, wl = { key: 0 }, $l = { style: { width: "100%" } }, Ll = ["data-cell"], Al = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Tl = ["data-cell"], Sl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Fl = ["data-cell"], Pl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Dl = ["data-cell"], Bl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Nl = ["data-cell"], Ol = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, zl = ["data-cell"], El = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Il = ["data-cell"], Vl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ml = {
39
+ __name: "vue-ui-horizontal-bar",
40
+ props: {
41
+ config: {
42
+ type: Object,
43
+ default() {
44
+ return {};
45
+ }
46
+ },
47
+ dataset: {
48
+ type: Array,
49
+ default() {
50
+ return [];
51
+ }
52
+ }
53
+ },
54
+ emits: ["selectLegend"],
55
+ setup(Tt, { expose: St, emit: Ft }) {
56
+ ma((t) => ({
57
+ f6c0c1f6: t.tdo
58
+ }));
59
+ const Pt = te(() => import("./Tooltip-WD0Ros6G.js")), Re = te(() => import("./BaseIcon-CofSxalQ.js")), Dt = te(
60
+ () => import("./PenAndPaper-HCZQTkqi.js")
61
+ ), Bt = te(
62
+ () => import("./UserOptions-B3I-s3Lw.js")
63
+ ), Nt = te(
64
+ () => import("./PackageVersion-BEYRLPkk.js")
65
+ ), Ot = te(
66
+ () => import("./BaseDraggableDialog-CRF94NJQ.js")
67
+ ), { vue_ui_vertical_bar: zt } = Ea(), { isThemeValid: Et, warnInvalidTheme: It } = Ua(), Vt = Ca(), C = Tt, fe = d({
68
+ get() {
69
+ return !!C.dataset && C.dataset.length;
70
+ },
71
+ set(t) {
72
+ return t;
73
+ }
74
+ }), A = s($a()), be = s(!1), ge = s(""), Mt = s(null), Ue = s(0), I = s(null), Ge = s(null), ye = s(null), We = s(null), Xe = s(null), He = s(0), me = s(0), Rt = s(null), oe = s(null), Ce = s(null), Ut = s(null), ke = s(null), w = s([]), Gt = s({ none: 0, asc: 1, desc: 2 }), U = s(0), ie = s(!1), ne = s(0), ee = s(0), _e = s(null), Wt = Ft, e = s(Le()), Xt = d(() => [
75
+ { name: "", value: 6, color: "#d9d9d9" },
76
+ { name: "", value: 5, color: "#d9d9d9" },
77
+ { name: "", value: 4, color: "#d9d9d9" },
78
+ { name: "", value: 3, color: "#d9d9d9" },
79
+ { name: "", value: 2, color: "#d9d9d9" },
80
+ { name: "", value: 1, color: "#d9d9d9" }
81
+ ]), { loading: je, FINAL_DATASET: qe, manualLoading: xe } = Ia({
82
+ ...ka(C),
83
+ FINAL_CONFIG: e,
84
+ prepareConfig: Le,
85
+ callback: () => {
86
+ Promise.resolve().then(async () => {
87
+ x.value.showTable = e.value.table.show, Yt();
88
+ });
89
+ },
90
+ skeletonDataset: Xt.value,
91
+ skeletonConfig: La({
92
+ defaultConfig: e.value,
93
+ userConfig: {
94
+ useCssAnimation: !1,
95
+ userOptions: { show: !1 },
96
+ table: { show: !1 },
97
+ style: {
98
+ chart: {
99
+ backgroundColor: "#99999930",
100
+ layout: {
101
+ bars: {
102
+ offsetX: 110,
103
+ dataLabels: {
104
+ color: "transparent",
105
+ value: { prefix: "", suffix: "", formatter: null }
106
+ },
107
+ nameLabels: { color: "transparent" }
108
+ },
109
+ separators: { color: "#7A7A7A" }
110
+ },
111
+ legend: {
112
+ show: !0,
113
+ backgroundColor: "transparent",
114
+ color: "transparent",
115
+ prefix: "",
116
+ suffix: "",
117
+ formatter: null
118
+ },
119
+ title: { color: "#1A1A1A", subtitle: { color: "#5A5A5A" } }
120
+ }
121
+ }
122
+ }
123
+ })
124
+ }), { userOptionsVisible: we, setUserOptionsVisibility: Ye, keepUserOptionState: Ke } = Wa({ config: e.value }), { svgRef: $e } = Xa({
125
+ config: e.value.style.chart.title
126
+ });
127
+ function Le() {
128
+ const t = Me({
129
+ userConfig: C.config,
130
+ defaultConfig: zt
131
+ });
132
+ let l = {};
133
+ const a = t.theme;
134
+ if (a)
135
+ if (!Et.value(t))
136
+ It(t), l = t;
137
+ else {
138
+ const o = Me({
139
+ userConfig: At[a] || C.config,
140
+ defaultConfig: t
141
+ });
142
+ l = {
143
+ ...Me({ userConfig: C.config, defaultConfig: o }),
144
+ customPalette: t.customPalette.length ? t.customPalette : Aa[a] || Z
145
+ };
146
+ }
147
+ else
148
+ l = t;
149
+ return C.config && ze(C.config, "events.datapointEnter") ? l.events.datapointEnter = C.config.events.datapointEnter : l.events.datapointEnter = null, C.config && ze(C.config, "events.datapointLeave") ? l.events.datapointLeave = C.config.events.datapointLeave : l.events.datapointLeave = null, C.config && ze(C.config, "events.datapointClick") ? l.events.datapointClick = C.config.events.datapointClick : l.events.datapointClick = null, l;
150
+ }
151
+ const M = s(e.value.style.chart.width), X = s(e.value.style.chart.height), k = s(e.value.style.chart.layout.bars.gap);
152
+ ae(
153
+ () => C.config,
154
+ (t) => {
155
+ je.value || (e.value = Le()), we.value = !e.value.userOptions.showOnChartHover, He.value += 1, me.value += 1, x.value.showTable = e.value.table.show, x.value.sortDesc = e.value.style.chart.layout.bars.sort === "desc", x.value.showTooltip = e.value.style.chart.tooltip.show, M.value = e.value.style.chart.width, X.value = e.value.style.chart.height, k.value = e.value.style.chart.layout.bars.gap;
156
+ },
157
+ { deep: !0 }
158
+ ), ae(
159
+ () => C.dataset,
160
+ (t) => {
161
+ Array.isArray(t) && t.length > 0 && (xe.value = !1);
162
+ },
163
+ { deep: !0 }
164
+ );
165
+ const { isPrinting: Je, isImaging: Qe, generatePdf: Ze, generateImage: et } = Ma({
166
+ elementId: `vue-ui-vertical-bar_${A.value}`,
167
+ fileName: e.value.style.chart.title.text || "vue-ui-vertical-bar",
168
+ options: e.value.userOptions.print
169
+ }), Ht = d(() => e.value.userOptions.show && !e.value.style.chart.title.text), tt = d(() => Ta(e.value.customPalette)), at = s(null), jt = d(() => e.value.table.responsiveBreakpoint), ce = d(() => !!e.value.debug), qt = s(0), G = s(null), H = s(null);
170
+ function Yt() {
171
+ if (I.value && (Ee(C.dataset) && (ue({
172
+ componentName: "VueUiVerticalBar",
173
+ type: "dataset",
174
+ debug: ce.value
175
+ }), fe.value = !1, xe.value = !0), Ee(C.dataset) || (xe.value = e.value.loading), e.value.responsive)) {
176
+ const t = Oa(() => {
177
+ const { width: l, height: a } = za({
178
+ chart: I.value,
179
+ title: e.value.style.chart.title.text ? Ge.value : null,
180
+ legend: e.value.style.chart.legend.show ? ye.value : null,
181
+ source: We.value,
182
+ noTitle: Xe.value
183
+ });
184
+ qt.value = a / 3, requestAnimationFrame(async () => {
185
+ X.value = a, M.value = l;
186
+ });
187
+ });
188
+ G.value && (H.value && G.value.unobserve(H.value), G.value.disconnect()), G.value = new ResizeObserver(t), Oe(() => {
189
+ H.value = I.value?.parentNode, H.value && G.value.observe(H.value);
190
+ });
191
+ }
192
+ }
193
+ _a(() => {
194
+ G.value && (H.value && G.value.unobserve(H.value), G.value.disconnect());
195
+ });
196
+ const x = s({
197
+ showTable: e.value.table.show,
198
+ sortDesc: e.value.style.chart.layout.bars.sort === "desc",
199
+ showTooltip: e.value.style.chart.tooltip.show
200
+ }), lt = d(() => x.value.sortDesc), T = d(() => (qe.value.forEach((t, l) => {
201
+ !t.value && !t.children && ue({
202
+ componentName: "VueUiVerticalBar",
203
+ type: "datasetAttributeEmpty",
204
+ property: `value (index ${l})`,
205
+ debug: ce.value
206
+ }), t.children && (Ee(t.children) ? ue({
207
+ componentName: "VueUiVerticalBar",
208
+ type: "datasetAttributeEmpty",
209
+ property: `children (index ${l})`,
210
+ debug: ce.value
211
+ }) : t.children.forEach((a, o) => {
212
+ [null, void 0].includes(a.name) && ue({
213
+ componentName: "VueUiVerticalBar",
214
+ type: "datasetSerieAttribute",
215
+ property: "name",
216
+ key: "children",
217
+ index: o,
218
+ debug: ce.value
219
+ });
220
+ }));
221
+ }), qe.value.map((t, l) => {
222
+ const a = `vertical_parent_${l}_${A.value}`, o = t.children && t.children.length > 0, f = P(
223
+ t.value ? t.value : o ? t.children.map((b) => b.value || 0).reduce((b, F) => b + F, 0) : 0
224
+ ), _ = f >= 0 ? 1 : -1;
225
+ return {
226
+ ...t,
227
+ id: a,
228
+ absoluteIndex: l,
229
+ shape: "square",
230
+ opacity: w.value.includes(a) ? 0.5 : 1,
231
+ value: Math.abs(f),
232
+ sign: _,
233
+ hasChildren: o,
234
+ isChild: !1,
235
+ segregate: () => q(a),
236
+ isSegregated: w.value.includes(a),
237
+ color: Ie(t.color) || tt.value[l] || Z[l] || Z[l % Z.length],
238
+ children: !t.children || !t.children.length ? [] : t.children.toSorted(
239
+ ie.value ? () => 0 : (b, F) => lt.value ? F.value - b.value : b.value - F.value
240
+ ).map((b, F) => ({
241
+ ...b,
242
+ value: P(Math.abs(b.value)),
243
+ absoluteIndex: l,
244
+ sign: b.value >= 0 ? 1 : -1,
245
+ isChild: !0,
246
+ parentId: a,
247
+ parentName: t.name,
248
+ parentValue: f,
249
+ parentSign: _,
250
+ id: `vertical_child_${l}_${F}_${A.value}`,
251
+ childIndex: F,
252
+ color: Ie(b.color) || Ie(t.color) || tt.value[l] || Z[l] || Z[l % Z.length]
253
+ })).map((b, F) => ({
254
+ ...b,
255
+ isFirstChild: F === 0,
256
+ isLastChild: F === t.children.length - 1
257
+ }))
258
+ };
259
+ }).toSorted(
260
+ ie.value ? () => 0 : (t, l) => lt.value ? l.value - t.value : t.value - l.value
261
+ ))), j = d(() => T.value.filter(
262
+ (t) => !w.value.includes(t.id)
263
+ )), $ = d(() => j.value.flatMap((t) => t.hasChildren ? t.children : t)), Kt = d(() => T.value.flatMap((t) => t.hasChildren ? t.children : t)), ot = d(() => j.value.flatMap((t) => t.children && t.children.length > 0 ? t.children.length : 1).reduce((t, l) => t + l, 0)), nt = d(() => ({
264
+ cy: "vertical-bar-div-legend",
265
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
266
+ color: e.value.style.chart.legend.color,
267
+ fontSize: e.value.style.chart.legend.fontSize,
268
+ paddingBottom: 12,
269
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
270
+ })), S = d(() => e.value.style.chart.layout.bars.parentLabels.show ? e.value.style.chart.layout.bars.parentLabels.fontSize * 2 + 10 : 0), D = d(() => {
271
+ const t = [];
272
+ let l = 0;
273
+ return $.value.forEach((a, o) => {
274
+ a.isChild && a.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show && (l += 1), t[o] = l;
275
+ }), t;
276
+ }), m = d(() => {
277
+ const l = Math.max(0, ...D.value) * S.value;
278
+ return (X.value - ot.value * k.value - l) / ot.value;
279
+ }), R = d(() => ({
280
+ width: M.value,
281
+ height: X.value,
282
+ padding: {
283
+ top: 12,
284
+ left: 128 + e.value.style.chart.layout.bars.offsetX,
285
+ right: 64 + e.value.style.chart.layout.bars.paddingRight,
286
+ bottom: 12
287
+ }
288
+ })), Ae = s(0);
289
+ function rt() {
290
+ Oe(() => {
291
+ if (!ke.value) {
292
+ Ae.value = 0;
293
+ return;
294
+ }
295
+ const l = Array.from(ke.value.querySelectorAll("text")).reduce((a, o) => {
296
+ const f = o.getBBox?.().width ?? o.getComputedTextLength();
297
+ return f > a ? f : a;
298
+ }, 0);
299
+ Ae.value = l + 12;
300
+ });
301
+ }
302
+ ae(
303
+ () => [
304
+ $.value,
305
+ M.value,
306
+ X.value,
307
+ e.value.style.chart.layout.bars.nameLabels,
308
+ e.value.style.chart.layout.bars.offsetX
309
+ ],
310
+ () => rt(),
311
+ { deep: !0 }
312
+ ), Ne(() => {
313
+ rt();
314
+ });
315
+ function de() {
316
+ Oe(() => {
317
+ ne.value = 0, ee.value = 0, requestAnimationFrame(() => {
318
+ if (!_e.value) {
319
+ ne.value = 0, ee.value = 0;
320
+ return;
321
+ }
322
+ const t = Array.from(
323
+ _e.value.querySelectorAll("text")
324
+ );
325
+ if (!t.length) {
326
+ ne.value = 0, ee.value = 0;
327
+ return;
328
+ }
329
+ let l = 1 / 0, a = 0;
330
+ t.forEach((ya) => {
331
+ const Be = ya.getBBox(), ft = Be.x, bt = Be.x + Be.width;
332
+ ft < l && (l = ft), bt > a && (a = bt);
333
+ });
334
+ const o = 0, f = M.value, _ = 24, b = Math.max(0, o - l + _), F = Math.max(0, a - f + _);
335
+ ee.value = b, ne.value = F;
336
+ });
337
+ });
338
+ }
339
+ ae(w, () => de(), { deep: !0 }), ae(
340
+ () => [$.value, M.value, X.value],
341
+ () => de(),
342
+ { deep: !0 }
343
+ ), Ne(() => de());
344
+ const c = d(() => {
345
+ const t = Ae.value + Math.abs(e.value.style.chart.layout.bars.nameLabels.offsetX) + ee.value + e.value.style.chart.layout.bars.offsetX, l = R.value.width - R.value.padding.right, a = Math.max(0, l - t - ne.value - ee.value - e.value.style.chart.layout.bars.offsetX);
346
+ return {
347
+ top: R.value.padding.top,
348
+ bottom: R.value.padding.top + R.value.height,
349
+ left: t,
350
+ right: l,
351
+ width: a,
352
+ fullHeight: R.value.padding.top + R.value.padding.bottom + R.value.height
353
+ };
354
+ });
355
+ async function q(t) {
356
+ if (w.value.includes(t))
357
+ w.value = w.value.filter((l) => l !== t);
358
+ else {
359
+ if (w.value.length === T.value.length - 1) return;
360
+ w.value.push(t);
361
+ }
362
+ Wt("selectLegend", j.value), de();
363
+ }
364
+ function ut(t) {
365
+ if (!T.value.length)
366
+ return e.value.debug && console.warn("VueUiHorizontalBar - There are no series to show."), null;
367
+ const l = T.value.find((a) => a.name === t);
368
+ return l || (e.value.debug && console.warn(`VueUiHorizontalBar - Series name not found "${t}"`), null);
369
+ }
370
+ function Jt(t) {
371
+ const l = ut(t);
372
+ l !== null && w.value.includes(l.id) && q(l.id);
373
+ }
374
+ function Qt(t) {
375
+ const l = ut(t);
376
+ l !== null && (w.value.includes(l.id) || q(l.id));
377
+ }
378
+ const V = d(() => j.value.map((t) => Math.abs(t.value)).reduce((t, l) => t + l, 0));
379
+ function st(t, l = !1, a = 0) {
380
+ return l ? W({
381
+ v: P(Math.abs(t) / V.value * 100),
382
+ s: "%",
383
+ r: a
384
+ }) : Math.abs(t) / V.value;
385
+ }
386
+ const Y = d(() => $.value.map((t) => t.sign).includes(-1)), Zt = d(() => Math.max(
387
+ ...j.value.flatMap((t) => t.children && t.children.length ? Math.max(...t.children.map((l) => l.value)) : t.value)
388
+ ));
389
+ function L(t) {
390
+ const l = t / Zt.value;
391
+ return c.value.width / (Y.value ? 2 : 1) * l;
392
+ }
393
+ function ea(t) {
394
+ return L(t) + c.value.left;
395
+ }
396
+ function re(t, l) {
397
+ const a = j.value.find((b) => b.id === t.parentId);
398
+ return {
399
+ y: c.value.top + (k.value + m.value) * l + D.value[l] * S.value - S.value + e.value.style.chart.layout.bars.parentLabels.fontSize,
400
+ name: a.name,
401
+ value: [void 0, NaN, null].includes(a.value) ? "" : a.sign === 1 ? a.value : -a.value,
402
+ percentageToTotal: isNaN(a.value / V.value) ? "" : st(
403
+ a.value,
404
+ !0,
405
+ e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage
406
+ ),
407
+ sign: a.sign
408
+ };
409
+ }
410
+ function ta() {
411
+ return j.value;
412
+ }
413
+ function aa(t, l) {
414
+ return re(t, l).name;
415
+ }
416
+ function la(t, l) {
417
+ const a = re(t, l);
418
+ return it(a.value, a, l, t.parentSign || t.sign);
419
+ }
420
+ const Te = s(null), Se = s(null);
421
+ function oa({ datapoint: t, seriesIndex: l }) {
422
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: l });
423
+ }
424
+ function na({ datapoint: t, seriesIndex: l }) {
425
+ e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: l }), Mt.value = null, be.value = !1, Te.value = null;
426
+ }
427
+ function ra(t, l) {
428
+ e.value.events.datapointEnter && e.value.events.datapointEnter({ datpoint: t, seriesIndex: l }), Se.value = {
429
+ datapoint: t,
430
+ seriesIndex: l,
431
+ series: T.value,
432
+ config: e.value
433
+ }, be.value = !0, Te.value = t.id;
434
+ let a = "";
435
+ const o = t.isChild ? t.parentName : t.name, f = t.isChild ? t.name : "", _ = e.value.style.chart.tooltip.customFormat;
436
+ Ba(_) && Na(
437
+ () => _({
438
+ datapoint: t,
439
+ series: T.value,
440
+ config: e.value,
441
+ seriesIndex: l
442
+ })
443
+ ) ? ge.value = _({
444
+ datapoint: t,
445
+ series: T.value,
446
+ config: e.value,
447
+ seriesIndex: l
448
+ }) : (a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
449
+ <div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${t.color}"/>${Vt.pattern ? `<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${A.value}_${t.absoluteIndex})"/>` : ""}</svg> ${o}</div>
450
+ ${f ? `<div>${f}</div>` : ""}
451
+ </div>`, e.value.style.chart.tooltip.showValue && (a += `<div>${e.value.translations.value}: <b>${se(
452
+ e.value.style.chart.layout.bars.dataLabels.value.formatter,
453
+ t.sign === 1 ? t.value : -t.value,
454
+ W({
455
+ p: e.value.style.chart.tooltip.prefix,
456
+ v: t.sign === 1 ? t.value : -t.value,
457
+ s: e.value.style.chart.tooltip.suffix,
458
+ r: e.value.style.chart.tooltip.roundingValue
459
+ }),
460
+ { datapoint: t, seriesIndex: l }
461
+ )}</b></div>`), e.value.style.chart.tooltip.showPercentage && (a += `<div>${e.value.translations.percentageToTotal} : <b>${W({
462
+ v: Math.abs(t.value) / V.value * 100,
463
+ s: "%",
464
+ r: e.value.style.chart.tooltip.roundingPercentage
465
+ })}</b></div>`, t.isChild && (a += `<div>${e.value.translations.percentageToSerie}: <b>${W({
466
+ v: Math.abs(t.value) / Math.abs(t.parentValue) * 100,
467
+ s: "%",
468
+ r: e.value.style.chart.tooltip.roundingPercentage
469
+ })}</b></div>`)), ge.value = `<div style="text-align:left">${a}</div>`);
470
+ }
471
+ function it(t, l, a, o) {
472
+ if (!e.value.style.chart.layout.bars.dataLabels.value.show)
473
+ return "";
474
+ const f = se(
475
+ e.value.style.chart.layout.bars.dataLabels.value.formatter,
476
+ P(o === -1 && t >= 0 ? -t : t),
477
+ W({
478
+ p: e.value.style.chart.layout.bars.dataLabels.value.prefix,
479
+ v: P(o === -1 && t >= 0 ? -t : t),
480
+ s: e.value.style.chart.layout.bars.dataLabels.value.suffix,
481
+ r: e.value.style.chart.layout.bars.dataLabels.value.roundingValue
482
+ }),
483
+ { datapoint: l, seriesIndex: a }
484
+ ), _ = `(${st(
485
+ t,
486
+ !0,
487
+ e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage
488
+ )})`;
489
+ return `${f}${e.value.style.chart.layout.bars.dataLabels.percentage.show ? ` ${_}` : ""}`;
490
+ }
491
+ const B = d(() => {
492
+ const t = [
493
+ e.value.translations.parentName,
494
+ e.value.translations.value,
495
+ e.value.translations.percentageToTotal,
496
+ e.value.translations.childName,
497
+ e.value.translations.value,
498
+ e.value.translations.percentageToSerie,
499
+ e.value.translations.percentageToTotal
500
+ ], l = $.value.map((a) => a.isChild ? a.isFirstChild ? {
501
+ color: a.color,
502
+ parentName: a.parentName,
503
+ parentValue: a.parentValue,
504
+ percentageToTotal: a.parentValue / V.value,
505
+ childName: a.name,
506
+ childValue: a.sign === 1 ? a.value : -a.value,
507
+ childPercentageToParent: Math.abs(a.value) / Math.abs(a.parentValue),
508
+ childPercentageToTotal: Math.abs(a.value) / V.value
509
+ } : {
510
+ color: "",
511
+ parentName: "",
512
+ parentValue: "",
513
+ percentageToTotal: "",
514
+ childName: a.name,
515
+ childValue: a.sign === 1 ? a.value : -a.value,
516
+ childPercentageToParent: Math.abs(a.value) / Math.abs(a.parentValue),
517
+ childPercentageToTotal: Math.abs(a.value) / V.value
518
+ } : {
519
+ color: a.color,
520
+ parentName: a.name,
521
+ parentValue: a.sign === 1 ? a.value : -a.value,
522
+ percentageToTotal: Math.abs(a.value) / V.value,
523
+ childName: "",
524
+ childValue: "",
525
+ childPercentageToParent: "",
526
+ childPercentageToTotal: ""
527
+ });
528
+ return { head: t, body: l };
529
+ });
530
+ function Fe(t = null) {
531
+ const l = [
532
+ [e.value.style.chart.title.text],
533
+ [e.value.style.chart.title.subtitle.text],
534
+ [""]
535
+ ], a = B.value.head, o = B.value.body.map((b) => [
536
+ b.parentName,
537
+ b.parentValue,
538
+ b.percentageToTotal,
539
+ b.childName,
540
+ b.childValue,
541
+ b.childPercentageToParent,
542
+ b.childPercentageToTotal
543
+ ]), f = l.concat([a]).concat(o), _ = Pa(f);
544
+ t ? t(_) : Da({
545
+ csvContent: _,
546
+ title: e.value.style.chart.title.text || "vue-ui-vertical-bar"
547
+ });
548
+ }
549
+ const K = s(!1);
550
+ function ct(t) {
551
+ K.value = t, Ue.value += 1;
552
+ }
553
+ function dt() {
554
+ x.value.showTable = !x.value.showTable;
555
+ }
556
+ Ne(() => {
557
+ ["none", "asc", "desc"].includes(
558
+ e.value.style.chart.layout.bars.sort
559
+ ) || ue({
560
+ componentName: "VueUiVerticalBar",
561
+ type: "attributeWrongValue",
562
+ property: "style.chart.layout.bars.sort",
563
+ key: e.value.style.chart.layout.bars.sort
564
+ }), U.value = Gt.value[e.value.style.chart.layout.bars.sort], x.value.sortDesc = U.value === 2, ie.value = U.value === 0;
565
+ });
566
+ function ua() {
567
+ U.value += 1, U.value > 2 && (U.value = 0);
568
+ }
569
+ function vt() {
570
+ ua(), x.value.sortDesc = U.value === 2, ie.value = U.value === 0;
571
+ }
572
+ function ht() {
573
+ x.value.showTooltip = !x.value.showTooltip;
574
+ }
575
+ const ve = s(!1);
576
+ function Pe() {
577
+ ve.value = !ve.value;
578
+ }
579
+ async function sa({ scale: t = 2 } = {}) {
580
+ if (!I.value) return;
581
+ const { width: l, height: a } = I.value.getBoundingClientRect(), o = l / a, { imageUri: f, base64: _ } = await qa({
582
+ domElement: I.value,
583
+ base64: !0,
584
+ img: !0,
585
+ scale: t
586
+ });
587
+ return {
588
+ imageUri: f,
589
+ base64: _,
590
+ title: e.value.style.chart.title.text,
591
+ width: l,
592
+ height: a,
593
+ aspectRatio: o
594
+ };
595
+ }
596
+ const he = d(() => {
597
+ const t = e.value.table.useDialog && !e.value.table.show, l = x.value.showTable;
598
+ return {
599
+ component: t ? Ot : Ha,
600
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
601
+ props: t ? {
602
+ backgroundColor: e.value.table.th.backgroundColor,
603
+ color: e.value.table.th.color,
604
+ headerColor: e.value.table.th.color,
605
+ headerBg: e.value.table.th.backgroundColor,
606
+ isFullscreen: K.value,
607
+ fullscreenParent: I.value,
608
+ forcedWidth: Math.min(800, window.innerWidth * 0.8)
609
+ } : {
610
+ hideDetails: !0,
611
+ config: {
612
+ open: l,
613
+ maxHeight: 1e4,
614
+ body: {
615
+ backgroundColor: e.value.style.chart.backgroundColor,
616
+ color: e.value.style.chart.color
617
+ },
618
+ head: {
619
+ backgroundColor: e.value.style.chart.backgroundColor,
620
+ color: e.value.style.chart.color
621
+ }
622
+ }
623
+ }
624
+ };
625
+ });
626
+ ae(
627
+ () => x.value.showTable,
628
+ (t) => {
629
+ e.value.table.show || (t && e.value.table.useDialog && oe.value ? oe.value.open() : "close" in oe.value && oe.value.close());
630
+ }
631
+ );
632
+ const { isResponsive: ia } = Ga(at, jt);
633
+ function De() {
634
+ x.value.showTable = !1, Ce.value && Ce.value.setTableIconState(!1);
635
+ }
636
+ const ca = d(() => T.value.map((t, l) => ({
637
+ ...t,
638
+ shape: "square",
639
+ display: `${t.name}: ${se(
640
+ e.value.style.chart.layout.bars.dataLabels.value.formatter,
641
+ t.value,
642
+ W({
643
+ p: e.value.style.chart.legend.prefix,
644
+ v: t.value,
645
+ s: e.value.style.chart.legend.suffix,
646
+ r: e.value.style.chart.legend.roundingValue
647
+ }),
648
+ { datapoint: t, seriesIndex: l }
649
+ )}`
650
+ }))), da = d(() => e.value.style.chart.backgroundColor), va = d(() => e.value.style.chart.legend), ha = d(() => e.value.style.chart.title), pa = d(() => ca.value.map((t) => ({
651
+ ...t,
652
+ name: t.display
653
+ }))), { exportSvg: fa, getSvg: ba } = Ra({
654
+ svg: $e,
655
+ title: ha,
656
+ legend: va,
657
+ legendItems: pa,
658
+ backgroundColor: da
659
+ });
660
+ async function pt({ isCb: t }) {
661
+ if (t) {
662
+ const { blob: l, url: a, text: o, dataUrl: f } = await ba();
663
+ e.value.userOptions.callbacks.svg({ blob: l, url: a, text: o, dataUrl: f });
664
+ } else
665
+ fa();
666
+ }
667
+ function ga() {
668
+ console.warn("[autoSize]: this legacy method can be safely removed as it ha no impact.");
669
+ }
670
+ return St({
671
+ autoSize: ga,
672
+ getData: ta,
673
+ getImage: sa,
674
+ generatePdf: Ze,
675
+ generateCsv: Fe,
676
+ generateImage: et,
677
+ generateSvg: pt,
678
+ hideSeries: Qt,
679
+ showSeries: Jt,
680
+ toggleTable: dt,
681
+ toggleSort: vt,
682
+ toggleTooltip: ht,
683
+ toggleAnnotator: Pe,
684
+ toggleFullscreen: ct
685
+ }), (t, l) => (n(), u("div", {
686
+ class: J(`vue-data-ui-component vue-ui-vertical-bar ${K.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"} ${e.value.responsive ? "vue-ui-vertical-bar-autosize" : ""}`),
687
+ ref_key: "verticalBarChart",
688
+ ref: I,
689
+ id: `vue-ui-vertical-bar_${A.value}`,
690
+ style: h(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};height:100%`),
691
+ onMouseenter: l[3] || (l[3] = () => i(Ye)(!0)),
692
+ onMouseleave: l[4] || (l[4] = () => i(Ye)(!1))
693
+ }, [
694
+ e.value.userOptions.buttons.annotator ? (n(), Q(i(Dt), {
695
+ key: 0,
696
+ svgRef: i($e),
697
+ backgroundColor: e.value.style.chart.backgroundColor,
698
+ color: e.value.style.chart.color,
699
+ active: ve.value,
700
+ onClose: Pe
701
+ }, {
702
+ "annotator-action-close": p(() => [
703
+ g(t.$slots, "annotator-action-close", {}, void 0, !0)
704
+ ]),
705
+ "annotator-action-color": p(({ color: a }) => [
706
+ g(t.$slots, "annotator-action-color", N(O({ color: a })), void 0, !0)
707
+ ]),
708
+ "annotator-action-draw": p(({ mode: a }) => [
709
+ g(t.$slots, "annotator-action-draw", N(O({ mode: a })), void 0, !0)
710
+ ]),
711
+ "annotator-action-undo": p(({ disabled: a }) => [
712
+ g(t.$slots, "annotator-action-undo", N(O({ disabled: a })), void 0, !0)
713
+ ]),
714
+ "annotator-action-redo": p(({ disabled: a }) => [
715
+ g(t.$slots, "annotator-action-redo", N(O({ disabled: a })), void 0, !0)
716
+ ]),
717
+ "annotator-action-delete": p(({ disabled: a }) => [
718
+ g(t.$slots, "annotator-action-delete", N(O({ disabled: a })), void 0, !0)
719
+ ]),
720
+ _: 3
721
+ }, 8, ["svgRef", "backgroundColor", "color", "active"])) : y("", !0),
722
+ Ht.value ? (n(), u("div", {
723
+ key: 1,
724
+ ref_key: "noTitle",
725
+ ref: Xe,
726
+ class: "vue-data-ui-no-title-space",
727
+ style: "height:36px; width: 100%;background:transparent"
728
+ }, null, 512)) : y("", !0),
729
+ e.value.style.chart.title.text ? (n(), u("div", {
730
+ key: 2,
731
+ ref_key: "chartTitle",
732
+ ref: Ge,
733
+ style: "width:100%;background:transparent;padding-bottom:12px"
734
+ }, [
735
+ (n(), Q(ja, {
736
+ key: `title_${He.value}`,
737
+ config: {
738
+ title: {
739
+ cy: "vertical-bar-div-title",
740
+ ...e.value.style.chart.title
741
+ },
742
+ subtitle: {
743
+ cy: "vertical-bar-div-subtitle",
744
+ ...e.value.style.chart.title.subtitle
745
+ }
746
+ }
747
+ }, null, 8, ["config"]))
748
+ ], 512)) : y("", !0),
749
+ e.value.userOptions.show && fe.value && (i(Ke) || i(we)) ? (n(), Q(i(Bt), {
750
+ ref_key: "userOptionsRef",
751
+ ref: Ce,
752
+ key: `user_options_${Ue.value}`,
753
+ backgroundColor: e.value.style.chart.backgroundColor,
754
+ color: e.value.style.chart.color,
755
+ isImaging: i(Qe),
756
+ isPrinting: i(Je),
757
+ uid: A.value,
758
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
759
+ hasPdf: e.value.userOptions.buttons.pdf,
760
+ hasImg: e.value.userOptions.buttons.img,
761
+ hasSvg: e.value.userOptions.buttons.svg,
762
+ hasXls: e.value.userOptions.buttons.csv,
763
+ hasTable: e.value.userOptions.buttons.table,
764
+ hasSort: e.value.userOptions.buttons.sort,
765
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
766
+ isFullscreen: K.value,
767
+ isTooltip: x.value.showTooltip,
768
+ titles: { ...e.value.userOptions.buttonTitles },
769
+ chartElement: I.value,
770
+ position: e.value.userOptions.position,
771
+ hasAnnotator: e.value.userOptions.buttons.annotator,
772
+ isAnnotation: ve.value,
773
+ callbacks: e.value.userOptions.callbacks,
774
+ printScale: e.value.userOptions.print.scale,
775
+ tableDialog: e.value.table.useDialog,
776
+ onToggleFullscreen: ct,
777
+ onGeneratePdf: i(Ze),
778
+ onGenerateCsv: Fe,
779
+ onGenerateImage: i(et),
780
+ onGenerateSvg: pt,
781
+ onToggleTable: dt,
782
+ onToggleSort: vt,
783
+ onToggleTooltip: ht,
784
+ onToggleAnnotator: Pe,
785
+ style: h({
786
+ visibility: i(Ke) ? i(we) ? "visible" : "hidden" : "visible"
787
+ })
788
+ }, pe({ _: 2 }, [
789
+ t.$slots.menuIcon ? {
790
+ name: "menuIcon",
791
+ fn: p(({ isOpen: a, color: o }) => [
792
+ g(t.$slots, "menuIcon", N(O({ isOpen: a, color: o })), void 0, !0)
793
+ ]),
794
+ key: "0"
795
+ } : void 0,
796
+ t.$slots.optionTooltip ? {
797
+ name: "optionTooltip",
798
+ fn: p(() => [
799
+ g(t.$slots, "optionTooltip", {}, void 0, !0)
800
+ ]),
801
+ key: "1"
802
+ } : void 0,
803
+ t.$slots.optionPdf ? {
804
+ name: "optionPdf",
805
+ fn: p(() => [
806
+ g(t.$slots, "optionPdf", {}, void 0, !0)
807
+ ]),
808
+ key: "2"
809
+ } : void 0,
810
+ t.$slots.optionCsv ? {
811
+ name: "optionCsv",
812
+ fn: p(() => [
813
+ g(t.$slots, "optionCsv", {}, void 0, !0)
814
+ ]),
815
+ key: "3"
816
+ } : void 0,
817
+ t.$slots.optionImg ? {
818
+ name: "optionImg",
819
+ fn: p(() => [
820
+ g(t.$slots, "optionImg", {}, void 0, !0)
821
+ ]),
822
+ key: "4"
823
+ } : void 0,
824
+ t.$slots.optionSvg ? {
825
+ name: "optionSvg",
826
+ fn: p(() => [
827
+ g(t.$slots, "optionSvg", {}, void 0, !0)
828
+ ]),
829
+ key: "5"
830
+ } : void 0,
831
+ t.$slots.optionTable ? {
832
+ name: "optionTable",
833
+ fn: p(() => [
834
+ g(t.$slots, "optionTable", {}, void 0, !0)
835
+ ]),
836
+ key: "6"
837
+ } : void 0,
838
+ t.$slots.optionLabels ? {
839
+ name: "optionLabels",
840
+ fn: p(() => [
841
+ g(t.$slots, "optionLabels", {}, void 0, !0)
842
+ ]),
843
+ key: "7"
844
+ } : void 0,
845
+ t.$slots.optionSort ? {
846
+ name: "optionSort",
847
+ fn: p(() => [
848
+ g(t.$slots, "optionSort", {}, void 0, !0)
849
+ ]),
850
+ key: "8"
851
+ } : void 0,
852
+ t.$slots.optionFullscreen ? {
853
+ name: "optionFullscreen",
854
+ fn: p(({ toggleFullscreen: a, isFullscreen: o }) => [
855
+ g(t.$slots, "optionFullscreen", N(O({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
856
+ ]),
857
+ key: "9"
858
+ } : void 0,
859
+ t.$slots.optionAnnotator ? {
860
+ name: "optionAnnotator",
861
+ fn: p(({ toggleAnnotator: a, isAnnotator: o }) => [
862
+ g(t.$slots, "optionAnnotator", N(O({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
863
+ ]),
864
+ key: "10"
865
+ } : void 0
866
+ ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasSort", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : y("", !0),
867
+ e.value.style.chart.legend.show && e.value.style.chart.legend.position === "top" ? (n(), u("div", {
868
+ key: 4,
869
+ ref_key: "chartLegend",
870
+ ref: ye
871
+ }, [
872
+ (n(), Q(mt, {
873
+ key: `legend_top_${me.value}`,
874
+ legendSet: T.value,
875
+ config: nt.value,
876
+ onClickMarker: l[0] || (l[0] = ({ legend: a }) => q(a.id))
877
+ }, pe({
878
+ item: p(({ legend: a, index: o }) => [
879
+ r("div", {
880
+ onClick: (f) => q(a.id),
881
+ style: h(`opacity:${w.value.includes(a.id) ? 0.5 : 1}`)
882
+ }, v(a.name) + ": " + v(i(se)(
883
+ e.value.style.chart.layout.bars.dataLabels.value.formatter,
884
+ a.value,
885
+ i(W)({
886
+ p: e.value.style.chart.legend.prefix,
887
+ v: a.value,
888
+ s: e.value.style.chart.legend.suffix,
889
+ r: e.value.style.chart.legend.roundingValue
890
+ }),
891
+ { datapoint: a, seriesIndex: o }
892
+ )), 13, Ja)
893
+ ]),
894
+ _: 2
895
+ }, [
896
+ t.$slots.pattern ? {
897
+ name: "legend-pattern",
898
+ fn: p(({ legend: a, index: o }) => [
899
+ le(Ct, {
900
+ shape: a.shape,
901
+ radius: 30,
902
+ stroke: "none",
903
+ plot: { x: 30, y: 30 },
904
+ fill: `url(#pattern_${A.value}_${o})`
905
+ }, null, 8, ["shape", "fill"])
906
+ ]),
907
+ key: "0"
908
+ } : void 0
909
+ ]), 1032, ["legendSet", "config"]))
910
+ ], 512)) : y("", !0),
911
+ (n(), u("svg", {
912
+ ref_key: "svgRef",
913
+ ref: $e,
914
+ xmlns: i(Sa),
915
+ class: J({
916
+ "vue-data-ui-fullscreen--on": K.value,
917
+ "vue-data-ui-fulscreen--off": !K.value
918
+ }),
919
+ viewBox: `0 0 ${M.value} ${X.value}`,
920
+ style: h(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
921
+ }, [
922
+ r("g", {
923
+ ref_key: "G",
924
+ ref: Rt,
925
+ class: "vue-data-ui-g"
926
+ }, [
927
+ le(i(Nt)),
928
+ t.$slots["chart-background"] ? (n(), u("foreignObject", {
929
+ key: 0,
930
+ x: 0,
931
+ y: 0,
932
+ width: c.value.width,
933
+ height: c.value.height,
934
+ style: {
935
+ pointerEvents: "none"
936
+ }
937
+ }, [
938
+ g(t.$slots, "chart-background", {}, void 0, !0)
939
+ ], 8, Za)) : y("", !0),
940
+ (n(!0), u(z, null, E($.value, (a, o) => (n(), u("linearGradient", {
941
+ x1: "0%",
942
+ y1: "0%",
943
+ x2: "100%",
944
+ y2: "0%",
945
+ id: `vertical_bar_gradient_${A.value}_${o}`
946
+ }, [
947
+ r("stop", {
948
+ offset: "0%",
949
+ "stop-color": a.color
950
+ }, null, 8, tl),
951
+ r("stop", {
952
+ offset: "100%",
953
+ "stop-color": i(Ve)(
954
+ i(Fa)(a.color, 0.03),
955
+ 100 - e.value.style.chart.layout.bars.gradientIntensity
956
+ )
957
+ }, null, 8, al)
958
+ ], 8, el))), 256)),
959
+ t.$slots.pattern ? (n(), u("g", ll, [
960
+ (n(!0), u(z, null, E($.value, (a) => (n(), u("defs", null, [
961
+ g(t.$slots, "pattern", gt({ ref_for: !0 }, {
962
+ seriesIndex: a.absoluteIndex,
963
+ patternId: `pattern_${A.value}_${a.absoluteIndex}`
964
+ }), void 0, !0)
965
+ ]))), 256))
966
+ ])) : y("", !0),
967
+ (n(!0), u(z, null, E($.value, (a, o) => (n(), u("g", null, [
968
+ r("rect", {
969
+ x: i(P)(
970
+ Y.value ? c.value.left + c.value.width / 2 - (a.sign === 1 ? 0 : L(a.value) <= 0 ? 1e-4 : L(a.value)) : c.value.left
971
+ ),
972
+ y: c.value.top + (k.value + m.value) * o + D.value[o] * S.value,
973
+ width: i(P)(
974
+ L(a.value) <= 0 ? 1e-4 : L(a.value)
975
+ ),
976
+ height: m.value <= 0 ? 1e-4 : m.value,
977
+ fill: e.value.style.chart.layout.bars.underlayerColor,
978
+ rx: e.value.style.chart.layout.bars.borderRadius,
979
+ class: J({ animated: e.value.useCssAnimation })
980
+ }, null, 10, ol)
981
+ ]))), 256)),
982
+ (n(!0), u(z, null, E($.value, (a, o) => (n(), u("g", null, [
983
+ r("rect", {
984
+ x: i(P)(
985
+ Y.value ? c.value.left + c.value.width / 2 - (a.sign === 1 ? 0 : L(a.value) <= 0 ? 1e-4 : L(a.value)) : c.value.left
986
+ ),
987
+ y: c.value.top + (k.value + m.value) * o + D.value[o] * S.value,
988
+ width: i(P)(
989
+ L(a.value) <= 0 ? 1e-4 : L(a.value)
990
+ ),
991
+ height: m.value <= 0 ? 1e-4 : m.value,
992
+ fill: e.value.style.chart.layout.bars.useGradient ? `url(#vertical_bar_gradient_${A.value}_${o})` : i(Ve)(
993
+ a.color,
994
+ e.value.style.chart.layout.bars.fillOpacity
995
+ ),
996
+ rx: e.value.style.chart.layout.bars.borderRadius,
997
+ stroke: e.value.style.chart.layout.bars.useStroke ? a.color : "none",
998
+ "stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
999
+ class: J({ animated: e.value.useCssAnimation })
1000
+ }, null, 10, nl),
1001
+ t.$slots.pattern ? (n(), u("rect", {
1002
+ key: 0,
1003
+ x: i(P)(
1004
+ Y.value ? c.value.left + c.value.width / 2 - (a.sign === 1 ? 0 : L(a.value) <= 0 ? 1e-4 : L(a.value)) : c.value.left
1005
+ ),
1006
+ y: c.value.top + (k.value + m.value) * o + D.value[o] * S.value,
1007
+ width: i(P)(
1008
+ L(a.value) <= 0 ? 1e-4 : L(a.value)
1009
+ ),
1010
+ height: m.value <= 0 ? 1e-4 : m.value,
1011
+ fill: `url(#pattern_${A.value}_${a.absoluteIndex})`,
1012
+ rx: e.value.style.chart.layout.bars.borderRadius,
1013
+ stroke: e.value.style.chart.layout.bars.useStroke ? a.color : "none",
1014
+ "stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
1015
+ class: J({ animated: e.value.useCssAnimation })
1016
+ }, null, 10, rl)) : y("", !0),
1017
+ (!a.isChild || a.isLastChild) && e.value.style.chart.layout.separators.show && o !== $.value.length - 1 ? (n(), u("line", {
1018
+ key: 1,
1019
+ x1: M.value,
1020
+ x2: e.value.style.chart.layout.separators.fullWidth ? 0 : c.value.left,
1021
+ y1: m.value + k.value / 2 + c.value.top + (k.value + m.value) * o + D.value[o] * S.value,
1022
+ y2: m.value + k.value / 2 + c.value.top + (k.value + m.value) * o + D.value[o] * S.value,
1023
+ stroke: e.value.style.chart.layout.separators.color,
1024
+ "stroke-width": e.value.style.chart.layout.separators.strokeWidth,
1025
+ "stroke-linecap": "round",
1026
+ style: {
1027
+ transition: "none !important",
1028
+ animation: "none !important"
1029
+ }
1030
+ }, null, 8, ul)) : y("", !0),
1031
+ Y.value && e.value.style.chart.layout.separators.show ? (n(), u("line", {
1032
+ key: 2,
1033
+ x1: c.value.left + c.value.width / 2,
1034
+ x2: c.value.left + c.value.width / 2,
1035
+ y1: c.value.top,
1036
+ y2: c.value.bottom,
1037
+ stroke: e.value.style.chart.layout.separators.color,
1038
+ "stroke-width": e.value.style.chart.layout.separators.strokeWidth,
1039
+ "stroke-linecap": "round"
1040
+ }, null, 8, sl)) : y("", !0)
1041
+ ]))), 256)),
1042
+ r("g", {
1043
+ ref_key: "parentLabels",
1044
+ ref: Ut
1045
+ }, [
1046
+ (n(!0), u(z, null, E($.value, (a, o) => (n(), u("g", il, [
1047
+ a.isChild && a.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (n(), u("rect", {
1048
+ key: 0,
1049
+ class: "vue-ui-horizontal-bar-parent-marker",
1050
+ x: 2,
1051
+ y: re(a, o).y - e.value.style.chart.layout.bars.parentLabels.fontSize / 1.5,
1052
+ height: e.value.style.chart.layout.bars.parentLabels.fontSize / 1.5,
1053
+ width: e.value.style.chart.layout.bars.parentLabels.fontSize / 1.5,
1054
+ rx: 1,
1055
+ fill: a.color,
1056
+ style: { animation: "none !important", transition: "none !important" }
1057
+ }, null, 8, cl)) : y("", !0),
1058
+ a.isChild && a.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (n(), u("text", {
1059
+ key: 1,
1060
+ y: re(a, o).y,
1061
+ "font-size": e.value.style.chart.layout.bars.parentLabels.fontSize,
1062
+ fill: e.value.style.chart.layout.bars.parentLabels.color,
1063
+ x: e.value.style.chart.layout.bars.parentLabels.offsetX + e.value.style.chart.layout.bars.parentLabels.fontSize,
1064
+ "font-weight": e.value.style.chart.layout.bars.parentLabels.bold ? "bold" : "normal",
1065
+ "text-anchor": "start"
1066
+ }, v(aa(a, o)), 9, dl)) : y("", !0),
1067
+ a.isChild && a.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (n(), u("text", {
1068
+ key: 2,
1069
+ y: re(a, o).y + e.value.style.chart.layout.bars.parentLabels.fontSize * 1.2,
1070
+ "font-size": e.value.style.chart.layout.bars.parentLabels.fontSize,
1071
+ fill: e.value.style.chart.layout.bars.parentLabels.color,
1072
+ x: e.value.style.chart.layout.bars.parentLabels.offsetX + e.value.style.chart.layout.bars.parentLabels.fontSize,
1073
+ "font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal",
1074
+ "text-anchor": "start"
1075
+ }, v(la(a, o)), 9, vl)) : y("", !0)
1076
+ ]))), 256))
1077
+ ], 512),
1078
+ r("g", {
1079
+ ref_key: "childLabels",
1080
+ ref: ke
1081
+ }, [
1082
+ (n(!0), u(z, null, E(Kt.value, (a, o) => (n(), u("g", hl, [
1083
+ (a.isChild || !a.hasChildren) && e.value.style.chart.layout.bars.nameLabels.show ? (n(), u("text", {
1084
+ key: 0,
1085
+ "text-anchor": "start",
1086
+ x: Math.abs(e.value.style.chart.layout.bars.nameLabels.offsetX),
1087
+ y: i(P)(c.value.top + (k.value + m.value) * o + m.value / 2 + e.value.style.chart.layout.bars.nameLabels.fontSize / 2 + D.value[o] * S.value),
1088
+ "font-size": e.value.style.chart.layout.bars.nameLabels.fontSize,
1089
+ fill: "transparent",
1090
+ "font-weight": e.value.style.chart.layout.bars.nameLabels.bold ? "bold" : "normal",
1091
+ style: { "user-select": "none" }
1092
+ }, v(a.name), 9, pl)) : y("", !0)
1093
+ ]))), 256))
1094
+ ], 512),
1095
+ r("g", null, [
1096
+ (n(!0), u(z, null, E($.value, (a, o) => (n(), u("g", fl, [
1097
+ (a.isChild || !a.hasChildren) && e.value.style.chart.layout.bars.nameLabels.show ? (n(), u("text", {
1098
+ key: 0,
1099
+ "text-anchor": "end",
1100
+ x: c.value.left + e.value.style.chart.layout.bars.nameLabels.offsetX - 6,
1101
+ y: c.value.top + (k.value + m.value) * o + m.value / 2 + e.value.style.chart.layout.bars.nameLabels.fontSize / 3 + D.value[o] * S.value,
1102
+ "font-size": e.value.style.chart.layout.bars.nameLabels.fontSize,
1103
+ fill: e.value.style.chart.layout.bars.nameLabels.color,
1104
+ "font-weight": e.value.style.chart.layout.bars.nameLabels.bold ? "bold" : "normal"
1105
+ }, v(a.name), 9, bl)) : y("", !0)
1106
+ ]))), 256))
1107
+ ]),
1108
+ r("g", {
1109
+ ref_key: "dataLabels",
1110
+ ref: _e
1111
+ }, [
1112
+ (n(!0), u(z, null, E($.value, (a, o) => (n(), u("g", gl, [
1113
+ r("text", {
1114
+ x: Y.value ? c.value.left + c.value.width / 2 + (a.sign === 1 ? -12 : 12) + (a.sign === 1 ? -e.value.style.chart.layout.bars.dataLabels.offsetX : e.value.style.chart.layout.bars.dataLabels.offsetX) : Math.min(
1115
+ ea(a.value) + 3 + e.value.style.chart.layout.bars.dataLabels.offsetX,
1116
+ c.value.right - 2
1117
+ ),
1118
+ y: c.value.top + (k.value + m.value) * o + m.value / 2 + D.value[o] * S.value + e.value.style.chart.layout.bars.dataLabels.fontSize / 3,
1119
+ "text-anchor": !Y.value || a.sign === -1 ? "start" : "end",
1120
+ "font-size": e.value.style.chart.layout.bars.dataLabels.fontSize,
1121
+ fill: e.value.style.chart.layout.bars.dataLabels.color,
1122
+ "font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal"
1123
+ }, v(it(a.value, a, o, a.sign)), 9, yl)
1124
+ ]))), 256))
1125
+ ], 512),
1126
+ (n(!0), u(z, null, E($.value, (a, o) => (n(), u("g", null, [
1127
+ r("rect", {
1128
+ x: 0,
1129
+ y: c.value.top + (k.value + m.value) * o - k.value / 2 + D.value[o] * S.value,
1130
+ width: M.value,
1131
+ height: m.value + k.value <= 0 ? 1e-4 : m.value + k.value,
1132
+ fill: Te.value === a.id ? i(Ve)(
1133
+ e.value.style.chart.layout.highlighter.color,
1134
+ e.value.style.chart.layout.highlighter.opacity
1135
+ ) : "transparent",
1136
+ onMouseenter: (f) => ra(a, o),
1137
+ onMouseleave: (f) => na({ datapoint: a, seriesIndex: o }),
1138
+ onClick: (f) => oa({ datapoint: a, seriesIndex: o })
1139
+ }, null, 40, ml)
1140
+ ]))), 256)),
1141
+ g(t.$slots, "svg", { svg: R.value }, void 0, !0)
1142
+ ], 512)
1143
+ ], 14, Qa)),
1144
+ t.$slots.watermark ? (n(), u("div", Cl, [
1145
+ g(t.$slots, "watermark", N(O({ isPrinting: i(Je) || i(Qe) })), void 0, !0)
1146
+ ])) : y("", !0),
1147
+ e.value.style.chart.legend.show && e.value.style.chart.legend.position === "bottom" ? (n(), u("div", {
1148
+ key: 6,
1149
+ ref_key: "chartLegend",
1150
+ ref: ye
1151
+ }, [
1152
+ (n(), Q(mt, {
1153
+ key: `legend_bottom_${me.value}`,
1154
+ legendSet: T.value,
1155
+ config: nt.value,
1156
+ onClickMarker: l[1] || (l[1] = ({ legend: a }) => q(a.id))
1157
+ }, pe({
1158
+ item: p(({ legend: a, index: o }) => [
1159
+ r("div", {
1160
+ onClick: (f) => q(a.id),
1161
+ style: h(`opacity:${w.value.includes(a.id) ? 0.5 : 1}`)
1162
+ }, v(a.name) + ": " + v(i(se)(
1163
+ e.value.style.chart.layout.bars.dataLabels.value.formatter,
1164
+ a.value,
1165
+ i(W)({
1166
+ p: e.value.style.chart.legend.prefix,
1167
+ v: a.value,
1168
+ s: e.value.style.chart.legend.suffix,
1169
+ r: e.value.style.chart.legend.roundingValue
1170
+ }),
1171
+ { datapoint: a, seriesIndex: o }
1172
+ )), 13, kl)
1173
+ ]),
1174
+ _: 2
1175
+ }, [
1176
+ t.$slots.pattern ? {
1177
+ name: "legend-pattern",
1178
+ fn: p(({ legend: a, index: o }) => [
1179
+ le(Ct, {
1180
+ shape: a.shape,
1181
+ radius: 30,
1182
+ stroke: "none",
1183
+ plot: { x: 30, y: 30 },
1184
+ fill: `url(#pattern_${A.value}_${o})`
1185
+ }, null, 8, ["shape", "fill"])
1186
+ ]),
1187
+ key: "0"
1188
+ } : void 0
1189
+ ]), 1032, ["legendSet", "config"]))
1190
+ ], 512)) : y("", !0),
1191
+ g(t.$slots, "legend", { legend: T.value }, void 0, !0),
1192
+ t.$slots.source ? (n(), u("div", {
1193
+ key: 7,
1194
+ ref_key: "source",
1195
+ ref: We,
1196
+ dir: "auto"
1197
+ }, [
1198
+ g(t.$slots, "source", {}, void 0, !0)
1199
+ ], 512)) : y("", !0),
1200
+ le(i(Pt), {
1201
+ show: x.value.showTooltip && be.value && w.value.length < C.dataset.length,
1202
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1203
+ color: e.value.style.chart.tooltip.color,
1204
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
1205
+ borderColor: e.value.style.chart.tooltip.borderColor,
1206
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
1207
+ fontSize: e.value.style.chart.tooltip.fontSize,
1208
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1209
+ position: e.value.style.chart.tooltip.position,
1210
+ offsetY: e.value.style.chart.tooltip.offsetY,
1211
+ parent: I.value,
1212
+ content: ge.value,
1213
+ isFullscreen: K.value,
1214
+ isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
1215
+ smooth: e.value.style.chart.tooltip.smooth,
1216
+ backdropFilter: e.value.style.chart.tooltip.backdropFilter,
1217
+ smoothForce: e.value.style.chart.tooltip.smoothForce,
1218
+ smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
1219
+ }, {
1220
+ "tooltip-before": p(() => [
1221
+ g(t.$slots, "tooltip-before", N(O({ ...Se.value })), void 0, !0)
1222
+ ]),
1223
+ "tooltip-after": p(() => [
1224
+ g(t.$slots, "tooltip-after", N(O({ ...Se.value })), void 0, !0)
1225
+ ]),
1226
+ _: 3
1227
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1228
+ fe.value && e.value.userOptions.buttons.table ? (n(), Q(xa(he.value.component), gt({ key: 8 }, he.value.props, {
1229
+ ref_key: "tableUnit",
1230
+ ref: oe,
1231
+ onClose: De
1232
+ }), pe({
1233
+ content: p(() => [
1234
+ r("div", {
1235
+ ref_key: "tableContainer",
1236
+ ref: at,
1237
+ class: "vue-ui-vertical-bar-table atom-data-table",
1238
+ style: h(`${e.value.table.useDialog ? "" : "max-height: 300px; margin-top: 24px"}`)
1239
+ }, [
1240
+ r("div", _l, [
1241
+ e.value.table.useDialog ? y("", !0) : (n(), u("div", {
1242
+ key: 0,
1243
+ role: "button",
1244
+ tabindex: "0",
1245
+ style: h(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e.value.table.th.backgroundColor};`),
1246
+ onClick: De,
1247
+ onKeypress: wa(De, ["enter"])
1248
+ }, [
1249
+ le(i(Re), {
1250
+ name: "close",
1251
+ stroke: e.value.table.th.color,
1252
+ "stroke-width": 2
1253
+ }, null, 8, ["stroke"])
1254
+ ], 36)),
1255
+ r("div", {
1256
+ style: { width: "100%", "container-type": "inline-size" },
1257
+ class: J({ "vue-ui-responsive": i(ia) })
1258
+ }, [
1259
+ r("table", xl, [
1260
+ e.value.table.useDialog ? y("", !0) : (n(), u("caption", {
1261
+ key: 0,
1262
+ style: h({
1263
+ backgroundColor: e.value.table.th.backgroundColor,
1264
+ color: e.value.table.th.color,
1265
+ outline: e.value.table.th.outline
1266
+ }),
1267
+ class: "vue-ui-data-table__caption"
1268
+ }, [
1269
+ yt(v(e.value.style.chart.title.text) + " ", 1),
1270
+ e.value.style.chart.title.subtitle.text ? (n(), u("span", wl, v(e.value.style.chart.title.subtitle.text), 1)) : y("", !0)
1271
+ ], 4)),
1272
+ r("thead", null, [
1273
+ r("tr", {
1274
+ role: "row",
1275
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
1276
+ }, [
1277
+ (n(!0), u(z, null, E(B.value.head, (a) => (n(), u("th", {
1278
+ style: h(`outline:${e.value.table.th.outline}`)
1279
+ }, [
1280
+ r("div", $l, v(a), 1)
1281
+ ], 4))), 256))
1282
+ ], 4),
1283
+ r("tr", null, [
1284
+ r("th", {
1285
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
1286
+ }, null, 4),
1287
+ r("th", {
1288
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)
1289
+ }, " ∑ " + v(e.value.table.td.prefix) + v(isNaN(V.value) ? "" : V.value.toFixed(e.value.table.td.roundingValue)) + v(e.value.table.td.suffix), 5),
1290
+ r("th", {
1291
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)
1292
+ }, " 100% ", 4),
1293
+ r("th", {
1294
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
1295
+ }, null, 4),
1296
+ r("th", {
1297
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
1298
+ }, null, 4),
1299
+ r("th", {
1300
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
1301
+ }, null, 4),
1302
+ r("th", {
1303
+ style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
1304
+ }, null, 4)
1305
+ ])
1306
+ ]),
1307
+ r("tbody", null, [
1308
+ (n(!0), u(z, null, E(B.value.body, (a, o) => (n(), u("tr", {
1309
+ class: J({
1310
+ "vue-ui-data-table__tbody__row": !0,
1311
+ "vue-ui-data-table__tbody__row-even": o % 2 === 0,
1312
+ "vue-ui-data-table__tbody__row-odd": o % 2 !== 0
1313
+ }),
1314
+ style: h(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
1315
+ }, [
1316
+ r("td", {
1317
+ class: "vue-ui-data-table__tbody__td",
1318
+ style: h(`outline:${e.value.table.td.outline};font-variant-numeric: tabular-nums;`),
1319
+ "data-cell": B.value.head[0] ?? ""
1320
+ }, [
1321
+ r("div", Al, [
1322
+ a.color ? (n(), u("span", {
1323
+ key: 0,
1324
+ style: h(`color:${a.color};margin-right:3px`)
1325
+ }, "⬤", 4)) : y("", !0),
1326
+ r("span", null, v(a.parentName), 1)
1327
+ ])
1328
+ ], 12, Ll),
1329
+ r("td", {
1330
+ class: "vue-ui-data-table__tbody__td",
1331
+ style: h(`outline:${e.value.table.td.outline}`),
1332
+ "data-cell": B.value.head[1] ?? ""
1333
+ }, [
1334
+ r("div", Sl, v(e.value.table.td.prefix) + v(["", NaN, void 0].includes(a.parentValue) ? "" : a.parentValue.toFixed(
1335
+ e.value.table.td.roundingValue
1336
+ )) + v(e.value.table.td.suffix), 1)
1337
+ ], 12, Tl),
1338
+ r("td", {
1339
+ class: "vue-ui-data-table__tbody__td",
1340
+ style: h(`outline:${e.value.table.td.outline}`),
1341
+ "data-cell": B.value.head[2] ?? ""
1342
+ }, [
1343
+ r("div", Pl, v(["", NaN, void 0].includes(a.percentageToTotal) ? "" : `${(a.percentageToTotal * 100).toFixed(
1344
+ e.value.table.td.roundingPercentage
1345
+ )}%`), 1)
1346
+ ], 12, Fl),
1347
+ r("td", {
1348
+ class: "vue-ui-data-table__tbody__td",
1349
+ style: h(`outline:${e.value.table.td.outline}`),
1350
+ "data-cell": B.value.head[3] ?? ""
1351
+ }, [
1352
+ r("div", Bl, v(a.childName), 1)
1353
+ ], 12, Dl),
1354
+ r("td", {
1355
+ class: "vue-ui-data-table__tbody__td",
1356
+ style: h(`outline:${e.value.table.td.outline}`),
1357
+ "data-cell": B.value.head[4] ?? ""
1358
+ }, [
1359
+ r("div", Ol, v(e.value.table.td.prefix) + v(["", NaN, void 0].includes(a.childValue) ? "" : a.childValue.toFixed(
1360
+ e.value.table.td.roundingValue
1361
+ )) + v(e.value.table.td.suffix), 1)
1362
+ ], 12, Nl),
1363
+ r("td", {
1364
+ class: "vue-ui-data-table__tbody__td",
1365
+ style: h(`outline:${e.value.table.td.outline}`),
1366
+ "data-cell": B.value.head[5] ?? ""
1367
+ }, [
1368
+ r("div", El, v(["", NaN, void 0].includes(
1369
+ a.childPercentageToParent
1370
+ ) ? "" : `${(a.childPercentageToParent * 100).toFixed(
1371
+ e.value.table.td.roundingPercentage
1372
+ )}%`), 1)
1373
+ ], 12, zl),
1374
+ r("td", {
1375
+ class: "vue-ui-data-table__tbody__td",
1376
+ style: h(`outline:${e.value.table.td.outline}`),
1377
+ "data-cell": B.value.head[6] ?? ""
1378
+ }, [
1379
+ r("div", Vl, v(["", NaN, void 0].includes(
1380
+ a.childPercentageToTotal
1381
+ ) ? "" : `${(a.childPercentageToTotal * 100).toFixed(
1382
+ e.value.table.td.roundingPercentage
1383
+ )}%`), 1)
1384
+ ], 12, Il)
1385
+ ], 6))), 256))
1386
+ ])
1387
+ ])
1388
+ ], 2)
1389
+ ])
1390
+ ], 4)
1391
+ ]),
1392
+ _: 2
1393
+ }, [
1394
+ e.value.table.useDialog ? {
1395
+ name: "title",
1396
+ fn: p(() => [
1397
+ yt(v(he.value.title), 1)
1398
+ ]),
1399
+ key: "0"
1400
+ } : void 0,
1401
+ e.value.table.useDialog ? {
1402
+ name: "actions",
1403
+ fn: p(() => [
1404
+ r("button", {
1405
+ tabindex: "0",
1406
+ class: "vue-ui-user-options-button",
1407
+ onClick: l[2] || (l[2] = (a) => Fe(e.value.userOptions.callbacks.csv))
1408
+ }, [
1409
+ le(i(Re), {
1410
+ name: "excel",
1411
+ stroke: he.value.props.color
1412
+ }, null, 8, ["stroke"])
1413
+ ])
1414
+ ]),
1415
+ key: "1"
1416
+ } : void 0
1417
+ ]), 1040)) : y("", !0),
1418
+ i(je) ? (n(), Q(Va, { key: 9 })) : y("", !0)
1419
+ ], 46, Ka));
1420
+ }
1421
+ }, Rl = /* @__PURE__ */ Ya(Ml, [["__scopeId", "data-v-f1ac0dad"]]), ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1422
+ __proto__: null,
1423
+ default: Rl
1424
+ }, Symbol.toStringTag, { value: "Module" }));
1425
+ export {
1426
+ no as a,
1427
+ ro as b,
1428
+ Rl as v
1429
+ };